@edenapp/sdk 0.5.1 → 0.6.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.
- package/dist/app-frame/frame-injector.js +6 -6
- package/dist/app-frame/frame-injector.js.map +3 -3
- package/dist/apps/prebuilt/com.eden.calculator/dist/assets/{index-B2YDTw7g.js → index-ombNmWuy.js} +1 -1
- package/dist/apps/prebuilt/com.eden.calculator/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.context-menu/dist/assets/{index-DUrqfNSi.js → index-B-ks_-b3.js} +1 -1
- package/dist/apps/prebuilt/com.eden.context-menu/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{editor.main-ABqnr99W.js → editor.main-ShXWZzLt.js} +3 -3
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{html-D6jh0yEa.js → html-BllhhjiQ.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{index-DAFnO6GB.js → index-DMisGu94.js} +2 -2
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{javascript-NUFioPTH.js → javascript-DmMyWycA.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{jsonMode-BprisSQ5.js → jsonMode-crhwfqKw.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{typescript-qUrrOs_e.js → typescript-B_1zjGZb.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{yaml-Xk-V_ilV.js → yaml-y53-55Ta.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.eveshell/dist/assets/index-B-bahmO2.js +1 -0
- package/dist/apps/prebuilt/com.eden.eveshell/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.eveshell/manifest.json +9 -1
- package/dist/apps/prebuilt/com.eden.eveshell/package.json +1 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/.bin/tsc +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/.bin/tsserver +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/AppManifest.d.ts +9 -3
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/CHANGELOG.md +14 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/ProcessMetrics.d.ts +127 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/commands.generated.d.ts +91 -15
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/global.d.ts +8 -3
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/index.d.ts +1 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/package.json +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/backend/tsconfig.json +2 -12
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/dist/assets/index-BeQINwbz.js +1 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/tsc +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/tsserver +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/vite +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/AppManifest.d.ts +9 -3
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/CHANGELOG.md +14 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/ProcessMetrics.d.ts +127 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/commands.generated.d.ts +91 -15
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/global.d.ts +8 -3
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/index.d.ts +1 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/package.json +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/esbuild +3 -3
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/rollup +4 -4
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/yaml +4 -4
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/tsconfig.json +1 -13
- package/dist/apps/prebuilt/com.eden.files/dist/assets/index-BT-jTYkQ.js +1 -0
- package/dist/apps/prebuilt/com.eden.files/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.files/package.json +4 -2
- package/dist/apps/prebuilt/com.eden.installer/dist/assets/{index-SmzSXaXF.js → index-czaxJQQE.js} +1 -1
- package/dist/apps/prebuilt/com.eden.installer/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.login/dist/assets/{index-DyI95N2f.js → index-C72VINOP.js} +1 -1
- package/dist/apps/prebuilt/com.eden.login/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.process-manager/dist/assets/index-C2Cw_EOR.css +1 -0
- package/dist/apps/prebuilt/com.eden.process-manager/dist/assets/index-x5Xb2Uoa.js +1 -0
- package/dist/apps/prebuilt/com.eden.process-manager/dist/index.html +13 -0
- package/dist/apps/prebuilt/com.eden.process-manager/icon.svg +13 -0
- package/dist/apps/prebuilt/com.eden.process-manager/index.html +12 -0
- package/dist/apps/prebuilt/com.eden.process-manager/manifest.json +31 -0
- package/dist/apps/prebuilt/com.eden.process-manager/package.json +20 -0
- package/dist/apps/prebuilt/com.eden.settings/dist/assets/{index-CHDYDKgf.js → index-CCa_wWrX.js} +1 -1
- package/dist/apps/prebuilt/com.eden.settings/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.toaster/dist/assets/{index-C4cVyh7j.js → index-b5EUNXyn.js} +2 -2
- package/dist/apps/prebuilt/com.eden.toaster/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.users/dist/assets/{index-CmyGIH5F.js → index-CSvwpgyK.js} +1 -1
- package/dist/apps/prebuilt/com.eden.users/dist/index.html +1 -1
- package/dist/edencss/eden.css +1 -1
- package/dist/filesystem/FilesystemHandler.d.ts +15 -0
- package/dist/filesystem/FilesystemHandler.d.ts.map +1 -1
- package/dist/filesystem/FilesystemHandler.js +25 -0
- package/dist/filesystem/FilesystemHandler.js.map +1 -1
- package/dist/filesystem/FilesystemManager.d.ts +9 -0
- package/dist/filesystem/FilesystemManager.d.ts.map +1 -1
- package/dist/filesystem/FilesystemManager.js +33 -0
- package/dist/filesystem/FilesystemManager.js.map +1 -1
- package/dist/generated/runtime.d.ts.map +1 -1
- package/dist/generated/runtime.js +9 -1
- package/dist/generated/runtime.js.map +1 -1
- package/dist/process-manager/ProcessHandler.d.ts +26 -1
- package/dist/process-manager/ProcessHandler.d.ts.map +1 -1
- package/dist/process-manager/ProcessHandler.js +41 -3
- package/dist/process-manager/ProcessHandler.js.map +1 -1
- package/dist/process-manager/ProcessManager.d.ts +11 -1
- package/dist/process-manager/ProcessManager.d.ts.map +1 -1
- package/dist/process-manager/ProcessManager.js +18 -0
- package/dist/process-manager/ProcessManager.js.map +1 -1
- package/dist/process-manager/ProcessMetricsCollector.d.ts +31 -0
- package/dist/process-manager/ProcessMetricsCollector.d.ts.map +1 -0
- package/dist/process-manager/ProcessMetricsCollector.js +219 -0
- package/dist/process-manager/ProcessMetricsCollector.js.map +1 -0
- package/dist/process-manager/ProcessMetricsCollector.test.d.ts +2 -0
- package/dist/process-manager/ProcessMetricsCollector.test.d.ts.map +1 -0
- package/dist/process-manager/ProcessMetricsCollector.test.js +194 -0
- package/dist/process-manager/ProcessMetricsCollector.test.js.map +1 -0
- package/dist/view-manager/ViewCreator.d.ts.map +1 -1
- package/dist/view-manager/ViewCreator.js +2 -1
- package/dist/view-manager/ViewCreator.js.map +1 -1
- package/dist/view-manager/ViewHandler.d.ts +67 -20
- package/dist/view-manager/ViewHandler.d.ts.map +1 -1
- package/dist/view-manager/ViewHandler.js +204 -122
- package/dist/view-manager/ViewHandler.js.map +1 -1
- package/dist/view-manager/viewLifecycle.d.ts.map +1 -1
- package/dist/view-manager/viewLifecycle.js +5 -0
- package/dist/view-manager/viewLifecycle.js.map +1 -1
- package/edencss/README.md +29 -194
- package/edencss/components/avatar.css +1 -1
- package/edencss/components/inputs.css +1 -1
- package/edencss/components/sidebar.css +2 -2
- package/edencss/utilities.css +17 -14
- package/package.json +9 -4
- package/dist/apps/prebuilt/com.eden.eveshell/dist/assets/index-CEfffVHu.js +0 -1
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/dist/assets/index-D4bTq3-Q.js +0 -1
- package/dist/apps/prebuilt/com.eden.files/dist/assets/index-CoRuEUrw.js +0 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -15
- package/dist/main.js.map +0 -1
- package/dist/view-manager/DevToolsManager.d.ts +0 -29
- package/dist/view-manager/DevToolsManager.d.ts.map +0 -1
- package/dist/view-manager/DevToolsManager.js +0 -88
- package/dist/view-manager/DevToolsManager.js.map +0 -1
- package/dist/view-manager/LayoutCalculator.d.ts +0 -49
- package/dist/view-manager/LayoutCalculator.d.ts.map +0 -1
- package/dist/view-manager/LayoutCalculator.js +0 -94
- package/dist/view-manager/LayoutCalculator.js.map +0 -1
- package/dist/view-manager/TilingManager.d.ts +0 -61
- package/dist/view-manager/TilingManager.d.ts.map +0 -1
- package/dist/view-manager/TilingManager.js +0 -142
- package/dist/view-manager/TilingManager.js.map +0 -1
- package/dist/view-manager/ViewLifecycle.d.ts +0 -66
- package/dist/view-manager/ViewLifecycle.d.ts.map +0 -1
- package/dist/view-manager/ViewLifecycle.js +0 -142
- package/dist/view-manager/ViewLifecycle.js.map +0 -1
package/dist/apps/prebuilt/com.eden.calculator/dist/assets/{index-B2YDTw7g.js → index-ombNmWuy.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();const St=!0,wt=(n,e)=>n===e,vt=Symbol("solid-track"),$t=Symbol("solid-dev-component"),fe={equals:wt};let ft=gt;const q=1,de=2,Lt={},Le={};var O=null;let Oe=null,Ot=null,k=null,D=null,J=null,we=0;function ne(n,e){const t=k,s=O,i=n.length===0,r=e===void 0?s:e,a=i?{owned:null,cleanups:null,context:null,owner:null}:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=i?()=>n(()=>{throw new Error("Dispose method must be an explicit argument to createRoot function")}):()=>n(()=>W(()=>re(a)));O=a,k=null;try{return Q(o,!0)}finally{k=t,O=s}}function U(n,e){e=e?Object.assign({},fe,e):fe;const t={value:n,observers:null,observerSlots:null,comparator:e.equals||void 0};e.name&&(t.name=e.name),e.internal?t.internal=!0:It(t);const s=i=>(typeof i=="function"&&(i=i(t.value)),ht(t,i));return[dt.bind(t),s]}function Ct(n,e,t){const s=oe(n,e,!0,q,t);Y(s)}function Ne(n,e,t){const s=oe(n,e,!1,q,t);Y(s)}function kt(n,e,t){ft=Dt;const s=oe(n,e,!1,q,t);s.user=!0,J?J.push(s):Y(s)}function se(n,e,t){t=t?Object.assign({},fe,t):fe;const s=oe(n,e,!0,0,t);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,Y(s),dt.bind(s)}function Nt(n){return n&&typeof n=="object"&&"then"in n}function Pt(n,e,t){let s,i,r;s=!0,i=n,r={};let a=null,o=Le,l=!1,u="initialValue"in r,f=typeof s=="function"&&se(s);const d=new Set,[c,g]=(r.storage||U)(r.initialValue),[b,w]=U(void 0),[v,P]=U(void 0,{equals:!1}),[$,S]=U(u?"ready":"unresolved");function m(E,x,F,T){return a===E&&(a=null,T!==void 0&&(u=!0),(E===o||x===o)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(T,{value:x})),o=Le,C(x,F)),x}function C(E,x){Q(()=>{x===void 0&&g(()=>E),S(x!==void 0?"errored":u?"ready":"unresolved"),w(x);for(const F of d.keys())F.decrement();d.clear()},!1)}function R(){const E=Ft,x=c(),F=b();if(F!==void 0&&!a)throw F;return k&&k.user,x}function N(E=!0){if(E!==!1&&l)return;l=!1;const x=f?f():s;if(x==null||x===!1){m(a,W(c));return}let F;const T=o!==Le?o:W(()=>{try{return i(x,{value:c(),refetching:E})}catch(h){F=h}});if(F!==void 0){m(a,void 0,ue(F),x);return}else if(!Nt(T))return m(a,T,void 0,x),T;return a=T,"v"in T?(T.s===1?m(a,T.v,void 0,x):m(a,void 0,ue(T.v),x),T):(l=!0,queueMicrotask(()=>l=!1),Q(()=>{S(u?"refreshing":"pending"),P()},!1),T.then(h=>m(T,h,void 0,x),h=>m(T,void 0,ue(h),x)))}Object.defineProperties(R,{state:{get:()=>$()},error:{get:()=>b()},loading:{get(){const E=$();return E==="pending"||E==="refreshing"}},latest:{get(){if(!u)return R();const E=b();if(E&&!a)throw E;return c()}}});let B=O;return f?Ct(()=>(B=O,N(!1))):N(!1),[R,{refetch:E=>Et(B,()=>N(E)),mutate:g}]}function W(n){if(k===null)return n();const e=k;k=null;try{return n()}finally{k=e}}function Rt(n){kt(()=>W(n))}function he(n){return O===null?console.warn("cleanups created outside a `createRoot` or `render` will never be run"):O.cleanups===null?O.cleanups=[n]:O.cleanups.push(n),n}function Et(n,e){const t=O,s=k;O=n,k=null;try{return Q(e,!0)}catch(i){Ee(i)}finally{O=t,k=s}}const[Rn,En]=U(!1);function At(n,e){const t=oe(()=>W(()=>(Object.assign(n,{[$t]:!0}),n(e))),void 0,!0,0);return t.props=e,t.observers=null,t.observerSlots=null,t.name=n.name,t.component=n,Y(t),t.tValue!==void 0?t.tValue:t.value}function It(n){O&&(O.sourceMap?O.sourceMap.push(n):O.sourceMap=[n],n.graph=O)}let Ft;function dt(){if(this.sources&&this.state)if(this.state===q)Y(this);else{const n=D;D=null,Q(()=>pe(this),!1),D=n}if(k){const n=this.observers?this.observers.length:0;k.sources?(k.sources.push(this),k.sourceSlots.push(n)):(k.sources=[this],k.sourceSlots=[n]),this.observers?(this.observers.push(k),this.observerSlots.push(k.sources.length-1)):(this.observers=[k],this.observerSlots=[k.sources.length-1])}return this.value}function ht(n,e,t){let s=n.value;return(!n.comparator||!n.comparator(s,e))&&(n.value=e,n.observers&&n.observers.length&&Q(()=>{for(let i=0;i<n.observers.length;i+=1){const r=n.observers[i],a=Oe&&Oe.running;a&&Oe.disposed.has(r),(a?!r.tState:!r.state)&&(r.pure?D.push(r):J.push(r),r.observers&&pt(r)),a||(r.state=q)}if(D.length>1e6)throw D=[],St?new Error("Potential Infinite Loop Detected."):new Error},!1)),e}function Y(n){if(!n.fn)return;re(n);const e=we;Tt(n,n.value,e)}function Tt(n,e,t){let s;const i=O,r=k;k=O=n;try{s=n.fn(e)}catch(a){return n.pure&&(n.state=q,n.owned&&n.owned.forEach(re),n.owned=null),n.updatedAt=t+1,Ee(a)}finally{k=r,O=i}(!n.updatedAt||n.updatedAt<=t)&&(n.updatedAt!=null&&"observers"in n?ht(n,s):n.value=s,n.updatedAt=t)}function oe(n,e,t,s=q,i){const r={fn:n,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:O,context:O?O.context:null,pure:t};return O===null?console.warn("computations created outside a `createRoot` or `render` will never be disposed"):O!==Lt&&(O.owned?O.owned.push(r):O.owned=[r]),i&&i.name&&(r.name=i.name),r}function ge(n){if(n.state===0)return;if(n.state===de)return pe(n);if(n.suspense&&W(n.suspense.inFallback))return n.suspense.effects.push(n);const e=[n];for(;(n=n.owner)&&(!n.updatedAt||n.updatedAt<we);)n.state&&e.push(n);for(let t=e.length-1;t>=0;t--)if(n=e[t],n.state===q)Y(n);else if(n.state===de){const s=D;D=null,Q(()=>pe(n,e[0]),!1),D=s}}function Q(n,e){if(D)return n();let t=!1;e||(D=[]),J?t=!0:J=[],we++;try{const s=n();return jt(t),s}catch(s){t||(J=null),D=null,Ee(s)}}function jt(n){if(D&&(gt(D),D=null),n)return;const e=J;J=null,e.length&&Q(()=>ft(e),!1)}function gt(n){for(let e=0;e<n.length;e++)ge(n[e])}function Dt(n){let e,t=0;for(e=0;e<n.length;e++){const s=n[e];s.user?n[t++]=s:ge(s)}for(e=0;e<t;e++)ge(n[e])}function pe(n,e){n.state=0;for(let t=0;t<n.sources.length;t+=1){const s=n.sources[t];if(s.sources){const i=s.state;i===q?s!==e&&(!s.updatedAt||s.updatedAt<we)&&ge(s):i===de&&pe(s,e)}}}function pt(n){for(let e=0;e<n.observers.length;e+=1){const t=n.observers[e];t.state||(t.state=de,t.pure?D.push(t):J.push(t),t.observers&&pt(t))}}function re(n){let e;if(n.sources)for(;n.sources.length;){const t=n.sources.pop(),s=n.sourceSlots.pop(),i=t.observers;if(i&&i.length){const r=i.pop(),a=t.observerSlots.pop();s<i.length&&(r.sourceSlots[a]=s,i[s]=r,t.observerSlots[s]=a)}}if(n.tOwned){for(e=n.tOwned.length-1;e>=0;e--)re(n.tOwned[e]);delete n.tOwned}if(n.owned){for(e=n.owned.length-1;e>=0;e--)re(n.owned[e]);n.owned=null}if(n.cleanups){for(e=n.cleanups.length-1;e>=0;e--)n.cleanups[e]();n.cleanups=null}n.state=0,delete n.sourceMap}function ue(n){return n instanceof Error?n:new Error(typeof n=="string"?n:"Unknown error",{cause:n})}function Ee(n,e=O){throw ue(n)}const Mt=Symbol("fallback");function Qe(n){for(let e=0;e<n.length;e++)n[e]()}function Vt(n,e,t={}){let s=[],i=[],r=[],a=0,o=e.length>1?[]:null;return he(()=>Qe(r)),()=>{let l=n()||[],u=l.length,f,d;return l[vt],W(()=>{let g,b,w,v,P,$,S,m,C;if(u===0)a!==0&&(Qe(r),r=[],s=[],i=[],a=0,o&&(o=[])),t.fallback&&(s=[Mt],i[0]=ne(R=>(r[0]=R,t.fallback())),a=1);else if(a===0){for(i=new Array(u),d=0;d<u;d++)s[d]=l[d],i[d]=ne(c);a=u}else{for(w=new Array(u),v=new Array(u),o&&(P=new Array(u)),$=0,S=Math.min(a,u);$<S&&s[$]===l[$];$++);for(S=a-1,m=u-1;S>=$&&m>=$&&s[S]===l[m];S--,m--)w[m]=i[S],v[m]=r[S],o&&(P[m]=o[S]);for(g=new Map,b=new Array(m+1),d=m;d>=$;d--)C=l[d],f=g.get(C),b[d]=f===void 0?-1:f,g.set(C,d);for(f=$;f<=S;f++)C=s[f],d=g.get(C),d!==void 0&&d!==-1?(w[d]=i[f],v[d]=r[f],o&&(P[d]=o[f]),d=b[d],g.set(C,d)):r[f]();for(d=$;d<u;d++)d in w?(i[d]=w[d],r[d]=v[d],o&&(o[d]=P[d],o[d](d))):i[d]=ne(c);i=i.slice(0,a=u),s=l.slice(0)}return i});function c(g){if(r[d]=g,o){const[b,w]=U(d,{name:"index"});return o[d]=w,e(l[d],b)}return e(l[d])}}}function ce(n,e){return At(n,e||{})}const Ut=n=>`Attempting to access a stale value from <${n}> that could possibly be undefined. This may occur because you are reading the accessor returned from the component at a time where it has already been unmounted. We recommend cleaning up any stale timers or async, or reading from the initial condition.`;function Ye(n){const e="fallback"in n&&{fallback:()=>n.fallback};return se(Vt(()=>n.each,n.children,e||void 0),void 0,{name:"value"})}function Kt(n){const e=n.keyed,t=se(()=>n.when,void 0,{name:"condition value"}),s=e?t:se(t,void 0,{equals:(i,r)=>!i==!r,name:"condition"});return se(()=>{const i=s();if(i){const r=n.children;return typeof r=="function"&&r.length>0?W(()=>r(e?i:()=>{if(!W(s))throw Ut("Show");return t()})):r}return n.fallback},void 0,{name:"value"})}globalThis&&(globalThis.Solid$$?console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior."):globalThis.Solid$$=!0);function Bt(n,e,t){let s=t.length,i=e.length,r=s,a=0,o=0,l=e[i-1].nextSibling,u=null;for(;a<i||o<r;){if(e[a]===t[o]){a++,o++;continue}for(;e[i-1]===t[r-1];)i--,r--;if(i===a){const f=r<s?o?t[o-1].nextSibling:t[r-o]:l;for(;o<r;)n.insertBefore(t[o++],f)}else if(r===o)for(;a<i;)(!u||!u.has(e[a]))&&e[a].remove(),a++;else if(e[a]===t[r-1]&&t[o]===e[i-1]){const f=e[--i].nextSibling;n.insertBefore(t[o++],e[a++].nextSibling),n.insertBefore(t[--r],f),e[i]=t[r]}else{if(!u){u=new Map;let d=o;for(;d<r;)u.set(t[d],d++)}const f=u.get(e[a]);if(f!=null)if(o<f&&f<r){let d=a,c=1,g;for(;++d<i&&d<r&&!((g=u.get(e[d]))==null||g!==f+c);)c++;if(c>f-o){const b=e[a];for(;o<f;)n.insertBefore(t[o++],b)}else n.replaceChild(t[o++],e[a++])}else a++;else e[a++].remove()}}}const Ze="_$DX_DELEGATE";function Ht(n,e,t,s={}){if(!e)throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");let i;return ne(r=>{i=r,e===document?n():ee(e,n(),e.firstChild?null:void 0,t)},s.owner),()=>{i(),e.textContent=""}}function Ae(n,e,t,s){let i;const r=()=>{const o=document.createElement("template");return o.innerHTML=n,o.content.firstChild},a=()=>(i||(i=r())).cloneNode(!0);return a.cloneNode=a,a}function zt(n,e=window.document){const t=e[Ze]||(e[Ze]=new Set);for(let s=0,i=n.length;s<i;s++){const r=n[s];t.has(r)||(t.add(r),e.addEventListener(r,Wt))}}function Jt(n,e,t,s){Array.isArray(t)?(n[`$$${e}`]=t[0],n[`$$${e}Data`]=t[1]):n[`$$${e}`]=t}function ee(n,e,t,s){if(t!==void 0&&!s&&(s=[]),typeof e!="function")return me(n,e,s,t);Ne(i=>me(n,e(),i,t),s)}function Wt(n){let e=n.target;const t=`$$${n.type}`,s=n.target,i=n.currentTarget,r=l=>Object.defineProperty(n,"target",{configurable:!0,value:l}),a=()=>{const l=e[t];if(l&&!e.disabled){const u=e[`${t}Data`];if(u!==void 0?l.call(e,u,n):l.call(e,n),n.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(n.target)&&r(e.host),!0},o=()=>{for(;a()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(n,"currentTarget",{configurable:!0,get(){return e||document}}),n.composedPath){const l=n.composedPath();r(l[0]);for(let u=0;u<l.length-2&&(e=l[u],!!a());u++){if(e._$host){e=e._$host,o();break}if(e.parentNode===i)break}}else o();r(s)}function me(n,e,t,s,i){for(;typeof t=="function";)t=t();if(e===t)return t;const r=typeof e,a=s!==void 0;if(n=a&&t[0]&&t[0].parentNode||n,r==="string"||r==="number"){if(r==="number"&&(e=e.toString(),e===t))return t;if(a){let o=t[0];o&&o.nodeType===3?o.data!==e&&(o.data=e):o=document.createTextNode(e),t=Z(n,t,s,o)}else t!==""&&typeof t=="string"?t=n.firstChild.data=e:t=n.textContent=e}else if(e==null||r==="boolean")t=Z(n,t,s);else{if(r==="function")return Ne(()=>{let o=e();for(;typeof o=="function";)o=o();t=me(n,o,t,s)}),()=>t;if(Array.isArray(e)){const o=[],l=t&&Array.isArray(t);if(Pe(o,e,t,i))return Ne(()=>t=me(n,o,t,s,!0)),()=>t;if(o.length===0){if(t=Z(n,t,s),a)return t}else l?t.length===0?_e(n,o,s):Bt(n,t,o):(t&&Z(n),_e(n,o));t=o}else if(e.nodeType){if(Array.isArray(t)){if(a)return t=Z(n,t,s,e);Z(n,t,null,e)}else t==null||t===""||!n.firstChild?n.appendChild(e):n.replaceChild(e,n.firstChild);t=e}else console.warn("Unrecognized value. Skipped inserting",e)}return t}function Pe(n,e,t,s){let i=!1;for(let r=0,a=e.length;r<a;r++){let o=e[r],l=t&&t[n.length],u;if(!(o==null||o===!0||o===!1))if((u=typeof o)=="object"&&o.nodeType)n.push(o);else if(Array.isArray(o))i=Pe(n,o,l)||i;else if(u==="function")if(s){for(;typeof o=="function";)o=o();i=Pe(n,Array.isArray(o)?o:[o],Array.isArray(l)?l:[l])||i}else n.push(o),i=!0;else{const f=String(o);l&&l.nodeType===3&&l.data===f?n.push(l):n.push(document.createTextNode(f))}}return i}function _e(n,e,t=null){for(let s=0,i=e.length;s<i;s++)n.insertBefore(e[s],t)}function Z(n,e,t,s){if(t===void 0)return n.textContent="";const i=s||document.createTextNode("");if(e.length){let r=!1;for(let a=e.length-1;a>=0;a--){const o=e[a];if(i!==o){const l=o.parentNode===n;!r&&!a?l?n.replaceChild(i,o):n.insertBefore(i,t):l&&o.remove()}else r=!0}}else n.insertBefore(i,t);return[i]}const y=n=>typeof n=="string",te=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},Xe=n=>n==null?"":""+n,qt=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},Gt=/###/g,et=n=>n&&n.indexOf("###")>-1?n.replace(Gt,"."):n,tt=n=>!n||y(n),ie=(n,e,t)=>{const s=y(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(tt(n))return{};const r=et(s[i]);!n[r]&&t&&(n[r]=new t),Object.prototype.hasOwnProperty.call(n,r)?n=n[r]:n={},++i}return tt(n)?{}:{obj:n,k:et(s[i])}},nt=(n,e,t)=>{const{obj:s,k:i}=ie(n,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let r=e[e.length-1],a=e.slice(0,e.length-1),o=ie(n,a,Object);for(;o.obj===void 0&&a.length;)r=`${a[a.length-1]}.${r}`,a=a.slice(0,a.length-1),o=ie(n,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=t},Qt=(n,e,t,s)=>{const{obj:i,k:r}=ie(n,e,Object);i[r]=i[r]||[],i[r].push(t)},be=(n,e)=>{const{obj:t,k:s}=ie(n,e);if(t)return t[s]},Yt=(n,e,t)=>{const s=be(n,t);return s!==void 0?s:be(e,t)},mt=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?y(n[s])||n[s]instanceof String||y(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):mt(n[s],e[s],t):n[s]=e[s]);return n},_=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Zt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const _t=n=>y(n)?n.replace(/[&<>"'\/]/g,e=>Zt[e]):n;class Xt{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const en=[" ",",","?","!",";"],tn=new Xt(20),nn=(n,e,t)=>{e=e||"",t=t||"";const s=en.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const i=tn.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(n);if(!r){const a=n.indexOf(t);a>0&&!i.test(n.substring(0,a))&&(r=!0)}return r},Re=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const s=e.split(t);let i=n;for(let r=0;r<s.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=r;l<s.length;++l)if(l!==r&&(o+=t),o+=s[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<s.length-1)continue;r+=l-r+1;break}i=a}return i},ye=n=>n&&n.replace("_","-"),sn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class xe{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||sn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(y(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new xe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xe(this.logger,e)}}var z=new xe;class ve{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(t)||0;this.observers[s].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[e,...s])})}}class st extends ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):y(s)&&r?o.push(...s.split(r)):o.push(s)));const l=be(this.data,o);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=o[0],t=o[1],s=o.slice(2).join(".")),l||!a||!y(s)?l:Re(this.data&&this.data[e]&&this.data[e][t],s,r)}addResource(e,t,s,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];s&&(o=o.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),nt(this.data,o,i),r.silent||this.emit("added",e,t,s,i)}addResources(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in s)(y(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let l=be(this.data,o)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?mt(l,s,r):l={...l,...s},nt(this.data,o,l),a.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var bt={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,i){return n.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,s,i))}),e}};const it={};class Se extends ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),qt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=z.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const s=this.resolve(e,t);return s&&s.res!==void 0}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!nn(e,s,i);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:y(r)?[r]:r};const u=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:y(r)?[r]:r}}translate(e,t,s){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.length-1],u=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const m=t.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${m}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${m}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:a}const d=this.resolve(e,t);let c=d&&d.res;const g=d&&d.usedKey||a,b=d&&d.exactUsedKey||a,w=Object.prototype.toString.apply(c),v=["[object Number]","[object Function]","[object RegExp]"],P=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,$=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!y(c)&&typeof c!="boolean"&&typeof c!="number";if($&&c&&S&&v.indexOf(w)<0&&!(y(P)&&Array.isArray(c))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const m=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,c,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=m,d.usedParams=this.getUsedParamsDetails(t),d):m}if(r){const m=Array.isArray(c),C=m?[]:{},R=m?b:g;for(const N in c)if(Object.prototype.hasOwnProperty.call(c,N)){const B=`${R}${r}${N}`;C[N]=this.translate(B,{...t,joinArrays:!1,ns:o}),C[N]===B&&(C[N]=c[N])}c=C}}else if($&&y(P)&&Array.isArray(c))c=c.join(P),c&&(c=this.extendTranslation(c,e,t,s));else{let m=!1,C=!1;const R=t.count!==void 0&&!y(t.count),N=Se.hasDefaultValue(t),B=R?this.pluralResolver.getSuffix(u,t.count,t):"",E=t.ordinal&&R?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",x=R&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),F=x&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${B}`]||t[`defaultValue${E}`]||t.defaultValue;!this.isValidLookup(c)&&N&&(m=!0,c=F),this.isValidLookup(c)||(C=!0,c=a);const h=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:c,p=N&&F!==c&&this.options.updateMissing;if(C||m||p){if(this.logger.log(p?"updateKey":"missingKey",u,l,a,p?F:c),r){const I=this.resolve(a,{...t,keySeparator:!1});I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&j&&j[0])for(let I=0;I<j.length;I++)L.push(j[I]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(t.lng||this.language):L.push(t.lng||this.language);const A=(I,K,H)=>{const G=N&&H!==c?H:h;this.options.missingKeyHandler?this.options.missingKeyHandler(I,l,K,G,p,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(I,l,K,G,p,t),this.emit("missingKey",I,l,K,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?L.forEach(I=>{const K=this.pluralResolver.getSuffixes(I,t);x&&t[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(H=>{A([I],a+H,t[`defaultValue${H}`]||F)})}):A(L,a,F))}c=this.extendTranslation(c,e,t,d,s),C&&c===a&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${a}`),(C||m)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,m?c:void 0):c=this.options.parseMissingKeyHandler(c))}return i?(d.res=c,d.usedParams=this.getUsedParamsDetails(t),d):c}extendTranslation(e,t,s,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const u=y(e)&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const c=e.match(this.interpolator.nestingRegexp);f=c&&c.length}let d=s.replace&&!y(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,s.lng||this.language||i.usedLng,s),u){const c=e.match(this.interpolator.nestingRegexp),g=c&&c.length;f<g&&(s.nest=!1)}!s.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,g=new Array(c),b=0;b<c;b++)g[b]=arguments[b];return r&&r[0]===g[0]&&!s.context?(a.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${t[0]}`),null):a.translate(...g,t)},s)),s.interpolation&&this.interpolator.reset()}const o=s.postProcess||this.options.postProcess,l=y(o)?[o]:o;return e!=null&&l&&l.length&&s.applyPostProcessor!==!1&&(e=bt.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,i,r,a,o;return y(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),f=u.key;i=f;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const c=t.count!==void 0&&!y(t.count),g=c&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),b=t.context!==void 0&&(y(t.context)||typeof t.context=="number")&&t.context!=="",w=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(v=>{this.isValidLookup(s)||(o=v,!it[`${w[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(it[`${w[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${w.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(P=>{if(this.isValidLookup(s))return;a=P;const $=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys($,f,P,v,t);else{let m;c&&(m=this.pluralResolver.getSuffix(P,t.count,t));const C=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&($.push(f+m),t.ordinal&&m.indexOf(R)===0&&$.push(f+m.replace(R,this.options.pluralSeparator)),g&&$.push(f+C)),b){const N=`${f}${this.options.contextSeparator}${t.context}`;$.push(N),c&&($.push(N+m),t.ordinal&&m.indexOf(R)===0&&$.push(N+m.replace(R,this.options.pluralSeparator)),g&&$.push(N+C))}}let S;for(;S=$.pop();)this.isValidLookup(s)||(r=S,s=this.getResource(P,v,S,t))}))})}),{res:s,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!y(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}const Ce=n=>n.charAt(0).toUpperCase()+n.slice(1);class rt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=z.create("languageUtils")}getScriptPartFromCode(e){if(e=ye(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ye(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(y(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let s=e.split("-");return this.options.lowerCaseLng?s=s.map(i=>i.toLowerCase()):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=Ce(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=Ce(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=Ce(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const i=this.getLanguagePartFromCode(s);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),y(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return y(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):y(e)&&r(this.formatLanguageCode(e)),s.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}}let rn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],an={1:n=>+(n>1),2:n=>+(n!=1),3:n=>0,4:n=>n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,5:n=>n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5,6:n=>n==1?0:n>=2&&n<=4?1:2,7:n=>n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,8:n=>n==1?0:n==2?1:n!=8&&n!=11?2:3,9:n=>+(n>=2),10:n=>n==1?0:n==2?1:n<7?2:n<11?3:4,11:n=>n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3,12:n=>+(n%10!=1||n%100==11),13:n=>+(n!==0),14:n=>n==1?0:n==2?1:n==3?2:3,15:n=>n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2,16:n=>n%10==1&&n%100!=11?0:n!==0?1:2,17:n=>n==1||n%10==1&&n%100!=11?0:1,18:n=>n==0?0:n==1?1:2,19:n=>n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3,20:n=>n==1?0:n==0||n%100>0&&n%100<20?1:2,21:n=>n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0,22:n=>n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3};const on=["v1","v2","v3"],ln=["v4"],at={zero:0,one:1,two:2,few:3,many:4,other:5},un=()=>{const n={};return rn.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:an[e.fc]}})}),n};class cn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=z.create("pluralResolver"),(!this.options.compatibilityJSON||ln.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=un(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const s=ye(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:s,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let a;try{a=new Intl.PluralRules(s,{type:i})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t)}return this.pluralRulesCache[r]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,s).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((i,r)=>at[i]-at[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):s.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,s);return i?this.shouldUseIntlApi()?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[s];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!on.includes(this.options.compatibilityJSON)}}const ot=function(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=Yt(n,e,t);return!r&&i&&y(t)&&(r=Re(n,t,s),r===void 0&&(r=Re(e,t,s))),r},ke=n=>n.replace(/\$/g,"$$$$");class fn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=z.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:r,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:c,nestingPrefixEscaped:g,nestingSuffix:b,nestingSuffixEscaped:w,nestingOptionsSeparator:v,maxReplaces:P,alwaysFormat:$}=e.interpolation;this.escape=t!==void 0?t:_t,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?_(r):a||"{{",this.suffix=o?_(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?_(c):g||_("$t("),this.nestingSuffix=b?_(b):w||_(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=P||1e3,this.alwaysFormat=$!==void 0?$:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>t&&t.source===s?(t.lastIndex=0,t):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,s,i){let r,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(g.indexOf(this.formatSeparator)<0){const P=ot(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(P,void 0,s,{...i,...t,interpolationkey:g}):P}const b=g.split(this.formatSeparator),w=b.shift().trim(),v=b.join(this.formatSeparator).trim();return this.format(ot(t,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),v,s,{...i,...t,interpolationkey:w})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>ke(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?ke(this.escape(g)):ke(g)}].forEach(g=>{for(o=0;r=g.regex.exec(e);){const b=r[1].trim();if(a=u(b),a===void 0)if(typeof f=="function"){const v=f(e,r,i);a=y(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,b))a="";else if(d){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${e}`),a="";else!y(a)&&!this.useRawValueToEscape&&(a=Xe(a));const w=g.safeValue(a);if(e=e.replace(r[0],w),d?(g.regex.lastIndex+=a.length,g.regex.lastIndex-=r[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;const o=(l,u)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const d=l.split(new RegExp(`${f}[ ]*{`));let c=`{${d[1]}`;l=d[0],c=this.interpolate(c,a);const g=c.match(/'/g),b=c.match(/"/g);(g&&g.length%2===0&&!b||b.length%2!==0)&&(c=c.replace(/'/g,'"'));try{a=JSON.parse(c),u&&(a={...u,...a})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${f}${c}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];a={...s},a=a.replace&&!y(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=f.shift(),l=f,u=!0}if(r=t(o.call(this,i[1].trim(),a),a),r&&i[0]===e&&!y(r))return r;y(r)||(r=Xe(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((f,d)=>this.format(f,d,s.lng,{...s,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const dn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=u),u==="false"&&(t[f]=!1),u==="true"&&(t[f]=!0),isNaN(u)||(t[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},X=n=>{const e={};return(t,s,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const a=s+JSON.stringify(r);let o=e[a];return o||(o=n(ye(s),i),e[a]=o),o(t)}};class hn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=z.create("formatter"),this.options=e,this.formats={number:X((t,s)=>{const i=new Intl.NumberFormat(t,{...s});return r=>i.format(r)}),currency:X((t,s)=>{const i=new Intl.NumberFormat(t,{...s,style:"currency"});return r=>i.format(r)}),datetime:X((t,s)=>{const i=new Intl.DateTimeFormat(t,{...s});return r=>i.format(r)}),relativetime:X((t,s)=>{const i=new Intl.RelativeTimeFormat(t,{...s});return r=>i.format(r,s.range||"day")}),list:X((t,s)=>{const i=new Intl.ListFormat(t,{...s});return r=>i.format(r)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=X(t)}format(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(o=>o.indexOf(")")>-1)){const o=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,l)=>{const{formatName:u,formatOptions:f}=dn(l);if(this.formats[u]){let d=o;try{const c=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=c.locale||c.lng||i.locale||i.lng||s;d=this.formats[u](o,g,{...f,...i,...c})}catch(c){this.logger.warn(c)}return d}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const gn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class pn extends ve{constructor(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=z.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(s,i.backend,i)}queueLoad(e,t,s,i){const r={},a={},o={},l={};return e.forEach(u=>{let f=!0;t.forEach(d=>{const c=`${u}|${d}`;!s.reload&&this.store.hasResourceBundle(u,d)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?a[c]===void 0&&(a[c]=!0):(this.state[c]=1,f=!1,a[c]===void 0&&(a[c]=!0),r[c]===void 0&&(r[c]=!0),l[d]===void 0&&(l[d]=!0)))}),f||(o[u]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),!t&&s&&this.store.addResourceBundle(r,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Qt(l.loaded,[r],a),gn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const f=l.loaded[u];f.length&&f.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:r,callback:a});return}this.readingCalls++;const o=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,r*2,a)},r);return}a(u,f)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();y(e)&&(e=this.languageUtils.toResolveHierarchy(e)),y(t)&&(t=[t]);const r=this.queueLoad(e,t,s,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=e.split("|"),i=s[0],r=s[1];this.read(i,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,t,s,i,l):f=u(e,t,s,i),f&&typeof f.then=="function"?f.then(d=>o(null,d)).catch(o):o(null,f)}catch(f){o(f)}else u(e,t,s,i,o,l)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const lt=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),y(n[1])&&(e.defaultValue=n[1]),y(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),ut=n=>(y(n.ns)&&(n.ns=[n.ns]),y(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),y(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),le=()=>{},mn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ae extends ve{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ut(e),this.services={},this.logger=z,this.modules={external:[]},mn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(y(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=lt();this.options={...i,...this.options,...ut(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const r=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?z.init(r(this.modules.logger),this.options):z.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=hn);const d=new rt(this.options);this.store=new st(this.options.resources,this.options);const c=this.services;c.logger=z,c.resourceStore=this.store,c.languageUtils=d,c.pluralResolver=new cn(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=r(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new fn(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new pn(r(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(g){for(var b=arguments.length,w=new Array(b>1?b-1:0),v=1;v<b;v++)w[v-1]=arguments[v];e.emit(g,...w)}),this.modules.languageDetector&&(c.languageDetector=r(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=r(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Se(this.services,this.options),this.translator.on("*",function(g){for(var b=arguments.length,w=new Array(b>1?b-1:0),v=1;v<b;v++)w[v-1]=arguments[v];e.emit(g,...w)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,s||(s=le),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const l=te(),u=()=>{const f=(d,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(c),s(d,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;const i=y(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const r=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(o)})}else s(null)}reloadResources(e,t,s){const i=te();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=le),this.services.backendConnector.reload(e,t,r=>{i.resolve(),s(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&bt.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;const i=te();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return s.t(...arguments)}),t&&t(l,function(){return s.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=y(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{a(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),i}getFixedT(e,t,s){var i=this;const r=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),d=2;d<u;d++)f[d-2]=arguments[d];l=i.options.overloadTranslationOptionHandler([a,o].concat(f))}else l={...o};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||r.keyPrefix);const c=i.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(b=>`${l.keyPrefix}${c}${b}`):g=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a,i.t(g,l)};return y(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=s,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!i||a(r,e)))}loadNamespaces(e,t){const s=te();return this.options.ns?(y(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),t&&t(i)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=te();y(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=this.services&&this.services.languageUtils||new rt(lt());return t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ae(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new ae(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s&&(r.store=new st(this.store.data,i),r.services.resourceStore=r.store),r.translator=new Se(r.services,i),r.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),f=1;f<l;f++)u[f-1]=arguments[f];r.emit(o,...u)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const M=ae.createInstance();M.createInstance=ae.createInstance;M.createInstance;M.dir;M.init;M.loadResources;M.reloadResources;M.use;M.changeLanguage;M.getFixedT;M.t;M.exists;M.setDefaultNamespace;M.hasLoadedNamespace;M.loadNamespaces;M.loadLanguages;async function bn(n={}){const e=M.createInstance(),t=n.resources||{};return await e.init({lng:"en",fallbackLng:n.fallbackLng||"en",debug:n.debug||!1,resources:t,interpolation:{escapeValue:!1},partialBundledLanguages:!0}),e}async function yn(n,e){try{const t=window.edenAPI;if(!t)return;const s=await t.shellCommand("i18n/get-common",{locale:e});s?.translations&&n.addResourceBundle(e,"translation",s.translations,!0,!0)}catch(t){console.error("Failed to load common translations",t)}}function xn(n={}){return ne(()=>{const[e,t]=U("en"),[s]=Pt(async()=>await bn(n)),i=((o,l)=>{const u=s();return u?u.t(o,{lng:e(),...l}):o}),r=async o=>{const l=s();l&&(await yn(l,o),await l.changeLanguage(o)),t(o)};return{t:i,locale:e,setLocale:t,initLocale:async()=>{try{const o=window.edenAPI;if(!o){console.warn("Eden API not found, using default locale");return}const l=f=>{r(f.locale)};he(()=>{o.unsubscribe("i18n/locale-changed",l)});const u=await o.shellCommand("i18n/get-locale",{});u?.locale&&await r(u.locale),await o.subscribe("i18n/locale-changed",l)}catch(o){console.error("Failed to load system locale",o)}}}})}const Sn={calculator:{divByZero:"Cannot divide by zero",invalidInput:"Invalid input",deg:"DEG",rad:"RAD"}},wn={calculator:{divByZero:"Nie można dzielić przez zero",invalidInput:"Nieprawidłowe dane",deg:"DEG",rad:"RAD"}},vn={en:{translation:Sn},pl:{translation:wn}},{t:V,locale:An,setLocale:In,initLocale:$n}=xn({resources:vn});var Ln=Ae("<div class=scientific-grid>"),On=Ae('<div class=calculator><div class="display-container eden-card"><div class="display-expression eden-text-secondary eden-text-sm"></div><div class=display-value></div></div><div class=buttons-grid><button type=button class="eden-btn eden-btn-danger">C</button><button type=button class="eden-btn eden-btn-secondary">⌫</button><button type=button class="eden-btn eden-btn-secondary">%</button><button type=button class="eden-btn eden-btn-primary">÷</button><button type=button class="eden-btn eden-btn-ghost num-btn">7</button><button type=button class="eden-btn eden-btn-ghost num-btn">8</button><button type=button class="eden-btn eden-btn-ghost num-btn">9</button><button type=button class="eden-btn eden-btn-primary">×</button><button type=button class="eden-btn eden-btn-ghost num-btn">4</button><button type=button class="eden-btn eden-btn-ghost num-btn">5</button><button type=button class="eden-btn eden-btn-ghost num-btn">6</button><button type=button class="eden-btn eden-btn-primary">−</button><button type=button class="eden-btn eden-btn-ghost num-btn">1</button><button type=button class="eden-btn eden-btn-ghost num-btn">2</button><button type=button class="eden-btn eden-btn-ghost num-btn">3</button><button type=button class="eden-btn eden-btn-primary">+</button><button type=button class="eden-btn eden-btn-ghost num-btn zero-btn">0</button><button type=button class="eden-btn eden-btn-ghost num-btn">.</button><button type=button class="eden-btn eden-btn-success equals-btn">='),Cn=Ae('<button type=button class="eden-btn eden-btn-secondary eden-btn-sm sci-btn">');const kn="com.eden.calculator",Nn=550,Pn=()=>{const[n,e]=U("0"),[t,s]=U(""),[i,r]=U(null),[a,o]=U(null),[l,u]=U(!1),[f,d]=U(null),[c,g]=U(!1),[b,w]=U("deg"),v=h=>{h.key>="0"&&h.key<="9"?S(h.key):h.key==="."?S("."):h.key==="+"?m("+"):h.key==="-"?m("-"):h.key==="*"?m("*"):h.key==="/"?m("/"):h.key==="%"?m("%"):h.key==="Enter"||h.key==="="?C():h.key==="Backspace"?B():(h.key==="Escape"||h.key==="Delete")&&N()};Rt(async()=>{await $n(),document.addEventListener("keydown",v);const h=()=>{g(window.innerHeight>=Nn)};if(h(),window.addEventListener("resize",h),window.edenAPI)try{await window.edenAPI.subscribe("settings/changed",$),await P()}catch(p){console.error("Failed to initialize:",p)}he(()=>{window.removeEventListener("resize",h)})}),he(()=>{document.removeEventListener("keydown",v)});const P=async()=>{if(window.edenAPI)try{const h=await window.edenAPI.shellCommand("settings/get",{key:"angleUnit"});(h.value==="rad"||h.value==="deg")&&w(h.value)}catch(h){console.error("Failed to load settings:",h)}},$=h=>{h.appId===kn&&h.key==="angleUnit"&&(h.value==="rad"||h.value==="deg")&&w(h.value)},S=h=>{const p=n();if(h.length>1&&!h.includes(".")){e(h),u(!0);return}if(l())e(h==="."?"0.":h),u(!1);else if(p==="0"&&h!==".")e(h);else{if(h==="."&&p.includes("."))return;if(p.length>=15)return;e(p+h)}},m=h=>{f()==="pow"&&(s(`${i()}^`),d(null)),a()!==null&&!l()&&C();const p={"+":"+","-":"−","*":"×","/":"÷","%":"mod"};s(`${n()} ${p[h]||h}`),r(n()),o(h),u(!0)},C=()=>{if(f()==="pow"){const K=i();if(K===null)return;const H=parseFloat(K),G=parseFloat(n());e(R(H**G)),s(`${K}^${G} =`),d(null),r(null),u(!0);return}const h=a(),p=i();if(h===null||p===null)return;const L=parseFloat(p),j=parseFloat(n());let A;switch(s(`${p} ${{"+":"+","-":"−","*":"×","/":"÷","%":"mod"}[h]} ${n()} =`),h){case"+":A=L+j;break;case"-":A=L-j;break;case"*":A=L*j;break;case"/":if(j===0){e(V("common.error")),s(V("calculator.divByZero")),o(null),r(null),u(!0);return}A=L/j;break;case"%":A=L%j;break;default:return}e(R(A)),o(null),r(null),u(!0)},R=h=>Number.isFinite(h)?Number.isInteger(h)&&Math.abs(h)<1e15?h.toString():(Math.round(h*1e12)/1e12).toString():V("common.error"),N=()=>{e("0"),s(""),o(null),r(null),u(!1),d(null)},B=()=>{const h=n();if(h===V("common.error")){N();return}h.length>1?e(h.slice(0,-1)):e("0")},E=()=>{const h=n();h!=="0"&&h!==V("common.error")&&(h.startsWith("-")?e(h.slice(1)):e(`-${h}`))},x=h=>{const p=parseFloat(n());let L;const j=I=>I*Math.PI/180,A=b()==="rad";switch(h){case"sin":L=Math.sin(A?p:j(p)),s(`sin(${p}${A?"":"°"})`);break;case"cos":L=Math.cos(A?p:j(p)),s(`cos(${p}${A?"":"°"})`);break;case"tan":L=Math.tan(A?p:j(p)),s(`tan(${p}${A?"":"°"})`);break;case"log":if(p<=0){e(V("common.error")),s(V("calculator.invalidInput"));return}L=Math.log10(p),s(`log(${p})`);break;case"ln":if(p<=0){e(V("common.error")),s(V("calculator.invalidInput"));return}L=Math.log(p),s(`ln(${p})`);break;case"sqrt":if(p<0){e(V("common.error")),s(V("calculator.invalidInput"));return}L=Math.sqrt(p),s(`√${p}`);break;case"pow2":L=p**2,s(`${p}²`);break;case"pow":r(n()),d("pow"),s(`${p}^`),u(!0);return;case"inv":if(p===0){e(V("common.error")),s(V("calculator.divByZero"));return}L=1/p,s(`1/${p}`);break;case"abs":L=Math.abs(p),s(`|${p}|`);break;case"factorial":if(p<0||!Number.isInteger(p)||p>170){e(V("common.error")),s(V("calculator.invalidInput"));return}L=F(p),s(`${p}!`);break;case"mod":m("%");return;default:return}e(R(L)),u(!0)},F=h=>{if(h===0||h===1)return 1;let p=1;for(let L=2;L<=h;L++)p*=L;return p},T=[[{label:"sin",action:()=>x("sin")},{label:"cos",action:()=>x("cos")},{label:"tan",action:()=>x("tan")},{label:"log",action:()=>x("log")},{label:"ln",action:()=>x("ln")}],[{label:"√",action:()=>x("sqrt")},{label:"x²",action:()=>x("pow2")},{label:"xʸ",action:()=>x("pow")},{label:"π",action:()=>S(Math.PI.toString())},{label:"e",action:()=>S(Math.E.toString())}],[{label:"1/x",action:()=>x("inv")},{label:"|x|",action:()=>x("abs")},{label:"n!",action:()=>x("factorial")},{label:"mod",action:()=>x("mod")},{label:"±",action:()=>E()}]];return(()=>{var h=On(),p=h.firstChild,L=p.firstChild,j=L.nextSibling,A=p.nextSibling,I=A.firstChild,K=I.nextSibling,H=K.nextSibling,G=H.nextSibling,Ie=G.nextSibling,Fe=Ie.nextSibling,Te=Fe.nextSibling,je=Te.nextSibling,De=je.nextSibling,Me=De.nextSibling,Ve=Me.nextSibling,Ue=Ve.nextSibling,Ke=Ue.nextSibling,Be=Ke.nextSibling,He=Be.nextSibling,ze=He.nextSibling,Je=ze.nextSibling,We=Je.nextSibling,yt=We.nextSibling;return ee(L,t),ee(j,n),ee(h,ce(Kt,{get when(){return c()},get children(){var qe=Ln();return ee(qe,ce(Ye,{each:T,children:xt=>ce(Ye,{each:xt,children:Ge=>(()=>{var $e=Cn();return Jt($e,"click",Ge.action),ee($e,()=>Ge.label),$e})()})})),qe}}),A),I.$$click=N,K.$$click=B,H.$$click=()=>m("%"),G.$$click=()=>m("/"),Ie.$$click=()=>S("7"),Fe.$$click=()=>S("8"),Te.$$click=()=>S("9"),je.$$click=()=>m("*"),De.$$click=()=>S("4"),Me.$$click=()=>S("5"),Ve.$$click=()=>S("6"),Ue.$$click=()=>m("-"),Ke.$$click=()=>S("1"),Be.$$click=()=>S("2"),He.$$click=()=>S("3"),ze.$$click=()=>m("+"),Je.$$click=()=>S("0"),We.$$click=()=>S("."),yt.$$click=C,h})()};zt(["click"]);const ct=document.getElementById("root");ct&&Ht(()=>ce(Pn,{}),ct);
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();const St=!0,wt=(n,e)=>n===e,vt=Symbol("solid-track"),$t=Symbol("solid-dev-component"),fe={equals:wt};let ft=gt;const q=1,de=2,Lt={},Le={};var O=null;let Oe=null,Ot=null,k=null,D=null,J=null,we=0;function ne(n,e){const t=k,s=O,i=n.length===0,r=e===void 0?s:e,a=i?{owned:null,cleanups:null,context:null,owner:null}:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=i?()=>n(()=>{throw new Error("Dispose method must be an explicit argument to createRoot function")}):()=>n(()=>W(()=>re(a)));O=a,k=null;try{return Q(o,!0)}finally{k=t,O=s}}function U(n,e){e=e?Object.assign({},fe,e):fe;const t={value:n,observers:null,observerSlots:null,comparator:e.equals||void 0};e.name&&(t.name=e.name),e.internal?t.internal=!0:It(t);const s=i=>(typeof i=="function"&&(i=i(t.value)),ht(t,i));return[dt.bind(t),s]}function Ct(n,e,t){const s=oe(n,e,!0,q,t);Y(s)}function Ne(n,e,t){const s=oe(n,e,!1,q,t);Y(s)}function kt(n,e,t){ft=Dt;const s=oe(n,e,!1,q,t);s.user=!0,J?J.push(s):Y(s)}function se(n,e,t){t=t?Object.assign({},fe,t):fe;const s=oe(n,e,!0,0,t);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,Y(s),dt.bind(s)}function Nt(n){return n&&typeof n=="object"&&"then"in n}function Pt(n,e,t){let s,i,r;s=!0,i=n,r={};let a=null,o=Le,l=!1,u="initialValue"in r,f=typeof s=="function"&&se(s);const d=new Set,[c,g]=(r.storage||U)(r.initialValue),[b,w]=U(void 0),[v,P]=U(void 0,{equals:!1}),[$,S]=U(u?"ready":"unresolved");function m(E,x,F,T){return a===E&&(a=null,T!==void 0&&(u=!0),(E===o||x===o)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(T,{value:x})),o=Le,C(x,F)),x}function C(E,x){Q(()=>{x===void 0&&g(()=>E),S(x!==void 0?"errored":u?"ready":"unresolved"),w(x);for(const F of d.keys())F.decrement();d.clear()},!1)}function R(){const E=Ft,x=c(),F=b();if(F!==void 0&&!a)throw F;return k&&k.user,x}function N(E=!0){if(E!==!1&&l)return;l=!1;const x=f?f():s;if(x==null||x===!1){m(a,W(c));return}let F;const T=o!==Le?o:W(()=>{try{return i(x,{value:c(),refetching:E})}catch(h){F=h}});if(F!==void 0){m(a,void 0,ue(F),x);return}else if(!Nt(T))return m(a,T,void 0,x),T;return a=T,"v"in T?(T.s===1?m(a,T.v,void 0,x):m(a,void 0,ue(T.v),x),T):(l=!0,queueMicrotask(()=>l=!1),Q(()=>{S(u?"refreshing":"pending"),P()},!1),T.then(h=>m(T,h,void 0,x),h=>m(T,void 0,ue(h),x)))}Object.defineProperties(R,{state:{get:()=>$()},error:{get:()=>b()},loading:{get(){const E=$();return E==="pending"||E==="refreshing"}},latest:{get(){if(!u)return R();const E=b();if(E&&!a)throw E;return c()}}});let B=O;return f?Ct(()=>(B=O,N(!1))):N(!1),[R,{refetch:E=>Et(B,()=>N(E)),mutate:g}]}function W(n){if(k===null)return n();const e=k;k=null;try{return n()}finally{k=e}}function Rt(n){kt(()=>W(n))}function he(n){return O===null?console.warn("cleanups created outside a `createRoot` or `render` will never be run"):O.cleanups===null?O.cleanups=[n]:O.cleanups.push(n),n}function Et(n,e){const t=O,s=k;O=n,k=null;try{return Q(e,!0)}catch(i){Ee(i)}finally{O=t,k=s}}const[Rn,En]=U(!1);function At(n,e){const t=oe(()=>W(()=>(Object.assign(n,{[$t]:!0}),n(e))),void 0,!0,0);return t.props=e,t.observers=null,t.observerSlots=null,t.name=n.name,t.component=n,Y(t),t.tValue!==void 0?t.tValue:t.value}function It(n){O&&(O.sourceMap?O.sourceMap.push(n):O.sourceMap=[n],n.graph=O)}let Ft;function dt(){if(this.sources&&this.state)if(this.state===q)Y(this);else{const n=D;D=null,Q(()=>pe(this),!1),D=n}if(k){const n=this.observers?this.observers.length:0;k.sources?(k.sources.push(this),k.sourceSlots.push(n)):(k.sources=[this],k.sourceSlots=[n]),this.observers?(this.observers.push(k),this.observerSlots.push(k.sources.length-1)):(this.observers=[k],this.observerSlots=[k.sources.length-1])}return this.value}function ht(n,e,t){let s=n.value;return(!n.comparator||!n.comparator(s,e))&&(n.value=e,n.observers&&n.observers.length&&Q(()=>{for(let i=0;i<n.observers.length;i+=1){const r=n.observers[i],a=Oe&&Oe.running;a&&Oe.disposed.has(r),(a?!r.tState:!r.state)&&(r.pure?D.push(r):J.push(r),r.observers&&pt(r)),a||(r.state=q)}if(D.length>1e6)throw D=[],St?new Error("Potential Infinite Loop Detected."):new Error},!1)),e}function Y(n){if(!n.fn)return;re(n);const e=we;Tt(n,n.value,e)}function Tt(n,e,t){let s;const i=O,r=k;k=O=n;try{s=n.fn(e)}catch(a){return n.pure&&(n.state=q,n.owned&&n.owned.forEach(re),n.owned=null),n.updatedAt=t+1,Ee(a)}finally{k=r,O=i}(!n.updatedAt||n.updatedAt<=t)&&(n.updatedAt!=null&&"observers"in n?ht(n,s):n.value=s,n.updatedAt=t)}function oe(n,e,t,s=q,i){const r={fn:n,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:O,context:O?O.context:null,pure:t};return O===null?console.warn("computations created outside a `createRoot` or `render` will never be disposed"):O!==Lt&&(O.owned?O.owned.push(r):O.owned=[r]),i&&i.name&&(r.name=i.name),r}function ge(n){if(n.state===0)return;if(n.state===de)return pe(n);if(n.suspense&&W(n.suspense.inFallback))return n.suspense.effects.push(n);const e=[n];for(;(n=n.owner)&&(!n.updatedAt||n.updatedAt<we);)n.state&&e.push(n);for(let t=e.length-1;t>=0;t--)if(n=e[t],n.state===q)Y(n);else if(n.state===de){const s=D;D=null,Q(()=>pe(n,e[0]),!1),D=s}}function Q(n,e){if(D)return n();let t=!1;e||(D=[]),J?t=!0:J=[],we++;try{const s=n();return jt(t),s}catch(s){t||(J=null),D=null,Ee(s)}}function jt(n){if(D&&(gt(D),D=null),n)return;const e=J;J=null,e.length&&Q(()=>ft(e),!1)}function gt(n){for(let e=0;e<n.length;e++)ge(n[e])}function Dt(n){let e,t=0;for(e=0;e<n.length;e++){const s=n[e];s.user?n[t++]=s:ge(s)}for(e=0;e<t;e++)ge(n[e])}function pe(n,e){n.state=0;for(let t=0;t<n.sources.length;t+=1){const s=n.sources[t];if(s.sources){const i=s.state;i===q?s!==e&&(!s.updatedAt||s.updatedAt<we)&&ge(s):i===de&&pe(s,e)}}}function pt(n){for(let e=0;e<n.observers.length;e+=1){const t=n.observers[e];t.state||(t.state=de,t.pure?D.push(t):J.push(t),t.observers&&pt(t))}}function re(n){let e;if(n.sources)for(;n.sources.length;){const t=n.sources.pop(),s=n.sourceSlots.pop(),i=t.observers;if(i&&i.length){const r=i.pop(),a=t.observerSlots.pop();s<i.length&&(r.sourceSlots[a]=s,i[s]=r,t.observerSlots[s]=a)}}if(n.tOwned){for(e=n.tOwned.length-1;e>=0;e--)re(n.tOwned[e]);delete n.tOwned}if(n.owned){for(e=n.owned.length-1;e>=0;e--)re(n.owned[e]);n.owned=null}if(n.cleanups){for(e=n.cleanups.length-1;e>=0;e--)n.cleanups[e]();n.cleanups=null}n.state=0,delete n.sourceMap}function ue(n){return n instanceof Error?n:new Error(typeof n=="string"?n:"Unknown error",{cause:n})}function Ee(n,e=O){throw ue(n)}const Mt=Symbol("fallback");function Qe(n){for(let e=0;e<n.length;e++)n[e]()}function Vt(n,e,t={}){let s=[],i=[],r=[],a=0,o=e.length>1?[]:null;return he(()=>Qe(r)),()=>{let l=n()||[],u=l.length,f,d;return l[vt],W(()=>{let g,b,w,v,P,$,S,m,C;if(u===0)a!==0&&(Qe(r),r=[],s=[],i=[],a=0,o&&(o=[])),t.fallback&&(s=[Mt],i[0]=ne(R=>(r[0]=R,t.fallback())),a=1);else if(a===0){for(i=new Array(u),d=0;d<u;d++)s[d]=l[d],i[d]=ne(c);a=u}else{for(w=new Array(u),v=new Array(u),o&&(P=new Array(u)),$=0,S=Math.min(a,u);$<S&&s[$]===l[$];$++);for(S=a-1,m=u-1;S>=$&&m>=$&&s[S]===l[m];S--,m--)w[m]=i[S],v[m]=r[S],o&&(P[m]=o[S]);for(g=new Map,b=new Array(m+1),d=m;d>=$;d--)C=l[d],f=g.get(C),b[d]=f===void 0?-1:f,g.set(C,d);for(f=$;f<=S;f++)C=s[f],d=g.get(C),d!==void 0&&d!==-1?(w[d]=i[f],v[d]=r[f],o&&(P[d]=o[f]),d=b[d],g.set(C,d)):r[f]();for(d=$;d<u;d++)d in w?(i[d]=w[d],r[d]=v[d],o&&(o[d]=P[d],o[d](d))):i[d]=ne(c);i=i.slice(0,a=u),s=l.slice(0)}return i});function c(g){if(r[d]=g,o){const[b,w]=U(d,{name:"index"});return o[d]=w,e(l[d],b)}return e(l[d])}}}function ce(n,e){return At(n,e||{})}const Ut=n=>`Attempting to access a stale value from <${n}> that could possibly be undefined. This may occur because you are reading the accessor returned from the component at a time where it has already been unmounted. We recommend cleaning up any stale timers or async, or reading from the initial condition.`;function Ye(n){const e="fallback"in n&&{fallback:()=>n.fallback};return se(Vt(()=>n.each,n.children,e||void 0),void 0,{name:"value"})}function Kt(n){const e=n.keyed,t=se(()=>n.when,void 0,{name:"condition value"}),s=e?t:se(t,void 0,{equals:(i,r)=>!i==!r,name:"condition"});return se(()=>{const i=s();if(i){const r=n.children;return typeof r=="function"&&r.length>0?W(()=>r(e?i:()=>{if(!W(s))throw Ut("Show");return t()})):r}return n.fallback},void 0,{name:"value"})}globalThis&&(globalThis.Solid$$?console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior."):globalThis.Solid$$=!0);function Bt(n,e,t){let s=t.length,i=e.length,r=s,a=0,o=0,l=e[i-1].nextSibling,u=null;for(;a<i||o<r;){if(e[a]===t[o]){a++,o++;continue}for(;e[i-1]===t[r-1];)i--,r--;if(i===a){const f=r<s?o?t[o-1].nextSibling:t[r-o]:l;for(;o<r;)n.insertBefore(t[o++],f)}else if(r===o)for(;a<i;)(!u||!u.has(e[a]))&&e[a].remove(),a++;else if(e[a]===t[r-1]&&t[o]===e[i-1]){const f=e[--i].nextSibling;n.insertBefore(t[o++],e[a++].nextSibling),n.insertBefore(t[--r],f),e[i]=t[r]}else{if(!u){u=new Map;let d=o;for(;d<r;)u.set(t[d],d++)}const f=u.get(e[a]);if(f!=null)if(o<f&&f<r){let d=a,c=1,g;for(;++d<i&&d<r&&!((g=u.get(e[d]))==null||g!==f+c);)c++;if(c>f-o){const b=e[a];for(;o<f;)n.insertBefore(t[o++],b)}else n.replaceChild(t[o++],e[a++])}else a++;else e[a++].remove()}}}const Ze="_$DX_DELEGATE";function Ht(n,e,t,s={}){if(!e)throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");let i;return ne(r=>{i=r,e===document?n():ee(e,n(),e.firstChild?null:void 0,t)},s.owner),()=>{i(),e.textContent=""}}function Ae(n,e,t,s){let i;const r=()=>{const o=document.createElement("template");return o.innerHTML=n,o.content.firstChild},a=()=>(i||(i=r())).cloneNode(!0);return a.cloneNode=a,a}function zt(n,e=window.document){const t=e[Ze]||(e[Ze]=new Set);for(let s=0,i=n.length;s<i;s++){const r=n[s];t.has(r)||(t.add(r),e.addEventListener(r,Wt))}}function Jt(n,e,t,s){Array.isArray(t)?(n[`$$${e}`]=t[0],n[`$$${e}Data`]=t[1]):n[`$$${e}`]=t}function ee(n,e,t,s){if(t!==void 0&&!s&&(s=[]),typeof e!="function")return me(n,e,s,t);Ne(i=>me(n,e(),i,t),s)}function Wt(n){let e=n.target;const t=`$$${n.type}`,s=n.target,i=n.currentTarget,r=l=>Object.defineProperty(n,"target",{configurable:!0,value:l}),a=()=>{const l=e[t];if(l&&!e.disabled){const u=e[`${t}Data`];if(u!==void 0?l.call(e,u,n):l.call(e,n),n.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(n.target)&&r(e.host),!0},o=()=>{for(;a()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(n,"currentTarget",{configurable:!0,get(){return e||document}}),n.composedPath){const l=n.composedPath();r(l[0]);for(let u=0;u<l.length-2&&(e=l[u],!!a());u++){if(e._$host){e=e._$host,o();break}if(e.parentNode===i)break}}else o();r(s)}function me(n,e,t,s,i){for(;typeof t=="function";)t=t();if(e===t)return t;const r=typeof e,a=s!==void 0;if(n=a&&t[0]&&t[0].parentNode||n,r==="string"||r==="number"){if(r==="number"&&(e=e.toString(),e===t))return t;if(a){let o=t[0];o&&o.nodeType===3?o.data!==e&&(o.data=e):o=document.createTextNode(e),t=Z(n,t,s,o)}else t!==""&&typeof t=="string"?t=n.firstChild.data=e:t=n.textContent=e}else if(e==null||r==="boolean")t=Z(n,t,s);else{if(r==="function")return Ne(()=>{let o=e();for(;typeof o=="function";)o=o();t=me(n,o,t,s)}),()=>t;if(Array.isArray(e)){const o=[],l=t&&Array.isArray(t);if(Pe(o,e,t,i))return Ne(()=>t=me(n,o,t,s,!0)),()=>t;if(o.length===0){if(t=Z(n,t,s),a)return t}else l?t.length===0?_e(n,o,s):Bt(n,t,o):(t&&Z(n),_e(n,o));t=o}else if(e.nodeType){if(Array.isArray(t)){if(a)return t=Z(n,t,s,e);Z(n,t,null,e)}else t==null||t===""||!n.firstChild?n.appendChild(e):n.replaceChild(e,n.firstChild);t=e}else console.warn("Unrecognized value. Skipped inserting",e)}return t}function Pe(n,e,t,s){let i=!1;for(let r=0,a=e.length;r<a;r++){let o=e[r],l=t&&t[n.length],u;if(!(o==null||o===!0||o===!1))if((u=typeof o)=="object"&&o.nodeType)n.push(o);else if(Array.isArray(o))i=Pe(n,o,l)||i;else if(u==="function")if(s){for(;typeof o=="function";)o=o();i=Pe(n,Array.isArray(o)?o:[o],Array.isArray(l)?l:[l])||i}else n.push(o),i=!0;else{const f=String(o);l&&l.nodeType===3&&l.data===f?n.push(l):n.push(document.createTextNode(f))}}return i}function _e(n,e,t=null){for(let s=0,i=e.length;s<i;s++)n.insertBefore(e[s],t)}function Z(n,e,t,s){if(t===void 0)return n.textContent="";const i=s||document.createTextNode("");if(e.length){let r=!1;for(let a=e.length-1;a>=0;a--){const o=e[a];if(i!==o){const l=o.parentNode===n;!r&&!a?l?n.replaceChild(i,o):n.insertBefore(i,t):l&&o.remove()}else r=!0}}else n.insertBefore(i,t);return[i]}const y=n=>typeof n=="string",te=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},Xe=n=>n==null?"":""+n,qt=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},Gt=/###/g,et=n=>n&&n.indexOf("###")>-1?n.replace(Gt,"."):n,tt=n=>!n||y(n),ie=(n,e,t)=>{const s=y(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(tt(n))return{};const r=et(s[i]);!n[r]&&t&&(n[r]=new t),Object.prototype.hasOwnProperty.call(n,r)?n=n[r]:n={},++i}return tt(n)?{}:{obj:n,k:et(s[i])}},nt=(n,e,t)=>{const{obj:s,k:i}=ie(n,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let r=e[e.length-1],a=e.slice(0,e.length-1),o=ie(n,a,Object);for(;o.obj===void 0&&a.length;)r=`${a[a.length-1]}.${r}`,a=a.slice(0,a.length-1),o=ie(n,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=t},Qt=(n,e,t,s)=>{const{obj:i,k:r}=ie(n,e,Object);i[r]=i[r]||[],i[r].push(t)},be=(n,e)=>{const{obj:t,k:s}=ie(n,e);if(t)return t[s]},Yt=(n,e,t)=>{const s=be(n,t);return s!==void 0?s:be(e,t)},mt=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?y(n[s])||n[s]instanceof String||y(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):mt(n[s],e[s],t):n[s]=e[s]);return n},_=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Zt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const _t=n=>y(n)?n.replace(/[&<>"'\/]/g,e=>Zt[e]):n;class Xt{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const en=[" ",",","?","!",";"],tn=new Xt(20),nn=(n,e,t)=>{e=e||"",t=t||"";const s=en.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const i=tn.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(n);if(!r){const a=n.indexOf(t);a>0&&!i.test(n.substring(0,a))&&(r=!0)}return r},Re=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const s=e.split(t);let i=n;for(let r=0;r<s.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=r;l<s.length;++l)if(l!==r&&(o+=t),o+=s[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<s.length-1)continue;r+=l-r+1;break}i=a}return i},ye=n=>n&&n.replace("_","-"),sn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class xe{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||sn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(y(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new xe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xe(this.logger,e)}}var z=new xe;class ve{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(t)||0;this.observers[s].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[e,...s])})}}class st extends ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):y(s)&&r?o.push(...s.split(r)):o.push(s)));const l=be(this.data,o);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=o[0],t=o[1],s=o.slice(2).join(".")),l||!a||!y(s)?l:Re(this.data&&this.data[e]&&this.data[e][t],s,r)}addResource(e,t,s,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];s&&(o=o.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),nt(this.data,o,i),r.silent||this.emit("added",e,t,s,i)}addResources(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in s)(y(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let l=be(this.data,o)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?mt(l,s,r):l={...l,...s},nt(this.data,o,l),a.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var bt={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,i){return n.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,s,i))}),e}};const it={};class Se extends ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),qt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=z.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const s=this.resolve(e,t);return s&&s.res!==void 0}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!nn(e,s,i);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:y(r)?[r]:r};const u=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:y(r)?[r]:r}}translate(e,t,s){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.length-1],u=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const m=t.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${m}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${m}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:a}const d=this.resolve(e,t);let c=d&&d.res;const g=d&&d.usedKey||a,b=d&&d.exactUsedKey||a,w=Object.prototype.toString.apply(c),v=["[object Number]","[object Function]","[object RegExp]"],P=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,$=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!y(c)&&typeof c!="boolean"&&typeof c!="number";if($&&c&&S&&v.indexOf(w)<0&&!(y(P)&&Array.isArray(c))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const m=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,c,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=m,d.usedParams=this.getUsedParamsDetails(t),d):m}if(r){const m=Array.isArray(c),C=m?[]:{},R=m?b:g;for(const N in c)if(Object.prototype.hasOwnProperty.call(c,N)){const B=`${R}${r}${N}`;C[N]=this.translate(B,{...t,joinArrays:!1,ns:o}),C[N]===B&&(C[N]=c[N])}c=C}}else if($&&y(P)&&Array.isArray(c))c=c.join(P),c&&(c=this.extendTranslation(c,e,t,s));else{let m=!1,C=!1;const R=t.count!==void 0&&!y(t.count),N=Se.hasDefaultValue(t),B=R?this.pluralResolver.getSuffix(u,t.count,t):"",E=t.ordinal&&R?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",x=R&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),F=x&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${B}`]||t[`defaultValue${E}`]||t.defaultValue;!this.isValidLookup(c)&&N&&(m=!0,c=F),this.isValidLookup(c)||(C=!0,c=a);const h=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:c,p=N&&F!==c&&this.options.updateMissing;if(C||m||p){if(this.logger.log(p?"updateKey":"missingKey",u,l,a,p?F:c),r){const I=this.resolve(a,{...t,keySeparator:!1});I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&j&&j[0])for(let I=0;I<j.length;I++)L.push(j[I]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(t.lng||this.language):L.push(t.lng||this.language);const A=(I,K,H)=>{const G=N&&H!==c?H:h;this.options.missingKeyHandler?this.options.missingKeyHandler(I,l,K,G,p,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(I,l,K,G,p,t),this.emit("missingKey",I,l,K,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?L.forEach(I=>{const K=this.pluralResolver.getSuffixes(I,t);x&&t[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(H=>{A([I],a+H,t[`defaultValue${H}`]||F)})}):A(L,a,F))}c=this.extendTranslation(c,e,t,d,s),C&&c===a&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${a}`),(C||m)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,m?c:void 0):c=this.options.parseMissingKeyHandler(c))}return i?(d.res=c,d.usedParams=this.getUsedParamsDetails(t),d):c}extendTranslation(e,t,s,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const u=y(e)&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const c=e.match(this.interpolator.nestingRegexp);f=c&&c.length}let d=s.replace&&!y(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,s.lng||this.language||i.usedLng,s),u){const c=e.match(this.interpolator.nestingRegexp),g=c&&c.length;f<g&&(s.nest=!1)}!s.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,g=new Array(c),b=0;b<c;b++)g[b]=arguments[b];return r&&r[0]===g[0]&&!s.context?(a.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${t[0]}`),null):a.translate(...g,t)},s)),s.interpolation&&this.interpolator.reset()}const o=s.postProcess||this.options.postProcess,l=y(o)?[o]:o;return e!=null&&l&&l.length&&s.applyPostProcessor!==!1&&(e=bt.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,i,r,a,o;return y(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),f=u.key;i=f;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const c=t.count!==void 0&&!y(t.count),g=c&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),b=t.context!==void 0&&(y(t.context)||typeof t.context=="number")&&t.context!=="",w=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(v=>{this.isValidLookup(s)||(o=v,!it[`${w[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(it[`${w[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${w.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(P=>{if(this.isValidLookup(s))return;a=P;const $=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys($,f,P,v,t);else{let m;c&&(m=this.pluralResolver.getSuffix(P,t.count,t));const C=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&($.push(f+m),t.ordinal&&m.indexOf(R)===0&&$.push(f+m.replace(R,this.options.pluralSeparator)),g&&$.push(f+C)),b){const N=`${f}${this.options.contextSeparator}${t.context}`;$.push(N),c&&($.push(N+m),t.ordinal&&m.indexOf(R)===0&&$.push(N+m.replace(R,this.options.pluralSeparator)),g&&$.push(N+C))}}let S;for(;S=$.pop();)this.isValidLookup(s)||(r=S,s=this.getResource(P,v,S,t))}))})}),{res:s,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!y(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}const Ce=n=>n.charAt(0).toUpperCase()+n.slice(1);class rt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=z.create("languageUtils")}getScriptPartFromCode(e){if(e=ye(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ye(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(y(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let s=e.split("-");return this.options.lowerCaseLng?s=s.map(i=>i.toLowerCase()):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=Ce(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=Ce(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=Ce(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const i=this.getLanguagePartFromCode(s);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),y(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return y(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):y(e)&&r(this.formatLanguageCode(e)),s.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}}let rn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],an={1:n=>+(n>1),2:n=>+(n!=1),3:n=>0,4:n=>n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,5:n=>n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5,6:n=>n==1?0:n>=2&&n<=4?1:2,7:n=>n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,8:n=>n==1?0:n==2?1:n!=8&&n!=11?2:3,9:n=>+(n>=2),10:n=>n==1?0:n==2?1:n<7?2:n<11?3:4,11:n=>n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3,12:n=>+(n%10!=1||n%100==11),13:n=>+(n!==0),14:n=>n==1?0:n==2?1:n==3?2:3,15:n=>n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2,16:n=>n%10==1&&n%100!=11?0:n!==0?1:2,17:n=>n==1||n%10==1&&n%100!=11?0:1,18:n=>n==0?0:n==1?1:2,19:n=>n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3,20:n=>n==1?0:n==0||n%100>0&&n%100<20?1:2,21:n=>n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0,22:n=>n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3};const on=["v1","v2","v3"],ln=["v4"],at={zero:0,one:1,two:2,few:3,many:4,other:5},un=()=>{const n={};return rn.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:an[e.fc]}})}),n};class cn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=z.create("pluralResolver"),(!this.options.compatibilityJSON||ln.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=un(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const s=ye(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:s,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let a;try{a=new Intl.PluralRules(s,{type:i})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t)}return this.pluralRulesCache[r]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,s).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((i,r)=>at[i]-at[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):s.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,s);return i?this.shouldUseIntlApi()?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[s];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!on.includes(this.options.compatibilityJSON)}}const ot=function(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=Yt(n,e,t);return!r&&i&&y(t)&&(r=Re(n,t,s),r===void 0&&(r=Re(e,t,s))),r},ke=n=>n.replace(/\$/g,"$$$$");class fn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=z.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:r,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:f,unescapePrefix:d,nestingPrefix:c,nestingPrefixEscaped:g,nestingSuffix:b,nestingSuffixEscaped:w,nestingOptionsSeparator:v,maxReplaces:P,alwaysFormat:$}=e.interpolation;this.escape=t!==void 0?t:_t,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?_(r):a||"{{",this.suffix=o?_(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?_(c):g||_("$t("),this.nestingSuffix=b?_(b):w||_(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=P||1e3,this.alwaysFormat=$!==void 0?$:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>t&&t.source===s?(t.lastIndex=0,t):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,s,i){let r,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(g.indexOf(this.formatSeparator)<0){const P=ot(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(P,void 0,s,{...i,...t,interpolationkey:g}):P}const b=g.split(this.formatSeparator),w=b.shift().trim(),v=b.join(this.formatSeparator).trim();return this.format(ot(t,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),v,s,{...i,...t,interpolationkey:w})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>ke(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?ke(this.escape(g)):ke(g)}].forEach(g=>{for(o=0;r=g.regex.exec(e);){const b=r[1].trim();if(a=u(b),a===void 0)if(typeof f=="function"){const v=f(e,r,i);a=y(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,b))a="";else if(d){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${e}`),a="";else!y(a)&&!this.useRawValueToEscape&&(a=Xe(a));const w=g.safeValue(a);if(e=e.replace(r[0],w),d?(g.regex.lastIndex+=a.length,g.regex.lastIndex-=r[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;const o=(l,u)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const d=l.split(new RegExp(`${f}[ ]*{`));let c=`{${d[1]}`;l=d[0],c=this.interpolate(c,a);const g=c.match(/'/g),b=c.match(/"/g);(g&&g.length%2===0&&!b||b.length%2!==0)&&(c=c.replace(/'/g,'"'));try{a=JSON.parse(c),u&&(a={...u,...a})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${f}${c}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];a={...s},a=a.replace&&!y(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=f.shift(),l=f,u=!0}if(r=t(o.call(this,i[1].trim(),a),a),r&&i[0]===e&&!y(r))return r;y(r)||(r=Xe(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((f,d)=>this.format(f,d,s.lng,{...s,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const dn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=u),u==="false"&&(t[f]=!1),u==="true"&&(t[f]=!0),isNaN(u)||(t[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},X=n=>{const e={};return(t,s,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const a=s+JSON.stringify(r);let o=e[a];return o||(o=n(ye(s),i),e[a]=o),o(t)}};class hn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=z.create("formatter"),this.options=e,this.formats={number:X((t,s)=>{const i=new Intl.NumberFormat(t,{...s});return r=>i.format(r)}),currency:X((t,s)=>{const i=new Intl.NumberFormat(t,{...s,style:"currency"});return r=>i.format(r)}),datetime:X((t,s)=>{const i=new Intl.DateTimeFormat(t,{...s});return r=>i.format(r)}),relativetime:X((t,s)=>{const i=new Intl.RelativeTimeFormat(t,{...s});return r=>i.format(r,s.range||"day")}),list:X((t,s)=>{const i=new Intl.ListFormat(t,{...s});return r=>i.format(r)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=X(t)}format(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(o=>o.indexOf(")")>-1)){const o=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,l)=>{const{formatName:u,formatOptions:f}=dn(l);if(this.formats[u]){let d=o;try{const c=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=c.locale||c.lng||i.locale||i.lng||s;d=this.formats[u](o,g,{...f,...i,...c})}catch(c){this.logger.warn(c)}return d}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const gn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class pn extends ve{constructor(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=z.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(s,i.backend,i)}queueLoad(e,t,s,i){const r={},a={},o={},l={};return e.forEach(u=>{let f=!0;t.forEach(d=>{const c=`${u}|${d}`;!s.reload&&this.store.hasResourceBundle(u,d)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?a[c]===void 0&&(a[c]=!0):(this.state[c]=1,f=!1,a[c]===void 0&&(a[c]=!0),r[c]===void 0&&(r[c]=!0),l[d]===void 0&&(l[d]=!0)))}),f||(o[u]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),!t&&s&&this.store.addResourceBundle(r,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Qt(l.loaded,[r],a),gn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const f=l.loaded[u];f.length&&f.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:r,callback:a});return}this.readingCalls++;const o=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,r*2,a)},r);return}a(u,f)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();y(e)&&(e=this.languageUtils.toResolveHierarchy(e)),y(t)&&(t=[t]);const r=this.queueLoad(e,t,s,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=e.split("|"),i=s[0],r=s[1];this.read(i,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,t,s,i,l):f=u(e,t,s,i),f&&typeof f.then=="function"?f.then(d=>o(null,d)).catch(o):o(null,f)}catch(f){o(f)}else u(e,t,s,i,o,l)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const lt=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),y(n[1])&&(e.defaultValue=n[1]),y(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),ut=n=>(y(n.ns)&&(n.ns=[n.ns]),y(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),y(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),le=()=>{},mn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ae extends ve{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ut(e),this.services={},this.logger=z,this.modules={external:[]},mn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(y(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=lt();this.options={...i,...this.options,...ut(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const r=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?z.init(r(this.modules.logger),this.options):z.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=hn);const d=new rt(this.options);this.store=new st(this.options.resources,this.options);const c=this.services;c.logger=z,c.resourceStore=this.store,c.languageUtils=d,c.pluralResolver=new cn(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=r(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new fn(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new pn(r(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(g){for(var b=arguments.length,w=new Array(b>1?b-1:0),v=1;v<b;v++)w[v-1]=arguments[v];e.emit(g,...w)}),this.modules.languageDetector&&(c.languageDetector=r(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=r(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Se(this.services,this.options),this.translator.on("*",function(g){for(var b=arguments.length,w=new Array(b>1?b-1:0),v=1;v<b;v++)w[v-1]=arguments[v];e.emit(g,...w)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,s||(s=le),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const l=te(),u=()=>{const f=(d,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(c),s(d,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;const i=y(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const r=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(o)})}else s(null)}reloadResources(e,t,s){const i=te();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=le),this.services.backendConnector.reload(e,t,r=>{i.resolve(),s(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&bt.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;const i=te();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return s.t(...arguments)}),t&&t(l,function(){return s.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=y(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{a(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),i}getFixedT(e,t,s){var i=this;const r=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),d=2;d<u;d++)f[d-2]=arguments[d];l=i.options.overloadTranslationOptionHandler([a,o].concat(f))}else l={...o};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||r.keyPrefix);const c=i.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(b=>`${l.keyPrefix}${c}${b}`):g=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a,i.t(g,l)};return y(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=s,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!i||a(r,e)))}loadNamespaces(e,t){const s=te();return this.options.ns?(y(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),t&&t(i)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=te();y(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=this.services&&this.services.languageUtils||new rt(lt());return t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ae(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new ae(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s&&(r.store=new st(this.store.data,i),r.services.resourceStore=r.store),r.translator=new Se(r.services,i),r.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),f=1;f<l;f++)u[f-1]=arguments[f];r.emit(o,...u)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const M=ae.createInstance();M.createInstance=ae.createInstance;M.createInstance;M.dir;M.init;M.loadResources;M.reloadResources;M.use;M.changeLanguage;M.getFixedT;M.t;M.exists;M.setDefaultNamespace;M.hasLoadedNamespace;M.loadNamespaces;M.loadLanguages;async function bn(n={}){const e=M.createInstance(),t=n.resources||{};return await e.init({lng:"en",fallbackLng:n.fallbackLng||"en",debug:n.debug||!1,resources:t,interpolation:{escapeValue:!1,prefix:"{",suffix:"}"},partialBundledLanguages:!0}),e}async function yn(n,e){try{const t=window.edenAPI;if(!t)return;const s=await t.shellCommand("i18n/get-common",{locale:e});s?.translations&&n.addResourceBundle(e,"translation",s.translations,!0,!0)}catch(t){console.error("Failed to load common translations",t)}}function xn(n={}){return ne(()=>{const[e,t]=U("en"),[s]=Pt(async()=>await bn(n)),i=((o,l)=>{const u=s();return u?u.t(o,{lng:e(),...l}):o}),r=async o=>{const l=s();l&&(await yn(l,o),await l.changeLanguage(o)),t(o)};return{t:i,locale:e,setLocale:t,initLocale:async()=>{try{const o=window.edenAPI;if(!o){console.warn("Eden API not found, using default locale");return}const l=f=>{r(f.locale)};he(()=>{o.unsubscribe("i18n/locale-changed",l)});const u=await o.shellCommand("i18n/get-locale",{});u?.locale&&await r(u.locale),await o.subscribe("i18n/locale-changed",l)}catch(o){console.error("Failed to load system locale",o)}}}})}const Sn={calculator:{divByZero:"Cannot divide by zero",invalidInput:"Invalid input",deg:"DEG",rad:"RAD"}},wn={calculator:{divByZero:"Nie można dzielić przez zero",invalidInput:"Nieprawidłowe dane",deg:"DEG",rad:"RAD"}},vn={en:{translation:Sn},pl:{translation:wn}},{t:V,locale:An,setLocale:In,initLocale:$n}=xn({resources:vn});var Ln=Ae("<div class=scientific-grid>"),On=Ae('<div class=calculator><div class="display-container eden-card"><div class="display-expression eden-text-secondary eden-text-sm"></div><div class=display-value></div></div><div class=buttons-grid><button type=button class="eden-btn eden-btn-danger">C</button><button type=button class="eden-btn eden-btn-secondary">⌫</button><button type=button class="eden-btn eden-btn-secondary">%</button><button type=button class="eden-btn eden-btn-primary">÷</button><button type=button class="eden-btn eden-btn-ghost num-btn">7</button><button type=button class="eden-btn eden-btn-ghost num-btn">8</button><button type=button class="eden-btn eden-btn-ghost num-btn">9</button><button type=button class="eden-btn eden-btn-primary">×</button><button type=button class="eden-btn eden-btn-ghost num-btn">4</button><button type=button class="eden-btn eden-btn-ghost num-btn">5</button><button type=button class="eden-btn eden-btn-ghost num-btn">6</button><button type=button class="eden-btn eden-btn-primary">−</button><button type=button class="eden-btn eden-btn-ghost num-btn">1</button><button type=button class="eden-btn eden-btn-ghost num-btn">2</button><button type=button class="eden-btn eden-btn-ghost num-btn">3</button><button type=button class="eden-btn eden-btn-primary">+</button><button type=button class="eden-btn eden-btn-ghost num-btn zero-btn">0</button><button type=button class="eden-btn eden-btn-ghost num-btn">.</button><button type=button class="eden-btn eden-btn-success equals-btn">='),Cn=Ae('<button type=button class="eden-btn eden-btn-secondary eden-btn-sm sci-btn">');const kn="com.eden.calculator",Nn=550,Pn=()=>{const[n,e]=U("0"),[t,s]=U(""),[i,r]=U(null),[a,o]=U(null),[l,u]=U(!1),[f,d]=U(null),[c,g]=U(!1),[b,w]=U("deg"),v=h=>{h.key>="0"&&h.key<="9"?S(h.key):h.key==="."?S("."):h.key==="+"?m("+"):h.key==="-"?m("-"):h.key==="*"?m("*"):h.key==="/"?m("/"):h.key==="%"?m("%"):h.key==="Enter"||h.key==="="?C():h.key==="Backspace"?B():(h.key==="Escape"||h.key==="Delete")&&N()};Rt(async()=>{await $n(),document.addEventListener("keydown",v);const h=()=>{g(window.innerHeight>=Nn)};if(h(),window.addEventListener("resize",h),window.edenAPI)try{await window.edenAPI.subscribe("settings/changed",$),await P()}catch(p){console.error("Failed to initialize:",p)}he(()=>{window.removeEventListener("resize",h)})}),he(()=>{document.removeEventListener("keydown",v)});const P=async()=>{if(window.edenAPI)try{const h=await window.edenAPI.shellCommand("settings/get",{key:"angleUnit"});(h.value==="rad"||h.value==="deg")&&w(h.value)}catch(h){console.error("Failed to load settings:",h)}},$=h=>{h.appId===kn&&h.key==="angleUnit"&&(h.value==="rad"||h.value==="deg")&&w(h.value)},S=h=>{const p=n();if(h.length>1&&!h.includes(".")){e(h),u(!0);return}if(l())e(h==="."?"0.":h),u(!1);else if(p==="0"&&h!==".")e(h);else{if(h==="."&&p.includes("."))return;if(p.length>=15)return;e(p+h)}},m=h=>{f()==="pow"&&(s(`${i()}^`),d(null)),a()!==null&&!l()&&C();const p={"+":"+","-":"−","*":"×","/":"÷","%":"mod"};s(`${n()} ${p[h]||h}`),r(n()),o(h),u(!0)},C=()=>{if(f()==="pow"){const K=i();if(K===null)return;const H=parseFloat(K),G=parseFloat(n());e(R(H**G)),s(`${K}^${G} =`),d(null),r(null),u(!0);return}const h=a(),p=i();if(h===null||p===null)return;const L=parseFloat(p),j=parseFloat(n());let A;switch(s(`${p} ${{"+":"+","-":"−","*":"×","/":"÷","%":"mod"}[h]} ${n()} =`),h){case"+":A=L+j;break;case"-":A=L-j;break;case"*":A=L*j;break;case"/":if(j===0){e(V("common.error")),s(V("calculator.divByZero")),o(null),r(null),u(!0);return}A=L/j;break;case"%":A=L%j;break;default:return}e(R(A)),o(null),r(null),u(!0)},R=h=>Number.isFinite(h)?Number.isInteger(h)&&Math.abs(h)<1e15?h.toString():(Math.round(h*1e12)/1e12).toString():V("common.error"),N=()=>{e("0"),s(""),o(null),r(null),u(!1),d(null)},B=()=>{const h=n();if(h===V("common.error")){N();return}h.length>1?e(h.slice(0,-1)):e("0")},E=()=>{const h=n();h!=="0"&&h!==V("common.error")&&(h.startsWith("-")?e(h.slice(1)):e(`-${h}`))},x=h=>{const p=parseFloat(n());let L;const j=I=>I*Math.PI/180,A=b()==="rad";switch(h){case"sin":L=Math.sin(A?p:j(p)),s(`sin(${p}${A?"":"°"})`);break;case"cos":L=Math.cos(A?p:j(p)),s(`cos(${p}${A?"":"°"})`);break;case"tan":L=Math.tan(A?p:j(p)),s(`tan(${p}${A?"":"°"})`);break;case"log":if(p<=0){e(V("common.error")),s(V("calculator.invalidInput"));return}L=Math.log10(p),s(`log(${p})`);break;case"ln":if(p<=0){e(V("common.error")),s(V("calculator.invalidInput"));return}L=Math.log(p),s(`ln(${p})`);break;case"sqrt":if(p<0){e(V("common.error")),s(V("calculator.invalidInput"));return}L=Math.sqrt(p),s(`√${p}`);break;case"pow2":L=p**2,s(`${p}²`);break;case"pow":r(n()),d("pow"),s(`${p}^`),u(!0);return;case"inv":if(p===0){e(V("common.error")),s(V("calculator.divByZero"));return}L=1/p,s(`1/${p}`);break;case"abs":L=Math.abs(p),s(`|${p}|`);break;case"factorial":if(p<0||!Number.isInteger(p)||p>170){e(V("common.error")),s(V("calculator.invalidInput"));return}L=F(p),s(`${p}!`);break;case"mod":m("%");return;default:return}e(R(L)),u(!0)},F=h=>{if(h===0||h===1)return 1;let p=1;for(let L=2;L<=h;L++)p*=L;return p},T=[[{label:"sin",action:()=>x("sin")},{label:"cos",action:()=>x("cos")},{label:"tan",action:()=>x("tan")},{label:"log",action:()=>x("log")},{label:"ln",action:()=>x("ln")}],[{label:"√",action:()=>x("sqrt")},{label:"x²",action:()=>x("pow2")},{label:"xʸ",action:()=>x("pow")},{label:"π",action:()=>S(Math.PI.toString())},{label:"e",action:()=>S(Math.E.toString())}],[{label:"1/x",action:()=>x("inv")},{label:"|x|",action:()=>x("abs")},{label:"n!",action:()=>x("factorial")},{label:"mod",action:()=>x("mod")},{label:"±",action:()=>E()}]];return(()=>{var h=On(),p=h.firstChild,L=p.firstChild,j=L.nextSibling,A=p.nextSibling,I=A.firstChild,K=I.nextSibling,H=K.nextSibling,G=H.nextSibling,Ie=G.nextSibling,Fe=Ie.nextSibling,Te=Fe.nextSibling,je=Te.nextSibling,De=je.nextSibling,Me=De.nextSibling,Ve=Me.nextSibling,Ue=Ve.nextSibling,Ke=Ue.nextSibling,Be=Ke.nextSibling,He=Be.nextSibling,ze=He.nextSibling,Je=ze.nextSibling,We=Je.nextSibling,yt=We.nextSibling;return ee(L,t),ee(j,n),ee(h,ce(Kt,{get when(){return c()},get children(){var qe=Ln();return ee(qe,ce(Ye,{each:T,children:xt=>ce(Ye,{each:xt,children:Ge=>(()=>{var $e=Cn();return Jt($e,"click",Ge.action),ee($e,()=>Ge.label),$e})()})})),qe}}),A),I.$$click=N,K.$$click=B,H.$$click=()=>m("%"),G.$$click=()=>m("/"),Ie.$$click=()=>S("7"),Fe.$$click=()=>S("8"),Te.$$click=()=>S("9"),je.$$click=()=>m("*"),De.$$click=()=>S("4"),Me.$$click=()=>S("5"),Ve.$$click=()=>S("6"),Ue.$$click=()=>m("-"),Ke.$$click=()=>S("1"),Be.$$click=()=>S("2"),He.$$click=()=>S("3"),ze.$$click=()=>m("+"),Je.$$click=()=>S("0"),We.$$click=()=>S("."),yt.$$click=C,h})()};zt(["click"]);const ct=document.getElementById("root");ct&&Ht(()=>ce(Pn,{}),ct);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
|
6
6
|
<title>Calculator</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-ombNmWuy.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-COlV85zB.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/dist/apps/prebuilt/com.eden.context-menu/dist/assets/{index-DUrqfNSi.js → index-B-ks_-b3.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function t(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=t(n);fetch(n.href,i)}})();const w={plus:'<line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line>',minus:'<line x1="5" y1="12" x2="19" y2="12"></line>',x:'<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',check:'<polyline points="20 6 9 17 4 12"></polyline>',"check-circle":'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',"x-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',"refresh-cw":'<polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>',"refresh-ccw":'<polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path>',"rotate-cw":'<polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path>',"rotate-ccw":'<polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.12-9.36L1 10"></path>',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>',"edit-2":'<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>',"edit-3":'<path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>',scissors:'<circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line>',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>',clipboard:'<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>',file:'<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>',"file-text":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline>',"file-plus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line>',"file-minus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line>',folder:'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>',"folder-plus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line>',"folder-minus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line>',save:'<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line>',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line>',trash:'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>',"trash-2":'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line>',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline>',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline>',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline>',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline>',"chevron-up":'<polyline points="18 15 12 9 6 15"></polyline>',"chevron-down":'<polyline points="6 9 12 15 18 9"></polyline>',"chevron-left":'<polyline points="15 18 9 12 15 6"></polyline>',"chevron-right":'<polyline points="9 18 15 12 9 6"></polyline>',"corner-up-left":'<polyline points="9 14 4 9 9 4"></polyline><path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>',"corner-up-right":'<polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path>',move:'<polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line>',maximize:'<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>',minimize:'<path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path>',"maximize-2":'<polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line>',"minimize-2":'<polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line>',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>',"eye-off":'<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line>',"zoom-in":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line>',"zoom-out":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line>',search:'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>',list:'<line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>',grid:'<rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect>',layout:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line>',sidebar:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line>',columns:'<path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path>',play:'<polygon points="5 3 19 12 5 21 5 3"></polygon>',pause:'<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>',"stop-circle":'<circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect>',"skip-back":'<polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></line>',"skip-forward":'<polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line>',volume:'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>',"volume-1":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-2":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-x":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line>',image:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline>',camera:'<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle>',film:'<rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line>',music:'<path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle>',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline>',"message-square":'<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>',"message-circle":'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>',send:'<line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>',share:'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',"share-2":'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',phone:'<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>',"user-plus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line>',"user-minus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line>',"user-x":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line>',"user-check":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline>',users:'<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path>',settings:'<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>',sliders:'<line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line>',tool:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>',wrench:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>',terminal:'<polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line>',code:'<polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline>',info:'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>',"alert-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',"alert-triangle":'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line>',"help-circle":'<circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line>',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path>',"bell-off":'<path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line>',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>',bookmark:'<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>',flag:'<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line>',tag:'<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line>',clock:'<circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line>',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path>',unlock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path>',key:'<path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path>',shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>',"link-2":'<path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line>',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>',"log-in":'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line>',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line>',power:'<path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line>',"more-horizontal":'<circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle>',"more-vertical":'<circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle>',menu:'<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline>',globe:'<circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>',package:'<line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',printer:'<polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect>',archive:'<polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line>',box:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',hash:'<line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line>',"at-sign":'<circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path>',percent:'<line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle>',type:'<polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line>',bold:'<path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>',italic:'<line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line>',underline:'<path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line>',"align-left":'<line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line>',"align-center":'<line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line>',"align-right":'<line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line>'};function f(e){return w[e]??null}const d=document.getElementById("context-menu-root"),u=document.getElementById("context-menu-overlay"),o=document.getElementById("context-menu"),r=document.getElementById("context-menu-title"),c=document.getElementById("context-menu-items");if(!d||!u||!o||!r||!c)throw new Error("Context menu elements not found");let h=null,y=null;async function m(){try{const e=await window.edenAPI.shellCommand("view/window-size",{});return h=e,e}catch(e){return console.error("Failed to get window size:",e),{width:window.innerWidth,height:window.innerHeight}}}async function x(e){const l=h??await m(),t=e?{x:0,y:0,width:l.width,height:l.height}:{x:0,y:0,width:0,height:0};try{await window.edenAPI.shellCommand("view/update-view-bounds",{appId:"com.eden.context-menu",bounds:t})}catch(a){console.error("Failed to update context menu bounds:",a)}}function v(e){d.classList.toggle("is-open",e)}function M(e){if(!e)return null;const l=e.trim();return l?f(l):null}function z(e){r.textContent=e.title??"",r.classList.toggle("is-visible",!!e.title),c.innerHTML="";for(const l of e.items){if(l.type==="separator"){const i=document.createElement("li");i.className="context-menu-divider",c.appendChild(i);continue}if(l.type==="title"){const i=document.createElement("li");i.className="context-menu-section-title",i.textContent=l.label,c.appendChild(i);continue}const t=document.createElement("li");t.className="context-menu-item",l.danger&&t.classList.add("context-menu-item-danger"),l.disabled&&t.classList.add("context-menu-item-disabled");const a=M(l.icon);if(a){const i=document.createElement("span");i.className="context-menu-icon",i.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${a}</svg>`,t.appendChild(i)}const n=document.createElement("span");if(n.className="context-menu-label",n.textContent=l.label,t.appendChild(n),l.shortcut){const i=document.createElement("span");i.className="context-menu-shortcut",i.textContent=l.shortcut,t.appendChild(i)}l.disabled?t.setAttribute("aria-disabled","true"):t.addEventListener("click",()=>{p("select",l.id)}),c.appendChild(t)}}function g(e){o.style.left=e.left!==void 0?`${e.left}px`:"",o.style.right=e.right!==void 0?`${e.right}px`:"",o.style.top=e.top!==void 0?`${e.top}px`:"",o.style.bottom=e.bottom!==void 0?`${e.bottom}px`:"",o.style.transform="",window.requestAnimationFrame(()=>{const l=o.getBoundingClientRect(),t=h??{width:window.innerWidth,height:window.innerHeight},a=8;let n=0,i=0;l.right>t.width-a?n=t.width-a-l.right:l.left<a&&(n=a-l.left),l.bottom>t.height-a?i=t.height-a-l.bottom:l.top<a&&(i=a-l.top),(n||i)&&(o.style.transform=`translate(${n}px, ${i}px)`)})}function p(e,l,t=!0){if(!y)return;const{requestId:a}=y;y=null,v(!1),r.textContent="",r.classList.remove("is-visible"),c.innerHTML="",x(!1),t&&window.edenAPI.shellCommand("context-menu/resolve",{requestId:a,itemId:l,reason:e})}async function H(e){y&&p("replaced",void 0,!1),y={requestId:e.requestId,position:e.position},await x(!0),z(e),v(!0),g(e.position),o.focus()}async function b(){await window.edenAPI.shellCommand("context-menu/register-display",{}),await m(),await x(!1),u.addEventListener("click",()=>p("dismiss")),o.addEventListener("click",e=>e.stopPropagation()),o.addEventListener("contextmenu",e=>e.preventDefault()),window.addEventListener("keydown",e=>{e.key==="Escape"&&p("dismiss")}),await window.edenAPI.subscribe("context-menu/opened",({menu:e})=>{H(e)}),await window.edenAPI.subscribe("context-menu/closed",e=>{!y||y.requestId!==e.requestId||e.reason==="select"||e.reason==="dismiss"||p(e.reason,e.itemId,!1)}),await window.edenAPI.subscribe("view/global-bounds-changed",({windowSize:e})=>{h=e,y&&(x(!0),g(y.position))}),console.log("Eden Context Menu ready!")}b();
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function t(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=t(n);fetch(n.href,i)}})();const f={plus:'<line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line>',minus:'<line x1="5" y1="12" x2="19" y2="12"></line>',x:'<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',check:'<polyline points="20 6 9 17 4 12"></polyline>',"check-circle":'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',"x-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',"refresh-cw":'<polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>',"refresh-ccw":'<polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path>',"rotate-cw":'<polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path>',"rotate-ccw":'<polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.12-9.36L1 10"></path>',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>',"edit-2":'<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>',"edit-3":'<path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>',scissors:'<circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line>',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>',clipboard:'<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>',file:'<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>',"file-text":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline>',"file-plus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line>',"file-minus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line>',folder:'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>',"folder-plus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line>',"folder-minus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line>',save:'<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line>',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line>',trash:'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>',"trash-2":'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line>',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline>',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline>',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline>',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline>',"chevron-up":'<polyline points="18 15 12 9 6 15"></polyline>',"chevron-down":'<polyline points="6 9 12 15 18 9"></polyline>',"chevron-left":'<polyline points="15 18 9 12 15 6"></polyline>',"chevron-right":'<polyline points="9 18 15 12 9 6"></polyline>',"corner-up-left":'<polyline points="9 14 4 9 9 4"></polyline><path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>',"corner-up-right":'<polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path>',move:'<polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line>',maximize:'<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>',minimize:'<path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path>',"maximize-2":'<polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line>',"minimize-2":'<polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line>',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>',"eye-off":'<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line>',"zoom-in":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line>',"zoom-out":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line>',search:'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>',list:'<line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>',grid:'<rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect>',layout:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line>',sidebar:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line>',columns:'<path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path>',play:'<polygon points="5 3 19 12 5 21 5 3"></polygon>',pause:'<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>',"stop-circle":'<circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect>',"skip-back":'<polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></line>',"skip-forward":'<polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line>',volume:'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>',"volume-1":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-2":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-x":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line>',image:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline>',camera:'<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle>',film:'<rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line>',music:'<path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle>',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline>',"message-square":'<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>',"message-circle":'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>',send:'<line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>',share:'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',"share-2":'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',phone:'<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>',"user-plus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line>',"user-minus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line>',"user-x":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line>',"user-check":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline>',users:'<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path>',settings:'<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>',sliders:'<line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line>',tool:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>',wrench:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>',terminal:'<polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line>',code:'<polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline>',info:'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>',"alert-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',"alert-triangle":'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line>',"help-circle":'<circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line>',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path>',"bell-off":'<path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line>',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>',bookmark:'<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>',flag:'<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line>',tag:'<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line>',clock:'<circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line>',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path>',unlock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path>',key:'<path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path>',shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>',"link-2":'<path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line>',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>',"log-in":'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line>',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line>',power:'<path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line>',"more-horizontal":'<circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle>',"more-vertical":'<circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle>',menu:'<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline>',globe:'<circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>',package:'<line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',printer:'<polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect>',archive:'<polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line>',box:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',hash:'<line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line>',"at-sign":'<circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path>',percent:'<line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle>',type:'<polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line>',bold:'<path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>',italic:'<line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line>',underline:'<path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line>',"align-left":'<line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line>',"align-center":'<line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line>',"align-right":'<line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line>'};function w(e){return f[e]??null}const d=document.getElementById("context-menu-root"),u=document.getElementById("context-menu-overlay"),o=document.getElementById("context-menu"),r=document.getElementById("context-menu-title"),c=document.getElementById("context-menu-items");if(!d||!u||!o||!r||!c)throw new Error("Context menu elements not found");let h=null,y=null;async function m(){try{const e=await window.edenAPI.shellCommand("view/window-size",{});return h=e,e}catch(e){return console.error("Failed to get window size:",e),{width:window.innerWidth,height:window.innerHeight}}}async function x(e){const l=h??await m(),t=e?{x:0,y:0,width:l.width,height:l.height}:{x:0,y:0,width:0,height:0};try{await window.edenAPI.shellCommand("view/update-bounds",{bounds:t})}catch(a){console.error("Failed to update context menu bounds:",a)}}function v(e){d.classList.toggle("is-open",e)}function M(e){if(!e)return null;const l=e.trim();return l?w(l):null}function z(e){r.textContent=e.title??"",r.classList.toggle("is-visible",!!e.title),c.innerHTML="";for(const l of e.items){if(l.type==="separator"){const i=document.createElement("li");i.className="context-menu-divider",c.appendChild(i);continue}if(l.type==="title"){const i=document.createElement("li");i.className="context-menu-section-title",i.textContent=l.label,c.appendChild(i);continue}const t=document.createElement("li");t.className="context-menu-item",l.danger&&t.classList.add("context-menu-item-danger"),l.disabled&&t.classList.add("context-menu-item-disabled");const a=M(l.icon);if(a){const i=document.createElement("span");i.className="context-menu-icon",i.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${a}</svg>`,t.appendChild(i)}const n=document.createElement("span");if(n.className="context-menu-label",n.textContent=l.label,t.appendChild(n),l.shortcut){const i=document.createElement("span");i.className="context-menu-shortcut",i.textContent=l.shortcut,t.appendChild(i)}l.disabled?t.setAttribute("aria-disabled","true"):t.addEventListener("click",()=>{p("select",l.id)}),c.appendChild(t)}}function g(e){o.style.left=e.left!==void 0?`${e.left}px`:"",o.style.right=e.right!==void 0?`${e.right}px`:"",o.style.top=e.top!==void 0?`${e.top}px`:"",o.style.bottom=e.bottom!==void 0?`${e.bottom}px`:"",o.style.transform="",window.requestAnimationFrame(()=>{const l=o.getBoundingClientRect(),t=h??{width:window.innerWidth,height:window.innerHeight},a=8;let n=0,i=0;l.right>t.width-a?n=t.width-a-l.right:l.left<a&&(n=a-l.left),l.bottom>t.height-a?i=t.height-a-l.bottom:l.top<a&&(i=a-l.top),(n||i)&&(o.style.transform=`translate(${n}px, ${i}px)`)})}function p(e,l,t=!0){if(!y)return;const{requestId:a}=y;y=null,v(!1),r.textContent="",r.classList.remove("is-visible"),c.innerHTML="",x(!1),t&&window.edenAPI.shellCommand("context-menu/resolve",{requestId:a,itemId:l,reason:e})}async function H(e){y&&p("replaced",void 0,!1),y={requestId:e.requestId,position:e.position},await x(!0),z(e),v(!0),g(e.position),o.focus()}async function b(){await window.edenAPI.shellCommand("context-menu/register-display",{}),await m(),await x(!1),u.addEventListener("click",()=>p("dismiss")),o.addEventListener("click",e=>e.stopPropagation()),o.addEventListener("contextmenu",e=>e.preventDefault()),window.addEventListener("keydown",e=>{e.key==="Escape"&&p("dismiss")}),await window.edenAPI.subscribe("context-menu/opened",({menu:e})=>{H(e)}),await window.edenAPI.subscribe("context-menu/closed",e=>{!y||y.requestId!==e.requestId||e.reason==="select"||e.reason==="dismiss"||p(e.reason,e.itemId,!1)}),await window.edenAPI.subscribe("view/global-bounds-changed",({windowSize:e})=>{h=e,y&&(x(!0),g(y.position))}),console.log("Eden Context Menu ready!")}b();
|