efficient-shell 10.14.0 → 10.15.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 (337) hide show
  1. package/README.md +16 -6
  2. package/dist/{Browser-LAMGXJI6.js → Browser-WR4GMYE7.js} +14 -14
  3. package/dist/Calculator-MV5JVQBS.js +29 -0
  4. package/dist/{CurrencyConverter-577XB7A3.js → CurrencyConverter-HEAAQX23.js} +7 -7
  5. package/dist/{Documents-DW7I624C.js → Documents-NSPKXCTF.js} +14 -14
  6. package/dist/{Files-VLSMINW5.js → Files-5HAUE2PR.js} +63 -63
  7. package/dist/{Notepad-54H6KCGS.js → Notepad-5LSFAYXO.js} +9 -9
  8. package/dist/PdfViewer-LU5JKHSG.js +1 -0
  9. package/dist/{PomodoroTimer-CXJVY7U3.js → PomodoroTimer-5V32QOCZ.js} +20 -20
  10. package/dist/{Preview-OWMTJFTO.js → Preview-PDVZZRSK.js} +30 -30
  11. package/dist/{Sidebar-7RR5WNIF.js → Sidebar-E3VDFBF6.js} +32 -32
  12. package/dist/{Spreadsheet-HWNS4TSX.js → Spreadsheet-K4IAI3A2.js} +12 -12
  13. package/dist/{Stock-M4TDRNCI.js → Stock-AOCHAKUF.js} +3 -3
  14. package/dist/{Weather-K634BVDX.js → Weather-F2QHTG32.js} +18 -18
  15. package/dist/{WorldClock-56CYOGR2.js → WorldClock-G72577HU.js} +6 -6
  16. package/dist/ai/index.d.ts +1 -1
  17. package/dist/ai/index.js +56 -54
  18. package/dist/ai.css +1 -1
  19. package/dist/apps/index.js +1 -1
  20. package/dist/bin/media-host-check.js +1 -1
  21. package/dist/bin/ui-check.js +1 -1
  22. package/dist/brand.css +1 -1
  23. package/dist/charts/BoxPlotChart.js +1 -1
  24. package/dist/charts/CandlestickChart.js +1 -1
  25. package/dist/charts/CartesianPlot.js +1 -1
  26. package/dist/charts/ChartTooltip.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.js +1 -1
  29. package/dist/charts/FunnelChart.js +1 -1
  30. package/dist/charts/HeatmapChart.js +1 -1
  31. package/dist/charts/HistogramChart.js +1 -1
  32. package/dist/charts/PieChart.js +1 -1
  33. package/dist/charts/RadarChart.js +1 -1
  34. package/dist/charts/RadialBarChart.js +1 -1
  35. package/dist/charts/RangeChart.js +1 -1
  36. package/dist/charts/SankeyChart.js +1 -1
  37. package/dist/charts/ScatterChart.js +1 -1
  38. package/dist/charts/SpecChart.js +1 -1
  39. package/dist/charts/SunburstChart.js +1 -1
  40. package/dist/charts/TimeSeriesChart.js +1 -1
  41. package/dist/charts/TreemapChart.js +1 -1
  42. package/dist/charts/WaterfallChart.js +1 -1
  43. package/dist/{chunk-3BYLHJLC.js → chunk-25M7CYCR.js} +8 -8
  44. package/dist/chunk-26LO7XCK.js +2 -0
  45. package/dist/{chunk-ALWVHNUO.js → chunk-2JG5JU4M.js} +4 -4
  46. package/dist/{chunk-QNK2I4IH.js → chunk-2RAOWHHM.js} +12 -12
  47. package/dist/{chunk-KKSVRIMP.js → chunk-2UO47XB4.js} +8 -3
  48. package/dist/{chunk-ULXCDM7Y.js → chunk-36R3R3IB.js} +4 -4
  49. package/dist/{chunk-O4V5PEA3.js → chunk-3AH524CN.js} +1 -1
  50. package/dist/{chunk-OZBM2XFQ.js → chunk-3EJ64VKE.js} +1 -1
  51. package/dist/chunk-3GHTOSJP.js +14 -0
  52. package/dist/chunk-4AQ67NP2.js +15 -0
  53. package/dist/{chunk-QPJQJRHZ.js → chunk-4U57ANZF.js} +4 -4
  54. package/dist/{chunk-QHOBK35Y.js → chunk-4VTJEKHX.js} +1 -1
  55. package/dist/{chunk-H64JJSXC.js → chunk-4XS32UWF.js} +4 -4
  56. package/dist/{chunk-A4HJDSRA.js → chunk-55W5TTKS.js} +6 -6
  57. package/dist/{chunk-SDQIXE5M.js → chunk-5FRFSPQ2.js} +8 -8
  58. package/dist/{chunk-GBCH3UHD.js → chunk-5JU53T3U.js} +17 -17
  59. package/dist/{chunk-3ELLBQPS.js → chunk-5LCDCO46.js} +1 -1
  60. package/dist/{chunk-YJLLLO5R.js → chunk-5LXT3IUL.js} +1 -1
  61. package/dist/{chunk-GISDIVFK.js → chunk-5N5AAYQV.js} +1 -1
  62. package/dist/{chunk-SMUH7NAN.js → chunk-66XPG5G3.js} +1 -1
  63. package/dist/chunk-6BB6A5OB.js +6 -0
  64. package/dist/chunk-6C6TRDNI.js +1 -0
  65. package/dist/chunk-6WSH6D5N.js +29 -0
  66. package/dist/chunk-7LQGPMRP.js +3 -0
  67. package/dist/{chunk-KOBYM5JV.js → chunk-7MSC3Z5H.js} +12 -12
  68. package/dist/{chunk-D7F442OZ.js → chunk-7PSIPTOE.js} +1 -1
  69. package/dist/{chunk-SO6X4CII.js → chunk-A267MPGS.js} +1 -1
  70. package/dist/{chunk-ORIGX2H5.js → chunk-AJFR35CO.js} +4 -4
  71. package/dist/{chunk-JBOMPD3V.js → chunk-AJFWBEIG.js} +9 -9
  72. package/dist/{chunk-ZNAVCHBV.js → chunk-AJVUND5A.js} +6 -6
  73. package/dist/chunk-ALDGSODF.js +2 -0
  74. package/dist/chunk-ARCQYF7G.js +23 -0
  75. package/dist/{chunk-UNRPRMQO.js → chunk-B25RVAVS.js} +44 -44
  76. package/dist/{chunk-FFIQPFUR.js → chunk-B37JVKW5.js} +1 -1
  77. package/dist/chunk-CDA2VXBN.js +8 -0
  78. package/dist/{chunk-JRZ7PPVJ.js → chunk-CFAELIKH.js} +6 -6
  79. package/dist/{chunk-7PUVPDUZ.js → chunk-CHAWFMV4.js} +4 -4
  80. package/dist/chunk-CNLYFW47.js +9 -0
  81. package/dist/{chunk-XNKIDGZW.js → chunk-CRILBBSU.js} +1 -1
  82. package/dist/{chunk-XAROKI7X.js → chunk-E5QPXEKN.js} +2 -2
  83. package/dist/chunk-EFU4Z66K.js +8 -0
  84. package/dist/{chunk-BS7IPLRR.js → chunk-EHGGSUXA.js} +1 -1
  85. package/dist/{chunk-F6JDUMM7.js → chunk-EK5WJQTR.js} +1 -1
  86. package/dist/{chunk-TXDA7TTP.js → chunk-EQZZ4V5X.js} +1 -1
  87. package/dist/{chunk-NSLQ3UYJ.js → chunk-ESYYKGN4.js} +2 -2
  88. package/dist/{chunk-URERZUX5.js → chunk-EXJXOKUU.js} +1 -1
  89. package/dist/{chunk-EYZZW6SO.js → chunk-EYEB3J77.js} +5 -5
  90. package/dist/{chunk-RBQWIHYD.js → chunk-F2R3UFNQ.js} +1 -1
  91. package/dist/{chunk-LOFYSLC7.js → chunk-FFZREKEF.js} +9 -9
  92. package/dist/{chunk-2VTO64YC.js → chunk-FGJOGBGZ.js} +8 -8
  93. package/dist/{chunk-MXH3UPCH.js → chunk-FJYTYW6M.js} +5 -5
  94. package/dist/chunk-FQIA5BTN.js +22 -0
  95. package/dist/{chunk-37U326EL.js → chunk-FRVNDEV2.js} +11 -11
  96. package/dist/{chunk-LDE5IV2M.js → chunk-FUVVO6YP.js} +1 -1
  97. package/dist/chunk-FX6DBXXD.js +1 -0
  98. package/dist/{chunk-7JGR7WPD.js → chunk-G4JTO5PB.js} +1 -1
  99. package/dist/{chunk-3RORPK2J.js → chunk-G7QK7WAK.js} +1 -1
  100. package/dist/{chunk-TVH7IZQ4.js → chunk-GKIU55T5.js} +2 -2
  101. package/dist/{chunk-RQSVBXBV.js → chunk-HL3DJTIC.js} +7 -7
  102. package/dist/{chunk-KUMEDH5M.js → chunk-HRPXJ4EI.js} +1 -1
  103. package/dist/chunk-HXNMRJQ4.js +2 -0
  104. package/dist/{chunk-SCPCZCYQ.js → chunk-IC7BEFE3.js} +1 -1
  105. package/dist/chunk-IFA2EOAF.js +4 -0
  106. package/dist/chunk-JEH5EVIG.js +1 -0
  107. package/dist/{chunk-DRDYZ633.js → chunk-KJCTXWF7.js} +2 -2
  108. package/dist/{chunk-F5FNYNHF.js → chunk-KKOADH55.js} +1 -1
  109. package/dist/chunk-KMEERBZV.js +2 -0
  110. package/dist/chunk-KORKSPHQ.js +6 -0
  111. package/dist/{chunk-QODTON7V.js → chunk-LJN77RG6.js} +1 -1
  112. package/dist/{chunk-63L5ORRZ.js → chunk-LPXMHYTM.js} +1 -1
  113. package/dist/{chunk-JGFY54A4.js → chunk-LVBO2OMQ.js} +2 -2
  114. package/dist/{chunk-M3OYHYIS.js → chunk-LWEWURFT.js} +13 -13
  115. package/dist/chunk-LWWMRL2Y.js +5 -0
  116. package/dist/chunk-M4K6FLIY.js +1 -0
  117. package/dist/{chunk-O6JJIR4H.js → chunk-M5LR7ZZX.js} +1 -1
  118. package/dist/{chunk-UWIZX3RK.js → chunk-MCYFUIXH.js} +1 -1
  119. package/dist/{chunk-N67QX3WW.js → chunk-MMQ6ETRD.js} +2 -2
  120. package/dist/chunk-MNZ7MGAT.js +2 -0
  121. package/dist/{chunk-2K2W6VIR.js → chunk-N2RHM432.js} +1 -1
  122. package/dist/{chunk-CAVADOJK.js → chunk-N3YBOXOF.js} +1 -1
  123. package/dist/{chunk-LTKXAHS3.js → chunk-N4REWGMM.js} +8 -8
  124. package/dist/{chunk-7X5FABQS.js → chunk-NBB2RKDH.js} +5 -5
  125. package/dist/{chunk-C2P2Z6HU.js → chunk-NBVHJZVS.js} +14 -14
  126. package/dist/chunk-NLGMJGD6.js +14 -0
  127. package/dist/{chunk-CKKUFDZ3.js → chunk-NWURIQI3.js} +3 -3
  128. package/dist/{chunk-AZ3AR7U7.js → chunk-NZCSLS4O.js} +3 -3
  129. package/dist/{chunk-3NW5LD7D.js → chunk-NZQCDFDG.js} +3 -3
  130. package/dist/chunk-OAT7OEWP.js +11 -0
  131. package/dist/chunk-OET2Q7P6.js +19 -0
  132. package/dist/{chunk-ISJPW2FZ.js → chunk-OSVY6SUO.js} +5 -5
  133. package/dist/{chunk-KP2THXEI.js → chunk-PB3OC4BO.js} +8 -8
  134. package/dist/{chunk-MBXLROCD.js → chunk-POQ4ETLL.js} +1 -1
  135. package/dist/{chunk-I2XGPTCN.js → chunk-PUBJ5YHQ.js} +1 -1
  136. package/dist/{chunk-6XBWM453.js → chunk-Q3IR5SKD.js} +1 -1
  137. package/dist/{chunk-P5YFQ4IQ.js → chunk-RDYFZHT3.js} +1 -1
  138. package/dist/chunk-RFEET2LS.js +9 -0
  139. package/dist/chunk-RSS2ALHH.js +9 -0
  140. package/dist/{chunk-PXQG5EIH.js → chunk-S52GQQVB.js} +1 -1
  141. package/dist/{chunk-MVZRZTQP.js → chunk-S5SRXI4V.js} +1 -1
  142. package/dist/chunk-SCYL5V5X.js +20 -0
  143. package/dist/chunk-SM7IDX7Y.js +1 -0
  144. package/dist/chunk-SOGQZVPJ.js +6 -0
  145. package/dist/{chunk-UYRITNQW.js → chunk-SP2AUVIU.js} +3 -3
  146. package/dist/{chunk-34URULVW.js → chunk-SQCUN2DX.js} +1 -1
  147. package/dist/{chunk-67JCJ2MG.js → chunk-SSM3EN7G.js} +1 -1
  148. package/dist/chunk-TIPU74XW.js +22 -0
  149. package/dist/{chunk-SOECV4V5.js → chunk-TXNCDDB4.js} +3 -3
  150. package/dist/{chunk-MUMQ6PW7.js → chunk-U2RFKQVA.js} +1 -1
  151. package/dist/{chunk-VZ4PBHFN.js → chunk-U2WCV56F.js} +1 -1
  152. package/dist/{chunk-W6SC3ZNO.js → chunk-UPCLAEKC.js} +2 -2
  153. package/dist/chunk-UUKTYAWY.js +7 -0
  154. package/dist/{chunk-MKQZINBW.js → chunk-UWIFXNH6.js} +3 -3
  155. package/dist/{chunk-DDCMMOB4.js → chunk-V2MIQ4GJ.js} +2 -2
  156. package/dist/chunk-V6F42DX3.js +11 -0
  157. package/dist/chunk-VWEG2WM4.js +12 -0
  158. package/dist/{chunk-G4GVLK44.js → chunk-WZ5QSSUM.js} +6 -6
  159. package/dist/{chunk-CHBRMAJV.js → chunk-XDBG4HPV.js} +1 -1
  160. package/dist/chunk-XIB72X74.js +2 -0
  161. package/dist/{chunk-YWDEFPSW.js → chunk-XJUREXYW.js} +3 -3
  162. package/dist/{chunk-WINNA7LS.js → chunk-XPPLCLYK.js} +1 -1
  163. package/dist/{chunk-7YOQS3C6.js → chunk-XTCXX5LJ.js} +1 -1
  164. package/dist/{chunk-6U6WVU5F.js → chunk-YFMZKTJC.js} +1 -1
  165. package/dist/{chunk-C2L33LDZ.js → chunk-YLGQ6ACR.js} +2 -2
  166. package/dist/chunk-ZE5TNYWX.js +7 -0
  167. package/dist/{chunk-LCJRTJXT.js → chunk-ZHPHNQKM.js} +7 -7
  168. package/dist/{chunk-AGG4RFXR.js → chunk-ZI6SMZJ4.js} +11 -11
  169. package/dist/{chunk-ZZOBG6GP.js → chunk-ZL5OSF26.js} +19 -19
  170. package/dist/{chunk-PBWUEBJ5.js → chunk-ZL7O4KGQ.js} +1 -1
  171. package/dist/{chunk-CPZ42W2B.js → chunk-ZLSUQAD3.js} +1 -1
  172. package/dist/{chunk-TKJBZIHT.js → chunk-ZMRGHVKS.js} +1 -1
  173. package/dist/chunk-ZO244TWH.js +8 -0
  174. package/dist/{chunk-GSKLHUQ6.js → chunk-ZW3IDCP2.js} +1 -1
  175. package/dist/{chunk-IKNG7EFQ.js → chunk-ZZTCYEQ4.js} +7 -7
  176. package/dist/data/DataTable.js +1 -1
  177. package/dist/data/Kanban.js +1 -1
  178. package/dist/data/ListLoadError.js +1 -1
  179. package/dist/format/index.js +1 -1
  180. package/dist/forms/AlignmentGrid.js +1 -1
  181. package/dist/forms/BorderInput.js +1 -1
  182. package/dist/forms/BrandAssetEditor.js +1 -1
  183. package/dist/forms/Button.js +1 -1
  184. package/dist/forms/Calendar.js +1 -1
  185. package/dist/forms/ColorPicker.js +1 -1
  186. package/dist/forms/ComposerAttachments.js +1 -1
  187. package/dist/forms/CornersInput.js +1 -1
  188. package/dist/forms/DatePicker.js +1 -1
  189. package/dist/forms/DateRangePicker.js +1 -1
  190. package/dist/forms/DisplayChips.js +1 -1
  191. package/dist/forms/FilePicker.js +1 -1
  192. package/dist/forms/IconButton.js +1 -1
  193. package/dist/forms/IconPicker.js +1 -1
  194. package/dist/forms/InputNumber.js +1 -1
  195. package/dist/forms/LinkPicker.js +1 -1
  196. package/dist/forms/MediaLibrary.js +1 -1
  197. package/dist/forms/MediaUploadField.js +1 -1
  198. package/dist/forms/MediaUploadGrid.js +1 -1
  199. package/dist/forms/MediaUsedInList.js +1 -1
  200. package/dist/forms/NumericKeypad.js +1 -1
  201. package/dist/forms/PictureTiles.js +1 -1
  202. package/dist/forms/PositionInput.js +1 -1
  203. package/dist/forms/Segmented.js +1 -1
  204. package/dist/forms/Select.d.ts +1 -1
  205. package/dist/forms/Select.js +1 -1
  206. package/dist/forms/SidesInput.js +1 -1
  207. package/dist/forms/Slider.js +1 -1
  208. package/dist/forms/Snippet.js +1 -1
  209. package/dist/forms/SplitButton.js +1 -1
  210. package/dist/forms/TagInput.js +1 -1
  211. package/dist/forms/TextToolbar.d.ts +1 -1
  212. package/dist/forms/TextToolbar.js +1 -1
  213. package/dist/forms/WidthsBar.js +1 -1
  214. package/dist/forms/mediaLibraryMenu.js +1 -1
  215. package/dist/forms/textAlign.d.ts +1 -1
  216. package/dist/forms/textAlign.js +1 -1
  217. package/dist/icons/efficient-glyphs.d.ts +1 -0
  218. package/dist/icons/efficient-glyphs.js +1 -1
  219. package/dist/icons/efficient-looks.d.ts +2 -0
  220. package/dist/icons/efficient-looks.js +1 -1
  221. package/dist/icons/efficient-meanings.d.ts +1 -0
  222. package/dist/icons/efficient-meanings.js +1 -1
  223. package/dist/icons/efficient.d.ts +1 -0
  224. package/dist/icons/efficient.js +1 -1
  225. package/dist/icons/glyphs/EnterIcon.d.ts +8 -0
  226. package/dist/icons/glyphs/EnterIcon.js +1 -0
  227. package/dist/icons/index.d.ts +2 -2
  228. package/dist/icons/index.js +1 -1
  229. package/dist/icons/looks/EnterMiniIcon.d.ts +8 -0
  230. package/dist/icons/looks/EnterMiniIcon.js +1 -0
  231. package/dist/icons/looks/EnterSolidIcon.d.ts +8 -0
  232. package/dist/icons/looks/EnterSolidIcon.js +1 -0
  233. package/dist/icons/looks/map.js +1 -1
  234. package/dist/icons/sets.js +1 -1
  235. package/dist/index.d.ts +1 -1
  236. package/dist/index.js +279 -279
  237. package/dist/map/index.js +7 -7
  238. package/dist/markdown/index.js +1 -1
  239. package/dist/{names-CwzeaUf6.d.ts → names-Bmx_9y41.d.ts} +1 -1
  240. package/dist/page-tabs/index.js +5 -5
  241. package/dist/pdf/index.js +1 -1
  242. package/dist/shell/AppUpdateBanner.js +1 -1
  243. package/dist/shell/Banner.js +1 -1
  244. package/dist/shell/Breadcrumbs.js +1 -1
  245. package/dist/shell/ColoredBadge.js +1 -1
  246. package/dist/shell/ConfirmDialog.js +1 -1
  247. package/dist/shell/ContextMenu.js +1 -1
  248. package/dist/shell/Dialog.js +1 -1
  249. package/dist/shell/Drawer.js +1 -1
  250. package/dist/shell/DropdownMenu.js +1 -1
  251. package/dist/shell/EditableGrid.js +1 -1
  252. package/dist/shell/EmptyState.js +1 -1
  253. package/dist/shell/FloatingBar.js +1 -1
  254. package/dist/shell/GlobalSearch.js +1 -1
  255. package/dist/shell/HelpCenter.js +1 -1
  256. package/dist/shell/IconRail.js +1 -1
  257. package/dist/shell/ImageLightbox.js +1 -1
  258. package/dist/shell/ItemCount.js +1 -1
  259. package/dist/shell/LanguageSelect.js +1 -1
  260. package/dist/shell/Markdown.d.ts +1 -1
  261. package/dist/shell/Markdown.js +1 -1
  262. package/dist/shell/MilestoneTimeline.js +1 -1
  263. package/dist/shell/PageHeader.js +1 -1
  264. package/dist/shell/Popover.js +1 -1
  265. package/dist/shell/PopupMenu.js +1 -1
  266. package/dist/shell/ProductionTimeline.js +1 -1
  267. package/dist/shell/ResizeHandle.js +1 -1
  268. package/dist/shell/Result.js +1 -1
  269. package/dist/shell/SearchableSelect.js +1 -1
  270. package/dist/shell/SettingReset.js +1 -1
  271. package/dist/shell/SettingRow.js +1 -1
  272. package/dist/shell/SidebarLayout.js +1 -1
  273. package/dist/shell/SidebarNav.js +1 -1
  274. package/dist/shell/SortableList.js +1 -1
  275. package/dist/shell/StatusBadge.js +1 -1
  276. package/dist/shell/StepChain.js +1 -1
  277. package/dist/shell/Stepper.js +1 -1
  278. package/dist/shell/Tabs.js +1 -1
  279. package/dist/shell/TimelineTrack.js +1 -1
  280. package/dist/shell/Tooltip.js +1 -1
  281. package/dist/shell/TopNav.js +1 -1
  282. package/dist/shell/TransferProgress.js +1 -1
  283. package/dist/shell/Tree.js +1 -1
  284. package/dist/shell/discardGuard.js +1 -1
  285. package/dist/telemetry/index.js +1 -1
  286. package/dist/templates/AuthScreen.js +1 -1
  287. package/dist/templates/ChatTemplate.js +1 -1
  288. package/dist/templates/CheckoutTemplate.js +1 -1
  289. package/dist/templates/DashboardTemplate.js +1 -1
  290. package/dist/templates/DataTablePage.js +1 -1
  291. package/dist/templates/EmailTemplate.js +1 -1
  292. package/dist/templates/ErrorBoundary.js +1 -1
  293. package/dist/templates/FormLayoutPage.js +1 -1
  294. package/dist/templates/GalleryTemplate.js +1 -1
  295. package/dist/tokens/colour.d.ts +2 -2
  296. package/dist/ui/index.d.ts +1 -1
  297. package/dist/ui/index.js +1 -1
  298. package/dist/version.js +1 -1
  299. package/package.json +1 -1
  300. package/dist/Calculator-ZFMTTDQ6.js +0 -29
  301. package/dist/PdfViewer-Z4YKDHIH.js +0 -1
  302. package/dist/chunk-3GL4OVBB.js +0 -1
  303. package/dist/chunk-47EYPWCB.js +0 -14
  304. package/dist/chunk-7YZ5TUXE.js +0 -11
  305. package/dist/chunk-A5BV6NFA.js +0 -7
  306. package/dist/chunk-CGQAKGPT.js +0 -8
  307. package/dist/chunk-COJYPNKF.js +0 -2
  308. package/dist/chunk-DWMOUDMX.js +0 -1
  309. package/dist/chunk-E3HSZQFI.js +0 -22
  310. package/dist/chunk-EDKRGYZX.js +0 -9
  311. package/dist/chunk-EU3JZGV2.js +0 -14
  312. package/dist/chunk-FZO6H3ZB.js +0 -6
  313. package/dist/chunk-I4VIEGCX.js +0 -2
  314. package/dist/chunk-IKMWKOT5.js +0 -1
  315. package/dist/chunk-JAKOZNZK.js +0 -2
  316. package/dist/chunk-JSGQWVYH.js +0 -7
  317. package/dist/chunk-KZMJE24J.js +0 -5
  318. package/dist/chunk-KZX25YEW.js +0 -22
  319. package/dist/chunk-L3QNKCXH.js +0 -11
  320. package/dist/chunk-LKTBKVN6.js +0 -8
  321. package/dist/chunk-PN65IIYN.js +0 -8
  322. package/dist/chunk-PUF75SMJ.js +0 -1
  323. package/dist/chunk-QKWYCOMM.js +0 -23
  324. package/dist/chunk-R7APUBZB.js +0 -29
  325. package/dist/chunk-RCPFUDPS.js +0 -4
  326. package/dist/chunk-SWN3LSQX.js +0 -12
  327. package/dist/chunk-TMNAHOJ7.js +0 -9
  328. package/dist/chunk-UBOP6HFI.js +0 -6
  329. package/dist/chunk-UWK5Q3R4.js +0 -19
  330. package/dist/chunk-W6URVLQF.js +0 -20
  331. package/dist/chunk-WTTSB4SV.js +0 -3
  332. package/dist/chunk-XBB6LSSB.js +0 -6
  333. package/dist/chunk-Y3R267FV.js +0 -15
  334. package/dist/chunk-YGSU5KCP.js +0 -9
  335. package/dist/chunk-ZTPMMNAZ.js +0 -1
  336. /package/dist/{chunk-744BFBBV.js → chunk-6V6ANLHW.js} +0 -0
  337. /package/dist/{chunk-S2P74CBN.js → chunk-ID6WFAXW.js} +0 -0
package/README.md CHANGED
@@ -4329,7 +4329,7 @@ import { AssistantChat } from 'efficient-shell/ai';
4329
4329
  (everyone in it but the reader), a draft goes to the assistant only when it
4330
4330
  names `labels.assistantMention` ("@JARVIS"), as a word of its own and in any
4331
4331
  case (`mentionsAssistant`); any other draft is posted to
4332
- `<apiBase>/assistant/chat/<id>/messages/` and nobody answers it. A line above
4332
+ `<apiBase>/assistant/chat/<id>/messages/` and nobody answers it. A line under
4333
4333
  the box says which it will be (`labels.toPeople` / `labels.toAssistant`), and
4334
4334
  **Ask the assistant** (`labels.askAssistant`) puts the mention in front of the
4335
4335
  draft. A draft with files always asks. A message someone else wrote
@@ -4349,7 +4349,7 @@ import { AssistantChat } from 'efficient-shell/ai';
4349
4349
  people outright: the chat first posts it to
4350
4350
  `<apiBase>/assistant/chat/<id>/addressee/` and reads `{to_assistant}`. True
4351
4351
  asks it as a question, false posts it to the people; a failed call is false.
4352
- Meanwhile Send shows its loading part and the line says `labels.deciding`.
4352
+ Meanwhile ↵ shows a spinner and the line says `labels.deciding`.
4353
4353
  The line reads `labels.assistantDecides`, and **People only**
4354
4354
  (`labels.peopleOnly`) sends to the people without asking the server until
4355
4355
  **Let the assistant decide** (`labels.letAssistantDecide`) turns it back. A
@@ -4387,24 +4387,34 @@ import { AssistantChat } from 'efficient-shell/ai';
4387
4387
  `labels.approvalExpired` instead of Approve and Deny, turning over by itself
4388
4388
  while the card is on screen; a plan the server marked `expired` does the
4389
4389
  same. `approvalExpiries(message)` reads the times.
4390
+ * **The composer** is one rounded box, as Claude's: **+** to attach files
4391
+ (with `attachments`), the draft, the host's `composerActions`, and ↵, which
4392
+ sends as Enter does (Shift+Enter breaks the line). There is no labelled Send
4393
+ button; ↵ is named `labels.send` for a screen reader, and becomes a stop
4394
+ button (`labels.stop`) while an answer streams. In a shared chat the line
4395
+ saying who the draft goes to, and its one button, sit under the box. Where
4396
+ the header is hidden, New chat is a pencil (`compose`) at the start of the
4397
+ box, apart from the attaching +. A colleague's message and the assistant's
4398
+ named answer are filled with `--surface`, apart from the thread's own
4399
+ `--surface-sunken`.
4390
4400
  * **Host actions on the person's text.** `userMessageActions` is a
4391
4401
  right-click menu on each of the person's own messages and `composerActions`
4392
- buttons beside Send (an icon button when the action names an `icon`); each
4402
+ buttons beside ↵ (an icon button when the action names an `icon`); each
4393
4403
  `AssistantTextAction` is handed the text (the message, or the trimmed draft,
4394
4404
  which it does not send or clear). `initialQuestion` makes a NEW chat ask
4395
4405
  that question as it mounts, once; it is never sent over a restored
4396
4406
  `conversationId`. The admin portal's saved questions use all three.
4397
4407
  * **Attaching files.** `attachments` (`AssistantAttachmentsConfig`) puts a
4398
- paperclip beside the composer and makes it a drop and paste target, checked
4408
+ **+** at the start of the composer box and makes it a drop and paste target, checked
4399
4409
  against the host's `accept`, `maxSizeBytes` and `maxFiles` (default 5) with
4400
4410
  the kit's file intake. Each file goes to the host's `upload` as soon as it is
4401
4411
  picked and shows as a chip (uploading, stored, or the refusal the upload
4402
- rejected with); Send waits for the uploads. A question carries its files as
4412
+ rejected with), inside the box; sending waits for the uploads. A question carries its files as
4403
4413
  `file` parts naming the server's copies (`attachmentPart`; never the bytes),
4404
4414
  `buildRequestBody` sends their ids as `attachments`, and a restored thread
4405
4415
  rebuilds them from each message's `attachments`. Each file shows above its
4406
4416
  question; a click hands it to the host's `onOpen` (the admin portal: Preview,
4407
- UI-18). Without the prop there is no paperclip and the request is unchanged.
4417
+ UI-18). Without the prop there is no **+** and the request is unchanged.
4408
4418
  * **Rating answers.** With `onRate`, a finished answer the server named a run
4409
4419
  for (`run_id` on the stream's `finish` metadata, and on each answer of a
4410
4420
  restored thread, with the person's `rating`) gets thumbs up and down under
@@ -1,29 +1,29 @@
1
- import{peekBrowserStartUrl as e,claimBrowserStartUrl as t}from"./chunk-LWLCNQY7.js";import{AboutApp as o}from"./chunk-NSLQ3UYJ.js";import{WindowTitle as r}from"./chunk-UNRPRMQO.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-URERZUX5.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-RBQWIHYD.js";import{confirm as n}from"./chunk-GBCH3UHD.js";import"./chunk-KZMJE24J.js";import"./chunk-KC3EX26K.js";import"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-S2P74CBN.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-UGTRSRIW.js";import"./chunk-PXQG5EIH.js";import"./chunk-CDAJKLGL.js";import"./chunk-DWMOUDMX.js";import"./chunk-37U326EL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as s}from"./chunk-KKSVRIMP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useRef as a,useEffect as i,useState as l}from"react";import{jsxs as c,jsx as m,Fragment as u}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",h="react-os-shell:browser-homepage",p="https://en.wikipedia.org/wiki/Main_Page",b=[{label:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"},{label:"DevDocs",url:"https://devdocs.io"},{label:"Example",url:"https://example.com"}],k=new Set(["ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi","bj bm bn bo br bs bt bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu cv","cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga gd","ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il","im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc","li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms mt mu","mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph pk pl","pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sk sl sm sn","so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt tv tw tz","ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw","com net org edu gov mil int info biz name pro app dev xyz online site tech","store shop cloud design digital agency studio media news blog live life","world today email systems solutions services software page link space host","press wiki team group works careers finance capital energy academy"].join(" ").split(" "));function g(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:function(e){const t=/^([\w-]+\.)+([a-z]{2,})(\/.*)?$/i.exec(e);return null!==t&&k.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var f=["duckduckgo.com","developer.mozilla.org","google.com","gmail.com","youtube.com","facebook.com","instagram.com","whatsapp.com","twitter.com","x.com","github.com","gitlab.com","linkedin.com","reddit.com","pinterest.com","amazon.com","amazon.ca","amazon.co.uk","apple.com","icloud.com","microsoft.com","outlook.com","live.com","office.com","netflix.com","spotify.com","paypal.com","stripe.com","chat.openai.com","chatgpt.com","claude.ai"];function x(){if("undefined"==typeof window)return b;try{const e=localStorage.getItem(d);if(!e)return b;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e?.url))return t}catch{}return b}function w(){return"undefined"==typeof window?p:localStorage.getItem(h)||p}function y(){const u=a(void 0);void 0===u.current&&(u.current=e()),i(()=>{null!=u.current&&t(u.current)},[]);const p=u.current?g(u.current.url):"",[b,k]=l(w),[f,y]=l(p||b),[j,C]=l(f),[W,R]=l([f]),[z,U]=l(0),[D,S]=l(0),[E,H]=l(x),[M,L]=l(!1),[T,P]=l(null),J=a(null),Q=a(null);i(()=>{try{localStorage.setItem(d,JSON.stringify(E))}catch{}},[E]);const X=e=>{const t=g(e);t&&(y(t),C(t),R(e=>{const o=e.slice(0,z+1);return o.push(t),o}),U(e=>e+1),L(!1))},G=()=>{"undefined"!=typeof window&&window.open(f,"_blank","noopener,noreferrer")},K=()=>{const e=T?.trim();e?(H(t=>[...t,{label:e,url:f}]),P(null)):P(null)};i(()=>{if(null===T)return;J.current?.focus(),J.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||P(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==T]);const I=e=>{H(t=>t.filter((t,o)=>o!==e))},O=z>0,B=z<W.length-1,A=E.some(e=>e.url===f),V="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
1
+ import{peekBrowserStartUrl as e,claimBrowserStartUrl as t}from"./chunk-LWLCNQY7.js";import{AboutApp as o}from"./chunk-ESYYKGN4.js";import{WindowTitle as r}from"./chunk-B25RVAVS.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EXJXOKUU.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-F2R3UFNQ.js";import{confirm as n}from"./chunk-5JU53T3U.js";import"./chunk-LWWMRL2Y.js";import"./chunk-4VTJEKHX.js";import"./chunk-3DVNXNTF.js";import"./chunk-ID6WFAXW.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-S52GQQVB.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-KC3EX26K.js";import"./chunk-SM7IDX7Y.js";import"./chunk-FRVNDEV2.js";import"./chunk-5QFPTDQF.js";import"./chunk-URHGHXDN.js";import"./chunk-EQZZ4V5X.js";import"./chunk-HXNMRJQ4.js";import"./chunk-UQYNPYF4.js";import{Icon as s}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-SQCUN2DX.js";import"./chunk-S5SRXI4V.js";import"./chunk-Q3IR5SKD.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-D65T4H6J.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useRef as a,useEffect as i,useState as l}from"react";import{jsxs as c,jsx as m,Fragment as u}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",h="react-os-shell:browser-homepage",p="https://en.wikipedia.org/wiki/Main_Page",b=[{label:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"},{label:"DevDocs",url:"https://devdocs.io"},{label:"Example",url:"https://example.com"}],k=new Set(["ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi","bj bm bn bo br bs bt bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu cv","cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga gd","ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il","im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc","li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms mt mu","mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph pk pl","pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sk sl sm sn","so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt tv tw tz","ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw","com net org edu gov mil int info biz name pro app dev xyz online site tech","store shop cloud design digital agency studio media news blog live life","world today email systems solutions services software page link space host","press wiki team group works careers finance capital energy academy"].join(" ").split(" "));function g(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:function(e){const t=/^([\w-]+\.)+([a-z]{2,})(\/.*)?$/i.exec(e);return null!==t&&k.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var f=["duckduckgo.com","developer.mozilla.org","google.com","gmail.com","youtube.com","facebook.com","instagram.com","whatsapp.com","twitter.com","x.com","github.com","gitlab.com","linkedin.com","reddit.com","pinterest.com","amazon.com","amazon.ca","amazon.co.uk","apple.com","icloud.com","microsoft.com","outlook.com","live.com","office.com","netflix.com","spotify.com","paypal.com","stripe.com","chat.openai.com","chatgpt.com","claude.ai"];function x(){if("undefined"==typeof window)return b;try{const e=localStorage.getItem(d);if(!e)return b;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e?.url))return t}catch{}return b}function w(){return"undefined"==typeof window?p:localStorage.getItem(h)||p}function y(){const u=a(void 0);void 0===u.current&&(u.current=e()),i(()=>{null!=u.current&&t(u.current)},[]);const p=u.current?g(u.current.url):"",[b,k]=l(w),[f,y]=l(p||b),[j,C]=l(f),[W,R]=l([f]),[S,z]=l(0),[D,U]=l(0),[E,X]=l(x),[L,H]=l(!1),[J,M]=l(null),Q=a(null),T=a(null);i(()=>{try{localStorage.setItem(d,JSON.stringify(E))}catch{}},[E]);const V=e=>{const t=g(e);t&&(y(t),C(t),R(e=>{const o=e.slice(0,S+1);return o.push(t),o}),z(e=>e+1),H(!1))},F=()=>{"undefined"!=typeof window&&window.open(f,"_blank","noopener,noreferrer")},G=()=>{const e=J?.trim();e?(X(t=>[...t,{label:e,url:f}]),M(null)):M(null)};i(()=>{if(null===J)return;Q.current?.focus(),Q.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||M(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==J]);const K=e=>{X(t=>t.filter((t,o)=>o!==e))},A=S>0,I=S<W.length-1,O=E.some(e=>e.url===f),P="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
2
2
  return c("div",{className:"relative flex flex-col h-full bg-white",children:[
3
3
  /* @__PURE__ */m(r,{title:`Browser - ${v(f)}`}),
4
4
  /* @__PURE__ */m(o,{app:"browser"}),
5
5
  /* @__PURE__ */c("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0",children:[
6
- /* @__PURE__ */m("button",{onClick:()=>{if(z>0){const e=z-1;U(e),y(W[e]),C(W[e]),L(!1)}},disabled:!O,className:V,title:"Back",children:/* @__PURE__ */m(s,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
7
- /* @__PURE__ */m("button",{onClick:()=>{if(z<W.length-1){const e=z+1;U(e),y(W[e]),C(W[e]),L(!1)}},disabled:!B,className:V,title:"Forward",children:/* @__PURE__ */m(s,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
8
- /* @__PURE__ */m("button",{onClick:()=>S(e=>e+1),className:V,title:"Refresh",children:/* @__PURE__ */m(s,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
9
- /* @__PURE__ */m("button",{onClick:()=>X(b),className:V,title:"Home",children:/* @__PURE__ */m(s,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
10
- /* @__PURE__ */m("form",{onSubmit:e=>{e.preventDefault(),X(j)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */c("div",{className:"flex items-center w-full bg-white border border-gray-300 rounded focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-200",children:[
6
+ /* @__PURE__ */m("button",{onClick:()=>{if(S>0){const e=S-1;z(e),y(W[e]),C(W[e]),H(!1)}},disabled:!A,className:P,title:"Back",children:/* @__PURE__ */m(s,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
7
+ /* @__PURE__ */m("button",{onClick:()=>{if(S<W.length-1){const e=S+1;z(e),y(W[e]),C(W[e]),H(!1)}},disabled:!I,className:P,title:"Forward",children:/* @__PURE__ */m(s,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
8
+ /* @__PURE__ */m("button",{onClick:()=>U(e=>e+1),className:P,title:"Refresh",children:/* @__PURE__ */m(s,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
9
+ /* @__PURE__ */m("button",{onClick:()=>V(b),className:P,title:"Home",children:/* @__PURE__ */m(s,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
10
+ /* @__PURE__ */m("form",{onSubmit:e=>{e.preventDefault(),V(j)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */c("div",{className:"flex items-center w-full bg-white border border-gray-300 rounded focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-200",children:[
11
11
  /* @__PURE__ */m("span",{className:"px-2 text-gray-400 text-xs",children:f.startsWith("https://")?"🔒":"⚠️"}),
12
12
  /* @__PURE__ */m("input",{type:"text",value:j,onChange:e=>C(e.target.value),onFocus:e=>e.target.select(),className:"flex-1 px-1 py-1 text-sm bg-transparent outline-none font-mono",spellCheck:!1,placeholder:"Enter URL or search…"}),f!==j&&/* @__PURE__ */m("button",{type:"button",onClick:()=>C(f),className:"px-2 text-2xs text-ink-faintest hover:text-ink",title:"Reset to current URL",children:"×"})]})}),
13
- /* @__PURE__ */m("button",{"data-bookmark-popover":!0,onClick:()=>A?I(E.findIndex(e=>e.url===f)):void P(v(f)),className:V+" "+(A?"text-yellow-500":""),title:A?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */m(s,{name:"star",className:"h-4 w-4",fill:A?"currentColor":"none",strokeWidth:1.5})}),
14
- /* @__PURE__ */m("button",{onClick:G,className:V,title:"Open in new tab",children:/* @__PURE__ */m(s,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
15
- /* @__PURE__ */m("button",{onClick:()=>L(e=>!e),className:V,title:"Embedding help",children:/* @__PURE__ */m(s,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==T&&/* @__PURE__ */c("div",{"data-bookmark-popover":!0,className:"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3",children:[
13
+ /* @__PURE__ */m("button",{"data-bookmark-popover":!0,onClick:()=>O?K(E.findIndex(e=>e.url===f)):void M(v(f)),className:P+" "+(O?"text-yellow-500":""),title:O?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */m(s,{name:"star",className:"h-4 w-4",fill:O?"currentColor":"none",strokeWidth:1.5})}),
14
+ /* @__PURE__ */m("button",{onClick:F,className:P,title:"Open in new tab",children:/* @__PURE__ */m(s,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
15
+ /* @__PURE__ */m("button",{onClick:()=>H(e=>!e),className:P,title:"Embedding help",children:/* @__PURE__ */m(s,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==J&&/* @__PURE__ */c("div",{"data-bookmark-popover":!0,className:"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3",children:[
16
16
  /* @__PURE__ */m("div",{className:"text-2xs font-semibold uppercase tracking-wide text-ink-faint mb-1",children:"Bookmark this page"}),
17
17
  /* @__PURE__ */m("div",{className:"text-2xs text-ink-faintest truncate mb-2 font-mono",title:f,children:f}),
18
- /* @__PURE__ */m("input",{ref:J,type:"text",value:T,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"===e.key?K():"Escape"===e.key&&P(null)},placeholder:"Name",className:"w-full text-sm px-2 h-8 border border-line-strong rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"}),
18
+ /* @__PURE__ */m("input",{ref:Q,type:"text",value:J,onChange:e=>M(e.target.value),onKeyDown:e=>{"Enter"===e.key?G():"Escape"===e.key&&M(null)},placeholder:"Name",className:"w-full text-sm px-2 h-8 border border-line-strong rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"}),
19
19
  /* @__PURE__ */c("div",{className:"flex justify-end gap-1 mt-2",children:[
20
- /* @__PURE__ */m("button",{onClick:()=>P(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
21
- /* @__PURE__ */m("button",{onClick:K,disabled:!T.trim(),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",children:"Save"})]})]}),
22
- /* @__PURE__ */c("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===E.length&&/* @__PURE__ */m("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),E.map((e,t)=>/* @__PURE__ */c("button",{onClick:()=>X(e.url),onContextMenu:async o=>{o.preventDefault();await n({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&I(t)},className:"flex items-center gap-2 px-2 py-0.5 rounded text-xs text-ink hover:bg-gray-100 whitespace-nowrap",title:`${e.url}\n(right-click to remove)`,children:[
20
+ /* @__PURE__ */m("button",{onClick:()=>M(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
21
+ /* @__PURE__ */m("button",{onClick:G,disabled:!J.trim(),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",children:"Save"})]})]}),
22
+ /* @__PURE__ */c("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===E.length&&/* @__PURE__ */m("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),E.map((e,t)=>/* @__PURE__ */c("button",{onClick:()=>V(e.url),onContextMenu:async o=>{o.preventDefault();await n({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&K(t)},className:"flex items-center gap-2 px-2 py-0.5 rounded text-xs text-ink hover:bg-gray-100 whitespace-nowrap",title:`${e.url}\n(right-click to remove)`,children:[
23
23
  /* @__PURE__ */m("img",{src:`https://icons.duckduckgo.com/ip3/${new URL(e.url).hostname}.ico`,alt:"",className:"h-3.5 w-3.5",onError:e=>{e.target.style.visibility="hidden"}}),e.label]},t)),
24
24
  /* @__PURE__ */m("div",{className:"flex-1"}),
25
25
  /* @__PURE__ */m("button",{onClick:()=>{k(f);try{localStorage.setItem(h,f)}catch{}},className:"px-2 py-0.5 text-2xs text-ink-faint hover:text-ink-strong",title:"Set current page as homepage",children:"Set as home"})]}),
26
- /* @__PURE__ */m("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */m(N,{url:f,iframeKey:D,iframeRef:Q,openExternal:G,showHelp:M,dismissHelp:()=>L(!1)})})]})}function v(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function N({url:e,iframeKey:t,iframeRef:o,openExternal:r,showHelp:n,dismissHelp:a}){const[d,h]=l(!1);i(()=>{h(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return f.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!d?/* @__PURE__ */m("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */c("div",{className:"max-w-md text-center",children:[
26
+ /* @__PURE__ */m("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */m(N,{url:f,iframeKey:D,iframeRef:T,openExternal:F,showHelp:L,dismissHelp:()=>H(!1)})})]})}function v(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function N({url:e,iframeKey:t,iframeRef:o,openExternal:r,showHelp:n,dismissHelp:a}){const[d,h]=l(!1);i(()=>{h(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return f.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!d?/* @__PURE__ */m("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */c("div",{className:"max-w-md text-center",children:[
27
27
  /* @__PURE__ */m(s,{name:"no-symbol",className:"h-14 w-14 mx-auto text-gray-300 mb-3",strokeWidth:1.2}),
28
28
  /* @__PURE__ */c("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[v(e)," can't be embedded"]}),
29
29
  /* @__PURE__ */c("p",{className:"text-sm text-gray-500 mb-4",children:["This site sends an ",
@@ -0,0 +1,29 @@
1
+ import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-EHGGSUXA.js";import{useWidgetSettings as n}from"./chunk-B25RVAVS.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EXJXOKUU.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-F2R3UFNQ.js";import"./chunk-5JU53T3U.js";import"./chunk-LWWMRL2Y.js";import"./chunk-4VTJEKHX.js";import"./chunk-3DVNXNTF.js";import"./chunk-ID6WFAXW.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-S52GQQVB.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-KC3EX26K.js";import"./chunk-FRVNDEV2.js";import"./chunk-5QFPTDQF.js";import"./chunk-URHGHXDN.js";import"./chunk-EQZZ4V5X.js";import"./chunk-HXNMRJQ4.js";import"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-SQCUN2DX.js";import"./chunk-S5SRXI4V.js";import"./chunk-Q3IR5SKD.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-D65T4H6J.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as l,useEffect as o}from"react";import{jsxs as s,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[N,j]=c(!1),[y,x]=c(""),[f,v]=c([]),[C,$]=c(!1),[E,S]=c(()=>e(h)),[W,U]=c(!1),[X,D]=c(E),J=i(null);n(l(()=>{D({...E}),U(!0)},[E]));const T=l(e=>{x(""),k(t=>N||"0"===t?(j(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),Q=l(()=>{k("0"),d(null),g(null),j(!1)},[]),R=l((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),w=l(e=>{const t=parseFloat(m);if(null!==p&&b&&!N){const e=R(p,t,b);k(String(e)),d(e),v(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),j(!0)},[m,p,b,N,R]),F=l(()=>{if(null===p||!b)return;const e=parseFloat(m),t=R(p,e,b),n=`${p} ${b} ${e} =`;v(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),j(!0)},[m,p,b,R]),V=l(()=>{k(e=>String(parseFloat(e)/100))},[]),A=l(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);o(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?T(e.key):"."===e.key?T("."):"+"===e.key?w("+"):"-"===e.key?w("-"):"*"===e.key?w("×"):"/"===e.key?(e.preventDefault(),w("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&J.current?.contains(e.target)&&e.preventDefault(),F()):"Escape"===e.key?Q():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&V())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[T,w,F,Q,V]);const M="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",G=`${M} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,H=`${M} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,B=`${M} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,K=`${M} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
+ return s(a,{children:[
3
+ /* @__PURE__ */s("div",{ref:J,className:"flex flex-col h-full",style:{opacity:E.activeOpacity/100,backdropFilter:E.activeBlur>0?`blur(${E.activeBlur}px)`:void 0},children:[
4
+ /* @__PURE__ */s("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
+ /* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:f.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${N?"":m}`}),
6
+ /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
7
+ /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,C?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
+ /* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
9
+ /* @__PURE__ */s("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
+ /* @__PURE__ */u("button",{onClick:Q,className:B,children:"AC"}),
11
+ /* @__PURE__ */u("button",{onClick:A,className:B,children:"+/−"}),
12
+ /* @__PURE__ */u("button",{onClick:V,className:B,children:"%"}),
13
+ /* @__PURE__ */u("button",{onClick:()=>w("÷"),className:`${H} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
+ /* @__PURE__ */u("button",{onClick:()=>T("7"),className:G,children:"7"}),
15
+ /* @__PURE__ */u("button",{onClick:()=>T("8"),className:G,children:"8"}),
16
+ /* @__PURE__ */u("button",{onClick:()=>T("9"),className:G,children:"9"}),
17
+ /* @__PURE__ */u("button",{onClick:()=>w("×"),className:`${H} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
18
+ /* @__PURE__ */u("button",{onClick:()=>T("4"),className:G,children:"4"}),
19
+ /* @__PURE__ */u("button",{onClick:()=>T("5"),className:G,children:"5"}),
20
+ /* @__PURE__ */u("button",{onClick:()=>T("6"),className:G,children:"6"}),
21
+ /* @__PURE__ */u("button",{onClick:()=>w("-"),className:`${H} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
22
+ /* @__PURE__ */u("button",{onClick:()=>T("1"),className:G,children:"1"}),
23
+ /* @__PURE__ */u("button",{onClick:()=>T("2"),className:G,children:"2"}),
24
+ /* @__PURE__ */u("button",{onClick:()=>T("3"),className:G,children:"3"}),
25
+ /* @__PURE__ */u("button",{onClick:()=>w("+"),className:`${H} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
26
+ /* @__PURE__ */u("button",{onClick:()=>T("0"),className:`${G} col-span-2`,children:"0"}),
27
+ /* @__PURE__ */u("button",{onClick:()=>T("."),className:G,children:"."}),
28
+ /* @__PURE__ */u("button",{onClick:F,className:K,children:"="})]})]}),
29
+ /* @__PURE__ */u(t,{open:W,onClose:()=>U(!1),title:"Calculator Settings",appearance:X,onAppearanceChange:D,onSave:()=>{S(X),localStorage.setItem(h,JSON.stringify(X)),U(!1)}})]})}export{m as default};
@@ -1,6 +1,6 @@
1
- import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-BS7IPLRR.js";import{useWidgetSettings as r}from"./chunk-UNRPRMQO.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-URERZUX5.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-RBQWIHYD.js";import"./chunk-GBCH3UHD.js";import"./chunk-KZMJE24J.js";import"./chunk-KC3EX26K.js";import"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-S2P74CBN.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-UGTRSRIW.js";import"./chunk-PXQG5EIH.js";import"./chunk-CDAJKLGL.js";import"./chunk-37U326EL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import"./chunk-KKSVRIMP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as o,useEffect as c}from"react";import{jsxs as a,Fragment as i,jsx as l}from"react/jsx-runtime";var m=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function g(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function k(t,e){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[t]={rates:e,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function N(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var j={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function f(){const[u,d]=s(N),[f,x]=s(()=>t(h)),[y,b]=s({}),[D,S]=s(!1),[v,U]=s(!1),[C,R]=s([]),[J,P]=s(f),[B,H]=s("USD"),[M,A]=s("CNY");r(o(()=>{R([...u]),P({...f}),U(!0)},[u,f])),c(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){S(!0);const r={};for(const e of t){const t=g(e);if(t)r[e]=t;else try{const t=await fetch(`https://open.er-api.com/v6/latest/${e}`),n=await t.json();n.rates&&(r[e]=n.rates,k(e,n.rates))}catch{}}e&&(b(r),S(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
1
+ import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-EHGGSUXA.js";import{useWidgetSettings as r}from"./chunk-B25RVAVS.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EXJXOKUU.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-F2R3UFNQ.js";import"./chunk-5JU53T3U.js";import"./chunk-LWWMRL2Y.js";import"./chunk-4VTJEKHX.js";import"./chunk-3DVNXNTF.js";import"./chunk-ID6WFAXW.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-S52GQQVB.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-KC3EX26K.js";import"./chunk-FRVNDEV2.js";import"./chunk-5QFPTDQF.js";import"./chunk-URHGHXDN.js";import"./chunk-EQZZ4V5X.js";import"./chunk-HXNMRJQ4.js";import"./chunk-UQYNPYF4.js";import"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-SQCUN2DX.js";import"./chunk-S5SRXI4V.js";import"./chunk-Q3IR5SKD.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-D65T4H6J.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as o,useEffect as c}from"react";import{jsxs as a,Fragment as i,jsx as l}from"react/jsx-runtime";var m=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function g(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function k(t,e){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[t]={rates:e,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function N(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var j={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function f(){const[u,d]=s(N),[f,x]=s(()=>t(h)),[y,b]=s({}),[S,D]=s(!1),[v,U]=s(!1),[C,J]=s([]),[R,X]=s(f),[A,H]=s("USD"),[W,B]=s("CNY");r(o(()=>{J([...u]),X({...f}),U(!0)},[u,f])),c(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){D(!0);const r={};for(const e of t){const t=g(e);if(t)r[e]=t;else try{const t=await fetch(`https://open.er-api.com/v6/latest/${e}`),n=await t.json();n.rates&&(r[e]=n.rates,k(e,n.rates))}catch{}}e&&(b(r),D(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
2
2
  return a(i,{children:[
3
- /* @__PURE__ */l("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${f.activeOpacity/100})`,backdropFilter:f.activeBlur>0?`blur(${f.activeBlur}px)`:void 0},children:/* @__PURE__ */a("div",{className:"px-4 py-3 space-y-1",children:[D&&/* @__PURE__ */l(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=y[t]?.[e];/* @__PURE__ */
3
+ /* @__PURE__ */l("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${f.activeOpacity/100})`,backdropFilter:f.activeBlur>0?`blur(${f.activeBlur}px)`:void 0},children:/* @__PURE__ */a("div",{className:"px-4 py-3 space-y-1",children:[S&&/* @__PURE__ */l(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=y[t]?.[e];/* @__PURE__ */
4
4
  return a("button",{onClick:()=>{const t=u.map((t,e)=>e===r?[t[1],t[0]]:t);d(t),localStorage.setItem(p,JSON.stringify(t))},className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0 w-full hover:bg-gray-100 rounded transition-colors cursor-pointer",children:[
5
5
  /* @__PURE__ */a("div",{className:"flex items-center gap-2",children:[
6
6
  /* @__PURE__ */l("span",{className:"text-base",children:j[t]||""}),
@@ -9,13 +9,13 @@ return a("button",{onClick:()=>{const t=u.map((t,e)=>e===r?[t[1],t[0]]:t);d(t),l
9
9
  /* @__PURE__ */l("span",{className:"text-base",children:j[e]||""}),
10
10
  /* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:e})]}),
11
11
  /* @__PURE__ */l("div",{className:"text-base font-mono font-semibold text-gray-900 tabular-nums",children:null!=n?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:4}):"—"})]},`${t}-${e}-${r}`)})]})}),
12
- /* @__PURE__ */l(e,{open:v,onClose:()=>U(!1),title:"Currency Settings",appearance:J,onAppearanceChange:P,onSave:()=>{if(0===C.length)return;const t=C.slice(0,4);d(t),x(J),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(J)),U(!1)},children:/* @__PURE__ */a("div",{children:[
12
+ /* @__PURE__ */l(e,{open:v,onClose:()=>U(!1),title:"Currency Settings",appearance:R,onAppearanceChange:X,onSave:()=>{if(0===C.length)return;const t=C.slice(0,4);d(t),x(R),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(R)),U(!1)},children:/* @__PURE__ */a("div",{children:[
13
13
  /* @__PURE__ */a("h3",{className:"text-sm font-semibold text-ink mb-2",children:["Currency Pairs ",
14
14
  /* @__PURE__ */a("span",{className:"text-2xs font-normal text-ink-faintest",children:["(",C.length,"/",4,")"]})]}),
15
15
  /* @__PURE__ */l("div",{className:"space-y-1 mb-2",children:C.map(([t,e],r)=>/* @__PURE__ */a("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
16
16
  /* @__PURE__ */a("span",{className:"text-sm",children:[j[t]||""," ",t," → ",j[e]||""," ",e]}),
17
- /* @__PURE__ */l("button",{onClick:()=>R(t=>t.filter((t,e)=>e!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),C.length<4?/* @__PURE__ */a("div",{className:"flex items-center gap-2",children:[
18
- /* @__PURE__ */l("select",{value:B,onChange:t=>H(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
17
+ /* @__PURE__ */l("button",{onClick:()=>J(t=>t.filter((t,e)=>e!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),C.length<4?/* @__PURE__ */a("div",{className:"flex items-center gap-2",children:[
18
+ /* @__PURE__ */l("select",{value:A,onChange:t=>H(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
19
19
  /* @__PURE__ */l("span",{className:"text-gray-400",children:"→"}),
20
- /* @__PURE__ */l("select",{value:M,onChange:t=>A(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
21
- /* @__PURE__ */l("button",{onClick:()=>{B!==M&&C.length<4&&R(t=>[...t,[B,M]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */a("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{f as default};
20
+ /* @__PURE__ */l("select",{value:W,onChange:t=>B(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
21
+ /* @__PURE__ */l("button",{onClick:()=>{A!==W&&C.length<4&&J(t=>[...t,[A,W]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */a("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{f as default};
@@ -1,14 +1,14 @@
1
- import{escapeHtml as e}from"./chunk-G6DKCCWH.js";import{AboutApp as t}from"./chunk-NSLQ3UYJ.js";import{WindowTitle as n}from"./chunk-UNRPRMQO.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-URERZUX5.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-RBQWIHYD.js";import"./chunk-GBCH3UHD.js";import"./chunk-KZMJE24J.js";import"./chunk-KC3EX26K.js";import"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-S2P74CBN.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import{toast_default as r}from"./chunk-AKM6JBMD.js";import"./chunk-UGTRSRIW.js";import"./chunk-PXQG5EIH.js";import"./chunk-CDAJKLGL.js";import"./chunk-DWMOUDMX.js";import{PopupMenu as o,PopupMenuLabel as i,PopupMenuItem as l,PopupMenuDivider as a}from"./chunk-37U326EL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as s}from"./chunk-KKSVRIMP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useState as m,useRef as h}from"react";import{jsxs as u,jsx as d}from"react/jsx-runtime";var p=/* @__PURE__ */new Set(["txt","md","markdown","csv","tsv","log","json","xml","html","htm","css","js","jsx","ts","tsx","py","rb","go","rs","java","c","h","cpp","hpp","sh","bash","yml","yaml","toml","ini","conf","env","sql"]),g=/* @__PURE__ */new Set(["docx"]),x={filename:"Untitled",kind:"docx",content:"",ext:"docx"};function f(){const[f,y]=m(x),[k,v]=m(!1),[b,j]=m(!1),[w,N]=m(!1),[D,C]=m(null),M=h(null),U=h(null),L=h(null),R=(e,t)=>{L.current?.focus(),document.execCommand(e,!1,t),N(!0)},W=e=>{for(const t of e){if(!t.type.startsWith("image/"))continue;const e=new FileReader;e.onload=()=>{L.current?.focus(),document.execCommand("insertImage",!1,String(e.result)),N(!0)},e.readAsDataURL(t)}},T=e=>{D&&(D.el.removeAttribute("width"),D.el.removeAttribute("height"),D.el.style.width=e??"",D.el.style.height=e?"auto":"",N(!0),C(null))},B=async t=>{const n=(t.name.split(".").pop()||"").toLowerCase();v(!0);try{if(p.has(n)||!g.has(n)&&t.type.startsWith("text/")){const r=await t.text(),o=e(r).replace(/\n/g,"<br>");y({filename:t.name,kind:"text",content:o,ext:n}),N(!1)}else if(g.has(n))try{const e=await(import(
1
+ import{escapeHtml as e}from"./chunk-G6DKCCWH.js";import{AboutApp as t}from"./chunk-ESYYKGN4.js";import{WindowTitle as n}from"./chunk-B25RVAVS.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EXJXOKUU.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-F2R3UFNQ.js";import"./chunk-5JU53T3U.js";import"./chunk-LWWMRL2Y.js";import"./chunk-4VTJEKHX.js";import"./chunk-3DVNXNTF.js";import"./chunk-ID6WFAXW.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import{toast_default as r}from"./chunk-AKM6JBMD.js";import"./chunk-S52GQQVB.js";import"./chunk-UGTRSRIW.js";import"./chunk-CDAJKLGL.js";import"./chunk-KC3EX26K.js";import"./chunk-SM7IDX7Y.js";import{PopupMenu as o,PopupMenuLabel as i,PopupMenuItem as l,PopupMenuDivider as a}from"./chunk-FRVNDEV2.js";import"./chunk-5QFPTDQF.js";import"./chunk-URHGHXDN.js";import"./chunk-EQZZ4V5X.js";import"./chunk-HXNMRJQ4.js";import"./chunk-UQYNPYF4.js";import{Icon as s}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-SQCUN2DX.js";import"./chunk-S5SRXI4V.js";import"./chunk-Q3IR5SKD.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-D65T4H6J.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useState as m,useRef as h}from"react";import{jsxs as u,jsx as d}from"react/jsx-runtime";var p=/* @__PURE__ */new Set(["txt","md","markdown","csv","tsv","log","json","xml","html","htm","css","js","jsx","ts","tsx","py","rb","go","rs","java","c","h","cpp","hpp","sh","bash","yml","yaml","toml","ini","conf","env","sql"]),g=/* @__PURE__ */new Set(["docx"]),x={filename:"Untitled",kind:"docx",content:"",ext:"docx"};function f(){const[f,y]=m(x),[k,v]=m(!1),[b,j]=m(!1),[w,N]=m(!1),[D,C]=m(null),M=h(null),L=h(null),U=h(null),R=(e,t)=>{U.current?.focus(),document.execCommand(e,!1,t),N(!0)},W=e=>{for(const t of e){if(!t.type.startsWith("image/"))continue;const e=new FileReader;e.onload=()=>{U.current?.focus(),document.execCommand("insertImage",!1,String(e.result)),N(!0)},e.readAsDataURL(t)}},S=e=>{D&&(D.el.removeAttribute("width"),D.el.removeAttribute("height"),D.el.style.width=e??"",D.el.style.height=e?"auto":"",N(!0),C(null))},X=async t=>{const n=(t.name.split(".").pop()||"").toLowerCase();v(!0);try{if(p.has(n)||!g.has(n)&&t.type.startsWith("text/")){const r=await t.text(),o=e(r).replace(/\n/g,"<br>");y({filename:t.name,kind:"text",content:o,ext:n}),N(!1)}else if(g.has(n))try{const e=await(import(
2
2
  /* @vite-ignore */
3
- "mammoth")),r=await t.arrayBuffer(),o=await e.convertToHtml({arrayBuffer:r});y({filename:t.name,kind:"docx",content:o.value||"<p><em>(empty document)</em></p>",ext:n}),N(!1)}catch(e){r.error('Install the optional "mammoth" peer dep to read .docx files.')}else"doc"===n?r.error(".doc is the legacy Word binary format — convert to .docx first."):r.error(`Unsupported file type: .${n||"unknown"}`)}finally{v(!1)}},X=f?.filename?(A=f.filename).length>24?`${A.slice(0,23)}…`:A:"Untitled";var A;/* @__PURE__ */
4
- return u("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preventDefault(),b||j(!0)},onDragLeave:e=>{e.currentTarget===e.target&&j(!1)},onDrop:e=>{e.preventDefault(),j(!1);const t=Array.from(e.dataTransfer.files??[]);0!==t.length&&(t.every(e=>e.type.startsWith("image/"))?W(t):B(t[0]))},children:[
5
- /* @__PURE__ */d(n,{title:`${X}${w?" •":""} - Documents`}),
3
+ "mammoth")),r=await t.arrayBuffer(),o=await e.convertToHtml({arrayBuffer:r});y({filename:t.name,kind:"docx",content:o.value||"<p><em>(empty document)</em></p>",ext:n}),N(!1)}catch(e){r.error('Install the optional "mammoth" peer dep to read .docx files.')}else"doc"===n?r.error(".doc is the legacy Word binary format — convert to .docx first."):r.error(`Unsupported file type: .${n||"unknown"}`)}finally{v(!1)}},T=f?.filename?(A=f.filename).length>24?`${A.slice(0,23)}…`:A:"Untitled";var A;/* @__PURE__ */
4
+ return u("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preventDefault(),b||j(!0)},onDragLeave:e=>{e.currentTarget===e.target&&j(!1)},onDrop:e=>{e.preventDefault(),j(!1);const t=Array.from(e.dataTransfer.files??[]);0!==t.length&&(t.every(e=>e.type.startsWith("image/"))?W(t):X(t[0]))},children:[
5
+ /* @__PURE__ */d(n,{title:`${T}${w?" •":""} - Documents`}),
6
6
  /* @__PURE__ */d(t,{app:"documents"}),
7
7
  /* @__PURE__ */u("div",{className:"flex items-center flex-wrap gap-x-2 gap-y-1 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
8
- /* @__PURE__ */d("input",{ref:M,type:"file",accept:".txt,.md,.csv,.tsv,.log,.json,.xml,.html,.htm,.css,.js,.jsx,.ts,.tsx,.py,.rb,.go,.rs,.java,.c,.h,.cpp,.hpp,.sh,.bash,.yml,.yaml,.toml,.ini,.conf,.env,.sql,.docx,text/*",onChange:e=>{const t=e.target.files?.[0];t&&B(t),M.current&&(M.current.value="")},className:"hidden"}),
8
+ /* @__PURE__ */d("input",{ref:M,type:"file",accept:".txt,.md,.csv,.tsv,.log,.json,.xml,.html,.htm,.css,.js,.jsx,.ts,.tsx,.py,.rb,.go,.rs,.java,.c,.h,.cpp,.hpp,.sh,.bash,.yml,.yaml,.toml,.ini,.conf,.env,.sql,.docx,text/*",onChange:e=>{const t=e.target.files?.[0];t&&X(t),M.current&&(M.current.value="")},className:"hidden"}),
9
9
  /* @__PURE__ */u("button",{onClick:()=>M.current?.click(),className:"text-xs text-gray-700 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors flex items-center gap-1",children:[
10
10
  /* @__PURE__ */d(s,{name:"folder-open",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Open"]}),
11
- /* @__PURE__ */d("button",{onClick:()=>{if(!f)return;const t=L.current?.innerHTML??"";if("text"===f.kind){if(/<(b|strong|i|em|u|font|span style|ul|ol|img)|style="[^"]*text-align/i.test(t)){const n=new Blob([`<!doctype html><meta charset="utf-8"><title>${e(f.filename)}</title><body style="font-family:ui-monospace,monospace;white-space:pre-wrap">${t}`],{type:"text/html"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=`${f.filename.replace(/\.[^.]+$/,"")}.html`,o.click(),URL.revokeObjectURL(r)}else{const e=L.current?.innerText??"",t=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=f.filename,r.click(),URL.revokeObjectURL(n)}}else{const n=new Blob([`<!doctype html><meta charset="utf-8"><title>${e(f.filename)}</title>${t}`],{type:"text/html"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=`${f.filename.replace(/\.docx$/i,"")}.html`,o.click(),URL.revokeObjectURL(r)}},className:"text-xs text-gray-700 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save"}),
11
+ /* @__PURE__ */d("button",{onClick:()=>{if(!f)return;const t=U.current?.innerHTML??"";if("text"===f.kind){if(/<(b|strong|i|em|u|font|span style|ul|ol|img)|style="[^"]*text-align/i.test(t)){const n=new Blob([`<!doctype html><meta charset="utf-8"><title>${e(f.filename)}</title><body style="font-family:ui-monospace,monospace;white-space:pre-wrap">${t}`],{type:"text/html"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=`${f.filename.replace(/\.[^.]+$/,"")}.html`,o.click(),URL.revokeObjectURL(r)}else{const e=U.current?.innerText??"",t=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=f.filename,r.click(),URL.revokeObjectURL(n)}}else{const n=new Blob([`<!doctype html><meta charset="utf-8"><title>${e(f.filename)}</title>${t}`],{type:"text/html"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=`${f.filename.replace(/\.docx$/i,"")}.html`,o.click(),URL.revokeObjectURL(r)}},className:"text-xs text-gray-700 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save"}),
12
12
  /* @__PURE__ */d("span",{className:"text-2xs text-ink-faintest ml-1",children:"TXT · DOCX · Code"}),
13
13
  /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
14
14
  /* @__PURE__ */u("span",{className:"text-xs font-medium text-gray-700 truncate max-w-[200px]",title:f.filename,children:[f.filename,w?" •":""]}),
@@ -38,15 +38,15 @@ return u("div",{className:"relative flex flex-col h-full",onDragOver:e=>{e.preve
38
38
  /* @__PURE__ */d("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>R("justifyRight"),className:"px-2 py-1 rounded text-gray-700 hover:bg-gray-200 transition-colors",title:"Align right",children:/* @__PURE__ */d("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */d("path",{strokeLinecap:"round",d:"M3.75 6h16.5M10.5 12h9.75M6 18h14.25"})})}),
39
39
  /* @__PURE__ */d("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>R("justifyFull"),className:"px-2 py-1 rounded text-gray-700 hover:bg-gray-200 transition-colors",title:"Justify",children:/* @__PURE__ */d("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */d("path",{strokeLinecap:"round",d:"M3.75 6h16.5M3.75 12h16.5M3.75 18h16.5"})})})]}),
40
40
  /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
41
- /* @__PURE__ */d("input",{ref:U,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&W(Array.from(e.target.files)),U.current&&(U.current.value="")}}),
42
- /* @__PURE__ */u("button",{onClick:()=>U.current?.click(),className:"px-2 py-1 text-xs rounded text-gray-700 hover:bg-gray-200 transition-colors flex items-center gap-1",title:"Insert image (or paste / drop one)",children:[
41
+ /* @__PURE__ */d("input",{ref:L,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&W(Array.from(e.target.files)),L.current&&(L.current.value="")}}),
42
+ /* @__PURE__ */u("button",{onClick:()=>L.current?.click(),className:"px-2 py-1 text-xs rounded text-gray-700 hover:bg-gray-200 transition-colors flex items-center gap-1",title:"Insert image (or paste / drop one)",children:[
43
43
  /* @__PURE__ */d(s,{name:"image",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Image"]})]}),
44
- /* @__PURE__ */d("div",{className:"flex-1 min-h-0 overflow-hidden",children:k?/* @__PURE__ */d(c,{size:"sm",padding:"",className:"h-full",label:"Loading"}):/* @__PURE__ */d("div",{className:"h-full overflow-auto "+("docx"===f.kind?"bg-gray-100 px-6 py-8":"bg-white"),children:/* @__PURE__ */d("div",{ref:L,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:()=>N(!0),onPaste:e=>{const t=Array.from(e.clipboardData?.items??[]).filter(e=>"file"===e.kind&&e.type.startsWith("image/")).map(e=>e.getAsFile()).filter(e=>!!e);t.length&&(e.preventDefault(),W(t))},onClick:e=>{const t=e.target;"IMG"===t.tagName&&(e.preventDefault(),C({x:e.clientX,y:e.clientY,el:t}))},dangerouslySetInnerHTML:{__html:f.content},className:"docx"===f.kind?"docs-editor mx-auto w-[8.5in] min-h-[11in] bg-surface p-[1in] shadow text-sm leading-relaxed text-ink-strong outline-none focus:ring-2 focus:ring-blue-400/40":"docs-editor block w-full min-h-full p-4 font-mono text-sm leading-relaxed text-ink-strong bg-surface outline-none whitespace-pre-wrap"})})}),b&&/* @__PURE__ */d("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */d("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop a document to open · images insert into the page"})}),D&&/* @__PURE__ */u(o,{minWidth:150,style:{left:D.x,top:D.y},onClose:()=>C(null),children:[
44
+ /* @__PURE__ */d("div",{className:"flex-1 min-h-0 overflow-hidden",children:k?/* @__PURE__ */d(c,{size:"sm",padding:"",className:"h-full",label:"Loading"}):/* @__PURE__ */d("div",{className:"h-full overflow-auto "+("docx"===f.kind?"bg-gray-100 px-6 py-8":"bg-white"),children:/* @__PURE__ */d("div",{ref:U,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:()=>N(!0),onPaste:e=>{const t=Array.from(e.clipboardData?.items??[]).filter(e=>"file"===e.kind&&e.type.startsWith("image/")).map(e=>e.getAsFile()).filter(e=>!!e);t.length&&(e.preventDefault(),W(t))},onClick:e=>{const t=e.target;"IMG"===t.tagName&&(e.preventDefault(),C({x:e.clientX,y:e.clientY,el:t}))},dangerouslySetInnerHTML:{__html:f.content},className:"docx"===f.kind?"docs-editor mx-auto w-[8.5in] min-h-[11in] bg-surface p-[1in] shadow text-sm leading-relaxed text-ink-strong outline-none focus:ring-2 focus:ring-blue-400/40":"docs-editor block w-full min-h-full p-4 font-mono text-sm leading-relaxed text-ink-strong bg-surface outline-none whitespace-pre-wrap"})})}),b&&/* @__PURE__ */d("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */d("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop a document to open · images insert into the page"})}),D&&/* @__PURE__ */u(o,{minWidth:150,style:{left:D.x,top:D.y},onClose:()=>C(null),children:[
45
45
  /* @__PURE__ */d(i,{children:"Image width"}),
46
- /* @__PURE__ */d(l,{onClick:()=>T("25%"),children:"25%"}),
47
- /* @__PURE__ */d(l,{onClick:()=>T("50%"),children:"50%"}),
48
- /* @__PURE__ */d(l,{onClick:()=>T("75%"),children:"75%"}),
49
- /* @__PURE__ */d(l,{onClick:()=>T("100%"),children:"100%"}),
50
- /* @__PURE__ */d(l,{onClick:()=>T(null),children:"Original size"}),
46
+ /* @__PURE__ */d(l,{onClick:()=>S("25%"),children:"25%"}),
47
+ /* @__PURE__ */d(l,{onClick:()=>S("50%"),children:"50%"}),
48
+ /* @__PURE__ */d(l,{onClick:()=>S("75%"),children:"75%"}),
49
+ /* @__PURE__ */d(l,{onClick:()=>S("100%"),children:"100%"}),
50
+ /* @__PURE__ */d(l,{onClick:()=>S(null),children:"Original size"}),
51
51
  /* @__PURE__ */d(a,{}),
52
52
  /* @__PURE__ */d(l,{danger:!0,onClick:()=>{D?.el.remove(),N(!0),C(null)},children:"Remove image"})]})]})}export{f as default};