efficient-shell 13.17.0 → 13.18.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 (89) hide show
  1. package/README.md +6 -0
  2. package/dist/{Browser-547OGMQH.js → Browser-ORLSC6T4.js} +12 -12
  3. package/dist/Calculator-4UBMDAJO.js +1 -1
  4. package/dist/CurrencyConverter-H3HHXXKT.js +1 -1
  5. package/dist/{Files-GPPTZPDS.js → Files-PI3Z4TAO.js} +69 -69
  6. package/dist/{Notepad-GAZ7CZQB.js → Notepad-6FPZHJQ7.js} +7 -7
  7. package/dist/PomodoroTimer-JVCYYGRD.js +1 -1
  8. package/dist/{Preview-GSD54EUE.js → Preview-4XSAIYMZ.js} +13 -13
  9. package/dist/Stock-S266KGAF.js +1 -1
  10. package/dist/Weather-TE4TTTQA.js +1 -1
  11. package/dist/WorldClock-5TPBHBYA.js +1 -1
  12. package/dist/ai/index.js +116 -116
  13. package/dist/apps/index.js +1 -1
  14. package/dist/bin/browser-check.js +1 -1
  15. package/dist/bin/media-host-check.js +1 -1
  16. package/dist/bin/ui-check.js +1 -1
  17. package/dist/brand.css +1 -1
  18. package/dist/charts/PieChart.js +1 -1
  19. package/dist/charts/RadarChart.js +1 -1
  20. package/dist/charts/RadialBarChart.js +1 -1
  21. package/dist/charts/SpecChart.js +1 -1
  22. package/dist/charts/TimeSeriesChart.js +1 -1
  23. package/dist/{chunk-UGEA3C5C.js → chunk-23LK4PLJ.js} +5 -5
  24. package/dist/chunk-2WBKQOLF.js +2 -0
  25. package/dist/chunk-43JCG6EB.js +1 -0
  26. package/dist/{chunk-J4CVYOY3.js → chunk-4SYPNE3P.js} +1 -1
  27. package/dist/{chunk-P4J26R5P.js → chunk-6UGMQZTF.js} +1 -1
  28. package/dist/{chunk-LGGATDPH.js → chunk-ABPVCVCT.js} +13 -13
  29. package/dist/{chunk-FKMARSJZ.js → chunk-BNI3N4TT.js} +2 -2
  30. package/dist/{chunk-5EHIWKUZ.js → chunk-EG5MU7XL.js} +1 -1
  31. package/dist/{chunk-UC5IC3AM.js → chunk-EHM3ZVVT.js} +4 -4
  32. package/dist/{chunk-SHHRC5XK.js → chunk-ENVANMHI.js} +7 -7
  33. package/dist/{chunk-UFWBPTCM.js → chunk-F5F5RKB5.js} +5 -5
  34. package/dist/{chunk-KSK4VZIM.js → chunk-FUPU7Z2G.js} +2 -2
  35. package/dist/{chunk-BVX7LUAW.js → chunk-GEQZUCEO.js} +6 -6
  36. package/dist/{chunk-OOGUQEPT.js → chunk-J5NBRYBF.js} +1 -1
  37. package/dist/chunk-KBQXXPFK.js +1 -0
  38. package/dist/{chunk-MHQW6NAE.js → chunk-KBZMOPPH.js} +10 -10
  39. package/dist/{chunk-H5PSCQJ2.js → chunk-NVKRYUCM.js} +6 -6
  40. package/dist/{chunk-7IXU4YT4.js → chunk-OFFJHTNM.js} +4 -4
  41. package/dist/chunk-OTEAWX2C.js +1 -0
  42. package/dist/{chunk-LNCAIY64.js → chunk-PBSCF2ML.js} +5 -5
  43. package/dist/{chunk-IUQJGFEO.js → chunk-QTDR2CTB.js} +3 -3
  44. package/dist/{chunk-K2FVP22A.js → chunk-S43DEWMZ.js} +1 -1
  45. package/dist/{chunk-XXTAMF3O.js → chunk-S7YUQLBN.js} +6 -6
  46. package/dist/chunk-SHBZTW7P.js +5 -0
  47. package/dist/{chunk-POQUUMRS.js → chunk-V6HKE4HV.js} +2 -2
  48. package/dist/{chunk-OIEFMLYI.js → chunk-VR6LMREE.js} +3 -3
  49. package/dist/{chunk-EJOKROMB.js → chunk-WHPYQOXA.js} +5 -5
  50. package/dist/{chunk-XU4I2DMR.js → chunk-WJTNQ7YD.js} +2 -2
  51. package/dist/data/EntityList.js +1 -1
  52. package/dist/data/ResizableTable.js +1 -1
  53. package/dist/forms/BorderInput.js +1 -1
  54. package/dist/forms/BrandAssetEditor.js +1 -1
  55. package/dist/forms/ColorPicker.js +1 -1
  56. package/dist/forms/CornersInput.js +1 -1
  57. package/dist/forms/InputNumber.js +1 -1
  58. package/dist/forms/MediaLibrary.js +1 -1
  59. package/dist/forms/MediaUploadField.js +1 -1
  60. package/dist/forms/PositionInput.js +1 -1
  61. package/dist/forms/SidesInput.js +1 -1
  62. package/dist/forms/Slider.js +1 -1
  63. package/dist/forms/UnitMenu.js +1 -1
  64. package/dist/forms/WidestLabel.d.ts +26 -0
  65. package/dist/forms/WidestLabel.js +1 -0
  66. package/dist/forms/WidthsBar.js +1 -1
  67. package/dist/icons/brands.node.js +1 -1
  68. package/dist/icons/efficient-glyphs.js +1 -1
  69. package/dist/icons/efficient-looks.js +1 -1
  70. package/dist/icons/efficient.js +1 -1
  71. package/dist/icons/index.js +1 -1
  72. package/dist/icons/looks/map.js +1 -1
  73. package/dist/icons/payment.js +3 -3
  74. package/dist/icons/sets.js +1 -1
  75. package/dist/index.d.ts +1 -0
  76. package/dist/index.js +338 -338
  77. package/dist/shell/LanguageSelect.js +1 -1
  78. package/dist/shell/SettingRow.js +1 -1
  79. package/dist/telemetry/index.js +1 -1
  80. package/dist/templates/DashboardTemplate.js +1 -1
  81. package/dist/ui/index.d.ts +1 -0
  82. package/dist/ui/index.js +1 -1
  83. package/dist/version.js +1 -1
  84. package/package.json +1 -1
  85. package/dist/chunk-FRTDUHQF.js +0 -1
  86. package/dist/chunk-PTYB2GGI.js +0 -1
  87. package/dist/chunk-VLX7L2AM.js +0 -1
  88. package/dist/chunk-XQVGBVHC.js +0 -5
  89. /package/dist/{chunk-YRQ5WGOM.js → chunk-7UCZAUAU.js} +0 -0
package/README.md CHANGED
@@ -1620,6 +1620,12 @@ Round 4:
1620
1620
  `SidesInput`, `CornersInput` (its unit in force is `radiusUnit`),
1621
1621
  `BorderInput` and `PositionInput` pass their `units` there, so the menu is
1622
1622
  drawn in one place. A choice of one unit, or none, is plain text.
1623
+ **`WidestLabel`** (`labels`, `shown`, `align`: `start` | `center` | `end`,
1624
+ default `start`) keeps a control as wide as the widest label it can change
1625
+ to: every label sits in one grid cell and only `shown` is visible, so a
1626
+ change of words moves nothing beside it. `UnitMenu`'s trigger draws with it;
1627
+ use it for a button whose words change (for example "Close Short" /
1628
+ "Complete Order").
1623
1629
  - **`Slider`**: `shiftStep`, `placeholderValue` and `stepFrom` (see `Slider`
1624
1630
  above). `onCommit(value)` reports the value once it is final: the range's
1625
1631
  own `change` (let go, or a key that moved it), or the box left or given
@@ -1,30 +1,30 @@
1
- import{InputEndActionButton as e}from"./chunk-3SIRRK3F.js";import"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import"./chunk-NWS5G7FE.js";import"./chunk-AYZY3YNC.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-POQUUMRS.js";import{WindowTitle as n}from"./chunk-ZI2FDUYJ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-5A7MWTXX.js";import"./chunk-FBZUEZK7.js";import"./chunk-BG3C4ALM.js";import{confirm as s}from"./chunk-GMLOMLCS.js";import"./chunk-UTQN5AIO.js";import"./chunk-EIFNESXS.js";import"./chunk-SXHV5OLA.js";import"./chunk-SF4IIV5Z.js";import"./chunk-FRCTA5FS.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-WRV6QKJN.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-FRTDUHQF.js";import"./chunk-DWGYC7OD.js";import"./chunk-YDJ5IZOU.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import{Icon as a}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-IUVGHHR3.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,R]=l(w),[S,U]=l([w]),[W,D]=l(0),[F,z]=l(0),[T,E]=l(x),[H,A]=l(!1),[L,I]=l(null),M=i(null),O=i(null);c(()=>{try{localStorage.setItem(d,JSON.stringify(T))}catch{}},[T]);const Q=e=>{const t=f(e);t&&(v(t),R(t),U(e=>{const o=e.slice(0,W+1);return o.push(t),o}),D(e=>e+1),A(!1))},Z=()=>{"undefined"!=typeof window&&window.open(w,"_blank","noopener,noreferrer")},G=()=>{const e=L?.trim();e?(E(t=>[...t,{label:e,url:w}]),I(null)):I(null)};c(()=>{if(null===L)return;M.current?.focus(),M.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||I(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==L]);const J=e=>{E(t=>t.filter((t,o)=>o!==e))},V=W>0,Y=W<S.length-1,B=T.some(e=>e.url===w),K="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
1
+ import{InputEndActionButton as e}from"./chunk-3SIRRK3F.js";import"./chunk-EX3DARI3.js";import"./chunk-VQBKRBBR.js";import"./chunk-NWS5G7FE.js";import"./chunk-AYZY3YNC.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-V6HKE4HV.js";import{WindowTitle as n}from"./chunk-ZI2FDUYJ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-BG3C4ALM.js";import{confirm as s}from"./chunk-GMLOMLCS.js";import"./chunk-UTQN5AIO.js";import"./chunk-EIFNESXS.js";import"./chunk-SXHV5OLA.js";import"./chunk-SF4IIV5Z.js";import"./chunk-FRCTA5FS.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-WRV6QKJN.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-43JCG6EB.js";import"./chunk-DWGYC7OD.js";import"./chunk-YDJ5IZOU.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import{Icon as a}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-IUVGHHR3.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,R]=l(w),[S,W]=l([w]),[U,z]=l(0),[D,E]=l(0),[F,H]=l(x),[T,A]=l(!1),[L,I]=l(null),V=i(null),Z=i(null);c(()=>{try{localStorage.setItem(d,JSON.stringify(F))}catch{}},[F]);const G=e=>{const t=f(e);t&&(v(t),R(t),W(e=>{const o=e.slice(0,U+1);return o.push(t),o}),z(e=>e+1),A(!1))},J=()=>{"undefined"!=typeof window&&window.open(w,"_blank","noopener,noreferrer")},M=()=>{const e=L?.trim();e?(H(t=>[...t,{label:e,url:w}]),I(null)):I(null)};c(()=>{if(null===L)return;V.current?.focus(),V.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||I(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==L]);const O=e=>{H(t=>t.filter((t,o)=>o!==e))},Q=U>0,B=U<S.length-1,Y=F.some(e=>e.url===w),K="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
3
  /* @__PURE__ */u(n,{title:`Browser - ${j(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(W>0){const e=W-1;D(e),v(S[e]),R(S[e]),A(!1)}},disabled:!V,className:K,title:"Back",children:/* @__PURE__ */u(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
7
- /* @__PURE__ */u("button",{onClick:()=>{if(W<S.length-1){const e=W+1;D(e),v(S[e]),R(S[e]),A(!1)}},disabled:!Y,className:K,title:"Forward",children:/* @__PURE__ */u(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
8
- /* @__PURE__ */u("button",{onClick:()=>z(e=>e+1),className:K,title:"Refresh",children:/* @__PURE__ */u(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
9
- /* @__PURE__ */u("button",{onClick:()=>Q(b),className:K,title:"Home",children:/* @__PURE__ */u(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
10
- /* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),Q(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(U>0){const e=U-1;z(e),v(S[e]),R(S[e]),A(!1)}},disabled:!Q,className:K,title:"Back",children:/* @__PURE__ */u(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
7
+ /* @__PURE__ */u("button",{onClick:()=>{if(U<S.length-1){const e=U+1;z(e),v(S[e]),R(S[e]),A(!1)}},disabled:!B,className:K,title:"Forward",children:/* @__PURE__ */u(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
8
+ /* @__PURE__ */u("button",{onClick:()=>E(e=>e+1),className:K,title:"Refresh",children:/* @__PURE__ */u(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
9
+ /* @__PURE__ */u("button",{onClick:()=>G(b),className:K,title:"Home",children:/* @__PURE__ */u(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
10
+ /* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),G(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
12
  /* @__PURE__ */u("input",{type:"text",value:C,onChange:e=>R(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
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:()=>R(w)}})})]})}),
14
- /* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>B?J(T.findIndex(e=>e.url===w)):void I(j(w)),className:K+" "+(B?"text-yellow-500":""),title:B?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */u(a,{name:"star",className:"h-4 w-4",fill:B?"currentColor":"none",strokeWidth:1.5})}),
15
- /* @__PURE__ */u("button",{onClick:Z,className:K,title:"Open in new tab",children:/* @__PURE__ */u(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
14
+ /* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>Y?O(F.findIndex(e=>e.url===w)):void I(j(w)),className:K+" "+(Y?"text-yellow-500":""),title:Y?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */u(a,{name:"star",className:"h-4 w-4",fill:Y?"currentColor":"none",strokeWidth:1.5})}),
15
+ /* @__PURE__ */u("button",{onClick:J,className:K,title:"Open in new tab",children:/* @__PURE__ */u(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
16
16
  /* @__PURE__ */u("button",{onClick:()=>A(e=>!e),className:K,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:[
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:M,type:"text",value:L,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key?G():"Escape"===e.key&&I(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:V,type:"text",value:L,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key?M():"Escape"===e.key&&I(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:()=>I(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
22
- /* @__PURE__ */u("button",{onClick:G,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===T.length&&/* @__PURE__ */u("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),T.map((e,t)=>/* @__PURE__ */m("button",{onClick:()=>Q(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"})&&J(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:M,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===F.length&&/* @__PURE__ */u("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),F.map((e,t)=>/* @__PURE__ */m("button",{onClick:()=>G(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"})&&O(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:F,iframeRef:O,openExternal:Z,showHelp:H,dismissHelp:()=>A(!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(N,{url:w,iframeKey:D,iframeRef:Z,openExternal:J,showHelp:T,dismissHelp:()=>A(!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:[
28
28
  /* @__PURE__ */u(a,{name:"no-symbol",className:"h-14 w-14 mx-auto text-gray-300 mb-3",strokeWidth:1.2}),
29
29
  /* @__PURE__ */m("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[j(e)," can't be embedded"]}),
30
30
  /* @__PURE__ */m("p",{className:"text-sm text-gray-500 mb-4",children:["This site sends an ",
@@ -1,4 +1,4 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-QSJMLHBD.js";import{useWidgetSettings as n}from"./chunk-ZI2FDUYJ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-5A7MWTXX.js";import"./chunk-FBZUEZK7.js";import"./chunk-BG3C4ALM.js";import"./chunk-GMLOMLCS.js";import"./chunk-UTQN5AIO.js";import"./chunk-EIFNESXS.js";import"./chunk-SXHV5OLA.js";import"./chunk-SF4IIV5Z.js";import"./chunk-FRCTA5FS.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-WRV6QKJN.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-DWGYC7OD.js";import"./chunk-YDJ5IZOU.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import{Icon as r}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-IUVGHHR3.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,C]=c(""),[x,f]=c([]),[v,$]=c(!1),[S,U]=c(()=>e(h)),[F,T]=c(!1),[E,A]=c(S),D=i(null);n(o(()=>{A({...S}),T(!0)},[S]));const W=o(e=>{C(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),Z=o(()=>{k("0"),d(null),g(null),N(!1)},[]),J=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}},[]),R=o(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=J(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,J]),M=o(()=>{if(null===p||!b)return;const e=parseFloat(m),t=J(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),C(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,J]),Q=o(()=>{k(e=>String(parseFloat(e)/100))},[]),V=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"?W(e.key):"."===e.key?W("."):"+"===e.key?R("+"):"-"===e.key?R("-"):"*"===e.key?R("×"):"/"===e.key?(e.preventDefault(),R("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&D.current?.contains(e.target)&&e.preventDefault(),M()):"Escape"===e.key?Z():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&Q())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[W,R,M,Z,Q]);const w="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",H=`${w} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,O=`${w} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,B=`${w} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,G=`${w} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
1
+ import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-QSJMLHBD.js";import{useWidgetSettings as n}from"./chunk-ZI2FDUYJ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-BG3C4ALM.js";import"./chunk-GMLOMLCS.js";import"./chunk-UTQN5AIO.js";import"./chunk-EIFNESXS.js";import"./chunk-SXHV5OLA.js";import"./chunk-SF4IIV5Z.js";import"./chunk-FRCTA5FS.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-WRV6QKJN.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-DWGYC7OD.js";import"./chunk-YDJ5IZOU.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import{Icon as r}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-IUVGHHR3.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,C]=c(""),[x,f]=c([]),[v,$]=c(!1),[S,U]=c(()=>e(h)),[F,T]=c(!1),[E,A]=c(S),D=i(null);n(o(()=>{A({...S}),T(!0)},[S]));const W=o(e=>{C(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),Z=o(()=>{k("0"),d(null),g(null),N(!1)},[]),J=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}},[]),R=o(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=J(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,J]),M=o(()=>{if(null===p||!b)return;const e=parseFloat(m),t=J(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),C(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,J]),Q=o(()=>{k(e=>String(parseFloat(e)/100))},[]),V=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"?W(e.key):"."===e.key?W("."):"+"===e.key?R("+"):"-"===e.key?R("-"):"*"===e.key?R("×"):"/"===e.key?(e.preventDefault(),R("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&D.current?.contains(e.target)&&e.preventDefault(),M()):"Escape"===e.key?Z():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&Q())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[W,R,M,Z,Q]);const w="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",H=`${w} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,O=`${w} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,B=`${w} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,G=`${w} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
2
  return l(a,{children:[
3
3
  /* @__PURE__ */l("div",{ref:D,className:"flex flex-col h-full",style:{opacity:S.activeOpacity/100,backdropFilter:S.activeBlur>0?`blur(${S.activeBlur}px)`:void 0},children:[
4
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:[
@@ -1,4 +1,4 @@
1
- import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-QSJMLHBD.js";import{useWidgetSettings as r}from"./chunk-ZI2FDUYJ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-5A7MWTXX.js";import"./chunk-FBZUEZK7.js";import"./chunk-BG3C4ALM.js";import"./chunk-GMLOMLCS.js";import"./chunk-UTQN5AIO.js";import"./chunk-EIFNESXS.js";import"./chunk-SXHV5OLA.js";import"./chunk-SF4IIV5Z.js";import"./chunk-FRCTA5FS.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-WRV6QKJN.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-DWGYC7OD.js";import"./chunk-YDJ5IZOU.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-IUVGHHR3.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,S]=s(()=>t(h)),[x,y]=s({}),[b,D]=s(!1),[U,C]=s(!1),[v,J]=s([]),[A,R]=s(f),[F,B]=s("USD"),[H,I]=s("CNY");r(o(()=>{J([...u]),R({...f}),C(!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&&(y(r),D(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
1
+ import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-QSJMLHBD.js";import{useWidgetSettings as r}from"./chunk-ZI2FDUYJ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-FBZUEZK7.js";import"./chunk-5A7MWTXX.js";import"./chunk-BG3C4ALM.js";import"./chunk-GMLOMLCS.js";import"./chunk-UTQN5AIO.js";import"./chunk-EIFNESXS.js";import"./chunk-SXHV5OLA.js";import"./chunk-SF4IIV5Z.js";import"./chunk-FRCTA5FS.js";import"./chunk-VWGWZY7A.js";import"./chunk-UVHXVSB2.js";import"./chunk-WRV6QKJN.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-DPFEQQQU.js";import"./chunk-DWGYC7OD.js";import"./chunk-YDJ5IZOU.js";import"./chunk-THAPVKEJ.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UTISUEO4.js";import"./chunk-BUFAJJDZ.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-TD3ZQD5R.js";import"./chunk-F2RAIGCG.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-VY3UA6AR.js";import"./chunk-WCCS4VFE.js";import"./chunk-ZDXRSY2Y.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-IUVGHHR3.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,S]=s(()=>t(h)),[x,y]=s({}),[b,D]=s(!1),[U,C]=s(!1),[v,J]=s([]),[A,R]=s(f),[F,B]=s("USD"),[H,I]=s("CNY");r(o(()=>{J([...u]),R({...f}),C(!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&&(y(r),D(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
2
2
  return i(a,{children:[
3
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=x[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:[