@dirwell/theme-ledger 0.0.2 → 0.0.4
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 +12 -2
- package/dist/client.js +24 -24
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +13 -36
- package/dist/index.mjs.map +1 -1
- package/dist/{model-BgCmoksr.d.mts → model-CeW-leLg.d.mts} +3 -3
- package/dist/model.d.mts +1 -1
- package/dist/source/Ledger.svelte +90 -54
- package/dist/styles.css +195 -546
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -31,51 +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 pu=Object.defineProperty;var yl=e=>{throw TypeError(e)};var _u=(e,t,r)=>t in e?pu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var re=(e,t,r)=>_u(e,typeof t!="symbol"?t+"":t,r),
|
|
34
|
+
"use strict";(()=>{var pu=Object.defineProperty;var yl=e=>{throw TypeError(e)};var _u=(e,t,r)=>t in e?pu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var re=(e,t,r)=>_u(e,typeof t!="symbol"?t+"":t,r),Ms=(e,t,r)=>t.has(e)||yl("Cannot "+r);var c=(e,t,r)=>(Ms(e,t,"read from private field"),r?r.call(e):t.get(e)),H=(e,t,r)=>t.has(e)?yl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),D=(e,t,r,n)=>(Ms(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),M=(e,t,r)=>(Ms(e,t,"access private method"),r);var bl=globalThis.process?.env?.NODE_ENV,y=bl&&!bl.toLowerCase().startsWith("prod");var qt=Array.isArray,$l=Array.prototype.indexOf,yr=Array.prototype.includes,Cn=Array.from,Fs=Object.keys,Ie=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,vi=Object.getOwnPropertyDescriptors,Ps=Object.prototype,wl=Array.prototype,on=Object.getPrototypeOf,Hs=Object.isExtensible;var tr=()=>{};function gi(e){for(var t=0;t<e.length;t++)e[t]()}function yi(){var e,t,r=new Promise((n,o)=>{e=n,t=o});return{promise:r,resolve:e,reject:t}}var Ge=Symbol("$state"),bi=Symbol("component"),$i=Symbol("legacy props"),xl=Symbol(""),wi=Symbol("proxy path"),xi=Symbol("attributes"),Us=Symbol("class"),yo=Symbol("style"),bo=Symbol("text"),Br=Symbol("form reset"),Bs=Symbol("hmr anchor"),br=new class extends Error{constructor(){super(...arguments);re(this,"name","StaleReactionError");re(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Vs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var sn=3,vt=8;var it={};var fe=Symbol("uninitialized"),st=Symbol("filename");var Ei="http://www.w3.org/1999/xhtml",$o="http://www.w3.org/2000/svg",Ys="http://www.w3.org/1998/Math/MathML";var rr="font-weight: bold",nr="font-weight: normal";function El(e){y?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`,rr,nr):console.warn("https://svelte.dev/e/await_reactivity_loss")}function Tl(e,t){y?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`,rr,nr):console.warn("https://svelte.dev/e/await_waterfall")}function kl(){y?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`,rr,nr):console.warn("https://svelte.dev/e/derived_inert")}function Al(e,t,r){y?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`,rr,nr):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Sl(e){y?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`,rr,nr):console.warn("https://svelte.dev/e/hydration_html_changed")}function Vr(e){y?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`,rr,nr):console.warn("https://svelte.dev/e/hydration_mismatch")}function Rl(){y?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`,rr,nr):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Nl(){y?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",rr,nr):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Ti(e){y?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`,rr,nr):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function Cl(){y?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",rr,nr):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var k=!1;function Te(e){k=e}var P;function ne(e){if(e===null)throw Vr(),it;return P=e}function De(){return ne(Le(P))}function Y(e){if(k){if(Le(P)!==null)throw Vr(),it;P=e}}function xo(e=1){if(k){for(var t=e,r=P;t--;)r=Le(r);P=r}}function or(e=!0){for(var t=0,r=P;;){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 an(e){if(!e||e.nodeType!==vt)throw Vr(),it;return e.data}function ki(e){return e===this.v}function Ai(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Si(e){return!Ai(e,this.v)}function Ol(e){if(y){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 Ri(e){if(y){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 Dl(){if(y){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 qs(){if(y){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 Ll(){if(y){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 zs(e,t,r){if(y){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 Ml(e,t,r){if(y){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 Fl(e){if(y){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 Pl(){if(y){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 Hl(e){if(y){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 Ul(){if(y){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 Bl(){if(
|
|
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 Bl(){if(y){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 Vl(){if(y){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 Yl(e){if(y){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
|
|
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 ql(){if(y){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 zl(){if(y){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 jl(){if(y){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 Gl(){if(y){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,Yr=!1,zt=!1;var Eo=null;function Ke(e,t){return e.label=t,Ci(e.v,t),e}function Ci(e,t){return e?.[wi]?.(t),e}function jt(e){let t=new Error,r=mu();return r.length===0?null:(r.unshift(`
|
|
71
71
|
`),Ie(t,"stack",{value:r.join(`
|
|
72
|
-
`)}),Ie(t,"name",{value:e}),t)}function
|
|
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 Wl(e,t){if(!b)throw new Error("invariant(...) was not guarded by if (DEV)");e||Il(t)}var q=null;function br(e){q=e}var or=null;function Dn(e){or=e}var gt=null;function Ii(e){gt=e}function Eo(e,t=!1,r){q={p:q,i:!1,c:null,e:null,s:e,x:null,r:k,l:Yr&&!t?{s:null,u:null,$:[]}:null},b&&(q.function=r,gt=r)}function To(e){var t=q,r=t.e;if(r!==null){t.e=null;for(var n of r)js(n)}return e!==void 0&&(t.x=e),t.i=!0,q=t.p,b&&(gt=q?.function??null),ko(e)}function ko(e={}){return Ie(e,$i,{value:!0}),e}function ir(){return!Yr||q!==null&&q.l===null}var ln=[];function Xl(){var e=ln;ln=[],bi(e)}function we(e){if(ln.length===0&&!fn){var t=ln;queueMicrotask(()=>{t===ln&&Xl()})}ln.push(e)}function Jl(){for(;ln.length>0;)Xl()}var vu=-7169;function ie(e,t){e.f=e.f&vu|t}function Ln(e){(e.f&512)!==0||e.deps===null?ie(e,1024):ie(e,4096)}function Di(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),ie(e,1024)}var Ql=!1;function Li(){Ql||(Ql=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Vr]?.()})},{capture:!0}))}function yt(e){var t=C,r=k;Se(null),Re(null);try{return e()}finally{Se(t),Re(r)}}function zs(e,t,r,n=r){e.addEventListener(t,()=>yt(r));let o=e[Vr];o?e[Vr]=()=>{o(),n(!0)}:e[Vr]=()=>n(!0),Li()}function Mi(e,t,r,n){let o=ir()?Pn:Hn;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=ef(),d=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){lt(y,l)}Fn()}}var h=Gs();if(r.length===0){d.then(()=>v([])).finally(h);return}function m(){Promise.all(r.map(_=>Zs(_))).then(v).catch(_=>lt(_,l)).finally(h)}d?d.then(()=>{if((l.f&16384)!==0){h();return}f(),m(),Fn()}):m()}function ef(){var e=k,t=C,r=q,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&&(Ks(null),Dn(o))}}var gu=!1;function Fn(e=!0){gu=!1,Re(null),Se(null),br(null),e&&O?.deactivate(),b&&(Ks(null),Dn(null))}function Gs(){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 ft=null;function Ks(e){ft=e}var Ro=new Set;function Pn(e){var t=2050;k!==null&&(k.f|=524288);let r={ctx:q,deps:null,effects:null,equals:Ai,f:t,fn:e,reactions:null,rv:0,v:fe,wv:0,parent:k,ac:null};return b&&jt&&(r.created=zt("created at")),r}var Un=Symbol("obsolete");function Zs(e,t,r){let n=k;n===null&&Ll();var o=void 0,i=Xe(fe);b&&(i.label=t??e.toString());var a=!C,l=new Set;return nf(()=>{var f=k;b&&(ft={effect:f,effect_deps:new Set,warned:!1});var d=yi();o=d.promise;try{Promise.resolve(e()).then(d.resolve,_=>{_!==gr&&d.reject(_)}).finally(Fn)}catch(_){d.reject(_),Fn()}if(b){if(ft){if(f.deps!==null)for(let _=0;_<tt;_+=1)ft.effect_deps.add(f.deps[_]);if(Fe!==null)for(let _=0;_<Fe.length;_+=1)ft.effect_deps.add(Fe[_])}ft=null}var v=O;if(a){if((f.f&32768)!==0)var h=Gs();if(n.b?.is_rendered())v.async_deriveds.get(f)?.reject(Un);else for(let _ of l.values())_.reject(Un);l.add(d),v.async_deriveds.set(f,d)}let m=(_,y=void 0)=>{b&&(ft=null),h?.(),l.delete(d),y!==Un&&(v.activate(),y?(i.f|=8388608,Kt(i,y)):((i.f&8388608)!==0&&(i.f^=8388608),b&&r!==void 0&&!i.equals(_)&&(Ro.add(i),setTimeout(()=>{Ro.has(i)&&(f.f&16384)===0&&(kl(i.label,r),Ro.delete(i))})),Kt(i,_)),v.deactivate())};d.promise.then(m,_=>m(null,_||"unknown"))}),Me(()=>{for(let f of l)f.reject(Un)}),b&&(i.f|=4194304),new Promise(f=>{function d(v){function h(){v===o?f(i):d(o)}v.then(h,h)}d(o)})}function Ot(e){let t=Pn(e);return ke||Hi(t),t}function Hn(e){let t=Pn(e);return t.equals=Ri,t}function tf(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}var Ws=[];function No(e){var t,r=k,n=e.parent;if(!Dt&&n!==null&&e.v!==fe&&(n.f&24576)!==0)return Al(),e.v;if(Re(n),b){let o=un;Fi(new Set);try{vr.call(Ws,e)&&Ml(),Ws.push(e),tf(e),t=Pi(e)}finally{Re(r),Fi(o),Ws.pop()}}else try{tf(e),t=Pi(e)}finally{Re(r)}return t}function Xs(e){var t=No(e);if(!e.equals(t)&&(e.wv=Vn(),(!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?(qr()||O?.is_fork)&&Pe.set(e,t):Ln(e))}function rf(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),dn(t,0),Co(t))}function Js(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&sr(t)}var Ui=null,Bn=null,O=null,It=null,Pe=null,ta=null,fn=!1,Qs=!1,qn=null,Do=null,of=0,ea=new Set,$u=1,jn,wr,xr,zn,Gn,Kn,Er,Zn,ut,Lo,Tr,Zt,ar,Wn,jr,J,ra,na,Oo,oa,af,lf,Yn,ff,Io,Vi=class Vi{constructor(){F(this,J);re(this,"id",$u++);F(this,jn,!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,zn,new Set);F(this,Gn,new Set);F(this,Kn,0);F(this,Er,new Map);F(this,Zn,null);F(this,ut,[]);F(this,Lo,[]);F(this,Tr,new Set);F(this,Zt,new Set);F(this,ar,new Map);F(this,Wn,new Set);re(this,"is_fork",!1);F(this,jr,!1);Bn===null?Ui=Bn=this:(I(Bn,xr,this),I(this,wr,Bn)),Bn=this}skip_effect(t){c(this,ar).has(t)||c(this,ar).set(t,{d:[],m:[]}),c(this,Wn).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,Wn).add(t)}capture(t,r,n=!1){t.v!==fe&&!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&&ea.clear(),Qs=!0,O=this,L(this,J,Oo).call(this)}finally{if(of=0,ta=null,qn=null,Do=null,Qs=!1,O=null,Pe=null,Mt.clear(),b)for(let t of ea)t.updated=null}}discard(){for(let t of c(this,Gn))t(this);c(this,Gn).clear();for(let t of this.async_deriveds.values())t.reject(Un);L(this,J,Io).call(this),c(this,Zn)?.resolve()}register_created_effect(t){c(this,Lo).push(t)}increment(t,r){if(I(this,Kn,c(this,Kn)+1),t){let n=c(this,Er).get(r)??0;c(this,Er).set(r,n+1)}}decrement(t,r){if(I(this,Kn,c(this,Kn)-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,jr)||(I(this,jr,!0),we(()=>{I(this,jr,!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,Zt).add(n);t.clear(),r.clear()}oncommit(t){c(this,zn).add(t)}ondiscard(t){c(this,Gn).add(t)}settled(){return(c(this,Zn)??I(this,Zn,yi())).promise}static ensure(){if(O===null){let t=O=new Vi;!Qs&&!fn&&we(()=>{c(t,jn)||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=Ui;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(ta=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}c(this,ut).push(t)}};jn=new WeakMap,wr=new WeakMap,xr=new WeakMap,zn=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,Er=new WeakMap,Zn=new WeakMap,ut=new WeakMap,Lo=new WeakMap,Tr=new WeakMap,Zt=new WeakMap,ar=new WeakMap,Wn=new WeakMap,jr=new WeakMap,J=new WeakSet,ra=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},na=function(){var t=[];for(let i of c(this,ut))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,ut,[]),t},Oo=function(){var l,f,d;if(I(this,jn,!0),b)for(let v of this.current.keys())ea.add(v);for(let v of c(this,Tr))c(this,Zt).delete(v),ie(v,2048),this.schedule(v);for(let v of c(this,Zt))ie(v,4096),this.schedule(v);this.apply();for(var t=qn=[],r=[],n=Do=[];c(this,ut).length>0;){of++>1e3&&(L(this,J,Io).call(this),wu());for(let v of L(this,J,na).call(this))try{L(this,J,oa).call(this,v,t,r)}catch(h){throw df(v),L(this,J,ra).call(this)||this.discard(),h}}if(O=null,n.length>0){var o=Vi.ensure();for(let v of n)o.schedule(v)}if(qn=null,Do=null,L(this,J,ra).call(this)){L(this,J,Yn).call(this,r),L(this,J,Yn).call(this,t);for(let[v,h]of c(this,ar))uf(v,h);n.length>0&&L(l=O,J,Oo).call(l);return}let i=L(this,J,af).call(this);if(i){L(this,J,Yn).call(this,r),L(this,J,Yn).call(this,t),L(f=i,J,lf).call(f,this);return}c(this,Tr).clear(),c(this,Zt).clear();for(let v of c(this,zn))v(this);c(this,zn).clear(),It=this,sf(r),sf(t),It=null,c(this,Zn)?.resolve();var a=O;if(c(this,Kn)===0&&(c(this,ut).length===0||a!==null)&&(L(this,J,Io).call(this),ke&&(L(this,J,ff).call(this),O=a)),c(this,ut).length>0)if(a!==null){for(let v of c(this,ut))c(a,ut).push(v);I(this,ut,[])}else a=this;a!==null&&(Mt.clear(),L(d=a,J,Oo).call(d))},oa=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):Gr(o)&&((i&16)!==0&&c(this,Zt).add(o),sr(o));var d=o.first;if(d!==null){o=d;continue}}for(;o!==null;){var v=o.next;if(v!==null){o=v;break}o=o.parent}}},af=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},lf=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,Zt));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,Zt).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,Io).call(n),O=this,L(this,J,Oo).call(this)},Yn=function(t){for(var r=0;r<t.length;r+=1)Di(t[r],c(this,Tr),c(this,Zt))},ff=function(){var h,m;for(let _=Ui;_!==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(_,jn)||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(_,jr)&&Wl(c(_,ut).length===0,"Batch has scheduled effects"),t)for(let y of c(this,Wn))_.unskip_effect(y,g=>{var $;(g.f&4194320)!==0?_.schedule(g):L($=_,J,Yn).call($,[g])});_.activate();var a=new Set,l=new Map;for(var f of r)cf(f,i,a,l);l=new Map;var d=[..._.current].filter(([y,g])=>{let $=this.current.get(y);return $?$[0]!==g[0]||$[1]!==g[1]:!0}).map(([y])=>y);if(d.length>0)for(let y of c(this,Lo))(y.f&155648)===0&&ia(y,d,l)&&((y.f&4194320)!==0?(ie(y,2048),_.schedule(y)):c(_,Tr).add(y));if(c(_,ut).length>0&&!c(_,jr)){_.apply();for(var v of L(h=_,J,na).call(h))L(m=_,J,oa).call(m,v,[],[])}_.deactivate()}}}},Io=function(){if(this.linked){var t=c(this,wr),r=c(this,xr);t===null?Ui=r:I(t,xr,r),r===null?Bn=t:I(r,wr,t),this.linked=!1}};var $t=Vi;function zr(e){var t=fn,r=It;It=null,fn=!0;try{var n;for(e&&(zr(),n=e());;){if(Jl(),O===null)return n;O.flush()}}finally{fn=t,It=r}}function wu(){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{Vl()}catch(r){b&&Ie(r,"stack",{value:""}),lt(r,ta)}}var Lt=null;function sf(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Gr(n)&&(Lt=new Set,sr(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&sa(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 cf(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?cf(o,t,r,n):(i&4194320)!==0&&(i&2048)===0&&ia(o,t,n)&&(ie(o,2048),Mo(o))}}function ia(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&&ia(o,t,r))return r.set(o,!0),!0}return r.set(e,!1),!1}function Mo(e){O.schedule(e)}function uf(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;)uf(r,t),r=r.next}}function df(e){ie(e,1024);for(var t=e.first;t!==null;)df(t),t=t.next}var un=new Set,Mt=new Map;function Fi(e){un=e}var la=!1;function _f(){la=!0}function Xe(e,t){var r={f:0,v:e,reactions:null,equals:Ai,rv:0,wv:0};return b&&jt&&(r.created=t??zt("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function j(e,t){let r=Xe(e,t);return Hi(r),r}function mn(e,t=!1,r=!0){var o;let n=Xe(e);return t||(n.equals=Ri),Yr&&r&&q!==null&&q.l!==null&&((o=q.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))&&Gl();let n=r?Wt(t):t;return b&&Oi(n,e.label),Kt(e,n,Do)}var _n=null,aa=0;function Kt(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(jt||k!==null){e.updated??(e.updated=new Map);let o=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:o}),jt||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&&No(o),Pe===null&&Ln(o)}e.wv=Vn(),_n=null,aa=0,mf(e,2048,r),_n=null,ir()&&k!==null&&(k.f&1024)!==0&&(k.f&96)===0&&(wt===null?hf([e]):wt.push(e)),!n.is_fork&&un.size>0&&!la&&Bi()}return t}function Bi(){la=!1;for(let e of un){(e.f&1024)!==0&&ie(e,4096);let t;try{t=Gr(e)}catch{t=!0}t&&sr(e)}un.clear()}function hn(e){E(e,e.v+1)}function mf(e,t,r){var n=e.reactions;if(n!==null){var o=ir(),i=n.length;if(aa+=i,aa>1e5&&_n===null&&(_n=new Set),_n!==null){if(_n.has(e))return;_n.add(e)}for(var a=0;a<i;a++){var l=n[a],f=l.f;if(!(!o&&l===k)){var d=(f&2048)===0;if(d&&ie(l,t),(f&131072)!==0)un.add(l);else if((f&2)!==0){var v=l;Pe?.delete(v),mf(v,4096,r)}else if(d){var h=l;(f&16)!==0&&Lt!==null&&Lt.add(h),r!==null?r.push(h):Mo(h)}}}}}var Eu=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Wt(e){if(typeof e!="object"||e===null||Ke in e||$i in e)return e;let t=on(e);if(t!==Fs&&t!==xl)return e;var r=new Map,n=qt(e),o=j(0),i=b&&jt?zt("created at"):null,a=Kr,l=h=>{if(Kr===a)return h();var m=C,_=Kr;Se(null),fa(a);var y=h();return Se(m),fa(_),y};n&&(r.set("length",j(e.length,i)),b&&(e=ku(e)));var f="";let d=!1;function v(h){if(!d){d=!0,f=h,Ze(o,`${f} version`);for(let[m,_]of r)Ze(_,vn(f,m));d=!1}}return new Proxy(e,{defineProperty(h,m,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&jl();var y=r.get(m);return y===void 0?l(()=>{var g=j(_.value,i);return r.set(m,g),b&&typeof m=="string"&&Ze(g,vn(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(()=>j(fe,i));r.set(m,y),hn(o),b&&Ze(y,vn(f,m))}}else E(_,fe),hn(o);return!0},get(h,m,_){if(m===Ke)return e;if(b&&m===xi)return v;var y=r.get(m),g=m in h;if(y===void 0&&(!g||ht(h,m)?.writable)&&(y=l(()=>{var A=Wt(g?h[m]:fe),K=j(A,i);return b&&Ze(K,vn(f,m)),K}),r.set(m,y)),y!==void 0){var $=s(y);return $===fe?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===fe)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!==fe||Reflect.has(h,m);if(_!==void 0||k!==null&&(!y||ht(h,m)?.writable)){_===void 0&&(_=l(()=>{var $=y?Wt(h[m]):fe,A=j($,i);return b&&Ze(A,vn(f,m)),A}),r.set(m,_));var g=s(_);if(g===fe)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,fe):A in h&&(K=l(()=>j(fe,i)),r.set(A+"",K),b&&Ze(K,vn(f,A)))}if(g===void 0)(!$||ht(h,m)?.writable)&&(g=l(()=>j(void 0,i)),b&&Ze(g,vn(f,m)),E(g,Wt(_)),r.set(m,g));else{$=g.v!==fe;var pe=l(()=>Wt(_));E(g,pe)}var $e=Reflect.getOwnPropertyDescriptor(h,m);if($e?.set&&$e.set.call(y,_),!$){if(n&&typeof m=="string"){var ot=r.get("length"),Ue=Number(m);Number.isInteger(Ue)&&Ue>=ot.v&&E(ot,Ue+1)}hn(o)}return!0},ownKeys(h){s(o);var m=Reflect.ownKeys(h).filter(g=>{var $=r.get(g);return $===void 0||$.v!==fe});for(var[_,y]of r)y.v!==fe&&!(_ in h)&&m.push(_);return m},setPrototypeOf(){zl()}})}function vn(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Eu.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Xn(e){try{if(e!==null&&typeof e=="object"&&Ke in e)return e[Ke]}catch{}return e}function Yi(e,t){return Object.is(Xn(e),Xn(t))}var Tu=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function ku(e){return new Proxy(e,{get(t,r,n){var o=Reflect.get(t,r,n);return Tu.has(r)?function(...i){_f();var a=o.apply(this,i);return Bi(),a}:o}})}function vf(){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(Xn(this[f])===i){ki("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(Xn(this[f])===i){ki("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(Xn(this[f])===i){ki("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=o}}var gn,gf,Fo,bf,yf;function qi(){if(gn===void 0){gn=window,gf=document,Fo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;bf=ht(t,"firstChild").get,yf=ht(t,"nextSibling").get,Ps(e)&&(e[Hs]=void 0,e[Ei]=null,e[go]=void 0,e.__e=void 0),Ps(r)&&(r[bo]=void 0),b&&(e.__svelte_meta=null,vf())}}function be(e=""){return document.createTextNode(e)}function ve(e){return bf.call(e)}function Le(e){return yf.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!==sn){var n=be();return r?.before(n),ne(n),n}return t&&Po(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!==sn){var n=be();return M?.before(n),ne(n),n}Po(M)}return M}function H(e,t=!1){if(!T)return ve(e);var r=W(e,t);return Y(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!==sn){var i=be();return n===null?o?.after(i):n.before(i),ne(i),i}Po(n)}return ne(n),n}function So(e){e.textContent=""}function ji(){if(!ke||Lt!==null)return!1;var e=k.f;return(e&32768)!==0}function Xt(e,t,r){return t==null||t===Ti?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Po(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===sn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}var ca=new WeakMap;function $f(e){var t=k;if(t===null)return C.f|=8388608,e;if(b&&e instanceof Error&&!ca.has(e)&&ca.set(e,Au(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw b&&!t.parent&&e instanceof Error&&wf(e),e;lt(e,t)}function lt(e,t){if(e===it)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&&wf(e),e}}function Au(e,t){let r=ht(e,"message");if(!(r&&!r.configurable)){for(var n=Fo?" ":" ",o=`
|
|
72
|
+
`)}),Ie(t,"name",{value:e}),t)}function mu(){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 Zl(e,t){if(!y)throw new Error("invariant(...) was not guarded by if (DEV)");e||Ol(t)}var q=null;function $r(e){q=e}var ir=null;function Dn(e){ir=e}var gt=null;function Oi(e){gt=e}function To(e,t=!1,r){q={p:q,i:!1,c:null,e:null,s:e,x:null,r:A,l:Yr&&!t?{s:null,u:null,$:[]}:null},y&&(q.function=r,gt=r)}function ko(e){var t=q,r=t.e;if(r!==null){t.e=null;for(var n of r)js(n)}return e!==void 0&&(t.x=e),t.i=!0,q=t.p,y&&(gt=q?.function??null),Ao(e)}function Ao(e={}){return Ie(e,bi,{value:!0}),e}function sr(){return!Yr||q!==null&&q.l===null}var ln=[];function Wl(){var e=ln;ln=[],gi(e)}function we(e){if(ln.length===0&&!fn){var t=ln;queueMicrotask(()=>{t===ln&&Wl()})}ln.push(e)}function Xl(){for(;ln.length>0;)Wl()}var vu=-7169;function ie(e,t){e.f=e.f&vu|t}function Ln(e){(e.f&512)!==0||e.deps===null?ie(e,1024):ie(e,4096)}function Ii(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),ie(e,1024)}var Jl=!1;function Di(){Jl||(Jl=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Br]?.()})},{capture:!0}))}function bt(e){var t=C,r=A;Se(null),Re(null);try{return e()}finally{Se(t),Re(r)}}function Gs(e,t,r,n=r){e.addEventListener(t,()=>bt(r));let o=e[Br];o?e[Br]=()=>{o(),n(!0)}:e[Br]=()=>n(!0),Di()}function Li(e,t,r,n){let o=sr()?Pn:Hn;var i=e.filter(_=>!_.settled),a=t.map(o);if(y&&a.forEach((_,b)=>{_.label=t[b].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(g,$)=>$)}),r.length===0&&i.length===0){n(a);return}var l=A,f=Ql(),d=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(b){lt(b,l)}Fn()}}var m=Ks();if(r.length===0){d.then(()=>v([])).finally(m);return}function h(){Promise.all(r.map(_=>Ws(_))).then(v).catch(_=>lt(_,l)).finally(m)}d?d.then(()=>{if((l.f&16384)!==0){m();return}f(),h(),Fn()}):h()}function Ql(){var e=A,t=C,r=q,n=I;if(y)var o=ir;return function(a=!0){Re(e),Se(t),$r(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply()),y&&(Zs(null),Dn(o))}}var gu=!1;function Fn(e=!0){gu=!1,Re(null),Se(null),$r(null),e&&I?.deactivate(),y&&(Zs(null),Dn(null))}function Ks(){var e=A,t=e.b,r=I,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 ft=null;function Zs(e){ft=e}var No=new Set;function Pn(e){var t=2050;A!==null&&(A.f|=524288);let r={ctx:q,deps:null,effects:null,equals:ki,f:t,fn:e,reactions:null,rv:0,v:fe,wv:0,parent:A,ac:null};return y&&zt&&(r.created=jt("created at")),r}var Un=Symbol("obsolete");function Ws(e,t,r){let n=A;n===null&&Dl();var o=void 0,i=We(fe);y&&(i.label=t??e.toString());var a=!C,l=new Set;return rf(()=>{var f=A;y&&(ft={effect:f,effect_deps:new Set,warned:!1});var d=yi();o=d.promise;try{Promise.resolve(e()).then(d.resolve,_=>{_!==br&&d.reject(_)}).finally(Fn)}catch(_){d.reject(_),Fn()}if(y){if(ft){if(f.deps!==null)for(let _=0;_<tt;_+=1)ft.effect_deps.add(f.deps[_]);if(Fe!==null)for(let _=0;_<Fe.length;_+=1)ft.effect_deps.add(Fe[_])}ft=null}var v=I;if(a){if((f.f&32768)!==0)var m=Ks();if(n.b?.is_rendered())v.async_deriveds.get(f)?.reject(Un);else for(let _ of l.values())_.reject(Un);l.add(d),v.async_deriveds.set(f,d)}let h=(_,b=void 0)=>{y&&(ft=null),m?.(),l.delete(d),b!==Un&&(v.activate(),b?(i.f|=8388608,Kt(i,b)):((i.f&8388608)!==0&&(i.f^=8388608),y&&r!==void 0&&!i.equals(_)&&(No.add(i),setTimeout(()=>{No.has(i)&&(f.f&16384)===0&&(Tl(i.label,r),No.delete(i))})),Kt(i,_)),v.deactivate())};d.promise.then(h,_=>h(null,_||"unknown"))}),Me(()=>{for(let f of l)f.reject(Un)}),y&&(i.f|=4194304),new Promise(f=>{function d(v){function m(){v===o?f(i):d(o)}v.then(m,m)}d(o)})}function Ot(e){let t=Pn(e);return ke||Pi(t),t}function Hn(e){let t=Pn(e);return t.equals=Si,t}function ef(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}var Xs=[];function Co(e){var t,r=A,n=e.parent;if(!Dt&&n!==null&&e.v!==fe&&(n.f&24576)!==0)return kl(),e.v;if(Re(n),y){let o=un;Mi(new Set);try{yr.call(Xs,e)&&Ll(),Xs.push(e),ef(e),t=Fi(e)}finally{Re(r),Mi(o),Xs.pop()}}else try{ef(e),t=Fi(e)}finally{Re(r)}return t}function Js(e){var t=Co(e);if(!e.equals(t)&&(e.wv=Bn(),(!I?.is_fork||e.deps===null)&&(I!==null?(I.capture(e,t,!0),It?.capture(e,t,!0)):e.v=t,e.deps===null))){ie(e,1024);return}Dt||(Pe!==null?(qr()||I?.is_fork)&&Pe.set(e,t):Ln(e))}function tf(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&bt(()=>{t.ac.abort(br),t.ac=null}),t.fn!==null&&(t.teardown=tr),dn(t,0),Oo(t))}function Qs(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&ar(t)}var Hi=null,Vn=null,I=null,It=null,Pe=null,ra=null,fn=!1,ea=!1,qn=null,Lo=null,nf=0,ta=new Set,$u=1,zn,Er,Tr,jn,Gn,Kn,kr,Zn,ut,Mo,Ar,Zt,lr,Wn,zr,Q,na,oa,Io,ia,sf,af,Yn,lf,Do,Ui=class Ui{constructor(){H(this,Q);re(this,"id",$u++);H(this,zn,!1);re(this,"linked",!0);H(this,Er,null);H(this,Tr,null);re(this,"async_deriveds",new Map);re(this,"current",new Map);re(this,"previous",new Map);H(this,jn,new Set);H(this,Gn,new Set);H(this,Kn,0);H(this,kr,new Map);H(this,Zn,null);H(this,ut,[]);H(this,Mo,[]);H(this,Ar,new Set);H(this,Zt,new Set);H(this,lr,new Map);H(this,Wn,new Set);re(this,"is_fork",!1);H(this,zr,!1);Vn===null?Hi=Vn=this:(D(Vn,Tr,this),D(this,Er,Vn)),Vn=this}skip_effect(t){c(this,lr).has(t)||c(this,lr).set(t,{d:[],m:[]}),c(this,Wn).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=c(this,lr).get(t);if(n){c(this,lr).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,Wn).add(t)}capture(t,r,n=!1){t.v!==fe&&!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(){I=this}deactivate(){I=null,Pe=null}flush(){try{y&&ta.clear(),ea=!0,I=this,M(this,Q,Io).call(this)}finally{if(nf=0,ra=null,qn=null,Lo=null,ea=!1,I=null,Pe=null,Mt.clear(),y)for(let t of ta)t.updated=null}}discard(){for(let t of c(this,Gn))t(this);c(this,Gn).clear();for(let t of this.async_deriveds.values())t.reject(Un);M(this,Q,Do).call(this),c(this,Zn)?.resolve()}register_created_effect(t){c(this,Mo).push(t)}increment(t,r){if(D(this,Kn,c(this,Kn)+1),t){let n=c(this,kr).get(r)??0;c(this,kr).set(r,n+1)}}decrement(t,r){if(D(this,Kn,c(this,Kn)-1),t){let n=c(this,kr).get(r)??0;n===1?c(this,kr).delete(r):c(this,kr).set(r,n-1)}c(this,zr)||(D(this,zr,!0),we(()=>{D(this,zr,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(let n of t)c(this,Ar).add(n);for(let n of r)c(this,Zt).add(n);t.clear(),r.clear()}oncommit(t){c(this,jn).add(t)}ondiscard(t){c(this,Gn).add(t)}settled(){return(c(this,Zn)??D(this,Zn,yi())).promise}static ensure(){if(I===null){let t=I=new Ui;!ea&&!fn&&we(()=>{c(t,zn)||t.flush()})}return I}apply(){if(!ke||!this.is_fork&&c(this,Er)===null&&c(this,Tr)===null){Pe=null;return}Pe=new Map;for(let[r,[n]]of this.current)Pe.set(r,n);for(let r=Hi;r!==null;r=c(r,Tr))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(ra=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}c(this,ut).push(t)}};zn=new WeakMap,Er=new WeakMap,Tr=new WeakMap,jn=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,kr=new WeakMap,Zn=new WeakMap,ut=new WeakMap,Mo=new WeakMap,Ar=new WeakMap,Zt=new WeakMap,lr=new WeakMap,Wn=new WeakMap,zr=new WeakMap,Q=new WeakSet,na=function(){if(this.is_fork)return!0;for(let n of c(this,kr).keys()){for(var t=n,r=!1;t.parent!==null;){if(c(this,lr).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},oa=function(){var t=[];for(let i of c(this,ut))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 D(this,ut,[]),t},Io=function(){var l,f,d;if(D(this,zn,!0),y)for(let v of this.current.keys())ta.add(v);for(let v of c(this,Ar))c(this,Zt).delete(v),ie(v,2048),this.schedule(v);for(let v of c(this,Zt))ie(v,4096),this.schedule(v);this.apply();for(var t=qn=[],r=[],n=Lo=[];c(this,ut).length>0;){nf++>1e3&&(M(this,Q,Do).call(this),wu());for(let v of M(this,Q,oa).call(this))try{M(this,Q,ia).call(this,v,t,r)}catch(m){throw uf(v),M(this,Q,na).call(this)||this.discard(),m}}if(I=null,n.length>0){var o=Ui.ensure();for(let v of n)o.schedule(v)}if(qn=null,Lo=null,M(this,Q,na).call(this)){M(this,Q,Yn).call(this,r),M(this,Q,Yn).call(this,t);for(let[v,m]of c(this,lr))cf(v,m);n.length>0&&M(l=I,Q,Io).call(l);return}let i=M(this,Q,sf).call(this);if(i){M(this,Q,Yn).call(this,r),M(this,Q,Yn).call(this,t),M(f=i,Q,af).call(f,this);return}c(this,Ar).clear(),c(this,Zt).clear();for(let v of c(this,jn))v(this);c(this,jn).clear(),It=this,of(r),of(t),It=null,c(this,Zn)?.resolve();var a=I;if(c(this,Kn)===0&&(c(this,ut).length===0||a!==null)&&(M(this,Q,Do).call(this),ke&&(M(this,Q,lf).call(this),I=a)),c(this,ut).length>0)if(a!==null){for(let v of c(this,ut))c(a,ut).push(v);D(this,ut,[])}else a=this;a!==null&&(Mt.clear(),M(d=a,Q,Io).call(d))},ia=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,lr).has(o);if(!f&&o.fn!==null){a?o.f^=1024:(i&4)!==0?r.push(o):ke&&(i&16777224)!==0?n.push(o):Gr(o)&&((i&16)!==0&&c(this,Zt).add(o),ar(o));var d=o.first;if(d!==null){o=d;continue}}for(;o!==null;){var v=o.next;if(v!==null){o=v;break}o=o.parent}}},sf=function(){for(var t=c(this,Er);t!==null;){if(!t.is_fork){for(let[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=c(t,Er)}return null},af=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,Ar),c(t,Zt));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,Zt).delete(l),ie(l,2048),this.schedule(l))}}};for(let o of this.current.keys())r(o);this.oncommit(()=>t.discard()),M(n=t,Q,Do).call(n),I=this,M(this,Q,Io).call(this)},Yn=function(t){for(var r=0;r<t.length;r+=1)Ii(t[r],c(this,Ar),c(this,Zt))},lf=function(){var m,h;for(let _=Hi;_!==null;_=c(_,Tr)){var t=_.id<this.id,r=[];for(let[b,[g,$]]of this.current){if(_.current.has(b)){var n=_.current.get(b)[0];if(t&&g!==n)_.current.set(b,[g,$]);else continue}r.push(b)}if(t)for(let[b,g]of this.async_deriveds){let $=_.async_deriveds.get(b);$&&g.promise.then($.resolve).catch($.reject)}var o=[..._.current.keys()].filter(b=>!_.current.get(b)[1]);if(!(!c(_,zn)||o.length===0)){var i=o.filter(b=>!this.current.has(b));if(i.length===0)t&&_.discard();else if(r.length>0){if(y&&!c(_,zr)&&Zl(c(_,ut).length===0,"Batch has scheduled effects"),t)for(let b of c(this,Wn))_.unskip_effect(b,g=>{var $;(g.f&4194320)!==0?_.schedule(g):M($=_,Q,Yn).call($,[g])});_.activate();var a=new Set,l=new Map;for(var f of r)ff(f,i,a,l);l=new Map;var d=[..._.current].filter(([b,g])=>{let $=this.current.get(b);return $?$[0]!==g[0]||$[1]!==g[1]:!0}).map(([b])=>b);if(d.length>0)for(let b of c(this,Mo))(b.f&155648)===0&&sa(b,d,l)&&((b.f&4194320)!==0?(ie(b,2048),_.schedule(b)):c(_,Ar).add(b));if(c(_,ut).length>0&&!c(_,zr)){_.apply();for(var v of M(m=_,Q,oa).call(m))M(h=_,Q,ia).call(h,v,[],[])}_.deactivate()}}}},Do=function(){if(this.linked){var t=c(this,Er),r=c(this,Tr);t===null?Hi=r:D(t,Tr,r),r===null?Vn=t:D(r,Er,t),this.linked=!1}};var $t=Ui;function jr(e){var t=fn,r=It;It=null,fn=!0;try{var n;for(e&&(jr(),n=e());;){if(Xl(),I===null)return n;I.flush()}}finally{fn=t,It=r}}function wu(){if(y){var e=new Map;for(let r of I.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{Ul()}catch(r){y&&Ie(r,"stack",{value:""}),lt(r,ra)}}var Lt=null;function of(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Gr(n)&&(Lt=new Set,ar(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&aa(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&&ar(f)}}Lt.clear()}}Lt=null}}function ff(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?ff(o,t,r,n):(i&4194320)!==0&&(i&2048)===0&&sa(o,t,n)&&(ie(o,2048),Fo(o))}}function sa(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(yr.call(t,o))return!0;if((o.f&2)!==0&&sa(o,t,r))return r.set(o,!0),!0}return r.set(e,!1),!1}function Fo(e){I.schedule(e)}function cf(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;)cf(r,t),r=r.next}}function uf(e){ie(e,1024);for(var t=e.first;t!==null;)uf(t),t=t.next}var un=new Set,Mt=new Map;function Mi(e){un=e}var fa=!1;function pf(){fa=!0}function We(e,t){var r={f:0,v:e,reactions:null,equals:ki,rv:0,wv:0};return y&&zt&&(r.created=t??jt("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function z(e,t){let r=We(e,t);return Pi(r),r}function hn(e,t=!1,r=!0){var o;let n=We(e);return t||(n.equals=Si),Yr&&r&&q!==null&&q.l!==null&&((o=q.l).s??(o.s=[])).push(n),n}function E(e,t,r=!1){C!==null&&(!rt||(C.f&131072)!==0)&&sr()&&(C.f&4325394)!==0&&(Ft===null||!Ft.has(e))&&jl();let n=r?Wt(t):t;return y&&Ci(n,e.label),Kt(e,n,Lo)}var _n=null,la=0;function Kt(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),y){if(zt||A!==null){e.updated??(e.updated=new Map);let o=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:o}),zt||o>5){let i=jt("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++}}}A!==null&&(e.set_during_effect=!0)}if((e.f&2)!==0){let o=e;(e.f&2048)!==0&&Co(o),Pe===null&&Ln(o)}e.wv=Bn(),_n=null,la=0,_f(e,2048,r),_n=null,sr()&&A!==null&&(A.f&1024)!==0&&(A.f&96)===0&&(wt===null?hf([e]):wt.push(e)),!n.is_fork&&un.size>0&&!fa&&Bi()}return t}function Bi(){fa=!1;for(let e of un){(e.f&1024)!==0&&ie(e,4096);let t;try{t=Gr(e)}catch{t=!0}t&&ar(e)}un.clear()}function mn(e){E(e,e.v+1)}function _f(e,t,r){var n=e.reactions;if(n!==null){var o=sr(),i=n.length;if(la+=i,la>1e5&&_n===null&&(_n=new Set),_n!==null){if(_n.has(e))return;_n.add(e)}for(var a=0;a<i;a++){var l=n[a],f=l.f;if(!(!o&&l===A)){var d=(f&2048)===0;if(d&&ie(l,t),(f&131072)!==0)un.add(l);else if((f&2)!==0){var v=l;Pe?.delete(v),_f(v,4096,r)}else if(d){var m=l;(f&16)!==0&&Lt!==null&&Lt.add(m),r!==null?r.push(m):Fo(m)}}}}}var Eu=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Wt(e){if(typeof e!="object"||e===null||Ge in e||bi in e)return e;let t=on(e);if(t!==Ps&&t!==wl)return e;var r=new Map,n=qt(e),o=z(0),i=y&&zt?jt("created at"):null,a=Kr,l=m=>{if(Kr===a)return m();var h=C,_=Kr;Se(null),ca(a);var b=m();return Se(h),ca(_),b};n&&(r.set("length",z(e.length,i)),y&&(e=ku(e)));var f="";let d=!1;function v(m){if(!d){d=!0,f=m,Ke(o,`${f} version`);for(let[h,_]of r)Ke(_,vn(f,h));d=!1}}return new Proxy(e,{defineProperty(m,h,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&ql();var b=r.get(h);return b===void 0?l(()=>{var g=z(_.value,i);return r.set(h,g),y&&typeof h=="string"&&Ke(g,vn(f,h)),g}):E(b,_.value,!0),!0},deleteProperty(m,h){var _=r.get(h);if(_===void 0){if(h in m){let b=l(()=>z(fe,i));r.set(h,b),mn(o),y&&Ke(b,vn(f,h))}}else E(_,fe),mn(o);return!0},get(m,h,_){if(h===Ge)return e;if(y&&h===wi)return v;var b=r.get(h),g=h in m;if(b===void 0&&(!g||mt(m,h)?.writable)&&(b=l(()=>{var S=Wt(g?m[h]:fe),Z=z(S,i);return y&&Ke(Z,vn(f,h)),Z}),r.set(h,b)),b!==void 0){var $=s(b);return $===fe?void 0:$}return Reflect.get(m,h,_)},getOwnPropertyDescriptor(m,h){this.has?.(m,h);var _=Reflect.getOwnPropertyDescriptor(m,h),b=r.get(h);if(b!==void 0){var g=s(b);if(g===fe)return;if(_&&"value"in _)_.value=g;else return{enumerable:!0,configurable:!0,value:g,writable:!0}}return _},has(m,h){if(h===Ge)return!0;var _=r.get(h),b=_!==void 0&&_.v!==fe||Reflect.has(m,h);if(_!==void 0||A!==null&&(!b||mt(m,h)?.writable)){_===void 0&&(_=l(()=>{var $=b?Wt(m[h]):fe,S=z($,i);return y&&Ke(S,vn(f,h)),S}),r.set(h,_));var g=s(_);if(g===fe)return!1}return b},set(m,h,_,b){var g=r.get(h),$=h in m;if(n&&h==="length")for(var S=_;S<g.v;S+=1){var Z=r.get(S+"");Z!==void 0?E(Z,fe):S in m&&(Z=l(()=>z(fe,i)),r.set(S+"",Z),y&&Ke(Z,vn(f,S)))}if(g===void 0)(!$||mt(m,h)?.writable)&&(g=l(()=>z(void 0,i)),y&&Ke(g,vn(f,h)),E(g,Wt(_)),r.set(h,g));else{$=g.v!==fe;var pe=l(()=>Wt(_));E(g,pe)}var $e=Reflect.getOwnPropertyDescriptor(m,h);if($e?.set&&$e.set.call(b,_),!$){if(n&&typeof h=="string"){var ot=r.get("length"),Ue=Number(h);Number.isInteger(Ue)&&Ue>=ot.v&&E(ot,Ue+1)}mn(o)}return!0},ownKeys(m){s(o);var h=Reflect.ownKeys(m).filter(g=>{var $=r.get(g);return $===void 0||$.v!==fe});for(var[_,b]of r)b.v!==fe&&!(_ in m)&&h.push(_);return h},setPrototypeOf(){zl()}})}function vn(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Eu.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Xn(e){try{if(e!==null&&typeof e=="object"&&Ge in e)return e[Ge]}catch{}return e}function Vi(e,t){return Object.is(Xn(e),Xn(t))}var Tu=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function ku(e){return new Proxy(e,{get(t,r,n){var o=Reflect.get(t,r,n);return Tu.has(r)?function(...i){pf();var a=o.apply(this,i);return Bi(),a}:o}})}function mf(){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(Xn(this[f])===i){Ti("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(Xn(this[f])===i){Ti("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(Xn(this[f])===i){Ti("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=o}}var gn,vf,Po,gf,yf;function Yi(){if(gn===void 0){gn=window,vf=document,Po=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;gf=mt(t,"firstChild").get,yf=mt(t,"nextSibling").get,Hs(e)&&(e[Us]=void 0,e[xi]=null,e[yo]=void 0,e.__e=void 0),Hs(r)&&(r[bo]=void 0),y&&(e.__svelte_meta=null,mf())}}function ye(e=""){return document.createTextNode(e)}function ve(e){return gf.call(e)}function Le(e){return yf.call(e)}function X(e,t){if(!k)return ve(e);var r=ve(P);if(r===null)r=P.appendChild(ye());else if(t&&r.nodeType!==sn){var n=ye();return r?.before(n),ne(n),n}return t&&Ho(r),ne(r),r}function xt(e,t=!1){if(!k){var r=ve(e);return r instanceof Comment&&r.data===""?Le(r):r}if(t){if(P?.nodeType!==sn){var n=ye();return P?.before(n),ne(n),n}Ho(P)}return P}function B(e,t=!1){if(!k)return ve(e);var r=X(e,t);return Y(e),r}function R(e,t=1,r=!1){let n=k?P:e;for(var o;t--;)o=n,n=Le(n);if(!k)return n;if(r){if(n?.nodeType!==sn){var i=ye();return n===null?o?.after(i):n.before(i),ne(i),i}Ho(n)}return ne(n),n}function Ro(e){e.textContent=""}function qi(){if(!ke||Lt!==null)return!1;var e=A.f;return(e&32768)!==0}function Xt(e,t,r){return t==null||t===Ei?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===sn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}var ua=new WeakMap;function bf(e){var t=A;if(t===null)return C.f|=8388608,e;if(y&&e instanceof Error&&!ua.has(e)&&ua.set(e,Au(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw y&&!t.parent&&e instanceof Error&&$f(e),e;lt(e,t)}function lt(e,t){if(e===it)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 y&&e instanceof Error&&$f(e),e}}function Au(e,t){let r=mt(e,"message");if(!(r&&!r.configurable)){for(var n=Po?" ":" ",o=`
|
|
74
74
|
${n}in ${t.fn?.name||"<unknown>"}`,i=t.ctx;i!==null;)o+=`
|
|
75
75
|
${n}in ${i.function?.[st].split("/").pop()}`,i=i.p;return{message:e.message+`
|
|
76
76
|
${o}
|
|
77
77
|
`,stack:e.stack?.split(`
|
|
78
78
|
`).filter(a=>!a.includes("svelte/src/internal")).join(`
|
|
79
|
-
`)}}}function wf(e){let t=ca.get(e);t&&(Ie(e,"message",{value:t.message}),Ie(e,"stack",{value:t.stack}))}function Ef(e){k===null&&(C===null&&Ul(e),Hl()),Dt&&Pl(e)}function Ru(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:q,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)qn!==null?qn.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&&Ru(o,r),C!==null&&(C.f&2)!==0&&(e&64)===0)){var i=C;(i.effects??(i.effects=[])).push(o)}return n}function qr(){return C!==null&&!rt}function Me(e){let t=lr(8,null);return ie(t,1024),t.teardown=e,t}function Pt(e){Ef("$effect"),b&&Ie(e,"name",{value:"$effect"});var t=k.f,r=!C&&(t&32)!==0&&q!==null&&!q.i;if(r){var n=q;(n.e??(n.e=[])).push(e)}else return js(e)}function js(e){return lr(1048580,e)}function pa(e){$t.ensure();let t=lr(524352,e);return()=>{ge(t)}}function Tf(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 nf(e){return lr(4718592,e)}function He(e,t=0){return lr(8|t,e)}function z(e,t=[],r=[],n=[]){Mi(n,t,r,o=>{lr(8,()=>{e(...o.map(s))})})}function pt(e,t=0){var r=lr(16|t,e);return b&&(r.dev_stack=or),r}function Ne(e){return lr(524320,e)}function _a(e){var t=e.teardown;if(t!==null){let r=Dt,n=C;ua(!0),Se(null);try{t.call(null)}catch(o){lt(o,e.parent)}finally{ua(r),Se(n)}}}function Co(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 kf(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&&(ma(e.nodes.start,e.nodes.end),r=!0),e.f|=33554432,Co(e,t&&!r),dn(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(let i of n)i.stop();_a(e),e.f^=33554432,e.f|=16384;var o=e.parent;o!==null&&o.first!==null&&sa(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 ma(e,t){for(;e!==null;){var r=e===t?null:Le(e);e.remove(),e=r}}function sa(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,Af(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 Af(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;Af(o,t,a?r:!1)}o=i}}}function Jn(e){e.f&=-257,Sf(e,!0)}function Sf(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;Sf(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 Qn(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 Rf=null;var Dt=!1;function ua(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 Hi(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 hf(e){wt=e}var Cf=1,bn=0,Kr=bn;function fa(e){Kr=e}function Vn(){return++Cf}function Gr(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(Gr(i)&&Xs(i),i.wv>e.wv)return!0}(t&512)!==0&&Pe===null&&ie(e,1024)}return!1}function Of(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?Of(i,t,!1):t===i&&(r?ie(i,2048):(i.f&1024)!==0&&ie(i,4096),Mo(i))}}function Pi(e){var t=Fe,r=tt,n=wt,o=C,i=Ft,a=q,l=rt,f=Kr,d=e.f;Fe=null,tt=0,wt=null,C=(d&96)===0?e:null,Ft=null,br(e.ctx),rt=!1,Kr=++bn,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=Nf(e);if(ir()&&wt!==null&&!rt&&m!==null&&(e.f&6146)===0)for(var _=0;_<wt.length;_++)Of(wt[_],e);if(o!==null&&o!==e){if(bn++,o.deps!==null)for(let y=0;y<r;y+=1)o.deps[y].rv=bn;if(t!==null)for(let y of t)y.rv=bn;wt!==null&&(n===null?n=wt:n.push(...wt))}return(e.f&8388608)!==0&&(e.f^=8388608),h}catch(y){return Nf(e),$f(y)}finally{e.f^=2097152,Fe=t,tt=r,wt=n,C=o,Ft=i,br(a),rt=l,Kr=f}}function Nf(e){var o;var t=e.deps,r=O?.is_fork;if(Fe!==null){var n;if(r||dn(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(qr()&&(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&&(dn(e,tt),t.length=tt);return t}function Nu(e,t){let r=t.reactions;if(r!==null){var n=wl.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!==fe&&Ln(i),i.ac!==null&&yt(()=>{i.ac.abort(gr),i.ac=null,ie(i,2048)}),rf(i),dn(i,0)}}function dn(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Nu(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;Ii(e.component_function);var o=or;Dn(e.dev_stack??or)}try{(t&16777232)!==0?kf(e):Co(e),_a(e);var i=Pi(e);if(e.teardown=typeof i=="function"?i:null,e.wv=Cf,b&&jt&&(e.f&2048)!==0&&e.deps!==null)for(var a of e.deps)a.set_during_effect&&(a.wv=Vn(),a.set_during_effect=!1)}finally{k=r,b&&(Ii(n),Dn(o))}}}async function Ar(){if(ke)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),zr()}function s(e){var t=e.f,r=(t&2)!==0;if(Rf?.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<bn&&(e.rv=bn,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&&ft&&O===null&&It===null&&!ft.warned&&(ft.effect.f&2097152)===0&&!ft.effect_deps.has(e)){ft.warned=!0,Tl(e.label);var a=zt("traced at");a&&console.warn(a)}if(Ro.delete(e),jt&&!rt&&xo!==null&&C!==null&&xo.reaction===C){if(e.trace)e.trace();else if(a=zt("traced at"),a){var l=xo.entries.get(e);l===void 0&&(l={traces:[]},xo.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 d=e;if(Dt){var v=d.v;return((d.f&1024)===0&&d.reactions!==null||Df(d))&&(v=No(d)),Mt.set(d,v),v}var h=(d.f&512)===0&&!rt&&C!==null&&(C.f&512)!==0,m=(d.f&32768)===0;Gr(d)&&(h&&(d.f|=512),Xs(d)),h&&!m&&(Js(d),If(d))}if(Pe?.has(e))return Pe.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function If(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&&(Js(r),If(r))}}function Df(e){if(e.v===fe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Mt.has(t)||(t.f&2)!==0&&Df(t))return!0;return!1}function ae(e){var t=rt;try{return rt=!0,e()}finally{rt=t}}function Gi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ke in e)zi(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&Ke in r&&zi(r)}}}function zi(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{zi(e[n],t)}catch{}let r=on(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=gi(r);for(let o in n){let i=n[o].get;if(i)try{i.call(e)}catch{}}}}}var Ou=/\r/g;function Lf(e){e=e.replace(Ou,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}var Iu=["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 Wh=[...Iu,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Du=["touchstart","touchmove"];function Mf(e){return Du.includes(e)}var Lu=["$state","$state.raw","$derived","$derived.by"],Xh=[...Lu,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function Ki(e){return e?.replace(/\//g,"/\u200B")}var yn=Symbol("events"),ga=new Set,Zi=new Set;function Pf(e,t,r,n={}){function o(i){if(n.capture||Xi.call(t,i),!i.cancelBubble)return yt(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?(o.__removed=!1,we(()=>{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=Pf(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[yn]??(t[yn]={}))[e]=r}function Wi(e){for(var t=0;t<e.length;t++)ga.add(e[t]);for(var r of Zi)r(e)}var ha=null,va=!1;function Xi(e){var t=this,r=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;ha=e,va||(va=!0,setTimeout(()=>{va=!1,ha=null}));var a=0,l=ha===e&&e[yn];if(l){var f=o.indexOf(l);if(f!==-1&&(t===document||t===window)){e[yn]=t;return}var d=o.indexOf(t);if(d===-1)return;f<=d&&(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[yn]?.[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[yn]=t,delete e.currentTarget,Se(v),Re(h)}}}var Fu=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Hf(e){return Fu?.createHTML(e)??e}function ba(e){var t=Xt("template");return t.innerHTML=Hf(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 ee(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=ba(i?e:"<!>"+e),r||(o=ve(o)));var a=n||Fo?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 Uo(e=""){if(!T){var t=be(e+"");return Je(t,t),t}var r=M;return r.nodeType!==sn?(r.before(r=be()),ne(r)):Po(r),Je(r,r),r}function Sr(){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 Uf(e){let t=0,r=Xe(0),n;return b&&Ze(r,"createSubscriber version"),()=>{qr()&&(s(r),He(()=>(t===0&&(n=ae(()=>e(()=>hn(r)))),t+=1,()=>{we(()=>{t-=1,t===0&&(n?.(),n=void 0,hn(r))})})))}}var Vu=589824;function Ta(e,t,r,n){new ya(e,t,r,n)}var Tt,Bo,Ht,$n,Qe,kt,nt,At,ur,wn,Wr,eo,Yo,qo,dr,Qi,G,Bf,Yf,$a,Zr,qf,wa,Vo,Ji,xa,Ea,ya=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,Bo,T?M:null);F(this,Ht);F(this,$n);F(this,Qe);F(this,kt,null);F(this,nt,null);F(this,At,null);F(this,ur,null);F(this,wn,0);F(this,Wr,0);F(this,eo,!1);F(this,Yo,new Set);F(this,qo,new Set);F(this,dr,null);F(this,Qi,Uf(()=>(I(this,dr,Xe(c(this,wn))),b&&Ze(c(this,dr),"$effect.pending()"),()=>{I(this,dr,null)})));I(this,Tt,t),I(this,Ht,r),I(this,$n,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,pt(()=>{if(T){let i=an(c(this,Bo));De();let a=i==="[!";if(i.startsWith("[?")){let f=JSON.parse(i.slice("[?".length));L(this,G,Yf).call(this,f)}else a?L(this,G,qf).call(this):L(this,G,Bf).call(this)}else L(this,G,wa).call(this)},Vu)),T&&I(this,Tt,M)}defer_effect(t){Di(t,c(this,Yo),c(this,qo))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Ht).pending}update_pending_count(t,r){L(this,G,xa).call(this,t,r),I(this,wn,c(this,wn)+t),!(!c(this,dr)||c(this,eo))&&(I(this,eo,!0),we(()=>{I(this,eo,!1),c(this,dr)&&Kt(c(this,dr),c(this,wn))}))}get_effect_pending(){return c(this,Qi).call(this),s(c(this,dr))}error(t){if(t===it||!c(this,Ht).onerror&&!c(this,Ht).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,Zr).call(this)||L(this,G,Ea).call(this,t)})):L(this,G,Ea).call(this,t)}};Tt=new WeakMap,Bo=new WeakMap,Ht=new WeakMap,$n=new WeakMap,Qe=new WeakMap,kt=new WeakMap,nt=new WeakMap,At=new WeakMap,ur=new WeakMap,wn=new WeakMap,Wr=new WeakMap,eo=new WeakMap,Yo=new WeakMap,qo=new WeakMap,dr=new WeakMap,Qi=new WeakMap,G=new WeakSet,Bf=function(){try{I(this,kt,Ne(()=>c(this,$n).call(this,c(this,Tt))))}catch(t){this.error(t)}},Yf=function(t){let r=c(this,Ht).failed,{reset:n,invoke_onerror:o}=L(this,G,$a).call(this,t);we(o),r&&I(this,At,Ne(()=>{r(c(this,Tt),()=>t,()=>n)}))},$a=function(t){var r=!1,n=!1;let o=()=>{if(!L(this,G,Zr).call(this)){if(r){Ol();return}r=!0,n&&Kl(),c(this,At)!==null&&fr(c(this,At),()=>{I(this,At,null)}),L(this,G,Ji).call(this,()=>{L(this,G,wa).call(this)})}};return{reset:o,invoke_onerror:()=>{if(!L(this,G,Zr).call(this))try{n=!0,c(this,Ht).onerror?.(t,o),n=!1}catch(a){lt(a,c(this,Qe)&&c(this,Qe).parent)}}}},Zr=function(){return(c(this,Qe).f&33570816)!==0},qf=function(){let t=c(this,Ht).pending;t&&(this.is_pending=!0,I(this,nt,Ne(()=>t(c(this,Tt)))),we(()=>{if(!L(this,G,Zr).call(this)){var r=I(this,ur,document.createDocumentFragment()),n=be(),o=!1;if(r.append(n),I(this,kt,L(this,G,Ji).call(this,()=>{try{return Ne(()=>c(this,$n).call(this,n))}catch(i){try{this.error(i),o=!0}catch(a){lt(a,c(this,Qe).parent)}return null}})),c(this,kt)===null){I(this,ur,null),o&&L(this,G,Vo).call(this,O);return}c(this,Wr)===0&&(c(this,Tt).before(r),I(this,ur,null),fr(c(this,nt),()=>{I(this,nt,null)}),L(this,G,Vo).call(this,O))}}))},wa=function(){try{if(this.is_pending=this.has_pending_snippet(),I(this,Wr,0),I(this,wn,0),I(this,kt,Ne(()=>{c(this,$n).call(this,c(this,Tt))})),c(this,Wr)>0){var t=I(this,ur,document.createDocumentFragment());Qn(c(this,kt),t);let r=c(this,Ht).pending;I(this,nt,Ne(()=>r(c(this,Tt))))}else L(this,G,Vo).call(this,O)}catch(r){this.error(r)}},Vo=function(t){this.is_pending=!1,t.transfer_effects(c(this,Yo),c(this,qo))},Ji=function(t){var r=k,n=C,o=q;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)}},xa=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&L(n=this.parent,G,xa).call(n,t,r);return}I(this,Wr,c(this,Wr)+t),c(this,Wr)===0&&(L(this,G,Vo).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)))},Ea=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,Bo)),wo(),ne(nr()));let r=c(this,Ht).failed,n=o=>{if(L(this,G,Zr).call(this))return;let{reset:i,invoke_onerror:a}=L(this,G,$a).call(this,o);a(),r&&!L(this,G,Zr).call(this)&&I(this,At,L(this,G,Ji).call(this,()=>{try{return Ne(()=>{var l=k;l.b=this,l.f|=128,r(c(this,Tt),()=>o,()=>i)})}catch(l){return lt(l,c(this,Qe).parent),null}}))};we(()=>{if(!L(this,G,Zr).call(this)){var o;try{o=this.transform_error(t)}catch(i){lt(i,c(this,Qe)&&c(this,Qe).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(n,i=>lt(i,c(this,Qe)&&c(this,Qe).parent)):n(o)}})};var ka=!0;function R(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[n=bo]??(e[n]=e.nodeValue))&&(e[bo]=r,e.nodeValue=`${r}`)}function ts(e,t){return jf(e,t)}function jo(e,t){qi(),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 it;Te(!0),ne(i);let a=jf(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!==it&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Bl(),
|
|
81
|
-
\r\f\xA0\v\uFEFF`];function Gf(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 Ca(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Kf(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(Ca)),o&&f.push(...Object.keys(o).map(Ca));var d=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 _=Ca(e.substring(d,v).trim());if(!f.includes(_)){m!==";"&&h++;var y=e.substring(d,h).trim();r+=" "+y+";"}}d=h+1,v=-1}}}}return n&&(r+=Gf(n)),o&&(r+=Gf(o,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Oa(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 Tn(e,t,r,n){var o=e[go];if(T||o!==t){var i=Kf(t,n);(!T||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e[go]=t}else n&&(Array.isArray(n)?(Oa(e,r?.[0],n[0]),Oa(e,r?.[1],n[1],"important")):Oa(e,r,n));return n}function Da(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function od(e,t){var r=e.__defaultValue,n=e.multiple,o=n?r??[]:null;if(!(n&&!qt(o))){var i=e.selectedIndex,a=t&&n?new Set(e.selectedOptions):null;for(var l of e.options){var f=Ia(l);Da(l,n?o.includes(f):Yi(f,r))}if(t)if(a!==null)for(l of e.options){var d=a.has(l);l.selected!==d&&(l.selected=d)}else e.selectedIndex!==i&&(e.selectedIndex=i)}}function Qr(e,t,r=!1){if(e.multiple){if(t==null)return;if(!qt(t))return Cl();for(var n of e.options)n.selected=t.includes(Ia(n));return}for(n of e.options){var o=Ia(n);if(Yi(o,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function kn(e){var t=new MutationObserver(r=>{r.every(id)||("__defaultValue"in e&&od(e,!1),"__value"in e&&Qr(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Me(()=>{t.disconnect()})}function Ia(e){return"__value"in e?e.__value:e.value}function id(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 cd=Symbol("is custom element"),ud=Symbol("is html"),dd=Vs?"link":"LINK";function to(e){if(T){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;Q(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var o=e.checked;Q(e,"checked",null),e.checked=o}}};e[Vr]=r,we(r),Li()}}function os(e,t){var r=Jf(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Q(e,t,r,n){var o=Jf(e);if(T&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===dd)){n||_d(e,t,r??"");return}o[t]!==(o[t]=r)&&(t==="loading"&&(e[El]=r),r==null?e.removeAttribute(t):typeof r!="string"&&pd(e).has(t)?e[t]=r:e.setAttribute(t,r))}function Jf(e){var t;return e[t=Ei]??(e[t]={[cd]:e.nodeName.includes("-"),[ud]:e.namespaceURI===Ti})}var Zf=new Map;function pd(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=gi(o);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);o=on(o)}return r}function _d(e,t,r){b&&(t==="srcset"&&md(e,r)||La(e.getAttribute(t)??"",r)||Sl(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function La(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Wf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function md(e,t){var r=Wf(e.srcset),n=Wf(t);return n.length===r.length&&n.every(([o,i],a)=>i===r[a][1]&&(La(r[a][0],o)||La(o,r[a][0])))}function ss(e,t,r=t){var n=new WeakSet;zs(e,"input",async o=>{b&&e.type==="checkbox"&&Ys();var i=o?e.defaultValue:e.value;if(i=Ma(e)?Fa(i):i,r(i),O!==null&&n.add(O),await Ar(),i!==(i=t())){var a=e.selectionStart,l=e.selectionEnd,f=e.value.length;if(e.value=i??"",l!==null){var d=e.value.length;a===l&&l===f&&d>f?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=a,e.selectionEnd=Math.min(l,d))}}}),(T&&e.defaultValue!==e.value||ae(t)==null&&e.value)&&(r(Ma(e)?Fa(e.value):e.value),O!==null&&n.add(O)),He(()=>{b&&e.type==="checkbox"&&Ys();var o=t();if(e===document.activeElement){var i=ke?It:O;if(n.has(i))return}Ma(e)&&o===Fa(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function Ma(e){var t=e.type;return t==="number"||t==="range"}function Fa(e){return e===""?null:+e}function Pa(e,t){return e===t||e?.[Ke]===t}function en(e=ko(),t,r,n){var o=q.r,i=k;return Et(()=>{var a,l;return He(()=>{a=l,l=n?.()||[],ae(()=>{Pa(r(...l),e)||(t(e,...l),a&&Pa(r(...a),e)&&t(null,...a))})}),()=>{let f=i;for(;f!==o&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;let d=()=>{l&&Pa(r(...l),e)&&t(null,...l)},v=f.teardown;f.teardown=()=>{d(),v?.()}}}),e}function Qf(e){return new Ua(e)}var Nr,Ut,Ua=class{constructor(t){F(this,Nr);F(this,Ut);var r=new Map,n=(i,a)=>{var l=mn(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===wi?!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,Ut,(t.hydrate?jo:ts)(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)&&zr(),I(this,Nr,o.$$events);for(let i of Object.keys(c(this,Ut)))i==="$set"||i==="$destroy"||i==="$on"||Ie(this,i,{get(){return c(this,Ut)[i]},set(a){c(this,Ut)[i]=a},enumerable:!0});c(this,Ut).$set=i=>{Object.assign(o,i)},c(this,Ut).$destroy=()=>{zo(c(this,Ut))}}$set(t){c(this,Ut).$set(t)}$on(t,r){c(this,Nr)[t]=c(this,Nr)[t]||[];let n=(...o)=>r.call(this,...o);return c(this,Nr)[t].push(n),()=>{c(this,Nr)[t]=c(this,Nr)[t].filter(o=>o!==n)}}$destroy(){c(this,Ut).$destroy()}};Nr=new WeakMap,Ut=new WeakMap;var Td;typeof HTMLElement=="function"&&(Td=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=Xt("slot");o!=="default"&&(a.name=o),D(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=kd(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]=Va(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=Qf({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=pa(()=>{He(()=>{this.$$r=!0;for(let o of Ms(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let i=Va(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]=Va(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 Ms(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Va(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 kd(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;ql(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function ec(e){q===null&&Ni("onMount"),Yr&&q.l!==null?Sd(q).m.push(e):Pt(()=>{let t=ae(e);if(typeof t=="function")return t})}function Sd(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var tc;typeof window<"u"&&((tc=window.__svelte??(window.__svelte={})).v??(tc.v=new Set)).add("5");async function rc(e,t,r){let n=new URL(e,document.baseURI);if(n.origin!==location.origin)throw new Error("Unsafe search endpoint");n.searchParams.set("q",t);let o=await fetch(n,{signal:r,cache:"no-store"});if(!o.ok)throw new Error("Archive search unavailable");let i=await o.json();if(typeof i!="object"||i===null||!("version"in i)||i.version!==1||!("results"in i)||!Array.isArray(i.results)||i.results.length>1e4||!("truncated"in i)||typeof i.truncated!="boolean")throw new Error("Invalid archive results");return{records:i.results.map(l=>{if(typeof l!="object"||l===null||!("name"in l)||typeof l.name!="string"||!("path"in l)||typeof l.path!="string"||!("kind"in l)||!["file","directory"].includes(String(l.kind))||!("href"in l)||l.href!==null&&typeof l.href!="string")throw new Error("Invalid archive record");let f=l.href===null?null:new URL(l.href,n);if(f&&!["http:","https:"].includes(f.protocol))throw new Error("Unsafe archive link");return{name:l.name,path:l.path,href:f?.href??null,exitsExplorer:l.kind!=="directory"}}),truncated:i.truncated}}var Ba=["directory","file","link"];function Nd(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 nc(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(e,1e9)):0}function as(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 d={field:f[0],direction:f[1],nameMode:f[2],directoriesFirst:f[3]==="folders"};["folders","mixed"].includes(f[3])&&Nd(d)&&(l.sort=d)}if(a.has("dw.types")){let d=a.get("dw.types").split(",").filter(Boolean);d.every(v=>Ba.includes(v))&&(l.types=[...new Set(d)])}}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 d=f.view;l.selected=typeof d.selected=="string"&&d.selected.length<=4096?d.selected:null,l.windowY=nc(d.windowY),l.listTop=nc(d.listTop)}}return l}function Cd(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&&Ba.some(i=>r.types.includes(i)!==(n.types??Ba).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 oc(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=Cd(t,e,a,l),d=n(o,i,a);try{history.replaceState(d,"",f),t=f,r=d}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 Od={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 ic(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">${Od[e]}</svg>`}function Ya(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 B=class extends Error{constructor(){super(...arguments);re(this,"name","ListingDataError")}},Xo=class extends B{},ro=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ls=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>=0,sc=e=>typeof e=="string"&&["directory","file","symlink","other"].includes(e);function Cr(e,t){if(typeof e!="string")throw new B(`Invalid ${t}`);return e}function qa(e,t){if(typeof e!="boolean")throw new B(`Invalid ${t}`);return e}function Id(e,t){if(e===null)return null;let r=new URL(Cr(e,"href"),t);if(!["http:","https:"].includes(r.protocol))throw new B("Unsupported listing link protocol");return r.href}function ac(e,t){if(!ro(e)||!sc(e.kind)||typeof e.size!="number"||!Number.isFinite(e.size)||e.size<0)throw new B("Invalid listing entry");let r=null;if(e.link!==null){if(!ro(e.link))throw new B("Invalid link metadata");let n=e.link.targetKind;if(n!==null&&(!sc(n)||n==="symlink"))throw new B("Invalid target kind");let o=e.link.targetSize;if(o!==null&&(typeof o!="number"||!Number.isFinite(o)||o<0))throw new B("Invalid target size");r={target:Cr(e.link.target,"target"),targetKind:n,targetSize:o,unavailable:qa(e.link.unavailable,"unavailable"),cycle:qa(e.link.cycle,"cycle")}}return{...e.data===void 0?{}:{data:Ya(e.data)},...e.presentation===void 0?{}:{presentation:Ya(e.presentation)},id:Cr(e.id,"id"),name:Cr(e.name,"name"),kind:e.kind,href:Id(e.href,t),exitsExplorer:qa(e.exitsExplorer,"exitsExplorer"),size:e.size,modifiedAt:Cr(e.modifiedAt,"modifiedAt"),link:r}}function Dd(e){if(!ro(e)||e.version!==1||!ls(e.total)||!Array.isArray(e.blocks)||!ro(e.sort))throw new B("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 B("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(!ro(a)||!ls(a.offset)||!ls(a.count))throw new B("Invalid block descriptor");return{href:Cr(a.href,"block href"),offset:a.offset,count:a.count}});if(i.length===0)throw new B("Missing blocks");return{version:1,revision:Cr(e.revision,"revision"),directory:Cr(e.directory,"directory"),hrefBase:Cr(e.hrefBase,"href base"),total:e.total,sort:{field:r,direction:n,nameMode:o,directoriesFirst:t.directoriesFirst},blocks:i}}async function Jo(e,t={}){let r=t.fetch??fetch,n=t.maxEntries??1e5;if(!ls(n))throw new B("Invalid entry limit");let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new B("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 B(`Manifest request failed: ${l.status}`);let f=Dd(await l.json());if(f.total>n)throw new B("Listing exceeds the configured entry limit");let d=new URL(f.hrefBase,o);if(!["http:","https:"].includes(d.protocol))throw new B("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 B("Invalid block coverage");let _=new URL(m.href,o);if(_.origin!==o.origin||!["http:","https:"].includes(_.protocol))throw new B("Block leaves the manifest origin");let y=await r(_,a);if(y.status===404||y.status===410)throw new Xo("Block no longer available");if(!y.ok)throw new B(`Block request failed: ${y.status}`);let g=await y.json();if(!ro(g)||g.version!==1||g.revision!==f.revision)throw new Xo("Listing revision changed");if(g.offset!==m.offset||g.total!==f.total||!Array.isArray(g.entries)||g.entries.length!==m.count)throw new B("Invalid block envelope");for(let $ of g.entries){let A=ac($,d);if(h.has(A.id))throw new B("Duplicate entry ID");h.add(A.id),v.push(A)}}if(v.length!==f.total)throw new B("Incomplete listing");return{manifest:f,entries:v}}catch(a){if(t.signal?.aborted||!(a instanceof Xo)||i===1)throw a}throw new B("Listing unavailable")}function lc(e,t,r=1e5){if(!Array.isArray(e)||e.length>r)throw new B("Invalid page slice");let n=new URL(t),o=new Set,i=e.map(a=>ac(a,n));for(let a of i){if(o.has(a.id))throw new B("Duplicate entry ID");o.add(a.id)}return i}var Ld={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 no(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={...Ld};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 d=e.actions??[];if(!Array.isArray(d)||new Set(d).size!==d.length||d.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:[...d],cssVariables:{...v}}}var pS=no();function An(e,t,r={}){return e.labels[t].replace(/\{([a-zA-Z]+)\}/g,(n,o)=>Object.hasOwn(r,o)?String(r[o]):n)}var Qo=new Map;function ja(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=Qo.get(a);return l===void 0&&(l=new Intl.DateTimeFormat(o,{timeZone:i,dateStyle:"short",timeStyle:"short"}),Qo.size>=32&&Qo.delete(Qo.keys().next().value),Qo.set(a,l)),l.format(n)}async function fc(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 cc(e,t){return typeof e=="string"?t.labels[e]:e.label}function uc(e){return e==null?"":typeof e=="object"?JSON.stringify(e):String(e)}async function za(e,t,r,n,o=!1,i=0){let a=new URL(e,document.baseURI);if(a.origin!==location.origin)throw new B("Folder leaves the theme origin");let l=await fetch(a,{signal:n,cache:o?"no-store":"default"});if(!l.ok)throw new B("Unavailable folder");let f=await l.json();if(typeof f!="object"||f===null||Array.isArray(f))throw new B("Invalid folder snapshot");let d=f;if(d.version!==1||d.theme!==r||typeof d.title!="string"||typeof d.path!="string"||!Number.isSafeInteger(d.total)||Number(d.total)<0||!Array.isArray(d.breadcrumbs))throw new B("Unsupported folder snapshot");if(d.metadataHead!==void 0&&typeof d.metadataHead!="string")throw new B("Invalid folder metadata");let v=d.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 B("Invalid folder order");if(r==="crosswave"){let g=d.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 B("Invalid folder categories")}let h=document.querySelector("base")?.href??t,m=g=>{if(g===null)return null;if(typeof g!="string")throw new B("Invalid folder link");let $=new URL(g,h);if(!["http:","https:"].includes($.protocol)||$.origin!==location.origin)throw new B("Unsupported folder link");return $.href},_=lc(d.entries,h).map(g=>({...g,...g.presentation?{presentation:{...g.presentation,folderDataHref:m(g.presentation.folderDataHref??null)}}:{}}));if(_.length>Number(d.total))throw new B("Invalid folder count");if(d.page!==null){let g=d.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(d.total)||g.total!==d.total)throw new B("Invalid folder pagination");d.page={...g,href:m(g.href),previousHref:m(g.previousHref),nextHref:m(g.nextHref)}}d.ui!==void 0&&no(d.ui);let y={...d,searchQueryHref:m(d.searchQueryHref??null),updatesHref:m(d.updatesHref??null),entries:_,dataHref:a.href,manifestHref:m(d.manifestHref),rootHref:m(d.rootHref),rootDataHref:m(d.rootDataHref),parentHref:m(d.parentHref),parentDataHref:m(d.parentDataHref),breadcrumbs:d.breadcrumbs.map(g=>{if(typeof g!="object"||g===null||!("name"in g)||!("href"in g)||!("dataHref"in g)||typeof g.name!="string")throw new B("Invalid breadcrumb");return{name:g.name,href:m(g.href),dataHref:m(g.dataHref)}})};if(y.manifestHref){let g=await Jo(y.manifestHref,{signal:n,cache:o?"no-store":"default"});if(g.manifest.total!==d.total||d.listingRevision!==void 0&&g.manifest.revision!==d.listingRevision){if(i<2)return za(e,t,r,n,!0,i+1);throw new B("Folder changed while refreshing")}y.entries=[...g.entries]}return y}var fs=new WeakMap;function dc(e,t){if(!t||typeof document>"u")return e;let r=document.querySelector("[data-dirwell-theme]");if(!r)return e;let n=fs.get(r)??e;return fs.set(r,n),n}function pc(e,t){let r=document.querySelector("[data-dirwell-theme]");r&&fs.has(r)&&fs.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",d=a.getAttribute(f)??"";if(!/^(?:description|og:[a-z_:]+|twitter:[a-z_:]+)$/i.test(d))continue;let v=a.getAttribute("content")??"";if(["og:image","og:url","twitter:image"].includes(d)){let h=i(v);if(h===null)continue;v=h}l=document.createElement("meta"),l.setAttribute(f,d),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 oo=e=>e.kind==="directory"||e.link?.targetKind==="directory",Ga=e=>e.kind==="symlink"?"link":oo(e)?"directory":"file";function Ka(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 mc(e,t,r,n){return e.map(o=>({entry:o,score:Ka(t,`${o.name} ${o.link?.target??""}`)})).filter(o=>r.includes(Ga(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&&oo(a)!==oo(l))return oo(a)?-1:1;let f=()=>n.nameMode==="unicode"?_c(a.name,l.name):a.name.localeCompare(l.name,void 0,{numeric:n.nameMode==="natural",sensitivity:"base"}),d=(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"?d:-d)||_c(a.id,l.id)}).map(o=>o.entry)}function _c(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 hc(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 Md=ee('<img width="40" height="40"/>'),Fd=ee("<!> <h1> </h1> <span> </span>",1),Pd=ee("/ <a> </a>",1),Hd=ee('<label><input type="checkbox"/> </label>'),cs=ee("<button> </button>"),Za=ee("<a> </a>"),Ud=ee("<span> </span>"),Vd=ee('<li class="entry"><a>../</a></li>'),vc=ee('<li aria-hidden="true"></li>'),Bd=ee('<span class="file-icon" aria-hidden="true"></span> ',1),Yd=ee('<a class="name"><!></a>'),qd=ee("<span><!></span>"),jd=ee('<small class="target"> </small>'),zd=ee('<span class="identity"><!><!></span>'),Gd=ee('<span class="kind"> </span>'),Kd=ee('<button class="timestamp-button"><time> </time></button>'),Zd=ee('<span class="entry-data"> </span>'),Wd=ee('<a download=""> </a>'),Xd=ee('<span data-dirwell-actions="" style="grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.5rem"><!> <!></span>'),Jd=ee('<li class="entry" data-entry=""><!> <!></li>'),Qd=ee("<p> </p>"),ep=ee('<a rel="prev"> </a>'),tp=ee('<a rel="next"> </a>'),rp=ee("<nav><!> <!></nav>"),np=ee('<p class="brand-footer"><!></p>'),op=ee('<p class="keyboard-help"> </p>'),ip=ee("<dialog><h2> </h2> <p> </p> <p> </p> <button> </button></dialog>"),sp=ee("<li><!></li>"),ap=ee('<dialog><h2> </h2> <input type="search"/> <p role="status"> </p> <!> <ul></ul> <button> </button></dialog>'),lp=ee('<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 Wa(e,t){Eo(t,!0);let r=ae(()=>dc(t.model,!1)),n=j(r),o=j(r.entries),i=j(""),a=j(Wt(["directory","file","link"])),l=j(r.sort),f=j("system"),d=j(null),v=j(!1),h=j(!1),m=j(""),_=j(null),y=j(null),g=j(!1),$=j(0),A=j(800),K=j(!1),pe=j(""),$e=j([]),ot=j(Wt(no(r.ui).labels.beginArchive)),Ue=j(null),w=Ot(()=>no(s(n).ui)),Qt=j(!1),_t=Ot(()=>An(s(w),s(mt)?"entries":"pageEntries",{count:"__COUNT__",total:s(n).total}).split("__COUNT__")),ze=j(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),ue=Ot(()=>mc(s(o),s(g)?"":s(i),s(a),s(l))),io=Ot(()=>s(v)&&s(ue).length>500),Or=Ot(()=>{let u=[0];for(let p of s(ue))u.push(u.at(-1)+(s(ze).get(p.id)??76));return u}),so=Ot(()=>{if(!s(io))return 0;let u=0,p=s(ue).length;for(;u<p;){let x=u+p>>1;s(Or)[x+1]<=s($)?u=x+1:p=x}return Math.max(0,u-5)}),us=Ot(()=>{if(!s(io))return s(ue).length;let u=0,p=s(ue).length;for(;u<p;){let x=u+p>>1;s(Or)[x+1]<=s($)+s(A)?u=x+1:p=x}return Math.min(s(ue).length,Math.max(s(so)+35,u+5))});function gc(u,p){if(typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{let N=u.getBoundingClientRect().height;if(N>0&&s(ze).get(p)!==N){let U=new Map(s(ze));U.set(p,N),E(ze,U)}});return x.observe(u),{destroy:()=>x.disconnect()}}let Ir=j(void 0),ei=j(void 0),ds=j(void 0),ao=j(void 0),lo=j(void 0),Dr=0,fo,co,Lr=0,Xa=null,Ja="",Qa=0,Sn,Rn=null,uo=u=>({query:"",sort:u.sort,types:["directory","file","link"]});function ps(){Sn&&Sn.save(new URL(s(n).dataHref,document.baseURI).href,s(n).path,{query:s(i),types:s(a),sort:s(l),selected:s(d),windowY:window.scrollY,listTop:s($)},uo(s(n)))}function bc(){s(_)==="folder"&&Rn?tn(...Rn,!0):tn(s(n).dataHref,location.href,!1,!0)}Pt(()=>{if(!s(v)||s(h))return;let u={query:s(i),types:s(a),sort:s(l),selected:s(d),listTop:s($)},p=s(n).dataHref,x=s(n).path,N=uo(s(n)),U=requestAnimationFrame(()=>Sn?.save(new URL(p,document.baseURI).href,x,{...u,windowY:window.scrollY},N));return()=>cancelAnimationFrame(U)});let ti=oo;function el(u){return typeof location<"u"&&location.protocol==="file:"&&ti(u)&&!u.exitsExplorer&&u.href?.endsWith("/")?u.href+"index.html":u.href}async function tl(){if(s(mt)||!s(n).manifestHref||location.protocol==="file:")return;let u=fo,p=Dr;E(h,!0);try{let x=await Jo(new URL(s(n).manifestHref,document.baseURI).href,{signal:u.signal,cache:s(n).updatesHref?"no-store":"default"});p===Dr&&!u.signal.aborted&&E(o,x.entries)}catch{p===Dr&&!u.signal.aborted&&(E(m,s(w).labels.listingError,!0),E(_,"listing"))}finally{p===Dr&&E(h,!1)}}async function yc(u,p){ps();let x=p.presentation?.folderDataHref;p.exitsExplorer||u?.altKey||u?.ctrlKey||u?.metaKey||u?.shiftKey||u?.button>0||typeof x!="string"||location.protocol==="file:"||(u?.preventDefault(),await tn(x,new URL(p.href,document.baseURI).href,!0))}async function tn(u,p,x,N=!1,U=null,te=!1){x&&ps();let V=++Dr;fo?.abort();let Z=fo=new AbortController;E(h,!0),E(m,""),E(_,null);try{let P=await za(u,p,"ledger",Z.signal,N||te),X=P.entries;if(N&&P.manifestHref&&X.length!==P.total&&(X=(await Jo(P.manifestHref,{signal:Z.signal,cache:"no-store"})).entries),V!==Dr||Z.signal.aborted)return;if(N||Sn.commit(P.dataHref,P.path,p,x),E(n,P),E(o,X),Rn=null,!N){let _e=as(p,"ledger",P.path,uo(P),[],U);E(i,_e.query,!0),E(a,_e.types,!0),E(l,_e.sort),E(d,_e.selected,!0),E($,_e.listTop,!0)}if(pc(P,p),await tl(),!N){let _e=as(p,"ledger",P.path,uo(P),[],U);await Ar(),s(d)&&!s(ue).some(Vt=>Vt.id===s(d))&&E(d,null),window.scrollTo({top:_e.windowY}),U&&s(d)&&s(Ir)?.querySelector(`[data-id="${CSS.escape(s(d))}"] a`)?.focus({preventScroll:!0})}}catch{V===Dr&&!Z.signal.aborted&&(E(m,s(w).labels.folderError,!0),E(_,"folder"),Rn=[u,p,x,N,U],Sn?.rollback())}finally{V===Dr&&E(h,!1)}}function _s(u,p,x){typeof p!="string"||typeof x!="string"||u?.altKey||u?.ctrlKey||u?.metaKey||u?.shiftKey||u?.button>0||location.protocol==="file:"||(u?.preventDefault(),tn(x,new URL(p,document.baseURI).href,!0))}async function $c(u){let p=Math.max(0,Math.min(s(ue).length-1,u)),x=s(ue)[p];x&&(E(d,x.id,!0),s(io)&&(E($,Math.max(0,s(Or)[p]-100),!0),s(Ir)&&window.scrollTo({top:s(Ir).getBoundingClientRect().top+window.scrollY+s($)})),await Ar(),s(Ir)?.querySelector(`[data-order="${u}"] a`)?.focus({preventScroll:!0}))}function wc(u){if(u.isComposing||u.altKey||u.ctrlKey||u.metaKey)return;if(s(K)){u.key==="Escape"&&(u.preventDefault(),ri());return}if(s(y)){u.key==="Escape"&&E(y,null);return}if(u.target?.closest?.("[data-dirwell-actions]"))return;let p=/INPUT|TEXTAREA|SELECT/.test(u.target?.tagName??"");if(u.key==="/"&&!p){u.preventDefault(),s(ei)?.focus();return}if(p){u.key==="Escape"&&(E(i,""),s(ei)?.blur());return}if(u.key==="Backspace"&&s(n).parentHref){u.preventDefault(),location.protocol==="file:"||typeof s(n).parentDataHref!="string"?location.href=s(n).parentHref:tn(s(n).parentDataHref,new URL(s(n).parentHref,document.baseURI).href,!0);return}let x=s(ue).findIndex(N=>N.id===s(d));["ArrowDown","ArrowUp","Home","End"].includes(u.key)&&(u.preventDefault(),$c(u.key==="Home"?0:u.key==="End"?s(ue).length-1:x+(u.key==="ArrowDown"?1:-1)))}function xc(u){E(f,u,!0);try{localStorage.setItem("dirwell-color-scheme",u)}catch{}}let Nn,ms,po=!1;async function ri(){E(K,!1),await Ar(),ms?.focus()}function Ec(){co?.abort(),Lr++,po=!1,clearTimeout(Nn),Nn=setTimeout(()=>{Nn=void 0,hs()},300)}Pt(()=>{if(!s(K)||!s(n).searchQueryHref)return;let u=setInterval(()=>{document.visibilityState==="visible"&&s(pe).trim()&&!po&&Nn===void 0&&hs()},s(n).searchRefreshIntervalMs??2e3);return()=>{clearInterval(u),clearTimeout(Nn),Nn=void 0,po=!1,co?.abort(),Lr++}});async function hs(){let u=++Lr;co?.abort();let p=co=new AbortController;E($e,[]),E(Qt,!1);let x=s(pe).trim();if(!x){E(ot,s(w).labels.beginArchive,!0);return}E(ot,s(w).labels.searchingArchive,!0),po=!0;try{if(s(n).searchQueryHref){let V=await rc(s(n).searchQueryHref,x,p.signal);if(u!==Lr||p.signal.aborted)return;E($e,V.records),E(ot,V.truncated?An(s(w),"truncatedResults",{shown:V.records.length,count:V.records.length+"+"}):An(s(w),"archiveResults",{count:V.records.length}),!0);return}let N=new URL(s(n).searchIndexHref,document.baseURI),U=Ja===N.href&&Date.now()-Qa<6e4?Xa:null;if(U===null){let V=await fetch(N,{signal:p.signal});if(!V.ok)throw new Error("Unavailable archive");let Z=await V.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 Vt=await _e.json();if(!Array.isArray(Vt.entries)||U.length+Vt.entries.length>1e5)throw new Error("Invalid archive");for(let se of Vt.entries){if(typeof se.name!="string"||typeof se.path!="string"||typeof se.exitsExplorer!="boolean")throw new Error("Invalid archive record");let me=se.href===null?null:new URL(se.href,N);if(me&&!["http:","https:"].includes(me.protocol))throw new Error("Unsupported archive link");U.push({name:se.name,path:se.path,href:me?.href??null,exitsExplorer:se.exitsExplorer})}}if(u!==Lr||p.signal.aborted)return;Xa=U,Ja=N.href,Qa=Date.now()}let te=U.map(V=>({record:V,score:Ka(x,V.name+" "+V.path)})).filter(V=>V.score!==null).sort((V,Z)=>Z.score-V.score||V.record.path.localeCompare(Z.record.path));if(u!==Lr||p.signal.aborted)return;E($e,te.slice(0,100).map(V=>V.record)),E(ot,te.length>100?An(s(w),"truncatedResults",{shown:100,count:te.length}):An(s(w),"archiveResults",{count:te.length}),!0)}catch{u===Lr&&!p.signal.aborted&&(E(ot,s(w).labels.archiveError,!0),E(Qt,!0))}finally{u===Lr&&(po=!1)}}ec(()=>{E(A,innerHeight,!0),E(v,!0),fo=new AbortController;try{let x=localStorage.getItem("dirwell-color-scheme");["system","light","dark"].includes(x)&&E(f,x,!0)}catch{}Sn=oc("ledger");let u=as(location.href,"ledger",s(n).path,uo(s(n)),[],history.state);E(i,u.query,!0),E(a,u.types,!0),E(l,u.sort),E(d,u.selected,!0),E($,u.listTop,!0),ps();let p=x=>{x.state?.dataHref?tn(x.state.dataHref,location.href,!1,!1,x.state):location.reload()};return window.addEventListener("popstate",p),tl(),()=>{fo?.abort(),co?.abort(),window.removeEventListener("popstate",p)}}),Pt(()=>{let u=s(hr);if(!u||typeof EventSource>"u")return;let p=new EventSource(u);return p.onmessage=()=>E(Ue,u,!0),p.onerror=()=>{E(m,s(w).labels.updatesError,!0),E(_,"updates")},p.onopen=()=>{s(_)==="updates"&&(E(m,""),E(_,null))},()=>p.close()}),Pt(()=>{if(s(v)&&!s(h)&&s(Ue)){let u=s(Ue);E(Ue,null),u===s(hr)&&tn(s(n).dataHref,location.href,!1,!0)}}),Pt(()=>{s(v)&&(document.documentElement.dataset.theme=s(f))}),Pt(()=>{s(ao)&&s(y)&&!s(ao).open&&s(ao).showModal()}),Pt(()=>{s(lo)&&s(K)&&!s(lo).open&&(s(lo).showModal(),Ar().then(()=>s(ds)?.focus()))});var rl=lp();cr("resize",gn,()=>E(A,innerHeight,!0)),cr("keydown",gn,wc),cr("scroll",gn,()=>{s(Ir)&&E($,Math.max(0,window.scrollY-s(Ir).offsetTop),!0)});var vs=xt(rl),gs=W(vs),Tc=W(gs);{var kc=u=>{var p=Sr(),x=xt(p);En(x,()=>t.header,()=>({model:s(n)})),D(u,p)},Ac=u=>{var p=Fd(),x=xt(p);{var N=P=>{var X=Md();z(()=>{Q(X,"src",s(w).brand.logoUrl),Q(X,"alt",s(w).brand.logoAlt??"")}),D(P,X)};le(x,P=>{s(w).brand.logoUrl&&P(N)})}var U=S(x,2),te=H(U,!0),V=S(U,2),Z=H(V,!0);z(()=>{R(te,s(w).brand.name??s(n).title),R(Z,s(w).labels.archive)}),D(u,p)};le(Tc,u=>{t.header?u(kc):u(Ac,-1)})}Y(gs);var bs=S(gs,2),ni=W(bs),Sc=H(ni,!0),Rc=S(ni);Rr(Rc,17,()=>s(n).breadcrumbs,Jr,(u,p)=>{wo();var x=Pd(),N=S(xt(x)),U=H(N,!0);z(()=>{Q(N,"href",s(p).href),R(U,s(p).name)}),ye("click",N,te=>_s(te,s(p).href,s(p).dataHref)),D(u,x)}),Y(bs),Y(vs);var oi=S(vs,2),ys=W(oi),$s=W(ys),nl=W($s,!0),rn=S(nl);to(rn),en(rn,u=>E(ei,u),()=>s(ei)),Y($s);var ii=S($s,2),ol=W(ii),Nc=H(ol,!0),Cc=S(ol);Rr(Cc,16,()=>["directory","file","link"],Jr,(u,p)=>{var x=Hd(),N=W(x);to(N);var U=S(N,1,!0);Y(x),z(te=>{os(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(V=>V!==p),!0)),D(u,x)}),Y(ii);var ws=S(ii,2),il=W(ws,!0),Mr=S(il),si=W(Mr),Oc=H(si,!0);si.value=si.__value="name";var ai=S(si),Ic=H(ai,!0);ai.value=ai.__value="size";var xs=S(ai),Dc=H(xs,!0);xs.value=xs.__value="modified",Y(Mr);var li;kn(Mr),Y(ws);var Es=S(ws,2),sl=W(Es,!0),Fr=S(sl),fi=W(Fr),Lc=H(fi,!0);fi.value=fi.__value="natural";var ci=S(fi),Mc=H(ci,!0);ci.value=ci.__value="locale";var Ts=S(ci),Fc=H(Ts,!0);Ts.value=Ts.__value="unicode",Y(Fr);var ui;kn(Fr),Y(Es);var ks=S(Es,2),al=W(ks,!0),Pr=S(al),di=W(Pr),Pc=H(di,!0);di.value=di.__value="asc";var As=S(di),Hc=H(As,!0);As.value=As.__value="desc",Y(Pr);var pi;kn(Pr),Y(ks);var Ss=S(ks,2),_o=W(Ss);to(_o);var Uc=S(_o,1,!0);Y(Ss);var Rs=S(Ss,2),ll=W(Rs,!0),Hr=S(ll),_i=W(Hr),Vc=H(_i,!0);_i.value=_i.__value="system";var mi=S(_i),Bc=H(mi,!0);mi.value=mi.__value="light";var Ns=S(mi),Yc=H(Ns,!0);Ns.value=Ns.__value="dark",Y(Hr);var hi;kn(Hr),Y(Rs);var qc=S(Rs,2);{var jc=u=>{var p=cs(),x=H(p,!0);en(p,N=>ms=N,()=>ms),z(()=>{p.disabled=!s(v),R(x,s(w).labels.searchArchive)}),ye("click",p,()=>E(K,!0)),D(u,p)};le(qc,u=>{(s(n).searchIndexHref||s(n).searchQueryHref)&&u(jc)})}Y(ys);var Cs=S(ys,2),Os=W(Cs),fl=W(Os,!0),cl=S(fl),zc=H(cl,!0),ul=S(cl,1,!0),Gc=S(ul),Kc=H(Gc,!0);Y(Os);var dl=S(Os,2);{var Zc=u=>{var p=cs(),x=H(p,!0);z(()=>{p.disabled=s(h),R(x,s(w).labels.retry)}),ye("click",p,bc),D(u,p)};le(dl,u=>{s(_)&&s(_)!=="copy"&&u(Zc)})}var pl=S(dl,2);{var Wc=u=>{var p=Za(),x=H(p,!0);z(()=>{Q(p,"href",Rn[1]),R(x,s(w).labels.openNative)}),D(u,p)};le(pl,u=>{s(_)==="folder"&&Rn&&u(Wc)})}var mo=S(pl,2);let _l;Rr(mo,21,()=>s(w).columns,Jr,(u,p)=>{var x=Ud(),N=H(x,!0);z(U=>R(N,U),[()=>cc(s(p),s(w))]),D(u,x)}),Y(mo);var vi=S(mo,2),ml=W(vi);{var Xc=u=>{var p=Vd(),x=H(p);z(()=>Q(x,"href",s(n).parentHref)),ye("click",x,N=>_s(N,s(n).parentHref,s(n).parentDataHref)),D(u,p)};le(ml,u=>{s(n).parentHref&&u(Xc)})}var hl=S(ml,2);{var Jc=u=>{var p=vc();let x;z(()=>x=Tn(p,"",x,{height:s(Or)[s(so)]+"px"})),D(u,p)};le(hl,u=>{s(so)&&u(Jc)})}var vl=S(hl,2);Rr(vl,19,()=>s(ue).slice(s(so),s(us)),u=>u.id,(u,p,x)=>{var N=Jd();let U;var te=W(N);Rr(te,17,()=>s(w).columns,Jr,(P,X)=>{var _e=Sr(),Vt=xt(_e);{var se=Ge=>{var Ee=zd(),Ce=W(Ee);{var Oe=Nt=>{var et=Yd(),vo=W(et);{var Is=Be=>{var Yt=Sr(),nn=xt(Yt);En(nn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(d)===s(p).id})),D(Be,Yt)},Ds=Be=>{var Yt=Bd(),nn=xt(Yt);Ra(nn,()=>ic(Ga(s(p))),!0),Y(nn);var uu=S(nn);z(du=>R(uu,` ${s(p).name??""}${du??""}`),[()=>ti(s(p))?"/":""]),D(Be,Yt)};le(vo,Be=>{t.row?Be(Is):Be(Ds,-1)})}Y(et),z(Be=>{Q(et,"href",Be),Q(et,"target",s(p).exitsExplorer?"_blank":void 0),Q(et,"rel",s(p).exitsExplorer?"noopener":void 0)},[()=>el(s(p))]),ye("click",et,Be=>yc(Be,s(p))),cr("focus",et,()=>E(d,s(p).id,!0)),D(Nt,et)},Rt=Nt=>{var et=qd(),vo=W(et);{var Is=Be=>{var Yt=Sr(),nn=xt(Yt);En(nn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(d)===s(p).id})),D(Be,Yt)},Ds=Be=>{var Yt=Uo();z(()=>R(Yt,s(p).name)),D(Be,Yt)};le(vo,Be=>{t.row?Be(Is):Be(Ds,-1)})}Y(et),D(Nt,et)};le(Ce,Nt=>{s(p).href?Nt(Oe):Nt(Rt,-1)})}var Bt=S(Ce);{var ho=Nt=>{var et=jd(),vo=H(et);z(()=>R(vo,`${s(p).link.unavailable?s(w).labels.unavailable+" \xB7 ":"\u2192 "}${s(p).link.target??""}`)),D(Nt,et)};le(Bt,Nt=>{s(p).link&&Nt(ho)})}Y(Ee),D(Ge,Ee)},me=Ge=>{var Ee=Gd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>ti(s(p))?s(w).labels.folder:hc(s(p).size)]),D(Ge,Ee)},Ve=Ge=>{var Ee=Kd(),Ce=W(Ee),Oe=H(Ce,!0);Y(Ee),z(Rt=>{Ee.disabled=!s(v),Q(Ce,"datetime",s(p).modifiedAt),R(Oe,Rt)},[()=>ja(s(p).modifiedAt,s(w),s(v))]),ye("click",Ee,()=>E(y,s(p).modifiedAt,!0)),D(Ge,Ee)},Ur=Ge=>{var Ee=Zd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>uc(s(p).data?.[s(X).dataKey])]),D(Ge,Ee)};le(Vt,Ge=>{s(X)==="name"?Ge(se):s(X)==="size"?Ge(me,1):s(X)==="modified"?Ge(Ve,2):Ge(Ur,-1)})}D(P,_e)});var V=S(te,2);{var Z=P=>{var X=Xd(),_e=W(X);{var Vt=me=>{var Ve=Sr(),Ur=xt(Ve);En(Ur,()=>t.actions,()=>({model:s(n),entry:s(p),selected:s(d)===s(p).id})),D(me,Ve)};le(_e,me=>{t.actions&&me(Vt)})}var se=S(_e,2);Rr(se,17,()=>s(w).actions,Jr,(me,Ve)=>{var Ur=Sr(),Ge=xt(Ur);{var Ee=Rt=>{var Bt=Wd(),ho=H(Bt,!0);z(Nt=>{Q(Bt,"href",Nt),R(ho,s(w).labels.download)},[()=>el(s(p))]),D(Rt,Bt)},Ce=Ot(()=>s(Ve)==="download"&&s(p).href&&!ti(s(p))&&!s(p).link?.unavailable),Oe=Rt=>{var Bt=cs(),ho=H(Bt,!0);z(()=>{Bt.disabled=!s(v)||s(Ve)==="copy-link"&&!s(p).href,Q(Bt,"aria-label",(s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)+": "+s(p).name),R(ho,s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)}),ye("click",Bt,async()=>{try{await fc(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,Bt)};le(Ge,Rt=>{s(Ce)?Rt(Ee):s(Ve)!=="download"&&Rt(Oe,1)})}D(me,Ur)}),Y(X),D(P,X)};le(V,P=>{(t.actions||s(w).actions.length)&&P(Z)})}Y(N),Na(N,(P,X)=>gc?.(P,X),()=>s(p).id),z((P,X)=>{Q(N,"data-custom-columns",P),Q(N,"data-id",s(p).id),Q(N,"data-order",s(so)+s(x)),Q(N,"data-active",s(d)===s(p).id),U=Tn(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(u,N)});var Qc=S(vl,2);{var eu=u=>{var p=vc();let x;z(()=>x=Tn(p,"",x,{height:s(Or)[s(ue).length]-s(Or)[s(us)]+"px"})),D(u,p)};le(Qc,u=>{s(us)<s(ue).length&&u(eu)})}Y(vi),en(vi,u=>E(Ir,u),()=>s(Ir));var tu=S(vi,2);{var ru=u=>{var p=Qd(),x=H(p,!0);z(()=>R(x,s(n).total===0?s(w).labels.empty:s(w).labels.noMatches)),D(u,p)};le(tu,u=>{s(ue).length===0&&!s(h)&&u(ru)})}Y(Cs);var gl=S(Cs,2);{var nu=u=>{var p=rp(),x=W(p);{var N=Z=>{var P=ep(),X=H(P,!0);z(()=>{Q(P,"href",s(n).page.previousHref),R(X,s(w).labels.previous)}),D(Z,P)};le(x,Z=>{s(n).page.previousHref&&Z(N)})}var U=S(x),te=S(U);{var V=Z=>{var P=tp(),X=H(P,!0);z(()=>{Q(P,"href",s(n).page.nextHref),R(X,s(w).labels.next)}),D(Z,P)};le(te,Z=>{s(n).page.nextHref&&Z(V)})}Y(p),z(Z=>{Q(p,"aria-label",s(w).labels.pagination),R(U,` ${Z??""} `)},[()=>An(s(w),"page",{page:s(n).page.number,pages:s(n).page.count})]),D(u,p)};le(gl,u=>{s(n).page?.count>1&&!s(mt)&&u(nu)})}var ou=S(gl,2);{var iu=u=>{var p=Sr(),x=xt(p);En(x,()=>t.footer,()=>({model:s(n)})),D(u,p)},su=u=>{var p=np(),x=W(p);{var N=te=>{var V=Za(),Z=H(V,!0);z(()=>{Q(V,"href",s(w).brand.footerUrl),R(Z,s(w).brand.footerText)}),D(te,V)},U=te=>{var V=Uo();z(()=>R(V,s(w).brand.footerText)),D(te,V)};le(x,te=>{s(w).brand.footerUrl?te(N):te(U,-1)})}Y(p),D(u,p)},au=u=>{var p=op(),x=H(p,!0);z(()=>R(x,s(w).labels.keyboardHelp)),D(u,p)};le(ou,u=>{t.footer?u(iu):s(w).brand.footerText?u(su,1):u(au,-1)})}Y(oi);var bl=S(oi,2);{var lu=u=>{var p=ip(),x=W(p),N=H(x,!0),U=S(x,2),te=H(U,!0),V=S(U,2),Z=H(V,!0),P=S(V,2),X=H(P,!0);Y(p),en(p,_e=>E(ao,_e),()=>s(ao)),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?ja(s(y),s(w),!0):new Date(s(y)).toLocaleString()]),cr("close",p,()=>E(y,null)),ye("click",P,()=>E(y,null)),D(u,p)};le(bl,u=>{s(y)&&u(lu)})}var fu=S(bl,2);{var cu=u=>{var p=ap(),x=W(p),N=H(x,!0),U=S(x,2);to(U),en(U,se=>E(ds,se),()=>s(ds));var te=S(U,2),V=H(te,!0),Z=S(te,2);{var P=se=>{var me=cs(),Ve=H(me,!0);z(()=>R(Ve,s(w).labels.retry)),ye("click",me,hs),D(se,me)};le(Z,se=>{s(Qt)&&se(P)})}var X=S(Z,2);Rr(X,21,()=>s($e),Jr,(se,me)=>{var Ve=sp(),Ur=W(Ve);{var Ge=Ce=>{var Oe=Za(),Rt=H(Oe,!0);z(()=>{Q(Oe,"href",s(me).href),Q(Oe,"target",s(me).exitsExplorer?"_blank":void 0),Q(Oe,"rel",s(me).exitsExplorer?"noopener":void 0),R(Rt,s(me).path)}),D(Ce,Oe)},Ee=Ce=>{var Oe=Uo();z(()=>R(Oe,s(me).path)),D(Ce,Oe)};le(Ur,Ce=>{s(me).href?Ce(Ge):Ce(Ee,-1)})}Y(Ve),D(se,Ve)}),Y(X);var _e=S(X,2),Vt=H(_e,!0);Y(p),en(p,se=>E(lo,se),()=>s(lo)),z(()=>{Q(p,"aria-label",s(w).labels.searchArchive),R(N,s(w).labels.searchArchive),Q(U,"aria-label",s(w).labels.archiveSearchInput),R(V,s(ot)),R(Vt,s(w).labels.close)}),cr("close",p,ri),ye("keydown",p,se=>{se.key==="Escape"&&(se.preventDefault(),se.stopPropagation(),ri())}),ye("input",U,Ec),ss(U,()=>s(pe),se=>E(pe,se)),ye("click",_e,ri),D(u,p)};le(fu,u=>{s(K)&&u(cu)})}z((u,p,x)=>{Q(bs,"aria-label",s(w).labels.breadcrumb),Q(ni,"href",s(n).rootHref),R(Sc,s(w).labels.home),Q(oi,"aria-busy",s(h)),R(nl,s(w).labels.searchDirectory),Q(rn,"placeholder",s(w).labels.searchFiles),rn.disabled=!s(v)||!s(mt),ii.disabled=!s(v)||!s(mt),R(Nc,s(w).labels.types),R(il,s(w).labels.sort),Mr.disabled=!s(v)||!s(mt),R(Oc,s(w).labels.name),R(Ic,s(w).labels.size),R(Dc,s(w).labels.modified),li!==(li=s(l).field)&&(Mr.value=(Mr.__value=li)??"",Qr(Mr,li)),R(sl,s(w).labels.names),Fr.disabled=!s(v)||!s(mt),R(Lc,s(w).labels.natural),R(Mc,s(w).labels.locale),R(Fc,s(w).labels.unicode),ui!==(ui=s(l).nameMode)&&(Fr.value=(Fr.__value=ui)??"",Qr(Fr,ui)),R(al,s(w).labels.order),Pr.disabled=!s(v)||!s(mt),R(Pc,s(w).labels.ascending),R(Hc,s(w).labels.descending),pi!==(pi=s(l).direction)&&(Pr.value=(Pr.__value=pi)??"",Qr(Pr,pi)),os(_o,s(l).directoriesFirst),_o.disabled=!s(v)||!s(mt),R(Uc,s(w).labels.directoriesFirst),R(ll,s(w).labels.appearance),Hr.disabled=!s(v),R(Vc,s(w).labels.system),R(Bc,s(w).labels.light),R(Yc,s(w).labels.dark),hi!==(hi=s(f))&&(Hr.value=(Hr.__value=hi)??"",Qr(Hr,hi)),R(fl,s(_t)[0]),R(zc,s(mt)?s(ue).length:s(o).length),R(ul,u),R(Kc,s(h)?s(w).labels.loading:s(m)),Q(mo,"data-custom-columns",p),_l=Tn(mo,"",_l,{"grid-template-columns":x})},[()=>s(_t).slice(1).join("__COUNT__"),()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(u=>u==="name"?"minmax(0,1fr)":typeof u=="object"?"minmax(0,12rem)":"minmax(6rem,max-content)").join(" "):void 0]),ye("click",ni,u=>_s(u,s(n).rootHref,s(n).rootDataHref)),cr("compositionstart",rn,()=>E(g,!0)),cr("compositionend",rn,()=>E(g,!1)),ss(rn,()=>s(i),u=>E(i,u)),ye("change",Mr,u=>E(l,{...s(l),field:u.currentTarget.value})),ye("change",Fr,u=>E(l,{...s(l),nameMode:u.currentTarget.value})),ye("change",Pr,u=>E(l,{...s(l),direction:u.currentTarget.value})),ye("change",_o,u=>E(l,{...s(l),directoriesFirst:u.currentTarget.checked})),ye("change",Hr,u=>xc(u.currentTarget.value)),D(e,rl),To()}Wi(["click","change","keydown","input"]);var fp=document.querySelector("[data-dirwell-theme]"),cp=JSON.parse(document.querySelector("#dirwell-page-data").textContent),up=jo(Wa,{target:fp,props:{model:cp}});globalThis.__dirwellUnmount=()=>zo(up);})();
|
|
79
|
+
`)}}}function $f(e){let t=ua.get(e);t&&(Ie(e,"message",{value:t.message}),Ie(e,"stack",{value:t.stack}))}function xf(e){A===null&&(C===null&&Hl(e),Pl()),Dt&&Fl(e)}function Ru(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function fr(e,t){var r=A;if(y)for(;r!==null&&(r.f&131072)!==0;)r=r.parent;r!==null&&(r.f&8192)!==0&&(e|=8192);var n={ctx:q,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};y&&(n.component_function=gt),I?.register_created_effect(n);var o=n;if((e&4)!==0)qn!==null?qn.push(n):$t.ensure().schedule(n);else if(t!==null){try{ar(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&&Ru(o,r),C!==null&&(C.f&2)!==0&&(e&64)===0)){var i=C;(i.effects??(i.effects=[])).push(o)}return n}function qr(){return C!==null&&!rt}function Me(e){let t=fr(8,null);return ie(t,1024),t.teardown=e,t}function Pt(e){xf("$effect"),y&&Ie(e,"name",{value:"$effect"});var t=A.f,r=!C&&(t&32)!==0&&q!==null&&!q.i;if(r){var n=q;(n.e??(n.e=[])).push(e)}else return js(e)}function js(e){return fr(1048580,e)}function _a(e){$t.ensure();let t=fr(524352,e);return()=>{ge(t)}}function Ef(e){$t.ensure();let t=fr(524352,e);return(r={})=>new Promise(n=>{r.outro?cr(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Et(e){return fr(4,e)}function rf(e){return fr(4718592,e)}function He(e,t=0){return fr(8|t,e)}function j(e,t=[],r=[],n=[]){Li(n,t,r,o=>{fr(8,()=>{e(...o.map(s))})})}function pt(e,t=0){var r=fr(16|t,e);return y&&(r.dev_stack=ir),r}function Ne(e){return fr(524320,e)}function ha(e){var t=e.teardown;if(t!==null){let r=Dt,n=C;da(!0),Se(null);try{t.call(null)}catch(o){lt(o,e.parent)}finally{da(r),Se(n)}}}function Oo(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){let o=r.ac;o!==null&&bt(()=>{o.abort(br)});var n=r.next;(r.f&64)!==0?r.parent=null:ge(r,t),r=n}}function Tf(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&&(ma(e.nodes.start,e.nodes.end),r=!0),e.f|=33554432,Oo(e,t&&!r),dn(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(let i of n)i.stop();ha(e),e.f^=33554432,e.f|=16384;var o=e.parent;o!==null&&o.first!==null&&aa(e),y&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ma(e,t){for(;e!==null;){var r=e===t?null:Le(e);e.remove(),e=r}}function aa(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 cr(e,t,r=!0){var n=[];e.f|=256,kf(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 kf(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;kf(o,t,a?r:!1)}o=i}}}function Jn(e){e.f&=-257,Af(e,!0)}function Af(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;Af(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 Qn(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 Sf=null;var Dt=!1;function da(e){Dt=e}var C=null,rt=!1;function Se(e){C=e}var A=null;function Re(e){A=e}var Ft=null;function Pi(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 hf(e){wt=e}var Nf=1,yn=0,Kr=yn;function ca(e){Kr=e}function Bn(){return++Nf}function Gr(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(Gr(i)&&Js(i),i.wv>e.wv)return!0}(t&512)!==0&&Pe===null&&ie(e,1024)}return!1}function Cf(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?Cf(i,t,!1):t===i&&(r?ie(i,2048):(i.f&1024)!==0&&ie(i,4096),Fo(i))}}function Fi(e){var t=Fe,r=tt,n=wt,o=C,i=Ft,a=q,l=rt,f=Kr,d=e.f;Fe=null,tt=0,wt=null,C=(d&96)===0?e:null,Ft=null,$r(e.ctx),rt=!1,Kr=++yn,e.ac!==null&&(bt(()=>{e.ac.abort(br)}),e.ac=null);try{e.f|=2097152;var v=e.fn,m=v();e.f|=32768;var h=Rf(e);if(sr()&&wt!==null&&!rt&&h!==null&&(e.f&6146)===0)for(var _=0;_<wt.length;_++)Cf(wt[_],e);if(o!==null&&o!==e){if(yn++,o.deps!==null)for(let b=0;b<r;b+=1)o.deps[b].rv=yn;if(t!==null)for(let b of t)b.rv=yn;wt!==null&&(n===null?n=wt:n.push(...wt))}return(e.f&8388608)!==0&&(e.f^=8388608),m}catch(b){return Rf(e),bf(b)}finally{e.f^=2097152,Fe=t,tt=r,wt=n,C=o,Ft=i,$r(a),rt=l,Kr=f}}function Rf(e){var o;var t=e.deps,r=I?.is_fork;if(Fe!==null){var n;if(r||dn(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(qr()&&(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&&(dn(e,tt),t.length=tt);return t}function Nu(e,t){let r=t.reactions;if(r!==null){var n=$l.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||!yr.call(Fe,t))){var i=t;(i.f&512)!==0&&(i.f^=512),i.v!==fe&&Ln(i),i.ac!==null&&bt(()=>{i.ac.abort(br),i.ac=null,ie(i,2048)}),tf(i),dn(i,0)}}function dn(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Nu(e,r[n])}function ar(e){var t=e.f;if((t&16384)===0){ie(e,1024);var r=A;if(A=e,y){var n=gt;Oi(e.component_function);var o=ir;Dn(e.dev_stack??ir)}try{(t&16777232)!==0?Tf(e):Oo(e),ha(e);var i=Fi(e);if(e.teardown=typeof i=="function"?i:null,e.wv=Nf,y&&zt&&(e.f&2048)!==0&&e.deps!==null)for(var a of e.deps)a.set_during_effect&&(a.wv=Bn(),a.set_during_effect=!1)}finally{A=r,y&&(Oi(n),Dn(o))}}}async function ur(){if(ke)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),jr()}function s(e){var t=e.f,r=(t&2)!==0;if(Sf?.add(e),C!==null&&!rt){var n=A!==null&&(A.f&16384)!==0;if(!n&&(Ft===null||!Ft.has(e))){var o=C.deps;if((C.f&2097152)!==0)e.rv<yn&&(e.rv=yn,Fe===null&&o!==null&&o[tt]===e?tt++:Fe===null?Fe=[e]:Fe.push(e));else{C.deps??(C.deps=[]),yr.call(C.deps,e)||C.deps.push(e);var i=e.reactions;i===null?e.reactions=[C]:yr.call(i,C)||i.push(C)}}}if(y){if(!rt&&ft&&I===null&&It===null&&!ft.warned&&(ft.effect.f&2097152)===0&&!ft.effect_deps.has(e)){ft.warned=!0,El(e.label);var a=jt("traced at");a&&console.warn(a)}if(No.delete(e),zt&&!rt&&Eo!==null&&C!==null&&Eo.reaction===C){if(e.trace)e.trace();else if(a=jt("traced at"),a){var l=Eo.entries.get(e);l===void 0&&(l={traces:[]},Eo.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 d=e;if(Dt){var v=d.v;return((d.f&1024)===0&&d.reactions!==null||If(d))&&(v=Co(d)),Mt.set(d,v),v}var m=(d.f&512)===0&&!rt&&C!==null&&(C.f&512)!==0,h=(d.f&32768)===0;Gr(d)&&(m&&(d.f|=512),Js(d)),m&&!h&&(Qs(d),Of(d))}if(Pe?.has(e))return Pe.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function Of(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:yr.call(t,e)||t.push(e),(r.f&2)!==0&&(r.f&512)===0&&(Qs(r),Of(r))}}function If(e){if(e.v===fe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Mt.has(t)||(t.f&2)!==0&&If(t))return!0;return!1}function ae(e){var t=rt;try{return rt=!0,e()}finally{rt=t}}function ji(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ge in e)zi(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&Ge in r&&zi(r)}}}function zi(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{zi(e[n],t)}catch{}let r=on(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=vi(r);for(let o in n){let i=n[o].get;if(i)try{i.call(e)}catch{}}}}}var Ou=/\r/g;function Df(e){e=e.replace(Ou,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}var Iu=["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 Wm=[...Iu,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Du=["touchstart","touchmove"];function Lf(e){return Du.includes(e)}var Lu=["$state","$state.raw","$derived","$derived.by"],Xm=[...Lu,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function Gi(e){return e?.replace(/\//g,"/\u200B")}var bn=Symbol("events"),ya=new Set,Ki=new Set;function Ff(e,t,r,n={}){function o(i){if(n.capture||Wi.call(t,i),!i.cancelBubble)return bt(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?(o.__removed=!1,we(()=>{o.__removed||t.addEventListener(e,o,n)})):t.addEventListener(e,o,n),o}function dr(e,t,r,n,o){var i={capture:n,passive:o},a=Ff(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Me(()=>{a.__removed=!0,t.removeEventListener(e,a,i)})}function be(e,t,r){(t[bn]??(t[bn]={}))[e]=r}function Zi(e){for(var t=0;t<e.length;t++)ya.add(e[t]);for(var r of Ki)r(e)}var va=null,ga=!1;function Wi(e){var t=this,r=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;va=e,ga||(ga=!0,setTimeout(()=>{ga=!1,va=null}));var a=0,l=va===e&&e[bn];if(l){var f=o.indexOf(l);if(f!==-1&&(t===document||t===window)){e[bn]=t;return}var d=o.indexOf(t);if(d===-1)return;f<=d&&(a=f)}if(i=o[a]||e.target,i!==t){Ie(e,"currentTarget",{configurable:!0,get(){return i||r}});var v=C,m=A;Se(null),Re(null);try{for(var h,_=[];i!==null&&i!==t;){try{var b=i[bn]?.[n];b!=null&&(!i.disabled||e.target===i)&&b.call(i,e)}catch(g){h?_.push(g):h=g}if(e.cancelBubble)break;a++,i=a<o.length?o[a]:null}if(h){for(let g of _)queueMicrotask(()=>{throw g});throw h}}finally{e[bn]=t,delete e.currentTarget,Se(v),Re(m)}}}var Fu=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Pf(e){return Fu?.createHTML(e)??e}function ba(e){var t=Xt("template");return t.innerHTML=Pf(e.replaceAll("<!>","<!---->")),t.content}function Xe(e,t){var r=A;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function te(e,t){var r=(t&1)!==0,n=(t&2)!==0,o,i=!e.startsWith("<!>");return()=>{if(k)return Xe(P,null),P;o===void 0&&(o=ba(i?e:"<!>"+e),r||(o=ve(o)));var a=n||Po?document.importNode(o,!0):o.cloneNode(!0);if(r){var l=ve(a),f=a.lastChild;Xe(l,f)}else Xe(a,a);return a}}function Bo(e=""){if(!k){var t=ye(e+"");return Xe(t,t),t}var r=P;return r.nodeType!==sn?(r.before(r=ye()),ne(r)):Ho(r),Xe(r,r),r}function Rr(){if(k)return Xe(P,null),P;var e=document.createDocumentFragment(),t=document.createComment(""),r=ye();return e.append(t,r),Xe(t,r),e}function L(e,t){if(k){var r=A;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=P),De();return}e!==null&&e.before(t)}function Hf(e){let t=0,r=We(0),n;return y&&Ke(r,"createSubscriber version"),()=>{qr()&&(s(r),He(()=>(t===0&&(n=ae(()=>e(()=>mn(r)))),t+=1,()=>{we(()=>{t-=1,t===0&&(n?.(),n=void 0,mn(r))})})))}}var Bu=589824;function ka(e,t,r,n){new $a(e,t,r,n)}var Tt,Yo,Ht,$n,Je,kt,nt,At,pr,wn,Wr,eo,qo,zo,_r,Ji,G,Bf,Vf,wa,Zr,Yf,xa,Vo,Xi,Ea,Ta,$a=class{constructor(t,r,n,o){H(this,G);re(this,"parent");re(this,"is_pending",!1);re(this,"transform_error");H(this,Tt);H(this,Yo,k?P:null);H(this,Ht);H(this,$n);H(this,Je);H(this,kt,null);H(this,nt,null);H(this,At,null);H(this,pr,null);H(this,wn,0);H(this,Wr,0);H(this,eo,!1);H(this,qo,new Set);H(this,zo,new Set);H(this,_r,null);H(this,Ji,Hf(()=>(D(this,_r,We(c(this,wn))),y&&Ke(c(this,_r),"$effect.pending()"),()=>{D(this,_r,null)})));D(this,Tt,t),D(this,Ht,r),D(this,$n,i=>{var a=A;a.b=this,a.f|=128,n(i)}),this.parent=A.b,this.transform_error=o??this.parent?.transform_error??(i=>i),D(this,Je,pt(()=>{if(k){let i=an(c(this,Yo));De();let a=i==="[!";if(i.startsWith("[?")){let f=JSON.parse(i.slice("[?".length));M(this,G,Vf).call(this,f)}else a?M(this,G,Yf).call(this):M(this,G,Bf).call(this)}else M(this,G,xa).call(this)},Bu)),k&&D(this,Tt,P)}defer_effect(t){Ii(t,c(this,qo),c(this,zo))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Ht).pending}update_pending_count(t,r){M(this,G,Ea).call(this,t,r),D(this,wn,c(this,wn)+t),!(!c(this,_r)||c(this,eo))&&(D(this,eo,!0),we(()=>{D(this,eo,!1),c(this,_r)&&Kt(c(this,_r),c(this,wn))}))}get_effect_pending(){return c(this,Ji).call(this),s(c(this,_r))}error(t){if(t===it||!c(this,Ht).onerror&&!c(this,Ht).failed)throw t;I?.is_fork?(c(this,kt)&&I.skip_effect(c(this,kt)),c(this,nt)&&I.skip_effect(c(this,nt)),c(this,At)&&I.skip_effect(c(this,At)),I.oncommit(()=>{M(this,G,Zr).call(this)||M(this,G,Ta).call(this,t)})):M(this,G,Ta).call(this,t)}};Tt=new WeakMap,Yo=new WeakMap,Ht=new WeakMap,$n=new WeakMap,Je=new WeakMap,kt=new WeakMap,nt=new WeakMap,At=new WeakMap,pr=new WeakMap,wn=new WeakMap,Wr=new WeakMap,eo=new WeakMap,qo=new WeakMap,zo=new WeakMap,_r=new WeakMap,Ji=new WeakMap,G=new WeakSet,Bf=function(){try{D(this,kt,Ne(()=>c(this,$n).call(this,c(this,Tt))))}catch(t){this.error(t)}},Vf=function(t){let r=c(this,Ht).failed,{reset:n,invoke_onerror:o}=M(this,G,wa).call(this,t);we(o),r&&D(this,At,Ne(()=>{r(c(this,Tt),()=>t,()=>n)}))},wa=function(t){var r=!1,n=!1;let o=()=>{if(!M(this,G,Zr).call(this)){if(r){Cl();return}r=!0,n&&Gl(),c(this,At)!==null&&cr(c(this,At),()=>{D(this,At,null)}),M(this,G,Xi).call(this,()=>{M(this,G,xa).call(this)})}};return{reset:o,invoke_onerror:()=>{if(!M(this,G,Zr).call(this))try{n=!0,c(this,Ht).onerror?.(t,o),n=!1}catch(a){lt(a,c(this,Je)&&c(this,Je).parent)}}}},Zr=function(){return(c(this,Je).f&33570816)!==0},Yf=function(){let t=c(this,Ht).pending;t&&(this.is_pending=!0,D(this,nt,Ne(()=>t(c(this,Tt)))),we(()=>{if(!M(this,G,Zr).call(this)){var r=D(this,pr,document.createDocumentFragment()),n=ye(),o=!1;if(r.append(n),D(this,kt,M(this,G,Xi).call(this,()=>{try{return Ne(()=>c(this,$n).call(this,n))}catch(i){try{this.error(i),o=!0}catch(a){lt(a,c(this,Je).parent)}return null}})),c(this,kt)===null){D(this,pr,null),o&&M(this,G,Vo).call(this,I);return}c(this,Wr)===0&&(c(this,Tt).before(r),D(this,pr,null),cr(c(this,nt),()=>{D(this,nt,null)}),M(this,G,Vo).call(this,I))}}))},xa=function(){try{if(this.is_pending=this.has_pending_snippet(),D(this,Wr,0),D(this,wn,0),D(this,kt,Ne(()=>{c(this,$n).call(this,c(this,Tt))})),c(this,Wr)>0){var t=D(this,pr,document.createDocumentFragment());Qn(c(this,kt),t);let r=c(this,Ht).pending;D(this,nt,Ne(()=>r(c(this,Tt))))}else M(this,G,Vo).call(this,I)}catch(r){this.error(r)}},Vo=function(t){this.is_pending=!1,t.transfer_effects(c(this,qo),c(this,zo))},Xi=function(t){var r=A,n=C,o=q;Re(c(this,Je)),Se(c(this,Je)),$r(c(this,Je).ctx);try{return $t.ensure(),t()}finally{Re(r),Se(n),$r(o)}},Ea=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&M(n=this.parent,G,Ea).call(n,t,r);return}D(this,Wr,c(this,Wr)+t),c(this,Wr)===0&&(M(this,G,Vo).call(this,r),c(this,nt)&&cr(c(this,nt),()=>{D(this,nt,null)}),c(this,pr)&&(c(this,Tt).before(c(this,pr)),D(this,pr,null)))},Ta=function(t){c(this,kt)&&(ge(c(this,kt)),D(this,kt,null)),c(this,nt)&&(ge(c(this,nt)),D(this,nt,null)),c(this,At)&&(ge(c(this,At)),D(this,At,null)),k&&(ne(c(this,Yo)),xo(),ne(or()));let r=c(this,Ht).failed,n=o=>{if(M(this,G,Zr).call(this))return;let{reset:i,invoke_onerror:a}=M(this,G,wa).call(this,o);a(),r&&!M(this,G,Zr).call(this)&&D(this,At,M(this,G,Xi).call(this,()=>{try{return Ne(()=>{var l=A;l.b=this,l.f|=128,r(c(this,Tt),()=>o,()=>i)})}catch(l){return lt(l,c(this,Je).parent),null}}))};we(()=>{if(!M(this,G,Zr).call(this)){var o;try{o=this.transform_error(t)}catch(i){lt(i,c(this,Je)&&c(this,Je).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(n,i=>lt(i,c(this,Je)&&c(this,Je).parent)):n(o)}})};var Aa=!0;function N(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[n=bo]??(e[n]=e.nodeValue))&&(e[bo]=r,e.nodeValue=`${r}`)}function es(e,t){return qf(e,t)}function jo(e,t){Yi(),t.intro=t.intro??!1;let r=t.target,n=k,o=P;try{for(var i=ve(r);i&&(i.nodeType!==vt||i.data!=="[");)i=Le(i);if(!i)throw it;Te(!0),ne(i);let a=qf(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!==it&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Bl(),Yi(),Ro(r),Te(!1),es(e,t)}finally{Te(n),ne(o)}}var Qi=new Map;function qf(e,{target:t,anchor:r,props:n={},events:o,context:i,intro:a=!0,transformError:l}){Yi();var f=void 0,d=Ef(()=>{var v=r??t.appendChild(ye());ka(v,{pending:()=>{}},_=>{To({});var b=q;if(i&&(b.c=i),o&&(n.$$events=o),k&&Xe(_,null),Aa=a,f=e(_,n)||Ao(),Aa=!0,k&&(A.nodes.end=P,P===null||P.nodeType!==vt||P.data!=="]"))throw Vr(),it;ko()},l);var m=new Set,h=_=>{for(var b=0;b<_.length;b++){var g=_[b];if(!m.has(g)){m.add(g);var $=Lf(g);for(let pe of[t,document]){var S=Qi.get(pe);S===void 0&&(S=new Map,Qi.set(pe,S));var Z=S.get(g);Z===void 0?(pe.addEventListener(g,Wi,{passive:$}),S.set(g,1)):S.set(g,Z+1)}}}};return h(Cn(ya)),Ki.add(h),()=>{for(var _ of m)for(let $ of[t,document]){var b=Qi.get($),g=b.get(_);--g==0?($.removeEventListener(_,Wi),b.delete(_),b.size===0&&Qi.delete($)):b.set(_,g)}Ki.delete(h),v!==r&&v.parentNode?.removeChild(v)}});return Sa.set(f,d),f}var Sa=new WeakMap;function Go(e,t){let r=Sa.get(e);return r?(Sa.delete(e),r(t)):(y&&Rl(),Promise.resolve())}var Jt,hr,St,xn,Ko,Zo,ts,mr=class{constructor(t,r=!0){re(this,"anchor");H(this,Jt,new Map);H(this,hr,new Map);H(this,St,new Map);H(this,xn,new Set);H(this,Ko,!0);H(this,Zo,t=>{if(c(this,Jt).has(t)){var r=c(this,Jt).get(t),n=c(this,hr).get(r);if(n)Jn(n),c(this,xn).delete(r);else{var o=c(this,St).get(r);o&&(Jn(o.effect),c(this,hr).set(r,o.effect),c(this,St).delete(r),y&&(o.fragment.lastChild[Bs]=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,hr)){if(i===r||c(this,xn).has(i))continue;let l=()=>{if(Array.from(c(this,Jt).values()).includes(i)){var d=document.createDocumentFragment();Qn(a,d),d.append(ye()),c(this,St).set(i,{effect:a,fragment:d})}else ge(a);c(this,xn).delete(i),c(this,hr).delete(i)};c(this,Ko)||!n?(c(this,xn).add(i),cr(a,l,!1)):l()}}});H(this,ts,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,D(this,Ko,r)}ensure(t,r){var n=I,o=qi();if(r&&!c(this,hr).has(t)&&!c(this,St).has(t))if(o){var i=document.createDocumentFragment(),a=ye();i.append(a),c(this,St).set(t,{effect:Ne(()=>r(a)),fragment:i})}else c(this,hr).set(t,Ne(()=>r(this.anchor)));if(c(this,Jt).set(n,t),o){for(let[l,f]of c(this,hr))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,Zo)),n.ondiscard(c(this,ts))}else k&&(this.anchor=P),c(this,Zo).call(this,n)}};Jt=new WeakMap,hr=new WeakMap,St=new WeakMap,xn=new WeakMap,Ko=new WeakMap,Zo=new WeakMap,ts=new WeakMap;function le(e,t,r=!1){var n;k&&(n=P,De());var o=new mr(e),i=r?65536:0;function a(l,f){if(k){var d=an(n);if(l!==parseInt(d.substring(1))){var v=or();ne(v),o.anchor=v,Te(!1),o.ensure(l,f),Te(!0);return}}o.ensure(l,f)}pt(()=>{var l=!1;t((f,d=0)=>{l=!0,a(d,f)}),l||a(-1,null)},i)}function Jr(e,t){return t}function Ku(e,t,r){for(var n=[],o=t.length,i,a=t.length,l=0;l<o;l++){let m=t[l];cr(m,()=>{if(i){if(i.pending.delete(m),i.done.add(m),i.pending.size===0){var h=e.outrogroups;Ra(e,Cn(i.done)),h.delete(i),h.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 d=r,v=d.parentNode;Ro(v),v.append(d),e.items.clear()}Ra(e,t,!f)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function Ra(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();Qn(i,a)}else ge(t[o],r)}}var rs;function Nr(e,t,r,n,o,i=null){var a=e,l=new Map,f=(t&4)!==0;if(f){var d=e;a=k?ne(ve(d)):d.appendChild(ye())}k&&De();var v=null,m=Hn(()=>{var Z=r();return qt(Z)?Z:Z==null?[]:Cn(Z)});y&&Ke(m,"{#each ...}");var h=new Map,_=!0;function b(Z){if((S.effect.f&16384)===0){S.pending.delete(Z);var pe=s(m);S.fallback=v,Zu(S,pe,a,t,n),v!==null&&(pe.length===0?(v.f&33554432)===0?Jn(v):(v.f^=33554432,Xo(v,null,a)):cr(v,()=>{v=null}))}}function g(Z){S.pending.delete(Z)}var $=pt(()=>{var Z=s(m),pe=Z.length;let $e=!1;if(k){var ot=an(a)==="[!";ot!==(pe===0)&&(a=or(),ne(a),Te(!1),$e=!0)}for(var Ue=new Set,w=I,Qt=qi(),_t=0;_t<pe;_t+=1){k&&P.nodeType===vt&&P.data==="]"&&(a=P,$e=!0,Te(!1));var ze=Z[_t],gr=n(ze,_t);if(y){var ht=n(ze,_t);gr!==ht&&Ml(String(_t),String(gr),String(ht))}var ue=_?null:l.get(gr);ue?(ue.v&&Kt(ue.v,ze),ue.i&&Kt(ue.i,_t),Qt&&w.unskip_effect(ue.e)):(ue=Wu(l,_?a:rs??(rs=ye()),ze,gr,_t,o,t,r),_||(ue.e.f|=33554432),l.set(gr,ue)),Ue.add(gr)}if(pe===0&&i&&!v&&(_?v=Ne(()=>i(a)):(v=Ne(()=>i(rs??(rs=ye()))),v.f|=33554432)),pe>Ue.size&&(y?Xu(Z,n):zs("","","")),k&&pe>0&&ne(or()),!_)if(h.set(w,Ue),Qt){for(let[io,Ir]of l)Ue.has(io)||w.skip_effect(Ir.e);w.oncommit(b),w.ondiscard(g)}else b(w);$e&&Te(!0),s(m)}),S={effect:$,flags:t,items:l,pending:h,outrogroups:null,fallback:v};_=!1,k&&(a=P)}function Wo(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function Zu(e,t,r,n,o){var i=(n&8)!==0,a=t.length,l=e.items,f=Wo(e.effect.first),d,v=null,m,h=[],_=[],b,g,$,S;if(i)for(S=0;S<a;S+=1)b=t[S],g=o(b,S),$=l.get(g).e,($.f&33554432)===0&&($.nodes?.a?.measure(),(m??(m=new Set)).add($));for(S=0;S<a;S+=1){if(b=t[S],g=o(b,S),$=l.get(g).e,e.outrogroups!==null)for(let ze of e.outrogroups)ze.pending.delete($),ze.done.delete($);if(($.f&8192)!==0&&(Jn($),i&&($.nodes?.a?.unfix(),(m??(m=new Set)).delete($))),($.f&33554432)!==0)if($.f^=33554432,$===f)Xo($,null,r);else{var Z=v?v.next:f;$===e.effect.last&&(e.effect.last=$.prev),$.prev&&($.prev.next=$.next),$.next&&($.next.prev=$.prev),Xr(e,v,$),Xr(e,$,Z),Xo($,Z,r),v=$,h=[],_=[],f=Wo(v.next);continue}if($!==f){if(d!==void 0&&d.has($)){if(h.length<_.length){var pe=_[0],$e;v=pe.prev;var ot=h[0],Ue=h[h.length-1];for($e=0;$e<h.length;$e+=1)Xo(h[$e],pe,r);for($e=0;$e<_.length;$e+=1)d.delete(_[$e]);Xr(e,ot.prev,Ue.next),Xr(e,v,ot),Xr(e,Ue,pe),f=pe,v=Ue,S-=1,h=[],_=[]}else d.delete($),Xo($,f,r),Xr(e,$.prev,$.next),Xr(e,$,v===null?e.effect.first:v.next),Xr(e,v,$),v=$;continue}for(h=[],_=[];f!==null&&f!==$;)(d??(d=new Set)).add(f),_.push(f),f=Wo(f.next);if(f===null)continue}($.f&33554432)===0&&h.push($),v=$,f=Wo($.next)}if(e.outrogroups!==null){for(let ze of e.outrogroups)ze.pending.size===0&&(Ra(e,Cn(ze.done)),e.outrogroups?.delete(ze));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||d!==void 0){var w=[];if(d!==void 0)for($ of d)($.f&8192)===0&&w.push($);for(;f!==null;)(f.f&8192)===0&&f!==e.fallback&&w.push(f),f=Wo(f.next);var Qt=w.length;if(Qt>0){var _t=(n&4)!==0&&a===0?r:null;if(i){for(S=0;S<Qt;S+=1)w[S].nodes?.a?.measure();for(S=0;S<Qt;S+=1)w[S].nodes?.a?.fix()}Ku(e,w,_t)}}i&&we(()=>{if(m!==void 0)for($ of m)$.nodes?.a?.apply()})}function Wu(e,t,r,n,o,i,a,l){var f=(a&1)!==0?(a&16)===0?hn(r,!1,!1):We(r):null,d=(a&2)!==0?We(o):null;return y&&f&&(f.trace=()=>{l()[d?.v??o]}),{v:f,i:d,e:Ne(()=>(i(t,f??r,d??o,l),()=>{e.delete(n)}))}}function Xo(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 Xr(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function Xu(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),zs(a,l,f)}r.set(i,o)}}function Ju(e,t,r){if(!t||t===Df(String(r??"")))return;let n,o=e.__svelte_meta?.loc;o?n=`near ${o.file}:${o.line}:${o.column}`:gt?.[st]&&(n=`in ${gt[st]}`),Sl(Gi(n))}function Na(e,t,r=!1,n=!1,o=!1,i=!1){var a=e,l="";if(r){var f=e;k&&(a=ne(ve(f)))}j(()=>{var d=A;if(l===(l=t()??"")){k&&De();return}if(r&&!k){d.nodes=null,f.innerHTML=l,l!==""&&Xe(ve(f),f.lastChild);return}if(d.nodes!==null&&(ma(d.nodes.start,d.nodes.end),d.nodes=null),l!==""){if(k){for(var v=P.data,m=De(),h=m;m!==null&&(m.nodeType!==vt||m.data!=="");)h=m,m=Le(m);if(m===null)throw Vr(),it;y&&!i&&Ju(m.parentNode,v,l),Xe(P,h),a=ne(m);return}var _=n?$o:o?Ys:void 0,b=Xt(n?"svg":o?"math":"template",_);b.innerHTML=l;var g=n||o?b:b.content;if(Xe(ve(g),g.lastChild),n||o)for(;ve(g);)a.before(ve(g));else a.before(g)}})}function En(e,t,...r){var n=new mr(e);pt(()=>{let o=t()??null;y&&o==null&&Vl(),n.ensure(o,o&&(i=>o(i,...r)))},65536)}function ns(e,t,r){Et(()=>{var n=ae(()=>t(e,r?.())||{});if(r&&n?.update){var o=!1,i={};He(()=>{var a=r();ji(a),o&&Ai(i,a)&&(i=a,n.update(a))}),o=!0}if(n?.destroy)return()=>n.destroy()})}var z$=[...`
|
|
81
|
+
\r\f\xA0\v\uFEFF`];function jf(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 Ca(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Gf(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(Ca)),o&&f.push(...Object.keys(o).map(Ca));var d=0,v=-1;let g=e.length;for(var m=0;m<g;m++){var h=e[m];if(l?h==="/"&&e[m-1]==="*"&&(l=!1):i?i===h&&(i=!1):h==="/"&&e[m+1]==="*"?l=!0:h==='"'||h==="'"?i=h:h==="("?a++:h===")"&&a--,!l&&i===!1&&a===0){if(h===":"&&v===-1)v=m;else if(h===";"||m===g-1){if(v!==-1){var _=Ca(e.substring(d,v).trim());if(!f.includes(_)){h!==";"&&m++;var b=e.substring(d,m).trim();r+=" "+b+";"}}d=m+1,v=-1}}}}return n&&(r+=jf(n)),o&&(r+=jf(o,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Oa(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 Tn(e,t,r,n){var o=e[yo];if(k||o!==t){var i=Gf(t,n);(!k||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e[yo]=t}else n&&(Array.isArray(n)?(Oa(e,r?.[0],n[0]),Oa(e,r?.[1],n[1],"important")):Oa(e,r,n));return n}function Da(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function od(e,t){var r=e.__defaultValue,n=e.multiple,o=n?r??[]:null;if(!(n&&!qt(o))){var i=e.selectedIndex,a=t&&n?new Set(e.selectedOptions):null;for(var l of e.options){var f=Ia(l);Da(l,n?o.includes(f):Vi(f,r))}if(t)if(a!==null)for(l of e.options){var d=a.has(l);l.selected!==d&&(l.selected=d)}else e.selectedIndex!==i&&(e.selectedIndex=i)}}function Qr(e,t,r=!1){if(e.multiple){if(t==null)return;if(!qt(t))return Nl();for(var n of e.options)n.selected=t.includes(Ia(n));return}for(n of e.options){var o=Ia(n);if(Vi(o,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function kn(e){var t=new MutationObserver(r=>{r.every(id)||("__defaultValue"in e&&od(e,!1),"__value"in e&&Qr(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Me(()=>{t.disconnect()})}function Ia(e){return"__value"in e?e.__value:e.value}function id(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 cd=Symbol("is custom element"),ud=Symbol("is html"),dd=Vs?"link":"LINK";function to(e){if(k){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[Br]=r,we(r),Di()}}function os(e,t){var r=Xf(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function ee(e,t,r,n){var o=Xf(e);if(k&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===dd)){n||_d(e,t,r??"");return}o[t]!==(o[t]=r)&&(t==="loading"&&(e[xl]=r),r==null?e.removeAttribute(t):typeof r!="string"&&pd(e).has(t)?e[t]=r:e.setAttribute(t,r))}function Xf(e){var t;return e[t=xi]??(e[t]={[cd]:e.nodeName.includes("-"),[ud]:e.namespaceURI===Ei})}var Kf=new Map;function pd(e){var t=e.getAttribute("is")||e.nodeName,r=Kf.get(t);if(r)return r;Kf.set(t,r=new Set);for(var n,o=e,i=Element.prototype;i!==o;){n=vi(o);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);o=on(o)}return r}function _d(e,t,r){y&&(t==="srcset"&&hd(e,r)||La(e.getAttribute(t)??"",r)||Al(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function La(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Zf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function hd(e,t){var r=Zf(e.srcset),n=Zf(t);return n.length===r.length&&n.every(([o,i],a)=>i===r[a][1]&&(La(r[a][0],o)||La(o,r[a][0])))}function ss(e,t,r=t){var n=new WeakSet;Gs(e,"input",async o=>{y&&e.type==="checkbox"&&qs();var i=o?e.defaultValue:e.value;if(i=Ma(e)?Fa(i):i,r(i),I!==null&&n.add(I),await ur(),i!==(i=t())){var a=e.selectionStart,l=e.selectionEnd,f=e.value.length;if(e.value=i??"",l!==null){var d=e.value.length;a===l&&l===f&&d>f?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=a,e.selectionEnd=Math.min(l,d))}}}),(k&&e.defaultValue!==e.value||ae(t)==null&&e.value)&&(r(Ma(e)?Fa(e.value):e.value),I!==null&&n.add(I)),He(()=>{y&&e.type==="checkbox"&&qs();var o=t();if(e===document.activeElement){var i=ke?It:I;if(n.has(i))return}Ma(e)&&o===Fa(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function Ma(e){var t=e.type;return t==="number"||t==="range"}function Fa(e){return e===""?null:+e}function Pa(e,t){return e===t||e?.[Ge]===t}function en(e=Ao(),t,r,n){var o=q.r,i=A;return Et(()=>{var a,l;return He(()=>{a=l,l=n?.()||[],ae(()=>{Pa(r(...l),e)||(t(e,...l),a&&Pa(r(...a),e)&&t(null,...a))})}),()=>{let f=i;for(;f!==o&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;let d=()=>{l&&Pa(r(...l),e)&&t(null,...l)},v=f.teardown;f.teardown=()=>{d(),v?.()}}}),e}function Jf(e){return new Ua(e)}var Cr,Ut,Ua=class{constructor(t){H(this,Cr);H(this,Ut);var r=new Map,n=(i,a)=>{var l=hn(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===$i?!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)}});D(this,Ut,(t.hydrate?jo:es)(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)&&jr(),D(this,Cr,o.$$events);for(let i of Object.keys(c(this,Ut)))i==="$set"||i==="$destroy"||i==="$on"||Ie(this,i,{get(){return c(this,Ut)[i]},set(a){c(this,Ut)[i]=a},enumerable:!0});c(this,Ut).$set=i=>{Object.assign(o,i)},c(this,Ut).$destroy=()=>{Go(c(this,Ut))}}$set(t){c(this,Ut).$set(t)}$on(t,r){c(this,Cr)[t]=c(this,Cr)[t]||[];let n=(...o)=>r.call(this,...o);return c(this,Cr)[t].push(n),()=>{c(this,Cr)[t]=c(this,Cr)[t].filter(o=>o!==n)}}$destroy(){c(this,Ut).$destroy()}};Cr=new WeakMap,Ut=new WeakMap;var Td;typeof HTMLElement=="function"&&(Td=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=Xt("slot");o!=="default"&&(a.name=o),L(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=kd(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]=Ba(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=Jf({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=_a(()=>{He(()=>{this.$$r=!0;for(let o of Fs(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let i=Ba(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]=Ba(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 Fs(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Ba(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 kd(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}if(y){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;Yl(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function Qf(e){q===null&&Ri("onMount"),Yr&&q.l!==null?Sd(q).m.push(e):Pt(()=>{let t=ae(e);if(typeof t=="function")return t})}function Sd(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var ec;typeof window<"u"&&((ec=window.__svelte??(window.__svelte={})).v??(ec.v=new Set)).add("5");async function tc(e,t,r){let n=new URL(e,document.baseURI);if(n.origin!==location.origin)throw new Error("Unsafe search endpoint");n.searchParams.set("q",t);let o=await fetch(n,{signal:r,cache:"no-store"});if(!o.ok)throw new Error("Archive search unavailable");let i=await o.json();if(typeof i!="object"||i===null||!("version"in i)||i.version!==1||!("results"in i)||!Array.isArray(i.results)||i.results.length>1e4||!("truncated"in i)||typeof i.truncated!="boolean")throw new Error("Invalid archive results");return{records:i.results.map(l=>{if(typeof l!="object"||l===null||!("name"in l)||typeof l.name!="string"||!("path"in l)||typeof l.path!="string"||!("kind"in l)||!["file","directory"].includes(String(l.kind))||!("href"in l)||l.href!==null&&typeof l.href!="string")throw new Error("Invalid archive record");let f=l.href===null?null:new URL(l.href,n);if(f&&!["http:","https:"].includes(f.protocol))throw new Error("Unsafe archive link");return{name:l.name,path:l.path,href:f?.href??null,exitsExplorer:l.kind!=="directory"}}),truncated:i.truncated}}var Va=["directory","file","link"];function Nd(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 rc(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(e,1e9)):0}function as(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 d={field:f[0],direction:f[1],nameMode:f[2],directoriesFirst:f[3]==="folders"};["folders","mixed"].includes(f[3])&&Nd(d)&&(l.sort=d)}if(a.has("dw.types")){let d=a.get("dw.types").split(",").filter(Boolean);d.every(v=>Va.includes(v))&&(l.types=[...new Set(d)])}}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 d=f.view;l.selected=typeof d.selected=="string"&&d.selected.length<=4096?d.selected:null,l.windowY=rc(d.windowY),l.listTop=rc(d.listTop)}}return l}function Cd(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&&Va.some(i=>r.types.includes(i)!==(n.types??Va).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 nc(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=Cd(t,e,a,l),d=n(o,i,a);try{history.replaceState(d,"",f),t=f,r=d}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 Od={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 oc(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">${Od[e]}</svg>`}function Ya(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{},ro=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ls=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>=0,ic=e=>typeof e=="string"&&["directory","file","symlink","other"].includes(e);function Or(e,t){if(typeof e!="string")throw new V(`Invalid ${t}`);return e}function qa(e,t){if(typeof e!="boolean")throw new V(`Invalid ${t}`);return e}function Id(e,t){if(e===null)return null;let r=new URL(Or(e,"href"),t);if(!["http:","https:"].includes(r.protocol))throw new V("Unsupported listing link protocol");return r.href}function sc(e,t){if(!ro(e)||!ic(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(!ro(e.link))throw new V("Invalid link metadata");let n=e.link.targetKind;if(n!==null&&(!ic(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:Or(e.link.target,"target"),targetKind:n,targetSize:o,unavailable:qa(e.link.unavailable,"unavailable"),cycle:qa(e.link.cycle,"cycle")}}return{...e.data===void 0?{}:{data:Ya(e.data)},...e.presentation===void 0?{}:{presentation:Ya(e.presentation)},id:Or(e.id,"id"),name:Or(e.name,"name"),kind:e.kind,href:Id(e.href,t),exitsExplorer:qa(e.exitsExplorer,"exitsExplorer"),size:e.size,modifiedAt:Or(e.modifiedAt,"modifiedAt"),link:r}}function Dd(e){if(!ro(e)||e.version!==1||!ls(e.total)||!Array.isArray(e.blocks)||!ro(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(!ro(a)||!ls(a.offset)||!ls(a.count))throw new V("Invalid block descriptor");return{href:Or(a.href,"block href"),offset:a.offset,count:a.count}});if(i.length===0)throw new V("Missing blocks");return{version:1,revision:Or(e.revision,"revision"),directory:Or(e.directory,"directory"),hrefBase:Or(e.hrefBase,"href base"),total:e.total,sort:{field:r,direction:n,nameMode:o,directoriesFirst:t.directoriesFirst},blocks:i}}async function Qo(e,t={}){let r=t.fetch??fetch,n=t.maxEntries??1e5;if(!ls(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=Dd(await l.json());if(f.total>n)throw new V("Listing exceeds the configured entry limit");let d=new URL(f.hrefBase,o);if(!["http:","https:"].includes(d.protocol))throw new V("Unsupported href base protocol");let v=[],m=new Set;for(let h of f.blocks){if(h.offset!==v.length||h.count+v.length>f.total)throw new V("Invalid block coverage");let _=new URL(h.href,o);if(_.origin!==o.origin||!["http:","https:"].includes(_.protocol))throw new V("Block leaves the manifest origin");let b=await r(_,a);if(b.status===404||b.status===410)throw new Jo("Block no longer available");if(!b.ok)throw new V(`Block request failed: ${b.status}`);let g=await b.json();if(!ro(g)||g.version!==1||g.revision!==f.revision)throw new Jo("Listing revision changed");if(g.offset!==h.offset||g.total!==f.total||!Array.isArray(g.entries)||g.entries.length!==h.count)throw new V("Invalid block envelope");for(let $ of g.entries){let S=sc($,d);if(m.has(S.id))throw new V("Duplicate entry ID");m.add(S.id),v.push(S)}}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 ac(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=>sc(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 Ld={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 no(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[m,h]of Object.entries({language:t,locale:r,timeZone:n}))if(typeof h!="string"||!h)throw new TypeError(`${m} 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={...Ld};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[m,h]of Object.entries(e.labels)){if(!Object.hasOwn(i,m)||typeof h!="string")throw new TypeError(`Unsupported label or value: ${m}`);Object.assign(i,{[m]:h})}}let a=e.brand??{};if(typeof a!="object"||a===null||Array.isArray(a))throw new TypeError("brand must be an object");for(let[m,h]of Object.entries(a)){if(!["name","logoUrl","logoAlt","footerText","footerUrl","faviconUrl"].includes(m)||typeof h!="string")throw new TypeError(`Unsupported brand option or value: ${m}`);if(m.endsWith("Url")&&!/^https?:\/\//i.test(h)&&!(h.startsWith("/")&&!h.startsWith("//")))throw new TypeError(`brand.${m} 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 m of l){let h;if(typeof m=="string"){if(!["name","size","modified"].includes(m))throw new TypeError("Unsupported column");h=m}else{if(typeof m!="object"||m===null||Object.keys(m).some(_=>!["dataKey","label"].includes(_))||typeof m.dataKey!="string"||!m.dataKey||typeof m.label!="string"||!m.label)throw new TypeError("Data columns require dataKey and label");h="data:"+m.dataKey}if(f.has(h))throw new TypeError("columns must contain unique supported columns");f.add(h)}let d=e.actions??[];if(!Array.isArray(d)||new Set(d).size!==d.length||d.some(m=>!["copy-link","copy-path","download"].includes(m)))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[m,h]of Object.entries(v))if(!/^--[a-zA-Z][a-zA-Z0-9_-]*$/.test(m)||typeof h!="string"||/[{};<>]/.test(h))throw new TypeError(`Invalid CSS variable: ${m}`);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(m=>typeof m=="string"?m:{...m}),actions:[...d],cssVariables:{...v}}}var pS=no();function An(e,t,r={}){return e.labels[t].replace(/\{([a-zA-Z]+)\}/g,(n,o)=>Object.hasOwn(r,o)?String(r[o]):n)}var ei=new Map;function za(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=ei.get(a);return l===void 0&&(l=new Intl.DateTimeFormat(o,{timeZone:i,dateStyle:"short",timeStyle:"short"}),ei.size>=32&&ei.delete(ei.keys().next().value),ei.set(a,l)),l.format(n)}async function lc(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 fc(e,t){return typeof e=="string"?t.labels[e]:e.label}function cc(e){return e==null?"":typeof e=="object"?JSON.stringify(e):String(e)}async function ja(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 d=f;if(d.version!==1||d.theme!==r||typeof d.title!="string"||typeof d.path!="string"||!Number.isSafeInteger(d.total)||Number(d.total)<0||!Array.isArray(d.breadcrumbs))throw new V("Unsupported folder snapshot");if(d.metadataHead!==void 0&&typeof d.metadataHead!="string")throw new V("Invalid folder metadata");let v=d.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=d.categories,$=new Set;if(!Array.isArray(g)||g.length===0||g.some(S=>typeof S!="object"||S===null||typeof S.id!="string"||!S.id||$.has(S.id)||typeof S.label!="string"||typeof S.svg!="string"?!0:($.add(S.id),!1)))throw new V("Invalid folder categories")}let m=document.querySelector("base")?.href??t,h=g=>{if(g===null)return null;if(typeof g!="string")throw new V("Invalid folder link");let $=new URL(g,m);if(!["http:","https:"].includes($.protocol)||$.origin!==location.origin)throw new V("Unsupported folder link");return $.href},_=ac(d.entries,m).map(g=>({...g,...g.presentation?{presentation:{...g.presentation,folderDataHref:h(g.presentation.folderDataHref??null)}}:{}}));if(_.length>Number(d.total))throw new V("Invalid folder count");if(d.page!==null){let g=d.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(d.total)||g.total!==d.total)throw new V("Invalid folder pagination");d.page={...g,href:h(g.href),previousHref:h(g.previousHref),nextHref:h(g.nextHref)}}d.ui!==void 0&&no(d.ui);let b={...d,searchQueryHref:h(d.searchQueryHref??null),updatesHref:h(d.updatesHref??null),entries:_,dataHref:a.href,manifestHref:h(d.manifestHref),rootHref:h(d.rootHref),rootDataHref:h(d.rootDataHref),parentHref:h(d.parentHref),parentDataHref:h(d.parentDataHref),breadcrumbs:d.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:h(g.href),dataHref:h(g.dataHref)}})};if(b.manifestHref){let g=await Qo(b.manifestHref,{signal:n,cache:o?"no-store":"default"});if(g.manifest.total!==d.total||d.listingRevision!==void 0&&g.manifest.revision!==d.listingRevision){if(i<2)return ja(e,t,r,n,!0,i+1);throw new V("Folder changed while refreshing")}b.entries=[...g.entries]}return b}var fs=new WeakMap;function uc(e,t){if(!t||typeof document>"u")return e;let r=document.querySelector("[data-dirwell-theme]");if(!r)return e;let n=fs.get(r)??e;return fs.set(r,n),n}function dc(e,t){let r=document.querySelector("[data-dirwell-theme]");r&&fs.has(r)&&fs.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",d=a.getAttribute(f)??"";if(!/^(?:description|og:[a-z_:]+|twitter:[a-z_:]+)$/i.test(d))continue;let v=a.getAttribute("content")??"";if(["og:image","og:url","twitter:image"].includes(d)){let m=i(v);if(m===null)continue;v=m}l=document.createElement("meta"),l.setAttribute(f,d),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 oo=e=>e.kind==="directory"||e.link?.targetKind==="directory",Ga=e=>e.kind==="symlink"?"link":oo(e)?"directory":"file";function Ka(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 _c(e,t,r,n){return e.map(o=>({entry:o,score:Ka(t,`${o.name} ${o.link?.target??""}`)})).filter(o=>r.includes(Ga(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&&oo(a)!==oo(l))return oo(a)?-1:1;let f=()=>n.nameMode==="unicode"?pc(a.name,l.name):a.name.localeCompare(l.name,void 0,{numeric:n.nameMode==="natural",sensitivity:"base"}),d=(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"?d:-d)||pc(a.id,l.id)}).map(o=>o.entry)}function pc(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 hc(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 Md=te('<img width="40" height="40"/>'),Fd=te("<!> <h1> </h1> <span> </span>",1),Pd=te("/ <a> </a>",1),Hd=te('<label><input type="checkbox"/> </label>'),cs=te("<button> </button>"),Za=te("<a> </a>"),Ud=te("<span> </span>"),Bd=te('<li class="entry"><a>../</a></li>'),mc=te('<li aria-hidden="true"></li>'),Vd=te('<span class="file-icon" aria-hidden="true"></span> ',1),Yd=te('<a class="name"><!></a>'),qd=te("<span><!></span>"),zd=te('<small class="target"> </small>'),jd=te('<span class="identity"><!><!></span>'),Gd=te('<span class="kind"> </span>'),Kd=te('<button class="timestamp-button"><time> </time></button>'),Zd=te('<span class="entry-data"> </span>'),Wd=te('<a download=""> </a>'),Xd=te('<span data-dirwell-actions="" style="grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.5rem"><!> <!></span>'),Jd=te('<li class="entry" data-entry=""><!> <!></li>'),Qd=te("<p> </p>"),ep=te('<a rel="prev"> </a>'),tp=te('<a rel="next"> </a>'),rp=te("<nav><!> <!></nav>"),np=te('<p class="brand-footer"><!></p>'),op=te('<p class="keyboard-help"> </p>'),ip=te("<dialog><h2> </h2> <p> </p> <p> </p> <button> </button></dialog>"),sp=te("<li><!></li>"),ap=te('<dialog><h2> </h2> <input type="search"/> <p role="status"> </p> <!> <ul></ul> <button> </button></dialog>'),lp=te('<main data-explorer="" data-framework="svelte"><header class="page-header"><div class="wordmark"><!></div> <nav><a> </a><!></nav></header> <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 Wa(e,t){To(t,!0);let r=ae(()=>uc(t.model,!1)),n=z(r),o=z(r.entries),i=z(""),a=z(Wt(["directory","file","link"])),l=z(r.sort),f=z("system"),d=z(null),v=z(!1),m=z(!1),h=z(""),_=z(null),b=z(null),g=z(!1),$=z(0),S=z(800),Z=z(!1),pe=z(""),$e=z([]),ot=z(Wt(no(r.ui).labels.beginArchive)),Ue=z(null),w=Ot(()=>no(s(n).ui)),Qt=z(!1),_t=Ot(()=>An(s(w),s(ht)?"entries":"pageEntries",{count:"__COUNT__",total:s(n).total}).split("__COUNT__")),ze=z(new Map),gr=Ot(()=>s(v)&&s(n).updatesHref?new URL(s(n).updatesHref,document.baseURI).href:null),ht=Ot(()=>s(o).length===s(n).total),ue=Ot(()=>_c(s(o),s(g)?"":s(i),s(a),s(l))),io=Ot(()=>s(v)&&s(ue).length>500),Ir=Ot(()=>{let u=[0];for(let p of s(ue))u.push(u.at(-1)+(s(ze).get(p.id)??52));return u}),so=Ot(()=>{if(!s(io))return 0;let u=0,p=s(ue).length;for(;u<p;){let x=u+p>>1;s(Ir)[x+1]<=s($)?u=x+1:p=x}return Math.max(0,u-5)}),us=Ot(()=>{if(!s(io))return s(ue).length;let u=0,p=s(ue).length;for(;u<p;){let x=u+p>>1;s(Ir)[x+1]<=s($)+s(S)?u=x+1:p=x}return Math.min(s(ue).length,Math.max(s(so)+35,u+5))});function vc(u){let p=u.querySelector(":scope > header"),x=u.querySelector(".entry-head"),T=()=>{let K=p.getBoundingClientRect().height,F=K>Math.min(innerHeight/4,192);u.toggleAttribute("data-sticky-header-disabled",F),u.style.setProperty("--dw-sticky-header-height",`${F?0:K}px`),u.style.setProperty("--dw-sticky-columns-height",`${x.getBoundingClientRect().height}px`),u.setAttribute("data-sticky-ready","")};T();let O=new ResizeObserver(T);return O.observe(p),O.observe(x),window.addEventListener("resize",T),{destroy(){O.disconnect(),window.removeEventListener("resize",T)}}}function gc(u,p){if(typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{let T=u.getBoundingClientRect().height;if(T>0&&s(ze).get(p)!==T){let O=s(Rt)?.contains(document.activeElement)?document.activeElement:null,K=O?.getBoundingClientRect().top,F=new Map(s(ze));F.set(p,T),E(ze,F),O&&ur().then(()=>{O.isConnected&&document.activeElement===O&&window.scrollBy(0,O.getBoundingClientRect().top-K)})}});return x.observe(u),{destroy:()=>x.disconnect()}}let Rt=z(void 0),ti=z(void 0),ds=z(void 0),ao=z(void 0),lo=z(void 0),Dr=0,fo,co,Lr=0,Xa=null,Ja="",Qa=0,Sn,Rn=null,uo=u=>({query:"",sort:u.sort,types:["directory","file","link"]});function ps(){Sn&&Sn.save(new URL(s(n).dataHref,document.baseURI).href,s(n).path,{query:s(i),types:s(a),sort:s(l),selected:s(d),windowY:window.scrollY,listTop:s($)},uo(s(n)))}function yc(){s(_)==="folder"&&Rn?tn(...Rn,!0):tn(s(n).dataHref,location.href,!1,!0)}Pt(()=>{if(!s(v)||s(m))return;let u={query:s(i),types:s(a),sort:s(l),selected:s(d),listTop:s($)},p=s(n).dataHref,x=s(n).path,T=uo(s(n)),O=requestAnimationFrame(()=>Sn?.save(new URL(p,document.baseURI).href,x,{...u,windowY:window.scrollY},T));return()=>cancelAnimationFrame(O)});let _s=oo;async function el(){if(s(ht)||!s(n).manifestHref||location.protocol==="file:")return;let u=fo,p=Dr;E(m,!0);try{let x=await Qo(new URL(s(n).manifestHref,document.baseURI).href,{signal:u.signal,cache:s(n).updatesHref?"no-store":"default"});p===Dr&&!u.signal.aborted&&E(o,x.entries)}catch{p===Dr&&!u.signal.aborted&&(E(h,s(w).labels.listingError,!0),E(_,"listing"))}finally{p===Dr&&E(m,!1)}}async function bc(u,p){E(d,p.id,!0),ps();let x=p.presentation?.folderDataHref;p.exitsExplorer||u?.altKey||u?.ctrlKey||u?.metaKey||u?.shiftKey||u?.button>0||typeof x!="string"||location.protocol==="file:"||(u?.preventDefault(),await tn(x,new URL(p.href,document.baseURI).href,!0))}async function tn(u,p,x,T=!1,O=null,K=!1){x&&ps();let F=++Dr;fo?.abort();let W=fo=new AbortController;E(m,!0),E(h,""),E(_,null);try{let U=await ja(u,p,"ledger",W.signal,T||K),J=U.entries;if(T&&U.manifestHref&&J.length!==U.total&&(J=(await Qo(U.manifestHref,{signal:W.signal,cache:"no-store"})).entries),F!==Dr||W.signal.aborted)return;if(T||Sn.commit(U.dataHref,U.path,p,x),E(n,U),E(o,J),Rn=null,!T){let _e=as(p,"ledger",U.path,uo(U),[],O);E(i,_e.query,!0),E(a,_e.types,!0),E(l,_e.sort),E(d,_e.selected,!0),E($,_e.listTop,!0)}if(dc(U,p),await el(),!T){let _e=as(p,"ledger",U.path,uo(U),[],O);await ur(),s(d)&&!s(ue).some(Bt=>Bt.id===s(d))&&E(d,null),window.scrollTo({top:_e.windowY}),O&&s(d)&&s(Rt)?.querySelector(`[data-id="${CSS.escape(s(d))}"] a`)?.focus({preventScroll:!0})}}catch{F===Dr&&!W.signal.aborted&&(E(h,s(w).labels.folderError,!0),E(_,"folder"),Rn=[u,p,x,T,O],Sn?.rollback())}finally{F===Dr&&E(m,!1)}}function hs(u,p,x){typeof p!="string"||typeof x!="string"||u?.altKey||u?.ctrlKey||u?.metaKey||u?.shiftKey||u?.button>0||location.protocol==="file:"||(u?.preventDefault(),tn(x,new URL(p,document.baseURI).href,!0))}async function $c(u){let p=Math.max(0,Math.min(s(ue).length-1,u)),x=s(ue)[p];if(!x)return;if(E(d,x.id,!0),s(io)){let O=s(Rt)?parseFloat(getComputedStyle(s(Rt)).getPropertyValue("--dw-sticky-header-height"))+parseFloat(getComputedStyle(s(Rt)).getPropertyValue("--dw-sticky-columns-height"))+8:0;E($,Math.max(0,s(Ir)[p]-O),!0),s(Rt)&&window.scrollTo({top:s(Rt).getBoundingClientRect().top+window.scrollY+s($)})}await ur();let T=s(Rt)?.querySelector(`[data-order="${p}"] a`);T?.focus({preventScroll:!0}),T?.closest(".entry")?.scrollIntoView({block:"nearest"})}function wc(u){if(u.isComposing||u.altKey||u.ctrlKey||u.metaKey)return;if(s(Z)){u.key==="Escape"&&(u.preventDefault(),ri());return}if(s(b)){u.key==="Escape"&&E(b,null);return}if(u.target?.closest?.("[data-dirwell-actions]"))return;let p=/INPUT|TEXTAREA|SELECT/.test(u.target?.tagName??"");if(u.key==="/"&&!p){u.preventDefault(),s(ti)?.focus();return}if(p){u.key==="Escape"&&(E(i,""),s(ti)?.blur());return}if(u.key==="Backspace"&&s(n).parentHref){u.preventDefault(),location.protocol==="file:"||typeof s(n).parentDataHref!="string"?location.href=s(n).parentHref:tn(s(n).parentDataHref,new URL(s(n).parentHref,document.baseURI).href,!0);return}let x=s(ue).findIndex(T=>T.id===s(d));["ArrowDown","ArrowUp","Home","End"].includes(u.key)&&(u.preventDefault(),$c(u.key==="Home"?0:u.key==="End"?s(ue).length-1:x+(u.key==="ArrowDown"?1:-1)))}function xc(u){E(f,u,!0);try{localStorage.setItem("dirwell-color-scheme",u)}catch{}}let Nn,ms,po=!1;async function ri(){E(Z,!1),await ur(),ms?.focus()}function Ec(){co?.abort(),Lr++,po=!1,clearTimeout(Nn),Nn=setTimeout(()=>{Nn=void 0,vs()},300)}Pt(()=>{if(!s(Z)||!s(n).searchQueryHref)return;let u=setInterval(()=>{document.visibilityState==="visible"&&s(pe).trim()&&!po&&Nn===void 0&&vs()},s(n).searchRefreshIntervalMs??2e3);return()=>{clearInterval(u),clearTimeout(Nn),Nn=void 0,po=!1,co?.abort(),Lr++}});async function vs(){let u=++Lr;co?.abort();let p=co=new AbortController;E($e,[]),E(Qt,!1);let x=s(pe).trim();if(!x){E(ot,s(w).labels.beginArchive,!0);return}E(ot,s(w).labels.searchingArchive,!0),po=!0;try{if(s(n).searchQueryHref){let F=await tc(s(n).searchQueryHref,x,p.signal);if(u!==Lr||p.signal.aborted)return;E($e,F.records),E(ot,F.truncated?An(s(w),"truncatedResults",{shown:F.records.length,count:F.records.length+"+"}):An(s(w),"archiveResults",{count:F.records.length}),!0);return}let T=new URL(s(n).searchIndexHref,document.baseURI),O=Ja===T.href&&Date.now()-Qa<6e4?Xa:null;if(O===null){let F=await fetch(T,{signal:p.signal});if(!F.ok)throw new Error("Unavailable archive");let W=await F.json();if(W.version!==3||!Array.isArray(W.shards)||!Number.isSafeInteger(W.count)||W.count>1e5)throw new Error("Unsupported archive");O=[];for(let U of W.shards){if(typeof U!="string")throw new Error("Invalid shard");let J=new URL(U,T);if(J.origin!==T.origin)throw new Error("Unsafe shard");let _e=await fetch(J,{signal:p.signal});if(!_e.ok)throw new Error("Unavailable shard");let Bt=await _e.json();if(!Array.isArray(Bt.entries)||O.length+Bt.entries.length>1e5)throw new Error("Invalid archive");for(let se of Bt.entries){if(typeof se.name!="string"||typeof se.path!="string"||typeof se.exitsExplorer!="boolean")throw new Error("Invalid archive record");let he=se.href===null?null:new URL(se.href,T);if(he&&!["http:","https:"].includes(he.protocol))throw new Error("Unsupported archive link");O.push({name:se.name,path:se.path,href:he?.href??null,exitsExplorer:se.exitsExplorer})}}if(u!==Lr||p.signal.aborted)return;Xa=O,Ja=T.href,Qa=Date.now()}let K=O.map(F=>({record:F,score:Ka(x,F.name+" "+F.path)})).filter(F=>F.score!==null).sort((F,W)=>W.score-F.score||F.record.path.localeCompare(W.record.path));if(u!==Lr||p.signal.aborted)return;E($e,K.slice(0,100).map(F=>F.record)),E(ot,K.length>100?An(s(w),"truncatedResults",{shown:100,count:K.length}):An(s(w),"archiveResults",{count:K.length}),!0)}catch{u===Lr&&!p.signal.aborted&&(E(ot,s(w).labels.archiveError,!0),E(Qt,!0))}finally{u===Lr&&(po=!1)}}Qf(()=>{E(S,innerHeight,!0),E(v,!0),fo=new AbortController;try{let x=localStorage.getItem("dirwell-color-scheme");["system","light","dark"].includes(x)&&E(f,x,!0)}catch{}Sn=nc("ledger");let u=as(location.href,"ledger",s(n).path,uo(s(n)),[],history.state);E(i,u.query,!0),E(a,u.types,!0),E(l,u.sort),E(d,u.selected,!0),E($,u.listTop,!0),ps();let p=x=>{x.state?.dataHref?tn(x.state.dataHref,location.href,!1,!1,x.state):location.reload()};return window.addEventListener("popstate",p),el(),()=>{fo?.abort(),co?.abort(),window.removeEventListener("popstate",p)}}),Pt(()=>{let u=s(gr);if(!u||typeof EventSource>"u")return;let p=new EventSource(u);return p.onmessage=()=>E(Ue,u,!0),p.onerror=()=>{E(h,s(w).labels.updatesError,!0),E(_,"updates")},p.onopen=()=>{s(_)==="updates"&&(E(h,""),E(_,null))},()=>p.close()}),Pt(()=>{if(s(v)&&!s(m)&&s(Ue)){let u=s(Ue);E(Ue,null),u===s(gr)&&tn(s(n).dataHref,location.href,!1,!0)}}),Pt(()=>{s(v)&&(document.documentElement.dataset.theme=s(f))}),Pt(()=>{s(ao)&&s(b)&&!s(ao).open&&s(ao).showModal()}),Pt(()=>{s(lo)&&s(Z)&&!s(lo).open&&(s(lo).showModal(),ur().then(()=>s(ds)?.focus()))});var tl=lp();dr("resize",gn,()=>E(S,innerHeight,!0)),dr("keydown",gn,wc),dr("scroll",gn,()=>{s(Rt)&&E($,Math.max(0,window.scrollY-s(Rt).offsetTop),!0)});var _o=xt(tl),gs=X(_o),ys=X(gs),Tc=X(ys);{var kc=u=>{var p=Rr(),x=xt(p);En(x,()=>t.header,()=>({model:s(n)})),L(u,p)},Ac=u=>{var p=Fd(),x=xt(p);{var T=U=>{var J=Md();j(()=>{ee(J,"src",s(w).brand.logoUrl),ee(J,"alt",s(w).brand.logoAlt??"")}),L(U,J)};le(x,U=>{s(w).brand.logoUrl&&U(T)})}var O=R(x,2),K=B(O,!0),F=R(O,2),W=B(F,!0);j(()=>{N(K,s(w).brand.name??s(n).title),N(W,s(w).labels.archive)}),L(u,p)};le(Tc,u=>{t.header?u(kc):u(Ac,-1)})}Y(ys);var bs=R(ys,2),ni=X(bs),Sc=B(ni,!0),Rc=R(ni);Nr(Rc,17,()=>s(n).breadcrumbs,Jr,(u,p)=>{xo();var x=Pd(),T=R(xt(x)),O=B(T,!0);j(()=>{ee(T,"href",s(p).href),N(O,s(p).name)}),be("click",T,K=>hs(K,s(p).href,s(p).dataHref)),L(u,x)}),Y(bs),Y(gs);var $s=R(gs,2),ws=X($s),rl=X(ws,!0),rn=R(rl);to(rn),en(rn,u=>E(ti,u),()=>s(ti)),Y(ws);var oi=R(ws,2),nl=X(oi),Nc=B(nl,!0),Cc=R(nl);Nr(Cc,16,()=>["directory","file","link"],Jr,(u,p)=>{var x=Hd(),T=X(x);to(T);var O=R(T,1,!0);Y(x),j(K=>{os(T,K),N(O,s(w).labels[p])},[()=>s(a).includes(p)]),be("change",T,K=>E(a,K.currentTarget.checked?[...s(a),p]:s(a).filter(F=>F!==p),!0)),L(u,x)}),Y(oi);var xs=R(oi,2),ol=X(xs,!0),Mr=R(ol),ii=X(Mr),Oc=B(ii,!0);ii.value=ii.__value="name";var si=R(ii),Ic=B(si,!0);si.value=si.__value="size";var Es=R(si),Dc=B(Es,!0);Es.value=Es.__value="modified",Y(Mr);var ai;kn(Mr),Y(xs);var Ts=R(xs,2),il=X(Ts,!0),Fr=R(il),li=X(Fr),Lc=B(li,!0);li.value=li.__value="natural";var fi=R(li),Mc=B(fi,!0);fi.value=fi.__value="locale";var ks=R(fi),Fc=B(ks,!0);ks.value=ks.__value="unicode",Y(Fr);var ci;kn(Fr),Y(Ts);var As=R(Ts,2),sl=X(As,!0),Pr=R(sl),ui=X(Pr),Pc=B(ui,!0);ui.value=ui.__value="asc";var Ss=R(ui),Hc=B(Ss,!0);Ss.value=Ss.__value="desc",Y(Pr);var di;kn(Pr),Y(As);var Rs=R(As,2),ho=X(Rs);to(ho);var Uc=R(ho,1,!0);Y(Rs);var Ns=R(Rs,2),al=X(Ns,!0),Hr=R(al),pi=X(Hr),Bc=B(pi,!0);pi.value=pi.__value="system";var _i=R(pi),Vc=B(_i,!0);_i.value=_i.__value="light";var Cs=R(_i),Yc=B(Cs,!0);Cs.value=Cs.__value="dark",Y(Hr);var hi;kn(Hr),Y(Ns);var qc=R(Ns,2);{var zc=u=>{var p=cs(),x=B(p,!0);en(p,T=>ms=T,()=>ms),j(()=>{p.disabled=!s(v),N(x,s(w).labels.searchArchive)}),be("click",p,()=>E(Z,!0)),L(u,p)};le(qc,u=>{(s(n).searchIndexHref||s(n).searchQueryHref)&&u(zc)})}Y($s);var Os=R($s,2),Is=X(Os),ll=X(Is,!0),fl=R(ll),jc=B(fl,!0),cl=R(fl,1,!0),Gc=R(cl),Kc=B(Gc,!0);Y(Is);var ul=R(Is,2);{var Zc=u=>{var p=cs(),x=B(p,!0);j(()=>{p.disabled=s(m),N(x,s(w).labels.retry)}),be("click",p,yc),L(u,p)};le(ul,u=>{s(_)&&s(_)!=="copy"&&u(Zc)})}var dl=R(ul,2);{var Wc=u=>{var p=Za(),x=B(p,!0);j(()=>{ee(p,"href",Rn[1]),N(x,s(w).labels.openNative)}),L(u,p)};le(dl,u=>{s(_)==="folder"&&Rn&&u(Wc)})}var mo=R(dl,2);let pl;Nr(mo,21,()=>s(w).columns,Jr,(u,p)=>{var x=Ud(),T=B(x,!0);j(O=>N(T,O),[()=>fc(s(p),s(w))]),L(u,x)}),Y(mo);var mi=R(mo,2),_l=X(mi);{var Xc=u=>{var p=Bd(),x=B(p);j(()=>ee(x,"href",s(n).parentHref)),be("click",x,T=>hs(T,s(n).parentHref,s(n).parentDataHref)),L(u,p)};le(_l,u=>{s(n).parentHref&&u(Xc)})}var hl=R(_l,2);{var Jc=u=>{var p=mc();let x;j(()=>x=Tn(p,"",x,{height:s(Ir)[s(so)]+"px"})),L(u,p)};le(hl,u=>{s(so)&&u(Jc)})}var ml=R(hl,2);Nr(ml,19,()=>s(ue).slice(s(so),s(us)),u=>u.id,(u,p,x)=>{var T=Jd();let O;var K=X(T);Nr(K,17,()=>s(w).columns,Jr,(U,J)=>{var _e=Rr(),Bt=xt(_e);{var se=je=>{var Ee=jd(),Ce=X(Ee);{var Oe=er=>{var Qe=Yd(),go=X(Qe);{var Ds=et=>{var Yt=Rr(),nn=xt(Yt);En(nn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(d)===s(p).id})),L(et,Yt)},Ls=et=>{var Yt=Vd(),nn=xt(Yt);Na(nn,()=>oc(Ga(s(p))),!0),Y(nn);var uu=R(nn);j(du=>N(uu,` ${s(p).name??""}${du??""}`),[()=>_s(s(p))?"/":""]),L(et,Yt)};le(go,et=>{t.row?et(Ds):et(Ls,-1)})}Y(Qe),j(()=>{ee(Qe,"href",s(p).href),ee(Qe,"target",s(p).exitsExplorer?"_blank":void 0),ee(Qe,"rel",s(p).exitsExplorer?"noopener":void 0)}),be("click",Qe,et=>bc(et,s(p))),dr("focus",Qe,()=>E(d,s(p).id,!0)),L(er,Qe)},Nt=er=>{var Qe=qd(),go=X(Qe);{var Ds=et=>{var Yt=Rr(),nn=xt(Yt);En(nn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(d)===s(p).id})),L(et,Yt)},Ls=et=>{var Yt=Bo();j(()=>N(Yt,s(p).name)),L(et,Yt)};le(go,et=>{t.row?et(Ds):et(Ls,-1)})}Y(Qe),L(er,Qe)};le(Ce,er=>{s(p).href?er(Oe):er(Nt,-1)})}var Vt=R(Ce);{var vo=er=>{var Qe=zd(),go=B(Qe);j(()=>N(go,`${s(p).link.unavailable?s(w).labels.unavailable+" \xB7 ":"\u2192 "}${s(p).link.target??""}`)),L(er,Qe)};le(Vt,er=>{s(p).link&&er(vo)})}Y(Ee),L(je,Ee)},he=je=>{var Ee=Gd(),Ce=B(Ee,!0);j(Oe=>N(Ce,Oe),[()=>_s(s(p))?s(w).labels.folder:hc(s(p).size)]),L(je,Ee)},Be=je=>{var Ee=Kd(),Ce=X(Ee),Oe=B(Ce,!0);Y(Ee),j(Nt=>{Ee.disabled=!s(v),ee(Ce,"datetime",s(p).modifiedAt),N(Oe,Nt)},[()=>za(s(p).modifiedAt,s(w),s(v))]),be("click",Ee,()=>E(b,s(p).modifiedAt,!0)),L(je,Ee)},Ur=je=>{var Ee=Zd(),Ce=B(Ee,!0);j(Oe=>N(Ce,Oe),[()=>cc(s(p).data?.[s(J).dataKey])]),L(je,Ee)};le(Bt,je=>{s(J)==="name"?je(se):s(J)==="size"?je(he,1):s(J)==="modified"?je(Be,2):je(Ur,-1)})}L(U,_e)});var F=R(K,2);{var W=U=>{var J=Xd(),_e=X(J);{var Bt=he=>{var Be=Rr(),Ur=xt(Be);En(Ur,()=>t.actions,()=>({model:s(n),entry:s(p),selected:s(d)===s(p).id})),L(he,Be)};le(_e,he=>{t.actions&&he(Bt)})}var se=R(_e,2);Nr(se,17,()=>s(w).actions,Jr,(he,Be)=>{var Ur=Rr(),je=xt(Ur);{var Ee=Nt=>{var Vt=Wd(),vo=B(Vt,!0);j(()=>{ee(Vt,"href",s(p).href),N(vo,s(w).labels.download)}),L(Nt,Vt)},Ce=Ot(()=>s(Be)==="download"&&s(p).href&&!_s(s(p))&&!s(p).link?.unavailable),Oe=Nt=>{var Vt=cs(),vo=B(Vt,!0);j(()=>{Vt.disabled=!s(v)||s(Be)==="copy-link"&&!s(p).href,ee(Vt,"aria-label",(s(Be)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)+": "+s(p).name),N(vo,s(Be)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)}),be("click",Vt,async()=>{try{await lc(s(Be),s(p)),E(h,s(w).labels.copied,!0),E(_,null)}catch{E(h,s(w).labels.copyError,!0),E(_,"copy")}}),L(Nt,Vt)};le(je,Nt=>{s(Ce)?Nt(Ee):s(Be)!=="download"&&Nt(Oe,1)})}L(he,Ur)}),Y(J),L(U,J)};le(F,U=>{(t.actions||s(w).actions.length)&&U(W)})}Y(T),ns(T,(U,J)=>gc?.(U,J),()=>s(p).id),j((U,J)=>{ee(T,"data-custom-columns",U),ee(T,"data-id",s(p).id),ee(T,"data-order",s(so)+s(x)),ee(T,"data-active",s(d)===s(p).id),O=Tn(T,"",O,{"--dw-entry-columns":J})},[()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(U=>U==="name"?"minmax(0,1fr)":"minmax(0,12rem)").join(" "):void 0]),L(u,T)});var Qc=R(ml,2);{var eu=u=>{var p=mc();let x;j(()=>x=Tn(p,"",x,{height:s(Ir)[s(ue).length]-s(Ir)[s(us)]+"px"})),L(u,p)};le(Qc,u=>{s(us)<s(ue).length&&u(eu)})}Y(mi),en(mi,u=>E(Rt,u),()=>s(Rt));var tu=R(mi,2);{var ru=u=>{var p=Qd(),x=B(p,!0);j(()=>N(x,s(n).total===0?s(w).labels.empty:s(w).labels.noMatches)),L(u,p)};le(tu,u=>{s(ue).length===0&&!s(m)&&u(ru)})}Y(Os);var vl=R(Os,2);{var nu=u=>{var p=rp(),x=X(p);{var T=W=>{var U=ep(),J=B(U,!0);j(()=>{ee(U,"href",s(n).page.previousHref),N(J,s(w).labels.previous)}),L(W,U)};le(x,W=>{s(n).page.previousHref&&W(T)})}var O=R(x),K=R(O);{var F=W=>{var U=tp(),J=B(U,!0);j(()=>{ee(U,"href",s(n).page.nextHref),N(J,s(w).labels.next)}),L(W,U)};le(K,W=>{s(n).page.nextHref&&W(F)})}Y(p),j(W=>{ee(p,"aria-label",s(w).labels.pagination),N(O,` ${W??""} `)},[()=>An(s(w),"page",{page:s(n).page.number,pages:s(n).page.count})]),L(u,p)};le(vl,u=>{s(n).page?.count>1&&!s(ht)&&u(nu)})}var ou=R(vl,2);{var iu=u=>{var p=Rr(),x=xt(p);En(x,()=>t.footer,()=>({model:s(n)})),L(u,p)},su=u=>{var p=np(),x=X(p);{var T=K=>{var F=Za(),W=B(F,!0);j(()=>{ee(F,"href",s(w).brand.footerUrl),N(W,s(w).brand.footerText)}),L(K,F)},O=K=>{var F=Bo();j(()=>N(F,s(w).brand.footerText)),L(K,F)};le(x,K=>{s(w).brand.footerUrl?K(T):K(O,-1)})}Y(p),L(u,p)},au=u=>{var p=op(),x=B(p,!0);j(()=>N(x,s(w).labels.keyboardHelp)),L(u,p)};le(ou,u=>{t.footer?u(iu):s(w).brand.footerText?u(su,1):u(au,-1)})}Y(_o),ns(_o,u=>vc?.(u));var gl=R(_o,2);{var lu=u=>{var p=ip(),x=X(p),T=B(x,!0),O=R(x,2),K=B(O,!0),F=R(O,2),W=B(F,!0),U=R(F,2),J=B(U,!0);Y(p),en(p,_e=>E(ao,_e),()=>s(ao)),j(_e=>{N(T,s(w).labels.modifiedTime),N(K,s(b)),N(W,_e),N(J,s(w).labels.close)},[()=>s(w).dateOptions.locale!==void 0||s(w).dateOptions.timeZone!==void 0?za(s(b),s(w),!0):new Date(s(b)).toLocaleString()]),dr("close",p,()=>E(b,null)),be("click",U,()=>E(b,null)),L(u,p)};le(gl,u=>{s(b)&&u(lu)})}var fu=R(gl,2);{var cu=u=>{var p=ap(),x=X(p),T=B(x,!0),O=R(x,2);to(O),en(O,se=>E(ds,se),()=>s(ds));var K=R(O,2),F=B(K,!0),W=R(K,2);{var U=se=>{var he=cs(),Be=B(he,!0);j(()=>N(Be,s(w).labels.retry)),be("click",he,vs),L(se,he)};le(W,se=>{s(Qt)&&se(U)})}var J=R(W,2);Nr(J,21,()=>s($e),Jr,(se,he)=>{var Be=sp(),Ur=X(Be);{var je=Ce=>{var Oe=Za(),Nt=B(Oe,!0);j(()=>{ee(Oe,"href",s(he).href),ee(Oe,"target",s(he).exitsExplorer?"_blank":void 0),ee(Oe,"rel",s(he).exitsExplorer?"noopener":void 0),N(Nt,s(he).path)}),L(Ce,Oe)},Ee=Ce=>{var Oe=Bo();j(()=>N(Oe,s(he).path)),L(Ce,Oe)};le(Ur,Ce=>{s(he).href?Ce(je):Ce(Ee,-1)})}Y(Be),L(se,Be)}),Y(J);var _e=R(J,2),Bt=B(_e,!0);Y(p),en(p,se=>E(lo,se),()=>s(lo)),j(()=>{ee(p,"aria-label",s(w).labels.searchArchive),N(T,s(w).labels.searchArchive),ee(O,"aria-label",s(w).labels.archiveSearchInput),N(F,s(ot)),N(Bt,s(w).labels.close)}),dr("close",p,ri),be("keydown",p,se=>{se.key==="Escape"&&(se.preventDefault(),se.stopPropagation(),ri())}),be("input",O,Ec),ss(O,()=>s(pe),se=>E(pe,se)),be("click",_e,ri),L(u,p)};le(fu,u=>{s(Z)&&u(cu)})}j((u,p,x)=>{ee(_o,"aria-busy",s(m)),ee(bs,"aria-label",s(w).labels.breadcrumb),ee(ni,"href",s(n).rootHref),N(Sc,s(w).labels.home),N(rl,s(w).labels.searchDirectory),ee(rn,"placeholder",s(w).labels.searchFiles),rn.disabled=!s(v)||!s(ht),oi.disabled=!s(v)||!s(ht),N(Nc,s(w).labels.types),N(ol,s(w).labels.sort),Mr.disabled=!s(v)||!s(ht),N(Oc,s(w).labels.name),N(Ic,s(w).labels.size),N(Dc,s(w).labels.modified),ai!==(ai=s(l).field)&&(Mr.value=(Mr.__value=ai)??"",Qr(Mr,ai)),N(il,s(w).labels.names),Fr.disabled=!s(v)||!s(ht),N(Lc,s(w).labels.natural),N(Mc,s(w).labels.locale),N(Fc,s(w).labels.unicode),ci!==(ci=s(l).nameMode)&&(Fr.value=(Fr.__value=ci)??"",Qr(Fr,ci)),N(sl,s(w).labels.order),Pr.disabled=!s(v)||!s(ht),N(Pc,s(w).labels.ascending),N(Hc,s(w).labels.descending),di!==(di=s(l).direction)&&(Pr.value=(Pr.__value=di)??"",Qr(Pr,di)),os(ho,s(l).directoriesFirst),ho.disabled=!s(v)||!s(ht),N(Uc,s(w).labels.directoriesFirst),N(al,s(w).labels.appearance),Hr.disabled=!s(v),N(Bc,s(w).labels.system),N(Vc,s(w).labels.light),N(Yc,s(w).labels.dark),hi!==(hi=s(f))&&(Hr.value=(Hr.__value=hi)??"",Qr(Hr,hi)),N(ll,s(_t)[0]),N(jc,s(ht)?s(ue).length:s(o).length),N(cl,u),N(Kc,s(m)?s(w).labels.loading:s(h)),ee(mo,"data-custom-columns",p),pl=Tn(mo,"",pl,{"--dw-entry-columns":x})},[()=>s(_t).slice(1).join("__COUNT__"),()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(u=>u==="name"?"minmax(0,1fr)":"minmax(0,12rem)").join(" "):void 0]),be("click",ni,u=>hs(u,s(n).rootHref,s(n).rootDataHref)),dr("compositionstart",rn,()=>E(g,!0)),dr("compositionend",rn,()=>E(g,!1)),ss(rn,()=>s(i),u=>E(i,u)),be("change",Mr,u=>E(l,{...s(l),field:u.currentTarget.value})),be("change",Fr,u=>E(l,{...s(l),nameMode:u.currentTarget.value})),be("change",Pr,u=>E(l,{...s(l),direction:u.currentTarget.value})),be("change",ho,u=>E(l,{...s(l),directoriesFirst:u.currentTarget.checked})),be("change",Hr,u=>xc(u.currentTarget.value)),L(e,tl),ko()}Zi(["click","change","keydown","input"]);var fp=document.querySelector("[data-dirwell-theme]"),cp=JSON.parse(document.querySelector("#dirwell-page-data").textContent),up=jo(Wa,{target:fp,props:{model:cp}});globalThis.__dirwellUnmount=()=>Go(up);})();
|