efficient-shell 9.9.1 → 9.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/dist/{Browser-GQ2ZK4PR.js → Browser-4SQ4P24B.js} +14 -14
  2. package/dist/Calculator-6NA35GFS.js +29 -0
  3. package/dist/{CurrencyConverter-SSR2XDIC.js → CurrencyConverter-EDEJOKHC.js} +8 -8
  4. package/dist/{Documents-5AC4WSNK.js → Documents-4TQFZOMU.js} +9 -9
  5. package/dist/Files-GGJYYELO.js +88 -0
  6. package/dist/{Notepad-EUIQXFUA.js → Notepad-JRRC5U3N.js} +10 -10
  7. package/dist/{PdfViewer-XSISAJZP.js → PdfViewer-FFQOKKFW.js} +1 -1
  8. package/dist/{PomodoroTimer-EV6D4OFU.js → PomodoroTimer-HCLT2JVD.js} +24 -24
  9. package/dist/{Preview-QK5HYJ6U.js → Preview-FFHAUR6X.js} +16 -16
  10. package/dist/Sidebar-BBZ7UFYQ.js +43 -0
  11. package/dist/{Spreadsheet-HR6GBICY.js → Spreadsheet-QTTDPD3U.js} +14 -14
  12. package/dist/{Stock-6ZIQHGPH.js → Stock-3IBS63UR.js} +3 -3
  13. package/dist/{Weather-II7NFRMK.js → Weather-EFIIVKFE.js} +17 -17
  14. package/dist/{WorldClock-NBLNO63Q.js → WorldClock-ERQQ4VWP.js} +6 -6
  15. package/dist/ai/index.js +35 -35
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/charts/BoxPlotChart.js +1 -1
  21. package/dist/charts/CandlestickChart.js +1 -1
  22. package/dist/charts/CartesianPlot.d.ts +24 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.d.ts +4 -1
  29. package/dist/charts/ColumnChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/SpecChart.js +1 -1
  42. package/dist/charts/StatTile.js +1 -1
  43. package/dist/charts/SunburstChart.js +1 -1
  44. package/dist/charts/TimeSeriesChart.d.ts +1 -1
  45. package/dist/charts/TimeSeriesChart.js +1 -1
  46. package/dist/charts/TreemapChart.js +1 -1
  47. package/dist/charts/WaterfallChart.js +1 -1
  48. package/dist/charts/types.d.ts +35 -1
  49. package/dist/{chunk-7WGOLPGM.js → chunk-2AHLONPR.js} +1 -1
  50. package/dist/{chunk-2MLRK7IO.js → chunk-2GPHHW7C.js} +4 -4
  51. package/dist/{chunk-Y44ABEW3.js → chunk-2J2OU65F.js} +2 -2
  52. package/dist/{chunk-P3OBE43Q.js → chunk-2LDOLQ7F.js} +6 -6
  53. package/dist/{chunk-EFFF3FCS.js → chunk-2SJDTKQA.js} +19 -19
  54. package/dist/{chunk-SC63O7AL.js → chunk-3C4RNMN4.js} +1 -1
  55. package/dist/{chunk-HQMN5THW.js → chunk-3FBYM6O5.js} +14 -14
  56. package/dist/{chunk-EXNAAHN4.js → chunk-3MHBALGV.js} +2 -2
  57. package/dist/{chunk-CJB73MHF.js → chunk-3XRBVYTO.js} +2 -2
  58. package/dist/{chunk-BVTNGW5S.js → chunk-46YVA2BF.js} +1 -1
  59. package/dist/{chunk-CO5RKOVX.js → chunk-4DBPKTVX.js} +16 -16
  60. package/dist/{chunk-XD34TCRG.js → chunk-4XZXY2AF.js} +1 -1
  61. package/dist/{chunk-732XHVR4.js → chunk-4YZZYB42.js} +3 -3
  62. package/dist/{chunk-6JU3WQOR.js → chunk-4ZKTUUQK.js} +1 -1
  63. package/dist/{chunk-5JRL5LXD.js → chunk-5AWV5R6E.js} +6 -6
  64. package/dist/{chunk-PYLNMN6E.js → chunk-5CVQN2BR.js} +8 -8
  65. package/dist/{chunk-RWJCKZEY.js → chunk-5Q3PFKB5.js} +1 -1
  66. package/dist/{chunk-LUWRPPJA.js → chunk-5R6RNUDB.js} +5 -5
  67. package/dist/{chunk-WUKN5WUM.js → chunk-5RAOFJYT.js} +6 -6
  68. package/dist/{chunk-ZAU2HIRH.js → chunk-5XNN2SSR.js} +4 -4
  69. package/dist/{chunk-O5LQBBW2.js → chunk-5Y6LGPZI.js} +7 -7
  70. package/dist/{chunk-2HEJDLPP.js → chunk-5ZGL2BRZ.js} +2 -2
  71. package/dist/{chunk-3APSMJPN.js → chunk-64R3IYAM.js} +1 -1
  72. package/dist/{chunk-Z3JW77LH.js → chunk-65DYHG73.js} +1 -1
  73. package/dist/{chunk-DZTAGMNY.js → chunk-6FI3HVUR.js} +42 -42
  74. package/dist/{chunk-5VOVNIOU.js → chunk-6O2W4X2V.js} +1 -1
  75. package/dist/{chunk-VVGL5O4F.js → chunk-6TRE326A.js} +6 -6
  76. package/dist/chunk-7BYBGPWU.js +9 -0
  77. package/dist/chunk-7DMTFIQN.js +11 -0
  78. package/dist/{chunk-OV2SWQPT.js → chunk-7JJUI52C.js} +1 -1
  79. package/dist/{chunk-IMOPDLMA.js → chunk-7WLFHDWA.js} +1 -1
  80. package/dist/chunk-7YZJLFAK.js +11 -0
  81. package/dist/{chunk-56RAOI7O.js → chunk-AG63JVX7.js} +6 -6
  82. package/dist/{chunk-ZTL2RPNY.js → chunk-AOSLOKAL.js} +1 -1
  83. package/dist/chunk-AVAYZK3Z.js +3 -0
  84. package/dist/{chunk-6MVHRNWC.js → chunk-BF7PZFKT.js} +1 -1
  85. package/dist/{chunk-IJWFKUYA.js → chunk-BJONHLET.js} +4 -4
  86. package/dist/{chunk-H7MJM2WI.js → chunk-BJWPPUM6.js} +2 -2
  87. package/dist/{chunk-B4KMHEFZ.js → chunk-BNKULSCG.js} +1 -1
  88. package/dist/{chunk-VG2R6PZV.js → chunk-BYHKYYL6.js} +1 -1
  89. package/dist/chunk-CBMXYXBH.js +15 -0
  90. package/dist/{chunk-GVC535IA.js → chunk-D4KZOYXQ.js} +1 -1
  91. package/dist/chunk-D7JY2KHG.js +7 -0
  92. package/dist/{chunk-PDXPMHG3.js → chunk-DRNB7KDC.js} +1 -1
  93. package/dist/{chunk-U5N6PSXO.js → chunk-E6EUGQGA.js} +5 -5
  94. package/dist/{chunk-N3JXHNID.js → chunk-E72USUUR.js} +10 -10
  95. package/dist/{chunk-C4UL2UNR.js → chunk-EOWOVR55.js} +1 -1
  96. package/dist/{chunk-GS5AISRS.js → chunk-ERLZDA75.js} +2 -2
  97. package/dist/{chunk-CE5BARZI.js → chunk-EWJELWIT.js} +3 -3
  98. package/dist/chunk-F52WQG3M.js +9 -0
  99. package/dist/{chunk-OQ2EDMB2.js → chunk-FEPBXJUR.js} +1 -1
  100. package/dist/{chunk-BWUU565Y.js → chunk-FKA6ZVQO.js} +9 -9
  101. package/dist/chunk-FLXIPEWL.js +2 -0
  102. package/dist/{chunk-RULVWW4A.js → chunk-FVDX6ZSZ.js} +6 -6
  103. package/dist/{chunk-CRXFSN5K.js → chunk-G6LOKIFC.js} +11 -11
  104. package/dist/{chunk-LNQVTH5S.js → chunk-GP5UNEKY.js} +1 -1
  105. package/dist/{chunk-P3DTYFMC.js → chunk-GSKWYMM4.js} +2 -2
  106. package/dist/{chunk-EW3L4W2I.js → chunk-GVAWCTJN.js} +8 -8
  107. package/dist/{chunk-X7PM7JOD.js → chunk-H2XCQJRG.js} +1 -1
  108. package/dist/{chunk-FBUUXK5G.js → chunk-H4YFANH5.js} +1 -1
  109. package/dist/{chunk-FPGRKHUW.js → chunk-HAFB45DT.js} +7 -7
  110. package/dist/{chunk-ZYDZY6ED.js → chunk-HMG5TW2R.js} +1 -1
  111. package/dist/{chunk-442FFHQJ.js → chunk-HRAK46H7.js} +12 -12
  112. package/dist/chunk-I5XVZLDH.js +14 -0
  113. package/dist/{chunk-CXMTDYVI.js → chunk-IENPHB5B.js} +1 -1
  114. package/dist/{chunk-QZKWIVZW.js → chunk-IK332TWA.js} +1 -1
  115. package/dist/{chunk-JKDEE35P.js → chunk-IZQ3XTD2.js} +1 -1
  116. package/dist/{chunk-IB4333CI.js → chunk-JECMVR4S.js} +7 -7
  117. package/dist/{chunk-ZHHEMSOD.js → chunk-JENEVLJU.js} +2 -2
  118. package/dist/{chunk-MWIT4UN2.js → chunk-JGDLTIOX.js} +9 -9
  119. package/dist/{chunk-6ZHX56NM.js → chunk-JQDRM6UK.js} +1 -1
  120. package/dist/{chunk-QC6OK3ED.js → chunk-JVYSRH6U.js} +1 -1
  121. package/dist/{chunk-XS4HFUTW.js → chunk-JWX7QRGE.js} +1 -1
  122. package/dist/{chunk-5VRMQTKV.js → chunk-KAHYUBXM.js} +7 -7
  123. package/dist/{chunk-YWGC7J6B.js → chunk-KECOZKJU.js} +7 -7
  124. package/dist/{chunk-WH3JHMEA.js → chunk-KJHXCVNI.js} +5 -5
  125. package/dist/{chunk-NHVXVHUR.js → chunk-KQSUSVMF.js} +17 -17
  126. package/dist/{chunk-BBEOFKLY.js → chunk-KTRNAMHY.js} +1 -1
  127. package/dist/chunk-LFPJ263N.js +6 -0
  128. package/dist/chunk-LFSCENKW.js +1 -0
  129. package/dist/{chunk-F4DIVARP.js → chunk-LYX55RI3.js} +1 -1
  130. package/dist/{chunk-XZYAFTW4.js → chunk-M5MAIJQQ.js} +4 -4
  131. package/dist/{chunk-XNWQ72WA.js → chunk-MCMUJDEP.js} +1 -1
  132. package/dist/{chunk-UE4PVCA5.js → chunk-MLPIJMOV.js} +2 -2
  133. package/dist/{chunk-ZOHQVSB3.js → chunk-MUHWI4GK.js} +12 -12
  134. package/dist/chunk-N3CTLEJS.js +9 -0
  135. package/dist/{chunk-HJWTWS5E.js → chunk-N52D37FS.js} +5 -5
  136. package/dist/{chunk-P4XTWAKJ.js → chunk-NCRLKFXD.js} +1 -1
  137. package/dist/{chunk-43ONX6UZ.js → chunk-NGQHXTUK.js} +1 -1
  138. package/dist/{chunk-SOP447EP.js → chunk-NRGBXEBU.js} +1 -1
  139. package/dist/{chunk-IQWIYZB5.js → chunk-NU2YQSOP.js} +2 -2
  140. package/dist/chunk-NUTVIQAV.js +8 -0
  141. package/dist/{chunk-EGAV5LSX.js → chunk-O25B75XX.js} +1 -1
  142. package/dist/{chunk-JS6ZSEZJ.js → chunk-O426Q7KC.js} +1 -1
  143. package/dist/{chunk-CAG3TSV2.js → chunk-O4NPQ23Q.js} +1 -1
  144. package/dist/{chunk-IJIESSTX.js → chunk-O56CY36U.js} +4 -4
  145. package/dist/chunk-OEFMBTDH.js +6 -0
  146. package/dist/{chunk-B6YOP2IX.js → chunk-OVDHEMLK.js} +5 -5
  147. package/dist/{chunk-ENL5L6NR.js → chunk-P65C5TUU.js} +1 -1
  148. package/dist/chunk-P6SATWL5.js +22 -0
  149. package/dist/chunk-PEM7UXQ3.js +1 -0
  150. package/dist/{chunk-FLEG5KP5.js → chunk-PWBLGKQ3.js} +5 -5
  151. package/dist/chunk-QCFN3ET4.js +9 -0
  152. package/dist/{chunk-F7F6Z64G.js → chunk-QLOKT22X.js} +1 -1
  153. package/dist/{chunk-IK2WXW2E.js → chunk-QLYOGT3U.js} +13 -13
  154. package/dist/{chunk-N7T63BVD.js → chunk-QMYQ4B5A.js} +3 -3
  155. package/dist/{chunk-EWVOGTEX.js → chunk-QSUQC4AN.js} +1 -1
  156. package/dist/{chunk-RDKBMX6U.js → chunk-QXK2HO4Q.js} +1 -1
  157. package/dist/{chunk-DNWV6N4P.js → chunk-R6R57BWQ.js} +4 -4
  158. package/dist/{chunk-M5GMIQ47.js → chunk-R7JTTKG2.js} +3 -3
  159. package/dist/{chunk-JIW5CJXC.js → chunk-RISKWWMD.js} +3 -3
  160. package/dist/{chunk-AGUA3O5O.js → chunk-RLLONZJJ.js} +1 -1
  161. package/dist/chunk-RSHNWBW2.js +4 -0
  162. package/dist/{chunk-24K6GVNM.js → chunk-SAHQB2JD.js} +17 -17
  163. package/dist/chunk-SC6HJBQA.js +8 -0
  164. package/dist/{chunk-OUSKOWNP.js → chunk-SGR4V5YI.js} +3 -3
  165. package/dist/chunk-SYH7EPLF.js +29 -0
  166. package/dist/{chunk-CVNJSD2J.js → chunk-T2ITXX7R.js} +6 -6
  167. package/dist/chunk-T76X2SHR.js +4 -0
  168. package/dist/{chunk-ARWMJSQJ.js → chunk-T7O2TNNX.js} +1 -1
  169. package/dist/{chunk-ANFLQSGX.js → chunk-TQH6E5V2.js} +1 -1
  170. package/dist/{chunk-KEK47CP3.js → chunk-TRUPMMDJ.js} +9 -9
  171. package/dist/chunk-UAECFZRW.js +8 -0
  172. package/dist/{chunk-L67VXJMF.js → chunk-UL4G6JY2.js} +1 -1
  173. package/dist/{chunk-E4E7MACR.js → chunk-UZGVIHFI.js} +14 -14
  174. package/dist/{chunk-DWBZ3Z34.js → chunk-V5QEPNPK.js} +2 -2
  175. package/dist/{chunk-MV6WDGB6.js → chunk-VANJPZ3H.js} +1 -1
  176. package/dist/{chunk-VVAJ23SD.js → chunk-VBNA237H.js} +1 -1
  177. package/dist/chunk-VVZE27M4.js +7 -0
  178. package/dist/{chunk-2R3BVU75.js → chunk-VZV7Q5V2.js} +1 -1
  179. package/dist/{chunk-BCUQXILM.js → chunk-WZQCRTXF.js} +1 -1
  180. package/dist/chunk-X4BKHXU5.js +9 -0
  181. package/dist/{chunk-UKDJUYIV.js → chunk-XI45TSEK.js} +1 -1
  182. package/dist/{chunk-IGNZULKG.js → chunk-YBU7NOD7.js} +1 -1
  183. package/dist/{chunk-QSJR7EI7.js → chunk-YQB5OYDC.js} +1 -1
  184. package/dist/{chunk-TVL3JPMY.js → chunk-YWR2WRDR.js} +1 -1
  185. package/dist/{chunk-FLQZ7GQ3.js → chunk-Z3CYLDHB.js} +11 -11
  186. package/dist/{chunk-K4D63NP3.js → chunk-ZC3CCRPG.js} +7 -7
  187. package/dist/{chunk-IPTCV6CQ.js → chunk-ZPW3KQ27.js} +30 -30
  188. package/dist/data/DataTable.js +1 -1
  189. package/dist/data/Kanban.js +1 -1
  190. package/dist/data/ListFooter.js +1 -1
  191. package/dist/data/ListLoadError.js +1 -1
  192. package/dist/data/Pagination.js +1 -1
  193. package/dist/file-intake/index.js +1 -1
  194. package/dist/format/index.js +1 -1
  195. package/dist/forms/BorderInput.js +1 -1
  196. package/dist/forms/BrandAssetEditor.js +1 -1
  197. package/dist/forms/Calendar.js +1 -1
  198. package/dist/forms/ColorPicker.js +1 -1
  199. package/dist/forms/ComposerAttachments.js +1 -1
  200. package/dist/forms/CornersInput.js +1 -1
  201. package/dist/forms/DatePicker.js +1 -1
  202. package/dist/forms/DateRangePicker.js +1 -1
  203. package/dist/forms/DateTimePicker.js +1 -1
  204. package/dist/forms/DisplayChips.js +1 -1
  205. package/dist/forms/FilePicker.js +1 -1
  206. package/dist/forms/FormErrorSummary.js +1 -1
  207. package/dist/forms/IconPicker.js +1 -1
  208. package/dist/forms/ImageFocusPoint.js +1 -1
  209. package/dist/forms/InputNumber.js +1 -1
  210. package/dist/forms/LinkPicker.js +1 -1
  211. package/dist/forms/MediaLibrary.js +1 -1
  212. package/dist/forms/MediaUploadField.js +1 -1
  213. package/dist/forms/MediaUploadGrid.js +1 -1
  214. package/dist/forms/MediaUsedInList.js +1 -1
  215. package/dist/forms/NumericKeypad.js +1 -1
  216. package/dist/forms/PositionInput.js +1 -1
  217. package/dist/forms/Select.js +1 -1
  218. package/dist/forms/SidesInput.js +1 -1
  219. package/dist/forms/Slider.js +1 -1
  220. package/dist/forms/Snippet.js +1 -1
  221. package/dist/forms/SplitButton.js +1 -1
  222. package/dist/forms/TagInput.js +1 -1
  223. package/dist/forms/TextToolbar.js +1 -1
  224. package/dist/forms/TimePicker.js +1 -1
  225. package/dist/forms/WidthsBar.js +1 -1
  226. package/dist/forms/mediaLibraryMenu.js +1 -1
  227. package/dist/forms/mediaMoveItems.js +1 -1
  228. package/dist/forms/textAlign.js +1 -1
  229. package/dist/forms/useFileIntake.js +1 -1
  230. package/dist/icons/index.js +1 -1
  231. package/dist/index.js +168 -168
  232. package/dist/locales/zh-Hans.js +1 -1
  233. package/dist/map/index.js +7 -7
  234. package/dist/page-tabs/index.js +5 -5
  235. package/dist/pdf/index.js +1 -1
  236. package/dist/shell/Accordion.js +1 -1
  237. package/dist/shell/AppUpdateBanner.js +1 -1
  238. package/dist/shell/Avatar.js +1 -1
  239. package/dist/shell/Banner.js +1 -1
  240. package/dist/shell/Breadcrumbs.js +1 -1
  241. package/dist/shell/BudgetBar.js +1 -1
  242. package/dist/shell/Card.js +1 -1
  243. package/dist/shell/ColoredBadge.js +1 -1
  244. package/dist/shell/ConfirmDialog.js +1 -1
  245. package/dist/shell/ContainerFillChart.js +1 -1
  246. package/dist/shell/ContextMenu.js +1 -1
  247. package/dist/shell/CountBadge.js +1 -1
  248. package/dist/shell/Dialog.js +1 -1
  249. package/dist/shell/Drawer.js +1 -1
  250. package/dist/shell/DropdownMenu.js +1 -1
  251. package/dist/shell/EditableGrid.js +1 -1
  252. package/dist/shell/EmptyState.js +1 -1
  253. package/dist/shell/GlobalSearch.js +1 -1
  254. package/dist/shell/HelpCenter.js +1 -1
  255. package/dist/shell/IconRail.js +1 -1
  256. package/dist/shell/ImageLightbox.js +1 -1
  257. package/dist/shell/ItemCount.js +1 -1
  258. package/dist/shell/LanguageSelect.js +1 -1
  259. package/dist/shell/Markdown.js +1 -1
  260. package/dist/shell/MetricBar.js +1 -1
  261. package/dist/shell/MetricBarLegend.js +1 -1
  262. package/dist/shell/MilestoneTimeline.js +1 -1
  263. package/dist/shell/PageHeader.js +1 -1
  264. package/dist/shell/PopupMenu.js +1 -1
  265. package/dist/shell/ProductionTimeline.js +1 -1
  266. package/dist/shell/ResizeHandle.js +1 -1
  267. package/dist/shell/Result.js +1 -1
  268. package/dist/shell/SearchableSelect.js +1 -1
  269. package/dist/shell/SettingReset.js +1 -1
  270. package/dist/shell/SettingRow.js +1 -1
  271. package/dist/shell/SidebarLayout.js +1 -1
  272. package/dist/shell/SidebarNav.js +1 -1
  273. package/dist/shell/SortableList.js +1 -1
  274. package/dist/shell/Statistic.js +1 -1
  275. package/dist/shell/TimeAgo.js +1 -1
  276. package/dist/shell/TimelineTrack.js +1 -1
  277. package/dist/shell/TopNav.js +1 -1
  278. package/dist/shell/TransferProgress.js +1 -1
  279. package/dist/shell/Tree.js +1 -1
  280. package/dist/shell/language.js +1 -1
  281. package/dist/shell/strings.d.ts +6 -0
  282. package/dist/shell/strings.js +1 -1
  283. package/dist/shell/toast.js +1 -1
  284. package/dist/telemetry/index.js +1 -1
  285. package/dist/templates/AuthScreen.js +1 -1
  286. package/dist/templates/ChatTemplate.js +1 -1
  287. package/dist/templates/CheckoutTemplate.js +1 -1
  288. package/dist/templates/DashboardTemplate.js +1 -1
  289. package/dist/templates/DataTablePage.js +1 -1
  290. package/dist/templates/EmailTemplate.js +1 -1
  291. package/dist/templates/ErrorBoundary.js +1 -1
  292. package/dist/templates/ErrorPage.js +1 -1
  293. package/dist/templates/FormLayoutPage.js +1 -1
  294. package/dist/templates/GalleryTemplate.js +1 -1
  295. package/dist/ui/index.js +1 -1
  296. package/dist/version.js +1 -1
  297. package/package.json +1 -1
  298. package/dist/Calculator-CSYRZAS5.js +0 -29
  299. package/dist/Files-4SD6LLKX.js +0 -88
  300. package/dist/Sidebar-Y4DTQYW2.js +0 -43
  301. package/dist/chunk-5SJ45P5E.js +0 -8
  302. package/dist/chunk-6453ISTQ.js +0 -4
  303. package/dist/chunk-D7IXMMZT.js +0 -9
  304. package/dist/chunk-FKNJSD6B.js +0 -14
  305. package/dist/chunk-G4EVQD5U.js +0 -8
  306. package/dist/chunk-G6CTTBKE.js +0 -9
  307. package/dist/chunk-HUF34LSW.js +0 -15
  308. package/dist/chunk-IMA5SXEC.js +0 -2
  309. package/dist/chunk-IX6QMUJQ.js +0 -9
  310. package/dist/chunk-JKHWZ2ZY.js +0 -19
  311. package/dist/chunk-KWT6GT4M.js +0 -29
  312. package/dist/chunk-LB3A53D5.js +0 -8
  313. package/dist/chunk-MG7A3R75.js +0 -1
  314. package/dist/chunk-N45ACN3G.js +0 -6
  315. package/dist/chunk-OX2DOOOI.js +0 -8
  316. package/dist/chunk-PDB5W7VI.js +0 -6
  317. package/dist/chunk-POCQ7ZL4.js +0 -3
  318. package/dist/chunk-PVR4KU7H.js +0 -7
  319. package/dist/chunk-Q7KTTDUS.js +0 -11
  320. package/dist/chunk-QWHQJNKL.js +0 -1
  321. package/dist/chunk-RC6UHOAV.js +0 -4
  322. package/dist/chunk-TNTQL6SX.js +0 -1
  323. package/dist/chunk-TTHWXGT7.js +0 -11
  324. package/dist/chunk-WE7CYRZT.js +0 -7
@@ -1,20 +1,20 @@
1
- import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-QC6OK3ED.js";import{ItemCount as n}from"./chunk-PDXPMHG3.js";import{GROUP_COLORS as o}from"./chunk-LNARMEEZ.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{OneLineLabel as s}from"./chunk-OZAAIE4E.js";import{Tooltip as l}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-QWHQJNKL.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
1
+ import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-JVYSRH6U.js";import{ItemCount as n}from"./chunk-DRNB7KDC.js";import{GROUP_COLORS as o}from"./chunk-LNARMEEZ.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{OneLineLabel as s}from"./chunk-OZAAIE4E.js";import{Tooltip as l}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-PEM7UXQ3.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
2
2
  return h("div",{...n,ref:o,role:"tree","aria-label":t?void 0:e,"aria-labelledby":t,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:r})}function x({children:e,hidden:t,className:r=""}){/* @__PURE__ */
3
3
  return h("div",{role:"group",hidden:t,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${r}`.trim(),children:e})}var k=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),w=`${k} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function N(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!f(e)&&"label"in e}function A(e){if(null==e||!1===e||"number"==typeof e)return null;const t=Array.isArray(e)&&e.length>0&&e.every(N)?e:N(e)?[e]:null;return t?t.map((e,t)=>/* @__PURE__ */h("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${k} ${o[e.tone]}`:w,children:e.label},t)):/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:e})}function j({children:e,count:t,countLabel:r,expanded:a,onToggle:o}){const i=void 0!==a,l=
4
4
  /* @__PURE__ */h("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */h(s,{children:e})}),c="number"==typeof t?/* @__PURE__ */h(n,{count:t,label:r,showZero:!0}):null!=t&&!1!==t&&/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:t}),d="text-xs font-semibold uppercase tracking-wide text-ink-faint";return i?/* @__PURE__ */h("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */g("button",{type:"button","aria-expanded":a,onClick:o,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-ink-strongest","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",d].join(" "),children:[
5
5
  /* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:D(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
6
- /* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var D=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),P={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function $({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:$,drop:C,dragging:K=!1,draggable:E=!1,dragHint:I,onMove:H,rowProps:L,className:M=""}){const S=void 0!==p,O=m(),T=x??("number"==typeof y?y:void 0),W=[L?.["aria-describedby"],H?O:void 0].filter(Boolean).join(" ")||void 0,Z="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,q=d?Z?`bg-[var(--status-success-soft)] ${Z}`:"bg-accent-tint text-blue-700":"into"===C?`bg-accent-tint ${Z??"text-ink-strongest"}`:`${Z??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
7
- return g("div",{...L,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":S?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":L?.["aria-keyshortcuts"]??(H?e:void 0),"aria-describedby":W,"data-drop":C,"data-draggable":E||void 0,onKeyDown:e=>{if(L?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&H?(e.preventDefault(),H(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&S&&!p&&f||"ArrowLeft"===e.key&&S&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{L?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",E?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",q,"into"===C?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",M].filter(Boolean).join(" "),children:["before"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),E&&
8
- /* @__PURE__ */h(t,{marker:"tree",hint:I,dragging:K,revealClassName:"group-hover/treerow:opacity-100"}),
9
- /* @__PURE__ */h("span",S?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:D(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
10
- /* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[$??
11
- /* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=T&&/* @__PURE__ */h(n,{count:T,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=T?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
12
- /* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:P,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
6
+ /* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var D=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),$={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function P({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:P,drop:C,dragging:E=!1,draggable:K=!1,dragHint:I,onMove:H,rowProps:L,className:S=""}){const M=void 0!==p,R=m(),B=x??("number"==typeof y?y:void 0),T=[L?.["aria-describedby"],H?R:void 0].filter(Boolean).join(" ")||void 0,Z="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,q=d?Z?`bg-[var(--status-success-soft)] ${Z}`:"bg-accent-tint text-blue-700":"into"===C?`bg-accent-tint ${Z??"text-ink-strongest"}`:`${Z??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
7
+ return g("div",{...L,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":M?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":L?.["aria-keyshortcuts"]??(H?e:void 0),"aria-describedby":T,"data-drop":C,"data-draggable":K||void 0,onKeyDown:e=>{if(L?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&H?(e.preventDefault(),H(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&M&&!p&&f||"ArrowLeft"===e.key&&M&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{L?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",K?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",q,"into"===C?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",E?"opacity-40":"",S].filter(Boolean).join(" "),children:["before"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),K&&
8
+ /* @__PURE__ */h(t,{marker:"tree",hint:I,dragging:E,revealClassName:"group-hover/treerow:opacity-100"}),
9
+ /* @__PURE__ */h("span",M?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:D(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
10
+ /* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[P??
11
+ /* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=B&&/* @__PURE__ */h(n,{count:B,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=B?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
12
+ /* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:$,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
13
13
  /* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
14
14
  /* @__PURE__ */h("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
15
- /* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),H&&/* @__PURE__ */h(r,{id:O})]})}function C({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
15
+ /* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),H&&/* @__PURE__ */h(r,{id:R})]})}function C({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
16
16
  return h("div",{...a,role:"presentation","data-drop":r||void 0,children:e?/* @__PURE__ */g("button",{type:"button",onClick:e,className:`${i} text-left hover:bg-gray-100 hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]`,children:[
17
- /* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function K({onInsert:e,label:t,drop:r=!1,seamProps:a}){const n=d().tree,o=t??n.insertHere,s=r?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
17
+ /* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function E({onInsert:e,label:t,drop:r=!1,seamProps:a}){const n=d().tree,o=t??n.insertHere,s=r?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
18
18
  return g("div",{...a,role:"presentation","data-tree-seam":"","data-drop":r||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
19
19
  /* @__PURE__ */h("span",{"aria-hidden":"true",className:"absolute inset-x-0 -bottom-1 -top-1"}),
20
- /* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${s}`}),e&&/* @__PURE__ */h(l,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */h("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(r?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */h(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,C as TreeEmptySlot,x as TreeGroup,j as TreeGroupLabel,$ as TreeRow,K as TreeSeam};
20
+ /* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${s}`}),e&&/* @__PURE__ */h(l,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */h("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(r?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */h(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,C as TreeEmptySlot,x as TreeGroup,j as TreeGroupLabel,P as TreeRow,E as TreeSeam};
@@ -1,2 +1,2 @@
1
- import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-X2S2XDZI.js";import{formatDateTime as o}from"./chunk-5OTS2G3M.js";import{useShellLocale as c}from"./chunk-QWHQJNKL.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
1
+ import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-X2S2XDZI.js";import{formatDateTime as o}from"./chunk-5OTS2G3M.js";import{useShellLocale as c}from"./chunk-PEM7UXQ3.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
2
2
  return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};
@@ -1,5 +1,5 @@
1
- import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as a}from"./chunk-5SJ45P5E.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-QWHQJNKL.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let k=0;const M=c.map(t=>{if(t.total){const a={from:0,to:k,value:k,total:!0};return{...t,...a}}const a=k;return k+=t.value,{...t,from:a,to:k,value:t.value,total:!1}}),L=M.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
2
- return i(a,{labels:c.map(t=>t.label),values:L,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(M[0]?.from??0),y(k)),tooltip:a=>{const e=M[a],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
1
+ import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as a}from"./chunk-UAECFZRW.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-PEM7UXQ3.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let k=0;const M=c.map(t=>{if(t.total){const a={from:0,to:k,value:k,total:!0};return{...t,...a}}const a=k;return k+=t.value,{...t,from:a,to:k,value:t.value,total:!1}}),j=M.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
2
+ return i(a,{labels:c.map(t=>t.label),values:j,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(M[0]?.from??0),y(k)),tooltip:a=>{const e=M[a],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
3
3
  return i(t,{title:e?.label,rows:[{key:"step",color:o,label:e?.total?v.balance:e.value>=0?v.increase:v.decrease,value:e?.total?y(e.to):`${e.value>=0?"+":"−"}${y(Math.abs(e.value))}`},...e?.total?[]:[{key:"running",label:v.runningTotal,color:l.neutral,value:y(e.to)}]]})},children:({x:t,y:a,active:o})=>/* @__PURE__ */s("g",{children:[g&&M.slice(0,-1).map((l,o)=>
4
4
  /* @__PURE__ */i("line",{x1:t.end(o),y1:a(l.to),x2:t(o+1),y2:a(l.to),stroke:e.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${o}`)),M.map((e,r)=>{const n=e.total?l.neutral:e.value>=0?l.good:l.critical,s=Math.min(a(e.from),a(e.to)),c=Math.max(1,Math.abs(a(e.to)-a(e.from)));/* @__PURE__ */
5
5
  return i("rect",{x:t(r),y:s,width:Math.max(1,t.bandwidth),height:c,rx:b,fill:n,fillOpacity:null===o||o===r?1:.45},r)})]})})}export{c as WaterfallChart};
@@ -1,14 +1,14 @@
1
- import{SearchableSelect as e}from"./chunk-KEK47CP3.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-CO5RKOVX.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Input_default as n}from"./chunk-MAMWQCJ6.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-QWHQJNKL.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:r,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:O=""}=t,j=void 0!==t.onApply,$=u().link,K=y.isSafe??k,P=d(),z=c(null),A=c(null),[E,M]=p({url:r}),Q=j?E.url:r,[U,W]=p(!1),[D,H]=p(null),[X,Y]=p(null),J=c(()=>{});J.current=j?t.onCancel:()=>{},m(()=>{if(j)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(J.current(),!0)},()=>z.current)},[j]),m(()=>{if(!j)return;const e=A.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const L=o??[{value:b,label:$.address,target:{type:"text"}}],R=D&&D.against===Q?D.kind:y.kindOf(Q),S=L.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===R),T=S.find(e=>"text"===e.target.type),V=S.find(e=>e.value===R)??T??S[0];if(!V)return null;const q="text"!==V.target.type,I=q?y.targetOf(Q):Q,Z=h(V.target),B=Z.find(e=>e.value===I),G=e=>({value:e,label:$.unavailable(e)}),_="select"===V.target.type&&I&&w?w(I):null,ee=_?y.readFilter(Q):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=X&&X.against===Q?X.text:Q,te=!q&&""!==le.trim()&&!K(le),ne=te&&(!j||U),re=(e,a)=>{j?M({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{H(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=Z.find(a=>a.value===e);ie(e,a?.label)},se=q?Q:le.trim(),ue=()=>{if(!j||!se)return;if(!q&&te)return void W(!0);const e=q&&E.url===se?E.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[G(a),...e]:[...e],ce=(a,t,n,r,i)=>{const o=[];for(const e of n){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=n.some(e=>""===e.value);/* @__PURE__ */
1
+ import{SearchableSelect as e}from"./chunk-TRUPMMDJ.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-4DBPKTVX.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Input_default as n}from"./chunk-MAMWQCJ6.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-PEM7UXQ3.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:r,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:j=""}=t,O=void 0!==t.onApply,M=u().link,P=y.isSafe??k,$=d(),U=c(null),z=c(null),[A,D]=p({url:r}),E=O?A.url:r,[T,X]=p(!1),[K,Q]=p(null),[W,Y]=p(null),H=c(()=>{});H.current=O?t.onCancel:()=>{},m(()=>{if(O)return s(e=>{const a=U.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(H.current(),!0)},()=>U.current)},[O]),m(()=>{if(!O)return;const e=z.current;e?(e.focus(),e.select()):U.current?.querySelector("button, input")?.focus()},[]);const J=o??[{value:b,label:M.address,target:{type:"text"}}],R=K&&K.against===E?K.kind:y.kindOf(E),S=J.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===R),V=S.find(e=>"text"===e.target.type),L=S.find(e=>e.value===R)??V??S[0];if(!L)return null;const q="text"!==L.target.type,B=q?y.targetOf(E):E,I=h(L.target),Z=I.find(e=>e.value===B),G=e=>({value:e,label:M.unavailable(e)}),_="select"===L.target.type&&B&&w?w(B):null,ee=_?y.readFilter(E):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=W&&W.against===E?W.text:E,te=!q&&""!==le.trim()&&!P(le),ne=te&&(!O||T),re=(e,a)=>{O?D({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{Q(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=I.find(a=>a.value===e);ie(e,a?.label)},se=q?E:le.trim(),ue=()=>{if(!O||!se)return;if(!q&&te)return void X(!0);const e=q&&A.url===se?A.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[G(a),...e]:[...e],ce=(a,t,n,r,i)=>{const o=[];for(const e of n){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=n.some(e=>""===e.value);/* @__PURE__ */
2
2
  return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:n.find(e=>""===e.value)?.label,onChange:r})}/* @__PURE__ */
3
- return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===V.target.type)pe=/* @__PURE__ */f(n,{ref:A,id:`${P}-address`,size:"sm",type:"text",invalid:ne,"aria-label":$.address,"aria-describedby":ne?`${P}-why`:void 0,placeholder:F??$.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{W(!1);const a=e.trim();a?K(e)?(Y({text:e,against:a}),ie(a)):Y({text:e,against:Q}):(Y({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===V.target.type?V.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):V.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:V.target.placeholder},...de(e,I)];pe=ce(V.label,I,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce($.linkType,V.value,S.map(e=>({value:e.value,label:e.label})),e=>{Y(null),W(!1);const a=S.find(a=>a.value===e);if(!a||"text"===a.target.type)return void H({kind:e,against:Q});const l=h(a.target)[0];H({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce($.filter,ee?.param??"",[{value:"",label:$.noFilter},...ee&&!ae?[G(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(I,B?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(I,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce($.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(y.withFilter(I,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${P}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:$.unsafe}),V.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:V.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:$.filterHint})]});if(!j)/* @__PURE__ */
4
- return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${O}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=t.onRemove;/* @__PURE__ */
5
- return v("div",{ref:z,role:"dialog","aria-label":N??$.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${O}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[q?/* @__PURE__ */f("span",{className:a({inline:!0}),children:$.title}):/* @__PURE__ */f("label",{htmlFor:`${P}-address`,className:a({inline:!0}),children:$.title}),me,
6
- /* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:$.remove}):null,
3
+ return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===L.target.type)pe=/* @__PURE__ */f(n,{ref:z,id:`${$}-address`,size:"sm",type:"text",invalid:ne,"aria-label":M.address,"aria-describedby":ne?`${$}-why`:void 0,placeholder:F??M.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{X(!1);const a=e.trim();a?P(e)?(Y({text:e,against:a}),ie(a)):Y({text:e,against:E}):(Y({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===L.target.type?L.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):L.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:L.target.placeholder},...de(e,B)];pe=ce(L.label,B,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(M.linkType,L.value,S.map(e=>({value:e.value,label:e.label})),e=>{Y(null),X(!1);const a=S.find(a=>a.value===e);if(!a||"text"===a.target.type)return void Q({kind:e,against:E});const l=h(a.target)[0];Q({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce(M.filter,ee?.param??"",[{value:"",label:M.noFilter},...ee&&!ae?[G(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(B,Z?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(B,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(M.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(y.withFilter(B,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${$}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:M.unsafe}),L.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:L.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:M.filterHint})]});if(!O)/* @__PURE__ */
4
+ return f("div",{ref:U,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=t.onRemove;/* @__PURE__ */
5
+ return v("div",{ref:U,role:"dialog","aria-label":N??M.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[q?/* @__PURE__ */f("span",{className:a({inline:!0}),children:M.title}):/* @__PURE__ */f("label",{htmlFor:`${$}-address`,className:a({inline:!0}),children:M.title}),me,
6
+ /* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:M.remove}):null,
7
7
  /* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
8
- /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>J.current(),children:$.cancel}),
9
- /* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:$.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),F=d(),O=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
8
+ /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>H.current(),children:M.cancel}),
9
+ /* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:M.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),F=d(),j=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
10
10
  return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
11
11
  /* @__PURE__ */f(n,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
12
12
  /* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?F:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${r.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
13
13
  /* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
14
- /* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:F,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),O()},onRemove:t?()=>{i(""),O()}:void 0,onCancel:O})})]})}export{y as LinkPicker,w as TextLinkField};
14
+ /* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:F,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),j()},onRemove:t?()=>{i(""),j()}:void 0,onCancel:j})})]})}export{y as LinkPicker,w as TextLinkField};
@@ -1,3 +1,3 @@
1
- import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-LNARMEEZ.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{OneLineLabel as r}from"./chunk-OZAAIE4E.js";import{useShellStrings as s}from"./chunk-QWHQJNKL.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
1
+ import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-LNARMEEZ.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{OneLineLabel as r}from"./chunk-OZAAIE4E.js";import{useShellStrings as s}from"./chunk-PEM7UXQ3.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
2
2
  return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
3
3
  /* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
@@ -1 +1 @@
1
- import{toast_default as t}from"./chunk-XD34TCRG.js";import{currentShellStrings as e}from"./chunk-QWHQJNKL.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
1
+ import{toast_default as t}from"./chunk-4XZXY2AF.js";import{currentShellStrings as e}from"./chunk-PEM7UXQ3.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
@@ -1,15 +1,15 @@
1
- import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{keepsNativeMenu as t}from"./chunk-5QFPTDQF.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{createContext as d,forwardRef as u,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function T(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function E(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function M(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var $=d(null),L=d(!1);function j({children:e,style:n,className:a="",onClose:c,minWidth:d=180,portal:u=!1}){const p=h(null),b=m(),[x,v]=f([]),T=h();g(()=>()=>clearTimeout(T.current),[]);const E=i(),M=y(()=>{const e=()=>clearTimeout(T.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),T.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,x,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=s(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const L=W(),j=/(^|[\s:])!?z-/.test(a),B=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===L?"py-1":"large"===L?"py-2":"py-1"} ${a}`,onContextMenu:e=>{t(e.target)||e.preventDefault()},style:{...j?{}:{zIndex:o.menu},minWidth:d,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k($.Provider,{value:M,children:e})});return u?E?w(B,document.body):null:B}function B(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-accent-tint text-blue-700":"text-ink not-disabled:not-aria-disabled:hover:bg-accent-tint not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var D=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function R({kind:e,checked:t}){/* @__PURE__ */
2
- return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&D}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&D})}var F=u(function({onClick:t,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:d,id:u,onMouseEnter:h},f){const g=p($),y=m(),b=null!=s&&!1!==s,w=`${u??y}-label`,N=`${u??y}-note`,C=p(L),T=B(o,i,r),E=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
3
- return x("button",{ref:f,id:u,role:"radio"===E?"menuitemradio":"checkbox"===E?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":E?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{t?.(),g&&g.depth>0&&"checkbox"!==E&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:T.className,style:T.style,children:[E&&/* @__PURE__ */k(R,{kind:E,checked:!!l}),b?
1
+ import{keepsNativeMenu as e}from"./chunk-5QFPTDQF.js";import{optionNoteClass as t}from"./chunk-URHGHXDN.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{createContext as d,forwardRef as u,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function T(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function E(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function M(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var $=d(null),L=d(!1);function j({children:t,style:n,className:a="",onClose:c,minWidth:d=180,portal:u=!1}){const p=h(null),b=m(),[x,v]=f([]),T=h();g(()=>()=>clearTimeout(T.current),[]);const E=i(),M=y(()=>{const e=()=>clearTimeout(T.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),T.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,x,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=s(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const L=W(),j=/(^|[\s:])!?z-/.test(a),B=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===L?"py-1":"large"===L?"py-2":"py-1"} ${a}`,onContextMenu:t=>{e(t.target)||t.preventDefault()},style:{...j?{}:{zIndex:o.menu},minWidth:d,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k($.Provider,{value:M,children:t})});return u?E?w(B,document.body):null:B}function B(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-accent-tint text-blue-700":"text-ink not-disabled:not-aria-disabled:hover:bg-accent-tint not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var D=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function R({kind:e,checked:t}){/* @__PURE__ */
2
+ return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&D}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&D})}var F=u(function({onClick:e,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:d,id:u,onMouseEnter:h},f){const g=p($),y=m(),b=null!=s&&!1!==s,w=`${u??y}-label`,N=`${u??y}-note`,C=p(L),T=B(o,i,r),E=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
3
+ return x("button",{ref:f,id:u,role:"radio"===E?"menuitemradio":"checkbox"===E?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":E?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{e?.(),g&&g.depth>0&&"checkbox"!==E&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:T.className,style:T.style,children:[E&&/* @__PURE__ */k(R,{kind:E,checked:!!l}),b?
4
4
  /* @__PURE__ */x("span",{className:"block min-w-0 flex-1 py-2",children:[
5
5
  /* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(H,{children:c}),
6
6
  /* @__PURE__ */k("span",{id:w,className:"min-w-0",children:n})]}),
7
- /* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:e(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(H,{children:c}),n]})]})});function H({children:e}){/* @__PURE__ */
8
- return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var P=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function A(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function I(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function S({label:e,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:d,rowProps:u}){const f=p($),N=m(),C=h(null),T=h(null),L=h(),j=h(!1),D=`${N}-menu`;g(()=>()=>clearTimeout(L.current),[]);const R=f?.depth??0,F=f?.path[R],H=!!F&&F.key===N&&!o,S=b(e=>{if(!f||o||!C.current)return;clearTimeout(L.current),j.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=R>0&&(f.path[R-1]?.flipped??!1),a=M(r.left,r.right,c,window.innerWidth,4,i);f.open(R,{key:N,y:t.top,...a})},[f,o,R,N,c]),z=e=>{f?.closeBelow(R),C.current?.focus()};g(()=>{if(H)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>R+1)&&(z(),!0)),()=>T.current)}),a(()=>{if(!H||!F)return;const e=()=>{const e=T.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=R>0&&(f?.path[R-1]?.flipped??!1),o=e.offsetWidth||c,i=M(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=E(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{H&&j.current&&(j.current=!1,I(T.current)[0]?.focus())},[H]);const U=y(()=>f&&{...f,depth:R+1},[f,R]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const q=B(!1,o,i,H),J=W();/* @__PURE__ */
7
+ /* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:t(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(H,{children:c}),n]})]})});function H({children:e}){/* @__PURE__ */
8
+ return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var P=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function A(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function I(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function S({label:t,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:d,rowProps:u}){const f=p($),N=m(),C=h(null),T=h(null),L=h(),j=h(!1),D=`${N}-menu`;g(()=>()=>clearTimeout(L.current),[]);const R=f?.depth??0,F=f?.path[R],H=!!F&&F.key===N&&!o,S=b(e=>{if(!f||o||!C.current)return;clearTimeout(L.current),j.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=R>0&&(f.path[R-1]?.flipped??!1),a=M(r.left,r.right,c,window.innerWidth,4,i);f.open(R,{key:N,y:t.top,...a})},[f,o,R,N,c]),z=e=>{f?.closeBelow(R),C.current?.focus()};g(()=>{if(H)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>R+1)&&(z(),!0)),()=>T.current)}),a(()=>{if(!H||!F)return;const e=()=>{const e=T.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=R>0&&(f?.path[R-1]?.flipped??!1),o=e.offsetWidth||c,i=M(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=E(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{H&&j.current&&(j.current=!1,I(T.current)[0]?.focus())},[H]);const U=y(()=>f&&{...f,depth:R+1},[f,R]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const q=B(!1,o,i,H),J=W();/* @__PURE__ */
9
9
  return x(v,{children:[
10
10
  /* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":H,"aria-controls":H?D:void 0,disabled:o,"data-popup-submenu-row":!0,className:q.className,style:q.style,onClick:e=>{const t=0===e.detail;H?t&&I(T.current)[0]?.focus():S(t)},...u,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),S(!0))},onMouseEnter:()=>{u?.onMouseEnter?.(),o||(f.cancelClose(),H?f.closeBelow(R+1):(clearTimeout(L.current),L.current=setTimeout(()=>S(!1),120)))},onMouseLeave:()=>{clearTimeout(L.current),f.scheduleClose(R)},children:[n,
11
- /* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:e}),P]}),H&&w(
12
- /* @__PURE__ */k("div",{ref:T,id:D,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===J?"py-1":"large"===J?"py-2":"py-1"),style:{left:F.left,top:F.y,minWidth:c,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:A(f.root.current)+R+1,animation:(F.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=I(T.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),z())},onMouseEnter:()=>{f.cancelClose(),clearTimeout(L.current)},onMouseLeave:()=>f.scheduleClose(R+1),onContextMenu:e=>{t(e.target)||e.preventDefault()},children:/* @__PURE__ */k($.Provider,{value:U,children:r})}),document.body)]})}function z(){const e=W();/* @__PURE__ */
11
+ /* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:t}),P]}),H&&w(
12
+ /* @__PURE__ */k("div",{ref:T,id:D,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===J?"py-1":"large"===J?"py-2":"py-1"),style:{left:F.left,top:F.y,minWidth:c,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:A(f.root.current)+R+1,animation:(F.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=I(T.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),z())},onMouseEnter:()=>{f.cancelClose(),clearTimeout(L.current)},onMouseLeave:()=>f.scheduleClose(R+1),onContextMenu:t=>{e(t.target)||t.preventDefault()},children:/* @__PURE__ */k($.Provider,{value:U,children:r})}),document.body)]})}function z(){const e=W();/* @__PURE__ */
13
13
  return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function U(){const e=W(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function q({children:e}){/* @__PURE__ */
14
14
  return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:U(),children:e})}function J({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
15
15
  return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{R as MenuCheckMark,J as MenuIcon,L as MenuSemanticsContext,j as PopupMenu,z as PopupMenuDivider,F as PopupMenuItem,q as PopupMenuLabel,S as PopupSubmenu,E as clampMenuTop,C as closeMenuBelow,B as itemLook,M as menuPanelLeft,U as menuTextRowStyle,N as openMenuLevel,T as resolveMenuLevels};
@@ -1,4 +1,4 @@
1
- import{Modal as e}from"./chunk-DZTAGMNY.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
1
+ import{Modal as e}from"./chunk-6FI3HVUR.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
2
2
  return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
3
3
  /* @__PURE__ */n("div",{children:[
4
4
  /* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
@@ -1,15 +1,15 @@
1
- import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-EFFF3FCS.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-YDEIXM2A.js";import{Icon as s}from"./chunk-FSPFV4MI.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-QWHQJNKL.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const S=t.map(e=>a(e.date)).filter(e=>null!=e),x=l(Date.now,null)??Math.max(0,...S,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),P=S.length?Math.min(...S):x,C=S.length?Math.max(...S):x,D=a(r??null)??P,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),I=(()=>{const e=[R,C,q,D+i];return O||e.push(x),Math.max(...e)})(),T=Math.max(1,Math.round((I-D)/i)),A=a(p??null)??C??D,L=Math.min(Math.max(y??A,D),I),F=t.find(e=>{const t=a(e.date);return null!=t&&t<=L})??null;let j=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>L){j=t[e];break}}const $=(()=>{if(F||!j||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(D).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),E=F??$,z=F?a(F.date):$?D:null,H=j?a(j.date):null,J=!!(E&&j&&null!=z&&null!=H&&L>z&&L<H);let K,Q;if(J&&null!=z&&null!=H){const e=(L-z)/Math.max(H-z,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of E?.items??[])r[e.part_number]=e;const n={};for(const e of j?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(E?.est_completion_date),s=a(j?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):E?.est_completion_date||j?.est_completion_date||null,K={id:`interp-${L}`,progress_number:_.estimated,date:new Date(L).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},Q=E}else if(K=E??t[t.length-1]??null,K){const e=t.findIndex(e=>e.id===K.id);Q=e>=0&&e<t.length-1?t[e+1]:null}else Q=null;const B={};for(const e of Q?.items??[])B[e.part_number]=e;const G=!(!d||K?.id===d),V=d?Math.min(a(p??null)??I,I):I,W=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:D,endMs:I,totalLeadDays:T,scrubMs:L,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:G,beforeAnchor:E,nextAfter:j,displayed:K,prevReport:Q,prevByPN:B,isInterpolated:J,playing:v,startPlay:()=>{if(v)return void N();if(V<=D)return void f(V);M(!0),f(D);let e=performance.now(),t=D;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=V)return f(V),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:W,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),S=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),x=new Map(N.map(({report:e,ms:t})=>[e.id,t])),P=N.map(({ms:e})=>e),C=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
2
- return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:S,markers:C,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=x.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:P,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:S,variant:x="card",onPlayStart:P}){const{reports:C,markers:D,poNumber:R,startMs:O,endMs:q,totalLeadDays:I,scrubMs:T,setScrubMs:A,displayed:L,scrubbedAway:F,resetToCurrent:j,currentReportId:$,currentReportProgressNumber:E,estCompletionMs:z}=n,H=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(C.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),A,P),J=c().production,K=d(),Q=_??J.heading,B=e=>o(e,K);if(0===C.length&&0===D.length)return null;const G=D.filter(e=>"shipment"===e.kind),V=D.filter(e=>"inspection"===e.kind),W=D.filter(e=>"invoice"===e.kind),X=(L?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),Y=L?v(L):0,Z=C.find(e=>e.id===$),U=Z?N(Z):E,ee=
3
- /* @__PURE__ */h("button",{type:"button",onClick:H.toggle,"aria-pressed":H.playing,title:H.playing?J.pause:J.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[H.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
- /* @__PURE__ */b("span",{children:H.playing?J.pause:J.play})]}),te=F&&(S??U)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{H.stop(),j()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:S??J.backTo(String(U))}):null,[re,ne]=p(J.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:L?/* @__PURE__ */h(y,{children:[e&&re,
1
+ import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-2SJDTKQA.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-YDEIXM2A.js";import{Icon as s}from"./chunk-FSPFV4MI.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-PEM7UXQ3.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const S=t.map(e=>a(e.date)).filter(e=>null!=e),x=l(Date.now,null)??Math.max(0,...S,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),P=S.length?Math.min(...S):x,D=S.length?Math.max(...S):x,C=a(r??null)??P,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),T=(()=>{const e=[R,D,q,C+i];return O||e.push(x),Math.max(...e)})(),A=Math.max(1,Math.round((T-C)/i)),I=a(p??null)??D??C,L=Math.min(Math.max(y??I,C),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=L})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>L){$=t[e];break}}const F=(()=>{if(j||!$||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(C).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),E=j??F,z=j?a(j.date):F?C:null,J=$?a($.date):null,K=!!(E&&$&&null!=z&&null!=J&&L>z&&L<J);let Q,X;if(K&&null!=z&&null!=J){const e=(L-z)/Math.max(J-z,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of E?.items??[])r[e.part_number]=e;const n={};for(const e of $?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(E?.est_completion_date),s=a($?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):E?.est_completion_date||$?.est_completion_date||null,Q={id:`interp-${L}`,progress_number:_.estimated,date:new Date(L).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},X=E}else if(Q=E??t[t.length-1]??null,Q){const e=t.findIndex(e=>e.id===Q.id);X=e>=0&&e<t.length-1?t[e+1]:null}else X=null;const B={};for(const e of X?.items??[])B[e.part_number]=e;const G=!(!d||Q?.id===d),H=d?Math.min(a(p??null)??T,T):T,U=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:C,endMs:T,totalLeadDays:A,scrubMs:L,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:G,beforeAnchor:E,nextAfter:$,displayed:Q,prevReport:X,prevByPN:B,isInterpolated:K,playing:v,startPlay:()=>{if(v)return void N();if(H<=C)return void f(H);M(!0),f(C);let e=performance.now(),t=C;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=H)return f(H),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:U,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),S=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),x=new Map(N.map(({report:e,ms:t})=>[e.id,t])),P=N.map(({ms:e})=>e),D=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
2
+ return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:S,markers:D,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=x.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:P,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:S,variant:x="card",onPlayStart:P}){const{reports:D,markers:C,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:A,setScrubMs:I,displayed:L,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:E,estCompletionMs:z}=n,J=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(D.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),I,P),K=c().production,Q=d(),X=_??K.heading,B=e=>o(e,Q);if(0===D.length&&0===C.length)return null;const G=C.filter(e=>"shipment"===e.kind),H=C.filter(e=>"inspection"===e.kind),U=C.filter(e=>"invoice"===e.kind),V=(L?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),Y=L?v(L):0,Z=D.find(e=>e.id===F),W=Z?N(Z):E,ee=
3
+ /* @__PURE__ */h("button",{type:"button",onClick:J.toggle,"aria-pressed":J.playing,title:J.playing?K.pause:K.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[J.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
+ /* @__PURE__ */b("span",{children:J.playing?K.pause:K.play})]}),te=j&&(S??W)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{J.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:S??K.backTo(String(W))}):null,[re,ne]=p(K.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:L?/* @__PURE__ */h(y,{children:[e&&re,
5
5
  /* @__PURE__ */b("b",{className:"font-medium",children:N(L)}),e&&ne,
6
- /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",B(new Date(L.date).getTime())," · ",J.overall(Math.round(Y))," · ",J.inStock(X)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:J.noReport})});if("rail"===x){const e=null!=z&&z>=q&&q>O,t=e?{key:"__estimate__",label:J.estimatedCompletion,dateText:B(z)}:null;/* @__PURE__ */
6
+ /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",B(new Date(L.date).getTime())," · ",K.overall(Math.round(Y))," · ",K.inStock(V)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:K.noReport})});if("rail"===x){const e=null!=z&&z>=q&&q>O,t=e?{key:"__estimate__",label:K.estimatedCompletion,dateText:B(z)}:null;/* @__PURE__ */
7
7
  return h("div",{className:"shrink-0","data-timeline-variant":"rail",children:[
8
- /* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:C,markers:D,valueMs:T,activeId:L?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??J.start,end:M?.end??(e?J.estDone:void 0)},onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:H.stop}}),
8
+ /* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:D,markers:C,valueMs:A,activeId:L?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??K.start,end:M?.end??(e?K.estDone:void 0)},onDragStart:J.stop,playback:{playing:J.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:J.stop}}),
9
9
  /* @__PURE__ */h("div",{className:"rosh-tl-railrow","data-timeline-part":"rail-row",children:[ee,te,ae(!1)]})]})}/* @__PURE__ */
10
- return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:Q,subject:R,meta:[`${B(O)} → ${B(q)}`,J.leadTime(I)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
11
- /* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[C.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
12
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),J.report]}),G.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
13
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),J.shipment]}),V.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
14
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),J.inspection]}),W.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
15
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),J.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:C,markers:D,valueMs:T,activeId:L?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:H.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
10
+ return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:X,subject:R,meta:[`${B(O)} → ${B(q)}`,K.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
11
+ /* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[D.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
12
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),K.report]}),G.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
13
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),K.shipment]}),H.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
14
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),K.inspection]}),U.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
15
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),K.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:D,markers:C,valueMs:A,activeId:L?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:J.stop,playback:{playing:J.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:J.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
@@ -0,0 +1,14 @@
1
+ import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-PEM7UXQ3.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:N}){const A=o().charts,L=i(),S=y??(e=>h(e,L)),j=N??A.noStages,z=c(),[C,F]=m(null),{highlighted:V}=e(),w=s(null),E=l(w,560),U=$??E;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const W=b??a(0),Z=p??54*x.length,H=Math.max(...x.map(e=>e.value),1),R="bars"===v,T=R?Math.round(Math.min(132,Math.max(80,.24*U))):Math.round(Math.min(168,Math.max(104,.38*U))),B=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},P=e=>{const t=B(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},Q=R?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=P(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,X=U-T-Q,Y=Math.max(R?2:0,Math.min(M,X)),O=e=>Math.max(Y,X*Math.max(0,e/H)),q=e=>O(e)/2,D=T+X/2,G=e=>46+e/Math.max(1,x.length-1)*54,I=e=>`color-mix(in oklab, ${W} ${G(e).toFixed(0)}%, ${n.surface})`,J=e=>G(e)>=55?n.surface:n.label,K=(e,t)=>null!==C?C!==e:null!==V&&V!==t,_=null!==C?x[C]:void 0;/* @__PURE__ */
2
+ return f("div",{className:`relative ${k??""}`,ref:w,children:[
3
+ /* @__PURE__ */f("svg",{width:"100%",height:Z,viewBox:`0 0 ${U} ${Z}`,role:"img","aria-labelledby":z,onMouseLeave:()=>F(null),children:[
4
+ /* @__PURE__ */d("title",{id:z,children:A.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*Z/x.length+g/2,a=(t+1)*Z/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,L),i=.62*o.length*12+12;if(R){const u=T,h=u+O(e.value),{count:c,drop:m}=P(t);/* @__PURE__ */
5
+ return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
6
+ /* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:I(t)}),
7
+ /* @__PURE__ */d("text",{x:T-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:J(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
8
+ /* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
9
+ /* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=q(e.value),c="cone"===v?q(x[t+1]?.value??e.value):h,m=B(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
10
+ return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
11
+ /* @__PURE__ */d("path",{d:`M${D-h},${l} L${D+h},${l} L${D+c},${a} L${D-c},${a} Z`,fill:I(t)}),
12
+ /* @__PURE__ */d("text",{x:T-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
13
+ /* @__PURE__ */f("text",{x:T-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[S(e.value),null!=m?` · −${u(m,1,L)}`:""]}),
14
+ /* @__PURE__ */d("text",{x:s?D:D+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?J(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==C&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(t,{title:_.label,rows:[{key:"value",label:A.count,color:I(C),value:S(_.value)},{key:"share",label:A.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...C>0&&x[C-1].value>0?[{key:"drop",label:A.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[C-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
@@ -1,4 +1,4 @@
1
- import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-QWHQJNKL.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-PEM7UXQ3.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 +1 @@
1
- import{client_default as a}from"./chunk-DZTAGMNY.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
1
+ import{client_default as a}from"./chunk-6FI3HVUR.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-WUKN5WUM.js";import{FormField as t}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Input_default as l}from"./chunk-MAMWQCJ6.js";import{Button_default as a}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";var o={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function m({mode:m="login"}){const[u,d]=i(!0),h=o[m];/* @__PURE__ */
1
+ import{Card as e}from"./chunk-5RAOFJYT.js";import{FormField as t}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Input_default as l}from"./chunk-MAMWQCJ6.js";import{Button_default as a}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";var o={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function m({mode:m="login"}){const[u,d]=i(!0),h=o[m];/* @__PURE__ */
2
2
  return c("div",{className:"flex h-full items-center justify-center overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */n("div",{className:"w-full max-w-sm",children:[
3
3
  /* @__PURE__ */n("div",{className:"mb-6 text-center",children:[
4
4
  /* @__PURE__ */c("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-blue-600 text-sm font-bold text-white",children:"A"}),
@@ -1,14 +1,14 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-GVC535IA.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-F4DIVARP.js";import{ColoredBadge as u}from"./chunk-X7PM7JOD.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-QWHQJNKL.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:F,hint:I,error:P,required:L,className:O,accept:S="image/*",maxSizeBytes:z,maxFiles:M,fit:$="cover",thumbSize:E=96,placeholder:H,cta:R,acceptHint:B,showCover:Q=!1,coverLabel:W,busy:V=!1,busyLabel:q,progress:G,disabled:J=!1,readOnly:U=!1,selected:X,onItemClick:Y,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=R??te.cta,ae=W??te.cover,ne=q??te.uploading,le=g(),[ie,oe]=b(null),se=J||V,de=!(!k&&!N||se||U),ce=!!w&&!se&&!U,ue=!!j&&!se&&!U,me=!!K&&!J&&!ue,pe=!(!T||!A||se||U),fe=t(se),he=H??r(S,te),ge=d({accept:S,maxSizeBytes:z,maxFiles:M,acceptHint:B,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:E,height:E},Ke=null==X?null:new Set(X),Ce=!!Y,Te=E<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,S),a=e.name??o(e.url),n=Q&&(e.cover??0===t);/* @__PURE__ */
2
- return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:Z?()=>Z(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:$}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:$}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-D4KZOYXQ.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-LYX55RI3.js";import{ColoredBadge as u}from"./chunk-H2XCQJRG.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-PEM7UXQ3.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:F,hint:I,error:L,required:O,className:P,accept:S="image/*",maxSizeBytes:z,maxFiles:E,fit:M="cover",thumbSize:$=96,placeholder:R,cta:H,acceptHint:Q,showCover:B=!1,coverLabel:X,busy:W=!1,busyLabel:Y,progress:q,disabled:G=!1,readOnly:U=!1,selected:J,onItemClick:V,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=H??te.cta,ae=X??te.cover,ne=Y??te.uploading,le=g(),[ie,oe]=b(null),se=G||W,de=!(!k&&!N||se||U),ce=!!w&&!se&&!U,ue=!!j&&!se&&!U,me=!!K&&!G&&!ue,pe=!(!T||!A||se||U),fe=t(se),he=R??r(S,te),ge=d({accept:S,maxSizeBytes:z,maxFiles:E,acceptHint:Q,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:$,height:$},Ke=null==J?null:new Set(J),Ce=!!V,Te=$<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,S),a=e.name??o(e.url),n=B&&(e.cover??0===t);/* @__PURE__ */
2
+ return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||V(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:Z?()=>Z(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),V(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
3
  /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Te?
4
4
  /* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
5
5
  /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Fe=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
6
6
  /* @__PURE__ */x(a,{className:"h-5 w-5"}),
7
- /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Ie=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:E+32},children:[
7
+ /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Ie=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:$+32},children:[
8
8
  /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(a,{})}),
9
9
  /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:he}),
10
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),B&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:B})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:E+32},children:/* @__PURE__ */x("span",{className:V?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
- return v(e,{label:F,labelId:F?`${le}-label`:void 0,htmlFor:le,hint:I,error:P,required:L,className:O,children:[
12
- /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":F?`${le}-label`:void 0,"aria-describedby":P?`${le}-error`:I?`${le}-hint`:void 0,"aria-busy":V||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
- /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof F?F:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Fe]}),V&&/* @__PURE__ */x(l,{label:ne,progress:G})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
10
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),Q&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:Q})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:W?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
+ return v(e,{label:F,labelId:F?`${le}-label`:void 0,htmlFor:le,hint:I,error:L,required:O,className:P,children:[
12
+ /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":F?`${le}-label`:void 0,"aria-describedby":L?`${le}-error`:I?`${le}-hint`:void 0,"aria-busy":W||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
+ /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof F?F:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Fe]}),W&&/* @__PURE__ */x(l,{label:ne,progress:q})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
14
14
  /* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{k as FULL_BADGE_TILE_PX,N as MediaUploadGrid};
@@ -1,3 +1,3 @@
1
- import{useSettingAuto as e,useInSettingRow as t}from"./chunk-L65BESIE.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-QWHQJNKL.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as b}from"react/jsx-runtime";function v(e){const t=String(e),r=/e-(\d+)$/.exec(t);return r?Number(r[1]):t.split(".")[1]?.length??0}var h=(e,t)=>null==e?"":null!=t?e.toFixed(t):String(e);function y({dir:e,compact:t,label:n,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(i,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),b={tabIndex:-1,"aria-label":n,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const t=e.shiftKey;l.current(t);const r=e.currentTarget.ownerDocument.defaultView??window;r.addEventListener("pointerup",u),c.current={off:()=>r.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(t),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...b,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(r,{size:"sm",...b,children:f})}var g=l(function({value:r,onChange:i,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:N,readOnly:E,invalid:j,placeholder:D,size:S,prefix:F,suffix:U,id:B,name:C,className:K="",onBlur:L,onFocus:W,steppers:M,stepFrom:P,snap:T=!1,allowEmpty:I=!0,appearance:O="box",display:V,reportWhileTyping:$=!0,onRevert:Y,"aria-label":z,"aria-labelledby":A,"aria-describedby":Q,auto:H,...R},J){const X="bare"===O,Z=e(),q=H??Z,G=c(),_="string"==typeof U&&""!==U.trim()?U.trim():void 0,ee=e=>function(e,t){let r=e.trim();if(t&&r.endsWith(t)&&(r=r.slice(0,-t.length).trim()),r=r.replace(",","."),""===r||"-"===r||"."===r||"-."===r)return null;const n=Number(r);return Number.isFinite(n)?n:null}(e,_),te=Object.fromEntries(Object.entries(R).filter(([e])=>e.startsWith("data-"))),re=a(),[ne,ie]=u(()=>h(r,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof J?J(e):J&&(J.current=e)},[J]),ce=s(r),ue=s(r);ue.current=r;const se=Boolean(N||E),de=t(),pe=M??(!!de&&"compact"),me="compact"===pe;p(()=>{ee(oe.current)!==r&&ie(h(r,x))},[r,x]);const fe=e=>{if(se)return;let t=(ee(oe.current)??P??(D?ee(D):null)??0)+e;null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g);const r=x??String(w??1).split(".")[1]?.length??0;t=Number(t.toFixed(r));const n=h(t,x);oe.current=n,ie(n),i(t),we()},be=s(fe);be.current=fe;const ve=s({unit:w??1,big:k??10*(w??1),locked:se});ve.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const t=t=>{const{unit:r,big:n,locked:i}=ve.current;if(i||e.ownerDocument.activeElement!==e)return;const o=t.deltaY||t.deltaX;o&&(t.preventDefault(),be.current((o<0?1:-1)*(t.shiftKey?n:r)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);const[he,ye]=u(!1),[ge,xe]=u(0),we=()=>{X&&xe(e=>e+1)};p(()=>{X&&he&&document.activeElement===ae.current&&ae.current?.select()},[X,he,ge]);const ke=s(!1);p(()=>{if(he&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const t=ce.current;if(ee(oe.current)===t)return!1;const r=h(t,x);return oe.current=r,ie(r),ue.current!==t&&(Y??i)(t),we(),!0})},[he,se,x,i,Y]);const Ne=()=>{const e=ee(oe.current);if(null==e){if(!I){const e=h(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&i(null),null}let t=e;const r=x??(T?Math.max(v(w??1),v(l??0)):void 0);T&&(t=function(e,t,r){const n=(e-r)/t;return r+Math.round(n+1e-9*Math.sign(e))*t}(t,w??1,l??0)),null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g),null!=r&&(t=Number(t.toFixed(r)));const n=h(t,x);return oe.current=n,ie(n),t===e&&t===ue.current||i(t),t},Ee=/* @__PURE__ */m("input",{ref:le,id:B,"data-number-input":"",name:C,type:"text",inputMode:0===x?"numeric":"decimal",value:!he&&V?V(r):ne,disabled:N,readOnly:E,placeholder:D,step:w,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==r?D||void 0:`${h(r,x)}${X&&_?_:""}`,"aria-describedby":[Q,q?G:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":X?"bare":void 0,...te,autoComplete:X?"off":void 0,spellCheck:!X&&void 0,"aria-invalid":j||void 0,"aria-label":z,"aria-labelledby":A,onChange:e=>(e=>{if(E)return;const t=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==t&&!/^-?\d*[.,]?\d*$/.test(t))return;if(ie(e),!$)return;const r=ee(e);(null!==r||I)&&i(r)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ne(),void we();const t=w??1,r=k??10*t,n="ArrowUp"===e.key?e.shiftKey?r:t:"ArrowDown"===e.key?-(e.shiftKey?r:t):"PageUp"===e.key?10*t:"PageDown"===e.key?10*-t:null;null===n||se||(e.preventDefault(),fe(n))},onFocus:()=>{ce.current=ue.current,ye(!0),ke.current=!0,W?.()},onMouseUp:X?e=>{ke.current&&(ke.current=!1,e.preventDefault())}:void 0,onBlur:()=>{ye(!1),ke.current=!1,Ne(),L?.()},className:X?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",he?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",K].filter(Boolean).join(" "):n({invalid:j,size:S,readOnly:E,auto:q,className:[F?"pl-6":"",me?U?"pr-10":"pr-6":pe?U?"pr-24":"pr-16":U?"pr-10":"","text-left tabular-nums",K].filter(Boolean).join(" ")})}),je=q?/* @__PURE__ */m("span",{id:G,hidden:!0,children:re.settingView.auto}):null;if(X||!F&&!U&&!pe)return je?/* @__PURE__ */f(b,{children:[Ee,je]}):Ee;const De=ee(ne);/* @__PURE__ */
2
- return f("div",{className:"relative","data-number-box":"",children:[F&&/* @__PURE__ */m("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-sm text-ink-faint",children:F}),Ee,je,U&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${me?"right-6":pe?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:U}),pe&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:me,label:re.number.decrease,disabled:se||null!=l&&null!=De&&De<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),t=/* @__PURE__ */m(y,{dir:1,compact:me,label:re.number.increase,disabled:se||null!=g&&null!=De&&De>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
1
+ import{useSettingAuto as e,useInSettingRow as t}from"./chunk-L65BESIE.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{IconButton_default as n}from"./chunk-RUTUVS4H.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-PEM7UXQ3.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as b}from"react/jsx-runtime";function v(e){const t=String(e),r=/e-(\d+)$/.exec(t);return r?Number(r[1]):t.split(".")[1]?.length??0}var h=(e,t)=>null==e?"":null!=t?e.toFixed(t):String(e);function y({dir:e,compact:t,label:r,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(i,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),b={tabIndex:-1,"aria-label":r,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const t=e.shiftKey;l.current(t);const r=e.currentTarget.ownerDocument.defaultView??window;r.addEventListener("pointerup",u),c.current={off:()=>r.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(t),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...b,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(n,{size:"sm",...b,children:f})}var g=l(function({value:n,onChange:i,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:E,readOnly:N,invalid:j,placeholder:D,size:S,prefix:F,suffix:U,id:B,name:C,className:M="",onBlur:P,onFocus:K,steppers:L,stepFrom:T,snap:W=!1,allowEmpty:I=!0,appearance:O="box",display:V,reportWhileTyping:$=!0,onRevert:Y,"aria-label":z,"aria-labelledby":A,"aria-describedby":Q,auto:R,...X},H){const Z="bare"===O,q=e(),G=R??q,J=c(),_="string"==typeof U&&""!==U.trim()?U.trim():void 0,ee=e=>function(e,t){let r=e.trim();if(t&&r.endsWith(t)&&(r=r.slice(0,-t.length).trim()),r=r.replace(",","."),""===r||"-"===r||"."===r||"-."===r)return null;const n=Number(r);return Number.isFinite(n)?n:null}(e,_),te=Object.fromEntries(Object.entries(X).filter(([e])=>e.startsWith("data-"))),re=a(),[ne,ie]=u(()=>h(n,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof H?H(e):H&&(H.current=e)},[H]),ce=s(n),ue=s(n);ue.current=n;const se=Boolean(E||N),de=t(),pe=L??(!!de&&"compact"),me="compact"===pe;p(()=>{ee(oe.current)!==n&&ie(h(n,x))},[n,x]);const fe=e=>{if(se)return;let t=(ee(oe.current)??T??(D?ee(D):null)??0)+e;null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g);const r=x??String(w??1).split(".")[1]?.length??0;t=Number(t.toFixed(r));const n=h(t,x);oe.current=n,ie(n),i(t),we()},be=s(fe);be.current=fe;const ve=s({unit:w??1,big:k??10*(w??1),locked:se});ve.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const t=t=>{const{unit:r,big:n,locked:i}=ve.current;if(i||e.ownerDocument.activeElement!==e)return;const o=t.deltaY||t.deltaX;o&&(t.preventDefault(),be.current((o<0?1:-1)*(t.shiftKey?n:r)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);const[he,ye]=u(!1),[ge,xe]=u(0),we=()=>{Z&&xe(e=>e+1)};p(()=>{Z&&he&&document.activeElement===ae.current&&ae.current?.select()},[Z,he,ge]);const ke=s(!1);p(()=>{if(he&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const t=ce.current;if(ee(oe.current)===t)return!1;const r=h(t,x);return oe.current=r,ie(r),ue.current!==t&&(Y??i)(t),we(),!0})},[he,se,x,i,Y]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!I){const e=h(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&i(null),null}let t=e;const r=x??(W?Math.max(v(w??1),v(l??0)):void 0);W&&(t=function(e,t,r){const n=(e-r)/t;return r+Math.round(n+1e-9*Math.sign(e))*t}(t,w??1,l??0)),null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g),null!=r&&(t=Number(t.toFixed(r)));const n=h(t,x);return oe.current=n,ie(n),t===e&&t===ue.current||i(t),t},Ne=/* @__PURE__ */m("input",{ref:le,id:B,"data-number-input":"",name:C,type:"text",inputMode:0===x?"numeric":"decimal",value:!he&&V?V(n):ne,disabled:E,readOnly:N,placeholder:D,step:w,role:"spinbutton","aria-valuenow":n??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==n?D||void 0:`${h(n,x)}${Z&&_?_:""}`,"aria-describedby":[Q,G?J:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":Z?"bare":void 0,...te,autoComplete:Z?"off":void 0,spellCheck:!Z&&void 0,"aria-invalid":j||void 0,"aria-label":z,"aria-labelledby":A,onChange:e=>(e=>{if(N)return;const t=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==t&&!/^-?\d*[.,]?\d*$/.test(t))return;if(ie(e),!$)return;const r=ee(e);(null!==r||I)&&i(r)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void we();const t=w??1,r=k??10*t,n="ArrowUp"===e.key?e.shiftKey?r:t:"ArrowDown"===e.key?-(e.shiftKey?r:t):"PageUp"===e.key?10*t:"PageDown"===e.key?10*-t:null;null===n||se||(e.preventDefault(),fe(n))},onFocus:()=>{ce.current=ue.current,ye(!0),ke.current=!0,K?.()},onMouseUp:Z?e=>{ke.current&&(ke.current=!1,e.preventDefault())}:void 0,onBlur:()=>{ye(!1),ke.current=!1,Ee(),P?.()},className:Z?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",he?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",M].filter(Boolean).join(" "):r({invalid:j,size:S,readOnly:N,auto:G,className:[F?"pl-6":"",me?U?"pr-10":"pr-6":pe?U?"pr-24":"pr-16":U?"pr-10":"","text-left tabular-nums",M].filter(Boolean).join(" ")})}),je=G?/* @__PURE__ */m("span",{id:J,hidden:!0,children:re.settingView.auto}):null;if(Z||!F&&!U&&!pe)return je?/* @__PURE__ */f(b,{children:[Ne,je]}):Ne;const De=ee(ne);/* @__PURE__ */
2
+ return f("div",{className:"relative","data-number-box":"",children:[F&&/* @__PURE__ */m("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-sm text-ink-faint",children:F}),Ne,je,U&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${me?"right-6":pe?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:U}),pe&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:me,label:re.number.decrease,disabled:se||null!=l&&null!=De&&De<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),t=/* @__PURE__ */m(y,{dir:1,compact:me,label:re.number.increase,disabled:se||null!=g&&null!=De&&De>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
3
3
  return f("span",me?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[t,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,t]})})()]})});export{g as InputNumber_default};
@@ -1,14 +1,14 @@
1
- import{CountBadge as e}from"./chunk-RWJCKZEY.js";import{isShown as t}from"./chunk-HCP7WOAL.js";import{SettingRowNameContext as a,SettingAutoContext as i,InSettingRowContext as n}from"./chunk-L65BESIE.js";import{useShellStrings as s}from"./chunk-QWHQJNKL.js";import{useId as l}from"react";import{jsx as r,jsxs as d}from"react/jsx-runtime";var c={default:{pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},compact:{pad:"py-2",gap:"gap-2",text:"text-sm",bodyTop:"mt-2",bodyPad:"pt-2"}};function m({label:m,icon:o,action:p,value:h,readout:u,description:x,children:f,controlId:v,labelId:g,unknownText:N="—",quiet:w=!1,size:y="default",viewState:b,divider:k=!0,showWhen:$,values:j,context:P,className:T=""}){const W=s(),E=l();if(!t($,j,P))return null;const I=c[y],L=void 0!==h||void 0===f&&null==p,B=null==h||""===h,C=w?"text-gray-500":"text-gray-800",H=B?"text-gray-400":w?"text-gray-500":"text-gray-900",J=null!=u&&!1!==u,K=`${I.text} font-medium ${C}${"compact"===y?" whitespace-nowrap":""}`,Q=g??("compact"===y?E:void 0),S=v?/* @__PURE__ */r("label",{htmlFor:v,id:Q,className:K,children:m}):/* @__PURE__ */r("span",{id:Q,className:K,children:m}),V="auto"===b?/* @__PURE__ */r("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:W.settingView.auto}):"edited"===b?/* @__PURE__ */d("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
1
+ import{CountBadge as e}from"./chunk-5Q3PFKB5.js";import{SettingRowNameContext as t,SettingAutoContext as a,InSettingRowContext as i}from"./chunk-L65BESIE.js";import{isShown as n}from"./chunk-HCP7WOAL.js";import{useShellStrings as s}from"./chunk-PEM7UXQ3.js";import{useId as l}from"react";import{jsx as r,jsxs as d}from"react/jsx-runtime";var c={default:{pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},compact:{pad:"py-2",gap:"gap-2",text:"text-sm",bodyTop:"mt-2",bodyPad:"pt-2"}};function m({label:m,icon:o,action:p,value:h,readout:u,description:x,children:f,controlId:v,labelId:g,unknownText:N="—",quiet:w=!1,size:y="default",viewState:b,divider:k=!0,showWhen:$,values:j,context:P,className:T=""}){const B=s(),E=l();if(!n($,j,P))return null;const I=c[y],F=void 0!==h||void 0===f&&null==p,L=null==h||""===h,Q=w?"text-gray-500":"text-gray-800",S=L?"text-gray-400":w?"text-gray-500":"text-gray-900",V=null!=u&&!1!==u,W=`${I.text} font-medium ${Q}${"compact"===y?" whitespace-nowrap":""}`,q=g??("compact"===y?E:void 0),z=v?/* @__PURE__ */r("label",{htmlFor:v,id:q,className:W,children:m}):/* @__PURE__ */r("span",{id:q,className:W,children:m}),A="auto"===b?/* @__PURE__ */r("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:B.settingView.auto}):"edited"===b?/* @__PURE__ */d("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
2
2
  /* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */r(e,{dot:!0,tone:"accent"})}),
3
- /* @__PURE__ */r("span",{className:"sr-only",children:W.settingView.edited})]}):null,q=/* @__PURE__ */r(a.Provider,{value:Q,children:/* @__PURE__ */r(i.Provider,{value:"auto"===b,children:B?N:h})}),z=[k?"border-t border-line-subtle first:border-t-0":"",I.pad,T].filter(Boolean).join(" "),A=null!=f&&!1!==f&&/* @__PURE__ */r("div",{className:`${I.bodyTop} border-t border-line-subtle ${I.bodyPad}`,children:f});/* @__PURE__ */
4
- return d("div",J?{className:z,"data-setting-row":"compact"===y?y:void 0,children:[
3
+ /* @__PURE__ */r("span",{className:"sr-only",children:B.settingView.edited})]}):null,C=/* @__PURE__ */r(t.Provider,{value:q,children:/* @__PURE__ */r(a.Provider,{value:"auto"===b,children:L?N:h})}),H=[k?"border-t border-line-subtle first:border-t-0":"",I.pad,T].filter(Boolean).join(" "),K=null!=f&&!1!==f&&/* @__PURE__ */r("div",{className:`${I.bodyTop} border-t border-line-subtle ${I.bodyPad}`,children:f});/* @__PURE__ */
4
+ return d("div",V?{className:H,"data-setting-row":"compact"===y?y:void 0,children:[
5
5
  /* @__PURE__ */d("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
6
- /* @__PURE__ */r("div",{"data-setting-name":"compact"===y?"":void 0,className:"flex-1 basis-0",children:/* @__PURE__ */d("div",{className:`flex min-w-0 items-center gap-2 ${C}`,children:[null!=o&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),S,V]})}),
6
+ /* @__PURE__ */r("div",{"data-setting-name":"compact"===y?"":void 0,className:"flex-1 basis-0",children:/* @__PURE__ */d("div",{className:`flex min-w-0 items-center gap-2 ${Q}`,children:[null!=o&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),z,A]})}),
7
7
  /* @__PURE__ */d("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[
8
- /* @__PURE__ */r("span",{"data-setting-readout":"",className:`whitespace-nowrap ${I.text} ${w?"text-ink-faint":"text-ink-strongest"}`,children:u}),("compact"===y||null!=p)&&/* @__PURE__ */r("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:p})]})]}),x&&/* @__PURE__ */r("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==h&&/* @__PURE__ */r("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${I.text} ${H}`,children:/* @__PURE__ */r(n.Provider,{value:"compact"===y,children:q})}),A]}:{className:z,"data-setting-row":"compact"===y?y:void 0,children:[
8
+ /* @__PURE__ */r("span",{"data-setting-readout":"",className:`whitespace-nowrap ${I.text} ${w?"text-ink-faint":"text-ink-strongest"}`,children:u}),("compact"===y||null!=p)&&/* @__PURE__ */r("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:p})]})]}),x&&/* @__PURE__ */r("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==h&&/* @__PURE__ */r("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${I.text} ${S}`,children:/* @__PURE__ */r(i.Provider,{value:"compact"===y,children:C})}),K]}:{className:H,"data-setting-row":"compact"===y?y:void 0,children:[
9
9
  /* @__PURE__ */d("div",{className:"compact"===y?"flex flex-wrap items-center justify-between gap-x-2 gap-y-2":`flex items-center justify-between ${I.gap}`,children:[
10
10
  /* @__PURE__ */d("div",{"data-setting-name":"compact"===y?"":void 0,className:"compact"===y?"flex-1 basis-0":"min-w-0 flex-1",children:[null!=o?
11
- /* @__PURE__ */d("div",{className:`flex min-w-0 items-center gap-2 ${C}`,children:[
12
- /* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),S,V]}):V?/* @__PURE__ */d("div",{className:"flex min-w-0 items-center gap-2",children:[S,V]}):S,x&&/* @__PURE__ */r("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),"compact"===y?
13
- /* @__PURE__ */d("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[L&&/* @__PURE__ */r("div",{"data-setting-value":"",className:`flex items-center justify-end ${I.text} ${H}`,children:/* @__PURE__ */r(n.Provider,{value:!0,children:q})}),
14
- /* @__PURE__ */r("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:p})]}):null!=p?/* @__PURE__ */d("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[L&&/* @__PURE__ */r("div",{className:`${I.text} ${H}`,children:q}),p]}):L&&/* @__PURE__ */r("div",{className:`shrink-0 ${I.text} ${H}`,children:q})]}),A]})}export{m as SettingRow};
11
+ /* @__PURE__ */d("div",{className:`flex min-w-0 items-center gap-2 ${Q}`,children:[
12
+ /* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),z,A]}):A?/* @__PURE__ */d("div",{className:"flex min-w-0 items-center gap-2",children:[z,A]}):z,x&&/* @__PURE__ */r("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),"compact"===y?
13
+ /* @__PURE__ */d("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[F&&/* @__PURE__ */r("div",{"data-setting-value":"",className:`flex items-center justify-end ${I.text} ${S}`,children:/* @__PURE__ */r(i.Provider,{value:!0,children:C})}),
14
+ /* @__PURE__ */r("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:p})]}):null!=p?/* @__PURE__ */d("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[F&&/* @__PURE__ */r("div",{className:`${I.text} ${S}`,children:C}),p]}):F&&/* @__PURE__ */r("div",{className:`shrink-0 ${I.text} ${S}`,children:C})]}),K]})}export{m as SettingRow};