efficient-shell 8.22.0 → 8.23.1

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 (299) hide show
  1. package/README.md +31 -0
  2. package/dist/{Browser-VZU2MTSA.js → Browser-NSOMITHS.js} +14 -14
  3. package/dist/Calculator-WZIBSVDK.js +29 -0
  4. package/dist/{CurrencyConverter-BSQCX3HS.js → CurrencyConverter-BX5HDEX6.js} +8 -8
  5. package/dist/{Documents-NR3T434J.js → Documents-LEB2ZSZD.js} +20 -20
  6. package/dist/{Files-QMV2E74S.js → Files-4P5YEYDE.js} +23 -23
  7. package/dist/{Notepad-M5MCY5DV.js → Notepad-UNPC3Q4F.js} +10 -10
  8. package/dist/{PdfViewer-OODU3XIT.js → PdfViewer-67VBUIRD.js} +1 -1
  9. package/dist/PomodoroTimer-LBFYGZHA.js +91 -0
  10. package/dist/{Preview-QTDCPMCL.js → Preview-3FABZUXV.js} +27 -27
  11. package/dist/Sidebar-OIWVKYUU.js +43 -0
  12. package/dist/{Spreadsheet-V2EWOJML.js → Spreadsheet-AADGH3IX.js} +14 -14
  13. package/dist/{Stock-U3G45T36.js → Stock-5TKATE4I.js} +3 -3
  14. package/dist/{Weather-GEC4VHLM.js → Weather-NQJCUUUN.js} +17 -17
  15. package/dist/{WorldClock-6ORV4NHF.js → WorldClock-QYZF2JCO.js} +6 -6
  16. package/dist/ai/index.js +13 -13
  17. package/dist/apps/index.d.ts +1 -1
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/media-host-check.js +1 -1
  20. package/dist/bin/ui-check.js +1 -1
  21. package/dist/brand.css +1 -1
  22. package/dist/charts/BoxPlotChart.js +1 -1
  23. package/dist/charts/CandlestickChart.js +1 -1
  24. package/dist/charts/CartesianPlot.js +1 -1
  25. package/dist/charts/ChartBrush.js +1 -1
  26. package/dist/charts/ChartFrame.js +1 -1
  27. package/dist/charts/ChartSkeleton.js +1 -1
  28. package/dist/charts/ChordChart.js +1 -1
  29. package/dist/charts/ColumnChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/StatTile.js +1 -1
  42. package/dist/charts/SunburstChart.js +1 -1
  43. package/dist/charts/TimeSeriesChart.js +1 -1
  44. package/dist/charts/TreemapChart.js +1 -1
  45. package/dist/charts/WaterfallChart.js +1 -1
  46. package/dist/{chunk-74QAQXSB.js → chunk-2C6IG7LG.js} +1 -1
  47. package/dist/{chunk-XUQQCKKD.js → chunk-37CCKGHU.js} +1 -1
  48. package/dist/chunk-3EKWDVBV.js +29 -0
  49. package/dist/{chunk-W7ZAFS7C.js → chunk-3GHBY2FP.js} +7 -7
  50. package/dist/{chunk-C3ZZDCBU.js → chunk-3IYMTPGR.js} +18 -18
  51. package/dist/{chunk-WXIEWJF7.js → chunk-3PGK3VFS.js} +1 -1
  52. package/dist/{chunk-I2FHDMIN.js → chunk-3PNKI44X.js} +6 -6
  53. package/dist/{chunk-KFSNSDTW.js → chunk-3V5Z2BJY.js} +12 -12
  54. package/dist/{chunk-Q6A6W3DI.js → chunk-3XQGEILM.js} +1 -1
  55. package/dist/{chunk-QSN7X27F.js → chunk-4CFOKYVR.js} +7 -7
  56. package/dist/{chunk-D3BDPSVV.js → chunk-4F3IKYUO.js} +6 -6
  57. package/dist/{chunk-QUS3C264.js → chunk-4NXMMWL6.js} +1 -1
  58. package/dist/{chunk-PHYI7M45.js → chunk-4VLKDANH.js} +1 -1
  59. package/dist/{chunk-6AJM3QNG.js → chunk-4YUCXIRP.js} +1 -1
  60. package/dist/{chunk-VWMTQLVS.js → chunk-5PY4H4ZJ.js} +1 -1
  61. package/dist/{chunk-R4JU7MU2.js → chunk-64FIE4SX.js} +7 -7
  62. package/dist/chunk-6CRERVSV.js +1 -0
  63. package/dist/chunk-6NMDKOQA.js +7 -0
  64. package/dist/{chunk-PFB2NSSS.js → chunk-6WSTN5A3.js} +5 -5
  65. package/dist/{chunk-R5FFVK2W.js → chunk-72YFU346.js} +1 -1
  66. package/dist/{chunk-SDORX5C2.js → chunk-77FLITYM.js} +6 -6
  67. package/dist/{chunk-DIZW2GZP.js → chunk-7CFH6Y4T.js} +1 -1
  68. package/dist/{chunk-3UL7IB25.js → chunk-BI6ZLD4X.js} +7 -7
  69. package/dist/{chunk-X2U5XB7J.js → chunk-BMZSMXE6.js} +1 -1
  70. package/dist/chunk-BOBUSE33.js +2 -0
  71. package/dist/{chunk-VNYFGNHO.js → chunk-BRHIRE4D.js} +4 -4
  72. package/dist/{chunk-QZRH7L2E.js → chunk-BSNWVZHW.js} +1 -1
  73. package/dist/{chunk-74HUZZPT.js → chunk-BY2OWWKC.js} +1 -1
  74. package/dist/chunk-CRLSG5AY.js +9 -0
  75. package/dist/{chunk-F6YMKW5G.js → chunk-CZ25A5RS.js} +1 -1
  76. package/dist/{chunk-V4WNEJ63.js → chunk-D2AUUIKG.js} +1 -1
  77. package/dist/{chunk-RIGW3E5M.js → chunk-D7FT2PXG.js} +5 -5
  78. package/dist/{chunk-SSOLRTVS.js → chunk-DFDDRKIJ.js} +1 -1
  79. package/dist/{chunk-5EK4DFB5.js → chunk-DISSJYKV.js} +7 -7
  80. package/dist/{chunk-BUWOFJGM.js → chunk-DITCVBR7.js} +10 -10
  81. package/dist/chunk-DODH46ZQ.js +8 -0
  82. package/dist/{chunk-IMDLBXO3.js → chunk-DTSCO7VM.js} +1 -1
  83. package/dist/{chunk-ZY62UQI2.js → chunk-DZNG34DC.js} +19 -19
  84. package/dist/{chunk-YF7A3BWA.js → chunk-E5ALJIXV.js} +4 -4
  85. package/dist/chunk-E6UCGCOC.js +1 -0
  86. package/dist/{chunk-PZFETJAG.js → chunk-EJUR35JG.js} +1 -1
  87. package/dist/{chunk-DIW6WT5L.js → chunk-ERMZ75FO.js} +1 -1
  88. package/dist/{chunk-F3AROMIU.js → chunk-ETF7LAYZ.js} +6 -6
  89. package/dist/{chunk-F6YIUCIJ.js → chunk-EYKUKN32.js} +4 -4
  90. package/dist/{chunk-NYLXA2EG.js → chunk-EZ3BQ6PK.js} +7 -7
  91. package/dist/{chunk-SFWIYB4T.js → chunk-FL2PUQX7.js} +1 -1
  92. package/dist/{chunk-X7JK22X2.js → chunk-GATKJSGL.js} +5 -5
  93. package/dist/{chunk-56C5SEZ7.js → chunk-GIM2422N.js} +1 -1
  94. package/dist/{chunk-HLZZ5Q5E.js → chunk-GQACKEKW.js} +16 -16
  95. package/dist/{chunk-TCN7XUCY.js → chunk-GWIPZKZJ.js} +4 -4
  96. package/dist/chunk-H33Z4ZIY.js +11 -0
  97. package/dist/{chunk-GVNDUNQL.js → chunk-H3BC4KDE.js} +1 -1
  98. package/dist/{chunk-IUBWN3OA.js → chunk-HVX37PKU.js} +1 -1
  99. package/dist/chunk-I4VD5D43.js +8 -0
  100. package/dist/chunk-IFDW5QW6.js +2 -0
  101. package/dist/{chunk-OPFCLDVM.js → chunk-IHQX4GYD.js} +1 -1
  102. package/dist/{chunk-6PWLY2LQ.js → chunk-IZCODCSC.js} +1 -1
  103. package/dist/{chunk-KBLMTCTD.js → chunk-JEXXJK7H.js} +1 -1
  104. package/dist/{chunk-MRLQH2GZ.js → chunk-JNDBRSYZ.js} +2 -2
  105. package/dist/{chunk-ONEF47LG.js → chunk-JPP7UWQA.js} +3 -3
  106. package/dist/{chunk-TYZ4IY7F.js → chunk-JUGPTBMS.js} +2 -2
  107. package/dist/{chunk-SH6ZLK4K.js → chunk-JWIKHVF4.js} +8 -8
  108. package/dist/{chunk-L2JOLPJR.js → chunk-JYLVX2FW.js} +1 -1
  109. package/dist/{chunk-SO4WAMVA.js → chunk-K7KQDPLW.js} +5 -5
  110. package/dist/{chunk-5OGWWBJY.js → chunk-KDZUWQEG.js} +1 -1
  111. package/dist/{chunk-CJKDYVNE.js → chunk-KKSW5IZ7.js} +6 -6
  112. package/dist/{chunk-POMS7YQN.js → chunk-KZHPX4FM.js} +2 -2
  113. package/dist/{chunk-35VA5UFB.js → chunk-LK2SICMI.js} +1 -1
  114. package/dist/{chunk-3APQ5V6P.js → chunk-LLLAIPFX.js} +1 -1
  115. package/dist/{chunk-WBU7NZBP.js → chunk-M5P6A7KS.js} +1 -1
  116. package/dist/{chunk-52L6IBTN.js → chunk-MAOJENIB.js} +1 -1
  117. package/dist/{chunk-ZLGU4VYO.js → chunk-MEYYQC43.js} +5 -5
  118. package/dist/{chunk-7AINUMUA.js → chunk-MMFJBWJC.js} +1 -1
  119. package/dist/{chunk-MIZO6SQ3.js → chunk-MTXTJLFK.js} +2 -2
  120. package/dist/{chunk-BJKZYQFA.js → chunk-MXHEREC6.js} +3 -3
  121. package/dist/{chunk-BBYHBN3R.js → chunk-NHCRQ7SW.js} +1 -1
  122. package/dist/chunk-NID6MGGC.js +13 -0
  123. package/dist/{chunk-SLORZA7W.js → chunk-NMK4UQXZ.js} +12 -12
  124. package/dist/{chunk-QLAQ6ASB.js → chunk-NT26CWMZ.js} +5 -5
  125. package/dist/{chunk-GTKNEJ3X.js → chunk-NVE6L27I.js} +8 -8
  126. package/dist/{chunk-CQZEO4UV.js → chunk-NWP6IJYK.js} +9 -9
  127. package/dist/{chunk-AXQBQH55.js → chunk-OFOLUFNB.js} +15 -15
  128. package/dist/{chunk-LQHWFL5Y.js → chunk-OHVAD3NO.js} +2 -2
  129. package/dist/{chunk-IOESXYEI.js → chunk-OVVXSAGE.js} +8 -8
  130. package/dist/{chunk-Z4UKLPGE.js → chunk-PDXD6DT7.js} +1 -1
  131. package/dist/{chunk-ALYBCDHU.js → chunk-PNGL4ZW2.js} +6 -6
  132. package/dist/{chunk-2TBC254V.js → chunk-PNQ4EYYM.js} +3 -3
  133. package/dist/{chunk-JXGYIV44.js → chunk-PPFMXLEX.js} +9 -9
  134. package/dist/{chunk-IJICE6KT.js → chunk-Q3OCGLW7.js} +2 -2
  135. package/dist/{chunk-TSOBVLV5.js → chunk-QEV346OG.js} +1 -1
  136. package/dist/{chunk-D7AA5WE2.js → chunk-QFA5COE6.js} +1 -1
  137. package/dist/{chunk-ZI7P5YGF.js → chunk-QQCHLRKG.js} +1 -1
  138. package/dist/{chunk-XCHY6QVH.js → chunk-QQK3XS6H.js} +8 -8
  139. package/dist/{chunk-46M6AYFJ.js → chunk-R6DGLGB3.js} +1 -1
  140. package/dist/chunk-RGBX3EVC.js +11 -0
  141. package/dist/{chunk-GKTCCPME.js → chunk-RUQEB2ZC.js} +3 -3
  142. package/dist/{chunk-5LNFW5E4.js → chunk-RYBJ6MMM.js} +1 -1
  143. package/dist/{chunk-2RJKMYON.js → chunk-S7VSXUKS.js} +3 -3
  144. package/dist/{chunk-O3NLPJH2.js → chunk-SB7OTZI4.js} +19 -19
  145. package/dist/{chunk-5B73MLXV.js → chunk-SBHFEWR6.js} +1 -1
  146. package/dist/chunk-SG2MTCA2.js +100 -0
  147. package/dist/chunk-SXORVKIZ.js +9 -0
  148. package/dist/{chunk-CREVU3AF.js → chunk-TW7TA2AB.js} +1 -1
  149. package/dist/{chunk-JLPTSC66.js → chunk-TXS6JKFV.js} +1 -1
  150. package/dist/{chunk-DQB3ORB7.js → chunk-UB4BTRSB.js} +5 -5
  151. package/dist/{chunk-4ELYV3L6.js → chunk-UKB2I3UK.js} +1 -1
  152. package/dist/{chunk-XFIMTNUH.js → chunk-UVUBZL7K.js} +1 -1
  153. package/dist/{chunk-JGZLLQAN.js → chunk-UX6HNRFV.js} +7 -7
  154. package/dist/chunk-VTVOQS5L.js +20 -0
  155. package/dist/{chunk-V23TPYHO.js → chunk-VU6VPKM3.js} +6 -6
  156. package/dist/{chunk-WQKGBPOQ.js → chunk-WJ3XSJ6B.js} +1 -1
  157. package/dist/chunk-WSPO4N72.js +19 -0
  158. package/dist/{chunk-TJPPV7KZ.js → chunk-WTY3SXO7.js} +1 -1
  159. package/dist/{chunk-2IV4XF3Y.js → chunk-WYN5KVU4.js} +3 -3
  160. package/dist/chunk-X6PPP6NX.js +14 -0
  161. package/dist/{chunk-6DT7HG3F.js → chunk-XHBQPVNG.js} +1 -1
  162. package/dist/{chunk-5BBDUKQP.js → chunk-Y2D2YMFY.js} +12 -12
  163. package/dist/{chunk-ZVTOB4RE.js → chunk-Y4MI6NRI.js} +1 -1
  164. package/dist/{chunk-ZMLRNHMS.js → chunk-Y5T257HX.js} +3 -3
  165. package/dist/{chunk-FW2EEIDB.js → chunk-YCQVEJOT.js} +2 -2
  166. package/dist/{chunk-JACPHDTK.js → chunk-YDYDR72S.js} +1 -1
  167. package/dist/chunk-YSFLXPUS.js +7 -0
  168. package/dist/{chunk-BJEBOXTR.js → chunk-YW2DH6YQ.js} +3 -3
  169. package/dist/{chunk-U4QZIU7X.js → chunk-ZEKM6HAA.js} +2 -2
  170. package/dist/{chunk-352MVBF7.js → chunk-ZN3O2KJ7.js} +18 -18
  171. package/dist/chunk-ZNCU3UIW.js +8 -0
  172. package/dist/{chunk-FDENTKSM.js → chunk-ZNXBKFV7.js} +5 -5
  173. package/dist/{chunk-SRMRRJ5K.js → chunk-ZSRRV44J.js} +1 -1
  174. package/dist/{chunk-2JYQF3PJ.js → chunk-ZTB6EMC7.js} +1 -1
  175. package/dist/data/DataTable.js +1 -1
  176. package/dist/data/Kanban.js +1 -1
  177. package/dist/data/ListFooter.js +1 -1
  178. package/dist/data/ListLoadError.js +1 -1
  179. package/dist/data/Pagination.js +1 -1
  180. package/dist/file-intake/index.js +1 -1
  181. package/dist/forms/BorderInput.js +1 -1
  182. package/dist/forms/BrandAssetEditor.js +1 -1
  183. package/dist/forms/Calendar.js +1 -1
  184. package/dist/forms/ColorPicker.js +1 -1
  185. package/dist/forms/ComposerAttachments.js +1 -1
  186. package/dist/forms/CornersInput.js +1 -1
  187. package/dist/forms/DatePicker.js +1 -1
  188. package/dist/forms/DateRangePicker.js +1 -1
  189. package/dist/forms/DateTimePicker.js +1 -1
  190. package/dist/forms/DisplayChips.js +1 -1
  191. package/dist/forms/FilePicker.js +1 -1
  192. package/dist/forms/FormErrorSummary.js +1 -1
  193. package/dist/forms/IconPicker.js +1 -1
  194. package/dist/forms/ImageFocusPoint.js +1 -1
  195. package/dist/forms/InputNumber.js +1 -1
  196. package/dist/forms/LinkPicker.js +1 -1
  197. package/dist/forms/MediaLibrary.js +1 -1
  198. package/dist/forms/MediaUploadField.js +1 -1
  199. package/dist/forms/MediaUploadGrid.js +1 -1
  200. package/dist/forms/MediaUsedInList.js +1 -1
  201. package/dist/forms/NumericKeypad.js +1 -1
  202. package/dist/forms/PositionInput.js +1 -1
  203. package/dist/forms/Select.js +1 -1
  204. package/dist/forms/SidesInput.js +1 -1
  205. package/dist/forms/Slider.js +1 -1
  206. package/dist/forms/Snippet.js +1 -1
  207. package/dist/forms/TagInput.js +1 -1
  208. package/dist/forms/TextToolbar.js +1 -1
  209. package/dist/forms/TimePicker.js +1 -1
  210. package/dist/forms/WidthsBar.js +1 -1
  211. package/dist/forms/mediaLibraryMenu.js +1 -1
  212. package/dist/forms/mediaMoveItems.js +1 -1
  213. package/dist/forms/useFileIntake.js +1 -1
  214. package/dist/index.d.ts +18 -4
  215. package/dist/index.js +377 -377
  216. package/dist/locales/zh-Hans.js +1 -1
  217. package/dist/map/index.js +2 -2
  218. package/dist/page-tabs/index.js +5 -5
  219. package/dist/pdf/index.js +1 -1
  220. package/dist/shell/Accordion.js +1 -1
  221. package/dist/shell/AppUpdateBanner.js +1 -1
  222. package/dist/shell/Avatar.js +1 -1
  223. package/dist/shell/Banner.js +1 -1
  224. package/dist/shell/Breadcrumbs.js +1 -1
  225. package/dist/shell/BudgetBar.js +1 -1
  226. package/dist/shell/Card.js +1 -1
  227. package/dist/shell/ColoredBadge.js +1 -1
  228. package/dist/shell/ConfirmDialog.js +1 -1
  229. package/dist/shell/ContainerFillChart.js +1 -1
  230. package/dist/shell/CountBadge.js +1 -1
  231. package/dist/shell/Dialog.js +1 -1
  232. package/dist/shell/Drawer.js +1 -1
  233. package/dist/shell/EditableGrid.js +1 -1
  234. package/dist/shell/EmptyState.js +1 -1
  235. package/dist/shell/GlobalSearch.js +1 -1
  236. package/dist/shell/HelpCenter.js +1 -1
  237. package/dist/shell/IconRail.js +1 -1
  238. package/dist/shell/ImageLightbox.js +1 -1
  239. package/dist/shell/LanguageSelect.js +1 -1
  240. package/dist/shell/Markdown.js +1 -1
  241. package/dist/shell/MetricBar.js +1 -1
  242. package/dist/shell/MetricBarLegend.js +1 -1
  243. package/dist/shell/MilestoneTimeline.js +1 -1
  244. package/dist/shell/PageHeader.js +1 -1
  245. package/dist/shell/ProductionTimeline.js +1 -1
  246. package/dist/shell/ResizeHandle.js +1 -1
  247. package/dist/shell/Result.js +1 -1
  248. package/dist/shell/SearchableSelect.js +1 -1
  249. package/dist/shell/SettingReset.js +1 -1
  250. package/dist/shell/SettingRow.js +1 -1
  251. package/dist/shell/SidebarLayout.js +1 -1
  252. package/dist/shell/SidebarNav.js +1 -1
  253. package/dist/shell/SortableList.js +1 -1
  254. package/dist/shell/Statistic.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 +5 -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/{types-BOinJXUf.d.ts → types-ClT92-8Z.d.ts} +13 -1
  275. package/dist/ui/index.js +1 -1
  276. package/dist/version.js +1 -1
  277. package/package.json +1 -1
  278. package/dist/Calculator-DKZHOHOD.js +0 -29
  279. package/dist/PomodoroTimer-I423ZZOQ.js +0 -91
  280. package/dist/Sidebar-UVBEI4DQ.js +0 -43
  281. package/dist/chunk-6JCIQ7XL.js +0 -8
  282. package/dist/chunk-6UBBY54N.js +0 -2
  283. package/dist/chunk-B73YLHD2.js +0 -99
  284. package/dist/chunk-CPM3BQGV.js +0 -14
  285. package/dist/chunk-DSYIKLOK.js +0 -11
  286. package/dist/chunk-EUOFKZI3.js +0 -19
  287. package/dist/chunk-LVAGFIWK.js +0 -2
  288. package/dist/chunk-MWNZY33B.js +0 -13
  289. package/dist/chunk-NE42BDQX.js +0 -9
  290. package/dist/chunk-NHFLTKPK.js +0 -11
  291. package/dist/chunk-O5KDTFK5.js +0 -8
  292. package/dist/chunk-PMOGQHYX.js +0 -20
  293. package/dist/chunk-RPK3U2K2.js +0 -9
  294. package/dist/chunk-RPTQCFLR.js +0 -29
  295. package/dist/chunk-URFWJZTV.js +0 -7
  296. package/dist/chunk-VKMEQKYT.js +0 -1
  297. package/dist/chunk-W7NZKU27.js +0 -7
  298. package/dist/chunk-YPXVOPL4.js +0 -1
  299. package/dist/chunk-Z5TCGLCM.js +0 -8
@@ -1,7 +1,7 @@
1
- import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-VKMEQKYT.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(" "),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))},P=o(null),A=t=>e=>{P.current=t,e.currentTarget.setPointerCapture(e.pointerId)},E=t=>e=>{P.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))},K=t=>()=>{P.current===t&&(P.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:A(t),onPointerMove:E(t),onPointerUp:K(t),onPointerCancel:K(t)},t)};/* @__PURE__ */
1
+ import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-E6UCGCOC.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),C=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=C[C.length-1];r&&r.to===e-1?r.to=e:C.push({from:e,to:e})});const D=C.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(" "),F=(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(),F(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),F(t,o+r)),"Home"===e.key&&(e.preventDefault(),F(t,0)),"End"===e.key&&(e.preventDefault(),F(t,p))},P=o(null),A=t=>e=>{P.current=t,e.currentTarget.setPointerCapture(e.pointerId)},E=t=>e=>{P.current===t&&F(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))},L=t=>()=>{P.current===t&&(P.current=null)},N=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:A(t),onPointerMove:E(t),onPointerUp:L(t),onPointerCancel:L(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}),L("from"),L("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}),N("from"),N("to")]})})}export{a as ChartBrush};
@@ -1,18 +1,18 @@
1
- import{useShellStrings as e}from"./chunk-VKMEQKYT.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:r,getInstructionVolume:i,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:g=e=>e.actual_qty,isFilled:h,isNew:o=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,y=h?s.filter(h):s,N=e=>n(u(e)),b=e=>n(g(e)),w=y.some(e=>null!=g(e)&&b(e)>0),v=e=>w?N(e):"actual"===m?g(e)??u(e)??0:u(e)??0,M=y.reduce((e,t)=>e+n(v(t)),0),$=y.filter(e=>o(e)).length,V=y.filter(e=>o(e)).reduce((e,t)=>e+n(v(t)),0),j=y.reduce((e,t)=>e+N(t),0),k=y.reduce((e,t)=>e+b(t),0),I=e=>r?.(e)??0,q=i??(e=>I(e)*N(e)),A=c??(e=>I(e)*b(e)),Q=y.reduce((e,t)=>e+q(t),0),F=y.reduce((e,t)=>e+A(t),0),K=w?Math.max(Q,F):"actual"===m&&F||Q,_=K<=34.65?"20ft":"40ft",B="20ft"===_?33:67,E=K>0?Math.max(1,Math.ceil(K/B)):0,S=E*B,T=K>0&&K>=.95*S&&K<=1.1*S;if(0===y.length)return null;const Y=(e,t)=>B>0?Math.max(0,Math.min((e-t*B)/B*100,100)):0;/* @__PURE__ */
1
+ import{useShellStrings as e}from"./chunk-E6UCGCOC.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:r,getInstructionVolume:i,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:g=e=>e.actual_qty,isFilled:h,isNew:o=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,y=h?s.filter(h):s,N=e=>n(u(e)),b=e=>n(g(e)),w=y.some(e=>null!=g(e)&&b(e)>0),v=e=>w?N(e):"actual"===m?g(e)??u(e)??0:u(e)??0,M=y.reduce((e,t)=>e+n(v(t)),0),$=y.filter(e=>o(e)).length,j=y.filter(e=>o(e)).reduce((e,t)=>e+n(v(t)),0),k=y.reduce((e,t)=>e+N(t),0),I=y.reduce((e,t)=>e+b(t),0),V=e=>r?.(e)??0,q=i??(e=>V(e)*N(e)),A=c??(e=>V(e)*b(e)),C=y.reduce((e,t)=>e+q(t),0),F=y.reduce((e,t)=>e+A(t),0),Q=w?Math.max(C,F):"actual"===m&&F||C,_=Q<=34.65?"20ft":"40ft",B="20ft"===_?33:67,E=Q>0?Math.max(1,Math.ceil(Q/B)):0,G=E*B,O=Q>0&&Q>=.95*G&&Q<=1.1*G;if(0===y.length)return null;const S=(e,t)=>B>0?Math.max(0,Math.min((e-t*B)/B*100,100)):0;/* @__PURE__ */
2
2
  return t("div",{className:`mt-2 px-1 space-y-2 ${x??""}`.trim(),style:f,children:[
3
3
  /* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[
4
- /* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&j!==k&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(j,k)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
5
- /* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,V)]})]}),K>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:E}).map((e,l)=>{const n=Y(Q,l),s=Y(F,l),r=w,i=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=r?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=r?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
4
+ /* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&k!==I&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(k,I)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
5
+ /* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,j)]})]}),Q>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:E}).map((e,l)=>{const n=S(C,l),s=S(F,l),r=w,i=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=r?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=r?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
6
6
  return t("div",{className:"flex items-center gap-2",children:[
7
7
  /* @__PURE__ */a("span",{className:"text-2xs text-gray-400 w-8 shrink-0",children:_}),
8
8
  /* @__PURE__ */t("div",{className:"relative flex-1 h-4 bg-gray-100 rounded-full overflow-hidden border border-gray-200",children:[
9
9
  /* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${d} transition-all`,style:{width:`${i}%`}}),r&&c>0&&/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${u} transition-all`,style:{width:`${c}%`}})]}),
10
- /* @__PURE__ */a("span",{className:"text-2xs text-gray-500 w-16 text-right",children:r?p.fill(Math.min(F-l*B,B),B):p.fill(Math.min(Q-l*B,B),B)})]},`bar-${l}`)}),
10
+ /* @__PURE__ */a("span",{className:"text-2xs text-gray-500 w-16 text-right",children:r?p.fill(Math.min(F-l*B,B),B):p.fill(Math.min(C-l*B,B),B)})]},`bar-${l}`)}),
11
11
  /* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs pt-0.5",children:[
12
12
  /* @__PURE__ */t("span",{className:"text-gray-500 inline-flex items-center gap-1",children:[p.total,w?/* @__PURE__ */t(l,{children:[
13
13
  /* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-blue-700",children:[
14
- /* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(Q)]}),
14
+ /* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(C)]}),
15
15
  /* @__PURE__ */a("span",{className:"text-gray-400",children:"/"}),
16
16
  /* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-green-700",children:[
17
- /* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(F)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(K)})]}),
18
- /* @__PURE__ */t("span",{className:"font-medium "+(T?"text-green-600":"text-gray-500"),children:[T&&"✓ ",E," × ",_]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
17
+ /* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(F)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(Q)})]}),
18
+ /* @__PURE__ */t("span",{className:"font-medium "+(O?"text-green-600":"text-gray-500"),children:[O&&"✓ ",E," × ",_]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
@@ -1,3 +1,3 @@
1
- import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
2
2
  return n(e,t?{name:"check",className:`${r} text-green-600`,"aria-hidden":"true"}:{name:"copy",className:r,"aria-hidden":"true"})}function m({text:e}){const{copied:r,copy:o}=a(e),c=t().copy;/* @__PURE__ */
3
3
  return n("button",{onClick:o,title:r?c.copiedValue:c.copyValue(e),className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */n(u,{copied:r})})}export{m as CopyButton,u as CopyGlyph,a as useCopyText};
@@ -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-VKMEQKYT.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(),K=s(null),j=s(!1),{x:k,y:C}=e(d),P=t(k,C),$=e=>{e!==d&&m(e)},T=(e,a)=>{const n=K.current?.getBoundingClientRect();if(!n)return;const o=r(n,e,a);$(t(o.x,o.y))},D=()=>{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 R=void 0===h,Y=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-E6UCGCOC.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(),C=s(null),j=s(!1),{x:k,y:P}=e(d),K=t(k,P),$=e=>{e!==d&&m(e)},D=(e,a)=>{const n=C.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,G=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,P),"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,T(e.clientX,e.clientY))},onPointerMove:e=>{j.current&&!b&&T(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:K,"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}),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:C,"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}}),
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
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}})]})}),Y||x?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",Y?{id:R?w:void 0,className:"min-w-0 flex-1 text-xs text-gray-500",children:R?N.hint:h}:{className:"min-w-0 flex-1"}),x]}):null,!R&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
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:`${P}%`,...u}})]})}),G||x?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",G?{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};
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-CJKDYVNE.js";import{Avatar as r}from"./chunk-7AINUMUA.js";import{Button_default as t}from"./chunk-4IU5BSVE.js";import{useState as a}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],n=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function d(){const[d,c]=a(1),o=n.find(e=>e.id===d)??n[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-KKSW5IZ7.js";import{Avatar as r}from"./chunk-MMFJBWJC.js";import{Button_default as t}from"./chunk-4IU5BSVE.js";import{useState as a}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],n=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function d(){const[d,c]=a(1),o=n.find(e=>e.id===d)??n[0];/* @__PURE__ */
2
2
  return i("div",{className:"h-full",children:/* @__PURE__ */i(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */l("div",{className:"flex h-full flex-col p-2",children:[
3
3
  /* @__PURE__ */i(t,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,r)=>/* @__PURE__ */l("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===r?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
4
4
  /* @__PURE__ */i("span",{children:e.label}),null!=e.count&&/* @__PURE__ */i("span",{className:"text-xs text-gray-400",children:e.count})]},e.id))]}),children:/* @__PURE__ */l("div",{className:"flex h-full",children:[
@@ -1,23 +1,23 @@
1
- import{Calendar as e,fromKey as t}from"./chunk-KFSNSDTW.js";import{calendarNames as r}from"./chunk-5OTS2G3M.js";import{FILTER_ON as n,FILTER_ON_INK as a,FILTER_OFF as o}from"./chunk-JFSYWEHD.js";import{buttonClasses as l}from"./chunk-K7U4RWXJ.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useDropdownPosition as c}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as m}from"./chunk-D65T4H6J.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as p,useShellLocale as h}from"./chunk-VKMEQKYT.js";import{useState as f,useRef as g,useId as b,useEffect as x}from"react";import{createPortal as y}from"react-dom";import{jsxs as v,Fragment as w,jsx as N}from"react/jsx-runtime";var k=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],M=e=>`${e.getFullYear()}-${C(e.getMonth()+1)}`,C=e=>String(e).padStart(2,"0");function $(e){return`${e.getFullYear()}-${C(e.getMonth()+1)}-${C(e.getDate())}`}function D(e,t){const r=t.getFullYear(),n=t.getMonth(),a=new Date(r,n,t.getDate()),o=new Date(r,n,0),l=e=>new Date(r,n-e,1);switch(e){case"last2Weeks":return{from:$(new Date(r,n,t.getDate()-14)),to:$(a)};case"lastMonth":return{from:$(l(1)),to:$(o)};case"last3Months":return{from:$(l(3)),to:$(o)};case"last6Months":return{from:$(l(6)),to:$(o)};case"last12Months":return{from:$(l(12)),to:$(o)}}}function W(e,t,r){const n=M(e);return t&&n<t.slice(0,7)?t.slice(0,7):r&&n>r.slice(0,7)?r.slice(0,7):n}function j(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}function S(e){const[t,r,n]=e.split("-");return t&&r&&n?`${n}/${r}/${t}`:e}var F=/* @__PURE__ */new Map;function T({from:C,to:$,onChange:T,formatDisplay:O,clearable:R,required:Y=!1,name:E,id:H,"aria-labelledby":J,"aria-label":L,weekStartsOn:B,placeholder:K,fullWidth:G=!1,min:I,max:U,disabled:q=!1,allowOpenEnd:A=!1}){const V=p().dateRange,z=h(),P=O??(z?function(e){let t=F.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),F.set(e,t));const r=t;return e=>{const[t,n,a]=e.split("-").map(Number);return t&&n&&a?r.format(new Date(Date.UTC(t,n-1,a))):e}}(z):S),Q=K??V.placeholder,X=R??!Y,[Z,_]=f(!1),[ee,te]=f(C),[re,ne]=f($),[ae,oe]=f(null),[le,ie]=f("from"),se=g(null),de=g(null),ce=g(null),me=b(),ue=b(),pe=b(),[he,fe]=f(!1),ge=c(se,Z,{preferredMaxWidth:520,preferredMaxHeight:he?720:560,popupRef:ce}),be=g(null),xe=g(null),[ye,ve]=f(!0);m(()=>{const e=xe.current;if(!Z||!he||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&ve(a)});const we=g(null);m(()=>{const e=ce.current;if(!Z||!ge||!e)return;const t=getComputedStyle(e),r=ge.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(he)null!==we.current&&we.current<=r&&fe(!1);else{const e=be.current?.offsetWidth??0;if(0===e)return;we.current=e,e>r+.5&&fe(!0)}});const[Ne,ke]=f(!1);m(()=>{const e=!!H&&(de.current?.labels?.length??0)>0;e!==Ne&&ke(e)});const Me=!!L||!!J||Ne,Ce=/* @__PURE__ */new Date,[$e,De]=f(()=>C?M(j(C)):W(Ce,I,U)),We=k.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(D(e,Ce),I,U)),je=e=>e?P(e):"";x(()=>{if(!Z)return;const e=e=>{const t=e.target;se.current?.contains(t)||ce.current?.contains(t)||_(!1)};document.addEventListener("mousedown",e);const t=s(()=>_(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[Z]),x(()=>{q&&_(!1)},[q]);const Se=()=>{T("",""),_(!1)},Fe=C&&$?`${je(C)} — ${je($)}`:C?V.fromOnly(je(C)):$?V.toOnly(je($)):"",Te=r(z),Oe=e=>{const r=t(e);return r?Te.longDate(r.getFullYear(),r.getMonth(),r.getDate()):e},Re=C&&$?V.range(Oe(C),Oe($)):C?V.fromOnly(Oe(C)):$?V.toOnly(Oe($)):Q,Ye=e=>he?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(ae===e?"border-blue-300 bg-blue-50 text-blue-700 font-medium":"border-gray-200 text-gray-700 hover:bg-gray-50"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(ae===e?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),Ee=/* @__PURE__ */v(w,{children:[We.map(e=>/* @__PURE__ */N("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=D(e,Ce);te(t.from),ne(t.to),oe(e),De(t.from.slice(0,7))})(e),className:Ye(e),"aria-label":he?V[e]:void 0,children:he?ye?V[e]:V[`${e}Short`]:V[e]},e)),
2
- /* @__PURE__ */N("button",{type:"button",onClick:()=>oe("Custom"),className:Ye("Custom"),children:V.custom})]}),He=(e,t)=>A?/* @__PURE__ */N("button",{type:"button","data-range-end":e,"aria-pressed":le===e,onClick:()=>ie(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */N("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Je=e=>A&&le===e?" ring-1 ring-blue-400":"",Le=
3
- /* @__PURE__ */N(e,{mode:"range",min:I,max:U,value:ee||null,endValue:re||null,month:$e,onMonthChange:De,onSelect:e=>{oe("Custom"),A?"from"===le?(re&&e>re?(te(re),ne(e)):te(e),ie("to")):ee&&e<ee?(ne(ee),te(e)):ne(e):!ee||ee&&re?(te(e),ne("")):e<ee?(ne(ee),te(e)):ne(e)},weekStartsOn:B,"aria-label":V.dialog});/* @__PURE__ */
4
- return v("div",{className:"relative"+(G?" w-full":""),ref:se,children:[
5
- /* @__PURE__ */v("div",{className:`${G?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${C||$?`${n} ${a}`:o}${q?" cursor-not-allowed opacity-60":""}`,children:[
6
- /* @__PURE__ */v("button",{ref:de,type:"button",onClick:()=>{q||(te(C),ne($),oe(null),ie(C&&!$?"to":"from"),De(C?M(j(C)):W(Ce,I,U)),_(!0))},"aria-haspopup":"dialog","aria-expanded":Z,id:H,disabled:q||void 0,"aria-label":L,"aria-labelledby":J,"aria-describedby":[Me?ue:void 0,Y?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":Z?me:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(G?" min-w-0 flex-1 justify-start":""),children:[
1
+ import{Calendar as e,fromKey as t}from"./chunk-3V5Z2BJY.js";import{calendarNames as r}from"./chunk-5OTS2G3M.js";import{FILTER_ON as n,FILTER_ON_INK as a,FILTER_OFF as o}from"./chunk-JFSYWEHD.js";import{buttonClasses as l}from"./chunk-K7U4RWXJ.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useDropdownPosition as c}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as m}from"./chunk-D65T4H6J.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as p,useShellLocale as h}from"./chunk-E6UCGCOC.js";import{useState as f,useRef as g,useId as b,useEffect as x}from"react";import{createPortal as y}from"react-dom";import{jsxs as v,Fragment as w,jsx as N}from"react/jsx-runtime";var k=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],C=e=>`${e.getFullYear()}-${M(e.getMonth()+1)}`,M=e=>String(e).padStart(2,"0");function $(e){return`${e.getFullYear()}-${M(e.getMonth()+1)}-${M(e.getDate())}`}function D(e,t){const r=t.getFullYear(),n=t.getMonth(),a=new Date(r,n,t.getDate()),o=new Date(r,n,0),l=e=>new Date(r,n-e,1);switch(e){case"last2Weeks":return{from:$(new Date(r,n,t.getDate()-14)),to:$(a)};case"lastMonth":return{from:$(l(1)),to:$(o)};case"last3Months":return{from:$(l(3)),to:$(o)};case"last6Months":return{from:$(l(6)),to:$(o)};case"last12Months":return{from:$(l(12)),to:$(o)}}}function W(e,t,r){const n=C(e);return t&&n<t.slice(0,7)?t.slice(0,7):r&&n>r.slice(0,7)?r.slice(0,7):n}function j(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}function S(e){const[t,r,n]=e.split("-");return t&&r&&n?`${n}/${r}/${t}`:e}var F=/* @__PURE__ */new Map;function O({from:M,to:$,onChange:O,formatDisplay:T,clearable:J,required:R=!1,name:Y,id:B,"aria-labelledby":E,"aria-label":H,weekStartsOn:L,placeholder:G,fullWidth:U=!1,min:I,max:q,disabled:A=!1,allowOpenEnd:K=!1}){const V=p().dateRange,Z=h(),z=T??(Z?function(e){let t=F.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),F.set(e,t));const r=t;return e=>{const[t,n,a]=e.split("-").map(Number);return t&&n&&a?r.format(new Date(Date.UTC(t,n-1,a))):e}}(Z):S),P=G??V.placeholder,X=J??!R,[Q,_]=f(!1),[ee,te]=f(M),[re,ne]=f($),[ae,oe]=f(null),[le,ie]=f("from"),se=g(null),de=g(null),ce=g(null),me=b(),ue=b(),pe=b(),[he,fe]=f(!1),ge=c(se,Q,{preferredMaxWidth:520,preferredMaxHeight:he?720:560,popupRef:ce}),be=g(null),xe=g(null),[ye,ve]=f(!0);m(()=>{const e=xe.current;if(!Q||!he||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&ve(a)});const we=g(null);m(()=>{const e=ce.current;if(!Q||!ge||!e)return;const t=getComputedStyle(e),r=ge.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(he)null!==we.current&&we.current<=r&&fe(!1);else{const e=be.current?.offsetWidth??0;if(0===e)return;we.current=e,e>r+.5&&fe(!0)}});const[Ne,ke]=f(!1);m(()=>{const e=!!B&&(de.current?.labels?.length??0)>0;e!==Ne&&ke(e)});const Ce=!!H||!!E||Ne,Me=/* @__PURE__ */new Date,[$e,De]=f(()=>M?C(j(M)):W(Me,I,q)),We=k.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(D(e,Me),I,q)),je=e=>e?z(e):"";x(()=>{if(!Q)return;const e=e=>{const t=e.target;se.current?.contains(t)||ce.current?.contains(t)||_(!1)};document.addEventListener("mousedown",e);const t=s(()=>_(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[Q]),x(()=>{A&&_(!1)},[A]);const Se=()=>{O("",""),_(!1)},Fe=M&&$?`${je(M)} — ${je($)}`:M?V.fromOnly(je(M)):$?V.toOnly(je($)):"",Oe=r(Z),Te=e=>{const r=t(e);return r?Oe.longDate(r.getFullYear(),r.getMonth(),r.getDate()):e},Je=M&&$?V.range(Te(M),Te($)):M?V.fromOnly(Te(M)):$?V.toOnly(Te($)):P,Re=e=>he?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(ae===e?"border-blue-300 bg-blue-50 text-blue-700 font-medium":"border-gray-200 text-gray-700 hover:bg-gray-50"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(ae===e?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),Ye=/* @__PURE__ */v(w,{children:[We.map(e=>/* @__PURE__ */N("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=D(e,Me);te(t.from),ne(t.to),oe(e),De(t.from.slice(0,7))})(e),className:Re(e),"aria-label":he?V[e]:void 0,children:he?ye?V[e]:V[`${e}Short`]:V[e]},e)),
2
+ /* @__PURE__ */N("button",{type:"button",onClick:()=>oe("Custom"),className:Re("Custom"),children:V.custom})]}),Be=(e,t)=>K?/* @__PURE__ */N("button",{type:"button","data-range-end":e,"aria-pressed":le===e,onClick:()=>ie(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */N("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Ee=e=>K&&le===e?" ring-1 ring-blue-400":"",He=
3
+ /* @__PURE__ */N(e,{mode:"range",min:I,max:q,value:ee||null,endValue:re||null,month:$e,onMonthChange:De,onSelect:e=>{oe("Custom"),K?"from"===le?(re&&e>re?(te(re),ne(e)):te(e),ie("to")):ee&&e<ee?(ne(ee),te(e)):ne(e):!ee||ee&&re?(te(e),ne("")):e<ee?(ne(ee),te(e)):ne(e)},weekStartsOn:L,"aria-label":V.dialog});/* @__PURE__ */
4
+ return v("div",{className:"relative"+(U?" w-full":""),ref:se,children:[
5
+ /* @__PURE__ */v("div",{className:`${U?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${M||$?`${n} ${a}`:o}${A?" cursor-not-allowed opacity-60":""}`,children:[
6
+ /* @__PURE__ */v("button",{ref:de,type:"button",onClick:()=>{A||(te(M),ne($),oe(null),ie(M&&!$?"to":"from"),De(M?C(j(M)):W(Me,I,q)),_(!0))},"aria-haspopup":"dialog","aria-expanded":Q,id:B,disabled:A||void 0,"aria-label":H,"aria-labelledby":E,"aria-describedby":[Ce?ue:void 0,R?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":Q?me:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(U?" min-w-0 flex-1 justify-start":""),children:[
7
7
  /* @__PURE__ */N(i,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
8
- /* @__PURE__ */N("span",{className:"truncate",children:Fe||Q})]}),X&&!q&&(C||$)&&/* @__PURE__ */N("button",{type:"button",onClick:Se,"aria-label":V.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Me&&/* @__PURE__ */N("span",{id:ue,className:"sr-only",children:Re}),Y&&/* @__PURE__ */N("span",{id:pe,className:"sr-only",children:V.required}),E&&/* @__PURE__ */v(w,{children:[
9
- /* @__PURE__ */N("input",{type:"hidden",name:E.from,value:C,disabled:q||void 0}),
10
- /* @__PURE__ */N("input",{type:"hidden",name:E.to,value:$,disabled:q||void 0})]}),Z&&y(
8
+ /* @__PURE__ */N("span",{className:"truncate",children:Fe||P})]}),X&&!A&&(M||$)&&/* @__PURE__ */N("button",{type:"button",onClick:Se,"aria-label":V.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Ce&&/* @__PURE__ */N("span",{id:ue,className:"sr-only",children:Je}),R&&/* @__PURE__ */N("span",{id:pe,className:"sr-only",children:V.required}),Y&&/* @__PURE__ */v(w,{children:[
9
+ /* @__PURE__ */N("input",{type:"hidden",name:Y.from,value:M,disabled:A||void 0}),
10
+ /* @__PURE__ */N("input",{type:"hidden",name:Y.to,value:$,disabled:A||void 0})]}),Q&&y(
11
11
  /* @__PURE__ */v("div",{ref:ce,id:me,role:"dialog","aria-label":V.dialog,"data-layout":he?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:d.popup,left:ge?.left,right:ge?.right,top:ge?.top,bottom:ge?.bottom,width:he&&ge?ge.maxWidth:"max-content",maxWidth:ge?.maxWidth,maxHeight:ge?.maxHeight,overflowY:"auto",visibility:ge?void 0:"hidden",...u()},children:[
12
- /* @__PURE__ */v("div",{className:he?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[He("from",/* @__PURE__ */v(w,{children:[
12
+ /* @__PURE__ */v("div",{className:he?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Be("from",/* @__PURE__ */v(w,{children:[
13
13
  /* @__PURE__ */N("span",{className:"text-xs font-medium text-gray-500",children:V.from}),
14
- /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Je("from")}`,children:ee?je(ee):V.start})]})),!he&&/* @__PURE__ */N("span",{className:"text-gray-300",children:"—"}),He("to",/* @__PURE__ */v(w,{children:[
14
+ /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Ee("from")}`,children:ee?je(ee):V.start})]})),!he&&/* @__PURE__ */N("span",{className:"text-gray-300",children:"—"}),Be("to",/* @__PURE__ */v(w,{children:[
15
15
  /* @__PURE__ */N("span",{className:"text-xs font-medium text-gray-500",children:V.to}),
16
- /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${re?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Je("to")}`,children:re?je(re):V.end})]}))]}),he?/* @__PURE__ */v(w,{children:[We.length>0&&/* @__PURE__ */v("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */N("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-gray-500",children:V.lastHeading}),
17
- /* @__PURE__ */v("div",{ref:xe,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Ee,We.map(e=>/* @__PURE__ */N("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:V[e]},e))]})]}),
18
- /* @__PURE__ */N("div",{className:"w-full",children:Le})]}):
16
+ /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${re?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Ee("to")}`,children:re?je(re):V.end})]}))]}),he?/* @__PURE__ */v(w,{children:[We.length>0&&/* @__PURE__ */v("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */N("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-gray-500",children:V.lastHeading}),
17
+ /* @__PURE__ */v("div",{ref:xe,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Ye,We.map(e=>/* @__PURE__ */N("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:V[e]},e))]})]}),
18
+ /* @__PURE__ */N("div",{className:"w-full",children:He})]}):
19
19
  /* @__PURE__ */v("div",{ref:be,className:"flex w-max gap-4",children:[
20
- /* @__PURE__ */N("div",{className:"w-64",children:Le}),We.length>0&&/* @__PURE__ */N("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Ee})]}),
20
+ /* @__PURE__ */N("div",{className:"w-64",children:He}),We.length>0&&/* @__PURE__ */N("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Ye})]}),
21
21
  /* @__PURE__ */v("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[X&&/* @__PURE__ */N("button",{type:"button",onClick:Se,className:l({variant:"ghost"}),children:V.clear}),
22
22
  /* @__PURE__ */N("button",{type:"button",onClick:()=>_(!1),className:l({variant:"secondary"}),children:V.cancel}),
23
- /* @__PURE__ */N("button",{type:"button",onClick:()=>{T(ee,re),_(!1)},disabled:A?!ee&&!re:!ee||!re,className:l({variant:"primary"}),children:V.apply})]})]}),document.body)]})}export{T as DateRangePicker,D as presetRange,$ as toISODate};
23
+ /* @__PURE__ */N("button",{type:"button",onClick:()=>{O(ee,re),_(!1)},disabled:K?!ee&&!re:!ee||!re,className:l({variant:"primary"}),children:V.apply})]})]}),document.body)]})}export{O as DateRangePicker,D as presetRange,$ as toISODate};
@@ -1,4 +1,4 @@
1
- import{InputNumber_default as e}from"./chunk-MIZO6SQ3.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{Icon as a}from"./chunk-KIBL6M3T.js";import{Tooltip as i}from"./chunk-22S6LG6D.js";import{useShellStrings as n}from"./chunk-VKMEQKYT.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:j,id:A,className:K=""}){const M=n(),N=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[C,D]=l(0),I=o(null);/* @__PURE__ */
2
- return t("div",{id:A,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${K}`.trim(),children:[v&&
3
- /* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:M.corners.radiusMark}),suffix:M.corners.unit,steppers:"compact",disabled:y,"aria-label":b??M.corners.radius})}),
4
- /* @__PURE__ */s("div",{ref:I,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(I.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:N.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?j:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===C?0:-1,onFocus:()=>D(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
1
+ import{InputNumber_default as e}from"./chunk-MTXTJLFK.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{Icon as a}from"./chunk-KIBL6M3T.js";import{Tooltip as i}from"./chunk-22S6LG6D.js";import{useShellStrings as n}from"./chunk-E6UCGCOC.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:C,id:j,className:A=""}){const K=n(),M=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[N,L]=l(0),D=o(null);/* @__PURE__ */
2
+ return t("div",{id:j,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
3
+ /* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:K.corners.radiusMark}),suffix:K.corners.unit,steppers:"compact",disabled:y,"aria-label":b??K.corners.radius})}),
4
+ /* @__PURE__ */s("div",{ref:D,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(D.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:M.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?C:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===N?0:-1,onFocus:()=>L(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
@@ -0,0 +1,11 @@
1
+ import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as n}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-E6UCGCOC.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:C=2}){const N=i().charts,U=a(),j=$??(e=>o(e,U)),z=b??N.intensity,D=w??N.noActivity,F=h(null),R=t(F),S=g??R,B=c(),[E,G]=s(null);if(m(()=>{if(null!==E)return n(e=>"Escape"===e.key&&(G(null),!0))},[E]),0===x.length||0===d.length)/* @__PURE__ */
2
+ return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:D})});const L=y??l(0),O=v??Math.max(1,...p.flat().filter(Number.isFinite)),T=96,V=26*x.length,I=M??V+26+26,P=Math.max(2,(Math.max(97,S)-T)/d.length),Q=e=>{const t=O>0?Math.max(0,Math.min(1,e/O)):0;return`color-mix(in oklab, ${L} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
3
+ return u("div",{className:`relative ${k??""}`,ref:F,children:[
4
+ /* @__PURE__ */u("svg",{width:"100%",height:I,viewBox:`0 0 ${S} ${I}`,role:"img","aria-label":N.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>G(null),onBlur:()=>G(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),G(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
5
+ /* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:B,x1:"0",x2:"1",children:[
6
+ /* @__PURE__ */f("stop",{offset:"0",stopColor:Q(0)}),
7
+ /* @__PURE__ */f("stop",{offset:"1",stopColor:Q(O)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:r.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=E&&(E.r!==t||E.c!==r);/* @__PURE__ */
8
+ return f("rect",{x:T+r*P+A/2,y:26*t+A/2,width:Math.max(1,P-A),height:26-A,rx:C,fill:Q(n),opacity:i?.55:1,onMouseEnter:()=>G({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${j(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((S-T)/56))))===0?/* @__PURE__ */f("text",{x:T+t*P+P/2,y:V+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
9
+ /* @__PURE__ */f("rect",{x:T,y:V+26,width:Math.min(180,Math.max(40,S-T)),height:8,rx:4,fill:`url(#${B})`}),
10
+ /* @__PURE__ */f("text",{x:T,y:V+48,fontSize:11,fill:r.label,children:"0"}),
11
+ /* @__PURE__ */f("text",{x:T+Math.min(180,Math.max(40,S-T)),y:V+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:j(O)})]}),E&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[E.r]} · ${d[E.c]}`,rows:[{key:"v",label:z,color:L,value:null==p[E.r]?.[E.c]?void 0:j(p[E.r][E.c])}]})})]})}export{x as HeatmapChart};
@@ -1,4 +1,4 @@
1
- import{Button_default as e}from"./chunk-4IU5BSVE.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
1
+ import{Button_default as e}from"./chunk-4IU5BSVE.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
2
2
  return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
3
3
  /* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
4
4
  /* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as r}from"./chunk-VKMEQKYT.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as r}from"./chunk-E6UCGCOC.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check",...t});case"error":/* @__PURE__ */
3
3
  return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
4
4
  return n(e,{name:"error",...t});default:/* @__PURE__ */
@@ -0,0 +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-E6UCGCOC.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:C="center",children:R,overlay:E,tooltip:U,onSelect:z,ariaLabel:D,className:L,emptyLabel:P}){const F=s().charts,I=c(),S=$??(t=>m(t,I)),T=P??F.noData,V=d(null),W=o(V),B=k??W,[G,O]=u(null),Q=f();if(x(()=>{if(null!==G)return h(t=>"Escape"===t.key&&(O(null),!0))},[G]),0===y.length||!v.some(Number.isFinite))/* @__PURE__ */
2
+ return g("div",{className:L,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),H=Z.every(Number.isInteger),J=void 0===w&&void 0===N?e(Math.min(0,...Z),Math.max(0,...Z),{intervals:A+1,integer:H}):null,K=void 0!==w&&void 0===N?e(w,Math.max(w,...Z),{intervals:A+1,integer:H,zero:!1}):null,X=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?[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 ${L??""}`,ref:V,children:[
4
+ /* @__PURE__ */p("svg",{width:"100%",height:b,viewBox:`0 0 ${B} ${b}`,role:"img","aria-label":D,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>O(null),onBlur:()=>O(null),onKeyDown:t=>{if(z&&null!==G&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void z(G);if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const e="ArrowRight"===t.key?1:-1;O(t=>Math.min(y.length-1,Math.max(0,(t??0)+e)))},children:[
5
+ /* @__PURE__ */g("defs",{children:/* @__PURE__ */g("clipPath",{id:Q,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(#${Q})`,children:R({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:B,height:b,clipId:Q,active:G})}),E?.({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:B,height:b,clipId:Q,active:G}),y.map((t,e)=>e%ht===0?/* @__PURE__ */g("text",{x:"start"===C?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:()=>O(e),onClick:z?()=>z(e):void 0,style:z?{cursor:"pointer"}:void 0},`h${e}`))]}),U&&null!==G&&
8
+ /* @__PURE__ */g("div",{className:"pointer-events-none absolute top-2 z-10",style:t(lt.center(G),lt.bandwidth,B),children:U(G)})]})}export{y as CartesianPlot};
@@ -0,0 +1,2 @@
1
+ import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as o}from"./chunk-I4VD5D43.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-E6UCGCOC.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const C=e().charts,v=i(),w=d??(t=>Number.isInteger(t)?m(t,v):n(t,1,v)),A=x??(t=>m(t,v)),L=g??C.countAxis,M=k??C.distribution,N=h??r(c??[],s),O=a(0,b,f),U=N.map(t=>w(t.from)),I=N.map(t=>t.count);/* @__PURE__ */
2
+ return l(o,{labels:U,values:I,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:A,yAxisLabel:L,className:y,emptyLabel:j,ariaLabel:C.histogram(M,N.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${w(N[o].from)} – ${w(N[o].to)}`,rows:[{key:"count",label:C.observations,color:O,value:A(N[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:N.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:O,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
@@ -1,4 +1,4 @@
1
- import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";var o={403:t=>({title:t.forbidden,body:t.forbiddenBody}),404:t=>({title:t.notFound,body:t.notFoundBody}),500:t=>({title:t.serverError,body:t.serverErrorBody})};function i({code:i=404,actions:n}){const d=o[i](t().errors);/* @__PURE__ */
1
+ import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";var o={403:t=>({title:t.forbidden,body:t.forbiddenBody}),404:t=>({title:t.notFound,body:t.notFoundBody}),500:t=>({title:t.serverError,body:t.serverErrorBody})};function i({code:i=404,actions:n}){const d=o[i](t().errors);/* @__PURE__ */
2
2
  return e("div",{className:"flex h-full flex-col items-center justify-center bg-gray-50 p-6 text-center",children:[
3
3
  /* @__PURE__ */r("div",{className:"text-7xl font-bold tracking-tight text-gray-400",children:i}),
4
4
  /* @__PURE__ */r("h1",{className:"mt-2 text-xl font-semibold text-gray-900",children:d.title}),
@@ -1,4 +1,4 @@
1
- import{Banner as e}from"./chunk-TJPPV7KZ.js";import{Button_default as t}from"./chunk-4IU5BSVE.js";import{useShellStrings as n}from"./chunk-VKMEQKYT.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
1
+ import{Banner as e}from"./chunk-WTY3SXO7.js";import{Button_default as t}from"./chunk-4IU5BSVE.js";import{useShellStrings as n}from"./chunk-E6UCGCOC.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
2
2
  return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
3
3
  /* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
4
4
  /* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-V23TPYHO.js";import{Input_default as t}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as l}from"./chunk-CGZBDI6C.js";import{Button_default as a}from"./chunk-4IU5BSVE.js";import{useState as i}from"react";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";var o={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function m({mode:m="login"}){const[u,d]=i(!0),h=o[m];/* @__PURE__ */
1
+ import{Card as e}from"./chunk-VU6VPKM3.js";import{Input_default as t}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as l}from"./chunk-CGZBDI6C.js";import{Button_default as a}from"./chunk-4IU5BSVE.js";import{useState as i}from"react";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";var o={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function m({mode:m="login"}){const[u,d]=i(!0),h=o[m];/* @__PURE__ */
2
2
  return c("div",{className:"flex h-full items-center justify-center overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */n("div",{className:"w-full max-w-sm",children:[
3
3
  /* @__PURE__ */n("div",{className:"mb-6 text-center",children:[
4
4
  /* @__PURE__ */c("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-blue-600 text-sm font-bold text-white",children:"A"}),
@@ -1,4 +1,4 @@
1
- import{Segmented as e}from"./chunk-N6DTTOB6.js";import{ColorPicker as t}from"./chunk-5EK4DFB5.js";import{InputNumber_default as l}from"./chunk-MIZO6SQ3.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{jsxs as a,Fragment as o,jsx as s}from"react/jsx-runtime";var i=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */s(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */s(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */s(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */s(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */s(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */s(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */s(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */s(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const j=e=>"number"==typeof d[e]?d[e]:null,k=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===j(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},S=(e,t,r,a,o,i)=>/* @__PURE__ */s("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */s(l,{value:a,onChange:i,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":t})}),O=n.map(j),C="number"==typeof d.width?d.width:O.every(e=>null!==e&&e===O[0])?O[0]:null,B=null===C&&O.some(e=>null!==e),I=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",T=e=>j(e)??("number"==typeof d.width?d.width:null),z=d.style??u.style;/* @__PURE__ */
2
- return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[S("left",b.sides.left,h.left,T("left"),String(u.sides.left),e=>k("left",e)),S("top",b.sides.top,h.top,T("top"),String(u.sides.top),e=>k("top",e)),S("right",b.sides.right,h.right,T("right"),String(u.sides.right),e=>k("right",e)),S("bottom",b.sides.bottom,h.bottom,T("bottom"),String(u.sides.bottom),e=>k("bottom",e))]}):S("all",b.width,h.all,C,B?"–":I,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */s("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */s(e,{block:!0,size:"sm",label:b.style,value:z,onChange:e=>{x||m({...d,style:e})},options:i.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
1
+ import{Segmented as e}from"./chunk-N6DTTOB6.js";import{ColorPicker as t}from"./chunk-DISSJYKV.js";import{InputNumber_default as l}from"./chunk-MTXTJLFK.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{jsxs as a,Fragment as o,jsx as s}from"react/jsx-runtime";var i=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */s(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */s(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */s(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */s(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */s(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */s(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */s(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */s(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const S=e=>"number"==typeof d[e]?d[e]:null,j=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===S(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},k=(e,t,r,a,o,i)=>/* @__PURE__ */s("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */s(l,{value:a,onChange:i,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":t})}),T=n.map(S),C="number"==typeof d.width?d.width:T.every(e=>null!==e&&e===T[0])?T[0]:null,O=null===C&&T.some(e=>null!==e),I=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",K=e=>S(e)??("number"==typeof d.width?d.width:null),z=d.style??u.style;/* @__PURE__ */
2
+ return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,K("left"),String(u.sides.left),e=>j("left",e)),k("top",b.sides.top,h.top,K("top"),String(u.sides.top),e=>j("top",e)),k("right",b.sides.right,h.right,K("right"),String(u.sides.right),e=>j("right",e)),k("bottom",b.sides.bottom,h.bottom,K("bottom"),String(u.sides.bottom),e=>j("bottom",e))]}):k("all",b.width,h.all,C,O?"–":I,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */s("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */s(e,{block:!0,size:"sm",label:b.style,value:z,onChange:e=>{x||m({...d,style:e})},options:i.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
3
3
  /* @__PURE__ */s("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
4
4
  /* @__PURE__ */s("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */s(t,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"sm",disabled:x})})]})}export{i as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
@@ -1,4 +1,4 @@
1
- import{AccessibleTable as e}from"./chunk-CDRXZBVR.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-P5BOTIJU.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-VKMEQKYT.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[w,C]=u(null),{highlighted:E}=r(),R=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",R),0===R.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const B=Math.max(...R.map(e=>e.depth))+1,I=f/2,K=f/2,L=(f/2-8-b)/B,T=R.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),V=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,z=e=>null!==w?e.id===w:null===E||e.branchKey===E,A=w?R.find(e=>e.id===w):void 0,F=e=>c(e.value/T*100,1,$);/* @__PURE__ */
1
+ import{AccessibleTable as e}from"./chunk-CDRXZBVR.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-P5BOTIJU.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-E6UCGCOC.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),C=y??M.nothingToBreakDown,[N,w]=u(null),{highlighted:E}=r(),R=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",R),0===R.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:C});const B=Math.max(...R.map(e=>e.depth))+1,I=f/2,L=f/2,O=(f/2-8-b)/B,U=R.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),z=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,A=e=>null!==N?e.id===N:null===E||e.branchKey===E,F=N?R.find(e=>e.id===N):void 0,P=e=>c(e.value/U*100,1,$);/* @__PURE__ */
2
2
  return d("div",{className:`relative ${g??""}`,children:[
3
- /* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(T),B),onMouseLeave:()=>C(null),children:[R.map(e=>/* @__PURE__ */s("path",{d:t(I,K,b+e.depth*L+v/2,b+(e.depth+1)*L-v/2,e.start,e.end),fill:V(e),fillOpacity:z(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:I,y:K+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),A&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:A.label,rows:[{key:"value",label:M.value,color:V(A),value:j(A.value)},{key:"share",label:M.share,color:a.muted,value:F(A)}]})}),
4
- /* @__PURE__ */s(e,{caption:M.sunburst(j(T),B),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:R.map(e=>[e.depth+1,e.label,j(e.value),F(e)])})]})}export{f as SunburstChart};
3
+ /* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(U),B),onMouseLeave:()=>w(null),children:[R.map(e=>/* @__PURE__ */s("path",{d:t(I,L,b+e.depth*O+v/2,b+(e.depth+1)*O-v/2,e.start,e.end),fill:z(e),fillOpacity:A(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>w(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:I,y:L+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),F&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:F.label,rows:[{key:"value",label:M.value,color:z(F),value:j(F.value)},{key:"share",label:M.share,color:a.muted,value:P(F)}]})}),
4
+ /* @__PURE__ */s(e,{caption:M.sunburst(j(U),B),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:R.map(e=>[e.depth+1,e.label,j(e.value),P(e)])})]})}export{f as SunburstChart};
@@ -1,5 +1,5 @@
1
- import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as l}from"./chunk-O5KDTFK5.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-VKMEQKYT.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),K=Math.max(...v),L=.08*(K-j)||1;/* @__PURE__ */
2
- return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-L,max:K+L,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
1
+ import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{CartesianPlot as l}from"./chunk-I4VD5D43.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-E6UCGCOC.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),C=Math.max(...v),L=.08*(C-j)||1;/* @__PURE__ */
2
+ return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-L,max:C+L,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
3
3
  return c(e,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
4
4
  return n("g",{opacity:u?.45:1,children:[
5
5
  /* @__PURE__ */c("line",{x1:p,y1:l(a.high),x2:p,y2:l(a.low),stroke:h,strokeWidth:1.5}),"candle"===m?/* @__PURE__ */c("rect",{x:p-d/2,y:b,width:d,height:y,rx:1,fill:r?h:"transparent",fillOpacity:r?.85:1,stroke:h,strokeWidth:1.5}):/* @__PURE__ */n(s,{children:[
@@ -1,4 +1,4 @@
1
- import{Markdown as e}from"./chunk-4ELYV3L6.js";import{PLACEHOLDER_INK as t}from"./chunk-JFSYWEHD.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{LoadingSpinner as l}from"./chunk-Q5MD3VY6.js";import{useShellStrings as a}from"./chunk-VKMEQKYT.js";import{useState as s,useMemo as n}from"react";import{jsxs as o,jsx as i,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */i(r,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:y,emptyMessage:f}){const b=a(),[v,w]=s(""),[N,k]=s(null),[j,C]=s({}),L=v.trim().toLowerCase(),M=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let r=e.get(t.category);r||(r={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,r)),r.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,r)=>(t.get(e.key)??1/0)-(t.get(r.key)??1/0))},[h,p]),E=e=>!L||e.title.toLowerCase().includes(L)||e.body.toLowerCase().includes(L)||e.category_label.toLowerCase().includes(L),_=n(()=>M.map(e=>({...e,docs:e.docs.filter(E)})).filter(e=>e.docs.length>0),[M,L]),Y=n(()=>_.flatMap(e=>e.docs),[_]),B=(N?Y.find(e=>e.slug===N):void 0)??Y[0]??null,K=e=>!!L||(j[e]??e===B?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-UKB2I3UK.js";import{PLACEHOLDER_INK as t}from"./chunk-JFSYWEHD.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{LoadingSpinner as l}from"./chunk-Q5MD3VY6.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{useState as s,useMemo as n}from"react";import{jsxs as o,jsx as i,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */i(r,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:y,emptyMessage:f}){const b=a(),[v,w]=s(""),[N,k]=s(null),[C,j]=s({}),M=v.trim().toLowerCase(),L=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let r=e.get(t.category);r||(r={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,r)),r.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,r)=>(t.get(e.key)??1/0)-(t.get(r.key)??1/0))},[h,p]),_=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),B=n(()=>L.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[L,M]),E=n(()=>B.flatMap(e=>e.docs),[B]),K=(N?E.find(e=>e.slug===N):void 0)??E[0]??null,U=e=>!!M||(C[e]??e===K?.category);/* @__PURE__ */
2
2
  return o("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */o("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
@@ -6,16 +6,16 @@ return o("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
6
6
  /* @__PURE__ */i("div",{className:"px-3 py-2 border-b border-gray-100 shrink-0",children:/* @__PURE__ */o("div",{className:"relative",children:[
7
7
  /* @__PURE__ */i(r,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
8
  /* @__PURE__ */i("input",{type:"text",value:v,onChange:e=>w(e.target.value),placeholder:b.help.searchPlaceholder,className:"w-full rounded-md border border-gray-300 bg-white h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
- /* @__PURE__ */i("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"py-6",label:b.help.loading}):0===_.length?/* @__PURE__ */i("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:L?b.help.noResults:f??b.help.empty}):_.map(e=>{const t=K(e.key);/* @__PURE__ */
9
+ /* @__PURE__ */i("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"py-6",label:b.help.loading}):0===B.length?/* @__PURE__ */i("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?b.help.noResults:f??b.help.empty}):B.map(e=>{const t=U(e.key);/* @__PURE__ */
10
10
  return o("div",{className:"py-0.5",children:[
11
- /* @__PURE__ */o("button",{type:"button",onClick:()=>{return t=e.key,C(e=>({...e,[t]:!K(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-gray-400 hover:text-gray-600",children:[
11
+ /* @__PURE__ */o("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!U(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-gray-400 hover:text-gray-600",children:[
12
12
  /* @__PURE__ */i(d,{open:t}),
13
- /* @__PURE__ */i("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=B?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */i("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=K?.slug===e.slug;/* @__PURE__ */
14
14
  return o("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
15
15
  /* @__PURE__ */i("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */i("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:b.help.draft})]},e.slug)})]},e.key)})})]}),
16
- /* @__PURE__ */i("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:B?/* @__PURE__ */o(c,{children:[
16
+ /* @__PURE__ */i("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:K?/* @__PURE__ */o(c,{children:[
17
17
  /* @__PURE__ */o("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
18
18
  /* @__PURE__ */o("div",{className:"min-w-0",children:[
19
- /* @__PURE__ */i("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:B.title}),
20
- /* @__PURE__ */o("p",{className:"text-xs text-gray-500 mt-0.5",children:[B.category_label,!1===B.is_published&&/* @__PURE__ */o("span",{className:"ml-2 text-amber-600",children:["· ",b.help.draft]})]})]}),u&&x&&/* @__PURE__ */i("button",{type:"button",onClick:()=>x(B),className:"shrink-0 text-sm text-blue-600 hover:underline",children:b.help.edit})]}),
21
- /* @__PURE__ */i("div",{className:"flex-1 overflow-auto px-5 py-4",children:y?y(B):B.body?/* @__PURE__ */i(e,{children:B.body}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500 italic",children:b.help.noBody})})]}):/* @__PURE__ */i("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"",label:b.help.loading}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500",children:b.help.pickArticle})})})]})}export{h as HelpCenter};
19
+ /* @__PURE__ */i("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:K.title}),
20
+ /* @__PURE__ */o("p",{className:"text-xs text-gray-500 mt-0.5",children:[K.category_label,!1===K.is_published&&/* @__PURE__ */o("span",{className:"ml-2 text-amber-600",children:["· ",b.help.draft]})]})]}),u&&x&&/* @__PURE__ */i("button",{type:"button",onClick:()=>x(K),className:"shrink-0 text-sm text-blue-600 hover:underline",children:b.help.edit})]}),
21
+ /* @__PURE__ */i("div",{className:"flex-1 overflow-auto px-5 py-4",children:y?y(K):K.body?/* @__PURE__ */i(e,{children:K.body}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500 italic",children:b.help.noBody})})]}):/* @__PURE__ */i("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"",label:b.help.loading}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500",children:b.help.pickArticle})})})]})}export{h as HelpCenter};
@@ -1,4 +1,4 @@
1
- import{StatCard as e,Card as a}from"./chunk-V23TPYHO.js";import{Avatar as t}from"./chunk-7AINUMUA.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-MWNZY33B.js";import{ColumnChart as l}from"./chunk-F3AROMIU.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-D323R2FT.js";import{TH_ONE_LINE as c}from"./chunk-6KO5VTL7.js";import{Button_default as n}from"./chunk-4IU5BSVE.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
1
+ import{StatCard as e,Card as a}from"./chunk-VU6VPKM3.js";import{Avatar as t}from"./chunk-MMFJBWJC.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-NID6MGGC.js";import{ColumnChart as l}from"./chunk-ETF7LAYZ.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-D323R2FT.js";import{TH_ONE_LINE as c}from"./chunk-6KO5VTL7.js";import{Button_default as n}from"./chunk-4IU5BSVE.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
2
2
  return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
3
3
  /* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */m("div",{children:[
@@ -1,4 +1,4 @@
1
- import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-PKXQDCNR.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-Q5MD3VY6.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-DTJRIWFR.js";import{useShellStrings as m}from"./chunk-VKMEQKYT.js";import{useState as h,useRef as y,useEffect as f,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as v}from"react-dom";import{jsxs as k,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function C(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=y(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());f(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var L=(e,t)=>`${e}-opt-${t}`;function T(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function E({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
1
+ import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-PKXQDCNR.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-Q5MD3VY6.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-DTJRIWFR.js";import{useShellStrings as m}from"./chunk-E6UCGCOC.js";import{useState as h,useRef as y,useEffect as f,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as v}from"react-dom";import{jsxs as k,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var C=[];function A(e,t,r){const[n,a]=h([]),[s,l]=h(C),[o,i]=h(!1),[c,d]=h("none"),u=y(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());f(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(C),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(C),d("none"),i(!1)},[])}}var L=(e,t)=>`${e}-opt-${t}`;function T(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function E({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
2
2
  return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */k("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
3
3
  /* @__PURE__ */k("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:[
4
4
  /* @__PURE__ */w("span",{children:e.title}),
@@ -6,15 +6,15 @@ return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.m
6
6
  return k("div",{id:L(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
7
7
  /* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:T(e,a)})}),
8
8
  /* @__PURE__ */k("div",{className:"flex-1 min-w-0",children:[
9
- /* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:T,quickActions:D,onSelect:I,recent:K,onRecord:R,favorites:M,hotkey:P=!0}={}){const $=m().search,B=T??$.placeholder,[W,Q]=h(!1),[S,z]=h(""),[F,V]=h(0),G=y(null),{results:H,truncatedTypes:J,loading:Y,failure:q,reset:U}=C(S,l,2);f(()=>{const e=e=>{P&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),Q(e=>!e)),"Escape"===e.key&&W&&Q(!1)},t=()=>Q(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[W,P]),i(W);const[X,_]=h(!1);W!==X&&(_(W),W&&(z(""),V(0),U())),f(()=>{W?setTimeout(()=>G.current?.focus(),50):z("")},[W]),f(()=>{V(0)},[H]);const O=S.length>=2,Z=g(()=>O?e(H,D,S,$.actions,{truncatedTypes:J,listRoutes:A,typeLabels:N,seeAllLabel:$.seeAll}):t({recent:K,favorites:M,actions:D,typeLabels:N},$),[O,H,J,A,N,D,S,K,M,$]),ee=g(()=>r(Z),[Z]),te=Math.min(F,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;f(()=>{W&&0!==ee.length&&document.getElementById(L(re,te))?.scrollIntoView?.({block:"nearest"})},[W,te,ee.length,re]);const ae=b(e=>{Q(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||R?.(e.result),I?.(e.result)):e.action.onSelect()},[I,R]);return W?v(
10
- /* @__PURE__ */k("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>Q(!1),children:[
9
+ /* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:C,placeholder:T,quickActions:D,onSelect:I,recent:R,onRecord:K,favorites:M,hotkey:P=!0}={}){const $=m().search,B=T??$.placeholder,[W,S]=h(!1),[z,F]=h(""),[G,Q]=h(0),H=y(null),{results:J,truncatedTypes:U,loading:V,failure:q,reset:O}=A(z,l,2);f(()=>{const e=e=>{P&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),S(e=>!e)),"Escape"===e.key&&W&&S(!1)},t=()=>S(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[W,P]),i(W);const[X,Y]=h(!1);W!==X&&(Y(W),W&&(F(""),Q(0),O())),f(()=>{W?setTimeout(()=>H.current?.focus(),50):F("")},[W]),f(()=>{Q(0)},[J]);const _=z.length>=2,Z=g(()=>_?e(J,D,z,$.actions,{truncatedTypes:U,listRoutes:C,typeLabels:N,seeAllLabel:$.seeAll}):t({recent:R,favorites:M,actions:D,typeLabels:N},$),[_,J,U,C,N,D,z,R,M,$]),ee=g(()=>r(Z),[Z]),te=Math.min(G,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;f(()=>{W&&0!==ee.length&&document.getElementById(L(re,te))?.scrollIntoView?.({block:"nearest"})},[W,te,ee.length,re]);const ae=b(e=>{S(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||K?.(e.result),I?.(e.result)):e.action.onSelect()},[I,K]);return W?v(
10
+ /* @__PURE__ */k("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>S(!1),children:[
11
11
  /* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
12
12
  /* @__PURE__ */k("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:p(),children:[
13
13
  /* @__PURE__ */k("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
14
14
  /* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
15
- /* @__PURE__ */w("input",{ref:G,type:"text",value:S,onChange:e=>{z(e.target.value),V(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),V(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),V(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),V(s(Z.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:B,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?L(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),Y&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":$.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-gray-500"})}),
15
+ /* @__PURE__ */w("input",{ref:H,type:"text",value:z,onChange:e=>{F(e.target.value),Q(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),Q(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),Q(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),Q(s(Z.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:B,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?L(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),V&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":$.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-gray-500"})}),
16
16
  /* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-gray-300 px-2 py-0.5 text-2xs font-medium text-gray-400",children:$.escBadge})]}),
17
- /* @__PURE__ */k("div",{className:"max-h-[50vh] overflow-y-auto",children:[Y&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!Y&&"all"===q&&O&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:$.searchFailed}),!Y&&O&&0===ee.length&&"all"!==q&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.noResults}),ne&&/* @__PURE__ */w(E,{sections:Z,activeIdx:te,listId:re,label:$.listLabel,typeIcons:o,groupCount:$.groupCount,groupLabel:$.groupLabel,onHover:V,onPick:ae}),!Y&&"some"===q&&O&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:$.partialFailure}),!Y&&!O&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.minChars(2)})]}),
17
+ /* @__PURE__ */k("div",{className:"max-h-[50vh] overflow-y-auto",children:[V&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!V&&"all"===q&&_&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:$.searchFailed}),!V&&_&&0===ee.length&&"all"!==q&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.noResults}),ne&&/* @__PURE__ */w(E,{sections:Z,activeIdx:te,listId:re,label:$.listLabel,typeIcons:o,groupCount:$.groupCount,groupLabel:$.groupLabel,onHover:Q,onPick:ae}),!V&&"some"===q&&_&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:$.partialFailure}),!V&&!_&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.minChars(2)})]}),
18
18
  /* @__PURE__ */k("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-100 bg-gray-50 text-2xs text-gray-400",children:[
19
19
  /* @__PURE__ */k("div",{className:"flex items-center gap-3",children:[
20
20
  /* @__PURE__ */k("span",{className:"flex items-center gap-1",children:[
@@ -1,2 +1,2 @@
1
- import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
2
2
  return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
@@ -1,9 +1,9 @@
1
- import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-POMS7YQN.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-VKMEQKYT.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:j=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:z="bg-white"}){const C="right"===m,K=i().sidebar,M=a(),O=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[P,T]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),W=null!=l||null!=n,D=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:P},children:[
2
- /* @__PURE__ */f("div",{className:`flex h-full flex-col ${W?"overflow-hidden":"overflow-y-auto"} ${j}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),W?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
- /* @__PURE__ */p(t,{side:m,width:P,onResize:T,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:K.resize})]}),E=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${z}`,children:u});/* @__PURE__ */
4
- return f("div",M?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:O,top:l,fallback:K.sections}),E,
6
- /* @__PURE__ */p(v,{phone:O,bottom:n,label:K.sections,closeLabel:K.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[C?null:D,E,C?D:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
1
+ import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-KZHPX4FM.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-E6UCGCOC.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:j="bg-white"}){const z="right"===m,O=i().sidebar,P=a(),W=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[D,E]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),I=null!=l||null!=n,K=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:D},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${I?"overflow-hidden":"overflow-y-auto"} ${C}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),I?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
+ /* @__PURE__ */p(t,{side:m,width:D,onResize:E,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:O.resize})]}),M=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${j}`,children:u});/* @__PURE__ */
4
+ return f("div",P?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
+ /* @__PURE__ */p(g,{phone:W,top:l,fallback:O.sections}),M,
6
+ /* @__PURE__ */p(v,{phone:W,bottom:n,label:O.sections,closeLabel:O.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[z?null:K,M,z?K:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
7
7
  return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
8
8
  /* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
9
9
  /* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),