efficient-shell 11.5.0 → 11.10.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 (353) hide show
  1. package/README.md +15 -0
  2. package/dist/{Browser-URFWAJYZ.js → Browser-FIRNNCSC.js} +17 -17
  3. package/dist/Calculator-ELI5Z3XW.js +29 -0
  4. package/dist/{CurrencyConverter-CUIFL32O.js → CurrencyConverter-LU7QXMOI.js} +11 -11
  5. package/dist/{Documents-Y62EQJWN.js → Documents-CE7YKNJM.js} +24 -24
  6. package/dist/Files-ARRIIZZ6.js +88 -0
  7. package/dist/{Notepad-LYK7OAGU.js → Notepad-HNED2SWM.js} +10 -10
  8. package/dist/PdfViewer-ZRDIG2L2.js +1 -0
  9. package/dist/{PomodoroTimer-IMNUQQAC.js → PomodoroTimer-ZJ432VPC.js} +43 -43
  10. package/dist/{Preview-ZKPVPYYL.js → Preview-OGSYTTKC.js} +32 -32
  11. package/dist/Sidebar-ETWHTFNP.js +44 -0
  12. package/dist/Spreadsheet-4HZR2TUV.js +75 -0
  13. package/dist/{Stock-S6URCQBQ.js → Stock-4BOTUHWE.js} +3 -3
  14. package/dist/{Weather-SM5ZQUE2.js → Weather-NDUOK3P3.js} +18 -18
  15. package/dist/{WorldClock-I26FGYJO.js → WorldClock-FH6NFTOM.js} +4 -4
  16. package/dist/ai/index.js +62 -62
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/borderLineStyles-C-W0uSzL.d.ts +12 -0
  21. package/dist/brand.css +1 -1
  22. package/dist/charts/BoxPlotChart.js +1 -1
  23. package/dist/charts/CandlestickChart.js +1 -1
  24. package/dist/charts/CartesianPlot.js +1 -1
  25. package/dist/charts/ChartBrush.js +1 -1
  26. package/dist/charts/ChartFrame.js +1 -1
  27. package/dist/charts/ChartSkeleton.js +1 -1
  28. package/dist/charts/ChordChart.js +1 -1
  29. package/dist/charts/ColumnChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/SpecChart.js +1 -1
  42. package/dist/charts/StatTile.js +1 -1
  43. package/dist/charts/SunburstChart.js +1 -1
  44. package/dist/charts/TimeSeriesChart.js +1 -1
  45. package/dist/charts/TreemapChart.js +1 -1
  46. package/dist/charts/WaterfallChart.js +1 -1
  47. package/dist/{chunk-QOI4GQVH.js → chunk-276JUQXK.js} +1 -1
  48. package/dist/{chunk-G66SG6JN.js → chunk-2CPYXRR2.js} +8 -8
  49. package/dist/{chunk-SXNQHIBY.js → chunk-2JTG3U5L.js} +1 -1
  50. package/dist/{chunk-HNUKXGYP.js → chunk-2UTCGWMZ.js} +4 -4
  51. package/dist/chunk-2V3LKX7G.js +6 -0
  52. package/dist/{chunk-LCSMBVMU.js → chunk-37JAU3U7.js} +1 -1
  53. package/dist/{chunk-MCAPJSB6.js → chunk-4L4GQW7P.js} +1 -1
  54. package/dist/chunk-4LQRLYB4.js +22 -0
  55. package/dist/{chunk-4EZIWLJJ.js → chunk-4UKPDURO.js} +1 -1
  56. package/dist/{chunk-SDDV3UCN.js → chunk-4VF66WBB.js} +12 -12
  57. package/dist/chunk-5CPRZ27M.js +28 -0
  58. package/dist/{chunk-XBHXGBJR.js → chunk-5DZN6ZDE.js} +9 -9
  59. package/dist/{chunk-AIJ6OR6X.js → chunk-5MGNT7XM.js} +2 -2
  60. package/dist/chunk-5XVXYBIQ.js +8 -0
  61. package/dist/{chunk-EOWUUOVE.js → chunk-7N4P6LGD.js} +1 -1
  62. package/dist/{chunk-YQOVUH5W.js → chunk-7QRKZOXR.js} +8 -8
  63. package/dist/{chunk-7TZV6G2F.js → chunk-A2SP4IZV.js} +1 -1
  64. package/dist/chunk-A4FCXZSY.js +8 -0
  65. package/dist/{chunk-JFV5CQN4.js → chunk-A65PRSKV.js} +4 -4
  66. package/dist/chunk-ABKCC7VB.js +9 -0
  67. package/dist/chunk-ABKFALDE.js +8 -0
  68. package/dist/{chunk-F56UUBKG.js → chunk-AFROFSDW.js} +1 -1
  69. package/dist/chunk-AJ6HMM4P.js +20 -0
  70. package/dist/{chunk-A6FR2D46.js → chunk-ALMBY7QO.js} +5 -5
  71. package/dist/{chunk-ILY4DU3D.js → chunk-B4D23ZLJ.js} +1 -1
  72. package/dist/{chunk-UNQ54QOF.js → chunk-BAT5B2LE.js} +1 -1
  73. package/dist/{chunk-36PJGT4W.js → chunk-BXTSBORU.js} +1 -1
  74. package/dist/{chunk-WDQEUNGE.js → chunk-CFFT5OCV.js} +1 -1
  75. package/dist/{chunk-2N64TKI5.js → chunk-D2BXHFYK.js} +1 -1
  76. package/dist/chunk-DGA4SO27.js +3 -0
  77. package/dist/{chunk-4DDL6NXB.js → chunk-DH2DKQKS.js} +1 -1
  78. package/dist/{chunk-VAK5FQXH.js → chunk-DWR6RVX5.js} +4 -4
  79. package/dist/{chunk-HAYGUFNM.js → chunk-DXFG4H4V.js} +1 -1
  80. package/dist/{chunk-4TYIYL56.js → chunk-E2LRAOCL.js} +10 -10
  81. package/dist/{chunk-MS5APD3V.js → chunk-ED6HJBCO.js} +1 -1
  82. package/dist/{chunk-C764JODK.js → chunk-EMUZJMR3.js} +1 -1
  83. package/dist/{chunk-XCAUDTCC.js → chunk-EOYGTVNS.js} +2 -2
  84. package/dist/{chunk-7JVGF555.js → chunk-EP5BHBZQ.js} +1 -1
  85. package/dist/chunk-FBACFP4U.js +4 -0
  86. package/dist/{chunk-JFBL4PR3.js → chunk-FNMF42DQ.js} +2 -2
  87. package/dist/{chunk-ORIXCEKO.js → chunk-FOHOSUK3.js} +1 -1
  88. package/dist/{chunk-ECJKIPWU.js → chunk-FRNSCVPN.js} +1 -1
  89. package/dist/{chunk-4BCFBF3C.js → chunk-FSRHVB4A.js} +7 -7
  90. package/dist/{chunk-YQFGRYEF.js → chunk-FTGA5IPI.js} +14 -14
  91. package/dist/chunk-G2BZ7NCM.js +19 -0
  92. package/dist/{chunk-AWGJIDBR.js → chunk-GNWK77U7.js} +1 -1
  93. package/dist/{chunk-OPN4I565.js → chunk-GPCTDEXQ.js} +1 -1
  94. package/dist/{chunk-QRU55BUS.js → chunk-GV5VNWPG.js} +2 -2
  95. package/dist/{chunk-JSG2AKCG.js → chunk-H5YD72OP.js} +1 -1
  96. package/dist/{chunk-RDYFZHT3.js → chunk-HBS4HYQM.js} +1 -1
  97. package/dist/{chunk-DVYIBJ3S.js → chunk-HRXQCHKI.js} +2 -2
  98. package/dist/chunk-HTTICQBP.js +27 -0
  99. package/dist/{chunk-LJN77RG6.js → chunk-HWFBNYNI.js} +1 -1
  100. package/dist/chunk-HYNUJY6W.js +13 -0
  101. package/dist/{chunk-T6BGS26U.js → chunk-HYXDKY2L.js} +1 -1
  102. package/dist/{chunk-E3EJWNNK.js → chunk-IAUEISDQ.js} +7 -7
  103. package/dist/{chunk-OBJGUJIE.js → chunk-IDRAW6MT.js} +2 -2
  104. package/dist/chunk-IEHTZR5M.js +7 -0
  105. package/dist/chunk-IH2KC3NQ.js +5 -0
  106. package/dist/{chunk-BUO7XCYR.js → chunk-IKKQ4P4R.js} +12 -12
  107. package/dist/{chunk-MDYJVXWD.js → chunk-IW2QNPDG.js} +2 -2
  108. package/dist/{chunk-SX3SG522.js → chunk-IXSSBGRD.js} +9 -9
  109. package/dist/{chunk-54NMFQMW.js → chunk-JADBOQ7S.js} +5 -5
  110. package/dist/{chunk-ZGOHRLXG.js → chunk-JGVKGEIV.js} +1 -1
  111. package/dist/{chunk-XYECIBVX.js → chunk-JJHPPTM6.js} +1 -1
  112. package/dist/{chunk-TMMNCXQT.js → chunk-KMSK6QQB.js} +1 -1
  113. package/dist/{chunk-OEPYQUXZ.js → chunk-KPFYXVCO.js} +9 -9
  114. package/dist/{chunk-4RGMRXYH.js → chunk-KZ6JVHFI.js} +1 -1
  115. package/dist/{chunk-4ULRP4Y4.js → chunk-L3RLB37Y.js} +1 -1
  116. package/dist/{chunk-H5NIW2KS.js → chunk-L433UT5E.js} +1 -1
  117. package/dist/{chunk-V6Y4OC6K.js → chunk-LCHU3ZG4.js} +8 -8
  118. package/dist/{chunk-VHF3CJVO.js → chunk-LLNWE7DR.js} +30 -30
  119. package/dist/{chunk-D5HGRACW.js → chunk-LNGLJA6K.js} +1 -1
  120. package/dist/{chunk-QVZKRROQ.js → chunk-LPTN55KO.js} +1 -1
  121. package/dist/chunk-LVHQJ5TW.js +9 -0
  122. package/dist/{chunk-AFYLVV74.js → chunk-LZJCULO7.js} +1 -1
  123. package/dist/{chunk-E6GDAV5R.js → chunk-MFDOGLFO.js} +3 -3
  124. package/dist/{chunk-P7H2DXJB.js → chunk-MG4IUKVP.js} +10 -10
  125. package/dist/{chunk-AFG34RBV.js → chunk-MOL2ND6G.js} +6 -6
  126. package/dist/{chunk-U44DVPGB.js → chunk-MQHUVZWM.js} +1 -1
  127. package/dist/{chunk-7ELJQL7J.js → chunk-MWKLLAJT.js} +1 -1
  128. package/dist/chunk-N3OJ47VK.js +1 -0
  129. package/dist/chunk-N7645DNN.js +6 -0
  130. package/dist/{chunk-TFSLPAGB.js → chunk-NFNDXE5O.js} +3 -3
  131. package/dist/{chunk-5XFBZ7C3.js → chunk-NGUXPP5Q.js} +54 -54
  132. package/dist/chunk-NOMWJTN2.js +1 -0
  133. package/dist/{chunk-QYL26AB4.js → chunk-NSYCJTHE.js} +1 -1
  134. package/dist/{chunk-4EBJO7ER.js → chunk-NTKNM25F.js} +9 -9
  135. package/dist/{chunk-IMDGMUE3.js → chunk-O4OFURPC.js} +1 -1
  136. package/dist/{chunk-5H4SWQGM.js → chunk-OE77XFOV.js} +1 -1
  137. package/dist/{chunk-WLYYC3AP.js → chunk-ONIL7WXO.js} +1 -1
  138. package/dist/{chunk-2E2SUEEE.js → chunk-OQG3XO4Y.js} +1 -1
  139. package/dist/{chunk-TDAI4J27.js → chunk-OS2KE6QG.js} +4 -4
  140. package/dist/{chunk-NZ34BQKH.js → chunk-OUXSI6X4.js} +1 -1
  141. package/dist/{chunk-CLTRQ7AQ.js → chunk-OYTRB237.js} +1 -1
  142. package/dist/{chunk-KXU4ORKE.js → chunk-OZEPYQ7E.js} +1 -1
  143. package/dist/{chunk-DZOJQURG.js → chunk-P7NO3NGC.js} +10 -10
  144. package/dist/{chunk-BMXTPJ7T.js → chunk-PAC4LK2N.js} +5 -5
  145. package/dist/{chunk-UEISJFZH.js → chunk-PBMAMVSE.js} +5 -5
  146. package/dist/{chunk-O3MBPAWZ.js → chunk-PC44XTGN.js} +1 -1
  147. package/dist/{chunk-7LU3H72S.js → chunk-PEVWAJUR.js} +6 -6
  148. package/dist/{chunk-RNBS6QGP.js → chunk-PMKR2BF2.js} +21 -21
  149. package/dist/{chunk-JH4ZCPHW.js → chunk-PR42NIDL.js} +10 -10
  150. package/dist/{chunk-6IOFNPR6.js → chunk-PTWKG635.js} +3 -3
  151. package/dist/{chunk-DIEH76MB.js → chunk-QIEAZN6Z.js} +1 -1
  152. package/dist/{chunk-DQQKG46I.js → chunk-QIVIQUKB.js} +7 -7
  153. package/dist/{chunk-PLC656AN.js → chunk-QL5E3MU3.js} +1 -1
  154. package/dist/chunk-QRZBLNOQ.js +4 -0
  155. package/dist/{chunk-6KGIHI6X.js → chunk-QVAOSKFO.js} +10 -10
  156. package/dist/{chunk-2UO47XB4.js → chunk-R64OZ6TC.js} +26 -12
  157. package/dist/{chunk-JTMEFXRL.js → chunk-RDTKMSEK.js} +1 -1
  158. package/dist/{chunk-IPO4LHSB.js → chunk-RKL47W7I.js} +6 -6
  159. package/dist/{chunk-QALPUJR2.js → chunk-RPTOAKLB.js} +1 -1
  160. package/dist/{chunk-3BFZVVAT.js → chunk-RQ6TC6RM.js} +1 -1
  161. package/dist/{chunk-4P3324KU.js → chunk-RSJLN3EG.js} +1 -1
  162. package/dist/{chunk-SAP4YI2Y.js → chunk-SDAX6BXF.js} +1 -1
  163. package/dist/{chunk-OA54HARK.js → chunk-SIA3W7VE.js} +6 -6
  164. package/dist/{chunk-DWAA4YZV.js → chunk-SJQKEIS7.js} +3 -3
  165. package/dist/{chunk-OH5L6HYW.js → chunk-SXBOODCJ.js} +4 -4
  166. package/dist/{chunk-3IUPYCW3.js → chunk-SZTIP6T7.js} +1 -1
  167. package/dist/{chunk-KYBXJL6A.js → chunk-T2ZFXPQV.js} +21 -21
  168. package/dist/{chunk-VX6TKEEK.js → chunk-TKE3EF2U.js} +1 -1
  169. package/dist/{chunk-XQZL6JDD.js → chunk-TURECNEK.js} +4 -4
  170. package/dist/{chunk-AWKJZSTO.js → chunk-U6IJL4Q5.js} +1 -1
  171. package/dist/{chunk-7FW2BQTV.js → chunk-U7T2ONAY.js} +1 -1
  172. package/dist/chunk-UGOSZLCD.js +14 -0
  173. package/dist/{chunk-HNVSVTNC.js → chunk-UIN2LUCZ.js} +14 -14
  174. package/dist/{chunk-55AEZX6K.js → chunk-UZ7TKJRO.js} +1 -1
  175. package/dist/{chunk-BBXFIBXB.js → chunk-V6LPIDZ6.js} +1 -1
  176. package/dist/chunk-VNTJ7QO5.js +1 -0
  177. package/dist/{chunk-SL77N7VT.js → chunk-VTXCCFJ4.js} +3 -3
  178. package/dist/{chunk-PSR6SXCC.js → chunk-WB6E6CSH.js} +13 -13
  179. package/dist/{chunk-CRILBBSU.js → chunk-WDZUPDNC.js} +1 -1
  180. package/dist/{chunk-6M5O2P64.js → chunk-WMS2DCRV.js} +9 -9
  181. package/dist/chunk-WQGBYFS3.js +8 -0
  182. package/dist/{chunk-PCTOL2FX.js → chunk-WTTXLWMK.js} +8 -8
  183. package/dist/{chunk-WPCNJ4UL.js → chunk-WYSNMIZN.js} +1 -1
  184. package/dist/{chunk-Z44JWU75.js → chunk-WZMZ3N5B.js} +2 -2
  185. package/dist/chunk-Y2LWUBXX.js +2 -0
  186. package/dist/{chunk-OKHKY3ZZ.js → chunk-YGCVMPIU.js} +1 -1
  187. package/dist/{chunk-NRALUW6P.js → chunk-YIFRSPUM.js} +10 -10
  188. package/dist/{chunk-EN5NXWT6.js → chunk-YKEB576T.js} +1 -1
  189. package/dist/{chunk-COF33H6J.js → chunk-YM4XIO4K.js} +5 -5
  190. package/dist/chunk-YMBNVMFU.js +11 -0
  191. package/dist/{chunk-2PGR2276.js → chunk-YY5TUQS4.js} +3 -3
  192. package/dist/{chunk-LXL2UCUR.js → chunk-Z32K3LIJ.js} +1 -1
  193. package/dist/{chunk-P3RXXWXN.js → chunk-ZDDYTXPK.js} +6 -6
  194. package/dist/{chunk-V2J2AHDW.js → chunk-ZGQ6H2PU.js} +4 -4
  195. package/dist/{chunk-NU5HN3FZ.js → chunk-ZM2NOLT6.js} +12 -12
  196. package/dist/chunk-ZQJTLJUF.js +2 -0
  197. package/dist/chunk-ZVEDA462.js +3 -0
  198. package/dist/{chunk-TGGUYAWA.js → chunk-ZWLOVJWN.js} +1 -1
  199. package/dist/data/DataTable.js +1 -1
  200. package/dist/data/EntityList.js +1 -1
  201. package/dist/data/Kanban.js +1 -1
  202. package/dist/data/ListFooter.js +1 -1
  203. package/dist/data/ListLoadError.js +1 -1
  204. package/dist/data/Pagination.js +1 -1
  205. package/dist/data/ResizableTable.js +1 -1
  206. package/dist/file-intake/index.js +1 -1
  207. package/dist/format/index.d.ts +1 -0
  208. package/dist/format/index.js +1 -1
  209. package/dist/forms/BorderInput.d.ts +3 -3
  210. package/dist/forms/BorderInput.js +1 -1
  211. package/dist/forms/BrandAssetEditor.js +1 -1
  212. package/dist/forms/Calendar.js +1 -1
  213. package/dist/forms/ColorPicker.js +1 -1
  214. package/dist/forms/ComposerAttachments.js +1 -1
  215. package/dist/forms/CornersInput.js +1 -1
  216. package/dist/forms/DatePicker.js +1 -1
  217. package/dist/forms/DateRangePicker.js +1 -1
  218. package/dist/forms/DateTimePicker.js +1 -1
  219. package/dist/forms/DisplayChips.js +1 -1
  220. package/dist/forms/FilePicker.js +1 -1
  221. package/dist/forms/FormErrorSummary.js +1 -1
  222. package/dist/forms/IconPicker.d.ts +12 -1
  223. package/dist/forms/IconPicker.js +1 -1
  224. package/dist/forms/ImageFocusPoint.js +1 -1
  225. package/dist/forms/Input.js +1 -1
  226. package/dist/forms/InputNumber.js +1 -1
  227. package/dist/forms/LinkPicker.d.ts +22 -0
  228. package/dist/forms/LinkPicker.js +1 -1
  229. package/dist/forms/MediaLibrary.js +1 -1
  230. package/dist/forms/MediaUploadField.js +1 -1
  231. package/dist/forms/MediaUploadGrid.js +1 -1
  232. package/dist/forms/MediaUsedInList.js +1 -1
  233. package/dist/forms/NumericKeypad.js +1 -1
  234. package/dist/forms/PositionInput.js +1 -1
  235. package/dist/forms/RenameField.js +1 -1
  236. package/dist/forms/Select.js +1 -1
  237. package/dist/forms/SidesInput.js +1 -1
  238. package/dist/forms/Slider.js +1 -1
  239. package/dist/forms/Snippet.js +1 -1
  240. package/dist/forms/SplitButton.js +1 -1
  241. package/dist/forms/TagInput.js +1 -1
  242. package/dist/forms/TextToolbar.js +1 -1
  243. package/dist/forms/TimePicker.js +1 -1
  244. package/dist/forms/WidthsBar.js +1 -1
  245. package/dist/forms/mediaLibraryMenu.js +1 -1
  246. package/dist/forms/mediaMoveItems.js +1 -1
  247. package/dist/forms/textAlign.js +1 -1
  248. package/dist/forms/useFileIntake.js +1 -1
  249. package/dist/icons/index.js +1 -1
  250. package/dist/index.d.ts +2 -1
  251. package/dist/index.js +509 -509
  252. package/dist/locales/zh-Hans.js +1 -1
  253. package/dist/map/index.js +3 -3
  254. package/dist/markdown/index.js +1 -1
  255. package/dist/page-tabs/index.js +5 -5
  256. package/dist/pdf/index.js +1 -1
  257. package/dist/shell/Accordion.js +1 -1
  258. package/dist/shell/AppUpdateBanner.js +1 -1
  259. package/dist/shell/Avatar.js +1 -1
  260. package/dist/shell/Banner.js +1 -1
  261. package/dist/shell/Breadcrumbs.js +1 -1
  262. package/dist/shell/BudgetBar.js +1 -1
  263. package/dist/shell/Card.js +1 -1
  264. package/dist/shell/ColoredBadge.js +1 -1
  265. package/dist/shell/ConfirmDialog.js +1 -1
  266. package/dist/shell/ContainerFillChart.js +1 -1
  267. package/dist/shell/ContextMenu.js +1 -1
  268. package/dist/shell/CountBadge.js +1 -1
  269. package/dist/shell/Dialog.js +1 -1
  270. package/dist/shell/Drawer.js +1 -1
  271. package/dist/shell/DropdownMenu.js +1 -1
  272. package/dist/shell/EditableGrid.js +1 -1
  273. package/dist/shell/EmptyState.js +1 -1
  274. package/dist/shell/GlobalSearch.js +1 -1
  275. package/dist/shell/HelpCenter.js +1 -1
  276. package/dist/shell/IconRail.js +1 -1
  277. package/dist/shell/ImageLightbox.js +1 -1
  278. package/dist/shell/ItemCount.js +1 -1
  279. package/dist/shell/LanguageSelect.js +1 -1
  280. package/dist/shell/Markdown.js +1 -1
  281. package/dist/shell/MetricBar.js +1 -1
  282. package/dist/shell/MetricBarLegend.js +1 -1
  283. package/dist/shell/MilestoneTimeline.js +1 -1
  284. package/dist/shell/PageHeader.js +1 -1
  285. package/dist/shell/PopupMenu.js +1 -1
  286. package/dist/shell/ProductionTimeline.js +1 -1
  287. package/dist/shell/ResizeHandle.js +1 -1
  288. package/dist/shell/Result.js +1 -1
  289. package/dist/shell/SearchableSelect.js +1 -1
  290. package/dist/shell/SettingReset.js +1 -1
  291. package/dist/shell/SettingRow.js +1 -1
  292. package/dist/shell/SidebarLayout.js +1 -1
  293. package/dist/shell/SidebarNav.js +1 -1
  294. package/dist/shell/SortableList.js +1 -1
  295. package/dist/shell/Statistic.js +1 -1
  296. package/dist/shell/StepChain.js +1 -1
  297. package/dist/shell/Stepper.js +1 -1
  298. package/dist/shell/TimeAgo.js +1 -1
  299. package/dist/shell/TimelineTrack.js +1 -1
  300. package/dist/shell/TopNav.js +1 -1
  301. package/dist/shell/TransferProgress.js +1 -1
  302. package/dist/shell/Tree.js +1 -1
  303. package/dist/shell/discardGuard.js +1 -1
  304. package/dist/shell/language.js +1 -1
  305. package/dist/shell/strings.d.ts +129 -0
  306. package/dist/shell/strings.js +1 -1
  307. package/dist/shell/toast.js +1 -1
  308. package/dist/telemetry/index.js +1 -1
  309. package/dist/templates/AuthScreen.js +1 -1
  310. package/dist/templates/ChatTemplate.js +1 -1
  311. package/dist/templates/CheckoutTemplate.js +1 -1
  312. package/dist/templates/DashboardTemplate.js +1 -1
  313. package/dist/templates/DataTablePage.js +1 -1
  314. package/dist/templates/EmailTemplate.js +1 -1
  315. package/dist/templates/ErrorBoundary.js +1 -1
  316. package/dist/templates/ErrorPage.js +1 -1
  317. package/dist/templates/FormLayoutPage.js +1 -1
  318. package/dist/templates/GalleryTemplate.js +1 -1
  319. package/dist/ui/index.d.ts +2 -1
  320. package/dist/ui/index.js +1 -1
  321. package/dist/version.js +1 -1
  322. package/package.json +1 -1
  323. package/dist/Calculator-OJSMHQKW.js +0 -29
  324. package/dist/Files-NXY7XRZD.js +0 -88
  325. package/dist/PdfViewer-Y3SAVADX.js +0 -1
  326. package/dist/Sidebar-BCTWRG7P.js +0 -44
  327. package/dist/Spreadsheet-BPW2TLVQ.js +0 -37
  328. package/dist/chunk-3XZFWR6T.js +0 -13
  329. package/dist/chunk-4P57TIFK.js +0 -2
  330. package/dist/chunk-5PDHKH2A.js +0 -3
  331. package/dist/chunk-77AQNJE2.js +0 -9
  332. package/dist/chunk-7INZ7O3A.js +0 -5
  333. package/dist/chunk-CH3JQUDW.js +0 -8
  334. package/dist/chunk-DOF56HTO.js +0 -6
  335. package/dist/chunk-EVX7AZII.js +0 -9
  336. package/dist/chunk-EXLHFM3V.js +0 -6
  337. package/dist/chunk-GBATZZX7.js +0 -1
  338. package/dist/chunk-GDQJBQ5B.js +0 -1
  339. package/dist/chunk-K4JQ3FQI.js +0 -2
  340. package/dist/chunk-LDZQJLMC.js +0 -3
  341. package/dist/chunk-M66ACZXQ.js +0 -5
  342. package/dist/chunk-MHPFBVDD.js +0 -8
  343. package/dist/chunk-NWC6YCIJ.js +0 -11
  344. package/dist/chunk-NZISMTQE.js +0 -7
  345. package/dist/chunk-PLK2WHZG.js +0 -27
  346. package/dist/chunk-QO5E33DH.js +0 -8
  347. package/dist/chunk-RBZKV3ED.js +0 -14
  348. package/dist/chunk-TNJ2VCH4.js +0 -8
  349. package/dist/chunk-VX4COEWP.js +0 -4
  350. package/dist/chunk-WOAMPTZI.js +0 -20
  351. package/dist/chunk-XFH64VIG.js +0 -19
  352. package/dist/chunk-XKGEI6NL.js +0 -28
  353. package/dist/chunk-XXL5RLNM.js +0 -22
@@ -1,4 +1,4 @@
1
- import{ErrorPage as r}from"./chunk-ORIXCEKO.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
1
+ import{ErrorPage as r}from"./chunk-FOHOSUK3.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{useShellStrings as s}from"./chunk-VNTJ7QO5.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
2
2
  return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
3
3
  /* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
4
4
  /* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
@@ -1,4 +1,4 @@
1
- import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{jsxs as n,Fragment as o,jsx as l}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:s,isFetchingMore:a,extra:u}){const m=t().list,h=i??d,f=d>=h,p=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
1
+ import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-VNTJ7QO5.js";import{jsxs as n,Fragment as o,jsx as l}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:s,isFetchingMore:a,extra:u}){const m=t().list,h=i??d,f=d>=h,p=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
2
2
  return n(o,{children:[u,p?`${p} — `:"",f?null!=i?m.allLoaded(h,s):m.count(h,s):m.loadedOf(d,h,s),a?/* @__PURE__ */n(o,{children:[" · ",
3
3
  /* @__PURE__ */n("span",{className:"inline-flex items-center gap-1",role:"status",children:[
4
4
  /* @__PURE__ */l(e,{}),m.loadingMore]})]}):""]})}export{r as ListFooter};
@@ -1,4 +1,4 @@
1
- import{TransferProgress as e}from"./chunk-TDAI4J27.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-GDQJBQ5B.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function c(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function u(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
1
+ import{TransferProgress as e}from"./chunk-OS2KE6QG.js";import{Icon as r}from"./chunk-R64OZ6TC.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-VNTJ7QO5.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function c(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function u(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
2
2
  return o("div",{className:`absolute inset-0 flex items-center justify-center bg-white/60 ${n}`,children:/* @__PURE__ */o(e,{state:"busy",verb:r,pct:t})})}function l({children:e}){/* @__PURE__ */
3
3
  return o("span",{className:"absolute inset-x-1 bottom-1 truncate rounded px-2 py-0.5 text-xs text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e})}function m(e,r=""){if(!e)return!1;const t=n.exec(e);if(t)return"video"===t[1].toLowerCase();const o=r.includes("video"),i=r.includes("image")||"*"===r||""===r;return s.test(e)||o&&!i}function f({className:e="h-4 w-4"}){/* @__PURE__ */
4
4
  return o(r,{name:"close",className:e,strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})}function p({className:e="h-6 w-6"}){/* @__PURE__ */
@@ -1,9 +1,9 @@
1
- import{useOverlayTarget as e,usePopupAnchor as r,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as i}from"./chunk-ECJKIPWU.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as l}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as a}from"./chunk-CDAJKLGL.js";import{Icon as s}from"./chunk-2UO47XB4.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useHydrated as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{useRef as f,useId as u,useState as p,useEffect as b}from"react";import{createPortal as g}from"react-dom";import{jsxs as x,Fragment as y,jsx as v}from"react/jsx-runtime";var w={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},k={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function N(e,r){const t=window.innerHeight-(r.top+r.height);if("bottom"===e)return{left:r.left,width:r.width,bottom:t};const i={top:r.top,height:r.height};return"left"===e?{...i,left:r.left}:{...i,right:window.innerWidth-(r.left+r.width)}}function j({onClose:e}){const r=h().dialog;/* @__PURE__ */
2
- return v("button",{type:"button",onClick:e,"aria-label":r.close,className:"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__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function C({open:s,onClose:h,side:C="right",size:W="md",title:D,description:B,footer:J,children:U,blocking:L=!1,dirty:Q=!1,initialFocus:z,"aria-label":G,"aria-labelledby":H,"aria-describedby":I,className:P=""}){const T=f(null),V=u(),X=u(),A=u(),F=e(c()),[K,S]=p(null),E=i({open:s,dirty:Q,onClose:h,title:D,layer:K}),O=f(null),Y=r(s&&null!==F,O);if(l(s),n(T,s&&null!==F,z),a(s),b(()=>{if(s)return m(()=>(L||E(),!0),()=>T.current)},[s,L,E]),!s||!F)return null;const Z="bottom"===C,$={...Z?{maxHeight:"85vh"}:{},...Y?N(C,Y):{}};/* @__PURE__ */
3
- return x(y,{children:[/* @__PURE__ */v("span",{ref:O,hidden:!0,"data-popup-anchor":""}),g(
4
- /* @__PURE__ */v(t,{value:K,children:/* @__PURE__ */x("div",{ref:S,className:"fixed inset-0",style:{zIndex:d.overlay},role:"presentation","data-overlay-layer":"",children:[
5
- /* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30",onClick:L?void 0:E,"aria-hidden":"true"}),
6
- /* @__PURE__ */x("div",{ref:T,...o({modal:!0,titleId:D?A:void 0,labelledBy:H,label:G}),"aria-describedby":I??(B?X:U?V:void 0),"data-drawer-side":C,"data-popup-panel":"",style:$,className:["fixed flex flex-col bg-white shadow-xl",Z?"":`w-full max-w-full ${w[W]}`,Y?"":k[C],Z?"rounded-t-xl":"",P].filter(Boolean).join(" "),children:[D?/* @__PURE__ */x("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
1
+ import{useOverlayTarget as e,usePopupAnchor as r,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as i}from"./chunk-FRNSCVPN.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as l}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as a}from"./chunk-CDAJKLGL.js";import{Icon as s}from"./chunk-R64OZ6TC.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useHydrated as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-VNTJ7QO5.js";import{useRef as f,useId as u,useState as p,useEffect as b}from"react";import{createPortal as g}from"react-dom";import{jsxs as x,Fragment as y,jsx as v}from"react/jsx-runtime";var w={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},N={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function k(e,r){const t=window.innerHeight-(r.top+r.height);if("bottom"===e)return{left:r.left,width:r.width,bottom:t};const i={top:r.top,height:r.height};return"left"===e?{...i,left:r.left}:{...i,right:window.innerWidth-(r.left+r.width)}}function j({onClose:e}){const r=h().dialog;/* @__PURE__ */
2
+ return v("button",{type:"button",onClick:e,"aria-label":r.close,className:"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__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function C({open:s,onClose:h,side:C="right",size:W="md",title:D,description:T,footer:V,children:J,blocking:L=!1,dirty:z=!1,initialFocus:F,"aria-label":H,"aria-labelledby":P,"aria-describedby":Q,className:S=""}){const U=f(null),A=u(),B=u(),G=u(),I=e(c()),[O,R]=p(null),X=i({open:s,dirty:z,onClose:h,title:D,layer:O}),Z=f(null),K=r(s&&null!==I,Z);if(l(s),n(U,s&&null!==I,F),a(s),b(()=>{if(s)return m(()=>(L||X(),!0),()=>U.current)},[s,L,X]),!s||!I)return null;const Y="bottom"===C,$={...Y?{maxHeight:"85vh"}:{},...K?k(C,K):{}};/* @__PURE__ */
3
+ return x(y,{children:[/* @__PURE__ */v("span",{ref:Z,hidden:!0,"data-popup-anchor":""}),g(
4
+ /* @__PURE__ */v(t,{value:O,children:/* @__PURE__ */x("div",{ref:R,className:"fixed inset-0",style:{zIndex:d.overlay},role:"presentation","data-overlay-layer":"",children:[
5
+ /* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30",onClick:L?void 0:X,"aria-hidden":"true"}),
6
+ /* @__PURE__ */x("div",{ref:U,...o({modal:!0,titleId:D?G:void 0,labelledBy:P,label:H}),"aria-describedby":Q??(T?B:J?A:void 0),"data-drawer-side":C,"data-popup-panel":"",style:$,className:["fixed flex flex-col bg-white shadow-xl",Y?"":`w-full max-w-full ${w[W]}`,K?"":N[C],Y?"rounded-t-xl":"",S].filter(Boolean).join(" "),children:[D?/* @__PURE__ */x("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
7
7
  /* @__PURE__ */x("div",{className:"min-w-0",children:[
8
- /* @__PURE__ */v("h2",{id:A,className:"text-base font-semibold text-gray-900",children:D}),B&&/* @__PURE__ */v("p",{id:X,className:"mt-0.5 text-sm text-gray-500",children:B})]}),!L&&/* @__PURE__ */v(j,{onClose:E})]}):!L&&/* @__PURE__ */v("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */v(j,{onClose:E})}),
9
- /* @__PURE__ */x("div",{id:V,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[B&&!D&&/* @__PURE__ */v("p",{id:X,className:("mb-3 text-sm text-gray-500 "+(L?"":"pr-8")).trim(),children:B}),U]}),J&&/* @__PURE__ */v("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:J})]})]})}),F)]})}export{C as Drawer};
8
+ /* @__PURE__ */v("h2",{id:G,className:"text-base font-semibold text-gray-900",children:D}),T&&/* @__PURE__ */v("p",{id:B,className:"mt-0.5 text-sm text-gray-500",children:T})]}),!L&&/* @__PURE__ */v(j,{onClose:X})]}):!L&&/* @__PURE__ */v("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */v(j,{onClose:X})}),
9
+ /* @__PURE__ */x("div",{id:A,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[T&&!D&&/* @__PURE__ */v("p",{id:B,className:("mb-3 text-sm text-gray-500 "+(L?"":"pr-8")).trim(),children:T}),J]}),V&&/* @__PURE__ */v("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:V})]})]})}),I)]})}export{C as Drawer};
@@ -1,54 +1,54 @@
1
- import{toast_default as e}from"./chunk-7ELJQL7J.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{forwardRef as n,useRef as r,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as c,jsxs as s,Fragment as d}from"react/jsx-runtime";var u=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],h=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),x=n(function({src:n,filename:x,onApply:m,onCancel:g},N){const L=r(null),z=r(null),D=r(null),E=r(null),P=t().annotator,$=r(P);$.current=P;const[I,S]=o("select"),[W,B]=o(u[0]),[R,j]=o(4),[H,F]=o(24),[T,U]=o(h[0].id),[A,O]=o(!0),[K,V]=o(!1),[Z,G]=o(!1),[J,Q]=o(null),[X,q]=o(null),[Y,_]=o(6),[ee,te]=o(12),[ne,re]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[ce,se]=o(null),[de,ue]=o(1),[he,pe]=o(null),[xe,ye]=o(null),[me,ge]=o(null),fe=r(null),[we,be]=o(!1),ve=i(()=>ce?{w:ce.w*de,h:ce.h*de}:null,[ce,de]),ke=ve&&ae?ve.w/ae.w:1,Me=i(()=>ne.find(e=>e.id===oe)??null,[ne,oe]);a(()=>{"select"===I&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(F(Me.size),U(Me.font),O(Me.bold),V(Me.italic),G(Me.underline),Q(Me.borderColor),q(Me.background),_(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{E.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),re([]),ie(null)},t.onerror=()=>e.error($.current.loadFailed),t.src=n},[n]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),n=Math.max(0,t.width-32),r=Math.max(0,t.height-32);if(0===n||0===r)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>n&&(i=n,a=i/o),a>r&&(a=r,i=a*o),se({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>ne.filter(e=>"mosaic"===e.type),[ne]);a(()=>{const e=E.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const n=t.getContext("2d");n.drawImage(e,0,0);for(const e of Ne)C(n,e)},[ae,Ne,ce]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;const r=t.getScreenCTM();if(!r)return{x:0,y:0};const o=n.matrixTransform(r.inverse());return{x:o.x,y:o.y}},Le=e=>{fe.current=e,be(!0)};a(()=>{if(!we)return;const e=e=>{const t=fe.current;if(!t)return;const n=Ce(e);if("draw"===t.kind)pe(b(I,t.start,n,W,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(n.x-e.x)>1||Math.abs(n.y-e.y)>1)&&(t.points.push(n),pe({id:"",type:"draw",points:t.points.slice(),color:W,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,n));else if("move"===t.kind){const e=n.x-t.start.x,r=n.y-t.start.y;re(n=>n.map(n=>n.id===t.id?v(t.original,e,r):n))}else"resize"===t.kind&&re(e=>e.map(e=>e.id===t.id?function(e,t,n){if("arrow"===e.type)return"start"===t?{...e,x1:n.x,y1:n.y}:"end"===t?{...e,x2:n.x,y2:n.y}:e;if("text"===e.type||"draw"===e.type)return e;const r=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=r,c=i,s=o,d=a;"nw"===t&&(l=n.x,c=n.y);"ne"===t&&(s=n.x,c=n.y);"se"===t&&(s=n.x,d=n.y);"sw"===t&&(l=n.x,d=n.y);const u=M({x:l,y:c},{x:s,y:d});return{...e,x:u.x,y:u.y,w:u.w,h:u.h}}(t.original,t.corner,n):e))},t=()=>{const e=fe.current;if(fe.current=null,be(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const n={...e,id:p()};return re(e=>[...e,n]),ie(n.id),S("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:W,stroke:R};re(e=>[...e,t]),ie(t.id),S("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[we,I,W,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),re(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),re(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:A,italic:K,underline:Z}[e];"bold"===e&&O(t),"italic"===e&&V(t),"underline"===e&&G(t),oe&&re(n=>n.map(n=>n.id===oe&&"text"===n.type?{...n,[e]:t}:n))},De=e=>{Q(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Ee=e=>{q(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},Pe=e=>{if(!xe)return;const t=e??xe.value;if(!t.trim())return xe.editingId&&re(e=>e.filter(e=>e.id!==xe.editingId)),void ye(null);if(xe.editingId)re(e=>e.map(e=>e.id===xe.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:xe.x,y:xe.y,text:t,color:W,size:H,font:T,bold:A,italic:K,underline:Z,borderColor:J,background:X,padding:Y};re(t=>[...t,e]),ie(e.id),S("select")}ye(null)},$e=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const n=document.createElement("canvas");n.width=ae.w,n.height=ae.h;const r=n.getContext("2d");r.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),c=new Image;return await new Promise(e=>{c.onload=()=>e(),c.onerror=()=>e(),c.src=l}),r.drawImage(c,0,0,ae.w,ae.h),URL.revokeObjectURL(l),n};l(N,()=>({save:async()=>{const t=await $e();t&&t.toBlob(t=>{if(!t)return void e.error($.current.exportFailed);const n=URL.createObjectURL(t),r=document.createElement("a");r.href=n;const o=x.replace(/\.[^.]+$/,"");r.download=`${o}-annotated.png`,r.click(),URL.revokeObjectURL(n)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error($.current.clipboardUnsupported);const t=await $e();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success($.current.copied)}catch{e.error($.current.copyRefused)}else e.error($.current.copyFailed)},"image/png")}}),[ae,x]);const Ie=i(()=>[{id:"select",label:P.toolSelect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:P.toolDraw,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:P.toolRect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:P.toolEllipse,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:P.toolArrow,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:P.toolMosaic,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:P.toolText,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:P.toolCrop,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[P]),Se=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-on-accent":"text-ink hover:bg-gray-200"),We=Me?.type??("select"===I?null:I),Be="rect"===We||"circle"===We||"arrow"===We||"draw"===We,Re="rect"===We,je="text"===We;/* @__PURE__ */
1
+ import{toast_default as e}from"./chunk-MWKLLAJT.js";import{useShellStrings as t}from"./chunk-VNTJ7QO5.js";import{forwardRef as n,useRef as r,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as c,jsxs as s,Fragment as d}from"react/jsx-runtime";var u=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],h=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),x=n(function({src:n,filename:x,onApply:m,onCancel:g},N){const L=r(null),z=r(null),D=r(null),P=r(null),$=t().annotator,E=r($);E.current=$;const[I,W]=o("select"),[S,B]=o(u[0]),[R,j]=o(4),[T,H]=o(24),[F,U]=o(h[0].id),[A,O]=o(!0),[K,V]=o(!1),[Z,X]=o(!1),[q,G]=o(null),[J,Y]=o(null),[_,Q]=o(6),[ee,te]=o(12),[ne,re]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[ce,se]=o(null),[de,ue]=o(1),[he,pe]=o(null),[xe,ye]=o(null),[me,ge]=o(null),fe=r(null),[we,be]=o(!1),ve=i(()=>ce?{w:ce.w*de,h:ce.h*de}:null,[ce,de]),ke=ve&&ae?ve.w/ae.w:1,Me=i(()=>ne.find(e=>e.id===oe)??null,[ne,oe]);a(()=>{"select"===I&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(H(Me.size),U(Me.font),O(Me.bold),V(Me.italic),X(Me.underline),G(Me.borderColor),Y(Me.background),Q(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{P.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),re([]),ie(null)},t.onerror=()=>e.error(E.current.loadFailed),t.src=n},[n]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),n=Math.max(0,t.width-32),r=Math.max(0,t.height-32);if(0===n||0===r)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>n&&(i=n,a=i/o),a>r&&(a=r,i=a*o),se({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>ne.filter(e=>"mosaic"===e.type),[ne]);a(()=>{const e=P.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const n=t.getContext("2d");n.drawImage(e,0,0);for(const e of Ne)C(n,e)},[ae,Ne,ce]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;const r=t.getScreenCTM();if(!r)return{x:0,y:0};const o=n.matrixTransform(r.inverse());return{x:o.x,y:o.y}},Le=e=>{fe.current=e,be(!0)};a(()=>{if(!we)return;const e=e=>{const t=fe.current;if(!t)return;const n=Ce(e);if("draw"===t.kind)pe(b(I,t.start,n,S,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(n.x-e.x)>1||Math.abs(n.y-e.y)>1)&&(t.points.push(n),pe({id:"",type:"draw",points:t.points.slice(),color:S,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,n));else if("move"===t.kind){const e=n.x-t.start.x,r=n.y-t.start.y;re(n=>n.map(n=>n.id===t.id?v(t.original,e,r):n))}else"resize"===t.kind&&re(e=>e.map(e=>e.id===t.id?function(e,t,n){if("arrow"===e.type)return"start"===t?{...e,x1:n.x,y1:n.y}:"end"===t?{...e,x2:n.x,y2:n.y}:e;if("text"===e.type||"draw"===e.type)return e;const r=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=r,c=i,s=o,d=a;"nw"===t&&(l=n.x,c=n.y);"ne"===t&&(s=n.x,c=n.y);"se"===t&&(s=n.x,d=n.y);"sw"===t&&(l=n.x,d=n.y);const u=M({x:l,y:c},{x:s,y:d});return{...e,x:u.x,y:u.y,w:u.w,h:u.h}}(t.original,t.corner,n):e))},t=()=>{const e=fe.current;if(fe.current=null,be(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const n={...e,id:p()};return re(e=>[...e,n]),ie(n.id),W("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:S,stroke:R};re(e=>[...e,t]),ie(t.id),W("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[we,I,S,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),re(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),re(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:A,italic:K,underline:Z}[e];"bold"===e&&O(t),"italic"===e&&V(t),"underline"===e&&X(t),oe&&re(n=>n.map(n=>n.id===oe&&"text"===n.type?{...n,[e]:t}:n))},De=e=>{G(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Pe=e=>{Y(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},$e=e=>{if(!xe)return;const t=e??xe.value;if(!t.trim())return xe.editingId&&re(e=>e.filter(e=>e.id!==xe.editingId)),void ye(null);if(xe.editingId)re(e=>e.map(e=>e.id===xe.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:xe.x,y:xe.y,text:t,color:S,size:T,font:F,bold:A,italic:K,underline:Z,borderColor:q,background:J,padding:_};re(t=>[...t,e]),ie(e.id),W("select")}ye(null)},Ee=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const n=document.createElement("canvas");n.width=ae.w,n.height=ae.h;const r=n.getContext("2d");r.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),c=new Image;return await new Promise(e=>{c.onload=()=>e(),c.onerror=()=>e(),c.src=l}),r.drawImage(c,0,0,ae.w,ae.h),URL.revokeObjectURL(l),n};l(N,()=>({save:async()=>{const t=await Ee();t&&t.toBlob(t=>{if(!t)return void e.error(E.current.exportFailed);const n=URL.createObjectURL(t),r=document.createElement("a");r.href=n;const o=x.replace(/\.[^.]+$/,"");r.download=`${o}-annotated.png`,r.click(),URL.revokeObjectURL(n)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error(E.current.clipboardUnsupported);const t=await Ee();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success(E.current.copied)}catch{e.error(E.current.copyRefused)}else e.error(E.current.copyFailed)},"image/png")}}),[ae,x]);const Ie=i(()=>[{id:"select",label:$.toolSelect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:$.toolDraw,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:$.toolRect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:$.toolEllipse,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:$.toolArrow,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:$.toolMosaic,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:$.toolText,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:$.toolCrop,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[$]),We=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-on-accent":"text-ink hover:bg-gray-200"),Se=Me?.type??("select"===I?null:I),Be="rect"===Se||"circle"===Se||"arrow"===Se||"draw"===Se,Re="rect"===Se,je="text"===Se;/* @__PURE__ */
2
2
  return s("div",{className:"flex flex-col h-full bg-gray-100",children:[
3
- /* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-line bg-surface shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */c("button",{onClick:()=>{S(e.id),ie(null)},title:e.label,className:Se(I===e.id),children:e.icon},e.id)),
3
+ /* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-line bg-surface shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */c("button",{onClick:()=>{W(e.id),ie(null)},title:e.label,className:We(I===e.id),children:e.icon},e.id)),
4
4
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
5
- /* @__PURE__ */c("div",{className:"flex items-center gap-1",children:u.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&re(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(W===e?"ring-2 ring-blue-500 ring-offset-1":"border-gray-300"),style:{background:e}},e))}),Be&&/* @__PURE__ */s(d,{children:[
5
+ /* @__PURE__ */c("div",{className:"flex items-center gap-1",children:u.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&re(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(S===e?"ring-2 ring-blue-500 ring-offset-1":"border-gray-300"),style:{background:e}},e))}),Be&&/* @__PURE__ */s(d,{children:[
6
6
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
7
7
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
8
- /* @__PURE__ */c("span",{children:P.weight}),
8
+ /* @__PURE__ */c("span",{children:$.weight}),
9
9
  /* @__PURE__ */c("input",{type:"range",min:1,max:20,step:1,value:R,onChange:e=>{return t=Number(e.target.value),j(t),void(oe&&re(e=>e.map(e=>e.id!==oe?e:"rect"===e.type||"circle"===e.type||"arrow"===e.type||"draw"===e.type?{...e,stroke:t}:e)));var t},className:"w-16 accent-blue-500"}),
10
10
  /* @__PURE__ */c("span",{className:"tabular-nums w-5 text-right",children:R})]})]}),Re&&/* @__PURE__ */s(d,{children:[
11
11
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
12
12
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
13
- /* @__PURE__ */c("span",{children:P.radius}),
13
+ /* @__PURE__ */c("span",{children:$.radius}),
14
14
  /* @__PURE__ */c("input",{type:"range",min:0,max:48,step:1,value:ee,onChange:e=>{return t=Number(e.target.value),te(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"rect"===e.type?{...e,radius:t}:e)));var t},className:"w-16 accent-blue-500"}),
15
15
  /* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:ee})]})]}),je&&/* @__PURE__ */s(d,{children:[
16
16
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
17
- /* @__PURE__ */c("select",{value:T,onChange:e=>{return t=e.target.value,U(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:h.map(e=>/* @__PURE__ */c("option",{value:e.id,children:P[e.name]},e.id))}),
18
- /* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:Se(A),title:P.bold,children:/* @__PURE__ */c("span",{className:"font-bold",children:P.boldLetter})}),
19
- /* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:Se(K),title:P.italic,children:/* @__PURE__ */c("span",{className:"italic",children:P.italicLetter})}),
20
- /* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:Se(Z),title:P.underline,children:/* @__PURE__ */c("span",{className:"underline",children:P.underlineLetter})}),
17
+ /* @__PURE__ */c("select",{value:F,onChange:e=>{return t=e.target.value,U(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:h.map(e=>/* @__PURE__ */c("option",{value:e.id,children:$[e.name]},e.id))}),
18
+ /* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:We(A),title:$.bold,children:/* @__PURE__ */c("span",{className:"font-bold",children:$.boldLetter})}),
19
+ /* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:We(K),title:$.italic,children:/* @__PURE__ */c("span",{className:"italic",children:$.italicLetter})}),
20
+ /* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:We(Z),title:$.underline,children:/* @__PURE__ */c("span",{className:"underline",children:$.underlineLetter})}),
21
21
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
22
- /* @__PURE__ */c("span",{children:P.size}),
23
- /* @__PURE__ */c("input",{type:"range",min:10,max:96,step:1,value:H,onChange:e=>{return t=Number(e.target.value),F(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,size:t}:e)));var t},className:"w-16 accent-blue-500"}),
24
- /* @__PURE__ */c("span",{className:"tabular-nums w-7 text-right",children:H})]}),
22
+ /* @__PURE__ */c("span",{children:$.size}),
23
+ /* @__PURE__ */c("input",{type:"range",min:10,max:96,step:1,value:T,onChange:e=>{return t=Number(e.target.value),H(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,size:t}:e)));var t},className:"w-16 accent-blue-500"}),
24
+ /* @__PURE__ */c("span",{className:"tabular-nums w-7 text-right",children:T})]}),
25
25
  /* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
26
- /* @__PURE__ */c("span",{children:P.border}),J?/* @__PURE__ */s(d,{children:[
27
- /* @__PURE__ */c("input",{type:"color",value:J,onChange:e=>De(e.target.value),title:P.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
28
- /* @__PURE__ */c("button",{onClick:()=>De(null),title:P.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>De(W),title:P.addBorder,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:P.add})]}),
26
+ /* @__PURE__ */c("span",{children:$.border}),q?/* @__PURE__ */s(d,{children:[
27
+ /* @__PURE__ */c("input",{type:"color",value:q,onChange:e=>De(e.target.value),title:$.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
28
+ /* @__PURE__ */c("button",{onClick:()=>De(null),title:$.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>De(S),title:$.addBorder,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:$.add})]}),
29
29
  /* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
30
- /* @__PURE__ */c("span",{children:P.fill}),X?/* @__PURE__ */s(d,{children:[
31
- /* @__PURE__ */c("input",{type:"color",value:X,onChange:e=>Ee(e.target.value),title:P.fillColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
32
- /* @__PURE__ */c("button",{onClick:()=>Ee(null),title:P.removeFill,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>Ee("#ffffff"),title:P.addFill,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:P.add})]}),
30
+ /* @__PURE__ */c("span",{children:$.fill}),J?/* @__PURE__ */s(d,{children:[
31
+ /* @__PURE__ */c("input",{type:"color",value:J,onChange:e=>Pe(e.target.value),title:$.fillColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
32
+ /* @__PURE__ */c("button",{onClick:()=>Pe(null),title:$.removeFill,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>Pe("#ffffff"),title:$.addFill,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:$.add})]}),
33
33
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
34
- /* @__PURE__ */c("span",{children:P.padding}),
35
- /* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:Y,onChange:e=>{return t=Number(e.target.value),_(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,padding:t}:e)));var t},className:"w-14 accent-blue-500"}),
36
- /* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:Y})]})]}),
34
+ /* @__PURE__ */c("span",{children:$.padding}),
35
+ /* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:_,onChange:e=>{return t=Number(e.target.value),Q(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,padding:t}:e)));var t},className:"w-14 accent-blue-500"}),
36
+ /* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:_})]})]}),
37
37
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
38
- /* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomOut,children:"−"}),
38
+ /* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.zoomOut,children:"−"}),
39
39
  /* @__PURE__ */s("span",{className:"text-gray-600 tabular-nums w-10 text-center",children:[Math.round(100*de),"%"]}),
40
- /* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.min(4,Math.round(100*(e+.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomIn,children:"+"}),
41
- /* @__PURE__ */c("button",{onClick:()=>ue(1),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.fitHint,children:P.fit}),
40
+ /* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.min(4,Math.round(100*(e+.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.zoomIn,children:"+"}),
41
+ /* @__PURE__ */c("button",{onClick:()=>ue(1),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.fitHint,children:$.fit}),
42
42
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
43
- /* @__PURE__ */c("button",{onClick:()=>{re(e=>e.slice(0,-1)),ie(null)},disabled:0===ne.length,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-700",children:P.undo}),
43
+ /* @__PURE__ */c("button",{onClick:()=>{re(e=>e.slice(0,-1)),ie(null)},disabled:0===ne.length,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-700",children:$.undo}),
44
44
  /* @__PURE__ */s("div",{className:"ml-auto flex items-center gap-2",children:[me&&/* @__PURE__ */s(d,{children:[
45
- /* @__PURE__ */c("button",{onClick:()=>{if(!me||!E.current||!ae)return;const e=me,t=document.createElement("canvas");t.width=Math.round(e.w),t.height=Math.round(e.h);const n=t.getContext("2d"),r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const o=r.getContext("2d");o.drawImage(E.current,0,0);for(const e of Ne)C(o,e);n.drawImage(r,e.x,e.y,e.w,e.h,0,0,e.w,e.h);const i=new Image;i.onload=()=>{E.current=i,le({w:i.naturalWidth,h:i.naturalHeight}),re(t=>t.filter(e=>"mosaic"!==e.type).map(t=>v(t,-e.x,-e.y)).filter(e=>function(e,t,n){const r=k(e);return r.x+r.w>0&&r.y+r.h>0&&r.x<t&&r.y<n}(e,i.naturalWidth,i.naturalHeight))),ge(null)},i.src=t.toDataURL("image/png")},className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600",children:P.applyCrop}),
46
- /* @__PURE__ */c("button",{onClick:()=>ge(null),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",children:P.cancel})]}),m&&!me&&/* @__PURE__ */s(d,{children:[g&&/* @__PURE__ */c("button",{onClick:g,className:"px-3 py-1 rounded hover:bg-gray-200 text-gray-700 text-xs font-medium",children:P.cancel}),
47
- /* @__PURE__ */c("button",{onClick:async()=>{const t=await $e();t?t.toBlob(t=>{t?m(t):e.error($.current.exportFailed)},"image/png"):e.error($.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:P.apply})]})]})]}),
45
+ /* @__PURE__ */c("button",{onClick:()=>{if(!me||!P.current||!ae)return;const e=me,t=document.createElement("canvas");t.width=Math.round(e.w),t.height=Math.round(e.h);const n=t.getContext("2d"),r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const o=r.getContext("2d");o.drawImage(P.current,0,0);for(const e of Ne)C(o,e);n.drawImage(r,e.x,e.y,e.w,e.h,0,0,e.w,e.h);const i=new Image;i.onload=()=>{P.current=i,le({w:i.naturalWidth,h:i.naturalHeight}),re(t=>t.filter(e=>"mosaic"!==e.type).map(t=>v(t,-e.x,-e.y)).filter(e=>function(e,t,n){const r=k(e);return r.x+r.w>0&&r.y+r.h>0&&r.x<t&&r.y<n}(e,i.naturalWidth,i.naturalHeight))),ge(null)},i.src=t.toDataURL("image/png")},className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600",children:$.applyCrop}),
46
+ /* @__PURE__ */c("button",{onClick:()=>ge(null),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",children:$.cancel})]}),m&&!me&&/* @__PURE__ */s(d,{children:[g&&/* @__PURE__ */c("button",{onClick:g,className:"px-3 py-1 rounded hover:bg-gray-200 text-gray-700 text-xs font-medium",children:$.cancel}),
47
+ /* @__PURE__ */c("button",{onClick:async()=>{const t=await Ee();t?t.toBlob(t=>{t?m(t):e.error(E.current.exportFailed)},"image/png"):e.error(E.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:$.apply})]})]})]}),
48
48
  /* @__PURE__ */c("div",{ref:L,className:"flex-1 overflow-auto bg-gray-200 flex items-center justify-center p-4 relative",children:ve&&ae&&/* @__PURE__ */s("div",{className:"relative shadow-lg rounded overflow-hidden bg-white shrink-0",style:{width:ve.w,height:ve.h},children:[
49
49
  /* @__PURE__ */c("canvas",{ref:z,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block"}}),
50
- /* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(xe)return void Pe();const t=Ce(e);return void ye({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:W,stroke:R});pe(b(I,t,t,W,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[ne.map(e=>/* @__PURE__ */c(y,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&ye({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,n)=>((e,t,n)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:n,start:Ce(e),original:t})})(t,e,n)},e.id)),he&&/* @__PURE__ */c(y,{anno:{...he,id:"__preview"},preview:!0}),me&&/* @__PURE__ */c(f,{rect:me,imageSize:ae})]}),xe&&/* @__PURE__ */c(w,{pendingText:xe,color:W,size:H,font:h.find(e=>e.id===T)?.css??h[0].css,bold:A,italic:K,underline:Z,borderColor:J,background:X,padding:Y,scale:ke,onChange:e=>ye({...xe,value:e}),onCommit:Pe,onCancel:()=>ye(null)})]})}),
51
- /* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-line bg-surface text-2xs text-ink-faint shrink-0",children:"select"===I?oe?P.hintSelected:P.hintSelect:"text"===I?P.hintText:"crop"===I?P.hintCrop:"draw"===I?P.hintDraw:P.hintShape})]})});function y({anno:e,selected:t,preview:n,zoom:r=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),u=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let x;if("rect"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("circle"===e.type)x=/* @__PURE__ */c("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...u});else if("arrow"===e.type)x=/* @__PURE__ */c(g,{anno:e,interactive:u});else if("draw"===e.type)x=/* @__PURE__ */c("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("mosaic"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:t?"#3b82f6":"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...u});else{const t=h.find(t=>t.id===e.font)?.css??h[0].css,n=e.padding??0,r=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;x=/* @__PURE__ */s("g",{...u,...p,children:[r&&/* @__PURE__ */c("rect",{x:o.x-n,y:o.y-n,width:Math.max(0,o.w)+2*n,height:Math.max(0,o.h)+2*n,rx:Math.min(8,n),ry:Math.min(8,n),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
50
+ /* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(xe)return void $e();const t=Ce(e);return void ye({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:S,stroke:R});pe(b(I,t,t,S,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[ne.map(e=>/* @__PURE__ */c(y,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&ye({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,n)=>((e,t,n)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:n,start:Ce(e),original:t})})(t,e,n)},e.id)),he&&/* @__PURE__ */c(y,{anno:{...he,id:"__preview"},preview:!0}),me&&/* @__PURE__ */c(f,{rect:me,imageSize:ae})]}),xe&&/* @__PURE__ */c(w,{pendingText:xe,color:S,size:T,font:h.find(e=>e.id===F)?.css??h[0].css,bold:A,italic:K,underline:Z,borderColor:q,background:J,padding:_,scale:ke,onChange:e=>ye({...xe,value:e}),onCommit:$e,onCancel:()=>ye(null)})]})}),
51
+ /* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-line bg-surface text-2xs text-ink-faint shrink-0",children:"select"===I?oe?$.hintSelected:$.hintSelect:"text"===I?$.hintText:"crop"===I?$.hintCrop:"draw"===I?$.hintDraw:$.hintShape})]})});function y({anno:e,selected:t,preview:n,zoom:r=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),u=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let x;if("rect"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("circle"===e.type)x=/* @__PURE__ */c("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...u});else if("arrow"===e.type)x=/* @__PURE__ */c(g,{anno:e,interactive:u});else if("draw"===e.type)x=/* @__PURE__ */c("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("mosaic"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:t?"#3b82f6":"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...u});else{const t=h.find(t=>t.id===e.font)?.css??h[0].css,n=e.padding??0,r=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;x=/* @__PURE__ */s("g",{...u,...p,children:[r&&/* @__PURE__ */c("rect",{x:o.x-n,y:o.y-n,width:Math.max(0,o.w)+2*n,height:Math.max(0,o.h)+2*n,rx:Math.min(8,n),ry:Math.min(8,n),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
52
52
  /* @__PURE__ */c("text",{x:e.x,y:e.y+e.size,fill:e.color,fontSize:e.size,fontWeight:e.bold?700:400,fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":void 0,fontFamily:t,style:{userSelect:"none"},children:e.text.split("\n").map((t,n)=>/* @__PURE__ */c("tspan",{x:e.x,dy:0===n?0:1.2*e.size,children:t},n))})]})}/* @__PURE__ */
53
53
  return s("g",{children:[x,t&&!n&&/* @__PURE__ */s(d,{children:[
54
54
  /* @__PURE__ */c("rect",{"data-chrome":"selection",x:l.x-4,y:l.y-4,width:l.w+8,height:l.h+8,fill:"none",stroke:"#3b82f6",strokeWidth:2/r,strokeDasharray:`${6/r},${4/r}`,pointerEvents:"none"}),a&&/* @__PURE__ */c(m,{anno:e,zoom:r,onHandlePointerDown:a})]})]})}function m({anno:e,zoom:t,onHandlePointerDown:n}){const r=6/t,o=1.5/t,i=e=>({fill:"#fff",stroke:"#3b82f6",strokeWidth:o,pointerEvents:"all",style:{cursor:e},"data-chrome":"handle"});if("arrow"===e.type)/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-P3RXXWXN.js";import{Select_default as a}from"./chunk-XFH64VIG.js";import{Pagination as r}from"./chunk-LXL2UCUR.js";import{Input_default as t}from"./chunk-HNUKXGYP.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{Icon as c}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as m}from"./chunk-WGLHB6WE.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-ZDDYTXPK.js";import{Select_default as a}from"./chunk-G2BZ7NCM.js";import{Pagination as r}from"./chunk-Z32K3LIJ.js";import{Input_default as t}from"./chunk-2UTCGWMZ.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{Icon as c}from"./chunk-R64OZ6TC.js";import{TH_ONE_LINE as m}from"./chunk-WGLHB6WE.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
2
2
  return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
@@ -1,2 +1,2 @@
1
- import{Icon as e}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.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-R64OZ6TC.js";import{useShellStrings as t}from"./chunk-VNTJ7QO5.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,9 @@
1
+ import{Calendar as e}from"./chunk-PR42NIDL.js";import{fromDateKey as t,toDateKey as r}from"./chunk-2HMNOLKX.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-AYZY3YNC.js";import{calendarNames as i}from"./chunk-Y3JW2GW5.js";import{Icon as o}from"./chunk-R64OZ6TC.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as u}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as b}from"./chunk-VNTJ7QO5.js";import{forwardRef as f,useState as p,useRef as h,useId as v,useEffect as g}from"react";import{createPortal as y}from"react-dom";import{jsx as x,jsxs as N}from"react/jsx-runtime";var k=/^\d{4}-\d{2}-\d{2}$/,j=/^(aria|data)-/,w=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function D(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":r(e);if(k.test(e))return e;const t=new Date(e);return Number.isNaN(t.getTime())?"":r(t)}function C(e,r){const a=t(e);return a?r.longDate(a.getFullYear(),a.getMonth(),a.getDate()):""}var F=f(function({value:f,onChange:k,min:F,max:O,invalid:W,size:B,native:L,weekStartsOn:T,className:$="","aria-label":q,"aria-describedby":E,"aria-labelledby":I,id:J,name:S,disabled:Y,placeholder:z,required:U,clearable:G,form:M,title:P,tabIndex:R,autoFocus:H,onFocus:Q,onBlur:V,...Z},A){const K=G??!U,X=D(f),_=D(F),ee=D(O),te=m().datePicker,re=b(),ae=i(re),[ne,ie]=p(!1),oe=h(null),le=h(null),se=h(null),de=v(),ue=v(),ce=v(),me=d(le,ne,{popupRef:se}),[be,fe]=p(!1);u(()=>{const e=!!J&&(le.current?.labels?.length??0)>0;e!==be&&fe(e)});const pe=!q&&(!!I||be);if(g(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),g(()=>{if(ne)return c(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),L)/* @__PURE__ */
2
+ return x("input",{ref:A,type:"date",lang:re,id:J,name:S,disabled:Y,"aria-label":q,"aria-describedby":E,"aria-invalid":W||void 0,value:X,min:_||void 0,max:ee||void 0,onChange:e=>k?.(t(e.target.value)),className:a({invalid:W,size:B,className:$}),"aria-labelledby":I,required:U,form:M,title:P,tabIndex:R,autoFocus:H,onFocus:Q,onBlur:V,...Z});const he=Object.fromEntries(Object.entries(Z).filter(([e])=>j.test(e)&&!w.has(e))),ve=Z["aria-required"],ge=!!U||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,E].filter(Boolean).join(" ")||void 0,xe=r(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=z??te.placeholder;/* @__PURE__ */
3
+ return N("div",{ref:oe,className:"relative",children:[
4
+ /* @__PURE__ */x("input",{ref:A,type:"hidden",name:S,form:M,value:X}),
5
+ /* @__PURE__ */N("button",{ref:le,type:"button",...he,id:J,disabled:Y,title:P,tabIndex:R,autoFocus:H,onFocus:Q,onBlur:V,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":I,"aria-describedby":ye,"aria-label":q?`${q}${X?`, ${C(X,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:W,size:B,className:$})} flex items-center justify-between text-left`,children:[
6
+ /* @__PURE__ */x("span",{className:X?"text-ink-strongest":n,children:X?C(X,ae):ke}),
7
+ /* @__PURE__ */x(o,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */x("span",{id:ue,className:"sr-only",children:X?C(X,ae):ke}),ge&&/* @__PURE__ */x("span",{id:ce,className:"sr-only",children:te.required}),ne&&y(
8
+ /* @__PURE__ */N("div",{ref:se,id:de,role:"dialog","aria-label":q??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:s.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
9
+ /* @__PURE__ */x(e,{value:X||null,min:_||null,max:ee||null,weekStartsOn:T,onSelect:e=>{ie(!1),le.current?.focus(),k?.(t(e))}}),(K||Ne)&&/* @__PURE__ */N("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[K&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{F as DatePicker_default};
@@ -1,4 +1,4 @@
1
- import{useShellLocale as e}from"./chunk-GDQJBQ5B.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:u=""}){const h=s[i],f=Math.max(8,Math.round(.28*h)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
1
+ import{useShellLocale as e}from"./chunk-VNTJ7QO5.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:u=""}){const h=s[i],f=Math.max(8,Math.round(.28*h)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
2
2
  /* @__PURE__ */
3
3
  return l("span",{className:`relative inline-flex shrink-0 ${u}`.trim(),style:{width:h,height:h},...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:[y?/* @__PURE__ */a("img",{src:e,alt:"",onError:()=>g(!0),className:"h-full w-full rounded-full object-cover"}):/* @__PURE__ */a("span",{className:"flex h-full w-full items-center justify-center rounded-full bg-gray-100 font-medium text-gray-600",style:{fontSize:Math.round(.4*h)},children:m(t)}),c&&/* @__PURE__ */a("span",{className:`absolute bottom-0 right-0 rounded-full ring-2 ring-white ${o[c]}`,style:{width:f,height:f}})]})}function u({children:r,max:n,size:o="md",className:m=""}){const c=i.toArray(r),u=n?c.slice(0,n):c,h=n?c.length-u.length:0,f=s[o],d=Math.round(.3*f),g=e();/* @__PURE__ */
4
4
  return l("div",{className:`flex items-center ${m}`.trim(),children:[u.map((e,t)=>/* @__PURE__ */a("span",{className:"rounded-full ring-2 ring-white",style:{marginLeft:0===t?0:-d},children:e},t)),h>0&&/* @__PURE__ */l("span",{className:"flex items-center justify-center rounded-full bg-gray-200 font-medium text-gray-600 ring-2 ring-white",style:{width:f,height:f,marginLeft:-d,fontSize:Math.round(.36*f)},children:["+",t(h,g)]})]})}export{c as Avatar,u as AvatarGroup};
@@ -1,7 +1,7 @@
1
- import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},P=o(null),A=t=>e=>{P.current=t,e.currentTarget.setPointerCapture(e.pointerId)},B=t=>e=>{P.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},L=t=>()=>{P.current===t&&(P.current=null)},N=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
- return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:A(t),onPointerMove:B(t),onPointerUp:L(t),onPointerCancel:L(t)},t)};/* @__PURE__ */
1
+ import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-VNTJ7QO5.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},N=o(null),P=t=>e=>{N.current=t,e.currentTarget.setPointerCapture(e.pointerId)},A=t=>e=>{N.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},L=t=>()=>{N.current===t&&(N.current=null)},R=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
+ return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:P(t),onPointerMove:A(t),onPointerUp:L(t),onPointerCancel:L(t)},t)};/* @__PURE__ */
3
3
  return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
4
4
  /* @__PURE__ */n("path",{d:F,fill:e.grid}),
5
5
  /* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
6
6
  /* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
7
- /* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),N("from"),N("to")]})})}export{a as ChartBrush};
7
+ /* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),R("from"),R("to")]})})}export{a as ChartBrush};
@@ -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-H5NIW2KS.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-EOVXFXVV.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",U=e=>e.stopPropagation();function D({images:r,startIndex:y=0,onClose:D,onIndexChange:L,onOpenFile:$}){const z=h().lightbox,A=d(),F=p(null),I=p(null),[J,Q]=x(y),V=r.length,W=A&&V>0,B=b(e=>{if(V<2)return;const t=((J+e)%V+V)%V;Q(t),L?.(t)},[J,V,L]);if(a(W),l(F,W,I),i(W),k(()=>{if(W)return f(()=>(D(),!0),()=>F.current)},[W,D]),k(()=>{if(!W)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),B("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[W,B]),!W)return null;const G=r[Math.min(J,V-1)],O=j(G),P=G.caption||n(G.url);let X;return X="video"===O?/* @__PURE__ */v("video",{src:G.url,controls:!0,playsInline:!0,"aria-label":P,onClick:U,className:`${e} rounded-lg bg-black`}):"file"===O?/* @__PURE__ */w("div",{onClick:U,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
1
+ import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-L433UT5E.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-EOVXFXVV.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-R64OZ6TC.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-VNTJ7QO5.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)]",L=e=>e.stopPropagation();function U({images:r,startIndex:y=0,onClose:U,onIndexChange:V,onOpenFile:$}){const z=h().lightbox,A=d(),D=p(null),F=p(null),[J,O]=x(y),T=r.length,E=A&&T>0,I=b(e=>{if(T<2)return;const t=((J+e)%T+T)%T;O(t),V?.(t)},[J,T,V]);if(a(E),l(D,E,F),i(E),k(()=>{if(E)return f(()=>(U(),!0),()=>D.current)},[E,U]),k(()=>{if(!E)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),I("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E,I]),!E)return null;const P=r[Math.min(J,T-1)],Q=j(P),W=P.caption||n(P.url);let G;return G="video"===Q?/* @__PURE__ */v("video",{src:P.url,controls:!0,playsInline:!0,"aria-label":W,onClick:L,className:`${e} rounded-lg bg-black`}):"file"===Q?/* @__PURE__ */w("div",{onClick:L,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:P}),$?/* @__PURE__ */v(c,{size:"sm",onClick:()=>$(G),children:z.openFile}):/* @__PURE__ */v("a",{href:G.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:z.openFile})]}):/* @__PURE__ */v(t,{src:G.url,alt:P,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
- /* @__PURE__ */w("div",{ref:F,...o({role:"dialog",modal:!0,label:z.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:D,children:[X,
5
- /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:U,children:[
6
- /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:z.counter(J+1,V)}),
7
- /* @__PURE__ */v("button",{ref:I,type:"button",onClick:D,"aria-label":z.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),V>1&&/* @__PURE__ */w(N,{children:[
8
- /* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),B(-1)},"aria-label":z.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
- /* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),B(1)},"aria-label":z.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
- /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:U,children:[
11
- /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:P}),"file"!==O&&/* @__PURE__ */v("a",{href:G.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:z.openOriginal})]})]}),document.body)}export{D as ImageLightbox,j as lightboxKind};
3
+ /* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:W}),$?/* @__PURE__ */v(c,{size:"sm",onClick:()=>$(P),children:z.openFile}):/* @__PURE__ */v("a",{href:P.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:z.openFile})]}):/* @__PURE__ */v(t,{src:P.url,alt:W,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
+ /* @__PURE__ */w("div",{ref:D,...o({role:"dialog",modal:!0,label:z.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:U,children:[G,
5
+ /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:L,children:[
6
+ /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:z.counter(J+1,T)}),
7
+ /* @__PURE__ */v("button",{ref:F,type:"button",onClick:U,"aria-label":z.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),T>1&&/* @__PURE__ */w(N,{children:[
8
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{L(e),I(-1)},"aria-label":z.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{L(e),I(1)},"aria-label":z.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
+ /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:L,children:[
11
+ /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:W}),"file"!==Q&&/* @__PURE__ */v("a",{href:P.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:z.openOriginal})]})]}),document.body)}export{U as ImageLightbox,j as lightboxKind};
@@ -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-Z44JWU75.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-GDQJBQ5B.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:W=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:j="bg-white"}){const z="right"===m,C=i().sidebar,D=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)),I=null!=l||null!=n,R=/* @__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 ${I?"overflow-hidden":"overflow-y-auto"} ${W}`,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:P,onResize:E,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:C.resize})]}),T=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${j}`,children:u});/* @__PURE__ */
4
- return f("div",D?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:O,top:l,fallback:C.sections}),T,
6
- /* @__PURE__ */p(v,{phone:O,bottom:n,label:C.sections,closeLabel:C.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[z?null:R,T,z?R: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-WZMZ3N5B.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-R64OZ6TC.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-VNTJ7QO5.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:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:O="bg-white"}){const W="right"===m,j=i().sidebar,z=a(),T=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}}(),[D,P]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),R=null!=l||null!=n,E=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:D},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${R?"overflow-hidden":"overflow-y-auto"} ${C}`,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:D,onResize:P,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:j.resize})]}),I=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${O}`,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:T,top:l,fallback:j.sections}),I,
6
+ /* @__PURE__ */p(v,{phone:T,bottom:n,label:j.sections,closeLabel:j.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[W?null:E,I,W?E: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{Tabs as e}from"./chunk-N5KO2IHG.js";import{Card as a}from"./chunk-P3RXXWXN.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
1
+ import{Tabs as e}from"./chunk-N5KO2IHG.js";import{Card as a}from"./chunk-ZDDYTXPK.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
2
2
  return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
@@ -1 +1 @@
1
- import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-GDQJBQ5B.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
1
+ import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-VNTJ7QO5.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
@@ -0,0 +1 @@
1
+ var r="11.10.0",a=r;export{a as APP_VERSION,r as VERSION};
@@ -0,0 +1,6 @@
1
+ import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-4UKPDURO.js";import{IconButton_default as a}from"./chunk-LE5LWALR.js";import{Icon as o}from"./chunk-R64OZ6TC.js";import{Tooltip as n}from"./chunk-NJN5IKWO.js";import{useShellStrings as s}from"./chunk-VNTJ7QO5.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
2
+ return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":L,windows:R,className:j="",layout:A="grid"}){const q=s().textToolbar,I=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!I.words&&!I.paragraph)return null;const K=m(n,k,x,I.cells.paragraph),O=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,T=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:O(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:O(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,U=l(q),$=e.map(e=>[e,U[e],r(e)]),B=C?e.filter(e=>C.allow.includes(e)):[],S=C&&B.includes(C.value)?C.value:B[0],E=[["none",q.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",q.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",q.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],J=x&&K?g(q.clear,/* @__PURE__ */i(a,{className:O(!1),"aria-label":q.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,W=/* @__PURE__ */t(d,{children:[T("bold",q.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),T("italic",q.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),T("underline",q.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),T("strike",q.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(q.color,/* @__PURE__ */i(a,{pressed:k.open,className:O(k.open,"rosh-tb-color"),"aria-label":q.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,T("link",q.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),T("sup",q.sup,/* @__PURE__ */i(o,{name:"superscript"})),T("sub",q.sub,/* @__PURE__ */i(o,{name:"subscript"})),T("code",q.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===K?J:null]}),H=/* @__PURE__ */t(d,{children:[C&&B.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.alignment,onKeyDown:e=>p(e,B,e=>C.onChange(e)),children:$.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:O(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===S?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(q.bullet,/* @__PURE__ */i(a,{className:O("bullet"===D.pressed),"aria-label":q.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(q.number,/* @__PURE__ */i(a,{className:O("number"===D.pressed),"aria-label":q.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,T("quote",q.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.letterCase,onKeyDown:e=>p(e,E.map(([e])=>e),e=>M.onChange(e)),children:E.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:O(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===K?J:null]}),P="row"===A,Q=P?" is-row":I.flow?" is-flow":I.oneRow?" is-one-row":I.words&&void 0===N&&"words"!==K?" is-eight":"",V=b(n,Boolean(k)),Z={"--rosh-tb-color-col":String(V.color),"--rosh-tb-link-col":String(V.link),...P?{"--rosh-tb-cells":String(I.cells.words+I.cells.paragraph),"--rosh-tb-groupgap":I.words&&I.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let z;return z=P?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[I.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:W}):null,I.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:H}):null]}):I.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[W,
3
+ /* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),H]}):I.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
4
+ /* @__PURE__ */i("div",{className:"rosh-tb-words",children:W}),
5
+ /* @__PURE__ */i("div",{className:"rosh-tb-para",children:H})]}):/* @__PURE__ */t(d,{children:[I.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==K?" is-eight":""),children:W}):null,I.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:H}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${Q} ${j}`.trim(),style:Z,children:[
6
+ /* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":L??q.formatting,children:z}),R]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
@@ -1,5 +1,5 @@
1
- import{Icon as e}from"./chunk-2UO47XB4.js";import{Tooltip as t}from"./chunk-NJN5IKWO.js";import{useShellStrings as n}from"./chunk-GDQJBQ5B.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,N=i(),y=["es-default-reset"];if(c&&y.push("is-changed"),k&&y.push(k),!c&&h)return y.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:y.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:y.join(" "),"aria-hidden":"true"});const x="desktop"===u,g=p??(x?j.resetName(o):j.inheritName(o)),T=b?j.backTo(b):x?j.backToDefault:j.backToAuto,q=m??(b?j.tip(g,T):g);
1
+ import{Icon as e}from"./chunk-R64OZ6TC.js";import{Tooltip as t}from"./chunk-NJN5IKWO.js";import{useShellStrings as n}from"./chunk-VNTJ7QO5.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,N=i(),y=["es-default-reset"];if(c&&y.push("is-changed"),k&&y.push(k),!c&&h)return y.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:y.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:y.join(" "),"aria-hidden":"true"});const T="desktop"===u,x=p??(T?j.resetName(o):j.inheritName(o)),g=b?j.backTo(b):T?j.backToDefault:j.backToAuto,q=m??(b?j.tip(x,g):x);
2
2
  /* @__PURE__ */
3
3
  return r(t,{content:q,describe:!1,children:[
4
- /* @__PURE__ */a("button",{type:"button",className:y.join(" "),"aria-label":g,"aria-describedby":N,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
5
- /* @__PURE__ */a("span",{id:N,hidden:!0,children:T})]})}export{o as SettingReset};
4
+ /* @__PURE__ */a("button",{type:"button",className:y.join(" "),"aria-label":x,"aria-describedby":N,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
5
+ /* @__PURE__ */a("span",{id:N,hidden:!0,children:g})]})}export{o as SettingReset};