@dirwell/theme-ledger 0.0.1-alpha → 0.0.1
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/README.md +33 -3
- package/dist/client.js +27 -28
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +627 -86
- package/dist/index.mjs.map +1 -1
- package/dist/model-B0qQsjRT.d.mts +165 -0
- package/dist/model.d.mts +1 -1
- package/dist/source/Ledger.svelte +423 -153
- package/dist/source/component.d.mts +1 -1
- package/dist/source/shared/customization.mjs +255 -0
- package/dist/source/shared/navigation.mjs +196 -2
- package/dist/source/shared/view-state.mjs +128 -0
- package/dist/styles.css +6 -0
- package/package.json +7 -3
- package/dist/model-K7UzS9YB.d.mts +0 -46
package/dist/client.js
CHANGED
|
@@ -31,52 +31,51 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
31
31
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
32
32
|
|
|
33
33
|
*/
|
|
34
|
-
"use strict";(()=>{var
|
|
34
|
+
"use strict";(()=>{var au=Object.defineProperty;var hl=e=>{throw TypeError(e)};var lu=(e,t,r)=>t in e?au(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var re=(e,t,r)=>lu(e,typeof t!="symbol"?t+"":t,r),Ns=(e,t,r)=>t.has(e)||hl("Cannot "+r);var c=(e,t,r)=>(Ns(e,t,"read from private field"),r?r.call(e):t.get(e)),F=(e,t,r)=>t.has(e)?hl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),I=(e,t,r,n)=>(Ns(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),L=(e,t,r)=>(Ns(e,t,"access private method"),r);var vl=globalThis.process?.env?.NODE_ENV,b=vl&&!vl.toLowerCase().startsWith("prod");var Yt=Array.isArray,gl=Array.prototype.indexOf,vr=Array.prototype.includes,Sn=Array.from,Cs=Object.keys,Ie=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,_i=Object.getOwnPropertyDescriptors,Os=Object.prototype,bl=Array.prototype,rn=Object.getPrototypeOf,Is=Object.isExtensible;var er=()=>{};function mi(e){for(var t=0;t<e.length;t++)e[t]()}function hi(){var e,t,r=new Promise((n,o)=>{e=n,t=o});return{promise:r,resolve:e,reject:t}}var Ke=Symbol("$state"),vi=Symbol("component"),gi=Symbol("legacy props"),yl=Symbol(""),bi=Symbol("proxy path"),yi=Symbol("attributes"),Ds=Symbol("class"),po=Symbol("style"),_o=Symbol("text"),Hr=Symbol("form reset"),Ls=Symbol("hmr anchor"),gr=new class extends Error{constructor(){super(...arguments);re(this,"name","StaleReactionError");re(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ms=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var nn=3,vt=8;var ot={};var le=Symbol("uninitialized"),it=Symbol("filename");var $i="http://www.w3.org/1999/xhtml",mo="http://www.w3.org/2000/svg",Fs="http://www.w3.org/1998/Math/MathML";var tr="font-weight: bold",rr="font-weight: normal";function $l(e){b?console.warn(`%c[svelte] await_reactivity_loss
|
|
35
35
|
%cDetected reactivity loss when reading \`${e}\`. This happens when state is read in an async function after an earlier \`await\`
|
|
36
|
-
https://svelte.dev/e/await_reactivity_loss`,
|
|
36
|
+
https://svelte.dev/e/await_reactivity_loss`,tr,rr):console.warn("https://svelte.dev/e/await_reactivity_loss")}function wl(e,t){b?console.warn(`%c[svelte] await_waterfall
|
|
37
37
|
%cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
|
|
38
|
-
https://svelte.dev/e/await_waterfall`,
|
|
38
|
+
https://svelte.dev/e/await_waterfall`,tr,rr):console.warn("https://svelte.dev/e/await_waterfall")}function xl(){b?console.warn(`%c[svelte] derived_inert
|
|
39
39
|
%cReading a derived belonging to a now-destroyed effect may result in stale values
|
|
40
|
-
https://svelte.dev/e/derived_inert`,
|
|
40
|
+
https://svelte.dev/e/derived_inert`,tr,rr):console.warn("https://svelte.dev/e/derived_inert")}function El(e,t,r){b?console.warn(`%c[svelte] hydration_attribute_changed
|
|
41
41
|
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
|
|
42
|
-
https://svelte.dev/e/hydration_attribute_changed`,
|
|
42
|
+
https://svelte.dev/e/hydration_attribute_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Tl(e){b?console.warn(`%c[svelte] hydration_html_changed
|
|
43
43
|
%c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
44
|
-
https://svelte.dev/e/hydration_html_changed`,
|
|
44
|
+
https://svelte.dev/e/hydration_html_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_html_changed")}function Ur(e){b?console.warn(`%c[svelte] hydration_mismatch
|
|
45
45
|
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
|
46
|
-
https://svelte.dev/e/hydration_mismatch`,
|
|
46
|
+
https://svelte.dev/e/hydration_mismatch`,tr,rr):console.warn("https://svelte.dev/e/hydration_mismatch")}function kl(){b?console.warn(`%c[svelte] lifecycle_double_unmount
|
|
47
47
|
%cTried to unmount a component that was not mounted
|
|
48
|
-
https://svelte.dev/e/lifecycle_double_unmount`,
|
|
48
|
+
https://svelte.dev/e/lifecycle_double_unmount`,tr,rr):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Al(){b?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",tr,rr):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function wi(e){b?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
49
49
|
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
|
|
50
|
-
https://svelte.dev/e/state_proxy_equality_mismatch`,
|
|
50
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,tr,rr):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function Sl(){b?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",tr,rr):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var T=!1;function Te(e){T=e}var M;function ne(e){if(e===null)throw Ur(),ot;return M=e}function De(){return ne(Le(M))}function B(e){if(T){if(Le(M)!==null)throw Ur(),ot;M=e}}function vo(e=1){if(T){for(var t=e,r=M;t--;)r=Le(r);M=r}}function nr(e=!0){for(var t=0,r=M;;){if(r.nodeType===vt){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var o=Le(r);e&&r.remove(),r=o}}function on(e){if(!e||e.nodeType!==vt)throw Ur(),ot;return e.data}function xi(e){return e===this.v}function Ei(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ti(e){return!Ei(e,this.v)}function Rl(e){if(b){let t=new Error(`invariant_violation
|
|
51
51
|
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app \u2014 please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${e}"
|
|
52
|
-
https://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invariant_violation")}function
|
|
52
|
+
https://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invariant_violation")}function ki(e){if(b){let t=new Error(`lifecycle_outside_component
|
|
53
53
|
\`${e}(...)\` can only be used during component initialisation
|
|
54
|
-
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function
|
|
54
|
+
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cl(){if(b){let e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ps(){if(b){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function Ol(){if(b){let e=new Error(`derived_references_self
|
|
55
55
|
A derived value cannot reference itself recursively
|
|
56
|
-
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function
|
|
56
|
+
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function Hs(e,t,r){if(b){let n=new Error(`each_key_duplicate
|
|
57
57
|
${r?`Keyed each block has duplicate key \`${r}\` at indexes ${e} and ${t}`:`Keyed each block has duplicate key at indexes ${e} and ${t}`}
|
|
58
|
-
https://svelte.dev/e/each_key_duplicate`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function
|
|
58
|
+
https://svelte.dev/e/each_key_duplicate`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function Il(e,t,r){if(b){let n=new Error(`each_key_volatile
|
|
59
59
|
Keyed each block has key that is not idempotent \u2014 the key for item at index ${e} was \`${t}\` but is now \`${r}\`. Keys must be the same each time for a given item
|
|
60
|
-
https://svelte.dev/e/each_key_volatile`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_volatile")}function
|
|
60
|
+
https://svelte.dev/e/each_key_volatile`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_volatile")}function Dl(e){if(b){let t=new Error(`effect_in_teardown
|
|
61
61
|
\`${e}\` cannot be used inside an effect cleanup function
|
|
62
|
-
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function
|
|
62
|
+
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ll(){if(b){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ml(e){if(b){let t=new Error(`effect_orphan
|
|
63
63
|
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
64
|
-
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function
|
|
64
|
+
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function Fl(){if(b){let e=new Error(`effect_update_depth_exceeded
|
|
65
65
|
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
|
66
|
-
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function
|
|
66
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Pl(){if(b){let e=new Error(`hydration_failed
|
|
67
67
|
Failed to hydrate the application
|
|
68
|
-
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function
|
|
68
|
+
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function Hl(){if(b){let e=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invalid_snippet")}function Ul(e){if(b){let t=new Error(`rune_outside_svelte
|
|
69
69
|
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
70
|
-
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function
|
|
71
|
-
`),
|
|
72
|
-
`)}),
|
|
73
|
-
`),n=[];for(let o=0;o<r.length;o++){let i=r[o],s=i.replaceAll("\\","/");if(i.trim()!=="Error"){if(i.includes("validate_each_keys"))return[];s.includes("svelte/src/internal")||s.includes("node_modules/.vite")||n.push(i)}}return n}function sl(e,t){if(!m)throw new Error("invariant(...) was not guarded by if (DEV)");e||Va(t)}var M=null;function fr(e){M=e}var jt=null;function mn(e){jt=e}var ct=null;function ti(e){ct=e}function eo(e,t=!1,r){M={p:M,i:!1,c:null,e:null,s:e,x:null,r:E,l:Sr&&!t?{s:null,u:null,$:[]}:null},m&&(M.function=r,ct=r)}function to(e){var t=M,r=t.e;if(r!==null){t.e=null;for(var n of r)ps(n)}return e!==void 0&&(t.x=e),t.i=!0,M=t.p,m&&(ct=M?.function??null),ro(e)}function ro(e={}){return Te(e,Vo,{value:!0}),e}function Gt(){return!Sr||M!==null&&M.l===null}var zr=[];function al(){var e=zr;zr=[],Uo(e)}function pe(e){if(zr.length===0&&!jr){var t=zr;queueMicrotask(()=>{t===zr&&al()})}zr.push(e)}function ll(){for(;zr.length>0;)al()}var oc=-7169;function K(e,t){e.f=e.f&oc|t}function vn(e){(e.f&512)!==0||e.deps===null?K(e,1024):K(e,4096)}function ri(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),K(e,1024)}var fl=!1;function ni(){fl||(fl=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Ar]?.()})},{capture:!0}))}function dt(e){var t=A,r=E;we(null),ye(null);try{return e()}finally{we(t),ye(r)}}function _s(e,t,r,n=r){e.addEventListener(t,()=>dt(r));let o=e[Ar];o?e[Ar]=()=>{o(),n(!0)}:e[Ar]=()=>n(!0),ni()}function oi(e,t,r,n){let o=Gt()?wn:yn;var i=e.filter(u=>!u.settled),s=t.map(o);if(m&&s.forEach((u,h)=>{u.label=t[h].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(y,w)=>w)}),r.length===0&&i.length===0){n(s);return}var l=E,c=cl(),p=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(u=>u.promise)):null;function _(u){if((l.f&16384)===0){c();try{n([...s,...u])}catch(h){et(h,l)}bn()}}var g=hs();if(r.length===0){p.then(()=>_([])).finally(g);return}function b(){Promise.all(r.map(u=>vs(u))).then(_).catch(u=>et(u,l)).finally(g)}p?p.then(()=>{if((l.f&16384)!==0){g();return}c(),b(),bn()}):b()}function cl(){var e=E,t=A,r=M,n=S;if(m)var o=jt;return function(s=!0){ye(e),we(t),fr(r),s&&(e.f&16384)===0&&(n?.activate(),n?.apply()),m&&(ms(null),mn(o))}}var ic=!1;function bn(e=!0){ic=!1,ye(null),we(null),fr(null),e&&S?.deactivate(),m&&(ms(null),mn(null))}function hs(){var e=E,t=e.b,r=S,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var tt=null;function ms(e){tt=e}var io=new Set;function wn(e){var t=2050;E!==null&&(E.f|=524288);let r={ctx:M,deps:null,effects:null,equals:Wo,f:t,fn:e,reactions:null,rv:0,v:Z,wv:0,parent:E,ac:null};return m&&Dt&&(r.created=Mt("created at")),r}var xn=Symbol("obsolete");function vs(e,t,r){let n=E;n===null&&za();var o=void 0,i=Ye(Z);m&&(i.label=t??e.toString());var s=!A,l=new Set;return pl(()=>{var c=E;m&&(tt={effect:c,effect_deps:new Set,warned:!1});var p=Yo();o=p.promise;try{Promise.resolve(e()).then(p.resolve,u=>{u!==lr&&p.reject(u)}).finally(bn)}catch(u){p.reject(u),bn()}if(m){if(tt){if(c.deps!==null)for(let u=0;u<Ge;u+=1)tt.effect_deps.add(c.deps[u]);if(Ne!==null)for(let u=0;u<Ne.length;u+=1)tt.effect_deps.add(Ne[u])}tt=null}var _=S;if(s){if((c.f&32768)!==0)var g=hs();if(n.b?.is_rendered())_.async_deriveds.get(c)?.reject(xn);else for(let u of l.values())u.reject(xn);l.add(p),_.async_deriveds.set(c,p)}let b=(u,h=void 0)=>{m&&(tt=null),g?.(),l.delete(p),h!==xn&&(_.activate(),h?(i.f|=8388608,Ft(i,h)):((i.f&8388608)!==0&&(i.f^=8388608),m&&r!==void 0&&!i.equals(u)&&(io.add(i),setTimeout(()=>{io.has(i)&&(c.f&16384)===0&&(La(i.label,r),io.delete(i))})),Ft(i,u)),_.deactivate())};p.promise.then(b,u=>b(null,u||"unknown"))}),Se(()=>{for(let c of l)c.reject(xn)}),m&&(i.f|=4194304),new Promise(c=>{function p(_){function g(){_===o?c(i):p(o)}_.then(g,g)}p(o)})}function dr(e){let t=wn(e);return ge||ai(t),t}function yn(e){let t=wn(e);return t.equals=Jo,t}function ul(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)le(t[r])}}var gs=[];function so(e){var t,r=E,n=e.parent;if(!Et&&n!==null&&e.v!==Z&&(n.f&24576)!==0)return Fa(),e.v;if(ye(n),m){let o=Kr;ii(new Set);try{ar.call(gs,e)&&ja(),gs.push(e),ul(e),t=si(e)}finally{ye(r),ii(o),gs.pop()}}else try{ul(e),t=si(e)}finally{ye(r)}return t}function bs(e){var t=so(e);if(!e.equals(t)&&(e.wv=$n(),(!S?.is_fork||e.deps===null)&&(S!==null?(S.capture(e,t,!0),$t?.capture(e,t,!0)):e.v=t,e.deps===null))){K(e,1024);return}Et||(Re!==null?(Nr()||S?.is_fork)&&Re.set(e,t):vn(e))}function dl(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&dt(()=>{t.ac.abort(lr),t.ac=null}),t.fn!==null&&(t.teardown=Yt),Wr(t,0),ao(t))}function ws(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Kt(t)}var li=null,En=null,S=null,$t=null,Re=null,$s=null,jr=!1,ys=!1,An=null,co=null,_l=0,xs=new Set,lc=1,kn,pr,_r,Sn,Nn,Rn,hr,Cn,nt,uo,mr,Pt,Wt,On,Rr,B,Es,Ts,lo,As,ml,vl,Tn,gl,fo,fi=class fi{constructor(){I(this,B);q(this,"id",lc++);I(this,kn,!1);q(this,"linked",!0);I(this,pr,null);I(this,_r,null);q(this,"async_deriveds",new Map);q(this,"current",new Map);q(this,"previous",new Map);I(this,Sn,new Set);I(this,Nn,new Set);I(this,Rn,0);I(this,hr,new Map);I(this,Cn,null);I(this,nt,[]);I(this,uo,[]);I(this,mr,new Set);I(this,Pt,new Set);I(this,Wt,new Map);I(this,On,new Set);q(this,"is_fork",!1);I(this,Rr,!1);En===null?li=En=this:(R(En,_r,this),R(this,pr,En)),En=this}skip_effect(t){f(this,Wt).has(t)||f(this,Wt).set(t,{d:[],m:[]}),f(this,On).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=f(this,Wt).get(t);if(n){f(this,Wt).delete(t);for(var o of n.d)K(o,2048),r(o);for(o of n.m)K(o,4096),r(o)}f(this,On).add(t)}capture(t,r,n=!1){t.v!==Z&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Re?.set(t,r)),this.is_fork||(t.v=r)}activate(){S=this}deactivate(){S=null,Re=null}flush(){try{m&&xs.clear(),ys=!0,S=this,C(this,B,lo).call(this)}finally{if(_l=0,$s=null,An=null,co=null,ys=!1,S=null,Re=null,At.clear(),m)for(let t of xs)t.updated=null}}discard(){for(let t of f(this,Nn))t(this);f(this,Nn).clear();for(let t of this.async_deriveds.values())t.reject(xn);C(this,B,fo).call(this),f(this,Cn)?.resolve()}register_created_effect(t){f(this,uo).push(t)}increment(t,r){if(R(this,Rn,f(this,Rn)+1),t){let n=f(this,hr).get(r)??0;f(this,hr).set(r,n+1)}}decrement(t,r){if(R(this,Rn,f(this,Rn)-1),t){let n=f(this,hr).get(r)??0;n===1?f(this,hr).delete(r):f(this,hr).set(r,n-1)}f(this,Rr)||(R(this,Rr,!0),pe(()=>{R(this,Rr,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(let n of t)f(this,mr).add(n);for(let n of r)f(this,Pt).add(n);t.clear(),r.clear()}oncommit(t){f(this,Sn).add(t)}ondiscard(t){f(this,Nn).add(t)}settled(){return(f(this,Cn)??R(this,Cn,Yo())).promise}static ensure(){if(S===null){let t=S=new fi;!ys&&!jr&&pe(()=>{f(t,kn)||t.flush()})}return S}apply(){if(!ge||!this.is_fork&&f(this,pr)===null&&f(this,_r)===null){Re=null;return}Re=new Map;for(let[r,[n]]of this.current)Re.set(r,n);for(let r=li;r!==null;r=f(r,_r))if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(let[n,[,o]]of r.current)if(!o&&this.current.has(n)){t=!0;break}}if(!t)for(let[n,o]of r.previous)Re.has(n)||Re.set(n,o)}}schedule(t){if($s=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}f(this,nt).push(t)}};kn=new WeakMap,pr=new WeakMap,_r=new WeakMap,Sn=new WeakMap,Nn=new WeakMap,Rn=new WeakMap,hr=new WeakMap,Cn=new WeakMap,nt=new WeakMap,uo=new WeakMap,mr=new WeakMap,Pt=new WeakMap,Wt=new WeakMap,On=new WeakMap,Rr=new WeakMap,B=new WeakSet,Es=function(){if(this.is_fork)return!0;for(let n of f(this,hr).keys()){for(var t=n,r=!1;t.parent!==null;){if(f(this,Wt).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Ts=function(){var t=[];for(let i of f(this,nt))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var r=i,n=!1;r.parent!==null;){r=r.parent;var o=r.f;if((o&96)!==0){if((o&1024)===0){n=!0;break}r.f^=1024}}n||t.push(r)}return R(this,nt,[]),t},lo=function(){var l,c,p;if(R(this,kn,!0),m)for(let _ of this.current.keys())xs.add(_);for(let _ of f(this,mr))f(this,Pt).delete(_),K(_,2048),this.schedule(_);for(let _ of f(this,Pt))K(_,4096),this.schedule(_);this.apply();for(var t=An=[],r=[],n=co=[];f(this,nt).length>0;){_l++>1e3&&(C(this,B,fo).call(this),fc());for(let _ of C(this,B,Ts).call(this))try{C(this,B,As).call(this,_,t,r)}catch(g){throw yl(_),C(this,B,Es).call(this)||this.discard(),g}}if(S=null,n.length>0){var o=fi.ensure();for(let _ of n)o.schedule(_)}if(An=null,co=null,C(this,B,Es).call(this)){C(this,B,Tn).call(this,r),C(this,B,Tn).call(this,t);for(let[_,g]of f(this,Wt))wl(_,g);n.length>0&&C(l=S,B,lo).call(l);return}let i=C(this,B,ml).call(this);if(i){C(this,B,Tn).call(this,r),C(this,B,Tn).call(this,t),C(c=i,B,vl).call(c,this);return}f(this,mr).clear(),f(this,Pt).clear();for(let _ of f(this,Sn))_(this);f(this,Sn).clear(),$t=this,hl(r),hl(t),$t=null,f(this,Cn)?.resolve();var s=S;if(f(this,Rn)===0&&(f(this,nt).length===0||s!==null)&&(C(this,B,fo).call(this),ge&&(C(this,B,gl).call(this),S=s)),f(this,nt).length>0)if(s!==null){for(let _ of f(this,nt))f(s,nt).push(_);R(this,nt,[])}else s=this;s!==null&&(At.clear(),C(p=s,B,lo).call(p))},As=function(t,r,n){t.f^=1024;for(var o=t.first;o!==null;){var i=o.f,s=(i&96)!==0,l=s&&(i&1024)!==0,c=l||(i&8192)!==0||f(this,Wt).has(o);if(!c&&o.fn!==null){s?o.f^=1024:(i&4)!==0?r.push(o):ge&&(i&16777224)!==0?n.push(o):Or(o)&&((i&16)!==0&&f(this,Pt).add(o),Kt(o));var p=o.first;if(p!==null){o=p;continue}}for(;o!==null;){var _=o.next;if(_!==null){o=_;break}o=o.parent}}},ml=function(){for(var t=f(this,pr);t!==null;){if(!t.is_fork){for(let[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=f(t,pr)}return null},vl=function(t){var n;for(let[o,i]of t.current)!this.previous.has(o)&&t.previous.has(o)&&this.previous.set(o,t.previous.get(o)),this.current.set(o,i);for(let[o,i]of t.async_deriveds){let s=this.async_deriveds.get(o);s&&i.promise.then(s.resolve).catch(s.reject)}t.async_deriveds.clear(),this.transfer_effects(f(t,mr),f(t,Pt));let r=o=>{var i=o.reactions;if(i!==null&&!((o.f&2)!==0&&(o.f&6144)===0))for(let c of i){var s=c.f;if((s&2)!==0)r(c);else{var l=c;s&4194320&&!this.async_deriveds.has(l)&&(f(this,Pt).delete(l),K(l,2048),this.schedule(l))}}};for(let o of this.current.keys())r(o);this.oncommit(()=>t.discard()),C(n=t,B,fo).call(n),S=this,C(this,B,lo).call(this)},Tn=function(t){for(var r=0;r<t.length;r+=1)ri(t[r],f(this,mr),f(this,Pt))},gl=function(){var g,b;for(let u=li;u!==null;u=f(u,_r)){var t=u.id<this.id,r=[];for(let[h,[y,w]]of this.current){if(u.current.has(h)){var n=u.current.get(h)[0];if(t&&y!==n)u.current.set(h,[y,w]);else continue}r.push(h)}if(t)for(let[h,y]of this.async_deriveds){let w=u.async_deriveds.get(h);w&&y.promise.then(w.resolve).catch(w.reject)}var o=[...u.current.keys()].filter(h=>!u.current.get(h)[1]);if(!(!f(u,kn)||o.length===0)){var i=o.filter(h=>!this.current.has(h));if(i.length===0)t&&u.discard();else if(r.length>0){if(m&&!f(u,Rr)&&sl(f(u,nt).length===0,"Batch has scheduled effects"),t)for(let h of f(this,On))u.unskip_effect(h,y=>{var w;(y.f&4194320)!==0?u.schedule(y):C(w=u,B,Tn).call(w,[y])});u.activate();var s=new Set,l=new Map;for(var c of r)bl(c,i,s,l);l=new Map;var p=[...u.current].filter(([h,y])=>{let w=this.current.get(h);return w?w[0]!==y[0]||w[1]!==y[1]:!0}).map(([h])=>h);if(p.length>0)for(let h of f(this,uo))(h.f&155648)===0&&ks(h,p,l)&&((h.f&4194320)!==0?(K(h,2048),u.schedule(h)):f(u,mr).add(h));if(f(u,nt).length>0&&!f(u,Rr)){u.apply();for(var _ of C(g=u,B,Ts).call(g))C(b=u,B,As).call(b,_,[],[])}u.deactivate()}}}},fo=function(){if(this.linked){var t=f(this,pr),r=f(this,_r);t===null?li=r:R(t,_r,r),r===null?En=t:R(r,pr,t),this.linked=!1}};var pt=fi;function Cr(e){var t=jr,r=$t;$t=null,jr=!0;try{var n;for(e&&(Cr(),n=e());;){if(ll(),S===null)return n;S.flush()}}finally{jr=t,$t=r}}function fc(){if(m){var e=new Map;for(let r of S.current.keys())for(let[n,o]of r.updated??[]){var t=e.get(n);t||(t={error:o.error,count:0},e.set(n,t)),t.count+=o.count}for(let r of e.values())r.error&&console.error(r.error)}try{Ja()}catch(r){m&&Te(r,"stack",{value:""}),et(r,$s)}}var Tt=null;function hl(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Or(n)&&(Tt=new Set,Kt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Ss(n),Tt?.size>0)){At.clear();for(let o of Tt){if((o.f&24576)!==0)continue;let i=[o],s=o.parent;for(;s!==null;)Tt.has(s)&&(Tt.delete(s),i.push(s)),s=s.parent;for(let l=i.length-1;l>=0;l--){let c=i[l];(c.f&24576)===0&&Kt(c)}}Tt.clear()}}Tt=null}}function bl(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(let o of e.reactions){let i=o.f;(i&2)!==0?bl(o,t,r,n):(i&4194320)!==0&&(i&2048)===0&&ks(o,t,n)&&(K(o,2048),po(o))}}function ks(e,t,r){let n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(let o of e.deps){if(ar.call(t,o))return!0;if((o.f&2)!==0&&ks(o,t,r))return r.set(o,!0),!0}return r.set(e,!1),!1}function po(e){S.schedule(e)}function wl(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),K(e,1024);for(var r=e.first;r!==null;)wl(r,t),r=r.next}}function yl(e){K(e,1024);for(var t=e.first;t!==null;)yl(t),t=t.next}var Kr=new Set,At=new Map;function ii(e){Kr=e}var Rs=!1;function $l(){Rs=!0}function Ye(e,t){var r={f:0,v:e,reactions:null,equals:Wo,rv:0,wv:0};return m&&Dt&&(r.created=t??Mt("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function H(e,t){let r=Ye(e,t);return ai(r),r}function Zr(e,t=!1,r=!0){var o;let n=Ye(e);return t||(n.equals=Jo),Sr&&r&&M!==null&&M.l!==null&&((o=M.l).s??(o.s=[])).push(n),n}function x(e,t,r=!1){A!==null&&(!Ke||(A.f&131072)!==0)&&Gt()&&(A.f&4325394)!==0&&(kt===null||!kt.has(e))&&nl();let n=r?Xt(t):t;return m&&ei(n,e.label),Ft(e,n,co)}var Jr=null,Ns=0;function Ft(e,t,r=null){if(!e.equals(t)){Et?At.set(e,t):At.has(e)||At.set(e,e.v);var n=pt.ensure();if(n.capture(e,t),m){if(Dt||E!==null){e.updated??(e.updated=new Map);let o=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:o}),Dt||o>5){let i=Mt("updated at");if(i!==null){let s=e.updated.get(i.stack);s||(s={error:i,count:0},e.updated.set(i.stack,s)),s.count++}}}E!==null&&(e.set_during_effect=!0)}if((e.f&2)!==0){let o=e;(e.f&2048)!==0&&so(o),Re===null&&vn(o)}e.wv=$n(),Jr=null,Ns=0,El(e,2048,r),Jr=null,Gt()&&E!==null&&(E.f&1024)!==0&&(E.f&96)===0&&(_t===null?Tl([e]):_t.push(e)),!n.is_fork&&Kr.size>0&&!Rs&&ci()}return t}function ci(){Rs=!1;for(let e of Kr){(e.f&1024)!==0&&K(e,4096);let t;try{t=Or(e)}catch{t=!0}t&&Kt(e)}Kr.clear()}function Qr(e){x(e,e.v+1)}function El(e,t,r){var n=e.reactions;if(n!==null){var o=Gt(),i=n.length;if(Ns+=i,Ns>1e5&&Jr===null&&(Jr=new Set),Jr!==null){if(Jr.has(e))return;Jr.add(e)}for(var s=0;s<i;s++){var l=n[s],c=l.f;if(!(!o&&l===E)){var p=(c&2048)===0;if(p&&K(l,t),(c&131072)!==0)Kr.add(l);else if((c&2)!==0){var _=l;Re?.delete(_),El(_,4096,r)}else if(p){var g=l;(c&16)!==0&&Tt!==null&&Tt.add(g),r!==null?r.push(g):po(g)}}}}}var uc=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Xt(e){if(typeof e!="object"||e===null||He in e||Vo in e)return e;let t=Ur(e);if(t!==is&&t!==Ia)return e;var r=new Map,n=It(e),o=H(0),i=m&&Dt?Mt("created at"):null,s=Ir,l=g=>{if(Ir===s)return g();var b=A,u=Ir;we(null),Cs(s);var h=g();return we(b),Cs(u),h};n&&(r.set("length",H(e.length,i)),m&&(e=pc(e)));var c="";let p=!1;function _(g){if(!p){p=!0,c=g,Be(o,`${c} version`);for(let[b,u]of r)Be(u,en(c,b));p=!1}}return new Proxy(e,{defineProperty(g,b,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&tl();var h=r.get(b);return h===void 0?l(()=>{var y=H(u.value,i);return r.set(b,y),m&&typeof b=="string"&&Be(y,en(c,b)),y}):x(h,u.value,!0),!0},deleteProperty(g,b){var u=r.get(b);if(u===void 0){if(b in g){let h=l(()=>H(Z,i));r.set(b,h),Qr(o),m&&Be(h,en(c,b))}}else x(u,Z),Qr(o);return!0},get(g,b,u){if(b===He)return e;if(m&&b===zo)return _;var h=r.get(b),y=b in g;if(h===void 0&&(!y||lt(g,b)?.writable)&&(h=l(()=>{var k=Xt(y?g[b]:Z),V=H(k,i);return m&&Be(V,en(c,b)),V}),r.set(b,h)),h!==void 0){var w=a(h);return w===Z?void 0:w}return Reflect.get(g,b,u)},getOwnPropertyDescriptor(g,b){this.has?.(g,b);var u=Reflect.getOwnPropertyDescriptor(g,b),h=r.get(b);if(h!==void 0){var y=a(h);if(y===Z)return;if(u&&"value"in u)u.value=y;else return{enumerable:!0,configurable:!0,value:y,writable:!0}}return u},has(g,b){if(b===He)return!0;var u=r.get(b),h=u!==void 0&&u.v!==Z||Reflect.has(g,b);if(u!==void 0||E!==null&&(!h||lt(g,b)?.writable)){u===void 0&&(u=l(()=>{var w=h?Xt(g[b]):Z,k=H(w,i);return m&&Be(k,en(c,b)),k}),r.set(b,u));var y=a(u);if(y===Z)return!1}return h},set(g,b,u,h){var y=r.get(b),w=b in g;if(n&&b==="length")for(var k=u;k<y.v;k+=1){var V=r.get(k+"");V!==void 0?x(V,Z):k in g&&(V=l(()=>H(Z,i)),r.set(k+"",V),m&&Be(V,en(c,k)))}if(y===void 0)(!w||lt(g,b)?.writable)&&(y=l(()=>H(void 0,i)),m&&Be(y,en(c,b)),x(y,Xt(u)),r.set(b,y));else{w=y.v!==Z;var te=l(()=>Xt(u));x(y,te)}var de=Reflect.getOwnPropertyDescriptor(g,b);if(de?.set&&de.set.call(h,u),!w){if(n&&typeof b=="string"){var wt=r.get("length"),ze=Number(b);Number.isInteger(ze)&&ze>=wt.v&&x(wt,ze+1)}Qr(o)}return!0},ownKeys(g){a(o);var b=Reflect.ownKeys(g).filter(y=>{var w=r.get(y);return w===void 0||w.v!==Z});for(var[u,h]of r)h.v!==Z&&!(u in g)&&b.push(u);return b},setPrototypeOf(){rl()}})}function en(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:uc.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function In(e){try{if(e!==null&&typeof e=="object"&&He in e)return e[He]}catch{}return e}function ui(e,t){return Object.is(In(e),In(t))}var dc=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function pc(e){return new Proxy(e,{get(t,r,n){var o=Reflect.get(t,r,n);return dc.has(r)?function(...i){$l();var s=o.apply(this,i);return ci(),s}:o}})}function Al(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:o}=e;e.indexOf=function(i,s){let l=r.call(this,i,s);if(l===-1){for(let c=s??0;c<this.length;c+=1)if(In(this[c])===i){Ko("array.indexOf(...)");break}}return l},e.lastIndexOf=function(i,s){let l=n.call(this,i,s??this.length-1);if(l===-1){for(let c=0;c<=(s??this.length-1);c+=1)if(In(this[c])===i){Ko("array.lastIndexOf(...)");break}}return l},e.includes=function(i,s){let l=o.call(this,i,s);if(!l){for(let c=0;c<this.length;c+=1)if(In(this[c])===i){Ko("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=o}}var Dn,kl,_o,Sl,Nl;function di(){if(Dn===void 0){Dn=window,kl=document,_o=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Sl=lt(t,"firstChild").get,Nl=lt(t,"nextSibling").get,ss(e)&&(e[as]=void 0,e[jo]=null,e[Wn]=void 0,e.__e=void 0),ss(r)&&(r[Xn]=void 0),m&&(e.__svelte_meta=null,Al())}}function fe(e=""){return document.createTextNode(e)}function ae(e){return Sl.call(e)}function ke(e){return Nl.call(e)}function Y(e,t){if(!$)return ae(e);var r=ae(O);if(r===null)r=O.appendChild(fe());else if(t&&r.nodeType!==Yr){var n=fe();return r?.before(n),z(n),n}return t&&ho(r),z(r),r}function Jt(e,t=!1){if(!$){var r=ae(e);return r instanceof Comment&&r.data===""?ke(r):r}if(t){if(O?.nodeType!==Yr){var n=fe();return O?.before(n),z(n),n}ho(O)}return O}function ot(e,t=!1){if(!$)return ae(e);var r=Y(e,t);return P(e),r}function N(e,t=1,r=!1){let n=$?O:e;for(var o;t--;)o=n,n=ke(n);if(!$)return n;if(r){if(n?.nodeType!==Yr){var i=fe();return n===null?o?.after(i):n.before(i),z(i),i}ho(n)}return z(n),n}function oo(e){e.textContent=""}function pi(){if(!ge||Tt!==null)return!1;var e=E.f;return(e&32768)!==0}function Ht(e,t,r){return t==null||t===Go?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function ho(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Yr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}var Os=new WeakMap;function Rl(e){var t=E;if(t===null)return A.f|=8388608,e;if(m&&e instanceof Error&&!Os.has(e)&&Os.set(e,_c(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw m&&!t.parent&&e instanceof Error&&Cl(e),e;et(e,t)}function et(e,t){if(e===Je)throw e;if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw m&&e instanceof Error&&Cl(e),e}}function _c(e,t){let r=lt(e,"message");if(!(r&&!r.configurable)){for(var n=_o?" ":" ",o=`
|
|
70
|
+
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function Vl(){if(b){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Bl(){if(b){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Yl(){if(b){let e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ql(){if(b){let e=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var ke=!1,Vr=!1,qt=!1;var go=null;function Ze(e,t){return e.label=t,Si(e.v,t),e}function Si(e,t){return e?.[bi]?.(t),e}function zt(e){let t=new Error,r=cu();return r.length===0?null:(r.unshift(`
|
|
71
|
+
`),Ie(t,"stack",{value:r.join(`
|
|
72
|
+
`)}),Ie(t,"name",{value:e}),t)}function cu(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];let r=t.split(`
|
|
73
|
+
`),n=[];for(let o=0;o<r.length;o++){let i=r[o],a=i.replaceAll("\\","/");if(i.trim()!=="Error"){if(i.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||n.push(i)}}return n}function jl(e,t){if(!b)throw new Error("invariant(...) was not guarded by if (DEV)");e||Rl(t)}var Y=null;function br(e){Y=e}var or=null;function Cn(e){or=e}var gt=null;function Ri(e){gt=e}function bo(e,t=!1,r){Y={p:Y,i:!1,c:null,e:null,s:e,x:null,r:k,l:Vr&&!t?{s:null,u:null,$:[]}:null},b&&(Y.function=r,gt=r)}function yo(e){var t=Y,r=t.e;if(r!==null){t.e=null;for(var n of r)Us(n)}return e!==void 0&&(t.x=e),t.i=!0,Y=t.p,b&&(gt=Y?.function??null),$o(e)}function $o(e={}){return Ie(e,vi,{value:!0}),e}function ir(){return!Vr||Y!==null&&Y.l===null}var sn=[];function Gl(){var e=sn;sn=[],mi(e)}function $e(e){if(sn.length===0&&!an){var t=sn;queueMicrotask(()=>{t===sn&&Gl()})}sn.push(e)}function Kl(){for(;sn.length>0;)Gl()}var uu=-7169;function ie(e,t){e.f=e.f&uu|t}function On(e){(e.f&512)!==0||e.deps===null?ie(e,1024):ie(e,4096)}function Ni(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),ie(e,1024)}var Zl=!1;function Ci(){Zl||(Zl=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Hr]?.()})},{capture:!0}))}function yt(e){var t=C,r=k;Se(null),Re(null);try{return e()}finally{Se(t),Re(r)}}function Vs(e,t,r,n=r){e.addEventListener(t,()=>yt(r));let o=e[Hr];o?e[Hr]=()=>{o(),n(!0)}:e[Hr]=()=>n(!0),Ci()}function Oi(e,t,r,n){let o=ir()?Ln:Mn;var i=e.filter(_=>!_.settled),a=t.map(o);if(b&&a.forEach((_,y)=>{_.label=t[y].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(g,$)=>$)}),r.length===0&&i.length===0){n(a);return}var l=k,f=Wl(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(_=>_.promise)):null;function v(_){if((l.f&16384)===0){f();try{n([...a,..._])}catch(y){at(y,l)}Dn()}}var h=Bs();if(r.length===0){u.then(()=>v([])).finally(h);return}function m(){Promise.all(r.map(_=>qs(_))).then(v).catch(_=>at(_,l)).finally(h)}u?u.then(()=>{if((l.f&16384)!==0){h();return}f(),m(),Dn()}):m()}function Wl(){var e=k,t=C,r=Y,n=O;if(b)var o=or;return function(a=!0){Re(e),Se(t),br(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply()),b&&(Ys(null),Cn(o))}}var du=!1;function Dn(e=!0){du=!1,Re(null),Se(null),br(null),e&&O?.deactivate(),b&&(Ys(null),Cn(null))}function Bs(){var e=k,t=e.b,r=O,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var lt=null;function Ys(e){lt=e}var Eo=new Set;function Ln(e){var t=2050;k!==null&&(k.f|=524288);let r={ctx:Y,deps:null,effects:null,equals:xi,f:t,fn:e,reactions:null,rv:0,v:le,wv:0,parent:k,ac:null};return b&&qt&&(r.created=zt("created at")),r}var Fn=Symbol("obsolete");function qs(e,t,r){let n=k;n===null&&Cl();var o=void 0,i=Xe(le);b&&(i.label=t??e.toString());var a=!C,l=new Set;return Ql(()=>{var f=k;b&&(lt={effect:f,effect_deps:new Set,warned:!1});var u=hi();o=u.promise;try{Promise.resolve(e()).then(u.resolve,_=>{_!==gr&&u.reject(_)}).finally(Dn)}catch(_){u.reject(_),Dn()}if(b){if(lt){if(f.deps!==null)for(let _=0;_<tt;_+=1)lt.effect_deps.add(f.deps[_]);if(Fe!==null)for(let _=0;_<Fe.length;_+=1)lt.effect_deps.add(Fe[_])}lt=null}var v=O;if(a){if((f.f&32768)!==0)var h=Bs();if(n.b?.is_rendered())v.async_deriveds.get(f)?.reject(Fn);else for(let _ of l.values())_.reject(Fn);l.add(u),v.async_deriveds.set(f,u)}let m=(_,y=void 0)=>{b&&(lt=null),h?.(),l.delete(u),y!==Fn&&(v.activate(),y?(i.f|=8388608,Gt(i,y)):((i.f&8388608)!==0&&(i.f^=8388608),b&&r!==void 0&&!i.equals(_)&&(Eo.add(i),setTimeout(()=>{Eo.has(i)&&(f.f&16384)===0&&(wl(i.label,r),Eo.delete(i))})),Gt(i,_)),v.deactivate())};u.promise.then(m,_=>m(null,_||"unknown"))}),Me(()=>{for(let f of l)f.reject(Fn)}),b&&(i.f|=4194304),new Promise(f=>{function u(v){function h(){v===o?f(i):u(o)}v.then(h,h)}u(o)})}function Ot(e){let t=Ln(e);return ke||Li(t),t}function Mn(e){let t=Ln(e);return t.equals=Ti,t}function Xl(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}var zs=[];function To(e){var t,r=k,n=e.parent;if(!Dt&&n!==null&&e.v!==le&&(n.f&24576)!==0)return xl(),e.v;if(Re(n),b){let o=fn;Ii(new Set);try{vr.call(zs,e)&&Ol(),zs.push(e),Xl(e),t=Di(e)}finally{Re(r),Ii(o),zs.pop()}}else try{Xl(e),t=Di(e)}finally{Re(r)}return t}function js(e){var t=To(e);if(!e.equals(t)&&(e.wv=Pn(),(!O?.is_fork||e.deps===null)&&(O!==null?(O.capture(e,t,!0),It?.capture(e,t,!0)):e.v=t,e.deps===null))){ie(e,1024);return}Dt||(Pe!==null?(Br()||O?.is_fork)&&Pe.set(e,t):On(e))}function Jl(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&yt(()=>{t.ac.abort(gr),t.ac=null}),t.fn!==null&&(t.teardown=er),cn(t,0),ko(t))}function Gs(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&sr(t)}var Mi=null,Hn=null,O=null,It=null,Pe=null,Ws=null,an=!1,Ks=!1,Vn=null,Ro=null,ef=0,Zs=new Set,mu=1,Bn,wr,xr,Yn,qn,zn,Er,jn,ct,No,Tr,Kt,ar,Gn,Yr,J,Xs,Js,Ao,Qs,rf,nf,Un,of,So,Fi=class Fi{constructor(){F(this,J);re(this,"id",mu++);F(this,Bn,!1);re(this,"linked",!0);F(this,wr,null);F(this,xr,null);re(this,"async_deriveds",new Map);re(this,"current",new Map);re(this,"previous",new Map);F(this,Yn,new Set);F(this,qn,new Set);F(this,zn,0);F(this,Er,new Map);F(this,jn,null);F(this,ct,[]);F(this,No,[]);F(this,Tr,new Set);F(this,Kt,new Set);F(this,ar,new Map);F(this,Gn,new Set);re(this,"is_fork",!1);F(this,Yr,!1);Hn===null?Mi=Hn=this:(I(Hn,xr,this),I(this,wr,Hn)),Hn=this}skip_effect(t){c(this,ar).has(t)||c(this,ar).set(t,{d:[],m:[]}),c(this,Gn).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=c(this,ar).get(t);if(n){c(this,ar).delete(t);for(var o of n.d)ie(o,2048),r(o);for(o of n.m)ie(o,4096),r(o)}c(this,Gn).add(t)}capture(t,r,n=!1){t.v!==le&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Pe?.set(t,r)),this.is_fork||(t.v=r)}activate(){O=this}deactivate(){O=null,Pe=null}flush(){try{b&&Zs.clear(),Ks=!0,O=this,L(this,J,Ao).call(this)}finally{if(ef=0,Ws=null,Vn=null,Ro=null,Ks=!1,O=null,Pe=null,Mt.clear(),b)for(let t of Zs)t.updated=null}}discard(){for(let t of c(this,qn))t(this);c(this,qn).clear();for(let t of this.async_deriveds.values())t.reject(Fn);L(this,J,So).call(this),c(this,jn)?.resolve()}register_created_effect(t){c(this,No).push(t)}increment(t,r){if(I(this,zn,c(this,zn)+1),t){let n=c(this,Er).get(r)??0;c(this,Er).set(r,n+1)}}decrement(t,r){if(I(this,zn,c(this,zn)-1),t){let n=c(this,Er).get(r)??0;n===1?c(this,Er).delete(r):c(this,Er).set(r,n-1)}c(this,Yr)||(I(this,Yr,!0),$e(()=>{I(this,Yr,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(let n of t)c(this,Tr).add(n);for(let n of r)c(this,Kt).add(n);t.clear(),r.clear()}oncommit(t){c(this,Yn).add(t)}ondiscard(t){c(this,qn).add(t)}settled(){return(c(this,jn)??I(this,jn,hi())).promise}static ensure(){if(O===null){let t=O=new Fi;!Ks&&!an&&$e(()=>{c(t,Bn)||t.flush()})}return O}apply(){if(!ke||!this.is_fork&&c(this,wr)===null&&c(this,xr)===null){Pe=null;return}Pe=new Map;for(let[r,[n]]of this.current)Pe.set(r,n);for(let r=Mi;r!==null;r=c(r,xr))if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(let[n,[,o]]of r.current)if(!o&&this.current.has(n)){t=!0;break}}if(!t)for(let[n,o]of r.previous)Pe.has(n)||Pe.set(n,o)}}schedule(t){if(Ws=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}c(this,ct).push(t)}};Bn=new WeakMap,wr=new WeakMap,xr=new WeakMap,Yn=new WeakMap,qn=new WeakMap,zn=new WeakMap,Er=new WeakMap,jn=new WeakMap,ct=new WeakMap,No=new WeakMap,Tr=new WeakMap,Kt=new WeakMap,ar=new WeakMap,Gn=new WeakMap,Yr=new WeakMap,J=new WeakSet,Xs=function(){if(this.is_fork)return!0;for(let n of c(this,Er).keys()){for(var t=n,r=!1;t.parent!==null;){if(c(this,ar).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Js=function(){var t=[];for(let i of c(this,ct))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var r=i,n=!1;r.parent!==null;){r=r.parent;var o=r.f;if((o&96)!==0){if((o&1024)===0){n=!0;break}r.f^=1024}}n||t.push(r)}return I(this,ct,[]),t},Ao=function(){var l,f,u;if(I(this,Bn,!0),b)for(let v of this.current.keys())Zs.add(v);for(let v of c(this,Tr))c(this,Kt).delete(v),ie(v,2048),this.schedule(v);for(let v of c(this,Kt))ie(v,4096),this.schedule(v);this.apply();for(var t=Vn=[],r=[],n=Ro=[];c(this,ct).length>0;){ef++>1e3&&(L(this,J,So).call(this),hu());for(let v of L(this,J,Js).call(this))try{L(this,J,Qs).call(this,v,t,r)}catch(h){throw lf(v),L(this,J,Xs).call(this)||this.discard(),h}}if(O=null,n.length>0){var o=Fi.ensure();for(let v of n)o.schedule(v)}if(Vn=null,Ro=null,L(this,J,Xs).call(this)){L(this,J,Un).call(this,r),L(this,J,Un).call(this,t);for(let[v,h]of c(this,ar))af(v,h);n.length>0&&L(l=O,J,Ao).call(l);return}let i=L(this,J,rf).call(this);if(i){L(this,J,Un).call(this,r),L(this,J,Un).call(this,t),L(f=i,J,nf).call(f,this);return}c(this,Tr).clear(),c(this,Kt).clear();for(let v of c(this,Yn))v(this);c(this,Yn).clear(),It=this,tf(r),tf(t),It=null,c(this,jn)?.resolve();var a=O;if(c(this,zn)===0&&(c(this,ct).length===0||a!==null)&&(L(this,J,So).call(this),ke&&(L(this,J,of).call(this),O=a)),c(this,ct).length>0)if(a!==null){for(let v of c(this,ct))c(a,ct).push(v);I(this,ct,[])}else a=this;a!==null&&(Mt.clear(),L(u=a,J,Ao).call(u))},Qs=function(t,r,n){t.f^=1024;for(var o=t.first;o!==null;){var i=o.f,a=(i&96)!==0,l=a&&(i&1024)!==0,f=l||(i&8192)!==0||c(this,ar).has(o);if(!f&&o.fn!==null){a?o.f^=1024:(i&4)!==0?r.push(o):ke&&(i&16777224)!==0?n.push(o):zr(o)&&((i&16)!==0&&c(this,Kt).add(o),sr(o));var u=o.first;if(u!==null){o=u;continue}}for(;o!==null;){var v=o.next;if(v!==null){o=v;break}o=o.parent}}},rf=function(){for(var t=c(this,wr);t!==null;){if(!t.is_fork){for(let[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=c(t,wr)}return null},nf=function(t){var n;for(let[o,i]of t.current)!this.previous.has(o)&&t.previous.has(o)&&this.previous.set(o,t.previous.get(o)),this.current.set(o,i);for(let[o,i]of t.async_deriveds){let a=this.async_deriveds.get(o);a&&i.promise.then(a.resolve).catch(a.reject)}t.async_deriveds.clear(),this.transfer_effects(c(t,Tr),c(t,Kt));let r=o=>{var i=o.reactions;if(i!==null&&!((o.f&2)!==0&&(o.f&6144)===0))for(let f of i){var a=f.f;if((a&2)!==0)r(f);else{var l=f;a&4194320&&!this.async_deriveds.has(l)&&(c(this,Kt).delete(l),ie(l,2048),this.schedule(l))}}};for(let o of this.current.keys())r(o);this.oncommit(()=>t.discard()),L(n=t,J,So).call(n),O=this,L(this,J,Ao).call(this)},Un=function(t){for(var r=0;r<t.length;r+=1)Ni(t[r],c(this,Tr),c(this,Kt))},of=function(){var h,m;for(let _=Mi;_!==null;_=c(_,xr)){var t=_.id<this.id,r=[];for(let[y,[g,$]]of this.current){if(_.current.has(y)){var n=_.current.get(y)[0];if(t&&g!==n)_.current.set(y,[g,$]);else continue}r.push(y)}if(t)for(let[y,g]of this.async_deriveds){let $=_.async_deriveds.get(y);$&&g.promise.then($.resolve).catch($.reject)}var o=[..._.current.keys()].filter(y=>!_.current.get(y)[1]);if(!(!c(_,Bn)||o.length===0)){var i=o.filter(y=>!this.current.has(y));if(i.length===0)t&&_.discard();else if(r.length>0){if(b&&!c(_,Yr)&&jl(c(_,ct).length===0,"Batch has scheduled effects"),t)for(let y of c(this,Gn))_.unskip_effect(y,g=>{var $;(g.f&4194320)!==0?_.schedule(g):L($=_,J,Un).call($,[g])});_.activate();var a=new Set,l=new Map;for(var f of r)sf(f,i,a,l);l=new Map;var u=[..._.current].filter(([y,g])=>{let $=this.current.get(y);return $?$[0]!==g[0]||$[1]!==g[1]:!0}).map(([y])=>y);if(u.length>0)for(let y of c(this,No))(y.f&155648)===0&&ea(y,u,l)&&((y.f&4194320)!==0?(ie(y,2048),_.schedule(y)):c(_,Tr).add(y));if(c(_,ct).length>0&&!c(_,Yr)){_.apply();for(var v of L(h=_,J,Js).call(h))L(m=_,J,Qs).call(m,v,[],[])}_.deactivate()}}}},So=function(){if(this.linked){var t=c(this,wr),r=c(this,xr);t===null?Mi=r:I(t,xr,r),r===null?Hn=t:I(r,wr,t),this.linked=!1}};var $t=Fi;function qr(e){var t=an,r=It;It=null,an=!0;try{var n;for(e&&(qr(),n=e());;){if(Kl(),O===null)return n;O.flush()}}finally{an=t,It=r}}function hu(){if(b){var e=new Map;for(let r of O.current.keys())for(let[n,o]of r.updated??[]){var t=e.get(n);t||(t={error:o.error,count:0},e.set(n,t)),t.count+=o.count}for(let r of e.values())r.error&&console.error(r.error)}try{Fl()}catch(r){b&&Ie(r,"stack",{value:""}),at(r,Ws)}}var Lt=null;function tf(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&zr(n)&&(Lt=new Set,sr(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&ta(n),Lt?.size>0)){Mt.clear();for(let o of Lt){if((o.f&24576)!==0)continue;let i=[o],a=o.parent;for(;a!==null;)Lt.has(a)&&(Lt.delete(a),i.push(a)),a=a.parent;for(let l=i.length-1;l>=0;l--){let f=i[l];(f.f&24576)===0&&sr(f)}}Lt.clear()}}Lt=null}}function sf(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(let o of e.reactions){let i=o.f;(i&2)!==0?sf(o,t,r,n):(i&4194320)!==0&&(i&2048)===0&&ea(o,t,n)&&(ie(o,2048),Co(o))}}function ea(e,t,r){let n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(let o of e.deps){if(vr.call(t,o))return!0;if((o.f&2)!==0&&ea(o,t,r))return r.set(o,!0),!0}return r.set(e,!1),!1}function Co(e){O.schedule(e)}function af(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),ie(e,1024);for(var r=e.first;r!==null;)af(r,t),r=r.next}}function lf(e){ie(e,1024);for(var t=e.first;t!==null;)lf(t),t=t.next}var fn=new Set,Mt=new Map;function Ii(e){fn=e}var na=!1;function cf(){na=!0}function Xe(e,t){var r={f:0,v:e,reactions:null,equals:xi,rv:0,wv:0};return b&&qt&&(r.created=t??zt("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function q(e,t){let r=Xe(e,t);return Li(r),r}function pn(e,t=!1,r=!0){var o;let n=Xe(e);return t||(n.equals=Ti),Vr&&r&&Y!==null&&Y.l!==null&&((o=Y.l).s??(o.s=[])).push(n),n}function E(e,t,r=!1){C!==null&&(!rt||(C.f&131072)!==0)&&ir()&&(C.f&4325394)!==0&&(Ft===null||!Ft.has(e))&&Yl();let n=r?Zt(t):t;return b&&Si(n,e.label),Gt(e,n,Ro)}var dn=null,ra=0;function Gt(e,t,r=null){if(!e.equals(t)){Dt?Mt.set(e,t):Mt.has(e)||Mt.set(e,e.v);var n=$t.ensure();if(n.capture(e,t),b){if(qt||k!==null){e.updated??(e.updated=new Map);let o=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:o}),qt||o>5){let i=zt("updated at");if(i!==null){let a=e.updated.get(i.stack);a||(a={error:i,count:0},e.updated.set(i.stack,a)),a.count++}}}k!==null&&(e.set_during_effect=!0)}if((e.f&2)!==0){let o=e;(e.f&2048)!==0&&To(o),Pe===null&&On(o)}e.wv=Pn(),dn=null,ra=0,uf(e,2048,r),dn=null,ir()&&k!==null&&(k.f&1024)!==0&&(k.f&96)===0&&(wt===null?df([e]):wt.push(e)),!n.is_fork&&fn.size>0&&!na&&Pi()}return t}function Pi(){na=!1;for(let e of fn){(e.f&1024)!==0&&ie(e,4096);let t;try{t=zr(e)}catch{t=!0}t&&sr(e)}fn.clear()}function _n(e){E(e,e.v+1)}function uf(e,t,r){var n=e.reactions;if(n!==null){var o=ir(),i=n.length;if(ra+=i,ra>1e5&&dn===null&&(dn=new Set),dn!==null){if(dn.has(e))return;dn.add(e)}for(var a=0;a<i;a++){var l=n[a],f=l.f;if(!(!o&&l===k)){var u=(f&2048)===0;if(u&&ie(l,t),(f&131072)!==0)fn.add(l);else if((f&2)!==0){var v=l;Pe?.delete(v),uf(v,4096,r)}else if(u){var h=l;(f&16)!==0&&Lt!==null&&Lt.add(h),r!==null?r.push(h):Co(h)}}}}}var gu=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Zt(e){if(typeof e!="object"||e===null||Ke in e||vi in e)return e;let t=rn(e);if(t!==Os&&t!==bl)return e;var r=new Map,n=Yt(e),o=q(0),i=b&&qt?zt("created at"):null,a=jr,l=h=>{if(jr===a)return h();var m=C,_=jr;Se(null),oa(a);var y=h();return Se(m),oa(_),y};n&&(r.set("length",q(e.length,i)),b&&(e=yu(e)));var f="";let u=!1;function v(h){if(!u){u=!0,f=h,Ze(o,`${f} version`);for(let[m,_]of r)Ze(_,mn(f,m));u=!1}}return new Proxy(e,{defineProperty(h,m,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&Vl();var y=r.get(m);return y===void 0?l(()=>{var g=q(_.value,i);return r.set(m,g),b&&typeof m=="string"&&Ze(g,mn(f,m)),g}):E(y,_.value,!0),!0},deleteProperty(h,m){var _=r.get(m);if(_===void 0){if(m in h){let y=l(()=>q(le,i));r.set(m,y),_n(o),b&&Ze(y,mn(f,m))}}else E(_,le),_n(o);return!0},get(h,m,_){if(m===Ke)return e;if(b&&m===bi)return v;var y=r.get(m),g=m in h;if(y===void 0&&(!g||ht(h,m)?.writable)&&(y=l(()=>{var A=Zt(g?h[m]:le),K=q(A,i);return b&&Ze(K,mn(f,m)),K}),r.set(m,y)),y!==void 0){var $=s(y);return $===le?void 0:$}return Reflect.get(h,m,_)},getOwnPropertyDescriptor(h,m){this.has?.(h,m);var _=Reflect.getOwnPropertyDescriptor(h,m),y=r.get(m);if(y!==void 0){var g=s(y);if(g===le)return;if(_&&"value"in _)_.value=g;else return{enumerable:!0,configurable:!0,value:g,writable:!0}}return _},has(h,m){if(m===Ke)return!0;var _=r.get(m),y=_!==void 0&&_.v!==le||Reflect.has(h,m);if(_!==void 0||k!==null&&(!y||ht(h,m)?.writable)){_===void 0&&(_=l(()=>{var $=y?Zt(h[m]):le,A=q($,i);return b&&Ze(A,mn(f,m)),A}),r.set(m,_));var g=s(_);if(g===le)return!1}return y},set(h,m,_,y){var g=r.get(m),$=m in h;if(n&&m==="length")for(var A=_;A<g.v;A+=1){var K=r.get(A+"");K!==void 0?E(K,le):A in h&&(K=l(()=>q(le,i)),r.set(A+"",K),b&&Ze(K,mn(f,A)))}if(g===void 0)(!$||ht(h,m)?.writable)&&(g=l(()=>q(void 0,i)),b&&Ze(g,mn(f,m)),E(g,Zt(_)),r.set(m,g));else{$=g.v!==le;var pe=l(()=>Zt(_));E(g,pe)}var xe=Reflect.getOwnPropertyDescriptor(h,m);if(xe?.set&&xe.set.call(y,_),!$){if(n&&typeof m=="string"){var pt=r.get("length"),Ue=Number(m);Number.isInteger(Ue)&&Ue>=pt.v&&E(pt,Ue+1)}_n(o)}return!0},ownKeys(h){s(o);var m=Reflect.ownKeys(h).filter(g=>{var $=r.get(g);return $===void 0||$.v!==le});for(var[_,y]of r)y.v!==le&&!(_ in h)&&m.push(_);return m},setPrototypeOf(){Bl()}})}function mn(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:gu.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Kn(e){try{if(e!==null&&typeof e=="object"&&Ke in e)return e[Ke]}catch{}return e}function Hi(e,t){return Object.is(Kn(e),Kn(t))}var bu=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function yu(e){return new Proxy(e,{get(t,r,n){var o=Reflect.get(t,r,n);return bu.has(r)?function(...i){cf();var a=o.apply(this,i);return Pi(),a}:o}})}function pf(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:o}=e;e.indexOf=function(i,a){let l=r.call(this,i,a);if(l===-1){for(let f=a??0;f<this.length;f+=1)if(Kn(this[f])===i){wi("array.indexOf(...)");break}}return l},e.lastIndexOf=function(i,a){let l=n.call(this,i,a??this.length-1);if(l===-1){for(let f=0;f<=(a??this.length-1);f+=1)if(Kn(this[f])===i){wi("array.lastIndexOf(...)");break}}return l},e.includes=function(i,a){let l=o.call(this,i,a);if(!l){for(let f=0;f<this.length;f+=1)if(Kn(this[f])===i){wi("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=o}}var hn,_f,Oo,mf,hf;function Ui(){if(hn===void 0){hn=window,_f=document,Oo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;mf=ht(t,"firstChild").get,hf=ht(t,"nextSibling").get,Is(e)&&(e[Ds]=void 0,e[yi]=null,e[po]=void 0,e.__e=void 0),Is(r)&&(r[_o]=void 0),b&&(e.__svelte_meta=null,pf())}}function be(e=""){return document.createTextNode(e)}function ve(e){return mf.call(e)}function Le(e){return hf.call(e)}function W(e,t){if(!T)return ve(e);var r=ve(M);if(r===null)r=M.appendChild(be());else if(t&&r.nodeType!==nn){var n=be();return r?.before(n),ne(n),n}return t&&Io(r),ne(r),r}function xt(e,t=!1){if(!T){var r=ve(e);return r instanceof Comment&&r.data===""?Le(r):r}if(t){if(M?.nodeType!==nn){var n=be();return M?.before(n),ne(n),n}Io(M)}return M}function H(e,t=!1){if(!T)return ve(e);var r=W(e,t);return B(e),r}function S(e,t=1,r=!1){let n=T?M:e;for(var o;t--;)o=n,n=Le(n);if(!T)return n;if(r){if(n?.nodeType!==nn){var i=be();return n===null?o?.after(i):n.before(i),ne(i),i}Io(n)}return ne(n),n}function xo(e){e.textContent=""}function Vi(){if(!ke||Lt!==null)return!1;var e=k.f;return(e&32768)!==0}function Wt(e,t,r){return t==null||t===$i?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Io(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===nn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}var ia=new WeakMap;function vf(e){var t=k;if(t===null)return C.f|=8388608,e;if(b&&e instanceof Error&&!ia.has(e)&&ia.set(e,$u(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw b&&!t.parent&&e instanceof Error&&gf(e),e;at(e,t)}function at(e,t){if(e===ot)throw e;if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw b&&e instanceof Error&&gf(e),e}}function $u(e,t){let r=ht(e,"message");if(!(r&&!r.configurable)){for(var n=Oo?" ":" ",o=`
|
|
74
74
|
${n}in ${t.fn?.name||"<unknown>"}`,i=t.ctx;i!==null;)o+=`
|
|
75
|
-
${n}in ${i.function?.[
|
|
75
|
+
${n}in ${i.function?.[it].split("/").pop()}`,i=i.p;return{message:e.message+`
|
|
76
76
|
${o}
|
|
77
77
|
`,stack:e.stack?.split(`
|
|
78
|
-
`).filter(
|
|
79
|
-
`)}}}function Cl(e){let t=Os.get(e);t&&(Te(e,"message",{value:t.message}),Te(e,"stack",{value:t.stack}))}function Il(e){E===null&&(A===null&&Xa(e),Wa()),Et&&Ka(e)}function mc(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Zt(e,t){var r=E;if(m)for(;r!==null&&(r.f&131072)!==0;)r=r.parent;r!==null&&(r.f&8192)!==0&&(e|=8192);var n={ctx:M,deps:null,nodes:null,f:e|2048|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};m&&(n.component_function=ct),S?.register_created_effect(n);var o=n;if((e&4)!==0)An!==null?An.push(n):pt.ensure().schedule(n);else if(t!==null){try{Kt(n)}catch(s){throw le(n),s}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&524288)===0&&(o=o.first,(e&16)!==0&&(e&65536)!==0&&o!==null&&(o.f|=65536))}if(o!==null&&(o.parent=r,r!==null&&mc(o,r),A!==null&&(A.f&2)!==0&&(e&64)===0)){var i=A;(i.effects??(i.effects=[])).push(o)}return n}function Nr(){return A!==null&&!Ke}function Se(e){let t=Zt(8,null);return K(t,1024),t.teardown=e,t}function Qt(e){Il("$effect"),m&&Te(e,"name",{value:"$effect"});var t=E.f,r=!A&&(t&32)!==0&&M!==null&&!M.i;if(r){var n=M;(n.e??(n.e=[])).push(e)}else return ps(e)}function ps(e){return Zt(1048580,e)}function Ms(e){pt.ensure();let t=Zt(524352,e);return()=>{le(t)}}function Dl(e){pt.ensure();let t=Zt(524352,e);return(r={})=>new Promise(n=>{r.outro?er(t,()=>{le(t),n(void 0)}):(le(t),n(void 0))})}function ht(e){return Zt(4,e)}function pl(e){return Zt(4718592,e)}function Ce(e,t=0){return Zt(8|t,e)}function oe(e,t=[],r=[],n=[]){oi(n,t,r,o=>{Zt(8,()=>{e(...o.map(a))})})}function st(e,t=0){var r=Zt(16|t,e);return m&&(r.dev_stack=jt),r}function xe(e){return Zt(524320,e)}function Ls(e){var t=e.teardown;if(t!==null){let r=Et,n=A;Is(!0),we(null);try{t.call(null)}catch(o){et(o,e.parent)}finally{Is(r),we(n)}}}function ao(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){let o=r.ac;o!==null&&dt(()=>{o.abort(lr)});var n=r.next;(r.f&64)!==0?r.parent=null:le(r,t),r=n}}function Ml(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&le(t),t=r}}function le(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Fs(e.nodes.start,e.nodes.end),r=!0),e.f|=33554432,ao(e,t&&!r),Wr(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(let i of n)i.stop();Ls(e),e.f^=33554432,e.f|=16384;var o=e.parent;o!==null&&o.first!==null&&Ss(e),m&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Fs(e,t){for(;e!==null;){var r=e===t?null:ke(e);e.remove(),e=r}}function Ss(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function er(e,t,r=!0){var n=[];e.f|=256,Ll(e,n,!0);var o=()=>{r&&le(e),t&&t()},i=n.length;if(i>0){var s=()=>--i||o();for(var l of n)l.out(s)}else o()}function Ll(e,t,r){if((e.f&8192)===0){e.f^=8192;var n=e.nodes&&e.nodes.t;if(n!==null)for(let l of n)(l.is_global||r)&&t.push(l);for(var o=e.first;o!==null;){var i=o.next;if((o.f&64)===0){var s=(o.f&65536)!==0||(o.f&32)!==0&&(e.f&16)!==0;Ll(o,t,s?r:!1)}o=i}}}function Mn(e){e.f&=-257,Fl(e,!0)}function Fl(e,t){if((e.f&256)===0&&(e.f&8192)!==0){e.f^=8192,(e.f&1024)===0&&(K(e,2048),pt.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,o=(r.f&65536)!==0||(r.f&32)!==0;Fl(r,o?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(let s of i)(s.is_global||t)&&s.in()}}function Ln(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var o=r===n?null:ke(r);t.append(r),r=o}}var Pl=null;var Et=!1;function Is(e){Et=e}var A=null,Ke=!1;function we(e){A=e}var E=null;function ye(e){E=e}var kt=null;function ai(e){A!==null&&(!ge&&(A.f&2097152)!==0||(A.f&2)!==0)&&(kt??(kt=new Set)).add(e)}var Ne=null,Ge=0,_t=null;function Tl(e){_t=e}var Bl=1,tn=0,Ir=tn;function Cs(e){Ir=e}function $n(){return++Bl}function Or(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,n=r.length,o=0;o<n;o++){var i=r[o];if(Or(i)&&bs(i),i.wv>e.wv)return!0}(t&512)!==0&&Re===null&&K(e,1024)}return!1}function Ul(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!ge&&kt!==null&&kt.has(e)))for(var o=0;o<n.length;o++){var i=n[o];(i.f&2)!==0?Ul(i,t,!1):t===i&&(r?K(i,2048):(i.f&1024)!==0&&K(i,4096),po(i))}}function si(e){var t=Ne,r=Ge,n=_t,o=A,i=kt,s=M,l=Ke,c=Ir,p=e.f;Ne=null,Ge=0,_t=null,A=(p&96)===0?e:null,kt=null,fr(e.ctx),Ke=!1,Ir=++tn,e.ac!==null&&(dt(()=>{e.ac.abort(lr)}),e.ac=null);try{e.f|=2097152;var _=e.fn,g=_();e.f|=32768;var b=Hl(e);if(Gt()&&_t!==null&&!Ke&&b!==null&&(e.f&6146)===0)for(var u=0;u<_t.length;u++)Ul(_t[u],e);if(o!==null&&o!==e){if(tn++,o.deps!==null)for(let h=0;h<r;h+=1)o.deps[h].rv=tn;if(t!==null)for(let h of t)h.rv=tn;_t!==null&&(n===null?n=_t:n.push(..._t))}return(e.f&8388608)!==0&&(e.f^=8388608),g}catch(h){return Hl(e),Rl(h)}finally{e.f^=2097152,Ne=t,Ge=r,_t=n,A=o,kt=i,fr(s),Ke=l,Ir=c}}function Hl(e){var o;var t=e.deps,r=S?.is_fork;if(Ne!==null){var n;if(r||Wr(e,Ge),t!==null&&Ge>0)for(t.length=Ge+Ne.length,n=0;n<Ne.length;n++)t[Ge+n]=Ne[n];else e.deps=t=Ne;if(Nr()&&(e.f&512)!==0)for(n=Ge;n<t.length;n++)((o=t[n]).reactions??(o.reactions=[])).push(e)}else!r&&t!==null&&Ge<t.length&&(Wr(e,Ge),t.length=Ge);return t}function vc(e,t){let r=t.reactions;if(r!==null){var n=Oa.call(r,e);if(n!==-1){var o=r.length-1;o===0?r=t.reactions=null:(r[n]=r[o],r.pop())}}if(r===null&&(t.f&2)!==0&&(Ne===null||!ar.call(Ne,t))){var i=t;(i.f&512)!==0&&(i.f^=512),i.v!==Z&&vn(i),i.ac!==null&&dt(()=>{i.ac.abort(lr),i.ac=null,K(i,2048)}),dl(i),Wr(i,0)}}function Wr(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)vc(e,r[n])}function Kt(e){var t=e.f;if((t&16384)===0){K(e,1024);var r=E;if(E=e,m){var n=ct;ti(e.component_function);var o=jt;mn(e.dev_stack??jt)}try{(t&16777232)!==0?Ml(e):ao(e),Ls(e);var i=si(e);if(e.teardown=typeof i=="function"?i:null,e.wv=Bl,m&&Dt&&(e.f&2048)!==0&&e.deps!==null)for(var s of e.deps)s.set_during_effect&&(s.wv=$n(),s.set_during_effect=!1)}finally{E=r,m&&(ti(n),mn(o))}}}async function rn(){if(ge)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),Cr()}function a(e){var t=e.f,r=(t&2)!==0;if(Pl?.add(e),A!==null&&!Ke){var n=E!==null&&(E.f&16384)!==0;if(!n&&(kt===null||!kt.has(e))){var o=A.deps;if((A.f&2097152)!==0)e.rv<tn&&(e.rv=tn,Ne===null&&o!==null&&o[Ge]===e?Ge++:Ne===null?Ne=[e]:Ne.push(e));else{A.deps??(A.deps=[]),ar.call(A.deps,e)||A.deps.push(e);var i=e.reactions;i===null?e.reactions=[A]:ar.call(i,A)||i.push(A)}}}if(m){if(!Ke&&tt&&S===null&&$t===null&&!tt.warned&&(tt.effect.f&2097152)===0&&!tt.effect_deps.has(e)){tt.warned=!0,Ma(e.label);var s=Mt("traced at");s&&console.warn(s)}if(io.delete(e),Dt&&!Ke&&Qn!==null&&A!==null&&Qn.reaction===A){if(e.trace)e.trace();else if(s=Mt("traced at"),s){var l=Qn.entries.get(e);l===void 0&&(l={traces:[]},Qn.entries.set(e,l));var c=l.traces[l.traces.length-1];s.stack!==c?.stack&&l.traces.push(s)}}}if(Et&&At.has(e))return At.get(e);if(r){var p=e;if(Et){var _=p.v;return((p.f&1024)===0&&p.reactions!==null||Vl(p))&&(_=so(p)),At.set(p,_),_}var g=(p.f&512)===0&&!Ke&&A!==null&&(A.f&512)!==0,b=(p.f&32768)===0;Or(p)&&(g&&(p.f|=512),bs(p)),g&&!b&&(ws(p),Yl(p))}if(Re?.has(e))return Re.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function Yl(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:ar.call(t,e)||t.push(e),(r.f&2)!==0&&(r.f&512)===0&&(ws(r),Yl(r))}}function Vl(e){if(e.v===Z)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(At.has(t)||(t.f&2)!==0&&Vl(t))return!0;return!1}function X(e){var t=Ke;try{return Ke=!0,e()}finally{Ke=t}}function hi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(He in e)_i(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&He in r&&_i(r)}}}function _i(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{_i(e[n],t)}catch{}let r=Ur(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=Bo(r);for(let o in n){let i=n[o].get;if(i)try{i.call(e)}catch{}}}}}var bc=/\r/g;function ql(e){e=e.replace(bc,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}var wc=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var Ah=[...wc,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var yc=["touchstart","touchmove"];function zl(e){return yc.includes(e)}var xc=["$state","$state.raw","$derived","$derived.by"],kh=[...xc,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function mi(e){return e?.replace(/\//g,"/\u200B")}var nn=Symbol("events"),Bs=new Set,vi=new Set;function Gl(e,t,r,n={}){function o(i){if(n.capture||bi.call(t,i),!i.cancelBubble)return dt(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?(o.__removed=!1,pe(()=>{o.__removed||t.addEventListener(e,o,n)})):t.addEventListener(e,o,n),o}function gr(e,t,r,n,o){var i={capture:n,passive:o},s=Gl(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Se(()=>{s.__removed=!0,t.removeEventListener(e,s,i)})}function Oe(e,t,r){(t[nn]??(t[nn]={}))[e]=r}function gi(e){for(var t=0;t<e.length;t++)Bs.add(e[t]);for(var r of vi)r(e)}var Ps=null,Hs=!1;function bi(e){var t=this,r=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;Ps=e,Hs||(Hs=!0,setTimeout(()=>{Hs=!1,Ps=null}));var s=0,l=Ps===e&&e[nn];if(l){var c=o.indexOf(l);if(c!==-1&&(t===document||t===window)){e[nn]=t;return}var p=o.indexOf(t);if(p===-1)return;c<=p&&(s=c)}if(i=o[s]||e.target,i!==t){Te(e,"currentTarget",{configurable:!0,get(){return i||r}});var _=A,g=E;we(null),ye(null);try{for(var b,u=[];i!==null&&i!==t;){try{var h=i[nn]?.[n];h!=null&&(!i.disabled||e.target===i)&&h.call(i,e)}catch(y){b?u.push(y):b=y}if(e.cancelBubble)break;s++,i=s<o.length?o[s]:null}if(b){for(let y of u)queueMicrotask(()=>{throw y});throw b}}finally{e[nn]=t,delete e.currentTarget,we(_),ye(g)}}}var Ec=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Kl(e){return Ec?.createHTML(e)??e}function Us(e){var t=Ht("template");return t.innerHTML=Kl(e.replaceAll("<!>","<!---->")),t.content}function Ve(e,t){var r=E;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function ce(e,t){var r=(t&1)!==0,n=(t&2)!==0,o,i=!e.startsWith("<!>");return()=>{if($)return Ve(O,null),O;o===void 0&&(o=Us(i?e:"<!>"+e),r||(o=ae(o)));var s=n||_o?document.importNode(o,!0):o.cloneNode(!0);if(r){var l=ae(s),c=s.lastChild;Ve(l,c)}else Ve(s,s);return s}}function vo(e=""){if(!$){var t=fe(e+"");return Ve(t,t),t}var r=O;return r.nodeType!==Yr?(r.before(r=fe()),z(r)):ho(r),Ve(r,r),r}function Fn(){if($)return Ve(O,null),O;var e=document.createDocumentFragment(),t=document.createComment(""),r=fe();return e.append(t,r),Ve(t,r),e}function U(e,t){if($){var r=E;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=O),Ae();return}e!==null&&e.before(t)}function Wl(e){let t=0,r=Ye(0),n;return m&&Be(r,"createSubscriber version"),()=>{Nr()&&(a(r),Ce(()=>(t===0&&(n=X(()=>e(()=>Qr(r)))),t+=1,()=>{pe(()=>{t-=1,t===0&&(n?.(),n=void 0,Qr(r))})})))}}var Sc=589824;function Gs(e,t,r,n){new Ys(e,t,r,n)}var mt,bo,St,on,qe,vt,We,gt,tr,sn,Mr,Pn,wo,yo,rr,yi,F,Jl,Zl,Vs,Dr,Ql,qs,go,wi,zs,js,Ys=class{constructor(t,r,n,o){I(this,F);q(this,"parent");q(this,"is_pending",!1);q(this,"transform_error");I(this,mt);I(this,bo,$?O:null);I(this,St);I(this,on);I(this,qe);I(this,vt,null);I(this,We,null);I(this,gt,null);I(this,tr,null);I(this,sn,0);I(this,Mr,0);I(this,Pn,!1);I(this,wo,new Set);I(this,yo,new Set);I(this,rr,null);I(this,yi,Wl(()=>(R(this,rr,Ye(f(this,sn))),m&&Be(f(this,rr),"$effect.pending()"),()=>{R(this,rr,null)})));R(this,mt,t),R(this,St,r),R(this,on,i=>{var s=E;s.b=this,s.f|=128,n(i)}),this.parent=E.b,this.transform_error=o??this.parent?.transform_error??(i=>i),R(this,qe,st(()=>{if($){let i=qr(f(this,bo));Ae();let s=i==="[!";if(i.startsWith("[?")){let c=JSON.parse(i.slice("[?".length));C(this,F,Zl).call(this,c)}else s?C(this,F,Ql).call(this):C(this,F,Jl).call(this)}else C(this,F,qs).call(this)},Sc)),$&&R(this,mt,O)}defer_effect(t){ri(t,f(this,wo),f(this,yo))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,St).pending}update_pending_count(t,r){C(this,F,zs).call(this,t,r),R(this,sn,f(this,sn)+t),!(!f(this,rr)||f(this,Pn))&&(R(this,Pn,!0),pe(()=>{R(this,Pn,!1),f(this,rr)&&Ft(f(this,rr),f(this,sn))}))}get_effect_pending(){return f(this,yi).call(this),a(f(this,rr))}error(t){if(t===Je||!f(this,St).onerror&&!f(this,St).failed)throw t;S?.is_fork?(f(this,vt)&&S.skip_effect(f(this,vt)),f(this,We)&&S.skip_effect(f(this,We)),f(this,gt)&&S.skip_effect(f(this,gt)),S.oncommit(()=>{C(this,F,Dr).call(this)||C(this,F,js).call(this,t)})):C(this,F,js).call(this,t)}};mt=new WeakMap,bo=new WeakMap,St=new WeakMap,on=new WeakMap,qe=new WeakMap,vt=new WeakMap,We=new WeakMap,gt=new WeakMap,tr=new WeakMap,sn=new WeakMap,Mr=new WeakMap,Pn=new WeakMap,wo=new WeakMap,yo=new WeakMap,rr=new WeakMap,yi=new WeakMap,F=new WeakSet,Jl=function(){try{R(this,vt,xe(()=>f(this,on).call(this,f(this,mt))))}catch(t){this.error(t)}},Zl=function(t){let r=f(this,St).failed,{reset:n,invoke_onerror:o}=C(this,F,Vs).call(this,t);pe(o),r&&R(this,gt,xe(()=>{r(f(this,mt),()=>t,()=>n)}))},Vs=function(t){var r=!1,n=!1;let o=()=>{if(!C(this,F,Dr).call(this)){if(r){Ya();return}r=!0,n&&ol(),f(this,gt)!==null&&er(f(this,gt),()=>{R(this,gt,null)}),C(this,F,wi).call(this,()=>{C(this,F,qs).call(this)})}};return{reset:o,invoke_onerror:()=>{if(!C(this,F,Dr).call(this))try{n=!0,f(this,St).onerror?.(t,o),n=!1}catch(s){et(s,f(this,qe)&&f(this,qe).parent)}}}},Dr=function(){return(f(this,qe).f&33570816)!==0},Ql=function(){let t=f(this,St).pending;t&&(this.is_pending=!0,R(this,We,xe(()=>t(f(this,mt)))),pe(()=>{if(!C(this,F,Dr).call(this)){var r=R(this,tr,document.createDocumentFragment()),n=fe(),o=!1;if(r.append(n),R(this,vt,C(this,F,wi).call(this,()=>{try{return xe(()=>f(this,on).call(this,n))}catch(i){try{this.error(i),o=!0}catch(s){et(s,f(this,qe).parent)}return null}})),f(this,vt)===null){R(this,tr,null),o&&C(this,F,go).call(this,S);return}f(this,Mr)===0&&(f(this,mt).before(r),R(this,tr,null),er(f(this,We),()=>{R(this,We,null)}),C(this,F,go).call(this,S))}}))},qs=function(){try{if(this.is_pending=this.has_pending_snippet(),R(this,Mr,0),R(this,sn,0),R(this,vt,xe(()=>{f(this,on).call(this,f(this,mt))})),f(this,Mr)>0){var t=R(this,tr,document.createDocumentFragment());Ln(f(this,vt),t);let r=f(this,St).pending;R(this,We,xe(()=>r(f(this,mt))))}else C(this,F,go).call(this,S)}catch(r){this.error(r)}},go=function(t){this.is_pending=!1,t.transfer_effects(f(this,wo),f(this,yo))},wi=function(t){var r=E,n=A,o=M;ye(f(this,qe)),we(f(this,qe)),fr(f(this,qe).ctx);try{return pt.ensure(),t()}finally{ye(r),we(n),fr(o)}},zs=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&C(n=this.parent,F,zs).call(n,t,r);return}R(this,Mr,f(this,Mr)+t),f(this,Mr)===0&&(C(this,F,go).call(this,r),f(this,We)&&er(f(this,We),()=>{R(this,We,null)}),f(this,tr)&&(f(this,mt).before(f(this,tr)),R(this,tr,null)))},js=function(t){f(this,vt)&&(le(f(this,vt)),R(this,vt,null)),f(this,We)&&(le(f(this,We)),R(this,We,null)),f(this,gt)&&(le(f(this,gt)),R(this,gt,null)),$&&(z(f(this,bo)),Vr(),z(zt()));let r=f(this,St).failed,n=o=>{if(C(this,F,Dr).call(this))return;let{reset:i,invoke_onerror:s}=C(this,F,Vs).call(this,o);s(),r&&!C(this,F,Dr).call(this)&&R(this,gt,C(this,F,wi).call(this,()=>{try{return xe(()=>{var l=E;l.b=this,l.f|=128,r(f(this,mt),()=>o,()=>i)})}catch(l){return et(l,f(this,qe).parent),null}}))};pe(()=>{if(!C(this,F,Dr).call(this)){var o;try{o=this.transform_error(t)}catch(i){et(i,f(this,qe)&&f(this,qe).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(n,i=>et(i,f(this,qe)&&f(this,qe).parent)):n(o)}})};var Ks=!0;function $e(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[n=Xn]??(e[n]=e.nodeValue))&&(e[Xn]=r,e.nodeValue=`${r}`)}function $i(e,t){return ef(e,t)}function xo(e,t){di(),t.intro=t.intro??!1;let r=t.target,n=$,o=O;try{for(var i=ae(r);i&&(i.nodeType!==ft||i.data!=="[");)i=ke(i);if(!i)throw Je;ve(!0),z(i);let s=ef(e,{...t,anchor:i});return ve(!1),s}catch(s){if(s instanceof Error&&s.message.split(`
|
|
80
|
-
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw
|
|
81
|
-
\r\f\xA0\v\uFEFF`];function rf(e,t=!1){var r=t?" !important;":";",n="";for(var o of Object.keys(e)){var i=e[o];i!=null&&i!==""&&(n+=" "+o+": "+i+r)}return n}function Qs(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function nf(e,t){if(t){var r="",n,o;if(Array.isArray(t)?(n=t[0],o=t[1]):n=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var i=!1,s=0,l=!1,c=[];n&&c.push(...Object.keys(n).map(Qs)),o&&c.push(...Object.keys(o).map(Qs));var p=0,_=-1;let y=e.length;for(var g=0;g<y;g++){var b=e[g];if(l?b==="/"&&e[g-1]==="*"&&(l=!1):i?i===b&&(i=!1):b==="/"&&e[g+1]==="*"?l=!0:b==='"'||b==="'"?i=b:b==="("?s++:b===")"&&s--,!l&&i===!1&&s===0){if(b===":"&&_===-1)_=g;else if(b===";"||g===y-1){if(_!==-1){var u=Qs(e.substring(p,_).trim());if(!c.includes(u)){b!==";"&&g++;var h=e.substring(p,g).trim();r+=" "+h+";"}}p=g+1,_=-1}}}}return n&&(r+=rf(n)),o&&(r+=rf(o,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function ea(e,t={},r,n){for(var o in r){var i=r[o];t[o]!==i&&(r[o]==null?e.style.removeProperty(o):e.style.setProperty(o,i,n))}}function No(e,t,r,n){var o=e[Wn];if($||o!==t){var i=nf(t,n);(!$||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e[Wn]=t}else n&&(Array.isArray(n)?(ea(e,r?.[0],n[0]),ea(e,r?.[1],n[1],"important")):ea(e,r,n));return n}function ra(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function zc(e,t){var r=e.__defaultValue,n=e.multiple,o=n?r??[]:null;if(!(n&&!It(o))){var i=e.selectedIndex,s=t&&n?new Set(e.selectedOptions):null;for(var l of e.options){var c=ta(l);ra(l,n?o.includes(c):ui(c,r))}if(t)if(s!==null)for(l of e.options){var p=s.has(l);l.selected!==p&&(l.selected=p)}else e.selectedIndex!==i&&(e.selectedIndex=i)}}function Fr(e,t,r=!1){if(e.multiple){if(t==null)return;if(!It(t))return Ua();for(var n of e.options)n.selected=t.includes(ta(n));return}for(n of e.options){var o=ta(n);if(ui(o,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function ln(e){var t=new MutationObserver(r=>{r.every(jc)||("__defaultValue"in e&&zc(e,!1),"__value"in e&&Fr(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Se(()=>{t.disconnect()})}function ta(e){return"__value"in e?e.__value:e.value}function jc(e){if(e.target.closest("selectedcontent")!==null)return!0;if(e.type==="childList"){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(r=>r.nodeName==="SELECTEDCONTENT")}return!1}var Jc=Symbol("is custom element"),Zc=Symbol("is html"),Qc=fs?"link":"LINK";function Un(e){if($){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;he(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var o=e.checked;he(e,"checked",null),e.checked=o}}};e[Ar]=r,pe(r),ni()}}function Ai(e,t){var r=lf(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function he(e,t,r,n){var o=lf(e);if($&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Qc)){n||tu(e,t,r??"");return}o[t]!==(o[t]=r)&&(t==="loading"&&(e[Da]=r),r==null?e.removeAttribute(t):typeof r!="string"&&eu(e).has(t)?e[t]=r:e.setAttribute(t,r))}function lf(e){var t;return e[t=jo]??(e[t]={[Jc]:e.nodeName.includes("-"),[Zc]:e.namespaceURI===Go})}var of=new Map;function eu(e){var t=e.getAttribute("is")||e.nodeName,r=of.get(t);if(r)return r;of.set(t,r=new Set);for(var n,o=e,i=Element.prototype;i!==o;){n=Bo(o);for(var s in n)n[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&r.add(s);o=Ur(o)}return r}function tu(e,t,r){m&&(t==="srcset"&&ru(e,r)||na(e.getAttribute(t)??"",r)||Pa(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function na(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function sf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function ru(e,t){var r=sf(e.srcset),n=sf(t);return n.length===r.length&&n.every(([o,i],s)=>i===r[s][1]&&(na(r[s][0],o)||na(o,r[s][0])))}function Si(e,t,r=t){var n=new WeakSet;_s(e,"input",async o=>{m&&e.type==="checkbox"&&us();var i=o?e.defaultValue:e.value;if(i=oa(e)?ia(i):i,r(i),S!==null&&n.add(S),await rn(),i!==(i=t())){var s=e.selectionStart,l=e.selectionEnd,c=e.value.length;if(e.value=i??"",l!==null){var p=e.value.length;s===l&&l===c&&p>c?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=s,e.selectionEnd=Math.min(l,p))}}}),($&&e.defaultValue!==e.value||X(t)==null&&e.value)&&(r(oa(e)?ia(e.value):e.value),S!==null&&n.add(S)),Ce(()=>{m&&e.type==="checkbox"&&us();var o=t();if(e===document.activeElement){var i=ge?$t:S;if(n.has(i))return}oa(e)&&o===ia(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function oa(e){var t=e.type;return t==="number"||t==="range"}function ia(e){return e===""?null:+e}function sa(e,t){return e===t||e?.[He]===t}function fn(e=ro(),t,r,n){var o=M.r,i=E;return ht(()=>{var s,l;return Ce(()=>{s=l,l=n?.()||[],X(()=>{sa(r(...l),e)||(t(e,...l),s&&sa(r(...s),e)&&t(null,...s))})}),()=>{let c=i;for(;c!==o&&c.parent!==null&&c.parent.f&33554432;)c=c.parent;let p=()=>{l&&sa(r(...l),e)&&t(null,...l)},_=c.teardown;c.teardown=()=>{p(),_?.()}}}),e}function ff(e){return new la(e)}var br,Nt,la=class{constructor(t){I(this,br);I(this,Nt);var r=new Map,n=(i,s)=>{var l=Zr(s,!1,!1);return r.set(i,l),l};let o=new Proxy({...t.props||{},$$events:{}},{get(i,s){return a(r.get(s)??n(s,Reflect.get(i,s)))},has(i,s){return s===qo?!0:(a(r.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,l){return x(r.get(s)??n(s,l),l),Reflect.set(i,s,l)}});R(this,Nt,(t.hydrate?xo:$i)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),!ge&&(!t?.props?.$$host||t.sync===!1)&&Cr(),R(this,br,o.$$events);for(let i of Object.keys(f(this,Nt)))i==="$set"||i==="$destroy"||i==="$on"||Te(this,i,{get(){return f(this,Nt)[i]},set(s){f(this,Nt)[i]=s},enumerable:!0});f(this,Nt).$set=i=>{Object.assign(o,i)},f(this,Nt).$destroy=()=>{$o(f(this,Nt))}}$set(t){f(this,Nt).$set(t)}$on(t,r){f(this,br)[t]=f(this,br)[t]||[];let n=(...o)=>r.call(this,...o);return f(this,br)[t].push(n),()=>{f(this,br)[t]=f(this,br)[t].filter(o=>o!==n)}}$destroy(){f(this,Nt).$destroy()}};br=new WeakMap,Nt=new WeakMap;var du;typeof HTMLElement=="function"&&(du=class extends HTMLElement{constructor(t,r,n){super();q(this,"$$ctor");q(this,"$$s");q(this,"$$c");q(this,"$$cn",!1);q(this,"$$d",{});q(this,"$$r",!1);q(this,"$$p_d",{});q(this,"$$l",{});q(this,"$$l_u",new Map);q(this,"$$me");q(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=r,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let o=this.$$c.$on(t,r);this.$$l_u.set(r,o)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return i=>{let s=Ht("slot");o!=="default"&&(s.name=o),U(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=pu(this);for(let o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),r.default=!0):r[o]=t(o));for(let o of this.attributes){let i=this.$$g_p(o.name);i in this.$$d||(this.$$d[i]=fa(i,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=ff({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Ms(()=>{Ce(()=>{this.$$r=!0;for(let o of os(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let i=fa(o,this.$$d[o],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,i)}this.$$r=!1})});for(let o in this.$$l)for(let i of this.$$l[o]){let s=this.$$c.$on(o,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,r,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=fa(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return os(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function fa(e,t,r,n){let o=r[e]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function pu(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}if(m){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;el(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function cf(e){M===null&&Zo("onMount"),Sr&&M.l!==null?hu(M).m.push(e):Qt(()=>{let t=X(e);if(typeof t=="function")return t})}function hu(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var uf;typeof window<"u"&&((uf=window.__svelte??(window.__svelte={})).v??(uf.v=new Set)).add("5");var vu={directory:'<path d="M3 7V5h6l2 3h10v12H3Z"/><path d="M3 10h18"/>',file:'<path d="M5 3h9l5 5v13H5ZM14 3v5h5M8 12h8M8 16h6"/>',link:'<path d="m9 15 6-6M8 10l-3 3a4 4 0 0 0 6 6l3-3M10 8l3-3a4 4 0 0 1 6 6l-3 3"/>'};function df(e){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${vu[e]}</svg>`}function pf(e){let t=new Set,r=(o,i)=>{if(i>32)throw new TypeError("Presentation data is too deeply nested");if(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number"&&Number.isFinite(o))return o;if(typeof o!="object"||o===null||t.has(o))throw new TypeError("Presentation data must be finite, acyclic JSON");t.add(o);try{if(Array.isArray(o))return o.map(s=>r(s,i+1));if(Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null)throw new TypeError("Presentation data must use plain objects");return Object.fromEntries(Object.entries(o).map(([s,l])=>[s,r(l,i+1)]))}finally{t.delete(o)}};if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Presentation data must be an object");let n=r(e,0);if(typeof n!="object"||n===null||Array.isArray(n))throw new TypeError("Presentation data must be an object");return n}var L=class extends Error{constructor(){super(...arguments);q(this,"name","ListingDataError")}},Ro=class extends L{},Yn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ni=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>=0,_f=e=>typeof e=="string"&&["directory","file","symlink","other"].includes(e);function wr(e,t){if(typeof e!="string")throw new L(`Invalid ${t}`);return e}function ca(e,t){if(typeof e!="boolean")throw new L(`Invalid ${t}`);return e}function gu(e,t){if(e===null)return null;let r=new URL(wr(e,"href"),t);if(!["http:","https:"].includes(r.protocol))throw new L("Unsupported listing link protocol");return r.href}function hf(e,t){if(!Yn(e)||!_f(e.kind)||typeof e.size!="number"||!Number.isFinite(e.size)||e.size<0)throw new L("Invalid listing entry");let r=null;if(e.link!==null){if(!Yn(e.link))throw new L("Invalid link metadata");let n=e.link.targetKind;if(n!==null&&(!_f(n)||n==="symlink"))throw new L("Invalid target kind");let o=e.link.targetSize;if(o!==null&&(typeof o!="number"||!Number.isFinite(o)||o<0))throw new L("Invalid target size");r={target:wr(e.link.target,"target"),targetKind:n,targetSize:o,unavailable:ca(e.link.unavailable,"unavailable"),cycle:ca(e.link.cycle,"cycle")}}return{...e.presentation===void 0?{}:{presentation:pf(e.presentation)},id:wr(e.id,"id"),name:wr(e.name,"name"),kind:e.kind,href:gu(e.href,t),exitsExplorer:ca(e.exitsExplorer,"exitsExplorer"),size:e.size,modifiedAt:wr(e.modifiedAt,"modifiedAt"),link:r}}function bu(e){if(!Yn(e)||e.version!==1||!Ni(e.total)||!Array.isArray(e.blocks)||!Yn(e.sort))throw new L("Invalid listing manifest");let t=e.sort;if(typeof t.field!="string"||!["name","size","modified"].includes(t.field)||typeof t.direction!="string"||!["asc","desc"].includes(t.direction)||typeof t.nameMode!="string"||!["locale","natural","unicode"].includes(t.nameMode)||typeof t.directoriesFirst!="boolean")throw new L("Invalid listing order");let r=t.field==="size"?"size":t.field==="modified"?"modified":"name",n=t.direction==="desc"?"desc":"asc",o=t.nameMode==="unicode"?"unicode":t.nameMode==="locale"?"locale":"natural",i=e.blocks.map(s=>{if(!Yn(s)||!Ni(s.offset)||!Ni(s.count))throw new L("Invalid block descriptor");return{href:wr(s.href,"block href"),offset:s.offset,count:s.count}});if(i.length===0)throw new L("Missing blocks");return{version:1,revision:wr(e.revision,"revision"),directory:wr(e.directory,"directory"),hrefBase:wr(e.hrefBase,"href base"),total:e.total,sort:{field:r,direction:n,nameMode:o,directoriesFirst:t.directoriesFirst},blocks:i}}async function Co(e,t={}){let r=t.fetch??fetch,n=t.maxEntries??1e5;if(!Ni(n))throw new L("Invalid entry limit");let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new L("Listing loading requires HTTP(S); use native file navigation");for(let i=0;i<2;i++)try{let s={...t.signal===void 0?{}:{signal:t.signal},cache:i===0?t.cache??"default":"reload"},l=await r(o,s);if(!l.ok)throw new L(`Manifest request failed: ${l.status}`);let c=bu(await l.json());if(c.total>n)throw new L("Listing exceeds the configured entry limit");let p=new URL(c.hrefBase,o);if(!["http:","https:"].includes(p.protocol))throw new L("Unsupported href base protocol");let _=[],g=new Set;for(let b of c.blocks){if(b.offset!==_.length||b.count+_.length>c.total)throw new L("Invalid block coverage");let u=new URL(b.href,o);if(u.origin!==o.origin||!["http:","https:"].includes(u.protocol))throw new L("Block leaves the manifest origin");let h=await r(u,s);if(h.status===404||h.status===410)throw new Ro("Block no longer available");if(!h.ok)throw new L(`Block request failed: ${h.status}`);let y=await h.json();if(!Yn(y)||y.version!==1||y.revision!==c.revision)throw new Ro("Listing revision changed");if(y.offset!==b.offset||y.total!==c.total||!Array.isArray(y.entries)||y.entries.length!==b.count)throw new L("Invalid block envelope");for(let w of y.entries){let k=hf(w,p);if(g.has(k.id))throw new L("Duplicate entry ID");g.add(k.id),_.push(k)}}if(_.length!==c.total)throw new L("Incomplete listing");return{manifest:c,entries:_}}catch(s){if(t.signal?.aborted||!(s instanceof Ro)||i===1)throw s}throw new L("Listing unavailable")}function mf(e,t,r=1e5){if(!Array.isArray(e)||e.length>r)throw new L("Invalid page slice");let n=new URL(t),o=new Set,i=e.map(s=>hf(s,n));for(let s of i){if(o.has(s.id))throw new L("Duplicate entry ID");o.add(s.id)}return i}async function ua(e,t,r,n,o=!1,i=0){let s=new URL(e,document.baseURI);if(s.origin!==location.origin)throw new L("Folder leaves the theme origin");let l=await fetch(s,{signal:n,cache:o?"no-store":"default"});if(!l.ok)throw new L("Unavailable folder");let c=await l.json();if(typeof c!="object"||c===null||Array.isArray(c))throw new L("Invalid folder snapshot");let p=c;if(p.version!==1||p.theme!==r||typeof p.title!="string"||typeof p.path!="string"||!Number.isSafeInteger(p.total)||Number(p.total)<0||!Array.isArray(p.breadcrumbs))throw new L("Unsupported folder snapshot");if(p.metadataHead!==void 0&&typeof p.metadataHead!="string")throw new L("Invalid folder metadata");let _=document.querySelector("base")?.href??t,g=h=>{if(h===null)return null;if(typeof h!="string")throw new L("Invalid folder link");let y=new URL(h,_);if(!["http:","https:"].includes(y.protocol)||y.origin!==location.origin)throw new L("Unsupported folder link");return y.href},b=mf(p.entries,_).map(h=>({...h,...h.presentation?{presentation:{...h.presentation,folderDataHref:g(h.presentation.folderDataHref??null)}}:{}}));if(b.length>Number(p.total))throw new L("Invalid folder count");let u={...p,updatesHref:g(p.updatesHref??null),entries:b,dataHref:s.href,manifestHref:g(p.manifestHref),rootHref:g(p.rootHref),rootDataHref:g(p.rootDataHref),parentHref:g(p.parentHref),parentDataHref:g(p.parentDataHref),breadcrumbs:p.breadcrumbs.map(h=>{if(typeof h!="object"||h===null||!("name"in h)||!("href"in h)||!("dataHref"in h)||typeof h.name!="string")throw new L("Invalid breadcrumb");return{name:h.name,href:g(h.href),dataHref:g(h.dataHref)}})};if(o&&u.manifestHref){let h=await Co(u.manifestHref,{signal:n,cache:"no-store"});if(h.manifest.total!==p.total||p.listingRevision!==void 0&&h.manifest.revision!==p.listingRevision){if(i<2)return ua(e,t,r,n,!0,i+1);throw new L("Folder changed while refreshing")}u.entries=[...h.entries]}return u}var Ri=new WeakMap;function vf(e,t){if(!t||typeof document>"u")return e;let r=document.querySelector("[data-dirwell-theme]");if(!r)return e;let n=Ri.get(r)??e;return Ri.set(r,n),n}function gf(e,t){let r=document.querySelector("[data-dirwell-theme]");r&&Ri.has(r)&&Ri.set(r,e),document.title=typeof e.title=="string"?e.title:"";let n=document.createElement("template");n.innerHTML=typeof e.metadataHead=="string"?e.metadataHead:"",document.head.querySelectorAll("[data-dirwell-metadata]").forEach(s=>s.remove());let o=document.querySelector("base")?.href??t,i=s=>{try{let l=new URL(s,o);return["http:","https:"].includes(l.protocol)?l.href:null}catch{return null}};for(let s of n.content.children){if(!s.hasAttribute("data-dirwell-metadata"))continue;let l;if(s.tagName==="META"){let c=s.hasAttribute("property")?"property":"name",p=s.getAttribute(c)??"";if(!/^(?:description|og:[a-z_:]+|twitter:[a-z_:]+)$/i.test(p))continue;let _=s.getAttribute("content")??"";if(["og:image","og:url","twitter:image"].includes(p)){let g=i(_);if(g===null)continue;_=g}l=document.createElement("meta"),l.setAttribute(c,p),l.setAttribute("content",_)}else if(s.tagName==="LINK"&&s.getAttribute("rel")==="canonical"){let c=i(s.getAttribute("href")??"");if(c===null)continue;l=document.createElement("link"),l.setAttribute("rel","canonical"),l.setAttribute("href",c)}else continue;l.setAttribute("data-dirwell-metadata",""),document.head.append(l)}}var Vn=e=>e.kind==="directory"||e.link?.targetKind==="directory",da=e=>e.kind==="symlink"?"link":Vn(e)?"directory":"file";function pa(e,t){let r=0,n=0,o=-2;for(let i of e.trim().toLocaleLowerCase()){let s=t.toLocaleLowerCase().indexOf(i,n);if(s<0)return null;s===o+1&&(r+=8),(s===0||/[\s/_.-]/.test(t[s-1]??""))&&(r+=5),r+=Math.max(0,4-s*.05),o=s,n=s+1}return r-t.length*.01}function wf(e,t,r,n){return e.map(o=>({entry:o,score:pa(t,`${o.name} ${o.link?.target??""}`)})).filter(o=>r.includes(da(o.entry))&&o.score!==null).sort((o,i)=>{if(t.trim()&&o.score!==i.score)return(i.score??0)-(o.score??0);let s=o.entry,l=i.entry;if(n.directoriesFirst&&Vn(s)!==Vn(l))return Vn(s)?-1:1;let c=()=>n.nameMode==="unicode"?bf(s.name,l.name):s.name.localeCompare(l.name,void 0,{numeric:n.nameMode==="natural",sensitivity:"base"}),p=(n.field==="name"?c():n.field==="size"?(s.kind==="directory"?0:s.size)-(l.kind==="directory"?0:l.size):s.modifiedAt.localeCompare(l.modifiedAt))||c();return(n.direction==="asc"?p:-p)||bf(s.id,l.id)}).map(o=>o.entry)}function bf(e,t){let r=[...e],n=[...t];for(let o=0;o<Math.min(r.length,n.length);o++){let i=(r[o]?.codePointAt(0)??0)-(n[o]?.codePointAt(0)??0);if(i)return i}return r.length-n.length}function yf(e){let t=["B","KiB","MiB","GiB","TiB"],r=e,n=0;for(;r>=1024&&n<4;)r/=1024,n++;return`${r.toFixed(n===0||r>=100?0:1)} ${t[n]}`}function xf(e,t=!1){let r=new Date(e);return Number.isNaN(r.getTime())?"Unknown":t?r.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"}):`${r.toISOString().slice(0,16).replace("T"," ")} UTC`}var wu=ce("<h1> </h1> <span>File archive</span>",1),yu=ce("/ <a> </a>",1),xu=ce('<label><input type="checkbox"/> </label>'),$u=ce('<li class="entry"><a>../</a></li>'),$f=ce('<li aria-hidden="true"></li>'),Eu=ce('<span class="file-icon" aria-hidden="true"></span> ',1),Tu=ce('<a class="name"><!></a>'),Au=ce("<span><!></span>"),ku=ce('<small class="target"> </small>'),Su=ce('<li class="entry" data-entry=""><span class="identity"><!><!></span> <span class="kind"> </span> <button class="timestamp-button"><time> </time></button></li>'),Nu=ce("<p>No matching entries.</p>"),Ru=ce('<a rel="prev">Previous</a>'),Cu=ce('<a rel="next">Next</a>'),Ou=ce('<nav aria-label="Pagination"><!> <!></nav>'),Iu=ce(`<p class="keyboard-help">Arrow keys select files \xB7 Home / End jump \xB7 / searches \xB7 Backspace opens
|
|
82
|
-
parent</p>`),Du=ce("<dialog><h2>Modified time</h2> <p> </p> <p> </p> <button>Close</button></dialog>"),Mu=ce("<a> </a>"),Lu=ce("<li><!></li>"),Fu=ce('<dialog><h2>Search archive</h2> <input aria-label="Search archive files" type="search"/> <p role="status"> </p> <ul></ul> <button>Close</button></dialog>'),Pu=ce('<header class="page-header"><div class="wordmark"><!></div> <nav aria-label="Breadcrumb"><a>Home</a><!></nav></header> <main data-explorer="" data-framework="svelte"><div class="toolbar"><label class="search-field">Search this directory<input type="search" placeholder="Search files"/></label> <fieldset><legend>Types</legend><!></fieldset> <label>Sort<select><option>Name</option><option>Size</option><option>Modified</option></select></label> <label>Names<select><option>Natural</option><option>Locale</option><option>Unicode</option></select></label> <label>Order<select><option>Ascending</option><option>Descending</option></select></label> <label><input type="checkbox"/>Folders first</label> <label>Appearance<select><option>System</option><option>Light</option><option>Dark</option></select></label> <button>Search archive</button></div> <section class="listing-card"><div class="listing-summary"><span data-visible-count=""> </span> entries<!><span role="status" aria-live="polite"> </span></div> <div class="entry-head"><span>Name</span><span>Size</span><span>Modified</span></div> <ul class="entry-list"><!> <!> <!> <!></ul> <!></section> <!> <!></main> <!> <!>',1);function _a(e,t){eo(t,!0);let r=X(()=>vf(t.model,!1)),n=H(r),o=H(r.entries),i=H(""),s=H(Xt(["directory","file","link"])),l=H(r.sort),c=H("system"),p=H(null),_=H(!1),g=H(!1),b=H(""),u=H(null),h=H(!1),y=H(0),w=H(!1),k=H(""),V=H([]),te=H("Enter a search to begin."),de=H(null),wt=H(new Map),ze=dr(()=>a(_)&&a(n).updatesHref?new URL(a(n).updatesHref,document.baseURI).href:null),ne=dr(()=>a(o).length===a(n).total),ue=dr(()=>wf(a(o),a(h)?"":a(i),a(s),a(l))),Xe=dr(()=>a(_)&&a(ue).length>500),Ie=dr(()=>{let d=[0];for(let v of a(ue))d.push(d.at(-1)+(a(wt).get(v.id)??76));return d}),yt=dr(()=>{if(!a(Xe))return 0;let d=0,v=a(ue).length;for(;d<v;){let T=d+v>>1;a(Ie)[T+1]<=a(y)?d=T+1:v=T}return Math.max(0,d-5)}),cn=dr(()=>a(Xe)?Math.min(a(ue).length,a(yt)+35):a(ue).length);function Rt(d,v){if(typeof ResizeObserver>"u")return;let T=new ResizeObserver(()=>{let D=d.getBoundingClientRect().height;if(D>0&&a(wt).get(v)!==D){let re=new Map(a(wt));re.set(v,D),x(wt,re)}});return T.observe(d),{destroy:()=>T.disconnect()}}let sr=H(void 0),un=H(void 0),Ci=H(void 0),qn=H(void 0),zn=H(void 0),yr=0,jn,Oi,Ii=0,Di=Vn;function Ef(d){return typeof location<"u"&&location.protocol==="file:"&&Di(d)&&!d.exitsExplorer&&d.href?.endsWith("/")?d.href+"index.html":d.href}async function ha(){if(a(ne)||!a(n).manifestHref||location.protocol==="file:")return;let d=jn,v=yr;x(g,!0);try{let T=await Co(new URL(a(n).manifestHref,document.baseURI).href,{signal:d.signal,cache:a(n).updatesHref?"no-store":"default"});v===yr&&!d.signal.aborted&&x(o,T.entries)}catch{v===yr&&!d.signal.aborted&&x(b,"Could not load complete directory data. Native page links remain available.")}finally{v===yr&&x(g,!1)}}async function Tf(d,v){let T=v.presentation?.folderDataHref;v.exitsExplorer||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||typeof T!="string"||location.protocol==="file:"||(d?.preventDefault(),await Gn(T,new URL(v.href,document.baseURI).href,!0))}async function Gn(d,v,T,D=!1){let re=++yr;jn?.abort();let J=jn=new AbortController;x(g,!0),x(b,"");try{let ie=await ua(d,v,"ledger",J.signal,D),j=ie.entries;if(D&&ie.manifestHref&&j.length!==ie.total&&(j=(await Co(ie.manifestHref,{signal:J.signal,cache:"no-store"})).entries),re!==yr||J.signal.aborted)return;x(n,ie),x(o,j),D||(x(i,""),x(p,null),x(y,0)),T&&history.pushState({dataHref:ie.dataHref},"",v),gf(ie,v),await ha(),D||window.scrollTo({top:0})}catch{re===yr&&!J.signal.aborted&&x(b,"Could not open this folder. Open its native link or try again.")}finally{re===yr&&x(g,!1)}}function Mi(d,v,T){d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||location.protocol==="file:"||(d?.preventDefault(),Gn(T,new URL(v,document.baseURI).href,!0))}async function Af(d){let v=a(ue)[Math.max(0,Math.min(a(ue).length-1,d))];v&&(x(p,v.id,!0),a(Xe)&&(x(y,Math.max(0,a(Ie)[d]-100),!0),a(sr)&&window.scrollTo({top:a(sr).getBoundingClientRect().top+window.scrollY+a(y)})),await rn(),a(sr)?.querySelector(`[data-order="${d}"] a`)?.focus({preventScroll:!0}))}function kf(d){if(d.isComposing||d.altKey||d.ctrlKey||d.metaKey)return;if(a(w)){d.key==="Escape"&&(d.preventDefault(),x(w,!1));return}if(a(u)){d.key==="Escape"&&x(u,null);return}let v=/INPUT|TEXTAREA|SELECT/.test(d.target?.tagName??"");if(d.key==="/"&&!v){d.preventDefault(),a(un)?.focus();return}if(v){d.key==="Escape"&&(x(i,""),a(un)?.blur());return}if(d.key==="Backspace"&&a(n).parentHref){d.preventDefault(),location.protocol==="file:"?location.href=a(n).parentHref:Gn(a(n).parentDataHref,new URL(a(n).parentHref,document.baseURI).href,!0);return}let T=a(ue).findIndex(D=>D.id===a(p));["ArrowDown","ArrowUp","Home","End"].includes(d.key)&&(d.preventDefault(),Af(d.key==="Home"?0:d.key==="End"?a(ue).length-1:T+(d.key==="ArrowDown"?1:-1)))}function Sf(d){x(c,d,!0);try{localStorage.setItem("dirwell-color-scheme",d)}catch{}}async function Nf(){let d=++Ii;Oi?.abort();let v=Oi=new AbortController;x(V,[]);let T=a(k).trim();if(!T){x(te,"Enter a search to begin.");return}x(te,"Searching archive\u2026");try{let D=new URL(a(n).searchIndexHref,document.baseURI),re=await fetch(D,{signal:v.signal});if(!re.ok)throw new Error("Unavailable archive");let J=await re.json();if(J.version!==3||!Array.isArray(J.shards)||!Number.isSafeInteger(J.count)||J.count>1e5)throw new Error("Unsupported archive");let ie=[];for(let W of J.shards){if(typeof W!="string")throw new Error("Invalid shard");let Ct=new URL(W,D);if(Ct.origin!==D.origin)throw new Error("Unsafe shard");let Pr=await fetch(Ct,{signal:v.signal});if(!Pr.ok)throw new Error("Unavailable shard");let Hr=await Pr.json();if(!Array.isArray(Hr.entries)||ie.length+Hr.entries.length>1e5)throw new Error("Invalid archive");for(let je of Hr.entries){if(typeof je.name!="string"||typeof je.path!="string"||typeof je.exitsExplorer!="boolean")throw new Error("Invalid archive record");let at=je.href===null?null:new URL(je.href,D);if(at&&!["http:","https:"].includes(at.protocol))throw new Error("Unsupported archive link");ie.push({name:je.name,path:je.path,href:at?.href??null,exitsExplorer:je.exitsExplorer})}}let j=ie.map(W=>({record:W,score:pa(T,W.name+" "+W.path)})).filter(W=>W.score!==null).sort((W,Ct)=>Ct.score-W.score||W.record.path.localeCompare(Ct.record.path));if(d!==Ii||v.signal.aborted)return;x(V,j.slice(0,100).map(W=>W.record)),x(te,j.length>100?"Showing 100 of "+j.length+" results":j.length+" results",!0)}catch{d===Ii&&!v.signal.aborted&&x(te,"Could not load archive search. Try again.")}}cf(()=>{x(_,!0),jn=new AbortController;try{let v=localStorage.getItem("dirwell-color-scheme");["system","light","dark"].includes(v)&&x(c,v,!0)}catch{}history.replaceState({dataHref:new URL(a(n).dataHref,document.baseURI).href},"");let d=v=>{v.state?.dataHref?Gn(v.state.dataHref,location.href,!1):location.reload()};return window.addEventListener("popstate",d),ha(),()=>{jn?.abort(),Oi?.abort(),window.removeEventListener("popstate",d)}}),Qt(()=>{let d=a(ze);if(!d||typeof EventSource>"u")return;let v=new EventSource(d);return v.onmessage=()=>x(de,d,!0),v.onerror=()=>x(b,"Live updates disconnected. Refresh to retry."),v.onopen=()=>{a(b).startsWith("Live updates")&&x(b,"")},()=>v.close()}),Qt(()=>{if(a(_)&&!a(g)&&a(de)){let d=a(de);x(de,null),d===a(ze)&&Gn(a(n).dataHref,location.href,!1,!0)}}),Qt(()=>{a(_)&&(document.documentElement.dataset.theme=a(c))}),Qt(()=>{a(qn)&&a(u)&&!a(qn).open&&a(qn).showModal()}),Qt(()=>{a(zn)&&a(w)&&!a(zn).open&&(a(zn).showModal(),rn().then(()=>a(Ci)?.focus()))});var ma=Pu();gr("keydown",Dn,kf),gr("scroll",Dn,()=>{a(sr)&&x(y,Math.max(0,window.scrollY-a(sr).offsetTop),!0)});var Li=Jt(ma),Fi=Y(Li),Rf=Y(Fi);{var Cf=d=>{var v=Fn(),T=Jt(v);Bn(T,()=>t.header,()=>({model:a(n)})),U(d,v)},Of=d=>{var v=wu(),T=Jt(v),D=ot(T,!0);Vr(2),oe(()=>$e(D,a(n).title)),U(d,v)};Ee(Rf,d=>{t.header?d(Cf):d(Of,-1)})}P(Fi);var va=N(Fi,2),Pi=Y(va),If=N(Pi);Hn(If,17,()=>a(n).breadcrumbs,So,(d,v)=>{Vr();var T=yu(),D=N(Jt(T)),re=ot(D,!0);oe(()=>{he(D,"href",a(v).href),$e(re,a(v).name)}),Oe("click",D,J=>Mi(J,a(v).href,a(v).dataHref)),U(d,T)}),P(va),P(Li);var Oo=N(Li,2),Hi=Y(Oo),Bi=Y(Hi),dn=N(Y(Bi));Un(dn),fn(dn,d=>x(un,d),()=>a(un)),P(Bi);var Io=N(Bi,2),Df=N(Y(Io));Hn(Df,16,()=>["directory","file","link"],So,(d,v)=>{var T=xu(),D=Y(T);Un(D);var re=N(D,1,!0);P(T),oe(J=>{Ai(D,J),$e(re,v)},[()=>a(s).includes(v)]),Oe("change",D,J=>x(s,J.currentTarget.checked?[...a(s),v]:a(s).filter(ie=>ie!==v),!0)),U(d,T)}),P(Io);var Ui=N(Io,2),xr=N(Y(Ui)),Yi=Y(xr);Yi.value=Yi.__value="name";var Vi=N(Yi);Vi.value=Vi.__value="size";var ga=N(Vi);ga.value=ga.__value="modified",P(xr);var Do;ln(xr),P(Ui);var qi=N(Ui,2),$r=N(Y(qi)),zi=Y($r);zi.value=zi.__value="natural";var ji=N(zi);ji.value=ji.__value="locale";var ba=N(ji);ba.value=ba.__value="unicode",P($r);var Mo;ln($r),P(qi);var Gi=N(qi,2),Er=N(Y(Gi)),Ki=Y(Er);Ki.value=Ki.__value="asc";var wa=N(Ki);wa.value=wa.__value="desc",P(Er);var Lo;ln(Er),P(Gi);var Wi=N(Gi,2),Fo=Y(Wi);Un(Fo),Vr(),P(Wi);var Xi=N(Wi,2),Tr=N(Y(Xi)),Ji=Y(Tr);Ji.value=Ji.__value="system";var Zi=N(Ji);Zi.value=Zi.__value="light";var ya=N(Zi);ya.value=ya.__value="dark",P(Tr);var Po;ln(Tr),P(Xi);var xa=N(Xi,2);P(Hi);var Qi=N(Hi,2),es=Y(Qi),$a=Y(es),Mf=ot($a,!0),Ea=N($a,2);{var Lf=d=>{var v=vo();oe(()=>$e(v,`on this page \xB7 ${a(n).total??""} in directory`)),U(d,v)};Ee(Ea,d=>{a(ne)||d(Lf)})}var Ff=N(Ea),Pf=ot(Ff,!0);P(es);var Ho=N(es,4),Ta=Y(Ho);{var Hf=d=>{var v=$u(),T=ot(v);oe(()=>he(T,"href",a(n).parentHref)),Oe("click",T,D=>Mi(D,a(n).parentHref,a(n).parentDataHref)),U(d,v)};Ee(Ta,d=>{a(n).parentHref&&d(Hf)})}var Aa=N(Ta,2);{var Bf=d=>{var v=$f();let T;oe(()=>T=No(v,"",T,{height:a(Ie)[a(yt)]+"px"})),U(d,v)};Ee(Aa,d=>{a(yt)&&d(Bf)})}var ka=N(Aa,2);Hn(ka,19,()=>a(ue).slice(a(yt),a(cn)),d=>d.id,(d,v,T)=>{var D=Su(),re=Y(D),J=Y(re);{var ie=Pe=>{var me=Tu(),Kn=Y(me);{var ts=De=>{var Ot=Fn(),Br=Jt(Ot);Bn(Br,()=>t.row,()=>({model:a(n),entry:a(v),selected:a(p)===a(v).id})),U(De,Ot)},rs=De=>{var Ot=Eu(),Br=Jt(Ot);Js(Br,()=>df(da(a(v))),!0),P(Br);var Zf=N(Br);oe(Qf=>$e(Zf,` ${a(v).name??""}${Qf??""}`),[()=>Di(a(v))?"/":""]),U(De,Ot)};Ee(Kn,De=>{t.row?De(ts):De(rs,-1)})}P(me),oe(De=>{he(me,"href",De),he(me,"target",a(v).exitsExplorer?"_blank":void 0),he(me,"rel",a(v).exitsExplorer?"noopener":void 0)},[()=>Ef(a(v))]),Oe("click",me,De=>Tf(De,a(v))),gr("focus",me,()=>x(p,a(v).id,!0)),U(Pe,me)},j=Pe=>{var me=Au(),Kn=Y(me);{var ts=De=>{var Ot=Fn(),Br=Jt(Ot);Bn(Br,()=>t.row,()=>({model:a(n),entry:a(v),selected:a(p)===a(v).id})),U(De,Ot)},rs=De=>{var Ot=vo();oe(()=>$e(Ot,a(v).name)),U(De,Ot)};Ee(Kn,De=>{t.row?De(ts):De(rs,-1)})}P(me),U(Pe,me)};Ee(J,Pe=>{a(v).href?Pe(ie):Pe(j,-1)})}var W=N(J);{var Ct=Pe=>{var me=ku(),Kn=ot(me);oe(()=>$e(Kn,`${a(v).link.unavailable?"Target unavailable \xB7 ":"\u2192 "}${a(v).link.target??""}`)),U(Pe,me)};Ee(W,Pe=>{a(v).link&&Pe(Ct)})}P(re);var Pr=N(re,2),Hr=ot(Pr,!0),je=N(Pr,2),at=Y(je),Ut=ot(at,!0);P(je),P(D),Zs(D,(Pe,me)=>Rt?.(Pe,me),()=>a(v).id),oe((Pe,me)=>{he(D,"data-id",a(v).id),he(D,"data-order",a(yt)+a(T)),he(D,"data-active",a(p)===a(v).id),$e(Hr,Pe),je.disabled=!a(_),he(at,"datetime",a(v).modifiedAt),$e(Ut,me)},[()=>Di(a(v))?"Folder":yf(a(v).size),()=>xf(a(v).modifiedAt,a(_))]),Oe("click",je,()=>x(u,a(v).modifiedAt,!0)),U(d,D)});var Uf=N(ka,2);{var Yf=d=>{var v=$f();let T;oe(()=>T=No(v,"",T,{height:a(Ie)[a(ue).length]-a(Ie)[a(cn)]+"px"})),U(d,v)};Ee(Uf,d=>{a(cn)<a(ue).length&&d(Yf)})}P(Ho),fn(Ho,d=>x(sr,d),()=>a(sr));var Vf=N(Ho,2);{var qf=d=>{var v=Nu();U(d,v)};Ee(Vf,d=>{a(ue).length===0&&d(qf)})}P(Qi);var Sa=N(Qi,2);{var zf=d=>{var v=Ou(),T=Y(v);{var D=j=>{var W=Ru();oe(()=>he(W,"href",a(n).page.previousHref)),U(j,W)};Ee(T,j=>{a(n).page.previousHref&&j(D)})}var re=N(T),J=N(re);{var ie=j=>{var W=Cu();oe(()=>he(W,"href",a(n).page.nextHref)),U(j,W)};Ee(J,j=>{a(n).page.nextHref&&j(ie)})}P(v),oe(()=>$e(re,` Page ${a(n).page.number??""} of ${a(n).page.count??""} `)),U(d,v)};Ee(Sa,d=>{a(n).page?.count>1&&!a(ne)&&d(zf)})}var jf=N(Sa,2);{var Gf=d=>{var v=Fn(),T=Jt(v);Bn(T,()=>t.footer,()=>({model:a(n)})),U(d,v)},Kf=d=>{var v=Iu();U(d,v)};Ee(jf,d=>{t.footer?d(Gf):d(Kf,-1)})}P(Oo);var Na=N(Oo,2);{var Wf=d=>{var v=Du(),T=N(Y(v),2),D=ot(T,!0),re=N(T,2),J=ot(re,!0),ie=N(re,2);P(v),fn(v,j=>x(qn,j),()=>a(qn)),oe(j=>{$e(D,a(u)),$e(J,j)},[()=>new Date(a(u)).toLocaleString()]),gr("close",v,()=>x(u,null)),Oe("click",ie,()=>x(u,null)),U(d,v)};Ee(Na,d=>{a(u)&&d(Wf)})}var Xf=N(Na,2);{var Jf=d=>{var v=Fu(),T=N(Y(v),2);Un(T),fn(T,j=>x(Ci,j),()=>a(Ci));var D=N(T,2),re=ot(D,!0),J=N(D,2);Hn(J,21,()=>a(V),So,(j,W)=>{var Ct=Lu(),Pr=Y(Ct);{var Hr=at=>{var Ut=Mu(),Pe=ot(Ut,!0);oe(()=>{he(Ut,"href",a(W).href),he(Ut,"target",a(W).exitsExplorer?"_blank":void 0),he(Ut,"rel",a(W).exitsExplorer?"noopener":void 0),$e(Pe,a(W).path)}),U(at,Ut)},je=at=>{var Ut=vo();oe(()=>$e(Ut,a(W).path)),U(at,Ut)};Ee(Pr,at=>{a(W).href?at(Hr):at(je,-1)})}P(Ct),U(j,Ct)}),P(J);var ie=N(J,2);P(v),fn(v,j=>x(zn,j),()=>a(zn)),oe(()=>$e(re,a(te))),gr("close",v,()=>x(w,!1)),Oe("input",T,Nf),Si(T,()=>a(k),j=>x(k,j)),Oe("click",ie,()=>x(w,!1)),U(d,v)};Ee(Xf,d=>{a(w)&&d(Jf)})}oe(()=>{he(Pi,"href",a(n).rootHref),he(Oo,"aria-busy",a(g)),dn.disabled=!a(_)||!a(ne),Io.disabled=!a(_)||!a(ne),xr.disabled=!a(_)||!a(ne),Do!==(Do=a(l).field)&&(xr.value=(xr.__value=Do)??"",Fr(xr,Do)),$r.disabled=!a(_)||!a(ne),Mo!==(Mo=a(l).nameMode)&&($r.value=($r.__value=Mo)??"",Fr($r,Mo)),Er.disabled=!a(_)||!a(ne),Lo!==(Lo=a(l).direction)&&(Er.value=(Er.__value=Lo)??"",Fr(Er,Lo)),Ai(Fo,a(l).directoriesFirst),Fo.disabled=!a(_)||!a(ne),Tr.disabled=!a(_),Po!==(Po=a(c))&&(Tr.value=(Tr.__value=Po)??"",Fr(Tr,Po)),xa.disabled=!a(_)||!a(n).searchIndexHref,$e(Mf,a(ne)?a(ue).length:a(o).length),$e(Pf,a(g)?"Loading\u2026":a(b))}),Oe("click",Pi,d=>Mi(d,a(n).rootHref,a(n).rootDataHref)),gr("compositionstart",dn,()=>x(h,!0)),gr("compositionend",dn,()=>x(h,!1)),Si(dn,()=>a(i),d=>x(i,d)),Oe("change",xr,d=>x(l,{...a(l),field:d.currentTarget.value})),Oe("change",$r,d=>x(l,{...a(l),nameMode:d.currentTarget.value})),Oe("change",Er,d=>x(l,{...a(l),direction:d.currentTarget.value})),Oe("change",Fo,d=>x(l,{...a(l),directoriesFirst:d.currentTarget.checked})),Oe("change",Tr,d=>Sf(d.currentTarget.value)),Oe("click",xa,()=>x(w,!0)),U(e,ma),to()}gi(["click","change","input"]);var Hu=document.querySelector("[data-dirwell-theme]"),Bu=JSON.parse(document.querySelector("#dirwell-page-data").textContent),Uu=xo(_a,{target:Hu,props:{model:Bu}});globalThis.__dirwellUnmount=()=>$o(Uu);})();
|
|
78
|
+
`).filter(a=>!a.includes("svelte/src/internal")).join(`
|
|
79
|
+
`)}}}function gf(e){let t=ia.get(e);t&&(Ie(e,"message",{value:t.message}),Ie(e,"stack",{value:t.stack}))}function yf(e){k===null&&(C===null&&Ml(e),Ll()),Dt&&Dl(e)}function xu(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function lr(e,t){var r=k;if(b)for(;r!==null&&(r.f&131072)!==0;)r=r.parent;r!==null&&(r.f&8192)!==0&&(e|=8192);var n={ctx:Y,deps:null,nodes:null,f:e|2048|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};b&&(n.component_function=gt),O?.register_created_effect(n);var o=n;if((e&4)!==0)Vn!==null?Vn.push(n):$t.ensure().schedule(n);else if(t!==null){try{sr(n)}catch(a){throw ge(n),a}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&524288)===0&&(o=o.first,(e&16)!==0&&(e&65536)!==0&&o!==null&&(o.f|=65536))}if(o!==null&&(o.parent=r,r!==null&&xu(o,r),C!==null&&(C.f&2)!==0&&(e&64)===0)){var i=C;(i.effects??(i.effects=[])).push(o)}return n}function Br(){return C!==null&&!rt}function Me(e){let t=lr(8,null);return ie(t,1024),t.teardown=e,t}function Xt(e){yf("$effect"),b&&Ie(e,"name",{value:"$effect"});var t=k.f,r=!C&&(t&32)!==0&&Y!==null&&!Y.i;if(r){var n=Y;(n.e??(n.e=[])).push(e)}else return Us(e)}function Us(e){return lr(1048580,e)}function la(e){$t.ensure();let t=lr(524352,e);return()=>{ge(t)}}function $f(e){$t.ensure();let t=lr(524352,e);return(r={})=>new Promise(n=>{r.outro?fr(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Et(e){return lr(4,e)}function Ql(e){return lr(4718592,e)}function He(e,t=0){return lr(8|t,e)}function z(e,t=[],r=[],n=[]){Oi(n,t,r,o=>{lr(8,()=>{e(...o.map(s))})})}function dt(e,t=0){var r=lr(16|t,e);return b&&(r.dev_stack=or),r}function Ne(e){return lr(524320,e)}function fa(e){var t=e.teardown;if(t!==null){let r=Dt,n=C;sa(!0),Se(null);try{t.call(null)}catch(o){at(o,e.parent)}finally{sa(r),Se(n)}}}function ko(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){let o=r.ac;o!==null&&yt(()=>{o.abort(gr)});var n=r.next;(r.f&64)!==0?r.parent=null:ge(r,t),r=n}}function wf(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&ge(t),t=r}}function ge(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ca(e.nodes.start,e.nodes.end),r=!0),e.f|=33554432,ko(e,t&&!r),cn(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(let i of n)i.stop();fa(e),e.f^=33554432,e.f|=16384;var o=e.parent;o!==null&&o.first!==null&&ta(e),b&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ca(e,t){for(;e!==null;){var r=e===t?null:Le(e);e.remove(),e=r}}function ta(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function fr(e,t,r=!0){var n=[];e.f|=256,xf(e,n,!0);var o=()=>{r&&ge(e),t&&t()},i=n.length;if(i>0){var a=()=>--i||o();for(var l of n)l.out(a)}else o()}function xf(e,t,r){if((e.f&8192)===0){e.f^=8192;var n=e.nodes&&e.nodes.t;if(n!==null)for(let l of n)(l.is_global||r)&&t.push(l);for(var o=e.first;o!==null;){var i=o.next;if((o.f&64)===0){var a=(o.f&65536)!==0||(o.f&32)!==0&&(e.f&16)!==0;xf(o,t,a?r:!1)}o=i}}}function Zn(e){e.f&=-257,Ef(e,!0)}function Ef(e,t){if((e.f&256)===0&&(e.f&8192)!==0){e.f^=8192,(e.f&1024)===0&&(ie(e,2048),$t.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,o=(r.f&65536)!==0||(r.f&32)!==0;Ef(r,o?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(let a of i)(a.is_global||t)&&a.in()}}function Wn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var o=r===n?null:Le(r);t.append(r),r=o}}var Tf=null;var Dt=!1;function sa(e){Dt=e}var C=null,rt=!1;function Se(e){C=e}var k=null;function Re(e){k=e}var Ft=null;function Li(e){C!==null&&(!ke&&(C.f&2097152)!==0||(C.f&2)!==0)&&(Ft??(Ft=new Set)).add(e)}var Fe=null,tt=0,wt=null;function df(e){wt=e}var Af=1,vn=0,jr=vn;function oa(e){jr=e}function Pn(){return++Af}function zr(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,n=r.length,o=0;o<n;o++){var i=r[o];if(zr(i)&&js(i),i.wv>e.wv)return!0}(t&512)!==0&&Pe===null&&ie(e,1024)}return!1}function Sf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!ke&&Ft!==null&&Ft.has(e)))for(var o=0;o<n.length;o++){var i=n[o];(i.f&2)!==0?Sf(i,t,!1):t===i&&(r?ie(i,2048):(i.f&1024)!==0&&ie(i,4096),Co(i))}}function Di(e){var t=Fe,r=tt,n=wt,o=C,i=Ft,a=Y,l=rt,f=jr,u=e.f;Fe=null,tt=0,wt=null,C=(u&96)===0?e:null,Ft=null,br(e.ctx),rt=!1,jr=++vn,e.ac!==null&&(yt(()=>{e.ac.abort(gr)}),e.ac=null);try{e.f|=2097152;var v=e.fn,h=v();e.f|=32768;var m=kf(e);if(ir()&&wt!==null&&!rt&&m!==null&&(e.f&6146)===0)for(var _=0;_<wt.length;_++)Sf(wt[_],e);if(o!==null&&o!==e){if(vn++,o.deps!==null)for(let y=0;y<r;y+=1)o.deps[y].rv=vn;if(t!==null)for(let y of t)y.rv=vn;wt!==null&&(n===null?n=wt:n.push(...wt))}return(e.f&8388608)!==0&&(e.f^=8388608),h}catch(y){return kf(e),vf(y)}finally{e.f^=2097152,Fe=t,tt=r,wt=n,C=o,Ft=i,br(a),rt=l,jr=f}}function kf(e){var o;var t=e.deps,r=O?.is_fork;if(Fe!==null){var n;if(r||cn(e,tt),t!==null&&tt>0)for(t.length=tt+Fe.length,n=0;n<Fe.length;n++)t[tt+n]=Fe[n];else e.deps=t=Fe;if(Br()&&(e.f&512)!==0)for(n=tt;n<t.length;n++)((o=t[n]).reactions??(o.reactions=[])).push(e)}else!r&&t!==null&&tt<t.length&&(cn(e,tt),t.length=tt);return t}function Eu(e,t){let r=t.reactions;if(r!==null){var n=gl.call(r,e);if(n!==-1){var o=r.length-1;o===0?r=t.reactions=null:(r[n]=r[o],r.pop())}}if(r===null&&(t.f&2)!==0&&(Fe===null||!vr.call(Fe,t))){var i=t;(i.f&512)!==0&&(i.f^=512),i.v!==le&&On(i),i.ac!==null&&yt(()=>{i.ac.abort(gr),i.ac=null,ie(i,2048)}),Jl(i),cn(i,0)}}function cn(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Eu(e,r[n])}function sr(e){var t=e.f;if((t&16384)===0){ie(e,1024);var r=k;if(k=e,b){var n=gt;Ri(e.component_function);var o=or;Cn(e.dev_stack??or)}try{(t&16777232)!==0?wf(e):ko(e),fa(e);var i=Di(e);if(e.teardown=typeof i=="function"?i:null,e.wv=Af,b&&qt&&(e.f&2048)!==0&&e.deps!==null)for(var a of e.deps)a.set_during_effect&&(a.wv=Pn(),a.set_during_effect=!1)}finally{k=r,b&&(Ri(n),Cn(o))}}}async function Gr(){if(ke)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),qr()}function s(e){var t=e.f,r=(t&2)!==0;if(Tf?.add(e),C!==null&&!rt){var n=k!==null&&(k.f&16384)!==0;if(!n&&(Ft===null||!Ft.has(e))){var o=C.deps;if((C.f&2097152)!==0)e.rv<vn&&(e.rv=vn,Fe===null&&o!==null&&o[tt]===e?tt++:Fe===null?Fe=[e]:Fe.push(e));else{C.deps??(C.deps=[]),vr.call(C.deps,e)||C.deps.push(e);var i=e.reactions;i===null?e.reactions=[C]:vr.call(i,C)||i.push(C)}}}if(b){if(!rt&<&&O===null&&It===null&&!lt.warned&&(lt.effect.f&2097152)===0&&!lt.effect_deps.has(e)){lt.warned=!0,$l(e.label);var a=zt("traced at");a&&console.warn(a)}if(Eo.delete(e),qt&&!rt&&go!==null&&C!==null&&go.reaction===C){if(e.trace)e.trace();else if(a=zt("traced at"),a){var l=go.entries.get(e);l===void 0&&(l={traces:[]},go.entries.set(e,l));var f=l.traces[l.traces.length-1];a.stack!==f?.stack&&l.traces.push(a)}}}if(Dt&&Mt.has(e))return Mt.get(e);if(r){var u=e;if(Dt){var v=u.v;return((u.f&1024)===0&&u.reactions!==null||Nf(u))&&(v=To(u)),Mt.set(u,v),v}var h=(u.f&512)===0&&!rt&&C!==null&&(C.f&512)!==0,m=(u.f&32768)===0;zr(u)&&(h&&(u.f|=512),js(u)),h&&!m&&(Gs(u),Rf(u))}if(Pe?.has(e))return Pe.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function Rf(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:vr.call(t,e)||t.push(e),(r.f&2)!==0&&(r.f&512)===0&&(Gs(r),Rf(r))}}function Nf(e){if(e.v===le)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Mt.has(t)||(t.f&2)!==0&&Nf(t))return!0;return!1}function se(e){var t=rt;try{return rt=!0,e()}finally{rt=t}}function Yi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ke in e)Bi(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&Ke in r&&Bi(r)}}}function Bi(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Bi(e[n],t)}catch{}let r=rn(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=_i(r);for(let o in n){let i=n[o].get;if(i)try{i.call(e)}catch{}}}}}var ku=/\r/g;function Cf(e){e=e.replace(ku,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}var Au=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var qh=[...Au,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Su=["touchstart","touchmove"];function Of(e){return Su.includes(e)}var Ru=["$state","$state.raw","$derived","$derived.by"],zh=[...Ru,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function qi(e){return e?.replace(/\//g,"/\u200B")}var gn=Symbol("events"),pa=new Set,zi=new Set;function Df(e,t,r,n={}){function o(i){if(n.capture||Gi.call(t,i),!i.cancelBubble)return yt(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?(o.__removed=!1,$e(()=>{o.__removed||t.addEventListener(e,o,n)})):t.addEventListener(e,o,n),o}function cr(e,t,r,n,o){var i={capture:n,passive:o},a=Df(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Me(()=>{a.__removed=!0,t.removeEventListener(e,a,i)})}function ye(e,t,r){(t[gn]??(t[gn]={}))[e]=r}function ji(e){for(var t=0;t<e.length;t++)pa.add(e[t]);for(var r of zi)r(e)}var ua=null,da=!1;function Gi(e){var t=this,r=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;ua=e,da||(da=!0,setTimeout(()=>{da=!1,ua=null}));var a=0,l=ua===e&&e[gn];if(l){var f=o.indexOf(l);if(f!==-1&&(t===document||t===window)){e[gn]=t;return}var u=o.indexOf(t);if(u===-1)return;f<=u&&(a=f)}if(i=o[a]||e.target,i!==t){Ie(e,"currentTarget",{configurable:!0,get(){return i||r}});var v=C,h=k;Se(null),Re(null);try{for(var m,_=[];i!==null&&i!==t;){try{var y=i[gn]?.[n];y!=null&&(!i.disabled||e.target===i)&&y.call(i,e)}catch(g){m?_.push(g):m=g}if(e.cancelBubble)break;a++,i=a<o.length?o[a]:null}if(m){for(let g of _)queueMicrotask(()=>{throw g});throw m}}finally{e[gn]=t,delete e.currentTarget,Se(v),Re(h)}}}var Cu=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Lf(e){return Cu?.createHTML(e)??e}function _a(e){var t=Wt("template");return t.innerHTML=Lf(e.replaceAll("<!>","<!---->")),t.content}function Je(e,t){var r=k;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Q(e,t){var r=(t&1)!==0,n=(t&2)!==0,o,i=!e.startsWith("<!>");return()=>{if(T)return Je(M,null),M;o===void 0&&(o=_a(i?e:"<!>"+e),r||(o=ve(o)));var a=n||Oo?document.importNode(o,!0):o.cloneNode(!0);if(r){var l=ve(a),f=a.lastChild;Je(l,f)}else Je(a,a);return a}}function Lo(e=""){if(!T){var t=be(e+"");return Je(t,t),t}var r=M;return r.nodeType!==nn?(r.before(r=be()),ne(r)):Io(r),Je(r,r),r}function Ar(){if(T)return Je(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=be();return e.append(t,r),Je(t,r),e}function D(e,t){if(T){var r=k;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=M),De();return}e!==null&&e.before(t)}function Mf(e){let t=0,r=Xe(0),n;return b&&Ze(r,"createSubscriber version"),()=>{Br()&&(s(r),He(()=>(t===0&&(n=se(()=>e(()=>_n(r)))),t+=1,()=>{$e(()=>{t-=1,t===0&&(n?.(),n=void 0,_n(r))})})))}}var Lu=589824;function ya(e,t,r,n){new ma(e,t,r,n)}var Tt,Fo,Pt,bn,Qe,kt,nt,At,ur,yn,Zr,Xn,Po,Ho,dr,Zi,G,Pf,Hf,ha,Kr,Uf,va,Mo,Ki,ga,ba,ma=class{constructor(t,r,n,o){F(this,G);re(this,"parent");re(this,"is_pending",!1);re(this,"transform_error");F(this,Tt);F(this,Fo,T?M:null);F(this,Pt);F(this,bn);F(this,Qe);F(this,kt,null);F(this,nt,null);F(this,At,null);F(this,ur,null);F(this,yn,0);F(this,Zr,0);F(this,Xn,!1);F(this,Po,new Set);F(this,Ho,new Set);F(this,dr,null);F(this,Zi,Mf(()=>(I(this,dr,Xe(c(this,yn))),b&&Ze(c(this,dr),"$effect.pending()"),()=>{I(this,dr,null)})));I(this,Tt,t),I(this,Pt,r),I(this,bn,i=>{var a=k;a.b=this,a.f|=128,n(i)}),this.parent=k.b,this.transform_error=o??this.parent?.transform_error??(i=>i),I(this,Qe,dt(()=>{if(T){let i=on(c(this,Fo));De();let a=i==="[!";if(i.startsWith("[?")){let f=JSON.parse(i.slice("[?".length));L(this,G,Hf).call(this,f)}else a?L(this,G,Uf).call(this):L(this,G,Pf).call(this)}else L(this,G,va).call(this)},Lu)),T&&I(this,Tt,M)}defer_effect(t){Ni(t,c(this,Po),c(this,Ho))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Pt).pending}update_pending_count(t,r){L(this,G,ga).call(this,t,r),I(this,yn,c(this,yn)+t),!(!c(this,dr)||c(this,Xn))&&(I(this,Xn,!0),$e(()=>{I(this,Xn,!1),c(this,dr)&&Gt(c(this,dr),c(this,yn))}))}get_effect_pending(){return c(this,Zi).call(this),s(c(this,dr))}error(t){if(t===ot||!c(this,Pt).onerror&&!c(this,Pt).failed)throw t;O?.is_fork?(c(this,kt)&&O.skip_effect(c(this,kt)),c(this,nt)&&O.skip_effect(c(this,nt)),c(this,At)&&O.skip_effect(c(this,At)),O.oncommit(()=>{L(this,G,Kr).call(this)||L(this,G,ba).call(this,t)})):L(this,G,ba).call(this,t)}};Tt=new WeakMap,Fo=new WeakMap,Pt=new WeakMap,bn=new WeakMap,Qe=new WeakMap,kt=new WeakMap,nt=new WeakMap,At=new WeakMap,ur=new WeakMap,yn=new WeakMap,Zr=new WeakMap,Xn=new WeakMap,Po=new WeakMap,Ho=new WeakMap,dr=new WeakMap,Zi=new WeakMap,G=new WeakSet,Pf=function(){try{I(this,kt,Ne(()=>c(this,bn).call(this,c(this,Tt))))}catch(t){this.error(t)}},Hf=function(t){let r=c(this,Pt).failed,{reset:n,invoke_onerror:o}=L(this,G,ha).call(this,t);$e(o),r&&I(this,At,Ne(()=>{r(c(this,Tt),()=>t,()=>n)}))},ha=function(t){var r=!1,n=!1;let o=()=>{if(!L(this,G,Kr).call(this)){if(r){Sl();return}r=!0,n&&ql(),c(this,At)!==null&&fr(c(this,At),()=>{I(this,At,null)}),L(this,G,Ki).call(this,()=>{L(this,G,va).call(this)})}};return{reset:o,invoke_onerror:()=>{if(!L(this,G,Kr).call(this))try{n=!0,c(this,Pt).onerror?.(t,o),n=!1}catch(a){at(a,c(this,Qe)&&c(this,Qe).parent)}}}},Kr=function(){return(c(this,Qe).f&33570816)!==0},Uf=function(){let t=c(this,Pt).pending;t&&(this.is_pending=!0,I(this,nt,Ne(()=>t(c(this,Tt)))),$e(()=>{if(!L(this,G,Kr).call(this)){var r=I(this,ur,document.createDocumentFragment()),n=be(),o=!1;if(r.append(n),I(this,kt,L(this,G,Ki).call(this,()=>{try{return Ne(()=>c(this,bn).call(this,n))}catch(i){try{this.error(i),o=!0}catch(a){at(a,c(this,Qe).parent)}return null}})),c(this,kt)===null){I(this,ur,null),o&&L(this,G,Mo).call(this,O);return}c(this,Zr)===0&&(c(this,Tt).before(r),I(this,ur,null),fr(c(this,nt),()=>{I(this,nt,null)}),L(this,G,Mo).call(this,O))}}))},va=function(){try{if(this.is_pending=this.has_pending_snippet(),I(this,Zr,0),I(this,yn,0),I(this,kt,Ne(()=>{c(this,bn).call(this,c(this,Tt))})),c(this,Zr)>0){var t=I(this,ur,document.createDocumentFragment());Wn(c(this,kt),t);let r=c(this,Pt).pending;I(this,nt,Ne(()=>r(c(this,Tt))))}else L(this,G,Mo).call(this,O)}catch(r){this.error(r)}},Mo=function(t){this.is_pending=!1,t.transfer_effects(c(this,Po),c(this,Ho))},Ki=function(t){var r=k,n=C,o=Y;Re(c(this,Qe)),Se(c(this,Qe)),br(c(this,Qe).ctx);try{return $t.ensure(),t()}finally{Re(r),Se(n),br(o)}},ga=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&L(n=this.parent,G,ga).call(n,t,r);return}I(this,Zr,c(this,Zr)+t),c(this,Zr)===0&&(L(this,G,Mo).call(this,r),c(this,nt)&&fr(c(this,nt),()=>{I(this,nt,null)}),c(this,ur)&&(c(this,Tt).before(c(this,ur)),I(this,ur,null)))},ba=function(t){c(this,kt)&&(ge(c(this,kt)),I(this,kt,null)),c(this,nt)&&(ge(c(this,nt)),I(this,nt,null)),c(this,At)&&(ge(c(this,At)),I(this,At,null)),T&&(ne(c(this,Fo)),vo(),ne(nr()));let r=c(this,Pt).failed,n=o=>{if(L(this,G,Kr).call(this))return;let{reset:i,invoke_onerror:a}=L(this,G,ha).call(this,o);a(),r&&!L(this,G,Kr).call(this)&&I(this,At,L(this,G,Ki).call(this,()=>{try{return Ne(()=>{var l=k;l.b=this,l.f|=128,r(c(this,Tt),()=>o,()=>i)})}catch(l){return at(l,c(this,Qe).parent),null}}))};$e(()=>{if(!L(this,G,Kr).call(this)){var o;try{o=this.transform_error(t)}catch(i){at(i,c(this,Qe)&&c(this,Qe).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(n,i=>at(i,c(this,Qe)&&c(this,Qe).parent)):n(o)}})};var $a=!0;function R(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[n=_o]??(e[n]=e.nodeValue))&&(e[_o]=r,e.nodeValue=`${r}`)}function Xi(e,t){return Vf(e,t)}function Uo(e,t){Ui(),t.intro=t.intro??!1;let r=t.target,n=T,o=M;try{for(var i=ve(r);i&&(i.nodeType!==vt||i.data!=="[");)i=Le(i);if(!i)throw ot;Te(!0),ne(i);let a=Vf(e,{...t,anchor:i});return Te(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
80
|
+
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==ot&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Pl(),Ui(),xo(r),Te(!1),Xi(e,t)}finally{Te(n),ne(o)}}var Wi=new Map;function Vf(e,{target:t,anchor:r,props:n={},events:o,context:i,intro:a=!0,transformError:l}){Ui();var f=void 0,u=$f(()=>{var v=r??t.appendChild(be());ya(v,{pending:()=>{}},_=>{bo({});var y=Y;if(i&&(y.c=i),o&&(n.$$events=o),T&&Je(_,null),$a=a,f=e(_,n)||$o(),$a=!0,T&&(k.nodes.end=M,M===null||M.nodeType!==vt||M.data!=="]"))throw Ur(),ot;yo()},l);var h=new Set,m=_=>{for(var y=0;y<_.length;y++){var g=_[y];if(!h.has(g)){h.add(g);var $=Of(g);for(let pe of[t,document]){var A=Wi.get(pe);A===void 0&&(A=new Map,Wi.set(pe,A));var K=A.get(g);K===void 0?(pe.addEventListener(g,Gi,{passive:$}),A.set(g,1)):A.set(g,K+1)}}}};return m(Sn(pa)),zi.add(m),()=>{for(var _ of h)for(let $ of[t,document]){var y=Wi.get($),g=y.get(_);--g==0?($.removeEventListener(_,Gi),y.delete(_),y.size===0&&Wi.delete($)):y.set(_,g)}zi.delete(m),v!==r&&v.parentNode?.removeChild(v)}});return wa.set(f,u),f}var wa=new WeakMap;function Vo(e,t){let r=wa.get(e);return r?(wa.delete(e),r(t)):(b&&kl(),Promise.resolve())}var Jt,pr,St,$n,Bo,Yo,Ji,_r=class{constructor(t,r=!0){re(this,"anchor");F(this,Jt,new Map);F(this,pr,new Map);F(this,St,new Map);F(this,$n,new Set);F(this,Bo,!0);F(this,Yo,t=>{if(c(this,Jt).has(t)){var r=c(this,Jt).get(t),n=c(this,pr).get(r);if(n)Zn(n),c(this,$n).delete(r);else{var o=c(this,St).get(r);o&&(Zn(o.effect),c(this,pr).set(r,o.effect),c(this,St).delete(r),b&&(o.fragment.lastChild[Ls]=this.anchor),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),n=o.effect)}for(let[i,a]of c(this,Jt)){if(c(this,Jt).delete(i),i===t)break;let l=c(this,St).get(a);l&&(ge(l.effect),c(this,St).delete(a))}for(let[i,a]of c(this,pr)){if(i===r||c(this,$n).has(i))continue;let l=()=>{if(Array.from(c(this,Jt).values()).includes(i)){var u=document.createDocumentFragment();Wn(a,u),u.append(be()),c(this,St).set(i,{effect:a,fragment:u})}else ge(a);c(this,$n).delete(i),c(this,pr).delete(i)};c(this,Bo)||!n?(c(this,$n).add(i),fr(a,l,!1)):l()}}});F(this,Ji,t=>{c(this,Jt).delete(t);let r=Array.from(c(this,Jt).values());for(let[n,o]of c(this,St))r.includes(n)||(ge(o.effect),c(this,St).delete(n))});this.anchor=t,I(this,Bo,r)}ensure(t,r){var n=O,o=Vi();if(r&&!c(this,pr).has(t)&&!c(this,St).has(t))if(o){var i=document.createDocumentFragment(),a=be();i.append(a),c(this,St).set(t,{effect:Ne(()=>r(a)),fragment:i})}else c(this,pr).set(t,Ne(()=>r(this.anchor)));if(c(this,Jt).set(n,t),o){for(let[l,f]of c(this,pr))l===t?n.unskip_effect(f):n.skip_effect(f);for(let[l,f]of c(this,St))l===t?n.unskip_effect(f.effect):n.skip_effect(f.effect);n.oncommit(c(this,Yo)),n.ondiscard(c(this,Ji))}else T&&(this.anchor=M),c(this,Yo).call(this,n)}};Jt=new WeakMap,pr=new WeakMap,St=new WeakMap,$n=new WeakMap,Bo=new WeakMap,Yo=new WeakMap,Ji=new WeakMap;function ae(e,t,r=!1){var n;T&&(n=M,De());var o=new _r(e),i=r?65536:0;function a(l,f){if(T){var u=on(n);if(l!==parseInt(u.substring(1))){var v=nr();ne(v),o.anchor=v,Te(!1),o.ensure(l,f),Te(!0);return}}o.ensure(l,f)}dt(()=>{var l=!1;t((f,u=0)=>{l=!0,a(u,f)}),l||a(-1,null)},i)}function Xr(e,t){return t}function Bu(e,t,r){for(var n=[],o=t.length,i,a=t.length,l=0;l<o;l++){let h=t[l];fr(h,()=>{if(i){if(i.pending.delete(h),i.done.add(h),i.pending.size===0){var m=e.outrogroups;xa(e,Sn(i.done)),m.delete(i),m.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var f=n.length===0&&r!==null&&e.pending.size===0;if(f){var u=r,v=u.parentNode;xo(v),v.append(u),e.items.clear()}xa(e,t,!f)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function xa(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(let a of e.pending.values())for(let l of a)n.add(e.items.get(l).e)}for(var o=0;o<t.length;o++){var i=t[o];if(n?.has(i)){i.f|=33554432;let a=document.createDocumentFragment();Wn(i,a)}else ge(t[o],r)}}var Qi;function Sr(e,t,r,n,o,i=null){var a=e,l=new Map,f=(t&4)!==0;if(f){var u=e;a=T?ne(ve(u)):u.appendChild(be())}T&&De();var v=null,h=Mn(()=>{var K=r();return Yt(K)?K:K==null?[]:Sn(K)});b&&Ze(h,"{#each ...}");var m=new Map,_=!0;function y(K){if((A.effect.f&16384)===0){A.pending.delete(K);var pe=s(h);A.fallback=v,Yu(A,pe,a,t,n),v!==null&&(pe.length===0?(v.f&33554432)===0?Zn(v):(v.f^=33554432,zo(v,null,a)):fr(v,()=>{v=null}))}}function g(K){A.pending.delete(K)}var $=dt(()=>{var K=s(h),pe=K.length;let xe=!1;if(T){var pt=on(a)==="[!";pt!==(pe===0)&&(a=nr(),ne(a),Te(!1),xe=!0)}for(var Ue=new Set,w=O,Qt=Vi(),_t=0;_t<pe;_t+=1){T&&M.nodeType===vt&&M.data==="]"&&(a=M,xe=!0,Te(!1));var je=K[_t],hr=n(je,_t);if(b){var mt=n(je,_t);hr!==mt&&Il(String(_t),String(hr),String(mt))}var ce=_?null:l.get(hr);ce?(ce.v&&Gt(ce.v,je),ce.i&&Gt(ce.i,_t),Qt&&w.unskip_effect(ce.e)):(ce=qu(l,_?a:Qi??(Qi=be()),je,hr,_t,o,t,r),_||(ce.e.f|=33554432),l.set(hr,ce)),Ue.add(hr)}if(pe===0&&i&&!v&&(_?v=Ne(()=>i(a)):(v=Ne(()=>i(Qi??(Qi=be()))),v.f|=33554432)),pe>Ue.size&&(b?zu(K,n):Hs("","","")),T&&pe>0&&ne(nr()),!_)if(m.set(w,Ue),Qt){for(let[ro,Cr]of l)Ue.has(ro)||w.skip_effect(Cr.e);w.oncommit(y),w.ondiscard(g)}else y(w);xe&&Te(!0),s(h)}),A={effect:$,flags:t,items:l,pending:m,outrogroups:null,fallback:v};_=!1,T&&(a=M)}function qo(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function Yu(e,t,r,n,o){var i=(n&8)!==0,a=t.length,l=e.items,f=qo(e.effect.first),u,v=null,h,m=[],_=[],y,g,$,A;if(i)for(A=0;A<a;A+=1)y=t[A],g=o(y,A),$=l.get(g).e,($.f&33554432)===0&&($.nodes?.a?.measure(),(h??(h=new Set)).add($));for(A=0;A<a;A+=1){if(y=t[A],g=o(y,A),$=l.get(g).e,e.outrogroups!==null)for(let je of e.outrogroups)je.pending.delete($),je.done.delete($);if(($.f&8192)!==0&&(Zn($),i&&($.nodes?.a?.unfix(),(h??(h=new Set)).delete($))),($.f&33554432)!==0)if($.f^=33554432,$===f)zo($,null,r);else{var K=v?v.next:f;$===e.effect.last&&(e.effect.last=$.prev),$.prev&&($.prev.next=$.next),$.next&&($.next.prev=$.prev),Wr(e,v,$),Wr(e,$,K),zo($,K,r),v=$,m=[],_=[],f=qo(v.next);continue}if($!==f){if(u!==void 0&&u.has($)){if(m.length<_.length){var pe=_[0],xe;v=pe.prev;var pt=m[0],Ue=m[m.length-1];for(xe=0;xe<m.length;xe+=1)zo(m[xe],pe,r);for(xe=0;xe<_.length;xe+=1)u.delete(_[xe]);Wr(e,pt.prev,Ue.next),Wr(e,v,pt),Wr(e,Ue,pe),f=pe,v=Ue,A-=1,m=[],_=[]}else u.delete($),zo($,f,r),Wr(e,$.prev,$.next),Wr(e,$,v===null?e.effect.first:v.next),Wr(e,v,$),v=$;continue}for(m=[],_=[];f!==null&&f!==$;)(u??(u=new Set)).add(f),_.push(f),f=qo(f.next);if(f===null)continue}($.f&33554432)===0&&m.push($),v=$,f=qo($.next)}if(e.outrogroups!==null){for(let je of e.outrogroups)je.pending.size===0&&(xa(e,Sn(je.done)),e.outrogroups?.delete(je));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||u!==void 0){var w=[];if(u!==void 0)for($ of u)($.f&8192)===0&&w.push($);for(;f!==null;)(f.f&8192)===0&&f!==e.fallback&&w.push(f),f=qo(f.next);var Qt=w.length;if(Qt>0){var _t=(n&4)!==0&&a===0?r:null;if(i){for(A=0;A<Qt;A+=1)w[A].nodes?.a?.measure();for(A=0;A<Qt;A+=1)w[A].nodes?.a?.fix()}Bu(e,w,_t)}}i&&$e(()=>{if(h!==void 0)for($ of h)$.nodes?.a?.apply()})}function qu(e,t,r,n,o,i,a,l){var f=(a&1)!==0?(a&16)===0?pn(r,!1,!1):Xe(r):null,u=(a&2)!==0?Xe(o):null;return b&&f&&(f.trace=()=>{l()[u?.v??o]}),{v:f,i:u,e:Ne(()=>(i(t,f??r,u??o,l),()=>{e.delete(n)}))}}function zo(e,t,r){if(e.nodes)for(var n=e.nodes.start,o=e.nodes.end,i=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var a=Le(n);if(i.before(n),n===o)return;n=a}}function Wr(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function zu(e,t){let r=new Map,n=e.length;for(let o=0;o<n;o++){let i=t(e[o],o);if(r.has(i)){let a=String(r.get(i)),l=String(o),f=String(i);f.startsWith("[object ")&&(f=null),Hs(a,l,f)}r.set(i,o)}}function ju(e,t,r){if(!t||t===Cf(String(r??"")))return;let n,o=e.__svelte_meta?.loc;o?n=`near ${o.file}:${o.line}:${o.column}`:gt?.[it]&&(n=`in ${gt[it]}`),Tl(qi(n))}function Ea(e,t,r=!1,n=!1,o=!1,i=!1){var a=e,l="";if(r){var f=e;T&&(a=ne(ve(f)))}z(()=>{var u=k;if(l===(l=t()??"")){T&&De();return}if(r&&!T){u.nodes=null,f.innerHTML=l,l!==""&&Je(ve(f),f.lastChild);return}if(u.nodes!==null&&(ca(u.nodes.start,u.nodes.end),u.nodes=null),l!==""){if(T){for(var v=M.data,h=De(),m=h;h!==null&&(h.nodeType!==vt||h.data!=="");)m=h,h=Le(h);if(h===null)throw Ur(),ot;b&&!i&&ju(h.parentNode,v,l),Je(M,m),a=ne(h);return}var _=n?mo:o?Fs:void 0,y=Wt(n?"svg":o?"math":"template",_);y.innerHTML=l;var g=n||o?y:y.content;if(Je(ve(g),g.lastChild),n||o)for(;ve(g);)a.before(ve(g));else a.before(g)}})}function wn(e,t,...r){var n=new _r(e);dt(()=>{let o=t()??null;b&&o==null&&Hl(),n.ensure(o,o&&(i=>o(i,...r)))},65536)}function Ta(e,t,r){Et(()=>{var n=se(()=>t(e,r?.())||{});if(r&&n?.update){var o=!1,i={};He(()=>{var a=r();Yi(a),o&&Ei(i,a)&&(i=a,n.update(a))}),o=!0}if(n?.destroy)return()=>n.destroy()})}var H$=[...`
|
|
81
|
+
\r\f\xA0\v\uFEFF`];function Yf(e,t=!1){var r=t?" !important;":";",n="";for(var o of Object.keys(e)){var i=e[o];i!=null&&i!==""&&(n+=" "+o+": "+i+r)}return n}function ka(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function qf(e,t){if(t){var r="",n,o;if(Array.isArray(t)?(n=t[0],o=t[1]):n=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var i=!1,a=0,l=!1,f=[];n&&f.push(...Object.keys(n).map(ka)),o&&f.push(...Object.keys(o).map(ka));var u=0,v=-1;let g=e.length;for(var h=0;h<g;h++){var m=e[h];if(l?m==="/"&&e[h-1]==="*"&&(l=!1):i?i===m&&(i=!1):m==="/"&&e[h+1]==="*"?l=!0:m==='"'||m==="'"?i=m:m==="("?a++:m===")"&&a--,!l&&i===!1&&a===0){if(m===":"&&v===-1)v=h;else if(m===";"||h===g-1){if(v!==-1){var _=ka(e.substring(u,v).trim());if(!f.includes(_)){m!==";"&&h++;var y=e.substring(u,h).trim();r+=" "+y+";"}}u=h+1,v=-1}}}}return n&&(r+=Yf(n)),o&&(r+=Yf(o,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Aa(e,t={},r,n){for(var o in r){var i=r[o];t[o]!==i&&(r[o]==null?e.style.removeProperty(o):e.style.setProperty(o,i,n))}}function xn(e,t,r,n){var o=e[po];if(T||o!==t){var i=qf(t,n);(!T||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e[po]=t}else n&&(Array.isArray(n)?(Aa(e,r?.[0],n[0]),Aa(e,r?.[1],n[1],"important")):Aa(e,r,n));return n}function Ra(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Ju(e,t){var r=e.__defaultValue,n=e.multiple,o=n?r??[]:null;if(!(n&&!Yt(o))){var i=e.selectedIndex,a=t&&n?new Set(e.selectedOptions):null;for(var l of e.options){var f=Sa(l);Ra(l,n?o.includes(f):Hi(f,r))}if(t)if(a!==null)for(l of e.options){var u=a.has(l);l.selected!==u&&(l.selected=u)}else e.selectedIndex!==i&&(e.selectedIndex=i)}}function Jr(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Yt(t))return Al();for(var n of e.options)n.selected=t.includes(Sa(n));return}for(n of e.options){var o=Sa(n);if(Hi(o,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function En(e){var t=new MutationObserver(r=>{r.every(Qu)||("__defaultValue"in e&&Ju(e,!1),"__value"in e&&Jr(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Me(()=>{t.disconnect()})}function Sa(e){return"__value"in e?e.__value:e.value}function Qu(e){if(e.target.closest("selectedcontent")!==null)return!0;if(e.type==="childList"){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(r=>r.nodeName==="SELECTEDCONTENT")}return!1}var od=Symbol("is custom element"),id=Symbol("is html"),sd=Ms?"link":"LINK";function Jn(e){if(T){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;ee(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var o=e.checked;ee(e,"checked",null),e.checked=o}}};e[Hr]=r,$e(r),Ci()}}function es(e,t){var r=Kf(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function ee(e,t,r,n){var o=Kf(e);if(T&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===sd)){n||ld(e,t,r??"");return}o[t]!==(o[t]=r)&&(t==="loading"&&(e[yl]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ad(e).has(t)?e[t]=r:e.setAttribute(t,r))}function Kf(e){var t;return e[t=yi]??(e[t]={[od]:e.nodeName.includes("-"),[id]:e.namespaceURI===$i})}var zf=new Map;function ad(e){var t=e.getAttribute("is")||e.nodeName,r=zf.get(t);if(r)return r;zf.set(t,r=new Set);for(var n,o=e,i=Element.prototype;i!==o;){n=_i(o);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);o=rn(o)}return r}function ld(e,t,r){b&&(t==="srcset"&&fd(e,r)||Na(e.getAttribute(t)??"",r)||El(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function Na(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function jf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function fd(e,t){var r=jf(e.srcset),n=jf(t);return n.length===r.length&&n.every(([o,i],a)=>i===r[a][1]&&(Na(r[a][0],o)||Na(o,r[a][0])))}function rs(e,t,r=t){var n=new WeakSet;Vs(e,"input",async o=>{b&&e.type==="checkbox"&&Ps();var i=o?e.defaultValue:e.value;if(i=Ca(e)?Oa(i):i,r(i),O!==null&&n.add(O),await Gr(),i!==(i=t())){var a=e.selectionStart,l=e.selectionEnd,f=e.value.length;if(e.value=i??"",l!==null){var u=e.value.length;a===l&&l===f&&u>f?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=a,e.selectionEnd=Math.min(l,u))}}}),(T&&e.defaultValue!==e.value||se(t)==null&&e.value)&&(r(Ca(e)?Oa(e.value):e.value),O!==null&&n.add(O)),He(()=>{b&&e.type==="checkbox"&&Ps();var o=t();if(e===document.activeElement){var i=ke?It:O;if(n.has(i))return}Ca(e)&&o===Oa(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function Ca(e){var t=e.type;return t==="number"||t==="range"}function Oa(e){return e===""?null:+e}function Ia(e,t){return e===t||e?.[Ke]===t}function Tn(e=$o(),t,r,n){var o=Y.r,i=k;return Et(()=>{var a,l;return He(()=>{a=l,l=n?.()||[],se(()=>{Ia(r(...l),e)||(t(e,...l),a&&Ia(r(...a),e)&&t(null,...a))})}),()=>{let f=i;for(;f!==o&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;let u=()=>{l&&Ia(r(...l),e)&&t(null,...l)},v=f.teardown;f.teardown=()=>{u(),v?.()}}}),e}function Zf(e){return new La(e)}var Rr,Ht,La=class{constructor(t){F(this,Rr);F(this,Ht);var r=new Map,n=(i,a)=>{var l=pn(a,!1,!1);return r.set(i,l),l};let o=new Proxy({...t.props||{},$$events:{}},{get(i,a){return s(r.get(a)??n(a,Reflect.get(i,a)))},has(i,a){return a===gi?!0:(s(r.get(a)??n(a,Reflect.get(i,a))),Reflect.has(i,a))},set(i,a,l){return E(r.get(a)??n(a,l),l),Reflect.set(i,a,l)}});I(this,Ht,(t.hydrate?Uo:Xi)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),!ke&&(!t?.props?.$$host||t.sync===!1)&&qr(),I(this,Rr,o.$$events);for(let i of Object.keys(c(this,Ht)))i==="$set"||i==="$destroy"||i==="$on"||Ie(this,i,{get(){return c(this,Ht)[i]},set(a){c(this,Ht)[i]=a},enumerable:!0});c(this,Ht).$set=i=>{Object.assign(o,i)},c(this,Ht).$destroy=()=>{Vo(c(this,Ht))}}$set(t){c(this,Ht).$set(t)}$on(t,r){c(this,Rr)[t]=c(this,Rr)[t]||[];let n=(...o)=>r.call(this,...o);return c(this,Rr)[t].push(n),()=>{c(this,Rr)[t]=c(this,Rr)[t].filter(o=>o!==n)}}$destroy(){c(this,Ht).$destroy()}};Rr=new WeakMap,Ht=new WeakMap;var bd;typeof HTMLElement=="function"&&(bd=class extends HTMLElement{constructor(t,r,n){super();re(this,"$$ctor");re(this,"$$s");re(this,"$$c");re(this,"$$cn",!1);re(this,"$$d",{});re(this,"$$r",!1);re(this,"$$p_d",{});re(this,"$$l",{});re(this,"$$l_u",new Map);re(this,"$$me");re(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=r,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let o=this.$$c.$on(t,r);this.$$l_u.set(r,o)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return i=>{let a=Wt("slot");o!=="default"&&(a.name=o),D(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=yd(this);for(let o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),r.default=!0):r[o]=t(o));for(let o of this.attributes){let i=this.$$g_p(o.name);i in this.$$d||(this.$$d[i]=Ma(i,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=Zf({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=la(()=>{He(()=>{this.$$r=!0;for(let o of Cs(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let i=Ma(o,this.$$d[o],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,i)}this.$$r=!1})});for(let o in this.$$l)for(let i of this.$$l[o]){let a=this.$$c.$on(o,i);this.$$l_u.set(i,a)}this.$$l={}}}attributeChangedCallback(t,r,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ma(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Cs(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Ma(e,t,r,n){let o=r[e]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function yd(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}if(b){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;Ul(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function Wf(e){Y===null&&ki("onMount"),Vr&&Y.l!==null?wd(Y).m.push(e):Xt(()=>{let t=se(e);if(typeof t=="function")return t})}function wd(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var Xf;typeof window<"u"&&((Xf=window.__svelte??(window.__svelte={})).v??(Xf.v=new Set)).add("5");var Fa=["directory","file","link"];function Ed(e){if(typeof e!="object"||e===null)return!1;let t=e;return["name","size","modified"].includes(String(t.field))&&["asc","desc"].includes(String(t.direction))&&["natural","locale","unicode"].includes(String(t.nameMode))&&typeof t.directoriesFirst=="boolean"}function Jf(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(e,1e9)):0}function ns(e,t,r,n,o=[],i=null){let a=new URL(e).searchParams,l={...n,query:(a.get("dw.q")??"").slice(0,4096),selected:null,windowY:0,listTop:0};if(t==="ledger"){let f=a.get("dw.sort")?.split(":");if(f?.length===4){let u={field:f[0],direction:f[1],nameMode:f[2],directoriesFirst:f[3]==="folders"};["folders","mixed"].includes(f[3])&&Ed(u)&&(l.sort=u)}if(a.has("dw.types")){let u=a.get("dw.types").split(",").filter(Boolean);u.every(v=>Fa.includes(v))&&(l.types=[...new Set(u)])}}else{let f=a.get("dw.category");f!==null&&o.includes(f)&&(l.category=f)}if(typeof i=="object"&&i!==null&&"dirwell"in i){let f=i.dirwell;if(typeof f=="object"&&f!==null&&"version"in f&&f.version===1&&"theme"in f&&f.theme===t&&"path"in f&&f.path===r&&"view"in f&&typeof f.view=="object"&&f.view!==null){let u=f.view;l.selected=typeof u.selected=="string"&&u.selected.length<=4096?u.selected:null,l.windowY=Jf(u.windowY),l.listTop=Jf(u.listTop)}}return l}function Td(e,t,r,n){let o=new URL(e);for(let i of["dw.q","dw.sort","dw.types","dw.category"])o.searchParams.delete(i);if(r.query&&o.searchParams.set("dw.q",r.query.slice(0,4096)),t==="ledger"){if(r.sort&&["field","direction","nameMode","directoriesFirst"].some(i=>r.sort[i]!==n.sort?.[i])){let i=r.sort;o.searchParams.set("dw.sort",`${i.field}:${i.direction}:${i.nameMode}:${i.directoriesFirst?"folders":"mixed"}`)}r.types&&Fa.some(i=>r.types.includes(i)!==(n.types??Fa).includes(i))&&o.searchParams.set("dw.types",r.types.join(","))}else r.category&&r.category!==n.category&&o.searchParams.set("dw.category",r.category);return o.href}function Qf(e){let t=location.href,r=history.state,n=(o,i,a)=>({...typeof history.state=="object"&&history.state!==null?history.state:{},dataHref:o,dirwell:{version:1,theme:e,path:i,...a===void 0?{}:{view:{query:a.query,...a.sort===void 0?{}:{sort:{...a.sort}},...a.types===void 0?{}:{types:[...a.types]},category:a.category??null,selected:a.selected??null,windowY:a.windowY??0,listTop:a.listTop??0}}}});return{save(o,i,a,l){if(location.href!==t)return;let f=Td(t,e,a,l),u=n(o,i,a);try{history.replaceState(u,"",f),t=f,r=u}catch{}},commit(o,i,a,l){let f=n(o,i);l?history.pushState(f,"",a):history.replaceState(f,"",a),t=a,r=f},rollback(){if(location.href!==t)try{history.replaceState(r,"",t)}catch{}}}}var kd={directory:'<path d="M3 7V5h6l2 3h10v12H3Z"/><path d="M3 10h18"/>',file:'<path d="M5 3h9l5 5v13H5ZM14 3v5h5M8 12h8M8 16h6"/>',link:'<path d="m9 15 6-6M8 10l-3 3a4 4 0 0 0 6 6l3-3M10 8l3-3a4 4 0 0 1 6 6l-3 3"/>'};function ec(e){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${kd[e]}</svg>`}function Pa(e){let t=new Set,r=(o,i)=>{if(i>32)throw new TypeError("Presentation data is too deeply nested");if(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number"&&Number.isFinite(o))return o;if(typeof o!="object"||o===null||t.has(o))throw new TypeError("Presentation data must be finite, acyclic JSON");t.add(o);try{if(Array.isArray(o))return o.map(a=>r(a,i+1));if(Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null)throw new TypeError("Presentation data must use plain objects");return Object.fromEntries(Object.entries(o).map(([a,l])=>[a,r(l,i+1)]))}finally{t.delete(o)}};if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Presentation data must be an object");let n=r(e,0);if(typeof n!="object"||n===null||Array.isArray(n))throw new TypeError("Presentation data must be an object");return n}var V=class extends Error{constructor(){super(...arguments);re(this,"name","ListingDataError")}},jo=class extends V{},Qn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),os=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>=0,tc=e=>typeof e=="string"&&["directory","file","symlink","other"].includes(e);function Nr(e,t){if(typeof e!="string")throw new V(`Invalid ${t}`);return e}function Ha(e,t){if(typeof e!="boolean")throw new V(`Invalid ${t}`);return e}function Ad(e,t){if(e===null)return null;let r=new URL(Nr(e,"href"),t);if(!["http:","https:"].includes(r.protocol))throw new V("Unsupported listing link protocol");return r.href}function rc(e,t){if(!Qn(e)||!tc(e.kind)||typeof e.size!="number"||!Number.isFinite(e.size)||e.size<0)throw new V("Invalid listing entry");let r=null;if(e.link!==null){if(!Qn(e.link))throw new V("Invalid link metadata");let n=e.link.targetKind;if(n!==null&&(!tc(n)||n==="symlink"))throw new V("Invalid target kind");let o=e.link.targetSize;if(o!==null&&(typeof o!="number"||!Number.isFinite(o)||o<0))throw new V("Invalid target size");r={target:Nr(e.link.target,"target"),targetKind:n,targetSize:o,unavailable:Ha(e.link.unavailable,"unavailable"),cycle:Ha(e.link.cycle,"cycle")}}return{...e.data===void 0?{}:{data:Pa(e.data)},...e.presentation===void 0?{}:{presentation:Pa(e.presentation)},id:Nr(e.id,"id"),name:Nr(e.name,"name"),kind:e.kind,href:Ad(e.href,t),exitsExplorer:Ha(e.exitsExplorer,"exitsExplorer"),size:e.size,modifiedAt:Nr(e.modifiedAt,"modifiedAt"),link:r}}function Sd(e){if(!Qn(e)||e.version!==1||!os(e.total)||!Array.isArray(e.blocks)||!Qn(e.sort))throw new V("Invalid listing manifest");let t=e.sort;if(typeof t.field!="string"||!["name","size","modified"].includes(t.field)||typeof t.direction!="string"||!["asc","desc"].includes(t.direction)||typeof t.nameMode!="string"||!["locale","natural","unicode"].includes(t.nameMode)||typeof t.directoriesFirst!="boolean")throw new V("Invalid listing order");let r=t.field==="size"?"size":t.field==="modified"?"modified":"name",n=t.direction==="desc"?"desc":"asc",o=t.nameMode==="unicode"?"unicode":t.nameMode==="locale"?"locale":"natural",i=e.blocks.map(a=>{if(!Qn(a)||!os(a.offset)||!os(a.count))throw new V("Invalid block descriptor");return{href:Nr(a.href,"block href"),offset:a.offset,count:a.count}});if(i.length===0)throw new V("Missing blocks");return{version:1,revision:Nr(e.revision,"revision"),directory:Nr(e.directory,"directory"),hrefBase:Nr(e.hrefBase,"href base"),total:e.total,sort:{field:r,direction:n,nameMode:o,directoriesFirst:t.directoriesFirst},blocks:i}}async function Go(e,t={}){let r=t.fetch??fetch,n=t.maxEntries??1e5;if(!os(n))throw new V("Invalid entry limit");let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new V("Listing loading requires HTTP(S); use native file navigation");for(let i=0;i<2;i++)try{let a={...t.signal===void 0?{}:{signal:t.signal},cache:i===0?t.cache??"default":"reload"},l=await r(o,a);if(!l.ok)throw new V(`Manifest request failed: ${l.status}`);let f=Sd(await l.json());if(f.total>n)throw new V("Listing exceeds the configured entry limit");let u=new URL(f.hrefBase,o);if(!["http:","https:"].includes(u.protocol))throw new V("Unsupported href base protocol");let v=[],h=new Set;for(let m of f.blocks){if(m.offset!==v.length||m.count+v.length>f.total)throw new V("Invalid block coverage");let _=new URL(m.href,o);if(_.origin!==o.origin||!["http:","https:"].includes(_.protocol))throw new V("Block leaves the manifest origin");let y=await r(_,a);if(y.status===404||y.status===410)throw new jo("Block no longer available");if(!y.ok)throw new V(`Block request failed: ${y.status}`);let g=await y.json();if(!Qn(g)||g.version!==1||g.revision!==f.revision)throw new jo("Listing revision changed");if(g.offset!==m.offset||g.total!==f.total||!Array.isArray(g.entries)||g.entries.length!==m.count)throw new V("Invalid block envelope");for(let $ of g.entries){let A=rc($,u);if(h.has(A.id))throw new V("Duplicate entry ID");h.add(A.id),v.push(A)}}if(v.length!==f.total)throw new V("Incomplete listing");return{manifest:f,entries:v}}catch(a){if(t.signal?.aborted||!(a instanceof jo)||i===1)throw a}throw new V("Listing unavailable")}function nc(e,t,r=1e5){if(!Array.isArray(e)||e.length>r)throw new V("Invalid page slice");let n=new URL(t),o=new Set,i=e.map(a=>rc(a,n));for(let a of i){if(o.has(a.id))throw new V("Duplicate entry ID");o.add(a.id)}return i}var Rd={other:"other",crosswaveKeyboardHelp:"Arrow keys navigate \xB7 Enter confirms \xB7 Backspace returns",brokenLink:"broken link",unavailableLink:"unavailable link",cycleLink:"cycle link",azure:"azure",violet:"violet",amber:"amber",rose:"rose",jade:"jade",graphite:"graphite",allFiles:"All files",categoryFolders:"Folders",categoryPhotos:"Photos",categoryMusic:"Music",categoryVideos:"Videos",categoryDocuments:"Documents",categoryOther:"Other",indexOf:"Index of {path}",home:"Home",breadcrumb:"Breadcrumb",archive:"File archive",searchDirectory:"Search this directory",searchFiles:"Search files",search:"Search",types:"Types",directory:"directory",file:"file",link:"link",folder:"Folder",sort:"Sort",name:"Name",size:"Size",modified:"Modified",names:"Names",natural:"Natural",locale:"Locale",unicode:"Unicode",order:"Order",ascending:"Ascending",descending:"Descending",directoriesFirst:"Folders first",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",searchArchive:"Search archive",archiveSearchInput:"Search archive files",entries:"{count} entries",pageEntries:"{total} entries \xB7 {count} on this page",loading:"Loading\u2026",noMatches:"No matching entries.",empty:"This directory is empty.",pagination:"Pagination",previous:"Previous",next:"Next",page:"Page {page} of {pages}",keyboardHelp:"Arrow keys select files \xB7 Home / End jump \xB7 / searches \xB7 Backspace opens parent",modifiedTime:"Modified time",close:"Close",unknown:"Unknown",unavailable:"Target unavailable",beginArchive:"Enter a search to begin.",searchingArchive:"Searching archive\u2026",archiveResults:"{count} results",truncatedResults:"Showing {shown} of {count} results",archiveError:"Could not load archive search. Try again.",listingError:"Could not load complete directory data. Native page links remain available.",folderError:"Could not open the folder. Its native link remains available.",updatesError:"Live updates disconnected. Refresh to retry.",retry:"Retry",openNative:"Open folder directly",categories:"File categories",items:"{count} items",filesIn:"Files in {path}",controller:"Controller \xB7 Confirm / Back",color:"Color",pauseMotion:"Pause motion",resumeMotion:"Resume motion",copyLink:"Copy link",copyPath:"Copy path",download:"Download",copied:"Copied.",copyError:"Could not copy. Use the native link or select the path.",repository:"Repository",author:"by",target:"Target",newTab:"opens in a new tab"};function eo(e={}){let t=e.language===void 0?"en":e.language,r=e.locale===void 0?"en-US":e.locale,n=e.timeZone===void 0?"UTC":e.timeZone;for(let[h,m]of Object.entries({language:t,locale:r,timeZone:n}))if(typeof m!="string"||!m)throw new TypeError(`${h} must be a non-empty string`);new Intl.DateTimeFormat(r,{timeZone:n});let o=e.direction??"ltr";if(o!=="ltr"&&o!=="rtl")throw new TypeError("direction must be ltr or rtl");let i={...Rd};if(e.labels!==void 0){if(typeof e.labels!="object"||e.labels===null||Array.isArray(e.labels))throw new TypeError("labels must be an object");for(let[h,m]of Object.entries(e.labels)){if(!Object.hasOwn(i,h)||typeof m!="string")throw new TypeError(`Unsupported label or value: ${h}`);Object.assign(i,{[h]:m})}}let a=e.brand??{};if(typeof a!="object"||a===null||Array.isArray(a))throw new TypeError("brand must be an object");for(let[h,m]of Object.entries(a)){if(!["name","logoUrl","logoAlt","footerText","footerUrl","faviconUrl"].includes(h)||typeof m!="string")throw new TypeError(`Unsupported brand option or value: ${h}`);if(h.endsWith("Url")&&!/^https?:\/\//i.test(m)&&!(m.startsWith("/")&&!m.startsWith("//")))throw new TypeError(`brand.${h} must be an HTTP(S) or root-relative URL`)}let l=e.columns??["name","size","modified"];if(!Array.isArray(l)||!l.includes("name"))throw new TypeError("columns must contain name and unique supported columns");let f=new Set;for(let h of l){let m;if(typeof h=="string"){if(!["name","size","modified"].includes(h))throw new TypeError("Unsupported column");m=h}else{if(typeof h!="object"||h===null||Object.keys(h).some(_=>!["dataKey","label"].includes(_))||typeof h.dataKey!="string"||!h.dataKey||typeof h.label!="string"||!h.label)throw new TypeError("Data columns require dataKey and label");m="data:"+h.dataKey}if(f.has(m))throw new TypeError("columns must contain unique supported columns");f.add(m)}let u=e.actions??[];if(!Array.isArray(u)||new Set(u).size!==u.length||u.some(h=>!["copy-link","copy-path","download"].includes(h)))throw new TypeError("actions must contain unique supported actions");let v=e.cssVariables??{};if(typeof v!="object"||v===null||Array.isArray(v))throw new TypeError("cssVariables must be an object");for(let[h,m]of Object.entries(v))if(!/^--[a-zA-Z][a-zA-Z0-9_-]*$/.test(h)||typeof m!="string"||/[{};<>]/.test(m))throw new TypeError(`Invalid CSS variable: ${h}`);return{language:t,dateOptions:{...e.locale===void 0?{}:{locale:e.locale},...e.timeZone===void 0?{}:{timeZone:e.timeZone}},direction:o,locale:r,timeZone:n,labels:i,brand:{...a},columns:l.map(h=>typeof h=="string"?h:{...h}),actions:[...u],cssVariables:{...v}}}var sS=eo();function Zo(e,t,r={}){return e.labels[t].replace(/\{([a-zA-Z]+)\}/g,(n,o)=>Object.hasOwn(r,o)?String(r[o]):n)}var Ko=new Map;function Ua(e,t,r=!1){let n=new Date(e);if(Number.isNaN(n.getTime()))return t.labels.unknown;if(t.dateOptions.locale===void 0&&t.dateOptions.timeZone===void 0)return r?n.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"}):n.toISOString().slice(0,16).replace("T"," ")+" UTC";let o=t.dateOptions.locale,i=t.dateOptions.timeZone??(r?void 0:"UTC"),a=String(o)+"\0"+String(i),l=Ko.get(a);return l===void 0&&(l=new Intl.DateTimeFormat(o,{timeZone:i,dateStyle:"short",timeStyle:"short"}),Ko.size>=32&&Ko.delete(Ko.keys().next().value),Ko.set(a,l)),l.format(n)}async function oc(e,t){let r=e==="copy-link"&&t.href?new URL(t.href,document.baseURI).href:t.id;if(!navigator.clipboard?.writeText)throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(r)}function ic(e,t){return typeof e=="string"?t.labels[e]:e.label}function sc(e){return e==null?"":typeof e=="object"?JSON.stringify(e):String(e)}async function Va(e,t,r,n,o=!1,i=0){let a=new URL(e,document.baseURI);if(a.origin!==location.origin)throw new V("Folder leaves the theme origin");let l=await fetch(a,{signal:n,cache:o?"no-store":"default"});if(!l.ok)throw new V("Unavailable folder");let f=await l.json();if(typeof f!="object"||f===null||Array.isArray(f))throw new V("Invalid folder snapshot");let u=f;if(u.version!==1||u.theme!==r||typeof u.title!="string"||typeof u.path!="string"||!Number.isSafeInteger(u.total)||Number(u.total)<0||!Array.isArray(u.breadcrumbs))throw new V("Unsupported folder snapshot");if(u.metadataHead!==void 0&&typeof u.metadataHead!="string")throw new V("Invalid folder metadata");let v=u.sort;if(!v||typeof v!="object"||!["name","size","modified"].includes(String(v.field))||!["asc","desc"].includes(String(v.direction))||!["natural","locale","unicode"].includes(String(v.nameMode))||typeof v.directoriesFirst!="boolean")throw new V("Invalid folder order");if(r==="crosswave"){let g=u.categories,$=new Set;if(!Array.isArray(g)||g.length===0||g.some(A=>typeof A!="object"||A===null||typeof A.id!="string"||!A.id||$.has(A.id)||typeof A.label!="string"||typeof A.svg!="string"?!0:($.add(A.id),!1)))throw new V("Invalid folder categories")}let h=document.querySelector("base")?.href??t,m=g=>{if(g===null)return null;if(typeof g!="string")throw new V("Invalid folder link");let $=new URL(g,h);if(!["http:","https:"].includes($.protocol)||$.origin!==location.origin)throw new V("Unsupported folder link");return $.href},_=nc(u.entries,h).map(g=>({...g,...g.presentation?{presentation:{...g.presentation,folderDataHref:m(g.presentation.folderDataHref??null)}}:{}}));if(_.length>Number(u.total))throw new V("Invalid folder count");if(u.page!==null){let g=u.page;if(!g||typeof g!="object"||!Number.isSafeInteger(g.number)||Number(g.number)<1||!Number.isSafeInteger(g.count)||Number(g.count)<Number(g.number)||!Number.isSafeInteger(g.offset)||Number(g.offset)<0||Number(g.offset)>Number(u.total)||g.total!==u.total)throw new V("Invalid folder pagination");u.page={...g,href:m(g.href),previousHref:m(g.previousHref),nextHref:m(g.nextHref)}}u.ui!==void 0&&eo(u.ui);let y={...u,updatesHref:m(u.updatesHref??null),entries:_,dataHref:a.href,manifestHref:m(u.manifestHref),rootHref:m(u.rootHref),rootDataHref:m(u.rootDataHref),parentHref:m(u.parentHref),parentDataHref:m(u.parentDataHref),breadcrumbs:u.breadcrumbs.map(g=>{if(typeof g!="object"||g===null||!("name"in g)||!("href"in g)||!("dataHref"in g)||typeof g.name!="string")throw new V("Invalid breadcrumb");return{name:g.name,href:m(g.href),dataHref:m(g.dataHref)}})};if(y.manifestHref){let g=await Go(y.manifestHref,{signal:n,cache:o?"no-store":"default"});if(g.manifest.total!==u.total||u.listingRevision!==void 0&&g.manifest.revision!==u.listingRevision){if(i<2)return Va(e,t,r,n,!0,i+1);throw new V("Folder changed while refreshing")}y.entries=[...g.entries]}return y}var is=new WeakMap;function ac(e,t){if(!t||typeof document>"u")return e;let r=document.querySelector("[data-dirwell-theme]");if(!r)return e;let n=is.get(r)??e;return is.set(r,n),n}function lc(e,t){let r=document.querySelector("[data-dirwell-theme]");r&&is.has(r)&&is.set(r,e),document.title=typeof e.title=="string"?e.title:"";let n=document.createElement("template");n.innerHTML=typeof e.metadataHead=="string"?e.metadataHead:"",document.head.querySelectorAll("[data-dirwell-metadata]").forEach(a=>a.remove());let o=document.querySelector("base")?.href??t,i=a=>{try{let l=new URL(a,o);return["http:","https:"].includes(l.protocol)?l.href:null}catch{return null}};for(let a of n.content.children){if(!a.hasAttribute("data-dirwell-metadata"))continue;let l;if(a.tagName==="META"){let f=a.hasAttribute("property")?"property":"name",u=a.getAttribute(f)??"";if(!/^(?:description|og:[a-z_:]+|twitter:[a-z_:]+)$/i.test(u))continue;let v=a.getAttribute("content")??"";if(["og:image","og:url","twitter:image"].includes(u)){let h=i(v);if(h===null)continue;v=h}l=document.createElement("meta"),l.setAttribute(f,u),l.setAttribute("content",v)}else if(a.tagName==="LINK"&&a.getAttribute("rel")==="canonical"){let f=i(a.getAttribute("href")??"");if(f===null)continue;l=document.createElement("link"),l.setAttribute("rel","canonical"),l.setAttribute("href",f)}else continue;l.setAttribute("data-dirwell-metadata",""),document.head.append(l)}}var to=e=>e.kind==="directory"||e.link?.targetKind==="directory",Ba=e=>e.kind==="symlink"?"link":to(e)?"directory":"file";function Ya(e,t){let r=0,n=0,o=-2;for(let i of e.trim().toLocaleLowerCase()){let a=t.toLocaleLowerCase().indexOf(i,n);if(a<0)return null;a===o+1&&(r+=8),(a===0||/[\s/_.-]/.test(t[a-1]??""))&&(r+=5),r+=Math.max(0,4-a*.05),o=a,n=a+1}return r-t.length*.01}function cc(e,t,r,n){return e.map(o=>({entry:o,score:Ya(t,`${o.name} ${o.link?.target??""}`)})).filter(o=>r.includes(Ba(o.entry))&&o.score!==null).sort((o,i)=>{if(t.trim()&&o.score!==i.score)return(i.score??0)-(o.score??0);let a=o.entry,l=i.entry;if(n.directoriesFirst&&to(a)!==to(l))return to(a)?-1:1;let f=()=>n.nameMode==="unicode"?fc(a.name,l.name):a.name.localeCompare(l.name,void 0,{numeric:n.nameMode==="natural",sensitivity:"base"}),u=(n.field==="name"?f():n.field==="size"?(a.kind==="directory"?0:a.size)-(l.kind==="directory"?0:l.size):a.modifiedAt.localeCompare(l.modifiedAt))||f();return(n.direction==="asc"?u:-u)||fc(a.id,l.id)}).map(o=>o.entry)}function fc(e,t){let r=[...e],n=[...t];for(let o=0;o<Math.min(r.length,n.length);o++){let i=(r[o]?.codePointAt(0)??0)-(n[o]?.codePointAt(0)??0);if(i)return i}return r.length-n.length}function uc(e){let t=["B","KiB","MiB","GiB","TiB"],r=e,n=0;for(;r>=1024&&n<4;)r/=1024,n++;return`${r.toFixed(n===0||r>=100?0:1)} ${t[n]}`}var Nd=Q('<img width="40" height="40"/>'),Cd=Q("<!> <h1> </h1> <span> </span>",1),Od=Q("/ <a> </a>",1),Id=Q('<label><input type="checkbox"/> </label>'),ss=Q("<button> </button>"),qa=Q("<a> </a>"),Dd=Q("<span> </span>"),Ld=Q('<li class="entry"><a>../</a></li>'),dc=Q('<li aria-hidden="true"></li>'),Md=Q('<span class="file-icon" aria-hidden="true"></span> ',1),Fd=Q('<a class="name"><!></a>'),Pd=Q("<span><!></span>"),Hd=Q('<small class="target"> </small>'),Ud=Q('<span class="identity"><!><!></span>'),Vd=Q('<span class="kind"> </span>'),Bd=Q('<button class="timestamp-button"><time> </time></button>'),Yd=Q('<span class="entry-data"> </span>'),qd=Q('<a download=""> </a>'),zd=Q('<span data-dirwell-actions="" style="grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.5rem"><!> <!></span>'),jd=Q('<li class="entry" data-entry=""><!> <!></li>'),Gd=Q("<p> </p>"),Kd=Q('<a rel="prev"> </a>'),Zd=Q('<a rel="next"> </a>'),Wd=Q("<nav><!> <!></nav>"),Xd=Q('<p class="brand-footer"><!></p>'),Jd=Q('<p class="keyboard-help"> </p>'),Qd=Q("<dialog><h2> </h2> <p> </p> <p> </p> <button> </button></dialog>"),ep=Q("<li><!></li>"),tp=Q('<dialog><h2> </h2> <input type="search"/> <p role="status"> </p> <!> <ul></ul> <button> </button></dialog>'),rp=Q('<header class="page-header"><div class="wordmark"><!></div> <nav><a> </a><!></nav></header> <main data-explorer="" data-framework="svelte"><div class="toolbar"><label class="search-field"> <input type="search"/></label> <fieldset><legend> </legend><!></fieldset> <label> <select><option> </option><option> </option><option> </option></select></label> <label> <select><option> </option><option> </option><option> </option></select></label> <label> <select><option> </option><option> </option></select></label> <label><input type="checkbox"/> </label> <label> <select><option> </option><option> </option><option> </option></select></label> <!></div> <section class="listing-card"><div class="listing-summary"> <span data-visible-count=""> </span> <span role="status" aria-live="polite"> </span></div> <!> <!> <div class="entry-head"></div> <ul class="entry-list"><!> <!> <!> <!></ul> <!></section> <!> <!></main> <!> <!>',1);function za(e,t){bo(t,!0);let r=se(()=>ac(t.model,!1)),n=q(r),o=q(r.entries),i=q(""),a=q(Zt(["directory","file","link"])),l=q(r.sort),f=q("system"),u=q(null),v=q(!1),h=q(!1),m=q(""),_=q(null),y=q(null),g=q(!1),$=q(0),A=q(800),K=q(!1),pe=q(""),xe=q([]),pt=q(Zt(eo(r.ui).labels.beginArchive)),Ue=q(null),w=Ot(()=>eo(s(n).ui)),Qt=q(!1),_t=Ot(()=>Zo(s(w),s(mt)?"entries":"pageEntries",{count:"__COUNT__",total:s(n).total}).split("__COUNT__")),je=q(new Map),hr=Ot(()=>s(v)&&s(n).updatesHref?new URL(s(n).updatesHref,document.baseURI).href:null),mt=Ot(()=>s(o).length===s(n).total),ce=Ot(()=>cc(s(o),s(g)?"":s(i),s(a),s(l))),ro=Ot(()=>s(v)&&s(ce).length>500),Cr=Ot(()=>{let d=[0];for(let p of s(ce))d.push(d.at(-1)+(s(je).get(p.id)??76));return d}),no=Ot(()=>{if(!s(ro))return 0;let d=0,p=s(ce).length;for(;d<p;){let x=d+p>>1;s(Cr)[x+1]<=s($)?d=x+1:p=x}return Math.max(0,d-5)}),as=Ot(()=>{if(!s(ro))return s(ce).length;let d=0,p=s(ce).length;for(;d<p;){let x=d+p>>1;s(Cr)[x+1]<=s($)+s(A)?d=x+1:p=x}return Math.min(s(ce).length,Math.max(s(no)+35,d+5))});function pc(d,p){if(typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{let N=d.getBoundingClientRect().height;if(N>0&&s(je).get(p)!==N){let U=new Map(s(je));U.set(p,N),E(je,U)}});return x.observe(d),{destroy:()=>x.disconnect()}}let Or=q(void 0),Wo=q(void 0),ls=q(void 0),oo=q(void 0),io=q(void 0),Ir=0,so,fs,Xo=0,ja=null,Ga="",Ka=0,kn,An=null,ao=d=>({query:"",sort:d.sort,types:["directory","file","link"]});function cs(){kn&&kn.save(new URL(s(n).dataHref,document.baseURI).href,s(n).path,{query:s(i),types:s(a),sort:s(l),selected:s(u),windowY:window.scrollY,listTop:s($)},ao(s(n)))}function _c(){s(_)==="folder"&&An?Qr(...An,!0):Qr(s(n).dataHref,location.href,!1,!0)}Xt(()=>{if(!s(v)||s(h))return;let d={query:s(i),types:s(a),sort:s(l),selected:s(u),listTop:s($)},p=s(n).dataHref,x=s(n).path,N=ao(s(n)),U=requestAnimationFrame(()=>kn?.save(new URL(p,document.baseURI).href,x,{...d,windowY:window.scrollY},N));return()=>cancelAnimationFrame(U)});let Jo=to;function Za(d){return typeof location<"u"&&location.protocol==="file:"&&Jo(d)&&!d.exitsExplorer&&d.href?.endsWith("/")?d.href+"index.html":d.href}async function Wa(){if(s(mt)||!s(n).manifestHref||location.protocol==="file:")return;let d=so,p=Ir;E(h,!0);try{let x=await Go(new URL(s(n).manifestHref,document.baseURI).href,{signal:d.signal,cache:s(n).updatesHref?"no-store":"default"});p===Ir&&!d.signal.aborted&&E(o,x.entries)}catch{p===Ir&&!d.signal.aborted&&(E(m,s(w).labels.listingError,!0),E(_,"listing"))}finally{p===Ir&&E(h,!1)}}async function mc(d,p){cs();let x=p.presentation?.folderDataHref;p.exitsExplorer||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||typeof x!="string"||location.protocol==="file:"||(d?.preventDefault(),await Qr(x,new URL(p.href,document.baseURI).href,!0))}async function Qr(d,p,x,N=!1,U=null,te=!1){x&&cs();let j=++Ir;so?.abort();let Z=so=new AbortController;E(h,!0),E(m,""),E(_,null);try{let P=await Va(d,p,"ledger",Z.signal,N||te),X=P.entries;if(N&&P.manifestHref&&X.length!==P.total&&(X=(await Go(P.manifestHref,{signal:Z.signal,cache:"no-store"})).entries),j!==Ir||Z.signal.aborted)return;if(N||kn.commit(P.dataHref,P.path,p,x),E(n,P),E(o,X),An=null,!N){let _e=ns(p,"ledger",P.path,ao(P),[],U);E(i,_e.query,!0),E(a,_e.types,!0),E(l,_e.sort),E(u,_e.selected,!0),E($,_e.listTop,!0)}if(lc(P,p),await Wa(),!N){let _e=ns(p,"ledger",P.path,ao(P),[],U);await Gr(),s(u)&&!s(ce).some(Ut=>Ut.id===s(u))&&E(u,null),window.scrollTo({top:_e.windowY}),U&&s(u)&&s(Or)?.querySelector(`[data-id="${CSS.escape(s(u))}"] a`)?.focus({preventScroll:!0})}}catch{j===Ir&&!Z.signal.aborted&&(E(m,s(w).labels.folderError,!0),E(_,"folder"),An=[d,p,x,N,U],kn?.rollback())}finally{j===Ir&&E(h,!1)}}function us(d,p,x){typeof p!="string"||typeof x!="string"||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||location.protocol==="file:"||(d?.preventDefault(),Qr(x,new URL(p,document.baseURI).href,!0))}async function hc(d){let p=Math.max(0,Math.min(s(ce).length-1,d)),x=s(ce)[p];x&&(E(u,x.id,!0),s(ro)&&(E($,Math.max(0,s(Cr)[p]-100),!0),s(Or)&&window.scrollTo({top:s(Or).getBoundingClientRect().top+window.scrollY+s($)})),await Gr(),s(Or)?.querySelector(`[data-order="${d}"] a`)?.focus({preventScroll:!0}))}function vc(d){if(d.isComposing||d.altKey||d.ctrlKey||d.metaKey)return;if(s(K)){d.key==="Escape"&&(d.preventDefault(),E(K,!1));return}if(s(y)){d.key==="Escape"&&E(y,null);return}if(d.target?.closest?.("[data-dirwell-actions]"))return;let p=/INPUT|TEXTAREA|SELECT/.test(d.target?.tagName??"");if(d.key==="/"&&!p){d.preventDefault(),s(Wo)?.focus();return}if(p){d.key==="Escape"&&(E(i,""),s(Wo)?.blur());return}if(d.key==="Backspace"&&s(n).parentHref){d.preventDefault(),location.protocol==="file:"||typeof s(n).parentDataHref!="string"?location.href=s(n).parentHref:Qr(s(n).parentDataHref,new URL(s(n).parentHref,document.baseURI).href,!0);return}let x=s(ce).findIndex(N=>N.id===s(u));["ArrowDown","ArrowUp","Home","End"].includes(d.key)&&(d.preventDefault(),hc(d.key==="Home"?0:d.key==="End"?s(ce).length-1:x+(d.key==="ArrowDown"?1:-1)))}function gc(d){E(f,d,!0);try{localStorage.setItem("dirwell-color-scheme",d)}catch{}}async function Xa(){let d=++Xo;fs?.abort();let p=fs=new AbortController;E(xe,[]),E(Qt,!1);let x=s(pe).trim();if(!x){E(pt,s(w).labels.beginArchive,!0);return}E(pt,s(w).labels.searchingArchive,!0);try{let N=new URL(s(n).searchIndexHref,document.baseURI),U=Ga===N.href&&Date.now()-Ka<6e4?ja:null;if(U===null){let j=await fetch(N,{signal:p.signal});if(!j.ok)throw new Error("Unavailable archive");let Z=await j.json();if(Z.version!==3||!Array.isArray(Z.shards)||!Number.isSafeInteger(Z.count)||Z.count>1e5)throw new Error("Unsupported archive");U=[];for(let P of Z.shards){if(typeof P!="string")throw new Error("Invalid shard");let X=new URL(P,N);if(X.origin!==N.origin)throw new Error("Unsafe shard");let _e=await fetch(X,{signal:p.signal});if(!_e.ok)throw new Error("Unavailable shard");let Ut=await _e.json();if(!Array.isArray(Ut.entries)||U.length+Ut.entries.length>1e5)throw new Error("Invalid archive");for(let de of Ut.entries){if(typeof de.name!="string"||typeof de.path!="string"||typeof de.exitsExplorer!="boolean")throw new Error("Invalid archive record");let me=de.href===null?null:new URL(de.href,N);if(me&&!["http:","https:"].includes(me.protocol))throw new Error("Unsupported archive link");U.push({name:de.name,path:de.path,href:me?.href??null,exitsExplorer:de.exitsExplorer})}}if(d!==Xo||p.signal.aborted)return;ja=U,Ga=N.href,Ka=Date.now()}let te=U.map(j=>({record:j,score:Ya(x,j.name+" "+j.path)})).filter(j=>j.score!==null).sort((j,Z)=>Z.score-j.score||j.record.path.localeCompare(Z.record.path));if(d!==Xo||p.signal.aborted)return;E(xe,te.slice(0,100).map(j=>j.record)),E(pt,te.length>100?Zo(s(w),"truncatedResults",{shown:100,count:te.length}):Zo(s(w),"archiveResults",{count:te.length}),!0)}catch{d===Xo&&!p.signal.aborted&&(E(pt,s(w).labels.archiveError,!0),E(Qt,!0))}}Wf(()=>{E(A,innerHeight,!0),E(v,!0),so=new AbortController;try{let x=localStorage.getItem("dirwell-color-scheme");["system","light","dark"].includes(x)&&E(f,x,!0)}catch{}kn=Qf("ledger");let d=ns(location.href,"ledger",s(n).path,ao(s(n)),[],history.state);E(i,d.query,!0),E(a,d.types,!0),E(l,d.sort),E(u,d.selected,!0),E($,d.listTop,!0),cs();let p=x=>{x.state?.dataHref?Qr(x.state.dataHref,location.href,!1,!1,x.state):location.reload()};return window.addEventListener("popstate",p),Wa(),()=>{so?.abort(),fs?.abort(),window.removeEventListener("popstate",p)}}),Xt(()=>{let d=s(hr);if(!d||typeof EventSource>"u")return;let p=new EventSource(d);return p.onmessage=()=>E(Ue,d,!0),p.onerror=()=>{E(m,s(w).labels.updatesError,!0),E(_,"updates")},p.onopen=()=>{s(_)==="updates"&&(E(m,""),E(_,null))},()=>p.close()}),Xt(()=>{if(s(v)&&!s(h)&&s(Ue)){let d=s(Ue);E(Ue,null),d===s(hr)&&Qr(s(n).dataHref,location.href,!1,!0)}}),Xt(()=>{s(v)&&(document.documentElement.dataset.theme=s(f))}),Xt(()=>{s(oo)&&s(y)&&!s(oo).open&&s(oo).showModal()}),Xt(()=>{s(io)&&s(K)&&!s(io).open&&(s(io).showModal(),Gr().then(()=>s(ls)?.focus()))});var Ja=rp();cr("resize",hn,()=>E(A,innerHeight,!0)),cr("keydown",hn,vc),cr("scroll",hn,()=>{s(Or)&&E($,Math.max(0,window.scrollY-s(Or).offsetTop),!0)});var ds=xt(Ja),ps=W(ds),bc=W(ps);{var yc=d=>{var p=Ar(),x=xt(p);wn(x,()=>t.header,()=>({model:s(n)})),D(d,p)},$c=d=>{var p=Cd(),x=xt(p);{var N=P=>{var X=Nd();z(()=>{ee(X,"src",s(w).brand.logoUrl),ee(X,"alt",s(w).brand.logoAlt??"")}),D(P,X)};ae(x,P=>{s(w).brand.logoUrl&&P(N)})}var U=S(x,2),te=H(U,!0),j=S(U,2),Z=H(j,!0);z(()=>{R(te,s(w).brand.name??s(n).title),R(Z,s(w).labels.archive)}),D(d,p)};ae(bc,d=>{t.header?d(yc):d($c,-1)})}B(ps);var _s=S(ps,2),Qo=W(_s),wc=H(Qo,!0),xc=S(Qo);Sr(xc,17,()=>s(n).breadcrumbs,Xr,(d,p)=>{vo();var x=Od(),N=S(xt(x)),U=H(N,!0);z(()=>{ee(N,"href",s(p).href),R(U,s(p).name)}),ye("click",N,te=>us(te,s(p).href,s(p).dataHref)),D(d,x)}),B(_s),B(ds);var ei=S(ds,2),ms=W(ei),hs=W(ms),Qa=W(hs,!0),en=S(Qa);Jn(en),Tn(en,d=>E(Wo,d),()=>s(Wo)),B(hs);var ti=S(hs,2),el=W(ti),Ec=H(el,!0),Tc=S(el);Sr(Tc,16,()=>["directory","file","link"],Xr,(d,p)=>{var x=Id(),N=W(x);Jn(N);var U=S(N,1,!0);B(x),z(te=>{es(N,te),R(U,s(w).labels[p])},[()=>s(a).includes(p)]),ye("change",N,te=>E(a,te.currentTarget.checked?[...s(a),p]:s(a).filter(j=>j!==p),!0)),D(d,x)}),B(ti);var vs=S(ti,2),tl=W(vs,!0),Dr=S(tl),ri=W(Dr),kc=H(ri,!0);ri.value=ri.__value="name";var ni=S(ri),Ac=H(ni,!0);ni.value=ni.__value="size";var gs=S(ni),Sc=H(gs,!0);gs.value=gs.__value="modified",B(Dr);var oi;En(Dr),B(vs);var bs=S(vs,2),rl=W(bs,!0),Lr=S(rl),ii=W(Lr),Rc=H(ii,!0);ii.value=ii.__value="natural";var si=S(ii),Nc=H(si,!0);si.value=si.__value="locale";var ys=S(si),Cc=H(ys,!0);ys.value=ys.__value="unicode",B(Lr);var ai;En(Lr),B(bs);var $s=S(bs,2),nl=W($s,!0),Mr=S(nl),li=W(Mr),Oc=H(li,!0);li.value=li.__value="asc";var ws=S(li),Ic=H(ws,!0);ws.value=ws.__value="desc",B(Mr);var fi;En(Mr),B($s);var xs=S($s,2),lo=W(xs);Jn(lo);var Dc=S(lo,1,!0);B(xs);var Es=S(xs,2),ol=W(Es,!0),Fr=S(ol),ci=W(Fr),Lc=H(ci,!0);ci.value=ci.__value="system";var ui=S(ci),Mc=H(ui,!0);ui.value=ui.__value="light";var Ts=S(ui),Fc=H(Ts,!0);Ts.value=Ts.__value="dark",B(Fr);var di;En(Fr),B(Es);var Pc=S(Es,2);{var Hc=d=>{var p=ss(),x=H(p,!0);z(()=>{p.disabled=!s(v)||!s(n).searchIndexHref,R(x,s(w).labels.searchArchive)}),ye("click",p,()=>E(K,!0)),D(d,p)};ae(Pc,d=>{s(n).searchIndexHref&&d(Hc)})}B(ms);var ks=S(ms,2),As=W(ks),il=W(As,!0),sl=S(il),Uc=H(sl,!0),al=S(sl,1,!0),Vc=S(al),Bc=H(Vc,!0);B(As);var ll=S(As,2);{var Yc=d=>{var p=ss(),x=H(p,!0);z(()=>{p.disabled=s(h),R(x,s(w).labels.retry)}),ye("click",p,_c),D(d,p)};ae(ll,d=>{s(_)&&s(_)!=="copy"&&d(Yc)})}var fl=S(ll,2);{var qc=d=>{var p=qa(),x=H(p,!0);z(()=>{ee(p,"href",An[1]),R(x,s(w).labels.openNative)}),D(d,p)};ae(fl,d=>{s(_)==="folder"&&An&&d(qc)})}var fo=S(fl,2);let cl;Sr(fo,21,()=>s(w).columns,Xr,(d,p)=>{var x=Dd(),N=H(x,!0);z(U=>R(N,U),[()=>ic(s(p),s(w))]),D(d,x)}),B(fo);var pi=S(fo,2),ul=W(pi);{var zc=d=>{var p=Ld(),x=H(p);z(()=>ee(x,"href",s(n).parentHref)),ye("click",x,N=>us(N,s(n).parentHref,s(n).parentDataHref)),D(d,p)};ae(ul,d=>{s(n).parentHref&&d(zc)})}var dl=S(ul,2);{var jc=d=>{var p=dc();let x;z(()=>x=xn(p,"",x,{height:s(Cr)[s(no)]+"px"})),D(d,p)};ae(dl,d=>{s(no)&&d(jc)})}var pl=S(dl,2);Sr(pl,19,()=>s(ce).slice(s(no),s(as)),d=>d.id,(d,p,x)=>{var N=jd();let U;var te=W(N);Sr(te,17,()=>s(w).columns,Xr,(P,X)=>{var _e=Ar(),Ut=xt(_e);{var de=Ge=>{var Ee=Ud(),Ce=W(Ee);{var Oe=Nt=>{var et=Fd(),uo=W(et);{var Ss=Be=>{var Bt=Ar(),tn=xt(Bt);wn(tn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(Be,Bt)},Rs=Be=>{var Bt=Md(),tn=xt(Bt);Ea(tn,()=>ec(Ba(s(p))),!0),B(tn);var iu=S(tn);z(su=>R(iu,` ${s(p).name??""}${su??""}`),[()=>Jo(s(p))?"/":""]),D(Be,Bt)};ae(uo,Be=>{t.row?Be(Ss):Be(Rs,-1)})}B(et),z(Be=>{ee(et,"href",Be),ee(et,"target",s(p).exitsExplorer?"_blank":void 0),ee(et,"rel",s(p).exitsExplorer?"noopener":void 0)},[()=>Za(s(p))]),ye("click",et,Be=>mc(Be,s(p))),cr("focus",et,()=>E(u,s(p).id,!0)),D(Nt,et)},Rt=Nt=>{var et=Pd(),uo=W(et);{var Ss=Be=>{var Bt=Ar(),tn=xt(Bt);wn(tn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(Be,Bt)},Rs=Be=>{var Bt=Lo();z(()=>R(Bt,s(p).name)),D(Be,Bt)};ae(uo,Be=>{t.row?Be(Ss):Be(Rs,-1)})}B(et),D(Nt,et)};ae(Ce,Nt=>{s(p).href?Nt(Oe):Nt(Rt,-1)})}var Vt=S(Ce);{var co=Nt=>{var et=Hd(),uo=H(et);z(()=>R(uo,`${s(p).link.unavailable?s(w).labels.unavailable+" \xB7 ":"\u2192 "}${s(p).link.target??""}`)),D(Nt,et)};ae(Vt,Nt=>{s(p).link&&Nt(co)})}B(Ee),D(Ge,Ee)},me=Ge=>{var Ee=Vd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>Jo(s(p))?s(w).labels.folder:uc(s(p).size)]),D(Ge,Ee)},Ve=Ge=>{var Ee=Bd(),Ce=W(Ee),Oe=H(Ce,!0);B(Ee),z(Rt=>{Ee.disabled=!s(v),ee(Ce,"datetime",s(p).modifiedAt),R(Oe,Rt)},[()=>Ua(s(p).modifiedAt,s(w),s(v))]),ye("click",Ee,()=>E(y,s(p).modifiedAt,!0)),D(Ge,Ee)},Pr=Ge=>{var Ee=Yd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>sc(s(p).data?.[s(X).dataKey])]),D(Ge,Ee)};ae(Ut,Ge=>{s(X)==="name"?Ge(de):s(X)==="size"?Ge(me,1):s(X)==="modified"?Ge(Ve,2):Ge(Pr,-1)})}D(P,_e)});var j=S(te,2);{var Z=P=>{var X=zd(),_e=W(X);{var Ut=me=>{var Ve=Ar(),Pr=xt(Ve);wn(Pr,()=>t.actions,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(me,Ve)};ae(_e,me=>{t.actions&&me(Ut)})}var de=S(_e,2);Sr(de,17,()=>s(w).actions,Xr,(me,Ve)=>{var Pr=Ar(),Ge=xt(Pr);{var Ee=Rt=>{var Vt=qd(),co=H(Vt,!0);z(Nt=>{ee(Vt,"href",Nt),R(co,s(w).labels.download)},[()=>Za(s(p))]),D(Rt,Vt)},Ce=Ot(()=>s(Ve)==="download"&&s(p).href&&!Jo(s(p))&&!s(p).link?.unavailable),Oe=Rt=>{var Vt=ss(),co=H(Vt,!0);z(()=>{Vt.disabled=!s(v)||s(Ve)==="copy-link"&&!s(p).href,ee(Vt,"aria-label",(s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)+": "+s(p).name),R(co,s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)}),ye("click",Vt,async()=>{try{await oc(s(Ve),s(p)),E(m,s(w).labels.copied,!0),E(_,null)}catch{E(m,s(w).labels.copyError,!0),E(_,"copy")}}),D(Rt,Vt)};ae(Ge,Rt=>{s(Ce)?Rt(Ee):s(Ve)!=="download"&&Rt(Oe,1)})}D(me,Pr)}),B(X),D(P,X)};ae(j,P=>{(t.actions||s(w).actions.length)&&P(Z)})}B(N),Ta(N,(P,X)=>pc?.(P,X),()=>s(p).id),z((P,X)=>{ee(N,"data-custom-columns",P),ee(N,"data-id",s(p).id),ee(N,"data-order",s(no)+s(x)),ee(N,"data-active",s(u)===s(p).id),U=xn(N,"",U,{"grid-template-columns":X})},[()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(P=>P==="name"?"minmax(0,1fr)":"minmax(6rem,max-content)").join(" "):void 0]),D(d,N)});var Gc=S(pl,2);{var Kc=d=>{var p=dc();let x;z(()=>x=xn(p,"",x,{height:s(Cr)[s(ce).length]-s(Cr)[s(as)]+"px"})),D(d,p)};ae(Gc,d=>{s(as)<s(ce).length&&d(Kc)})}B(pi),Tn(pi,d=>E(Or,d),()=>s(Or));var Zc=S(pi,2);{var Wc=d=>{var p=Gd(),x=H(p,!0);z(()=>R(x,s(n).total===0?s(w).labels.empty:s(w).labels.noMatches)),D(d,p)};ae(Zc,d=>{s(ce).length===0&&!s(h)&&d(Wc)})}B(ks);var _l=S(ks,2);{var Xc=d=>{var p=Wd(),x=W(p);{var N=Z=>{var P=Kd(),X=H(P,!0);z(()=>{ee(P,"href",s(n).page.previousHref),R(X,s(w).labels.previous)}),D(Z,P)};ae(x,Z=>{s(n).page.previousHref&&Z(N)})}var U=S(x),te=S(U);{var j=Z=>{var P=Zd(),X=H(P,!0);z(()=>{ee(P,"href",s(n).page.nextHref),R(X,s(w).labels.next)}),D(Z,P)};ae(te,Z=>{s(n).page.nextHref&&Z(j)})}B(p),z(Z=>{ee(p,"aria-label",s(w).labels.pagination),R(U,` ${Z??""} `)},[()=>Zo(s(w),"page",{page:s(n).page.number,pages:s(n).page.count})]),D(d,p)};ae(_l,d=>{s(n).page?.count>1&&!s(mt)&&d(Xc)})}var Jc=S(_l,2);{var Qc=d=>{var p=Ar(),x=xt(p);wn(x,()=>t.footer,()=>({model:s(n)})),D(d,p)},eu=d=>{var p=Xd(),x=W(p);{var N=te=>{var j=qa(),Z=H(j,!0);z(()=>{ee(j,"href",s(w).brand.footerUrl),R(Z,s(w).brand.footerText)}),D(te,j)},U=te=>{var j=Lo();z(()=>R(j,s(w).brand.footerText)),D(te,j)};ae(x,te=>{s(w).brand.footerUrl?te(N):te(U,-1)})}B(p),D(d,p)},tu=d=>{var p=Jd(),x=H(p,!0);z(()=>R(x,s(w).labels.keyboardHelp)),D(d,p)};ae(Jc,d=>{t.footer?d(Qc):s(w).brand.footerText?d(eu,1):d(tu,-1)})}B(ei);var ml=S(ei,2);{var ru=d=>{var p=Qd(),x=W(p),N=H(x,!0),U=S(x,2),te=H(U,!0),j=S(U,2),Z=H(j,!0),P=S(j,2),X=H(P,!0);B(p),Tn(p,_e=>E(oo,_e),()=>s(oo)),z(_e=>{R(N,s(w).labels.modifiedTime),R(te,s(y)),R(Z,_e),R(X,s(w).labels.close)},[()=>s(w).dateOptions.locale!==void 0||s(w).dateOptions.timeZone!==void 0?Ua(s(y),s(w),!0):new Date(s(y)).toLocaleString()]),cr("close",p,()=>E(y,null)),ye("click",P,()=>E(y,null)),D(d,p)};ae(ml,d=>{s(y)&&d(ru)})}var nu=S(ml,2);{var ou=d=>{var p=tp(),x=W(p),N=H(x,!0),U=S(x,2);Jn(U),Tn(U,de=>E(ls,de),()=>s(ls));var te=S(U,2),j=H(te,!0),Z=S(te,2);{var P=de=>{var me=ss(),Ve=H(me,!0);z(()=>R(Ve,s(w).labels.retry)),ye("click",me,Xa),D(de,me)};ae(Z,de=>{s(Qt)&&de(P)})}var X=S(Z,2);Sr(X,21,()=>s(xe),Xr,(de,me)=>{var Ve=ep(),Pr=W(Ve);{var Ge=Ce=>{var Oe=qa(),Rt=H(Oe,!0);z(()=>{ee(Oe,"href",s(me).href),ee(Oe,"target",s(me).exitsExplorer?"_blank":void 0),ee(Oe,"rel",s(me).exitsExplorer?"noopener":void 0),R(Rt,s(me).path)}),D(Ce,Oe)},Ee=Ce=>{var Oe=Lo();z(()=>R(Oe,s(me).path)),D(Ce,Oe)};ae(Pr,Ce=>{s(me).href?Ce(Ge):Ce(Ee,-1)})}B(Ve),D(de,Ve)}),B(X);var _e=S(X,2),Ut=H(_e,!0);B(p),Tn(p,de=>E(io,de),()=>s(io)),z(()=>{R(N,s(w).labels.searchArchive),ee(U,"aria-label",s(w).labels.archiveSearchInput),R(j,s(pt)),R(Ut,s(w).labels.close)}),cr("close",p,()=>E(K,!1)),ye("input",U,Xa),rs(U,()=>s(pe),de=>E(pe,de)),ye("click",_e,()=>E(K,!1)),D(d,p)};ae(nu,d=>{s(K)&&d(ou)})}z((d,p,x)=>{ee(_s,"aria-label",s(w).labels.breadcrumb),ee(Qo,"href",s(n).rootHref),R(wc,s(w).labels.home),ee(ei,"aria-busy",s(h)),R(Qa,s(w).labels.searchDirectory),ee(en,"placeholder",s(w).labels.searchFiles),en.disabled=!s(v)||!s(mt),ti.disabled=!s(v)||!s(mt),R(Ec,s(w).labels.types),R(tl,s(w).labels.sort),Dr.disabled=!s(v)||!s(mt),R(kc,s(w).labels.name),R(Ac,s(w).labels.size),R(Sc,s(w).labels.modified),oi!==(oi=s(l).field)&&(Dr.value=(Dr.__value=oi)??"",Jr(Dr,oi)),R(rl,s(w).labels.names),Lr.disabled=!s(v)||!s(mt),R(Rc,s(w).labels.natural),R(Nc,s(w).labels.locale),R(Cc,s(w).labels.unicode),ai!==(ai=s(l).nameMode)&&(Lr.value=(Lr.__value=ai)??"",Jr(Lr,ai)),R(nl,s(w).labels.order),Mr.disabled=!s(v)||!s(mt),R(Oc,s(w).labels.ascending),R(Ic,s(w).labels.descending),fi!==(fi=s(l).direction)&&(Mr.value=(Mr.__value=fi)??"",Jr(Mr,fi)),es(lo,s(l).directoriesFirst),lo.disabled=!s(v)||!s(mt),R(Dc,s(w).labels.directoriesFirst),R(ol,s(w).labels.appearance),Fr.disabled=!s(v),R(Lc,s(w).labels.system),R(Mc,s(w).labels.light),R(Fc,s(w).labels.dark),di!==(di=s(f))&&(Fr.value=(Fr.__value=di)??"",Jr(Fr,di)),R(il,s(_t)[0]),R(Uc,s(mt)?s(ce).length:s(o).length),R(al,d),R(Bc,s(h)?s(w).labels.loading:s(m)),ee(fo,"data-custom-columns",p),cl=xn(fo,"",cl,{"grid-template-columns":x})},[()=>s(_t).slice(1).join("__COUNT__"),()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(d=>d==="name"?"minmax(0,1fr)":typeof d=="object"?"minmax(0,12rem)":"minmax(6rem,max-content)").join(" "):void 0]),ye("click",Qo,d=>us(d,s(n).rootHref,s(n).rootDataHref)),cr("compositionstart",en,()=>E(g,!0)),cr("compositionend",en,()=>E(g,!1)),rs(en,()=>s(i),d=>E(i,d)),ye("change",Dr,d=>E(l,{...s(l),field:d.currentTarget.value})),ye("change",Lr,d=>E(l,{...s(l),nameMode:d.currentTarget.value})),ye("change",Mr,d=>E(l,{...s(l),direction:d.currentTarget.value})),ye("change",lo,d=>E(l,{...s(l),directoriesFirst:d.currentTarget.checked})),ye("change",Fr,d=>gc(d.currentTarget.value)),D(e,Ja),yo()}ji(["click","change","input"]);var np=document.querySelector("[data-dirwell-theme]"),op=JSON.parse(document.querySelector("#dirwell-page-data").textContent),ip=Uo(za,{target:np,props:{model:op}});globalThis.__dirwellUnmount=()=>Vo(ip);})();
|