efficient-shell 13.14.0 → 13.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 (301) hide show
  1. package/README.md +21 -2
  2. package/dist/Browser-4KWGT3FG.js +44 -0
  3. package/dist/Calculator-VURS4NAT.js +29 -0
  4. package/dist/CurrencyConverter-X5ENBDLK.js +21 -0
  5. package/dist/{Files-XLDCJ7DO.js → Files-NT76VUHQ.js} +64 -64
  6. package/dist/Notepad-6AMNAYQQ.js +24 -0
  7. package/dist/PomodoroTimer-KDXH5M3Q.js +91 -0
  8. package/dist/{Preview-24XTJDIR.js → Preview-QNJD5PVD.js} +27 -27
  9. package/dist/Sidebar-UCCVJFSY.js +44 -0
  10. package/dist/Stock-JR77FPOD.js +16 -0
  11. package/dist/{Weather-IWM5XTE5.js → Weather-MGSDU3M5.js} +18 -18
  12. package/dist/{WorldClock-35TNXAJM.js → WorldClock-GGAYPYIO.js} +7 -7
  13. package/dist/ai/index.js +44 -44
  14. package/dist/apps/index.js +1 -1
  15. package/dist/bin/browser-check.js +1 -1
  16. package/dist/bin/media-host-check.js +1 -1
  17. package/dist/bin/ui-check.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/charts/ChartFrame.js +1 -1
  20. package/dist/charts/ChordChart.js +1 -1
  21. package/dist/charts/FlowChart.js +1 -1
  22. package/dist/charts/PieChart.js +1 -1
  23. package/dist/charts/RadarChart.js +1 -1
  24. package/dist/charts/RadialBarChart.js +1 -1
  25. package/dist/charts/SankeyChart.js +1 -1
  26. package/dist/charts/SpecChart.js +1 -1
  27. package/dist/charts/SunburstChart.js +1 -1
  28. package/dist/charts/TimeSeriesChart.js +1 -1
  29. package/dist/charts/TreemapChart.js +1 -1
  30. package/dist/{chunk-UGEA3C5C.js → chunk-23LK4PLJ.js} +5 -5
  31. package/dist/{chunk-JNSRDEB6.js → chunk-2J3C2RR4.js} +10 -10
  32. package/dist/{chunk-PT4GMPUB.js → chunk-3SIRRK3F.js} +3 -3
  33. package/dist/{chunk-36UB4MJX.js → chunk-4G7PJ325.js} +1 -1
  34. package/dist/chunk-5URXJCNC.js +2 -0
  35. package/dist/{chunk-HVHIXX6O.js → chunk-6OGX7V7L.js} +10 -10
  36. package/dist/{chunk-WP43XYL6.js → chunk-6QH7I2V5.js} +2 -2
  37. package/dist/chunk-74SCWPQF.js +1 -0
  38. package/dist/{chunk-QTVE3OSD.js → chunk-75R3EKWZ.js} +7 -7
  39. package/dist/{chunk-G53Y6EPJ.js → chunk-7CBWSLCW.js} +13 -13
  40. package/dist/{chunk-DVVB2CY5.js → chunk-7I5RJPY7.js} +1 -1
  41. package/dist/{chunk-22N3KA7A.js → chunk-7IXU4YT4.js} +4 -4
  42. package/dist/{chunk-XEPA5J6K.js → chunk-A7VNKVZO.js} +4 -4
  43. package/dist/{chunk-JPKNVTTK.js → chunk-BNPWUCZX.js} +1 -1
  44. package/dist/{chunk-M5K4AX4E.js → chunk-BUFAJJDZ.js} +1 -1
  45. package/dist/{chunk-ALHYNNE2.js → chunk-BVX7LUAW.js} +6 -6
  46. package/dist/chunk-BWJZTHZ6.js +1 -0
  47. package/dist/chunk-BWQHABH7.js +4 -0
  48. package/dist/{chunk-G4D2WM3J.js → chunk-BZRFD4DK.js} +3 -3
  49. package/dist/{chunk-U6DRRCCG.js → chunk-C5OPAULN.js} +1 -1
  50. package/dist/{chunk-MEF4JVXP.js → chunk-CCLK2RPQ.js} +14 -14
  51. package/dist/{chunk-KC3EX26K.js → chunk-DPFEQQQU.js} +1 -1
  52. package/dist/{chunk-ZYU5HAIC.js → chunk-E7BQZL7X.js} +1 -1
  53. package/dist/{chunk-YM2Z4LZ2.js → chunk-EFVQQF6F.js} +17 -17
  54. package/dist/{chunk-GO2TZ35U.js → chunk-EJOKROMB.js} +1 -1
  55. package/dist/{chunk-4IYHQNKZ.js → chunk-ENDYHUUR.js} +1 -1
  56. package/dist/{chunk-4F3SUYN5.js → chunk-ETQ45TBW.js} +1 -1
  57. package/dist/chunk-EX3DARI3.js +7 -0
  58. package/dist/{chunk-JPCPO4MX.js → chunk-EZYXY67W.js} +8 -8
  59. package/dist/chunk-F2RAIGCG.js +6 -0
  60. package/dist/{chunk-ZDMZM7HD.js → chunk-FBZUEZK7.js} +2 -2
  61. package/dist/{chunk-GURY4WS5.js → chunk-FFRJ6QZK.js} +1 -1
  62. package/dist/{chunk-F5B5WOQ7.js → chunk-FKMARSJZ.js} +2 -2
  63. package/dist/chunk-FMLUQCFB.js +2 -0
  64. package/dist/{chunk-AWWNMSDN.js → chunk-FXSGIT53.js} +10 -10
  65. package/dist/{chunk-YMHCLK3F.js → chunk-FZYUTZEV.js} +10 -10
  66. package/dist/chunk-G2JPTPRS.js +13 -0
  67. package/dist/chunk-G5UGCAWN.js +17 -0
  68. package/dist/{chunk-DEYVAMJQ.js → chunk-GEITUFYK.js} +13 -13
  69. package/dist/chunk-GMLOMLCS.js +24 -0
  70. package/dist/{chunk-QNQLKGBC.js → chunk-GNXAVDZD.js} +1 -1
  71. package/dist/{chunk-6LS6Q77E.js → chunk-GUSENWAH.js} +1 -1
  72. package/dist/{chunk-YDQBELHJ.js → chunk-H5PSCQJ2.js} +6 -6
  73. package/dist/{chunk-LXPDURUL.js → chunk-HMOKKMIV.js} +2 -2
  74. package/dist/{chunk-RFR2K7JO.js → chunk-HPHDLN6E.js} +2 -2
  75. package/dist/{chunk-FUP2J2OX.js → chunk-IG3K6AGW.js} +1 -1
  76. package/dist/{chunk-I5EVMLPB.js → chunk-IJ4JX6WP.js} +4 -4
  77. package/dist/{chunk-RT77WNRB.js → chunk-IJJNJJ6I.js} +1 -1
  78. package/dist/chunk-IUQJGFEO.js +11 -0
  79. package/dist/{chunk-64PPKUJG.js → chunk-J4CVYOY3.js} +13 -13
  80. package/dist/{chunk-HTANBHNV.js → chunk-J4KPBR5B.js} +1 -1
  81. package/dist/{chunk-CUZQVBPC.js → chunk-JDLJ7DHV.js} +1 -1
  82. package/dist/{chunk-775K6APE.js → chunk-JFOMAXD2.js} +67 -67
  83. package/dist/chunk-JPE4TYRQ.js +14 -0
  84. package/dist/{chunk-4Q2CZ4US.js → chunk-JPSWWIBW.js} +6 -6
  85. package/dist/{chunk-XOQGBU25.js → chunk-K2FVP22A.js} +1 -1
  86. package/dist/{chunk-7RGHV3J5.js → chunk-KGAYYSFE.js} +6 -6
  87. package/dist/{chunk-KLUCEASW.js → chunk-KQCJWK55.js} +6 -6
  88. package/dist/{chunk-YNVH2EIE.js → chunk-L4ZQY4ZG.js} +3 -3
  89. package/dist/{chunk-PALWXHBQ.js → chunk-LKAGXURQ.js} +20 -20
  90. package/dist/chunk-LQCNIQ3I.js +8 -0
  91. package/dist/{chunk-RZJ63ZM4.js → chunk-MHQW6NAE.js} +11 -11
  92. package/dist/{chunk-VCR3RADH.js → chunk-MVOYVN3S.js} +1 -1
  93. package/dist/{chunk-N2FX4O3H.js → chunk-MZ3JADHG.js} +1 -1
  94. package/dist/chunk-N5KJLHYI.js +9 -0
  95. package/dist/{chunk-YBYJUBWE.js → chunk-NW5NSV7N.js} +2 -2
  96. package/dist/{chunk-SV5RRBVA.js → chunk-NWS5G7FE.js} +1 -1
  97. package/dist/{chunk-UXGNF3OG.js → chunk-OF5X4HKC.js} +1 -1
  98. package/dist/{chunk-YY7OFUT2.js → chunk-OIEFMLYI.js} +3 -3
  99. package/dist/{chunk-FMERX3PG.js → chunk-OLSA36VX.js} +2 -2
  100. package/dist/chunk-OMOAD5LL.js +1 -0
  101. package/dist/chunk-OXWBSZL2.js +23 -0
  102. package/dist/chunk-PBSCF2ML.js +15 -0
  103. package/dist/{chunk-2YK6ZB7C.js → chunk-PPLPDP6D.js} +1 -1
  104. package/dist/{chunk-GTT7LIWK.js → chunk-PY4DTB6Y.js} +1 -1
  105. package/dist/{chunk-QIPO4EVJ.js → chunk-Q4MOT7TY.js} +1 -1
  106. package/dist/chunk-QAAHFU2I.js +1 -0
  107. package/dist/{chunk-OYXA7SWV.js → chunk-QE2JX7D4.js} +1 -1
  108. package/dist/{chunk-7NO4IENQ.js → chunk-R5WBDXI2.js} +1 -1
  109. package/dist/{chunk-WIFK6TLB.js → chunk-RDETBXMP.js} +1 -1
  110. package/dist/{chunk-I6QVXM2M.js → chunk-RDVC32EV.js} +15 -15
  111. package/dist/chunk-RJVIKGHJ.js +4 -0
  112. package/dist/chunk-S25KELFW.js +11 -0
  113. package/dist/chunk-SF4IIV5Z.js +2 -0
  114. package/dist/{chunk-ZDYIVU5R.js → chunk-SHHRC5XK.js} +8 -8
  115. package/dist/{chunk-OBZZLLMQ.js → chunk-SLEA47VA.js} +1 -1
  116. package/dist/{chunk-F6UJLCMI.js → chunk-SUSJFGXN.js} +9 -9
  117. package/dist/{chunk-FTKLODQK.js → chunk-SXHV5OLA.js} +1 -1
  118. package/dist/{chunk-65FZQ572.js → chunk-SZFULV7I.js} +6 -6
  119. package/dist/{chunk-HZ7TUMNL.js → chunk-TB2ARUE2.js} +1 -1
  120. package/dist/{chunk-G67CJAQ2.js → chunk-TD3ZQD5R.js} +1 -1
  121. package/dist/chunk-THAPVKEJ.js +15 -0
  122. package/dist/{chunk-HNIIDDLJ.js → chunk-TNALBYLY.js} +1 -1
  123. package/dist/{chunk-6CDWPEND.js → chunk-TPKNHQIE.js} +8 -8
  124. package/dist/{chunk-EHM3ZVVT.js → chunk-UC5IC3AM.js} +4 -4
  125. package/dist/{chunk-VADWTS7H.js → chunk-UFWBPTCM.js} +5 -5
  126. package/dist/{chunk-EVYD6UFQ.js → chunk-UTISUEO4.js} +2 -2
  127. package/dist/chunk-UTQN5AIO.js +6 -0
  128. package/dist/chunk-UVHXVSB2.js +1 -0
  129. package/dist/{chunk-QMBMK6PP.js → chunk-VKZC3NPM.js} +2 -2
  130. package/dist/{chunk-UZFFSZFI.js → chunk-VQBKRBBR.js} +1 -1
  131. package/dist/{chunk-GLUJS42B.js → chunk-VY3UA6AR.js} +1 -1
  132. package/dist/{chunk-G3MJO3A6.js → chunk-W6NGPSMM.js} +13 -13
  133. package/dist/chunk-WCCS4VFE.js +1 -0
  134. package/dist/{chunk-JWLOERV5.js → chunk-WLBWACKP.js} +2 -2
  135. package/dist/{chunk-WLG7BE55.js → chunk-WRV6QKJN.js} +1 -1
  136. package/dist/{chunk-LHHJHTWP.js → chunk-WZWSFYXJ.js} +1 -1
  137. package/dist/{chunk-S6YEPA4I.js → chunk-X4E4RPFE.js} +5 -5
  138. package/dist/{chunk-M7W63T6H.js → chunk-XAT2MKNU.js} +8 -8
  139. package/dist/{chunk-QOYKBINM.js → chunk-XQVGBVHC.js} +1 -1
  140. package/dist/{chunk-E6FDUFPH.js → chunk-XVMCSUAV.js} +1 -1
  141. package/dist/chunk-XXTAMF3O.js +28 -0
  142. package/dist/{chunk-6HYO2W3O.js → chunk-YCXQDUTW.js} +5 -5
  143. package/dist/{chunk-WU2ZA6J2.js → chunk-YDJ5IZOU.js} +1 -1
  144. package/dist/{chunk-KBQNMQCK.js → chunk-YQ5JHHLE.js} +1 -1
  145. package/dist/{chunk-2GMYO6ET.js → chunk-YT5HMLC7.js} +1 -1
  146. package/dist/chunk-YTDMCUL7.js +14 -0
  147. package/dist/{chunk-G4PPHQ23.js → chunk-YWMCW5BN.js} +1 -1
  148. package/dist/{chunk-WF4A2HSB.js → chunk-ZCN5BU4U.js} +1 -1
  149. package/dist/{chunk-HY6CBG4M.js → chunk-ZDFMYAQB.js} +1 -1
  150. package/dist/chunk-ZDXRSY2Y.js +1 -0
  151. package/dist/chunk-ZISKHQZY.js +3 -0
  152. package/dist/{chunk-DVHRL3G6.js → chunk-ZVDYRXNP.js} +6 -6
  153. package/dist/{chunk-3DWVSQIJ.js → chunk-ZYKY4Z7R.js} +1 -1
  154. package/dist/data/DataTable.js +1 -1
  155. package/dist/data/EntityList.js +1 -1
  156. package/dist/data/Gantt.js +1 -1
  157. package/dist/data/Kanban.js +1 -1
  158. package/dist/data/ListLoadError.js +1 -1
  159. package/dist/data/ResizableTable.js +1 -1
  160. package/dist/data/statusColumn.js +1 -1
  161. package/dist/data/useColumnConfig.js +1 -1
  162. package/dist/data/useSort.js +1 -1
  163. package/dist/forms/AlignmentGrid.js +1 -1
  164. package/dist/forms/BorderInput.js +1 -1
  165. package/dist/forms/BrandAssetEditor.js +1 -1
  166. package/dist/forms/Button.js +1 -1
  167. package/dist/forms/Calendar.js +1 -1
  168. package/dist/forms/ColorPicker.js +1 -1
  169. package/dist/forms/ComposerAttachments.js +1 -1
  170. package/dist/forms/CornersInput.js +1 -1
  171. package/dist/forms/DatePicker.js +1 -1
  172. package/dist/forms/DateRangePicker.js +1 -1
  173. package/dist/forms/DisplayChips.js +1 -1
  174. package/dist/forms/FilePicker.js +1 -1
  175. package/dist/forms/IconButton.js +1 -1
  176. package/dist/forms/IconPicker.js +1 -1
  177. package/dist/forms/Input.js +1 -1
  178. package/dist/forms/InputNumber.js +1 -1
  179. package/dist/forms/LinkPicker.js +1 -1
  180. package/dist/forms/MediaLibrary.js +1 -1
  181. package/dist/forms/MediaUploadField.js +1 -1
  182. package/dist/forms/MediaUploadGrid.js +1 -1
  183. package/dist/forms/MediaUsedInList.js +1 -1
  184. package/dist/forms/NumericKeypad.js +1 -1
  185. package/dist/forms/PictureTiles.js +1 -1
  186. package/dist/forms/PositionInput.js +1 -1
  187. package/dist/forms/RenameField.js +1 -1
  188. package/dist/forms/Segmented.js +1 -1
  189. package/dist/forms/Select.js +1 -1
  190. package/dist/forms/SidesInput.js +1 -1
  191. package/dist/forms/Slider.js +1 -1
  192. package/dist/forms/Snippet.js +1 -1
  193. package/dist/forms/SplitButton.js +1 -1
  194. package/dist/forms/TagInput.js +1 -1
  195. package/dist/forms/TextToolbar.js +1 -1
  196. package/dist/forms/UnitMenu.js +1 -1
  197. package/dist/forms/WidthsBar.js +1 -1
  198. package/dist/forms/dropdownPosition.js +1 -1
  199. package/dist/hooks/index.d.ts +29 -0
  200. package/dist/hooks/index.js +2 -0
  201. package/dist/hooks/useTheme.js +1 -1
  202. package/dist/icons/brands.node.js +1 -1
  203. package/dist/icons/efficient-glyphs.js +1 -1
  204. package/dist/icons/efficient-looks.js +1 -1
  205. package/dist/icons/efficient.js +1 -1
  206. package/dist/icons/index.js +1 -1
  207. package/dist/icons/looks/map.js +1 -1
  208. package/dist/icons/sets.js +1 -1
  209. package/dist/index.d.ts +3 -40
  210. package/dist/index.js +514 -514
  211. package/dist/map/index.js +7 -7
  212. package/dist/markdown/index.js +1 -1
  213. package/dist/page-tabs/index.js +5 -5
  214. package/dist/shell/AppUpdateBanner.js +1 -1
  215. package/dist/shell/Card.js +1 -1
  216. package/dist/shell/ColoredBadge.js +1 -1
  217. package/dist/shell/ConfirmDialog.js +1 -1
  218. package/dist/shell/ContextMenu.js +1 -1
  219. package/dist/shell/Dialog.d.ts +14 -4
  220. package/dist/shell/Dialog.js +1 -1
  221. package/dist/shell/Drawer.js +1 -1
  222. package/dist/shell/DropdownMenu.js +1 -1
  223. package/dist/shell/EditableGrid.js +1 -1
  224. package/dist/shell/FloatingBar.js +1 -1
  225. package/dist/shell/GlobalSearch.js +1 -1
  226. package/dist/shell/HelpCenter.js +1 -1
  227. package/dist/shell/IconRail.js +1 -1
  228. package/dist/shell/ImageLightbox.js +1 -1
  229. package/dist/shell/ItemCount.js +1 -1
  230. package/dist/shell/Kbd.js +1 -1
  231. package/dist/shell/LanguageSelect.js +1 -1
  232. package/dist/shell/Markdown.js +1 -1
  233. package/dist/shell/MilestoneTimeline.js +1 -1
  234. package/dist/shell/Popover.js +1 -1
  235. package/dist/shell/PopupMenu.js +1 -1
  236. package/dist/shell/ProductionTimeline.js +1 -1
  237. package/dist/shell/ResizeHandle.js +1 -1
  238. package/dist/shell/SearchableSelect.js +1 -1
  239. package/dist/shell/SettingReset.js +1 -1
  240. package/dist/shell/SettingRow.js +1 -1
  241. package/dist/shell/ShellPrefs.js +1 -1
  242. package/dist/shell/SidebarLayout.js +1 -1
  243. package/dist/shell/SidebarNav.js +1 -1
  244. package/dist/shell/SortableList.js +1 -1
  245. package/dist/shell/StatusBadge.js +1 -1
  246. package/dist/shell/Tabs.js +1 -1
  247. package/dist/shell/TimelineTrack.js +1 -1
  248. package/dist/shell/Tooltip.js +1 -1
  249. package/dist/shell/TopNav.js +1 -1
  250. package/dist/shell/TransferProgress.js +1 -1
  251. package/dist/shell/Tree.js +1 -1
  252. package/dist/shell/discardGuard.js +1 -1
  253. package/dist/telemetry/index.js +1 -1
  254. package/dist/templates/AuthScreen.js +1 -1
  255. package/dist/templates/ChatTemplate.js +1 -1
  256. package/dist/templates/CheckoutTemplate.js +1 -1
  257. package/dist/templates/DashboardTemplate.js +1 -1
  258. package/dist/templates/DataTablePage.js +1 -1
  259. package/dist/templates/EmailTemplate.js +1 -1
  260. package/dist/templates/ErrorBoundary.js +1 -1
  261. package/dist/templates/FormLayoutPage.js +1 -1
  262. package/dist/templates/GalleryTemplate.js +1 -1
  263. package/dist/ui/index.js +1 -1
  264. package/dist/ui.css +4 -1
  265. package/dist/version.js +1 -1
  266. package/package.json +6 -1
  267. package/dist/Browser-FJSOZLWR.js +0 -44
  268. package/dist/Calculator-ZHINQHFI.js +0 -29
  269. package/dist/CurrencyConverter-AAXS7RPC.js +0 -21
  270. package/dist/Notepad-NENKOSXJ.js +0 -24
  271. package/dist/PomodoroTimer-XKSYNHS7.js +0 -91
  272. package/dist/Sidebar-GYGYAXS2.js +0 -44
  273. package/dist/Stock-TCQSVSSY.js +0 -16
  274. package/dist/chunk-3DSGJIC7.js +0 -7
  275. package/dist/chunk-47UTEV3P.js +0 -23
  276. package/dist/chunk-4S3E3VJH.js +0 -11
  277. package/dist/chunk-64RHGJXK.js +0 -4
  278. package/dist/chunk-6AUQWWUA.js +0 -17
  279. package/dist/chunk-7KWYVQMX.js +0 -2
  280. package/dist/chunk-7QSDPSXP.js +0 -1
  281. package/dist/chunk-A7ZYFJ6V.js +0 -28
  282. package/dist/chunk-ASDYAASN.js +0 -3
  283. package/dist/chunk-D65T4H6J.js +0 -1
  284. package/dist/chunk-DQTYV6AC.js +0 -9
  285. package/dist/chunk-EV5BEEVO.js +0 -1
  286. package/dist/chunk-FHNQC2MA.js +0 -1
  287. package/dist/chunk-FQD6P6EZ.js +0 -4
  288. package/dist/chunk-GOAFMGUI.js +0 -15
  289. package/dist/chunk-IQDHVQAQ.js +0 -14
  290. package/dist/chunk-JGKDWDVM.js +0 -27
  291. package/dist/chunk-KY3KGRGC.js +0 -1
  292. package/dist/chunk-MHCNQKEK.js +0 -4
  293. package/dist/chunk-RDGXSAOD.js +0 -2
  294. package/dist/chunk-RIG5FEVS.js +0 -1
  295. package/dist/chunk-SNHBDP4X.js +0 -15
  296. package/dist/chunk-SOZCWT6I.js +0 -6
  297. package/dist/chunk-WWCAVO3R.js +0 -14
  298. package/dist/chunk-XMFJDT6Y.js +0 -13
  299. package/dist/chunk-XSHDPG45.js +0 -9
  300. package/dist/chunk-YUDBB7VC.js +0 -11
  301. /package/dist/{chunk-JR2HHKVP.js → chunk-FRCTA5FS.js} +0 -0
@@ -1,8 +1,8 @@
1
- import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-EFKJLUYP.js";import{Tooltip as l}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function f(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function h(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:h(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),y=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
2
- return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=h(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),y(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${f(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,y=(e,t)=>`${e}-panel-${t}`;function w(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:h,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:F,className:E="","aria-label":L,"aria-labelledby":N,labelsFit:R=!1,dotLabel:A="Has a setting"}){const $=i([]),S=i(null),W="pill"===x,[D,H]=c(null),j=D??"none",z=i(()=>{});z.current=()=>{const t=S.current;if(!t||!R)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);H(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...w(t,n.length)}))},a(()=>{z.current()}),d(()=>{const e=S.current?.parentElement;if(!R||!e)return;let t=!0;const n=()=>{t&&z.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[R]);const I=(e,t)=>{for(let n=1;n<=h.length;n+=1){const r=((e+t*n)%h.length+h.length)%h.length;if(!h[r]?.disabled)return r}return null},K=e=>{const t=1===e?h.map((e,t)=>t):h.map((e,t)=>h.length-1-t);for(const e of t)if(!h[e]?.disabled)return e;return null};/* @__PURE__ */
3
- return s("div",{ref:S,role:"tablist","data-labels-shown":R?j:void 0,"aria-label":L,"aria-labelledby":N,onKeyDown:e=>{const t=h.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=I(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=I(t,-1);else if("Home"===e.key)n=K(1);else{if("End"!==e.key)return;n=K(-1)}e.preventDefault(),null!==n&&n!==t&&(g(h[n].id),$.current[n]?.focus())},className:W?o(k,E):b(k,E),children:h.map((e,o)=>{const a=e.id===p,i=R&&null!=e.icon,c="all"===j||"chosen"===j&&a,d=e.dot?/* @__PURE__ */s(C,{label:e.label,on:a,said:A}):e.label,b=/* @__PURE__ */s("button",{ref:e=>{$.current[o]=e},type:"button",role:"tab",id:F?v(F,e.id):void 0,"aria-controls":F?y(F,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:W?n({selected:a,disabled:e.disabled,block:k}):f(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
1
+ import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-EFKJLUYP.js";import{Tooltip as l}from"./chunk-F2RAIGCG.js";import{useBrowserLayoutEffect as a}from"./chunk-ZDXRSY2Y.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function f(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function h(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:h(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),y=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
2
+ return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=h(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),y(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${f(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,y=(e,t)=>`${e}-panel-${t}`;function w(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:h,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:F,className:E="","aria-label":R,"aria-labelledby":L,labelsFit:N=!1,dotLabel:A="Has a setting"}){const $=i([]),S=i(null),D="pill"===x,[W,j]=c(null),z=W??"none",H=i(()=>{});H.current=()=>{const t=S.current;if(!t||!N)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);j(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...w(t,n.length)}))},a(()=>{H.current()}),d(()=>{const e=S.current?.parentElement;if(!N||!e)return;let t=!0;const n=()=>{t&&H.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[N]);const I=(e,t)=>{for(let n=1;n<=h.length;n+=1){const r=((e+t*n)%h.length+h.length)%h.length;if(!h[r]?.disabled)return r}return null},K=e=>{const t=1===e?h.map((e,t)=>t):h.map((e,t)=>h.length-1-t);for(const e of t)if(!h[e]?.disabled)return e;return null};/* @__PURE__ */
3
+ return s("div",{ref:S,role:"tablist","data-labels-shown":N?z:void 0,"aria-label":R,"aria-labelledby":L,onKeyDown:e=>{const t=h.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=I(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=I(t,-1);else if("Home"===e.key)n=K(1);else{if("End"!==e.key)return;n=K(-1)}e.preventDefault(),null!==n&&n!==t&&(g(h[n].id),$.current[n]?.focus())},className:D?o(k,E):b(k,E),children:h.map((e,o)=>{const a=e.id===p,i=N&&null!=e.icon,c="all"===z||"chosen"===z&&a,d=e.dot?/* @__PURE__ */s(C,{label:e.label,on:a,said:A}):e.label,b=/* @__PURE__ */s("button",{ref:e=>{$.current[o]=e},type:"button",role:"tab",id:F?v(F,e.id):void 0,"aria-controls":F?y(F,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:D?n({selected:a,disabled:e.disabled,block:k}):f(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
4
4
  /* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
5
- /* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:d})]}):/* @__PURE__ */s(t,{icon:e.icon,label:d})},e.id),h=i?e.tooltip??e.label:e.tooltip;return null!=h&&!1!==h?/* @__PURE__ */s(l,{content:h,className:W||k?r(k):void 0,children:b},e.id):b})})}function C({label:e,on:t,said:n}){/* @__PURE__ */
5
+ /* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:d})]}):/* @__PURE__ */s(t,{icon:e.icon,label:d})},e.id),h=i?e.tooltip??e.label:e.tooltip;return null!=h&&!1!==h?/* @__PURE__ */s(l,{content:h,className:D||k?r(k):void 0,children:b},e.id):b})})}function C({label:e,on:t,said:n}){/* @__PURE__ */
6
6
  return u("span",{className:"inline-flex items-center gap-(--space-4)",children:[e,
7
7
  /* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-dot":t?"on":"off",className:"size-2 shrink-0 rounded-full "+(t?"bg-current":"bg-accent-fill")}),
8
8
  /* @__PURE__ */s("span",{className:"sr-only",children:n})]})}export{x as Tabs,v as tabButtonId,y as tabPanelId};
@@ -1,4 +1,4 @@
1
- import{StatCard as e,Card as a}from"./chunk-4S3E3VJH.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-FMERX3PG.js";import{Avatar as s}from"./chunk-W2TPXKCV.js";import{ColumnChart as l}from"./chunk-YDFDTRZF.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-WU2ZA6J2.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
1
+ import{StatCard as e,Card as a}from"./chunk-S25KELFW.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-OLSA36VX.js";import{Avatar as s}from"./chunk-W2TPXKCV.js";import{ColumnChart as l}from"./chunk-YDFDTRZF.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-YDJ5IZOU.js";import{Button_default as c}from"./chunk-UTISUEO4.js";import{TH_ONE_LINE as n}from"./chunk-TD3ZQD5R.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
2
2
  return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
3
3
  /* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */m("div",{children:[
@@ -0,0 +1,11 @@
1
+ import{ImageFocusPoint as e}from"./chunk-5POQCJL6.js";import{FormField as i}from"./chunk-6KBDNYRW.js";import{Segmented as a}from"./chunk-TNALBYLY.js";import{isVideoUrl as t,mediaPromptLine as r,mediaFileName as o,FilenameBadge as n,BusyOverlay as s,UploadGlyph as l,zoneFocusClass as c,dropzoneClass as d}from"./chunk-YWMCW5BN.js";import{TransferProgress as u}from"./chunk-GUSENWAH.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-VFSAJMNX.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{useShellStrings as b}from"./chunk-IUVGHHR3.js";import{useState as f,useRef as g,useEffect as v,useId as y}from"react";import{jsxs as k,jsx as x,Fragment as N}from"react/jsx-runtime";var j=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:U,hint:$,error:F,required:z,className:P,accept:O="image/*",maxSizeBytes:H,fit:S="cover",height:B,shape:W="rect",placeholder:q,cta:A,acceptHint:I,showFilename:V=!0,allowReplace:Y=!0,allowRemove:D=!0,replaceLabel:G,removeLabel:J,busy:K=!1,busyLabel:M,choosingLabel:_,pickFailedLabel:E,progress:Q,disabled:T=!1,kind:X,onKindChange:Z,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===W,oe=B??(re?96:112),ne=A??te.cta,se=X??(/video/.test(O)&&!/image/.test(O)?"video":"image"),le="string"==typeof J&&J?J:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=K||ce,be=ce&&!K?_??te.choosing:M??te.uploading,fe=F??(ue?E??te.pickFailed:void 0),ge=e=>{if(!R)return;me(!1);const i=R(e);i&&"function"==typeof i.then&&(de(!0),i.then(e=>{he.current&&(de(!1),"string"==typeof e&&e&&L(e))},()=>{he.current&&(de(!1),me(!0))}))},ve=y(),ye=g(null),[ke,xe]=f(null);v(()=>()=>{ye.current&&URL.revokeObjectURL(ye.current)},[]);const Ne=T||pe,je=!!w&&(t(w,O)||w===ke),we=q??r(O,te),Le=G??(je||"video"===se?te.changeVideo:te.changeImage),Re=e=>{R?ge(e):C?C(e):(e=>{ye.current&&URL.revokeObjectURL(ye.current);const i=URL.createObjectURL(e);ye.current=i,xe(e.type.startsWith("video/")?i:null),L(i)})(e)},Ce=m({accept:O,maxSizeBytes:H,acceptHint:I,multiple:!1,disabled:Ne,onAccept:([e])=>Re(e)}),{dragOver:Ue}=Ce,$e=()=>{Ne||(R?ge():Ce.open())},Fe=w?o(w):"",ze=!re&&!je&&!!ie,Pe=T||!Y&&!D?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:[re?"absolute inset-0 flex items-center justify-center gap-1 p-1 text-(--status-on-solid)":"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:[Y&&/* @__PURE__ */k("button",{id:ze?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>$e(),disabled:pe,className:re?`w-8 shrink-0 ${j}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${j}`,children:[
2
+ /* @__PURE__ */x(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
3
+ /* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),D&&/* @__PURE__ */x("button",{type:"button","aria-label":le,onClick:()=>{ye.current&&(URL.revokeObjectURL(ye.current),ye.current=null),xe(null),L("")},disabled:pe,className:`${re?"":"ml-auto "}w-8 shrink-0 ${j}`,children:/* @__PURE__ */x(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Oe=/* @__PURE__ */k("div",{...Ce.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden border transition-colors",re?"shrink-0 rounded-full":"rounded-(--radius-control)",ze?"":"bg-gray-100",Ue?"border-blue-500":"border-line"].join(" "),style:ze?void 0:re?{height:oe,width:oe}:{height:oe},children:[ze?
4
+ /* @__PURE__ */x(e,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:Ne,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):je?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Fe||void 0,className:"h-full w-full",style:{objectFit:S}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Fe,className:"h-full w-full",style:{objectFit:S,objectPosition:ee||void 0}}),V&&!re&&w&&/* @__PURE__ */x(n,{children:Fe}),Pe,pe&&/* @__PURE__ */x(s,{label:be,progress:Q,rounded:re?"rounded-full":"rounded-md"})]}),He=/* @__PURE__ */k(N,{children:[
5
+ /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:we}),
6
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),I&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:I})]}),Se=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>$e(),disabled:Ne,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:$?`${ve}-hint`:void 0,...Ce.zoneProps,"data-media-circle":"",className:["group/zone flex w-full items-center gap-4 rounded-lg text-left",Ne?"cursor-not-allowed opacity-60":"cursor-pointer",c(Ne)].join(" "),children:[
7
+ /* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors",Ue?"border-accent-fill bg-accent-tint":"border-line-strong bg-surface-sunken group-hover/zone:bg-accent-tint"].join(" "),style:{height:oe,width:oe},children:/* @__PURE__ */x(l,{})}),
8
+ /* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:Q}):He})]}),Be=re?Se:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>$e(),disabled:Ne,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:$?`${ve}-hint`:void 0,...Ce.zoneProps,className:d(Ue,Ne,c(Ne)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:Q}):/* @__PURE__ */k(N,{children:[
9
+ /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),He]})});/* @__PURE__ */
10
+ return k(i,{label:U,htmlFor:ve,hint:$,error:fe,required:z,className:P,children:[Z&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>Z(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:Ne},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:Ne}],block:!0,size:"md",label:"string"==typeof U&&U?U:te.upload})}),w?Oe:Be,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
11
+ /* @__PURE__ */x(h,{rejections:Ce.rejections})]})}export{w as MediaUploadField};
@@ -1,16 +1,16 @@
1
- import{useColumnConfig as e}from"./chunk-U6DRRCCG.js";import{useClickOutside as t}from"./chunk-SI26KESU.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{glassStyle as s}from"./chunk-5FYDNH4Y.js";import{useShellStrings as i}from"./chunk-IUVGHHR3.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),C=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:S,allColumns:R,onResizeStart:_,onDragStart:z,onDragOver:I,onDrop:$,onDragEnd:G,toggleColumn:P,resetColumns:A,draggedIdx:L,dropGap:T}=e(f,C),{hasAnyPerm:U}=r(),E=i().columns,[H,J]=c(!1),[O,V]=c(!1),[W,Y]=c(!1),B=m(null),F=k.length>0&&U(k);t(B,h(()=>{H&&J(!1)},[H]));const K=S.reduce((e,t)=>e+t.width,0),Q=S.map(e=>`${e.width}px`),M={tableLayout:"fixed",width:K,minWidth:"100%"},q=m(null),X=h(e=>{const t=q.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),Z=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
1
+ import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-C5OPAULN.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{TH_ONE_LINE as n}from"./chunk-TD3ZQD5R.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{glassStyle as s}from"./chunk-5FYDNH4Y.js";import{useShellStrings as i}from"./chunk-IUVGHHR3.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),S=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:C,allColumns:_,onResizeStart:z,onDragStart:R,onDragOver:I,onDrop:P,onDragEnd:$,toggleColumn:L,resetColumns:T,draggedIdx:A,dropGap:O}=t(f,S),{hasAnyPerm:U}=r(),E=i().columns,[G,H]=c(!1),[V,W]=c(!1),[Y,B]=c(!1),F=m(null),J=k.length>0&&U(k);e(F,h(()=>{G&&H(!1)},[G]));const K=C.reduce((e,t)=>e+t.width,0),Q=C.map(e=>`${e.width}px`),M={tableLayout:"fixed",width:K,minWidth:"100%"},Z=m(null),q=h(e=>{const t=Z.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),X=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
2
2
  return u("div",{className:"flex flex-col flex-1 min-h-0 "+(w?"-mx-4":""),children:[
3
- /* @__PURE__ */p("div",{ref:q,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:M,children:[
4
- /* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:Q[t]}},e.key))}),
5
- /* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:S.map((e,t)=>{const r=g.find(t=>t.key===e.key),o=r?.sortField??("_select"!==e.key?e.key:void 0),l=x&&o&&x.field===o,a="_select"===e.key;/* @__PURE__ */
6
- return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${L===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>z(t),onDragOver:a?void 0:e=>I(t,e),onDrop:a?void 0:e=>$(t,e),onDragEnd:a?void 0:G,style:a?void 0:{cursor:"grab"},children:[
7
- /* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>_(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),T===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===S.length-1&&T===S.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
8
- /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto overflow-x-auto min-h-0",onScroll:X,children:[
3
+ /* @__PURE__ */p("div",{ref:Z,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:M,children:[
4
+ /* @__PURE__ */p("colgroup",{children:C.map((e,t)=>/* @__PURE__ */p("col",{style:{width:Q[t]}},e.key))}),
5
+ /* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:C.map((e,t)=>{const r=g.find(t=>t.key===e.key),o=r?.sortField??("_select"!==e.key?e.key:void 0),l=x&&o&&x.field===o,a="_select"===e.key;/* @__PURE__ */
6
+ return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${A===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>R(t),onDragOver:a?void 0:e=>I(t,e),onDrop:a?void 0:e=>P(t,e),onDragEnd:a?void 0:$,style:a?void 0:{cursor:"grab"},children:[
7
+ /* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),O===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===C.length-1&&O===C.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
8
+ /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto overflow-x-auto min-h-0",onScroll:q,children:[
9
9
  /* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:M,children:[
10
- /* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:Q[t]}},e.key))}),N(S)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
10
+ /* @__PURE__ */p("colgroup",{children:C.map((e,t)=>/* @__PURE__ */p("col",{style:{width:Q[t]}},e.key))}),N(C)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
11
11
  /* @__PURE__ */p("span",{children:b}),
12
- /* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:B,children:[w&&Z&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?E.hideSelection:E.showSelection,children:D?E.selectDone:E.select}),
13
- /* @__PURE__ */p("button",{onClick:A,className:"text-2xs text-ink-faintest hover:text-gray-600",children:E.reset}),
14
- /* @__PURE__ */p("button",{onClick:()=>J(!H),className:"text-gray-400 hover:text-gray-600",title:E.choose,children:/* @__PURE__ */p(l,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),H&&/* @__PURE__ */u("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:s(),children:[
15
- /* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:E.heading}),R.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */u("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
16
- /* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>P(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),F&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{V(!0);const e=R.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),Y(!0),setTimeout(()=>Y(!1),2e3)}catch{}V(!1)},disabled:O,className:"text-2xs w-full text-center py-1 rounded "+(W?"text-green-600":"text-ink-faint hover:text-blue-600"),children:O?"...":W?E.savedDefault:E.saveDefault})})]})]})]})]})}export{f as ResizableTable};
12
+ /* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:F,children:[w&&X&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?E.hideSelection:E.showSelection,children:D?E.selectDone:E.select}),
13
+ /* @__PURE__ */p("button",{onClick:T,className:"text-2xs text-ink-faintest hover:text-gray-600",children:E.reset}),
14
+ /* @__PURE__ */p("button",{onClick:()=>H(!G),className:"text-gray-400 hover:text-gray-600",title:E.choose,children:/* @__PURE__ */p(l,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),G&&/* @__PURE__ */u("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:s(),children:[
15
+ /* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:E.heading}),_.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */u("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
16
+ /* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>L(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),J&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{W(!0);const e=_.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),B(!0),setTimeout(()=>B(!1),2e3)}catch{}W(!1)},disabled:V,className:"text-2xs w-full text-center py-1 rounded "+(Y?"text-green-600":"text-ink-faint hover:text-blue-600"),children:V?"...":Y?E.savedDefault:E.saveDefault})})]})]})]})]})}export{f as ResizableTable};
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-IQDHVQAQ.js";import{Avatar as t}from"./chunk-W2TPXKCV.js";import{ItemCount as r}from"./chunk-FTKLODQK.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-YTDMCUL7.js";import{Avatar as t}from"./chunk-W2TPXKCV.js";import{ItemCount as r}from"./chunk-SXHV5OLA.js";import{Button_default as a}from"./chunk-UTISUEO4.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
2
2
  return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
3
3
  /* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
4
4
  /* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
@@ -1 +1 @@
1
- import{loadIconSet as t,iconSetFor as e}from"./chunk-VQCKMT5F.js";import{hexToRgb as n}from"./chunk-S6OB6HJB.js";import{useShellPrefs as o}from"./chunk-KC3EX26K.js";import{setIconSet as c}from"./chunk-J75ZT2JQ.js";import{useSyncExternalStore as r,useEffect as s}from"react";function u(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}function m(t){const e=u();return e?(e.addEventListener("change",t),()=>e.removeEventListener("change",t)):()=>{}}function a(){return u()?.matches??!1}function l(){return!1}function i(t){const e=parseInt(t.slice(1,3),16)/255,n=parseInt(t.slice(3,5),16)/255,o=parseInt(t.slice(5,7),16)/255,c=Math.max(e,n,o),r=Math.min(e,n,o);let s=0,u=0;const m=(c+r)/2;if(c!==r){const t=c-r;u=m>.5?t/(2-c-r):t/(c+r),s=c===e?((n-o)/t+(n<o?6:0))/6:c===n?((o-e)/t+2)/6:((e-n)/t+4)/6}return[360*s,100*u,100*m]}function d(t,e,n){n/=100;const o=(e/=100)*Math.min(n,1-n),c=e=>{const c=(e+t/30)%12;return n-o*Math.max(Math.min(c-3,9-c,1),-1)},r=t=>Math.round(255*t).toString(16).padStart(2,"0");return`#${r(c(0))}${r(c(8))}${r(c(4))}`}function h(t){const e=t||"system";return"system"===e?a()?"dark":"light":e}function f(t){const e=document.documentElement;if(t&&/^#[0-9a-fA-F]{6}$/.test(t)){const[n,o,c]=i(t);e.setAttribute("data-custom-accent","true"),e.style.setProperty("--accent-600",t),e.style.setProperty("--accent-700",d(n,o,Math.max(c-10,5))),e.style.setProperty("--accent-500",d(n,o,Math.min(c+10,95))),e.style.setProperty("--accent-400",d(n,o,Math.min(c+20,95))),e.style.setProperty("--accent-300",d(n,Math.min(o+10,100),Math.min(c+30,92))),e.style.setProperty("--accent-200",d(n,Math.min(o+15,100),Math.min(c+38,94))),e.style.setProperty("--accent-100",d(n,Math.min(o+20,100),Math.min(c+42,96))),e.style.setProperty("--accent-50",d(n,Math.min(o+20,100),Math.min(c+46,98)))}else e.removeAttribute("data-custom-accent"),["--accent-600","--accent-700","--accent-500","--accent-400","--accent-300","--accent-200","--accent-100","--accent-50"].forEach(t=>e.style.removeProperty(t))}function y(t,e,o,c,r){const s=document.documentElement;if(t){const t=(t,e)=>{const o=n(e);o?s.style.setProperty(t,`${o.r} ${o.g} ${o.b}`):s.style.removeProperty(t)};if(e&&s.style.setProperty("--custom-bg-color",e),o&&(t("--window-header-rgb",o),t("--window-footer-rgb",o)),c&&t("--window-content-rgb",c),r){s.style.setProperty("--custom-button-color",r);const[t,e,n]=i(r);s.style.setProperty("--custom-button-hover",d(t,e,Math.max(n-10,5)))}}else["--custom-bg-color","--custom-button-color","--custom-button-hover"].forEach(t=>s.style.removeProperty(t))}var p=["square","soft","round"];function _(t){return"square"===t||"round"===t?t:"soft"}var b={pink:"round",grey:"square"};function M(t,e,n){return n?"square"===e||"round"===e?e:"soft":b[t]??"soft"}function g(t){const e=_(t);"soft"===e?document.documentElement.removeAttribute("data-corners"):document.documentElement.setAttribute("data-corners",e)}function v(e){const n="string"==typeof e&&e?e:null;c(n),n&&t(n),n?document.documentElement.setAttribute("data-icon-set",n):document.documentElement.removeAttribute("data-icon-set")}function w(t){const n=!!t.accent_color;"corners"in t&&g(M(h(t.theme),t.corners,n)),"icon_set"in t&&v(e(h(t.theme),t.icon_set,n)),document.documentElement.setAttribute("data-theme",h(t.theme)),f(t.accent_color??null),y(t.accent_color??null,t.custom_bg_color??null,t.custom_title_color??null,t.custom_window_color??null,t.custom_button_color??null)}function E(){const{prefs:t}=o(),n=r(m,a,l),c=t.theme||"system",u=t.accent_color||null,i=t.custom_bg_color||null,d=t.custom_title_color||null,h=t.custom_window_color||null,p=t.custom_button_color||null,_=t.corners,b="string"==typeof t.icon_set&&t.icon_set?t.icon_set:null,w="system"===c?n?"dark":"light":c,E=M(w,_,!!u);s(()=>(document.documentElement.setAttribute("data-theme",w),()=>document.documentElement.removeAttribute("data-theme")),[w]),s(()=>(g(E),()=>document.documentElement.removeAttribute("data-corners")),[E]);const P=e(w,b,!!u);return s(()=>(v(P),()=>v(null)),[P]),s(()=>{f(u)},[u]),s(()=>{y(u,i,d,h,p)},[u,i,d,h,p]),{theme:c,resolved:w,corners:E,iconSet:b}}export{p as CORNERS,b as CORNERS_FOR_THEME,g as applyCorners,v as applyIconSet,w as applyThemePrefs,M as cornersFor,_ as resolveCorners,h as resolveTheme,E as useTheme};
1
+ import{loadIconSet as t,iconSetFor as e}from"./chunk-VQCKMT5F.js";import{hexToRgb as n}from"./chunk-S6OB6HJB.js";import{useShellPrefs as o}from"./chunk-DPFEQQQU.js";import{setIconSet as c}from"./chunk-J75ZT2JQ.js";import{useSyncExternalStore as r,useEffect as s}from"react";function u(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}function m(t){const e=u();return e?(e.addEventListener("change",t),()=>e.removeEventListener("change",t)):()=>{}}function a(){return u()?.matches??!1}function l(){return!1}function i(t){const e=parseInt(t.slice(1,3),16)/255,n=parseInt(t.slice(3,5),16)/255,o=parseInt(t.slice(5,7),16)/255,c=Math.max(e,n,o),r=Math.min(e,n,o);let s=0,u=0;const m=(c+r)/2;if(c!==r){const t=c-r;u=m>.5?t/(2-c-r):t/(c+r),s=c===e?((n-o)/t+(n<o?6:0))/6:c===n?((o-e)/t+2)/6:((e-n)/t+4)/6}return[360*s,100*u,100*m]}function d(t,e,n){n/=100;const o=(e/=100)*Math.min(n,1-n),c=e=>{const c=(e+t/30)%12;return n-o*Math.max(Math.min(c-3,9-c,1),-1)},r=t=>Math.round(255*t).toString(16).padStart(2,"0");return`#${r(c(0))}${r(c(8))}${r(c(4))}`}function h(t){const e=t||"system";return"system"===e?a()?"dark":"light":e}function f(t){const e=document.documentElement;if(t&&/^#[0-9a-fA-F]{6}$/.test(t)){const[n,o,c]=i(t);e.setAttribute("data-custom-accent","true"),e.style.setProperty("--accent-600",t),e.style.setProperty("--accent-700",d(n,o,Math.max(c-10,5))),e.style.setProperty("--accent-500",d(n,o,Math.min(c+10,95))),e.style.setProperty("--accent-400",d(n,o,Math.min(c+20,95))),e.style.setProperty("--accent-300",d(n,Math.min(o+10,100),Math.min(c+30,92))),e.style.setProperty("--accent-200",d(n,Math.min(o+15,100),Math.min(c+38,94))),e.style.setProperty("--accent-100",d(n,Math.min(o+20,100),Math.min(c+42,96))),e.style.setProperty("--accent-50",d(n,Math.min(o+20,100),Math.min(c+46,98)))}else e.removeAttribute("data-custom-accent"),["--accent-600","--accent-700","--accent-500","--accent-400","--accent-300","--accent-200","--accent-100","--accent-50"].forEach(t=>e.style.removeProperty(t))}function y(t,e,o,c,r){const s=document.documentElement;if(t){const t=(t,e)=>{const o=n(e);o?s.style.setProperty(t,`${o.r} ${o.g} ${o.b}`):s.style.removeProperty(t)};if(e&&s.style.setProperty("--custom-bg-color",e),o&&(t("--window-header-rgb",o),t("--window-footer-rgb",o)),c&&t("--window-content-rgb",c),r){s.style.setProperty("--custom-button-color",r);const[t,e,n]=i(r);s.style.setProperty("--custom-button-hover",d(t,e,Math.max(n-10,5)))}}else["--custom-bg-color","--custom-button-color","--custom-button-hover"].forEach(t=>s.style.removeProperty(t))}var p=["square","soft","round"];function _(t){return"square"===t||"round"===t?t:"soft"}var b={pink:"round",grey:"square"};function M(t,e,n){return n?"square"===e||"round"===e?e:"soft":b[t]??"soft"}function g(t){const e=_(t);"soft"===e?document.documentElement.removeAttribute("data-corners"):document.documentElement.setAttribute("data-corners",e)}function v(e){const n="string"==typeof e&&e?e:null;c(n),n&&t(n),n?document.documentElement.setAttribute("data-icon-set",n):document.documentElement.removeAttribute("data-icon-set")}function w(t){const n=!!t.accent_color;"corners"in t&&g(M(h(t.theme),t.corners,n)),"icon_set"in t&&v(e(h(t.theme),t.icon_set,n)),document.documentElement.setAttribute("data-theme",h(t.theme)),f(t.accent_color??null),y(t.accent_color??null,t.custom_bg_color??null,t.custom_title_color??null,t.custom_window_color??null,t.custom_button_color??null)}function P(){const{prefs:t}=o(),n=r(m,a,l),c=t.theme||"system",u=t.accent_color||null,i=t.custom_bg_color||null,d=t.custom_title_color||null,h=t.custom_window_color||null,p=t.custom_button_color||null,_=t.corners,b="string"==typeof t.icon_set&&t.icon_set?t.icon_set:null,w="system"===c?n?"dark":"light":c,P=M(w,_,!!u);s(()=>(document.documentElement.setAttribute("data-theme",w),()=>document.documentElement.removeAttribute("data-theme")),[w]),s(()=>(g(P),()=>document.documentElement.removeAttribute("data-corners")),[P]);const E=e(w,b,!!u);return s(()=>(v(E),()=>v(null)),[E]),s(()=>{f(u)},[u]),s(()=>{y(u,i,d,h,p)},[u,i,d,h,p]),{theme:c,resolved:w,corners:P,iconSet:b}}export{p as CORNERS,b as CORNERS_FOR_THEME,g as applyCorners,v as applyIconSet,w as applyThemePrefs,M as cornersFor,_ as resolveCorners,h as resolveTheme,P as useTheme};