efficient-shell 4.160.0 → 4.162.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 (67) hide show
  1. package/README.md +22 -4
  2. package/dist/{Browser-3KOGROX7.js → Browser-TNUODLDN.js} +25 -25
  3. package/dist/Calculator-HHPPI72V.js +29 -0
  4. package/dist/ConfirmDialog-D46T6ZXW.js +1 -0
  5. package/dist/{CurrencyConverter-3GTKDKHH.js → CurrencyConverter-4XKRUO7Y.js} +6 -6
  6. package/dist/{Documents-FDGF7QBQ.js → Documents-VYDMJL37.js} +6 -6
  7. package/dist/{Files-TTSYOPVB.js → Files-D3D6JWSJ.js} +28 -28
  8. package/dist/{Notepad-ITHIATP2.js → Notepad-CBJIS3WA.js} +10 -10
  9. package/dist/PdfViewer-UEMING6A.js +1 -0
  10. package/dist/{PomodoroTimer-CRKL26PP.js → PomodoroTimer-PB6J2LMS.js} +18 -18
  11. package/dist/{Preview-GZTTEZWS.js → Preview-O2UZROZO.js} +17 -17
  12. package/dist/{Sidebar-ECJEQXFK.js → Sidebar-PPC3OK4H.js} +36 -36
  13. package/dist/Spreadsheet-AYV4CQP3.js +37 -0
  14. package/dist/{Stock-NAHSVLAJ.js → Stock-FGJ5HQ7H.js} +4 -4
  15. package/dist/{Weather-AY3QWBQT.js → Weather-FW3WWYCI.js} +21 -21
  16. package/dist/{WorldClock-AXNMA4PG.js → WorldClock-UC4CXE2N.js} +6 -6
  17. package/dist/apps/index.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/{chunk-A6FPBD7W.js → chunk-2S73NE3L.js} +1 -1
  20. package/dist/{chunk-UPI2GKKD.js → chunk-4SQNYTO3.js} +12 -12
  21. package/dist/{chunk-XN76YBX3.js → chunk-4VMA4ALC.js} +8 -8
  22. package/dist/chunk-5A7MWTXX.js +1 -0
  23. package/dist/{chunk-HQTSPK5Q.js → chunk-5UNSI4UI.js} +1 -1
  24. package/dist/{chunk-LCB4IVEL.js → chunk-6CKRJ4YK.js} +250 -250
  25. package/dist/chunk-6KO2U66R.js +3 -0
  26. package/dist/chunk-6WLGERBO.js +27 -0
  27. package/dist/{chunk-26RS37FG.js → chunk-7EACKL5V.js} +1 -1
  28. package/dist/{chunk-HF4IZFFX.js → chunk-7ESGXPKN.js} +11 -11
  29. package/dist/{chunk-FHIF6IUV.js → chunk-A2FL26TE.js} +1 -1
  30. package/dist/{chunk-KZPQW6UL.js → chunk-C2A4PIGZ.js} +2 -2
  31. package/dist/chunk-DSSLOQDW.js +2 -0
  32. package/dist/{chunk-VNEH2Y6H.js → chunk-DYVN6C2E.js} +3 -3
  33. package/dist/{chunk-XPSADW6W.js → chunk-EU3AQ4B2.js} +1 -1
  34. package/dist/{chunk-B2TBCVHH.js → chunk-EYU4IAEZ.js} +1 -1
  35. package/dist/{chunk-PDTZTADH.js → chunk-GBL5KOGP.js} +17 -17
  36. package/dist/{chunk-T6MKFQRH.js → chunk-GTQJYE6M.js} +6 -6
  37. package/dist/chunk-HQLEQIMG.js +21 -0
  38. package/dist/{chunk-JGHRZYNV.js → chunk-ILTSTULF.js} +1 -1
  39. package/dist/chunk-LQVXGB7A.js +1 -0
  40. package/dist/{chunk-KASHUEJV.js → chunk-O46U4PVN.js} +4 -4
  41. package/dist/chunk-S2PS4IOT.js +2 -0
  42. package/dist/{chunk-ZJ66QFOH.js → chunk-S6ZIQSAF.js} +1 -1
  43. package/dist/{chunk-36QR65KW.js → chunk-STJVLCQU.js} +2 -2
  44. package/dist/chunk-UZUH5PVW.js +1 -0
  45. package/dist/chunk-ZWYKMIX7.js +112 -0
  46. package/dist/file-intake/index.js +1 -1
  47. package/dist/{index-Brl0XepS.d.ts → index-DYVoKNru.d.ts} +86 -3
  48. package/dist/index.d.ts +47 -10
  49. package/dist/index.js +645 -645
  50. package/dist/map/index.js +2 -2
  51. package/dist/page-tabs/index.d.ts +9 -1
  52. package/dist/page-tabs/index.js +5 -5
  53. package/dist/pdf/index.js +1 -1
  54. package/dist/ui/index.d.ts +1 -1
  55. package/dist/ui/index.js +1 -1
  56. package/package.json +1 -1
  57. package/dist/Calculator-QLJJ3ICT.js +0 -29
  58. package/dist/ConfirmDialog-7Q2OOU4W.js +0 -1
  59. package/dist/PdfViewer-VIT7Y55M.js +0 -1
  60. package/dist/Spreadsheet-PFKZTLSI.js +0 -37
  61. package/dist/chunk-6UXY7MPY.js +0 -2
  62. package/dist/chunk-GF2XCISN.js +0 -1
  63. package/dist/chunk-JK3IIJN5.js +0 -22
  64. package/dist/chunk-VRW5JNMR.js +0 -18
  65. package/dist/chunk-VVI77XNV.js +0 -1
  66. package/dist/chunk-X6E6UULK.js +0 -113
  67. package/dist/chunk-YKZGKYVT.js +0 -2
@@ -1,6 +1,6 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-XPSADW6W.js";import{useWidgetSettings as a}from"./chunk-X6E6UULK.js";import"./chunk-T6MKFQRH.js";import"./chunk-6UXY7MPY.js";import"./chunk-PH3PRIFP.js";import"./chunk-PDTZTADH.js";import"./chunk-VNEH2Y6H.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-VVI77XNV.js";import"./chunk-D65T4H6J.js";import{useState as r,useCallback as n}from"react";import{jsxs as c,Fragment as s,jsx as i}from"react/jsx-runtime";var l=["AAPL","MSFT","GOOGL","TSLA","NVDA"],o="stock_symbols",m="stock_appearance",d={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},g=Object.keys(d);function p(){try{const e=JSON.parse(localStorage.getItem(o)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return l}var h=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function x(){const[l,x]=r(p),[u,y]=r(()=>e(m)),[b,f]=r(!1),[N,v]=r([]),[k,A]=r(u),[S,P]=r(""),j=n(()=>{v([...l]),A({...u}),P(""),f(!0)},[l,u]);a(j);const D=()=>{const e=S.trim().toUpperCase();!e||N.includes(e)||N.length>=8||(v(t=>[...t,e]),P(""))},O=g.filter(e=>!N.includes(e));/* @__PURE__ */
1
+ import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-EU3AQ4B2.js";import{useWidgetSettings as a}from"./chunk-ZWYKMIX7.js";import"./chunk-GTQJYE6M.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-PH3PRIFP.js";import"./chunk-6KO2U66R.js";import"./chunk-GBL5KOGP.js";import"./chunk-DYVN6C2E.js";import"./chunk-D65T4H6J.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-UZUH5PVW.js";import{useState as r,useCallback as n}from"react";import{jsxs as c,Fragment as s,jsx as i}from"react/jsx-runtime";var l=["AAPL","MSFT","GOOGL","TSLA","NVDA"],o="stock_symbols",m="stock_appearance",p={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},d=Object.keys(p);function g(){try{const e=JSON.parse(localStorage.getItem(o)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return l}var h=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function x(){const[l,x]=r(g),[u,y]=r(()=>e(m)),[b,f]=r(!1),[N,v]=r([]),[k,A]=r(u),[S,j]=r(""),P=n(()=>{v([...l]),A({...u}),j(""),f(!0)},[l,u]);a(P);const O=()=>{const e=S.trim().toUpperCase();!e||N.includes(e)||N.length>=8||(v(t=>[...t,e]),j(""))},D=d.filter(e=>!N.includes(e));/* @__PURE__ */
2
2
  return c(s,{children:[
3
- /* @__PURE__ */i("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${u.activeOpacity/100})`,backdropFilter:u.activeBlur>0?`blur(${u.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3",children:0===l.length?/* @__PURE__ */i("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */i("div",{className:"space-y-0.5",children:l.map(e=>{const t=d[e],a=(t?.change??0)>=0,r=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
3
+ /* @__PURE__ */i("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${u.activeOpacity/100})`,backdropFilter:u.activeBlur>0?`blur(${u.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3",children:0===l.length?/* @__PURE__ */i("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */i("div",{className:"space-y-0.5",children:l.map(e=>{const t=p[e],a=(t?.change??0)>=0,r=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
4
4
  return c("div",{className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0",children:[
5
5
  /* @__PURE__ */i("span",{className:"text-sm font-bold text-gray-800 tracking-tight",children:e}),t?/* @__PURE__ */c("div",{className:"flex flex-col items-end leading-tight",children:[
6
6
  /* @__PURE__ */i("span",{className:"text-sm font-mono font-semibold text-gray-900 tabular-nums",children:(n=t.price,`$${n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`)}),
@@ -11,6 +11,6 @@ return c("div",{className:"flex items-center justify-between px-2 py-2 border-b
11
11
  /* @__PURE__ */c("div",{className:"space-y-1 mb-2",children:[N.map((e,t)=>/* @__PURE__ */c("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
12
12
  /* @__PURE__ */i("span",{className:"text-sm font-semibold text-gray-700",children:e}),
13
13
  /* @__PURE__ */i("button",{onClick:()=>v(e=>e.filter((e,a)=>a!==t)),className:"text-red-400 hover:text-red-600",children:"×"})]},t)),0===N.length&&/* @__PURE__ */i("p",{className:"text-[11px] text-gray-400 italic",children:"No symbols — add a ticker below."})]}),N.length<8?/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
14
- /* @__PURE__ */i("input",{value:S,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"===e.key&&D()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
15
- /* @__PURE__ */i("button",{onClick:D,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */c("p",{className:"text-[11px] text-gray-400 italic",children:["Max ",8," symbols — remove one to add another."]}),O.length>0&&N.length<8&&/* @__PURE__ */i("div",{className:"flex flex-wrap gap-1.5 mt-2",children:O.map(e=>/* @__PURE__ */i("button",{onClick:()=>v(t=>t.length<8?[...t,e]:t),className:"text-[11px] font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:e},e))}),
14
+ /* @__PURE__ */i("input",{value:S,onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&O()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
15
+ /* @__PURE__ */i("button",{onClick:O,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */c("p",{className:"text-[11px] text-gray-400 italic",children:["Max ",8," symbols — remove one to add another."]}),D.length>0&&N.length<8&&/* @__PURE__ */i("div",{className:"flex flex-wrap gap-1.5 mt-2",children:D.map(e=>/* @__PURE__ */i("button",{onClick:()=>v(t=>t.length<8?[...t,e]:t),className:"text-[11px] font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:e},e))}),
16
16
  /* @__PURE__ */i("p",{className:"text-[11px] text-gray-400 mt-2",children:"Demo prices — static sample data, no live feed."})]})})]})}export{x as default};
@@ -1,4 +1,4 @@
1
- import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-XPSADW6W.js";import{useWidgetSettings as s}from"./chunk-X6E6UULK.js";import{useShellPrefs as o}from"./chunk-T6MKFQRH.js";import"./chunk-6UXY7MPY.js";import"./chunk-PH3PRIFP.js";import"./chunk-PDTZTADH.js";import"./chunk-VNEH2Y6H.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-VVI77XNV.js";import"./chunk-D65T4H6J.js";import{useState as l,useEffect as c,useCallback as d}from"react";import{jsx as m,jsxs as p,Fragment as h}from"react/jsx-runtime";var f="weather_city",u="weather_appearance",y={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function g(){const e="undefined"!=typeof localStorage?localStorage.getItem(f):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(f,e[0]),e[0]}catch{}return function(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;for(const[t,r]of Object.entries(a))if(r.tz===e)return t}catch{}return"London"}()}var x=r;function b(e,t=!1){try{if(t){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!1}).formatToParts(/* @__PURE__ */new Date),a=parseInt(t.find(e=>"hour"===e.type)?.value||"0"),r=parseInt(t.find(e=>"minute"===e.type)?.value||"0");return`${String(a).padStart(2,"0")}:${String(r).padStart(2,"0")}`}const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(/* @__PURE__ */new Date),r=parseInt(a.find(e=>"hour"===e.type)?.value||"12"),n=parseInt(a.find(e=>"minute"===e.type)?.value||"0"),i=a.find(e=>"dayPeriod"===e.type)?.value||"";return`${r}:${String(n).padStart(2,"0")} ${i}`}catch{return""}}function w(){/* @__PURE__ */
1
+ import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-EU3AQ4B2.js";import{useWidgetSettings as s}from"./chunk-ZWYKMIX7.js";import{useShellPrefs as o}from"./chunk-GTQJYE6M.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-PH3PRIFP.js";import"./chunk-6KO2U66R.js";import"./chunk-GBL5KOGP.js";import"./chunk-DYVN6C2E.js";import"./chunk-D65T4H6J.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-UZUH5PVW.js";import{useState as l,useEffect as c,useCallback as d}from"react";import{jsx as m,jsxs as p,Fragment as h}from"react/jsx-runtime";var f="weather_city",u="weather_appearance",y={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function g(){const e="undefined"!=typeof localStorage?localStorage.getItem(f):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(f,e[0]),e[0]}catch{}return function(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;for(const[t,r]of Object.entries(a))if(r.tz===e)return t}catch{}return"London"}()}var x=r;function b(e,t=!1){try{if(t){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!1}).formatToParts(/* @__PURE__ */new Date),a=parseInt(t.find(e=>"hour"===e.type)?.value||"0"),r=parseInt(t.find(e=>"minute"===e.type)?.value||"0");return`${String(a).padStart(2,"0")}:${String(r).padStart(2,"0")}`}const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(/* @__PURE__ */new Date),r=parseInt(a.find(e=>"hour"===e.type)?.value||"12"),n=parseInt(a.find(e=>"minute"===e.type)?.value||"0"),i=a.find(e=>"dayPeriod"===e.type)?.value||"";return`${r}:${String(n).padStart(2,"0")} ${i}`}catch{return""}}function w(){/* @__PURE__ */
2
2
  return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
3
3
  /* @__PURE__ */m("div",{className:"absolute -top-5 -right-5 w-24 h-24",style:{animation:"wx-sun-rays 70s linear infinite"},children:/* @__PURE__ */m("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:Array.from({length:12}).map((e,t)=>/* @__PURE__ */m("rect",{x:49,y:3,width:2,height:14,rx:1,fill:"rgba(255, 232, 130, 0.55)",transform:`rotate(${30*t} 50 50)`},t))})}),
4
4
  /* @__PURE__ */m("div",{className:"absolute top-1 right-1 w-10 h-10 rounded-full",style:{background:"radial-gradient(circle at 35% 35%, #fff8cc 0%, #ffd84a 55%, #ff9e2a 100%)",boxShadow:"0 0 18px 5px rgba(255, 200, 80, 0.55)",animation:"wx-sun-pulse 4.5s ease-in-out infinite"}})]})}function v(){const e=Array.from({length:16}).map((e,t)=>({left:(53*t+11)%95+"%",top:(37*t+9)%78+"%",size:1+13*t%3,delay:.41*t%4+"s",duration:2.5+7*t%5*.6+"s"}));/* @__PURE__ */
@@ -9,7 +9,7 @@ return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none"
9
9
  /* @__PURE__ */m("stop",{offset:"1",stopColor:"#d4c98a"})]})}),
10
10
  /* @__PURE__ */m("circle",{cx:20,cy:20,r:13,fill:"url(#wx-moon-grad)"}),
11
11
  /* @__PURE__ */m("circle",{cx:26,cy:16,r:11,fill:"rgba(15,23,42,1)"})]})}),e.map((e,t)=>/* @__PURE__ */m("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:e.top,width:e.size,height:e.size,animation:`wx-twinkle ${e.duration} ease-in-out ${e.delay} infinite`}},t)),
12
- /* @__PURE__ */m("div",{className:"absolute",style:{left:"15%",top:"20%",animation:"wx-shooting-star 12s ease-out infinite"},children:/* @__PURE__ */m("div",{className:"w-12 h-px",style:{background:"linear-gradient(to right, transparent, rgba(255,255,255,0.95))",boxShadow:"0 0 4px rgba(255,255,255,0.8)"}})})]})}function N({tone:e="light"}){const t="light"===e?"rgba(255,255,255,0.78)":"rgba(220,228,240,0.45)",a=({scale:e=1})=>/* @__PURE__ */p("svg",{viewBox:"0 0 120 50",className:"w-32 h-12",style:{transform:`scale(${e})`,filter:"blur(0.6px)"},children:[
12
+ /* @__PURE__ */m("div",{className:"absolute",style:{left:"15%",top:"20%",animation:"wx-shooting-star 12s ease-out infinite"},children:/* @__PURE__ */m("div",{className:"w-12 h-px",style:{background:"linear-gradient(to right, transparent, rgba(255,255,255,0.95))",boxShadow:"0 0 4px rgba(255,255,255,0.8)"}})})]})}function k({tone:e="light"}){const t="light"===e?"rgba(255,255,255,0.78)":"rgba(220,228,240,0.45)",a=({scale:e=1})=>/* @__PURE__ */p("svg",{viewBox:"0 0 120 50",className:"w-32 h-12",style:{transform:`scale(${e})`,filter:"blur(0.6px)"},children:[
13
13
  /* @__PURE__ */m("ellipse",{cx:28,cy:36,rx:18,ry:11,fill:t}),
14
14
  /* @__PURE__ */m("ellipse",{cx:50,cy:28,rx:22,ry:15,fill:t}),
15
15
  /* @__PURE__ */m("ellipse",{cx:75,cy:32,rx:20,ry:12,fill:t}),
@@ -17,44 +17,44 @@ return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none"
17
17
  return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
18
18
  /* @__PURE__ */m("div",{className:"absolute",style:{top:"8%",animation:"wx-drift-cloud 42s linear infinite"},children:/* @__PURE__ */m(a,{scale:.9})}),
19
19
  /* @__PURE__ */m("div",{className:"absolute",style:{top:"40%",animation:"wx-drift-cloud 60s linear -22s infinite",opacity:.85},children:/* @__PURE__ */m(a,{scale:1.25})}),
20
- /* @__PURE__ */m("div",{className:"absolute",style:{top:"68%",animation:"wx-drift-cloud 78s linear -45s infinite",opacity:.7},children:/* @__PURE__ */m(a,{scale:.75})})]})}function k({heavy:e=!1}){const t=e?26:16,a=["wx-rain-a","wx-rain-b","wx-rain-c"],r=Array.from({length:t}).map((e,r)=>({left:(100*r/t+11*r%7)%100+"%",delay:.087*r%1.3+"s",height:12+r%4*5+"px",duration:.7+r%3*.18+"s",variant:a[r%a.length]}));/* @__PURE__ */
20
+ /* @__PURE__ */m("div",{className:"absolute",style:{top:"68%",animation:"wx-drift-cloud 78s linear -45s infinite",opacity:.7},children:/* @__PURE__ */m(a,{scale:.75})})]})}function N({heavy:e=!1}){const t=e?26:16,a=["wx-rain-a","wx-rain-b","wx-rain-c"],r=Array.from({length:t}).map((e,r)=>({left:(100*r/t+11*r%7)%100+"%",delay:.087*r%1.3+"s",height:12+r%4*5+"px",duration:.7+r%3*.18+"s",variant:a[r%a.length]}));/* @__PURE__ */
21
21
  return m("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:r.map((e,t)=>/* @__PURE__ */m("div",{className:"absolute",style:{left:e.left,top:"-20px",width:"1px",height:e.height,background:"linear-gradient(180deg, rgba(180,210,255,0) 0%, rgba(220,235,255,0.85) 90%, rgba(255,255,255,0.95) 100%)",transform:"rotate(8deg)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`,transformOrigin:"top"}},t))})}function S(){const e=["wx-snow-a","wx-snow-b","wx-snow-c"],t=Array.from({length:16}).map((t,a)=>({left:(100*a/16+13*a%5)%100+"%",delay:.43*a%5+"s",duration:4.5+a%5+"s",size:3+a%4*1.4,opacity:.65+7*a%4*.08,variant:e[a%e.length]}));/* @__PURE__ */
22
- return m("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:t.map((e,t)=>/* @__PURE__ */m("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:"-12px",width:e.size,height:e.size,opacity:e.opacity,boxShadow:"0 0 4px rgba(255,255,255,0.65)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`}},t))})}function $(){/* @__PURE__ */
22
+ return m("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:t.map((e,t)=>/* @__PURE__ */m("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:"-12px",width:e.size,height:e.size,opacity:e.opacity,boxShadow:"0 0 4px rgba(255,255,255,0.65)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`}},t))})}function j(){/* @__PURE__ */
23
23
  return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
24
- /* @__PURE__ */m(k,{heavy:!0}),
24
+ /* @__PURE__ */m(N,{heavy:!0}),
25
25
  /* @__PURE__ */m("div",{className:"absolute inset-0 bg-white",style:{animation:"wx-flash 6s ease-out infinite"}}),
26
- /* @__PURE__ */m("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */m("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */m("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function j(){/* @__PURE__ */
26
+ /* @__PURE__ */m("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */m("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */m("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function $(){/* @__PURE__ */
27
27
  return m("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */m("div",{className:"absolute left-0 right-0",style:{top:10+22*t+"%",height:"14px",background:"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%)",filter:"blur(2px)",animation:`wx-fog-drift ${10+3*t}s ease-in-out ${.7*t}s infinite alternate`}},t))})}function I({code:e,isDay:t}){return 0===e||1===e?/* @__PURE__ */m(t?w:v,{}):2===e?/* @__PURE__ */p(h,{children:[/* @__PURE__ */m(t?w:v,{}),
28
- /* @__PURE__ */m(N,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */m(N,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */m(j,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */m(k,{}):[55,63,65,82].includes(e)?/* @__PURE__ */m(k,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */m(S,{}):[95,96,99].includes(e)?/* @__PURE__ */m($,{}):null}function D(){const[r,w]=l(g),[v,N]=l(()=>n(u)),[k,S]=l(null),[$,j]=l(!0),[,D]=l(0);c(()=>{const e=setInterval(()=>D(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[T,F]=l(!1),[H,A]=l(r),[L,C]=l(v),{prefs:z,save:P}=o(),B={...y,...z.weather_prefs??{}},[O,X]=l(B);s(d(()=>{A(r),C({...v}),X({...B}),F(!0)},[r,v,B])),c(()=>{let t=!1;return j(!0),e(r).then(e=>{t||(S(e),j(!1))}),()=>{t=!0}},[r]);const M=e=>B.useFahrenheit?`${x(e)}°F`:`${e}°`;if($&&!k)/* @__PURE__ */
29
- return m("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-sky-400 to-blue-500 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Loading…"});if(!k)/* @__PURE__ */
30
- return m("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[Z,U,V]=t(k.code,k.isDay);/* @__PURE__ */
28
+ /* @__PURE__ */m(k,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */m(k,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */m($,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */m(N,{}):[55,63,65,82].includes(e)?/* @__PURE__ */m(N,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */m(S,{}):[95,96,99].includes(e)?/* @__PURE__ */m(j,{}):null}function D(){const[r,w]=l(g),[v,k]=l(()=>n(u)),[N,S]=l(null),[j,$]=l(!0),[,D]=l(0);c(()=>{const e=setInterval(()=>D(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[T,A]=l(!1),[F,L]=l(r),[C,H]=l(v),{prefs:O,save:B}=o(),z={...y,...O.weather_prefs??{}},[P,M]=l(z);s(d(()=>{L(r),H({...v}),M({...z}),A(!0)},[r,v,z])),c(()=>{let t=!1;return $(!0),e(r).then(e=>{t||(S(e),$(!1))}),()=>{t=!0}},[r]);const W=e=>z.useFahrenheit?`${x(e)}°F`:`${e}°`;if(j&&!N)/* @__PURE__ */
29
+ return m("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-sky-400 to-blue-500 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Loading…"});if(!N)/* @__PURE__ */
30
+ return m("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[X,Z,U]=t(N.code,N.isDay);/* @__PURE__ */
31
31
  return p(h,{children:[
32
32
  /* @__PURE__ */m("style",{children:"\n@keyframes wx-rain-a { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 0.95; } 100% { transform: translate(8px,140px); opacity: 0; } }\n@keyframes wx-rain-b { 0% { transform: translate(0,-20px); opacity: 0; } 12% { opacity: 0.85; } 100% { transform: translate(12px,140px); opacity: 0; } }\n@keyframes wx-rain-c { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(5px,140px); opacity: 0; } }\n@keyframes wx-snow-a { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.9; } 50% { transform: translate(10px,55px) rotate(180deg); } 100% { transform: translate(-4px,140px) rotate(360deg); opacity: 0; } }\n@keyframes wx-snow-b { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.85; } 50% { transform: translate(-12px,55px) rotate(-180deg); } 100% { transform: translate(6px,140px) rotate(-360deg); opacity: 0; } }\n@keyframes wx-snow-c { 0% { transform: translate(0,-12px); opacity: 0; } 10% { opacity: 0.7; } 100% { transform: translate(2px,140px); opacity: 0; } }\n@keyframes wx-drift-cloud { 0% { transform: translateX(-40%); } 100% { transform: translateX(140%); } }\n@keyframes wx-twinkle { 0%, 100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }\n@keyframes wx-flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: 0.95; } 88% { opacity: 0.15; } 89% { opacity: 0.85; } 90% { opacity: 0; } }\n@keyframes wx-bolt { 0%, 86%, 90%, 100% { opacity: 0; } 87% { opacity: 1; } 89% { opacity: 0.85; } }\n@keyframes wx-sun-pulse { 0%, 100% { transform: scale(1); opacity: 0.65; } 50% { transform: scale(1.12); opacity: 0.95; } }\n@keyframes wx-sun-rays { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n@keyframes wx-fog-drift { 0% { transform: translateX(-25%); opacity: 0.3; } 50% { opacity: 0.65; } 100% { transform: translateX(25%); opacity: 0.3; } }\n@keyframes wx-shooting-star { 0%, 95% { opacity: 0; transform: translate(0,0) scale(0); } 96% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(40px,30px) scale(1); } }\n"}),
33
- /* @__PURE__ */m("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${v.activeOpacity/100})`,backdropFilter:v.activeBlur>0?`blur(${v.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${V}`,style:{height:110},children:[
34
- /* @__PURE__ */m(I,{code:k.code,isDay:k.isDay}),
33
+ /* @__PURE__ */m("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${v.activeOpacity/100})`,backdropFilter:v.activeBlur>0?`blur(${v.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${U}`,style:{height:110},children:[
34
+ /* @__PURE__ */m(I,{code:N.code,isDay:N.isDay}),
35
35
  /* @__PURE__ */p("div",{className:"relative z-10 px-3 py-2.5 flex flex-col h-full justify-between",children:[
36
36
  /* @__PURE__ */p("div",{className:"flex items-start justify-between gap-2",children:[
37
37
  /* @__PURE__ */p("div",{className:"min-w-0 flex-1",children:[
38
- /* @__PURE__ */m("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:k.city}),B.showLocalTime&&/* @__PURE__ */m("div",{className:"text-[10px] opacity-90 leading-tight tabular-nums drop-shadow-sm",children:b(k.timezone,B.use24Hour)})]}),
39
- /* @__PURE__ */m("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:M(k.temp)})]}),
38
+ /* @__PURE__ */m("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:N.city}),z.showLocalTime&&/* @__PURE__ */m("div",{className:"text-[10px] opacity-90 leading-tight tabular-nums drop-shadow-sm",children:b(N.timezone,z.use24Hour)})]}),
39
+ /* @__PURE__ */m("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:W(N.temp)})]}),
40
40
  /* @__PURE__ */p("div",{className:"flex items-end justify-between gap-2",children:[
41
41
  /* @__PURE__ */p("div",{className:"flex items-center gap-1.5 min-w-0",children:[
42
- /* @__PURE__ */m("span",{className:"text-lg leading-none drop-shadow-sm",children:U}),
43
- /* @__PURE__ */m("span",{className:"text-[11px] font-medium drop-shadow-sm truncate",children:Z})]}),
44
- /* @__PURE__ */p("span",{className:"text-[10px] opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",M(k.high)," L:",M(k.low)]})]})]})]})}),
45
- /* @__PURE__ */p(i,{open:T,onClose:()=>F(!1),title:"Weather Settings",appearance:L,onAppearanceChange:C,onSave:()=>{w(H),N(L),P({weather_prefs:O}),localStorage.setItem(f,H),localStorage.setItem(u,JSON.stringify(L)),F(!1)},children:[
42
+ /* @__PURE__ */m("span",{className:"text-lg leading-none drop-shadow-sm",children:Z}),
43
+ /* @__PURE__ */m("span",{className:"text-[11px] font-medium drop-shadow-sm truncate",children:X})]}),
44
+ /* @__PURE__ */p("span",{className:"text-[10px] opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",W(N.high)," L:",W(N.low)]})]})]})]})}),
45
+ /* @__PURE__ */p(i,{open:T,onClose:()=>A(!1),title:"Weather Settings",appearance:C,onAppearanceChange:H,onSave:()=>{w(F),k(C),B({weather_prefs:P}),localStorage.setItem(f,F),localStorage.setItem(u,JSON.stringify(C)),A(!1)},children:[
46
46
  /* @__PURE__ */m("div",{className:"space-y-3",children:/* @__PURE__ */p("div",{children:[
47
47
  /* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
48
48
  /* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
49
49
  /* @__PURE__ */m("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
50
- /* @__PURE__ */m("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */m("button",{onClick:()=>X(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(O.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
50
+ /* @__PURE__ */m("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */m("button",{onClick:()=>M(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(P.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
51
51
  /* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
52
52
  /* @__PURE__ */m("span",{className:"text-sm text-gray-600 w-24",children:"Time Format"}),
53
- /* @__PURE__ */m("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */m("button",{onClick:()=>X(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(O.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
53
+ /* @__PURE__ */m("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */m("button",{onClick:()=>M(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(P.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
54
54
  /* @__PURE__ */p("label",{className:"flex items-center gap-2 cursor-pointer",children:[
55
- /* @__PURE__ */m("input",{type:"checkbox",checked:O.showLocalTime,onChange:e=>X(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
55
+ /* @__PURE__ */m("input",{type:"checkbox",checked:P.showLocalTime,onChange:e=>M(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
56
56
  /* @__PURE__ */m("span",{className:"text-sm text-gray-600",children:"Show local time"})]})]})}),
57
57
  /* @__PURE__ */p("div",{children:[
58
58
  /* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"City"}),
59
- /* @__PURE__ */m("select",{value:H,onChange:e=>A(e.target.value),className:"w-full bg-gray-50 border border-gray-200 rounded px-2 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:Object.keys(a).map(e=>/* @__PURE__ */m("option",{value:e,children:e},e))}),
59
+ /* @__PURE__ */m("select",{value:F,onChange:e=>L(e.target.value),className:"w-full bg-gray-50 border border-gray-200 rounded px-2 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:Object.keys(a).map(e=>/* @__PURE__ */m("option",{value:e,children:e},e))}),
60
60
  /* @__PURE__ */m("p",{className:"mt-1 text-[10px] text-gray-400",children:"Auto-detected from your timezone; change if needed."})]})]})]})}export{D as default};
@@ -1,6 +1,6 @@
1
- import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-XPSADW6W.js";import{useWidgetSettings as s}from"./chunk-X6E6UULK.js";import{useShellPrefs as c}from"./chunk-T6MKFQRH.js";import"./chunk-6UXY7MPY.js";import"./chunk-PH3PRIFP.js";import"./chunk-PDTZTADH.js";import"./chunk-VNEH2Y6H.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-VVI77XNV.js";import"./chunk-D65T4H6J.js";import{useState as l,useEffect as o,useCallback as m}from"react";import{jsxs as h,Fragment as d,jsx as p}from"react/jsx-runtime";var u="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:y}=c(),[b,f]=l(()=>n(u)),[k,v]=l(!1),[N,w]=l([]),[j,F]=l(b),D={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[C,S]=l(D),[P,T]=l(()=>/* @__PURE__ */new Date);o(()=>{const e=setInterval(()=>T(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const H=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),A=x.world_clocks,I=(()=>{if(!Array.isArray(A)||0===A.length)return g;const t=[];for(const a of A){const r=e[a]?a:H[a];r&&!t.includes(r)&&t.push(r)}return t.length?t:g})(),[O,_]=l({}),[U,$]=l(!0);o(()=>{let e=!1;return $(!0),(async()=>{const a={};await Promise.all(I.map(async e=>{const r=await t(e);r&&(a[e]=r)})),e||(_(a),$(!1))})(),()=>{e=!0}},[I.join(",")]),s(m(()=>{w([...I]),F({...b}),S({...D}),v(!0)},[I.join(","),b,D.useFahrenheit]));const B=e=>D.useFahrenheit?`${r(e)}°`:`${e}°`;/* @__PURE__ */
1
+ import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-EU3AQ4B2.js";import{useWidgetSettings as s}from"./chunk-ZWYKMIX7.js";import{useShellPrefs as c}from"./chunk-GTQJYE6M.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-PH3PRIFP.js";import"./chunk-6KO2U66R.js";import"./chunk-GBL5KOGP.js";import"./chunk-DYVN6C2E.js";import"./chunk-D65T4H6J.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-UZUH5PVW.js";import{useState as l,useEffect as o,useCallback as m}from"react";import{jsxs as h,Fragment as d,jsx as p}from"react/jsx-runtime";var u="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:y}=c(),[b,f]=l(()=>n(u)),[k,v]=l(!1),[N,w]=l([]),[j,F]=l(b),C={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[D,S]=l(C),[O,P]=l(()=>/* @__PURE__ */new Date);o(()=>{const e=setInterval(()=>P(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const T=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),A=x.world_clocks,B=(()=>{if(!Array.isArray(A)||0===A.length)return g;const t=[];for(const a of A){const r=e[a]?a:T[a];r&&!t.includes(r)&&t.push(r)}return t.length?t:g})(),[I,U]=l({}),[W,_]=l(!0);o(()=>{let e=!1;return _(!0),(async()=>{const a={};await Promise.all(B.map(async e=>{const r=await t(e);r&&(a[e]=r)})),e||(U(a),_(!1))})(),()=>{e=!0}},[B.join(",")]),s(m(()=>{w([...B]),F({...b}),S({...C}),v(!0)},[B.join(","),b,C.useFahrenheit]));const L=e=>C.useFahrenheit?`${r(e)}°`:`${e}°`;/* @__PURE__ */
2
2
  return h(d,{children:[
3
- /* @__PURE__ */p("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */h("div",{className:"divide-y divide-gray-200",children:[U&&I.every(e=>!O[e])&&/* @__PURE__ */p("div",{className:"px-3 py-6 text-center text-xs text-gray-500",children:"Loading…"}),I.map(t=>{const r=O[t],n=e[t]?.tz??"UTC",{time:i,ampm:s}=function(e,t){try{const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),r=a.find(e=>"hour"===e.type)?.value||"12";return{time:`${r}:${a.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(a.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(n,P);if(!r)/* @__PURE__ */
3
+ /* @__PURE__ */p("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */h("div",{className:"divide-y divide-gray-200",children:[W&&B.every(e=>!I[e])&&/* @__PURE__ */p("div",{className:"px-3 py-6 text-center text-xs text-gray-500",children:"Loading…"}),B.map(t=>{const r=I[t],n=e[t]?.tz??"UTC",{time:i,ampm:s}=function(e,t){try{const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),r=a.find(e=>"hour"===e.type)?.value||"12";return{time:`${r}:${a.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(a.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(n,O);if(!r)/* @__PURE__ */
4
4
  return h("div",{className:"px-4 py-3",children:[
5
5
  /* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-2",children:[
6
6
  /* @__PURE__ */p("span",{className:"text-[15px] font-semibold tracking-tight text-gray-900 truncate",children:t}),
@@ -10,7 +10,7 @@ return h("div",{className:"px-4 py-3",children:[
10
10
  return h("div",{className:"px-4 py-3",children:[
11
11
  /* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-2",children:[
12
12
  /* @__PURE__ */p("span",{className:"text-[15px] font-semibold tracking-tight text-gray-900 truncate",children:t}),
13
- /* @__PURE__ */p("span",{className:"text-[26px] font-extralight leading-none tabular-nums tracking-tight text-gray-900 shrink-0",children:B(r.temp)})]}),
13
+ /* @__PURE__ */p("span",{className:"text-[26px] font-extralight leading-none tabular-nums tracking-tight text-gray-900 shrink-0",children:L(r.temp)})]}),
14
14
  /* @__PURE__ */h("div",{className:"flex items-center justify-between gap-2 mt-1.5 text-[11px]",children:[
15
15
  /* @__PURE__ */h("div",{className:"flex items-center gap-1.5 min-w-0 text-gray-500",children:[
16
16
  /* @__PURE__ */p("span",{className:"text-base leading-none shrink-0",children:l}),
@@ -18,13 +18,13 @@ return h("div",{className:"px-4 py-3",children:[
18
18
  /* @__PURE__ */p("span",{className:"text-[9px] font-medium ml-0.5 opacity-70",children:s})]}),
19
19
  /* @__PURE__ */p("span",{className:"text-gray-300 shrink-0",children:"·"}),
20
20
  /* @__PURE__ */p("span",{className:"truncate",children:c})]}),
21
- /* @__PURE__ */h("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",B(r.high)," L:",B(r.low)]})]})]},t)})]})}),
22
- /* @__PURE__ */h(i,{open:k,onClose:()=>v(!1),title:"World Clock Settings",appearance:j,onAppearanceChange:F,onSave:()=>{0!==N.length&&(y({world_clocks:N,weather_prefs:{...x.weather_prefs??{},useFahrenheit:C.useFahrenheit}}),f(j),localStorage.setItem(u,JSON.stringify(j)),v(!1))},children:[
21
+ /* @__PURE__ */h("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",L(r.high)," L:",L(r.low)]})]})]},t)})]})}),
22
+ /* @__PURE__ */h(i,{open:k,onClose:()=>v(!1),title:"World Clock Settings",appearance:j,onAppearanceChange:F,onSave:()=>{0!==N.length&&(y({world_clocks:N,weather_prefs:{...x.weather_prefs??{},useFahrenheit:D.useFahrenheit}}),f(j),localStorage.setItem(u,JSON.stringify(j)),v(!1))},children:[
23
23
  /* @__PURE__ */h("div",{children:[
24
24
  /* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
25
25
  /* @__PURE__ */h("div",{className:"flex items-center gap-3 mb-2",children:[
26
26
  /* @__PURE__ */p("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
27
- /* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>S(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(C.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
27
+ /* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>S(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(D.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
28
28
  /* @__PURE__ */p("p",{className:"text-[10px] text-gray-400 mt-1",children:"Shared with the Weather widget."})]}),
29
29
  /* @__PURE__ */h("div",{children:[
30
30
  /* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Cities"}),
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{openFilesInTrashMode,setFilesDemoTree}from"../chunk-JGHRZYNV.js";export{setBrowserStartUrl}from"../chunk-LWLCNQY7.js";export{BUILTIN_APP_INFO}from"../chunk-A6FPBD7W.js";import"../chunk-KZPQW6UL.js";import{setPdfPreview as e}from"../chunk-ESL5TDNA.js";export{setPdfPreview}from"../chunk-ESL5TDNA.js";import{toast_default as t}from"../chunk-B2TBCVHH.js";import{setSpreadsheetPreview as o}from"../chunk-VTVSMRFX.js";export{setSpreadsheetPreview}from"../chunk-VTVSMRFX.js";import"../chunk-GF2XCISN.js";import"../chunk-X6E6UULK.js";import"../chunk-T6MKFQRH.js";import"../chunk-6UXY7MPY.js";import"../chunk-PH3PRIFP.js";import"../chunk-PDTZTADH.js";import"../chunk-VNEH2Y6H.js";import"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";import"../chunk-VVI77XNV.js";import"../chunk-D65T4H6J.js";import{lazy as i}from"react";function n(e){const t=/\.([a-z0-9]+)(?:[?#].*)?$/i.exec((e||"").trim());return t?t[1].toLowerCase():""}var r=/* @__PURE__ */new Set(["csv","tsv"]),s=/* @__PURE__ */new Set(["xlsx","xls","xlsm","ods"]),a=/* @__PURE__ */new Set(["png","jpg","jpeg","gif","webp","bmp","svg","avif"]),l=/* @__PURE__ */new Set(["step","stp","stl","obj","gltf","glb","3mf","iges","igs"]);function c(e){const t=n(e);return"pdf"===t?"pdf":"dxf"===t?"dxf":r.has(t)?"csv":a.has(t)?"image":l.has(t)?"3d":null}function p(e){window.open(e,"_blank","noopener,noreferrer")}async function m(e,t,o){if(t.fetchBlob)return(await t.fetchBlob(o)).text();const i=await fetch(e);if(!i.ok)throw new Error(`fetch failed: ${i.status}`);return i.text()}function u(e,t){return(e instanceof Error?e.message:"")||t}async function h(i,r,a={}){const l=i?.url||"",h=i?.filename||"attachment";if(!l&&!a.fetchBlob)return void t.error("This attachment has no download link.");const d=c(h)??c(l);if("csv"===d){try{o({csv:await m(l,a,i),filename:h}),r("/spreadsheet")}catch{t.error("Could not open the spreadsheet — opening the file instead."),l&&p(l)}return}if(s.has(n(h)||n(l)))return t.error("Spreadsheet preview is unavailable for this file type. Opening the file instead."),void(l&&p(l));if(!d)return l?(t.info("Opening this file outside the app — no viewer can show it here."),void p(l)):void t.error("This attachment has no download link.");if(!a.fetchBlob)return e({url:l,filename:h,kind:d}),void r("/preview");const f=e({filename:h,kind:d,converting:!0,convertingMessage:a.loadingMessage||"LOADING FILE"});r("/preview");try{const e=await a.fetchBlob(i);f.update({url:URL.createObjectURL(e),filename:h,kind:d})}catch(e){f.update({filename:h,kind:d,converting:!1,convertingMessage:u(e,"Failed to load this file.")})}}var d=i(()=>import("../Calculator-QLJJ3ICT.js")),f=i(()=>import("../Spreadsheet-PFKZTLSI.js")),w=i(()=>import("../Weather-AY3QWBQT.js")),j=i(()=>import("../CurrencyConverter-3GTKDKHH.js")),k=i(()=>import("../PomodoroTimer-CRKL26PP.js")),g=i(()=>import("../Notepad-ITHIATP2.js")),v=i(()=>import("../WorldClock-AXNMA4PG.js")),T=i(()=>import("../Stock-NAHSVLAJ.js")),S=i(()=>import("../Preview-GZTTEZWS.js")),b=i(()=>import("../PdfViewer-VIT7Y55M.js")),P=i(()=>import("../Documents-FDGF7QBQ.js")),x=i(()=>import("../Files-TTSYOPVB.js")),y=i(()=>import("../Browser-3KOGROX7.js")),I={"/calculator":{component:d,label:"Calculator",size:"sm",allowPinOnTop:!0,utility:!0,widget:!0,dimensions:[280,420]},"/spreadsheet":{component:f,label:"Spreadsheets",size:"2xl",appStyle:!0,multiInstance:!0},"/notepad":{component:g,label:"Notepad",size:"lg",allowPinOnTop:!0,flushBody:!0},"/weather":{component:w,label:"Weather",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,400]},"/currency":{component:j,label:"Currency Converter",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/pomodoro":{component:k,label:"Pomodoro Timer",size:"sm",utility:!0,widget:!0,dimensions:[320,600]},"/world-clock":{component:v,label:"World Clock",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/stock":{component:T,label:"Stocks",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,360]}},B={"/preview":{component:S,label:"Preview",size:"2xl",appStyle:!0,multiInstance:!0},"/documents":{component:P,label:"Documents",size:"xl",appStyle:!0,multiInstance:!0},"/files":{component:x,label:"Files",size:"xl",appStyle:!0}},H={"/browser":{component:y,label:"Browser",size:"2xl",appStyle:!0,multiInstance:!0}},F={...I,...B,...H};export{y as Browser,d as Calculator,j as CurrencyConverter,P as Documents,x as Files,g as Notepad,b as PdfViewer,k as PomodoroTimer,S as Preview,f as Spreadsheet,T as Stock,w as Weather,v as WorldClock,c as attachmentKind,F as bundledApps,B as documentApps,h as openAttachment,I as utilityApps,H as webApps};
2
+ export{openFilesInTrashMode,setFilesDemoTree}from"../chunk-ILTSTULF.js";export{setBrowserStartUrl}from"../chunk-LWLCNQY7.js";export{BUILTIN_APP_INFO}from"../chunk-2S73NE3L.js";import"../chunk-C2A4PIGZ.js";import{setPdfPreview as e}from"../chunk-ESL5TDNA.js";export{setPdfPreview}from"../chunk-ESL5TDNA.js";import{toast_default as t}from"../chunk-EYU4IAEZ.js";import{setSpreadsheetPreview as o}from"../chunk-VTVSMRFX.js";export{setSpreadsheetPreview}from"../chunk-VTVSMRFX.js";import"../chunk-LQVXGB7A.js";import"../chunk-ZWYKMIX7.js";import"../chunk-GTQJYE6M.js";import"../chunk-DSSLOQDW.js";import"../chunk-5A7MWTXX.js";import"../chunk-PH3PRIFP.js";import"../chunk-6KO2U66R.js";import"../chunk-GBL5KOGP.js";import"../chunk-DYVN6C2E.js";import"../chunk-D65T4H6J.js";import"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";import"../chunk-UZUH5PVW.js";import{lazy as i}from"react";function n(e){const t=/\.([a-z0-9]+)(?:[?#].*)?$/i.exec((e||"").trim());return t?t[1].toLowerCase():""}var r=/* @__PURE__ */new Set(["csv","tsv"]),s=/* @__PURE__ */new Set(["xlsx","xls","xlsm","ods"]),a=/* @__PURE__ */new Set(["png","jpg","jpeg","gif","webp","bmp","svg","avif"]),l=/* @__PURE__ */new Set(["step","stp","stl","obj","gltf","glb","3mf","iges","igs"]);function c(e){const t=n(e);return"pdf"===t?"pdf":"dxf"===t?"dxf":r.has(t)?"csv":a.has(t)?"image":l.has(t)?"3d":null}function p(e){window.open(e,"_blank","noopener,noreferrer")}async function m(e,t,o){if(t.fetchBlob)return(await t.fetchBlob(o)).text();const i=await fetch(e);if(!i.ok)throw new Error(`fetch failed: ${i.status}`);return i.text()}function u(e,t){return(e instanceof Error?e.message:"")||t}async function h(i,r,a={}){const l=i?.url||"",h=i?.filename||"attachment";if(!l&&!a.fetchBlob)return void t.error("This attachment has no download link.");const d=c(h)??c(l);if("csv"===d){try{o({csv:await m(l,a,i),filename:h}),r("/spreadsheet")}catch{t.error("Could not open the spreadsheet — opening the file instead."),l&&p(l)}return}if(s.has(n(h)||n(l)))return t.error("Spreadsheet preview is unavailable for this file type. Opening the file instead."),void(l&&p(l));if(!d)return l?(t.info("Opening this file outside the app — no viewer can show it here."),void p(l)):void t.error("This attachment has no download link.");if(!a.fetchBlob)return e({url:l,filename:h,kind:d}),void r("/preview");const f=e({filename:h,kind:d,converting:!0,convertingMessage:a.loadingMessage||"LOADING FILE"});r("/preview");try{const e=await a.fetchBlob(i);f.update({url:URL.createObjectURL(e),filename:h,kind:d})}catch(e){f.update({filename:h,kind:d,converting:!1,convertingMessage:u(e,"Failed to load this file.")})}}var d=i(()=>import("../Calculator-HHPPI72V.js")),f=i(()=>import("../Spreadsheet-AYV4CQP3.js")),w=i(()=>import("../Weather-FW3WWYCI.js")),j=i(()=>import("../CurrencyConverter-4XKRUO7Y.js")),k=i(()=>import("../PomodoroTimer-PB6J2LMS.js")),g=i(()=>import("../Notepad-CBJIS3WA.js")),v=i(()=>import("../WorldClock-UC4CXE2N.js")),S=i(()=>import("../Stock-FGJ5HQ7H.js")),b=i(()=>import("../Preview-O2UZROZO.js")),P=i(()=>import("../PdfViewer-UEMING6A.js")),x=i(()=>import("../Documents-VYDMJL37.js")),y=i(()=>import("../Files-D3D6JWSJ.js")),I=i(()=>import("../Browser-TNUODLDN.js")),T={"/calculator":{component:d,label:"Calculator",size:"sm",allowPinOnTop:!0,utility:!0,widget:!0,dimensions:[280,420]},"/spreadsheet":{component:f,label:"Spreadsheets",size:"2xl",appStyle:!0,multiInstance:!0},"/notepad":{component:g,label:"Notepad",size:"lg",allowPinOnTop:!0,flushBody:!0},"/weather":{component:w,label:"Weather",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,400]},"/currency":{component:j,label:"Currency Converter",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/pomodoro":{component:k,label:"Pomodoro Timer",size:"sm",utility:!0,widget:!0,dimensions:[320,600]},"/world-clock":{component:v,label:"World Clock",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/stock":{component:S,label:"Stocks",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,360]}},L={"/preview":{component:b,label:"Preview",size:"2xl",appStyle:!0,multiInstance:!0},"/documents":{component:x,label:"Documents",size:"xl",appStyle:!0,multiInstance:!0},"/files":{component:y,label:"Files",size:"xl",appStyle:!0}},C={"/browser":{component:I,label:"Browser",size:"2xl",appStyle:!0,multiInstance:!0}},B={...T,...L,...C};export{I as Browser,d as Calculator,j as CurrencyConverter,x as Documents,y as Files,g as Notepad,P as PdfViewer,k as PomodoroTimer,b as Preview,f as Spreadsheet,S as Stock,w as Weather,v as WorldClock,c as attachmentKind,B as bundledApps,L as documentApps,h as openAttachment,T as utilityApps,C as webApps};