efficient-shell 10.14.0 → 10.16.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 (248) hide show
  1. package/README.md +30 -6
  2. package/dist/{Browser-LAMGXJI6.js → Browser-RI5X7GMK.js} +11 -11
  3. package/dist/Calculator-Y566OMJZ.js +29 -0
  4. package/dist/{CurrencyConverter-577XB7A3.js → CurrencyConverter-2GUEE7ZR.js} +6 -6
  5. package/dist/{Documents-DW7I624C.js → Documents-GI346UL5.js} +8 -8
  6. package/dist/{Files-VLSMINW5.js → Files-UA23KXN7.js} +51 -51
  7. package/dist/{Notepad-54H6KCGS.js → Notepad-HRZKLHO3.js} +10 -10
  8. package/dist/PdfViewer-LU5JKHSG.js +1 -0
  9. package/dist/{PomodoroTimer-CXJVY7U3.js → PomodoroTimer-QYCTTTPZ.js} +63 -63
  10. package/dist/{Preview-OWMTJFTO.js → Preview-LSGN5GN7.js} +23 -23
  11. package/dist/Sidebar-2P26444H.js +44 -0
  12. package/dist/{Spreadsheet-HWNS4TSX.js → Spreadsheet-7JBZY6KJ.js} +13 -13
  13. package/dist/{Stock-M4TDRNCI.js → Stock-ZVQT25IE.js} +3 -3
  14. package/dist/{Weather-K634BVDX.js → Weather-RAUDLLVU.js} +19 -19
  15. package/dist/{WorldClock-56CYOGR2.js → WorldClock-2XBWZ6SZ.js} +6 -6
  16. package/dist/ai/index.d.ts +77 -2
  17. package/dist/ai/index.js +80 -60
  18. package/dist/ai.css +1 -1
  19. package/dist/apps/index.js +1 -1
  20. package/dist/bin/media-host-check.js +1 -1
  21. package/dist/bin/ui-check.js +1 -1
  22. package/dist/brand.css +1 -1
  23. package/dist/charts/BoxPlotChart.js +1 -1
  24. package/dist/charts/CandlestickChart.js +1 -1
  25. package/dist/charts/CartesianPlot.js +1 -1
  26. package/dist/charts/ChordChart.js +1 -1
  27. package/dist/charts/ColumnChart.js +1 -1
  28. package/dist/charts/HeatmapChart.js +1 -1
  29. package/dist/charts/HistogramChart.js +1 -1
  30. package/dist/charts/RadarChart.js +1 -1
  31. package/dist/charts/RangeChart.js +1 -1
  32. package/dist/charts/SankeyChart.js +1 -1
  33. package/dist/charts/ScatterChart.js +1 -1
  34. package/dist/charts/SpecChart.js +1 -1
  35. package/dist/charts/SunburstChart.js +1 -1
  36. package/dist/charts/TimeSeriesChart.js +1 -1
  37. package/dist/charts/TreemapChart.js +1 -1
  38. package/dist/charts/WaterfallChart.js +1 -1
  39. package/dist/chunk-26LO7XCK.js +2 -0
  40. package/dist/{chunk-ALWVHNUO.js → chunk-2JG5JU4M.js} +4 -4
  41. package/dist/{chunk-QPJQJRHZ.js → chunk-2SY76NFO.js} +4 -4
  42. package/dist/{chunk-KKSVRIMP.js → chunk-2UO47XB4.js} +8 -3
  43. package/dist/{chunk-2K2W6VIR.js → chunk-2VGQS6CW.js} +1 -1
  44. package/dist/{chunk-O4V5PEA3.js → chunk-3AH524CN.js} +1 -1
  45. package/dist/{chunk-OZBM2XFQ.js → chunk-3EJ64VKE.js} +1 -1
  46. package/dist/{chunk-AZ3AR7U7.js → chunk-3LDXURVU.js} +2 -2
  47. package/dist/{chunk-CAVADOJK.js → chunk-4G2C6J4I.js} +1 -1
  48. package/dist/{chunk-KZX25YEW.js → chunk-4QJOEHM6.js} +11 -11
  49. package/dist/{chunk-DDCMMOB4.js → chunk-4UKGVLFP.js} +1 -1
  50. package/dist/{chunk-37U326EL.js → chunk-4WEFGKJL.js} +9 -9
  51. package/dist/{chunk-JGFY54A4.js → chunk-57HN6MPC.js} +2 -2
  52. package/dist/{chunk-QNK2I4IH.js → chunk-5UYZ75F3.js} +9 -9
  53. package/dist/{chunk-ZZOBG6GP.js → chunk-6AS5PHHK.js} +17 -17
  54. package/dist/chunk-6C6TRDNI.js +1 -0
  55. package/dist/{chunk-CGQAKGPT.js → chunk-74OUAR6L.js} +6 -6
  56. package/dist/chunk-7HLC352T.js +23 -0
  57. package/dist/{chunk-UNRPRMQO.js → chunk-7HTRLRVO.js} +63 -63
  58. package/dist/{chunk-KOBYM5JV.js → chunk-7MSC3Z5H.js} +12 -12
  59. package/dist/{chunk-EDKRGYZX.js → chunk-7NBSBGLX.js} +8 -8
  60. package/dist/{chunk-PXQG5EIH.js → chunk-7TNAOZZ2.js} +1 -1
  61. package/dist/{chunk-ORIGX2H5.js → chunk-7UTPXU6K.js} +1 -1
  62. package/dist/chunk-7XYTJPWW.js +29 -0
  63. package/dist/{chunk-SCPCZCYQ.js → chunk-7ZP64SC7.js} +1 -1
  64. package/dist/{chunk-C2L33LDZ.js → chunk-AJO72CPB.js} +2 -2
  65. package/dist/chunk-ALDGSODF.js +2 -0
  66. package/dist/{chunk-H64JJSXC.js → chunk-AOK3BHRT.js} +4 -4
  67. package/dist/{chunk-67JCJ2MG.js → chunk-B7UCXROE.js} +1 -1
  68. package/dist/{chunk-SWN3LSQX.js → chunk-BNJWZAQE.js} +11 -11
  69. package/dist/{chunk-RQSVBXBV.js → chunk-CBEKJTXU.js} +5 -5
  70. package/dist/{chunk-PBWUEBJ5.js → chunk-CQV3VSI2.js} +1 -1
  71. package/dist/{chunk-XNKIDGZW.js → chunk-CRILBBSU.js} +1 -1
  72. package/dist/{chunk-YJLLLO5R.js → chunk-D4I3U7UE.js} +1 -1
  73. package/dist/chunk-DESWIPOZ.js +3 -0
  74. package/dist/{chunk-MXH3UPCH.js → chunk-DWR7MYQU.js} +5 -5
  75. package/dist/{chunk-EYZZW6SO.js → chunk-E3753CWP.js} +1 -1
  76. package/dist/{chunk-XAROKI7X.js → chunk-E5QPXEKN.js} +2 -2
  77. package/dist/{chunk-URERZUX5.js → chunk-EXJXOKUU.js} +1 -1
  78. package/dist/{chunk-RBQWIHYD.js → chunk-F2R3UFNQ.js} +1 -1
  79. package/dist/{chunk-A4HJDSRA.js → chunk-FEQDZTZ7.js} +6 -6
  80. package/dist/{chunk-M3OYHYIS.js → chunk-FWVC4A2O.js} +1 -1
  81. package/dist/{chunk-LTKXAHS3.js → chunk-GPJO34QP.js} +7 -7
  82. package/dist/{chunk-LOFYSLC7.js → chunk-H32EQG5Z.js} +9 -9
  83. package/dist/chunk-JEH5EVIG.js +1 -0
  84. package/dist/{chunk-MBXLROCD.js → chunk-JGTGQGHY.js} +1 -1
  85. package/dist/{chunk-YGSU5KCP.js → chunk-JJW43QPS.js} +5 -5
  86. package/dist/{chunk-KUMEDH5M.js → chunk-K4ANB6AF.js} +1 -1
  87. package/dist/{chunk-7PUVPDUZ.js → chunk-KTA77U3P.js} +4 -4
  88. package/dist/{chunk-L3QNKCXH.js → chunk-KTVXPGGB.js} +10 -10
  89. package/dist/{chunk-JRZ7PPVJ.js → chunk-L4IW77TD.js} +4 -4
  90. package/dist/{chunk-QODTON7V.js → chunk-LJN77RG6.js} +1 -1
  91. package/dist/{chunk-SOECV4V5.js → chunk-LO5T2K4B.js} +3 -3
  92. package/dist/{chunk-63L5ORRZ.js → chunk-LPXMHYTM.js} +1 -1
  93. package/dist/chunk-LU6NA4RU.js +5 -0
  94. package/dist/chunk-M4K6FLIY.js +1 -0
  95. package/dist/{chunk-AGG4RFXR.js → chunk-MHB52H2Y.js} +13 -13
  96. package/dist/{chunk-2VTO64YC.js → chunk-MNSKGMVZ.js} +9 -9
  97. package/dist/chunk-MNZ7MGAT.js +2 -0
  98. package/dist/{chunk-JBOMPD3V.js → chunk-MTEFYFUO.js} +1 -1
  99. package/dist/{chunk-C2P2Z6HU.js → chunk-NBVHJZVS.js} +14 -14
  100. package/dist/{chunk-3RORPK2J.js → chunk-PCFBDXLN.js} +1 -1
  101. package/dist/{chunk-7YZ5TUXE.js → chunk-PJQGYKN6.js} +6 -6
  102. package/dist/chunk-PN5FQVMB.js +7 -0
  103. package/dist/{chunk-ZNAVCHBV.js → chunk-PVZGSCCB.js} +6 -6
  104. package/dist/{chunk-FFIQPFUR.js → chunk-PYAJCN2Q.js} +1 -1
  105. package/dist/chunk-Q6YNMNUH.js +6 -0
  106. package/dist/{chunk-6U6WVU5F.js → chunk-QDQ347RL.js} +1 -1
  107. package/dist/{chunk-SMUH7NAN.js → chunk-QYSEYYV7.js} +1 -1
  108. package/dist/{chunk-P5YFQ4IQ.js → chunk-RDYFZHT3.js} +1 -1
  109. package/dist/{chunk-3BYLHJLC.js → chunk-RLJHRDDW.js} +8 -8
  110. package/dist/{chunk-FZO6H3ZB.js → chunk-RPYFOQM2.js} +5 -5
  111. package/dist/chunk-RRUHQLUY.js +14 -0
  112. package/dist/{chunk-NSLQ3UYJ.js → chunk-S6FBMSFU.js} +2 -2
  113. package/dist/{chunk-KP2THXEI.js → chunk-SG4LO2AN.js} +5 -5
  114. package/dist/{chunk-VZ4PBHFN.js → chunk-SHKBDFSE.js} +1 -1
  115. package/dist/{chunk-BS7IPLRR.js → chunk-TM33D3CE.js} +1 -1
  116. package/dist/{chunk-MUMQ6PW7.js → chunk-U2RFKQVA.js} +1 -1
  117. package/dist/{chunk-XBB6LSSB.js → chunk-UBMY23AG.js} +5 -5
  118. package/dist/{chunk-F5FNYNHF.js → chunk-UDRMZ22J.js} +1 -1
  119. package/dist/{chunk-UWK5Q3R4.js → chunk-VNACNNCJ.js} +17 -17
  120. package/dist/{chunk-MKQZINBW.js → chunk-VTFZ6W2D.js} +2 -2
  121. package/dist/{chunk-LKTBKVN6.js → chunk-W35N7SL3.js} +4 -4
  122. package/dist/{chunk-W6SC3ZNO.js → chunk-W3OWPBQL.js} +2 -2
  123. package/dist/chunk-W4OBVKN4.js +1 -0
  124. package/dist/{chunk-F6JDUMM7.js → chunk-WB4P4QE2.js} +1 -1
  125. package/dist/{chunk-E3HSZQFI.js → chunk-WMEYNKXZ.js} +16 -16
  126. package/dist/{chunk-SO6X4CII.js → chunk-X6BFVDB4.js} +2 -2
  127. package/dist/{chunk-CHBRMAJV.js → chunk-XDBG4HPV.js} +1 -1
  128. package/dist/{chunk-7YOQS3C6.js → chunk-XTCXX5LJ.js} +1 -1
  129. package/dist/{chunk-GBCH3UHD.js → chunk-XZGGJHJC.js} +17 -17
  130. package/dist/{chunk-YWDEFPSW.js → chunk-YOSUCCHG.js} +1 -1
  131. package/dist/{chunk-GSKLHUQ6.js → chunk-ZW3IDCP2.js} +1 -1
  132. package/dist/{chunk-JAKOZNZK.js → chunk-ZZVE64OI.js} +2 -2
  133. package/dist/data/ListLoadError.js +1 -1
  134. package/dist/forms/BorderInput.js +1 -1
  135. package/dist/forms/BrandAssetEditor.js +1 -1
  136. package/dist/forms/Calendar.js +1 -1
  137. package/dist/forms/ColorPicker.js +1 -1
  138. package/dist/forms/ComposerAttachments.js +1 -1
  139. package/dist/forms/CornersInput.js +1 -1
  140. package/dist/forms/DatePicker.js +1 -1
  141. package/dist/forms/DateRangePicker.js +1 -1
  142. package/dist/forms/DisplayChips.js +1 -1
  143. package/dist/forms/FilePicker.js +1 -1
  144. package/dist/forms/IconPicker.js +1 -1
  145. package/dist/forms/InputNumber.js +1 -1
  146. package/dist/forms/LinkPicker.js +1 -1
  147. package/dist/forms/MediaLibrary.js +1 -1
  148. package/dist/forms/MediaUploadField.js +1 -1
  149. package/dist/forms/MediaUploadGrid.js +1 -1
  150. package/dist/forms/MediaUsedInList.js +1 -1
  151. package/dist/forms/PositionInput.js +1 -1
  152. package/dist/forms/Select.d.ts +1 -1
  153. package/dist/forms/Select.js +1 -1
  154. package/dist/forms/SidesInput.js +1 -1
  155. package/dist/forms/Slider.js +1 -1
  156. package/dist/forms/Snippet.js +1 -1
  157. package/dist/forms/SplitButton.js +1 -1
  158. package/dist/forms/TagInput.js +1 -1
  159. package/dist/forms/TextToolbar.d.ts +1 -1
  160. package/dist/forms/TextToolbar.js +1 -1
  161. package/dist/forms/WidthsBar.js +1 -1
  162. package/dist/forms/mediaLibraryMenu.js +1 -1
  163. package/dist/forms/textAlign.d.ts +1 -1
  164. package/dist/forms/textAlign.js +1 -1
  165. package/dist/hooks/useTheme.d.ts +1 -1
  166. package/dist/icons/efficient-glyphs.d.ts +1 -0
  167. package/dist/icons/efficient-glyphs.js +1 -1
  168. package/dist/icons/efficient-looks.d.ts +2 -0
  169. package/dist/icons/efficient-looks.js +1 -1
  170. package/dist/icons/efficient-meanings.d.ts +1 -0
  171. package/dist/icons/efficient-meanings.js +1 -1
  172. package/dist/icons/efficient.d.ts +1 -0
  173. package/dist/icons/efficient.js +1 -1
  174. package/dist/icons/glyphs/EnterIcon.d.ts +8 -0
  175. package/dist/icons/glyphs/EnterIcon.js +1 -0
  176. package/dist/icons/index.d.ts +2 -2
  177. package/dist/icons/index.js +1 -1
  178. package/dist/icons/looks/EnterMiniIcon.d.ts +8 -0
  179. package/dist/icons/looks/EnterMiniIcon.js +1 -0
  180. package/dist/icons/looks/EnterSolidIcon.d.ts +8 -0
  181. package/dist/icons/looks/EnterSolidIcon.js +1 -0
  182. package/dist/icons/looks/map.js +1 -1
  183. package/dist/icons/sets.js +1 -1
  184. package/dist/index.d.ts +4 -4
  185. package/dist/index.js +135 -135
  186. package/dist/map/index.js +3 -3
  187. package/dist/markdown/index.js +1 -1
  188. package/dist/{names-CwzeaUf6.d.ts → names-Bmx_9y41.d.ts} +1 -1
  189. package/dist/page-tabs/index.js +5 -5
  190. package/dist/pdf/index.js +1 -1
  191. package/dist/shell/AppUpdateBanner.js +1 -1
  192. package/dist/shell/Banner.js +1 -1
  193. package/dist/shell/Breadcrumbs.js +1 -1
  194. package/dist/shell/ColoredBadge.js +1 -1
  195. package/dist/shell/ConfirmDialog.js +1 -1
  196. package/dist/shell/ContextMenu.js +1 -1
  197. package/dist/shell/Dialog.js +1 -1
  198. package/dist/shell/Drawer.js +1 -1
  199. package/dist/shell/DropdownMenu.js +1 -1
  200. package/dist/shell/EmptyState.js +1 -1
  201. package/dist/shell/HelpCenter.js +1 -1
  202. package/dist/shell/ImageLightbox.js +1 -1
  203. package/dist/shell/LanguageSelect.js +1 -1
  204. package/dist/shell/Markdown.d.ts +1 -1
  205. package/dist/shell/Markdown.js +1 -1
  206. package/dist/shell/PageHeader.js +1 -1
  207. package/dist/shell/PopupMenu.js +1 -1
  208. package/dist/shell/ProductionTimeline.js +1 -1
  209. package/dist/shell/Result.js +1 -1
  210. package/dist/shell/SearchableSelect.js +1 -1
  211. package/dist/shell/SettingReset.js +1 -1
  212. package/dist/shell/SidebarLayout.js +1 -1
  213. package/dist/shell/SidebarNav.js +1 -1
  214. package/dist/shell/SortableList.js +1 -1
  215. package/dist/shell/StepChain.js +1 -1
  216. package/dist/shell/Stepper.js +1 -1
  217. package/dist/shell/TopNav.js +1 -1
  218. package/dist/shell/Tree.js +1 -1
  219. package/dist/shell/discardGuard.js +1 -1
  220. package/dist/telemetry/index.js +1 -1
  221. package/dist/templates/ChatTemplate.js +1 -1
  222. package/dist/templates/CheckoutTemplate.js +1 -1
  223. package/dist/templates/DashboardTemplate.js +1 -1
  224. package/dist/templates/DataTablePage.js +1 -1
  225. package/dist/templates/EmailTemplate.js +1 -1
  226. package/dist/templates/ErrorBoundary.d.ts +1 -1
  227. package/dist/templates/FormLayoutPage.js +1 -1
  228. package/dist/tokens/colour.d.ts +2 -2
  229. package/dist/ui/index.d.ts +1 -1
  230. package/dist/ui/index.js +1 -1
  231. package/dist/version.js +1 -1
  232. package/package.json +1 -1
  233. package/dist/Calculator-ZFMTTDQ6.js +0 -29
  234. package/dist/PdfViewer-Z4YKDHIH.js +0 -1
  235. package/dist/Sidebar-7RR5WNIF.js +0 -44
  236. package/dist/chunk-3GL4OVBB.js +0 -1
  237. package/dist/chunk-47EYPWCB.js +0 -14
  238. package/dist/chunk-A5BV6NFA.js +0 -7
  239. package/dist/chunk-DWMOUDMX.js +0 -1
  240. package/dist/chunk-IKMWKOT5.js +0 -1
  241. package/dist/chunk-KZMJE24J.js +0 -5
  242. package/dist/chunk-QKWYCOMM.js +0 -23
  243. package/dist/chunk-R7APUBZB.js +0 -29
  244. package/dist/chunk-UBOP6HFI.js +0 -6
  245. package/dist/chunk-WTTSB4SV.js +0 -3
  246. package/dist/chunk-ZTPMMNAZ.js +0 -1
  247. /package/dist/{chunk-744BFBBV.js → chunk-6V6ANLHW.js} +0 -0
  248. /package/dist/{chunk-S2P74CBN.js → chunk-N3TOHWFF.js} +0 -0
@@ -1,9 +1,9 @@
1
- import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-DRDYZ633.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-4PAWQEXM.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:D=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:P="bg-white"}){const W="right"===m,j=i().sidebar,z=a(),C=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[R,E]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),I=null!=l||null!=n,K=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:R},children:[
2
- /* @__PURE__ */f("div",{className:`flex h-full flex-col ${I?"overflow-hidden":"overflow-y-auto"} ${D}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),I?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
- /* @__PURE__ */p(t,{side:m,width:R,onResize:E,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:j.resize})]}),M=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${P}`,children:u});/* @__PURE__ */
4
- return f("div",z?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:C,top:l,fallback:j.sections}),M,
6
- /* @__PURE__ */p(v,{phone:C,bottom:n,label:j.sections,closeLabel:j.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[W?null:K,M,W?K:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
1
+ import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-DRDYZ633.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-4PAWQEXM.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:D=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:W="bg-white"}){const j="right"===m,z=i().sidebar,C=a(),O=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[P,E]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),R=null!=l||null!=n,I=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:P},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${R?"overflow-hidden":"overflow-y-auto"} ${D}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),R?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
+ /* @__PURE__ */p(t,{side:m,width:P,onResize:E,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:z.resize})]}),M=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${W}`,children:u});/* @__PURE__ */
4
+ return f("div",C?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
+ /* @__PURE__ */p(g,{phone:O,top:l,fallback:z.sections}),M,
6
+ /* @__PURE__ */p(v,{phone:O,bottom:n,label:z.sections,closeLabel:z.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[j?null:I,M,j?I:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
7
7
  return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
8
8
  /* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
9
9
  /* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-TOVKWNI2.js";import{Select_default as l}from"./chunk-UWK5Q3R4.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-GSKLHUQ6.js";import{Input_default as c}from"./chunk-MAMWQCJ6.js";import{Button_default as s}from"./chunk-I4VIEGCX.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
1
+ import{Card as e}from"./chunk-TOVKWNI2.js";import{Select_default as l}from"./chunk-VNACNNCJ.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-ZW3IDCP2.js";import{Input_default as c}from"./chunk-MAMWQCJ6.js";import{Button_default as s}from"./chunk-I4VIEGCX.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
2
2
  return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
3
3
  /* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
4
4
  /* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
@@ -1,4 +1,4 @@
1
- import{Markdown as e}from"./chunk-MBXLROCD.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-KKSVRIMP.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-4PAWQEXM.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.trim().toLowerCase(),L=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),_=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),A=n(()=>L.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[L,M]),E=n(()=>A.flatMap(e=>e.docs),[A]),R=(w?E.find(e=>e.slug===w):void 0)??E[0]??null,B=e=>!!M||(C[e]??e===R?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-JGTGQGHY.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-4PAWQEXM.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.trim().toLowerCase(),_=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),A=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),E=n(()=>_.map(e=>({...e,docs:e.docs.filter(A)})).filter(e=>e.docs.length>0),[_,M]),L=n(()=>E.flatMap(e=>e.docs),[E]),Y=(w?L.find(e=>e.slug===w):void 0)??L[0]??null,B=e=>!!M||(C[e]??e===Y?.category);/* @__PURE__ */
2
2
  return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
@@ -6,16 +6,16 @@ return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
6
6
  /* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
7
7
  /* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
8
  /* @__PURE__ */o("input",{type:"text",value: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===A.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):A.map(e=>{const t=B(e.key);/* @__PURE__ */
9
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===E.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):E.map(e=>{const t=B(e.key);/* @__PURE__ */
10
10
  return i("div",{className:"py-0.5",children:[
11
11
  /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!B(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
12
12
  /* @__PURE__ */o(d,{open:t}),
13
- /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=R?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=Y?.slug===e.slug;/* @__PURE__ */
14
14
  return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
15
15
  /* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
16
- /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:R?/* @__PURE__ */i(c,{children:[
16
+ /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:Y?/* @__PURE__ */i(c,{children:[
17
17
  /* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
18
18
  /* @__PURE__ */i("div",{className:"min-w-0",children:[
19
- /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:R.title}),
20
- /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[R.category_label,!1===R.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(R),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
- /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(R):R.body?/* @__PURE__ */o(e,{children:R.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
19
+ /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:Y.title}),
20
+ /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[Y.category_label,!1===Y.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(Y),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(Y):Y.body?/* @__PURE__ */o(e,{children:Y.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
@@ -1,11 +1,11 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-67JCJ2MG.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-6RX4PVBU.js";import{useShellStrings as l}from"./chunk-4PAWQEXM.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},C){const $=m(),z=l().files,B=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),M=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
2
- return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
3
- /* @__PURE__ */o("button",{ref:C,type:"button",id:$,disabled:y,onClick:B.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":M,...B.zoneProps,className:t(B.dragOver,y,a(y),"px-4 py-6"),children:[
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-B7UCXROE.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-6RX4PVBU.js";import{useShellStrings as l}from"./chunk-4PAWQEXM.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},B){const C=m(),$=l().files,z=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),O=j?`${C}-error`:N?`${C}-hint`:void 0;/* @__PURE__ */
2
+ return o(e,{label:g,htmlFor:C,hint:N,error:j,required:k,className:v,children:[
3
+ /* @__PURE__ */o("button",{ref:B,type:"button",id:C,disabled:y,onClick:z.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":O,...z.zoneProps,className:t(z.dragOver,y,a(y),"px-4 py-6"),children:[
4
4
  /* @__PURE__ */o("span",{children:[
5
- /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
6
- /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
- /* @__PURE__ */d("input",{...B.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
5
+ /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?$.chooseMany:$.chooseOne}),
6
+ /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?$.dragMany:$.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
+ /* @__PURE__ */d("input",{...z.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
8
8
  /* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
9
- /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
10
- /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{B.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
- /* @__PURE__ */d(s,{rejections:B.rejections})]})});export{p as FilePicker_default};
9
+ /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,$)}),
10
+ /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{z.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":$.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
+ /* @__PURE__ */d(s,{rejections:z.rejections})]})});export{p as FilePicker_default};
@@ -0,0 +1 @@
1
+ var a=["academic-cap","accent","account","account-circle","add","add-circle","add-person","adjust","align-center","align-justify","align-left","align-right","align-separate","alignment","anchor","animation","apps","archive-box","arrow","arrow-down","arrow-left","arrow-left-end-on-rectangle","arrow-long-right","arrow-right","arrow-trending-down","arrow-trending-up","arrow-up","arrow-up-right","at-symbol","attach","background","bag","bank","bars-3-bottom-left","battery","beaker","bell","bell-alert","bell-plus","billing","black-and-white","block-badge","block-banner","block-box","block-button","block-column","block-coupon","block-divider","block-footer","block-heading","block-image","block-included-list","block-layered-images","block-product","block-product-title","block-section","block-social","block-spacer","block-text","block-video","blog-post","bold","bolt","book-open","bookmark","bookmark-square","border-all","border-bottom","border-left","border-right","border-top","braces","brand-1password","brand-adyen","brand-afterpay","brand-aircall","brand-alipay","brand-amd","brand-americanexpress","brand-anthropic","brand-apple","brand-applepay","brand-aws","brand-bigcommerce","brand-brevo","brand-calendly","brand-campaignmonitor","brand-cloudflare","brand-dell","brand-dhl","brand-dinersclub","brand-dropbox","brand-ebay","brand-etsy","brand-facebook","brand-fedex","brand-github","brand-gmail","brand-googleads","brand-googleanalytics","brand-googlecalendar","brand-googledrive","brand-googlepay","brand-googlesheets","brand-hubspot","brand-instagram","brand-intel","brand-intercom","brand-jcb","brand-klarna","brand-line","brand-linkedin","brand-mailchimp","brand-mailgun","brand-make","brand-mastercard","brand-messenger","brand-meta","brand-myob","brand-notion","brand-nvidia","brand-paypal","brand-pinterest","brand-quickbooks","brand-sage","brand-samsung","brand-shopify","brand-square","brand-squarespace","brand-stripe","brand-telegram","brand-tiktok","brand-trello","brand-ups","brand-visa","brand-vonage","brand-wechat","brand-whatsapp","brand-wise","brand-wix","brand-woocommerce","brand-x","brand-xero","brand-youtube","brand-zapier","brand-zendesk","brand-zoom","breadcrumb","briefcase","bug","bug-ant","building-library","building-office-2","button","button-arrow","button-icon","calculator","calendar","calendar-check","camera","caption","car","card-payment","caret","cart","case","case-capitalized","case-lower","case-normal","case-upper","category","chart","chart-bar","chart-bar-square","chart-line","chat","chat-bubble-left-right","chat-bubble-oval-left-ellipsis","check","check-circle","checkbox","chevron","chevron-double","chevron-double-left","chevron-double-right","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle-stack","clear-marks","clipboard","clipboard-check","clipboard-document-list","clipboard-list","clock","close","close-circle","cloud","cloud-alert","cloud-arrow-up","cloud-check","cloud-download","cloud-pause","cloud-slash","code","code-bracket","collapse","collapse-all","column-gap","column-widths","columns","company","compose","contrast","cookie","copied","copy","copy-style","copy-to-page","corner","count-up","crop","crop-bottom","crop-left","crop-left-right","crop-right","crop-top","crop-y","cube-transparent","cursor","cursor-arrow-rays","cursor-click","dashboard","date","desktop","detach","diagram","direction","direction-down","direction-left","direction-right","direction-up","document","document-check","document-magnifying-glass","dollar","dot","download","drag","drop","duplicate","duration","edit","email","emphasis","enter","eraser","error","expand","external","eye","eye-off","face-smile","filter","finish","fire","flag","flag-au","flag-ca","flag-eu","flag-gb","flag-nz","flag-us","folder","folder-open","folder-plus","forward","full-width","gap","gem","gift","globe","grid","ground","hand","hand-thumb-up","hash","headquarters","heart","height","help","help-off","hexagon","home","hover","hover-lift","hover-next-image","hover-none","hover-rotate","hover-zoom","icon-after-text","icon-at-end","icon-before-text","identification","image","image-off","images","inbox","info","italic","key","layers","layout","letter-spacing","lightbulb","line-between","line-dashed","line-dotted","line-solid","line-spacing","line-style","link","link-slash","list","list-format","list-none","location","lock","logo","logout","loop","map","media","media-layout-big-two","media-layout-inset","media-layout-side-by-side","media-layout-stacked","megaphone","menu","meta","microphone","money","moon","more","more-vertical","move-down","move-up","newspaper","no-symbol","note","nudge","nudge-x","nudge-y","numbered-list","opacity","own-text","package","package-open","padding-all","padding-bottom","padding-left","padding-left-right","padding-right","padding-top","padding-x","padding-y","page","paint-brush","palette","panel-left","panel-right","paragraph-spacing","parcel","paste","paste-style","pause","pen","people","percent","phone","phone-hidden","placement","play","plus-minus","power","presentation-chart-bar","print","product","product-field","product-size","progress","quote","radio-dot","radius","receipt","receipt-percent","receipt-refund","rectangle-group","redo","refresh","remove","remove-circle","rename","reply","reply-all","revert","robot","rotate","scale","scroll-point","scroll-text","search","select-all","send","server","settings","shadow","shape-ellipse","shape-rect","share","shared","shield-check","shield-exclamation","sides-each","signal","signal-slash","sitemap","slide-arrows-bare","slide-arrows-round","slide-arrows-square","slide-picker-bar","slide-picker-cards","slide-picker-dots","slide-picker-numbers","slide-picker-squares","sort","sparkles","speaker","speaker-wave","spec-table","spinner","split","square","star","state","status-circle","status-dot","sticky","stop-circle","store","strike","styles","subscript","success-burst","sun","superscript","swap","swatch","table","tablet","tabs","tag","target","team","telephone","template","text-color","text-lines","text-size","text-small","text-value","texture","theme","ticket","title","trash","trigger","truck","tv","type","tyre","underline","undo","upload","v-align","verified","video-off","view-columns","wallet","warning","weight","wheel","widgets","width","window","windows","words-from","wrap","wrench","wrench-screwdriver","zoom-in"],e=new Set(a),r=a=>"string"==typeof a&&e.has(a),n=["brand-1password","brand-adyen","brand-afterpay","brand-aircall","brand-alipay","brand-amd","brand-americanexpress","brand-anthropic","brand-apple","brand-applepay","brand-aws","brand-bigcommerce","brand-brevo","brand-calendly","brand-campaignmonitor","brand-cloudflare","brand-dell","brand-dhl","brand-dinersclub","brand-dropbox","brand-ebay","brand-etsy","brand-facebook","brand-fedex","brand-github","brand-gmail","brand-googleads","brand-googleanalytics","brand-googlecalendar","brand-googledrive","brand-googlepay","brand-googlesheets","brand-hubspot","brand-instagram","brand-intel","brand-intercom","brand-jcb","brand-klarna","brand-line","brand-linkedin","brand-mailchimp","brand-mailgun","brand-make","brand-mastercard","brand-messenger","brand-meta","brand-myob","brand-notion","brand-nvidia","brand-paypal","brand-pinterest","brand-quickbooks","brand-sage","brand-samsung","brand-shopify","brand-square","brand-squarespace","brand-stripe","brand-telegram","brand-tiktok","brand-trello","brand-ups","brand-visa","brand-vonage","brand-wechat","brand-whatsapp","brand-wise","brand-wix","brand-woocommerce","brand-x","brand-xero","brand-youtube","brand-zapier","brand-zendesk","brand-zoom"],o=new Set(n),d=a=>"string"==typeof a&&o.has(a);export{n as BRAND_ICON_NAMES,a as ICON_NAMES,d as isBrandIconName,r as isIconName};
@@ -1,4 +1,4 @@
1
- import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-I4VIEGCX.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{useShellStrings as r}from"./chunk-4PAWQEXM.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-I4VIEGCX.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as r}from"./chunk-4PAWQEXM.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,9 +1,9 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as a}from"./chunk-VKKK4WLS.js";import{Segmented as i}from"./chunk-3ELLBQPS.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-67JCJ2MG.js";import{TransferProgress as u}from"./chunk-UYRITNQW.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-6RX4PVBU.js";import{Icon as p}from"./chunk-KKSVRIMP.js";import{useShellStrings as b}from"./chunk-4PAWQEXM.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 L({value:L,onChange:w,onPick:R,onFile:U,label:C,hint:P,error:F,required:K,className:$,accept:z="image/*",maxSizeBytes:B,fit:O="cover",height:S=112,placeholder:W,cta:I,acceptHint:V,showFilename:q=!0,allowReplace:H=!0,allowRemove:M=!0,replaceLabel:Q,removeLabel:A,busy:E=!1,busyLabel:J,choosingLabel:X,pickFailedLabel:Y,progress:_,disabled:D=!1,kind:G,onKindChange:T,focus:Z,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=I??ie.cta,oe=G??(/video/.test(z)&&!/image/.test(z)?"video":"image"),re="string"==typeof A&&A?A:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=E||ne,me=ne&&!E?X??ie.choosing:J??ie.uploading,he=F??(se?Y??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&&w(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=D||ue,ke=!!L&&(t(L,z)||L===ve),je=W??o(z,ie),xe=Q??(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),w(a)})(e)},Le=m({accept:z,maxSizeBytes:B,acceptHint:V,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:we}=Le,Re=()=>{ye||(R?pe():Le.open())},Ue=L?r(L):"",Ce=!ke&&!!ee,Pe=D||!H&&!M?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:[H&&/* @__PURE__ */k("button",{id:Ce?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{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as a}from"./chunk-VKKK4WLS.js";import{Segmented as i}from"./chunk-3ELLBQPS.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-B7UCXROE.js";import{TransferProgress as u}from"./chunk-UYRITNQW.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-6RX4PVBU.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{useShellStrings as b}from"./chunk-4PAWQEXM.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 L({value:L,onChange:w,onPick:R,onFile:U,label:C,hint:F,error:P,required:B,className:O,accept:$="image/*",maxSizeBytes:z,fit:K="cover",height:W=112,placeholder:S,cta:X,acceptHint:q,showFilename:E=!0,allowReplace:H=!0,allowRemove:I=!0,replaceLabel:Q,removeLabel:V,busy:A=!1,busyLabel:Y,choosingLabel:_,pickFailedLabel:D,progress:M,disabled:T=!1,kind:G,onKindChange:J,focus:Z,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=X??ie.cta,oe=G??(/video/.test($)&&!/image/.test($)?"video":"image"),re="string"==typeof V&&V?V:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=A||ne,me=ne&&!A?_??ie.choosing:Y??ie.uploading,he=P??(se?D??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&&w(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=T||ue,ke=!!L&&(t(L,$)||L===ve),je=S??o($,ie),xe=Q??(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),w(a)})(e)},Le=m({accept:$,maxSizeBytes:z,acceptHint:q,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:we}=Le,Re=()=>{ye||(R?pe():Le.open())},Ue=L?r(L):"",Ce=!ke&&!!ee,Fe=T||!H&&!I?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:[H&&/* @__PURE__ */k("button",{id:Ce?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})]}),M&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),w("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Fe=/* @__PURE__ */k("div",{...Le.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ce?"":"bg-gray-100",we?"border-blue-500":"border-line"].join(" "),style:Ce?void 0:{height:S},children:[Ce?
4
- /* @__PURE__ */j(a,{value:Z??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:L,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:L??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:O}}):/* @__PURE__ */j("img",{src:L??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:O,objectPosition:Z||void 0}}),q&&L&&/* @__PURE__ */j(n,{children:Ue}),Pe,ue&&/* @__PURE__ */j(l,{label:me,progress:_,rounded:"rounded-md"})]}),Ke=/* @__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":K||void 0,"aria-describedby":he?`${be}-error`:P?`${be}-hint`:void 0,...Le.zoneProps,className:c(we,ye,d(ye)),style:{minHeight:S},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:_}):/* @__PURE__ */k(x,{children:[
3
+ /* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),I&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),w("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...Le.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ce?"":"bg-gray-100",we?"border-blue-500":"border-line"].join(" "),style:Ce?void 0:{height:W},children:[Ce?
4
+ /* @__PURE__ */j(a,{value:Z??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:L,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:L??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:K}}):/* @__PURE__ */j("img",{src:L??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:K,objectPosition:Z||void 0}}),E&&L&&/* @__PURE__ */j(n,{children:Ue}),Fe,ue&&/* @__PURE__ */j(l,{label:me,progress:M,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`:F?`${be}-hint`:void 0,...Le.zoneProps,className:c(we,ye,d(ye)),style:{minHeight:W},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:M}):/* @__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}),V&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:V})]})});/* @__PURE__ */
8
- return k(e,{label:C,htmlFor:be,hint:P,error:he,required:K,className:$,children:[T&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>T(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 C&&C?C:ie.upload})}),L?Fe:Ke,!R&&/* @__PURE__ */j("input",{...Le.inputProps}),
7
+ /* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),q&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:q})]})});/* @__PURE__ */
8
+ return k(e,{label:C,htmlFor:be,hint:F,error:he,required:B,className:O,children:[J&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>J(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 C&&C?C:ie.upload})}),L?Pe:Be,!R&&/* @__PURE__ */j("input",{...Le.inputProps}),
9
9
  /* @__PURE__ */j(h,{rejections:Le.rejections})]})}export{L as MediaUploadField};
@@ -1 +1 @@
1
- import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-DWMOUDMX.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,M=0,z=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),M=Math.max(M,t.interactionId),k=M?(M-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],z,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],U=[800,1800],B=e=>{document.prerendering?E(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(e),!0):setTimeout(e)};var N=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},D=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,K=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,V=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(X,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(X,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&N.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,U,t.reportAllChanges);B(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,U,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,U,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(D,"[redacted]").replace(J,"[redacted]").replace(K,"[url]").replace(W,"[id]").replace(V,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
1
+ import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-W4OBVKN4.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&O.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(K,"[redacted]").replace(J,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
@@ -1,4 +1,4 @@
1
- import{InputNumber_default as e}from"./chunk-JGFY54A4.js";import{IconButton_default as r}from"./chunk-PUF75SMJ.js";import{Icon as a}from"./chunk-KKSVRIMP.js";import{Tooltip as i}from"./chunk-6XBWM453.js";import{useShellStrings as n}from"./chunk-4PAWQEXM.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:A,id:M,className:j=""}){const K=n(),N=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[R,C]=l(0),P=o(null);/* @__PURE__ */
2
- return t("div",{id:M,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${j}`.trim(),children:[v&&
3
- /* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:K.corners.radiusMark}),suffix:K.corners.unit,steppers:"compact",disabled:y,"aria-label":b??K.corners.radius})}),
4
- /* @__PURE__ */s("div",{ref:P,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(P.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:N.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?A:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===R?0:-1,onFocus:()=>C(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
1
+ import{InputNumber_default as e}from"./chunk-57HN6MPC.js";import{IconButton_default as r}from"./chunk-PUF75SMJ.js";import{Icon as a}from"./chunk-2UO47XB4.js";import{Tooltip as i}from"./chunk-6XBWM453.js";import{useShellStrings as n}from"./chunk-4PAWQEXM.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:M,id:j,className:A=""}){const N=n(),C=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[K,P]=l(0),R=o(null);/* @__PURE__ */
2
+ return t("div",{id:j,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
3
+ /* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:N.corners.radiusMark}),suffix:N.corners.unit,steppers:"compact",disabled:y,"aria-label":b??N.corners.radius})}),
4
+ /* @__PURE__ */s("div",{ref:R,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(R.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:C.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?M:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===K?0:-1,onFocus:()=>P(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
@@ -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-67JCJ2MG.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-I4VIEGCX.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-KKSVRIMP.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-4PAWQEXM.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)]",I=e=>e.stopPropagation();function A({images:r,startIndex:y=0,onClose:A,onIndexChange:J,onOpenFile:L}){const P=h().lightbox,U=d(),$=p(null),z=p(null),[D,G]=x(y),M=r.length,W=U&&M>0,E=b(e=>{if(M<2)return;const t=((D+e)%M+M)%M;G(t),J?.(t)},[D,M,J]);if(a(W),l($,W,z),i(W),k(()=>{if(W)return f(()=>(A(),!0),()=>$.current)},[W,A]),k(()=>{if(!W)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),E("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[W,E]),!W)return null;const F=r[Math.min(D,M-1)],Q=j(F),V=F.caption||n(F.url);let K;return K="video"===Q?/* @__PURE__ */v("video",{src:F.url,controls:!0,playsInline:!0,"aria-label":V,onClick:I,className:`${e} rounded-lg bg-black`}):"file"===Q?/* @__PURE__ */w("div",{onClick:I,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-B7UCXROE.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-I4VIEGCX.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-4PAWQEXM.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 A({images:r,startIndex:y=0,onClose:A,onIndexChange:I,onOpenFile:L}){const $=h().lightbox,z=d(),D=p(null),E=p(null),[P,W]=x(y),X=r.length,F=z&&X>0,G=b(e=>{if(X<2)return;const t=((P+e)%X+X)%X;W(t),I?.(t)},[P,X,I]);if(a(F),l(D,F,E),i(F),k(()=>{if(F)return f(()=>(A(),!0),()=>D.current)},[F,A]),k(()=>{if(!F)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),G("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[F,G]),!F)return null;const J=r[Math.min(P,X-1)],O=j(J),Q=J.caption||n(J.url);let B;return B="video"===O?/* @__PURE__ */v("video",{src:J.url,controls:!0,playsInline:!0,"aria-label":Q,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:V}),L?/* @__PURE__ */v(c,{size:"sm",onClick:()=>L(F),children:P.openFile}):/* @__PURE__ */v("a",{href:F.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:P.openFile})]}):/* @__PURE__ */v(t,{src:F.url,alt:V,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
- /* @__PURE__ */w("div",{ref:$,...o({role:"dialog",modal:!0,label:P.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:A,children:[K,
5
- /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:I,children:[
6
- /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:P.counter(D+1,M)}),
7
- /* @__PURE__ */v("button",{ref:z,type:"button",onClick:A,"aria-label":P.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),M>1&&/* @__PURE__ */w(N,{children:[
8
- /* @__PURE__ */v("button",{type:"button",onClick:e=>{I(e),E(-1)},"aria-label":P.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
- /* @__PURE__ */v("button",{type:"button",onClick:e=>{I(e),E(1)},"aria-label":P.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
- /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:I,children:[
11
- /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:V}),"file"!==Q&&/* @__PURE__ */v("a",{href:F.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:P.openOriginal})]})]}),document.body)}export{A as ImageLightbox,j as lightboxKind};
3
+ /* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:Q}),L?/* @__PURE__ */v(c,{size:"sm",onClick:()=>L(J),children:$.openFile}):/* @__PURE__ */v("a",{href:J.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:$.openFile})]}):/* @__PURE__ */v(t,{src:J.url,alt:Q,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
+ /* @__PURE__ */w("div",{ref:D,...o({role:"dialog",modal:!0,label:$.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:A,children:[B,
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:$.counter(P+1,X)}),
7
+ /* @__PURE__ */v("button",{ref:E,type:"button",onClick:A,"aria-label":$.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),X>1&&/* @__PURE__ */w(N,{children:[
8
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),G(-1)},"aria-label":$.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),G(1)},"aria-label":$.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:Q}),"file"!==O&&/* @__PURE__ */v("a",{href:J.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:$.openOriginal})]})]}),document.body)}export{A as ImageLightbox,j as lightboxKind};
@@ -1,11 +1,11 @@
1
- import{MediaUploadField as e}from"./chunk-YGSU5KCP.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-I4VIEGCX.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,U]=l(null),[R,C]=l(""),[I,A]=l(""),[E,G]=l(!1),[H,P]=l(!1),F=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),O=t().brandAsset,S=R||d||g||"",B=L?null:d?o:h,$=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const z=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
1
+ import{MediaUploadField as e}from"./chunk-JJW43QPS.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-I4VIEGCX.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,R]=l(null),[U,I]=l(""),[C,A]=l(""),[E,H]=l(!1),[P,F]=l(!1),G=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),O=t().brandAsset,S=U||d||g||"",B=L?null:d?o:h,J=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const W=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
2
2
  return n("section",{"aria-label":O.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
3
3
  /* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
4
- /* @__PURE__ */c(e,{value:S,onChange:()=>{},onFile:e=>{if(k)return;z();const r=URL.createObjectURL(e);j.current=r,U(e),C(r),A("")},label:p,hint:I||O.usedFor(b),error:I||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:E||H,disabled:k}),
4
+ /* @__PURE__ */c(e,{value:S,onChange:()=>{},onFile:e=>{if(k)return;W();const r=URL.createObjectURL(e);j.current=r,R(e),I(r),A("")},label:p,hint:C||O.usedFor(b),error:C||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:E||P,disabled:k}),
5
5
  /* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
6
- /* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!E){G(!0),A("");try{await x(L),z(),U(null),C("")}catch(e){A(e instanceof Error?e.message:O.saveFailed(F,p))}finally{G(!1)}}},disabled:!L||k,loading:E,children:O.save(F,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!H){if(L)return z(),U(null),C(""),void A("");if(d){P(!0),A("");try{await f()}catch(e){A(e instanceof Error?e.message:O.removeFailed(F,p))}finally{P(!1)}}}},disabled:k,loading:H,children:L?O.discard:O.remove(F,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":O.previews(p),children:[
6
+ /* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!E){H(!0),A("");try{await x(L),W(),R(null),I("")}catch(e){A(e instanceof Error?e.message:O.saveFailed(G,p))}finally{H(!1)}}},disabled:!L||k,loading:E,children:O.save(G,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!P){if(L)return W(),R(null),I(""),void A("");if(d){F(!0),A("");try{await f()}catch(e){A(e instanceof Error?e.message:O.removeFailed(G,p))}finally{F(!1)}}}},disabled:k,loading:P,children:L?O.discard:O.remove(G,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":O.previews(p),children:[
7
7
  /* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:O.preview}),
8
- /* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:S,alt:O.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:B,isLight:$,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
8
+ /* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:S,alt:O.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:B,isLight:J,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
9
9
  return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
10
10
  /* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
11
11
  /* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
@@ -1,4 +1,4 @@
1
- import{Icon as t}from"./chunk-KKSVRIMP.js";import{jsxs as n,jsx as e}from"react/jsx-runtime";var r=t=>Array.isArray(t.options);function o(t){const n=[];for(const e of t)r(e)?n.push(...e.options):n.push(e);return n}function i(t,n){const e=[];for(const o of t){if(!r(o)){n(o)&&e.push(o);continue}const t=o.options.filter(n);t.length&&e.push({...o,options:t})}return e}function s(t,o,i,s=""){const a=[];let c=0;return t.forEach((t,u)=>{if(!r(t))return a.push(o(t,c)),void(c+=1);const l=`${i}-group-${u}`,p=c;c+=t.options.length,a.push(
1
+ import{Icon as t}from"./chunk-2UO47XB4.js";import{jsxs as n,jsx as e}from"react/jsx-runtime";var r=t=>Array.isArray(t.options);function o(t){const n=[];for(const e of t)r(e)?n.push(...e.options):n.push(e);return n}function i(t,n){const e=[];for(const o of t){if(!r(o)){n(o)&&e.push(o);continue}const t=o.options.filter(n);t.length&&e.push({...o,options:t})}return e}function s(t,o,i,s=""){const a=[];let c=0;return t.forEach((t,u)=>{if(!r(t))return a.push(o(t,c)),void(c+=1);const l=`${i}-group-${u}`,p=c;c+=t.options.length,a.push(
2
2
  /* @__PURE__ */n("div",{role:"group","aria-labelledby":l,children:[
3
3
  /* @__PURE__ */e("div",{id:l,role:"presentation","data-option-group-heading":"",className:`truncate px-3 pb-1 pt-2 text-xs font-semibold text-gray-500 ${s}`.trim(),children:t.label}),t.options.map((t,n)=>o(t,p+n))]},l))}),a}function a({selected:n}){/* @__PURE__ */
4
4
  return e(t,{name:"check","aria-hidden":"true",className:"h-4 w-4 shrink-0 "+(n?"":"invisible"),strokeWidth:2.5})}function c(t,n){return t.label.toLowerCase().includes(n)||(t.sublabel?.toLowerCase().includes(n)??!1)}function u({children:t,grows:n=!1}){/* @__PURE__ */
@@ -1,9 +1,9 @@
1
- import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-QHOBK35Y.js";import{Icon as l}from"./chunk-KKSVRIMP.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-4PAWQEXM.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
1
+ import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-QHOBK35Y.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-4PAWQEXM.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
2
2
  /* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
3
- /* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),I=c(null),K=c(l);K.current=l,s(()=>{if(j&&d)return j.report(S,()=>K.current,I.current)},[j,d,S]);const C=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
3
+ /* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),C=c(null),I=c(l);I.current=l,s(()=>{if(j&&d)return j.report(S,()=>I.current,C.current)},[j,d,S]);const W=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
4
4
  /* @__PURE__ */m("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
5
5
  /* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:N}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
6
- return m("button",1===k?{ref:I,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:C})}:{ref:I,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:C})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
6
+ return m("button",1===k?{ref:C,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:W})}:{ref:C,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:W})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
7
7
  return h("div",{children:[
8
8
  /* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
9
9
  /* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
@@ -1,2 +1,2 @@
1
- import{Icon as e}from"./chunk-KKSVRIMP.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
2
2
  return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
@@ -0,0 +1,5 @@
1
+ import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-N3TOHWFF.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-2UO47XB4.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-4PAWQEXM.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:W,description:C,role:D="dialog",children:T,footer:F,blocking:L=!1,size:U="md",aside:X=!1,dirty:A=!1,initialFocus:J,"aria-label":P,"aria-labelledby":Q,"aria-describedby":V,className:$=""}){const z=f(null),B=h(),G=h(),H=!L,I=h(),O=p().dialog,S=e(m()),[E,K]=x(null),M=l({open:j,dirty:A,onClose:w,title:W,layer:E}),Y=f(null),Z=r(j&&null!==S,Y),q=i(Z,z);if(o(j),n(z,j&&null!==S,J),s(j),v(()=>{if(j)return u(()=>(L||M(),!0),()=>z.current)},[j,L,M]),!j||!S)return null;/* @__PURE__ */
2
+ return y(g,{children:[/* @__PURE__ */k("span",{ref:Y,hidden:!0,"data-popup-anchor":""}),b(
3
+ /* @__PURE__ */k(t,{value:E,children:/* @__PURE__ */y("div",{ref:K,className:"fixed inset-0"+(X?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":X?"":void 0,children:[
4
+ /* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
5
+ /* @__PURE__ */k("div",{className:Z?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:L?void 0:e=>{e.target===e.currentTarget&&M()},children:/* @__PURE__ */y("div",{ref:z,"data-popup-panel":"",style:Z?{left:q?.left??0,top:q?.top??0,visibility:q?void 0:"hidden"}:void 0,...a({role:D,modal:!0,titleId:W?I:void 0,labelledBy:Q,label:P}),"aria-describedby":V??(C?G:T?B:void 0),className:`${Z?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[U]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${$}`.trim(),children:[W&&/* @__PURE__ */k("h2",{id:I,className:(H?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:W}),C&&/* @__PURE__ */k("p",{id:G,className:((W?"mt-1":H?"pr-8":"")+" text-sm text-gray-500").trim(),children:C}),T&&/* @__PURE__ */k("div",{id:B,className:"mt-2 text-sm text-gray-600",children:T}),F&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:F}),H&&/* @__PURE__ */k("button",{type:"button",onClick:M,"aria-label":O.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),S)]})}export{j as Dialog};