efficient-shell 5.0.0 → 5.2.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 (69) hide show
  1. package/README.md +98 -2
  2. package/dist/{Browser-5F5LWXYQ.js → Browser-FKZ6M2MK.js} +18 -18
  3. package/dist/Calculator-LBFBTFSD.js +29 -0
  4. package/dist/ConfirmDialog-JAEFVRJM.js +1 -0
  5. package/dist/{CurrencyConverter-QEG6RFAS.js → CurrencyConverter-OV5ZQIAJ.js} +7 -7
  6. package/dist/{Documents-6DEUZVVA.js → Documents-HGGL3AWI.js} +24 -24
  7. package/dist/Files-DAQKIF6W.js +87 -0
  8. package/dist/{Notepad-KNJRTYXR.js → Notepad-PO724TVP.js} +10 -10
  9. package/dist/PdfViewer-6ALXGVTV.js +1 -0
  10. package/dist/{PomodoroTimer-T6YAQFIE.js → PomodoroTimer-LN5MYRZO.js} +49 -49
  11. package/dist/{Preview-KEIDYSHF.js → Preview-CUOO5WQ7.js} +126 -126
  12. package/dist/Sidebar-T4ABK2WV.js +44 -0
  13. package/dist/{Spreadsheet-HKXSYD5B.js → Spreadsheet-2N2JXBCY.js} +14 -14
  14. package/dist/{Stock-BZFC2ROU.js → Stock-65WVUGLI.js} +4 -4
  15. package/dist/{Weather-S3N5OWYF.js → Weather-TXJICMJN.js} +18 -18
  16. package/dist/{WorldClock-ACC3S6OA.js → WorldClock-RIHLKZGC.js} +6 -6
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/{chunk-WNEO7TSP.js → chunk-3PTA2C74.js} +1 -1
  21. package/dist/chunk-4QBLTEFU.js +1 -0
  22. package/dist/{chunk-TKUNR5KP.js → chunk-6GV4467L.js} +2 -2
  23. package/dist/chunk-AJB5G52B.js +1 -0
  24. package/dist/{chunk-2DX65GOO.js → chunk-ASSDCWKP.js} +1 -1
  25. package/dist/{chunk-MIAJQGWE.js → chunk-BFFXVA53.js} +1 -1
  26. package/dist/{chunk-R7EBJKN2.js → chunk-BFUBBDU6.js} +30 -30
  27. package/dist/{chunk-NHIGOEZF.js → chunk-H3UEYXRA.js} +1 -1
  28. package/dist/{chunk-ZDF5AR5W.js → chunk-HIAHERCD.js} +7 -7
  29. package/dist/{chunk-XUF7VW4U.js → chunk-JJIPGAXI.js} +29 -28
  30. package/dist/{chunk-T4CFSGSL.js → chunk-KHJ5XSEH.js} +8 -8
  31. package/dist/{chunk-KDRAU4XQ.js → chunk-M4OGNYOM.js} +8 -8
  32. package/dist/{chunk-P4SGJTK3.js → chunk-ML22KF7T.js} +1 -1
  33. package/dist/{chunk-ZZKIKW62.js → chunk-MTH7EAH3.js} +21 -21
  34. package/dist/{chunk-FOEVG7RT.js → chunk-OTP5WPI4.js} +8 -8
  35. package/dist/chunk-PS6PSCOR.js +1018 -0
  36. package/dist/{chunk-5IWSOLLY.js → chunk-QZNRMJE6.js} +2 -2
  37. package/dist/{chunk-VJP3R52B.js → chunk-R3622MOL.js} +1 -1
  38. package/dist/{chunk-PQLVWCUI.js → chunk-SSBOC52S.js} +4 -4
  39. package/dist/{chunk-3DGTIWZP.js → chunk-TKFAFZRY.js} +1 -1
  40. package/dist/{chunk-SBDIHKLU.js → chunk-TLTFS2D6.js} +51 -51
  41. package/dist/{chunk-GMMTTWHB.js → chunk-UAJQB45Y.js} +1 -1
  42. package/dist/{chunk-LK7V32MR.js → chunk-UG4ZPXXU.js} +1 -1
  43. package/dist/{chunk-QRV7RNQX.js → chunk-Y553QKEH.js} +14 -14
  44. package/dist/{chunk-PE4F4MJE.js → chunk-YJ6JMGMS.js} +4 -4
  45. package/dist/{chunk-LMIQV3NB.js → chunk-YQI7KXX3.js} +2 -2
  46. package/dist/file-intake/index.js +1 -1
  47. package/dist/i18n/index.d.ts +1 -1
  48. package/dist/{index-HMDUOPnX.d.ts → index-Dk5VKml6.d.ts} +401 -3
  49. package/dist/index.d.ts +3 -3
  50. package/dist/index.js +112 -112
  51. package/dist/locales/zh-Hans.d.ts +1 -1
  52. package/dist/locales/zh-Hans.js +1 -1
  53. package/dist/map/index.js +5 -5
  54. package/dist/markdown/index.js +1 -1
  55. package/dist/page-tabs/index.js +5 -5
  56. package/dist/pdf/index.js +1 -1
  57. package/dist/{strings-ZbotP_I6.d.ts → strings-aKfRDZWB.d.ts} +56 -0
  58. package/dist/ui/index.d.ts +2 -2
  59. package/dist/ui/index.js +1 -1
  60. package/dist/ui.css +63 -0
  61. package/package.json +1 -1
  62. package/dist/Calculator-4K53PFBL.js +0 -29
  63. package/dist/ConfirmDialog-X2DPOYWO.js +0 -1
  64. package/dist/Files-2VSFXA45.js +0 -87
  65. package/dist/PdfViewer-UZGDE4HD.js +0 -1
  66. package/dist/Sidebar-3NZRIL7F.js +0 -44
  67. package/dist/chunk-67PNFBCW.js +0 -993
  68. package/dist/chunk-J3LIIIHJ.js +0 -1
  69. package/dist/chunk-YKHMAGEM.js +0 -1
@@ -1,2 +1,2 @@
1
- import{toast_default as t}from"./chunk-3DGTIWZP.js";import{useShellPrefs as e}from"./chunk-PQLVWCUI.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(R(),G()):"none"!==t&&0!==m||R()}function I(){g.running||(w({running:!0}),p=setInterval(P,1e3),"focus"===g.mode&&G())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),R())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function P(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);R(),C(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function C(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>N(t,n),2500*e)}function N(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function G(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=O(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*_[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function R(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function V(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=O(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var W="pomodoro_tasks",F="pomodoro_tasks_migrated";function j(){return Math.random().toString(36).slice(2,11)}function L(){/* @__PURE__ */
2
- return(new Date).toISOString()}var q=null,E=[],J=!1,Q=null,U=/* @__PURE__ */new Set;function Z(){for(const t of U)t()}function $(t){E=t,Z()}function z(){const t=q;return t?Q=t.list().then(e=>{q===t&&(E=e,J=!0,Z())}).catch(()=>{q===t&&(J=!0,Z())}).finally(()=>{Q=null}):(E=[],J=!0,Z(),Promise.resolve())}function H(t){q=t,E=[],J=!1,t?z():Z()}function K(t){return U.add(t),!q||J||Q||z(),()=>{U.delete(t)}}function X(){return E}function Y(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=j(),n=L(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:L()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(K,X,X),i=o(e=>{const n=q;if(!n)return t.addTask(e);const o="tmp-"+j(),a=L(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...E,r]),n.create({...e,name:e.name.trim()}).then(t=>$(E.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(E.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=q;if(!o)return t.updateTask(e,n);$(E.map(t=>t.id===e?{...t,...n,id:e,updatedAt:L()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=q;if(!n)return t.removeTask(e);const o=E;$(E.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!q)return t.toggleDone(e);const n=E.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{q||t.setAllTasks(e)},[t]);return null===q?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(F))return;const n=localStorage.getItem(W);if(!n)return void localStorage.setItem(F,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(W),void localStorage.setItem(F,"1");const a=L(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||j(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(W),localStorage.setItem(F,"1")}catch{try{localStorage.setItem(F,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,C as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,V as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,H as setShellTodoProvider,S as subscribePomo,Y as useTodoTasks};
1
+ import{toast_default as t}from"./chunk-TKFAFZRY.js";import{useShellPrefs as e}from"./chunk-SSBOC52S.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(R(),F()):"none"!==t&&0!==m||R()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&F())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),R())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);R(),N(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,O={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function _(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function F(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=_(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*O[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function R(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=_(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*O[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var V="pomodoro_tasks",j="pomodoro_tasks_migrated";function W(){return Math.random().toString(36).slice(2,11)}function q(){/* @__PURE__ */
2
+ return(new Date).toISOString()}var E=null,J=[],K=!1,L=null,Y=/* @__PURE__ */new Set;function Z(){for(const t of Y)t()}function $(t){J=t,Z()}function z(){const t=E;return t?L=t.list().then(e=>{E===t&&(J=e,K=!0,Z())}).catch(()=>{E===t&&(K=!0,Z())}).finally(()=>{L=null}):(J=[],K=!0,Z(),Promise.resolve())}function H(t){E=t,J=[],K=!1,t?z():Z()}function Q(t){return Y.add(t),!E||K||L||z(),()=>{Y.delete(t)}}function U(){return J}function X(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=W(),n=q(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:q()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(Q,U,U),i=o(e=>{const n=E;if(!n)return t.addTask(e);const o="tmp-"+W(),a=q(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...J,r]),n.create({...e,name:e.name.trim()}).then(t=>$(J.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(J.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=E;if(!o)return t.updateTask(e,n);$(J.map(t=>t.id===e?{...t,...n,id:e,updatedAt:q()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=E;if(!n)return t.removeTask(e);const o=J;$(J.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!E)return t.toggleDone(e);const n=J.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{E||t.setAllTasks(e)},[t]);return null===E?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(j))return;const n=localStorage.getItem(V);if(!n)return void localStorage.setItem(j,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(V),void localStorage.setItem(j,"1");const a=q(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||W(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(V),localStorage.setItem(j,"1")}catch{try{localStorage.setItem(j,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,H as setShellTodoProvider,S as subscribePomo,X as useTodoTasks};
@@ -1,4 +1,4 @@
1
- import{ChevronRightFallbackC as e}from"./chunk-XUF7VW4U.js";import{useShellStrings as i}from"./chunk-J3LIIIHJ.js";import{Icon as t}from"./chunk-YKZHOXI4.js";import{Fragment as a}from"react";import{jsx as n,jsxs as s}from"react/jsx-runtime";var r=/* @__PURE__ */n(t,{name:"chevron-right",fallback:e,className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),l="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function c({items:e,separator:t,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=t??r,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
1
+ import{ChevronRightFallbackC as e}from"./chunk-JJIPGAXI.js";import{useShellStrings as i}from"./chunk-AJB5G52B.js";import{Icon as t}from"./chunk-YKZHOXI4.js";import{Fragment as a}from"react";import{jsx as n,jsxs as s}from"react/jsx-runtime";var r=/* @__PURE__ */n(t,{name:"chevron-right",fallback:e,className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),l="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function c({items:e,separator:t,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=t??r,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
2
2
  return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-1.5 text-sm",children:d.map((e,i)=>/* @__PURE__ */s(a,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
3
3
  /* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */s("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
4
4
  /* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */s("a",{href:e.item.href,onClick:e.item.onClick,className:l,children:[e.item.icon,
@@ -1,4 +1,4 @@
1
- import{useHydrated as e,useBrowserState as t}from"./chunk-D65T4H6J.js";import{InfoFallback as r,ErrorFallback as n,CloseFallback as o,CheckFallback as i}from"./chunk-XUF7VW4U.js";import{useShellStrings as a}from"./chunk-J3LIIIHJ.js";import{Icon as s}from"./chunk-YKZHOXI4.js";import{createContext as c,useSyncExternalStore as l,useCallback as u,useContext as d,useMemo as f}from"react";import{jsxs as m,jsx as h}from"react/jsx-runtime";var w="(max-width: 767px), (pointer: coarse)";function p(){return!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(w).matches}function g(){return!1}function y(e){if("undefined"==typeof window||!window.matchMedia)return()=>{};const t=window.matchMedia(w);return t.addEventListener?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function v(){return l(y,p,g)}var x={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},b={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},_={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function N({tone:e}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(e){case"success":/* @__PURE__ */
1
+ import{useHydrated as e,useBrowserState as t}from"./chunk-D65T4H6J.js";import{InfoFallback as r,ErrorFallback as n,CloseFallback as o,CheckFallback as i}from"./chunk-JJIPGAXI.js";import{useShellStrings as a}from"./chunk-AJB5G52B.js";import{Icon as s}from"./chunk-YKZHOXI4.js";import{createContext as c,useSyncExternalStore as l,useCallback as u,useContext as d,useMemo as f}from"react";import{jsxs as m,jsx as h}from"react/jsx-runtime";var w="(max-width: 767px), (pointer: coarse)";function p(){return!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(w).matches}function g(){return!1}function y(e){if("undefined"==typeof window||!window.matchMedia)return()=>{};const t=window.matchMedia(w);return t.addEventListener?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function v(){return l(y,p,g)}var x={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},b={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},_={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function N({tone:e}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(e){case"success":/* @__PURE__ */
2
2
  return h(s,{name:"check",fallback:i,...t});case"error":/* @__PURE__ */
3
3
  return h(s,{name:"close",fallback:o,...t});case"warning":/* @__PURE__ */
4
4
  return h(s,{name:"error",fallback:n,...t});default:/* @__PURE__ */
@@ -6,6 +6,6 @@ return h(s,{name:"info",fallback:r,...t})}}function S({status:e="info",title:t,s
6
6
  return m("div",{role:"error"===c?"alert":void 0,className:`flex flex-col items-center justify-center px-6 py-12 text-center ${s}`.trim(),children:[
7
7
  /* @__PURE__ */h("div",{className:`flex h-14 w-14 items-center justify-center rounded-full ${b[c]}`,children:o??/* @__PURE__ */h(N,{tone:c})}),
8
8
  /* @__PURE__ */h("h2",{className:"mt-4 text-lg font-semibold text-gray-900",children:t??_[e]?.(l)??""}),r&&/* @__PURE__ */h("p",{className:"mt-1 max-w-md text-sm text-gray-500",children:r}),i&&/* @__PURE__ */h("div",{className:"mt-4 w-full max-w-md text-left",children:i}),n&&/* @__PURE__ */h("div",{className:"mt-6 flex flex-wrap items-center justify-center gap-3",children:n})]})}function C({size:e="md",padding:t="py-12",label:r,className:n=""}){const o=/* @__PURE__ */h("div",{className:`${"sm"===e?"h-5 w-5":"lg"===e?"h-12 w-12":"h-8 w-8"} animate-spin rounded-full border-2 border-gray-200 border-t-blue-600`});return null==r?/* @__PURE__ */h("div",{className:`flex items-center justify-center ${t} ${n}`,children:o}):/* @__PURE__ */m("div",{role:"status",className:`flex flex-col items-center justify-center gap-3 ${t} ${n}`,children:[o,
9
- /* @__PURE__ */h("p",{className:"text-sm text-gray-500",children:r})]})}var D="undefined"!=typeof window&&"undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),E={MOD:["⌘","Ctrl"],ALT:["⌥","Alt"],CMD_ENTER:["⌘⏎","Ctrl⏎"],CMD_S:["⌘S","Ctrl+S"],CMD_K:["⌘K","Ctrl+K"],CMD_DOT:["⌘.","Ctrl+."],CMD_A:["⌘A","Ctrl+A"],CMD_Z:["⌘Z","Ctrl+Z"],CMD_SHIFT_Z:["⌘⇧Z","Ctrl+Shift+Z"],ALT_SHIFT_D:["⌥⇧D","Alt+Shift+D"],ALT_SHIFT_E:["⌥⇧E","Alt+Shift+E"],ALT_SHIFT_N:["⌥⇧N","Alt+Shift+N"]},L=D?0:1,M=E.MOD[L],T=E.ALT[L],k="⇧",A="⏎",I=E.CMD_ENTER[L],H=E.CMD_S[L],j=E.CMD_K[L],F=E.CMD_DOT[L],Z=E.CMD_A[L],O=E.CMD_Z[L],P=E.CMD_SHIFT_Z[L],$=E.ALT_SHIFT_D[L],J=E.ALT_SHIFT_E[L],K=E.ALT_SHIFT_N[L],U=new Map(D?Object.values(E).map(([e,t])=>[e,t]):[]);function z(t){return e()?t:U.get(t)??t}var R="inline-flex items-center justify-center rounded border border-gray-200 bg-gray-50 font-medium text-gray-500",W={sm:"px-1 py-0.5 text-[10px]",md:"px-1.5 py-0.5 text-[11px]"};function X({keys:e,size:t="md",className:r=""}){const n=z(e);/* @__PURE__ */
10
- return h("kbd",{className:[R,W[t],r].filter(Boolean).join(" "),children:n})}var B=c(null);function V({value:e,children:t}){/* @__PURE__ */
11
- return h(B.Provider,{value:e,children:t})}function Y(e="react-os-shell:prefs",r){const[n,o]=t(()=>{try{const t=JSON.parse(localStorage.getItem(e)||"{}");return{...r??{},...t}}catch{return{...r??{}}}},{...r??{}});return{prefs:n,save:u(t=>{o(r=>{const n={...r,...t};try{localStorage.setItem(e,JSON.stringify(n))}catch{}return n})},[e])}}var q={prefs:{},save:()=>{}};function G(){return d(B)??q}function Q(){const{prefs:e,save:t}=G(),r=u(e=>{const r=t(e);return r&&"function"==typeof r.then?r.catch(()=>{}):r},[t]);return f(()=>({prefs:e,save:r}),[e,r])}var ee="react-os-shell:stale-chunk-reload-at",te=3e4,re="vite:preloadError",ne="/_next/static/",oe=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function ie(e){if(e instanceof Error&&"ChunkLoadError"===e.name)return!0;const t=e instanceof Error?e.message:"string"==typeof e?e:"";return oe.test(t)}function ae(e={}){if("undefined"==typeof window)return()=>{};const t=e.cooldownMs??3e4,r=e.reload??(()=>window.location.reload()),n=e.now??Date.now,o=void 0===e.storage?function(){try{const e=window.sessionStorage;return e.getItem(ee),e}catch{return null}}():e.storage,i=void 0===e.chunkPathPrefix?ne:e.chunkPathPrefix,a=e=>{const r=n(),i=function(e){if(!e)return null;try{const t=e.getItem(ee),r=null===t?NaN:Number(t);return Number.isFinite(r)?r:null}catch{return null}}(o);return null!==i&&r-i<t?(console.error("[efficient-shell] a lazy chunk is still missing after a reload; letting the failure through:",e),!1):(function(e,t){if(e)try{e.setItem(ee,String(t))}catch{}}(o,r),console.warn("[efficient-shell] a lazy chunk is no longer on the server (new deploy?); reloading onto the current build:",e),!0)},s=e=>{const t=e.payload;ie(t)&&a(t)&&(e.preventDefault(),r())};let c=!0,l=!1;const u=/* @__PURE__ */new Set,d=null===i?null:e=>{const t=function(e,t){const r=e.target;let n="";if(r instanceof window.HTMLScriptElement?n=r.src:r instanceof window.HTMLLinkElement&&function(e){const t=e.rel.toLowerCase().split(/\s+/);if(t.includes("stylesheet")||t.includes("modulepreload"))return!0;const r=(e.getAttribute("as")??"").toLowerCase();return t.includes("preload")&&("script"===r||"style"===r)}(r)?n=r.href:e instanceof window.ErrorEvent&&"SyntaxError"===e.error?.name&&(n=e.filename),!n)return null;try{const e=new URL(t,window.location.origin).href,r=new URL(n,window.location.href).href;return r.startsWith(e)?r:null}catch{return null}}(e,i);!t||l||u.has(t)||(u.add(t),async function(e){try{const t=await fetch(e,{method:"HEAD",cache:"no-store"});return 404===t.status||410===t.status||t.ok&&/\btext\/html\b/i.test(t.headers.get("content-type")??"")}catch{return!1}}(t).then(e=>{u.delete(t),e&&c&&!l&&a(t)&&(l=!0,r())}))};return window.addEventListener(re,s),d&&window.addEventListener("error",d,!0),()=>{c=!1,window.removeEventListener(re,s),d&&window.removeEventListener("error",d,!0)}}export{T as ALT,$ as ALT_SHIFT_D,J as ALT_SHIFT_E,K as ALT_SHIFT_N,Z as CMD_A,F as CMD_DOT,I as CMD_ENTER,j as CMD_K,H as CMD_S,P as CMD_SHIFT_Z,O as CMD_Z,A as ENTER,X as Kbd,C as LoadingSpinner,M as MOD,ne as NEXT_CHUNK_PATH_PREFIX,S as Result,k as SHIFT,te as STALE_CHUNK_RELOAD_COOLDOWN_MS,ee as STALE_CHUNK_RELOAD_KEY,V as ShellPrefsProvider,re as VITE_PRELOAD_ERROR_EVENT,ae as installStaleChunkReload,D as isMac,ie as isStaleChunkError,v as useIsMobile,Y as useLocalStoragePrefs,Q as useShellPrefs,G as useShellPrefsAdapter,z as useShortcutLabel};
9
+ /* @__PURE__ */h("p",{className:"text-sm text-gray-500",children:r})]})}var D="undefined"!=typeof window&&"undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),E={MOD:["⌘","Ctrl"],ALT:["⌥","Alt"],CMD_ENTER:["⌘⏎","Ctrl⏎"],CMD_S:["⌘S","Ctrl+S"],CMD_K:["⌘K","Ctrl+K"],CMD_DOT:["⌘.","Ctrl+."],CMD_A:["⌘A","Ctrl+A"],CMD_Z:["⌘Z","Ctrl+Z"],CMD_SHIFT_Z:["⌘⇧Z","Ctrl+Shift+Z"],ALT_SHIFT_D:["⌥⇧D","Alt+Shift+D"],ALT_SHIFT_E:["⌥⇧E","Alt+Shift+E"],ALT_SHIFT_N:["⌥⇧N","Alt+Shift+N"]},L=D?0:1,M=E.MOD[L],T=E.ALT[L],A="⇧",k="⏎",I=E.CMD_ENTER[L],j=E.CMD_S[L],H=E.CMD_K[L],F=E.CMD_DOT[L],Z=E.CMD_A[L],O=E.CMD_Z[L],P=E.CMD_SHIFT_Z[L],$=E.ALT_SHIFT_D[L],J=E.ALT_SHIFT_E[L],K=E.ALT_SHIFT_N[L],z=new Map(D?Object.values(E).map(([e,t])=>[e,t]):[]);function R(t){return e()?t:z.get(t)??t}var B="inline-flex items-center justify-center rounded border border-gray-200 bg-gray-50 font-medium text-gray-500",U={sm:"px-1 py-0.5 text-[10px]",md:"px-1.5 py-0.5 text-[11px]"};function G({keys:e,size:t="md",className:r=""}){const n=R(e);/* @__PURE__ */
10
+ return h("kbd",{className:[B,U[t],r].filter(Boolean).join(" "),children:n})}var W=c(null);function X({value:e,children:t}){/* @__PURE__ */
11
+ return h(W.Provider,{value:e,children:t})}function Y(e="react-os-shell:prefs",r){const[n,o]=t(()=>{try{const t=JSON.parse(localStorage.getItem(e)||"{}");return{...r??{},...t}}catch{return{...r??{}}}},{...r??{}});return{prefs:n,save:u(t=>{o(r=>{const n={...r,...t};try{localStorage.setItem(e,JSON.stringify(n))}catch{}return n})},[e])}}var q={prefs:{},save:()=>{}};function Q(){return d(W)??q}function V(){const{prefs:e,save:t}=Q(),r=u(e=>{const r=t(e);return r&&"function"==typeof r.then?r.catch(()=>{}):r},[t]);return f(()=>({prefs:e,save:r}),[e,r])}var ee="react-os-shell:stale-chunk-reload-at",te=3e4,re="vite:preloadError",ne="/_next/static/",oe=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function ie(e){if(e instanceof Error&&"ChunkLoadError"===e.name)return!0;const t=e instanceof Error?e.message:"string"==typeof e?e:"";return oe.test(t)}function ae(e={}){if("undefined"==typeof window)return()=>{};const t=e.cooldownMs??3e4,r=e.reload??(()=>window.location.reload()),n=e.now??Date.now,o=void 0===e.storage?function(){try{const e=window.sessionStorage;return e.getItem(ee),e}catch{return null}}():e.storage,i=void 0===e.chunkPathPrefix?ne:e.chunkPathPrefix,a=e=>{const r=n(),i=function(e){if(!e)return null;try{const t=e.getItem(ee),r=null===t?NaN:Number(t);return Number.isFinite(r)?r:null}catch{return null}}(o);return null!==i&&r-i<t?(console.error("[efficient-shell] a lazy chunk is still missing after a reload; letting the failure through:",e),!1):(function(e,t){if(e)try{e.setItem(ee,String(t))}catch{}}(o,r),console.warn("[efficient-shell] a lazy chunk is no longer on the server (new deploy?); reloading onto the current build:",e),!0)},s=e=>{const t=e.payload;ie(t)&&a(t)&&(e.preventDefault(),r())};let c=!0,l=!1;const u=/* @__PURE__ */new Set,d=null===i?null:e=>{const t=function(e,t){const r=e.target;let n="";if(r instanceof window.HTMLScriptElement?n=r.src:r instanceof window.HTMLLinkElement&&function(e){const t=e.rel.toLowerCase().split(/\s+/);if(t.includes("stylesheet")||t.includes("modulepreload"))return!0;const r=(e.getAttribute("as")??"").toLowerCase();return t.includes("preload")&&("script"===r||"style"===r)}(r)?n=r.href:e instanceof window.ErrorEvent&&"SyntaxError"===e.error?.name&&(n=e.filename),!n)return null;try{const e=new URL(t,window.location.origin).href,r=new URL(n,window.location.href).href;return r.startsWith(e)?r:null}catch{return null}}(e,i);!t||l||u.has(t)||(u.add(t),async function(e){try{const t=await fetch(e,{method:"HEAD",cache:"no-store"});return 404===t.status||410===t.status||t.ok&&/\btext\/html\b/i.test(t.headers.get("content-type")??"")}catch{return!1}}(t).then(e=>{u.delete(t),e&&c&&!l&&a(t)&&(l=!0,r())}))};return window.addEventListener(re,s),d&&window.addEventListener("error",d,!0),()=>{c=!1,window.removeEventListener(re,s),d&&window.removeEventListener("error",d,!0)}}export{T as ALT,$ as ALT_SHIFT_D,J as ALT_SHIFT_E,K as ALT_SHIFT_N,Z as CMD_A,F as CMD_DOT,I as CMD_ENTER,H as CMD_K,j as CMD_S,P as CMD_SHIFT_Z,O as CMD_Z,k as ENTER,G as Kbd,C as LoadingSpinner,M as MOD,ne as NEXT_CHUNK_PATH_PREFIX,S as Result,A as SHIFT,te as STALE_CHUNK_RELOAD_COOLDOWN_MS,ee as STALE_CHUNK_RELOAD_KEY,X as ShellPrefsProvider,re as VITE_PRELOAD_ERROR_EVENT,ae as installStaleChunkReload,D as isMac,ie as isStaleChunkError,v as useIsMobile,Y as useLocalStoragePrefs,V as useShellPrefs,Q as useShellPrefsAdapter,R as useShortcutLabel};
@@ -1 +1 @@
1
- import{currentShellStrings as t}from"./chunk-J3LIIIHJ.js";var e="http://www.w3.org/2000/svg",n={},o=/* @__PURE__ */new Map;function s(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var r={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",loading:"M12 3a9 9 0 019 9",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function i(t,n){const o=document.createElementNS(e,"svg");o.setAttribute("class",n),o.setAttribute("fill","none"),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2");const s=document.createElementNS(e,"path");return s.setAttribute("stroke-linecap","round"),"loading"!==t&&s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",r[t]),o.appendChild(s),o}function a(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function c(t,e,r){const c={...n,...r},l=c.placement??"top",d=c.sticky??!1,u=`${l}|${t}|${e}`;if(c.dedupe){const t=o.get(u);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==t&&!1!==c.sound&&import("./sounds-FO772MN2.js").then(e=>{"success"===t?e.playSuccess():"error"===t?e.playError():e.playNotification()}).catch(()=>{});const m="bottom"===l?s("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col-reverse gap-2 items-center pointer-events-none"):s("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col gap-2 items-center pointer-events-none"),p="bottom"===l?"translateY(10px)":"translateY(-10px)",f=a("pointer-events-auto cursor-pointer rosh-toast");f.style.opacity="0",f.style.transform=`${p} scale(0.95)`,f.setAttribute("role","error"===t?"alert":"status"),f.setAttribute("aria-atomic","true"),f.appendChild(i(t,`h-4 w-4 rosh-tone-${t}${"loading"===t?" animate-spin":""}`));const h=document.createElement("span");let y;h.textContent=e,f.appendChild(h),m.appendChild(f),requestAnimationFrame(()=>{f.style.opacity="1",f.style.transform="translateY(0) scale(1)"});let v=!1;const g=()=>{v||(v=!0,y&&clearTimeout(y),o.delete(u),f.style.opacity="0",f.style.transform=`${p} scale(0.95)`,setTimeout(()=>f.remove(),300))},b=c.duration??("info"===t?4500:3e3),x=()=>{y&&clearTimeout(y),d||(y=setTimeout(g,b))};return x(),f.addEventListener("mouseenter",()=>{y&&clearTimeout(y)}),f.addEventListener("mouseleave",()=>{v||x()}),f.addEventListener("click",g),o.set(u,{el:f,restart:x,dismiss:g}),{dismiss:g}}var l={success:(t,e)=>c("success",t,e),error:(t,e)=>c("error",t,e),warning:(t,e)=>c("warning",t,e),info:(t,e)=>c("info",t,e),notify:(e,o)=>function(e,o){!1!==(o?.sound??n.sound)&&import("./sounds-FO772MN2.js").then(t=>t.playNotification()).catch(()=>{});const r=s("notif-container","fixed top-4 right-4 z-[9999] flex flex-col gap-3 items-end pointer-events-none"),c=a("pointer-events-auto cursor-pointer rosh-notif");c.style.opacity="0",c.style.transform="translateX(30px) scale(0.95)";const l=a("rosh-notif-badge");l.appendChild(i("bell","h-5 w-5"));const d=a("rosh-notif-body");d.append(a("rosh-notif-title",t().toast.notification),a("notif-msg rosh-notif-msg",e));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",c.append(l,d,u);const m=()=>{c.style.opacity="0",c.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>c.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),c.addEventListener("click",m),r.appendChild(c),requestAnimationFrame(()=>{c.style.opacity="1",c.style.transform="translateX(0) scale(1)"}),setTimeout(m,o?.duration??1e4)}(e,o),promise:(t,e,n)=>{const o=c("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),c("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),c("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{n={...t}}};export{l as toast_default};
1
+ import{currentShellStrings as t}from"./chunk-AJB5G52B.js";var e="http://www.w3.org/2000/svg",n={},o=/* @__PURE__ */new Map;function s(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var r={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",loading:"M12 3a9 9 0 019 9",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function i(t,n){const o=document.createElementNS(e,"svg");o.setAttribute("class",n),o.setAttribute("fill","none"),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2");const s=document.createElementNS(e,"path");return s.setAttribute("stroke-linecap","round"),"loading"!==t&&s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",r[t]),o.appendChild(s),o}function a(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function c(t,e,r){const c={...n,...r},l=c.placement??"top",d=c.sticky??!1,u=`${l}|${t}|${e}`;if(c.dedupe){const t=o.get(u);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==t&&!1!==c.sound&&import("./sounds-FO772MN2.js").then(e=>{"success"===t?e.playSuccess():"error"===t?e.playError():e.playNotification()}).catch(()=>{});const m="bottom"===l?s("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col-reverse gap-2 items-center pointer-events-none"):s("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col gap-2 items-center pointer-events-none"),p="bottom"===l?"translateY(10px)":"translateY(-10px)",f=a("pointer-events-auto cursor-pointer rosh-toast");f.style.opacity="0",f.style.transform=`${p} scale(0.95)`,f.setAttribute("role","error"===t?"alert":"status"),f.setAttribute("aria-atomic","true"),f.appendChild(i(t,`h-4 w-4 rosh-tone-${t}${"loading"===t?" animate-spin":""}`));const h=document.createElement("span");let y;h.textContent=e,f.appendChild(h),m.appendChild(f),requestAnimationFrame(()=>{f.style.opacity="1",f.style.transform="translateY(0) scale(1)"});let v=!1;const g=()=>{v||(v=!0,y&&clearTimeout(y),o.delete(u),f.style.opacity="0",f.style.transform=`${p} scale(0.95)`,setTimeout(()=>f.remove(),300))},b=c.duration??("info"===t?4500:3e3),x=()=>{y&&clearTimeout(y),d||(y=setTimeout(g,b))};return x(),f.addEventListener("mouseenter",()=>{y&&clearTimeout(y)}),f.addEventListener("mouseleave",()=>{v||x()}),f.addEventListener("click",g),o.set(u,{el:f,restart:x,dismiss:g}),{dismiss:g}}var l={success:(t,e)=>c("success",t,e),error:(t,e)=>c("error",t,e),warning:(t,e)=>c("warning",t,e),info:(t,e)=>c("info",t,e),notify:(e,o)=>function(e,o){!1!==(o?.sound??n.sound)&&import("./sounds-FO772MN2.js").then(t=>t.playNotification()).catch(()=>{});const r=s("notif-container","fixed top-4 right-4 z-[9999] flex flex-col gap-3 items-end pointer-events-none"),c=a("pointer-events-auto cursor-pointer rosh-notif");c.style.opacity="0",c.style.transform="translateX(30px) scale(0.95)";const l=a("rosh-notif-badge");l.appendChild(i("bell","h-5 w-5"));const d=a("rosh-notif-body");d.append(a("rosh-notif-title",t().toast.notification),a("notif-msg rosh-notif-msg",e));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",c.append(l,d,u);const m=()=>{c.style.opacity="0",c.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>c.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),c.addEventListener("click",m),r.appendChild(c),requestAnimationFrame(()=>{c.style.opacity="1",c.style.transform="translateX(0) scale(1)"}),setTimeout(m,o?.duration??1e4)}(e,o),promise:(t,e,n)=>{const o=c("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),c("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),c("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{n={...t}}};export{l as toast_default};