efficient-shell 13.10.0 → 13.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 (350) hide show
  1. package/README.md +1 -1
  2. package/dist/{Browser-RQMICFVJ.js → Browser-TPLE4RMX.js} +16 -16
  3. package/dist/{Calculator-TJ4XFVNQ.js → Calculator-3PVLP3UK.js} +22 -22
  4. package/dist/{CurrencyConverter-6H3QM3TU.js → CurrencyConverter-JLRIAP2Z.js} +6 -6
  5. package/dist/{Files-MJBEQENM.js → Files-4UFXW2K7.js} +82 -82
  6. package/dist/{Notepad-KE3Q7TEM.js → Notepad-MASOWEW7.js} +9 -9
  7. package/dist/PdfViewer-PFQGQRQX.js +1 -0
  8. package/dist/{PomodoroTimer-2MFWO3KK.js → PomodoroTimer-I575OSRR.js} +46 -46
  9. package/dist/{Preview-J54KUTIR.js → Preview-TX6BB4UW.js} +46 -46
  10. package/dist/Sidebar-GYGYAXS2.js +44 -0
  11. package/dist/{Stock-OYUZ4D3M.js → Stock-EPJQJ3XE.js} +3 -3
  12. package/dist/{Weather-377NKPA5.js → Weather-RPCD2UW3.js} +22 -22
  13. package/dist/{WorldClock-M6AMXQY2.js → WorldClock-AC3EUSVG.js} +7 -7
  14. package/dist/ai/index.d.ts +1 -1
  15. package/dist/ai/index.js +92 -92
  16. package/dist/apps/ImageAnnotator.js +1 -1
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/browser-check.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/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.js +1 -1
  29. package/dist/charts/FunnelChart.js +1 -1
  30. package/dist/charts/HeatmapChart.js +1 -1
  31. package/dist/charts/HistogramChart.js +1 -1
  32. package/dist/charts/Meter.js +1 -1
  33. package/dist/charts/PieChart.js +1 -1
  34. package/dist/charts/RadarChart.js +1 -1
  35. package/dist/charts/RadialBarChart.js +1 -1
  36. package/dist/charts/RangeChart.js +1 -1
  37. package/dist/charts/RankedBars.js +1 -1
  38. package/dist/charts/SankeyChart.js +1 -1
  39. package/dist/charts/ScatterChart.js +1 -1
  40. package/dist/charts/SpecChart.js +1 -1
  41. package/dist/charts/StatTile.js +1 -1
  42. package/dist/charts/SunburstChart.js +1 -1
  43. package/dist/charts/TimeSeriesChart.js +1 -1
  44. package/dist/charts/TreemapChart.js +1 -1
  45. package/dist/charts/WaterfallChart.js +1 -1
  46. package/dist/{chunk-MZCYB2MW.js → chunk-223XYIIH.js} +1 -1
  47. package/dist/{chunk-R5SVNFUG.js → chunk-22N3KA7A.js} +4 -4
  48. package/dist/{chunk-7WMFHPKS.js → chunk-2GMYO6ET.js} +1 -1
  49. package/dist/{chunk-FCWBO7I3.js → chunk-2QE6QD4Y.js} +7 -7
  50. package/dist/{chunk-H4GOJ26X.js → chunk-2YK6ZB7C.js} +1 -1
  51. package/dist/chunk-334TWHQS.js +2 -0
  52. package/dist/chunk-3C7JKJGL.js +1 -0
  53. package/dist/{chunk-5UPLN44S.js → chunk-3PLQKRD4.js} +12 -12
  54. package/dist/chunk-47UTEV3P.js +23 -0
  55. package/dist/{chunk-65JCQLM4.js → chunk-4F3SUYN5.js} +1 -1
  56. package/dist/{chunk-TAEO2JC6.js → chunk-4IYHQNKZ.js} +1 -1
  57. package/dist/chunk-4Q2CZ4US.js +7 -0
  58. package/dist/{chunk-CVXJKHPD.js → chunk-4S3E3VJH.js} +6 -6
  59. package/dist/{chunk-5LHEPE4B.js → chunk-4U5M37SF.js} +1 -1
  60. package/dist/{chunk-F3MO56N4.js → chunk-5HFKVEWW.js} +1 -1
  61. package/dist/{chunk-YMUHIJDJ.js → chunk-5POQCJL6.js} +4 -4
  62. package/dist/chunk-65FZQ572.js +8 -0
  63. package/dist/{chunk-VWYICGVA.js → chunk-6AUQWWUA.js} +1 -1
  64. package/dist/{chunk-RJ24VXBZ.js → chunk-6HYO2W3O.js} +4 -4
  65. package/dist/{chunk-FOE2QHDE.js → chunk-6LYKIC7W.js} +9 -9
  66. package/dist/{chunk-EQFWFQOZ.js → chunk-6QKTQOEV.js} +27 -27
  67. package/dist/chunk-7LG36CPT.js +2 -0
  68. package/dist/{chunk-2FQBY4ED.js → chunk-7RGHV3J5.js} +5 -5
  69. package/dist/chunk-7TJZ5AJE.js +11 -0
  70. package/dist/{chunk-VMKTA5HL.js → chunk-AEEK74UI.js} +6 -6
  71. package/dist/{chunk-CCPUNN4F.js → chunk-AHMYBYXJ.js} +1 -1
  72. package/dist/{chunk-HQSJSPQB.js → chunk-AQUHVWWO.js} +1 -1
  73. package/dist/chunk-B53VREFW.js +8 -0
  74. package/dist/{chunk-GHLXZDLU.js → chunk-BG3C4ALM.js} +1 -1
  75. package/dist/{chunk-GAGCE2ML.js → chunk-CKTFXTJL.js} +1 -1
  76. package/dist/{chunk-BXZLSY2S.js → chunk-CWVQH2SP.js} +1 -1
  77. package/dist/chunk-DEYVAMJQ.js +19 -0
  78. package/dist/{chunk-IODIQ77P.js → chunk-DO3DSSAW.js} +1 -1
  79. package/dist/chunk-DQTYV6AC.js +9 -0
  80. package/dist/{chunk-4RSBPRCQ.js → chunk-DVVB2CY5.js} +1 -1
  81. package/dist/{chunk-O5UD3ZWM.js → chunk-EHM3ZVVT.js} +10 -10
  82. package/dist/{chunk-XOZ5VPXF.js → chunk-EHNQGKW4.js} +1 -1
  83. package/dist/{chunk-75TPMXA7.js → chunk-ELPW25CA.js} +1 -1
  84. package/dist/{chunk-BNPJHOAC.js → chunk-EMRTVPQ5.js} +9 -9
  85. package/dist/chunk-EX34TQ3V.js +28 -0
  86. package/dist/chunk-EZQHUQOP.js +1 -0
  87. package/dist/{chunk-4HJNHI4A.js → chunk-F4VILY3O.js} +1 -1
  88. package/dist/{chunk-ZDCCYRFF.js → chunk-F5B5WOQ7.js} +2 -2
  89. package/dist/{chunk-AJ5GLMGD.js → chunk-FBS55WOX.js} +7 -7
  90. package/dist/{chunk-TDG5WGLR.js → chunk-FDDM7VMQ.js} +1 -1
  91. package/dist/{chunk-DYOFTZOC.js → chunk-FMERX3PG.js} +8 -8
  92. package/dist/chunk-FQD6P6EZ.js +4 -0
  93. package/dist/{chunk-PR6FNBKR.js → chunk-FTKLODQK.js} +1 -1
  94. package/dist/chunk-G3MJO3A6.js +22 -0
  95. package/dist/{chunk-VUM6BYAX.js → chunk-G4D2WM3J.js} +1 -1
  96. package/dist/{chunk-H7CIK74N.js → chunk-G53Y6EPJ.js} +13 -13
  97. package/dist/{chunk-ZDDMFFQK.js → chunk-GITRDCHS.js} +1 -1
  98. package/dist/{chunk-4YWQE67T.js → chunk-GO2TZ35U.js} +1 -1
  99. package/dist/{chunk-6XPS3H5Z.js → chunk-GYPYOBG5.js} +8 -8
  100. package/dist/{chunk-ZGIAMYTI.js → chunk-HK53EKZH.js} +1 -1
  101. package/dist/{chunk-X22SFR5F.js → chunk-HOROMBJB.js} +8 -8
  102. package/dist/{chunk-XCY7A5UM.js → chunk-HZ7TUMNL.js} +1 -1
  103. package/dist/{chunk-Z62HFEFS.js → chunk-I6QVXM2M.js} +15 -15
  104. package/dist/{chunk-6SOS6OBB.js → chunk-IE6TRMIW.js} +1 -1
  105. package/dist/{chunk-NVAH2NQI.js → chunk-IG7JPSBG.js} +1 -1
  106. package/dist/chunk-IJNQ2BUY.js +2 -0
  107. package/dist/{chunk-NUDL6UO3.js → chunk-IOLUF3UL.js} +1 -1
  108. package/dist/chunk-IUVGHHR3.js +1 -0
  109. package/dist/chunk-J6QC45OS.js +8 -0
  110. package/dist/{chunk-VKRJVHYA.js → chunk-JDSOHBO7.js} +1 -1
  111. package/dist/{chunk-KV6XCHAG.js → chunk-JGKDWDVM.js} +16 -16
  112. package/dist/{chunk-JOYGSKWG.js → chunk-JHGBFZHL.js} +5 -5
  113. package/dist/{chunk-PZNF2TEB.js → chunk-JNSRDEB6.js} +9 -9
  114. package/dist/{chunk-SC3AQXJY.js → chunk-JPCPO4MX.js} +8 -8
  115. package/dist/{chunk-BSEQJM7X.js → chunk-JPKNVTTK.js} +1 -1
  116. package/dist/{chunk-NDWX5Z4D.js → chunk-JR2HHKVP.js} +1 -1
  117. package/dist/{chunk-ZJ34FNRC.js → chunk-JWLOERV5.js} +2 -2
  118. package/dist/{chunk-DU7TJVX5.js → chunk-KEVJBI5Q.js} +1 -1
  119. package/dist/{chunk-R5TSUJTK.js → chunk-KLUCEASW.js} +6 -6
  120. package/dist/{chunk-2UBR4YUF.js → chunk-KNZ7YTFH.js} +1 -1
  121. package/dist/{chunk-3DV5YLAI.js → chunk-KYQKMBSY.js} +5 -5
  122. package/dist/{chunk-3YCU6V3U.js → chunk-L2WBCXG7.js} +1 -1
  123. package/dist/{chunk-ROKUEMAK.js → chunk-L3BECLHD.js} +1 -1
  124. package/dist/{chunk-YW6BODBX.js → chunk-LURBH6G4.js} +1 -1
  125. package/dist/{chunk-PC3MYH2K.js → chunk-LXPDURUL.js} +2 -2
  126. package/dist/{chunk-DASRJ26L.js → chunk-M2TQOJ3G.js} +1 -1
  127. package/dist/{chunk-IRCASURW.js → chunk-M7W63T6H.js} +8 -8
  128. package/dist/{chunk-ZHR2HNT2.js → chunk-MEF4JVXP.js} +15 -15
  129. package/dist/{chunk-VVXBBU6R.js → chunk-MHCNQKEK.js} +3 -3
  130. package/dist/{chunk-FEQQMRHJ.js → chunk-MOKABQCY.js} +2 -2
  131. package/dist/{chunk-ARBS2EZ6.js → chunk-NA4XPE7S.js} +3 -3
  132. package/dist/{chunk-HWJQLLJA.js → chunk-NEHVW324.js} +8 -8
  133. package/dist/{chunk-AKKDFFUO.js → chunk-NILGK2KJ.js} +1 -1
  134. package/dist/{chunk-6D6Q3ZCG.js → chunk-NJD7HVTP.js} +5 -5
  135. package/dist/{chunk-XPSWZQR4.js → chunk-OEPQIIYL.js} +1 -1
  136. package/dist/{chunk-FVORTWUY.js → chunk-ORV2AVIJ.js} +1 -1
  137. package/dist/chunk-OWAYSIQH.js +8 -0
  138. package/dist/{chunk-YM7AWNMY.js → chunk-OZ4R6U2M.js} +1 -1
  139. package/dist/{chunk-G5U7IRH4.js → chunk-P5C7DI5A.js} +5 -5
  140. package/dist/{chunk-F3G7S5HO.js → chunk-PALWXHBQ.js} +27 -27
  141. package/dist/{chunk-QO7UHTUE.js → chunk-PKXHAF43.js} +6 -6
  142. package/dist/{chunk-NZKR3JPM.js → chunk-QBMMORYP.js} +1 -1
  143. package/dist/{chunk-AEMTJGD4.js → chunk-QNWC3RWK.js} +1 -1
  144. package/dist/{chunk-QDEQHT2T.js → chunk-QQGNTDMO.js} +1 -1
  145. package/dist/chunk-QQYCZUHI.js +2 -0
  146. package/dist/{chunk-V5VAKDLS.js → chunk-QTVE3OSD.js} +6 -6
  147. package/dist/{chunk-ZAL72BPF.js → chunk-R6GXVLY7.js} +1 -1
  148. package/dist/chunk-RDGXSAOD.js +2 -0
  149. package/dist/{chunk-OAKXWYZD.js → chunk-RFR2K7JO.js} +2 -2
  150. package/dist/{chunk-Y43S6YS5.js → chunk-RZJ63ZM4.js} +10 -10
  151. package/dist/chunk-S5AGWCMT.js +1 -0
  152. package/dist/chunk-SNHBDP4X.js +15 -0
  153. package/dist/{chunk-ROPVIMIR.js → chunk-SR6DDTUN.js} +1 -1
  154. package/dist/chunk-TNNH6F3V.js +11 -0
  155. package/dist/{chunk-IEW5JTIR.js → chunk-U2ZTHOQL.js} +1 -1
  156. package/dist/{chunk-BRFUQAVC.js → chunk-U7WDBCVV.js} +1 -1
  157. package/dist/{chunk-HTHNDX32.js → chunk-UFX7F3KG.js} +1 -1
  158. package/dist/{chunk-KZQRUVII.js → chunk-UGEA3C5C.js} +8 -8
  159. package/dist/chunk-UQPVUPSS.js +1 -0
  160. package/dist/{chunk-Q6GECV4J.js → chunk-UXGNF3OG.js} +1 -1
  161. package/dist/{chunk-2LRSUDGN.js → chunk-VADWTS7H.js} +5 -5
  162. package/dist/{chunk-IYTOOV7Q.js → chunk-VCR3RADH.js} +1 -1
  163. package/dist/{chunk-ITEOA45V.js → chunk-VFSAJMNX.js} +1 -1
  164. package/dist/{chunk-TMSSR5UH.js → chunk-VQ35LXDC.js} +1 -1
  165. package/dist/{chunk-3TCGXYUC.js → chunk-VXSYHTBP.js} +1 -1
  166. package/dist/{chunk-WEZ2RO72.js → chunk-VYHVIKP6.js} +8 -8
  167. package/dist/{chunk-YAM3L5N4.js → chunk-W2TPXKCV.js} +1 -1
  168. package/dist/{chunk-DFOKJAIS.js → chunk-WBXPA7TY.js} +1 -1
  169. package/dist/{chunk-FXG7TOZN.js → chunk-WF4A2HSB.js} +1 -1
  170. package/dist/{chunk-PGATHOTX.js → chunk-WIFK6TLB.js} +1 -1
  171. package/dist/{chunk-IOZSLFGR.js → chunk-WJMPTW3G.js} +1 -1
  172. package/dist/chunk-WWCAVO3R.js +14 -0
  173. package/dist/{chunk-LPAOHDUE.js → chunk-WX5MRNAY.js} +1 -1
  174. package/dist/{chunk-4HJX2M4W.js → chunk-XEPA5J6K.js} +1 -1
  175. package/dist/{chunk-YEEMRWBS.js → chunk-XHD6Q6JV.js} +1 -1
  176. package/dist/{chunk-P62QGXRW.js → chunk-XMFJDT6Y.js} +13 -13
  177. package/dist/{chunk-BLXHT72M.js → chunk-XOQGBU25.js} +1 -1
  178. package/dist/{chunk-H4LUHKUJ.js → chunk-XRTH47EO.js} +49 -49
  179. package/dist/chunk-XSHDPG45.js +9 -0
  180. package/dist/{chunk-ID35S5Y6.js → chunk-XWJT6TFU.js} +1 -1
  181. package/dist/{chunk-PA3OU3Y7.js → chunk-YDFDTRZF.js} +5 -5
  182. package/dist/{chunk-44ZHEIJZ.js → chunk-YGKLZBWC.js} +11 -11
  183. package/dist/{chunk-5PSFENSW.js → chunk-YM2Z4LZ2.js} +16 -16
  184. package/dist/{chunk-LOFFHXZ4.js → chunk-YMHCLK3F.js} +10 -10
  185. package/dist/{chunk-KGBB6REQ.js → chunk-YNVH2EIE.js} +3 -3
  186. package/dist/{chunk-O32GIVYD.js → chunk-YY7OFUT2.js} +3 -3
  187. package/dist/{chunk-JWUNK2PW.js → chunk-ZCGT5YNR.js} +1 -1
  188. package/dist/{chunk-NLHGFQ54.js → chunk-ZNV75GAG.js} +1 -1
  189. package/dist/{chunk-E44RNULN.js → chunk-ZYU5HAIC.js} +1 -1
  190. package/dist/data/DataTable.js +1 -1
  191. package/dist/data/EntityList.js +1 -1
  192. package/dist/data/Gantt.js +1 -1
  193. package/dist/data/Kanban.js +1 -1
  194. package/dist/data/ListFooter.js +1 -1
  195. package/dist/data/ListLoadError.js +1 -1
  196. package/dist/data/Pagination.js +1 -1
  197. package/dist/data/ResizableTable.js +1 -1
  198. package/dist/file-intake/index.js +1 -1
  199. package/dist/forms/BorderInput.js +1 -1
  200. package/dist/forms/BrandAssetEditor.js +1 -1
  201. package/dist/forms/Calendar.js +1 -1
  202. package/dist/forms/ColorPicker.js +1 -1
  203. package/dist/forms/ComposerAttachments.js +1 -1
  204. package/dist/forms/CornersInput.js +1 -1
  205. package/dist/forms/DatePicker.js +1 -1
  206. package/dist/forms/DateRangePicker.js +1 -1
  207. package/dist/forms/DateTimePicker.js +1 -1
  208. package/dist/forms/DisplayChips.js +1 -1
  209. package/dist/forms/FilePicker.js +1 -1
  210. package/dist/forms/FormErrorSummary.js +1 -1
  211. package/dist/forms/IconPicker.js +1 -1
  212. package/dist/forms/ImageFocusPoint.js +1 -1
  213. package/dist/forms/InputNumber.js +1 -1
  214. package/dist/forms/LinkPicker.js +1 -1
  215. package/dist/forms/MediaLibrary.js +1 -1
  216. package/dist/forms/MediaUploadField.js +1 -1
  217. package/dist/forms/MediaUploadGrid.js +1 -1
  218. package/dist/forms/MediaUsedInList.js +1 -1
  219. package/dist/forms/NumericKeypad.js +1 -1
  220. package/dist/forms/PositionInput.js +1 -1
  221. package/dist/forms/Select.d.ts +1 -1
  222. package/dist/forms/Select.js +1 -1
  223. package/dist/forms/SidesInput.js +1 -1
  224. package/dist/forms/Slider.js +1 -1
  225. package/dist/forms/Snippet.js +1 -1
  226. package/dist/forms/TagInput.d.ts +5 -1
  227. package/dist/forms/TagInput.js +1 -1
  228. package/dist/forms/TextToolbar.d.ts +1 -1
  229. package/dist/forms/TextToolbar.js +1 -1
  230. package/dist/forms/TimePicker.js +1 -1
  231. package/dist/forms/WidthsBar.js +1 -1
  232. package/dist/forms/mediaLibraryMenu.js +1 -1
  233. package/dist/forms/mediaMoveItems.js +1 -1
  234. package/dist/forms/textAlign.d.ts +1 -1
  235. package/dist/forms/textAlign.js +1 -1
  236. package/dist/forms/useFileIntake.js +1 -1
  237. package/dist/icons/efficient-glyphs.d.ts +1 -0
  238. package/dist/icons/efficient-glyphs.js +1 -1
  239. package/dist/icons/efficient-looks.d.ts +2 -0
  240. package/dist/icons/efficient-looks.js +1 -1
  241. package/dist/icons/efficient-meanings.d.ts +1 -0
  242. package/dist/icons/efficient-meanings.js +1 -1
  243. package/dist/icons/efficient.d.ts +1 -0
  244. package/dist/icons/efficient.js +1 -1
  245. package/dist/icons/glyphs/ContinueListIcon.d.ts +8 -0
  246. package/dist/icons/glyphs/ContinueListIcon.js +1 -0
  247. package/dist/icons/index.d.ts +2 -2
  248. package/dist/icons/index.js +1 -1
  249. package/dist/icons/looks/ContinueListMiniIcon.d.ts +8 -0
  250. package/dist/icons/looks/ContinueListMiniIcon.js +1 -0
  251. package/dist/icons/looks/ContinueListSolidIcon.d.ts +8 -0
  252. package/dist/icons/looks/ContinueListSolidIcon.js +1 -0
  253. package/dist/icons/looks/map.js +1 -1
  254. package/dist/icons/sets.js +1 -1
  255. package/dist/index.d.ts +1 -1
  256. package/dist/index.js +136 -136
  257. package/dist/locales/zh-Hans.js +1 -1
  258. package/dist/map/index.js +4 -4
  259. package/dist/model-viewer/index.js +3 -3
  260. package/dist/names-CpcmfUzD.d.ts +13 -0
  261. package/dist/page-tabs/index.js +5 -5
  262. package/dist/pdf/index.js +1 -1
  263. package/dist/shell/Accordion.js +1 -1
  264. package/dist/shell/AppUpdateBanner.js +1 -1
  265. package/dist/shell/Avatar.js +1 -1
  266. package/dist/shell/Banner.js +1 -1
  267. package/dist/shell/Breadcrumbs.js +1 -1
  268. package/dist/shell/BudgetBar.js +1 -1
  269. package/dist/shell/Card.js +1 -1
  270. package/dist/shell/ColoredBadge.js +1 -1
  271. package/dist/shell/ConfirmDialog.js +1 -1
  272. package/dist/shell/ContainerFillChart.js +1 -1
  273. package/dist/shell/CountBadge.js +1 -1
  274. package/dist/shell/Dialog.js +1 -1
  275. package/dist/shell/Drawer.js +1 -1
  276. package/dist/shell/EditableGrid.js +1 -1
  277. package/dist/shell/EmptyState.js +1 -1
  278. package/dist/shell/GlobalSearch.js +1 -1
  279. package/dist/shell/HelpCenter.js +1 -1
  280. package/dist/shell/IconRail.js +1 -1
  281. package/dist/shell/ImageLightbox.js +1 -1
  282. package/dist/shell/ItemCount.js +1 -1
  283. package/dist/shell/LanguageSelect.js +1 -1
  284. package/dist/shell/Markdown.d.ts +1 -1
  285. package/dist/shell/Markdown.js +1 -1
  286. package/dist/shell/MetricBar.js +1 -1
  287. package/dist/shell/MetricBarLegend.js +1 -1
  288. package/dist/shell/MilestoneTimeline.js +1 -1
  289. package/dist/shell/PageHeader.js +1 -1
  290. package/dist/shell/ProductionTimeline.js +1 -1
  291. package/dist/shell/ResizeHandle.js +1 -1
  292. package/dist/shell/Result.js +1 -1
  293. package/dist/shell/SearchableSelect.js +1 -1
  294. package/dist/shell/SettingReset.js +1 -1
  295. package/dist/shell/SettingRow.js +1 -1
  296. package/dist/shell/SidebarLayout.js +1 -1
  297. package/dist/shell/SidebarNav.js +1 -1
  298. package/dist/shell/SortableList.js +1 -1
  299. package/dist/shell/Statistic.js +1 -1
  300. package/dist/shell/TimeAgo.js +1 -1
  301. package/dist/shell/TimelineTrack.js +1 -1
  302. package/dist/shell/TransferProgress.js +1 -1
  303. package/dist/shell/Tree.js +1 -1
  304. package/dist/shell/discardGuard.js +1 -1
  305. package/dist/shell/language.js +1 -1
  306. package/dist/shell/strings.d.ts +3 -0
  307. package/dist/shell/strings.js +1 -1
  308. package/dist/shell/toast.js +1 -1
  309. package/dist/telemetry/index.js +1 -1
  310. package/dist/templates/AuthScreen.js +1 -1
  311. package/dist/templates/ChatTemplate.js +1 -1
  312. package/dist/templates/CheckoutTemplate.js +1 -1
  313. package/dist/templates/DashboardTemplate.js +1 -1
  314. package/dist/templates/DataTablePage.js +1 -1
  315. package/dist/templates/EmailTemplate.js +1 -1
  316. package/dist/templates/ErrorBoundary.js +1 -1
  317. package/dist/templates/ErrorPage.js +1 -1
  318. package/dist/templates/FormLayoutPage.js +1 -1
  319. package/dist/templates/GalleryTemplate.js +1 -1
  320. package/dist/ui/index.d.ts +1 -1
  321. package/dist/ui/index.js +1 -1
  322. package/dist/version.js +1 -1
  323. package/package.json +1 -1
  324. package/dist/PdfViewer-OLQBTKOC.js +0 -1
  325. package/dist/Sidebar-7SHI7P5Z.js +0 -44
  326. package/dist/chunk-3RX5KCUH.js +0 -9
  327. package/dist/chunk-7APOZZ72.js +0 -1
  328. package/dist/chunk-B3KQELHS.js +0 -7
  329. package/dist/chunk-B447IHIL.js +0 -4
  330. package/dist/chunk-BBXYBERF.js +0 -1
  331. package/dist/chunk-BKZOTBDP.js +0 -23
  332. package/dist/chunk-BLXEDMZM.js +0 -8
  333. package/dist/chunk-D53FU245.js +0 -8
  334. package/dist/chunk-DEJIH3ZQ.js +0 -1
  335. package/dist/chunk-DGFFDZCY.js +0 -15
  336. package/dist/chunk-EEFUXXYJ.js +0 -22
  337. package/dist/chunk-FBMYLCCE.js +0 -11
  338. package/dist/chunk-HTHD7STJ.js +0 -9
  339. package/dist/chunk-KITSIQCV.js +0 -19
  340. package/dist/chunk-PKRXSIRG.js +0 -1
  341. package/dist/chunk-PLD54WSR.js +0 -1
  342. package/dist/chunk-QXXMRV4E.js +0 -2
  343. package/dist/chunk-R3R6ZJNW.js +0 -28
  344. package/dist/chunk-RMEYKJEH.js +0 -8
  345. package/dist/chunk-UHQBHSWL.js +0 -11
  346. package/dist/chunk-V3KQIY6T.js +0 -8
  347. package/dist/chunk-WUEH6DLJ.js +0 -14
  348. package/dist/chunk-YJGA4LPG.js +0 -2
  349. package/dist/names-DWEZVpDv.d.ts +0 -13
  350. /package/dist/{chunk-S7PTLTWK.js → chunk-OQOWFHRZ.js} +0 -0
@@ -1 +1 @@
1
- import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-7APOZZ72.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&O.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
1
+ import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-EZQHUQOP.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],U=[800,1800],B=e=>{document.prerendering?C(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(e),!0):setTimeout(e)};var N=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,Q=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,G=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(G,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(G,"").split(/[?#]/,1)[0].replace(Q,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&N.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);C(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,U,t.reportAllChanges);B(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,U,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,U,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
@@ -1,27 +1,27 @@
1
- import{Dialog as e}from"./chunk-B447IHIL.js";import{Icon as t}from"./chunk-ISVODSRP.js";import{buttonClasses as r}from"./chunk-UQYNPYF4.js";import{useShellStrings as n,splitAround as o}from"./chunk-DEJIH3ZQ.js";import{createContext as l,useContext as i,useState as s,useRef as a,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var f=l(()=>Promise.resolve(!1)),b=()=>i(f),g=()=>Promise.resolve(!1),p=e=>g(e),v=()=>Promise.resolve(!1),y=e=>v(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:r({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:r({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:r({variant:"primary"})}},w=r({variant:"secondary"}),C=r({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function P(){/* @__PURE__ */
1
+ import{Dialog as e}from"./chunk-FQD6P6EZ.js";import{Icon as t}from"./chunk-ISVODSRP.js";import{buttonClasses as r}from"./chunk-UQYNPYF4.js";import{useShellStrings as n,splitAround as o}from"./chunk-IUVGHHR3.js";import{createContext as l,useContext as i,useState as s,useRef as a,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var f=l(()=>Promise.resolve(!1)),b=()=>i(f),g=()=>Promise.resolve(!1),p=e=>g(e),v=()=>Promise.resolve(!1),y=e=>v(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:r({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:r({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:r({variant:"primary"})}},w=r({variant:"secondary"}),C=r({variant:"primary"}),P="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function L(){/* @__PURE__ */
2
2
  return m(t,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j(){/* @__PURE__ */
3
- return m(t,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function E({children:t}){const[r,l]=s(!1),[i,b]=s({message:""}),[p,y]=s(0),N=a(),E=a(null),F=a(0),D=a([]),I=a(null),T=a(null),$=c(e=>{E.current=e.id,N.current=e.resolve,y(e.id),b(e.options),l(!0)},[]),W=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++F.current,options:t,resolve:e};null===E.current?$(r):D.current.push(r)})},[$]),[H,K]=s(!1),[Q,S]=s({message:""}),[V,Y]=s(""),B=a(),J=c(e=>(S(e),Y(""),K(!0),new Promise(e=>{B.current=e})),[]),[O,R]=s(!1),[U,Z]=s({}),[q,z]=s(""),A=a(),G=c(e=>{const t="string"==typeof e?{message:e}:e;return Z(t),z(t.defaultValue??""),R(!0),new Promise(e=>{A.current=e})},[]);u(()=>{g=W,v=J,x=G},[W,J,G]);const M=(e,t)=>{if(E.current!==e)return;const r=N.current,n=D.current.shift();n?$(n):(E.current=null,N.current=void 0,l(!1)),r?.(t)},X=e=>{K(!1),Y(""),B.current?.(e)},_=e=>{if(e){const e=q.trim();if(!e&&!U.allowEmpty)return R(!1),void A.current?.(null);R(!1),A.current?.(e)}else R(!1),A.current?.(null)},ee=i.variant||(i.confirmLabel?.toLowerCase().includes("delete")||i.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===Q.variant?"warning":"danger"],ne=Q.confirmWord,oe=null==ne||V===ne,le=n().dialog,[ie,se]=o(le.typeToConfirm);/* @__PURE__ */
3
+ return m(t,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F({children:t}){const[r,l]=s(!1),[i,b]=s({message:""}),[p,y]=s(0),N=a(),F=a(null),E=a(0),D=a([]),T=a(null),$=a(null),V=c(e=>{F.current=e.id,N.current=e.resolve,y(e.id),b(e.options),l(!0)},[]),W=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++E.current,options:t,resolve:e};null===F.current?V(r):D.current.push(r)})},[V]),[H,I]=s(!1),[K,Q]=s({message:""}),[R,S]=s(""),U=a(),Y=c(e=>(Q(e),S(""),I(!0),new Promise(e=>{U.current=e})),[]),[G,O]=s(!1),[Z,q]=s({}),[z,A]=s(""),B=a(),J=c(e=>{const t="string"==typeof e?{message:e}:e;return q(t),A(t.defaultValue??""),O(!0),new Promise(e=>{B.current=e})},[]);u(()=>{g=W,v=Y,x=J},[W,Y,J]);const M=(e,t)=>{if(F.current!==e)return;const r=N.current,n=D.current.shift();n?V(n):(F.current=null,N.current=void 0,l(!1)),r?.(t)},X=e=>{I(!1),S(""),U.current?.(e)},_=e=>{if(e){const e=z.trim();if(!e&&!Z.allowEmpty)return O(!1),void B.current?.(null);O(!1),B.current?.(e)}else O(!1),B.current?.(null)},ee=i.variant||(i.confirmLabel?.toLowerCase().includes("delete")||i.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===K.variant?"warning":"danger"],ne=K.confirmWord,oe=null==ne||R===ne,le=n().dialog,[ie,se]=o(le.typeToConfirm);/* @__PURE__ */
4
4
  return d(f.Provider,{value:W,children:[t,
5
- /* @__PURE__ */m(e,{open:r,onClose:()=>M(p,!1),initialFocus:I,footer:/* @__PURE__ */d(h,{children:[
6
- /* @__PURE__ */m("button",{ref:I,type:"button",onClick:()=>M(p,!1),className:w,children:i.cancelLabel||le.cancel}),
5
+ /* @__PURE__ */m(e,{open:r,onClose:()=>M(p,!1),initialFocus:T,footer:/* @__PURE__ */d(h,{children:[
6
+ /* @__PURE__ */m("button",{ref:T,type:"button",onClick:()=>M(p,!1),className:w,children:i.cancelLabel||le.cancel}),
7
7
  /* @__PURE__ */m("button",{type:"button",onClick:()=>M(p,!0),className:te.button,children:i.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
8
- /* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
8
+ /* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(L,{})}),
9
9
  /* @__PURE__ */d("div",{className:"flex-1",children:[
10
10
  /* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:i.title||le.confirmTitle}),
11
11
  /* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:i.message})]})]})}),
12
- /* @__PURE__ */d(e,{open:H,onClose:()=>X(!1),initialFocus:null!=ne?void 0:T,footer:/* @__PURE__ */d(h,{children:[
13
- /* @__PURE__ */m("button",{ref:T,type:"button",onClick:()=>X(!1),className:w,children:Q.cancelLabel||le.destructiveCancel}),
14
- /* @__PURE__ */m("button",{type:"button",onClick:()=>X(!0),disabled:!oe,className:re.button,children:ne??Q.confirmLabel??le.destructiveConfirm})]}),children:[
12
+ /* @__PURE__ */d(e,{open:H,onClose:()=>X(!1),initialFocus:null!=ne?void 0:$,footer:/* @__PURE__ */d(h,{children:[
13
+ /* @__PURE__ */m("button",{ref:$,type:"button",onClick:()=>X(!1),className:w,children:K.cancelLabel||le.destructiveCancel}),
14
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>X(!0),disabled:!oe,className:re.button,children:ne??K.confirmLabel??le.destructiveConfirm})]}),children:[
15
15
  /* @__PURE__ */m("button",{type:"button",onClick:()=>X(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(j,{})}),
16
16
  /* @__PURE__ */d("div",{className:"flex gap-4",children:[
17
- /* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
17
+ /* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(L,{})}),
18
18
  /* @__PURE__ */d("div",{className:"flex-1",children:[
19
- /* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:Q.title||le.destructiveTitle}),
20
- /* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:Q.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
19
+ /* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:K.title||le.destructiveTitle}),
20
+ /* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:K.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
21
21
  /* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
22
22
  /* @__PURE__ */m("kbd",{className:"rounded border border-line-strong bg-surface-sunken px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),se]}),
23
- /* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:V,onChange:e=>Y(e.target.value),onKeyDown:e=>{"Enter"===e.key&&V===ne&&X(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
24
- /* @__PURE__ */d(e,{open:O,onClose:()=>_(!1),title:U.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
25
- /* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:U.cancelLabel||le.cancel}),
26
- /* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!U.allowEmpty&&!q.trim(),className:C,children:U.confirmLabel||le.ok})]}),children:[U.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:U.message}),
27
- /* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:q,onChange:e=>z(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:U.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{E as ConfirmProvider,p as confirm,y as confirmDestructive,N as prompt,b as useConfirm};
23
+ /* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:R,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&R===ne&&X(!0)},placeholder:ne,className:`mt-2 ${P} focus:border-red-500`})]})]})]})]}),
24
+ /* @__PURE__ */d(e,{open:G,onClose:()=>_(!1),title:Z.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
25
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:Z.cancelLabel||le.cancel}),
26
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!Z.allowEmpty&&!z.trim(),className:C,children:Z.confirmLabel||le.ok})]}),children:[Z.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:Z.message}),
27
+ /* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:z,onChange:e=>A(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:Z.placeholder,className:`mt-3 ${P} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{F as ConfirmProvider,p as confirm,y as confirmDestructive,N as prompt,b as useConfirm};
@@ -1,11 +1,11 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-CCPUNN4F.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-ITEOA45V.js";import{useShellStrings as l}from"./chunk-DEJIH3ZQ.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},C){const $=m(),z=l().files,F=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),O=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-AHMYBYXJ.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-VFSAJMNX.js";import{useShellStrings as l}from"./chunk-IUVGHHR3.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},H){const $=m(),z=l().files,B=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),C=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
2
2
  return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
3
- /* @__PURE__ */o("button",{ref:C,type:"button",id:$,disabled:y,onClick:F.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":O,...F.zoneProps,className:t(F.dragOver,y,a(y),"px-4 py-6"),children:[
3
+ /* @__PURE__ */o("button",{ref:H,type:"button",id:$,disabled:y,onClick:B.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":C,...B.zoneProps,className:t(B.dragOver,y,a(y),"px-4 py-6"),children:[
4
4
  /* @__PURE__ */o("span",{children:[
5
5
  /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
6
6
  /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
- /* @__PURE__ */d("input",{...F.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
7
+ /* @__PURE__ */d("input",{...B.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
8
8
  /* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
9
9
  /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
10
- /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{F.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
- /* @__PURE__ */d(s,{rejections:F.rejections})]})});export{p as FilePicker_default};
10
+ /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{B.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
+ /* @__PURE__ */d(s,{rejections:B.rejections})]})});export{p as FilePicker_default};
@@ -1,4 +1,4 @@
1
- import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-HGOWQO63.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-DEJIH3ZQ.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__ */
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-HGOWQO63.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-IUVGHHR3.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}),
@@ -6,22 +6,22 @@ return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.m
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
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:E,quickActions:D,onSelect:I,recent:K,onRecord:M,favorites:P,hotkey:R=!0}={}){const H=m().search,$=E??H.placeholder,[S,B]=h(!1),[W,z]=h(""),[F,Q]=h(0),G=f(null),{results:J,truncatedTypes:O,loading:V,failure:Y,reset:Z}=L(W,l,2);y(()=>{const e=e=>{R&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),B(e=>!e)),"Escape"===e.key&&S&&B(!1)},t=()=>B(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[S,R]),i(S);const[q,U]=h(!1);S!==q&&(U(S),S&&(z(""),Q(0),Z())),y(()=>{S?setTimeout(()=>G.current?.focus(),50):z("")},[S]),y(()=>{Q(0)},[J]);const X=W.length>=2,_=g(()=>X?e(J,D,W,H.actions,{truncatedTypes:O,listRoutes:A,typeLabels:N,seeAllLabel:H.seeAll}):t({recent:K,favorites:P,actions:D,typeLabels:N},H),[X,J,O,A,N,D,W,K,P,H]),ee=g(()=>r(_),[_]),te=Math.min(F,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{S&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[S,te,ee.length,re]);const ae=b(e=>{B(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||M?.(e.result),I?.(e.result)):e.action.onSelect()},[I,M]);return S?k(
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:R,favorites:H,hotkey:M=!0}={}){const P=m().search,$=E??P.placeholder,[S,B]=h(!1),[W,z]=h(""),[F,G]=h(0),V=f(null),{results:O,truncatedTypes:Q,loading:U,failure:Y,reset:q}=L(W,l,2);y(()=>{const e=e=>{M&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),B(e=>!e)),"Escape"===e.key&&S&&B(!1)},t=()=>B(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[S,M]),i(S);const[J,X]=h(!1);S!==J&&(X(S),S&&(z(""),G(0),q())),y(()=>{S?setTimeout(()=>V.current?.focus(),50):z("")},[S]),y(()=>{G(0)},[O]);const Z=W.length>=2,_=g(()=>Z?e(O,D,W,P.actions,{truncatedTypes:Q,listRoutes:A,typeLabels:N,seeAllLabel:P.seeAll}):t({recent:K,favorites:H,actions:D,typeLabels:N},P),[Z,O,Q,A,N,D,W,K,H,P]),ee=g(()=>r(_),[_]),te=Math.min(F,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{S&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[S,te,ee.length,re]);const ae=b(e=>{B(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||R?.(e.result),I?.(e.result)):e.action.onSelect()},[I,R]);return S?k(
10
10
  /* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>B(!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:G,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"}),V&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":H.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
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:H.escBadge})]}),
17
- /* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[V&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:H.searching}),!V&&"all"===Y&&X&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:H.searchFailed}),!V&&X&&0===ee.length&&"all"!==Y&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:H.noResults}),ne&&/* @__PURE__ */w(T,{sections:_,activeIdx:te,listId:re,label:H.listLabel,typeIcons:o,groupCount:H.groupCount,groupLabel:H.groupLabel,onHover:Q,onPick:ae}),!V&&"some"===Y&&X&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:H.partialFailure}),!V&&!X&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:H.minChars(2)})]}),
15
+ /* @__PURE__ */w("input",{ref:V,type:"text",value:W,onChange:e=>{z(e.target.value),G(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),G(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),G(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),G(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"}),U&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":P.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
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:P.escBadge})]}),
17
+ /* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[U&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:P.searching}),!U&&"all"===Y&&Z&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:P.searchFailed}),!U&&Z&&0===ee.length&&"all"!==Y&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:P.noResults}),ne&&/* @__PURE__ */w(T,{sections:_,activeIdx:te,listId:re,label:P.listLabel,typeIcons:o,groupCount:P.groupCount,groupLabel:P.groupLabel,onHover:G,onPick:ae}),!U&&"some"===Y&&Z&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:P.partialFailure}),!U&&!Z&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:P.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
- /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${H.navigate}`]}),
22
+ /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${P.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:H.enterKey}),` ${H.open}`]}),_.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
25
- /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:H.tabKey}),` ${H.nextGroup}`]})]}),
24
+ /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:P.enterKey}),` ${P.open}`]}),_.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
25
+ /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:P.tabKey}),` ${P.nextGroup}`]})]}),
26
26
  /* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
27
- /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:H.escKey}),` ${H.close}`]})]})]})]}),document.body):null}export{I as GlobalSearch,D as openGlobalSearch};
27
+ /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:P.escKey}),` ${P.close}`]})]})]})]}),document.body):null}export{I as GlobalSearch,D as openGlobalSearch};
@@ -1,9 +1,9 @@
1
- import{Calendar as e}from"./chunk-LOFFHXZ4.js";import{inputClasses as r,PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{calendarNames as a,userToday as n}from"./chunk-NHKT5IH6.js";import{fromDateKey as i,toDateKey as o}from"./chunk-JRQMX4PK.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useDropdownPosition as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useShellStrings as p,useShellLocale as f}from"./chunk-DEJIH3ZQ.js";import{forwardRef as b,useState as h,useRef as v,useId as g,useEffect as y}from"react";import{createPortal as x}from"react-dom";import{jsx as N,jsxs as k}from"react/jsx-runtime";var j=/^\d{4}-\d{2}-\d{2}$/,w=/^(aria|data)-/,D=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function F(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":o(e);if(j.test(e))return e;const r=new Date(e);return Number.isNaN(r.getTime())?"":o(r)}function I(e,r){const t=i(e);return t?r.longDate(t.getFullYear(),t.getMonth(),t.getDate()):""}var S=b(function({value:o,onChange:b,min:j,max:S,invalid:$,size:B,native:C,weekStartsOn:E,className:O="","aria-label":q,"aria-describedby":H,"aria-labelledby":J,id:L,name:T,disabled:W,placeholder:z,required:P,clearable:U,form:Y,title:M,tabIndex:Q,autoFocus:R,onFocus:Z,onBlur:G,formatDisplay:K,...V},X){const A=U??!P,_=F(o),ee=F(j),re=F(S),te=p().datePicker,ae=f(),ne=a(ae),[ie,oe]=h(!1),le=v(null),se=v(null),de=v(null),ue=g(),ce=g(),me=g(),pe=u(se,ie,{popupRef:de}),[fe,be]=h(!1);c(()=>{const e=!!L&&(se.current?.labels?.length??0)>0;e!==fe&&be(e)});const he=!q&&(!!J||fe);if(y(()=>{if(!ie)return;const e=e=>{const r=e.target;le.current?.contains(r)||de.current?.contains(r)||oe(!1)};document.addEventListener("pointerdown",e,!0);const r=s(()=>oe(!1));return()=>{document.removeEventListener("pointerdown",e,!0),r()}},[ie]),y(()=>{if(ie)return m(e=>"Escape"===e.key&&(oe(!1),se.current?.focus(),!0),()=>de.current)},[ie]),C)/* @__PURE__ */
2
- return N("input",{ref:X,type:"date",lang:ae,id:L,name:T,disabled:W,"aria-label":q,"aria-describedby":H,"aria-invalid":$||void 0,value:_,min:ee||void 0,max:re||void 0,onChange:e=>b?.(i(e.target.value)),className:r({invalid:$,size:B,className:O}),"aria-labelledby":J,required:P,form:Y,title:M,tabIndex:Q,autoFocus:R,onFocus:Z,onBlur:G,...V});const ve=Object.fromEntries(Object.entries(V).filter(([e])=>w.test(e)&&!D.has(e))),ge=V["aria-required"],ye=!!P||!0===ge||"true"===ge,xe=[he?ce:void 0,ye?me:void 0,H].filter(Boolean).join(" ")||void 0,Ne=n(),ke=!!Ne&&(!ee||Ne>=ee)&&(!re||Ne<=re),je=z??te.placeholder;/* @__PURE__ */
1
+ import{Calendar as e}from"./chunk-YMHCLK3F.js";import{inputClasses as r,PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{calendarNames as a,userToday as n}from"./chunk-NHKT5IH6.js";import{fromDateKey as i,toDateKey as o}from"./chunk-JRQMX4PK.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useDropdownPosition as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useShellStrings as p,useShellLocale as f}from"./chunk-IUVGHHR3.js";import{forwardRef as b,useState as h,useRef as v,useId as g,useEffect as y}from"react";import{createPortal as x}from"react-dom";import{jsx as N,jsxs as k}from"react/jsx-runtime";var j=/^\d{4}-\d{2}-\d{2}$/,w=/^(aria|data)-/,D=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function F(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":o(e);if(j.test(e))return e;const r=new Date(e);return Number.isNaN(r.getTime())?"":o(r)}function C(e,r){const t=i(e);return t?r.longDate(t.getFullYear(),t.getMonth(),t.getDate()):""}var I=b(function({value:o,onChange:b,min:j,max:I,invalid:S,size:$,native:B,weekStartsOn:H,className:q="","aria-label":E,"aria-describedby":L,"aria-labelledby":O,id:T,name:U,disabled:W,placeholder:Y,required:z,clearable:J,form:M,title:P,tabIndex:R,autoFocus:G,onFocus:K,onBlur:V,formatDisplay:Q,...A},X){const Z=J??!z,_=F(o),ee=F(j),re=F(I),te=p().datePicker,ae=f(),ne=a(ae),[ie,oe]=h(!1),le=v(null),se=v(null),de=v(null),ue=g(),ce=g(),me=g(),pe=u(se,ie,{popupRef:de}),[fe,be]=h(!1);c(()=>{const e=!!T&&(se.current?.labels?.length??0)>0;e!==fe&&be(e)});const he=!E&&(!!O||fe);if(y(()=>{if(!ie)return;const e=e=>{const r=e.target;le.current?.contains(r)||de.current?.contains(r)||oe(!1)};document.addEventListener("pointerdown",e,!0);const r=s(()=>oe(!1));return()=>{document.removeEventListener("pointerdown",e,!0),r()}},[ie]),y(()=>{if(ie)return m(e=>"Escape"===e.key&&(oe(!1),se.current?.focus(),!0),()=>de.current)},[ie]),B)/* @__PURE__ */
2
+ return N("input",{ref:X,type:"date",lang:ae,id:T,name:U,disabled:W,"aria-label":E,"aria-describedby":L,"aria-invalid":S||void 0,value:_,min:ee||void 0,max:re||void 0,onChange:e=>b?.(i(e.target.value)),className:r({invalid:S,size:$,className:q}),"aria-labelledby":O,required:z,form:M,title:P,tabIndex:R,autoFocus:G,onFocus:K,onBlur:V,...A});const ve=Object.fromEntries(Object.entries(A).filter(([e])=>w.test(e)&&!D.has(e))),ge=A["aria-required"],ye=!!z||!0===ge||"true"===ge,xe=[he?ce:void 0,ye?me:void 0,L].filter(Boolean).join(" ")||void 0,Ne=n(),ke=!!Ne&&(!ee||Ne>=ee)&&(!re||Ne<=re),je=Y??te.placeholder;/* @__PURE__ */
3
3
  return k("div",{ref:le,className:"relative",children:[
4
- /* @__PURE__ */N("input",{ref:X,type:"hidden",name:T,form:Y,value:_}),
5
- /* @__PURE__ */k("button",{ref:se,type:"button",...ve,id:L,disabled:W,title:M,tabIndex:Q,autoFocus:R,onFocus:Z,onBlur:G,"aria-haspopup":"dialog","aria-expanded":ie,"aria-controls":ie?ue:void 0,"aria-labelledby":J,"aria-describedby":xe,"aria-label":q?`${q}${_?`, ${I(_,ne)}`:""}`:void 0,onClick:()=>oe(e=>!e),className:`${r({invalid:$,size:B,className:O})} flex items-center justify-between gap-2 text-left`,children:[
6
- /* @__PURE__ */N("span",{className:`min-w-0 truncate whitespace-nowrap ${_?"text-ink-strongest":t}`,children:_?K?K(_):I(_,ne):je}),
7
- /* @__PURE__ */N(l,{name:"date",className:`h-4 w-4 shrink-0 ${t}`,strokeWidth:"1.75","aria-hidden":"true"})]}),he&&/* @__PURE__ */N("span",{id:ce,className:"sr-only",children:_?I(_,ne):je}),ye&&/* @__PURE__ */N("span",{id:me,className:"sr-only",children:te.required}),ie&&x(
8
- /* @__PURE__ */k("div",{ref:de,id:ue,role:"dialog","aria-label":q??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:d.popup,left:pe?.left,right:pe?.right,top:pe?.top,bottom:pe?.bottom,maxWidth:pe?.maxWidth,visibility:pe?void 0:"hidden"},children:[
9
- /* @__PURE__ */N(e,{value:_||null,min:ee||null,max:re||null,weekStartsOn:E,onSelect:e=>{oe(!1),se.current?.focus(),b?.(i(e))}}),(A||ke)&&/* @__PURE__ */k("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[A&&/* @__PURE__ */N("button",{type:"button",onClick:()=>{oe(!1),se.current?.focus(),b?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),ke&&/* @__PURE__ */N("button",{type:"button",onClick:()=>{oe(!1),se.current?.focus(),b?.(i(Ne))},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{S as DatePicker_default};
4
+ /* @__PURE__ */N("input",{ref:X,type:"hidden",name:U,form:M,value:_}),
5
+ /* @__PURE__ */k("button",{ref:se,type:"button",...ve,id:T,disabled:W,title:P,tabIndex:R,autoFocus:G,onFocus:K,onBlur:V,"aria-haspopup":"dialog","aria-expanded":ie,"aria-controls":ie?ue:void 0,"aria-labelledby":O,"aria-describedby":xe,"aria-label":E?`${E}${_?`, ${C(_,ne)}`:""}`:void 0,onClick:()=>oe(e=>!e),className:`${r({invalid:S,size:$,className:q})} flex items-center justify-between gap-2 text-left`,children:[
6
+ /* @__PURE__ */N("span",{className:`min-w-0 truncate whitespace-nowrap ${_?"text-ink-strongest":t}`,children:_?Q?Q(_):C(_,ne):je}),
7
+ /* @__PURE__ */N(l,{name:"date",className:`h-4 w-4 shrink-0 ${t}`,strokeWidth:"1.75","aria-hidden":"true"})]}),he&&/* @__PURE__ */N("span",{id:ce,className:"sr-only",children:_?C(_,ne):je}),ye&&/* @__PURE__ */N("span",{id:me,className:"sr-only",children:te.required}),ie&&x(
8
+ /* @__PURE__ */k("div",{ref:de,id:ue,role:"dialog","aria-label":E??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:d.popup,left:pe?.left,right:pe?.right,top:pe?.top,bottom:pe?.bottom,maxWidth:pe?.maxWidth,visibility:pe?void 0:"hidden"},children:[
9
+ /* @__PURE__ */N(e,{value:_||null,min:ee||null,max:re||null,weekStartsOn:H,onSelect:e=>{oe(!1),se.current?.focus(),b?.(i(e))}}),(Z||ke)&&/* @__PURE__ */k("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[Z&&/* @__PURE__ */N("button",{type:"button",onClick:()=>{oe(!1),se.current?.focus(),b?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),ke&&/* @__PURE__ */N("button",{type:"button",onClick:()=>{oe(!1),se.current?.focus(),b?.(i(Ne))},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{I as DatePicker_default};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-CVXJKHPD.js";import{Textarea_default as a}from"./chunk-PB7G6CJ7.js";import{Radio_default as l}from"./chunk-NI5FXWK5.js";import{Select_default as r}from"./chunk-KITSIQCV.js";import{FormField as n}from"./chunk-6KBDNYRW.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Input_default as c}from"./chunk-PT4GMPUB.js";import{Button_default as o}from"./chunk-EVYD6UFQ.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-4S3E3VJH.js";import{Textarea_default as a}from"./chunk-PB7G6CJ7.js";import{Radio_default as l}from"./chunk-NI5FXWK5.js";import{Select_default as r}from"./chunk-DEYVAMJQ.js";import{FormField as n}from"./chunk-6KBDNYRW.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Input_default as c}from"./chunk-PT4GMPUB.js";import{Button_default as o}from"./chunk-EVYD6UFQ.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
2
2
  return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
3
3
  /* @__PURE__ */d("div",{children:[
4
4
  /* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
@@ -1 +1 @@
1
- import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{useRef as e,useEffect as r,useCallback as n}from"react";function i({open:i,dirty:o,onClose:c,title:s,layer:u}){const a=t().dialog,d=e(!1),l=e(!1),m=e({dirty:o,onClose:c,title:s,strings:a});return r(()=>{m.current={dirty:o,onClose:c,title:s,strings:a}}),r(()=>{i||(d.current=!1)},[i]),r(()=>{if(!i||"auto"!==o||!u)return;const t=t=>{u.contains(t.target)&&(d.current=!0)};return document.addEventListener("input",t,!0),document.addEventListener("change",t,!0),()=>{document.removeEventListener("input",t,!0),document.removeEventListener("change",t,!0)}},[i,o,u]),n(()=>{const{dirty:t,onClose:e,title:r,strings:n}=m.current;if(l.current)return;("auto"===t?d.current:t)?(l.current=!0,import("./shell/ConfirmDialog.js").then(({confirm:t})=>t({title:n.discardTitle,message:n.discardMessage("string"==typeof r?r:void 0),confirmLabel:n.discardConfirm,cancelLabel:n.keepEditing,variant:"warning"})).then(t=>{l.current=!1,t&&(d.current=!1,m.current.onClose())})):e()},[])}export{i as useDiscardGuard};
1
+ import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{useRef as e,useEffect as r,useCallback as n}from"react";function i({open:i,dirty:o,onClose:c,title:s,layer:u}){const a=t().dialog,d=e(!1),l=e(!1),m=e({dirty:o,onClose:c,title:s,strings:a});return r(()=>{m.current={dirty:o,onClose:c,title:s,strings:a}}),r(()=>{i||(d.current=!1)},[i]),r(()=>{if(!i||"auto"!==o||!u)return;const t=t=>{u.contains(t.target)&&(d.current=!0)};return document.addEventListener("input",t,!0),document.addEventListener("change",t,!0),()=>{document.removeEventListener("input",t,!0),document.removeEventListener("change",t,!0)}},[i,o,u]),n(()=>{const{dirty:t,onClose:e,title:r,strings:n}=m.current;if(l.current)return;("auto"===t?d.current:t)?(l.current=!0,import("./shell/ConfirmDialog.js").then(({confirm:t})=>t({title:n.discardTitle,message:n.discardMessage("string"==typeof r?r:void 0),confirmLabel:n.discardConfirm,cancelLabel:n.keepEditing,variant:"warning"})).then(t=>{l.current=!1,t&&(d.current=!1,m.current.onClose())})):e()},[])}export{i as useDiscardGuard};
@@ -1,7 +1,7 @@
1
- import{formatMoney as e}from"./chunk-OJI4ROSD.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-EEFUXXYJ.js";import{ChartFrame as a}from"./chunk-VWYICGVA.js";import{ColumnChart as l}from"./chunk-PA3OU3Y7.js";import{TH_ONE_LINE as s}from"./chunk-G67CJAQ2.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-OJI4ROSD.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-G3MJO3A6.js";import{ColumnChart as a}from"./chunk-YDFDTRZF.js";import{ChartFrame as l}from"./chunk-6AUQWWUA.js";import{TH_ONE_LINE as s}from"./chunk-G67CJAQ2.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:[
5
5
  /* @__PURE__ */i("th",{scope:"row",className:`${s} border-t border-gray-100 px-2 py-1 text-left font-normal text-gray-700`,children:e}),n.series.map((e,a)=>{const l=e.values[t];/* @__PURE__ */
6
6
  return i("td",{className:"border-t border-gray-100 px-2 py-1 text-right tabular-nums text-gray-700",children:null===l?r:u(l)},a)})]},t))})]});/* @__PURE__ */
7
- return i(a,{title:y,legend:b.map(e=>({key:e.key,label:e.label,swatch:"line"===n.type?"bar":"square"})),table:f,className:h,children:"line"===n.type?/* @__PURE__ */i(t,{series:b,labels:n.x,height:c,width:m,animate:d,dots:"all",formatValue:p,formatTooltipValue:u}):/* @__PURE__ */i(l,{series:b,labels:n.x,stacked:n.stacked,height:c,width:m,animate:d,formatValue:p,formatTooltipValue:u})})}export{n as SpecChart};
7
+ return i(l,{title:y,legend:b.map(e=>({key:e.key,label:e.label,swatch:"line"===n.type?"bar":"square"})),table:f,className:h,children:"line"===n.type?/* @__PURE__ */i(t,{series:b,labels:n.x,height:c,width:m,animate:d,dots:"all",formatValue:p,formatTooltipValue:u}):/* @__PURE__ */i(a,{series:b,labels:n.x,stacked:n.stacked,height:c,width:m,animate:d,formatValue:p,formatTooltipValue:u})})}export{n as SpecChart};
@@ -1,4 +1,4 @@
1
- import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-DEJIH3ZQ.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";function a({ink:e}){/* @__PURE__ */
1
+ import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-IUVGHHR3.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";function a({ink:e}){/* @__PURE__ */
2
2
  return i("span",{"aria-hidden":"true",className:`h-3 w-0.5 shrink-0 rounded-[1px] ${e}`})}function t({link:t,className:l=""}){const c=n().meter;/* @__PURE__ */
3
3
  return r("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500 ${l}`.trim(),children:[
4
4
  /* @__PURE__ */r("span",{className:"inline-flex items-center gap-1",children:[
@@ -1,7 +1,7 @@
1
- import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-FXG7TOZN.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{createContext as o,useContext as n,useRef as l,useId as s}from"react";import{jsx as d,jsxs as c,Fragment as m}from"react/jsx-runtime";var u=o("compact");function f({"aria-label":e,"aria-labelledby":r,children:t,spacing:i="compact",className:a="",rootProps:o}){/* @__PURE__ */
2
- return d(u.Provider,{value:i,children:/* @__PURE__ */d("div",{...o,role:"list","aria-label":r?void 0:e,"aria-labelledby":r,"data-sortable-list":i,className:`flex min-w-0 flex-col ${"comfortable"===i?"gap-2":"gap-1"} ${a}`.trim(),children:t})})}function b({children:o,title:f,thumb:b,expanded:p,onToggle:h,actions:g,below:v,active:x=!1,flat:w=!1,draggable:y=!1,dragging:N=!1,drop:k,onMove:j,rowProps:D,rowRef:P,className:B=""}){const I=x||!!p,S=n(u),T=l(null),$=s(),A=[D?.["aria-describedby"],j?$:void 0].filter(Boolean).join(" ")||void 0,K=D?.tabIndex;a(()=>{const e=T.current;if(!e||void 0!==K)return;const r=[...e.querySelectorAll('a[href], button, input, select, textarea, [contenteditable]:not([contenteditable="false"]), [tabindex]')].some(r=>r!==e);j&&!r?e.tabIndex=0:e.removeAttribute("tabindex")});const O="comfortable"===S?{before:"-top-[5px]",after:"-bottom-[5px]"}:{before:"-top-0.5",after:"-bottom-0.5"},R=null!=f&&/* @__PURE__ */c(m,{children:[null!=b&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"inline-flex h-6 w-6 shrink-0 overflow-hidden rounded-sm",children:b}),
1
+ import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-WF4A2HSB.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{createContext as o,useContext as n,useRef as l,useId as s}from"react";import{jsx as d,jsxs as c,Fragment as m}from"react/jsx-runtime";var u=o("compact");function f({"aria-label":e,"aria-labelledby":r,children:t,spacing:i="compact",className:a="",rootProps:o}){/* @__PURE__ */
2
+ return d(u.Provider,{value:i,children:/* @__PURE__ */d("div",{...o,role:"list","aria-label":r?void 0:e,"aria-labelledby":r,"data-sortable-list":i,className:`flex min-w-0 flex-col ${"comfortable"===i?"gap-2":"gap-1"} ${a}`.trim(),children:t})})}function b({children:o,title:f,thumb:b,expanded:p,onToggle:h,actions:g,below:v,active:x=!1,flat:w=!1,draggable:y=!1,dragging:N=!1,drop:k,onMove:j,rowProps:D,rowRef:P,className:B=""}){const S=x||!!p,A=n(u),I=l(null),$=s(),H=[D?.["aria-describedby"],j?$:void 0].filter(Boolean).join(" ")||void 0,K=D?.tabIndex;a(()=>{const e=I.current;if(!e||void 0!==K)return;const r=[...e.querySelectorAll('a[href], button, input, select, textarea, [contenteditable]:not([contenteditable="false"]), [tabindex]')].some(r=>r!==e);j&&!r?e.tabIndex=0:e.removeAttribute("tabindex")});const R="comfortable"===A?{before:"-top-[5px]",after:"-bottom-[5px]"}:{before:"-top-0.5",after:"-bottom-0.5"},T=null!=f&&/* @__PURE__ */c(m,{children:[null!=b&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"inline-flex h-6 w-6 shrink-0 overflow-hidden rounded-sm",children:b}),
3
3
  /* @__PURE__ */d("span",{"data-list-row-name":"",className:"min-w-0 flex-1 break-words font-semibold text-(--ink-strongest)",children:f})]});/* @__PURE__ */
4
- return c("div",{role:"listitem","data-list-item":"","data-drop":k,"data-open":I||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-surface transition-colors duration-(--motion-fast)",w?"":I?"border-blue-300":"border-line hover:border-gray-300"].filter(Boolean).join(" "),children:[k&&/* @__PURE__ */d("span",{"aria-hidden":"true","data-list-drop-line":"",className:`pointer-events-none absolute inset-x-2 z-10 h-0.5 rounded-full bg-blue-500 ${O[k]}`}),
5
- /* @__PURE__ */c("div",{...D,ref:e=>{var r,t;T.current=e,t=e,"function"==typeof(r=P)?r(t):r&&(r.current=t)},"data-list-row":"","data-draggable":y||void 0,"aria-keyshortcuts":D?.["aria-keyshortcuts"]??(j?e:void 0),"aria-describedby":A,onKeyDown:e=>{if(D?.onKeyDown?.(e),e.defaultPrevented||!j)return;const r=t(e);r&&!e.target.closest?.("select")&&(e.preventDefault(),j(r))},className:["group/listrow relative flex min-h-8 min-w-0 items-center gap-1 rounded-md text-sm",w?"":"min-h-10 pl-3",y?"cursor-grab active:cursor-grabbing":"","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",null!=g&&!1!==g?"":"pr-2",N?"opacity-40":"",B].filter(Boolean).join(" "),children:[
6
- /* @__PURE__ */c("div",{"data-list-row-main":"",className:"flex min-h-8 min-w-0 flex-1 items-center gap-1",children:[R&&(h?/* @__PURE__ */c("button",{type:"button","aria-expanded":!!p,onClick:h,"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-sm py-2 text-left text-(--ink-strongest) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[R,
7
- /* @__PURE__ */d(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:"2",className:"h-4 w-4 shrink-0 transition-transform duration-(--motion-base) motion-reduce:transition-none "+(p?"rotate-90":"")})]}):/* @__PURE__ */d("span",{"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 py-2",children:R})),o]}),null!=g&&!1!==g&&/* @__PURE__ */d("div",{"data-list-actions":"",className:"flex shrink-0 items-center gap-0.5",children:g}),j&&/* @__PURE__ */d(r,{id:$})]}),null!=v&&!1!==v&&/* @__PURE__ */d("div",{"data-list-below":"",className:w?"":"px-3 pb-3",children:v})]})}export{b as ListRow,f as SortableList};
4
+ return c("div",{role:"listitem","data-list-item":"","data-drop":k,"data-open":S||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-surface transition-colors duration-(--motion-fast)",w?"":S?"border-blue-300":"border-line hover:border-gray-300"].filter(Boolean).join(" "),children:[k&&/* @__PURE__ */d("span",{"aria-hidden":"true","data-list-drop-line":"",className:`pointer-events-none absolute inset-x-2 z-10 h-0.5 rounded-full bg-blue-500 ${R[k]}`}),
5
+ /* @__PURE__ */c("div",{...D,ref:e=>{var r,t;I.current=e,t=e,"function"==typeof(r=P)?r(t):r&&(r.current=t)},"data-list-row":"","data-draggable":y||void 0,"aria-keyshortcuts":D?.["aria-keyshortcuts"]??(j?e:void 0),"aria-describedby":H,onKeyDown:e=>{if(D?.onKeyDown?.(e),e.defaultPrevented||!j)return;const r=t(e);r&&!e.target.closest?.("select")&&(e.preventDefault(),j(r))},className:["group/listrow relative flex min-h-8 min-w-0 items-center gap-1 rounded-md text-sm",w?"":"min-h-10 pl-3",y?"cursor-grab active:cursor-grabbing":"","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",null!=g&&!1!==g?"":"pr-2",N?"opacity-40":"",B].filter(Boolean).join(" "),children:[
6
+ /* @__PURE__ */c("div",{"data-list-row-main":"",className:"flex min-h-8 min-w-0 flex-1 items-center gap-1",children:[T&&(h?/* @__PURE__ */c("button",{type:"button","aria-expanded":!!p,onClick:h,"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-sm py-2 text-left text-(--ink-strongest) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[T,
7
+ /* @__PURE__ */d(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:"2",className:"h-4 w-4 shrink-0 transition-transform duration-(--motion-base) motion-reduce:transition-none "+(p?"rotate-90":"")})]}):/* @__PURE__ */d("span",{"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 py-2",children:T})),o]}),null!=g&&!1!==g&&/* @__PURE__ */d("div",{"data-list-actions":"",className:"flex shrink-0 items-center gap-0.5",children:g}),j&&/* @__PURE__ */d(r,{id:$})]}),null!=v&&!1!==v&&/* @__PURE__ */d("div",{"data-list-below":"",className:w?"":"px-3 pb-3",children:v})]})}export{b as ListRow,f as SortableList};
@@ -1,4 +1,4 @@
1
- import{CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as e}from"./chunk-DEJIH3ZQ.js";import{useState as n,useEffect as t}from"react";import{jsxs as r,jsx as a}from"react/jsx-runtime";function o(l,e=!0){const[r,a]=n(null),[o,s]=n(null),[i,c]=n(null);t(()=>{a(null)},[l]),t(()=>{if(null===o)return;const l=()=>{s(null),c(null)};return window.addEventListener("pointerup",l),()=>window.removeEventListener("pointerup",l)},[o]);const u=r?r[0]:0,m=null!==o&&null!==i&&o!==i?[Math.min(o,i),Math.max(o,i)]:null;return{view:e?r:null,drag:e?m:null,press:l=>{e&&(s(l),c(l))},over:l=>{null!==o&&c(l)},release:()=>{m&&a([u+m[0],u+m[1]]),s(null),c(null)},clear:()=>a(null),slice:l=>e&&r?l.slice(r[0],r[1]+1):l}}function s({from:n,to:t,count:o,total:s,rows:i,onClear:c}){const u=e().charts;/* @__PURE__ */
1
+ import{CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as e}from"./chunk-IUVGHHR3.js";import{useState as n,useEffect as t}from"react";import{jsxs as r,jsx as a}from"react/jsx-runtime";function o(l,e=!0){const[r,a]=n(null),[o,s]=n(null),[i,c]=n(null);t(()=>{a(null)},[l]),t(()=>{if(null===o)return;const l=()=>{s(null),c(null)};return window.addEventListener("pointerup",l),()=>window.removeEventListener("pointerup",l)},[o]);const u=r?r[0]:0,m=null!==o&&null!==i&&o!==i?[Math.min(o,i),Math.max(o,i)]:null;return{view:e?r:null,drag:e?m:null,press:l=>{e&&(s(l),c(l))},over:l=>{null!==o&&c(l)},release:()=>{m&&a([u+m[0],u+m[1]]),s(null),c(null)},clear:()=>a(null),slice:l=>e&&r?l.slice(r[0],r[1]+1):l}}function s({from:n,to:t,count:o,total:s,rows:i,onClear:c}){const u=e().charts;/* @__PURE__ */
2
2
  return r("div",{className:"mt-1 text-xs","data-chart-zoom":"true",children:[
3
3
  /* @__PURE__ */r("div",{className:"flex items-baseline gap-2",children:[
4
4
  /* @__PURE__ */a("span",{className:"font-semibold",style:{color:l.label},children:u.zoomRange(n,t,o)}),void 0!==s&&/* @__PURE__ */a("span",{className:"tabular-nums",style:{color:l.label},children:s}),
@@ -1,8 +1,8 @@
1
- import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-DEJIH3ZQ.js";import{formatPercent as n}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function i(l,e){const t=s(l);if(null==t)return"no-reading";const n=s(e);return null==n||0===n?"no-budget":t>n?"over":"within"}var r=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:f,formatDuration:h,formatValue:x,pace:b,emptyLabel:g,noBudgetLabel:p,size:v="sm",ariaLabel:N,className:y=""}){const w=l().meter,M=e(),$=x??h??(l=>function(l,e=t.meter){const n=Math.round(l),a=Math.floor(n/3600),u=Math.floor(n%3600/60),s=n%60;return a>0?e.hoursMinutes(a,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=g??w.noReading,j=p??w.noBudget,B=s(o),L=s(d),D=null!=L&&L>0?L:null,H=s(c)??0,Q="over"===i(o,d),R=null!=D?D+H:null,z=null!=D&&null!=R?r(D/R*100):null,C=Q&&H>0,E=null==R||null==B?0:Q?C?z??0:0:r(B/R*100),F=C?z??0:0,I=Q?C&&null!=R&&null!=B?r(B/R*100):100:0,J=Math.max(0,I-F),O=s(b),S=null!=O&&null!=R?r(O/R*100):null,V=null!=B&&null!=D?B/D*100:null,Z=null!=V?n(Math.round(V),0,M):null!=B?$(B):"—",q=f??(null==B?k:null==D?j:`${$(B)} / ${$(D)}`),A="md"===v?"h-2":"h-1.5",G=Q?"text-red-600":null!=B?"text-gray-900":"text-gray-400",K=null!=B&&null!=D&&null!=R?/* @__PURE__ */a("div",{role:"meter","aria-label":N??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":R,"aria-valuenow":Math.min(R,B),"aria-valuetext":w.ofBudget(Z),className:`relative mt-2 ${A} overflow-hidden rounded-full bg-gray-200`,children:[(!Q||C)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${E}%`}}),J>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${F}%`,width:`${J}%`}}),H>0&&null!=z&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${z}%`}}),null!=S&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${S}%`}})]}):null;/* @__PURE__ */
1
+ import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-IUVGHHR3.js";import{formatPercent as n}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function i(l,e){const t=s(l);if(null==t)return"no-reading";const n=s(e);return null==n||0===n?"no-budget":t>n?"over":"within"}var r=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:f,formatDuration:h,formatValue:x,pace:b,emptyLabel:g,noBudgetLabel:p,size:v="sm",ariaLabel:N,className:y=""}){const w=l().meter,M=e(),$=x??h??(l=>function(l,e=t.meter){const n=Math.round(l),a=Math.floor(n/3600),u=Math.floor(n%3600/60),s=n%60;return a>0?e.hoursMinutes(a,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=g??w.noReading,j=p??w.noBudget,B=s(o),H=s(d),L=null!=H&&H>0?H:null,R=s(c)??0,V="over"===i(o,d),z=null!=L?L+R:null,C=null!=L&&null!=z?r(L/z*100):null,D=V&&R>0,F=null==z||null==B?0:V?D?C??0:0:r(B/z*100),G=D?C??0:0,I=V?D&&null!=z&&null!=B?r(B/z*100):100:0,O=Math.max(0,I-G),Q=s(b),S=null!=Q&&null!=z?r(Q/z*100):null,U=null!=B&&null!=L?B/L*100:null,q=null!=U?n(Math.round(U),0,M):null!=B?$(B):"—",A=f??(null==B?k:null==L?j:`${$(B)} / ${$(L)}`),E="md"===v?"h-2":"h-1.5",J=V?"text-red-600":null!=B?"text-gray-900":"text-gray-400",K=null!=B&&null!=L&&null!=z?/* @__PURE__ */a("div",{role:"meter","aria-label":N??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":z,"aria-valuenow":Math.min(z,B),"aria-valuetext":w.ofBudget(q),className:`relative mt-2 ${E} overflow-hidden rounded-full bg-gray-200`,children:[(!V||D)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${F}%`}}),O>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${G}%`,width:`${O}%`}}),R>0&&null!=C&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${C}%`}}),null!=S&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${S}%`}})]}):null;/* @__PURE__ */
2
2
  return a("div","md"===v?{className:y,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
3
3
  /* @__PURE__ */a("div",{className:"mt-1 flex items-baseline gap-2",children:[
4
- /* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${G}`,children:Z}),
5
- /* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:q})]}),K]}:{className:y,children:[
4
+ /* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${J}`,children:q}),
5
+ /* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:A})]}),K]}:{className:y,children:[
6
6
  /* @__PURE__ */a("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
7
- /* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${G}`,children:Z}),
8
- /* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:q})]}),K]})}export{m as BudgetBar,i as budgetState};
7
+ /* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${J}`,children:q}),
8
+ /* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:A})]}),K]})}export{m as BudgetBar,i as budgetState};
@@ -1,3 +1,3 @@
1
- import{mediaMoveSubmenu as e}from"./chunk-JWUNK2PW.js";import{optionNoteClass as n}from"./chunk-URHGHXDN.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{jsxs as d,jsx as l}from"react/jsx-runtime";var a={folder:/* @__PURE__ */l(r,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),"folder-plus":/* @__PURE__ */l(r,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */l(r,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */l(r,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */l(r,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */l(r,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */l(r,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */l(r,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},o=e=>a[e];function i(e,r){return r?/* @__PURE__ */d("span",{className:"flex min-w-0 flex-col",children:[
1
+ import{mediaMoveSubmenu as e}from"./chunk-ZCGT5YNR.js";import{optionNoteClass as n}from"./chunk-URHGHXDN.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{jsxs as d,jsx as l}from"react/jsx-runtime";var a={folder:/* @__PURE__ */l(r,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),"folder-plus":/* @__PURE__ */l(r,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */l(r,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */l(r,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */l(r,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */l(r,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */l(r,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */l(r,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},o=e=>a[e];function i(e,r){return r?/* @__PURE__ */d("span",{className:"flex min-w-0 flex-col",children:[
2
2
  /* @__PURE__ */l("span",{children:e}),
3
3
  /* @__PURE__ */l("span",{className:n(),children:r})]}):e}function t(n,r){const{words:d,denied:l}=r,a=[],t=(e,n,r,d={})=>{if(!r)return;const o=d.deny?l[d.deny]:void 0;a.push({key:e,label:i(n,o),icon:d.icon,danger:d.danger,disabled:!!o||!!d.off,onSelect:r})},c=(n,d,i,t)=>{const c=r.move;c&&a.push(e({count:d,kind:i,head:t,icon:o("folder"),disabled:!!l.move,targets:r.moveTargets(n),onPick:e=>c(n,e.key===s?null:e.key)},r.media))},h=e=>{a.length&&a.push({type:"divider",key:e})};switch(n.kind){case"folder":{const e={kind:"folder",id:n.id};if(t("new",d.newSubfolder,r.newSubfolder&&(()=>r.newSubfolder(n.id)),{icon:o("folder-plus"),deny:"newFolder"}),t("rename",d.rename,r.rename&&(()=>r.rename({kind:"folder",id:n.id})),{icon:o("edit"),deny:"rename"}),c(e,1,"file",!1),r.deleteFolder){h("d-delete");const e=!l.deleteFolder&&!!r.folderNotEmpty?.(n.id);a.push({key:"delete-folder",label:i(d.deleteFolder,l.deleteFolder??(e?d.folderNotEmpty:void 0)),icon:o("trash"),danger:!0,disabled:!!l.deleteFolder||e,onSelect:()=>r.deleteFolder(n.id)})}return a}case"files":{const{ids:e}=n,l=1===e.length,i={kind:"files",ids:e};l||a.push({type:"label",key:"count",label:d.filesSelected(e.length)}),c(i,e.length,r.kindOf(e),!0),t("rename",d.rename,r.rename&&(()=>r.rename({kind:"file",id:e[0]})),{icon:o("edit"),deny:"rename",off:!l}),t("replace",d.replace,r.replace&&(()=>r.replace(e[0])),{icon:o("swap"),deny:"replace",off:!l}),t("copy",d.copyUrl,()=>r.copyUrl(e[0]),{icon:o("copy"),off:!l});const s=l?r.urlOf(e[0]):void 0;return s&&a.push({type:"link",key:"open",label:d.openOriginal,href:s,icon:o("external")}),r.trash&&(h("d-trash"),t("trash",l?d.moveToTrash:d.moveFilesToTrash(e.length),()=>r.trash(i),{icon:o("trash"),danger:!0,deny:"trash"})),a}case"trashed":{const{ids:e}=n;return e.length>1&&a.push({type:"label",key:"count",label:d.filesSelected(e.length)}),t("restore",d.restore,r.restore&&(()=>r.restore(e)),{icon:o("undo"),deny:"restore"}),r.deleteForever&&(h("d-delete"),t("delete",d.deleteForever,()=>r.deleteForever(e),{icon:o("trash"),danger:!0,deny:"deleteForever"})),a}case"product-node":case"render":return a.push({type:"label",key:"read-only",label:d.readOnlyMenu}),t("design",d.openInDesign,r.openInDesign&&(()=>r.openInDesign({kind:n.kind,id:n.id})),{icon:o("external")}),"render"===n.kind&&t("copy",d.copyUrl,()=>r.copyUrl(n.id),{icon:o("copy")}),a;default:return a}}var s="__all-files__";export{s as ROOT_KEY,t as mediaLibraryMenu};
@@ -1,4 +1,4 @@
1
- import{GROUP_COLORS as e}from"./chunk-JMGDGNM7.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-DEJIH3ZQ.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
1
+ import{GROUP_COLORS as e}from"./chunk-JMGDGNM7.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-IUVGHHR3.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
2
2
  return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
3
3
  return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
4
4
  /* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-6D6Q3ZCG.js";import{Avatar as t}from"./chunk-YAM3L5N4.js";import{ItemCount as r}from"./chunk-PR6FNBKR.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-NJD7HVTP.js";import{Avatar as t}from"./chunk-W2TPXKCV.js";import{ItemCount as r}from"./chunk-FTKLODQK.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
2
2
  return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
3
3
  /* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
4
4
  /* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
@@ -1,2 +1,2 @@
1
- import{Tooltip as e}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,k=t().resizeHandle,N=o(null),D=o({onResize:d,min:f,max:p,side:m});D.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const I=i(()=>{N.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>I,[I]);const C=e=>{N.current&&(e.currentTarget.hasPointerCapture?.(N.current.pointer)&&e.currentTarget.releasePointerCapture(N.current.pointer),I())},M="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",T="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",$=P?`absolute inset-x-0 ${M} z-10 flex h-2`:`absolute inset-y-0 ${M} z-10 flex w-2`;/* @__PURE__ */
2
- return s(e,{content:z??k.hint,side:T,delay:600,className:`${$} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??k.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),N.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=N.current;if(!r)return;if(0===e.buttons)return void I();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=D.current;o(l(r.width,t,s,n,i))},onPointerUp:C,onPointerCancel:C,onLostPointerCapture:()=>{N.current&&I()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${M} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${M} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
1
+ import{Tooltip as e}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,k=t().resizeHandle,N=o(null),I=o({onResize:d,min:f,max:p,side:m});I.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const C=i(()=>{N.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>C,[C]);const D=e=>{N.current&&(e.currentTarget.hasPointerCapture?.(N.current.pointer)&&e.currentTarget.releasePointerCapture(N.current.pointer),C())},M="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",T="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",R=P?`absolute inset-x-0 ${M} z-10 flex h-2`:`absolute inset-y-0 ${M} z-10 flex w-2`;/* @__PURE__ */
2
+ return s(e,{content:z??k.hint,side:T,delay:600,className:`${R} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??k.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),N.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=N.current;if(!r)return;if(0===e.buttons)return void C();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=I.current;o(l(r.width,t,s,n,i))},onPointerUp:D,onPointerCancel:D,onLostPointerCapture:()=>{N.current&&C()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${M} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${M} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-DEJIH3ZQ.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-IUVGHHR3.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check",...t});case"error":/* @__PURE__ */
3
3
  return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
4
4
  return n(e,{name:"error",...t});default:/* @__PURE__ */
@@ -1,21 +1,21 @@
1
- import{Markdown as e}from"./chunk-E44RNULN.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-DEJIH3ZQ.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({}),E=N.trim().toLowerCase(),L=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]),M=e=>!E||e.title.toLowerCase().includes(E)||e.body.toLowerCase().includes(E)||e.category_label.toLowerCase().includes(E),_=n(()=>L.map(e=>({...e,docs:e.docs.filter(M)})).filter(e=>e.docs.length>0),[L,E]),R=n(()=>_.flatMap(e=>e.docs),[_]),A=(w?R.find(e=>e.slug===w):void 0)??R[0]??null,Y=e=>!!E||(C[e]??e===A?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-ZYU5HAIC.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-IUVGHHR3.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(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.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),H=n(()=>_.map(e=>({...e,docs:e.docs.filter(A)})).filter(e=>e.docs.length>0),[_,M]),L=n(()=>H.flatMap(e=>e.docs),[H]),R=(w?L.find(e=>e.slug===w):void 0)??L[0]??null,Y=e=>!!M||(C[e]??e===R?.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:[
5
5
  /* @__PURE__ */o("h2",{className:"text-sm font-semibold text-gray-900",children:y.help.title}),u&&g&&/* @__PURE__ */o("button",{type:"button",onClick:g,className:"text-xs text-blue-600 hover:underline",children:y.help.newArticle})]}),
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
- /* @__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===_.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:E?y.help.noResults:b??y.help.empty}):_.map(e=>{const t=Y(e.key);/* @__PURE__ */
8
+ /* @__PURE__ */o("input",{type:"text",value:v,onChange:e=>N(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===H.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}):H.map(e=>{const t=Y(e.key);/* @__PURE__ */
10
10
  return i("div",{className:"py-0.5",children:[
11
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=A?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=R?.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:A?/* @__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:R?/* @__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:A.title}),
20
- /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[A.category_label,!1===A.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(A),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(A):A.body?/* @__PURE__ */o(e,{children:A.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:R.title}),
20
+ /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[R.category_label,!1===R.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(R),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(R):R.body?/* @__PURE__ */o(e,{children:R.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};