efficient-shell 12.30.0 → 12.32.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 (339) hide show
  1. package/README.md +43 -1
  2. package/dist/{Browser-FQHXHI3R.js → Browser-36SDGA64.js} +17 -17
  3. package/dist/Calculator-GDHNFSB6.js +29 -0
  4. package/dist/{CurrencyConverter-EHIQIFJK.js → CurrencyConverter-PXCCCUS2.js} +6 -6
  5. package/dist/{Files-LTUUGPAM.js → Files-NVUIAUO5.js} +141 -141
  6. package/dist/{Notepad-JPAXNEFR.js → Notepad-QA2CD6GC.js} +9 -9
  7. package/dist/PdfViewer-627HEAIL.js +1 -0
  8. package/dist/{PomodoroTimer-IVDZBBUN.js → PomodoroTimer-HD2ZNOUV.js} +69 -69
  9. package/dist/{Preview-KRK4XT2B.js → Preview-FW2KT6FQ.js} +27 -27
  10. package/dist/Sidebar-QNJNEBT2.js +44 -0
  11. package/dist/{Stock-OBS2LPX4.js → Stock-EDZSOJAQ.js} +7 -7
  12. package/dist/{Weather-I4TJBIEN.js → Weather-OTVZZEE7.js} +17 -17
  13. package/dist/{WorldClock-YU2ZPVSA.js → WorldClock-PDKFE5S7.js} +4 -4
  14. package/dist/ai/index.js +88 -88
  15. package/dist/apps/ImageAnnotator.js +1 -1
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/charts/BoxPlotChart.js +1 -1
  21. package/dist/charts/CandlestickChart.js +1 -1
  22. package/dist/charts/CartesianPlot.js +1 -1
  23. package/dist/charts/ChartBrush.js +1 -1
  24. package/dist/charts/ChartFrame.js +1 -1
  25. package/dist/charts/ChartSkeleton.js +1 -1
  26. package/dist/charts/ChordChart.js +1 -1
  27. package/dist/charts/ColumnChart.js +1 -1
  28. package/dist/charts/FunnelChart.js +1 -1
  29. package/dist/charts/HeatmapChart.js +1 -1
  30. package/dist/charts/HistogramChart.js +1 -1
  31. package/dist/charts/Meter.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/RankedBars.js +1 -1
  37. package/dist/charts/SankeyChart.js +1 -1
  38. package/dist/charts/ScatterChart.js +1 -1
  39. package/dist/charts/SpecChart.js +1 -1
  40. package/dist/charts/StatTile.js +1 -1
  41. package/dist/charts/SunburstChart.js +1 -1
  42. package/dist/charts/TimeSeriesChart.js +1 -1
  43. package/dist/charts/TreemapChart.js +1 -1
  44. package/dist/charts/WaterfallChart.js +1 -1
  45. package/dist/{chunk-LQD54ZL5.js → chunk-246K337V.js} +1 -1
  46. package/dist/{chunk-CIOPLPZW.js → chunk-25M4CAB3.js} +1 -1
  47. package/dist/{chunk-JA5WM66L.js → chunk-26Y66IXU.js} +2 -2
  48. package/dist/chunk-2PNG5UR6.js +22 -0
  49. package/dist/chunk-3ECUHYHI.js +28 -0
  50. package/dist/{chunk-77BK2IAJ.js → chunk-3MAGUYG2.js} +1 -1
  51. package/dist/{chunk-6EXWWPAW.js → chunk-3TR6C5V4.js} +1 -1
  52. package/dist/{chunk-YNE5YC6E.js → chunk-3UMS74TZ.js} +1 -1
  53. package/dist/{chunk-XXRUDMD5.js → chunk-4U2OUX65.js} +5 -5
  54. package/dist/{chunk-FYGPJPU7.js → chunk-4XN6ACGV.js} +1 -1
  55. package/dist/{chunk-3R2TMLKH.js → chunk-555KW6TM.js} +5 -5
  56. package/dist/{chunk-5ZS3VOJH.js → chunk-5OJFYNEZ.js} +1 -1
  57. package/dist/{chunk-V64XY7L4.js → chunk-5R3NDBCD.js} +7 -7
  58. package/dist/{chunk-XK3VYRLR.js → chunk-5XHJ3H6Y.js} +4 -4
  59. package/dist/{chunk-LBLWN3SH.js → chunk-5XOF3O4B.js} +1 -1
  60. package/dist/{chunk-NJ6WZHXC.js → chunk-6AAGZ34A.js} +10 -10
  61. package/dist/{chunk-3ZC53F4T.js → chunk-6MA7VXZR.js} +3 -3
  62. package/dist/{chunk-KHFPF534.js → chunk-6ZTVZIPI.js} +6 -6
  63. package/dist/chunk-7CHEHWGL.js +9 -0
  64. package/dist/{chunk-AIGLJYQ5.js → chunk-7IRO4JAA.js} +1 -1
  65. package/dist/{chunk-N2BWOHNM.js → chunk-7JR2O3IX.js} +5 -5
  66. package/dist/{chunk-I6V4DMNR.js → chunk-A6YUCAGF.js} +1 -1
  67. package/dist/{chunk-NSNM4QIV.js → chunk-A7JAHN75.js} +5 -5
  68. package/dist/chunk-ADNUV6OV.js +8 -0
  69. package/dist/chunk-AFLG5E4O.js +7 -0
  70. package/dist/{chunk-KNNFNOX7.js → chunk-AFVI75RH.js} +7 -7
  71. package/dist/{chunk-KKYNDLOC.js → chunk-AGNHOSES.js} +6 -6
  72. package/dist/{chunk-RMUOUMV2.js → chunk-AJ2EEWZT.js} +2 -2
  73. package/dist/chunk-AWY2ZOXT.js +14 -0
  74. package/dist/{chunk-WM37FXRK.js → chunk-B7UT3W4C.js} +1 -1
  75. package/dist/{chunk-HJECGV6W.js → chunk-BEN2LJWQ.js} +1 -1
  76. package/dist/{chunk-U45APXV3.js → chunk-BIBQAEHV.js} +1 -1
  77. package/dist/{chunk-Y6H5C6A4.js → chunk-BLC6HAU3.js} +1 -1
  78. package/dist/{chunk-X5RFTIHV.js → chunk-BXPEEPYH.js} +1 -1
  79. package/dist/{chunk-JOANOIVK.js → chunk-CAIUI3DC.js} +1 -1
  80. package/dist/{chunk-5O5QMMMG.js → chunk-CHRK5R3Y.js} +8 -8
  81. package/dist/{chunk-B27XRZ47.js → chunk-COF2CF5R.js} +1 -1
  82. package/dist/{chunk-42GNFUAP.js → chunk-CYTK7DCA.js} +11 -11
  83. package/dist/{chunk-DOKA65JI.js → chunk-DGFC5BX4.js} +1 -1
  84. package/dist/{chunk-IQTURGC4.js → chunk-DHLXSL3Y.js} +1 -1
  85. package/dist/{chunk-4WW3SNL6.js → chunk-DRIO2Y4R.js} +4 -4
  86. package/dist/{chunk-IBPULOGJ.js → chunk-DWGMTMDU.js} +2 -2
  87. package/dist/{chunk-E7RMS776.js → chunk-E6GGE7E5.js} +14 -14
  88. package/dist/{chunk-FM34DWV7.js → chunk-FE6J5S5X.js} +5 -5
  89. package/dist/chunk-FKJPBQ6I.js +7 -0
  90. package/dist/{chunk-MYJ3HQYG.js → chunk-FXS2P23Q.js} +10 -10
  91. package/dist/chunk-G3NE4SGZ.js +11 -0
  92. package/dist/chunk-GX4CDXPK.js +9 -0
  93. package/dist/chunk-H74VN7OI.js +2 -0
  94. package/dist/chunk-H7WMOY62.js +1 -0
  95. package/dist/{chunk-HU24RSAE.js → chunk-HGGDOMBV.js} +1 -1
  96. package/dist/{chunk-CBBU74QT.js → chunk-HWV6UDFC.js} +1 -1
  97. package/dist/{chunk-OMSIXLK4.js → chunk-IBLRSK7V.js} +1 -1
  98. package/dist/{chunk-2N6WWL7Y.js → chunk-IE5XWHDU.js} +1 -1
  99. package/dist/chunk-IESNUXYH.js +1 -0
  100. package/dist/chunk-IYM5N7FH.js +4 -0
  101. package/dist/{chunk-IOIY54KO.js → chunk-J44SUUOG.js} +1 -1
  102. package/dist/{chunk-4SEPQN2N.js → chunk-JI55MXP4.js} +8 -8
  103. package/dist/{chunk-PAVOVX3D.js → chunk-JIBU7YY4.js} +2 -2
  104. package/dist/{chunk-WCJR2GNH.js → chunk-JLQ7N54N.js} +17 -17
  105. package/dist/chunk-JROPOGQP.js +2 -0
  106. package/dist/{chunk-GBPGZFBS.js → chunk-JTJDXCJU.js} +4 -4
  107. package/dist/{chunk-CVEVPB3O.js → chunk-JYVHFRKK.js} +5 -5
  108. package/dist/{chunk-MFZ4YMXE.js → chunk-JZ4V3RHK.js} +6 -6
  109. package/dist/{chunk-QF4FYOVE.js → chunk-K4BM6PPZ.js} +1 -1
  110. package/dist/{chunk-GN3AHAVY.js → chunk-K4RY57UX.js} +1 -1
  111. package/dist/{chunk-XMAOLCQV.js → chunk-K73KBA5C.js} +4 -4
  112. package/dist/{chunk-VREZFFRE.js → chunk-KDG7NWYX.js} +1 -1
  113. package/dist/{chunk-5X3Z45SL.js → chunk-KFNQVNND.js} +1 -1
  114. package/dist/{chunk-JTRQ7HAS.js → chunk-KTKFCR6T.js} +1 -1
  115. package/dist/chunk-L6XEON5Q.js +1 -0
  116. package/dist/{chunk-3N4XJS43.js → chunk-LNXYVWEF.js} +1 -1
  117. package/dist/chunk-LOJAJARD.js +8 -0
  118. package/dist/{chunk-GL4NELAT.js → chunk-LOMNX5VH.js} +1 -1
  119. package/dist/{chunk-ILSE5F5F.js → chunk-LQC5U5YT.js} +3 -3
  120. package/dist/chunk-LUAA4LKY.js +19 -0
  121. package/dist/{chunk-MRVW6F5E.js → chunk-M2TQQKJO.js} +1 -1
  122. package/dist/chunk-M3D5FW5R.js +6 -0
  123. package/dist/{chunk-NLQLVXMJ.js → chunk-M3FBPZ4G.js} +1 -1
  124. package/dist/{chunk-3B3QIHF7.js → chunk-MMSQZKJY.js} +5 -5
  125. package/dist/{chunk-X27K2NCU.js → chunk-NDGPJKE3.js} +5 -5
  126. package/dist/chunk-NMWV6BOL.js +8 -0
  127. package/dist/{chunk-36MM4YRK.js → chunk-NQ43KRRX.js} +7 -7
  128. package/dist/{chunk-FIXZT5TZ.js → chunk-NQA267J3.js} +7 -7
  129. package/dist/{chunk-VEF3STCH.js → chunk-NZ74N2IQ.js} +1 -1
  130. package/dist/{chunk-YGKQMENL.js → chunk-OA55OBDP.js} +1 -1
  131. package/dist/{chunk-2DCATU5B.js → chunk-OL2XKAX2.js} +1 -1
  132. package/dist/chunk-OQGCQQ7H.js +6 -0
  133. package/dist/{chunk-4FUQK2LK.js → chunk-OU3J5TOO.js} +1 -1
  134. package/dist/{chunk-MHVWUYEN.js → chunk-OWFJRER6.js} +1 -1
  135. package/dist/{chunk-M2GF44WC.js → chunk-PK5KDLIG.js} +12 -12
  136. package/dist/chunk-PPVZMIBL.js +4 -0
  137. package/dist/{chunk-5XYRFK7D.js → chunk-PR5CON2G.js} +1 -1
  138. package/dist/chunk-PTEKHRNX.js +26 -0
  139. package/dist/{chunk-UOHHIEH4.js → chunk-PUXSFLWR.js} +1 -1
  140. package/dist/{chunk-MVBDE4AX.js → chunk-Q2LKH6RN.js} +1 -1
  141. package/dist/{chunk-SAAXAAAH.js → chunk-Q2T5DRIK.js} +1 -1
  142. package/dist/{chunk-U22563X2.js → chunk-QB4LAGMN.js} +1 -1
  143. package/dist/{chunk-HE2I6KWY.js → chunk-QBQMMOP6.js} +2 -2
  144. package/dist/{chunk-PBZ3UQMS.js → chunk-QJ6HVBAA.js} +4 -4
  145. package/dist/{chunk-23CZSU3H.js → chunk-QPSKEDR7.js} +1 -1
  146. package/dist/{chunk-3HLV6BEC.js → chunk-QTWHMCCX.js} +10 -10
  147. package/dist/{chunk-Q4BJW37U.js → chunk-QUN3RSMN.js} +1 -1
  148. package/dist/{chunk-RPXRMTOU.js → chunk-QXLYU5FR.js} +1 -1
  149. package/dist/{chunk-37EYKPR6.js → chunk-QXTCEUFC.js} +1 -1
  150. package/dist/{chunk-HC3BZPWX.js → chunk-QYKWVZ3R.js} +1 -1
  151. package/dist/{chunk-6UB6YY3H.js → chunk-R3W6LZBG.js} +1 -1
  152. package/dist/{chunk-GANZLRMW.js → chunk-R3ZEDJDZ.js} +8 -8
  153. package/dist/chunk-RIULA2CH.js +15 -0
  154. package/dist/{chunk-ANGNTN36.js → chunk-RLFZRIO4.js} +1 -1
  155. package/dist/{chunk-TIYRBJSB.js → chunk-RPSNYIDY.js} +4 -4
  156. package/dist/{chunk-QT34GMZR.js → chunk-RSRTE7RG.js} +1 -1
  157. package/dist/{chunk-5RLJAXDR.js → chunk-S54Z2JAZ.js} +5 -5
  158. package/dist/{chunk-UQNKFMJR.js → chunk-T5UMQZ5X.js} +12 -12
  159. package/dist/{chunk-ZSVBEJ4G.js → chunk-TBXFRW3E.js} +1 -1
  160. package/dist/{chunk-KPPKPGQI.js → chunk-UJ23EKXU.js} +1 -1
  161. package/dist/{chunk-FSORYU5C.js → chunk-V2OE6OTK.js} +8 -8
  162. package/dist/{chunk-BEB3AGSY.js → chunk-V7BHDLP2.js} +1 -1
  163. package/dist/{chunk-DHRCI7KE.js → chunk-VERSP62V.js} +1 -1
  164. package/dist/{chunk-O3SCB4QZ.js → chunk-VI54L75G.js} +8 -8
  165. package/dist/{chunk-HOXXEF52.js → chunk-VTDW5GLS.js} +1 -1
  166. package/dist/chunk-VVI4Y6XA.js +23 -0
  167. package/dist/{chunk-AYCWVVJ3.js → chunk-VW3ZUWW2.js} +56 -56
  168. package/dist/{chunk-P4NWDRHS.js → chunk-WJTZE3PL.js} +11 -11
  169. package/dist/chunk-WW5AXVBX.js +2 -0
  170. package/dist/{chunk-2IEKMFVL.js → chunk-X4IFSC57.js} +1 -1
  171. package/dist/{chunk-UEADX2GV.js → chunk-X6AMAYXV.js} +2 -2
  172. package/dist/{chunk-JGZEZHMP.js → chunk-XBC7CBVJ.js} +1 -1
  173. package/dist/chunk-XFC7AWPW.js +11 -0
  174. package/dist/{chunk-TJ5ZX5HP.js → chunk-XKBCF6SK.js} +7 -7
  175. package/dist/chunk-XOQH6VSU.js +14 -0
  176. package/dist/chunk-XOXTMWV3.js +6 -0
  177. package/dist/{chunk-6EETON2U.js → chunk-XR7SPONC.js} +1 -1
  178. package/dist/{chunk-QV5A7NFQ.js → chunk-Y7XX6Z3M.js} +8 -8
  179. package/dist/chunk-YELYAGCX.js +13 -0
  180. package/dist/{chunk-QHWD3G7T.js → chunk-YG6ONZIB.js} +2 -2
  181. package/dist/{chunk-K6LO6QI5.js → chunk-ZFQI3EVU.js} +6 -6
  182. package/dist/chunk-ZGY2OK7Q.js +13 -0
  183. package/dist/{chunk-64ZDYUE7.js → chunk-ZHVWK5NL.js} +17 -17
  184. package/dist/{chunk-HRNT4UDG.js → chunk-ZP3UAWJL.js} +13 -13
  185. package/dist/data/DataTable.js +1 -1
  186. package/dist/data/EntityList.js +1 -1
  187. package/dist/data/Gantt.d.ts +107 -0
  188. package/dist/data/Gantt.js +2 -0
  189. package/dist/data/Kanban.js +1 -1
  190. package/dist/data/ListFooter.js +1 -1
  191. package/dist/data/ListLoadError.js +1 -1
  192. package/dist/data/Pagination.js +1 -1
  193. package/dist/data/ResizableTable.js +1 -1
  194. package/dist/file-intake/index.js +1 -1
  195. package/dist/forms/BorderInput.js +1 -1
  196. package/dist/forms/BrandAssetEditor.js +1 -1
  197. package/dist/forms/Calendar.js +1 -1
  198. package/dist/forms/ColorPicker.js +1 -1
  199. package/dist/forms/ComposerAttachments.js +1 -1
  200. package/dist/forms/CornersInput.js +1 -1
  201. package/dist/forms/DatePicker.js +1 -1
  202. package/dist/forms/DateRangePicker.js +1 -1
  203. package/dist/forms/DateTimePicker.js +1 -1
  204. package/dist/forms/DisplayChips.js +1 -1
  205. package/dist/forms/FilePicker.js +1 -1
  206. package/dist/forms/FormErrorSummary.js +1 -1
  207. package/dist/forms/IconPicker.js +1 -1
  208. package/dist/forms/ImageFocusPoint.js +1 -1
  209. package/dist/forms/InputNumber.js +1 -1
  210. package/dist/forms/LinkPicker.js +1 -1
  211. package/dist/forms/MediaLibrary.js +1 -1
  212. package/dist/forms/MediaUploadField.js +1 -1
  213. package/dist/forms/MediaUploadGrid.js +1 -1
  214. package/dist/forms/MediaUsedInList.js +1 -1
  215. package/dist/forms/NumericKeypad.js +1 -1
  216. package/dist/forms/PictureTiles.d.ts +14 -2
  217. package/dist/forms/PictureTiles.js +1 -1
  218. package/dist/forms/PositionInput.js +1 -1
  219. package/dist/forms/Select.js +1 -1
  220. package/dist/forms/SidesInput.js +1 -1
  221. package/dist/forms/Slider.js +1 -1
  222. package/dist/forms/Snippet.js +1 -1
  223. package/dist/forms/TagInput.js +1 -1
  224. package/dist/forms/TextToolbar.js +1 -1
  225. package/dist/forms/TimePicker.js +1 -1
  226. package/dist/forms/WidthsBar.js +1 -1
  227. package/dist/forms/mediaLibraryMenu.js +1 -1
  228. package/dist/forms/mediaMoveItems.js +1 -1
  229. package/dist/forms/textAlign.js +1 -1
  230. package/dist/forms/useFileIntake.js +1 -1
  231. package/dist/hooks/useTheme.d.ts +1 -1
  232. package/dist/icons/efficient-glyphs.js +1 -1
  233. package/dist/icons/efficient-looks.js +1 -1
  234. package/dist/icons/efficient.js +1 -1
  235. package/dist/icons/looks/map.js +1 -1
  236. package/dist/icons/payment.js +1 -1
  237. package/dist/icons/sets.js +1 -1
  238. package/dist/index.d.ts +5 -4
  239. package/dist/index.js +665 -665
  240. package/dist/locales/zh-Hans.js +1 -1
  241. package/dist/map/index.js +2 -2
  242. package/dist/model-viewer/index.js +3 -3
  243. package/dist/page-tabs/index.js +5 -5
  244. package/dist/pdf/index.js +1 -1
  245. package/dist/shell/Accordion.js +1 -1
  246. package/dist/shell/AppUpdateBanner.js +1 -1
  247. package/dist/shell/Avatar.js +1 -1
  248. package/dist/shell/Banner.js +1 -1
  249. package/dist/shell/Breadcrumbs.js +1 -1
  250. package/dist/shell/BudgetBar.js +1 -1
  251. package/dist/shell/Card.js +1 -1
  252. package/dist/shell/ColoredBadge.js +1 -1
  253. package/dist/shell/ConfirmDialog.js +1 -1
  254. package/dist/shell/ContainerFillChart.js +1 -1
  255. package/dist/shell/CountBadge.js +1 -1
  256. package/dist/shell/Dialog.js +1 -1
  257. package/dist/shell/Drawer.js +1 -1
  258. package/dist/shell/EditableGrid.js +1 -1
  259. package/dist/shell/EmptyState.js +1 -1
  260. package/dist/shell/GlobalSearch.js +1 -1
  261. package/dist/shell/HelpCenter.js +1 -1
  262. package/dist/shell/IconRail.js +1 -1
  263. package/dist/shell/ImageLightbox.js +1 -1
  264. package/dist/shell/ItemCount.js +1 -1
  265. package/dist/shell/LanguageSelect.js +1 -1
  266. package/dist/shell/Markdown.js +1 -1
  267. package/dist/shell/MetricBar.js +1 -1
  268. package/dist/shell/MetricBarLegend.js +1 -1
  269. package/dist/shell/MilestoneTimeline.js +1 -1
  270. package/dist/shell/PageHeader.js +1 -1
  271. package/dist/shell/ProductionTimeline.js +1 -1
  272. package/dist/shell/ResizeHandle.js +1 -1
  273. package/dist/shell/Result.js +1 -1
  274. package/dist/shell/SearchableSelect.js +1 -1
  275. package/dist/shell/SettingReset.js +1 -1
  276. package/dist/shell/SettingRow.js +1 -1
  277. package/dist/shell/SidebarLayout.js +1 -1
  278. package/dist/shell/SidebarNav.js +1 -1
  279. package/dist/shell/SortableList.js +1 -1
  280. package/dist/shell/Statistic.js +1 -1
  281. package/dist/shell/TimeAgo.js +1 -1
  282. package/dist/shell/TimelineTrack.js +1 -1
  283. package/dist/shell/TransferProgress.js +1 -1
  284. package/dist/shell/Tree.js +1 -1
  285. package/dist/shell/discardGuard.js +1 -1
  286. package/dist/shell/language.js +1 -1
  287. package/dist/shell/strings.d.ts +22 -0
  288. package/dist/shell/strings.js +1 -1
  289. package/dist/shell/toast.js +1 -1
  290. package/dist/telemetry/index.js +1 -1
  291. package/dist/templates/AuthScreen.js +1 -1
  292. package/dist/templates/ChatTemplate.js +1 -1
  293. package/dist/templates/CheckoutTemplate.js +1 -1
  294. package/dist/templates/DashboardTemplate.js +1 -1
  295. package/dist/templates/DataTablePage.js +1 -1
  296. package/dist/templates/EmailTemplate.js +1 -1
  297. package/dist/templates/ErrorBoundary.d.ts +1 -1
  298. package/dist/templates/ErrorBoundary.js +1 -1
  299. package/dist/templates/ErrorPage.js +1 -1
  300. package/dist/templates/FormLayoutPage.js +1 -1
  301. package/dist/templates/GalleryTemplate.js +1 -1
  302. package/dist/ui/index.d.ts +2 -1
  303. package/dist/ui/index.js +1 -1
  304. package/dist/ui.css +35 -0
  305. package/dist/version.js +1 -1
  306. package/package.json +1 -1
  307. package/dist/Calculator-XCRU5K4O.js +0 -29
  308. package/dist/PdfViewer-J55QKFNS.js +0 -1
  309. package/dist/Sidebar-FCXIPW5K.js +0 -44
  310. package/dist/chunk-4MCI7UHQ.js +0 -7
  311. package/dist/chunk-4YCWO2GZ.js +0 -14
  312. package/dist/chunk-67JLD6AU.js +0 -6
  313. package/dist/chunk-7DTWIWFO.js +0 -6
  314. package/dist/chunk-7IGWU6DK.js +0 -8
  315. package/dist/chunk-AJVL6LXI.js +0 -22
  316. package/dist/chunk-CHV7U5UV.js +0 -9
  317. package/dist/chunk-CXXMSYA6.js +0 -1
  318. package/dist/chunk-EWSOX4WP.js +0 -28
  319. package/dist/chunk-FEWWCWKV.js +0 -11
  320. package/dist/chunk-FPYOZOUY.js +0 -13
  321. package/dist/chunk-GCTJIZTJ.js +0 -2
  322. package/dist/chunk-GKX3C3JE.js +0 -13
  323. package/dist/chunk-HCDG7EUR.js +0 -1
  324. package/dist/chunk-KLG6RYYC.js +0 -6
  325. package/dist/chunk-KPFP2I2S.js +0 -8
  326. package/dist/chunk-LHATGPIE.js +0 -19
  327. package/dist/chunk-MKPZIEQP.js +0 -23
  328. package/dist/chunk-MUSNAMWH.js +0 -1
  329. package/dist/chunk-PRWA4AAC.js +0 -11
  330. package/dist/chunk-QB7TIWHT.js +0 -9
  331. package/dist/chunk-RJG67VRP.js +0 -15
  332. package/dist/chunk-RVD6HJUJ.js +0 -4
  333. package/dist/chunk-TN3W72FC.js +0 -8
  334. package/dist/chunk-UK2D2CSB.js +0 -14
  335. package/dist/chunk-VLI2ED22.js +0 -7
  336. package/dist/chunk-VY5NO4TS.js +0 -2
  337. package/dist/chunk-XJTZU7UH.js +0 -4
  338. package/dist/chunk-YS3CF7GL.js +0 -2
  339. /package/dist/{chunk-GMHMWDXU.js → chunk-KH3253OM.js} +0 -0
package/README.md CHANGED
@@ -2003,7 +2003,7 @@ What you get: every form control, the display and layout primitives
2003
2003
  `MilestoneTimeline`, `ProductionTimeline`, `SettingRow`, `Snippet`, `Kbd`,
2004
2004
  `Markdown`,
2005
2005
  `HelpCenter`, `EditableGrid`, `SearchableSelect`, `PopupMenu`), the charts, all
2006
- nine page templates, the pageless data primitives (`Pagination`, `Kanban`,
2006
+ nine page templates, the pageless data primitives (`Pagination`, `Kanban`, `Gantt`,
2007
2007
  `ListFooter`, `ListLoadError`), `toast`, and the theming hooks (`useTheme`,
2008
2008
  `resolveTheme`, `applyThemePrefs`) — the way to an accent theme, which works by
2009
2009
  stamping `data-theme`. Dark mode answers to either `<html data-theme="dark">`
@@ -2180,6 +2180,48 @@ link round the words that name the row:
2180
2180
  `useMapHighlight`'s `pointAt(key)`, so a row rings its pin on an
2181
2181
  `EntityMap` beside the list by spreading it.
2182
2182
 
2183
+ ### Gantt
2184
+
2185
+ `Gantt` draws tasks on a time axis: a sticky label column (group headings,
2186
+ then each group's rows) beside a horizontally scrolling chart with a Day / Week
2187
+ / Month scale, a bar per task, elbow arrows for finish-to-start dependencies and
2188
+ a Today line.
2189
+
2190
+ ```tsx
2191
+ <Gantt
2192
+ rows={tasks.map(t => ({
2193
+ id: t.id,
2194
+ label: t.title,
2195
+ start: t.start_date, // 'YYYY-MM-DD' or null
2196
+ end: t.due_date, // inclusive; alone, it draws a milestone diamond
2197
+ groupId: t.section,
2198
+ done: !!t.done_date, // muted bar, struck-through label, "done" to a reader
2199
+ }))}
2200
+ groups={sections.map(s => ({ id: s.id, label: s.name }))}
2201
+ dependencies={links.map(l => ({ from: l.predecessor, to: l.successor }))}
2202
+ scale={scale}
2203
+ onScaleChange={setScale}
2204
+ onRowClick={row => openTask(row.id)}
2205
+ onRowChange={(id, { start, end }) => saveDates(id, start, end)}
2206
+ readOnly={!canEdit}
2207
+ />
2208
+ ```
2209
+
2210
+ - **Dates are calendar days** (`YYYY-MM-DD`; anything after the tenth character
2211
+ is ignored), never instants, so no zone or daylight-saving change moves a
2212
+ bar. A bar covers its start and end days inclusive.
2213
+ - **A row with no dates** keeps its label and draws nothing; a row with only a
2214
+ start draws a one-day bar.
2215
+ - **Editing:** with `onRowChange` and without `readOnly`, drag a bar to move it
2216
+ or either end to resize it. It snaps to whole days and reports once, on
2217
+ release, never shorter than one day. From the keyboard, a focused bar moves a
2218
+ day with the arrow keys, and Shift with an arrow moves its end date. Enter
2219
+ opens it (`onRowClick`), and so does a click on its label.
2220
+ - `tone` colours a bar with a status group's solid colour (`info`, `warning`,
2221
+ ...); the default is the accent. The maths (date to x, bar widths, arrow
2222
+ routing, drag snapping) is internal: it lives in
2223
+ `src/data/ganttGeometry.ts` and is tested there.
2224
+
2183
2225
  ### Server rendering (Next.js App Router)
2184
2226
 
2185
2227
  Every React entry — the root, `ui`, `apps`, `markdown`, `file-intake`,
@@ -1,32 +1,32 @@
1
- import{InputEndActionButton as e}from"./chunk-PT4GMPUB.js";import"./chunk-3DSGJIC7.js";import"./chunk-UZFFSZFI.js";import"./chunk-SV5RRBVA.js";import"./chunk-AYZY3YNC.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-PAVOVX3D.js";import{WindowTitle as n}from"./chunk-AYCWVVJ3.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-2DCATU5B.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OMSIXLK4.js";import{confirm as s}from"./chunk-64ZDYUE7.js";import"./chunk-RVD6HJUJ.js";import"./chunk-EIFNESXS.js";import"./chunk-Q4BJW37U.js";import"./chunk-RIG5FEVS.js";import"./chunk-CIOPLPZW.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-SAAXAAAH.js";import"./chunk-KPPKPGQI.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-CXXMSYA6.js";import"./chunk-DWGYC7OD.js";import"./chunk-JMGDGNM7.js";import"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as a}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-HCDG7EUR.js";import"./chunk-C3QOHMR6.js";import{useRef as i,useEffect as c,useState as l}from"react";import{jsxs as m,jsx as u,Fragment as h}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",p="react-os-shell:browser-homepage",k="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"}],g=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 f(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&&g.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var w=["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 y(){return"undefined"==typeof window?k:localStorage.getItem(p)||k}function v(){const h=i(void 0);void 0===h.current&&(h.current=t()),c(()=>{null!=h.current&&o(h.current)},[]);const k=h.current?f(h.current.url):"",[b,g]=l(y),[w,v]=l(k||b),[C,S]=l(w),[W,D]=l([w]),[R,z]=l(0),[U,A]=l(0),[E,G]=l(x),[M,P]=l(!1),[L,H]=l(null),J=i(null),T=i(null);c(()=>{try{localStorage.setItem(d,JSON.stringify(E))}catch{}},[E]);const I=e=>{const t=f(e);t&&(v(t),S(t),D(e=>{const o=e.slice(0,R+1);return o.push(t),o}),z(e=>e+1),P(!1))},O=()=>{"undefined"!=typeof window&&window.open(w,"_blank","noopener,noreferrer")},F=()=>{const e=L?.trim();e?(G(t=>[...t,{label:e,url:w}]),H(null)):H(null)};c(()=>{if(null===L)return;J.current?.focus(),J.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||H(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==L]);const V=e=>{G(t=>t.filter((t,o)=>o!==e))},X=R>0,Y=R<W.length-1,K=E.some(e=>e.url===w),Q="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
1
+ import{InputEndActionButton as e}from"./chunk-PT4GMPUB.js";import"./chunk-3DSGJIC7.js";import"./chunk-UZFFSZFI.js";import"./chunk-SV5RRBVA.js";import"./chunk-AYZY3YNC.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-JIBU7YY4.js";import{WindowTitle as n}from"./chunk-VW3ZUWW2.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-OL2XKAX2.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-IBLRSK7V.js";import{confirm as s}from"./chunk-ZHVWK5NL.js";import"./chunk-PPVZMIBL.js";import"./chunk-EIFNESXS.js";import"./chunk-QUN3RSMN.js";import"./chunk-RIG5FEVS.js";import"./chunk-25M4CAB3.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-Q2T5DRIK.js";import"./chunk-UJ23EKXU.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-H7WMOY62.js";import"./chunk-DWGYC7OD.js";import"./chunk-JMGDGNM7.js";import"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as a}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-L6XEON5Q.js";import"./chunk-C3QOHMR6.js";import{useRef as i,useEffect as c,useState as l}from"react";import{jsxs as m,jsx as u,Fragment as h}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",p="react-os-shell:browser-homepage",k="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"}],g=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 f(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&&g.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var w=["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 y(){return"undefined"==typeof window?k:localStorage.getItem(p)||k}function v(){const h=i(void 0);void 0===h.current&&(h.current=t()),c(()=>{null!=h.current&&o(h.current)},[]);const k=h.current?f(h.current.url):"",[b,g]=l(y),[w,v]=l(k||b),[C,W]=l(w),[S,R]=l([w]),[z,D]=l(0),[U,L]=l(0),[M,E]=l(x),[G,I]=l(!1),[T,H]=l(null),O=i(null),F=i(null);c(()=>{try{localStorage.setItem(d,JSON.stringify(M))}catch{}},[M]);const J=e=>{const t=f(e);t&&(v(t),W(t),R(e=>{const o=e.slice(0,z+1);return o.push(t),o}),D(e=>e+1),I(!1))},K=()=>{"undefined"!=typeof window&&window.open(w,"_blank","noopener,noreferrer")},P=()=>{const e=T?.trim();e?(E(t=>[...t,{label:e,url:w}]),H(null)):H(null)};c(()=>{if(null===T)return;O.current?.focus(),O.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||H(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==T]);const A=e=>{E(t=>t.filter((t,o)=>o!==e))},Q=z>0,V=z<S.length-1,X=M.some(e=>e.url===w),Y="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
2
2
  return m("div",{className:"relative flex flex-col h-full bg-white",children:[
3
- /* @__PURE__ */u(n,{title:`Browser - ${j(w)}`}),
3
+ /* @__PURE__ */u(n,{title:`Browser - ${N(w)}`}),
4
4
  /* @__PURE__ */u(r,{app:"browser"}),
5
5
  /* @__PURE__ */m("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0",children:[
6
- /* @__PURE__ */u("button",{onClick:()=>{if(R>0){const e=R-1;z(e),v(W[e]),S(W[e]),P(!1)}},disabled:!X,className:Q,title:"Back",children:/* @__PURE__ */u(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
7
- /* @__PURE__ */u("button",{onClick:()=>{if(R<W.length-1){const e=R+1;z(e),v(W[e]),S(W[e]),P(!1)}},disabled:!Y,className:Q,title:"Forward",children:/* @__PURE__ */u(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
8
- /* @__PURE__ */u("button",{onClick:()=>A(e=>e+1),className:Q,title:"Refresh",children:/* @__PURE__ */u(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
9
- /* @__PURE__ */u("button",{onClick:()=>I(b),className:Q,title:"Home",children:/* @__PURE__ */u(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
10
- /* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),I(C)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */m("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__ */u("button",{onClick:()=>{if(z>0){const e=z-1;D(e),v(S[e]),W(S[e]),I(!1)}},disabled:!Q,className:Y,title:"Back",children:/* @__PURE__ */u(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
7
+ /* @__PURE__ */u("button",{onClick:()=>{if(z<S.length-1){const e=z+1;D(e),v(S[e]),W(S[e]),I(!1)}},disabled:!V,className:Y,title:"Forward",children:/* @__PURE__ */u(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
8
+ /* @__PURE__ */u("button",{onClick:()=>L(e=>e+1),className:Y,title:"Refresh",children:/* @__PURE__ */u(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
9
+ /* @__PURE__ */u("button",{onClick:()=>J(b),className:Y,title:"Home",children:/* @__PURE__ */u(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
10
+ /* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),J(C)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */m("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__ */u("span",{className:"px-2 text-gray-400 text-xs",children:w.startsWith("https://")?"🔒":"⚠️"}),
12
- /* @__PURE__ */u("input",{type:"text",value:C,onChange:e=>S(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…"}),w!==C&&
13
- /* @__PURE__ */u("span",{className:"flex pr-1",children:/* @__PURE__ */u(e,{action:{label:"Reset to current URL",icon:/* @__PURE__ */u(a,{name:"close"}),onClick:()=>S(w)}})})]})}),
14
- /* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>K?V(E.findIndex(e=>e.url===w)):void H(j(w)),className:Q+" "+(K?"text-yellow-500":""),title:K?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */u(a,{name:"star",className:"h-4 w-4",fill:K?"currentColor":"none",strokeWidth:1.5})}),
15
- /* @__PURE__ */u("button",{onClick:O,className:Q,title:"Open in new tab",children:/* @__PURE__ */u(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
16
- /* @__PURE__ */u("button",{onClick:()=>P(e=>!e),className:Q,title:"Embedding help",children:/* @__PURE__ */u(a,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==L&&/* @__PURE__ */m("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:[
12
+ /* @__PURE__ */u("input",{type:"text",value:C,onChange:e=>W(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…"}),w!==C&&
13
+ /* @__PURE__ */u("span",{className:"flex pr-1",children:/* @__PURE__ */u(e,{action:{label:"Reset to current URL",icon:/* @__PURE__ */u(a,{name:"close"}),onClick:()=>W(w)}})})]})}),
14
+ /* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>X?A(M.findIndex(e=>e.url===w)):void H(N(w)),className:Y+" "+(X?"text-yellow-500":""),title:X?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */u(a,{name:"star",className:"h-4 w-4",fill:X?"currentColor":"none",strokeWidth:1.5})}),
15
+ /* @__PURE__ */u("button",{onClick:K,className:Y,title:"Open in new tab",children:/* @__PURE__ */u(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
16
+ /* @__PURE__ */u("button",{onClick:()=>I(e=>!e),className:Y,title:"Embedding help",children:/* @__PURE__ */u(a,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==T&&/* @__PURE__ */m("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:[
17
17
  /* @__PURE__ */u("div",{className:"text-2xs font-semibold uppercase tracking-wide text-ink-faint mb-1",children:"Bookmark this page"}),
18
18
  /* @__PURE__ */u("div",{className:"text-2xs text-ink-faintest truncate mb-2 font-mono",title:w,children:w}),
19
- /* @__PURE__ */u("input",{ref:J,type:"text",value:L,onChange:e=>H(e.target.value),onKeyDown:e=>{"Enter"===e.key?F():"Escape"===e.key&&H(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
+ /* @__PURE__ */u("input",{ref:O,type:"text",value:T,onChange:e=>H(e.target.value),onKeyDown:e=>{"Enter"===e.key?P():"Escape"===e.key&&H(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"}),
20
20
  /* @__PURE__ */m("div",{className:"flex justify-end gap-1 mt-2",children:[
21
21
  /* @__PURE__ */u("button",{onClick:()=>H(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
22
- /* @__PURE__ */u("button",{onClick:F,disabled:!L.trim(),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",children:"Save"})]})]}),
23
- /* @__PURE__ */m("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__ */u("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__ */m("button",{onClick:()=>I(e.url),onContextMenu:async o=>{o.preventDefault();await s({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&V(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:[
22
+ /* @__PURE__ */u("button",{onClick:P,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"})]})]}),
23
+ /* @__PURE__ */m("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===M.length&&/* @__PURE__ */u("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),M.map((e,t)=>/* @__PURE__ */m("button",{onClick:()=>J(e.url),onContextMenu:async o=>{o.preventDefault();await s({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&A(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:[
24
24
  /* @__PURE__ */u("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)),
25
25
  /* @__PURE__ */u("div",{className:"flex-1"}),
26
26
  /* @__PURE__ */u("button",{onClick:()=>{g(w);try{localStorage.setItem(p,w)}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"})]}),
27
- /* @__PURE__ */u("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */u(N,{url:w,iframeKey:U,iframeRef:T,openExternal:O,showHelp:M,dismissHelp:()=>P(!1)})})]})}function j(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:s}){const[i,d]=l(!1);c(()=>{d(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return w.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!i?/* @__PURE__ */u("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */m("div",{className:"max-w-md text-center",children:[
27
+ /* @__PURE__ */u("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */u(j,{url:w,iframeKey:U,iframeRef:F,openExternal:K,showHelp:G,dismissHelp:()=>I(!1)})})]})}function N(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function j({url:e,iframeKey:t,iframeRef:o,openExternal:r,showHelp:n,dismissHelp:s}){const[i,d]=l(!1);c(()=>{d(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return w.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!i?/* @__PURE__ */u("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */m("div",{className:"max-w-md text-center",children:[
28
28
  /* @__PURE__ */u(a,{name:"no-symbol",className:"h-14 w-14 mx-auto text-gray-300 mb-3",strokeWidth:1.2}),
29
- /* @__PURE__ */m("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[j(e)," can't be embedded"]}),
29
+ /* @__PURE__ */m("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[N(e)," can't be embedded"]}),
30
30
  /* @__PURE__ */m("p",{className:"text-sm text-gray-500 mb-4",children:["This site sends an ",
31
31
  /* @__PURE__ */u("span",{className:"font-mono text-xs",children:"X-Frame-Options"})," ","or ",
32
32
  /* @__PURE__ */u("span",{className:"font-mono text-xs",children:"Content-Security-Policy"})," header that refuses iframe embedding. The browser blocks the load before our app can do anything about it."]}),
@@ -0,0 +1,29 @@
1
+ import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-XBC7CBVJ.js";import{useWidgetSettings as n}from"./chunk-VW3ZUWW2.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-OL2XKAX2.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-IBLRSK7V.js";import"./chunk-ZHVWK5NL.js";import"./chunk-PPVZMIBL.js";import"./chunk-EIFNESXS.js";import"./chunk-QUN3RSMN.js";import"./chunk-RIG5FEVS.js";import"./chunk-25M4CAB3.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-Q2T5DRIK.js";import"./chunk-UJ23EKXU.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-DWGYC7OD.js";import"./chunk-JMGDGNM7.js";import"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as r}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-L6XEON5Q.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as o,useEffect as s}from"react";import{jsxs as l,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),[j,N]=c(!1),[y,x]=c(""),[C,f]=c([]),[v,$]=c(!1),[E,S]=c(()=>e(h)),[W,D]=c(!1),[M,T]=c(E),U=i(null);n(o(()=>{T({...E}),D(!0)},[E]));const X=o(e=>{x(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),w=o(()=>{k("0"),d(null),g(null),N(!1)},[]),A=o((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}},[]),F=o(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=A(p,t,b);k(String(e)),d(e),f(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),N(!0)},[m,p,b,j,A]),G=o(()=>{if(null===p||!b)return;const e=parseFloat(m),t=A(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,A]),J=o(()=>{k(e=>String(parseFloat(e)/100))},[]),Q=o(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);s(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?X(e.key):"."===e.key?X("."):"+"===e.key?F("+"):"-"===e.key?F("-"):"*"===e.key?F("×"):"/"===e.key?(e.preventDefault(),F("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&U.current?.contains(e.target)&&e.preventDefault(),G()):"Escape"===e.key?w():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&J())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[X,F,G,w,J]);const R="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",V=`${R} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,B=`${R} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,K=`${R} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,L=`${R} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
+ return l(a,{children:[
3
+ /* @__PURE__ */l("div",{ref:U,className:"flex flex-col h-full",style:{opacity:E.activeOpacity/100,backdropFilter:E.activeBlur>0?`blur(${E.activeBlur}px)`:void 0},children:[
4
+ /* @__PURE__ */l("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:C.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} ${j?"":m}`}),
6
+ /* @__PURE__ */l("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,v?{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__ */l("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
+ /* @__PURE__ */u("button",{onClick:w,className:K,children:"AC"}),
11
+ /* @__PURE__ */u("button",{onClick:Q,className:K,children:"+/−"}),
12
+ /* @__PURE__ */u("button",{onClick:J,className:K,children:"%"}),
13
+ /* @__PURE__ */u("button",{onClick:()=>F("÷"),className:`${B} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
+ /* @__PURE__ */u("button",{onClick:()=>X("7"),className:V,children:"7"}),
15
+ /* @__PURE__ */u("button",{onClick:()=>X("8"),className:V,children:"8"}),
16
+ /* @__PURE__ */u("button",{onClick:()=>X("9"),className:V,children:"9"}),
17
+ /* @__PURE__ */u("button",{onClick:()=>F("×"),className:`${B} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
18
+ /* @__PURE__ */u("button",{onClick:()=>X("4"),className:V,children:"4"}),
19
+ /* @__PURE__ */u("button",{onClick:()=>X("5"),className:V,children:"5"}),
20
+ /* @__PURE__ */u("button",{onClick:()=>X("6"),className:V,children:"6"}),
21
+ /* @__PURE__ */u("button",{onClick:()=>F("-"),className:`${B} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
22
+ /* @__PURE__ */u("button",{onClick:()=>X("1"),className:V,children:"1"}),
23
+ /* @__PURE__ */u("button",{onClick:()=>X("2"),className:V,children:"2"}),
24
+ /* @__PURE__ */u("button",{onClick:()=>X("3"),className:V,children:"3"}),
25
+ /* @__PURE__ */u("button",{onClick:()=>F("+"),className:`${B} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
26
+ /* @__PURE__ */u("button",{onClick:()=>X("0"),className:`${V} col-span-2`,children:"0"}),
27
+ /* @__PURE__ */u("button",{onClick:()=>X("."),className:V,children:"."}),
28
+ /* @__PURE__ */u("button",{onClick:G,className:L,children:"="})]})]}),
29
+ /* @__PURE__ */u(t,{open:W,onClose:()=>D(!1),title:"Calculator Settings",appearance:M,onAppearanceChange:T,onSave:()=>{S(M),localStorage.setItem(h,JSON.stringify(M)),D(!1)}})]})}export{m as default};
@@ -1,6 +1,6 @@
1
- import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-JGZEZHMP.js";import{useWidgetSettings as r}from"./chunk-AYCWVVJ3.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-2DCATU5B.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OMSIXLK4.js";import"./chunk-64ZDYUE7.js";import"./chunk-RVD6HJUJ.js";import"./chunk-EIFNESXS.js";import"./chunk-Q4BJW37U.js";import"./chunk-RIG5FEVS.js";import"./chunk-CIOPLPZW.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-SAAXAAAH.js";import"./chunk-KPPKPGQI.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-DWGYC7OD.js";import"./chunk-JMGDGNM7.js";import"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-HCDG7EUR.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as o,useEffect as c}from"react";import{jsxs as i,Fragment as a,jsx as m}from"react/jsx-runtime";var l=["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 k(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function g(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 j(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var N={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function f(){const[u,d]=s(j),[f,x]=s(()=>t(h)),[D,y]=s({}),[S,b]=s(!1),[C,v]=s(!1),[U,J]=s([]),[A,G]=s(f),[P,R]=s("USD"),[M,H]=s("CNY");r(o(()=>{J([...u]),G({...f}),v(!0)},[u,f])),c(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){b(!0);const r={};for(const e of t){const t=k(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,g(e,n.rates))}catch{}}e&&(y(r),b(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
1
+ import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-XBC7CBVJ.js";import{useWidgetSettings as r}from"./chunk-VW3ZUWW2.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-OL2XKAX2.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-IBLRSK7V.js";import"./chunk-ZHVWK5NL.js";import"./chunk-PPVZMIBL.js";import"./chunk-EIFNESXS.js";import"./chunk-QUN3RSMN.js";import"./chunk-RIG5FEVS.js";import"./chunk-25M4CAB3.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-Q2T5DRIK.js";import"./chunk-UJ23EKXU.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-DWGYC7OD.js";import"./chunk-JMGDGNM7.js";import"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-L6XEON5Q.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as o,useEffect as c}from"react";import{jsxs as i,Fragment as a,jsx as m}from"react/jsx-runtime";var l=["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 k(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function g(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 j(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var N={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function f(){const[u,d]=s(j),[f,x]=s(()=>t(h)),[y,S]=s({}),[b,D]=s(!1),[C,v]=s(!1),[U,J]=s([]),[R,B]=s(f),[M,A]=s("USD"),[G,I]=s("CNY");r(o(()=>{J([...u]),B({...f}),v(!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=k(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,g(e,n.rates))}catch{}}e&&(S(r),D(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
2
2
  return i(a,{children:[
3
- /* @__PURE__ */m("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__ */i("div",{className:"px-4 py-3 space-y-1",children:[S&&/* @__PURE__ */m(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=D[t]?.[e];/* @__PURE__ */
3
+ /* @__PURE__ */m("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__ */i("div",{className:"px-4 py-3 space-y-1",children:[b&&/* @__PURE__ */m(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=y[t]?.[e];/* @__PURE__ */
4
4
  return i("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__ */i("div",{className:"flex items-center gap-2",children:[
6
6
  /* @__PURE__ */m("span",{className:"text-base",children:N[t]||""}),
@@ -9,13 +9,13 @@ return i("button",{onClick:()=>{const t=u.map((t,e)=>e===r?[t[1],t[0]]:t);d(t),l
9
9
  /* @__PURE__ */m("span",{className:"text-base",children:N[e]||""}),
10
10
  /* @__PURE__ */m("span",{className:"text-sm font-semibold text-gray-700",children:e})]}),
11
11
  /* @__PURE__ */m("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__ */m(e,{open:C,onClose:()=>v(!1),title:"Currency Settings",appearance:A,onAppearanceChange:G,onSave:()=>{if(0===U.length)return;const t=U.slice(0,4);d(t),x(A),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(A)),v(!1)},children:/* @__PURE__ */i("div",{children:[
12
+ /* @__PURE__ */m(e,{open:C,onClose:()=>v(!1),title:"Currency Settings",appearance:R,onAppearanceChange:B,onSave:()=>{if(0===U.length)return;const t=U.slice(0,4);d(t),x(R),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(R)),v(!1)},children:/* @__PURE__ */i("div",{children:[
13
13
  /* @__PURE__ */i("h3",{className:"text-sm font-semibold text-ink mb-2",children:["Currency Pairs ",
14
14
  /* @__PURE__ */i("span",{className:"text-2xs font-normal text-ink-faintest",children:["(",U.length,"/",4,")"]})]}),
15
15
  /* @__PURE__ */m("div",{className:"space-y-1 mb-2",children:U.map(([t,e],r)=>/* @__PURE__ */i("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
16
16
  /* @__PURE__ */i("span",{className:"text-sm",children:[N[t]||""," ",t," → ",N[e]||""," ",e]}),
17
17
  /* @__PURE__ */m("button",{onClick:()=>J(t=>t.filter((t,e)=>e!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),U.length<4?/* @__PURE__ */i("div",{className:"flex items-center gap-2",children:[
18
- /* @__PURE__ */m("select",{value:P,onChange:t=>R(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:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
18
+ /* @__PURE__ */m("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:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
19
19
  /* @__PURE__ */m("span",{className:"text-gray-400",children:"→"}),
20
- /* @__PURE__ */m("select",{value:M,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:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
21
- /* @__PURE__ */m("button",{onClick:()=>{P!==M&&U.length<4&&J(t=>[...t,[P,M]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */i("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{f as default};
20
+ /* @__PURE__ */m("select",{value:G,onChange:t=>I(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:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
21
+ /* @__PURE__ */m("button",{onClick:()=>{M!==G&&U.length<4&&J(t=>[...t,[M,G]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */i("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{f as default};