efficient-shell 9.9.1 → 9.10.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 (324) hide show
  1. package/dist/{Browser-GQ2ZK4PR.js → Browser-4SQ4P24B.js} +14 -14
  2. package/dist/Calculator-6NA35GFS.js +29 -0
  3. package/dist/{CurrencyConverter-SSR2XDIC.js → CurrencyConverter-EDEJOKHC.js} +8 -8
  4. package/dist/{Documents-5AC4WSNK.js → Documents-4TQFZOMU.js} +9 -9
  5. package/dist/Files-GGJYYELO.js +88 -0
  6. package/dist/{Notepad-EUIQXFUA.js → Notepad-JRRC5U3N.js} +10 -10
  7. package/dist/{PdfViewer-XSISAJZP.js → PdfViewer-FFQOKKFW.js} +1 -1
  8. package/dist/{PomodoroTimer-EV6D4OFU.js → PomodoroTimer-HCLT2JVD.js} +24 -24
  9. package/dist/{Preview-QK5HYJ6U.js → Preview-FFHAUR6X.js} +16 -16
  10. package/dist/Sidebar-BBZ7UFYQ.js +43 -0
  11. package/dist/{Spreadsheet-HR6GBICY.js → Spreadsheet-QTTDPD3U.js} +14 -14
  12. package/dist/{Stock-6ZIQHGPH.js → Stock-3IBS63UR.js} +3 -3
  13. package/dist/{Weather-II7NFRMK.js → Weather-EFIIVKFE.js} +17 -17
  14. package/dist/{WorldClock-NBLNO63Q.js → WorldClock-ERQQ4VWP.js} +6 -6
  15. package/dist/ai/index.js +35 -35
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/charts/BoxPlotChart.js +1 -1
  21. package/dist/charts/CandlestickChart.js +1 -1
  22. package/dist/charts/CartesianPlot.d.ts +24 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.d.ts +4 -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/SpecChart.js +1 -1
  42. package/dist/charts/StatTile.js +1 -1
  43. package/dist/charts/SunburstChart.js +1 -1
  44. package/dist/charts/TimeSeriesChart.d.ts +1 -1
  45. package/dist/charts/TimeSeriesChart.js +1 -1
  46. package/dist/charts/TreemapChart.js +1 -1
  47. package/dist/charts/WaterfallChart.js +1 -1
  48. package/dist/charts/types.d.ts +35 -1
  49. package/dist/{chunk-7WGOLPGM.js → chunk-2AHLONPR.js} +1 -1
  50. package/dist/{chunk-2MLRK7IO.js → chunk-2GPHHW7C.js} +4 -4
  51. package/dist/{chunk-Y44ABEW3.js → chunk-2J2OU65F.js} +2 -2
  52. package/dist/{chunk-P3OBE43Q.js → chunk-2LDOLQ7F.js} +6 -6
  53. package/dist/{chunk-EFFF3FCS.js → chunk-2SJDTKQA.js} +19 -19
  54. package/dist/{chunk-SC63O7AL.js → chunk-3C4RNMN4.js} +1 -1
  55. package/dist/{chunk-HQMN5THW.js → chunk-3FBYM6O5.js} +14 -14
  56. package/dist/{chunk-EXNAAHN4.js → chunk-3MHBALGV.js} +2 -2
  57. package/dist/{chunk-CJB73MHF.js → chunk-3XRBVYTO.js} +2 -2
  58. package/dist/{chunk-BVTNGW5S.js → chunk-46YVA2BF.js} +1 -1
  59. package/dist/{chunk-CO5RKOVX.js → chunk-4DBPKTVX.js} +16 -16
  60. package/dist/{chunk-XD34TCRG.js → chunk-4XZXY2AF.js} +1 -1
  61. package/dist/{chunk-732XHVR4.js → chunk-4YZZYB42.js} +3 -3
  62. package/dist/{chunk-6JU3WQOR.js → chunk-4ZKTUUQK.js} +1 -1
  63. package/dist/{chunk-5JRL5LXD.js → chunk-5AWV5R6E.js} +6 -6
  64. package/dist/{chunk-PYLNMN6E.js → chunk-5CVQN2BR.js} +8 -8
  65. package/dist/{chunk-RWJCKZEY.js → chunk-5Q3PFKB5.js} +1 -1
  66. package/dist/{chunk-LUWRPPJA.js → chunk-5R6RNUDB.js} +5 -5
  67. package/dist/{chunk-WUKN5WUM.js → chunk-5RAOFJYT.js} +6 -6
  68. package/dist/{chunk-ZAU2HIRH.js → chunk-5XNN2SSR.js} +4 -4
  69. package/dist/{chunk-O5LQBBW2.js → chunk-5Y6LGPZI.js} +7 -7
  70. package/dist/{chunk-2HEJDLPP.js → chunk-5ZGL2BRZ.js} +2 -2
  71. package/dist/{chunk-3APSMJPN.js → chunk-64R3IYAM.js} +1 -1
  72. package/dist/{chunk-Z3JW77LH.js → chunk-65DYHG73.js} +1 -1
  73. package/dist/{chunk-DZTAGMNY.js → chunk-6FI3HVUR.js} +42 -42
  74. package/dist/{chunk-5VOVNIOU.js → chunk-6O2W4X2V.js} +1 -1
  75. package/dist/{chunk-VVGL5O4F.js → chunk-6TRE326A.js} +6 -6
  76. package/dist/chunk-7BYBGPWU.js +9 -0
  77. package/dist/chunk-7DMTFIQN.js +11 -0
  78. package/dist/{chunk-OV2SWQPT.js → chunk-7JJUI52C.js} +1 -1
  79. package/dist/{chunk-IMOPDLMA.js → chunk-7WLFHDWA.js} +1 -1
  80. package/dist/chunk-7YZJLFAK.js +11 -0
  81. package/dist/{chunk-56RAOI7O.js → chunk-AG63JVX7.js} +6 -6
  82. package/dist/{chunk-ZTL2RPNY.js → chunk-AOSLOKAL.js} +1 -1
  83. package/dist/chunk-AVAYZK3Z.js +3 -0
  84. package/dist/{chunk-6MVHRNWC.js → chunk-BF7PZFKT.js} +1 -1
  85. package/dist/{chunk-IJWFKUYA.js → chunk-BJONHLET.js} +4 -4
  86. package/dist/{chunk-H7MJM2WI.js → chunk-BJWPPUM6.js} +2 -2
  87. package/dist/{chunk-B4KMHEFZ.js → chunk-BNKULSCG.js} +1 -1
  88. package/dist/{chunk-VG2R6PZV.js → chunk-BYHKYYL6.js} +1 -1
  89. package/dist/chunk-CBMXYXBH.js +15 -0
  90. package/dist/{chunk-GVC535IA.js → chunk-D4KZOYXQ.js} +1 -1
  91. package/dist/chunk-D7JY2KHG.js +7 -0
  92. package/dist/{chunk-PDXPMHG3.js → chunk-DRNB7KDC.js} +1 -1
  93. package/dist/{chunk-U5N6PSXO.js → chunk-E6EUGQGA.js} +5 -5
  94. package/dist/{chunk-N3JXHNID.js → chunk-E72USUUR.js} +10 -10
  95. package/dist/{chunk-C4UL2UNR.js → chunk-EOWOVR55.js} +1 -1
  96. package/dist/{chunk-GS5AISRS.js → chunk-ERLZDA75.js} +2 -2
  97. package/dist/{chunk-CE5BARZI.js → chunk-EWJELWIT.js} +3 -3
  98. package/dist/chunk-F52WQG3M.js +9 -0
  99. package/dist/{chunk-OQ2EDMB2.js → chunk-FEPBXJUR.js} +1 -1
  100. package/dist/{chunk-BWUU565Y.js → chunk-FKA6ZVQO.js} +9 -9
  101. package/dist/chunk-FLXIPEWL.js +2 -0
  102. package/dist/{chunk-RULVWW4A.js → chunk-FVDX6ZSZ.js} +6 -6
  103. package/dist/{chunk-CRXFSN5K.js → chunk-G6LOKIFC.js} +11 -11
  104. package/dist/{chunk-LNQVTH5S.js → chunk-GP5UNEKY.js} +1 -1
  105. package/dist/{chunk-P3DTYFMC.js → chunk-GSKWYMM4.js} +2 -2
  106. package/dist/{chunk-EW3L4W2I.js → chunk-GVAWCTJN.js} +8 -8
  107. package/dist/{chunk-X7PM7JOD.js → chunk-H2XCQJRG.js} +1 -1
  108. package/dist/{chunk-FBUUXK5G.js → chunk-H4YFANH5.js} +1 -1
  109. package/dist/{chunk-FPGRKHUW.js → chunk-HAFB45DT.js} +7 -7
  110. package/dist/{chunk-ZYDZY6ED.js → chunk-HMG5TW2R.js} +1 -1
  111. package/dist/{chunk-442FFHQJ.js → chunk-HRAK46H7.js} +12 -12
  112. package/dist/chunk-I5XVZLDH.js +14 -0
  113. package/dist/{chunk-CXMTDYVI.js → chunk-IENPHB5B.js} +1 -1
  114. package/dist/{chunk-QZKWIVZW.js → chunk-IK332TWA.js} +1 -1
  115. package/dist/{chunk-JKDEE35P.js → chunk-IZQ3XTD2.js} +1 -1
  116. package/dist/{chunk-IB4333CI.js → chunk-JECMVR4S.js} +7 -7
  117. package/dist/{chunk-ZHHEMSOD.js → chunk-JENEVLJU.js} +2 -2
  118. package/dist/{chunk-MWIT4UN2.js → chunk-JGDLTIOX.js} +9 -9
  119. package/dist/{chunk-6ZHX56NM.js → chunk-JQDRM6UK.js} +1 -1
  120. package/dist/{chunk-QC6OK3ED.js → chunk-JVYSRH6U.js} +1 -1
  121. package/dist/{chunk-XS4HFUTW.js → chunk-JWX7QRGE.js} +1 -1
  122. package/dist/{chunk-5VRMQTKV.js → chunk-KAHYUBXM.js} +7 -7
  123. package/dist/{chunk-YWGC7J6B.js → chunk-KECOZKJU.js} +7 -7
  124. package/dist/{chunk-WH3JHMEA.js → chunk-KJHXCVNI.js} +5 -5
  125. package/dist/{chunk-NHVXVHUR.js → chunk-KQSUSVMF.js} +17 -17
  126. package/dist/{chunk-BBEOFKLY.js → chunk-KTRNAMHY.js} +1 -1
  127. package/dist/chunk-LFPJ263N.js +6 -0
  128. package/dist/chunk-LFSCENKW.js +1 -0
  129. package/dist/{chunk-F4DIVARP.js → chunk-LYX55RI3.js} +1 -1
  130. package/dist/{chunk-XZYAFTW4.js → chunk-M5MAIJQQ.js} +4 -4
  131. package/dist/{chunk-XNWQ72WA.js → chunk-MCMUJDEP.js} +1 -1
  132. package/dist/{chunk-UE4PVCA5.js → chunk-MLPIJMOV.js} +2 -2
  133. package/dist/{chunk-ZOHQVSB3.js → chunk-MUHWI4GK.js} +12 -12
  134. package/dist/chunk-N3CTLEJS.js +9 -0
  135. package/dist/{chunk-HJWTWS5E.js → chunk-N52D37FS.js} +5 -5
  136. package/dist/{chunk-P4XTWAKJ.js → chunk-NCRLKFXD.js} +1 -1
  137. package/dist/{chunk-43ONX6UZ.js → chunk-NGQHXTUK.js} +1 -1
  138. package/dist/{chunk-SOP447EP.js → chunk-NRGBXEBU.js} +1 -1
  139. package/dist/{chunk-IQWIYZB5.js → chunk-NU2YQSOP.js} +2 -2
  140. package/dist/chunk-NUTVIQAV.js +8 -0
  141. package/dist/{chunk-EGAV5LSX.js → chunk-O25B75XX.js} +1 -1
  142. package/dist/{chunk-JS6ZSEZJ.js → chunk-O426Q7KC.js} +1 -1
  143. package/dist/{chunk-CAG3TSV2.js → chunk-O4NPQ23Q.js} +1 -1
  144. package/dist/{chunk-IJIESSTX.js → chunk-O56CY36U.js} +4 -4
  145. package/dist/chunk-OEFMBTDH.js +6 -0
  146. package/dist/{chunk-B6YOP2IX.js → chunk-OVDHEMLK.js} +5 -5
  147. package/dist/{chunk-ENL5L6NR.js → chunk-P65C5TUU.js} +1 -1
  148. package/dist/chunk-P6SATWL5.js +22 -0
  149. package/dist/chunk-PEM7UXQ3.js +1 -0
  150. package/dist/{chunk-FLEG5KP5.js → chunk-PWBLGKQ3.js} +5 -5
  151. package/dist/chunk-QCFN3ET4.js +9 -0
  152. package/dist/{chunk-F7F6Z64G.js → chunk-QLOKT22X.js} +1 -1
  153. package/dist/{chunk-IK2WXW2E.js → chunk-QLYOGT3U.js} +13 -13
  154. package/dist/{chunk-N7T63BVD.js → chunk-QMYQ4B5A.js} +3 -3
  155. package/dist/{chunk-EWVOGTEX.js → chunk-QSUQC4AN.js} +1 -1
  156. package/dist/{chunk-RDKBMX6U.js → chunk-QXK2HO4Q.js} +1 -1
  157. package/dist/{chunk-DNWV6N4P.js → chunk-R6R57BWQ.js} +4 -4
  158. package/dist/{chunk-M5GMIQ47.js → chunk-R7JTTKG2.js} +3 -3
  159. package/dist/{chunk-JIW5CJXC.js → chunk-RISKWWMD.js} +3 -3
  160. package/dist/{chunk-AGUA3O5O.js → chunk-RLLONZJJ.js} +1 -1
  161. package/dist/chunk-RSHNWBW2.js +4 -0
  162. package/dist/{chunk-24K6GVNM.js → chunk-SAHQB2JD.js} +17 -17
  163. package/dist/chunk-SC6HJBQA.js +8 -0
  164. package/dist/{chunk-OUSKOWNP.js → chunk-SGR4V5YI.js} +3 -3
  165. package/dist/chunk-SYH7EPLF.js +29 -0
  166. package/dist/{chunk-CVNJSD2J.js → chunk-T2ITXX7R.js} +6 -6
  167. package/dist/chunk-T76X2SHR.js +4 -0
  168. package/dist/{chunk-ARWMJSQJ.js → chunk-T7O2TNNX.js} +1 -1
  169. package/dist/{chunk-ANFLQSGX.js → chunk-TQH6E5V2.js} +1 -1
  170. package/dist/{chunk-KEK47CP3.js → chunk-TRUPMMDJ.js} +9 -9
  171. package/dist/chunk-UAECFZRW.js +8 -0
  172. package/dist/{chunk-L67VXJMF.js → chunk-UL4G6JY2.js} +1 -1
  173. package/dist/{chunk-E4E7MACR.js → chunk-UZGVIHFI.js} +14 -14
  174. package/dist/{chunk-DWBZ3Z34.js → chunk-V5QEPNPK.js} +2 -2
  175. package/dist/{chunk-MV6WDGB6.js → chunk-VANJPZ3H.js} +1 -1
  176. package/dist/{chunk-VVAJ23SD.js → chunk-VBNA237H.js} +1 -1
  177. package/dist/chunk-VVZE27M4.js +7 -0
  178. package/dist/{chunk-2R3BVU75.js → chunk-VZV7Q5V2.js} +1 -1
  179. package/dist/{chunk-BCUQXILM.js → chunk-WZQCRTXF.js} +1 -1
  180. package/dist/chunk-X4BKHXU5.js +9 -0
  181. package/dist/{chunk-UKDJUYIV.js → chunk-XI45TSEK.js} +1 -1
  182. package/dist/{chunk-IGNZULKG.js → chunk-YBU7NOD7.js} +1 -1
  183. package/dist/{chunk-QSJR7EI7.js → chunk-YQB5OYDC.js} +1 -1
  184. package/dist/{chunk-TVL3JPMY.js → chunk-YWR2WRDR.js} +1 -1
  185. package/dist/{chunk-FLQZ7GQ3.js → chunk-Z3CYLDHB.js} +11 -11
  186. package/dist/{chunk-K4D63NP3.js → chunk-ZC3CCRPG.js} +7 -7
  187. package/dist/{chunk-IPTCV6CQ.js → chunk-ZPW3KQ27.js} +30 -30
  188. package/dist/data/DataTable.js +1 -1
  189. package/dist/data/Kanban.js +1 -1
  190. package/dist/data/ListFooter.js +1 -1
  191. package/dist/data/ListLoadError.js +1 -1
  192. package/dist/data/Pagination.js +1 -1
  193. package/dist/file-intake/index.js +1 -1
  194. package/dist/format/index.js +1 -1
  195. package/dist/forms/BorderInput.js +1 -1
  196. package/dist/forms/BrandAssetEditor.js +1 -1
  197. package/dist/forms/Calendar.js +1 -1
  198. package/dist/forms/ColorPicker.js +1 -1
  199. package/dist/forms/ComposerAttachments.js +1 -1
  200. package/dist/forms/CornersInput.js +1 -1
  201. package/dist/forms/DatePicker.js +1 -1
  202. package/dist/forms/DateRangePicker.js +1 -1
  203. package/dist/forms/DateTimePicker.js +1 -1
  204. package/dist/forms/DisplayChips.js +1 -1
  205. package/dist/forms/FilePicker.js +1 -1
  206. package/dist/forms/FormErrorSummary.js +1 -1
  207. package/dist/forms/IconPicker.js +1 -1
  208. package/dist/forms/ImageFocusPoint.js +1 -1
  209. package/dist/forms/InputNumber.js +1 -1
  210. package/dist/forms/LinkPicker.js +1 -1
  211. package/dist/forms/MediaLibrary.js +1 -1
  212. package/dist/forms/MediaUploadField.js +1 -1
  213. package/dist/forms/MediaUploadGrid.js +1 -1
  214. package/dist/forms/MediaUsedInList.js +1 -1
  215. package/dist/forms/NumericKeypad.js +1 -1
  216. package/dist/forms/PositionInput.js +1 -1
  217. package/dist/forms/Select.js +1 -1
  218. package/dist/forms/SidesInput.js +1 -1
  219. package/dist/forms/Slider.js +1 -1
  220. package/dist/forms/Snippet.js +1 -1
  221. package/dist/forms/SplitButton.js +1 -1
  222. package/dist/forms/TagInput.js +1 -1
  223. package/dist/forms/TextToolbar.js +1 -1
  224. package/dist/forms/TimePicker.js +1 -1
  225. package/dist/forms/WidthsBar.js +1 -1
  226. package/dist/forms/mediaLibraryMenu.js +1 -1
  227. package/dist/forms/mediaMoveItems.js +1 -1
  228. package/dist/forms/textAlign.js +1 -1
  229. package/dist/forms/useFileIntake.js +1 -1
  230. package/dist/icons/index.js +1 -1
  231. package/dist/index.js +168 -168
  232. package/dist/locales/zh-Hans.js +1 -1
  233. package/dist/map/index.js +7 -7
  234. package/dist/page-tabs/index.js +5 -5
  235. package/dist/pdf/index.js +1 -1
  236. package/dist/shell/Accordion.js +1 -1
  237. package/dist/shell/AppUpdateBanner.js +1 -1
  238. package/dist/shell/Avatar.js +1 -1
  239. package/dist/shell/Banner.js +1 -1
  240. package/dist/shell/Breadcrumbs.js +1 -1
  241. package/dist/shell/BudgetBar.js +1 -1
  242. package/dist/shell/Card.js +1 -1
  243. package/dist/shell/ColoredBadge.js +1 -1
  244. package/dist/shell/ConfirmDialog.js +1 -1
  245. package/dist/shell/ContainerFillChart.js +1 -1
  246. package/dist/shell/ContextMenu.js +1 -1
  247. package/dist/shell/CountBadge.js +1 -1
  248. package/dist/shell/Dialog.js +1 -1
  249. package/dist/shell/Drawer.js +1 -1
  250. package/dist/shell/DropdownMenu.js +1 -1
  251. package/dist/shell/EditableGrid.js +1 -1
  252. package/dist/shell/EmptyState.js +1 -1
  253. package/dist/shell/GlobalSearch.js +1 -1
  254. package/dist/shell/HelpCenter.js +1 -1
  255. package/dist/shell/IconRail.js +1 -1
  256. package/dist/shell/ImageLightbox.js +1 -1
  257. package/dist/shell/ItemCount.js +1 -1
  258. package/dist/shell/LanguageSelect.js +1 -1
  259. package/dist/shell/Markdown.js +1 -1
  260. package/dist/shell/MetricBar.js +1 -1
  261. package/dist/shell/MetricBarLegend.js +1 -1
  262. package/dist/shell/MilestoneTimeline.js +1 -1
  263. package/dist/shell/PageHeader.js +1 -1
  264. package/dist/shell/PopupMenu.js +1 -1
  265. package/dist/shell/ProductionTimeline.js +1 -1
  266. package/dist/shell/ResizeHandle.js +1 -1
  267. package/dist/shell/Result.js +1 -1
  268. package/dist/shell/SearchableSelect.js +1 -1
  269. package/dist/shell/SettingReset.js +1 -1
  270. package/dist/shell/SettingRow.js +1 -1
  271. package/dist/shell/SidebarLayout.js +1 -1
  272. package/dist/shell/SidebarNav.js +1 -1
  273. package/dist/shell/SortableList.js +1 -1
  274. package/dist/shell/Statistic.js +1 -1
  275. package/dist/shell/TimeAgo.js +1 -1
  276. package/dist/shell/TimelineTrack.js +1 -1
  277. package/dist/shell/TopNav.js +1 -1
  278. package/dist/shell/TransferProgress.js +1 -1
  279. package/dist/shell/Tree.js +1 -1
  280. package/dist/shell/language.js +1 -1
  281. package/dist/shell/strings.d.ts +6 -0
  282. package/dist/shell/strings.js +1 -1
  283. package/dist/shell/toast.js +1 -1
  284. package/dist/telemetry/index.js +1 -1
  285. package/dist/templates/AuthScreen.js +1 -1
  286. package/dist/templates/ChatTemplate.js +1 -1
  287. package/dist/templates/CheckoutTemplate.js +1 -1
  288. package/dist/templates/DashboardTemplate.js +1 -1
  289. package/dist/templates/DataTablePage.js +1 -1
  290. package/dist/templates/EmailTemplate.js +1 -1
  291. package/dist/templates/ErrorBoundary.js +1 -1
  292. package/dist/templates/ErrorPage.js +1 -1
  293. package/dist/templates/FormLayoutPage.js +1 -1
  294. package/dist/templates/GalleryTemplate.js +1 -1
  295. package/dist/ui/index.js +1 -1
  296. package/dist/version.js +1 -1
  297. package/package.json +1 -1
  298. package/dist/Calculator-CSYRZAS5.js +0 -29
  299. package/dist/Files-4SD6LLKX.js +0 -88
  300. package/dist/Sidebar-Y4DTQYW2.js +0 -43
  301. package/dist/chunk-5SJ45P5E.js +0 -8
  302. package/dist/chunk-6453ISTQ.js +0 -4
  303. package/dist/chunk-D7IXMMZT.js +0 -9
  304. package/dist/chunk-FKNJSD6B.js +0 -14
  305. package/dist/chunk-G4EVQD5U.js +0 -8
  306. package/dist/chunk-G6CTTBKE.js +0 -9
  307. package/dist/chunk-HUF34LSW.js +0 -15
  308. package/dist/chunk-IMA5SXEC.js +0 -2
  309. package/dist/chunk-IX6QMUJQ.js +0 -9
  310. package/dist/chunk-JKHWZ2ZY.js +0 -19
  311. package/dist/chunk-KWT6GT4M.js +0 -29
  312. package/dist/chunk-LB3A53D5.js +0 -8
  313. package/dist/chunk-MG7A3R75.js +0 -1
  314. package/dist/chunk-N45ACN3G.js +0 -6
  315. package/dist/chunk-OX2DOOOI.js +0 -8
  316. package/dist/chunk-PDB5W7VI.js +0 -6
  317. package/dist/chunk-POCQ7ZL4.js +0 -3
  318. package/dist/chunk-PVR4KU7H.js +0 -7
  319. package/dist/chunk-Q7KTTDUS.js +0 -11
  320. package/dist/chunk-QWHQJNKL.js +0 -1
  321. package/dist/chunk-RC6UHOAV.js +0 -4
  322. package/dist/chunk-TNTQL6SX.js +0 -1
  323. package/dist/chunk-TTHWXGT7.js +0 -11
  324. package/dist/chunk-WE7CYRZT.js +0 -7
@@ -1,4 +1,4 @@
1
- import{DAY_MS as e,fmtSliderDate as t}from"./chunk-YDEIXM2A.js";import{calendarNames as n}from"./chunk-5OTS2G3M.js";import{stagger as r}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserValueOnce as a}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-QWHQJNKL.js";import{useRef as c,useState as d,useId as u,useEffect as m,useCallback as h,useLayoutEffect as p}from"react";import{jsx as x,jsxs as f,Fragment as y}from"react/jsx-runtime";var k={receipt:/* @__PURE__ */f(y,{children:[
1
+ import{DAY_MS as e,fmtSliderDate as t}from"./chunk-YDEIXM2A.js";import{calendarNames as n}from"./chunk-5OTS2G3M.js";import{stagger as r}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserValueOnce as a}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-PEM7UXQ3.js";import{useRef as c,useState as d,useId as u,useEffect as m,useCallback as h,useLayoutEffect as p}from"react";import{jsx as x,jsxs as f,Fragment as y}from"react/jsx-runtime";var k={receipt:/* @__PURE__ */f(y,{children:[
2
2
  /* @__PURE__ */x("path",{d:"M3.4 1.9h5.2v7.2l-1.3-.9-1.3.9-1.3-.9-1.3.9z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
3
3
  /* @__PURE__ */x("path",{d:"M4.9 4.4h2.2M4.9 6.1h2.2",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]}),check:/* @__PURE__ */x("path",{d:"M2.6 6.3 4.9 8.6 9.4 3.6",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"}),doc:/* @__PURE__ */f(y,{children:[
4
4
  /* @__PURE__ */x("path",{d:"M3.5 1.9h3.4l2 2v6.2H3.5z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
@@ -13,10 +13,10 @@ return x("svg",{viewBox:"0 0 12 12","aria-hidden":"true",children:k[e]})}functio
13
13
  return f("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[
14
14
  /* @__PURE__ */x("path",{d:"M4.2 2.2v11.6"}),
15
15
  /* @__PURE__ */x("path",{d:"M4.2 3.1h7.4l-1.6 2.5 1.6 2.6H4.2z"})]})}function v(){/* @__PURE__ */
16
- return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,n={}){const r=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(r<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=n.maxTimeShare??.3,i=Math.min(n.breakPx??48,r),o=n.minGapPx??48,c=[],d=[],u=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),d.push(a>0?t/a*r:0),u.push(a>0&&t/a>s)}const m=u.filter(Boolean).length,h=Math.max(0,r-m*i);let p=0,x=0;for(let e=0;e<c.length;e++)u[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>u[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,n){const r=e.slice();let l=0;for(let e=0;e<r.length;e++)t[e]||r[e]>=n-b||(l+=n-r[e],r[e]=n);if(l<=b)return r;let a=0;for(let e=0;e<r.length;e++)!t[e]&&r[e]>n+b&&(a+=r[e]-n);if(a<=b)return r;const s=Math.min(l,a);for(let e=0;e<r.length;e++)t[e]||r[e]<=n+b||(r[e]-=s*(r[e]-n)/a);return r}(f,u,o),k=y.reduce((e,t,n)=>u[n]?e:e+t,0),g=y.map((e,t)=>u[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=r;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:d[t],clampedPx:f[t],px:M[t+1]-e,compressed:u[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return r;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const n=l[t+1]-l[t],r=n>0?(e-l[t])/n:0;return M[t]+r*(M[t+1]-M[t])}return r},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),r);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const n=M[e+1]-M[e],r=n>0?(t-M[e])/n:0;return l[e]+r*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,n){return Math.max(0,Math.min(e-t/2,Math.max(0,n-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,n)=>Math.min(Math.max(e,t),n),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const n=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:n,ms:e.msByPx(n)}}var L={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function D(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var K=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},F={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function j(e,t,n){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(n?"flag":void 0)}function R(e,t,n=!1){const r=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];r.diamond&&l.push("is-diamond"),n&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":r.token??"var(--tl-accent)",s="dot"===t||n?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function H(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}var O="undefined"==typeof document?m:p;function U(e,t){const[n,r]=d(0);return O(()=>{const n=t?e.current:null;if(!n)return;const l=()=>{const e=n.getBoundingClientRect().width;e>0&&r(e)};if(l(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(l);return a.observe(n),()=>{a.disconnect()}},[e,t]),n}function I(e,t,n){const r=/* @__PURE__ */new Map;for(const e of t)Number.isFinite(e.x)&&r.set(e.x,Math.max(r.get(e.x)??0,e.widthPx));const l=[...r.keys()].sort((e,t)=>e-t);if(n<=0||l.length<2)return e;const a=Math.max(0,l[0]),s=Math.min(n,l[l.length-1]),i=s-a,o=[];for(let e=0;e+1<l.length;e++){const t=(r.get(l[e])??0)/2+(r.get(l[e+1])??0)/2+8;o.push(Math.max(28,t,l[e+1]-l[e]))}const c=o.reduce((e,t)=>e+t,0),d=Math.min(Math.max(c,i),.8*n);if(d<=i+.5)return e;const u=a,m=n-s,h=u+m,p=Math.max(0,n-d),x=h>0?p*u/h:0,f=x,y=x+d,k=o.map(e=>c>0?e*d/c:0),g=e=>{if(e<=a)return u>0?e*x/u:f;if(e>=s)return m>0?y+(e-s)*(n-y)/m:y;let t=f;for(let n=0;n+1<l.length;n++){if(e>l[n+1]){t+=k[n];continue}const r=l[n+1]-l[n];return t+(r>0?(e-l[n])/r*k[n]:0)}return y};return{anchorsMs:e.anchorsMs,xs:e.xs.map(g),gaps:e.gaps.map(e=>({...e,fromPx:g(e.fromPx),toPx:g(e.toPx),px:g(e.toPx)-g(e.fromPx)})),xByMs:t=>g(e.xByMs(t)),msByPx:t=>e.msByPx((e=>{if(e<=f)return x>0?e*u/x:a;if(e>=y)return n-y>0?s+(e-y)*m/(n-y):s;let t=f;for(let n=0;n+1<l.length;n++){if(!(e>t+k[n]))return l[n]+(k[n]>0?(e-t)/k[n]*(l[n+1]-l[n]):0);t+=k[n]}return s})(t)),inCut:e.inCut}}function S(e){if(!e||0===e.length)return null;const t=e.filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:null}function W({marks:e,innerRef:t}){/* @__PURE__ */
16
+ return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,n={}){const r=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(r<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=n.maxTimeShare??.3,i=Math.min(n.breakPx??48,r),o=n.minGapPx??48,c=[],d=[],u=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),d.push(a>0?t/a*r:0),u.push(a>0&&t/a>s)}const m=u.filter(Boolean).length,h=Math.max(0,r-m*i);let p=0,x=0;for(let e=0;e<c.length;e++)u[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>u[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,n){const r=e.slice();let l=0;for(let e=0;e<r.length;e++)t[e]||r[e]>=n-b||(l+=n-r[e],r[e]=n);if(l<=b)return r;let a=0;for(let e=0;e<r.length;e++)!t[e]&&r[e]>n+b&&(a+=r[e]-n);if(a<=b)return r;const s=Math.min(l,a);for(let e=0;e<r.length;e++)t[e]||r[e]<=n+b||(r[e]-=s*(r[e]-n)/a);return r}(f,u,o),k=y.reduce((e,t,n)=>u[n]?e:e+t,0),g=y.map((e,t)=>u[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=r;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:d[t],clampedPx:f[t],px:M[t+1]-e,compressed:u[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return r;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const n=l[t+1]-l[t],r=n>0?(e-l[t])/n:0;return M[t]+r*(M[t+1]-M[t])}return r},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),r);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const n=M[e+1]-M[e],r=n>0?(t-M[e])/n:0;return l[e]+r*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,n){return Math.max(0,Math.min(e-t/2,Math.max(0,n-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,n)=>Math.min(Math.max(e,t),n),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const n=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:n,ms:e.msByPx(n)}}var L={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function D(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var K=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},F={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function j(e,t,n){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(n?"flag":void 0)}function R(e,t,n=!1){const r=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];r.diamond&&l.push("is-diamond"),n&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":r.token??"var(--tl-accent)",s="dot"===t||n?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function U(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}var O="undefined"==typeof document?m:p;function H(e,t){const[n,r]=d(0);return O(()=>{const n=t?e.current:null;if(!n)return;const l=()=>{const e=n.getBoundingClientRect().width;e>0&&r(e)};if(l(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(l);return a.observe(n),()=>{a.disconnect()}},[e,t]),n}function I(e,t,n){const r=/* @__PURE__ */new Map;for(const e of t)Number.isFinite(e.x)&&r.set(e.x,Math.max(r.get(e.x)??0,e.widthPx));const l=[...r.keys()].sort((e,t)=>e-t);if(n<=0||l.length<2)return e;const a=Math.max(0,l[0]),s=Math.min(n,l[l.length-1]),i=s-a,o=[];for(let e=0;e+1<l.length;e++){const t=(r.get(l[e])??0)/2+(r.get(l[e+1])??0)/2+8;o.push(Math.max(28,t,l[e+1]-l[e]))}const c=o.reduce((e,t)=>e+t,0),d=Math.min(Math.max(c,i),.8*n);if(d<=i+.5)return e;const u=a,m=n-s,h=u+m,p=Math.max(0,n-d),x=h>0?p*u/h:0,f=x,y=x+d,k=o.map(e=>c>0?e*d/c:0),g=e=>{if(e<=a)return u>0?e*x/u:f;if(e>=s)return m>0?y+(e-s)*(n-y)/m:y;let t=f;for(let n=0;n+1<l.length;n++){if(e>l[n+1]){t+=k[n];continue}const r=l[n+1]-l[n];return t+(r>0?(e-l[n])/r*k[n]:0)}return y};return{anchorsMs:e.anchorsMs,xs:e.xs.map(g),gaps:e.gaps.map(e=>({...e,fromPx:g(e.fromPx),toPx:g(e.toPx),px:g(e.toPx)-g(e.fromPx)})),xByMs:t=>g(e.xByMs(t)),msByPx:t=>e.msByPx((e=>{if(e<=f)return x>0?e*u/x:a;if(e>=y)return n-y>0?s+(e-y)*m/(n-y):s;let t=f;for(let n=0;n+1<l.length;n++){if(!(e>t+k[n]))return l[n]+(k[n]>0?(e-t)/k[n]*(l[n+1]-l[n]):0);t+=k[n]}return s})(t)),inCut:e.inCut}}function S(e){if(!e||0===e.length)return null;const t=e.filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:null}function z({marks:e,innerRef:t}){/* @__PURE__ */
17
17
  return x("div",{ref:t,"aria-hidden":"true",className:"rosh-tl-measure",children:e.map(e=>/* @__PURE__ */f("div",{"data-lane-key":e.key,className:"rosh-tl-measure-box",children:[
18
18
  /* @__PURE__ */x("span",{className:"rosh-tl-name",children:e.label}),
19
- /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})}function z({startMs:t,endMs:r,axis:l,geo:a,reveal:s}){const c=i().timeline,d=n(o()),u=a.ruler,m=[],h=[],p=l.gaps.filter(e=>e.compressed),y=new Date(t);y.setUTCDate(y.getUTCDate()+(8-y.getUTCDay())%7);for(let t=y.getTime();t<r;t+=7*e){if(l.inCut(t))continue;const n=l.xByMs(t);l.xByMs(t+7*e)-n<14||m.push(
19
+ /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})}function E({startMs:t,endMs:r,axis:l,geo:a,reveal:s}){const c=i().timeline,d=n(o()),u=a.ruler,m=[],h=[],p=l.gaps.filter(e=>e.compressed),y=new Date(t);y.setUTCDate(y.getUTCDate()+(8-y.getUTCDay())%7);for(let t=y.getTime();t<r;t+=7*e){if(l.inCut(t))continue;const n=l.xByMs(t);l.xByMs(t+7*e)-n<14||m.push(
20
20
  /* @__PURE__ */x("i",{className:"rosh-tl-tick is-week",style:{left:`${n}px`,top:`${u}px`,height:"3px"}},`wk-${t}`))}const k=p.map(t=>{const n=(t.fromPx+t.toPx)/2,r=K(c.days(Math.round(t.gapMs/e)))/2+6;return[n-r,n+r]}),g=(e,t)=>k.some(([n,r])=>e<r&&t>n);m.push(
21
21
  /* @__PURE__ */x("i",{"data-timeline-part":"start-tick",className:"rosh-tl-tick",style:{left:"0px",top:`${u}px`,height:"6px"}},"start"));const M=new Date(t);M.setUTCDate(1);let v=-1/0,b=!0;for(;M.getTime()<r;){const e=M.getTime();if(!(e<=t)&&!l.inCut(e)){const t=l.xByMs(e);if(m.push(
22
22
  /* @__PURE__ */x("i",{className:"rosh-tl-tick",style:{left:`${t}px`,top:`${u}px`,height:"6px"}},`mo-${e}`)),t-v>=72||b){const n=b||0===M.getUTCMonth()?d.shortMonthYear(M.getUTCFullYear(),M.getUTCMonth()):d.monthsShort[M.getUTCMonth()];g(t,t+K(n))||(h.push(
@@ -26,7 +26,7 @@ return f("span",{"data-timeline-part":"break",className:"rosh-tl-rulercut"+(s?"
26
26
  /* @__PURE__ */f("span",{className:"rosh-tl-cutglyph",children:[
27
27
  /* @__PURE__ */x("i",{}),
28
28
  /* @__PURE__ */x("i",{})]}),
29
- /* @__PURE__ */x("span",{children:c.days(n)})]},`cut-${t.fromMs}`)})]})}function E({pending:e,reveal:t}){const n=i().timeline,[r,l]=d(!1),a=r?e:e.slice(0,2),s=e.length-a.length;/* @__PURE__ */
29
+ /* @__PURE__ */x("span",{children:c.days(n)})]},`cut-${t.fromMs}`)})]})}function W({pending:e,reveal:t}){const n=i().timeline,[r,l]=d(!1),a=r?e:e.slice(0,2),s=e.length-a.length;/* @__PURE__ */
30
30
  return f("div",{className:"rosh-tl-pending","data-timeline-part":"pending",children:[
31
31
  /* @__PURE__ */x("p",{className:"rosh-tl-pending-head",children:n.notReached}),
32
32
  /* @__PURE__ */x("ol",{className:"rosh-tl-ghosts","aria-label":n.notReached,children:a.map((e,r)=>/* @__PURE__ */f("li",{className:t?"rosh-tl-fade":void 0,style:t?{animationDelay:440+60*r+"ms"}:void 0,children:[
@@ -41,7 +41,7 @@ return f("li",{className:s?"rosh-tl-fade":void 0,style:s?r(t,c):void 0,...e.key=
41
41
  /* @__PURE__ */x("span",{className:"rosh-tl-name",children:e.label}),
42
42
  /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]})]},e.key)})}),p>0&&/* @__PURE__ */f("p",{className:"rosh-tl-vgap","aria-hidden":"true",children:[
43
43
  /* @__PURE__ */x("i",{className:"rosh-tl-vline is-dash"}),
44
- /* @__PURE__ */x("span",{children:m.daysToToday(p)})]}),n.length>0&&/* @__PURE__ */x(E,{pending:n,reveal:s})]})}function V({axis:e,geo:t,fillTo:n,reveal:r,trackPx:l,tweened:a=!1}){/* @__PURE__ */
44
+ /* @__PURE__ */x("span",{children:m.daysToToday(p)})]}),n.length>0&&/* @__PURE__ */x(W,{pending:n,reveal:s})]})}function V({axis:e,geo:t,fillTo:n,reveal:r,trackPx:l,tweened:a=!1}){/* @__PURE__ */
45
45
  return f("div",{"aria-hidden":"true",children:[
46
46
  /* @__PURE__ */x("div",{className:"rosh-tl-rail bg-gray-200",style:{top:`${t.rail}px`,height:"6px",width:`${l}px`}}),null!==n&&/* @__PURE__ */x("div",{"data-timeline-part":"fill",className:`rosh-tl-fill bg-blue-600${a?" is-tweened":""}${r?" rosh-tl-draw":""}`,style:{top:`${t.rail}px`,height:"6px",width:`${Math.max(0,Math.min(e.xByMs(n),l))}px`}}),e.gaps.filter(e=>e.compressed).map(e=>/* @__PURE__ */f("div",{className:"rosh-tl-cut",style:{left:(e.fromPx+e.toPx)/2+"px",top:`${t.rail}px`,height:"6px"},children:[
47
47
  /* @__PURE__ */x("i",{}),
@@ -50,12 +50,12 @@ return f("div",{"aria-hidden":"true","data-timeline-part":"start",children:[
50
50
  /* @__PURE__ */x("i",{className:`rosh-tl-start${r?" is-around":""}${i}`,style:{left:"0px",top:`${e.rail+3}px`,...o}}),null!=t&&!1!==t&&/* @__PURE__ */x("span",{className:`rosh-tl-edge${i}`,"data-timeline-part":"start-caption",style:{left:"0px",top:`${s}px`,...o},children:t}),null!=n&&!1!==n&&/* @__PURE__ */x("span",{className:`rosh-tl-edge is-end${i}`,"data-timeline-part":"end-caption",style:{left:`${a}px`,top:`${s}px`,...o},children:n})]})}function Y({x:e,geo:t,trackPx:n,label:r,reveal:l}){const a=i().timeline;/* @__PURE__ */
51
51
  return f("div",{"aria-hidden":"true","data-timeline-part":"today",children:[
52
52
  /* @__PURE__ */x("div",{className:"rosh-tl-todayline"+(l?" rosh-tl-fade":""),style:{left:`${e}px`,top:`${t.laneA}px`,height:t.ruler+20-t.laneA+"px",...l?{animationDelay:"420ms"}:{}}}),
53
- /* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(r),style:{left:`${w(e,48,n)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function _({nodes:e,geo:t,reveal:n}){const r=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of r){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,n=K(t)/2;a&&e.x-n<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+n):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+n})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(n?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...n?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function J({phase:e,geo:t,xOf:n}){const r=n(e.minMs),l=Math.max(n(e.maxMs)-r,4);/* @__PURE__ */
53
+ /* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(r),style:{left:`${w(e,48,n)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function _({nodes:e,geo:t,reveal:n}){const r=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of r){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,n=K(t)/2;a&&e.x-n<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+n):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+n})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(n?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...n?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function q({phase:e,geo:t,xOf:n}){const r=n(e.minMs),l=Math.max(n(e.maxMs)-r,4);/* @__PURE__ */
54
54
  return f("div",{"aria-hidden":"true","data-timeline-part":"phase",children:[
55
55
  /* @__PURE__ */x("div",{className:"rosh-tl-phase border-gray-300",style:{left:`${r}px`,width:`${l}px`,top:t.laneB+t.laneH-4+"px"}}),
56
- /* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${r+l/2}px`,top:`${t.laneB+t.laneH+5}px`},children:[e.label," · parallel"]})]})}function Q({nodes:e,trackPx:t,geo:n,activeKey:r,hoveredKey:l,currentKey:a}){const s=i().timeline,o=(e,t)=>null!==t&&(e.key===t||e.members.some(e=>e.key===t)),c=e.find(e=>e.key===l)??e.find(e=>o(e,r))??null;if(!c)return null;const d=c.mark,u=d?d.label:`×${c.members.length}`,m=d?d.dateText:function(e){const t=e[0].dateText,n=e[e.length-1].dateText;return t===n?t:`${t} – ${n}`}(c.members),h=d?d.widthPx:N(u,m),p=d?.onOpen;/* @__PURE__ */
56
+ /* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${r+l/2}px`,top:`${t.laneB+t.laneH+5}px`},children:[e.label," · parallel"]})]})}function J({nodes:e,trackPx:t,geo:n,activeKey:r,hoveredKey:l,currentKey:a}){const s=i().timeline,o=(e,t)=>null!==t&&(e.key===t||e.members.some(e=>e.key===t)),c=e.find(e=>e.key===l)??e.find(e=>o(e,r))??null;if(!c)return null;const d=c.mark,u=d?d.label:`×${c.members.length}`,m=d?d.dateText:function(e){const t=e[0].dateText,n=e[e.length-1].dateText;return t===n?t:`${t} – ${n}`}(c.members),h=d?d.widthPx:N(u,m),p=d?.onOpen;/* @__PURE__ */
57
57
  return f("div",{"data-timeline-part":"label",className:`rosh-tl-label${c.key===l?" is-hot":""}${o(c,a)?" is-current":""}`,style:{left:`${w(c.x,h,t)}px`,top:`${n.laneB}px`,width:`${h}px`,height:`${n.laneH}px`},children:[p?/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-name rosh-tl-open","data-timeline-part":"open","aria-label":s.open(u),onClick:p,children:u}):/* @__PURE__ */x("span",{className:"rosh-tl-name","aria-hidden":"true",children:u}),
58
- /* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:m})]})}function q({groups:t,trackPx:n,geo:r,startMs:l,endMs:a,currentKey:s,hoveredKey:i,reveal:o,step:c,zoomedKey:d,popId:u,aimBubble:m,openCluster:h,setOpenCluster:p,previewCluster:k,setPreviewCluster:g,setZoomKey:M,startCaptionPx:v}){const b=[];t.forEach((e,t)=>{if("cluster"===e.type){const r=`cluster-${e.members[0].key}`,l=(n=e.members,`${(n[0]?.label??"").replace(/\s*v?\d+$/i,"").trim()||(n[0]?.label??"")} ×${n.length}`);if(b.push({key:r,group:e,text:l,x:e.members.reduce((e,t)=>e+t.baseX,0)/e.members.length,index:t,lane:-1,left:0,widthPx:Math.ceil(K(l))+28}),r===d)for(const n of e.members)b.push({key:n.key,group:{type:"item",mark:n},text:n.label,x:n.x,index:t,lane:-1,left:0,widthPx:n.widthPx});return}var n;b.push({key:e.mark.key,group:e,text:e.mark.label,x:e.mark.x,index:t,lane:-1,left:0,widthPx:e.mark.widthPx})}),b.sort((e,t)=>e.x-t.x);const $=function(e,t,n,r,l={}){const a=t>0?t:0,s=r>0?r:1,i=l.gapPx??6,o=Math.max(1,l.laneCount??4),c=e.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.priority??0)-(t.item.priority??0)||e.item.ms-t.item.ms||e.index-t.index),d=Array.from({length:o},()=>[]),u=/* @__PURE__ */new Map;for(const{item:e}of c){const t=Math.max(0,e.widthPx);if(a<=0||t>a){u.set(e.key,-1);continue}const r=e.xPx??(e.ms-n)/s*a,l=Math.min(Math.max(r-t/2,0),a-t),c=l+t;let m=-1;for(let e=0;e<o;e++)if(d[e].every(e=>l>e.right+i||c+i<e.left)){d[e].push({left:l,right:c}),m=e;break}u.set(e.key,m)}return e.map(e=>({key:e.key,lane:u.get(e.key)??-1}))}([...v>0?[{key:"__rosh-tl-start__",ms:l,xPx:0,widthPx:v,priority:-2}]:[],...b.map(e=>({key:e.key,ms:"cluster"===e.group.type?e.group.members[0].ms:e.group.mark.ms,xPx:e.x,widthPx:e.widthPx,priority:"cluster"===e.group.type?-1:0}))],n,l,Math.max(a-l,e),{laneCount:2}),P=new Map($.map(e=>[e.key,e.lane]));for(const e of b)e.lane=P.get(e.key)??-1,e.left=w(e.x,e.widthPx,n);const N=b.find(e=>e.key===(h??k)),C=e=>0===e?r.laneA:r.laneB,T=e=>0===e?r.rail-4:r.rail+6+3;/* @__PURE__ */
58
+ /* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:m})]})}function Q({groups:t,trackPx:n,geo:r,startMs:l,endMs:a,currentKey:s,hoveredKey:i,reveal:o,step:c,zoomedKey:d,popId:u,aimBubble:m,openCluster:h,setOpenCluster:p,previewCluster:k,setPreviewCluster:g,setZoomKey:M,startCaptionPx:v}){const b=[];t.forEach((e,t)=>{if("cluster"===e.type){const r=`cluster-${e.members[0].key}`,l=(n=e.members,`${(n[0]?.label??"").replace(/\s*v?\d+$/i,"").trim()||(n[0]?.label??"")} ×${n.length}`);if(b.push({key:r,group:e,text:l,x:e.members.reduce((e,t)=>e+t.baseX,0)/e.members.length,index:t,lane:-1,left:0,widthPx:Math.ceil(K(l))+28}),r===d)for(const n of e.members)b.push({key:n.key,group:{type:"item",mark:n},text:n.label,x:n.x,index:t,lane:-1,left:0,widthPx:n.widthPx});return}var n;b.push({key:e.mark.key,group:e,text:e.mark.label,x:e.mark.x,index:t,lane:-1,left:0,widthPx:e.mark.widthPx})}),b.sort((e,t)=>e.x-t.x);const $=function(e,t,n,r,l={}){const a=t>0?t:0,s=r>0?r:1,i=l.gapPx??6,o=Math.max(1,l.laneCount??4),c=e.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.priority??0)-(t.item.priority??0)||e.item.ms-t.item.ms||e.index-t.index),d=Array.from({length:o},()=>[]),u=/* @__PURE__ */new Map;for(const{item:e}of c){const t=Math.max(0,e.widthPx);if(a<=0||t>a){u.set(e.key,-1);continue}const r=e.xPx??(e.ms-n)/s*a,l=Math.min(Math.max(r-t/2,0),a-t),c=l+t;let m=-1;for(let e=0;e<o;e++)if(d[e].every(e=>l>e.right+i||c+i<e.left)){d[e].push({left:l,right:c}),m=e;break}u.set(e.key,m)}return e.map(e=>({key:e.key,lane:u.get(e.key)??-1}))}([...v>0?[{key:"__rosh-tl-start__",ms:l,xPx:0,widthPx:v,priority:-2}]:[],...b.map(e=>({key:e.key,ms:"cluster"===e.group.type?e.group.members[0].ms:e.group.mark.ms,xPx:e.x,widthPx:e.widthPx,priority:"cluster"===e.group.type?-1:0}))],n,l,Math.max(a-l,e),{laneCount:2}),P=new Map($.map(e=>[e.key,e.lane]));for(const e of b)e.lane=P.get(e.key)??-1,e.left=w(e.x,e.widthPx,n);const N=b.find(e=>e.key===(h??k)),C=e=>0===e?r.laneA:r.laneB,T=e=>0===e?r.rail-4:r.rail+6+3;/* @__PURE__ */
59
59
  return f(y,{children:[b.map(e=>{const t=Math.max(0,e.lane),n=Math.round(e.index*c+60);if("cluster"===e.group.type){const l=h===e.key,a=e.group.members.map(e=>e.x),s=()=>{g(null),l||M(null)};/* @__PURE__ */
60
60
  return f("div",{children:[
61
61
  /* @__PURE__ */f("button",{type:"button","data-timeline-part":"cluster",className:`rosh-tl-pill${A[e.group.kind]?.token?"":" text-blue-600"}${o?" rosh-tl-fade":""}`,"aria-expanded":l,"aria-controls":u,style:{left:`${e.left}px`,top:`${0===t?r.laneA+r.laneH-19:r.laneB}px`,color:A[e.group.kind]?.token,...o?{animationDelay:`${n}ms`}:{}},onMouseEnter:()=>{g(e.key),M(e.key)},onMouseLeave:s,onFocus:()=>{g(e.key),M(e.key)},onBlur:s,onClick:()=>{p(l?null:e.key),M(l?null:e.key)},children:[
@@ -74,20 +74,20 @@ return f("div",{children:[
74
74
  return f(y,{children:[
75
75
  /* @__PURE__ */x("div",{className:"rosh-tl-hit","aria-hidden":"true","data-timeline-part":"hit",style:{top:s.rail-9+"px",height:"24px"},onPointerDown:e=>{K(e),D(L(e.clientX))},onPointerMove:F,onPointerUp:A,onPointerCancel:A}),
76
76
  /* @__PURE__ */x("div",{className:"rosh-tl-chip","data-timeline-part":"chip",style:{left:`${w(P,88,m)+44}px`,top:`${s.tag}px`},children:n.chip?n.chip(N):t(N,b)}),
77
- /* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":n.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:R,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-d)/e),"aria-valuetext":j,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:F,onPointerUp:A,onPointerCancel:A,onKeyDown:t=>{const n=(t=>{const{key:n}=t;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===n||"ArrowUp"===n?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===n||"ArrowDown"===n?T[Math.max(e-1,0)]:"Home"===n?T[0]:"End"===n?T[T.length-1]:null}const l=(t.shiftKey?7:1)*e;return"ArrowRight"===n||"ArrowUp"===n?r+l:"ArrowLeft"===n||"ArrowDown"===n?r-l:"Home"===n?d:"End"===n?u:null})(t);null!==n&&(t.preventDefault(),k?.(),D(n))}})]})}function ee(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function te({startMs:n,endMs:p,axis:k="linear",items:M,markers:v=[],pending:b=[],fillToMs:w,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:de=null,motion:ue=!0,ariaLabel:me,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=a(Date.now,null),ke=a(D,!1),ge=te??ye,Me=c(null),ve=i().timeline,be=o(),$e=e=>t(e,be),we=c(null),Pe=c(null),Ne=c(null),Ce=c(/* @__PURE__ */new Map),Te=c(void 0),Be=c(void 0),Le=c(null),[De,Ke]=d({}),[Ae,Fe]=d(null),[je,Re]=d(null),[He,Oe]=d(null),[Ue,Ie]=d(null),[Se,We]=d(null),[ze,Ee]=d(null),Xe=u(),Ve=u(),Ge=U(Me,!0),Ye=Ge>0?Ge-(b.length>0&&!fe?176:0):0,_e=Ye>0&&Ye-20<320,Je=U(we,!_e),Qe=Je>0?Je:600,qe=L[ne],Ze=fe&&b.length>0,et=Ze?Math.max(0,Qe-36):Qe,tt=t=>t>=n-e&&t<=p+e,nt=M.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===k?v.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([n,...[...nt.map(e=>e.ms),...rt].filter(e=>e>n&&e<p),p],et,"compressed"===(at=k)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?F[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:j(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),dt=v.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),ut=Ze?(()=>{const t=b[b.length-1],n=b.slice(0,-1).map(e=>e.label);return[{key:t.key,ms:p+e,x:Qe,baseX:Qe,kind:t.kind??"default",label:t.label,dateText:ve.notReached,detail:n.length>0?ve.alsoToCome(n):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],mt=fe&&xe&&!Ze?[{key:xe.key,ms:p,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(p),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...dt,...ut,...mt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(n)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=He??Ue??Se,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):de?ht.filter(e=>e.ms>=de[0]&&e.ms<=de[1]).map(bt):[],wt=$t.length>1?I(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=_e?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=c(Ct),[Ft,jt]=d(!1);m(()=>{if(At.current===Ct)return;At.current=Ct,jt(!0);const e=setTimeout(()=>jt(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");O(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}Ke(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[Rt]);const Ht=`${ne}|${k}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ot,Ut]=d(Ht),It=ue&&Ot===Ht;m(()=>{Ot!==Ht&&Ut(Ht)},[Ot,Ht]);const St=Math.min(28,340/Math.max(1,ht.length-1)),Wt=S(ae?.stops),zt=e=>{const t=Math.min(Math.max(e,n),p);if(!Wt)return t;let r=Wt[0];for(const e of Wt)Math.abs(e-t)<Math.abs(r-t)&&(r=e);return r},Et=ae?zt(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!Wt||Wt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),d=e.xByMs(o.ms),u=Math.max(0,d-c),m=u<=.5||n.reducedMotion?0:C(350*u/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:d,lengthPx:u,durationMs:m,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Gt,Yt]=d(null),_t=c(null),Jt=c({segments:Vt,value:Et,playback:se});m(()=>{Jt.current={segments:Vt,value:Et,playback:se}});const Qt=c(null),qt=h(e=>{null===e&&null===Qt.current||(Qt.current=e,Jt.current.playback?.onProgress?.(e))},[]),Zt=h(()=>{_t.current=null,Yt(null),qt(null),Jt.current.playback?.onStop?.()},[qt]),en=!!se?.playing&&!!ae;m(()=>{if(!en)return;const e=Jt.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void Zt();_t.current&&_t.current.index===t||(_t.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Yt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=_t.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=_t.current;if("rest"!==e?.phase)return;const t=Jt.current.segments[e.index];t?(_t.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):Zt()},i=e=>{const t=Jt.current,n=_t.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);_t.current=s.cursor,s.at&&l(s.at),qt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):Zt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),_t.current&&(_t.current.sinceMs=null,qt(null))}},[en,Zt,qt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Gt?Gt.ms:Et:void 0!==w?w:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=h(()=>{clearTimeout(Te.current),clearTimeout(Be.current),Fe(null),Re(null),Oe(null),Ie(null),We(null)},[]);m(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),m(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const on=null!==je||null!==He||null!==Ue||null!==Se;m(()=>{if(on)return s(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=h((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,Qe-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[Qe]),dn=Bt.find(e=>e.key===je)??null,un=dn?dn.x:0;O(()=>{cn(Ne.current,un)},[cn,je,un]);const mn=Et??void 0,hn=c(null);m(()=>{if(void 0===mn)return;const e=wt.xByMs(mn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Lt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[mn]);const pn=Bt.map(e=>e.key),xn=ot?Lt.get(ot)??null:null,fn=ze&&pn.includes(ze)?ze:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),Ee(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),We(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>We(null),260)},vn=e=>{Ct&&gt.get(e)===Ct?kn():(kn(),We(null))},bn=e=>{clearTimeout(Te.current),Fe(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{Fe(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":H(e),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(H))),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];Ee(n.key),Le.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(_e)/* @__PURE__ */
78
- return x("div",{ref:Me,children:/* @__PURE__ */x(X,{marks:ht.filter(e=>!e.isCap),pending:b,currentKey:ot,todayMs:ge,reveal:It,ariaLabel:me,step:St,nodeProps:wn,onKeyDown:yn})});const Cn=(e,t)=>null==e||!1===e?null:/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-flank"+(t?" is-end":""),"data-timeline-part":t?"end-caption":"start-caption",style:{paddingTop:qe.rail-3+"px"},children:e});/* @__PURE__ */
77
+ /* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":n.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:R,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-d)/e),"aria-valuetext":j,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:F,onPointerUp:A,onPointerCancel:A,onKeyDown:t=>{const n=(t=>{const{key:n}=t;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===n||"ArrowUp"===n?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===n||"ArrowDown"===n?T[Math.max(e-1,0)]:"Home"===n?T[0]:"End"===n?T[T.length-1]:null}const l=(t.shiftKey?7:1)*e;return"ArrowRight"===n||"ArrowUp"===n?r+l:"ArrowLeft"===n||"ArrowDown"===n?r-l:"Home"===n?d:"End"===n?u:null})(t);null!==n&&(t.preventDefault(),k?.(),D(n))}})]})}function ee(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function te({startMs:n,endMs:p,axis:k="linear",items:M,markers:v=[],pending:b=[],fillToMs:w,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:de=null,motion:ue=!0,ariaLabel:me,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=a(Date.now,null),ke=a(D,!1),ge=te??ye,Me=c(null),ve=i().timeline,be=o(),$e=e=>t(e,be),we=c(null),Pe=c(null),Ne=c(null),Ce=c(/* @__PURE__ */new Map),Te=c(void 0),Be=c(void 0),Le=c(null),[De,Ke]=d({}),[Ae,Fe]=d(null),[je,Re]=d(null),[Ue,Oe]=d(null),[He,Ie]=d(null),[Se,ze]=d(null),[Ee,We]=d(null),Xe=u(),Ve=u(),Ge=H(Me,!0),Ye=Ge>0?Ge-(b.length>0&&!fe?176:0):0,_e=Ye>0&&Ye-20<320,qe=H(we,!_e),Je=qe>0?qe:600,Qe=L[ne],Ze=fe&&b.length>0,et=Ze?Math.max(0,Je-36):Je,tt=t=>t>=n-e&&t<=p+e,nt=M.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===k?v.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([n,...[...nt.map(e=>e.ms),...rt].filter(e=>e>n&&e<p),p],et,"compressed"===(at=k)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?F[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:j(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),dt=v.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),ut=Ze?(()=>{const t=b[b.length-1],n=b.slice(0,-1).map(e=>e.label);return[{key:t.key,ms:p+e,x:Je,baseX:Je,kind:t.kind??"default",label:t.label,dateText:ve.notReached,detail:n.length>0?ve.alsoToCome(n):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],mt=fe&&xe&&!Ze?[{key:xe.key,ms:p,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(p),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...dt,...ut,...mt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(n)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=Ue??He??Se,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):de?ht.filter(e=>e.ms>=de[0]&&e.ms<=de[1]).map(bt):[],wt=$t.length>1?I(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=_e?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=c(Ct),[Ft,jt]=d(!1);m(()=>{if(At.current===Ct)return;At.current=Ct,jt(!0);const e=setTimeout(()=>jt(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");O(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}Ke(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[Rt]);const Ut=`${ne}|${k}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ot,Ht]=d(Ut),It=ue&&Ot===Ut;m(()=>{Ot!==Ut&&Ht(Ut)},[Ot,Ut]);const St=Math.min(28,340/Math.max(1,ht.length-1)),zt=S(ae?.stops),Et=e=>{const t=Math.min(Math.max(e,n),p);if(!zt)return t;let r=zt[0];for(const e of zt)Math.abs(e-t)<Math.abs(r-t)&&(r=e);return r},Wt=ae?Et(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),d=e.xByMs(o.ms),u=Math.max(0,d-c),m=u<=.5||n.reducedMotion?0:C(350*u/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:d,lengthPx:u,durationMs:m,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Gt,Yt]=d(null),_t=c(null),qt=c({segments:Vt,value:Wt,playback:se});m(()=>{qt.current={segments:Vt,value:Wt,playback:se}});const Jt=c(null),Qt=h(e=>{null===e&&null===Jt.current||(Jt.current=e,qt.current.playback?.onProgress?.(e))},[]),Zt=h(()=>{_t.current=null,Yt(null),Qt(null),qt.current.playback?.onStop?.()},[Qt]),en=!!se?.playing&&!!ae;m(()=>{if(!en)return;const e=qt.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void Zt();_t.current&&_t.current.index===t||(_t.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Yt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=_t.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=_t.current;if("rest"!==e?.phase)return;const t=qt.current.segments[e.index];t?(_t.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):Zt()},i=e=>{const t=qt.current,n=_t.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);_t.current=s.cursor,s.at&&l(s.at),Qt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):Zt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),_t.current&&(_t.current.sinceMs=null,Qt(null))}},[en,Zt,Qt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Gt?Gt.ms:Wt:void 0!==w?w:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=h(()=>{clearTimeout(Te.current),clearTimeout(Be.current),Fe(null),Re(null),Oe(null),Ie(null),ze(null)},[]);m(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),m(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const on=null!==je||null!==Ue||null!==He||null!==Se;m(()=>{if(on)return s(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=h((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,Je-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[Je]),dn=Bt.find(e=>e.key===je)??null,un=dn?dn.x:0;O(()=>{cn(Ne.current,un)},[cn,je,un]);const mn=Wt??void 0,hn=c(null);m(()=>{if(void 0===mn)return;const e=wt.xByMs(mn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Lt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[mn]);const pn=Bt.map(e=>e.key),xn=ot?Lt.get(ot)??null:null,fn=Ee&&pn.includes(Ee)?Ee:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),We(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),ze(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},vn=e=>{Ct&&gt.get(e)===Ct?kn():(kn(),ze(null))},bn=e=>{clearTimeout(Te.current),Fe(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{Fe(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":U(e),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),We(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(U))),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),We(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];We(n.key),Le.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(_e)/* @__PURE__ */
78
+ return x("div",{ref:Me,children:/* @__PURE__ */x(X,{marks:ht.filter(e=>!e.isCap),pending:b,currentKey:ot,todayMs:ge,reveal:It,ariaLabel:me,step:St,nodeProps:wn,onKeyDown:yn})});const Cn=(e,t)=>null==e||!1===e?null:/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-flank"+(t?" is-end":""),"data-timeline-part":t?"end-caption":"start-caption",style:{paddingTop:Qe.rail-3+"px"},children:e});/* @__PURE__ */
79
79
  return f("div",{ref:Me,className:"rosh-tl-body"+(b.length>0&&!fe?"":" is-solo"),children:[
80
80
  /* @__PURE__ */f("div",{className:"flex items-stretch gap-3",children:[fe&&Cn(pt,!1),
81
- /* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${ee(qe,Nn,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${Ft?" is-zooming":""}${Gt?" is-gliding":""}`,onMouseMove:e=>{if(!Kt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left;n>=Kt.from&&n<=Kt.to?kn():Mn()},onMouseLeave:Mn,children:[!fe&&/* @__PURE__ */x(W,{marks:ht,innerRef:Pe}),
82
- /* @__PURE__ */x(V,{axis:wt,geo:qe,fillTo:nn,reveal:It,trackPx:et,tweened:!!ae}),Ze&&
83
- /* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:Qe-et+"px",top:qe.rail+3-1+"px"}}),an&&/* @__PURE__ */x("div",{"aria-hidden":"true",className:"rosh-tl-band","data-timeline-part":"highlight",style:{left:an.from-10+"px",width:an.to-an.from+20+"px",top:qe.rail-7+"px",height:"20px"}}),
84
- /* @__PURE__ */x(z,{startMs:n,endMs:p,axis:wt,geo:qe,reveal:It}),
85
- /* @__PURE__ */x(G,{geo:qe,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:It,trackPx:Qe}),fe&&/* @__PURE__ */x(_,{nodes:Bt,geo:qe,reveal:It}),null!==ge&&ge>n&&ge<=p+e&&/* @__PURE__ */x(Y,{x:wt.xByMs(Math.min(ge,p)),geo:qe,trackPx:Qe,label:$e(ge),reveal:It}),!fe&&oe.map(e=>/* @__PURE__ */x(J,{phase:e,geo:qe,xOf:wt.xByMs},e.key)),
86
- /* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":me,onKeyDown:yn,children:Bt.map((e,t)=>{const n=t=>null!==t&&e.members.some(e=>e.key===t),l=`${qe.rail+3}px`,a=It?r(t,St):{},s=(e=>!!an&&e.x>=an.from-.5&&e.x<=an.to+.5)(e)?" is-lit":"";if(e.mark?.isCap)/* @__PURE__ */
81
+ /* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${ee(Qe,Nn,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${Ft?" is-zooming":""}${Gt?" is-gliding":""}`,onMouseMove:e=>{if(!Kt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left;n>=Kt.from&&n<=Kt.to?kn():Mn()},onMouseLeave:Mn,children:[!fe&&/* @__PURE__ */x(z,{marks:ht,innerRef:Pe}),
82
+ /* @__PURE__ */x(V,{axis:wt,geo:Qe,fillTo:nn,reveal:It,trackPx:et,tweened:!!ae}),Ze&&
83
+ /* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:Je-et+"px",top:Qe.rail+3-1+"px"}}),an&&/* @__PURE__ */x("div",{"aria-hidden":"true",className:"rosh-tl-band","data-timeline-part":"highlight",style:{left:an.from-10+"px",width:an.to-an.from+20+"px",top:Qe.rail-7+"px",height:"20px"}}),
84
+ /* @__PURE__ */x(E,{startMs:n,endMs:p,axis:wt,geo:Qe,reveal:It}),
85
+ /* @__PURE__ */x(G,{geo:Qe,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:It,trackPx:Je}),fe&&/* @__PURE__ */x(_,{nodes:Bt,geo:Qe,reveal:It}),null!==ge&&ge>n&&ge<=p+e&&/* @__PURE__ */x(Y,{x:wt.xByMs(Math.min(ge,p)),geo:Qe,trackPx:Je,label:$e(ge),reveal:It}),!fe&&oe.map(e=>/* @__PURE__ */x(q,{phase:e,geo:Qe,xOf:wt.xByMs},e.key)),
86
+ /* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":me,onKeyDown:yn,children:Bt.map((e,t)=>{const n=t=>null!==t&&e.members.some(e=>e.key===t),l=`${Qe.rail+3}px`,a=It?r(t,St):{},s=(e=>!!an&&e.x>=an.from-.5&&e.x<=an.to+.5)(e)?" is-lit":"";if(e.mark?.isCap)/* @__PURE__ */
87
87
  return x("li",{children:/* @__PURE__ */x("button",{...wn(e.mark),className:`rosh-tl-node rosh-tl-mark is-cap${s}${It?" rosh-tl-pop":""}`,style:{left:`${e.x}px`,top:l,...a}})},e.key);if(!e.mark){const t=e.kind===P,r=R(t?"default":e.kind,"key"),i=t?void 0:A[e.kind]?.glyph;/* @__PURE__ */
88
88
  return f("li",{...n(ot)?{"aria-current":"step"}:{},children:[
89
89
  /* @__PURE__ */f("button",{...Pn(e),className:`${r.className} is-fold${t?" is-mixed":""}${n(re)?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...r.style,left:`${e.x}px`,top:l,...a},children:[i&&/* @__PURE__ */x(g,{name:i}),t&&/* @__PURE__ */f("span",{"aria-hidden":"true",className:"rosh-tl-foldnum",children:["×",e.members.length]})]}),!t&&/* @__PURE__ */f("i",{"aria-hidden":"true",className:"rosh-tl-count"+(It?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:l},children:["×",e.members.length]})]},e.key)}const i=e.mark,o=R(i.kind,i.role,i.provisional),{glyph:c}=i;/* @__PURE__ */
90
- return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...wn(i),className:`${o.className}${i.key===re?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...o.style,left:`${i.x}px`,top:l,...a},children:[c&&/* @__PURE__ */x(g,{name:c}),"current"===i.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(It?" is-on":"")})]})},i.key)})}),"lanes"===ne?/* @__PURE__ */x(q,{groups:ft,trackPx:Qe,geo:qe,startMs:n,endMs:p,currentKey:ot,hoveredKey:Ae,reveal:It,step:St,zoomedKey:Ct,popId:Ve,aimBubble:cn,startCaptionPx:xt,openCluster:He,setOpenCluster:Oe,previewCluster:Ue,setPreviewCluster:Ie,setZoomKey:We}):"active"===ne?/* @__PURE__ */x(Q,{nodes:Bt,trackPx:Qe,geo:qe,activeKey:re,hoveredKey:Ae,currentKey:ot}):null,dn&&/* @__PURE__ */x("div",{ref:Ne,id:Xe,role:"tooltip",className:"rosh-tl-bubble"+(dn.members.some(e=>e.preview)?" is-preview":""),"data-timeline-part":"tooltip",style:{top:`${qe.rail+6+6}px`},onMouseEnter:()=>{kn(),bn(dn.key)},onMouseLeave:()=>{Mn(),$n(dn.key)},onFocus:()=>{kn(),bn(dn.key)},onBlur:()=>{Mn(),$n(dn.key)},children:dn.mark?/* @__PURE__ */f(y,{children:[
90
+ return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...wn(i),className:`${o.className}${i.key===re?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...o.style,left:`${i.x}px`,top:l,...a},children:[c&&/* @__PURE__ */x(g,{name:c}),"current"===i.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(It?" is-on":"")})]})},i.key)})}),"lanes"===ne?/* @__PURE__ */x(Q,{groups:ft,trackPx:Je,geo:Qe,startMs:n,endMs:p,currentKey:ot,hoveredKey:Ae,reveal:It,step:St,zoomedKey:Ct,popId:Ve,aimBubble:cn,startCaptionPx:xt,openCluster:Ue,setOpenCluster:Oe,previewCluster:He,setPreviewCluster:Ie,setZoomKey:ze}):"active"===ne?/* @__PURE__ */x(J,{nodes:Bt,trackPx:Je,geo:Qe,activeKey:re,hoveredKey:Ae,currentKey:ot}):null,dn&&/* @__PURE__ */x("div",{ref:Ne,id:Xe,role:"tooltip",className:"rosh-tl-bubble"+(dn.members.some(e=>e.preview)?" is-preview":""),"data-timeline-part":"tooltip",style:{top:`${Qe.rail+6+6}px`},onMouseEnter:()=>{kn(),bn(dn.key)},onMouseLeave:()=>{Mn(),$n(dn.key)},onFocus:()=>{kn(),bn(dn.key)},onBlur:()=>{Mn(),$n(dn.key)},children:dn.mark?/* @__PURE__ */f(y,{children:[
91
91
  /* @__PURE__ */x("span",{className:"rosh-tl-name",children:dn.mark.label}),
92
92
  /* @__PURE__ */x("span",{className:"rosh-tl-date",children:dn.mark.dateText}),dn.mark.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:dn.mark.preview}):dn.mark.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:dn.mark.detail}),(dn.mark.onOpen??dn.mark.onClick)&&/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-bubble-open text-blue-600","data-timeline-part":"bubble-open",onClick:()=>(dn.mark?.onOpen??dn.mark?.onClick)?.(),children:ve.openButton})]}):
93
93
  /* @__PURE__ */f("div",{className:"rosh-tl-fold-list","data-timeline-part":"fold-members",children:[
@@ -95,5 +95,5 @@ return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */
95
95
  /* @__PURE__ */x("ol",{children:dn.members.map(e=>/* @__PURE__ */f("li",{children:[
96
96
  /* @__PURE__ */f("p",{className:"rosh-tl-foldrow",children:[
97
97
  /* @__PURE__ */x("span",{children:e.label}),
98
- /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]}),e.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:e.preview}):e.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:e.detail})]},e.key))})]})}),ae&&null!==Et&&
99
- /* @__PURE__ */x(Z,{thumb:ae,value:Et,snap:zt,axis:wt,geo:qe,startMs:n,endMs:p,trackPx:Qe,layerRef:we,glide:Gt,onScrub:se?Zt:void 0,nodes:Xt,onProgress:qt})]})}),fe&&Cn(ie?.end,!0)]}),b.length>0&&!fe&&/* @__PURE__ */x(E,{pending:b,reveal:It})]})}export{g as TimelineGlyph,M as TimelineMilestoneIcon,v as TimelineProgressIcon,te as TimelineTrack};
98
+ /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]}),e.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:e.preview}):e.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:e.detail})]},e.key))})]})}),ae&&null!==Wt&&
99
+ /* @__PURE__ */x(Z,{thumb:ae,value:Wt,snap:Et,axis:wt,geo:Qe,startMs:n,endMs:p,trackPx:Je,layerRef:we,glide:Gt,onScrub:se?Zt:void 0,nodes:Xt,onProgress:Qt})]})}),fe&&Cn(ie?.end,!0)]}),b.length>0&&!fe&&/* @__PURE__ */x(W,{pending:b,reveal:It})]})}export{g as TimelineGlyph,M as TimelineMilestoneIcon,v as TimelineProgressIcon,te as TimelineTrack};
@@ -1,4 +1,4 @@
1
- import{Avatar as e}from"./chunk-Z3JW77LH.js";import{StatCard as a,Card as t}from"./chunk-WUKN5WUM.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-5VRMQTKV.js";import{ColumnChart as l}from"./chunk-LB3A53D5.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-LNARMEEZ.js";import{Button_default as c}from"./chunk-NHH2MXFU.js";import{TH_ONE_LINE as n}from"./chunk-OZAAIE4E.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{Avatar as e}from"./chunk-65DYHG73.js";import{StatCard as a,Card as t}from"./chunk-5RAOFJYT.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-KAHYUBXM.js";import{ColumnChart as l}from"./chunk-F52WQG3M.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-LNARMEEZ.js";import{Button_default as c}from"./chunk-NHH2MXFU.js";import{TH_ONE_LINE as n}from"./chunk-OZAAIE4E.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,23 +1,23 @@
1
- import{toast_default as e}from"./chunk-XD34TCRG.js";import{Icon as t}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as r}from"./chunk-QWHQJNKL.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
2
- /* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,z]=s(1),[P,_]=s(0),[D,W]=s(1),[L,S]=s(!0),[T,$]=s(!0),A=i(x.loadFailed);A.current=x.loadFailed,l(()=>{let t=!1;return $(!0),z(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(e=>{t||(j(e),_(e.numPages),$(!1))}).catch(()=>{t||(e.error(A.current),$(!1))}),()=>{t=!0}},[a,g,w]),l(()=>{if(!M||!L||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});W(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,L,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:D}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,D]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const O="page"===d?x.fitPage:x.fitWidth,H="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
1
+ import{toast_default as e}from"./chunk-4XZXY2AF.js";import{Icon as t}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as r}from"./chunk-PEM7UXQ3.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
2
+ /* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,P]=s(1),[z,_]=s(0),[D,S]=s(1),[W,L]=s(!0),[$,A]=s(!0),T=i(x.loadFailed);T.current=x.loadFailed,l(()=>{let t=!1;return A(!0),P(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(e=>{t||(j(e),_(e.numPages),A(!1))}).catch(()=>{t||(e.error(T.current),A(!1))}),()=>{t=!0}},[a,g,w]),l(()=>{if(!M||!W||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});S(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,W,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:D}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,D]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const O="page"===d?x.fitPage:x.fitWidth,F="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
3
3
  return m("div",{className:"flex flex-col h-full",children:[
4
4
  /* @__PURE__ */m(f,{children:[
5
- /* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>z(e=>Math.max(1,e-1)),disabled:E<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
6
- /* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,P)}),
7
- /* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>z(e=>Math.min(P,e+1)),disabled:E>=P,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
5
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>P(e=>Math.max(1,e-1)),disabled:E<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
6
+ /* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,z)}),
7
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>P(e=>Math.min(z,e+1)),disabled:E>=z,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
8
8
  /* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
9
- /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{S(!1),W(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
10
- /* @__PURE__ */m("select",{value:L?"fit":v.includes(Math.round(100*D))?Math.round(100*D):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(S(!1),W(Number(t)/100)):S(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
11
- /* @__PURE__ */u("option",{value:"fit",children:O}),!L&&!v.includes(Math.round(100*D))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*D),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
12
- /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{S(!1),W(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
13
- /* @__PURE__ */u("button",{type:"button",onClick:()=>S(!0),"aria-pressed":L,className:H+(L?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
9
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{L(!1),S(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:F,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
10
+ /* @__PURE__ */m("select",{value:W?"fit":v.includes(Math.round(100*D))?Math.round(100*D):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(L(!1),S(Number(t)/100)):L(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
11
+ /* @__PURE__ */u("option",{value:"fit",children:O}),!W&&!v.includes(Math.round(100*D))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*D),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
12
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{L(!1),S(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:F,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
13
+ /* @__PURE__ */u("button",{type:"button",onClick:()=>L(!0),"aria-pressed":W,className:F+(W?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
14
14
  /* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
15
- /* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=P;e++)n.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:H,children:[
15
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=z;e++)n.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:F,children:[
16
16
  /* @__PURE__ */u(t,{name:"print",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.print]}),
17
- /* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:H,children:[
18
- /* @__PURE__ */u(t,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:H,children:[
17
+ /* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:F,children:[
18
+ /* @__PURE__ */u(t,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:F,children:[
19
19
  /* @__PURE__ */u(t,{name:"email",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.email]})]}),
20
- /* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<P?(e.preventDefault(),z(e=>Math.min(P,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!M)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<P&&(e.preventDefault(),z(e=>Math.min(P,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(P)))},children:T?/* @__PURE__ */u(n,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
20
+ /* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<z?(e.preventDefault(),P(e=>Math.min(z,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),P(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!M)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<z&&(e.preventDefault(),P(e=>Math.min(z,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),P(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),P(1)):"End"===e.key&&(e.preventDefault(),P(z)))},children:$?/* @__PURE__ */u(n,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
21
21
  /* @__PURE__ */u("style",{children:'\n.preview-pdf-textlayer {\n position: absolute;\n inset: 0;\n overflow: clip;\n line-height: 1;\n text-align: initial;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n.preview-pdf-textlayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n}\n.preview-pdf-textlayer > :not(.markedContent),\n.preview-pdf-textlayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n.preview-pdf-textlayer .markedContent {\n display: contents;\n}\n.preview-pdf-textlayer span[role="img"] {\n user-select: none;\n cursor: default;\n}\n.preview-pdf-textlayer ::selection {\n background: rgba(0, 80, 255, 0.25);\n}\n.preview-pdf-textlayer br::selection {\n background: transparent;\n}\n.preview-pdf-textlayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n user-select: none;\n}\n.preview-pdf-textlayer.selecting .endOfContent {\n top: 0;\n}\n'}),
22
22
  /* @__PURE__ */m("div",{className:"relative shadow-lg rounded",children:[
23
23
  /* @__PURE__ */u("canvas",{ref:k,className:"block rounded"}),
@@ -1,11 +1,11 @@
1
- import{Card as e}from"./chunk-WUKN5WUM.js";import{Select_default as a}from"./chunk-CO5RKOVX.js";import{Pagination as r}from"./chunk-ENL5L6NR.js";import{Input_default as t}from"./chunk-MAMWQCJ6.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-LNARMEEZ.js";import{Button_default as l}from"./chunk-NHH2MXFU.js";import{Icon as c}from"./chunk-FSPFV4MI.js";import{TH_ONE_LINE as m}from"./chunk-OZAAIE4E.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,N]=n("");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-5RAOFJYT.js";import{Select_default as a}from"./chunk-4DBPKTVX.js";import{Pagination as r}from"./chunk-P65C5TUU.js";import{Input_default as t}from"./chunk-MAMWQCJ6.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-LNARMEEZ.js";import{Button_default as l}from"./chunk-NHH2MXFU.js";import{Icon as c}from"./chunk-FSPFV4MI.js";import{TH_ONE_LINE as m}from"./chunk-OZAAIE4E.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
2
2
  return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
5
5
  /* @__PURE__ */d(l,{size:"sm",children:"Invite member"})]}),
6
6
  /* @__PURE__ */o(e,{padded:!1,children:[
7
7
  /* @__PURE__ */o("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-100 p-3",children:[
8
- /* @__PURE__ */d("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */d(t,{value:y,onChange:e=>N(e.target.value),placeholder:"Search members…",leftIcon:/* @__PURE__ */d(x,{})})}),
8
+ /* @__PURE__ */d("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */d(t,{value:y,onChange:e=>v(e.target.value),placeholder:"Search members…",leftIcon:/* @__PURE__ */d(x,{})})}),
9
9
  /* @__PURE__ */d("div",{className:"w-40",children:/* @__PURE__ */d(a,{value:g,onChange:f,placeholder:"All roles",options:[{value:"admin",label:"Admin"},{value:"editor",label:"Editor"},{value:"viewer",label:"Viewer"}]})}),
10
10
  /* @__PURE__ */d(l,{variant:"secondary",size:"sm",children:"Filter"})]}),
11
11
  /* @__PURE__ */o("table",{className:"w-full text-sm",children:[
@@ -1,2 +1,2 @@
1
- import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-EFFF3FCS.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-YDEIXM2A.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-QWHQJNKL.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],C=[],x=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const F=i(g??null);let H,L,N=!0;0===j.length?(L=F??M??0,H=L-30*a,N=null!==F||null!==M):(H=j[0].ms,L=F??j[j.length-1].ms,L-H<a&&(L=H+a));const w=j.length>0?Math.max(0,Math.round((L-H)/a)):0,K=u??(w>0?x.duration(w):void 0),O=[j.length>0?x.started(t(j[0].ms,D)):void 0,K,C.length>0?x.reached(j.length,p.length):void 0],E=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),J={};for(const e of j)e.phase&&(J[e.phase]=J[e.phase]||[]).push(e.ms);const Q=Object.entries(J).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),S="rail"===v,A=N&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:S?"spread":"compressed",labels:S?"none":"lanes",items:E,pending:C,phases:Q,startMs:H,endMs:L,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
2
- return h("div",S?{className:"shrink-0","data-timeline-variant":"rail",children:A}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:O,children:A})})}export{m as MilestoneTimeline};
1
+ import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-2SJDTKQA.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-YDEIXM2A.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-PEM7UXQ3.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],x=[],C=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?x.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const w=i(g??null);let H,K,L=!0;0===j.length?(K=w??M??0,H=K-30*a,L=null!==w||null!==M):(H=j[0].ms,K=w??j[j.length-1].ms,K-H<a&&(K=H+a));const N=j.length>0?Math.max(0,Math.round((K-H)/a)):0,O=u??(N>0?C.duration(N):void 0),A=[j.length>0?C.started(t(j[0].ms,D)):void 0,O,x.length>0?C.reached(j.length,p.length):void 0],E=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),J={};for(const e of j)e.phase&&(J[e.phase]=J[e.phase]||[]).push(e.ms);const Q=Object.entries(J).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),S="rail"===v,T=L&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:S?"spread":"compressed",labels:S?"none":"lanes",items:E,pending:x,phases:Q,startMs:H,endMs:K,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:C.milestones(m)})});/* @__PURE__ */
2
+ return h("div",S?{className:"shrink-0","data-timeline-variant":"rail",children:T}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:A,children:T})})}export{m as MilestoneTimeline};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-QWHQJNKL.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-PEM7UXQ3.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
2
2
  return r(e,{name:"align-left"});case"center":/* @__PURE__ */
3
3
  return r(e,{name:"align-center"});case"right":/* @__PURE__ */
4
4
  return r(e,{name:"align-right"});case"justify":/* @__PURE__ */
@@ -1,20 +1,20 @@
1
- import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-5F7HMNCX.js";import{useSettingAuto as d,useInSettingRow as s}from"./chunk-L65BESIE.js";import{inputClasses as c,PLACEHOLDER_INK as u}from"./chunk-AYZY3YNC.js";import{useIsMobile as p}from"./chunk-UGTRSRIW.js";import{optionNoteClass as m}from"./chunk-URHGHXDN.js";import{Icon as v}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as b,MENU_MAX_HEIGHT as g}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as y}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useShellStrings as N}from"./chunk-QWHQJNKL.js";import{forwardRef as k,useId as w,useState as $,useRef as D,useMemo as S,useCallback as j,useEffect as H,useLayoutEffect as E}from"react";import{createPortal as I}from"react-dom";import{jsxs as T,jsx as C,Fragment as z}from"react/jsx-runtime";var O=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,R=k(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:p,renderValue:m,valueText:h,readOnly:f,footer:b,changed:g,auto:y,multiple:x,"aria-describedby":k,...$},D){const S=t,j=N(),H=d(),E=y??H,I=w(),O=s(),R=/* @__PURE__ */T("select",{ref:D,value:e,multiple:x||void 0,onChange:e=>S(x?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[k,E?I:void 0].filter(Boolean).join(" ")||void 0,className:c({invalid:i,size:l,auto:E,className:`${O&&!x?"appearance-none ":""}pr-8 ${a}`.trim()}),...$,children:[void 0!==n&&!x&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:n}),
2
- /* @__PURE__ */C(A,{items:r})]}),B=O&&!x?/* @__PURE__ */T("div",{className:"relative",children:[R,
3
- /* @__PURE__ */C(v,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${u}`,strokeWidth:2})]}):R;return E?/* @__PURE__ */T(z,{children:[B,
4
- /* @__PURE__ */C("span",{id:I,hidden:!0,children:j.settingView.auto})]}):B});function A({items:e}){const t=e=>/* @__PURE__ */C("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
5
- return C(z,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */C("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var B=k(function({value:l,onChange:s,options:p,placeholder:k,invalid:R,className:B="",id:F,disabled:K,size:U,touchSize:V,title:W,multiple:L,renderOption:M,renderValue:P,valueText:G,readOnly:J=!1,footer:Y,changed:Q=!1,auto:X,"aria-describedby":q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ne]=$(!1),[ie,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!Y?.length,me="sm"===U,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=m(me),[fe,be]=$(null),ge=N(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),Ne=w(),ke=`${Ne}-listbox`,we=F??`${Ne}-trigger`,$e=e=>`${Ne}-opt-${e}`,De=`${Ne}-changed`,Se=d(),je=X??Se,He=`${Ne}-auto`,Ee=[q,Q?De:void 0,je?He:void 0].filter(Boolean).join(" ")||void 0,Ie=S(()=>i(p),[p]),Te=L?l:[],Ce=s,ze=b(oe,re,{matchTriggerWidth:!0,...Y?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Oe="undefined"==typeof window?H:E,Re=`${re}|${ze?.top}|${ze?.bottom}|${ze?.maxHeight}|${p.length}`;Oe(()=>{be(null)},[Re]),Oe(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&be(Math.floor(i))},[re,fe,Re]);const Ae=L?Ie.findIndex(e=>Te.includes(e.value)):Ie.findIndex(e=>e.value===l),Be=L?Ie.filter(e=>Te.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ae>=0?Ie[Ae].label:void 0,Fe=!L&&Ae>=0?Ie[Ae].lang:void 0,Ke=L?Ie.filter(e=>Te.includes(e.value)):Ae>=0?[Ie[Ae]]:[],Ue=P&&Ke.length?P(Ke):void 0,Ve=void 0!==Ue&&G?G(Ke):void 0,We=j((e=!0)=>{ne(!1),ae(-1),e&&oe.current?.focus()},[]),Le=j(()=>{K||J||(ae(Ae>=0?Ae:e(Ie)),ne(!0))},[K,J,Ie,Ae]),Me=j(e=>{const t=Ie[e];if(t&&!t.disabled){if(L){const r=l;return Ce(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ce(t.value),We()}},[Ie,L,l,Ce,We]);H(()=>{if(!re)return;return x(e=>!("Escape"!==e.key||!ye.current)&&(We(),!0),ue)},[re,We]),H(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||We(!1)};document.addEventListener("pointerdown",e);const t=h(()=>We(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,We]),H(()=>{!re||ie<0||de.current?.querySelector(`#${CSS.escape($e(ie))}`)?.scrollIntoView({block:"nearest"})},[re,ie]);const Pe=j(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=re?ie:Ae,i=t(Ie,r.buffer,n);i<0||(re?ae(i):L?(ae(i),ne(!0)):Me(i))},[re,ie,Ae,Ie,Me,L]),Ge=re?a(p,(e,t)=>{const r=(n=e.value,L?Te.includes(n):l===n);var n;const i=t===ie;/* @__PURE__ */
6
- return T("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||M?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Me(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${L?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[L&&/* @__PURE__ */C(o,{selected:r}),M?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1 truncate",children:M(e,{selected:r,active:i})}):L?/* @__PURE__ */T("span",{className:"block min-w-0 flex-1",children:[
1
+ import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-5F7HMNCX.js";import{useSettingAuto as d,useInSettingRow as s}from"./chunk-L65BESIE.js";import{inputClasses as c,PLACEHOLDER_INK as u}from"./chunk-AYZY3YNC.js";import{useIsMobile as p}from"./chunk-UGTRSRIW.js";import{optionNoteClass as m}from"./chunk-URHGHXDN.js";import{Icon as v}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as b,MENU_MAX_HEIGHT as g}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as y}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useShellStrings as k}from"./chunk-PEM7UXQ3.js";import{forwardRef as w,useId as N,useState as $,useRef as D,useMemo as S,useCallback as j,useEffect as E,useLayoutEffect as H}from"react";import{createPortal as I}from"react-dom";import{jsxs as T,jsx as C,Fragment as z}from"react/jsx-runtime";var O=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,R=w(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:p,renderValue:m,valueText:h,readOnly:f,footer:b,changed:g,auto:y,multiple:x,"aria-describedby":w,...$},D){const S=t,j=k(),E=d(),H=y??E,I=N(),O=s(),R=/* @__PURE__ */T("select",{ref:D,value:e,multiple:x||void 0,onChange:e=>S(x?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[w,H?I:void 0].filter(Boolean).join(" ")||void 0,className:c({invalid:i,size:l,auto:H,className:`${O&&!x?"appearance-none ":""}pr-8 ${a}`.trim()}),...$,children:[void 0!==n&&!x&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:n}),
2
+ /* @__PURE__ */C(U,{items:r})]}),A=O&&!x?/* @__PURE__ */T("div",{className:"relative",children:[R,
3
+ /* @__PURE__ */C(v,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${u}`,strokeWidth:2})]}):R;return H?/* @__PURE__ */T(z,{children:[A,
4
+ /* @__PURE__ */C("span",{id:I,hidden:!0,children:j.settingView.auto})]}):A});function U({items:e}){const t=e=>/* @__PURE__ */C("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
5
+ return C(z,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */C("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var A=w(function({value:l,onChange:s,options:p,placeholder:w,invalid:R,className:A="",id:B,disabled:F,size:V,touchSize:K,title:M,multiple:P,renderOption:W,renderValue:L,valueText:G,readOnly:X=!1,footer:Y,changed:J=!1,auto:q,"aria-describedby":Q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ne]=$(!1),[ie,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!Y?.length,me="sm"===V,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=m(me),[fe,be]=$(null),ge=k(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),ke=N(),we=`${ke}-listbox`,Ne=B??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,Se=d(),je=q??Se,Ee=`${ke}-auto`,He=[Q,J?De:void 0,je?Ee:void 0].filter(Boolean).join(" ")||void 0,Ie=S(()=>i(p),[p]),Te=P?l:[],Ce=s,ze=b(oe,re,{matchTriggerWidth:!0,...Y?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Oe="undefined"==typeof window?E:H,Re=`${re}|${ze?.top}|${ze?.bottom}|${ze?.maxHeight}|${p.length}`;Oe(()=>{be(null)},[Re]),Oe(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&be(Math.floor(i))},[re,fe,Re]);const Ue=P?Ie.findIndex(e=>Te.includes(e.value)):Ie.findIndex(e=>e.value===l),Ae=P?Ie.filter(e=>Te.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ue>=0?Ie[Ue].label:void 0,Be=!P&&Ue>=0?Ie[Ue].lang:void 0,Fe=P?Ie.filter(e=>Te.includes(e.value)):Ue>=0?[Ie[Ue]]:[],Ve=L&&Fe.length?L(Fe):void 0,Ke=void 0!==Ve&&G?G(Fe):void 0,Me=j((e=!0)=>{ne(!1),ae(-1),e&&oe.current?.focus()},[]),Pe=j(()=>{F||X||(ae(Ue>=0?Ue:e(Ie)),ne(!0))},[F,X,Ie,Ue]),We=j(e=>{const t=Ie[e];if(t&&!t.disabled){if(P){const r=l;return Ce(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ce(t.value),Me()}},[Ie,P,l,Ce,Me]);E(()=>{if(!re)return;return x(e=>!("Escape"!==e.key||!ye.current)&&(Me(),!0),ue)},[re,Me]),E(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Me(!1)};document.addEventListener("pointerdown",e);const t=h(()=>Me(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Me]),E(()=>{!re||ie<0||de.current?.querySelector(`#${CSS.escape($e(ie))}`)?.scrollIntoView({block:"nearest"})},[re,ie]);const Le=j(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=re?ie:Ue,i=t(Ie,r.buffer,n);i<0||(re?ae(i):P?(ae(i),ne(!0)):We(i))},[re,ie,Ue,Ie,We,P]),Ge=re?a(p,(e,t)=>{const r=(n=e.value,P?Te.includes(n):l===n);var n;const i=t===ie;/* @__PURE__ */
6
+ return T("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||W?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>We(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${P?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[P&&/* @__PURE__ */C(o,{selected:r}),W?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1 truncate",children:W(e,{selected:r,active:i})}):P?/* @__PURE__ */T("span",{className:"block min-w-0 flex-1",children:[
7
7
  /* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
8
8
  /* @__PURE__ */T(z,{children:[
9
- /* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.label]},e.value)},Ne,"mx-1"):null,Je=void 0!==Ue?
9
+ /* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Xe=void 0!==Ve?
10
10
  /* @__PURE__ */T("span",{className:"relative block min-w-0 truncate",children:[
11
- /* @__PURE__ */C("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ue}),
12
- /* @__PURE__ */C("span",{lang:void 0===Ve?Fe:void 0,className:"sr-only",children:Ve??Be})]}):/* @__PURE__ */C("span",{lang:Fe,className:`block truncate ${void 0===Be?u:""}`,children:Be??k??" "}),Ye={zIndex:f.popup,left:ze?.left,top:ze?.top,bottom:ze?.bottom,width:ze?.width,maxHeight:ze?.maxHeight??g,visibility:ze?void 0:"hidden",...y()},Qe=/* @__PURE__ */C("div",{ref:de,id:ke,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":L||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Ye,maxHeight:fe}:Ye,children:Ge}),Xe=pe?/* @__PURE__ */T("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ye,children:[Qe,
13
- /* @__PURE__ */C("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:Y.map((e,t)=>/* @__PURE__ */T("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(We(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(Y?.length??0)-1,n=t=>{e.preventDefault(),ce.current[t]?.focus()},i=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void We());case"Escape":return e.preventDefault(),e.stopPropagation(),void We()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */C(v,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
14
- /* @__PURE__ */C("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Qe;/* @__PURE__ */
11
+ /* @__PURE__ */C("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ve}),
12
+ /* @__PURE__ */C("span",{lang:void 0===Ke?Be:void 0,className:"sr-only",children:Ke??Ae})]}):/* @__PURE__ */C("span",{lang:Be,className:`block truncate ${void 0===Ae?u:""}`,children:Ae??w??" "}),Ye={zIndex:f.popup,left:ze?.left,top:ze?.top,bottom:ze?.bottom,width:ze?.width,maxHeight:ze?.maxHeight??g,visibility:ze?void 0:"hidden",...y()},Je=/* @__PURE__ */C("div",{ref:de,id:we,role:"listbox","aria-labelledby":_??(Z?void 0:Ne),"aria-label":_?void 0:Z,"aria-multiselectable":P||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Ye,maxHeight:fe}:Ye,children:Ge}),qe=pe?/* @__PURE__ */T("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ye,children:[Je,
13
+ /* @__PURE__ */C("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:Y.map((e,t)=>/* @__PURE__ */T("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Me(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(Y?.length??0)-1,n=t=>{e.preventDefault(),ce.current[t]?.focus()},i=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Me());case"Escape":return e.preventDefault(),e.stopPropagation(),void Me()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */C(v,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
14
+ /* @__PURE__ */C("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Je;/* @__PURE__ */
15
15
  return T("div",{ref:le,className:"relative",children:[
16
- /* @__PURE__ */C("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?ke:void 0,"aria-activedescendant":re&&ie>=0?$e(ie):void 0,"aria-invalid":R||void 0,"aria-describedby":Ee,"aria-label":Z,"aria-labelledby":_,title:W,disabled:K,"aria-readonly":J||void 0,onClick:()=>re?We():Le(),onKeyDown:t=>{if(!K&&!J)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>n(Ie,e,1)):Le());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>n(Ie,e,-1)):Le());case"Home":return void(re&&(t.preventDefault(),ae(e(Ie))));case"End":return void(re&&(t.preventDefault(),ae(r(Ie))));case"Enter":return void(re&&(t.preventDefault(),Me(ie)));case" ":return t.preventDefault(),void(re?Me(ie):Le());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),We()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&We(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Pe(t.key))}},className:c({invalid:R,size:U,readOnly:J,auto:je,className:`${J?"":"pr-8 "}text-left ${B}`.trim()}),children:Q?
17
- /* @__PURE__ */T("span",{className:"flex min-w-0 items-center gap-1",children:[Je,
18
- /* @__PURE__ */C("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Je}),Q&&/* @__PURE__ */C("span",{id:De,hidden:!0,children:ge.select.changed}),je&&/* @__PURE__ */C("span",{id:He,hidden:!0,children:ge.settingView.auto}),!J&&/* @__PURE__ */C(v,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${u}`,strokeWidth:2}),
19
- /* @__PURE__ */T("select",{ref:te,value:l,multiple:L||void 0,onChange:e=>Ce(L?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:K,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==k&&!L&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:k}),
20
- /* @__PURE__ */C(A,{items:p})]}),re&&I(Xe,document.body)]})}),F=k(function({touchSize:e,...t},r){const n=p(),i=s(),a=e??(i?t.size??"md":"touch");return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */C(R,{ref:r,...t,size:a}):/* @__PURE__ */C(B,{ref:r,...t}):/* @__PURE__ */C(B,{ref:r,...t,size:a})});export{R as NativeSelect,F as Select_default};
16
+ /* @__PURE__ */C("button",{ref:oe,id:Ne,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?we:void 0,"aria-activedescendant":re&&ie>=0?$e(ie):void 0,"aria-invalid":R||void 0,"aria-describedby":He,"aria-label":Z,"aria-labelledby":_,title:M,disabled:F,"aria-readonly":X||void 0,onClick:()=>re?Me():Pe(),onKeyDown:t=>{if(!F&&!X)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>n(Ie,e,1)):Pe());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>n(Ie,e,-1)):Pe());case"Home":return void(re&&(t.preventDefault(),ae(e(Ie))));case"End":return void(re&&(t.preventDefault(),ae(r(Ie))));case"Enter":return void(re&&(t.preventDefault(),We(ie)));case" ":return t.preventDefault(),void(re?We(ie):Pe());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Me()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Me(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:c({invalid:R,size:V,readOnly:X,auto:je,className:`${X?"":"pr-8 "}text-left ${A}`.trim()}),children:J?
17
+ /* @__PURE__ */T("span",{className:"flex min-w-0 items-center gap-1",children:[Xe,
18
+ /* @__PURE__ */C("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Xe}),J&&/* @__PURE__ */C("span",{id:De,hidden:!0,children:ge.select.changed}),je&&/* @__PURE__ */C("span",{id:Ee,hidden:!0,children:ge.settingView.auto}),!X&&/* @__PURE__ */C(v,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${u}`,strokeWidth:2}),
19
+ /* @__PURE__ */T("select",{ref:te,value:l,multiple:P||void 0,onChange:e=>Ce(P?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:F,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==w&&!P&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:w}),
20
+ /* @__PURE__ */C(U,{items:p})]}),re&&I(qe,document.body)]})}),B=w(function({touchSize:e,...t},r){const n=p(),i=s(),a=e??(i?t.size??"md":"touch");return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */C(R,{ref:r,...t,size:a}):/* @__PURE__ */C(A,{ref:r,...t}):/* @__PURE__ */C(A,{ref:r,...t,size:a})});export{R as NativeSelect,B as Select_default};
@@ -1 +1 @@
1
- import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-QWHQJNKL.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
1
+ import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-PEM7UXQ3.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
@@ -1,9 +1,9 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-DZTAGMNY.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-TNTQL6SX.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-QWHQJNKL.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),N=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:n}){const o=u[n],[f,v]=m(!1),w=c(()=>v(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,w,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):N,[j,A]=a(b.partOf);/* @__PURE__ */
2
- return p(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-6FI3HVUR.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-LFSCENKW.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-PEM7UXQ3.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:n}){const o=u[n],[f,w]=m(!1),N=c(()=>w(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,N,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):v,[j,F]=a(b.partOf);/* @__PURE__ */
2
+ return p(t,{open:!0,onClose:()=>w(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
4
4
  /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:o.name}),
5
5
  /* @__PURE__ */p("p",{className:"text-2xs font-mono text-ink-faintest",children:b.version(o.version)}),
6
6
  /* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[n]}),
7
7
  /* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
8
  /* @__PURE__ */h("p",{className:"text-2xs text-ink-faint",children:[j,
9
- /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),A]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(s)})]})]})})}export{v as AboutApp,u as BUILTIN_APP_INFO};
9
+ /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),F]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(s)})]})]})})}export{w as AboutApp,u as BUILTIN_APP_INFO};
@@ -1,4 +1,4 @@
1
- import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-JKHWZ2ZY.js";import{ChartFrame as a}from"./chunk-2MLRK7IO.js";import{ColumnChart as l}from"./chunk-LB3A53D5.js";import{TH_ONE_LINE as s}from"./chunk-OZAAIE4E.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
1
+ import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-P6SATWL5.js";import{ChartFrame as a}from"./chunk-2GPHHW7C.js";import{ColumnChart as l}from"./chunk-F52WQG3M.js";import{TH_ONE_LINE as s}from"./chunk-OZAAIE4E.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
2
2
  /* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
3
3
  /* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
4
4
  /* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[