efficient-shell 8.2.0 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/README.md +7 -6
  2. package/dist/{Browser-HW4FSVZE.js → Browser-DWCAT7YU.js} +14 -14
  3. package/dist/Calculator-B44SNFGQ.js +29 -0
  4. package/dist/{CurrencyConverter-QGJGHF7D.js → CurrencyConverter-QCXULYMM.js} +8 -8
  5. package/dist/{Documents-ZKQGJRXZ.js → Documents-TJGLPXWF.js} +12 -12
  6. package/dist/{Files-D4QVPOWZ.js → Files-6A6VPSMP.js} +87 -87
  7. package/dist/{Notepad-ZFQJ77TM.js → Notepad-F42I5BFB.js} +10 -10
  8. package/dist/{PdfViewer-A4YQDCER.js → PdfViewer-IQQM7DOH.js} +1 -1
  9. package/dist/{PomodoroTimer-42AKGGPS.js → PomodoroTimer-KUB3JUJO.js} +4 -4
  10. package/dist/{Preview-LGPDHVJI.js → Preview-D535MRVA.js} +31 -31
  11. package/dist/Sidebar-EIGME7VA.js +43 -0
  12. package/dist/{Spreadsheet-IZEXECWC.js → Spreadsheet-PUAIM4ZN.js} +14 -14
  13. package/dist/{Stock-6YBJY53A.js → Stock-DCQEYEND.js} +3 -3
  14. package/dist/{Weather-CQIK7FA7.js → Weather-UYCFOHGQ.js} +17 -17
  15. package/dist/{WorldClock-BR7QFSTH.js → WorldClock-WKMFOBKT.js} +6 -6
  16. package/dist/ai/index.js +12 -12
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/charts/BoxPlotChart.js +1 -1
  21. package/dist/charts/CandlestickChart.js +1 -1
  22. package/dist/charts/CartesianPlot.js +1 -1
  23. package/dist/charts/ChartBrush.js +1 -1
  24. package/dist/charts/ChartFrame.js +1 -1
  25. package/dist/charts/ChartSkeleton.js +1 -1
  26. package/dist/charts/ChordChart.js +1 -1
  27. package/dist/charts/ColumnChart.js +1 -1
  28. package/dist/charts/FunnelChart.js +1 -1
  29. package/dist/charts/HeatmapChart.js +1 -1
  30. package/dist/charts/HistogramChart.js +1 -1
  31. package/dist/charts/Meter.js +1 -1
  32. package/dist/charts/PieChart.js +1 -1
  33. package/dist/charts/RadarChart.js +1 -1
  34. package/dist/charts/RadialBarChart.js +1 -1
  35. package/dist/charts/RangeChart.js +1 -1
  36. package/dist/charts/RankedBars.js +1 -1
  37. package/dist/charts/SankeyChart.js +1 -1
  38. package/dist/charts/ScatterChart.js +1 -1
  39. package/dist/charts/StatTile.js +1 -1
  40. package/dist/charts/SunburstChart.js +1 -1
  41. package/dist/charts/TimeSeriesChart.js +1 -1
  42. package/dist/charts/TreemapChart.js +1 -1
  43. package/dist/charts/WaterfallChart.js +1 -1
  44. package/dist/chunk-26DGOAPH.js +14 -0
  45. package/dist/{chunk-G4FMVIJT.js → chunk-2DGTGJYJ.js} +9 -9
  46. package/dist/{chunk-AMTFUUOM.js → chunk-2K76HRXS.js} +1 -1
  47. package/dist/{chunk-RUTL7QGV.js → chunk-2LKH6JM5.js} +1 -1
  48. package/dist/{chunk-4AXCIQB2.js → chunk-2M5JD52X.js} +2 -2
  49. package/dist/{chunk-7ZL7SQCN.js → chunk-2QI3QFX6.js} +1 -1
  50. package/dist/{chunk-3ACF3KU7.js → chunk-2TPUNCT7.js} +9 -9
  51. package/dist/{chunk-3ATZYGAU.js → chunk-2VLQECPC.js} +10 -10
  52. package/dist/{chunk-RERVHKA6.js → chunk-332V47ID.js} +2 -2
  53. package/dist/{chunk-KPF7K32G.js → chunk-3GMHX3WX.js} +4 -4
  54. package/dist/{chunk-NDMFITDJ.js → chunk-3OKD2ZZV.js} +11 -11
  55. package/dist/{chunk-QMIPMPCY.js → chunk-3XLVARRX.js} +6 -6
  56. package/dist/{chunk-DMZL7OH6.js → chunk-42U4LJT7.js} +9 -9
  57. package/dist/{chunk-A34WQDNB.js → chunk-4A2X6KLQ.js} +1 -1
  58. package/dist/{chunk-EWQY4JAO.js → chunk-4AFNDOPF.js} +1 -1
  59. package/dist/{chunk-VAIO7Q4E.js → chunk-4B7ZRWDA.js} +1 -1
  60. package/dist/{chunk-GNWSAZRJ.js → chunk-4CXQX5AX.js} +14 -14
  61. package/dist/{chunk-QRAXICBI.js → chunk-4OYSTWMQ.js} +1 -1
  62. package/dist/{chunk-4VSM4HUV.js → chunk-53XMYVJO.js} +1 -1
  63. package/dist/{chunk-BDCNHMRN.js → chunk-5J6IC25E.js} +1 -1
  64. package/dist/{chunk-CKECXOYL.js → chunk-5J6Y5TOO.js} +1 -1
  65. package/dist/{chunk-G2I55HCU.js → chunk-5K3QLWUX.js} +1 -1
  66. package/dist/chunk-6L7MMUMP.js +2 -0
  67. package/dist/{chunk-TB653ATX.js → chunk-6L7V25YL.js} +5 -5
  68. package/dist/{chunk-EHPSP6M4.js → chunk-7A7HRAC6.js} +11 -11
  69. package/dist/chunk-7GU3LUMW.js +11 -0
  70. package/dist/{chunk-GS7EYBPO.js → chunk-7KYFOYC7.js} +5 -5
  71. package/dist/{chunk-S2WTV2JH.js → chunk-7MX6CMMN.js} +1 -1
  72. package/dist/chunk-7NEIYFM2.js +8 -0
  73. package/dist/{chunk-IIUVMKET.js → chunk-7OLYHD4V.js} +1 -1
  74. package/dist/{chunk-ZNEZO35H.js → chunk-7PCV65OU.js} +5 -5
  75. package/dist/{chunk-VOAVONPN.js → chunk-7UEFFCQV.js} +8 -8
  76. package/dist/{chunk-JIBCYZE3.js → chunk-AP67GBSX.js} +8 -8
  77. package/dist/{chunk-TUR6CTGT.js → chunk-B4LK7WL6.js} +2 -2
  78. package/dist/{chunk-5FWXYW5W.js → chunk-B7IHOBK6.js} +15 -15
  79. package/dist/{chunk-EHV7LRGU.js → chunk-BGVN7HOZ.js} +2 -2
  80. package/dist/{chunk-AZSLR5FC.js → chunk-BHGMJBJ2.js} +1 -1
  81. package/dist/{chunk-X5W2SHXX.js → chunk-BKV6PH3R.js} +1 -1
  82. package/dist/{chunk-PO7ELC4X.js → chunk-BULQOYV6.js} +4 -4
  83. package/dist/{chunk-LEMQKX7D.js → chunk-BXRWPGAT.js} +1 -1
  84. package/dist/{chunk-GDCUF6V4.js → chunk-C4D4L2E5.js} +1 -1
  85. package/dist/{chunk-UMYEVQSH.js → chunk-CASSD64W.js} +5 -5
  86. package/dist/{chunk-CCQLM73G.js → chunk-CJUN2VOD.js} +1 -1
  87. package/dist/{chunk-X3FLNEKK.js → chunk-CP6FITHO.js} +17 -17
  88. package/dist/{chunk-IRRF3PRX.js → chunk-CP6Q24MP.js} +7 -7
  89. package/dist/{chunk-4FMMKKAO.js → chunk-CTB634WT.js} +1 -1
  90. package/dist/{chunk-IFXAQO67.js → chunk-CXDJXNPZ.js} +1 -1
  91. package/dist/{chunk-MNY3Y4QD.js → chunk-DSBLBBES.js} +6 -6
  92. package/dist/chunk-DYSUTUH3.js +15 -0
  93. package/dist/{chunk-BZMFVAOL.js → chunk-EDEQRSJC.js} +1 -1
  94. package/dist/chunk-EDYCBXWD.js +8 -0
  95. package/dist/chunk-EKHT4PDR.js +4 -0
  96. package/dist/chunk-ELVFPH7Y.js +5 -0
  97. package/dist/{chunk-IU645JAM.js → chunk-ENSA3NAS.js} +1 -1
  98. package/dist/{chunk-IXPMFIAS.js → chunk-EPHQ7UQV.js} +1 -1
  99. package/dist/{chunk-6LLCKIV6.js → chunk-EVKBV6IV.js} +1 -1
  100. package/dist/{chunk-REWKCHIU.js → chunk-EY74CLGD.js} +11 -11
  101. package/dist/{chunk-OOUVBV2Q.js → chunk-EZQXLIG3.js} +1 -1
  102. package/dist/chunk-GJDK54K6.js +13 -0
  103. package/dist/{chunk-GM5QZMZH.js → chunk-GVTWQBRU.js} +8 -8
  104. package/dist/{chunk-P2HKX4VB.js → chunk-H7BP5LLG.js} +1 -1
  105. package/dist/{chunk-WZZKQJUJ.js → chunk-HFEYQVKD.js} +1 -1
  106. package/dist/{chunk-SSS5BYD5.js → chunk-IJMV4F2Q.js} +1 -1
  107. package/dist/{chunk-OXALEGWD.js → chunk-IQDIWKES.js} +1 -1
  108. package/dist/{chunk-AEIQP73W.js → chunk-JGZWAEOJ.js} +1 -1
  109. package/dist/{chunk-DM2BSQ26.js → chunk-JK3QY266.js} +6 -6
  110. package/dist/{chunk-K2CJGZPQ.js → chunk-JWMQEWCV.js} +19 -19
  111. package/dist/{chunk-IY56TA4R.js → chunk-KFMRV3MK.js} +3 -3
  112. package/dist/chunk-KXTR2RPB.js +12 -0
  113. package/dist/{chunk-NYJC7I7T.js → chunk-L42Q6GVA.js} +1 -1
  114. package/dist/chunk-LPYFS4RV.js +19 -0
  115. package/dist/{chunk-PDQJIJ2G.js → chunk-M3DZDBS6.js} +9 -9
  116. package/dist/chunk-MH4EUGAB.js +11 -0
  117. package/dist/{chunk-4B33A5LV.js → chunk-MXDW5IFQ.js} +1 -1
  118. package/dist/chunk-MXMBQS75.js +20 -0
  119. package/dist/{chunk-STC63JLD.js → chunk-N7LV32EQ.js} +1 -1
  120. package/dist/{chunk-2PT2CDTN.js → chunk-NIULZZAI.js} +4 -4
  121. package/dist/{chunk-6ZH6RUZN.js → chunk-O6TKI4F5.js} +1 -1
  122. package/dist/{chunk-V7T3FV6K.js → chunk-OCBAIXM2.js} +5 -5
  123. package/dist/chunk-OVNRVFWS.js +1 -0
  124. package/dist/{chunk-MYCBGGOC.js → chunk-OZ2ALRKX.js} +2 -2
  125. package/dist/{chunk-KWJY7YLC.js → chunk-P25GL5BQ.js} +1 -1
  126. package/dist/{chunk-4VTZQT4O.js → chunk-PMJMPYLQ.js} +6 -6
  127. package/dist/{chunk-YH2TXBGF.js → chunk-PPROO6JU.js} +6 -6
  128. package/dist/{chunk-7BSBTDKK.js → chunk-PPSIMRJM.js} +8 -8
  129. package/dist/{chunk-RPI3RELH.js → chunk-PZ6D5DYB.js} +1 -1
  130. package/dist/{chunk-K3WHR66I.js → chunk-QGU24ERZ.js} +1 -1
  131. package/dist/chunk-QKIVMRK5.js +5 -0
  132. package/dist/{chunk-LXV7ANUQ.js → chunk-QQVLFDX6.js} +4 -4
  133. package/dist/chunk-RA2HF3VC.js +10 -0
  134. package/dist/{chunk-2D7G2OYC.js → chunk-RD5UPROC.js} +6 -6
  135. package/dist/{chunk-RJACWTK2.js → chunk-RFNU5AIH.js} +1 -1
  136. package/dist/{chunk-AZ7SYI4D.js → chunk-SBHLTCGU.js} +1 -1
  137. package/dist/{chunk-3I4DYCQK.js → chunk-SDIGC5NU.js} +1 -1
  138. package/dist/{chunk-VCSHT4SZ.js → chunk-SFNLRK5J.js} +7 -7
  139. package/dist/{chunk-ZXZMSNJN.js → chunk-TAGZV46K.js} +1 -1
  140. package/dist/chunk-TKLH7V2R.js +9 -0
  141. package/dist/{chunk-UDX6UJHN.js → chunk-TLZVEW34.js} +4 -4
  142. package/dist/{chunk-USG3EG2Y.js → chunk-TTE3GZWH.js} +1 -1
  143. package/dist/{chunk-LLBP42IT.js → chunk-TWWJLFTD.js} +4 -4
  144. package/dist/{chunk-VXRW6BIC.js → chunk-TYEXEETI.js} +5 -5
  145. package/dist/chunk-U5PXB4UW.js +9 -0
  146. package/dist/{chunk-ECX6BCQG.js → chunk-UHW2CFLV.js} +1 -1
  147. package/dist/{chunk-KJDEW5MD.js → chunk-UL4WB3VH.js} +1 -1
  148. package/dist/chunk-URBCGEXG.js +1 -0
  149. package/dist/{chunk-J7I7R5XZ.js → chunk-US5B4QYS.js} +11 -11
  150. package/dist/{chunk-KTXEQFVQ.js → chunk-US5YOYS3.js} +1 -1
  151. package/dist/chunk-UWHGJTAL.js +8 -0
  152. package/dist/{chunk-PZRKVGML.js → chunk-VAACOJ2H.js} +1 -1
  153. package/dist/{chunk-AZ6UPURX.js → chunk-VH3IMIS2.js} +6 -6
  154. package/dist/chunk-VJ56YZY6.js +14 -0
  155. package/dist/chunk-VLOJ4XJC.js +8 -0
  156. package/dist/{chunk-UU73FP3I.js → chunk-VUYWYMZZ.js} +2 -2
  157. package/dist/{chunk-IFA3PKKA.js → chunk-WNJLY7CM.js} +11 -11
  158. package/dist/chunk-X4KIXGW5.js +1 -0
  159. package/dist/{chunk-NQJJRKUK.js → chunk-XKCEVZZB.js} +1 -1
  160. package/dist/chunk-XMGXVMVS.js +6 -0
  161. package/dist/{chunk-7BIMXRDE.js → chunk-XSY22PWH.js} +2 -2
  162. package/dist/{chunk-R2R7IVKO.js → chunk-XW7KN6HW.js} +12 -12
  163. package/dist/{chunk-YFBGRCP2.js → chunk-XYA7NPSZ.js} +6 -6
  164. package/dist/{chunk-OWUVCQG7.js → chunk-Y3XH4HJQ.js} +2 -2
  165. package/dist/chunk-YEY6YPTM.js +2 -0
  166. package/dist/chunk-YT32RSS6.js +7 -0
  167. package/dist/chunk-YUMPKSS4.js +1 -0
  168. package/dist/{chunk-XOGC427S.js → chunk-YVOGWINT.js} +1 -1
  169. package/dist/data/DataTable.js +1 -1
  170. package/dist/data/Kanban.js +1 -1
  171. package/dist/data/ListFooter.js +1 -1
  172. package/dist/data/ListLoadError.js +1 -1
  173. package/dist/data/Pagination.js +1 -1
  174. package/dist/file-intake/index.js +1 -1
  175. package/dist/forms/BorderInput.js +1 -1
  176. package/dist/forms/BrandAssetEditor.js +1 -1
  177. package/dist/forms/Calendar.js +1 -1
  178. package/dist/forms/ColorPicker.js +1 -1
  179. package/dist/forms/ComposerAttachments.js +1 -1
  180. package/dist/forms/CornersInput.js +1 -1
  181. package/dist/forms/DatePicker.js +1 -1
  182. package/dist/forms/DateRangePicker.js +1 -1
  183. package/dist/forms/DateTimePicker.js +1 -1
  184. package/dist/forms/DisplayChips.js +1 -1
  185. package/dist/forms/FilePicker.js +1 -1
  186. package/dist/forms/FormErrorSummary.js +1 -1
  187. package/dist/forms/IconPicker.js +1 -1
  188. package/dist/forms/ImageFocusPoint.js +1 -1
  189. package/dist/forms/InputNumber.js +1 -1
  190. package/dist/forms/LinkPicker.js +1 -1
  191. package/dist/forms/MediaUploadField.d.ts +13 -2
  192. package/dist/forms/MediaUploadField.js +1 -1
  193. package/dist/forms/MediaUploadGrid.js +1 -1
  194. package/dist/forms/NumericKeypad.js +1 -1
  195. package/dist/forms/Select.js +1 -1
  196. package/dist/forms/SidesInput.js +1 -1
  197. package/dist/forms/Slider.js +1 -1
  198. package/dist/forms/Snippet.js +1 -1
  199. package/dist/forms/TagInput.js +1 -1
  200. package/dist/forms/TextToolbar.js +1 -1
  201. package/dist/forms/TimePicker.js +1 -1
  202. package/dist/forms/WidthsBar.js +1 -1
  203. package/dist/forms/useFileIntake.js +1 -1
  204. package/dist/icons/efficient-glyphs.js +1 -1
  205. package/dist/icons/efficient-looks.js +1 -1
  206. package/dist/icons/efficient.js +1 -1
  207. package/dist/icons/looks/map.js +1 -1
  208. package/dist/icons/sets.js +1 -1
  209. package/dist/index.d.ts +2 -1
  210. package/dist/index.js +263 -263
  211. package/dist/locales/zh-Hans.js +1 -1
  212. package/dist/map/index.js +6 -6
  213. package/dist/page-tabs/index.js +5 -5
  214. package/dist/pdf/index.js +1 -1
  215. package/dist/shell/Accordion.d.ts +35 -1
  216. package/dist/shell/Accordion.js +1 -1
  217. package/dist/shell/AppUpdateBanner.js +1 -1
  218. package/dist/shell/Avatar.js +1 -1
  219. package/dist/shell/Banner.js +1 -1
  220. package/dist/shell/Breadcrumbs.js +1 -1
  221. package/dist/shell/BudgetBar.js +1 -1
  222. package/dist/shell/Card.js +1 -1
  223. package/dist/shell/ColoredBadge.js +1 -1
  224. package/dist/shell/ConfirmDialog.js +1 -1
  225. package/dist/shell/ContainerFillChart.js +1 -1
  226. package/dist/shell/CountBadge.js +1 -1
  227. package/dist/shell/Dialog.js +1 -1
  228. package/dist/shell/Drawer.js +1 -1
  229. package/dist/shell/EditableGrid.js +1 -1
  230. package/dist/shell/EmptyState.js +1 -1
  231. package/dist/shell/GlobalSearch.js +1 -1
  232. package/dist/shell/HelpCenter.js +1 -1
  233. package/dist/shell/IconRail.js +1 -1
  234. package/dist/shell/LanguageSelect.js +1 -1
  235. package/dist/shell/Markdown.js +1 -1
  236. package/dist/shell/MetricBar.d.ts +7 -3
  237. package/dist/shell/MetricBar.js +1 -1
  238. package/dist/shell/MetricBarLegend.d.ts +18 -0
  239. package/dist/shell/MetricBarLegend.js +2 -0
  240. package/dist/shell/MilestoneTimeline.js +1 -1
  241. package/dist/shell/PageHeader.js +1 -1
  242. package/dist/shell/ProductionTimeline.js +1 -1
  243. package/dist/shell/ResizeHandle.js +1 -1
  244. package/dist/shell/Result.js +1 -1
  245. package/dist/shell/SearchableSelect.js +1 -1
  246. package/dist/shell/SettingReset.js +1 -1
  247. package/dist/shell/SettingRow.d.ts +10 -1
  248. package/dist/shell/SettingRow.js +1 -1
  249. package/dist/shell/SidebarLayout.js +1 -1
  250. package/dist/shell/SidebarNav.js +1 -1
  251. package/dist/shell/SortableList.js +1 -1
  252. package/dist/shell/Statistic.js +1 -1
  253. package/dist/shell/Tabs.d.ts +19 -1
  254. package/dist/shell/Tabs.js +1 -1
  255. package/dist/shell/TimeAgo.js +1 -1
  256. package/dist/shell/TimelineTrack.js +1 -1
  257. package/dist/shell/TransferProgress.js +1 -1
  258. package/dist/shell/Tree.js +1 -1
  259. package/dist/shell/language.js +1 -1
  260. package/dist/shell/strings.d.ts +8 -0
  261. package/dist/shell/strings.js +1 -1
  262. package/dist/shell/toast.js +1 -1
  263. package/dist/telemetry/index.js +1 -1
  264. package/dist/templates/AuthScreen.js +1 -1
  265. package/dist/templates/ChatTemplate.js +1 -1
  266. package/dist/templates/CheckoutTemplate.js +1 -1
  267. package/dist/templates/DashboardTemplate.js +1 -1
  268. package/dist/templates/DataTablePage.js +1 -1
  269. package/dist/templates/EmailTemplate.js +1 -1
  270. package/dist/templates/ErrorBoundary.js +1 -1
  271. package/dist/templates/ErrorPage.js +1 -1
  272. package/dist/templates/FormLayoutPage.js +1 -1
  273. package/dist/templates/GalleryTemplate.js +1 -1
  274. package/dist/ui/index.d.ts +2 -1
  275. package/dist/ui/index.js +1 -1
  276. package/dist/ui.css +4 -4
  277. package/dist/version.js +1 -1
  278. package/package.json +1 -1
  279. package/dist/Calculator-6XA52RW2.js +0 -29
  280. package/dist/Sidebar-VP27XAG3.js +0 -43
  281. package/dist/chunk-3CLJLMGC.js +0 -14
  282. package/dist/chunk-3CORTJSX.js +0 -5
  283. package/dist/chunk-54LYZJKD.js +0 -4
  284. package/dist/chunk-5H4ZKLNG.js +0 -8
  285. package/dist/chunk-5LHPDU6X.js +0 -1
  286. package/dist/chunk-64KMJHVU.js +0 -2
  287. package/dist/chunk-CAVMIKH4.js +0 -10
  288. package/dist/chunk-DHI24QY6.js +0 -10
  289. package/dist/chunk-DLQHQ2MW.js +0 -10
  290. package/dist/chunk-EX2HRK2Y.js +0 -4
  291. package/dist/chunk-HXQ2DB32.js +0 -8
  292. package/dist/chunk-IQDJ76DD.js +0 -9
  293. package/dist/chunk-JS34LPLL.js +0 -11
  294. package/dist/chunk-K4K3YDW6.js +0 -14
  295. package/dist/chunk-K5Q5RIQT.js +0 -6
  296. package/dist/chunk-K62MSU6T.js +0 -8
  297. package/dist/chunk-MFUGVAP5.js +0 -2
  298. package/dist/chunk-OLASMUGT.js +0 -8
  299. package/dist/chunk-QAVNMU6V.js +0 -9
  300. package/dist/chunk-QUHQCJ5P.js +0 -15
  301. package/dist/chunk-SRCPFYYU.js +0 -19
  302. package/dist/chunk-SRFFFPTS.js +0 -20
  303. package/dist/chunk-XPEUKDPT.js +0 -9
  304. package/dist/chunk-Y2G5KXA6.js +0 -1
  305. package/dist/chunk-YR5OZN27.js +0 -1
  306. /package/dist/{chunk-RTRWAKFO.js → chunk-2CGVDBNO.js} +0 -0
@@ -1,3 +1,3 @@
1
- import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as a}from"./chunk-C2HHGLLR.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as s}from"./chunk-5LHPDU6X.js";import{useRef as n,useId as d,useEffect as c}from"react";import{jsxs as m,jsx as u}from"react/jsx-runtime";var f={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl"};function h({open:h,onClose:x,title:p,description:b,role:g="dialog",children:v,footer:y,blocking:k=!1,size:N="md",initialFocus:j,"aria-label":w,"aria-labelledby":L,"aria-describedby":C,className:W=""}){const D=n(null),U=d(),G=d(),H=!k&&!y,z=d(),A=s().dialog;return r(h),i(D,h,j),t(h),c(()=>{if(h)return o(()=>(k||x(),!0),()=>D.current)},[h,k,x]),h?/* @__PURE__ */m("div",{className:"fixed inset-0",style:{zIndex:l.overlay},role:"presentation",children:[
1
+ import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as a}from"./chunk-C2HHGLLR.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as s}from"./chunk-OVNRVFWS.js";import{useRef as n,useId as d,useEffect as c}from"react";import{jsxs as m,jsx as u}from"react/jsx-runtime";var f={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl"};function h({open:h,onClose:x,title:p,description:b,role:g="dialog",children:v,footer:y,blocking:k=!1,size:N="md",initialFocus:j,"aria-label":w,"aria-labelledby":C,"aria-describedby":L,className:W=""}){const V=n(null),D=d(),G=d(),R=!k&&!y,U=d(),z=s().dialog;return r(h),i(V,h,j),t(h),c(()=>{if(h)return o(()=>(k||x(),!0),()=>V.current)},[h,k,x]),h?/* @__PURE__ */m("div",{className:"fixed inset-0",style:{zIndex:l.overlay},role:"presentation",children:[
2
2
  /* @__PURE__ */u("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
3
- /* @__PURE__ */u("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:k?void 0:e=>{e.target===e.currentTarget&&x()},children:/* @__PURE__ */m("div",{ref:D,...e({role:g,modal:!0,titleId:p?z:void 0,labelledBy:L,label:w}),"aria-describedby":C??(b?G:v?U:void 0),className:`relative max-h-full w-full ${f[N]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${W}`.trim(),children:[p&&/* @__PURE__ */u("h2",{id:z,className:(H?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:p}),b&&/* @__PURE__ */u("p",{id:G,className:((p?"mt-1":H?"pr-8":"")+" text-sm text-gray-500").trim(),children:b}),v&&/* @__PURE__ */u("div",{id:U,className:"mt-2 text-sm text-gray-600",children:v}),y&&/* @__PURE__ */u("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:y}),H&&/* @__PURE__ */u("button",{type:"button",onClick:x,"aria-label":A.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */u(a,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]}):null}export{h as Dialog};
3
+ /* @__PURE__ */u("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:k?void 0:e=>{e.target===e.currentTarget&&x()},children:/* @__PURE__ */m("div",{ref:V,...e({role:g,modal:!0,titleId:p?U:void 0,labelledBy:C,label:w}),"aria-describedby":L??(b?G:v?D:void 0),className:`relative max-h-full w-full ${f[N]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${W}`.trim(),children:[p&&/* @__PURE__ */u("h2",{id:U,className:(R?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:p}),b&&/* @__PURE__ */u("p",{id:G,className:((p?"mt-1":R?"pr-8":"")+" text-sm text-gray-500").trim(),children:b}),v&&/* @__PURE__ */u("div",{id:D,className:"mt-2 text-sm text-gray-600",children:v}),y&&/* @__PURE__ */u("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:y}),R&&/* @__PURE__ */u("button",{type:"button",onClick:x,"aria-label":z.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */u(a,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]}):null}export{h as Dialog};
@@ -1 +1 @@
1
- import{client_default as a}from"./chunk-P2HKX4VB.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
1
+ import{client_default as a}from"./chunk-H7BP5LLG.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
@@ -1,8 +1,8 @@
1
- import{parseFocal as e,formatFocal as t,nudgeFocal as a,focalFromRect as r}from"./chunk-25RR3GQW.js";import{useShellStrings as n}from"./chunk-5LHPDU6X.js";import{useId as o,useRef as s}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c={background:"color-mix(in srgb, var(--status-on-solid) 45%, transparent)"},u={borderColor:"var(--status-on-solid)",boxShadow:"0 0 0 1px var(--rosh-media-scrim-button), 0 1px 4px var(--rosh-media-scrim-button)"};function d({value:d,onChange:m,label:p,image:f,hint:h,emptyText:g,actions:x,disabled:b=!1,id:v,className:y=""}){const N=n().imageFocus,w=o(),P=s(null),j=s(!1),{x:k,y:C}=e(d),K=t(k,C),$=e=>{e!==d&&m(e)},D=(e,a)=>{const n=P.current?.getBoundingClientRect();if(!n)return;const o=r(n,e,a);$(t(o.x,o.y))},R=()=>{j.current=!1};if(!f)/* @__PURE__ */
2
- return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-gray-500",children:g??N.noImage})});const T=void 0===h,X=null!==h;/* @__PURE__ */
1
+ import{parseFocal as e,formatFocal as t,nudgeFocal as a,focalFromRect as r}from"./chunk-25RR3GQW.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{useId as o,useRef as s}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c={background:"color-mix(in srgb, var(--status-on-solid) 45%, transparent)"},u={borderColor:"var(--status-on-solid)",boxShadow:"0 0 0 1px var(--rosh-media-scrim-button), 0 1px 4px var(--rosh-media-scrim-button)"};function d({value:d,onChange:m,label:p,image:f,hint:h,emptyText:g,actions:x,disabled:b=!1,id:v,className:y=""}){const N=n().imageFocus,w=o(),j=s(null),k=s(!1),{x:C,y:P}=e(d),K=t(C,P),$=e=>{e!==d&&m(e)},R=(e,a)=>{const n=j.current?.getBoundingClientRect();if(!n)return;const o=r(n,e,a);$(t(o.x,o.y))},D=()=>{k.current=!1};if(!f)/* @__PURE__ */
2
+ return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-gray-500",children:g??N.noImage})});const S=void 0===h,T=null!==h;/* @__PURE__ */
3
3
  return l("div",{"data-image-focus":"",className:`flex flex-col gap-2 ${y}`.trim(),children:[
4
- /* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:b,"aria-label":N.picture(p,K),"aria-describedby":w,onKeyDown:e=>{if(b||e.altKey||e.ctrlKey||e.metaKey)return;const t=a(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{b||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),j.current=!0,D(e.clientX,e.clientY))},onPointerMove:e=>{j.current&&!b&&D(e.clientX,e.clientY)},onPointerUp:R,onPointerCancel:R,onLostPointerCapture:R,className:["flex min-h-36 w-full touch-none items-center justify-center overflow-hidden rounded-md border border-gray-200 bg-gray-50 p-0","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",b?"cursor-not-allowed opacity-60":"cursor-crosshair"].join(" "),children:/* @__PURE__ */l("span",{ref:P,"data-image-focus-pane":"",className:"relative block max-w-full",children:[
4
+ /* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:b,"aria-label":N.picture(p,K),"aria-describedby":w,onKeyDown:e=>{if(b||e.altKey||e.ctrlKey||e.metaKey)return;const t=a(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{b||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),k.current=!0,R(e.clientX,e.clientY))},onPointerMove:e=>{k.current&&!b&&R(e.clientX,e.clientY)},onPointerUp:D,onPointerCancel:D,onLostPointerCapture:D,className:["flex min-h-36 w-full touch-none items-center justify-center overflow-hidden rounded-md border border-gray-200 bg-gray-50 p-0","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",b?"cursor-not-allowed opacity-60":"cursor-crosshair"].join(" "),children:/* @__PURE__ */l("span",{ref:j,"data-image-focus-pane":"",className:"relative block max-w-full",children:[
5
5
  /* @__PURE__ */i("img",{src:f,alt:"",draggable:!1,className:"block h-auto max-h-36 w-auto max-w-full select-none object-contain"}),
6
- /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${C}%`,...c}}),
7
- /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${k}%`,...c}}),
8
- /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${k}%`,top:`${C}%`,...u}})]})}),X||x?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",X?{id:T?w:void 0,className:"min-w-0 flex-1 text-xs text-gray-500",children:T?N.hint:h}:{className:"min-w-0 flex-1"}),x]}):null,!T&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
6
+ /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${P}%`,...c}}),
7
+ /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${C}%`,...c}}),
8
+ /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${C}%`,top:`${P}%`,...u}})]})}),T||x?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",T?{id:S?w:void 0,className:"min-w-0 flex-1 text-xs text-gray-500",children:S?N.hint:h}:{className:"min-w-0 flex-1"}),x]}):null,!S&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
@@ -1,7 +1,7 @@
1
- import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{toast_default as t}from"./chunk-RUTL7QGV.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{currentShellStrings as n,useShellStrings as a}from"./chunk-5LHPDU6X.js";import{useState as o,useRef as i,useEffect as l,useCallback as c}from"react";import{jsxs as d,jsx as u,Fragment as s}from"react/jsx-runtime";function m(e){let t=null;try{t=window.getSelection()}catch{return null}if(!t||0===t.rangeCount||t.isCollapsed)return null;const r=e;if(r&&"number"==typeof r.nodeType){let e=!1;for(let n=0;n<t.rangeCount&&!e;n++)e=t.getRangeAt(n).intersectsNode(r);if(!e)return null}const n=t.toString();if(!n.trim())return null;const a=document.createElement("div");for(let e=0;e<t.rangeCount;e++)a.appendChild(t.getRangeAt(e).cloneContents());return{text:n,html:a.innerHTML}}async function p(e,t){try{if(t&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}const r=r=>{r.clipboardData?.setData("text/plain",e),t&&r.clipboardData?.setData("text/html",t),r.preventDefault()},n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.addEventListener("copy",r);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",r),n.remove()}}async function y(e,r,a){const o=await p(r,a),i=n().copy;return o?t.success(i.copiedLabel(e)):t.error(i.failed),o}var b={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},f={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function h(){/* @__PURE__ */
1
+ import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{toast_default as t}from"./chunk-2LKH6JM5.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{currentShellStrings as n,useShellStrings as a}from"./chunk-OVNRVFWS.js";import{useState as o,useRef as i,useEffect as l,useCallback as c}from"react";import{jsxs as d,jsx as u,Fragment as s}from"react/jsx-runtime";function m(e){let t=null;try{t=window.getSelection()}catch{return null}if(!t||0===t.rangeCount||t.isCollapsed)return null;const r=e;if(r&&"number"==typeof r.nodeType){let e=!1;for(let n=0;n<t.rangeCount&&!e;n++)e=t.getRangeAt(n).intersectsNode(r);if(!e)return null}const n=t.toString();if(!n.trim())return null;const a=document.createElement("div");for(let e=0;e<t.rangeCount;e++)a.appendChild(t.getRangeAt(e).cloneContents());return{text:n,html:a.innerHTML}}async function p(e,t){try{if(t&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}const r=r=>{r.clipboardData?.setData("text/plain",e),t&&r.clipboardData?.setData("text/html",t),r.preventDefault()},n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.addEventListener("copy",r);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",r),n.remove()}}async function y(e,r,a){const o=await p(r,a),i=n().copy;return o?t.success(i.copiedLabel(e)):t.error(i.failed),o}var b={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},f={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function h(){/* @__PURE__ */
2
2
  return u(r,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function x(){/* @__PURE__ */
3
- return u(r,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function g({value:r,children:n,symbol:m,label:y,size:g="md",variant:w="bordered",hideCopyButton:v=!1,onCopy:C,multiline:L=!1,id:N,"aria-describedby":T,className:k=""}){const[D,j]=o(!1),H=i(null),B=a().copy;l(()=>()=>{H.current&&clearTimeout(H.current)},[]);const E=c(async()=>{await p(r)?(j(!0),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{j(!1),H.current=null},2e3),C?.(r)):t.error(B.failed)},[r,C,B]),{box:R,button:A}=f[g],G=!v;/* @__PURE__ */
4
- return d("div",{id:G?void 0:N,"aria-describedby":G?void 0:T,className:["inline-flex max-w-full items-center rounded-md",b[w],R,k].filter(Boolean).join(" "),children:[null!=m&&""!==m&&/* @__PURE__ */u("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:m}),
5
- /* @__PURE__ */u("span",{className:"min-w-0 font-mono text-gray-800 "+(L?"whitespace-pre-wrap break-all":"truncate"),title:L?void 0:r,children:n??r}),!v&&/* @__PURE__ */d(s,{children:[
6
- /* @__PURE__ */u(e,{id:N,"aria-label":y?B.copyLabel(y):B.copy,"aria-describedby":T,onClick:E,className:`${A} text-gray-400`,children:/* @__PURE__ */u(D?x:h,{})}),
7
- /* @__PURE__ */u("span",{"aria-live":"polite",className:"sr-only",children:D?B.copied:""})]})]})}export{g as Snippet,y as copyToClipboard,m as selectionAt};
3
+ return u(r,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function g({value:r,children:n,symbol:m,label:y,size:g="md",variant:w="bordered",hideCopyButton:v=!1,onCopy:C,multiline:N=!1,id:k,"aria-describedby":L,className:T=""}){const[j,D]=o(!1),H=i(null),B=a().copy;l(()=>()=>{H.current&&clearTimeout(H.current)},[]);const E=c(async()=>{await p(r)?(D(!0),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{D(!1),H.current=null},2e3),C?.(r)):t.error(B.failed)},[r,C,B]),{box:R,button:S}=f[g],A=!v;/* @__PURE__ */
4
+ return d("div",{id:A?void 0:k,"aria-describedby":A?void 0:L,className:["inline-flex max-w-full items-center rounded-md",b[w],R,T].filter(Boolean).join(" "),children:[null!=m&&""!==m&&/* @__PURE__ */u("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:m}),
5
+ /* @__PURE__ */u("span",{className:"min-w-0 font-mono text-gray-800 "+(N?"whitespace-pre-wrap break-all":"truncate"),title:N?void 0:r,children:n??r}),!v&&/* @__PURE__ */d(s,{children:[
6
+ /* @__PURE__ */u(e,{id:k,"aria-label":y?B.copyLabel(y):B.copy,"aria-describedby":L,onClick:E,className:`${S} text-gray-400`,children:/* @__PURE__ */u(j?x:h,{})}),
7
+ /* @__PURE__ */u("span",{"aria-live":"polite",className:"sr-only",children:j?B.copied:""})]})]})}export{g as Snippet,y as copyToClipboard,m as selectionAt};
@@ -1,8 +1,8 @@
1
- import{tooltipBesideBand as t}from"./chunk-MG7A3R75.js";import{niceAxis as e,niceMax as i,linearScale as r,axisGutter as n,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as a}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as h}from"./chunk-TWVUQUUD.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-5LHPDU6X.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useRef as d,useState as u,useId as f,useEffect as x}from"react";import{jsx as g,jsxs as p}from"react/jsx-runtime";function y({labels:y,values:v,height:b=220,width:k,bandPadding:M=.24,min:w,max:N,yTickCount:A=4,formatValue:$,yAxisLabel:j,xTickAnchor:R="center",children:U,overlay:D,tooltip:E,onSelect:L,ariaLabel:P,className:z,emptyLabel:C}){const F=s().charts,I=c(),S=$??(t=>m(t,I)),T=C??F.noData,V=d(null),W=o(V),B=k??W,[H,Q]=u(null),X=f();if(x(()=>{if(null!==H)return h(t=>"Escape"===t.key&&(Q(null),!0))},[H]),0===y.length||!v.some(Number.isFinite))/* @__PURE__ */
2
- return g("div",{className:z,ref:V,children:/* @__PURE__ */g("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:b},children:T})});const Z=v.filter(Number.isFinite),G=Z.every(Number.isInteger),J=void 0===w&&void 0===N?e(Math.min(0,...Z),Math.max(0,...Z),{intervals:A+1,integer:G}):null,K=void 0!==w&&void 0===N?e(w,Math.max(w,...Z),{intervals:A+1,integer:G,zero:!1}):null,O=J?J.lo:w??Math.min(0,...Z),q=J?J.hi:K?K.hi:N??i(Math.max(...Z,0)),Y=J?J.ticks:K?[O,...K.ticks.filter(t=>t>O)]:r([O,q],{from:0,to:1}).ticks(A+1),_={top:12,right:16,bottom:26,left:n(Y.map(S),48)+(j?10:0)},tt=_.left,et=Math.max(tt+1,B-_.right),it=_.top,rt=b-_.bottom,nt=r([O,q],{from:rt,to:it}),lt=l(y.length,{from:tt,to:et},M),ot=(et-tt)/Math.max(1,y.length),at=ot>=48,ht=at?1:Math.max(1,Math.ceil(y.length/Math.max(1,Math.floor(B/84)))),st=Math.max(2,Math.floor((ot-6)/6.6)),ct=t=>at&&t.length>st?`${t.slice(0,st-1).trimEnd()}…`:t;/* @__PURE__ */
3
- return p("div",{className:`relative ${z??""}`,ref:V,children:[
4
- /* @__PURE__ */p("svg",{width:"100%",height:b,viewBox:`0 0 ${B} ${b}`,role:"img","aria-label":P,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Q(null),onBlur:()=>Q(null),onKeyDown:t=>{if(L&&null!==H&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void L(H);if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const e="ArrowRight"===t.key?1:-1;Q(t=>Math.min(y.length-1,Math.max(0,(t??0)+e)))},children:[
5
- /* @__PURE__ */g("defs",{children:/* @__PURE__ */g("clipPath",{id:X,children:/* @__PURE__ */g("rect",{x:tt,y:it,width:et-tt,height:rt-it})})}),Y.map(t=>/* @__PURE__ */g("line",{x1:tt,y1:nt(t),x2:et,y2:nt(t),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${t}`)),
6
- /* @__PURE__ */g("line",{x1:tt,y1:nt(Math.max(O,0)),x2:et,y2:nt(Math.max(O,0)),stroke:a.axis,strokeWidth:1,shapeRendering:"crispEdges"}),Y.map(t=>/* @__PURE__ */g("text",{x:tt-8,y:nt(t)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:S(t)},`t${t}`)),j&&/* @__PURE__ */g("text",{x:14,y:(it+rt)/2,transform:`rotate(-90 14 ${(it+rt)/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:j}),
7
- /* @__PURE__ */g("g",{clipPath:`url(#${X})`,children:U({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:B,height:b,clipId:X,active:H})}),D?.({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:B,height:b,clipId:X,active:H}),y.map((t,e)=>e%ht===0?/* @__PURE__ */g("text",{x:"start"===R?lt(e):lt.center(e),y:b-8,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:ct(t)},`x${e}`):null),y.map((t,e)=>/* @__PURE__ */g("rect",{x:lt.center(e)-(et-tt)/y.length/2,y:it,width:(et-tt)/y.length,height:rt-it,fill:"transparent",onMouseEnter:()=>Q(e),onClick:L?()=>L(e):void 0,style:L?{cursor:"pointer"}:void 0},`h${e}`))]}),E&&null!==H&&
8
- /* @__PURE__ */g("div",{className:"pointer-events-none absolute top-2 z-10",style:t(lt.center(H),lt.bandwidth,B),children:E(H)})]})}export{y as CartesianPlot};
1
+ import{tooltipBesideBand as t}from"./chunk-MG7A3R75.js";import{niceAxis as e,niceMax as i,linearScale as r,axisGutter as n,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as a}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as h}from"./chunk-TWVUQUUD.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-OVNRVFWS.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useRef as d,useState as u,useId as f,useEffect as x}from"react";import{jsx as g,jsxs as p}from"react/jsx-runtime";function y({labels:y,values:v,height:b=220,width:k,bandPadding:M=.24,min:N,max:w,yTickCount:A=4,formatValue:$,yAxisLabel:j,xTickAnchor:R="center",children:E,overlay:U,tooltip:V,onSelect:z,ariaLabel:C,className:D,emptyLabel:F}){const L=s().charts,P=c(),S=$??(t=>m(t,P)),W=F??L.noData,I=d(null),T=o(I),B=k??T,[O,Q]=u(null),Z=f();if(x(()=>{if(null!==O)return h(t=>"Escape"===t.key&&(Q(null),!0))},[O]),0===y.length||!v.some(Number.isFinite))/* @__PURE__ */
2
+ return g("div",{className:D,ref:I,children:/* @__PURE__ */g("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:b},children:W})});const G=v.filter(Number.isFinite),H=G.every(Number.isInteger),J=void 0===N&&void 0===w?e(Math.min(0,...G),Math.max(0,...G),{intervals:A+1,integer:H}):null,K=void 0!==N&&void 0===w?e(N,Math.max(N,...G),{intervals:A+1,integer:H,zero:!1}):null,X=J?J.lo:N??Math.min(0,...G),q=J?J.hi:K?K.hi:w??i(Math.max(...G,0)),Y=J?J.ticks:K?[X,...K.ticks.filter(t=>t>X)]:r([X,q],{from:0,to:1}).ticks(A+1),_={top:12,right:16,bottom:26,left:n(Y.map(S),48)+(j?10:0)},tt=_.left,et=Math.max(tt+1,B-_.right),it=_.top,rt=b-_.bottom,nt=r([X,q],{from:rt,to:it}),lt=l(y.length,{from:tt,to:et},M),ot=(et-tt)/Math.max(1,y.length),at=ot>=48,ht=at?1:Math.max(1,Math.ceil(y.length/Math.max(1,Math.floor(B/84)))),st=Math.max(2,Math.floor((ot-6)/6.6)),ct=t=>at&&t.length>st?`${t.slice(0,st-1).trimEnd()}…`:t;/* @__PURE__ */
3
+ return p("div",{className:`relative ${D??""}`,ref:I,children:[
4
+ /* @__PURE__ */p("svg",{width:"100%",height:b,viewBox:`0 0 ${B} ${b}`,role:"img","aria-label":C,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Q(null),onBlur:()=>Q(null),onKeyDown:t=>{if(z&&null!==O&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void z(O);if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const e="ArrowRight"===t.key?1:-1;Q(t=>Math.min(y.length-1,Math.max(0,(t??0)+e)))},children:[
5
+ /* @__PURE__ */g("defs",{children:/* @__PURE__ */g("clipPath",{id:Z,children:/* @__PURE__ */g("rect",{x:tt,y:it,width:et-tt,height:rt-it})})}),Y.map(t=>/* @__PURE__ */g("line",{x1:tt,y1:nt(t),x2:et,y2:nt(t),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${t}`)),
6
+ /* @__PURE__ */g("line",{x1:tt,y1:nt(Math.max(X,0)),x2:et,y2:nt(Math.max(X,0)),stroke:a.axis,strokeWidth:1,shapeRendering:"crispEdges"}),Y.map(t=>/* @__PURE__ */g("text",{x:tt-8,y:nt(t)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:S(t)},`t${t}`)),j&&/* @__PURE__ */g("text",{x:14,y:(it+rt)/2,transform:`rotate(-90 14 ${(it+rt)/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:j}),
7
+ /* @__PURE__ */g("g",{clipPath:`url(#${Z})`,children:E({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:B,height:b,clipId:Z,active:O})}),U?.({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:B,height:b,clipId:Z,active:O}),y.map((t,e)=>e%ht===0?/* @__PURE__ */g("text",{x:"start"===R?lt(e):lt.center(e),y:b-8,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:ct(t)},`x${e}`):null),y.map((t,e)=>/* @__PURE__ */g("rect",{x:lt.center(e)-(et-tt)/y.length/2,y:it,width:(et-tt)/y.length,height:rt-it,fill:"transparent",onMouseEnter:()=>Q(e),onClick:z?()=>z(e):void 0,style:z?{cursor:"pointer"}:void 0},`h${e}`))]}),V&&null!==O&&
8
+ /* @__PURE__ */g("div",{className:"pointer-events-none absolute top-2 z-10",style:t(lt.center(O),lt.bandwidth,B),children:V(O)})]})}export{y as CartesianPlot};
@@ -1 +1 @@
1
- import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-YR5OZN27.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},R=[200,500],F=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,R,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,R,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},x=class{p;l;h(e){this.p?.(e)}},N=[2500,4e3],j=[800,1800],B=e=>{document.prerendering?C(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,D=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,V=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Y=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function X(e,t,n){const i=e.replace(Y,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&X(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Y,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&O.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=t.getAccessToken();i&&n(t.endpoint??"/api/client-telemetry/web-batches/",{method:"POST",keepalive:!0,credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const d=n.fetch??window.fetch.bind(window),l=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),u=ne(n.routeKey()),f=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let v=!1;const m=()=>{for(const e of l.drain())oe(e,n,d)},E=e=>{v||(l.addError(e),l.size>=50&&m())},L=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(W,"[url]").replace(D,"[id]").replace(V,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a},k=e=>{v||(l.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,u,()=>ne(n.routeKey()),f)),l.size>=50&&m())},S=n.vitalsSampleRate??1;S>0&&(S>=1||(n.random??Math.random)()<S)&&(((e,t={})=>{let n=!1;const s=w(t);C(()=>{let d,l=h(),u=g("LCP");const f=p(t,x),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,N,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,N,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,N,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(k),F(k),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(k),P(k),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,j,t.reportAllChanges);B(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,j,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,j,t.reportAllChanges),d(!0))})},t)}})})(k));const z=e=>{const{error:t,message:n,filename:i,lineno:a,colno:r}=e;if(null!=t)return void E(L(t,"onerror"));const o=i?ee(`at ${i}:${a??0}:${r??0}`):[];E({...L(n??"","onerror"),frames:o})},M=e=>E(L(e.reason,"unhandledrejection")),$=()=>{"hidden"===document.visibilityState&&m()};window.addEventListener("error",z),window.addEventListener("unhandledrejection",M),document.addEventListener("visibilitychange",$),window.addEventListener("pagehide",m);const Z=window.setInterval(m,n.flushIntervalMs??6e4),R=e(e=>E(L(e,"boundary"))),O={flush:m,reportError:e=>E(L(e,"boundary")),stop(){v||(m(),v=!0,window.removeEventListener("error",z),window.removeEventListener("unhandledrejection",M),document.removeEventListener("visibilitychange",$),window.removeEventListener("pagehide",m),window.clearInterval(Z),R(),ae===O&&(ae=null))}};return ae=O,O}export{se as startClientTelemetry};
1
+ import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-X4KIXGW5.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},x=class{p;l;h(e){this.p?.(e)}},j=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?C(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,D=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,G=/\d{4,}/g,V=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(X,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(X,"").split(/[?#]/,1)[0].replace(V,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=t.getAccessToken();i&&n(t.endpoint??"/api/client-telemetry/web-batches/",{method:"POST",keepalive:!0,credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const d=n.fetch??window.fetch.bind(window),l=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),u=ne(n.routeKey()),f=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let v=!1;const m=()=>{for(const e of l.drain())oe(e,n,d)},E=e=>{v||(l.addError(e),l.size>=50&&m())},L=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(K,"[redacted]").replace(J,"[redacted]").replace(W,"[url]").replace(D,"[id]").replace(G,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a},k=e=>{v||(l.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,u,()=>ne(n.routeKey()),f)),l.size>=50&&m())},S=n.vitalsSampleRate??1;S>0&&(S>=1||(n.random??Math.random)()<S)&&(((e,t={})=>{let n=!1;const s=w(t);C(()=>{let d,l=h(),u=g("LCP");const f=p(t,x),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,j,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,j,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,j,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(k),R(k),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(k),P(k),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(k));const z=e=>{const{error:t,message:n,filename:i,lineno:a,colno:r}=e;if(null!=t)return void E(L(t,"onerror"));const o=i?ee(`at ${i}:${a??0}:${r??0}`):[];E({...L(n??"","onerror"),frames:o})},M=e=>E(L(e.reason,"unhandledrejection")),$=()=>{"hidden"===document.visibilityState&&m()};window.addEventListener("error",z),window.addEventListener("unhandledrejection",M),document.addEventListener("visibilitychange",$),window.addEventListener("pagehide",m);const _=window.setInterval(m,n.flushIntervalMs??6e4),F=e(e=>E(L(e,"boundary"))),U={flush:m,reportError:e=>E(L(e,"boundary")),stop(){v||(m(),v=!0,window.removeEventListener("error",z),window.removeEventListener("unhandledrejection",M),document.removeEventListener("visibilitychange",$),window.removeEventListener("pagehide",m),window.clearInterval(_),F(),ae===U&&(ae=null))}};return ae=U,U}export{se as startClientTelemetry};
@@ -1,2 +1,2 @@
1
- import{inputClasses as t}from"./chunk-JFSYWEHD.js";import{useShellLocale as e}from"./chunk-5LHPDU6X.js";import{forwardRef as n}from"react";import{jsx as a}from"react/jsx-runtime";var r=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,i=t=>String(t).padStart(2,"0");function l(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${(e=t).getFullYear()}-${i(e.getMonth()+1)}-${i(e.getDate())}T${i(e.getHours())}:${i(e.getMinutes())}`:r.test(t)?t:"";var e}var o=n(function({value:n,onChange:i,min:o,max:u,invalid:m,size:s,className:c="",...d},g){const p=e();/* @__PURE__ */
1
+ import{inputClasses as t}from"./chunk-JFSYWEHD.js";import{useShellLocale as e}from"./chunk-OVNRVFWS.js";import{forwardRef as n}from"react";import{jsx as a}from"react/jsx-runtime";var r=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,i=t=>String(t).padStart(2,"0");function l(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${(e=t).getFullYear()}-${i(e.getMonth()+1)}-${i(e.getDate())}T${i(e.getHours())}:${i(e.getMinutes())}`:r.test(t)?t:"";var e}var o=n(function({value:n,onChange:i,min:o,max:u,invalid:m,size:s,className:c="",...d},g){const p=e();/* @__PURE__ */
2
2
  return a("input",{ref:g,type:"datetime-local",lang:p,"aria-invalid":m||void 0,value:l(n),min:l(o)||void 0,max:l(u)||void 0,onChange:t=>i?.(function(t){if(!r.test(t))return null;const[e,n]=t.split("T"),[a,i,l]=e.split("-").map(Number),[o,u,m=0]=n.split(":").map(Number);if(o>23||u>59||m>59)return null;const s=new Date(a,i-1,l,o,u,m);return s.getMonth()===i-1&&s.getDate()===l?s:null}(t.target.value)),className:t({invalid:m,size:s,className:c}),...d})});export{o as DateTimePicker_default};
@@ -0,0 +1,5 @@
1
+ import{InputNumber_default as e}from"./chunk-332V47ID.js";import{useSettingAuto as t,useInSettingRow as i}from"./chunk-E4Z5OXBI.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as s,useEffect as u,useLayoutEffect as c}from"react";import{jsx as m,jsxs as f}from"react/jsx-runtime";var p=(e,t,i)=>Math.min(i,Math.max(t,e));function h(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var v=8,x=40;function b(e){return Math.max(1,...e.map(e=>(e??"").length))}var w="undefined"==typeof window?u:c;function y(e,t,i,n){return Number(p(e,t,i).toFixed(n))}var g=r(null);function S({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
2
+ return m(g.Provider,{value:r,children:e})}function F({value:r,onChange:a,min:c,max:S,step:F=1,shiftStep:z,precision:$,inputMin:k,inputMax:N,suffix:j,showInput:L=!0,emptyLabel:K,placeholderValue:M,stepFrom:V,label:A,"aria-labelledby":C,valueText:D,id:E,disabled:R,size:I="md",className:O="",auto:W}){const B=n(),q=o(),P=t(),T=W??P,U=o(),X=E??q,Z=$??h(F),G=k??c,H=N??S,J=void 0!==K||void 0!==M,Q=V??M,Y=p(r??M??c,c,S),_=d(null),[ee,te]=l(null),ie=Boolean(j);w(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,L]);const ne=e=>D?D(e):"string"==typeof j?`${e.toFixed(Z)} ${j}`:void 0,re=null==r?K??(null!=M?ne(M)??String(M):void 0):ne(r),le=`calc(${b([c.toFixed(Z),S.toFixed(Z),r?.toFixed(Z),K,M?.toFixed(Z)])}ch + ${(ee?.frame??10+(ie?x:v))+2}px)`,ae=s(g),oe=o(),de=ae?.set;w(()=>{de&&de(oe,L?le:null)},[de,oe,le,L]),u(()=>()=>de?.(oe,null),[de,oe]);const se=i();/* @__PURE__ */
3
+ return f("div",{"data-slider":"",className:`flex w-full min-w-0 items-center ${se?"flex-wrap gap-2":"gap-3"} ${O}`.trim(),children:[
4
+ /* @__PURE__ */m("input",{id:X,type:"range",min:c,max:S,step:F,value:Y,disabled:R,"aria-label":C?void 0:A,"aria-labelledby":C,"aria-valuetext":re,"aria-describedby":T?U:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=z;if(!i&&!(null==r&&null!=Q))return;e.preventDefault();a(y((r??Q??Y)+t*(i?z??F:F),c,S,Z))},onChange:e=>a(y(Number(e.target.value),c,S,Z)),className:`min-w-24 flex-1 ${se?"basis-24":""} cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 ${"sm"===I?"h-1":"h-1.5"}`}),L&&
5
+ /* @__PURE__ */m("div",{ref:_,"data-slider-box":"",className:se?"ml-auto shrink-0":"shrink-0 text-xs",style:se?void 0:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */m(e,{value:r,onChange:e=>{null!=e?e<G||e>H||a(e):J&&a(null)},min:G,max:H,step:F,shiftStep:z,stepFrom:Q,precision:Z,snap:!0,allowEmpty:J,suffix:j,disabled:R,placeholder:K??(null!=M?M.toFixed(Z):void 0),size:se?void 0:"sm",auto:T,"aria-label":A?B.slider.value(A):void 0,"aria-labelledby":A?void 0:C})}),T&&/* @__PURE__ */m("span",{id:U,hidden:!0,children:B.settingView.auto})]})}export{F as Slider,S as SliderGroup,y as settleSliderValue,b as sliderBoxChars,h as stepDecimals};
@@ -1,5 +1,5 @@
1
- import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as a}from"./chunk-7BSBTDKK.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-5LHPDU6X.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let k=0;const M=c.map(t=>{if(t.total){const a={from:0,to:k,value:k,total:!0};return{...t,...a}}const a=k;return k+=t.value,{...t,from:a,to:k,value:t.value,total:!1}}),j=M.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
2
- return i(a,{labels:c.map(t=>t.label),values:j,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(M[0]?.from??0),y(k)),tooltip:a=>{const e=M[a],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
3
- return i(t,{title:e?.label,rows:[{key:"step",color:o,label:e?.total?v.balance:e.value>=0?v.increase:v.decrease,value:e?.total?y(e.to):`${e.value>=0?"+":"−"}${y(Math.abs(e.value))}`},...e?.total?[]:[{key:"running",label:v.runningTotal,color:l.neutral,value:y(e.to)}]]})},children:({x:t,y:a,active:o})=>/* @__PURE__ */s("g",{children:[g&&M.slice(0,-1).map((l,o)=>
4
- /* @__PURE__ */i("line",{x1:t.end(o),y1:a(l.to),x2:t(o+1),y2:a(l.to),stroke:e.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${o}`)),M.map((e,r)=>{const n=e.total?l.neutral:e.value>=0?l.good:l.critical,s=Math.min(a(e.from),a(e.to)),c=Math.max(1,Math.abs(a(e.to)-a(e.from)));/* @__PURE__ */
1
+ import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as a}from"./chunk-PPSIMRJM.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-OVNRVFWS.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let M=0;const k=c.map(t=>{if(t.total){const a={from:0,to:M,value:M,total:!0};return{...t,...a}}const a=M;return M+=t.value,{...t,from:a,to:M,value:t.value,total:!1}}),j=k.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
2
+ return i(a,{labels:c.map(t=>t.label),values:j,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(k[0]?.from??0),y(M)),tooltip:a=>{const e=k[a],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
3
+ return i(t,{title:e?.label,rows:[{key:"step",color:o,label:e?.total?v.balance:e.value>=0?v.increase:v.decrease,value:e?.total?y(e.to):`${e.value>=0?"+":"−"}${y(Math.abs(e.value))}`},...e?.total?[]:[{key:"running",label:v.runningTotal,color:l.neutral,value:y(e.to)}]]})},children:({x:t,y:a,active:o})=>/* @__PURE__ */s("g",{children:[g&&k.slice(0,-1).map((l,o)=>
4
+ /* @__PURE__ */i("line",{x1:t.end(o),y1:a(l.to),x2:t(o+1),y2:a(l.to),stroke:e.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${o}`)),k.map((e,r)=>{const n=e.total?l.neutral:e.value>=0?l.good:l.critical,s=Math.min(a(e.from),a(e.to)),c=Math.max(1,Math.abs(a(e.to)-a(e.from)));/* @__PURE__ */
5
5
  return i("rect",{x:t(r),y:s,width:Math.max(1,t.bandwidth),height:c,rx:b,fill:n,fillOpacity:null===o||o===r?1:.45},r)})]})})}export{c as WaterfallChart};
@@ -0,0 +1,10 @@
1
+ import{FormField as e}from"./chunk-MVQBVPWP.js";import{zoneFocusClass as r,mediaPromptLine as t,UploadGlyph as a,dropzoneClass as l,BusyOverlay as o,isVideoUrl as i,mediaFileName as n,FilenameBadge as s}from"./chunk-EPHQ7UQV.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-VAACOJ2H.js";import{Icon as m}from"./chunk-C2HHGLLR.js";import{useShellStrings as u}from"./chunk-OVNRVFWS.js";import{useId as p,useState as h}from"react";import{jsxs as b,jsx as g}from"react/jsx-runtime";var y=/* @__PURE__ */g(m,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function v({items:m,onPick:v,onFiles:f,onRemove:x,onReorder:N,label:k,hint:w,error:j,required:D,className:A,accept:H="image/*",maxSizeBytes:P,maxFiles:C,fit:F="cover",thumbSize:S=96,placeholder:L,cta:V,acceptHint:$,showCover:O=!1,coverLabel:R,busy:z=!1,busyLabel:I,progress:B,disabled:Q=!1,readOnly:W=!1}){const q=u().media,E=V??q.cta,M=R??q.cover,T=I??q.uploading,U=p(),[G,J]=h(null),K=Q||z,X=!(!v&&!f||K||W),Y=!!x&&!K&&!W,Z=!!N&&!K&&!W,_=r(K),ee=L??t(H,q),re=d({accept:H,maxSizeBytes:P,maxFiles:C,acceptHint:$,multiple:!0,disabled:!X,currentCount:m.length,onAccept:e=>{if(f)f(e);else for(const r of e)v(r)}}),te=re.dragOver,ae=()=>{X&&(v?v():re.open())},le={width:S,height:S},oe=X&&/* @__PURE__ */b("button",{type:"button",onClick:()=>ae(),"aria-label":q.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${_}`,style:le,children:[
2
+ /* @__PURE__ */g(a,{className:"h-5 w-5"}),
3
+ /* @__PURE__ */g("span",{className:"text-xs font-medium text-gray-500",children:q.add})]}),ie=X?/* @__PURE__ */b("button",{type:"button",onClick:()=>ae(),"aria-label":"string"==typeof ee?ee:q.upload,className:l(te,!1,_),style:{minHeight:S+32},children:[
4
+ /* @__PURE__ */g("span",{className:"text-gray-400",children:/* @__PURE__ */g(a,{})}),
5
+ /* @__PURE__ */g("span",{className:"px-3 text-xs text-gray-500",children:ee}),
6
+ /* @__PURE__ */g("span",{className:"text-sm font-medium text-blue-600",children:E}),$&&/* @__PURE__ */g("span",{className:"text-xs text-gray-400",children:$})]}):/* @__PURE__ */g("div",{className:"flex w-full items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-3 text-xs text-gray-400",style:{minHeight:S+32},children:/* @__PURE__ */g("span",{className:z?"invisible":void 0,children:q.empty})});/* @__PURE__ */
7
+ return b(e,{label:k,labelId:k?`${U}-label`:void 0,htmlFor:U,hint:w,error:j,required:D,className:A,children:[
8
+ /* @__PURE__ */b("div",{id:U,role:"group","aria-labelledby":k?`${U}-label`:void 0,"aria-describedby":j?`${U}-error`:w?`${U}-hint`:void 0,"aria-busy":z||void 0,...re.zoneProps,className:"relative rounded-lg transition-colors",style:{...K?{opacity:.6}:{},...te?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===m.length?ie:/* @__PURE__ */b("div",{className:"flex flex-wrap gap-2",children:[m.map((e,r)=>{const t=e.kind?"video"===e.kind:i(e.url,H),a=n(e.url),l=O&&(e.cover??0===r);/* @__PURE__ */
9
+ return b("div",{draggable:Z||void 0,onDragStart:Z?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(r)),J(r)}:void 0,onDragEnd:Z?()=>J(null):void 0,onDragOver:Z?e=>{null!=G&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:Z?e=>{null!=G&&(e.preventDefault(),e.stopPropagation(),G!==r&&N(G,r),J(null))}:void 0,tabIndex:Z?0:void 0,"aria-label":Z?q.reorder(a,r+1,m.length):void 0,onKeyDown:Z?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?r>0&&(e.preventDefault(),N(r,r-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||r<m.length-1&&(e.preventDefault(),N(r,r+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-gray-200 bg-gray-100",_,G===r?"opacity-50":""].join(" "),style:{...le,cursor:Z?"move":void 0},children:[t?/* @__PURE__ */g("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:F}}):/* @__PURE__ */g("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:F}}),l&&/* @__PURE__ */g("span",{className:"absolute left-1 top-1 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white",children:M}),null!=e.caption&&/* @__PURE__ */g(s,{children:e.caption}),Y&&/* @__PURE__ */g("button",{type:"button",onClick:()=>x(e.id),"aria-label":q.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${_}`,style:{background:"var(--rosh-media-scrim-button)"},children:y})]},e.id)}),oe]}),z&&/* @__PURE__ */g(o,{label:T,progress:B})]}),!v&&f&&/* @__PURE__ */g("input",{...re.inputProps}),
10
+ /* @__PURE__ */g(c,{rejections:re.rejections})]})}export{v as MediaUploadGrid};
@@ -1,9 +1,9 @@
1
- import{useShellLocale as e}from"./chunk-5LHPDU6X.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as a,Children as d}from"react";import{jsxs as t,jsx as i}from"react/jsx-runtime";var n={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-gray-200",warning:"border-amber-300",current:"border-gray-200"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:g="",style:x,tone:y="neutral"}){const f=n[m??(o?"md":"none")],N=a(),v=a(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,C=A?"section":"div",H=`rounded-(--radius-card) border ${l[y]} bg-white shadow-sm ${h}`.trim(),L=d.toArray(e).length>0,B=L?"border-b border-gray-100 ":"",D="current"===y,M=D?"text-base font-semibold text-blue-700":"text-base font-semibold text-gray-900",O=D?"rounded-t-(--radius-card) bg-blue-50 ":"",P=`${B}${O}${f.edge} ${M}`;/* @__PURE__ */
2
- return t(C,{className:H,style:x,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...D?{"aria-current":!0}:{},children:[$?
3
- /* @__PURE__ */t("div",{className:`${B}${O}${f.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${M}`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?/* @__PURE__ */i(j,{id:N,className:M,children:r}):/* @__PURE__ */i("div",{className:M,children:r}),
4
- /* @__PURE__ */i("p",{id:v,className:D?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-gray-500",children:s})]}):null!=r&&(null!=u?
5
- /* @__PURE__ */t("div",{className:`${P} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?
6
- /* @__PURE__ */i(j,{id:N,className:P,children:r}):/* @__PURE__ */i("div",{className:P,children:r})),L&&/* @__PURE__ */i("div",{className:[f.body,g].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */i("div",{className:`border-t border-gray-100 ${f.edge}`,children:c})]})}function c({label:a,value:d,icon:n,delta:l,className:s=""}){const c=e(),o="number"==typeof d&&c?r(d,c):d,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
1
+ import{useShellLocale as e}from"./chunk-OVNRVFWS.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as a,Children as d}from"react";import{jsxs as t,jsx as i}from"react/jsx-runtime";var n={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-gray-200",warning:"border-amber-300",current:"border-gray-200"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:g="",style:x,tone:y="neutral"}){const f=n[m??(o?"md":"none")],N=a(),v=a(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,C=A?"section":"div",O=`rounded-(--radius-card) border ${l[y]} bg-white shadow-sm ${h}`.trim(),R=d.toArray(e).length>0,V=R?"border-b border-gray-100 ":"",B="current"===y,F=B?"text-base font-semibold text-blue-700":"text-base font-semibold text-gray-900",H=B?"rounded-t-(--radius-card) bg-blue-50 ":"",L=`${V}${H}${f.edge} ${F}`;/* @__PURE__ */
2
+ return t(C,{className:O,style:x,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...B?{"aria-current":!0}:{},children:[$?
3
+ /* @__PURE__ */t("div",{className:`${V}${H}${f.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${F}`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?/* @__PURE__ */i(j,{id:N,className:F,children:r}):/* @__PURE__ */i("div",{className:F,children:r}),
4
+ /* @__PURE__ */i("p",{id:v,className:B?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-gray-500",children:s})]}):null!=r&&(null!=u?
5
+ /* @__PURE__ */t("div",{className:`${L} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?
6
+ /* @__PURE__ */i(j,{id:N,className:L,children:r}):/* @__PURE__ */i("div",{className:L,children:r})),R&&/* @__PURE__ */i("div",{className:[f.body,g].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */i("div",{className:`border-t border-gray-100 ${f.edge}`,children:c})]})}function c({label:a,value:d,icon:n,delta:l,className:s=""}){const c=e(),o="number"==typeof d&&c?r(d,c):d,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
7
7
  return t("div",{className:`rounded-(--radius-card) border border-gray-200 bg-white p-4 shadow-sm ${s}`.trim(),children:[
8
8
  /* @__PURE__ */t("div",{className:"flex items-center justify-between text-gray-500",children:[
9
9
  /* @__PURE__ */i("span",{className:"text-xs font-medium uppercase tracking-wide",children:a}),n]}),
@@ -1,4 +1,4 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-P2HKX4VB.js";import{navIcons as r}from"./chunk-TPDOOCFS.js";import{VERSION as s}from"./chunk-YR5OZN27.js";import{Icon as o}from"./chunk-C2HHGLLR.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-5LHPDU6X.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=i().aboutApp,b=g.title(n.name);if(e(b,N,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,H]=a(g.partOf);/* @__PURE__ */
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-H7BP5LLG.js";import{navIcons as r}from"./chunk-TPDOOCFS.js";import{VERSION as s}from"./chunk-X4KIXGW5.js";import{Icon as o}from"./chunk-C2HHGLLR.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-OVNRVFWS.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=i().aboutApp,b=g.title(n.name);if(e(b,N,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,H]=a(g.partOf);/* @__PURE__ */
2
2
  return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
4
4
  /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:n.name}),
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-2D7G2OYC.js";import{Select_default as l}from"./chunk-SRFFFPTS.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-USG3EG2Y.js";import{Button_default as d}from"./chunk-FSP63GKK.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
1
+ import{Card as e}from"./chunk-RD5UPROC.js";import{Select_default as l}from"./chunk-MXMBQS75.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-TTE3GZWH.js";import{Button_default as d}from"./chunk-FSP63GKK.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
2
2
  return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
3
3
  /* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
4
4
  /* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
@@ -1,2 +1,2 @@
1
- import{ShellStringsProvider as t}from"./chunk-5LHPDU6X.js";import{createContext as e,useEffect as a,useCallback as n,useMemo as r,useContext as l}from"react";import{jsx as o}from"react/jsx-runtime";var g={tag:"en",name:"English",locale:null},c="react-os-shell:language",u=t=>"string"==typeof t?t:t.tag;function i(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language,script:e.script}}catch{return null}}function s(t,e){const a=e.map(u),n=t.toLowerCase(),r=a.find(t=>t.toLowerCase()===n);if(r)return r;const l=i(t);if(!l)return;const o=a.map(t=>({tag:t,parts:i(t)})).filter(t=>t.parts?.language===l.language);return(o.find(t=>t.parts?.script===l.script)??o[0])?.tag}function f(){try{return globalThis.localStorage?.getItem(c)??null}catch{return null}}function m(t){try{return globalThis.localStorage?.setItem(c,t),globalThis.localStorage?.getItem(c)===t}catch{return!1}}function h({offered:t,fallback:e,saved:a=f(),preferred:n=globalThis.navigator?.languages??[]}){const r=e??(t.length>0?u(t[0]):g.tag);if(a){const e=s(a,t);if(e)return e}for(const e of n){const a=s(e,t);if(a)return a}return r}var d=e({language:g.tag,languages:[g],setLanguage:async()=>{}}),p=()=>globalThis.location?.reload();function b({languages:e,language:l,strings:g,onChange:c,reload:u=p,children:i}){const s=e.find(t=>t.tag===l),f=s?void 0===s.locale?s.tag:s.locale??void 0:void 0;a(()=>{const t=globalThis.document?.documentElement;if(!t)return;const e=t.getAttribute("lang");return t.setAttribute("lang",l),()=>{null===e?t.removeAttribute("lang"):t.setAttribute("lang",e)}},[l]);const h=n(async t=>{if(t!==l&&e.some(e=>e.tag===t)){m(t);try{await(c?.(t))}catch{}u&&u()}},[l,e,c,u]),b=r(()=>({language:l,languages:e,setLanguage:h}),[l,e,h]);/* @__PURE__ */
1
+ import{ShellStringsProvider as t}from"./chunk-OVNRVFWS.js";import{createContext as e,useEffect as a,useCallback as n,useMemo as r,useContext as l}from"react";import{jsx as o}from"react/jsx-runtime";var g={tag:"en",name:"English",locale:null},c="react-os-shell:language",u=t=>"string"==typeof t?t:t.tag;function i(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language,script:e.script}}catch{return null}}function s(t,e){const a=e.map(u),n=t.toLowerCase(),r=a.find(t=>t.toLowerCase()===n);if(r)return r;const l=i(t);if(!l)return;const o=a.map(t=>({tag:t,parts:i(t)})).filter(t=>t.parts?.language===l.language);return(o.find(t=>t.parts?.script===l.script)??o[0])?.tag}function f(){try{return globalThis.localStorage?.getItem(c)??null}catch{return null}}function m(t){try{return globalThis.localStorage?.setItem(c,t),globalThis.localStorage?.getItem(c)===t}catch{return!1}}function h({offered:t,fallback:e,saved:a=f(),preferred:n=globalThis.navigator?.languages??[]}){const r=e??(t.length>0?u(t[0]):g.tag);if(a){const e=s(a,t);if(e)return e}for(const e of n){const a=s(e,t);if(a)return a}return r}var d=e({language:g.tag,languages:[g],setLanguage:async()=>{}}),p=()=>globalThis.location?.reload();function b({languages:e,language:l,strings:g,onChange:c,reload:u=p,children:i}){const s=e.find(t=>t.tag===l),f=s?void 0===s.locale?s.tag:s.locale??void 0:void 0;a(()=>{const t=globalThis.document?.documentElement;if(!t)return;const e=t.getAttribute("lang");return t.setAttribute("lang",l),()=>{null===e?t.removeAttribute("lang"):t.setAttribute("lang",e)}},[l]);const h=n(async t=>{if(t!==l&&e.some(e=>e.tag===t)){m(t);try{await(c?.(t))}catch{}u&&u()}},[l,e,c,u]),b=r(()=>({language:l,languages:e,setLanguage:h}),[l,e,h]);/* @__PURE__ */
2
2
  return o(d.Provider,{value:b,children:/* @__PURE__ */o(t,{value:g,locale:f,children:i})})}function v(){return l(d)}export{g as ENGLISH,c as SHELL_LANGUAGE_STORAGE_KEY,b as ShellLanguageProvider,s as matchShellLanguage,f as readSavedShellLanguage,h as resolveShellLanguage,m as saveShellLanguage,v as useShellLanguage};
@@ -1,8 +1,8 @@
1
- import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-RERVHKA6.js";import{Button_default as i}from"./chunk-FSP63GKK.js";import{Tooltip as l}from"./chunk-Z3WKHMVB.js";import{useShellStrings as a}from"./chunk-5LHPDU6X.js";import{useId as s,useRef as c,useState as d,useEffect as u,Fragment as h}from"react";import{jsxs as f,jsx as m}from"react/jsx-runtime";var p=(e,t,r)=>Math.min(r,Math.max(t,e)),v=e=>e.reduce((e,t)=>e+t,0),g=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var y,b="w-0.5",w=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var x=["text-blue-700","text-gray-600"];function k({count:k,value:$,onChange:C,label:N,"aria-labelledby":P,readOnly:j=!1,disabled:M=!1,footer:R=!0,className:K=""}){const z=a().widths,A=s(),B=p(Math.round(k)||1,1,n),S=e($,B),D=S??[...t[B]??[]],H=[...D,100-v(D)],E=j||M,O=c(null),T=c({onChange:C,shown:D,locked:E,n:B,stored:S});T.current={onChange:C,shown:D,locked:E,n:B,stored:S};const L=t=>{const{onChange:r,shown:n,locked:o,n:i}=T.current;if(o)return!1;const l=e(t,i);return!(!l||g(l,n))&&(r(l),!0)},F=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=p(Math.round(n),r,o-r),i[t+1]=o-i[t],L(i.slice(0,-1))&&(ie.current=null)},G=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=H[e]+H[e+1],i="ArrowRight"===t.key?H[e]+n:"ArrowLeft"===t.key?H[e]-n:"PageUp"===t.key?H[e]+10:"PageDown"===t.key?H[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),F(H,e,i))},I=c(null),[U,V]=d(null),W=()=>{I.current=null,V(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>W,[]);const X=e=>t=>{if(0!==t.button||E)return;t.preventDefault();const r=O.current?.getBoundingClientRect().width??0;r<=0||(I.current={i:e,x:t.clientX,width:r,from:H,moved:!1,pointer:t.pointerId},V(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},q=e=>{const t=I.current;if(!t)return;if(0===e.buttons)return void W();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}F(t.from,t.i,t.from[t.i]+r/t.width*100)},J=e=>{const t=I.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),W())},Z=(e,t)=>{const{shown:n}=T.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=p(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-v(n)],e,t);return L(o.slice(0,-1))?o:null},[Q,Y]=d(0);u(()=>{const e=O.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Y(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const _=c(null),[ee,te]=d(null),[re,ne]=d([]),oe=(e,t)=>te(r=>t?e:r===e?null:r),ie=c(null),le=(e,t)=>{const r=ie.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=T.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:g(l,a))||n(r.stored),!0},ae=H.join(",");u(()=>{const e=null===ee?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===y&&(y=document.createElement("canvas").getContext("2d")),!y)return[];const o=y;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(_.current,ee);ne(t=>g(t,e)?t:e)},[ee,ae,Q]);const se=H.slice(0,-1).map((e,t)=>v(H.slice(0,t+1)));/* @__PURE__ */
2
- return f("div",{role:"group","aria-label":P?void 0:N,"aria-labelledby":P,"aria-describedby":B>1?A:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${K}`.trim(),children:[
1
+ import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-332V47ID.js";import{Button_default as i}from"./chunk-FSP63GKK.js";import{Tooltip as l}from"./chunk-Z3WKHMVB.js";import{useShellStrings as a}from"./chunk-OVNRVFWS.js";import{useId as s,useRef as c,useState as d,useEffect as u,Fragment as h}from"react";import{jsxs as f,jsx as m}from"react/jsx-runtime";var p=(e,t,r)=>Math.min(r,Math.max(t,e)),v=e=>e.reduce((e,t)=>e+t,0),g=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var y,b="w-0.5",w=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var x=["text-blue-700","text-gray-600"];function k({count:k,value:$,onChange:C,label:N,"aria-labelledby":P,readOnly:j=!1,disabled:M=!1,footer:R=!0,className:z=""}){const K=a().widths,S=s(),B=p(Math.round(k)||1,1,n),A=e($,B),D=A??[...t[B]??[]],O=[...D,100-v(D)],T=j||M,V=c(null),E=c({onChange:C,shown:D,locked:T,n:B,stored:A});E.current={onChange:C,shown:D,locked:T,n:B,stored:A};const F=t=>{const{onChange:r,shown:n,locked:o,n:i}=E.current;if(o)return!1;const l=e(t,i);return!(!l||g(l,n))&&(r(l),!0)},H=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=p(Math.round(n),r,o-r),i[t+1]=o-i[t],F(i.slice(0,-1))&&(ie.current=null)},I=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=O[e]+O[e+1],i="ArrowRight"===t.key?O[e]+n:"ArrowLeft"===t.key?O[e]-n:"PageUp"===t.key?O[e]+10:"PageDown"===t.key?O[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),H(O,e,i))},W=c(null),[G,L]=d(null),U=()=>{W.current=null,L(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>U,[]);const X=e=>t=>{if(0!==t.button||T)return;t.preventDefault();const r=V.current?.getBoundingClientRect().width??0;r<=0||(W.current={i:e,x:t.clientX,width:r,from:O,moved:!1,pointer:t.pointerId},L(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},q=e=>{const t=W.current;if(!t)return;if(0===e.buttons)return void U();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}H(t.from,t.i,t.from[t.i]+r/t.width*100)},J=e=>{const t=W.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),U())},Z=(e,t)=>{const{shown:n}=E.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=p(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-v(n)],e,t);return F(o.slice(0,-1))?o:null},[Q,Y]=d(0);u(()=>{const e=V.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Y(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const _=c(null),[ee,te]=d(null),[re,ne]=d([]),oe=(e,t)=>te(r=>t?e:r===e?null:r),ie=c(null),le=(e,t)=>{const r=ie.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=E.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:g(l,a))||n(r.stored),!0},ae=O.join(",");u(()=>{const e=null===ee?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===y&&(y=document.createElement("canvas").getContext("2d")),!y)return[];const o=y;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(_.current,ee);ne(t=>g(t,e)?t:e)},[ee,ae,Q]);const se=O.slice(0,-1).map((e,t)=>v(O.slice(0,t+1)));/* @__PURE__ */
2
+ return f("div",{role:"group","aria-label":P?void 0:N,"aria-labelledby":P,"aria-describedby":B>1?S:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${z}`.trim(),children:[
3
3
  /* @__PURE__ */f("div",{ref:_,"data-widths-bar":"",className:"relative h-8",children:[
4
- /* @__PURE__ */m("div",{ref:O,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-white",children:H.map((e,t)=>/* @__PURE__ */m("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${x[t%2]} ${t%2==0?"bg-blue-50":""}`,children:1===B&&/* @__PURE__ */m("span",{"data-widths-label":"",children:`${e}%`})},t))}),
5
- /* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-gray-300"}),B>1&&H.map((e,t)=>/* @__PURE__ */f(h,{children:[(()=>{const n=ee===t,i=v(H.slice(0,t)),l=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
6
- return m("div",{className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${i+e/2}% - ${l} / 2), calc(100% - ${l}))`,width:l},children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>Q>0&&Q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:j,disabled:M,"aria-label":z.column(t+1),"aria-describedby":A,"data-widths-label":"",onChange:e=>{null===e||le(t,e)||Z(t,e)},onRevert:e=>((e,t)=>{T.current.locked||null===t||le(e,t)||Z(e,t)})(t,e),onFocus:()=>{ie.current={column:t,share:e,stored:T.current.stored},oe(t,!0)},onBlur:()=>oe(t,!1),className:`absolute inset-0 text-xs font-medium ${x[t%2]} ${re.includes(t)&&!n?"opacity-0":""}`})})})(),t<B-1&&/* @__PURE__ */m("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${se[t]}%`},children:/* @__PURE__ */m(l,{content:z.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */m("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":z.divider(t+1,t+2),"aria-valuenow":H[t],"aria-valuemin":r,"aria-valuemax":H[t]+H[t+1]-r,"aria-valuetext":z.dividerValue(t+1,H[t],t+2,H[t+1]),"aria-disabled":E||void 0,onKeyDown:E?void 0:G(t),onPointerDown:X(t),onPointerMove:q,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:()=>{I.current&&W()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(E?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */m("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(E?`${b} bg-gray-300`:`bg-blue-600 transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${U===t?"w-1":w}`)})})})})]},t))]}),B>1&&!R&&/* @__PURE__ */m("span",{id:A,className:"sr-only",children:z.hint(B,r)}),B>1&&R&&/* @__PURE__ */m("div",{"data-widths-footer":"",className:"@container",children:/* @__PURE__ */f("div",{className:"flex items-center justify-between gap-2 @max-[264px]:flex-col @max-[264px]:items-end",children:[
7
- /* @__PURE__ */m("span",{id:A,"data-widths-hint":"",className:"text-2xs leading-tight text-gray-500 @max-[264px]:self-stretch",children:z.hint(B,r)}),
8
- /* @__PURE__ */m(i,{variant:"secondary",size:"sm",disabled:E,onClick:()=>{E||void 0===$||C(void 0)},className:"shrink-0",children:z.reset})]})})]})}export{k as WidthsBar};
4
+ /* @__PURE__ */m("div",{ref:V,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-white",children:O.map((e,t)=>/* @__PURE__ */m("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${x[t%2]} ${t%2==0?"bg-blue-50":""}`,children:1===B&&/* @__PURE__ */m("span",{"data-widths-label":"",children:`${e}%`})},t))}),
5
+ /* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-gray-300"}),B>1&&O.map((e,t)=>/* @__PURE__ */f(h,{children:[(()=>{const n=ee===t,i=v(O.slice(0,t)),l=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
6
+ return m("div",{className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${i+e/2}% - ${l} / 2), calc(100% - ${l}))`,width:l},children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>Q>0&&Q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:j,disabled:M,"aria-label":K.column(t+1),"aria-describedby":S,"data-widths-label":"",onChange:e=>{null===e||le(t,e)||Z(t,e)},onRevert:e=>((e,t)=>{E.current.locked||null===t||le(e,t)||Z(e,t)})(t,e),onFocus:()=>{ie.current={column:t,share:e,stored:E.current.stored},oe(t,!0)},onBlur:()=>oe(t,!1),className:`absolute inset-0 text-xs font-medium ${x[t%2]} ${re.includes(t)&&!n?"opacity-0":""}`})})})(),t<B-1&&/* @__PURE__ */m("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${se[t]}%`},children:/* @__PURE__ */m(l,{content:K.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */m("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":K.divider(t+1,t+2),"aria-valuenow":O[t],"aria-valuemin":r,"aria-valuemax":O[t]+O[t+1]-r,"aria-valuetext":K.dividerValue(t+1,O[t],t+2,O[t+1]),"aria-disabled":T||void 0,onKeyDown:T?void 0:I(t),onPointerDown:X(t),onPointerMove:q,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:()=>{W.current&&U()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(T?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */m("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(T?`${b} bg-gray-300`:`bg-blue-600 transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${G===t?"w-1":w}`)})})})})]},t))]}),B>1&&!R&&/* @__PURE__ */m("span",{id:S,className:"sr-only",children:K.hint(B,r)}),B>1&&R&&/* @__PURE__ */m("div",{"data-widths-footer":"",className:"@container",children:/* @__PURE__ */f("div",{className:"flex items-center justify-between gap-2 @max-[264px]:flex-col @max-[264px]:items-end",children:[
7
+ /* @__PURE__ */m("span",{id:S,"data-widths-hint":"",className:"text-2xs leading-tight text-gray-500 @max-[264px]:self-stretch",children:K.hint(B,r)}),
8
+ /* @__PURE__ */m(i,{variant:"secondary",size:"sm",disabled:T,onClick:()=>{T||void 0===$||C(void 0)},className:"shrink-0",children:K.reset})]})})]})}export{k as WidthsBar};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-2D7G2OYC.js";import{Select_default as a}from"./chunk-SRFFFPTS.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{Pagination as t}from"./chunk-NQJJRKUK.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-BOGBLZKS.js";import{TH_ONE_LINE as l}from"./chunk-QMQVOUIV.js";import{Button_default as c}from"./chunk-FSP63GKK.js";import{Icon as m}from"./chunk-C2HHGLLR.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[m,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-RD5UPROC.js";import{Select_default as a}from"./chunk-MXMBQS75.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{Pagination as t}from"./chunk-XKCEVZZB.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-BOGBLZKS.js";import{TH_ONE_LINE as l}from"./chunk-QMQVOUIV.js";import{Button_default as c}from"./chunk-FSP63GKK.js";import{Icon as m}from"./chunk-C2HHGLLR.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[m,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
2
2
  return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
@@ -0,0 +1,9 @@
1
+ import{ImageFocusPoint as e}from"./chunk-PMJMPYLQ.js";import{FormField as a}from"./chunk-MVQBVPWP.js";import{isVideoUrl as i,mediaPromptLine as t,mediaFileName as r,FilenameBadge as o,BusyOverlay as n,UploadGlyph as l,dropzoneClass as s,zoneFocusClass as c}from"./chunk-EPHQ7UQV.js";import{TransferProgress as d}from"./chunk-EZQXLIG3.js";import{Segmented as u}from"./chunk-BF2G42QU.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-VAACOJ2H.js";import{Icon as p}from"./chunk-C2HHGLLR.js";import{useShellStrings as b}from"./chunk-OVNRVFWS.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function L({value:L,onChange:w,onPick:R,onFile:C,label:F,hint:P,error:U,required:H,className:O,accept:V="image/*",maxSizeBytes:Q,fit:$="cover",height:z=112,placeholder:B,cta:q,acceptHint:A,showFilename:G=!0,allowReplace:I=!0,allowRemove:M=!0,replaceLabel:S,removeLabel:W,busy:E=!1,busyLabel:J,choosingLabel:_,pickFailedLabel:K,progress:X,disabled:Y=!1,kind:Z,onKindChange:D,focus:T,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=q??ie.cta,re=Z??(/video/.test(V)&&!/image/.test(V)?"video":"image"),oe="string"==typeof W&&W?W:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=E||ne,me=ne&&!E?_??ie.choosing:J??ie.uploading,he=U??(se?K??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&w(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=Y||ue,ke=!!L&&(i(L,V)||L===ve),je=B??t(V,ie),xe=S??(ke||"video"===re?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):C?C(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),w(a)})(e)},Le=m({accept:V,maxSizeBytes:Q,acceptHint:A,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:we}=Le,Re=()=>{ye||(R?pe():Le.open())},Ce=L?r(L):"",Fe=!ke&&!!ee,Pe=Y||!I&&!M?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[I&&/* @__PURE__ */k("button",{id:Fe?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
2
+ /* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
3
+ /* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),M&&/* @__PURE__ */j("button",{type:"button","aria-label":oe,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),w("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Ue=/* @__PURE__ */k("div",{...Le.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Fe?"":"bg-gray-100",we?"border-blue-500":"border-gray-200"].join(" "),style:Fe?void 0:{height:z},children:[Fe?
4
+ /* @__PURE__ */j(e,{value:T??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:L,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:L??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ce||void 0,className:"h-full w-full",style:{objectFit:$}}):/* @__PURE__ */j("img",{src:L??void 0,alt:Ce,className:"h-full w-full",style:{objectFit:$,objectPosition:T||void 0}}),G&&L&&/* @__PURE__ */j(o,{children:Ce}),Pe,ue&&/* @__PURE__ */j(n,{label:me,progress:X,rounded:"rounded-md"})]}),He=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":H||void 0,"aria-describedby":he?`${be}-error`:P?`${be}-hint`:void 0,...Le.zoneProps,className:s(we,ye,c(ye)),style:{minHeight:z},children:ue?/* @__PURE__ */j(d,{state:"busy",verb:me,pct:X}):/* @__PURE__ */k(x,{children:[
5
+ /* @__PURE__ */j("span",{className:"text-gray-400",children:/* @__PURE__ */j(l,{})}),
6
+ /* @__PURE__ */j("span",{className:"px-3 text-xs text-gray-500",children:je}),
7
+ /* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),A&&/* @__PURE__ */j("span",{className:"text-xs text-gray-400",children:A})]})});/* @__PURE__ */
8
+ return k(a,{label:F,htmlFor:be,hint:P,error:he,required:H,className:O,children:[D&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(u,{value:re,onChange:e=>D(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof F&&F?F:ie.upload})}),L?Ue:He,!R&&/* @__PURE__ */j("input",{...Le.inputProps}),
9
+ /* @__PURE__ */j(h,{rejections:Le.rejections})]})}export{L as MediaUploadField};
@@ -1,7 +1,7 @@
1
- import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-5LHPDU6X.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
1
+ import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-OVNRVFWS.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,N=n(),w=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
2
2
  return s("div",{className:`flex flex-col gap-0.5 rounded-lg border border-gray-200 bg-white p-4 ${f??""}`,children:[
3
3
  /* @__PURE__ */o("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:i}),
4
4
  /* @__PURE__ */s("span",{className:"flex items-baseline gap-2",children:[
5
- /* @__PURE__ */o("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:m}),c&&/* @__PURE__ */o("span",{className:"text-sm font-medium text-gray-500",children:c})]}),N&&/* @__PURE__ */s("span",{className:"text-xs font-medium",style:b?{color:b}:void 0,children:[
6
- /* @__PURE__ */o("span",{"aria-hidden":"true",children:d[N].glyph})," ",l(Math.abs(h),w),
7
- /* @__PURE__ */s("span",{className:"sr-only",children:[" ",y[d[N].word]]})]}),u&&u.length>1&&/* @__PURE__ */o(e,{data:u,height:26,stroke:k,strokeWidth:2,className:"mt-2 w-full"}),x&&/* @__PURE__ */o("span",{className:"mt-1 text-xs text-gray-500",children:x})]})}export{i as StatTile};
5
+ /* @__PURE__ */o("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:m}),c&&/* @__PURE__ */o("span",{className:"text-sm font-medium text-gray-500",children:c})]}),w&&/* @__PURE__ */s("span",{className:"text-xs font-medium",style:b?{color:b}:void 0,children:[
6
+ /* @__PURE__ */o("span",{"aria-hidden":"true",children:d[w].glyph})," ",l(Math.abs(h),N),
7
+ /* @__PURE__ */s("span",{className:"sr-only",children:[" ",y[d[w].word]]})]}),u&&u.length>1&&/* @__PURE__ */o(e,{data:u,height:26,stroke:k,strokeWidth:2,className:"mt-2 w-full"}),x&&/* @__PURE__ */o("span",{className:"mt-1 text-xs text-gray-500",children:x})]})}export{i as StatTile};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-C2HHGLLR.js";import{useShellStrings as r}from"./chunk-5LHPDU6X.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-C2HHGLLR.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
3
3
  return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
4
4
  return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
@@ -1,7 +1,7 @@
1
- import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-5LHPDU6X.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),P=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},j=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),P(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),P(t,o+r)),"Home"===e.key&&(e.preventDefault(),P(t,0)),"End"===e.key&&(e.preventDefault(),P(t,p))},C=o(null),L=t=>e=>{C.current=t,e.currentTarget.setPointerCapture(e.pointerId)},A=t=>e=>{C.current===t&&P(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},N=t=>()=>{C.current===t&&(C.current=null)},R=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
- return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:j(t),onPointerDown:L(t),onPointerMove:A(t),onPointerUp:N(t),onPointerCancel:N(t)},t)};/* @__PURE__ */
1
+ import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),F=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=F[F.length-1];r&&r.to===e-1?r.to=e:F.push({from:e,to:e})});const D=F.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},N=o(null),P=t=>e=>{N.current=t,e.currentTarget.setPointerCapture(e.pointerId)},R=t=>e=>{N.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},A=t=>()=>{N.current===t&&(N.current=null)},L=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
+ return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:P(t),onPointerMove:R(t),onPointerUp:A(t),onPointerCancel:A(t)},t)};/* @__PURE__ */
3
3
  return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
4
- /* @__PURE__ */n("path",{d:F,fill:e.grid}),
4
+ /* @__PURE__ */n("path",{d:D,fill:e.grid}),
5
5
  /* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
6
6
  /* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
7
- /* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),R("from"),R("to")]})})}export{a as ChartBrush};
7
+ /* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),L("from"),L("to")]})})}export{a as ChartBrush};
@@ -1,10 +1,10 @@
1
- import{LoadingSpinner as e}from"./chunk-Q5MD3VY6.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-5LHPDU6X.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:y,sortInColumn:b,isLoading:v=!1,loadingText:N,emptyState:w,showColumnsWhenEmpty:k=!1,columnEmptyText:D,onAddItem:C,addItemText:j}){const E=t().kanban,I=r(),T=N??E.loading,M=D??E.dropHere,A=j??E.addItem,[H,O]=o(null),[$,L]=o(null),S=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(b)for(const n of Object.keys(e))e[n].sort(b);return e},[m,f,p,b]),q=()=>{O(null),L(null)},z=i(null),F=i(/* @__PURE__ */new Map);n(()=>{if(null!==H)return;const e=z.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=F.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),F.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[S,H]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:T}):0!==m.length||k?/* @__PURE__ */d("div",{ref:z,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=S[e.value]??[],t=null!==$&&$.col===e.value,r=null!==H?n.findIndex(e=>g(e)===H):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
2
- return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&$&&$.col===e){const n=(S[e]??[]).findIndex(e=>g(e)===H),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(H,e,r)}}q()})(e.value)},children:[
1
+ import{LoadingSpinner as e}from"./chunk-Q5MD3VY6.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-OVNRVFWS.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:y,sortInColumn:b,isLoading:v=!1,loadingText:N,emptyState:w,showColumnsWhenEmpty:k=!1,columnEmptyText:C,onAddItem:D,addItemText:j}){const E=t().kanban,I=r(),T=N??E.loading,M=C??E.dropHere,O=j??E.addItem,[A,S]=o(null),[$,F]=o(null),H=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(b)for(const n of Object.keys(e))e[n].sort(b);return e},[m,f,p,b]),R=()=>{S(null),F(null)},V=i(null),q=i(/* @__PURE__ */new Map);n(()=>{if(null!==A)return;const e=V.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=q.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),q.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[H,A]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:T}):0!==m.length||k?/* @__PURE__ */d("div",{ref:V,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=H[e.value]??[],t=null!==$&&$.col===e.value,r=null!==A?n.findIndex(e=>g(e)===A):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
2
+ return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(A&&$&&$.col===e){const n=(H[e]??[]).findIndex(e=>g(e)===A),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(A,e,r)}}R()})(e.value)},children:[
3
3
  /* @__PURE__ */u("div",{className:`flex items-center justify-between px-3 py-2 rounded-t-xl text-sm font-medium ${e.accent??"text-gray-700 bg-gray-100"}`,children:[
4
4
  /* @__PURE__ */u("span",{className:"flex items-center gap-2",children:[
5
5
  /* @__PURE__ */d("span",{className:`h-2 w-2 rounded-full ${e.dot??"bg-gray-400"}`}),e.label]}),
6
6
  /* @__PURE__ */d("span",{className:"text-xs opacity-70",children:a(n.length,I)})]}),
7
- /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>L(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===H;/* @__PURE__ */
7
+ /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>F(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===A;/* @__PURE__ */
8
8
  return u(s,{children:[o===r&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),
9
- /* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;L(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:q,onClick:y?()=>y(t):void 0,style:null===H?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(y?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:M})]}),C&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>C(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-gray-500 opacity-0 transition hover:bg-gray-100 hover:text-gray-700 focus-visible:opacity-100 group-hover:opacity-100",children:[
10
- /* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),A]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:w??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:E.empty})})}export{m as Kanban};
9
+ /* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{S(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==A?n.findIndex(e=>g(e)===A):-1,o=-1!==a&&a<r?r+1:r;F(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:R,onClick:y?()=>y(t):void 0,style:null===A?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(y?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:M})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-gray-500 opacity-0 transition hover:bg-gray-100 hover:text-gray-700 focus-visible:opacity-100 group-hover:opacity-100",children:[
10
+ /* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),O]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:w??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:E.empty})})}export{m as Kanban};
@@ -0,0 +1,9 @@
1
+ import{AccessibleTable as e}from"./chunk-C2FBUQJW.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-P5BOTIJU.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-OVNRVFWS.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function f({nodes:f,links:k,height:p=320,width:x,nodeWidth:g=14,nodePadding:y=12,formatValue:v,className:M,emptyLabel:w}){const b=i().charts,j=s(),N=v??(e=>h(e,j)),$=w??b.noFlows,F=c(null),C=l(F),E=x??C,[O,U]=m(null),{highlighted:A}=n();if(0===f.length||0===k.length)/* @__PURE__ */
2
+ return d("div",{className:M,ref:F,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const V=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),W=e=>V.length<=1?0:V.indexOf(e)/(V.length-1)*(E-g-140)+70,z=new Map(f.map(e=>{const t=k.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=k.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(t,n,e.value??0)]})),B=/* @__PURE__ */new Map;for(const e of f)B.set(e.depth,[...B.get(e.depth)??[],e]);const P=Math.max(...[...B.values()].map(e=>e.reduce((e,t)=>e+(z.get(t.key)??0),0))),Q=p-20,R=P>0?(Q-y*(Math.max(...[...B.values()].map(e=>e.length))-1))/P:0,S=/* @__PURE__ */new Map;for(const[e,t]of B){const n=t.map(e=>Math.max(2,(z.get(e.key)??0)*R)),o=n.reduce((e,t)=>e+t,0)+y*(t.length-1),l=n.reduce((e,t)=>e+Math.max(0,t-2),0),r=o>Q&&l>0?Math.max(0,1-(o-Q)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;S.set(t.key,{x:W(e),y:a,h:l,index:o}),a+=l+y})}const T=/* @__PURE__ */new Map,H=/* @__PURE__ */new Map,J=/* @__PURE__ */new Map,L=(e,t)=>e.from===t||e.to===t,Y="link"===O?.kind?k[O.index]:void 0,Z="node"===O?.kind?f.find(e=>e.key===O.key):void 0;/* @__PURE__ */
3
+ return u("div",{className:`relative ${M??""}`,ref:F,children:[
4
+ /* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${E} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>U(null),children:[k.map((e,n)=>{const o=S.get(e.from),l=S.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*R),i=o.y+(T.get(e.from)??0)+a/2,s=l.y+(H.get(e.to)??0)+a/2;T.set(e.from,(T.get(e.from)??0)+a),H.set(e.to,(H.get(e.to)??0)+a);const h=o.x+g,c=l.x,m=r(o.index,e.color),u=`${e.from}→${e.to}`,f=J.get(u)??0;J.set(u,f+1);const k=((e,t)=>O?"link"===O.kind?O.index===t:L(e,O.key):null!==A?L(e,A):null)(e,n);/* @__PURE__ */
5
+ return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>U({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=S.get(e.key);if(!t)return null;const n=t.x>E/2,o=(l=e.key,O?"node"===O.kind?O.key===l:L(k[O.index],l):null!==A?A===l:null);var l;/* @__PURE__ */
6
+ return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>U({kind:"node",key:e.key}),children:[
7
+ /* @__PURE__ */d("rect",{x:t.x,y:t.y,width:g,height:t.h,rx:2,fill:r(t.index,e.color,e.tone)}),
8
+ /* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:a.label,children:e.label})]},e.key)})]}),Y&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:`${Y.from} → ${Y.to}`,rows:[{key:"value",label:b.flow,color:r(S.get(Y.from)?.index??0,Y.color),value:N(Y.value)}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:Z.label,rows:[{key:"value",label:b.throughput,color:r(S.get(Z.key)?.index??0,Z.color,Z.tone),value:N(z.get(Z.key)??0)}]})}),
9
+ /* @__PURE__ */d(e,{caption:b.sankey(f.length,k.length),head:[b.tableFrom,b.tableTo,b.value],rows:k.map(e=>[e.from,e.to,N(e.value)])})]})}export{f as SankeyChart};