efficient-shell 10.22.0 → 10.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/README.md +2 -1
  2. package/dist/{Browser-XQ5GO3LJ.js → Browser-GTQKXJQ6.js} +14 -14
  3. package/dist/Calculator-PM4TYWTE.js +29 -0
  4. package/dist/{CurrencyConverter-PSOBQ6K2.js → CurrencyConverter-4I2ENTSX.js} +6 -6
  5. package/dist/{Documents-7GOEAIJ6.js → Documents-MTCJXTXY.js} +7 -7
  6. package/dist/{Files-MMVUWO5F.js → Files-XMZ3XBP4.js} +43 -43
  7. package/dist/{Notepad-FAQBAF36.js → Notepad-QIJN7VDZ.js} +10 -10
  8. package/dist/{PomodoroTimer-ZLS6XCTN.js → PomodoroTimer-5ELVNJEU.js} +68 -68
  9. package/dist/{Preview-DEK7WTAU.js → Preview-QCA6XUDU.js} +44 -44
  10. package/dist/Sidebar-7LN3ZEF4.js +44 -0
  11. package/dist/{Spreadsheet-6C7Q6OQA.js → Spreadsheet-EKYP6XIX.js} +11 -11
  12. package/dist/{Stock-XHMTFEOL.js → Stock-TRG6CAZJ.js} +4 -4
  13. package/dist/{Weather-X5WAHYQ3.js → Weather-YGTT7UWR.js} +22 -22
  14. package/dist/{WorldClock-ARU7PMVZ.js → WorldClock-UCX5LCJB.js} +6 -6
  15. package/dist/ai/index.js +91 -91
  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/charts/BoxPlotChart.js +1 -1
  20. package/dist/charts/CandlestickChart.js +1 -1
  21. package/dist/charts/ChartTooltip.js +1 -1
  22. package/dist/charts/ChordChart.js +1 -1
  23. package/dist/charts/ColumnChart.js +1 -1
  24. package/dist/charts/FunnelChart.js +1 -1
  25. package/dist/charts/HeatmapChart.js +1 -1
  26. package/dist/charts/HistogramChart.js +1 -1
  27. package/dist/charts/PieChart.js +1 -1
  28. package/dist/charts/RadarChart.js +1 -1
  29. package/dist/charts/RadialBarChart.js +1 -1
  30. package/dist/charts/RangeChart.js +1 -1
  31. package/dist/charts/SankeyChart.js +1 -1
  32. package/dist/charts/ScatterChart.js +1 -1
  33. package/dist/charts/SpecChart.js +1 -1
  34. package/dist/charts/SunburstChart.js +1 -1
  35. package/dist/charts/TimeSeriesChart.js +1 -1
  36. package/dist/charts/TreemapChart.js +1 -1
  37. package/dist/charts/WaterfallChart.js +1 -1
  38. package/dist/{chunk-3PO4D32J.js → chunk-36PJGT4W.js} +1 -1
  39. package/dist/{chunk-AGPPZHAH.js → chunk-36VIGB6J.js} +1 -1
  40. package/dist/{chunk-C4CAPG3D.js → chunk-3BFZVVAT.js} +1 -1
  41. package/dist/chunk-4BCFBF3C.js +9 -0
  42. package/dist/chunk-4EBJO7ER.js +15 -0
  43. package/dist/{chunk-YICFH5KO.js → chunk-4P3324KU.js} +1 -1
  44. package/dist/chunk-4P57TIFK.js +2 -0
  45. package/dist/{chunk-QDJQ43N4.js → chunk-4RGMRXYH.js} +1 -1
  46. package/dist/{chunk-6V4INP7J.js → chunk-4TYIYL56.js} +4 -4
  47. package/dist/{chunk-P22NWAFW.js → chunk-55AEZX6K.js} +1 -1
  48. package/dist/{chunk-BB6A5MGA.js → chunk-5FYDNH4Y.js} +1 -1
  49. package/dist/{chunk-KABWJIY4.js → chunk-5PP435FL.js} +1 -1
  50. package/dist/{chunk-D6ZXMKW2.js → chunk-5RQJRD2E.js} +1 -1
  51. package/dist/{chunk-OBNA7GF5.js → chunk-6M5O2P64.js} +9 -9
  52. package/dist/{chunk-BWTK3NUD.js → chunk-75UD5ZMP.js} +4 -4
  53. package/dist/chunk-7IY47EKR.js +1 -0
  54. package/dist/{chunk-SRYX6AQ6.js → chunk-7JVGF555.js} +1 -1
  55. package/dist/{chunk-ARSOETMP.js → chunk-7KWYVQMX.js} +1 -1
  56. package/dist/chunk-7LU3H72S.js +7 -0
  57. package/dist/chunk-7RP7QTRF.js +12 -0
  58. package/dist/{chunk-AKBGUMLI.js → chunk-A6FR2D46.js} +5 -5
  59. package/dist/{chunk-RAMJFT3D.js → chunk-AFG34RBV.js} +5 -5
  60. package/dist/{chunk-PWUPLXSS.js → chunk-BBXFIBXB.js} +1 -1
  61. package/dist/{chunk-EE56C2JH.js → chunk-BMXTPJ7T.js} +5 -5
  62. package/dist/{chunk-LJHVEISA.js → chunk-CH3JQUDW.js} +6 -6
  63. package/dist/{chunk-DLOJSJWL.js → chunk-CIHR5ZKF.js} +1 -1
  64. package/dist/{chunk-E5H5OU3A.js → chunk-COF33H6J.js} +5 -5
  65. package/dist/{chunk-GGRD2JLB.js → chunk-CQEVJG43.js} +1 -1
  66. package/dist/{chunk-WHISJI5L.js → chunk-CX4XR4HO.js} +1 -1
  67. package/dist/{chunk-AFBBNGVO.js → chunk-DBL7MFCB.js} +8 -8
  68. package/dist/{chunk-XDCHB6JA.js → chunk-DGWS4GTI.js} +1 -1
  69. package/dist/{chunk-RXO2LNIB.js → chunk-DIEH76MB.js} +1 -1
  70. package/dist/{chunk-CGP2QCIA.js → chunk-DRUQH4ZE.js} +2 -2
  71. package/dist/{chunk-KGVNRLWT.js → chunk-DVYIBJ3S.js} +2 -2
  72. package/dist/{chunk-5DIBDRB6.js → chunk-DWAA4YZV.js} +3 -3
  73. package/dist/{chunk-4BPIGS2D.js → chunk-DZOJQURG.js} +6 -6
  74. package/dist/{chunk-7SMDYBQX.js → chunk-E3EJWNNK.js} +8 -8
  75. package/dist/{chunk-ET4726WV.js → chunk-E6LQY6TB.js} +1 -1
  76. package/dist/chunk-EOVXFXVV.js +2 -0
  77. package/dist/chunk-EXLHFM3V.js +6 -0
  78. package/dist/{chunk-L67WTASI.js → chunk-FUDUQ44A.js} +1 -1
  79. package/dist/{chunk-N2RIQ2OU.js → chunk-FZM3ZPW3.js} +1 -1
  80. package/dist/{chunk-VQIG5N6D.js → chunk-G66SG6JN.js} +9 -9
  81. package/dist/{chunk-GEDS6QO7.js → chunk-G7BBSHDF.js} +2 -2
  82. package/dist/{chunk-GCC2OZDG.js → chunk-GC3DA6D6.js} +1 -1
  83. package/dist/{chunk-UXPKCDEF.js → chunk-GCZU4XFA.js} +1 -1
  84. package/dist/{chunk-QA3EAJ5H.js → chunk-GOXQJCXG.js} +17 -17
  85. package/dist/{chunk-XAPHUSOR.js → chunk-H475WZPF.js} +16 -16
  86. package/dist/{chunk-53DO72B2.js → chunk-H5NIW2KS.js} +1 -1
  87. package/dist/{chunk-ZT45XXIB.js → chunk-I3XM2PSQ.js} +56 -56
  88. package/dist/{chunk-CIXGYZCF.js → chunk-I4DLYOPO.js} +4 -4
  89. package/dist/{chunk-QZMGWRZ4.js → chunk-IPO4LHSB.js} +6 -6
  90. package/dist/{chunk-PJBZ5B54.js → chunk-JET2TKEQ.js} +3 -3
  91. package/dist/chunk-JPOYR5AO.js +7 -0
  92. package/dist/{chunk-BJRJODRZ.js → chunk-LCSMBVMU.js} +1 -1
  93. package/dist/{chunk-WVCX2Y3S.js → chunk-LE5LWALR.js} +1 -1
  94. package/dist/chunk-LNXBTK7Q.js +1 -0
  95. package/dist/{chunk-HC2AM2DT.js → chunk-MCAPJSB6.js} +1 -1
  96. package/dist/{chunk-REWKL7MX.js → chunk-MDYJVXWD.js} +2 -2
  97. package/dist/chunk-MHPFBVDD.js +8 -0
  98. package/dist/{chunk-NS2HY4NL.js → chunk-N5KO2IHG.js} +4 -4
  99. package/dist/{chunk-22LRMKLV.js → chunk-NJN5IKWO.js} +6 -6
  100. package/dist/{chunk-HWKAFISI.js → chunk-NRALUW6P.js} +7 -7
  101. package/dist/{chunk-SETRKP7W.js → chunk-NWC6YCIJ.js} +10 -10
  102. package/dist/{chunk-WE3HINW3.js → chunk-NZ34BQKH.js} +1 -1
  103. package/dist/{chunk-H2C5SZKO.js → chunk-O52BQ5DP.js} +1 -1
  104. package/dist/{chunk-6XYGA252.js → chunk-O7RR2ZZ2.js} +6 -6
  105. package/dist/chunk-OFCHJWM2.js +1 -0
  106. package/dist/{chunk-GCP3LGRG.js → chunk-OGU5JE52.js} +14 -14
  107. package/dist/{chunk-SAGI7AWC.js → chunk-OKHKY3ZZ.js} +1 -1
  108. package/dist/{chunk-KLAKLVKE.js → chunk-OTITQ3IH.js} +12 -12
  109. package/dist/{chunk-WSMRVWWK.js → chunk-P7H2DXJB.js} +10 -10
  110. package/dist/chunk-PSR6SXCC.js +14 -0
  111. package/dist/{chunk-Q5WPHBDB.js → chunk-QGWKM7C3.js} +5 -5
  112. package/dist/{chunk-A46WK67X.js → chunk-QWCEKHAP.js} +4 -4
  113. package/dist/{chunk-DOWE3ZQR.js → chunk-RDKIYORS.js} +1 -1
  114. package/dist/{chunk-5JCHYQYI.js → chunk-RV2FGSGH.js} +3 -3
  115. package/dist/{chunk-F3ZH6UCW.js → chunk-RZQGPWSN.js} +1 -1
  116. package/dist/{chunk-NWUAATIX.js → chunk-S4FPYCUU.js} +3 -3
  117. package/dist/{chunk-OAVU46YG.js → chunk-TDAI4J27.js} +4 -4
  118. package/dist/{chunk-WJ6ZJVAX.js → chunk-TE6R53YD.js} +1 -1
  119. package/dist/{chunk-GIK62TW6.js → chunk-TFSLPAGB.js} +3 -3
  120. package/dist/chunk-TNJ2VCH4.js +8 -0
  121. package/dist/{chunk-7XNDWW3Y.js → chunk-U44DVPGB.js} +1 -1
  122. package/dist/{chunk-CIYMGVZC.js → chunk-UNQ54QOF.js} +1 -1
  123. package/dist/chunk-UPXDDO3U.js +1 -0
  124. package/dist/{chunk-C2ZUYCIM.js → chunk-USVL5SLG.js} +1 -1
  125. package/dist/chunk-USWA6YNZ.js +3 -0
  126. package/dist/chunk-VCCGS6Q2.js +29 -0
  127. package/dist/chunk-VX4COEWP.js +4 -0
  128. package/dist/{chunk-VXQQQDJ3.js → chunk-VX6TKEEK.js} +1 -1
  129. package/dist/{chunk-NTVOQHRS.js → chunk-WDQEUNGE.js} +1 -1
  130. package/dist/{chunk-GLE4F5FT.js → chunk-WGLHB6WE.js} +1 -1
  131. package/dist/{chunk-MW3FT4WI.js → chunk-WL4U4MTQ.js} +3 -3
  132. package/dist/{chunk-FHYETY4V.js → chunk-XBHXGBJR.js} +1 -1
  133. package/dist/{chunk-VKP2WRJJ.js → chunk-XCAUDTCC.js} +8 -8
  134. package/dist/chunk-XFH64VIG.js +19 -0
  135. package/dist/{chunk-O64PY7ZJ.js → chunk-XJPKDTQN.js} +12 -12
  136. package/dist/chunk-XXL5RLNM.js +22 -0
  137. package/dist/{chunk-P3LKCOB4.js → chunk-YOZGW2RB.js} +2 -2
  138. package/dist/{chunk-6CICYVCK.js → chunk-YQOVUH5W.js} +8 -8
  139. package/dist/{chunk-WUMPTKOG.js → chunk-Z3SLQKE6.js} +1 -1
  140. package/dist/{chunk-4UHAQMOT.js → chunk-Z44JWU75.js} +2 -2
  141. package/dist/{chunk-NPGFCIHB.js → chunk-Z46MSUTP.js} +1 -1
  142. package/dist/{chunk-TBQLPMW5.js → chunk-ZRLWE3JM.js} +1 -1
  143. package/dist/data/DataTable.js +1 -1
  144. package/dist/data/ListLoadError.js +1 -1
  145. package/dist/format/index.d.ts +1 -1
  146. package/dist/format/index.js +1 -1
  147. package/dist/forms/AlignmentGrid.js +1 -1
  148. package/dist/forms/BorderInput.js +1 -1
  149. package/dist/forms/BrandAssetEditor.js +1 -1
  150. package/dist/forms/Button.js +1 -1
  151. package/dist/forms/ColorPicker.js +1 -1
  152. package/dist/forms/ComposerAttachments.js +1 -1
  153. package/dist/forms/CornersInput.js +1 -1
  154. package/dist/forms/DateRangePicker.js +1 -1
  155. package/dist/forms/DisplayChips.js +1 -1
  156. package/dist/forms/FilePicker.js +1 -1
  157. package/dist/forms/IconButton.js +1 -1
  158. package/dist/forms/IconPicker.js +1 -1
  159. package/dist/forms/InputNumber.js +1 -1
  160. package/dist/forms/LinkPicker.js +1 -1
  161. package/dist/forms/MediaLibrary.js +1 -1
  162. package/dist/forms/MediaUploadField.js +1 -1
  163. package/dist/forms/MediaUploadGrid.js +1 -1
  164. package/dist/forms/MediaUsedInList.js +1 -1
  165. package/dist/forms/NumericKeypad.js +1 -1
  166. package/dist/forms/PictureTiles.js +1 -1
  167. package/dist/forms/PositionInput.js +1 -1
  168. package/dist/forms/Segmented.js +1 -1
  169. package/dist/forms/Select.js +1 -1
  170. package/dist/forms/SidesInput.js +1 -1
  171. package/dist/forms/Slider.js +1 -1
  172. package/dist/forms/Snippet.js +1 -1
  173. package/dist/forms/SplitButton.js +1 -1
  174. package/dist/forms/TagInput.js +1 -1
  175. package/dist/forms/TextToolbar.js +1 -1
  176. package/dist/forms/WidthsBar.js +1 -1
  177. package/dist/hooks/useRootIsDark.d.ts +3 -0
  178. package/dist/hooks/useRootIsDark.js +1 -1
  179. package/dist/icons/efficient-glyphs.js +1 -1
  180. package/dist/icons/efficient-looks.js +1 -1
  181. package/dist/icons/efficient.js +1 -1
  182. package/dist/icons/index.js +1 -1
  183. package/dist/icons/looks/map.js +1 -1
  184. package/dist/icons/payment.js +1 -1
  185. package/dist/icons/sets.js +1 -1
  186. package/dist/index.js +157 -157
  187. package/dist/map/index.js +3 -3
  188. package/dist/page-tabs/index.js +5 -5
  189. package/dist/shell/AppUpdateBanner.js +1 -1
  190. package/dist/shell/ColoredBadge.js +1 -1
  191. package/dist/shell/ContextMenu.js +1 -1
  192. package/dist/shell/DropdownMenu.js +1 -1
  193. package/dist/shell/EditableGrid.js +1 -1
  194. package/dist/shell/FloatingBar.js +1 -1
  195. package/dist/shell/GlobalSearch.js +1 -1
  196. package/dist/shell/HelpCenter.js +1 -1
  197. package/dist/shell/IconRail.js +1 -1
  198. package/dist/shell/ImageLightbox.js +1 -1
  199. package/dist/shell/ItemCount.js +1 -1
  200. package/dist/shell/LanguageSelect.js +1 -1
  201. package/dist/shell/Markdown.js +1 -1
  202. package/dist/shell/PopupMenu.js +1 -1
  203. package/dist/shell/ResizeHandle.js +1 -1
  204. package/dist/shell/SearchableSelect.js +1 -1
  205. package/dist/shell/SettingReset.js +1 -1
  206. package/dist/shell/SettingRow.js +1 -1
  207. package/dist/shell/SidebarLayout.js +1 -1
  208. package/dist/shell/SidebarNav.js +1 -1
  209. package/dist/shell/SortableList.js +1 -1
  210. package/dist/shell/StatusBadge.js +1 -1
  211. package/dist/shell/Tabs.js +1 -1
  212. package/dist/shell/Tooltip.js +1 -1
  213. package/dist/shell/TopNav.js +1 -1
  214. package/dist/shell/TransferProgress.js +1 -1
  215. package/dist/shell/Tree.js +1 -1
  216. package/dist/telemetry/index.js +1 -1
  217. package/dist/templates/AuthScreen.js +1 -1
  218. package/dist/templates/ChatTemplate.js +1 -1
  219. package/dist/templates/CheckoutTemplate.js +1 -1
  220. package/dist/templates/DashboardTemplate.js +1 -1
  221. package/dist/templates/DataTablePage.js +1 -1
  222. package/dist/templates/EmailTemplate.js +1 -1
  223. package/dist/templates/ErrorBoundary.js +1 -1
  224. package/dist/templates/FormLayoutPage.js +1 -1
  225. package/dist/templates/GalleryTemplate.js +1 -1
  226. package/dist/theme/index.d.ts +2 -0
  227. package/dist/theme/index.js +2 -0
  228. package/dist/ui/index.js +1 -1
  229. package/dist/utils/glass.js +1 -1
  230. package/dist/utils/rootTheme.d.ts +13 -1
  231. package/dist/utils/rootTheme.js +1 -1
  232. package/dist/version.js +1 -1
  233. package/package.json +6 -1
  234. package/dist/Calculator-X62IAKQY.js +0 -29
  235. package/dist/Sidebar-JF2KEJT2.js +0 -44
  236. package/dist/chunk-4DO47TT5.js +0 -1
  237. package/dist/chunk-5532S4RN.js +0 -4
  238. package/dist/chunk-5R4X7MFQ.js +0 -1
  239. package/dist/chunk-5XKCOKYJ.js +0 -1
  240. package/dist/chunk-F7U5MVNH.js +0 -2
  241. package/dist/chunk-FX4KK5GE.js +0 -3
  242. package/dist/chunk-GCMCXRIN.js +0 -19
  243. package/dist/chunk-H43BVPNN.js +0 -7
  244. package/dist/chunk-IWOVB4WI.js +0 -9
  245. package/dist/chunk-LIULEXWE.js +0 -14
  246. package/dist/chunk-LQVW3SW4.js +0 -6
  247. package/dist/chunk-NGRTW6Y7.js +0 -2
  248. package/dist/chunk-PBFFKRQF.js +0 -12
  249. package/dist/chunk-QFJIMX4A.js +0 -15
  250. package/dist/chunk-QIMFBARF.js +0 -8
  251. package/dist/chunk-RRGMXY46.js +0 -29
  252. package/dist/chunk-TLJWBRLI.js +0 -8
  253. package/dist/chunk-URQWWOHM.js +0 -7
  254. package/dist/chunk-WBJ6KNUF.js +0 -1
  255. package/dist/chunk-WEPQU5W6.js +0 -22
@@ -1,20 +1,20 @@
1
- import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-LXL2UCUR.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-GLE4F5FT.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{useState as i,useRef as a}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
1
+ import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-LXL2UCUR.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-WGLHB6WE.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{useState as i,useRef as a}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
2
2
  return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
3
3
  /* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
4
- /* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:$=!1,size:S="md",minWidth:z,rowClassName:H,onRow:T,rowHref:L,onRowPress:F,linkAs:I,emptyText:D,selection:E,footer:R,virtualized:A,stackOnNarrow:O=!1,stackBelow:P,className:G=""}){const K=s(),W=D??K.table.empty,J=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Q=O&&!A,U=Q?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),Z=e=>Q?{role:e}:{},V=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[X,q]=i(0),Y=A?.overscan??6,_=A?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/A.rowHeight)-Y);q(e=>e===t?e:t)}:void 0,ee=A?Math.ceil(A.height/A.rowHeight)+2*Y:v.length,te=A?Math.min(X,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=A?te*A.rowHeight:0,ne=A?(v.length-re)*A.rowHeight:0,le=a(null),[se,ie]=i(0);l(()=>{if(!A)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=U.flatMap(e=>m(e)?e.columns:[e]),he=U.some(m),ue=/* @__PURE__ */new Map;if(Q)for(const e of U)if(m(e))for(const t of e.columns)ue.set(t,V(e.title,e.label));const me=e=>{const t=V(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(E?.selected??[]),ge=E?v.map((e,t)=>J(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=E?36:0,we=de.length+(E?1:0),xe=de.some(e=>"left"===e.fixed),ve=Q&&!E&&de.some(e=>e.cardCorner),ke=I??"a",Ne=`${p[S]} ${"sm"===S?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,r,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
5
- return h("th",{scope:"col",...Z("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Be[t]??0)+be}:{},...A?{top:l}:{}},className:[Ne,i,o,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs",a?A?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":A?"sticky z-10 bg-gray-50":"",Q&&d?"rosh-dt-sort":"",Q?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":Q?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
4
+ /* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:B,loading:M=!1,bordered:$=!1,size:S="md",minWidth:z,rowClassName:H,onRow:L,rowHref:T,onRowPress:I,linkAs:D,emptyText:E,selection:R,footer:W,virtualized:A,stackOnNarrow:F=!1,stackBelow:O,className:P=""}){const G=s(),K=E??G.table.empty,J=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Q=F&&!A,U=Q?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),Z=e=>Q?{role:e}:{},V=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[X,q]=i(0),Y=A?.overscan??6,_=A?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/A.rowHeight)-Y);q(e=>e===t?e:t)}:void 0,ee=A?Math.ceil(A.height/A.rowHeight)+2*Y:v.length,te=A?Math.min(X,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=A?te*A.rowHeight:0,ne=A?(v.length-re)*A.rowHeight:0,le=a(null),[se,ie]=i(0);l(()=>{if(!A)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=U.flatMap(e=>m(e)?e.columns:[e]),he=U.some(m),ue=/* @__PURE__ */new Map;if(Q)for(const e of U)if(m(e))for(const t of e.columns)ue.set(t,V(e.title,e.label));const me=e=>{const t=V(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(R?.selected??[]),ge=R?v.map((e,t)=>J(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=R?36:0,we=de.length+(R?1:0),xe=de.some(e=>"left"===e.fixed),ve=Q&&!R&&de.some(e=>e.cardCorner),ke=D??"a",Ne=`${p[S]} ${"sm"===S?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,r,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
5
+ return h("th",{scope:"col",...Z("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Me[t]??0)+be}:{},...A?{top:l}:{}},className:[Ne,i,o,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs",a?A?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":A?"sticky z-10 bg-gray-50":"",Q&&d?"rosh-dt-sort":"",Q?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":Q?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
6
6
  /* @__PURE__ */h(n,{children:e.title}),
7
- /* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(n,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),$e=/* @__PURE__ */c(d,{children:[
8
- /* @__PURE__ */c("div",{onScroll:_,style:A?{maxHeight:A.height}:void 0,className:`relative overflow-x-auto ${A?"overflow-y-auto":""} ${$?"rounded-lg border border-gray-200":""}${Q?" rosh-dt-scroll":""}`.trim(),children:[B&&
7
+ /* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(n,{children:e.title}))},e.key)};let Be=0;const Me=de.map(e=>{if("left"!==e.fixed)return null;const t=Be;return Be+=e.width??0,t}),$e=/* @__PURE__ */c(d,{children:[
8
+ /* @__PURE__ */c("div",{onScroll:_,style:A?{maxHeight:A.height}:void 0,className:`relative overflow-x-auto ${A?"overflow-y-auto":""} ${$?"rounded-lg border border-gray-200":""}${Q?" rosh-dt-scroll":""}`.trim(),children:[M&&
9
9
  /* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
10
10
  /* @__PURE__ */h(r,{className:"h-6 w-6"}),
11
- /* @__PURE__ */h("span",{className:"sr-only",children:K.table.loading})]}),
12
- /* @__PURE__ */c("table",{...Z("table"),className:(Q?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
11
+ /* @__PURE__ */h("span",{className:"sr-only",children:G.table.loading})]}),
12
+ /* @__PURE__ */c("table",{...Z("table"),className:(Q?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[B&&/* @__PURE__ */h("caption",{className:"sr-only",children:B}),
13
13
  /* @__PURE__ */c("thead",{...Z("rowgroup"),className:Q?"rosh-dt-head":void 0,children:[
14
- /* @__PURE__ */c("tr",{ref:le,...Z("row"),className:"border-b border-gray-200 bg-gray-50",children:[E&&/* @__PURE__ */h("th",{scope:"col",...Z("columnheader"),rowSpan:he?2:void 0,style:{width:36,...A?{top:0}:{}},className:[Ne,o,xe||A?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":K.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!E)return;const e=new Set(ge);E.onChange(pe?E.selected.filter(t=>!e.has(t)):[...E.selected,...ge.filter(e=>!fe.has(e))])}})}),U.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...Z("columnheader"),colSpan:e.columns.length,style:A?{top:0}:void 0,className:[Ne,"text-center",o,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs","border-b border-gray-200",A?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(n,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...Z("row"),className:"border-b border-gray-200 bg-gray-50",children:U.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
15
- /* @__PURE__ */h("tbody",{...Z("rowgroup"),className:Q?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=T?.(t,o),l=!!n?.current,s=L?.(t,o),i=void 0===s&&F?()=>F(t,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:i,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(a&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
16
- return c("tr",{...u(n),...Z("row"),style:A?{height:A.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Q?E?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Q&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[E&&(()=>{const r=J(t,o);/* @__PURE__ */
17
- return h("td",{...Z("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":K.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{E&&E.onChange(fe.has(e)?E.selected.filter(t=>t!==e):[...E.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Q&&!n&&"wide"!==e.only;/* @__PURE__ */
18
- return h("td",{...Z("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",Q?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Q?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Q?
19
- /* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},J(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...Z("row"),className:Q?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...Z("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:W})})})]}),R]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Q?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
20
- return h("div",Q?void 0!==P&&P>0&&40!==P?{className:`rosh-dt-at ${G}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/P*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:P/40*100+"%"},children:$e})})}:{className:`rosh-dt-stack ${G}`.trim(),children:$e}:{className:G,children:$e})}export{x as DataTable};
14
+ /* @__PURE__ */c("tr",{ref:le,...Z("row"),className:"border-b border-gray-200 bg-gray-50",children:[R&&/* @__PURE__ */h("th",{scope:"col",...Z("columnheader"),rowSpan:he?2:void 0,style:{width:36,...A?{top:0}:{}},className:[Ne,o,xe||A?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":G.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!R)return;const e=new Set(ge);R.onChange(pe?R.selected.filter(t=>!e.has(t)):[...R.selected,...ge.filter(e=>!fe.has(e))])}})}),U.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...Z("columnheader"),colSpan:e.columns.length,style:A?{top:0}:void 0,className:[Ne,"text-center",o,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs","border-b border-gray-200",A?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(n,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...Z("row"),className:"border-b border-gray-200 bg-gray-50",children:U.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
15
+ /* @__PURE__ */h("tbody",{...Z("rowgroup"),className:Q?"rosh-dt-body":void 0,children:0!==v.length||M?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=L?.(t,o),l=!!n?.current,s=T?.(t,o),i=void 0===s&&I?()=>I(t,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:i,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(a&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
16
+ return c("tr",{...u(n),...Z("row"),style:A?{height:A.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Q?R?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Q&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[R&&(()=>{const r=J(t,o);/* @__PURE__ */
17
+ return h("td",{...Z("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":G.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{R&&R.onChange(fe.has(e)?R.selected.filter(t=>t!==e):[...R.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Q&&!n&&"wide"!==e.only;/* @__PURE__ */
18
+ return h("td",{...Z("cell"),"data-label":l?me(e):void 0,style:r?{left:(Me[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",Q?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Q?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Q?
19
+ /* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},J(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...Z("row"),className:Q?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...Z("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:K})})})]}),W]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Q?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
20
+ return h("div",Q?void 0!==O&&O>0&&40!==O?{className:`rosh-dt-at ${P}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/O*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:O/40*100+"%"},children:$e})})}:{className:`rosh-dt-stack ${P}`.trim(),children:$e}:{className:P,children:$e})}export{x as DataTable};
@@ -1,3 +1,3 @@
1
- import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-N2RIQ2OU.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{OneLineLabel as r}from"./chunk-GLE4F5FT.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.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-FZM3ZPW3.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{OneLineLabel as r}from"./chunk-WGLHB6WE.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.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,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-2UO47XB4.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-BB6A5MGA.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 E(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 M(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 T(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 B(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var W=d(null),$=d(!1);function L({children:e,style:n,className:a="",onClose:c,minWidth:d=180,portal:u=!1}){const p=h(null),b=m(),[x,v]=f([]),E=h();g(()=>()=>clearTimeout(E.current),[]);const M=i(),T=y(()=>{const e=()=>clearTimeout(E.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),E.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 $=B(),L=/(^|[\s:])!?z-/.test(a),j=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===$?"py-1":"large"===$?"py-2":"py-1"} ${a}`,onContextMenu:e=>{t(e.target)||e.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:d,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k(W.Provider,{value:T,children:e})});return u?M?w(j,document.body):null:j}function j(e,t,n,r=!1){const o=B(),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 A=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function D({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&&A}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&A})}var H=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(W),y=m(),b=null!=s&&!1!==s,w=`${u??y}-label`,N=`${u??y}-note`,C=p($),E=j(o,i,r),M=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
3
- return x("button",{ref:f,id:u,role:"radio"===M?"menuitemradio":"checkbox"===M?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":M?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{t?.(),g&&g.depth>0&&"checkbox"!==M&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:E.className,style:E.style,children:[M&&/* @__PURE__ */k(D,{kind:M,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-2UO47XB4.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-5FYDNH4Y.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 E(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 T(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),B=d(!1);function L({children:t,style:n,className:a="",onClose:c,minWidth:d=180,portal:u=!1}){const p=h(null),b=m(),[x,v]=f([]),E=h();g(()=>()=>clearTimeout(E.current),[]);const T=i(),M=y(()=>{const e=()=>clearTimeout(E.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),E.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 B=W(),L=/(^|[\s:])!?z-/.test(a),j=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===B?"py-1":"large"===B?"py-2":"py-1"} ${a}`,onContextMenu:t=>{e(t.target)||t.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:d,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k($.Provider,{value:M,children:t})});return u?T?w(j,document.body):null:j}function j(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 H({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 P=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(B),E=j(o,i,r),T=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
3
+ return x("button",{ref:f,id:u,role:"radio"===T?"menuitemradio":"checkbox"===T?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":T?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{e?.(),g&&g.depth>0&&"checkbox"!==T&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:E.className,style:E.style,children:[T&&/* @__PURE__ */k(H,{kind:T,checked:!!l}),b?
4
4
  /* @__PURE__ */x("span",{className:"block min-w-0 flex-1 py-2",children:[
5
- /* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(P,{children:c}),
5
+ /* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(R,{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(P,{children:c}),n]})]})});function P({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 R=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function F(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 z(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function I({label:e,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:d,rowProps:u}){const f=p(W),N=m(),C=h(null),E=h(null),$=h(),L=h(!1),A=`${N}-menu`;g(()=>()=>clearTimeout($.current),[]);const D=f?.depth??0,H=f?.path[D],P=!!H&&H.key===N&&!o,I=b(e=>{if(!f||o||!C.current)return;clearTimeout($.current),L.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=D>0&&(f.path[D-1]?.flipped??!1),a=T(r.left,r.right,c,window.innerWidth,4,i);f.open(D,{key:N,y:t.top,...a})},[f,o,D,N,c]),S=e=>{f?.closeBelow(D),C.current?.focus()};g(()=>{if(P)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>D+1)&&(S(),!0)),()=>E.current)}),a(()=>{if(!P||!H)return;const e=()=>{const e=E.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=D>0&&(f?.path[D-1]?.flipped??!1),o=e.offsetWidth||c,i=T(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=M(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(()=>{P&&L.current&&(L.current=!1,z(E.current)[0]?.focus())},[P]);const U=y(()=>f&&{...f,depth:D+1},[f,D]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const q=j(!1,o,i,P),G=B();/* @__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(R,{children:c}),n]})]})});function R({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 A=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function F(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 z(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function I({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),E=h(null),B=h(),L=h(!1),D=`${N}-menu`;g(()=>()=>clearTimeout(B.current),[]);const H=f?.depth??0,P=f?.path[H],R=!!P&&P.key===N&&!o,I=b(e=>{if(!f||o||!C.current)return;clearTimeout(B.current),L.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=H>0&&(f.path[H-1]?.flipped??!1),a=M(r.left,r.right,c,window.innerWidth,4,i);f.open(H,{key:N,y:t.top,...a})},[f,o,H,N,c]),S=e=>{f?.closeBelow(H),C.current?.focus()};g(()=>{if(R)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>H+1)&&(S(),!0)),()=>E.current)}),a(()=>{if(!R||!P)return;const e=()=>{const e=E.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=H>0&&(f?.path[H-1]?.flipped??!1),o=e.offsetWidth||c,i=M(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=T(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(()=>{R&&L.current&&(L.current=!1,z(E.current)[0]?.focus())},[R]);const U=y(()=>f&&{...f,depth:H+1},[f,H]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const q=j(!1,o,i,R),Q=W();/* @__PURE__ */
9
9
  return x(v,{children:[
10
- /* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":P,"aria-controls":P?A:void 0,disabled:o,"data-popup-submenu-row":!0,className:q.className,style:q.style,onClick:e=>{const t=0===e.detail;P?t&&z(E.current)[0]?.focus():I(t)},...u,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),I(!0))},onMouseEnter:()=>{u?.onMouseEnter?.(),o||(f.cancelClose(),P?f.closeBelow(D+1):(clearTimeout($.current),$.current=setTimeout(()=>I(!1),120)))},onMouseLeave:()=>{clearTimeout($.current),f.scheduleClose(D)},children:[n,
11
- /* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:e}),R]}),P&&w(
12
- /* @__PURE__ */k("div",{ref:E,id:A,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"===G?"py-1":"large"===G?"py-2":"py-1"),style:{left:H.left,top:H.y,minWidth:c,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:F(f.root.current)+D+1,animation:(H.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=z(E.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(),S())},onMouseEnter:()=>{f.cancelClose(),clearTimeout($.current)},onMouseLeave:()=>f.scheduleClose(D+1),onContextMenu:e=>{t(e.target)||e.preventDefault()},children:/* @__PURE__ */k(W.Provider,{value:U,children:r})}),document.body)]})}function S(){const e=B();/* @__PURE__ */
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=B(),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
- return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:U(),children:e})}function G({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
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{D as MenuCheckMark,G as MenuIcon,$ as MenuSemanticsContext,L as PopupMenu,S as PopupMenuDivider,H as PopupMenuItem,q as PopupMenuLabel,I as PopupSubmenu,M as clampMenuTop,C as closeMenuBelow,j as itemLook,T as menuPanelLeft,U as menuTextRowStyle,N as openMenuLevel,E as resolveMenuLevels};
10
+ /* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":R,"aria-controls":R?D:void 0,disabled:o,"data-popup-submenu-row":!0,className:q.className,style:q.style,onClick:e=>{const t=0===e.detail;R?t&&z(E.current)[0]?.focus():I(t)},...u,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),I(!0))},onMouseEnter:()=>{u?.onMouseEnter?.(),o||(f.cancelClose(),R?f.closeBelow(H+1):(clearTimeout(B.current),B.current=setTimeout(()=>I(!1),120)))},onMouseLeave:()=>{clearTimeout(B.current),f.scheduleClose(H)},children:[n,
11
+ /* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:t}),A]}),R&&w(
12
+ /* @__PURE__ */k("div",{ref:E,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"===Q?"py-1":"large"===Q?"py-2":"py-1"),style:{left:P.left,top:P.y,minWidth:c,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:F(f.root.current)+H+1,animation:(P.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=z(E.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(),S())},onMouseEnter:()=>{f.cancelClose(),clearTimeout(B.current)},onMouseLeave:()=>f.scheduleClose(H+1),onContextMenu:t=>{e(t.target)||t.preventDefault()},children:/* @__PURE__ */k($.Provider,{value:U,children:r})}),document.body)]})}function S(){const e=W();/* @__PURE__ */
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
+ return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:U(),children:e})}function Q({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
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{H as MenuCheckMark,Q as MenuIcon,B as MenuSemanticsContext,L as PopupMenu,S as PopupMenuDivider,P as PopupMenuItem,q as PopupMenuLabel,I as PopupSubmenu,T as clampMenuTop,C as closeMenuBelow,j as itemLook,M as menuPanelLeft,U as menuTextRowStyle,N as openMenuLevel,E as resolveMenuLevels};
@@ -1,11 +1,11 @@
1
- import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-53DO72B2.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-NGRTW6Y7.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",D=e=>e.stopPropagation();function U({images:r,startIndex:y=0,onClose:U,onIndexChange:L,onOpenFile:$}){const z=h().lightbox,A=d(),B=p(null),G=p(null),[J,Q]=x(y),W=r.length,F=A&&W>0,I=b(e=>{if(W<2)return;const t=((J+e)%W+W)%W;Q(t),L?.(t)},[J,W,L]);if(a(F),l(B,F,G),i(F),k(()=>{if(F)return f(()=>(U(),!0),()=>B.current)},[F,U]),k(()=>{if(!F)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),I("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[F,I]),!F)return null;const O=r[Math.min(J,W-1)],P=j(O),Y=O.caption||n(O.url);let R;return R="video"===P?/* @__PURE__ */v("video",{src:O.url,controls:!0,playsInline:!0,"aria-label":Y,onClick:D,className:`${e} rounded-lg bg-black`}):"file"===P?/* @__PURE__ */w("div",{onClick:D,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
1
+ import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-H5NIW2KS.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-EOVXFXVV.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",U=e=>e.stopPropagation();function D({images:r,startIndex:y=0,onClose:D,onIndexChange:L,onOpenFile:$}){const z=h().lightbox,A=d(),F=p(null),I=p(null),[J,Q]=x(y),V=r.length,W=A&&V>0,B=b(e=>{if(V<2)return;const t=((J+e)%V+V)%V;Q(t),L?.(t)},[J,V,L]);if(a(W),l(F,W,I),i(W),k(()=>{if(W)return f(()=>(D(),!0),()=>F.current)},[W,D]),k(()=>{if(!W)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),B("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[W,B]),!W)return null;const G=r[Math.min(J,V-1)],O=j(G),P=G.caption||n(G.url);let X;return X="video"===O?/* @__PURE__ */v("video",{src:G.url,controls:!0,playsInline:!0,"aria-label":P,onClick:U,className:`${e} rounded-lg bg-black`}):"file"===O?/* @__PURE__ */w("div",{onClick:U,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
2
2
  /* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
3
- /* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:Y}),$?/* @__PURE__ */v(c,{size:"sm",onClick:()=>$(O),children:z.openFile}):/* @__PURE__ */v("a",{href:O.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:z.openFile})]}):/* @__PURE__ */v(t,{src:O.url,alt:Y,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
- /* @__PURE__ */w("div",{ref:B,...o({role:"dialog",modal:!0,label:z.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:U,children:[R,
5
- /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:D,children:[
6
- /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:z.counter(J+1,W)}),
7
- /* @__PURE__ */v("button",{ref:G,type:"button",onClick:U,"aria-label":z.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),W>1&&/* @__PURE__ */w(N,{children:[
8
- /* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),I(-1)},"aria-label":z.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
- /* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),I(1)},"aria-label":z.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
- /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:D,children:[
11
- /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:Y}),"file"!==P&&/* @__PURE__ */v("a",{href:O.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:z.openOriginal})]})]}),document.body)}export{U as ImageLightbox,j as lightboxKind};
3
+ /* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:P}),$?/* @__PURE__ */v(c,{size:"sm",onClick:()=>$(G),children:z.openFile}):/* @__PURE__ */v("a",{href:G.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:z.openFile})]}):/* @__PURE__ */v(t,{src:G.url,alt:P,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
+ /* @__PURE__ */w("div",{ref:F,...o({role:"dialog",modal:!0,label:z.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:D,children:[X,
5
+ /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:U,children:[
6
+ /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:z.counter(J+1,V)}),
7
+ /* @__PURE__ */v("button",{ref:I,type:"button",onClick:D,"aria-label":z.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),V>1&&/* @__PURE__ */w(N,{children:[
8
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),B(-1)},"aria-label":z.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),B(1)},"aria-label":z.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
+ /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:U,children:[
11
+ /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:P}),"file"!==O&&/* @__PURE__ */v("a",{href:G.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:z.openOriginal})]})]}),document.body)}export{D as ImageLightbox,j as lightboxKind};
@@ -0,0 +1,14 @@
1
+ import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{ChartTooltip as t}from"./chunk-36VIGB6J.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-GDQJBQ5B.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:A}){const N=o().charts,L=i(),S=y??(e=>h(e,L)),j=A??N.noStages,z=c(),[V,B]=m(null),{highlighted:w}=e(),C=s(null),F=l(C,560),W=$??F;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const Z=b??a(0),E=p??54*x.length,H=Math.max(...x.map(e=>e.value),1),Q="bars"===v,G=Q?Math.round(Math.min(132,Math.max(80,.24*W))):Math.round(Math.min(168,Math.max(104,.38*W))),J=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},R=e=>{const t=J(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},U=Q?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=R(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,Y=W-G-U,D=Math.max(Q?2:0,Math.min(M,Y)),I=e=>Math.max(D,Y*Math.max(0,e/H)),O=e=>I(e)/2,P=G+Y/2,T=e=>46+e/Math.max(1,x.length-1)*54,X=e=>`color-mix(in oklab, ${Z} ${T(e).toFixed(0)}%, ${n.surface})`,q=e=>T(e)>=55?n.surface:n.label,K=(e,t)=>null!==V?V!==e:null!==w&&w!==t,_=null!==V?x[V]:void 0;/* @__PURE__ */
2
+ return f("div",{className:`relative ${k??""}`,ref:C,children:[
3
+ /* @__PURE__ */f("svg",{width:"100%",height:E,viewBox:`0 0 ${W} ${E}`,role:"img","aria-labelledby":z,onMouseLeave:()=>B(null),children:[
4
+ /* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*E/x.length+g/2,a=(t+1)*E/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(Q){const u=G,h=u+I(e.value),{count:c,drop:m}=R(t);/* @__PURE__ */
5
+ return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>B(t),children:[
6
+ /* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:X(t)}),
7
+ /* @__PURE__ */d("text",{x:G-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:q(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=O(e.value),c="cone"===v?O(x[t+1]?.value??e.value):h,m=J(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
10
+ return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>B(t),children:[
11
+ /* @__PURE__ */d("path",{d:`M${P-h},${l} L${P+h},${l} L${P+c},${a} L${P-c},${a} Z`,fill:X(t)}),
12
+ /* @__PURE__ */d("text",{x:G-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
13
+ /* @__PURE__ */f("text",{x:G-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?P:P+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?q(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(t,{title:_.label,rows:[{key:"value",label:N.count,color:X(V),value:S(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...V>0&&x[V-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
@@ -1,9 +1,9 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as a}from"./chunk-XQZL6JDD.js";import{Segmented as i}from"./chunk-NWUAATIX.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-53DO72B2.js";import{TransferProgress as u}from"./chunk-OAVU46YG.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-JTMEFXRL.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{useShellStrings as b}from"./chunk-GDQJBQ5B.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:U,label:F,hint:C,error:O,required:B,className:$,accept:z="image/*",maxSizeBytes:D,fit:P="cover",height:A=112,placeholder:X,cta:q,acceptHint:H,showFilename:I=!0,allowReplace:J=!0,allowRemove:Q=!0,replaceLabel:W,removeLabel:G,busy:K=!1,busyLabel:S,choosingLabel:T,pickFailedLabel:V,progress:Y,disabled:_=!1,kind:E,onKindChange:M,focus:Z,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=q??ie.cta,oe=E??(/video/.test(z)&&!/image/.test(z)?"video":"image"),re="string"==typeof G&&G?G:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=K||ne,me=ne&&!K?T??ie.choosing:S??ie.uploading,he=O??(se?V??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=_||ue,ke=!!w&&(t(w,z)||w===ve),je=X??o(z,ie),xe=W??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):U?U(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:z,maxSizeBytes:D,acceptHint:H,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Re=()=>{ye||(R?pe():we.open())},Ue=w?r(w):"",Fe=!ke&&!!ee,Ce=_||!J&&!Q?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[J&&/* @__PURE__ */k("button",{id:Fe?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
1
+ import{ImageFocusPoint as e}from"./chunk-XQZL6JDD.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Segmented as i}from"./chunk-S4FPYCUU.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-H5NIW2KS.js";import{TransferProgress as u}from"./chunk-TDAI4J27.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-JTMEFXRL.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{useShellStrings as b}from"./chunk-GDQJBQ5B.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:U,label:F,hint:C,error:B,required:O,className:P,accept:$="image/*",maxSizeBytes:z,fit:D="cover",height:H=112,placeholder:I,cta:J,acceptHint:S,showFilename:q=!0,allowReplace:K=!0,allowRemove:Q=!0,replaceLabel:W,removeLabel:X,busy:A=!1,busyLabel:T,choosingLabel:Y,pickFailedLabel:_,progress:E,disabled:G=!1,kind:M,onKindChange:V,focus:Z,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=J??ie.cta,oe=M??(/video/.test($)&&!/image/.test($)?"video":"image"),re="string"==typeof X&&X?X:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=A||ne,me=ne&&!A?Y??ie.choosing:T??ie.uploading,he=B??(se?_??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=G||ue,ke=!!w&&(t(w,$)||w===ve),je=I??o($,ie),xe=W??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):U?U(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:$,maxSizeBytes:z,acceptHint:S,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Re=()=>{ye||(R?pe():we.open())},Ue=w?r(w):"",Fe=!ke&&!!ee,Ce=G||!K&&!Q?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[K&&/* @__PURE__ */k("button",{id:Fe?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
2
2
  /* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
3
- /* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),Q&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Oe=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Fe?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Fe?void 0:{height:A},children:[Fe?
4
- /* @__PURE__ */j(a,{value:Z??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:P}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:P,objectPosition:Z||void 0}}),I&&w&&/* @__PURE__ */j(n,{children:Ue}),Ce,ue&&/* @__PURE__ */j(l,{label:me,progress:Y,rounded:"rounded-md"})]}),Be=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":B||void 0,"aria-describedby":he?`${be}-error`:C?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:A},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:Y}):/* @__PURE__ */k(x,{children:[
3
+ /* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),Q&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Be=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Fe?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Fe?void 0:{height:H},children:[Fe?
4
+ /* @__PURE__ */j(e,{value:Z??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:D}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:D,objectPosition:Z||void 0}}),q&&w&&/* @__PURE__ */j(n,{children:Ue}),Ce,ue&&/* @__PURE__ */j(l,{label:me,progress:E,rounded:"rounded-md"})]}),Oe=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":O||void 0,"aria-describedby":he?`${be}-error`:C?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:H},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:E}):/* @__PURE__ */k(x,{children:[
5
5
  /* @__PURE__ */j("span",{className:"text-ink-faintest",children:/* @__PURE__ */j(s,{})}),
6
6
  /* @__PURE__ */j("span",{className:"px-3 text-xs text-ink-faint",children:je}),
7
- /* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),H&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:H})]})});/* @__PURE__ */
8
- return k(e,{label:F,htmlFor:be,hint:C,error:he,required:B,className:$,children:[M&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>M(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof F&&F?F:ie.upload})}),w?Oe:Be,!R&&/* @__PURE__ */j("input",{...we.inputProps}),
7
+ /* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),S&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:S})]})});/* @__PURE__ */
8
+ return k(a,{label:F,htmlFor:be,hint:C,error:he,required:O,className:P,children:[V&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>V(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof F&&F?F:ie.upload})}),w?Be:Oe,!R&&/* @__PURE__ */j("input",{...we.inputProps}),
9
9
  /* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
@@ -1,14 +1,14 @@
1
- import{Markdown as e}from"./chunk-F3ZH6UCW.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),B=v.trim().toLowerCase(),M=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),_=e=>!B||e.title.toLowerCase().includes(B)||e.body.toLowerCase().includes(B)||e.category_label.toLowerCase().includes(B),L=n(()=>M.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[M,B]),A=n(()=>L.flatMap(e=>e.docs),[L]),E=(w?A.find(e=>e.slug===w):void 0)??A[0]??null,Y=e=>!!B||(C[e]??e===E?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-RZQGPWSN.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[N,v]=a(""),[w,k]=a(null),[C,j]=a({}),B=N.trim().toLowerCase(),M=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),_=e=>!B||e.title.toLowerCase().includes(B)||e.body.toLowerCase().includes(B)||e.category_label.toLowerCase().includes(B),L=n(()=>M.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[M,B]),A=n(()=>L.flatMap(e=>e.docs),[L]),E=(w?A.find(e=>e.slug===w):void 0)??A[0]??null,Q=e=>!!B||(C[e]??e===E?.category);/* @__PURE__ */
2
2
  return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
5
5
  /* @__PURE__ */o("h2",{className:"text-sm font-semibold text-gray-900",children:y.help.title}),u&&g&&/* @__PURE__ */o("button",{type:"button",onClick:g,className:"text-xs text-blue-600 hover:underline",children:y.help.newArticle})]}),
6
6
  /* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
7
7
  /* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
- /* @__PURE__ */o("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
- /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===L.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:B?y.help.noResults:b??y.help.empty}):L.map(e=>{const t=Y(e.key);/* @__PURE__ */
8
+ /* @__PURE__ */o("input",{type:"text",value:N,onChange:e=>v(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===L.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:B?y.help.noResults:b??y.help.empty}):L.map(e=>{const t=Q(e.key);/* @__PURE__ */
10
10
  return i("div",{className:"py-0.5",children:[
11
- /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!Y(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
11
+ /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!Q(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
12
12
  /* @__PURE__ */o(d,{open:t}),
13
13
  /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=E?.slug===e.slug;/* @__PURE__ */
14
14
  return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
@@ -1,2 +1,2 @@
1
- import{swallowPress as e,describedByWith as r,OffWithReason as i}from"./chunk-WJ6ZJVAX.js";import{Tooltip as o}from"./chunk-22LRMKLV.js";import{useId as a,useRef as n}from"react";import{jsx as t}from"react/jsx-runtime";var l={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function s({label:s,value:d,points:c,onChange:u,disabled:b=!1,disabledReason:v,id:f,className:g=""}){const h=a(),m=n([]),p=c.findIndex(e=>e.value===d),x=c.findIndex(e=>!b&&!0!==e.disabled),w=p>=0?p:Math.max(0,x);/* @__PURE__ */
1
+ import{swallowPress as e,describedByWith as r,OffWithReason as i}from"./chunk-TE6R53YD.js";import{Tooltip as o}from"./chunk-NJN5IKWO.js";import{useId as a,useRef as n}from"react";import{jsx as t}from"react/jsx-runtime";var l={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function s({label:s,value:d,points:c,onChange:u,disabled:b=!1,disabledReason:v,id:f,className:g=""}){const h=a(),m=n([]),p=c.findIndex(e=>e.value===d),x=c.findIndex(e=>!b&&!0!==e.disabled),w=p>=0?p:Math.max(0,x);/* @__PURE__ */
2
2
  return t("div",{id:f,role:"radiogroup","aria-label":s,className:`grid w-max grid-cols-3 gap-px overflow-hidden rounded-(--radius-control) border border-line bg-gray-200 ${g}`.trim(),children:c.map((a,n)=>{const s=d===a.value,f=b||!0===a.disabled,g=f&&(!0===a.disabled&&a.title||(b?v:void 0))||void 0,p=`${h}-${n}`,x=/* @__PURE__ */t("button",{type:"button",role:"radio","aria-checked":s,"aria-label":a.label,"aria-disabled":f||void 0,"aria-describedby":r(void 0,g?p:void 0),ref:e=>{m.current[n]=e},tabIndex:n===w?0:-1,onKeyDown:e=>((e,r)=>{const i=l[r.key];if(!i)return;r.preventDefault();const o=Math.floor(e/3)+i[0],a=e%3+i[1];if(o<0||a<0||a>=3)return;const n=3*o+a;if(n>=c.length)return;m.current[n]?.focus();const t=c[n];b||!0===t.disabled||t.value===d||u(t.value)})(n,e),onClick:f?e:()=>u(a.value),className:"group relative flex size-(--control-height-lg) items-center justify-center transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring)] aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(s?"bg-accent-tint hover:bg-blue-100":"bg-surface hover:bg-row-hover"),children:a.icon?/* @__PURE__ */t("span",{"data-icon-slot":"","aria-hidden":"true",className:"inline-flex items-center justify-center [&_svg]:h-4 [&_svg]:w-4 "+(s?"text-blue-700":"text-ink-faint group-hover:text-gray-700"),children:a.icon}):/* @__PURE__ */t("span",{"data-dot":"","aria-hidden":"true",className:s?"size-3 rounded-sm bg-accent-fill":"size-1 rounded-full bg-[color:var(--ink-faintest)] transition-colors group-hover:bg-[color:var(--ink-faint)]"})},a.value);return g?/* @__PURE__ */t(i,{reason:g,id:p,block:!0,children:x},a.value):/* @__PURE__ */t(o,{content:a.title??a.label,className:"relative flex",children:x},a.value)})})}export{s as AlignmentGrid};
@@ -1,4 +1,4 @@
1
- import{ColorPicker as e}from"./chunk-O64PY7ZJ.js";import{InputNumber_default as t}from"./chunk-GEDS6QO7.js";import{Segmented as l}from"./chunk-NWUAATIX.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{jsxs as a,Fragment as o,jsx as i}from"react/jsx-runtime";var s=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */i(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */i(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */i(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */i(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */i(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */i(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */i(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */i(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const j=e=>"number"==typeof d[e]?d[e]:null,k=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===j(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},O=(e,l,r,a,o,s)=>/* @__PURE__ */i("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */i(t,{value:a,onChange:s,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":l})}),S=n.map(j),C="number"==typeof d.width?d.width:S.every(e=>null!==e&&e===S[0])?S[0]:null,z=null===C&&S.some(e=>null!==e),A=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",E=e=>j(e)??("number"==typeof d.width?d.width:null),I=d.style??u.style;/* @__PURE__ */
2
- return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[O("left",b.sides.left,h.left,E("left"),String(u.sides.left),e=>k("left",e)),O("top",b.sides.top,h.top,E("top"),String(u.sides.top),e=>k("top",e)),O("right",b.sides.right,h.right,E("right"),String(u.sides.right),e=>k("right",e)),O("bottom",b.sides.bottom,h.bottom,E("bottom"),String(u.sides.bottom),e=>k("bottom",e))]}):O("all",b.width,h.all,C,z?"–":A,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */i("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */i(l,{block:!0,size:"sm",label:b.style,value:I,onChange:e=>{x||m({...d,style:e})},options:s.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
1
+ import{Segmented as e}from"./chunk-S4FPYCUU.js";import{ColorPicker as t}from"./chunk-XJPKDTQN.js";import{InputNumber_default as l}from"./chunk-G7BBSHDF.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{jsxs as a,Fragment as o,jsx as i}from"react/jsx-runtime";var s=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */i(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */i(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */i(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */i(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */i(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */i(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */i(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */i(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const S=e=>"number"==typeof d[e]?d[e]:null,j=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===S(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},k=(e,t,r,a,o,s)=>/* @__PURE__ */i("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */i(l,{value:a,onChange:s,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":t})}),C=n.map(S),O="number"==typeof d.width?d.width:C.every(e=>null!==e&&e===C[0])?C[0]:null,B=null===O&&C.some(e=>null!==e),U=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",z=e=>S(e)??("number"==typeof d.width?d.width:null),D=d.style??u.style;/* @__PURE__ */
2
+ return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,z("left"),String(u.sides.left),e=>j("left",e)),k("top",b.sides.top,h.top,z("top"),String(u.sides.top),e=>j("top",e)),k("right",b.sides.right,h.right,z("right"),String(u.sides.right),e=>j("right",e)),k("bottom",b.sides.bottom,h.bottom,z("bottom"),String(u.sides.bottom),e=>j("bottom",e))]}):k("all",b.width,h.all,O,B?"–":U,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */i("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */i(e,{block:!0,size:"sm",label:b.style,value:D,onChange:e=>{x||m({...d,style:e})},options:s.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
3
3
  /* @__PURE__ */i("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
4
- /* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(e,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"md",disabled:x})})]})}export{s as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
4
+ /* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(t,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"md",disabled:x})})]})}export{s as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
@@ -1,4 +1,4 @@
1
- import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-NGRTW6Y7.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
1
+ import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
2
2
  return a("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",onClick:l&&r?e=>{(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&r(l)&&e.preventDefault()}:void 0,children:n})}function u(e){const t=[];let n,r=0,l=0;const s=new RegExp(c.source,"g");for(;null!==(n=s.exec(e));)n.index>r&&t.push(e.slice(r,n.index)),void 0!==n[1]?t.push(
3
3
  /* @__PURE__ */i("span",{className:"text-gray-400",children:["[",n[1],"]"]},l++)):void 0!==n[3]?t.push(
4
4
  /* @__PURE__ */a(d,{href:n[4],children:n[3]},l++)):void 0!==n[5]?t.push(
@@ -1,4 +1,4 @@
1
- import{choiceTrackClass as e,choiceTipClass as l,ChoiceContent as a,choiceItemClass as i}from"./chunk-JDQGHQ2C.js";import{Tooltip as r}from"./chunk-22LRMKLV.js";import{useId as s}from"react";import{jsx as n,jsxs as o}from"react/jsx-runtime";function t({value:t,onChange:c,options:d,name:b,size:u="md",block:m=!1,label:h,className:p="","aria-labelledby":v,"aria-describedby":f}){const g={"aria-label":v?void 0:h,"aria-labelledby":v,"aria-describedby":f},N=s(),y=e(m,p),k=l(m);/* @__PURE__ */
2
- return n("div",b?{role:"radiogroup",...g,className:y,children:d.map(e=>{const l=`${N}-${e.value}`,s=e.value===t,d=/* @__PURE__ */o("label",{htmlFor:l,className:i({size:u,selected:s,disabled:e.disabled,block:m}),children:[
1
+ import{choiceTrackClass as e,choiceTipClass as l,ChoiceContent as a,choiceItemClass as i}from"./chunk-JDQGHQ2C.js";import{Tooltip as r}from"./chunk-NJN5IKWO.js";import{useId as s}from"react";import{jsx as n,jsxs as o}from"react/jsx-runtime";function t({value:t,onChange:c,options:d,name:b,size:u="md",block:m=!1,label:h,className:p="","aria-labelledby":v,"aria-describedby":f}){const N={"aria-label":v?void 0:h,"aria-labelledby":v,"aria-describedby":f},g=s(),y=e(m,p),k=l(m);/* @__PURE__ */
2
+ return n("div",b?{role:"radiogroup",...N,className:y,children:d.map(e=>{const l=`${g}-${e.value}`,s=e.value===t,d=/* @__PURE__ */o("label",{htmlFor:l,className:i({size:u,selected:s,disabled:e.disabled,block:m}),children:[
3
3
  /* @__PURE__ */n("input",{id:l,type:"radio",name:b,value:e.value,checked:s,disabled:e.disabled,"aria-describedby":e.title?`${l}-note`:void 0,onChange:()=>c(e.value),className:"absolute inset-0 m-0 h-full w-full appearance-none rounded-[inherit] bg-transparent cursor-[inherit] rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"}),
4
- /* @__PURE__ */n(a,{icon:e.icon,label:e.label}),e.title&&/* @__PURE__ */n("span",{id:`${l}-note`,className:"sr-only",children:e.title})]},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:d},e.value):d})}:{role:"group",...g,className:y,children:d.map(e=>{const l=e.value===t,s=/* @__PURE__ */n("button",{type:"button","aria-pressed":l,disabled:e.disabled,onClick:()=>c(e.value),className:i({size:u,selected:l,disabled:e.disabled,block:m}),children:/* @__PURE__ */n(a,{icon:e.icon,label:e.label})},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:s},e.value):s})})}export{t as Segmented};
4
+ /* @__PURE__ */n(a,{icon:e.icon,label:e.label}),e.title&&/* @__PURE__ */n("span",{id:`${l}-note`,className:"sr-only",children:e.title})]},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:d},e.value):d})}:{role:"group",...N,className:y,children:d.map(e=>{const l=e.value===t,s=/* @__PURE__ */n("button",{type:"button","aria-pressed":l,disabled:e.disabled,onClick:()=>c(e.value),className:i({size:u,selected:l,disabled:e.disabled,block:m}),children:/* @__PURE__ */n(a,{icon:e.icon,label:e.label})},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:s},e.value):s})})}export{t as Segmented};
@@ -1,6 +1,6 @@
1
- import{GROUP_COLORS as e}from"./chunk-N2RIQ2OU.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-22LRMKLV.js";import{useShellStrings as l}from"./chunk-GDQJBQ5B.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
1
+ import{GROUP_COLORS as e}from"./chunk-FZM3ZPW3.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-NJN5IKWO.js";import{useShellStrings as l}from"./chunk-GDQJBQ5B.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
2
2
  return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
3
3
  return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
4
- /* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
5
- return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null==$&&/* @__PURE__ */t(r,{ink:""}),
6
- /* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof y?N(y):/* @__PURE__ */i(a,{children:[y,N("")&&` ${N("")}`]})}),d&&/* @__PURE__ */t(o,{label:k,glyph:"×",onClick:d})]})}export{c as TransferProgress};
4
+ /* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,N=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),$="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,k=e=>[e,m,null==N?"":`${N}%`].filter(Boolean).join(" ");/* @__PURE__ */
5
+ return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null==N&&/* @__PURE__ */t(r,{ink:""}),
6
+ /* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof y?k(y):/* @__PURE__ */i(a,{children:[y,k("")&&` ${k("")}`]})}),d&&/* @__PURE__ */t(o,{label:$,glyph:"×",onClick:d})]})}export{c as TransferProgress};
@@ -1,4 +1,4 @@
1
- import{Tooltip as e}from"./chunk-22LRMKLV.js";import{jsxs as r,Fragment as n,jsx as i}from"react/jsx-runtime";var l=e=>!0===e||"true"===e;function o(e){e.preventDefault(),e.stopPropagation()}var t=(e,r)=>[e,r].filter(Boolean).join(" ")||void 0;function a({reason:l,id:o,block:t=!1,children:a}){/* @__PURE__ */
1
+ import{Tooltip as e}from"./chunk-NJN5IKWO.js";import{jsxs as r,Fragment as n,jsx as i}from"react/jsx-runtime";var l=e=>!0===e||"true"===e;function o(e){e.preventDefault(),e.stopPropagation()}var t=(e,r)=>[e,r].filter(Boolean).join(" ")||void 0;function a({reason:l,id:o,block:t=!1,children:a}){/* @__PURE__ */
2
2
  return r(n,{children:[
3
3
  /* @__PURE__ */i(e,{content:l,describe:!1,className:t?"relative flex w-full":"relative inline-flex",children:a}),
4
4
  /* @__PURE__ */i("span",{id:o,className:"sr-only",children:l})]})}export{a as OffWithReason,t as describedByWith,l as isAriaDisabled,o as swallowPress};
@@ -1,5 +1,5 @@
1
- import{Icon as e}from"./chunk-2UO47XB4.js";import{Tooltip as t}from"./chunk-22LRMKLV.js";import{useShellStrings as n}from"./chunk-GDQJBQ5B.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,y=i(),N=["es-default-reset"];if(c&&N.push("is-changed"),k&&N.push(k),!c&&h)return N.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:N.join(" "),"aria-hidden":"true"});const x="desktop"===u,g=p??(x?j.resetName(o):j.inheritName(o)),T=b?j.backTo(b):x?j.backToDefault:j.backToAuto,q=m??(b?j.tip(g,T):g);
1
+ import{Icon as e}from"./chunk-2UO47XB4.js";import{Tooltip as t}from"./chunk-NJN5IKWO.js";import{useShellStrings as n}from"./chunk-GDQJBQ5B.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,N=i(),y=["es-default-reset"];if(c&&y.push("is-changed"),k&&y.push(k),!c&&h)return y.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:y.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:y.join(" "),"aria-hidden":"true"});const x="desktop"===u,g=p??(x?j.resetName(o):j.inheritName(o)),T=b?j.backTo(b):x?j.backToDefault:j.backToAuto,q=m??(b?j.tip(g,T):g);
2
2
  /* @__PURE__ */
3
3
  return r(t,{content:q,describe:!1,children:[
4
- /* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":g,"aria-describedby":y,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
5
- /* @__PURE__ */a("span",{id:y,hidden:!0,children:T})]})}export{o as SettingReset};
4
+ /* @__PURE__ */a("button",{type:"button",className:y.join(" "),"aria-label":g,"aria-describedby":N,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
5
+ /* @__PURE__ */a("span",{id:N,hidden:!0,children:T})]})}export{o as SettingReset};
@@ -0,0 +1,8 @@
1
+ import{AccessibleTable as t}from"./chunk-5PP435FL.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-36VIGB6J.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-GDQJBQ5B.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,F]=c(null),{highlighted:E}=o(),C=h(u,f,x,$.other),{labels:I,matrix:Q,otherIndex:z,foldedCount:A}=C,B=(t,e)=>Q[t]?.[e]??0,L=t=>t===z?r.muted:a(t),P=C.totals,O=I.map((t,e)=>e).sort((t,e)=>P[e]-P[t]),V=O.reduce((t,e)=>t+P[e],0);if(V<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const G=p/2,H=p/2,J=p/2-44,R=J-b,T=g*O.length,U=/* @__PURE__ */new Map;let W=-Math.PI/2;O.forEach((t,e)=>{const o=P[t]/V*(2*Math.PI-T);U.set(t,{start:W,end:W+o,slot:e}),W+=o+g});const Y=/* @__PURE__ */new Map,D=[];for(const t of O)for(const e of O){const o=B(t,e);if(o<=0)continue;const n=U.get(t),r=o/Math.max(1,P[t])*(n.end-n.start),a=Y.get(t)??0;Y.set(t,a+r),D.push({from:t,to:e,value:o,a:n.start+a+r/2,b:U.get(e).start+(U.get(e).end-U.get(e).start)/2})}const S=(t,e)=>[G+e*Math.cos(t),H+e*Math.sin(t)],Z="arc"===y?.kind?y.index:void 0,q="ribbon"===y?.kind?D[y.index]:void 0;/* @__PURE__ */
2
+ return m("div",{className:`relative ${v??""}`,children:[
3
+ /* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(O.length),onMouseLeave:()=>F(null),children:[D.map((t,e)=>{const[o,n]=S(t.a,R),[r,a]=S(t.b,R),l=L(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==E?I[t.from]===E||I[t.to]===E:null)(t,e);/* @__PURE__ */
4
+ return d("path",{d:`M${o},${n} Q${G},${H} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/V*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>F({kind:"ribbon",index:e})},`${I[t.from]}→${I[t.to]}`)}),O.map(t=>{const o=U.get(t),n=(o.start+o.end)/2,[a,l]=S(n,J+16),i=(t=>y?"arc"===y.kind?y.index===t:D[y.index].from===t||D[y.index].to===t:null!==E?I[t]===E:null)(t);/* @__PURE__ */
5
+ return m("g",{onMouseEnter:()=>F({kind:"arc",index:t}),children:[
6
+ /* @__PURE__ */d("path",{d:e(G,H,R,J,o.start,o.end),fill:L(t),fillOpacity:null===i||i?1:.45}),
7
+ /* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:I[t]})]},t)})]}),A>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(A)}),void 0!==Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:I[Z],rows:[{key:"total",label:$.totalFlow,color:L(Z),value:N(P[Z])}]})}),q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${I[q.from]} → ${I[q.to]}`,rows:[{key:"value",label:$.flow,color:L(q.from),value:N(q.value)}]})}),
8
+ /* @__PURE__ */d(t,{caption:$.chord(O.length),head:[$.tableFrom,$.tableTo,$.value],rows:D.map(t=>[I[t.from],I[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
@@ -1,4 +1,4 @@
1
- import{Tabs as e}from"./chunk-NS2HY4NL.js";import{Card as a}from"./chunk-P3RXXWXN.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-N2RIQ2OU.js";import{Button_default as l}from"./chunk-NGRTW6Y7.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
1
+ import{Tabs as e}from"./chunk-N5KO2IHG.js";import{Card as a}from"./chunk-P3RXXWXN.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
2
2
  return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
@@ -1,4 +1,4 @@
1
- import{Button_default as e}from"./chunk-NGRTW6Y7.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
1
+ import{Button_default as e}from"./chunk-EOVXFXVV.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
2
2
  return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
3
3
  /* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
4
4
  /* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
@@ -0,0 +1 @@
1
+ import{watchRootTheme as n,rootIsDark as o}from"./chunk-LNXBTK7Q.js";import{useCallback as t,useSyncExternalStore as r}from"react";function c(c={}){const e=c.doc??null,m=c.whenUnset??!1,s=t(o=>n(o,{doc:e}),[e]),u=t(()=>o({doc:e,whenUnset:m}),[e,m]),d=t(()=>m,[m]);return r(s,u,d)}export{c as useRootIsDark};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-P3RXXWXN.js";import{Select_default as a}from"./chunk-GCMCXRIN.js";import{Pagination as r}from"./chunk-LXL2UCUR.js";import{Input_default as t}from"./chunk-MAMWQCJ6.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-N2RIQ2OU.js";import{Button_default as l}from"./chunk-NGRTW6Y7.js";import{Icon as c}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as m}from"./chunk-GLE4F5FT.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-P3RXXWXN.js";import{Select_default as a}from"./chunk-XFH64VIG.js";import{Pagination as r}from"./chunk-LXL2UCUR.js";import{Input_default as t}from"./chunk-MAMWQCJ6.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{Icon as c}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as m}from"./chunk-WGLHB6WE.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
2
2
  return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
@@ -0,0 +1,3 @@
1
+ import{DropdownMenu as e}from"./chunk-JPOYR5AO.js";import{Button_default as i}from"./chunk-EOVXFXVV.js";import{iconButtonClasses as n}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{Tooltip as a}from"./chunk-NJN5IKWO.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:N=!1,disabledReason:g,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:O,menuFooterLabel:C,align:W="end",side:z="bottom",menuMinWidth:F,linkAs:R,block:A=!1,className:I=""},L){const V=N&&(null!=g&&""!==g&&!1!==g)&&!v,X=x&&null!=j&&""!==j&&!1!==j,Y=o(),$=/* @__PURE__ */t(i,{ref:L,type:b,variant:f,size:p,loading:v,leftIcon:k,block:A,disabled:N&&!V,"aria-disabled":!!V||void 0,disabledReason:V?g:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),B=A?"relative flex min-w-0 flex-1":"relative inline-flex",D=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
2
+ return s("div",{className:[A?"flex w-full":"inline-flex","items-stretch",I].filter(Boolean).join(" "),children:[null==w||""===w||V?$:/* @__PURE__ */t(a,{content:w,className:B,children:$}),
3
+ /* @__PURE__ */t(a,{content:X?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":X?Y:void 0,items:h,align:W,side:z,minWidth:F,linkAs:R,disabled:x&&!X,"aria-disabled":X,onOpenChange:y,footer:O,footerLabel:C,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:D,strokeWidth:2,"aria-hidden":"true"})})}),X&&/* @__PURE__ */t("span",{id:Y,className:"sr-only",children:j})]})});export{c as SplitButton_default};