efficient-shell 11.10.0 → 11.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/README.md +3 -1
  2. package/dist/{Browser-FIRNNCSC.js → Browser-LPGSKKLU.js} +17 -17
  3. package/dist/Calculator-XUV5JV3O.js +29 -0
  4. package/dist/{CurrencyConverter-LU7QXMOI.js → CurrencyConverter-N2HQT7IR.js} +6 -6
  5. package/dist/Documents-IRPS3N5T.js +84 -0
  6. package/dist/Files-VN2IOPHX.js +88 -0
  7. package/dist/{Notepad-HNED2SWM.js → Notepad-JCWNOQET.js} +10 -10
  8. package/dist/PdfViewer-M4RTCNNE.js +1 -0
  9. package/dist/PomodoroTimer-356JUEM3.js +91 -0
  10. package/dist/{Preview-OGSYTTKC.js → Preview-X7XNDI6X.js} +35 -35
  11. package/dist/Sidebar-OZMJNAXN.js +44 -0
  12. package/dist/{Spreadsheet-4HZR2TUV.js → Spreadsheet-YQOVGIU7.js} +67 -67
  13. package/dist/{Stock-4BOTUHWE.js → Stock-2XOOZNRR.js} +3 -3
  14. package/dist/{Weather-NDUOK3P3.js → Weather-ZDU2722T.js} +21 -21
  15. package/dist/{WorldClock-FH6NFTOM.js → WorldClock-PQGERFCH.js} +6 -6
  16. package/dist/ai/index.js +91 -91
  17. package/dist/apps/index.d.ts +21 -2
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/media-host-check.js +1 -1
  20. package/dist/bin/ui-check.js +1 -1
  21. package/dist/brand.css +1 -1
  22. package/dist/charts/BoxPlotChart.js +1 -1
  23. package/dist/charts/CandlestickChart.js +1 -1
  24. package/dist/charts/CartesianPlot.js +1 -1
  25. package/dist/charts/ChartBrush.js +1 -1
  26. package/dist/charts/ChartFrame.js +1 -1
  27. package/dist/charts/ChartSkeleton.js +1 -1
  28. package/dist/charts/ChordChart.js +1 -1
  29. package/dist/charts/ColumnChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/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.js +1 -1
  45. package/dist/charts/TreemapChart.js +1 -1
  46. package/dist/charts/WaterfallChart.js +1 -1
  47. package/dist/{chunk-Z32K3LIJ.js → chunk-225LCPO7.js} +1 -1
  48. package/dist/{chunk-FNMF42DQ.js → chunk-2E3K4FSQ.js} +2 -2
  49. package/dist/chunk-2NRNKF46.js +9 -0
  50. package/dist/{chunk-HTTICQBP.js → chunk-2XOH3NJZ.js} +18 -18
  51. package/dist/{chunk-4UKPDURO.js → chunk-2XORVHF2.js} +1 -1
  52. package/dist/{chunk-IDRAW6MT.js → chunk-2ZAFRGRF.js} +2 -2
  53. package/dist/{chunk-DH2DKQKS.js → chunk-34AHNPW7.js} +1 -1
  54. package/dist/{chunk-UZ7TKJRO.js → chunk-3N2MNOV5.js} +1 -1
  55. package/dist/{chunk-PC44XTGN.js → chunk-3PZI2C4R.js} +1 -1
  56. package/dist/{chunk-DGA4SO27.js → chunk-4APQHXLI.js} +2 -2
  57. package/dist/chunk-4EVYK6DR.js +14 -0
  58. package/dist/{chunk-TKE3EF2U.js → chunk-4JJ5WT4D.js} +1 -1
  59. package/dist/{chunk-QVAOSKFO.js → chunk-4TB4CSLB.js} +8 -8
  60. package/dist/{chunk-SJQKEIS7.js → chunk-5IESW4PM.js} +5 -5
  61. package/dist/{chunk-SZTIP6T7.js → chunk-5KKJAYKT.js} +1 -1
  62. package/dist/{chunk-PBMAMVSE.js → chunk-5UCRYSQJ.js} +5 -5
  63. package/dist/chunk-5W3U3EVG.js +7 -0
  64. package/dist/{chunk-VNTJ7QO5.js → chunk-5YP7MFPK.js} +1 -1
  65. package/dist/chunk-64KZ74CS.js +8 -0
  66. package/dist/{chunk-ZWLOVJWN.js → chunk-6C6M3QXL.js} +1 -1
  67. package/dist/{chunk-LLNWE7DR.js → chunk-6CK44QWU.js} +30 -30
  68. package/dist/{chunk-UIN2LUCZ.js → chunk-6ETRVCMH.js} +14 -14
  69. package/dist/{chunk-MOL2ND6G.js → chunk-6S6FJJKP.js} +5 -5
  70. package/dist/{chunk-RSJLN3EG.js → chunk-6UJYRGWY.js} +1 -1
  71. package/dist/{chunk-AJ6HMM4P.js → chunk-6WPKLF6G.js} +13 -13
  72. package/dist/{chunk-MQHUVZWM.js → chunk-7A2Y3W55.js} +1 -1
  73. package/dist/{chunk-HYXDKY2L.js → chunk-7FCIFHO7.js} +1 -1
  74. package/dist/chunk-7TVGP2SX.js +8 -0
  75. package/dist/{chunk-R64OZ6TC.js → chunk-7V32O5NF.js} +6 -4
  76. package/dist/{chunk-YY5TUQS4.js → chunk-AD27M3ZH.js} +3 -3
  77. package/dist/{chunk-KZ6JVHFI.js → chunk-AO7XAAGG.js} +1 -1
  78. package/dist/{chunk-NTKNM25F.js → chunk-AQ7CNPEE.js} +9 -9
  79. package/dist/{chunk-U6IJL4Q5.js → chunk-AWQ5SOC5.js} +1 -1
  80. package/dist/{chunk-LVHQJ5TW.js → chunk-B2AYI45X.js} +7 -7
  81. package/dist/chunk-BOJEZKYS.js +14 -0
  82. package/dist/{chunk-YIFRSPUM.js → chunk-BPJ3CQH7.js} +9 -9
  83. package/dist/{chunk-IW2QNPDG.js → chunk-CAIKDX2M.js} +2 -2
  84. package/dist/chunk-CGA6RTVI.js +9 -0
  85. package/dist/{chunk-YGCVMPIU.js → chunk-CR3YDABU.js} +1 -1
  86. package/dist/chunk-CR42APAY.js +8 -0
  87. package/dist/{chunk-YM4XIO4K.js → chunk-CXZ7PHHF.js} +5 -5
  88. package/dist/{chunk-L3RLB37Y.js → chunk-D4RVWSUT.js} +1 -1
  89. package/dist/{chunk-PMKR2BF2.js → chunk-D5MN3LXC.js} +17 -17
  90. package/dist/{chunk-7N4P6LGD.js → chunk-DHMOJX2Z.js} +1 -1
  91. package/dist/{chunk-RKL47W7I.js → chunk-DMBA6KYQ.js} +6 -6
  92. package/dist/{chunk-WYSNMIZN.js → chunk-DXKXETTT.js} +1 -1
  93. package/dist/chunk-EBGOENC3.js +3 -0
  94. package/dist/{chunk-IAUEISDQ.js → chunk-ELIWGIR7.js} +9 -9
  95. package/dist/{chunk-OUXSI6X4.js → chunk-EQ72AP5E.js} +1 -1
  96. package/dist/chunk-ES2LUEPN.js +22 -0
  97. package/dist/{chunk-SIA3W7VE.js → chunk-F33L4J3P.js} +6 -6
  98. package/dist/{chunk-D2BXHFYK.js → chunk-FD6XZRWA.js} +1 -1
  99. package/dist/{chunk-B4D23ZLJ.js → chunk-FEUTN4GK.js} +1 -1
  100. package/dist/{chunk-E2LRAOCL.js → chunk-FFNPAJLS.js} +10 -10
  101. package/dist/{chunk-H5YD72OP.js → chunk-FRH2AHPI.js} +1 -1
  102. package/dist/{chunk-OE77XFOV.js → chunk-FUHURDBL.js} +1 -1
  103. package/dist/chunk-FZWSP7KJ.js +28 -0
  104. package/dist/chunk-G3FHFWC2.js +4 -0
  105. package/dist/{chunk-OZEPYQ7E.js → chunk-GJFTO7D4.js} +1 -1
  106. package/dist/{chunk-L433UT5E.js → chunk-GJVGGYQ2.js} +1 -1
  107. package/dist/{chunk-QIVIQUKB.js → chunk-GRC46C4V.js} +7 -7
  108. package/dist/{chunk-2UTCGWMZ.js → chunk-GS74BABV.js} +4 -4
  109. package/dist/{chunk-4VF66WBB.js → chunk-HDABS36W.js} +16 -16
  110. package/dist/{chunk-U7T2ONAY.js → chunk-HGMQOHMK.js} +1 -1
  111. package/dist/{chunk-HWFBNYNI.js → chunk-HJBR73GS.js} +1 -1
  112. package/dist/{chunk-ONIL7WXO.js → chunk-HJM4LSMM.js} +1 -1
  113. package/dist/{chunk-IXSSBGRD.js → chunk-HOEEFFE3.js} +8 -8
  114. package/dist/{chunk-IKKQ4P4R.js → chunk-HT7SOOMD.js} +10 -10
  115. package/dist/{chunk-GV5VNWPG.js → chunk-I5GDAQYL.js} +2 -2
  116. package/dist/{chunk-QL5E3MU3.js → chunk-IFWXC323.js} +1 -1
  117. package/dist/{chunk-JGVKGEIV.js → chunk-IIKPM3F4.js} +1 -1
  118. package/dist/{chunk-RPTOAKLB.js → chunk-IJ6HZXZY.js} +1 -1
  119. package/dist/{chunk-PAC4LK2N.js → chunk-IKKR2TYY.js} +5 -5
  120. package/dist/{chunk-JJHPPTM6.js → chunk-IUG4Z2ND.js} +1 -1
  121. package/dist/{chunk-RQ6TC6RM.js → chunk-JFCCI5L2.js} +1 -1
  122. package/dist/{chunk-NGUXPP5Q.js → chunk-JGWUSJDD.js} +53 -53
  123. package/dist/{chunk-KPFYXVCO.js → chunk-JJLAI6GL.js} +8 -8
  124. package/dist/{chunk-KMSK6QQB.js → chunk-JJZAYAVL.js} +1 -1
  125. package/dist/{chunk-MFDOGLFO.js → chunk-JRCFOZEU.js} +3 -3
  126. package/dist/{chunk-7QRKZOXR.js → chunk-K3IUUZO5.js} +8 -8
  127. package/dist/chunk-KU4IWX6F.js +2 -0
  128. package/dist/{chunk-T2ZFXPQV.js → chunk-KV4QPU6U.js} +21 -21
  129. package/dist/{chunk-MWKLLAJT.js → chunk-KVVZLEUG.js} +1 -1
  130. package/dist/{chunk-JADBOQ7S.js → chunk-KYHDDVTR.js} +5 -5
  131. package/dist/{chunk-P7NO3NGC.js → chunk-L2IPWMLI.js} +7 -7
  132. package/dist/chunk-L74WV4RJ.js +6 -0
  133. package/dist/{chunk-ALMBY7QO.js → chunk-LJJ7FDAQ.js} +5 -5
  134. package/dist/{chunk-AFROFSDW.js → chunk-LLSLY6BT.js} +1 -1
  135. package/dist/{chunk-EP5BHBZQ.js → chunk-LP45EML2.js} +1 -1
  136. package/dist/{chunk-4L4GQW7P.js → chunk-LWFH5QTJ.js} +1 -1
  137. package/dist/{chunk-QIEAZN6Z.js → chunk-LXBBJNBQ.js} +1 -1
  138. package/dist/{chunk-SXBOODCJ.js → chunk-LXQHTY3A.js} +5 -5
  139. package/dist/{chunk-V6LPIDZ6.js → chunk-M4AOQYSP.js} +1 -1
  140. package/dist/{chunk-MG4IUKVP.js → chunk-MD6EPKOR.js} +10 -10
  141. package/dist/chunk-MFP5KOQW.js +9 -0
  142. package/dist/{chunk-37JAU3U7.js → chunk-N75MPMLD.js} +1 -1
  143. package/dist/{chunk-SDAX6BXF.js → chunk-NMQGAP3H.js} +1 -1
  144. package/dist/{chunk-NFNDXE5O.js → chunk-NPT6EXHK.js} +3 -3
  145. package/dist/{chunk-DWR6RVX5.js → chunk-NTUZT37J.js} +4 -4
  146. package/dist/{chunk-FOHOSUK3.js → chunk-O6VIHWYU.js} +1 -1
  147. package/dist/{chunk-5MGNT7XM.js → chunk-OCWWEHNR.js} +2 -2
  148. package/dist/{chunk-OQG3XO4Y.js → chunk-OLJUPBY4.js} +1 -1
  149. package/dist/{chunk-LNGLJA6K.js → chunk-OMROEVOP.js} +1 -1
  150. package/dist/{chunk-HRXQCHKI.js → chunk-P75N466Z.js} +1 -1
  151. package/dist/{chunk-VTXCCFJ4.js → chunk-PDFV3YQB.js} +3 -3
  152. package/dist/{chunk-FTGA5IPI.js → chunk-PETBAYS5.js} +14 -14
  153. package/dist/{chunk-O4OFURPC.js → chunk-PL4HKGYP.js} +1 -1
  154. package/dist/{chunk-NSYCJTHE.js → chunk-PMKBWDXO.js} +1 -1
  155. package/dist/{chunk-OS2KE6QG.js → chunk-PTVTNCD6.js} +4 -4
  156. package/dist/{chunk-2JTG3U5L.js → chunk-PVVHWLNX.js} +1 -1
  157. package/dist/{chunk-YMBNVMFU.js → chunk-Q7UTGO73.js} +10 -10
  158. package/dist/chunk-QDL2FNP7.js +8 -0
  159. package/dist/{chunk-ED6HJBCO.js → chunk-R6TDZ7T5.js} +1 -1
  160. package/dist/chunk-R7KRBKFH.js +5 -0
  161. package/dist/{chunk-PTWKG635.js → chunk-RBAC26J7.js} +4 -4
  162. package/dist/{chunk-A65PRSKV.js → chunk-RMSF4UCJ.js} +4 -4
  163. package/dist/{chunk-276JUQXK.js → chunk-RXVFAFEB.js} +1 -1
  164. package/dist/{chunk-HBS4HYQM.js → chunk-SAASFWKB.js} +1 -1
  165. package/dist/{chunk-LZJCULO7.js → chunk-SEP35R2E.js} +1 -1
  166. package/dist/chunk-SI33IE7G.js +2 -0
  167. package/dist/{chunk-PR42NIDL.js → chunk-SKRFI6WB.js} +12 -12
  168. package/dist/chunk-SPMD7UZO.js +19 -0
  169. package/dist/{chunk-5DZN6ZDE.js → chunk-SSM6P43S.js} +9 -9
  170. package/dist/{chunk-WTTXLWMK.js → chunk-T74FGTLW.js} +8 -8
  171. package/dist/{chunk-WMS2DCRV.js → chunk-TTQJQKCE.js} +10 -10
  172. package/dist/{chunk-WDZUPDNC.js → chunk-TZXAW32T.js} +1 -1
  173. package/dist/{chunk-IEHTZR5M.js → chunk-UBQUXUD2.js} +5 -5
  174. package/dist/{chunk-ZGQ6H2PU.js → chunk-UCAMOW53.js} +4 -4
  175. package/dist/{chunk-WZMZ3N5B.js → chunk-UEWB6IOD.js} +2 -2
  176. package/dist/{chunk-EOYGTVNS.js → chunk-UHGAT5MH.js} +5 -5
  177. package/dist/{chunk-BAT5B2LE.js → chunk-UOGF37Z4.js} +1 -1
  178. package/dist/{chunk-GPCTDEXQ.js → chunk-UTITWGVW.js} +1 -1
  179. package/dist/{chunk-A2SP4IZV.js → chunk-UVMM7AYO.js} +1 -1
  180. package/dist/{chunk-HYNUJY6W.js → chunk-UZTKBA7Z.js} +12 -12
  181. package/dist/{chunk-BXTSBORU.js → chunk-VEATEVMV.js} +1 -1
  182. package/dist/{chunk-DXFG4H4V.js → chunk-VIDT4JLR.js} +1 -1
  183. package/dist/{chunk-ZM2NOLT6.js → chunk-VU5P4ZM5.js} +12 -12
  184. package/dist/{chunk-OYTRB237.js → chunk-VVDK7XPH.js} +1 -1
  185. package/dist/{chunk-TURECNEK.js → chunk-VZ52KKNA.js} +6 -6
  186. package/dist/{chunk-ZDDYTXPK.js → chunk-WEEQDPU3.js} +6 -6
  187. package/dist/{chunk-YKEB576T.js → chunk-WOOKUEED.js} +1 -1
  188. package/dist/{chunk-2V3LKX7G.js → chunk-WZJPASST.js} +6 -6
  189. package/dist/{chunk-2CPYXRR2.js → chunk-XOH6QERF.js} +7 -7
  190. package/dist/{chunk-EMUZJMR3.js → chunk-Y4RHGLXB.js} +1 -1
  191. package/dist/{chunk-FRNSCVPN.js → chunk-YOXR3VKO.js} +1 -1
  192. package/dist/{chunk-LPTN55KO.js → chunk-YQLKZ5UQ.js} +1 -1
  193. package/dist/chunk-YXSGMPNW.js +1 -0
  194. package/dist/{chunk-CFFT5OCV.js → chunk-ZA2RBNRA.js} +1 -1
  195. package/dist/{chunk-QRZBLNOQ.js → chunk-ZHS2VQU7.js} +3 -3
  196. package/dist/{chunk-RDTKMSEK.js → chunk-ZKBGUDNB.js} +1 -1
  197. package/dist/{chunk-GNWK77U7.js → chunk-ZMC25LRC.js} +1 -1
  198. package/dist/data/DataTable.js +1 -1
  199. package/dist/data/EntityList.js +1 -1
  200. package/dist/data/Kanban.js +1 -1
  201. package/dist/data/ListFooter.js +1 -1
  202. package/dist/data/ListLoadError.js +1 -1
  203. package/dist/data/Pagination.js +1 -1
  204. package/dist/data/ResizableTable.js +1 -1
  205. package/dist/file-intake/index.js +1 -1
  206. package/dist/format/index.js +1 -1
  207. package/dist/forms/BorderInput.js +1 -1
  208. package/dist/forms/BrandAssetEditor.js +1 -1
  209. package/dist/forms/Calendar.js +1 -1
  210. package/dist/forms/ColorPicker.js +1 -1
  211. package/dist/forms/ComposerAttachments.js +1 -1
  212. package/dist/forms/CornersInput.js +1 -1
  213. package/dist/forms/DatePicker.js +1 -1
  214. package/dist/forms/DateRangePicker.js +1 -1
  215. package/dist/forms/DateTimePicker.js +1 -1
  216. package/dist/forms/DisplayChips.js +1 -1
  217. package/dist/forms/FilePicker.js +1 -1
  218. package/dist/forms/FormErrorSummary.js +1 -1
  219. package/dist/forms/IconPicker.js +1 -1
  220. package/dist/forms/ImageFocusPoint.js +1 -1
  221. package/dist/forms/Input.js +1 -1
  222. package/dist/forms/InputNumber.js +1 -1
  223. package/dist/forms/LinkPicker.js +1 -1
  224. package/dist/forms/MediaLibrary.js +1 -1
  225. package/dist/forms/MediaUploadField.js +1 -1
  226. package/dist/forms/MediaUploadGrid.js +1 -1
  227. package/dist/forms/MediaUsedInList.js +1 -1
  228. package/dist/forms/NumericKeypad.js +1 -1
  229. package/dist/forms/PositionInput.js +1 -1
  230. package/dist/forms/RenameField.js +1 -1
  231. package/dist/forms/Select.js +1 -1
  232. package/dist/forms/SidesInput.js +1 -1
  233. package/dist/forms/Slider.js +1 -1
  234. package/dist/forms/Snippet.js +1 -1
  235. package/dist/forms/SplitButton.js +1 -1
  236. package/dist/forms/TagInput.js +1 -1
  237. package/dist/forms/TextToolbar.js +1 -1
  238. package/dist/forms/TimePicker.js +1 -1
  239. package/dist/forms/WidthsBar.js +1 -1
  240. package/dist/forms/mediaLibraryMenu.js +1 -1
  241. package/dist/forms/mediaMoveItems.js +1 -1
  242. package/dist/forms/textAlign.js +1 -1
  243. package/dist/forms/useFileIntake.js +1 -1
  244. package/dist/icons/index.js +1 -1
  245. package/dist/index.js +518 -518
  246. package/dist/locales/zh-Hans.js +1 -1
  247. package/dist/map/index.js +3 -3
  248. package/dist/markdown/index.js +1 -1
  249. package/dist/page-tabs/index.js +5 -5
  250. package/dist/pdf/index.js +1 -1
  251. package/dist/shell/Accordion.js +1 -1
  252. package/dist/shell/AppUpdateBanner.js +1 -1
  253. package/dist/shell/Avatar.js +1 -1
  254. package/dist/shell/Banner.js +1 -1
  255. package/dist/shell/Breadcrumbs.js +1 -1
  256. package/dist/shell/BudgetBar.js +1 -1
  257. package/dist/shell/Card.js +1 -1
  258. package/dist/shell/ColoredBadge.js +1 -1
  259. package/dist/shell/ConfirmDialog.js +1 -1
  260. package/dist/shell/ContainerFillChart.js +1 -1
  261. package/dist/shell/ContextMenu.js +1 -1
  262. package/dist/shell/CountBadge.js +1 -1
  263. package/dist/shell/Dialog.js +1 -1
  264. package/dist/shell/Drawer.js +1 -1
  265. package/dist/shell/DropdownMenu.js +1 -1
  266. package/dist/shell/EditableGrid.js +1 -1
  267. package/dist/shell/EmptyState.js +1 -1
  268. package/dist/shell/GlobalSearch.js +1 -1
  269. package/dist/shell/HelpCenter.js +1 -1
  270. package/dist/shell/IconRail.js +1 -1
  271. package/dist/shell/ImageLightbox.js +1 -1
  272. package/dist/shell/ItemCount.js +1 -1
  273. package/dist/shell/LanguageSelect.js +1 -1
  274. package/dist/shell/Markdown.js +1 -1
  275. package/dist/shell/MetricBar.js +1 -1
  276. package/dist/shell/MetricBarLegend.js +1 -1
  277. package/dist/shell/MilestoneTimeline.js +1 -1
  278. package/dist/shell/PageHeader.js +1 -1
  279. package/dist/shell/PopupMenu.js +1 -1
  280. package/dist/shell/ProductionTimeline.js +1 -1
  281. package/dist/shell/ResizeHandle.js +1 -1
  282. package/dist/shell/Result.js +1 -1
  283. package/dist/shell/SearchableSelect.js +1 -1
  284. package/dist/shell/SettingReset.js +1 -1
  285. package/dist/shell/SettingRow.js +1 -1
  286. package/dist/shell/SidebarLayout.js +1 -1
  287. package/dist/shell/SidebarNav.js +1 -1
  288. package/dist/shell/SortableList.js +1 -1
  289. package/dist/shell/Statistic.js +1 -1
  290. package/dist/shell/StepChain.js +1 -1
  291. package/dist/shell/Stepper.js +1 -1
  292. package/dist/shell/TimeAgo.js +1 -1
  293. package/dist/shell/TimelineTrack.js +1 -1
  294. package/dist/shell/TopNav.js +1 -1
  295. package/dist/shell/TransferProgress.js +1 -1
  296. package/dist/shell/Tree.js +1 -1
  297. package/dist/shell/discardGuard.js +1 -1
  298. package/dist/shell/language.js +1 -1
  299. package/dist/shell/strings.d.ts +134 -0
  300. package/dist/shell/strings.js +1 -1
  301. package/dist/shell/toast.js +1 -1
  302. package/dist/telemetry/index.js +1 -1
  303. package/dist/templates/AuthScreen.js +1 -1
  304. package/dist/templates/ChatTemplate.js +1 -1
  305. package/dist/templates/CheckoutTemplate.js +1 -1
  306. package/dist/templates/DashboardTemplate.js +1 -1
  307. package/dist/templates/DataTablePage.js +1 -1
  308. package/dist/templates/EmailTemplate.js +1 -1
  309. package/dist/templates/ErrorBoundary.js +1 -1
  310. package/dist/templates/ErrorPage.js +1 -1
  311. package/dist/templates/FormLayoutPage.js +1 -1
  312. package/dist/templates/GalleryTemplate.js +1 -1
  313. package/dist/ui/index.js +1 -1
  314. package/dist/version.js +1 -1
  315. package/package.json +1 -6
  316. package/dist/Calculator-ELI5Z3XW.js +0 -29
  317. package/dist/Documents-CE7YKNJM.js +0 -52
  318. package/dist/Files-ARRIIZZ6.js +0 -88
  319. package/dist/PdfViewer-ZRDIG2L2.js +0 -1
  320. package/dist/PomodoroTimer-ZJ432VPC.js +0 -91
  321. package/dist/Sidebar-ETWHTFNP.js +0 -44
  322. package/dist/chunk-4LQRLYB4.js +0 -22
  323. package/dist/chunk-5CPRZ27M.js +0 -28
  324. package/dist/chunk-5XVXYBIQ.js +0 -8
  325. package/dist/chunk-A4FCXZSY.js +0 -8
  326. package/dist/chunk-ABKCC7VB.js +0 -9
  327. package/dist/chunk-ABKFALDE.js +0 -8
  328. package/dist/chunk-FBACFP4U.js +0 -4
  329. package/dist/chunk-FSRHVB4A.js +0 -9
  330. package/dist/chunk-G2BZ7NCM.js +0 -19
  331. package/dist/chunk-IH2KC3NQ.js +0 -5
  332. package/dist/chunk-LCHU3ZG4.js +0 -9
  333. package/dist/chunk-N3OJ47VK.js +0 -1
  334. package/dist/chunk-N7645DNN.js +0 -6
  335. package/dist/chunk-PEVWAJUR.js +0 -7
  336. package/dist/chunk-UGOSZLCD.js +0 -14
  337. package/dist/chunk-WB6E6CSH.js +0 -14
  338. package/dist/chunk-WQGBYFS3.js +0 -8
  339. package/dist/chunk-Y2LWUBXX.js +0 -2
  340. package/dist/chunk-ZQJTLJUF.js +0 -2
  341. package/dist/chunk-ZVEDA462.js +0 -3
@@ -1,4 +1,4 @@
1
- import{Markdown as e}from"./chunk-276JUQXK.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-R64OZ6TC.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-VNTJ7QO5.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[N,v]=a(""),[w,k]=a(null),[C,j]=a({}),M=N.trim().toLowerCase(),_=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),L=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),A=n(()=>_.map(e=>({...e,docs:e.docs.filter(L)})).filter(e=>e.docs.length>0),[_,M]),E=n(()=>A.flatMap(e=>e.docs),[A]),O=(w?E.find(e=>e.slug===w):void 0)??E[0]??null,R=e=>!!M||(C[e]??e===O?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-RXVFAFEB.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-7V32O5NF.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-5YP7MFPK.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[N,v]=a(""),[w,k]=a(null),[C,j]=a({}),M=N.trim().toLowerCase(),_=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),A=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),E=n(()=>_.map(e=>({...e,docs:e.docs.filter(A)})).filter(e=>e.docs.length>0),[_,M]),F=n(()=>E.flatMap(e=>e.docs),[E]),L=(w?F.find(e=>e.slug===w):void 0)??F[0]??null,Y=e=>!!M||(C[e]??e===L?.category);/* @__PURE__ */
2
2
  return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
@@ -6,16 +6,16 @@ return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
6
6
  /* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
7
7
  /* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
8
  /* @__PURE__ */o("input",{type:"text",value:N,onChange:e=>v(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
- /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===A.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):A.map(e=>{const t=R(e.key);/* @__PURE__ */
9
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===E.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):E.map(e=>{const t=Y(e.key);/* @__PURE__ */
10
10
  return i("div",{className:"py-0.5",children:[
11
- /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!R(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
11
+ /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!Y(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
12
12
  /* @__PURE__ */o(d,{open:t}),
13
- /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=O?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=L?.slug===e.slug;/* @__PURE__ */
14
14
  return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
15
15
  /* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
16
- /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:O?/* @__PURE__ */i(c,{children:[
16
+ /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:L?/* @__PURE__ */i(c,{children:[
17
17
  /* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
18
18
  /* @__PURE__ */i("div",{className:"min-w-0",children:[
19
- /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:O.title}),
20
- /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[O.category_label,!1===O.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(O),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
- /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(O):O.body?/* @__PURE__ */o(e,{children:O.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
19
+ /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:L.title}),
20
+ /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[L.category_label,!1===L.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(L),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(L):L.body?/* @__PURE__ */o(e,{children:L.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
@@ -1 +1 @@
1
- import{toast_default as t}from"./chunk-MWKLLAJT.js";import{currentShellStrings as e}from"./chunk-VNTJ7QO5.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
1
+ import{toast_default as t}from"./chunk-KVVZLEUG.js";import{currentShellStrings as e}from"./chunk-5YP7MFPK.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
@@ -1,7 +1,7 @@
1
- import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-VNTJ7QO5.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},N=o(null),P=t=>e=>{N.current=t,e.currentTarget.setPointerCapture(e.pointerId)},A=t=>e=>{N.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},L=t=>()=>{N.current===t&&(N.current=null)},R=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
- return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:P(t),onPointerMove:A(t),onPointerUp:L(t),onPointerCancel:L(t)},t)};/* @__PURE__ */
1
+ import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-5YP7MFPK.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),F=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=F[F.length-1];r&&r.to===e-1?r.to=e:F.push({from:e,to:e})});const P=F.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),D=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},j=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),D(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),D(t,o+r)),"Home"===e.key&&(e.preventDefault(),D(t,0)),"End"===e.key&&(e.preventDefault(),D(t,p))},C=o(null),A=t=>e=>{C.current=t,e.currentTarget.setPointerCapture(e.pointerId)},L=t=>e=>{C.current===t&&D(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},N=t=>()=>{C.current===t&&(C.current=null)},R=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
+ return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:j(t),onPointerDown:A(t),onPointerMove:L(t),onPointerUp:N(t),onPointerCancel:N(t)},t)};/* @__PURE__ */
3
3
  return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
4
- /* @__PURE__ */n("path",{d:F,fill:e.grid}),
4
+ /* @__PURE__ */n("path",{d:P,fill:e.grid}),
5
5
  /* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
6
6
  /* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
7
7
  /* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),R("from"),R("to")]})})}export{a as ChartBrush};
@@ -1,12 +1,12 @@
1
- import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-36VIGB6J.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-VNTJ7QO5.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),R=y??(e=>m(e,w)),T=b??C.nothingToPlot,E=h(),[P,V]=u(null),{highlighted:$}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:T});const B=v/2,I=v/2,J=v/2-10,Q=x??Math.max(...g.map(e=>e.value),1),U="track"===k?Math.max(6,(J-.16*v)/g.length):0,Y=Math.max(1,Math.floor((J-.16*v)/U||1)),z="track"===k?g.slice(0,Y):g,A=Math.min(j,Math.max(1,U-2)),F=n(z.length,.03),G=null!==P?z[P]:void 0;/* @__PURE__ */
1
+ import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-36VIGB6J.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-5YP7MFPK.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),P=y??(e=>m(e,w)),R=b??C.nothingToPlot,E=h(),[T,Y]=u(null),{highlighted:$}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:R});const B=v/2,F=v/2,I=v/2-10,U=x??Math.max(...g.map(e=>e.value),1),V="track"===k?Math.max(6,(I-.16*v)/g.length):0,z=Math.max(1,Math.floor((I-.16*v)/V||1)),A="track"===k?g.slice(0,z):g,G=Math.min(j,Math.max(1,V-2)),H=n(A.length,.03),J=null!==T?A[T]:void 0;/* @__PURE__ */
2
2
  return d("div",{className:`relative ${N??""}`,children:[
3
- /* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":E,onMouseLeave:()=>V(null),children:[
4
- /* @__PURE__ */p("title",{id:E,children:"track"===k?C.radialTrack(z.length):C.radialCycle(z.length)}),z.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/Q)),c=((e,t)=>null!==P?P!==e:null!==$&&$!==t)(r,l.key);if("track"===k){const o=J-r*U,m=o-U+A,h=-Math.PI/2;/* @__PURE__ */
5
- return d("g",{opacity:c?.4:1,onMouseEnter:()=>V(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
6
- /* @__PURE__ */p("path",{d:e(B,I,m,o,h,h+f),fill:i.grid}),
7
- /* @__PURE__ */p("path",{d:e(B,I,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
8
- return p("g",{opacity:c?.4:1,onMouseEnter:()=>V(r),children:/* @__PURE__ */p("path",{d:e(B,I,m,m+(J-m)*s,F(r),F(r)+F.step),fill:n})},l.key)})]}),G&&null!==P&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:G.label,rows:[{key:"value",label:C.value,color:o(P,G.color,G.tone),value:R(G.value)}]})}),
3
+ /* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":E,onMouseLeave:()=>Y(null),children:[
4
+ /* @__PURE__ */p("title",{id:E,children:"track"===k?C.radialTrack(A.length):C.radialCycle(A.length)}),A.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/U)),c=((e,t)=>null!==T?T!==e:null!==$&&$!==t)(r,l.key);if("track"===k){const o=I-r*V,m=o-V+G,h=-Math.PI/2;/* @__PURE__ */
5
+ return d("g",{opacity:c?.4:1,onMouseEnter:()=>Y(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
6
+ /* @__PURE__ */p("path",{d:e(B,F,m,o,h,h+f),fill:i.grid}),
7
+ /* @__PURE__ */p("path",{d:e(B,F,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
8
+ return p("g",{opacity:c?.4:1,onMouseEnter:()=>Y(r),children:/* @__PURE__ */p("path",{d:e(B,F,m,m+(I-m)*s,H(r),H(r)+H.step),fill:n})},l.key)})]}),J&&null!==T&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:J.label,rows:[{key:"value",label:C.value,color:o(T,J.color,J.tone),value:P(J.value)}]})}),
9
9
  /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
10
10
  /* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
11
11
  /* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
12
- /* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:R(e.value)})]},e.key))})]})}export{g as RadialBarChart};
12
+ /* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:P(e.value)})]},e.key))})]})}export{g as RadialBarChart};
@@ -0,0 +1,2 @@
1
+ import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-HDABS36W.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-7TC3LJQM.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-5YP7MFPK.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 H=i(g??null);let L,w,K=!0;0===j.length?(w=H??M??0,L=w-30*a,K=null!==H||null!==M):(L=j[0].ms,w=H??j[j.length-1].ms,w-L<a&&(w=L+a));const N=j.length>0?Math.max(0,Math.round((w-L)/a)):0,O=u??(N>0?x.duration(N):void 0),J=[j.length>0?x.started(t(j[0].ms,D)):void 0,O,C.length>0?x.reached(j.length,p.length):void 0],P=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}),S={};for(const e of j)e.phase&&(S[e.phase]=S[e.phase]||[]).push(e.ms);const T=Object.entries(S).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),A="rail"===v,B=K&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:A?"spread":"compressed",labels:A?"none":"lanes",items:P,pending:C,phases:T,startMs:L,endMs:w,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
2
+ return h("div",A?{className:"shrink-0","data-timeline-variant":"rail",children:B}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:J,children:B})})}export{m as MilestoneTimeline};
@@ -1,23 +1,23 @@
1
- import{Calendar as e}from"./chunk-PR42NIDL.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as o,InputEndActionButton as l}from"./chunk-2UTCGWMZ.js";import{FILTER_ON as i,FILTER_ON_INK as s,FILTER_OFF as c}from"./chunk-AYZY3YNC.js";import{calendarNames as d}from"./chunk-Y3JW2GW5.js";import{pad2 as m}from"./chunk-LF27WIN2.js";import{buttonClasses as u}from"./chunk-UQYNPYF4.js";import{Icon as h}from"./chunk-R64OZ6TC.js";import{onOverlayOpen as p}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as g}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{glassStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as v,useShellLocale as y}from"./chunk-VNTJ7QO5.js";import{useState as w,useRef as N,useId as k,useEffect as C}from"react";import{createPortal as M}from"react-dom";import{jsxs as W,Fragment as j,jsx as D}from"react/jsx-runtime";var $=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],Y=t;function F(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),l=new Date(n,a,0),i=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(i(1)),to:t(l)};case"last3Months":return{from:t(i(3)),to:t(l)};case"last6Months":return{from:t(i(6)),to:t(l)};case"last12Months":return{from:t(i(12)),to:t(l)}}}function O(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function S(e){const t=r(e);return t?`${m(t.getDate())}/${m(t.getMonth()+1)}/${t.getFullYear()}`:e}var L=/* @__PURE__ */new Map;function T({from:t,to:n,onChange:m,formatDisplay:Y,clearable:T,required:H=!1,name:R,id:B,"aria-labelledby":G,"aria-label":J,weekStartsOn:U,placeholder:E,fullWidth:I=!1,min:Z,max:q,disabled:A=!1,allowOpenEnd:P=!1}){const Q=v().dateRange,V=y(),z=Y??(V?function(e){let t=L.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),L.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(V):S),K=E??Q.placeholder,X=T??!H,[_,ee]=w(!1),[te,re]=w(t),[ne,ae]=w(n),[oe,le]=w(null),[ie,se]=w("from"),ce=N(null),de=N(null),me=N(null),ue=k(),he=k(),pe=k(),[fe,ge]=w(!1),be=g(ce,_,{preferredMaxWidth:520,preferredMaxHeight:fe?720:560,popupRef:me}),xe=N(null),ve=N(null),[ye,we]=w(!0);b(()=>{const e=ve.current;if(!_||!fe||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&we(a)});const Ne=N(null);b(()=>{const e=me.current;if(!_||!be||!e)return;const t=getComputedStyle(e),r=be.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(fe)null!==Ne.current&&Ne.current<=r&&ge(!1);else{const e=xe.current?.offsetWidth??0;if(0===e)return;Ne.current=e,e>r+.5&&ge(!0)}});const[ke,Ce]=w(!1);b(()=>{const e=!!B&&(de.current?.labels?.length??0)>0;e!==ke&&Ce(e)});const Me=!!J||!!G||ke,We=/* @__PURE__ */new Date,[je,De]=w(()=>t?t.slice(0,7):O(We,Z,q)),$e=$.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(F(e,We),Z,q)),Ye=e=>e?z(e):"";C(()=>{if(!_)return;const e=e=>{const t=e.target;ce.current?.contains(t)||me.current?.contains(t)||ee(!1)};document.addEventListener("mousedown",e);const t=p(()=>ee(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[_]),C(()=>{A&&ee(!1)},[A]);const Fe=()=>{m("",""),ee(!1)},Oe=X&&!A&&Boolean(t||n),Se=t&&n?`${Ye(t)} — ${Ye(n)}`:t?Q.fromOnly(Ye(t)):n?Q.toOnly(Ye(n)):"",Le=d(V),Te=e=>{const t=r(e);return t?Le.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},He=t&&n?Q.range(Te(t),Te(n)):t?Q.fromOnly(Te(t)):n?Q.toOnly(Te(n)):K,Re=e=>fe?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(oe===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(oe===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),Be=/* @__PURE__ */W(j,{children:[$e.map(e=>/* @__PURE__ */D("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=F(e,We);re(t.from),ae(t.to),le(e),De(t.from.slice(0,7))})(e),className:Re(e),"aria-label":fe?Q[e]:void 0,children:fe?ye?Q[e]:Q[`${e}Short`]:Q[e]},e)),
2
- /* @__PURE__ */D("button",{type:"button",onClick:()=>le("Custom"),className:Re("Custom"),children:Q.custom})]}),Ge=(e,t)=>P?/* @__PURE__ */D("button",{type:"button","data-range-end":e,"aria-pressed":ie===e,onClick:()=>se(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */D("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Je=e=>P&&ie===e?" ring-1 ring-blue-400":"",Ue=
3
- /* @__PURE__ */D(e,{mode:"range",min:Z,max:q,value:te||null,endValue:ne||null,month:je,onMonthChange:De,onSelect:e=>{le("Custom"),P?"from"===ie?(ne&&e>ne?(re(ne),ae(e)):re(e),se("to")):te&&e<te?(ae(te),re(e)):ae(e):!te||te&&ne?(re(e),ae("")):e<te?(ae(te),re(e)):ae(e)},weekStartsOn:U,"aria-label":Q.dialog});/* @__PURE__ */
4
- return W("div",{className:"relative"+(I?" w-full":""),ref:ce,children:[
5
- /* @__PURE__ */W("div",{className:`relative ${I?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 ${Oe?a[1]:""} text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${t||n?`${i} ${s}`:c}${A?" cursor-not-allowed opacity-60":""}`,children:[
6
- /* @__PURE__ */W("button",{ref:de,type:"button",onClick:()=>{A||(re(t),ae(n),le(null),se(t&&!n?"to":"from"),De(t?t.slice(0,7):O(We,Z,q)),ee(!0))},"aria-haspopup":"dialog","aria-expanded":_,id:B,disabled:A||void 0,"aria-label":J,"aria-labelledby":G,"aria-describedby":[Me?he:void 0,H?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":_?ue:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(I?" min-w-0 flex-1 justify-start":""),children:[
1
+ import{Calendar as e}from"./chunk-SKRFI6WB.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as o,InputEndActionButton as l}from"./chunk-GS74BABV.js";import{FILTER_ON as i,FILTER_ON_INK as s,FILTER_OFF as c}from"./chunk-AYZY3YNC.js";import{calendarNames as d}from"./chunk-Y3JW2GW5.js";import{pad2 as m}from"./chunk-LF27WIN2.js";import{buttonClasses as u}from"./chunk-UQYNPYF4.js";import{Icon as h}from"./chunk-7V32O5NF.js";import{onOverlayOpen as p}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as g}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{glassStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as v,useShellLocale as y}from"./chunk-5YP7MFPK.js";import{useState as w,useRef as N,useId as k,useEffect as C}from"react";import{createPortal as M}from"react-dom";import{jsxs as W,Fragment as j,jsx as D}from"react/jsx-runtime";var $=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],F=t;function Y(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),l=new Date(n,a,0),i=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(i(1)),to:t(l)};case"last3Months":return{from:t(i(3)),to:t(l)};case"last6Months":return{from:t(i(6)),to:t(l)};case"last12Months":return{from:t(i(12)),to:t(l)}}}function S(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function O(e){const t=r(e);return t?`${m(t.getDate())}/${m(t.getMonth()+1)}/${t.getFullYear()}`:e}var B=/* @__PURE__ */new Map;function H({from:t,to:n,onChange:m,formatDisplay:F,clearable:H,required:L=!1,name:G,id:R,"aria-labelledby":T,"aria-label":A,weekStartsOn:E,placeholder:I,fullWidth:J=!1,min:P,max:U,disabled:q=!1,allowOpenEnd:K=!1}){const V=v().dateRange,Z=y(),z=F??(Z?function(e){let t=B.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),B.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(Z):O),Q=I??V.placeholder,X=H??!L,[_,ee]=w(!1),[te,re]=w(t),[ne,ae]=w(n),[oe,le]=w(null),[ie,se]=w("from"),ce=N(null),de=N(null),me=N(null),ue=k(),he=k(),pe=k(),[fe,ge]=w(!1),be=g(ce,_,{preferredMaxWidth:520,preferredMaxHeight:fe?720:560,popupRef:me}),xe=N(null),ve=N(null),[ye,we]=w(!0);b(()=>{const e=ve.current;if(!_||!fe||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&we(a)});const Ne=N(null);b(()=>{const e=me.current;if(!_||!be||!e)return;const t=getComputedStyle(e),r=be.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(fe)null!==Ne.current&&Ne.current<=r&&ge(!1);else{const e=xe.current?.offsetWidth??0;if(0===e)return;Ne.current=e,e>r+.5&&ge(!0)}});const[ke,Ce]=w(!1);b(()=>{const e=!!R&&(de.current?.labels?.length??0)>0;e!==ke&&Ce(e)});const Me=!!A||!!T||ke,We=/* @__PURE__ */new Date,[je,De]=w(()=>t?t.slice(0,7):S(We,P,U)),$e=$.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(Y(e,We),P,U)),Fe=e=>e?z(e):"";C(()=>{if(!_)return;const e=e=>{const t=e.target;ce.current?.contains(t)||me.current?.contains(t)||ee(!1)};document.addEventListener("mousedown",e);const t=p(()=>ee(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[_]),C(()=>{q&&ee(!1)},[q]);const Ye=()=>{m("",""),ee(!1)},Se=X&&!q&&Boolean(t||n),Oe=t&&n?`${Fe(t)} — ${Fe(n)}`:t?V.fromOnly(Fe(t)):n?V.toOnly(Fe(n)):"",Be=d(Z),He=e=>{const t=r(e);return t?Be.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},Le=t&&n?V.range(He(t),He(n)):t?V.fromOnly(He(t)):n?V.toOnly(He(n)):Q,Ge=e=>fe?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(oe===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(oe===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),Re=/* @__PURE__ */W(j,{children:[$e.map(e=>/* @__PURE__ */D("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=Y(e,We);re(t.from),ae(t.to),le(e),De(t.from.slice(0,7))})(e),className:Ge(e),"aria-label":fe?V[e]:void 0,children:fe?ye?V[e]:V[`${e}Short`]:V[e]},e)),
2
+ /* @__PURE__ */D("button",{type:"button",onClick:()=>le("Custom"),className:Ge("Custom"),children:V.custom})]}),Te=(e,t)=>K?/* @__PURE__ */D("button",{type:"button","data-range-end":e,"aria-pressed":ie===e,onClick:()=>se(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */D("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Ae=e=>K&&ie===e?" ring-1 ring-blue-400":"",Ee=
3
+ /* @__PURE__ */D(e,{mode:"range",min:P,max:U,value:te||null,endValue:ne||null,month:je,onMonthChange:De,onSelect:e=>{le("Custom"),K?"from"===ie?(ne&&e>ne?(re(ne),ae(e)):re(e),se("to")):te&&e<te?(ae(te),re(e)):ae(e):!te||te&&ne?(re(e),ae("")):e<te?(ae(te),re(e)):ae(e)},weekStartsOn:E,"aria-label":V.dialog});/* @__PURE__ */
4
+ return W("div",{className:"relative"+(J?" w-full":""),ref:ce,children:[
5
+ /* @__PURE__ */W("div",{className:`relative ${J?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 ${Se?a[1]:""} text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${t||n?`${i} ${s}`:c}${q?" cursor-not-allowed opacity-60":""}`,children:[
6
+ /* @__PURE__ */W("button",{ref:de,type:"button",onClick:()=>{q||(re(t),ae(n),le(null),se(t&&!n?"to":"from"),De(t?t.slice(0,7):S(We,P,U)),ee(!0))},"aria-haspopup":"dialog","aria-expanded":_,id:R,disabled:q||void 0,"aria-label":A,"aria-labelledby":T,"aria-describedby":[Me?he:void 0,L?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":_?ue:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(J?" min-w-0 flex-1 justify-start":""),children:[
7
7
  /* @__PURE__ */D(h,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
8
- /* @__PURE__ */D("span",{className:"truncate",children:Se||K})]}),Oe&&/* @__PURE__ */D(o,{children:/* @__PURE__ */D(l,{action:{label:Q.clearRange,icon:/* @__PURE__ */D(h,{name:"close"}),onClick:Fe}})})]}),Me&&/* @__PURE__ */D("span",{id:he,className:"sr-only",children:He}),H&&/* @__PURE__ */D("span",{id:pe,className:"sr-only",children:Q.required}),R&&/* @__PURE__ */W(j,{children:[
9
- /* @__PURE__ */D("input",{type:"hidden",name:R.from,value:t,disabled:A||void 0}),
10
- /* @__PURE__ */D("input",{type:"hidden",name:R.to,value:n,disabled:A||void 0})]}),_&&M(
11
- /* @__PURE__ */W("div",{ref:me,id:ue,role:"dialog","aria-label":Q.dialog,"data-layout":fe?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:f.popup,left:be?.left,right:be?.right,top:be?.top,bottom:be?.bottom,width:fe&&be?be.maxWidth:"max-content",maxWidth:be?.maxWidth,maxHeight:be?.maxHeight,overflowY:"auto",visibility:be?void 0:"hidden",...x()},children:[
12
- /* @__PURE__ */W("div",{className:fe?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Ge("from",/* @__PURE__ */W(j,{children:[
13
- /* @__PURE__ */D("span",{className:"text-xs font-medium text-gray-500",children:Q.from}),
14
- /* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${te?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Je("from")}`,children:te?Ye(te):Q.start})]})),!fe&&/* @__PURE__ */D("span",{className:"text-gray-300",children:"—"}),Ge("to",/* @__PURE__ */W(j,{children:[
15
- /* @__PURE__ */D("span",{className:"text-xs font-medium text-gray-500",children:Q.to}),
16
- /* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ne?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Je("to")}`,children:ne?Ye(ne):Q.end})]}))]}),fe?/* @__PURE__ */W(j,{children:[$e.length>0&&/* @__PURE__ */W("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */D("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:Q.lastHeading}),
17
- /* @__PURE__ */W("div",{ref:ve,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Be,$e.map(e=>/* @__PURE__ */D("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:Q[e]},e))]})]}),
18
- /* @__PURE__ */D("div",{className:"w-full",children:Ue})]}):
8
+ /* @__PURE__ */D("span",{className:"truncate",children:Oe||Q})]}),Se&&/* @__PURE__ */D(o,{children:/* @__PURE__ */D(l,{action:{label:V.clearRange,icon:/* @__PURE__ */D(h,{name:"close"}),onClick:Ye}})})]}),Me&&/* @__PURE__ */D("span",{id:he,className:"sr-only",children:Le}),L&&/* @__PURE__ */D("span",{id:pe,className:"sr-only",children:V.required}),G&&/* @__PURE__ */W(j,{children:[
9
+ /* @__PURE__ */D("input",{type:"hidden",name:G.from,value:t,disabled:q||void 0}),
10
+ /* @__PURE__ */D("input",{type:"hidden",name:G.to,value:n,disabled:q||void 0})]}),_&&M(
11
+ /* @__PURE__ */W("div",{ref:me,id:ue,role:"dialog","aria-label":V.dialog,"data-layout":fe?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:f.popup,left:be?.left,right:be?.right,top:be?.top,bottom:be?.bottom,width:fe&&be?be.maxWidth:"max-content",maxWidth:be?.maxWidth,maxHeight:be?.maxHeight,overflowY:"auto",visibility:be?void 0:"hidden",...x()},children:[
12
+ /* @__PURE__ */W("div",{className:fe?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Te("from",/* @__PURE__ */W(j,{children:[
13
+ /* @__PURE__ */D("span",{className:"text-xs font-medium text-gray-500",children:V.from}),
14
+ /* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${te?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Ae("from")}`,children:te?Fe(te):V.start})]})),!fe&&/* @__PURE__ */D("span",{className:"text-gray-300",children:"—"}),Te("to",/* @__PURE__ */W(j,{children:[
15
+ /* @__PURE__ */D("span",{className:"text-xs font-medium text-gray-500",children:V.to}),
16
+ /* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ne?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Ae("to")}`,children:ne?Fe(ne):V.end})]}))]}),fe?/* @__PURE__ */W(j,{children:[$e.length>0&&/* @__PURE__ */W("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */D("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:V.lastHeading}),
17
+ /* @__PURE__ */W("div",{ref:ve,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Re,$e.map(e=>/* @__PURE__ */D("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:V[e]},e))]})]}),
18
+ /* @__PURE__ */D("div",{className:"w-full",children:Ee})]}):
19
19
  /* @__PURE__ */W("div",{ref:xe,className:"flex w-max gap-4",children:[
20
- /* @__PURE__ */D("div",{className:"w-64",children:Ue}),$e.length>0&&/* @__PURE__ */D("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Be})]}),
21
- /* @__PURE__ */W("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[X&&/* @__PURE__ */D("button",{type:"button",onClick:Fe,className:u({variant:"ghost"}),children:Q.clear}),
22
- /* @__PURE__ */D("button",{type:"button",onClick:()=>ee(!1),className:u({variant:"secondary"}),children:Q.cancel}),
23
- /* @__PURE__ */D("button",{type:"button",onClick:()=>{m(te,ne),ee(!1)},disabled:P?!te&&!ne:!te||!ne,className:u({variant:"primary"}),children:Q.apply})]})]}),document.body)]})}export{T as DateRangePicker,F as presetRange,Y as toISODate};
20
+ /* @__PURE__ */D("div",{className:"w-64",children:Ee}),$e.length>0&&/* @__PURE__ */D("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Re})]}),
21
+ /* @__PURE__ */W("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[X&&/* @__PURE__ */D("button",{type:"button",onClick:Ye,className:u({variant:"ghost"}),children:V.clear}),
22
+ /* @__PURE__ */D("button",{type:"button",onClick:()=>ee(!1),className:u({variant:"secondary"}),children:V.cancel}),
23
+ /* @__PURE__ */D("button",{type:"button",onClick:()=>{m(te,ne),ee(!1)},disabled:K?!te&&!ne:!te||!ne,className:u({variant:"primary"}),children:V.apply})]})]}),document.body)]})}export{H as DateRangePicker,Y as presetRange,F as toISODate};
@@ -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-VNTJ7QO5.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-5YP7MFPK.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,10 +1,10 @@
1
- import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-VNTJ7QO5.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:b,sortInColumn:y,isLoading:v=!1,loadingText:N,emptyState:k,showColumnsWhenEmpty:w=!1,columnEmptyText:C,onAddItem:D,addItemText:E}){const j=t().kanban,I=r(),T=N??j.loading,M=C??j.dropHere,O=E??j.addItem,[A,H]=o(null),[$,R]=o(null),S=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(y)for(const n of Object.keys(e))e[n].sort(y);return e},[m,f,p,y]),q=()=>{H(null),R(null)},z=i(null),F=i(/* @__PURE__ */new Map);n(()=>{if(null!==A)return;const e=z.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=F.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),F.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[S,A]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:T}):0!==m.length||w?/* @__PURE__ */d("div",{ref:z,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=S[e.value]??[],t=null!==$&&$.col===e.value,r=null!==A?n.findIndex(e=>g(e)===A):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
2
- return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(A&&$&&$.col===e){const n=(S[e]??[]).findIndex(e=>g(e)===A),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(A,e,r)}}q()})(e.value)},children:[
1
+ import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-5YP7MFPK.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:b,sortInColumn:y,isLoading:v=!1,loadingText:N,emptyState:k,showColumnsWhenEmpty:w=!1,columnEmptyText:C,onAddItem:D,addItemText:E}){const j=t().kanban,I=r(),M=N??j.loading,T=C??j.dropHere,A=E??j.addItem,[H,O]=o(null),[$,F]=o(null),P=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(y)for(const n of Object.keys(e))e[n].sort(y);return e},[m,f,p,y]),R=()=>{O(null),F(null)},S=i(null),q=i(/* @__PURE__ */new Map);n(()=>{if(null!==H)return;const e=S.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=q.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),q.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[P,H]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:M}):0!==m.length||w?/* @__PURE__ */d("div",{ref:S,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=P[e.value]??[],t=null!==$&&$.col===e.value,r=null!==H?n.findIndex(e=>g(e)===H):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
2
+ return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&$&&$.col===e){const n=(P[e]??[]).findIndex(e=>g(e)===H),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(H,e,r)}}R()})(e.value)},children:[
3
3
  /* @__PURE__ */u("div",{className:`flex items-center justify-between px-3 py-2 rounded-t-xl text-sm font-medium ${e.accent??"text-gray-700 bg-gray-100"}`,children:[
4
4
  /* @__PURE__ */u("span",{className:"flex items-center gap-2",children:[
5
5
  /* @__PURE__ */d("span",{className:`h-2 w-2 rounded-full ${e.dot??"bg-gray-400"}`}),e.label]}),
6
6
  /* @__PURE__ */d("span",{className:"text-xs opacity-70",children:a(n.length,I)})]}),
7
- /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>R(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===A;/* @__PURE__ */
7
+ /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>F(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===H;/* @__PURE__ */
8
8
  return u(s,{children:[o===r&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),
9
- /* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{H(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==A?n.findIndex(e=>g(e)===A):-1,o=-1!==a&&a<r?r+1:r;R(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:q,onClick:b?()=>b(t):void 0,style:null===A?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(b?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:M})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-ink-faint opacity-0 transition hover:bg-gray-100 hover:text-ink focus-visible:opacity-100 group-hover:opacity-100",children:[
10
- /* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),O]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:k??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:j.empty})})}export{m as Kanban};
9
+ /* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;F(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:R,onClick:b?()=>b(t):void 0,style:null===H?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(b?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:T})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-ink-faint opacity-0 transition hover:bg-gray-100 hover:text-ink focus-visible:opacity-100 group-hover:opacity-100",children:[
10
+ /* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),A]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:k??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:j.empty})})}export{m as Kanban};
@@ -1,27 +1,27 @@
1
- import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-5FYDNH4Y.js";import{useShellStrings as m}from"./chunk-VNTJ7QO5.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function L(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var C=(e,t)=>`${e}-opt-${t}`;function T(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function E({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
1
+ import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-5FYDNH4Y.js";import{useShellStrings as m}from"./chunk-5YP7MFPK.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function L(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var C=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function T({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
2
2
  return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
3
3
  /* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
4
4
  /* @__PURE__ */w("span",{children:e.title}),
5
5
  /* @__PURE__ */w("span",{className:"font-medium normal-case tracking-normal",children:s(e.count,!!e.truncated)})]}),e.rows.map(e=>{const n=c++,s=n===t,l="action"===e.kind||"seeAll"===e.kind?void 0:e.badge,d="action"===e.kind||"seeAll"===e.kind?void 0:e.sub,u="seeAll"===e.kind;/* @__PURE__ */
6
6
  return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
7
- /* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:T(e,a)})}),
7
+ /* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:E(e,a)})}),
8
8
  /* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
9
- /* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:T,quickActions:D,onSelect:I,recent:K,onRecord:R,favorites:M,hotkey:P=!0}={}){const S=m().search,$=T??S.placeholder,[B,H]=h(!1),[W,z]=h(""),[F,Q]=h(0),V=f(null),{results:G,truncatedTypes:J,loading:Y,failure:q,reset:O}=L(W,l,2);y(()=>{const e=e=>{P&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),H(e=>!e)),"Escape"===e.key&&B&&H(!1)},t=()=>H(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[B,P]),i(B);const[U,X]=h(!1);B!==U&&(X(B),B&&(z(""),Q(0),O())),y(()=>{B?setTimeout(()=>V.current?.focus(),50):z("")},[B]),y(()=>{Q(0)},[G]);const Z=W.length>=2,_=g(()=>Z?e(G,D,W,S.actions,{truncatedTypes:J,listRoutes:A,typeLabels:N,seeAllLabel:S.seeAll}):t({recent:K,favorites:M,actions:D,typeLabels:N},S),[Z,G,J,A,N,D,W,K,M,S]),ee=g(()=>r(_),[_]),te=Math.min(F,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{B&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[B,te,ee.length,re]);const ae=b(e=>{H(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||R?.(e.result),I?.(e.result)):e.action.onSelect()},[I,R]);return B?k(
10
- /* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>H(!1),children:[
9
+ /* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:K,onRecord:P,favorites:M,hotkey:R=!0}={}){const S=m().search,$=E??S.placeholder,[B,F]=h(!1),[H,W]=h(""),[z,Y]=h(0),G=f(null),{results:Q,truncatedTypes:V,loading:q,failure:J,reset:U}=L(H,l,2);y(()=>{const e=e=>{R&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),F(e=>!e)),"Escape"===e.key&&B&&F(!1)},t=()=>F(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[B,R]),i(B);const[X,Z]=h(!1);B!==X&&(Z(B),B&&(W(""),Y(0),U())),y(()=>{B?setTimeout(()=>G.current?.focus(),50):W("")},[B]),y(()=>{Y(0)},[Q]);const _=H.length>=2,O=g(()=>_?e(Q,D,H,S.actions,{truncatedTypes:V,listRoutes:A,typeLabels:N,seeAllLabel:S.seeAll}):t({recent:K,favorites:M,actions:D,typeLabels:N},S),[_,Q,V,A,N,D,H,K,M,S]),ee=g(()=>r(O),[O]),te=Math.min(z,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{B&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[B,te,ee.length,re]);const ae=b(e=>{F(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||P?.(e.result),I?.(e.result)):e.action.onSelect()},[I,P]);return B?k(
10
+ /* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>F(!1),children:[
11
11
  /* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
12
12
  /* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:p(),children:[
13
13
  /* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
14
14
  /* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
15
- /* @__PURE__ */w("input",{ref:V,type:"text",value:W,onChange:e=>{z(e.target.value),Q(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),Q(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),Q(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),Q(s(_.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:$,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),Y&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":S.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
15
+ /* @__PURE__ */w("input",{ref:G,type:"text",value:H,onChange:e=>{W(e.target.value),Y(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),Y(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),Y(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),Y(s(O.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:$,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),q&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":S.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
16
16
  /* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:S.escBadge})]}),
17
- /* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[Y&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:S.searching}),!Y&&"all"===q&&Z&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:S.searchFailed}),!Y&&Z&&0===ee.length&&"all"!==q&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:S.noResults}),ne&&/* @__PURE__ */w(E,{sections:_,activeIdx:te,listId:re,label:S.listLabel,typeIcons:o,groupCount:S.groupCount,groupLabel:S.groupLabel,onHover:Q,onPick:ae}),!Y&&"some"===q&&Z&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:S.partialFailure}),!Y&&!Z&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:S.minChars(2)})]}),
17
+ /* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[q&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:S.searching}),!q&&"all"===J&&_&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:S.searchFailed}),!q&&_&&0===ee.length&&"all"!==J&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:S.noResults}),ne&&/* @__PURE__ */w(T,{sections:O,activeIdx:te,listId:re,label:S.listLabel,typeIcons:o,groupCount:S.groupCount,groupLabel:S.groupLabel,onHover:Y,onPick:ae}),!q&&"some"===J&&_&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:S.partialFailure}),!q&&!_&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:S.minChars(2)})]}),
18
18
  /* @__PURE__ */v("div",{className:"flex items-center justify-between px-4 py-2 border-t border-line-subtle bg-surface-sunken text-2xs text-ink-faintest",children:[
19
19
  /* @__PURE__ */v("div",{className:"flex items-center gap-3",children:[
20
20
  /* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
21
21
  /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↑"}),
22
22
  /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${S.navigate}`]}),
23
23
  /* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
24
- /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:S.enterKey}),` ${S.open}`]}),_.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
24
+ /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:S.enterKey}),` ${S.open}`]}),O.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
25
25
  /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:S.tabKey}),` ${S.nextGroup}`]})]}),
26
26
  /* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
27
27
  /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:S.escKey}),` ${S.close}`]})]})]})]}),document.body):null}export{I as GlobalSearch,D as openGlobalSearch};
@@ -0,0 +1,6 @@
1
+ import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-2XORVHF2.js";import{IconButton_default as a}from"./chunk-LE5LWALR.js";import{Icon as o}from"./chunk-7V32O5NF.js";import{Tooltip as n}from"./chunk-NJN5IKWO.js";import{useShellStrings as s}from"./chunk-5YP7MFPK.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
2
+ return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:M,letterCase:D,clear:x,disabled:y=!1,"aria-label":L,windows:j,className:A="",layout:R="grid"}){const q=s().textToolbar,I=w({offered:n,color:k,last:N,alignment:C,list:M,letterCase:D,clear:x});if(!I.words&&!I.paragraph)return null;const K=m(n,k,x,I.cells.paragraph),$=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,B=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:$(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:$(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,O=l(q),S=e.map(e=>[e,O[e],r(e)]),F=C?e.filter(e=>C.allow.includes(e)):[],T=C&&F.includes(C.value)?C.value:F[0],U=[["none",q.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",q.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",q.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],E=x&&K?g(q.clear,/* @__PURE__ */i(a,{className:$(!1),"aria-label":q.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,H=/* @__PURE__ */t(d,{children:[B("bold",q.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),B("italic",q.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),B("underline",q.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),B("strike",q.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(q.color,/* @__PURE__ */i(a,{pressed:k.open,className:$(k.open,"rosh-tb-color"),"aria-label":q.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,B("link",q.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),B("sup",q.sup,/* @__PURE__ */i(o,{name:"superscript"})),B("sub",q.sub,/* @__PURE__ */i(o,{name:"subscript"})),B("code",q.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===K?E:null]}),P=/* @__PURE__ */t(d,{children:[C&&F.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.alignment,onKeyDown:e=>p(e,F,e=>C.onChange(e)),children:S.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:$(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===T?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,M&&n.has("bullet")?g(q.bullet,/* @__PURE__ */i(a,{className:$("bullet"===M.pressed),"aria-label":q.bullet,"aria-pressed":"bullet"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,M&&n.has("number")?g(q.number,/* @__PURE__ */i(a,{className:$("number"===M.pressed),"aria-label":q.number,"aria-pressed":"number"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,B("quote",q.quote,/* @__PURE__ */i(o,{name:"quote"})),D?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.letterCase,onKeyDown:e=>p(e,U.map(([e])=>e),e=>D.onChange(e)),children:U.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:D.value===e,className:$(D.value===e),"aria-checked":D.value===e,"aria-label":l,tabIndex:e===(D.value||"none")?0:-1,disabled:y||D.disabled,onMouseDown:c,onClick:()=>D.onChange(D.value===e?"":e),children:r},e)))}):null,"paragraph"===K?E:null]}),V="row"===R,W=V?" is-row":I.flow?" is-flow":I.oneRow?" is-one-row":I.words&&void 0===N&&"words"!==K?" is-eight":"",J=b(n,Boolean(k)),X={"--rosh-tb-color-col":String(J.color),"--rosh-tb-link-col":String(J.link),...V?{"--rosh-tb-cells":String(I.cells.words+I.cells.paragraph),"--rosh-tb-groupgap":I.words&&I.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let Y;return Y=V?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[I.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}):null,I.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:P}):null]}):I.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[H,
3
+ /* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),P]}):I.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
4
+ /* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}),
5
+ /* @__PURE__ */i("div",{className:"rosh-tb-para",children:P})]}):/* @__PURE__ */t(d,{children:[I.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==K?" is-eight":""),children:H}):null,I.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:P}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${W} ${A}`.trim(),style:X,children:[
6
+ /* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":L??q.formatting,children:Y}),j]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
@@ -1,6 +1,6 @@
1
- import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-36VIGB6J.js";import{CartesianPlot as t}from"./chunk-WQGBYFS3.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-VNTJ7QO5.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:v,label:L,className:M,emptyLabel:N,radius:O=3}){const V=o().charts,F=n(),Q=w??(e=>h(e,F)),W=L??V.range,A=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),C=r(0,j,v);/* @__PURE__ */
2
- return s(t,{labels:d,values:A,height:k,width:g,max:b,min:x,formatValue:Q,yAxisLabel:y,className:M,emptyLabel:N,bandPadding:"bar"===p?.34:0,ariaLabel:V.rangeLabel(W,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:V.high,color:C,value:null==u[e]?void 0:Q(u[e].high)},{key:"low",label:V.low,color:C,value:null==u[e]?void 0:Q(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:O,fill:C,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
1
+ import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-36VIGB6J.js";import{CartesianPlot as t}from"./chunk-QDL2FNP7.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-5YP7MFPK.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:M,emptyLabel:F,radius:N=3}){const O=o().charts,P=n(),V=w??(e=>h(e,P)),A=v??O.range,C=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),Q=r(0,j,L);/* @__PURE__ */
2
+ return s(t,{labels:d,values:C,height:k,width:g,max:b,min:x,formatValue:V,yAxisLabel:y,className:M,emptyLabel:F,bandPadding:"bar"===p?.34:0,ariaLabel:O.rangeLabel(A,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:O.high,color:Q,value:null==u[e]?void 0:V(u[e].high)},{key:"low",label:O.low,color:Q,value:null==u[e]?void 0:V(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:N,fill:Q,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
3
3
  return m(c,{children:[
4
- /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:C,fillOpacity:.2,stroke:"none"}),
5
- /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:C,strokeWidth:2,strokeLinejoin:"round"}),
6
- /* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:C,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
4
+ /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:Q,fillOpacity:.2,stroke:"none"}),
5
+ /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:Q,strokeWidth:2,strokeLinejoin:"round"}),
6
+ /* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:Q,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
@@ -1 +1 @@
1
- import{client_default as a}from"./chunk-NGUXPP5Q.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
1
+ import{client_default as a}from"./chunk-JGWUSJDD.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
@@ -1,4 +1,4 @@
1
- import{Tooltip as r}from"./chunk-NJN5IKWO.js";import{useShellStrings as e}from"./chunk-VNTJ7QO5.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
1
+ import{Tooltip as r}from"./chunk-NJN5IKWO.js";import{useShellStrings as e}from"./chunk-5YP7MFPK.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
2
2
  /* @__PURE__ */t("circle",{cx:"2",cy:"3",r:"1.1"}),
3
3
  /* @__PURE__ */t("circle",{cx:"2",cy:"7",r:"1.1"}),
4
4
  /* @__PURE__ */t("circle",{cx:"2",cy:"11",r:"1.1"})]});function l({hint:n,dragging:i,revealClassName:c,marker:l}){const o=e().tree;/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-4LQRLYB4.js";import{ChartFrame as a}from"./chunk-DWR6RVX5.js";import{ColumnChart as l}from"./chunk-PAC4LK2N.js";import{TH_ONE_LINE as s}from"./chunk-WGLHB6WE.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-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-ES2LUEPN.js";import{ChartFrame as a}from"./chunk-NTUZT37J.js";import{ColumnChart as l}from"./chunk-IKKR2TYY.js";import{TH_ONE_LINE as s}from"./chunk-WGLHB6WE.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:[
@@ -1,4 +1,4 @@
1
- import{Banner as e}from"./chunk-JGVKGEIV.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{useShellStrings as n}from"./chunk-VNTJ7QO5.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
1
+ import{Banner as e}from"./chunk-IIKPM3F4.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{useShellStrings as n}from"./chunk-5YP7MFPK.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
2
2
  return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
3
3
  /* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
4
4
  /* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
@@ -1,9 +1,9 @@
1
- import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-VNTJ7QO5.js";import{formatPercent as i}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var s=e=>Math.max(0,Math.min(1,e));function o({value:o,segments:m,objective:u,label:d,detail:c,formatValue:h,tone:f,className:x,unavailableLabel:b}){const v=a().charts,g=t(),N=h??(e=>i(100*e,1,g)),p=b??v.notEnough;if(null==o||!Number.isFinite(o))/* @__PURE__ */
1
+ import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-5YP7MFPK.js";import{formatPercent as i}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var s=e=>Math.max(0,Math.min(1,e));function o({value:o,segments:m,objective:u,label:d,detail:c,formatValue:h,tone:f,className:x,unavailableLabel:b}){const v=a().charts,g=t(),p=h??(e=>i(100*e,1,g)),N=b??v.notEnough;if(null==o||!Number.isFinite(o))/* @__PURE__ */
2
2
  return n("div",{className:x,children:[d&&/* @__PURE__ */r("p",{className:"text-sm font-medium text-gray-700",children:d}),
3
- /* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:p})]});const j=s(o),y=null==u||o>=u,k=f??(y?"good":"critical"),w=e[k],$=[m?.length?m.map(e=>`${e.label} ${N(e.value)}`).join(" · "):"",c??"",null!=u?(y?v.objectiveMet:v.objectiveMissed)(N(u)):""].filter(Boolean).join(" · ");/* @__PURE__ */
3
+ /* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:N})]});const j=s(o),y=null==u||o>=u,k=f??(y?"good":"critical"),w=e[k],F=[m?.length?m.map(e=>`${e.label} ${p(e.value)}`).join(" · "):"",c??"",null!=u?(y?v.objectiveMet:v.objectiveMissed)(p(u)):""].filter(Boolean).join(" · ");/* @__PURE__ */
4
4
  return n("div",{className:x,children:[
5
5
  /* @__PURE__ */n("div",{className:"mb-2 flex items-baseline justify-between gap-3",children:[
6
6
  /* @__PURE__ */r("span",{className:"text-sm font-medium text-gray-700",children:d}),
7
- /* @__PURE__ */r("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:N(o)})]}),
8
- /* @__PURE__ */n("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*j).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":N(o),"aria-label":d,children:[
9
- /* @__PURE__ */r("div",m?.length?{className:"flex h-full overflow-hidden rounded-full",children:m.map((l,a)=>/* @__PURE__ */r("div",{className:"h-full shrink-0"+(a===m.length-1?" rounded-r-full":""),style:{width:`${(100*s(l.value)).toFixed(2)}%`,backgroundColor:e[l.tone??(0===a?k:"neutral")]}},`${l.label}-${a}`))}:{className:"h-full rounded-full",style:{width:`${(100*j).toFixed(2)}%`,backgroundColor:w}}),null!=u&&/* @__PURE__ */r("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*s(u)).toFixed(2)}%`,height:20,backgroundColor:l.axis},"aria-hidden":"true"})]}),$&&/* @__PURE__ */r("p",{className:"mt-2 text-xs text-ink-faint",children:$})]})}export{o as Meter};
7
+ /* @__PURE__ */r("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:p(o)})]}),
8
+ /* @__PURE__ */n("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*j).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":p(o),"aria-label":d,children:[
9
+ /* @__PURE__ */r("div",m?.length?{className:"flex h-full overflow-hidden rounded-full",children:m.map((l,a)=>/* @__PURE__ */r("div",{className:"h-full shrink-0"+(a===m.length-1?" rounded-r-full":""),style:{width:`${(100*s(l.value)).toFixed(2)}%`,backgroundColor:e[l.tone??(0===a?k:"neutral")]}},`${l.label}-${a}`))}:{className:"h-full rounded-full",style:{width:`${(100*j).toFixed(2)}%`,backgroundColor:w}}),null!=u&&/* @__PURE__ */r("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*s(u)).toFixed(2)}%`,height:20,backgroundColor:l.axis},"aria-hidden":"true"})]}),F&&/* @__PURE__ */r("p",{className:"mt-2 text-xs text-ink-faint",children:F})]})}export{o as Meter};
@@ -1,4 +1,4 @@
1
- import{swallowPress as e,describedByWith as i,OffWithReason as r}from"./chunk-TE6R53YD.js";import{Icon as a}from"./chunk-R64OZ6TC.js";import{OneLineLabel as o}from"./chunk-WGLHB6WE.js";import{Tooltip as s}from"./chunk-NJN5IKWO.js";import{useShellStrings as n}from"./chunk-VNTJ7QO5.js";import{useId as l,Fragment as d}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function b({items:b,onChange:h,label:m,className:u="","aria-labelledby":f,"aria-describedby":p}){const w=n().displayChips,g=l();/* @__PURE__ */
1
+ import{swallowPress as e,describedByWith as i,OffWithReason as r}from"./chunk-TE6R53YD.js";import{Icon as a}from"./chunk-7V32O5NF.js";import{OneLineLabel as o}from"./chunk-WGLHB6WE.js";import{Tooltip as s}from"./chunk-NJN5IKWO.js";import{useShellStrings as n}from"./chunk-5YP7MFPK.js";import{useId as l,Fragment as d}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function b({items:b,onChange:h,label:m,className:u="","aria-labelledby":f,"aria-describedby":p}){const w=n().displayChips,g=l();/* @__PURE__ */
2
2
  return t("div",{role:"group","aria-label":f?void 0:m,"aria-labelledby":f,"aria-describedby":p,className:`flex flex-wrap gap-2 ${u}`.trim(),children:b.map((n,l)=>{const b=`${g}-${l}-state`,m=`${g}-${l}-reason`,u=Boolean(n.disabled)&&null!=n.disabledReason&&""!==n.disabledReason,f=/* @__PURE__ */c("button",{type:"button","aria-pressed":n.shown,disabled:!(!n.disabled||u)||void 0,"aria-disabled":!!u||void 0,"aria-describedby":i(b,u?m:void 0),onClick:u?e:()=>h(n.id,!n.shown),className:"inline-flex h-6 max-w-full shrink-0 items-center gap-1 whitespace-nowrap rounded-full border pl-2 pr-3 text-xs font-medium transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60 aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(n.shown?"border-blue-200 bg-accent-tint text-blue-700 hover:bg-blue-100":"border-line bg-surface text-ink-faint hover:bg-row-hover hover:text-ink-strongest"),children:[
3
3
  /* @__PURE__ */t(a,{name:n.shown?"eye":"eye-off",className:"h-4 w-4 shrink-0",strokeWidth:"1.75"}),
4
4
  /* @__PURE__ */t(o,{children:n.label})]}),p=/* @__PURE__ */t("span",{id:b,className:"sr-only",children:n.shown?w.shown:w.hidden});/* @__PURE__ */
@@ -1,11 +1,11 @@
1
- import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-L433UT5E.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-EOVXFXVV.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-R64OZ6TC.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-VNTJ7QO5.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",L=e=>e.stopPropagation();function U({images:r,startIndex:y=0,onClose:U,onIndexChange:V,onOpenFile:$}){const z=h().lightbox,A=d(),D=p(null),F=p(null),[J,O]=x(y),T=r.length,E=A&&T>0,I=b(e=>{if(T<2)return;const t=((J+e)%T+T)%T;O(t),V?.(t)},[J,T,V]);if(a(E),l(D,E,F),i(E),k(()=>{if(E)return f(()=>(U(),!0),()=>D.current)},[E,U]),k(()=>{if(!E)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),I("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E,I]),!E)return null;const P=r[Math.min(J,T-1)],Q=j(P),W=P.caption||n(P.url);let G;return G="video"===Q?/* @__PURE__ */v("video",{src:P.url,controls:!0,playsInline:!0,"aria-label":W,onClick:L,className:`${e} rounded-lg bg-black`}):"file"===Q?/* @__PURE__ */w("div",{onClick:L,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
1
+ import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-GJVGGYQ2.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-EOVXFXVV.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-7V32O5NF.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-5YP7MFPK.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",F=e=>e.stopPropagation();function V({images:r,startIndex:y=0,onClose:V,onIndexChange:G,onOpenFile:L}){const P=h().lightbox,U=d(),$=p(null),z=p(null),[A,D]=x(y),J=r.length,Y=U&&J>0,I=b(e=>{if(J<2)return;const t=((A+e)%J+J)%J;D(t),G?.(t)},[A,J,G]);if(a(Y),l($,Y,z),i(Y),k(()=>{if(Y)return f(()=>(V(),!0),()=>$.current)},[Y,V]),k(()=>{if(!Y)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),I("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[Y,I]),!Y)return null;const O=r[Math.min(A,J-1)],Q=j(O),W=O.caption||n(O.url);let E;return E="video"===Q?/* @__PURE__ */v("video",{src:O.url,controls:!0,playsInline:!0,"aria-label":W,onClick:F,className:`${e} rounded-lg bg-black`}):"file"===Q?/* @__PURE__ */w("div",{onClick:F,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
2
2
  /* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
3
- /* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:W}),$?/* @__PURE__ */v(c,{size:"sm",onClick:()=>$(P),children:z.openFile}):/* @__PURE__ */v("a",{href:P.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:z.openFile})]}):/* @__PURE__ */v(t,{src:P.url,alt:W,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
- /* @__PURE__ */w("div",{ref:D,...o({role:"dialog",modal:!0,label:z.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:U,children:[G,
5
- /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:L,children:[
6
- /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:z.counter(J+1,T)}),
7
- /* @__PURE__ */v("button",{ref:F,type:"button",onClick:U,"aria-label":z.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),T>1&&/* @__PURE__ */w(N,{children:[
8
- /* @__PURE__ */v("button",{type:"button",onClick:e=>{L(e),I(-1)},"aria-label":z.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
- /* @__PURE__ */v("button",{type:"button",onClick:e=>{L(e),I(1)},"aria-label":z.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
- /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:L,children:[
11
- /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:W}),"file"!==Q&&/* @__PURE__ */v("a",{href:P.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:z.openOriginal})]})]}),document.body)}export{U as ImageLightbox,j as lightboxKind};
3
+ /* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:W}),L?/* @__PURE__ */v(c,{size:"sm",onClick:()=>L(O),children:P.openFile}):/* @__PURE__ */v("a",{href:O.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:P.openFile})]}):/* @__PURE__ */v(t,{src:O.url,alt:W,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
+ /* @__PURE__ */w("div",{ref:$,...o({role:"dialog",modal:!0,label:P.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:V,children:[E,
5
+ /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:F,children:[
6
+ /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:P.counter(A+1,J)}),
7
+ /* @__PURE__ */v("button",{ref:z,type:"button",onClick:V,"aria-label":P.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),J>1&&/* @__PURE__ */w(N,{children:[
8
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{F(e),I(-1)},"aria-label":P.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{F(e),I(1)},"aria-label":P.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
+ /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:F,children:[
11
+ /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:W}),"file"!==Q&&/* @__PURE__ */v("a",{href:O.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:P.openOriginal})]})]}),document.body)}export{V as ImageLightbox,j as lightboxKind};