@dirwell/theme-ledger 0.0.1 → 0.0.2
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 +3 -1
- package/dist/client.js +25 -25
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{model-B0qQsjRT.d.mts → model-BgCmoksr.d.mts} +3 -1
- package/dist/model.d.mts +1 -1
- package/dist/source/Ledger.svelte +73 -6
- package/dist/source/shared/live-search.mjs +28 -0
- package/dist/source/shared/navigation.mjs +1 -0
- 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
|
|
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),Ls=(e,t,r)=>t.has(e)||yl("Cannot "+r);var c=(e,t,r)=>(Ls(e,t,"read from private field"),r?r.call(e):t.get(e)),F=(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),I=(e,t,r,n)=>(Ls(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),L=(e,t,r)=>(Ls(e,t,"access private method"),r);var $l=globalThis.process?.env?.NODE_ENV,b=$l&&!$l.toLowerCase().startsWith("prod");var qt=Array.isArray,wl=Array.prototype.indexOf,vr=Array.prototype.includes,Cn=Array.from,Ms=Object.keys,Ie=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,gi=Object.getOwnPropertyDescriptors,Fs=Object.prototype,xl=Array.prototype,on=Object.getPrototypeOf,Ps=Object.isExtensible;var er=()=>{};function bi(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 Ke=Symbol("$state"),$i=Symbol("component"),wi=Symbol("legacy props"),El=Symbol(""),xi=Symbol("proxy path"),Ei=Symbol("attributes"),Hs=Symbol("class"),go=Symbol("style"),bo=Symbol("text"),Vr=Symbol("form reset"),Us=Symbol("hmr anchor"),gr=new class extends Error{constructor(){super(...arguments);re(this,"name","StaleReactionError");re(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Vs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var sn=3,vt=8;var it={};var fe=Symbol("uninitialized"),st=Symbol("filename");var Ti="http://www.w3.org/1999/xhtml",yo="http://www.w3.org/2000/svg",Bs="http://www.w3.org/1998/Math/MathML";var tr="font-weight: bold",rr="font-weight: normal";function Tl(e){b?console.warn(`%c[svelte] await_reactivity_loss
|
|
35
35
|
%cDetected reactivity loss when reading \`${e}\`. This happens when state is read in an async function after an earlier \`await\`
|
|
36
|
-
https://svelte.dev/e/await_reactivity_loss`,tr,rr):console.warn("https://svelte.dev/e/await_reactivity_loss")}function
|
|
36
|
+
https://svelte.dev/e/await_reactivity_loss`,tr,rr):console.warn("https://svelte.dev/e/await_reactivity_loss")}function kl(e,t){b?console.warn(`%c[svelte] await_waterfall
|
|
37
37
|
%cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
|
|
38
|
-
https://svelte.dev/e/await_waterfall`,tr,rr):console.warn("https://svelte.dev/e/await_waterfall")}function
|
|
38
|
+
https://svelte.dev/e/await_waterfall`,tr,rr):console.warn("https://svelte.dev/e/await_waterfall")}function Al(){b?console.warn(`%c[svelte] derived_inert
|
|
39
39
|
%cReading a derived belonging to a now-destroyed effect may result in stale values
|
|
40
|
-
https://svelte.dev/e/derived_inert`,tr,rr):console.warn("https://svelte.dev/e/derived_inert")}function
|
|
40
|
+
https://svelte.dev/e/derived_inert`,tr,rr):console.warn("https://svelte.dev/e/derived_inert")}function Sl(e,t,r){b?console.warn(`%c[svelte] hydration_attribute_changed
|
|
41
41
|
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
|
|
42
|
-
https://svelte.dev/e/hydration_attribute_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function
|
|
42
|
+
https://svelte.dev/e/hydration_attribute_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Rl(e){b?console.warn(`%c[svelte] hydration_html_changed
|
|
43
43
|
%c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
44
|
-
https://svelte.dev/e/hydration_html_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_html_changed")}function
|
|
44
|
+
https://svelte.dev/e/hydration_html_changed`,tr,rr):console.warn("https://svelte.dev/e/hydration_html_changed")}function Br(e){b?console.warn(`%c[svelte] hydration_mismatch
|
|
45
45
|
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
|
46
|
-
https://svelte.dev/e/hydration_mismatch`,tr,rr):console.warn("https://svelte.dev/e/hydration_mismatch")}function
|
|
46
|
+
https://svelte.dev/e/hydration_mismatch`,tr,rr):console.warn("https://svelte.dev/e/hydration_mismatch")}function Nl(){b?console.warn(`%c[svelte] lifecycle_double_unmount
|
|
47
47
|
%cTried to unmount a component that was not mounted
|
|
48
|
-
https://svelte.dev/e/lifecycle_double_unmount`,tr,rr):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function
|
|
48
|
+
https://svelte.dev/e/lifecycle_double_unmount`,tr,rr):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Cl(){b?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",tr,rr):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ki(e){b?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
49
49
|
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
|
|
50
|
-
https://svelte.dev/e/state_proxy_equality_mismatch`,tr,rr):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function
|
|
50
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,tr,rr):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function Ol(){b?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",tr,rr):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var T=!1;function Te(e){T=e}var M;function ne(e){if(e===null)throw Br(),it;return M=e}function De(){return ne(Le(M))}function Y(e){if(T){if(Le(M)!==null)throw Br(),it;M=e}}function wo(e=1){if(T){for(var t=e,r=M;t--;)r=Le(r);M=r}}function nr(e=!0){for(var t=0,r=M;;){if(r.nodeType===vt){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var o=Le(r);e&&r.remove(),r=o}}function an(e){if(!e||e.nodeType!==vt)throw Br(),it;return e.data}function Ai(e){return e===this.v}function Si(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ri(e){return!Si(e,this.v)}function Il(e){if(b){let t=new Error(`invariant_violation
|
|
51
51
|
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app \u2014 please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${e}"
|
|
52
|
-
https://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invariant_violation")}function
|
|
52
|
+
https://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invariant_violation")}function Ni(e){if(b){let t=new Error(`lifecycle_outside_component
|
|
53
53
|
\`${e}(...)\` can only be used during component initialisation
|
|
54
|
-
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function
|
|
54
|
+
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ll(){if(b){let e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ys(){if(b){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function Ml(){if(b){let e=new Error(`derived_references_self
|
|
55
55
|
A derived value cannot reference itself recursively
|
|
56
|
-
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function
|
|
56
|
+
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function qs(e,t,r){if(b){let n=new Error(`each_key_duplicate
|
|
57
57
|
${r?`Keyed each block has duplicate key \`${r}\` at indexes ${e} and ${t}`:`Keyed each block has duplicate key at indexes ${e} and ${t}`}
|
|
58
|
-
https://svelte.dev/e/each_key_duplicate`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function
|
|
58
|
+
https://svelte.dev/e/each_key_duplicate`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function Fl(e,t,r){if(b){let n=new Error(`each_key_volatile
|
|
59
59
|
Keyed each block has key that is not idempotent \u2014 the key for item at index ${e} was \`${t}\` but is now \`${r}\`. Keys must be the same each time for a given item
|
|
60
|
-
https://svelte.dev/e/each_key_volatile`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_volatile")}function
|
|
60
|
+
https://svelte.dev/e/each_key_volatile`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_volatile")}function Pl(e){if(b){let t=new Error(`effect_in_teardown
|
|
61
61
|
\`${e}\` cannot be used inside an effect cleanup function
|
|
62
|
-
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function
|
|
62
|
+
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function Hl(){if(b){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ul(e){if(b){let t=new Error(`effect_orphan
|
|
63
63
|
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
64
|
-
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function
|
|
64
|
+
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function Vl(){if(b){let e=new Error(`effect_update_depth_exceeded
|
|
65
65
|
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
|
66
|
-
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function
|
|
66
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Bl(){if(b){let e=new Error(`hydration_failed
|
|
67
67
|
Failed to hydrate the application
|
|
68
|
-
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function
|
|
68
|
+
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function Yl(){if(b){let e=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invalid_snippet")}function ql(e){if(b){let t=new Error(`rune_outside_svelte
|
|
69
69
|
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
70
|
-
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function
|
|
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 jl(){if(b){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function zl(){if(b){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Gl(){if(b){let e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Kl(){if(b){let e=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var ke=!1,Yr=!1,jt=!1;var xo=null;function Ze(e,t){return e.label=t,Oi(e.v,t),e}function Oi(e,t){return e?.[xi]?.(t),e}function zt(e){let t=new Error,r=hu();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 jl(e,t){if(!b)throw new Error("invariant(...) was not guarded by if (DEV)");e||Rl(t)}var Y=null;function br(e){Y=e}var or=null;function Cn(e){or=e}var gt=null;function Ri(e){gt=e}function bo(e,t=!1,r){Y={p:Y,i:!1,c:null,e:null,s:e,x:null,r:k,l:Vr&&!t?{s:null,u:null,$:[]}:null},b&&(Y.function=r,gt=r)}function yo(e){var t=Y,r=t.e;if(r!==null){t.e=null;for(var n of r)Us(n)}return e!==void 0&&(t.x=e),t.i=!0,Y=t.p,b&&(gt=Y?.function??null),$o(e)}function $o(e={}){return Ie(e,vi,{value:!0}),e}function ir(){return!Vr||Y!==null&&Y.l===null}var sn=[];function Gl(){var e=sn;sn=[],mi(e)}function $e(e){if(sn.length===0&&!an){var t=sn;queueMicrotask(()=>{t===sn&&Gl()})}sn.push(e)}function Kl(){for(;sn.length>0;)Gl()}var uu=-7169;function ie(e,t){e.f=e.f&uu|t}function On(e){(e.f&512)!==0||e.deps===null?ie(e,1024):ie(e,4096)}function Ni(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),ie(e,1024)}var Zl=!1;function Ci(){Zl||(Zl=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Hr]?.()})},{capture:!0}))}function yt(e){var t=C,r=k;Se(null),Re(null);try{return e()}finally{Se(t),Re(r)}}function Vs(e,t,r,n=r){e.addEventListener(t,()=>yt(r));let o=e[Hr];o?e[Hr]=()=>{o(),n(!0)}:e[Hr]=()=>n(!0),Ci()}function Oi(e,t,r,n){let o=ir()?Ln:Mn;var i=e.filter(_=>!_.settled),a=t.map(o);if(b&&a.forEach((_,y)=>{_.label=t[y].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(g,$)=>$)}),r.length===0&&i.length===0){n(a);return}var l=k,f=Wl(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(_=>_.promise)):null;function v(_){if((l.f&16384)===0){f();try{n([...a,..._])}catch(y){at(y,l)}Dn()}}var h=Bs();if(r.length===0){u.then(()=>v([])).finally(h);return}function m(){Promise.all(r.map(_=>qs(_))).then(v).catch(_=>at(_,l)).finally(h)}u?u.then(()=>{if((l.f&16384)!==0){h();return}f(),m(),Dn()}):m()}function Wl(){var e=k,t=C,r=Y,n=O;if(b)var o=or;return function(a=!0){Re(e),Se(t),br(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply()),b&&(Ys(null),Cn(o))}}var du=!1;function Dn(e=!0){du=!1,Re(null),Se(null),br(null),e&&O?.deactivate(),b&&(Ys(null),Cn(null))}function Bs(){var e=k,t=e.b,r=O,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var lt=null;function Ys(e){lt=e}var Eo=new Set;function Ln(e){var t=2050;k!==null&&(k.f|=524288);let r={ctx:Y,deps:null,effects:null,equals:xi,f:t,fn:e,reactions:null,rv:0,v:le,wv:0,parent:k,ac:null};return b&&qt&&(r.created=zt("created at")),r}var Fn=Symbol("obsolete");function qs(e,t,r){let n=k;n===null&&Cl();var o=void 0,i=Xe(le);b&&(i.label=t??e.toString());var a=!C,l=new Set;return Ql(()=>{var f=k;b&&(lt={effect:f,effect_deps:new Set,warned:!1});var u=hi();o=u.promise;try{Promise.resolve(e()).then(u.resolve,_=>{_!==gr&&u.reject(_)}).finally(Dn)}catch(_){u.reject(_),Dn()}if(b){if(lt){if(f.deps!==null)for(let _=0;_<tt;_+=1)lt.effect_deps.add(f.deps[_]);if(Fe!==null)for(let _=0;_<Fe.length;_+=1)lt.effect_deps.add(Fe[_])}lt=null}var v=O;if(a){if((f.f&32768)!==0)var h=Bs();if(n.b?.is_rendered())v.async_deriveds.get(f)?.reject(Fn);else for(let _ of l.values())_.reject(Fn);l.add(u),v.async_deriveds.set(f,u)}let m=(_,y=void 0)=>{b&&(lt=null),h?.(),l.delete(u),y!==Fn&&(v.activate(),y?(i.f|=8388608,Gt(i,y)):((i.f&8388608)!==0&&(i.f^=8388608),b&&r!==void 0&&!i.equals(_)&&(Eo.add(i),setTimeout(()=>{Eo.has(i)&&(f.f&16384)===0&&(wl(i.label,r),Eo.delete(i))})),Gt(i,_)),v.deactivate())};u.promise.then(m,_=>m(null,_||"unknown"))}),Me(()=>{for(let f of l)f.reject(Fn)}),b&&(i.f|=4194304),new Promise(f=>{function u(v){function h(){v===o?f(i):u(o)}v.then(h,h)}u(o)})}function Ot(e){let t=Ln(e);return ke||Li(t),t}function Mn(e){let t=Ln(e);return t.equals=Ti,t}function Xl(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ge(t[r])}}var zs=[];function To(e){var t,r=k,n=e.parent;if(!Dt&&n!==null&&e.v!==le&&(n.f&24576)!==0)return xl(),e.v;if(Re(n),b){let o=fn;Ii(new Set);try{vr.call(zs,e)&&Ol(),zs.push(e),Xl(e),t=Di(e)}finally{Re(r),Ii(o),zs.pop()}}else try{Xl(e),t=Di(e)}finally{Re(r)}return t}function js(e){var t=To(e);if(!e.equals(t)&&(e.wv=Pn(),(!O?.is_fork||e.deps===null)&&(O!==null?(O.capture(e,t,!0),It?.capture(e,t,!0)):e.v=t,e.deps===null))){ie(e,1024);return}Dt||(Pe!==null?(Br()||O?.is_fork)&&Pe.set(e,t):On(e))}function Jl(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&yt(()=>{t.ac.abort(gr),t.ac=null}),t.fn!==null&&(t.teardown=er),cn(t,0),ko(t))}function Gs(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&sr(t)}var Mi=null,Hn=null,O=null,It=null,Pe=null,Ws=null,an=!1,Ks=!1,Vn=null,Ro=null,ef=0,Zs=new Set,mu=1,Bn,wr,xr,Yn,qn,zn,Er,jn,ct,No,Tr,Kt,ar,Gn,Yr,J,Xs,Js,Ao,Qs,rf,nf,Un,of,So,Fi=class Fi{constructor(){F(this,J);re(this,"id",mu++);F(this,Bn,!1);re(this,"linked",!0);F(this,wr,null);F(this,xr,null);re(this,"async_deriveds",new Map);re(this,"current",new Map);re(this,"previous",new Map);F(this,Yn,new Set);F(this,qn,new Set);F(this,zn,0);F(this,Er,new Map);F(this,jn,null);F(this,ct,[]);F(this,No,[]);F(this,Tr,new Set);F(this,Kt,new Set);F(this,ar,new Map);F(this,Gn,new Set);re(this,"is_fork",!1);F(this,Yr,!1);Hn===null?Mi=Hn=this:(I(Hn,xr,this),I(this,wr,Hn)),Hn=this}skip_effect(t){c(this,ar).has(t)||c(this,ar).set(t,{d:[],m:[]}),c(this,Gn).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=c(this,ar).get(t);if(n){c(this,ar).delete(t);for(var o of n.d)ie(o,2048),r(o);for(o of n.m)ie(o,4096),r(o)}c(this,Gn).add(t)}capture(t,r,n=!1){t.v!==le&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Pe?.set(t,r)),this.is_fork||(t.v=r)}activate(){O=this}deactivate(){O=null,Pe=null}flush(){try{b&&Zs.clear(),Ks=!0,O=this,L(this,J,Ao).call(this)}finally{if(ef=0,Ws=null,Vn=null,Ro=null,Ks=!1,O=null,Pe=null,Mt.clear(),b)for(let t of Zs)t.updated=null}}discard(){for(let t of c(this,qn))t(this);c(this,qn).clear();for(let t of this.async_deriveds.values())t.reject(Fn);L(this,J,So).call(this),c(this,jn)?.resolve()}register_created_effect(t){c(this,No).push(t)}increment(t,r){if(I(this,zn,c(this,zn)+1),t){let n=c(this,Er).get(r)??0;c(this,Er).set(r,n+1)}}decrement(t,r){if(I(this,zn,c(this,zn)-1),t){let n=c(this,Er).get(r)??0;n===1?c(this,Er).delete(r):c(this,Er).set(r,n-1)}c(this,Yr)||(I(this,Yr,!0),$e(()=>{I(this,Yr,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(let n of t)c(this,Tr).add(n);for(let n of r)c(this,Kt).add(n);t.clear(),r.clear()}oncommit(t){c(this,Yn).add(t)}ondiscard(t){c(this,qn).add(t)}settled(){return(c(this,jn)??I(this,jn,hi())).promise}static ensure(){if(O===null){let t=O=new Fi;!Ks&&!an&&$e(()=>{c(t,Bn)||t.flush()})}return O}apply(){if(!ke||!this.is_fork&&c(this,wr)===null&&c(this,xr)===null){Pe=null;return}Pe=new Map;for(let[r,[n]]of this.current)Pe.set(r,n);for(let r=Mi;r!==null;r=c(r,xr))if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(let[n,[,o]]of r.current)if(!o&&this.current.has(n)){t=!0;break}}if(!t)for(let[n,o]of r.previous)Pe.has(n)||Pe.set(n,o)}}schedule(t){if(Ws=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}c(this,ct).push(t)}};Bn=new WeakMap,wr=new WeakMap,xr=new WeakMap,Yn=new WeakMap,qn=new WeakMap,zn=new WeakMap,Er=new WeakMap,jn=new WeakMap,ct=new WeakMap,No=new WeakMap,Tr=new WeakMap,Kt=new WeakMap,ar=new WeakMap,Gn=new WeakMap,Yr=new WeakMap,J=new WeakSet,Xs=function(){if(this.is_fork)return!0;for(let n of c(this,Er).keys()){for(var t=n,r=!1;t.parent!==null;){if(c(this,ar).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Js=function(){var t=[];for(let i of c(this,ct))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var r=i,n=!1;r.parent!==null;){r=r.parent;var o=r.f;if((o&96)!==0){if((o&1024)===0){n=!0;break}r.f^=1024}}n||t.push(r)}return I(this,ct,[]),t},Ao=function(){var l,f,u;if(I(this,Bn,!0),b)for(let v of this.current.keys())Zs.add(v);for(let v of c(this,Tr))c(this,Kt).delete(v),ie(v,2048),this.schedule(v);for(let v of c(this,Kt))ie(v,4096),this.schedule(v);this.apply();for(var t=Vn=[],r=[],n=Ro=[];c(this,ct).length>0;){ef++>1e3&&(L(this,J,So).call(this),hu());for(let v of L(this,J,Js).call(this))try{L(this,J,Qs).call(this,v,t,r)}catch(h){throw lf(v),L(this,J,Xs).call(this)||this.discard(),h}}if(O=null,n.length>0){var o=Fi.ensure();for(let v of n)o.schedule(v)}if(Vn=null,Ro=null,L(this,J,Xs).call(this)){L(this,J,Un).call(this,r),L(this,J,Un).call(this,t);for(let[v,h]of c(this,ar))af(v,h);n.length>0&&L(l=O,J,Ao).call(l);return}let i=L(this,J,rf).call(this);if(i){L(this,J,Un).call(this,r),L(this,J,Un).call(this,t),L(f=i,J,nf).call(f,this);return}c(this,Tr).clear(),c(this,Kt).clear();for(let v of c(this,Yn))v(this);c(this,Yn).clear(),It=this,tf(r),tf(t),It=null,c(this,jn)?.resolve();var a=O;if(c(this,zn)===0&&(c(this,ct).length===0||a!==null)&&(L(this,J,So).call(this),ke&&(L(this,J,of).call(this),O=a)),c(this,ct).length>0)if(a!==null){for(let v of c(this,ct))c(a,ct).push(v);I(this,ct,[])}else a=this;a!==null&&(Mt.clear(),L(u=a,J,Ao).call(u))},Qs=function(t,r,n){t.f^=1024;for(var o=t.first;o!==null;){var i=o.f,a=(i&96)!==0,l=a&&(i&1024)!==0,f=l||(i&8192)!==0||c(this,ar).has(o);if(!f&&o.fn!==null){a?o.f^=1024:(i&4)!==0?r.push(o):ke&&(i&16777224)!==0?n.push(o):zr(o)&&((i&16)!==0&&c(this,Kt).add(o),sr(o));var u=o.first;if(u!==null){o=u;continue}}for(;o!==null;){var v=o.next;if(v!==null){o=v;break}o=o.parent}}},rf=function(){for(var t=c(this,wr);t!==null;){if(!t.is_fork){for(let[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=c(t,wr)}return null},nf=function(t){var n;for(let[o,i]of t.current)!this.previous.has(o)&&t.previous.has(o)&&this.previous.set(o,t.previous.get(o)),this.current.set(o,i);for(let[o,i]of t.async_deriveds){let a=this.async_deriveds.get(o);a&&i.promise.then(a.resolve).catch(a.reject)}t.async_deriveds.clear(),this.transfer_effects(c(t,Tr),c(t,Kt));let r=o=>{var i=o.reactions;if(i!==null&&!((o.f&2)!==0&&(o.f&6144)===0))for(let f of i){var a=f.f;if((a&2)!==0)r(f);else{var l=f;a&4194320&&!this.async_deriveds.has(l)&&(c(this,Kt).delete(l),ie(l,2048),this.schedule(l))}}};for(let o of this.current.keys())r(o);this.oncommit(()=>t.discard()),L(n=t,J,So).call(n),O=this,L(this,J,Ao).call(this)},Un=function(t){for(var r=0;r<t.length;r+=1)Ni(t[r],c(this,Tr),c(this,Kt))},of=function(){var h,m;for(let _=Mi;_!==null;_=c(_,xr)){var t=_.id<this.id,r=[];for(let[y,[g,$]]of this.current){if(_.current.has(y)){var n=_.current.get(y)[0];if(t&&g!==n)_.current.set(y,[g,$]);else continue}r.push(y)}if(t)for(let[y,g]of this.async_deriveds){let $=_.async_deriveds.get(y);$&&g.promise.then($.resolve).catch($.reject)}var o=[..._.current.keys()].filter(y=>!_.current.get(y)[1]);if(!(!c(_,Bn)||o.length===0)){var i=o.filter(y=>!this.current.has(y));if(i.length===0)t&&_.discard();else if(r.length>0){if(b&&!c(_,Yr)&&jl(c(_,ct).length===0,"Batch has scheduled effects"),t)for(let y of c(this,Gn))_.unskip_effect(y,g=>{var $;(g.f&4194320)!==0?_.schedule(g):L($=_,J,Un).call($,[g])});_.activate();var a=new Set,l=new Map;for(var f of r)sf(f,i,a,l);l=new Map;var u=[..._.current].filter(([y,g])=>{let $=this.current.get(y);return $?$[0]!==g[0]||$[1]!==g[1]:!0}).map(([y])=>y);if(u.length>0)for(let y of c(this,No))(y.f&155648)===0&&ea(y,u,l)&&((y.f&4194320)!==0?(ie(y,2048),_.schedule(y)):c(_,Tr).add(y));if(c(_,ct).length>0&&!c(_,Yr)){_.apply();for(var v of L(h=_,J,Js).call(h))L(m=_,J,Qs).call(m,v,[],[])}_.deactivate()}}}},So=function(){if(this.linked){var t=c(this,wr),r=c(this,xr);t===null?Mi=r:I(t,xr,r),r===null?Hn=t:I(r,wr,t),this.linked=!1}};var $t=Fi;function qr(e){var t=an,r=It;It=null,an=!0;try{var n;for(e&&(qr(),n=e());;){if(Kl(),O===null)return n;O.flush()}}finally{an=t,It=r}}function hu(){if(b){var e=new Map;for(let r of O.current.keys())for(let[n,o]of r.updated??[]){var t=e.get(n);t||(t={error:o.error,count:0},e.set(n,t)),t.count+=o.count}for(let r of e.values())r.error&&console.error(r.error)}try{Fl()}catch(r){b&&Ie(r,"stack",{value:""}),at(r,Ws)}}var Lt=null;function tf(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&zr(n)&&(Lt=new Set,sr(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&ta(n),Lt?.size>0)){Mt.clear();for(let o of Lt){if((o.f&24576)!==0)continue;let i=[o],a=o.parent;for(;a!==null;)Lt.has(a)&&(Lt.delete(a),i.push(a)),a=a.parent;for(let l=i.length-1;l>=0;l--){let f=i[l];(f.f&24576)===0&&sr(f)}}Lt.clear()}}Lt=null}}function sf(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(let o of e.reactions){let i=o.f;(i&2)!==0?sf(o,t,r,n):(i&4194320)!==0&&(i&2048)===0&&ea(o,t,n)&&(ie(o,2048),Co(o))}}function ea(e,t,r){let n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(let o of e.deps){if(vr.call(t,o))return!0;if((o.f&2)!==0&&ea(o,t,r))return r.set(o,!0),!0}return r.set(e,!1),!1}function Co(e){O.schedule(e)}function af(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),ie(e,1024);for(var r=e.first;r!==null;)af(r,t),r=r.next}}function lf(e){ie(e,1024);for(var t=e.first;t!==null;)lf(t),t=t.next}var fn=new Set,Mt=new Map;function Ii(e){fn=e}var na=!1;function cf(){na=!0}function Xe(e,t){var r={f:0,v:e,reactions:null,equals:xi,rv:0,wv:0};return b&&qt&&(r.created=t??zt("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function q(e,t){let r=Xe(e,t);return Li(r),r}function pn(e,t=!1,r=!0){var o;let n=Xe(e);return t||(n.equals=Ti),Vr&&r&&Y!==null&&Y.l!==null&&((o=Y.l).s??(o.s=[])).push(n),n}function E(e,t,r=!1){C!==null&&(!rt||(C.f&131072)!==0)&&ir()&&(C.f&4325394)!==0&&(Ft===null||!Ft.has(e))&&Yl();let n=r?Zt(t):t;return b&&Si(n,e.label),Gt(e,n,Ro)}var dn=null,ra=0;function Gt(e,t,r=null){if(!e.equals(t)){Dt?Mt.set(e,t):Mt.has(e)||Mt.set(e,e.v);var n=$t.ensure();if(n.capture(e,t),b){if(qt||k!==null){e.updated??(e.updated=new Map);let o=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:o}),qt||o>5){let i=zt("updated at");if(i!==null){let a=e.updated.get(i.stack);a||(a={error:i,count:0},e.updated.set(i.stack,a)),a.count++}}}k!==null&&(e.set_during_effect=!0)}if((e.f&2)!==0){let o=e;(e.f&2048)!==0&&To(o),Pe===null&&On(o)}e.wv=Pn(),dn=null,ra=0,uf(e,2048,r),dn=null,ir()&&k!==null&&(k.f&1024)!==0&&(k.f&96)===0&&(wt===null?df([e]):wt.push(e)),!n.is_fork&&fn.size>0&&!na&&Pi()}return t}function Pi(){na=!1;for(let e of fn){(e.f&1024)!==0&&ie(e,4096);let t;try{t=zr(e)}catch{t=!0}t&&sr(e)}fn.clear()}function _n(e){E(e,e.v+1)}function uf(e,t,r){var n=e.reactions;if(n!==null){var o=ir(),i=n.length;if(ra+=i,ra>1e5&&dn===null&&(dn=new Set),dn!==null){if(dn.has(e))return;dn.add(e)}for(var a=0;a<i;a++){var l=n[a],f=l.f;if(!(!o&&l===k)){var u=(f&2048)===0;if(u&&ie(l,t),(f&131072)!==0)fn.add(l);else if((f&2)!==0){var v=l;Pe?.delete(v),uf(v,4096,r)}else if(u){var h=l;(f&16)!==0&&Lt!==null&&Lt.add(h),r!==null?r.push(h):Co(h)}}}}}var gu=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Zt(e){if(typeof e!="object"||e===null||Ke in e||vi in e)return e;let t=rn(e);if(t!==Os&&t!==bl)return e;var r=new Map,n=Yt(e),o=q(0),i=b&&qt?zt("created at"):null,a=jr,l=h=>{if(jr===a)return h();var m=C,_=jr;Se(null),oa(a);var y=h();return Se(m),oa(_),y};n&&(r.set("length",q(e.length,i)),b&&(e=yu(e)));var f="";let u=!1;function v(h){if(!u){u=!0,f=h,Ze(o,`${f} version`);for(let[m,_]of r)Ze(_,mn(f,m));u=!1}}return new Proxy(e,{defineProperty(h,m,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&Vl();var y=r.get(m);return y===void 0?l(()=>{var g=q(_.value,i);return r.set(m,g),b&&typeof m=="string"&&Ze(g,mn(f,m)),g}):E(y,_.value,!0),!0},deleteProperty(h,m){var _=r.get(m);if(_===void 0){if(m in h){let y=l(()=>q(le,i));r.set(m,y),_n(o),b&&Ze(y,mn(f,m))}}else E(_,le),_n(o);return!0},get(h,m,_){if(m===Ke)return e;if(b&&m===bi)return v;var y=r.get(m),g=m in h;if(y===void 0&&(!g||ht(h,m)?.writable)&&(y=l(()=>{var A=Zt(g?h[m]:le),K=q(A,i);return b&&Ze(K,mn(f,m)),K}),r.set(m,y)),y!==void 0){var $=s(y);return $===le?void 0:$}return Reflect.get(h,m,_)},getOwnPropertyDescriptor(h,m){this.has?.(h,m);var _=Reflect.getOwnPropertyDescriptor(h,m),y=r.get(m);if(y!==void 0){var g=s(y);if(g===le)return;if(_&&"value"in _)_.value=g;else return{enumerable:!0,configurable:!0,value:g,writable:!0}}return _},has(h,m){if(m===Ke)return!0;var _=r.get(m),y=_!==void 0&&_.v!==le||Reflect.has(h,m);if(_!==void 0||k!==null&&(!y||ht(h,m)?.writable)){_===void 0&&(_=l(()=>{var $=y?Zt(h[m]):le,A=q($,i);return b&&Ze(A,mn(f,m)),A}),r.set(m,_));var g=s(_);if(g===le)return!1}return y},set(h,m,_,y){var g=r.get(m),$=m in h;if(n&&m==="length")for(var A=_;A<g.v;A+=1){var K=r.get(A+"");K!==void 0?E(K,le):A in h&&(K=l(()=>q(le,i)),r.set(A+"",K),b&&Ze(K,mn(f,A)))}if(g===void 0)(!$||ht(h,m)?.writable)&&(g=l(()=>q(void 0,i)),b&&Ze(g,mn(f,m)),E(g,Zt(_)),r.set(m,g));else{$=g.v!==le;var pe=l(()=>Zt(_));E(g,pe)}var xe=Reflect.getOwnPropertyDescriptor(h,m);if(xe?.set&&xe.set.call(y,_),!$){if(n&&typeof m=="string"){var pt=r.get("length"),Ue=Number(m);Number.isInteger(Ue)&&Ue>=pt.v&&E(pt,Ue+1)}_n(o)}return!0},ownKeys(h){s(o);var m=Reflect.ownKeys(h).filter(g=>{var $=r.get(g);return $===void 0||$.v!==le});for(var[_,y]of r)y.v!==le&&!(_ in h)&&m.push(_);return m},setPrototypeOf(){Bl()}})}function mn(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:gu.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Kn(e){try{if(e!==null&&typeof e=="object"&&Ke in e)return e[Ke]}catch{}return e}function Hi(e,t){return Object.is(Kn(e),Kn(t))}var bu=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function yu(e){return new Proxy(e,{get(t,r,n){var o=Reflect.get(t,r,n);return bu.has(r)?function(...i){cf();var a=o.apply(this,i);return Pi(),a}:o}})}function pf(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:o}=e;e.indexOf=function(i,a){let l=r.call(this,i,a);if(l===-1){for(let f=a??0;f<this.length;f+=1)if(Kn(this[f])===i){wi("array.indexOf(...)");break}}return l},e.lastIndexOf=function(i,a){let l=n.call(this,i,a??this.length-1);if(l===-1){for(let f=0;f<=(a??this.length-1);f+=1)if(Kn(this[f])===i){wi("array.lastIndexOf(...)");break}}return l},e.includes=function(i,a){let l=o.call(this,i,a);if(!l){for(let f=0;f<this.length;f+=1)if(Kn(this[f])===i){wi("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=o}}var hn,_f,Oo,mf,hf;function Ui(){if(hn===void 0){hn=window,_f=document,Oo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;mf=ht(t,"firstChild").get,hf=ht(t,"nextSibling").get,Is(e)&&(e[Ds]=void 0,e[yi]=null,e[po]=void 0,e.__e=void 0),Is(r)&&(r[_o]=void 0),b&&(e.__svelte_meta=null,pf())}}function be(e=""){return document.createTextNode(e)}function ve(e){return mf.call(e)}function Le(e){return hf.call(e)}function W(e,t){if(!T)return ve(e);var r=ve(M);if(r===null)r=M.appendChild(be());else if(t&&r.nodeType!==nn){var n=be();return r?.before(n),ne(n),n}return t&&Io(r),ne(r),r}function xt(e,t=!1){if(!T){var r=ve(e);return r instanceof Comment&&r.data===""?Le(r):r}if(t){if(M?.nodeType!==nn){var n=be();return M?.before(n),ne(n),n}Io(M)}return M}function H(e,t=!1){if(!T)return ve(e);var r=W(e,t);return B(e),r}function S(e,t=1,r=!1){let n=T?M:e;for(var o;t--;)o=n,n=Le(n);if(!T)return n;if(r){if(n?.nodeType!==nn){var i=be();return n===null?o?.after(i):n.before(i),ne(i),i}Io(n)}return ne(n),n}function xo(e){e.textContent=""}function Vi(){if(!ke||Lt!==null)return!1;var e=k.f;return(e&32768)!==0}function Wt(e,t,r){return t==null||t===$i?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Io(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===nn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}var ia=new WeakMap;function vf(e){var t=k;if(t===null)return C.f|=8388608,e;if(b&&e instanceof Error&&!ia.has(e)&&ia.set(e,$u(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw b&&!t.parent&&e instanceof Error&&gf(e),e;at(e,t)}function at(e,t){if(e===ot)throw e;if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw b&&e instanceof Error&&gf(e),e}}function $u(e,t){let r=ht(e,"message");if(!(r&&!r.configurable)){for(var n=Oo?" ":" ",o=`
|
|
72
|
+
`)}),Ie(t,"name",{value:e}),t)}function hu(){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 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=`
|
|
74
74
|
${n}in ${t.fn?.name||"<unknown>"}`,i=t.ctx;i!==null;)o+=`
|
|
75
|
-
${n}in ${i.function?.[
|
|
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 gf(e){let t=ia.get(e);t&&(Ie(e,"message",{value:t.message}),Ie(e,"stack",{value:t.stack}))}function yf(e){k===null&&(C===null&&Ml(e),Ll()),Dt&&Dl(e)}function xu(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function lr(e,t){var r=k;if(b)for(;r!==null&&(r.f&131072)!==0;)r=r.parent;r!==null&&(r.f&8192)!==0&&(e|=8192);var n={ctx:Y,deps:null,nodes:null,f:e|2048|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};b&&(n.component_function=gt),O?.register_created_effect(n);var o=n;if((e&4)!==0)Vn!==null?Vn.push(n):$t.ensure().schedule(n);else if(t!==null){try{sr(n)}catch(a){throw ge(n),a}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&524288)===0&&(o=o.first,(e&16)!==0&&(e&65536)!==0&&o!==null&&(o.f|=65536))}if(o!==null&&(o.parent=r,r!==null&&xu(o,r),C!==null&&(C.f&2)!==0&&(e&64)===0)){var i=C;(i.effects??(i.effects=[])).push(o)}return n}function Br(){return C!==null&&!rt}function Me(e){let t=lr(8,null);return ie(t,1024),t.teardown=e,t}function Xt(e){yf("$effect"),b&&Ie(e,"name",{value:"$effect"});var t=k.f,r=!C&&(t&32)!==0&&Y!==null&&!Y.i;if(r){var n=Y;(n.e??(n.e=[])).push(e)}else return Us(e)}function Us(e){return lr(1048580,e)}function la(e){$t.ensure();let t=lr(524352,e);return()=>{ge(t)}}function $f(e){$t.ensure();let t=lr(524352,e);return(r={})=>new Promise(n=>{r.outro?fr(t,()=>{ge(t),n(void 0)}):(ge(t),n(void 0))})}function Et(e){return lr(4,e)}function Ql(e){return lr(4718592,e)}function He(e,t=0){return lr(8|t,e)}function z(e,t=[],r=[],n=[]){Oi(n,t,r,o=>{lr(8,()=>{e(...o.map(s))})})}function dt(e,t=0){var r=lr(16|t,e);return b&&(r.dev_stack=or),r}function Ne(e){return lr(524320,e)}function fa(e){var t=e.teardown;if(t!==null){let r=Dt,n=C;sa(!0),Se(null);try{t.call(null)}catch(o){at(o,e.parent)}finally{sa(r),Se(n)}}}function ko(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){let o=r.ac;o!==null&&yt(()=>{o.abort(gr)});var n=r.next;(r.f&64)!==0?r.parent=null:ge(r,t),r=n}}function wf(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&ge(t),t=r}}function ge(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ca(e.nodes.start,e.nodes.end),r=!0),e.f|=33554432,ko(e,t&&!r),cn(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(let i of n)i.stop();fa(e),e.f^=33554432,e.f|=16384;var o=e.parent;o!==null&&o.first!==null&&ta(e),b&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ca(e,t){for(;e!==null;){var r=e===t?null:Le(e);e.remove(),e=r}}function ta(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function fr(e,t,r=!0){var n=[];e.f|=256,xf(e,n,!0);var o=()=>{r&&ge(e),t&&t()},i=n.length;if(i>0){var a=()=>--i||o();for(var l of n)l.out(a)}else o()}function xf(e,t,r){if((e.f&8192)===0){e.f^=8192;var n=e.nodes&&e.nodes.t;if(n!==null)for(let l of n)(l.is_global||r)&&t.push(l);for(var o=e.first;o!==null;){var i=o.next;if((o.f&64)===0){var a=(o.f&65536)!==0||(o.f&32)!==0&&(e.f&16)!==0;xf(o,t,a?r:!1)}o=i}}}function Zn(e){e.f&=-257,Ef(e,!0)}function Ef(e,t){if((e.f&256)===0&&(e.f&8192)!==0){e.f^=8192,(e.f&1024)===0&&(ie(e,2048),$t.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,o=(r.f&65536)!==0||(r.f&32)!==0;Ef(r,o?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(let a of i)(a.is_global||t)&&a.in()}}function Wn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var o=r===n?null:Le(r);t.append(r),r=o}}var Tf=null;var Dt=!1;function sa(e){Dt=e}var C=null,rt=!1;function Se(e){C=e}var k=null;function Re(e){k=e}var Ft=null;function Li(e){C!==null&&(!ke&&(C.f&2097152)!==0||(C.f&2)!==0)&&(Ft??(Ft=new Set)).add(e)}var Fe=null,tt=0,wt=null;function df(e){wt=e}var Af=1,vn=0,jr=vn;function oa(e){jr=e}function Pn(){return++Af}function zr(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,n=r.length,o=0;o<n;o++){var i=r[o];if(zr(i)&&js(i),i.wv>e.wv)return!0}(t&512)!==0&&Pe===null&&ie(e,1024)}return!1}function Sf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!ke&&Ft!==null&&Ft.has(e)))for(var o=0;o<n.length;o++){var i=n[o];(i.f&2)!==0?Sf(i,t,!1):t===i&&(r?ie(i,2048):(i.f&1024)!==0&&ie(i,4096),Co(i))}}function Di(e){var t=Fe,r=tt,n=wt,o=C,i=Ft,a=Y,l=rt,f=jr,u=e.f;Fe=null,tt=0,wt=null,C=(u&96)===0?e:null,Ft=null,br(e.ctx),rt=!1,jr=++vn,e.ac!==null&&(yt(()=>{e.ac.abort(gr)}),e.ac=null);try{e.f|=2097152;var v=e.fn,h=v();e.f|=32768;var m=kf(e);if(ir()&&wt!==null&&!rt&&m!==null&&(e.f&6146)===0)for(var _=0;_<wt.length;_++)Sf(wt[_],e);if(o!==null&&o!==e){if(vn++,o.deps!==null)for(let y=0;y<r;y+=1)o.deps[y].rv=vn;if(t!==null)for(let y of t)y.rv=vn;wt!==null&&(n===null?n=wt:n.push(...wt))}return(e.f&8388608)!==0&&(e.f^=8388608),h}catch(y){return kf(e),vf(y)}finally{e.f^=2097152,Fe=t,tt=r,wt=n,C=o,Ft=i,br(a),rt=l,jr=f}}function kf(e){var o;var t=e.deps,r=O?.is_fork;if(Fe!==null){var n;if(r||cn(e,tt),t!==null&&tt>0)for(t.length=tt+Fe.length,n=0;n<Fe.length;n++)t[tt+n]=Fe[n];else e.deps=t=Fe;if(Br()&&(e.f&512)!==0)for(n=tt;n<t.length;n++)((o=t[n]).reactions??(o.reactions=[])).push(e)}else!r&&t!==null&&tt<t.length&&(cn(e,tt),t.length=tt);return t}function Eu(e,t){let r=t.reactions;if(r!==null){var n=gl.call(r,e);if(n!==-1){var o=r.length-1;o===0?r=t.reactions=null:(r[n]=r[o],r.pop())}}if(r===null&&(t.f&2)!==0&&(Fe===null||!vr.call(Fe,t))){var i=t;(i.f&512)!==0&&(i.f^=512),i.v!==le&&On(i),i.ac!==null&&yt(()=>{i.ac.abort(gr),i.ac=null,ie(i,2048)}),Jl(i),cn(i,0)}}function cn(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Eu(e,r[n])}function sr(e){var t=e.f;if((t&16384)===0){ie(e,1024);var r=k;if(k=e,b){var n=gt;Ri(e.component_function);var o=or;Cn(e.dev_stack??or)}try{(t&16777232)!==0?wf(e):ko(e),fa(e);var i=Di(e);if(e.teardown=typeof i=="function"?i:null,e.wv=Af,b&&qt&&(e.f&2048)!==0&&e.deps!==null)for(var a of e.deps)a.set_during_effect&&(a.wv=Pn(),a.set_during_effect=!1)}finally{k=r,b&&(Ri(n),Cn(o))}}}async function Gr(){if(ke)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),qr()}function s(e){var t=e.f,r=(t&2)!==0;if(Tf?.add(e),C!==null&&!rt){var n=k!==null&&(k.f&16384)!==0;if(!n&&(Ft===null||!Ft.has(e))){var o=C.deps;if((C.f&2097152)!==0)e.rv<vn&&(e.rv=vn,Fe===null&&o!==null&&o[tt]===e?tt++:Fe===null?Fe=[e]:Fe.push(e));else{C.deps??(C.deps=[]),vr.call(C.deps,e)||C.deps.push(e);var i=e.reactions;i===null?e.reactions=[C]:vr.call(i,C)||i.push(C)}}}if(b){if(!rt&<&&O===null&&It===null&&!lt.warned&&(lt.effect.f&2097152)===0&&!lt.effect_deps.has(e)){lt.warned=!0,$l(e.label);var a=zt("traced at");a&&console.warn(a)}if(Eo.delete(e),qt&&!rt&&go!==null&&C!==null&&go.reaction===C){if(e.trace)e.trace();else if(a=zt("traced at"),a){var l=go.entries.get(e);l===void 0&&(l={traces:[]},go.entries.set(e,l));var f=l.traces[l.traces.length-1];a.stack!==f?.stack&&l.traces.push(a)}}}if(Dt&&Mt.has(e))return Mt.get(e);if(r){var u=e;if(Dt){var v=u.v;return((u.f&1024)===0&&u.reactions!==null||Nf(u))&&(v=To(u)),Mt.set(u,v),v}var h=(u.f&512)===0&&!rt&&C!==null&&(C.f&512)!==0,m=(u.f&32768)===0;zr(u)&&(h&&(u.f|=512),js(u)),h&&!m&&(Gs(u),Rf(u))}if(Pe?.has(e))return Pe.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function Rf(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:vr.call(t,e)||t.push(e),(r.f&2)!==0&&(r.f&512)===0&&(Gs(r),Rf(r))}}function Nf(e){if(e.v===le)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Mt.has(t)||(t.f&2)!==0&&Nf(t))return!0;return!1}function se(e){var t=rt;try{return rt=!0,e()}finally{rt=t}}function Yi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ke in e)Bi(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&Ke in r&&Bi(r)}}}function Bi(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Bi(e[n],t)}catch{}let r=rn(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=_i(r);for(let o in n){let i=n[o].get;if(i)try{i.call(e)}catch{}}}}}var ku=/\r/g;function Cf(e){e=e.replace(ku,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}var Au=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var qh=[...Au,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Su=["touchstart","touchmove"];function Of(e){return Su.includes(e)}var Ru=["$state","$state.raw","$derived","$derived.by"],zh=[...Ru,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function qi(e){return e?.replace(/\//g,"/\u200B")}var gn=Symbol("events"),pa=new Set,zi=new Set;function Df(e,t,r,n={}){function o(i){if(n.capture||Gi.call(t,i),!i.cancelBubble)return yt(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?(o.__removed=!1,$e(()=>{o.__removed||t.addEventListener(e,o,n)})):t.addEventListener(e,o,n),o}function cr(e,t,r,n,o){var i={capture:n,passive:o},a=Df(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Me(()=>{a.__removed=!0,t.removeEventListener(e,a,i)})}function ye(e,t,r){(t[gn]??(t[gn]={}))[e]=r}function ji(e){for(var t=0;t<e.length;t++)pa.add(e[t]);for(var r of zi)r(e)}var ua=null,da=!1;function Gi(e){var t=this,r=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;ua=e,da||(da=!0,setTimeout(()=>{da=!1,ua=null}));var a=0,l=ua===e&&e[gn];if(l){var f=o.indexOf(l);if(f!==-1&&(t===document||t===window)){e[gn]=t;return}var u=o.indexOf(t);if(u===-1)return;f<=u&&(a=f)}if(i=o[a]||e.target,i!==t){Ie(e,"currentTarget",{configurable:!0,get(){return i||r}});var v=C,h=k;Se(null),Re(null);try{for(var m,_=[];i!==null&&i!==t;){try{var y=i[gn]?.[n];y!=null&&(!i.disabled||e.target===i)&&y.call(i,e)}catch(g){m?_.push(g):m=g}if(e.cancelBubble)break;a++,i=a<o.length?o[a]:null}if(m){for(let g of _)queueMicrotask(()=>{throw g});throw m}}finally{e[gn]=t,delete e.currentTarget,Se(v),Re(h)}}}var Cu=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Lf(e){return Cu?.createHTML(e)??e}function _a(e){var t=Wt("template");return t.innerHTML=Lf(e.replaceAll("<!>","<!---->")),t.content}function Je(e,t){var r=k;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Q(e,t){var r=(t&1)!==0,n=(t&2)!==0,o,i=!e.startsWith("<!>");return()=>{if(T)return Je(M,null),M;o===void 0&&(o=_a(i?e:"<!>"+e),r||(o=ve(o)));var a=n||Oo?document.importNode(o,!0):o.cloneNode(!0);if(r){var l=ve(a),f=a.lastChild;Je(l,f)}else Je(a,a);return a}}function Lo(e=""){if(!T){var t=be(e+"");return Je(t,t),t}var r=M;return r.nodeType!==nn?(r.before(r=be()),ne(r)):Io(r),Je(r,r),r}function Ar(){if(T)return Je(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=be();return e.append(t,r),Je(t,r),e}function D(e,t){if(T){var r=k;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=M),De();return}e!==null&&e.before(t)}function Mf(e){let t=0,r=Xe(0),n;return b&&Ze(r,"createSubscriber version"),()=>{Br()&&(s(r),He(()=>(t===0&&(n=se(()=>e(()=>_n(r)))),t+=1,()=>{$e(()=>{t-=1,t===0&&(n?.(),n=void 0,_n(r))})})))}}var Lu=589824;function ya(e,t,r,n){new ma(e,t,r,n)}var Tt,Fo,Pt,bn,Qe,kt,nt,At,ur,yn,Zr,Xn,Po,Ho,dr,Zi,G,Pf,Hf,ha,Kr,Uf,va,Mo,Ki,ga,ba,ma=class{constructor(t,r,n,o){F(this,G);re(this,"parent");re(this,"is_pending",!1);re(this,"transform_error");F(this,Tt);F(this,Fo,T?M:null);F(this,Pt);F(this,bn);F(this,Qe);F(this,kt,null);F(this,nt,null);F(this,At,null);F(this,ur,null);F(this,yn,0);F(this,Zr,0);F(this,Xn,!1);F(this,Po,new Set);F(this,Ho,new Set);F(this,dr,null);F(this,Zi,Mf(()=>(I(this,dr,Xe(c(this,yn))),b&&Ze(c(this,dr),"$effect.pending()"),()=>{I(this,dr,null)})));I(this,Tt,t),I(this,Pt,r),I(this,bn,i=>{var a=k;a.b=this,a.f|=128,n(i)}),this.parent=k.b,this.transform_error=o??this.parent?.transform_error??(i=>i),I(this,Qe,dt(()=>{if(T){let i=on(c(this,Fo));De();let a=i==="[!";if(i.startsWith("[?")){let f=JSON.parse(i.slice("[?".length));L(this,G,Hf).call(this,f)}else a?L(this,G,Uf).call(this):L(this,G,Pf).call(this)}else L(this,G,va).call(this)},Lu)),T&&I(this,Tt,M)}defer_effect(t){Ni(t,c(this,Po),c(this,Ho))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Pt).pending}update_pending_count(t,r){L(this,G,ga).call(this,t,r),I(this,yn,c(this,yn)+t),!(!c(this,dr)||c(this,Xn))&&(I(this,Xn,!0),$e(()=>{I(this,Xn,!1),c(this,dr)&&Gt(c(this,dr),c(this,yn))}))}get_effect_pending(){return c(this,Zi).call(this),s(c(this,dr))}error(t){if(t===ot||!c(this,Pt).onerror&&!c(this,Pt).failed)throw t;O?.is_fork?(c(this,kt)&&O.skip_effect(c(this,kt)),c(this,nt)&&O.skip_effect(c(this,nt)),c(this,At)&&O.skip_effect(c(this,At)),O.oncommit(()=>{L(this,G,Kr).call(this)||L(this,G,ba).call(this,t)})):L(this,G,ba).call(this,t)}};Tt=new WeakMap,Fo=new WeakMap,Pt=new WeakMap,bn=new WeakMap,Qe=new WeakMap,kt=new WeakMap,nt=new WeakMap,At=new WeakMap,ur=new WeakMap,yn=new WeakMap,Zr=new WeakMap,Xn=new WeakMap,Po=new WeakMap,Ho=new WeakMap,dr=new WeakMap,Zi=new WeakMap,G=new WeakSet,Pf=function(){try{I(this,kt,Ne(()=>c(this,bn).call(this,c(this,Tt))))}catch(t){this.error(t)}},Hf=function(t){let r=c(this,Pt).failed,{reset:n,invoke_onerror:o}=L(this,G,ha).call(this,t);$e(o),r&&I(this,At,Ne(()=>{r(c(this,Tt),()=>t,()=>n)}))},ha=function(t){var r=!1,n=!1;let o=()=>{if(!L(this,G,Kr).call(this)){if(r){Sl();return}r=!0,n&&ql(),c(this,At)!==null&&fr(c(this,At),()=>{I(this,At,null)}),L(this,G,Ki).call(this,()=>{L(this,G,va).call(this)})}};return{reset:o,invoke_onerror:()=>{if(!L(this,G,Kr).call(this))try{n=!0,c(this,Pt).onerror?.(t,o),n=!1}catch(a){at(a,c(this,Qe)&&c(this,Qe).parent)}}}},Kr=function(){return(c(this,Qe).f&33570816)!==0},Uf=function(){let t=c(this,Pt).pending;t&&(this.is_pending=!0,I(this,nt,Ne(()=>t(c(this,Tt)))),$e(()=>{if(!L(this,G,Kr).call(this)){var r=I(this,ur,document.createDocumentFragment()),n=be(),o=!1;if(r.append(n),I(this,kt,L(this,G,Ki).call(this,()=>{try{return Ne(()=>c(this,bn).call(this,n))}catch(i){try{this.error(i),o=!0}catch(a){at(a,c(this,Qe).parent)}return null}})),c(this,kt)===null){I(this,ur,null),o&&L(this,G,Mo).call(this,O);return}c(this,Zr)===0&&(c(this,Tt).before(r),I(this,ur,null),fr(c(this,nt),()=>{I(this,nt,null)}),L(this,G,Mo).call(this,O))}}))},va=function(){try{if(this.is_pending=this.has_pending_snippet(),I(this,Zr,0),I(this,yn,0),I(this,kt,Ne(()=>{c(this,bn).call(this,c(this,Tt))})),c(this,Zr)>0){var t=I(this,ur,document.createDocumentFragment());Wn(c(this,kt),t);let r=c(this,Pt).pending;I(this,nt,Ne(()=>r(c(this,Tt))))}else L(this,G,Mo).call(this,O)}catch(r){this.error(r)}},Mo=function(t){this.is_pending=!1,t.transfer_effects(c(this,Po),c(this,Ho))},Ki=function(t){var r=k,n=C,o=Y;Re(c(this,Qe)),Se(c(this,Qe)),br(c(this,Qe).ctx);try{return $t.ensure(),t()}finally{Re(r),Se(n),br(o)}},ga=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&L(n=this.parent,G,ga).call(n,t,r);return}I(this,Zr,c(this,Zr)+t),c(this,Zr)===0&&(L(this,G,Mo).call(this,r),c(this,nt)&&fr(c(this,nt),()=>{I(this,nt,null)}),c(this,ur)&&(c(this,Tt).before(c(this,ur)),I(this,ur,null)))},ba=function(t){c(this,kt)&&(ge(c(this,kt)),I(this,kt,null)),c(this,nt)&&(ge(c(this,nt)),I(this,nt,null)),c(this,At)&&(ge(c(this,At)),I(this,At,null)),T&&(ne(c(this,Fo)),vo(),ne(nr()));let r=c(this,Pt).failed,n=o=>{if(L(this,G,Kr).call(this))return;let{reset:i,invoke_onerror:a}=L(this,G,ha).call(this,o);a(),r&&!L(this,G,Kr).call(this)&&I(this,At,L(this,G,Ki).call(this,()=>{try{return Ne(()=>{var l=k;l.b=this,l.f|=128,r(c(this,Tt),()=>o,()=>i)})}catch(l){return at(l,c(this,Qe).parent),null}}))};$e(()=>{if(!L(this,G,Kr).call(this)){var o;try{o=this.transform_error(t)}catch(i){at(i,c(this,Qe)&&c(this,Qe).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(n,i=>at(i,c(this,Qe)&&c(this,Qe).parent)):n(o)}})};var $a=!0;function R(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[n=_o]??(e[n]=e.nodeValue))&&(e[_o]=r,e.nodeValue=`${r}`)}function Xi(e,t){return Vf(e,t)}function Uo(e,t){Ui(),t.intro=t.intro??!1;let r=t.target,n=T,o=M;try{for(var i=ve(r);i&&(i.nodeType!==vt||i.data!=="[");)i=Le(i);if(!i)throw ot;Te(!0),ne(i);let a=Vf(e,{...t,anchor:i});return Te(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
80
|
-
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==
|
|
81
|
-
\r\f\xA0\v\uFEFF`];function Yf(e,t=!1){var r=t?" !important;":";",n="";for(var o of Object.keys(e)){var i=e[o];i!=null&&i!==""&&(n+=" "+o+": "+i+r)}return n}function ka(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function qf(e,t){if(t){var r="",n,o;if(Array.isArray(t)?(n=t[0],o=t[1]):n=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var i=!1,a=0,l=!1,f=[];n&&f.push(...Object.keys(n).map(ka)),o&&f.push(...Object.keys(o).map(ka));var u=0,v=-1;let g=e.length;for(var h=0;h<g;h++){var m=e[h];if(l?m==="/"&&e[h-1]==="*"&&(l=!1):i?i===m&&(i=!1):m==="/"&&e[h+1]==="*"?l=!0:m==='"'||m==="'"?i=m:m==="("?a++:m===")"&&a--,!l&&i===!1&&a===0){if(m===":"&&v===-1)v=h;else if(m===";"||h===g-1){if(v!==-1){var _=ka(e.substring(u,v).trim());if(!f.includes(_)){m!==";"&&h++;var y=e.substring(u,h).trim();r+=" "+y+";"}}u=h+1,v=-1}}}}return n&&(r+=Yf(n)),o&&(r+=Yf(o,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Aa(e,t={},r,n){for(var o in r){var i=r[o];t[o]!==i&&(r[o]==null?e.style.removeProperty(o):e.style.setProperty(o,i,n))}}function xn(e,t,r,n){var o=e[po];if(T||o!==t){var i=qf(t,n);(!T||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e[po]=t}else n&&(Array.isArray(n)?(Aa(e,r?.[0],n[0]),Aa(e,r?.[1],n[1],"important")):Aa(e,r,n));return n}function Ra(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Ju(e,t){var r=e.__defaultValue,n=e.multiple,o=n?r??[]:null;if(!(n&&!Yt(o))){var i=e.selectedIndex,a=t&&n?new Set(e.selectedOptions):null;for(var l of e.options){var f=Sa(l);Ra(l,n?o.includes(f):Hi(f,r))}if(t)if(a!==null)for(l of e.options){var u=a.has(l);l.selected!==u&&(l.selected=u)}else e.selectedIndex!==i&&(e.selectedIndex=i)}}function Jr(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Yt(t))return Al();for(var n of e.options)n.selected=t.includes(Sa(n));return}for(n of e.options){var o=Sa(n);if(Hi(o,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function En(e){var t=new MutationObserver(r=>{r.every(Qu)||("__defaultValue"in e&&Ju(e,!1),"__value"in e&&Jr(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Me(()=>{t.disconnect()})}function Sa(e){return"__value"in e?e.__value:e.value}function Qu(e){if(e.target.closest("selectedcontent")!==null)return!0;if(e.type==="childList"){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(r=>r.nodeName==="SELECTEDCONTENT")}return!1}var od=Symbol("is custom element"),id=Symbol("is html"),sd=Ms?"link":"LINK";function Jn(e){if(T){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;ee(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var o=e.checked;ee(e,"checked",null),e.checked=o}}};e[Hr]=r,$e(r),Ci()}}function es(e,t){var r=Kf(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function ee(e,t,r,n){var o=Kf(e);if(T&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===sd)){n||ld(e,t,r??"");return}o[t]!==(o[t]=r)&&(t==="loading"&&(e[yl]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ad(e).has(t)?e[t]=r:e.setAttribute(t,r))}function Kf(e){var t;return e[t=yi]??(e[t]={[od]:e.nodeName.includes("-"),[id]:e.namespaceURI===$i})}var zf=new Map;function ad(e){var t=e.getAttribute("is")||e.nodeName,r=zf.get(t);if(r)return r;zf.set(t,r=new Set);for(var n,o=e,i=Element.prototype;i!==o;){n=_i(o);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);o=rn(o)}return r}function ld(e,t,r){b&&(t==="srcset"&&fd(e,r)||Na(e.getAttribute(t)??"",r)||El(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function Na(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function jf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function fd(e,t){var r=jf(e.srcset),n=jf(t);return n.length===r.length&&n.every(([o,i],a)=>i===r[a][1]&&(Na(r[a][0],o)||Na(o,r[a][0])))}function rs(e,t,r=t){var n=new WeakSet;Vs(e,"input",async o=>{b&&e.type==="checkbox"&&Ps();var i=o?e.defaultValue:e.value;if(i=Ca(e)?Oa(i):i,r(i),O!==null&&n.add(O),await Gr(),i!==(i=t())){var a=e.selectionStart,l=e.selectionEnd,f=e.value.length;if(e.value=i??"",l!==null){var u=e.value.length;a===l&&l===f&&u>f?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=a,e.selectionEnd=Math.min(l,u))}}}),(T&&e.defaultValue!==e.value||se(t)==null&&e.value)&&(r(Ca(e)?Oa(e.value):e.value),O!==null&&n.add(O)),He(()=>{b&&e.type==="checkbox"&&Ps();var o=t();if(e===document.activeElement){var i=ke?It:O;if(n.has(i))return}Ca(e)&&o===Oa(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function Ca(e){var t=e.type;return t==="number"||t==="range"}function Oa(e){return e===""?null:+e}function Ia(e,t){return e===t||e?.[Ke]===t}function Tn(e=$o(),t,r,n){var o=Y.r,i=k;return Et(()=>{var a,l;return He(()=>{a=l,l=n?.()||[],se(()=>{Ia(r(...l),e)||(t(e,...l),a&&Ia(r(...a),e)&&t(null,...a))})}),()=>{let f=i;for(;f!==o&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;let u=()=>{l&&Ia(r(...l),e)&&t(null,...l)},v=f.teardown;f.teardown=()=>{u(),v?.()}}}),e}function Zf(e){return new La(e)}var Rr,Ht,La=class{constructor(t){F(this,Rr);F(this,Ht);var r=new Map,n=(i,a)=>{var l=pn(a,!1,!1);return r.set(i,l),l};let o=new Proxy({...t.props||{},$$events:{}},{get(i,a){return s(r.get(a)??n(a,Reflect.get(i,a)))},has(i,a){return a===gi?!0:(s(r.get(a)??n(a,Reflect.get(i,a))),Reflect.has(i,a))},set(i,a,l){return E(r.get(a)??n(a,l),l),Reflect.set(i,a,l)}});I(this,Ht,(t.hydrate?Uo:Xi)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),!ke&&(!t?.props?.$$host||t.sync===!1)&&qr(),I(this,Rr,o.$$events);for(let i of Object.keys(c(this,Ht)))i==="$set"||i==="$destroy"||i==="$on"||Ie(this,i,{get(){return c(this,Ht)[i]},set(a){c(this,Ht)[i]=a},enumerable:!0});c(this,Ht).$set=i=>{Object.assign(o,i)},c(this,Ht).$destroy=()=>{Vo(c(this,Ht))}}$set(t){c(this,Ht).$set(t)}$on(t,r){c(this,Rr)[t]=c(this,Rr)[t]||[];let n=(...o)=>r.call(this,...o);return c(this,Rr)[t].push(n),()=>{c(this,Rr)[t]=c(this,Rr)[t].filter(o=>o!==n)}}$destroy(){c(this,Ht).$destroy()}};Rr=new WeakMap,Ht=new WeakMap;var bd;typeof HTMLElement=="function"&&(bd=class extends HTMLElement{constructor(t,r,n){super();re(this,"$$ctor");re(this,"$$s");re(this,"$$c");re(this,"$$cn",!1);re(this,"$$d",{});re(this,"$$r",!1);re(this,"$$p_d",{});re(this,"$$l",{});re(this,"$$l_u",new Map);re(this,"$$me");re(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=r,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let o=this.$$c.$on(t,r);this.$$l_u.set(r,o)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return i=>{let a=Wt("slot");o!=="default"&&(a.name=o),D(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=yd(this);for(let o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),r.default=!0):r[o]=t(o));for(let o of this.attributes){let i=this.$$g_p(o.name);i in this.$$d||(this.$$d[i]=Ma(i,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=Zf({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=la(()=>{He(()=>{this.$$r=!0;for(let o of Cs(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let i=Ma(o,this.$$d[o],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,i)}this.$$r=!1})});for(let o in this.$$l)for(let i of this.$$l[o]){let a=this.$$c.$on(o,i);this.$$l_u.set(i,a)}this.$$l={}}}attributeChangedCallback(t,r,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ma(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Cs(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Ma(e,t,r,n){let o=r[e]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function yd(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}if(b){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;Ul(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function Wf(e){Y===null&&ki("onMount"),Vr&&Y.l!==null?wd(Y).m.push(e):Xt(()=>{let t=se(e);if(typeof t=="function")return t})}function wd(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var Xf;typeof window<"u"&&((Xf=window.__svelte??(window.__svelte={})).v??(Xf.v=new Set)).add("5");var Fa=["directory","file","link"];function Ed(e){if(typeof e!="object"||e===null)return!1;let t=e;return["name","size","modified"].includes(String(t.field))&&["asc","desc"].includes(String(t.direction))&&["natural","locale","unicode"].includes(String(t.nameMode))&&typeof t.directoriesFirst=="boolean"}function Jf(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(e,1e9)):0}function ns(e,t,r,n,o=[],i=null){let a=new URL(e).searchParams,l={...n,query:(a.get("dw.q")??"").slice(0,4096),selected:null,windowY:0,listTop:0};if(t==="ledger"){let f=a.get("dw.sort")?.split(":");if(f?.length===4){let u={field:f[0],direction:f[1],nameMode:f[2],directoriesFirst:f[3]==="folders"};["folders","mixed"].includes(f[3])&&Ed(u)&&(l.sort=u)}if(a.has("dw.types")){let u=a.get("dw.types").split(",").filter(Boolean);u.every(v=>Fa.includes(v))&&(l.types=[...new Set(u)])}}else{let f=a.get("dw.category");f!==null&&o.includes(f)&&(l.category=f)}if(typeof i=="object"&&i!==null&&"dirwell"in i){let f=i.dirwell;if(typeof f=="object"&&f!==null&&"version"in f&&f.version===1&&"theme"in f&&f.theme===t&&"path"in f&&f.path===r&&"view"in f&&typeof f.view=="object"&&f.view!==null){let u=f.view;l.selected=typeof u.selected=="string"&&u.selected.length<=4096?u.selected:null,l.windowY=Jf(u.windowY),l.listTop=Jf(u.listTop)}}return l}function Td(e,t,r,n){let o=new URL(e);for(let i of["dw.q","dw.sort","dw.types","dw.category"])o.searchParams.delete(i);if(r.query&&o.searchParams.set("dw.q",r.query.slice(0,4096)),t==="ledger"){if(r.sort&&["field","direction","nameMode","directoriesFirst"].some(i=>r.sort[i]!==n.sort?.[i])){let i=r.sort;o.searchParams.set("dw.sort",`${i.field}:${i.direction}:${i.nameMode}:${i.directoriesFirst?"folders":"mixed"}`)}r.types&&Fa.some(i=>r.types.includes(i)!==(n.types??Fa).includes(i))&&o.searchParams.set("dw.types",r.types.join(","))}else r.category&&r.category!==n.category&&o.searchParams.set("dw.category",r.category);return o.href}function Qf(e){let t=location.href,r=history.state,n=(o,i,a)=>({...typeof history.state=="object"&&history.state!==null?history.state:{},dataHref:o,dirwell:{version:1,theme:e,path:i,...a===void 0?{}:{view:{query:a.query,...a.sort===void 0?{}:{sort:{...a.sort}},...a.types===void 0?{}:{types:[...a.types]},category:a.category??null,selected:a.selected??null,windowY:a.windowY??0,listTop:a.listTop??0}}}});return{save(o,i,a,l){if(location.href!==t)return;let f=Td(t,e,a,l),u=n(o,i,a);try{history.replaceState(u,"",f),t=f,r=u}catch{}},commit(o,i,a,l){let f=n(o,i);l?history.pushState(f,"",a):history.replaceState(f,"",a),t=a,r=f},rollback(){if(location.href!==t)try{history.replaceState(r,"",t)}catch{}}}}var kd={directory:'<path d="M3 7V5h6l2 3h10v12H3Z"/><path d="M3 10h18"/>',file:'<path d="M5 3h9l5 5v13H5ZM14 3v5h5M8 12h8M8 16h6"/>',link:'<path d="m9 15 6-6M8 10l-3 3a4 4 0 0 0 6 6l3-3M10 8l3-3a4 4 0 0 1 6 6l-3 3"/>'};function ec(e){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${kd[e]}</svg>`}function Pa(e){let t=new Set,r=(o,i)=>{if(i>32)throw new TypeError("Presentation data is too deeply nested");if(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number"&&Number.isFinite(o))return o;if(typeof o!="object"||o===null||t.has(o))throw new TypeError("Presentation data must be finite, acyclic JSON");t.add(o);try{if(Array.isArray(o))return o.map(a=>r(a,i+1));if(Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null)throw new TypeError("Presentation data must use plain objects");return Object.fromEntries(Object.entries(o).map(([a,l])=>[a,r(l,i+1)]))}finally{t.delete(o)}};if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Presentation data must be an object");let n=r(e,0);if(typeof n!="object"||n===null||Array.isArray(n))throw new TypeError("Presentation data must be an object");return n}var V=class extends Error{constructor(){super(...arguments);re(this,"name","ListingDataError")}},jo=class extends V{},Qn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),os=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>=0,tc=e=>typeof e=="string"&&["directory","file","symlink","other"].includes(e);function Nr(e,t){if(typeof e!="string")throw new V(`Invalid ${t}`);return e}function Ha(e,t){if(typeof e!="boolean")throw new V(`Invalid ${t}`);return e}function Ad(e,t){if(e===null)return null;let r=new URL(Nr(e,"href"),t);if(!["http:","https:"].includes(r.protocol))throw new V("Unsupported listing link protocol");return r.href}function rc(e,t){if(!Qn(e)||!tc(e.kind)||typeof e.size!="number"||!Number.isFinite(e.size)||e.size<0)throw new V("Invalid listing entry");let r=null;if(e.link!==null){if(!Qn(e.link))throw new V("Invalid link metadata");let n=e.link.targetKind;if(n!==null&&(!tc(n)||n==="symlink"))throw new V("Invalid target kind");let o=e.link.targetSize;if(o!==null&&(typeof o!="number"||!Number.isFinite(o)||o<0))throw new V("Invalid target size");r={target:Nr(e.link.target,"target"),targetKind:n,targetSize:o,unavailable:Ha(e.link.unavailable,"unavailable"),cycle:Ha(e.link.cycle,"cycle")}}return{...e.data===void 0?{}:{data:Pa(e.data)},...e.presentation===void 0?{}:{presentation:Pa(e.presentation)},id:Nr(e.id,"id"),name:Nr(e.name,"name"),kind:e.kind,href:Ad(e.href,t),exitsExplorer:Ha(e.exitsExplorer,"exitsExplorer"),size:e.size,modifiedAt:Nr(e.modifiedAt,"modifiedAt"),link:r}}function Sd(e){if(!Qn(e)||e.version!==1||!os(e.total)||!Array.isArray(e.blocks)||!Qn(e.sort))throw new V("Invalid listing manifest");let t=e.sort;if(typeof t.field!="string"||!["name","size","modified"].includes(t.field)||typeof t.direction!="string"||!["asc","desc"].includes(t.direction)||typeof t.nameMode!="string"||!["locale","natural","unicode"].includes(t.nameMode)||typeof t.directoriesFirst!="boolean")throw new V("Invalid listing order");let r=t.field==="size"?"size":t.field==="modified"?"modified":"name",n=t.direction==="desc"?"desc":"asc",o=t.nameMode==="unicode"?"unicode":t.nameMode==="locale"?"locale":"natural",i=e.blocks.map(a=>{if(!Qn(a)||!os(a.offset)||!os(a.count))throw new V("Invalid block descriptor");return{href:Nr(a.href,"block href"),offset:a.offset,count:a.count}});if(i.length===0)throw new V("Missing blocks");return{version:1,revision:Nr(e.revision,"revision"),directory:Nr(e.directory,"directory"),hrefBase:Nr(e.hrefBase,"href base"),total:e.total,sort:{field:r,direction:n,nameMode:o,directoriesFirst:t.directoriesFirst},blocks:i}}async function Go(e,t={}){let r=t.fetch??fetch,n=t.maxEntries??1e5;if(!os(n))throw new V("Invalid entry limit");let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new V("Listing loading requires HTTP(S); use native file navigation");for(let i=0;i<2;i++)try{let a={...t.signal===void 0?{}:{signal:t.signal},cache:i===0?t.cache??"default":"reload"},l=await r(o,a);if(!l.ok)throw new V(`Manifest request failed: ${l.status}`);let f=Sd(await l.json());if(f.total>n)throw new V("Listing exceeds the configured entry limit");let u=new URL(f.hrefBase,o);if(!["http:","https:"].includes(u.protocol))throw new V("Unsupported href base protocol");let v=[],h=new Set;for(let m of f.blocks){if(m.offset!==v.length||m.count+v.length>f.total)throw new V("Invalid block coverage");let _=new URL(m.href,o);if(_.origin!==o.origin||!["http:","https:"].includes(_.protocol))throw new V("Block leaves the manifest origin");let y=await r(_,a);if(y.status===404||y.status===410)throw new jo("Block no longer available");if(!y.ok)throw new V(`Block request failed: ${y.status}`);let g=await y.json();if(!Qn(g)||g.version!==1||g.revision!==f.revision)throw new jo("Listing revision changed");if(g.offset!==m.offset||g.total!==f.total||!Array.isArray(g.entries)||g.entries.length!==m.count)throw new V("Invalid block envelope");for(let $ of g.entries){let A=rc($,u);if(h.has(A.id))throw new V("Duplicate entry ID");h.add(A.id),v.push(A)}}if(v.length!==f.total)throw new V("Incomplete listing");return{manifest:f,entries:v}}catch(a){if(t.signal?.aborted||!(a instanceof jo)||i===1)throw a}throw new V("Listing unavailable")}function nc(e,t,r=1e5){if(!Array.isArray(e)||e.length>r)throw new V("Invalid page slice");let n=new URL(t),o=new Set,i=e.map(a=>rc(a,n));for(let a of i){if(o.has(a.id))throw new V("Duplicate entry ID");o.add(a.id)}return i}var Rd={other:"other",crosswaveKeyboardHelp:"Arrow keys navigate \xB7 Enter confirms \xB7 Backspace returns",brokenLink:"broken link",unavailableLink:"unavailable link",cycleLink:"cycle link",azure:"azure",violet:"violet",amber:"amber",rose:"rose",jade:"jade",graphite:"graphite",allFiles:"All files",categoryFolders:"Folders",categoryPhotos:"Photos",categoryMusic:"Music",categoryVideos:"Videos",categoryDocuments:"Documents",categoryOther:"Other",indexOf:"Index of {path}",home:"Home",breadcrumb:"Breadcrumb",archive:"File archive",searchDirectory:"Search this directory",searchFiles:"Search files",search:"Search",types:"Types",directory:"directory",file:"file",link:"link",folder:"Folder",sort:"Sort",name:"Name",size:"Size",modified:"Modified",names:"Names",natural:"Natural",locale:"Locale",unicode:"Unicode",order:"Order",ascending:"Ascending",descending:"Descending",directoriesFirst:"Folders first",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",searchArchive:"Search archive",archiveSearchInput:"Search archive files",entries:"{count} entries",pageEntries:"{total} entries \xB7 {count} on this page",loading:"Loading\u2026",noMatches:"No matching entries.",empty:"This directory is empty.",pagination:"Pagination",previous:"Previous",next:"Next",page:"Page {page} of {pages}",keyboardHelp:"Arrow keys select files \xB7 Home / End jump \xB7 / searches \xB7 Backspace opens parent",modifiedTime:"Modified time",close:"Close",unknown:"Unknown",unavailable:"Target unavailable",beginArchive:"Enter a search to begin.",searchingArchive:"Searching archive\u2026",archiveResults:"{count} results",truncatedResults:"Showing {shown} of {count} results",archiveError:"Could not load archive search. Try again.",listingError:"Could not load complete directory data. Native page links remain available.",folderError:"Could not open the folder. Its native link remains available.",updatesError:"Live updates disconnected. Refresh to retry.",retry:"Retry",openNative:"Open folder directly",categories:"File categories",items:"{count} items",filesIn:"Files in {path}",controller:"Controller \xB7 Confirm / Back",color:"Color",pauseMotion:"Pause motion",resumeMotion:"Resume motion",copyLink:"Copy link",copyPath:"Copy path",download:"Download",copied:"Copied.",copyError:"Could not copy. Use the native link or select the path.",repository:"Repository",author:"by",target:"Target",newTab:"opens in a new tab"};function eo(e={}){let t=e.language===void 0?"en":e.language,r=e.locale===void 0?"en-US":e.locale,n=e.timeZone===void 0?"UTC":e.timeZone;for(let[h,m]of Object.entries({language:t,locale:r,timeZone:n}))if(typeof m!="string"||!m)throw new TypeError(`${h} must be a non-empty string`);new Intl.DateTimeFormat(r,{timeZone:n});let o=e.direction??"ltr";if(o!=="ltr"&&o!=="rtl")throw new TypeError("direction must be ltr or rtl");let i={...Rd};if(e.labels!==void 0){if(typeof e.labels!="object"||e.labels===null||Array.isArray(e.labels))throw new TypeError("labels must be an object");for(let[h,m]of Object.entries(e.labels)){if(!Object.hasOwn(i,h)||typeof m!="string")throw new TypeError(`Unsupported label or value: ${h}`);Object.assign(i,{[h]:m})}}let a=e.brand??{};if(typeof a!="object"||a===null||Array.isArray(a))throw new TypeError("brand must be an object");for(let[h,m]of Object.entries(a)){if(!["name","logoUrl","logoAlt","footerText","footerUrl","faviconUrl"].includes(h)||typeof m!="string")throw new TypeError(`Unsupported brand option or value: ${h}`);if(h.endsWith("Url")&&!/^https?:\/\//i.test(m)&&!(m.startsWith("/")&&!m.startsWith("//")))throw new TypeError(`brand.${h} must be an HTTP(S) or root-relative URL`)}let l=e.columns??["name","size","modified"];if(!Array.isArray(l)||!l.includes("name"))throw new TypeError("columns must contain name and unique supported columns");let f=new Set;for(let h of l){let m;if(typeof h=="string"){if(!["name","size","modified"].includes(h))throw new TypeError("Unsupported column");m=h}else{if(typeof h!="object"||h===null||Object.keys(h).some(_=>!["dataKey","label"].includes(_))||typeof h.dataKey!="string"||!h.dataKey||typeof h.label!="string"||!h.label)throw new TypeError("Data columns require dataKey and label");m="data:"+h.dataKey}if(f.has(m))throw new TypeError("columns must contain unique supported columns");f.add(m)}let u=e.actions??[];if(!Array.isArray(u)||new Set(u).size!==u.length||u.some(h=>!["copy-link","copy-path","download"].includes(h)))throw new TypeError("actions must contain unique supported actions");let v=e.cssVariables??{};if(typeof v!="object"||v===null||Array.isArray(v))throw new TypeError("cssVariables must be an object");for(let[h,m]of Object.entries(v))if(!/^--[a-zA-Z][a-zA-Z0-9_-]*$/.test(h)||typeof m!="string"||/[{};<>]/.test(m))throw new TypeError(`Invalid CSS variable: ${h}`);return{language:t,dateOptions:{...e.locale===void 0?{}:{locale:e.locale},...e.timeZone===void 0?{}:{timeZone:e.timeZone}},direction:o,locale:r,timeZone:n,labels:i,brand:{...a},columns:l.map(h=>typeof h=="string"?h:{...h}),actions:[...u],cssVariables:{...v}}}var sS=eo();function Zo(e,t,r={}){return e.labels[t].replace(/\{([a-zA-Z]+)\}/g,(n,o)=>Object.hasOwn(r,o)?String(r[o]):n)}var Ko=new Map;function Ua(e,t,r=!1){let n=new Date(e);if(Number.isNaN(n.getTime()))return t.labels.unknown;if(t.dateOptions.locale===void 0&&t.dateOptions.timeZone===void 0)return r?n.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"}):n.toISOString().slice(0,16).replace("T"," ")+" UTC";let o=t.dateOptions.locale,i=t.dateOptions.timeZone??(r?void 0:"UTC"),a=String(o)+"\0"+String(i),l=Ko.get(a);return l===void 0&&(l=new Intl.DateTimeFormat(o,{timeZone:i,dateStyle:"short",timeStyle:"short"}),Ko.size>=32&&Ko.delete(Ko.keys().next().value),Ko.set(a,l)),l.format(n)}async function oc(e,t){let r=e==="copy-link"&&t.href?new URL(t.href,document.baseURI).href:t.id;if(!navigator.clipboard?.writeText)throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(r)}function ic(e,t){return typeof e=="string"?t.labels[e]:e.label}function sc(e){return e==null?"":typeof e=="object"?JSON.stringify(e):String(e)}async function Va(e,t,r,n,o=!1,i=0){let a=new URL(e,document.baseURI);if(a.origin!==location.origin)throw new V("Folder leaves the theme origin");let l=await fetch(a,{signal:n,cache:o?"no-store":"default"});if(!l.ok)throw new V("Unavailable folder");let f=await l.json();if(typeof f!="object"||f===null||Array.isArray(f))throw new V("Invalid folder snapshot");let u=f;if(u.version!==1||u.theme!==r||typeof u.title!="string"||typeof u.path!="string"||!Number.isSafeInteger(u.total)||Number(u.total)<0||!Array.isArray(u.breadcrumbs))throw new V("Unsupported folder snapshot");if(u.metadataHead!==void 0&&typeof u.metadataHead!="string")throw new V("Invalid folder metadata");let v=u.sort;if(!v||typeof v!="object"||!["name","size","modified"].includes(String(v.field))||!["asc","desc"].includes(String(v.direction))||!["natural","locale","unicode"].includes(String(v.nameMode))||typeof v.directoriesFirst!="boolean")throw new V("Invalid folder order");if(r==="crosswave"){let g=u.categories,$=new Set;if(!Array.isArray(g)||g.length===0||g.some(A=>typeof A!="object"||A===null||typeof A.id!="string"||!A.id||$.has(A.id)||typeof A.label!="string"||typeof A.svg!="string"?!0:($.add(A.id),!1)))throw new V("Invalid folder categories")}let h=document.querySelector("base")?.href??t,m=g=>{if(g===null)return null;if(typeof g!="string")throw new V("Invalid folder link");let $=new URL(g,h);if(!["http:","https:"].includes($.protocol)||$.origin!==location.origin)throw new V("Unsupported folder link");return $.href},_=nc(u.entries,h).map(g=>({...g,...g.presentation?{presentation:{...g.presentation,folderDataHref:m(g.presentation.folderDataHref??null)}}:{}}));if(_.length>Number(u.total))throw new V("Invalid folder count");if(u.page!==null){let g=u.page;if(!g||typeof g!="object"||!Number.isSafeInteger(g.number)||Number(g.number)<1||!Number.isSafeInteger(g.count)||Number(g.count)<Number(g.number)||!Number.isSafeInteger(g.offset)||Number(g.offset)<0||Number(g.offset)>Number(u.total)||g.total!==u.total)throw new V("Invalid folder pagination");u.page={...g,href:m(g.href),previousHref:m(g.previousHref),nextHref:m(g.nextHref)}}u.ui!==void 0&&eo(u.ui);let y={...u,updatesHref:m(u.updatesHref??null),entries:_,dataHref:a.href,manifestHref:m(u.manifestHref),rootHref:m(u.rootHref),rootDataHref:m(u.rootDataHref),parentHref:m(u.parentHref),parentDataHref:m(u.parentDataHref),breadcrumbs:u.breadcrumbs.map(g=>{if(typeof g!="object"||g===null||!("name"in g)||!("href"in g)||!("dataHref"in g)||typeof g.name!="string")throw new V("Invalid breadcrumb");return{name:g.name,href:m(g.href),dataHref:m(g.dataHref)}})};if(y.manifestHref){let g=await Go(y.manifestHref,{signal:n,cache:o?"no-store":"default"});if(g.manifest.total!==u.total||u.listingRevision!==void 0&&g.manifest.revision!==u.listingRevision){if(i<2)return Va(e,t,r,n,!0,i+1);throw new V("Folder changed while refreshing")}y.entries=[...g.entries]}return y}var is=new WeakMap;function ac(e,t){if(!t||typeof document>"u")return e;let r=document.querySelector("[data-dirwell-theme]");if(!r)return e;let n=is.get(r)??e;return is.set(r,n),n}function lc(e,t){let r=document.querySelector("[data-dirwell-theme]");r&&is.has(r)&&is.set(r,e),document.title=typeof e.title=="string"?e.title:"";let n=document.createElement("template");n.innerHTML=typeof e.metadataHead=="string"?e.metadataHead:"",document.head.querySelectorAll("[data-dirwell-metadata]").forEach(a=>a.remove());let o=document.querySelector("base")?.href??t,i=a=>{try{let l=new URL(a,o);return["http:","https:"].includes(l.protocol)?l.href:null}catch{return null}};for(let a of n.content.children){if(!a.hasAttribute("data-dirwell-metadata"))continue;let l;if(a.tagName==="META"){let f=a.hasAttribute("property")?"property":"name",u=a.getAttribute(f)??"";if(!/^(?:description|og:[a-z_:]+|twitter:[a-z_:]+)$/i.test(u))continue;let v=a.getAttribute("content")??"";if(["og:image","og:url","twitter:image"].includes(u)){let h=i(v);if(h===null)continue;v=h}l=document.createElement("meta"),l.setAttribute(f,u),l.setAttribute("content",v)}else if(a.tagName==="LINK"&&a.getAttribute("rel")==="canonical"){let f=i(a.getAttribute("href")??"");if(f===null)continue;l=document.createElement("link"),l.setAttribute("rel","canonical"),l.setAttribute("href",f)}else continue;l.setAttribute("data-dirwell-metadata",""),document.head.append(l)}}var to=e=>e.kind==="directory"||e.link?.targetKind==="directory",Ba=e=>e.kind==="symlink"?"link":to(e)?"directory":"file";function Ya(e,t){let r=0,n=0,o=-2;for(let i of e.trim().toLocaleLowerCase()){let a=t.toLocaleLowerCase().indexOf(i,n);if(a<0)return null;a===o+1&&(r+=8),(a===0||/[\s/_.-]/.test(t[a-1]??""))&&(r+=5),r+=Math.max(0,4-a*.05),o=a,n=a+1}return r-t.length*.01}function cc(e,t,r,n){return e.map(o=>({entry:o,score:Ya(t,`${o.name} ${o.link?.target??""}`)})).filter(o=>r.includes(Ba(o.entry))&&o.score!==null).sort((o,i)=>{if(t.trim()&&o.score!==i.score)return(i.score??0)-(o.score??0);let a=o.entry,l=i.entry;if(n.directoriesFirst&&to(a)!==to(l))return to(a)?-1:1;let f=()=>n.nameMode==="unicode"?fc(a.name,l.name):a.name.localeCompare(l.name,void 0,{numeric:n.nameMode==="natural",sensitivity:"base"}),u=(n.field==="name"?f():n.field==="size"?(a.kind==="directory"?0:a.size)-(l.kind==="directory"?0:l.size):a.modifiedAt.localeCompare(l.modifiedAt))||f();return(n.direction==="asc"?u:-u)||fc(a.id,l.id)}).map(o=>o.entry)}function fc(e,t){let r=[...e],n=[...t];for(let o=0;o<Math.min(r.length,n.length);o++){let i=(r[o]?.codePointAt(0)??0)-(n[o]?.codePointAt(0)??0);if(i)return i}return r.length-n.length}function uc(e){let t=["B","KiB","MiB","GiB","TiB"],r=e,n=0;for(;r>=1024&&n<4;)r/=1024,n++;return`${r.toFixed(n===0||r>=100?0:1)} ${t[n]}`}var Nd=Q('<img width="40" height="40"/>'),Cd=Q("<!> <h1> </h1> <span> </span>",1),Od=Q("/ <a> </a>",1),Id=Q('<label><input type="checkbox"/> </label>'),ss=Q("<button> </button>"),qa=Q("<a> </a>"),Dd=Q("<span> </span>"),Ld=Q('<li class="entry"><a>../</a></li>'),dc=Q('<li aria-hidden="true"></li>'),Md=Q('<span class="file-icon" aria-hidden="true"></span> ',1),Fd=Q('<a class="name"><!></a>'),Pd=Q("<span><!></span>"),Hd=Q('<small class="target"> </small>'),Ud=Q('<span class="identity"><!><!></span>'),Vd=Q('<span class="kind"> </span>'),Bd=Q('<button class="timestamp-button"><time> </time></button>'),Yd=Q('<span class="entry-data"> </span>'),qd=Q('<a download=""> </a>'),zd=Q('<span data-dirwell-actions="" style="grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.5rem"><!> <!></span>'),jd=Q('<li class="entry" data-entry=""><!> <!></li>'),Gd=Q("<p> </p>"),Kd=Q('<a rel="prev"> </a>'),Zd=Q('<a rel="next"> </a>'),Wd=Q("<nav><!> <!></nav>"),Xd=Q('<p class="brand-footer"><!></p>'),Jd=Q('<p class="keyboard-help"> </p>'),Qd=Q("<dialog><h2> </h2> <p> </p> <p> </p> <button> </button></dialog>"),ep=Q("<li><!></li>"),tp=Q('<dialog><h2> </h2> <input type="search"/> <p role="status"> </p> <!> <ul></ul> <button> </button></dialog>'),rp=Q('<header class="page-header"><div class="wordmark"><!></div> <nav><a> </a><!></nav></header> <main data-explorer="" data-framework="svelte"><div class="toolbar"><label class="search-field"> <input type="search"/></label> <fieldset><legend> </legend><!></fieldset> <label> <select><option> </option><option> </option><option> </option></select></label> <label> <select><option> </option><option> </option><option> </option></select></label> <label> <select><option> </option><option> </option></select></label> <label><input type="checkbox"/> </label> <label> <select><option> </option><option> </option><option> </option></select></label> <!></div> <section class="listing-card"><div class="listing-summary"> <span data-visible-count=""> </span> <span role="status" aria-live="polite"> </span></div> <!> <!> <div class="entry-head"></div> <ul class="entry-list"><!> <!> <!> <!></ul> <!></section> <!> <!></main> <!> <!>',1);function za(e,t){bo(t,!0);let r=se(()=>ac(t.model,!1)),n=q(r),o=q(r.entries),i=q(""),a=q(Zt(["directory","file","link"])),l=q(r.sort),f=q("system"),u=q(null),v=q(!1),h=q(!1),m=q(""),_=q(null),y=q(null),g=q(!1),$=q(0),A=q(800),K=q(!1),pe=q(""),xe=q([]),pt=q(Zt(eo(r.ui).labels.beginArchive)),Ue=q(null),w=Ot(()=>eo(s(n).ui)),Qt=q(!1),_t=Ot(()=>Zo(s(w),s(mt)?"entries":"pageEntries",{count:"__COUNT__",total:s(n).total}).split("__COUNT__")),je=q(new Map),hr=Ot(()=>s(v)&&s(n).updatesHref?new URL(s(n).updatesHref,document.baseURI).href:null),mt=Ot(()=>s(o).length===s(n).total),ce=Ot(()=>cc(s(o),s(g)?"":s(i),s(a),s(l))),ro=Ot(()=>s(v)&&s(ce).length>500),Cr=Ot(()=>{let d=[0];for(let p of s(ce))d.push(d.at(-1)+(s(je).get(p.id)??76));return d}),no=Ot(()=>{if(!s(ro))return 0;let d=0,p=s(ce).length;for(;d<p;){let x=d+p>>1;s(Cr)[x+1]<=s($)?d=x+1:p=x}return Math.max(0,d-5)}),as=Ot(()=>{if(!s(ro))return s(ce).length;let d=0,p=s(ce).length;for(;d<p;){let x=d+p>>1;s(Cr)[x+1]<=s($)+s(A)?d=x+1:p=x}return Math.min(s(ce).length,Math.max(s(no)+35,d+5))});function pc(d,p){if(typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{let N=d.getBoundingClientRect().height;if(N>0&&s(je).get(p)!==N){let U=new Map(s(je));U.set(p,N),E(je,U)}});return x.observe(d),{destroy:()=>x.disconnect()}}let Or=q(void 0),Wo=q(void 0),ls=q(void 0),oo=q(void 0),io=q(void 0),Ir=0,so,fs,Xo=0,ja=null,Ga="",Ka=0,kn,An=null,ao=d=>({query:"",sort:d.sort,types:["directory","file","link"]});function cs(){kn&&kn.save(new URL(s(n).dataHref,document.baseURI).href,s(n).path,{query:s(i),types:s(a),sort:s(l),selected:s(u),windowY:window.scrollY,listTop:s($)},ao(s(n)))}function _c(){s(_)==="folder"&&An?Qr(...An,!0):Qr(s(n).dataHref,location.href,!1,!0)}Xt(()=>{if(!s(v)||s(h))return;let d={query:s(i),types:s(a),sort:s(l),selected:s(u),listTop:s($)},p=s(n).dataHref,x=s(n).path,N=ao(s(n)),U=requestAnimationFrame(()=>kn?.save(new URL(p,document.baseURI).href,x,{...d,windowY:window.scrollY},N));return()=>cancelAnimationFrame(U)});let Jo=to;function Za(d){return typeof location<"u"&&location.protocol==="file:"&&Jo(d)&&!d.exitsExplorer&&d.href?.endsWith("/")?d.href+"index.html":d.href}async function Wa(){if(s(mt)||!s(n).manifestHref||location.protocol==="file:")return;let d=so,p=Ir;E(h,!0);try{let x=await Go(new URL(s(n).manifestHref,document.baseURI).href,{signal:d.signal,cache:s(n).updatesHref?"no-store":"default"});p===Ir&&!d.signal.aborted&&E(o,x.entries)}catch{p===Ir&&!d.signal.aborted&&(E(m,s(w).labels.listingError,!0),E(_,"listing"))}finally{p===Ir&&E(h,!1)}}async function mc(d,p){cs();let x=p.presentation?.folderDataHref;p.exitsExplorer||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||typeof x!="string"||location.protocol==="file:"||(d?.preventDefault(),await Qr(x,new URL(p.href,document.baseURI).href,!0))}async function Qr(d,p,x,N=!1,U=null,te=!1){x&&cs();let j=++Ir;so?.abort();let Z=so=new AbortController;E(h,!0),E(m,""),E(_,null);try{let P=await Va(d,p,"ledger",Z.signal,N||te),X=P.entries;if(N&&P.manifestHref&&X.length!==P.total&&(X=(await Go(P.manifestHref,{signal:Z.signal,cache:"no-store"})).entries),j!==Ir||Z.signal.aborted)return;if(N||kn.commit(P.dataHref,P.path,p,x),E(n,P),E(o,X),An=null,!N){let _e=ns(p,"ledger",P.path,ao(P),[],U);E(i,_e.query,!0),E(a,_e.types,!0),E(l,_e.sort),E(u,_e.selected,!0),E($,_e.listTop,!0)}if(lc(P,p),await Wa(),!N){let _e=ns(p,"ledger",P.path,ao(P),[],U);await Gr(),s(u)&&!s(ce).some(Ut=>Ut.id===s(u))&&E(u,null),window.scrollTo({top:_e.windowY}),U&&s(u)&&s(Or)?.querySelector(`[data-id="${CSS.escape(s(u))}"] a`)?.focus({preventScroll:!0})}}catch{j===Ir&&!Z.signal.aborted&&(E(m,s(w).labels.folderError,!0),E(_,"folder"),An=[d,p,x,N,U],kn?.rollback())}finally{j===Ir&&E(h,!1)}}function us(d,p,x){typeof p!="string"||typeof x!="string"||d?.altKey||d?.ctrlKey||d?.metaKey||d?.shiftKey||d?.button>0||location.protocol==="file:"||(d?.preventDefault(),Qr(x,new URL(p,document.baseURI).href,!0))}async function hc(d){let p=Math.max(0,Math.min(s(ce).length-1,d)),x=s(ce)[p];x&&(E(u,x.id,!0),s(ro)&&(E($,Math.max(0,s(Cr)[p]-100),!0),s(Or)&&window.scrollTo({top:s(Or).getBoundingClientRect().top+window.scrollY+s($)})),await Gr(),s(Or)?.querySelector(`[data-order="${d}"] a`)?.focus({preventScroll:!0}))}function vc(d){if(d.isComposing||d.altKey||d.ctrlKey||d.metaKey)return;if(s(K)){d.key==="Escape"&&(d.preventDefault(),E(K,!1));return}if(s(y)){d.key==="Escape"&&E(y,null);return}if(d.target?.closest?.("[data-dirwell-actions]"))return;let p=/INPUT|TEXTAREA|SELECT/.test(d.target?.tagName??"");if(d.key==="/"&&!p){d.preventDefault(),s(Wo)?.focus();return}if(p){d.key==="Escape"&&(E(i,""),s(Wo)?.blur());return}if(d.key==="Backspace"&&s(n).parentHref){d.preventDefault(),location.protocol==="file:"||typeof s(n).parentDataHref!="string"?location.href=s(n).parentHref:Qr(s(n).parentDataHref,new URL(s(n).parentHref,document.baseURI).href,!0);return}let x=s(ce).findIndex(N=>N.id===s(u));["ArrowDown","ArrowUp","Home","End"].includes(d.key)&&(d.preventDefault(),hc(d.key==="Home"?0:d.key==="End"?s(ce).length-1:x+(d.key==="ArrowDown"?1:-1)))}function gc(d){E(f,d,!0);try{localStorage.setItem("dirwell-color-scheme",d)}catch{}}async function Xa(){let d=++Xo;fs?.abort();let p=fs=new AbortController;E(xe,[]),E(Qt,!1);let x=s(pe).trim();if(!x){E(pt,s(w).labels.beginArchive,!0);return}E(pt,s(w).labels.searchingArchive,!0);try{let N=new URL(s(n).searchIndexHref,document.baseURI),U=Ga===N.href&&Date.now()-Ka<6e4?ja:null;if(U===null){let j=await fetch(N,{signal:p.signal});if(!j.ok)throw new Error("Unavailable archive");let Z=await j.json();if(Z.version!==3||!Array.isArray(Z.shards)||!Number.isSafeInteger(Z.count)||Z.count>1e5)throw new Error("Unsupported archive");U=[];for(let P of Z.shards){if(typeof P!="string")throw new Error("Invalid shard");let X=new URL(P,N);if(X.origin!==N.origin)throw new Error("Unsafe shard");let _e=await fetch(X,{signal:p.signal});if(!_e.ok)throw new Error("Unavailable shard");let Ut=await _e.json();if(!Array.isArray(Ut.entries)||U.length+Ut.entries.length>1e5)throw new Error("Invalid archive");for(let de of Ut.entries){if(typeof de.name!="string"||typeof de.path!="string"||typeof de.exitsExplorer!="boolean")throw new Error("Invalid archive record");let me=de.href===null?null:new URL(de.href,N);if(me&&!["http:","https:"].includes(me.protocol))throw new Error("Unsupported archive link");U.push({name:de.name,path:de.path,href:me?.href??null,exitsExplorer:de.exitsExplorer})}}if(d!==Xo||p.signal.aborted)return;ja=U,Ga=N.href,Ka=Date.now()}let te=U.map(j=>({record:j,score:Ya(x,j.name+" "+j.path)})).filter(j=>j.score!==null).sort((j,Z)=>Z.score-j.score||j.record.path.localeCompare(Z.record.path));if(d!==Xo||p.signal.aborted)return;E(xe,te.slice(0,100).map(j=>j.record)),E(pt,te.length>100?Zo(s(w),"truncatedResults",{shown:100,count:te.length}):Zo(s(w),"archiveResults",{count:te.length}),!0)}catch{d===Xo&&!p.signal.aborted&&(E(pt,s(w).labels.archiveError,!0),E(Qt,!0))}}Wf(()=>{E(A,innerHeight,!0),E(v,!0),so=new AbortController;try{let x=localStorage.getItem("dirwell-color-scheme");["system","light","dark"].includes(x)&&E(f,x,!0)}catch{}kn=Qf("ledger");let d=ns(location.href,"ledger",s(n).path,ao(s(n)),[],history.state);E(i,d.query,!0),E(a,d.types,!0),E(l,d.sort),E(u,d.selected,!0),E($,d.listTop,!0),cs();let p=x=>{x.state?.dataHref?Qr(x.state.dataHref,location.href,!1,!1,x.state):location.reload()};return window.addEventListener("popstate",p),Wa(),()=>{so?.abort(),fs?.abort(),window.removeEventListener("popstate",p)}}),Xt(()=>{let d=s(hr);if(!d||typeof EventSource>"u")return;let p=new EventSource(d);return p.onmessage=()=>E(Ue,d,!0),p.onerror=()=>{E(m,s(w).labels.updatesError,!0),E(_,"updates")},p.onopen=()=>{s(_)==="updates"&&(E(m,""),E(_,null))},()=>p.close()}),Xt(()=>{if(s(v)&&!s(h)&&s(Ue)){let d=s(Ue);E(Ue,null),d===s(hr)&&Qr(s(n).dataHref,location.href,!1,!0)}}),Xt(()=>{s(v)&&(document.documentElement.dataset.theme=s(f))}),Xt(()=>{s(oo)&&s(y)&&!s(oo).open&&s(oo).showModal()}),Xt(()=>{s(io)&&s(K)&&!s(io).open&&(s(io).showModal(),Gr().then(()=>s(ls)?.focus()))});var Ja=rp();cr("resize",hn,()=>E(A,innerHeight,!0)),cr("keydown",hn,vc),cr("scroll",hn,()=>{s(Or)&&E($,Math.max(0,window.scrollY-s(Or).offsetTop),!0)});var ds=xt(Ja),ps=W(ds),bc=W(ps);{var yc=d=>{var p=Ar(),x=xt(p);wn(x,()=>t.header,()=>({model:s(n)})),D(d,p)},$c=d=>{var p=Cd(),x=xt(p);{var N=P=>{var X=Nd();z(()=>{ee(X,"src",s(w).brand.logoUrl),ee(X,"alt",s(w).brand.logoAlt??"")}),D(P,X)};ae(x,P=>{s(w).brand.logoUrl&&P(N)})}var U=S(x,2),te=H(U,!0),j=S(U,2),Z=H(j,!0);z(()=>{R(te,s(w).brand.name??s(n).title),R(Z,s(w).labels.archive)}),D(d,p)};ae(bc,d=>{t.header?d(yc):d($c,-1)})}B(ps);var _s=S(ps,2),Qo=W(_s),wc=H(Qo,!0),xc=S(Qo);Sr(xc,17,()=>s(n).breadcrumbs,Xr,(d,p)=>{vo();var x=Od(),N=S(xt(x)),U=H(N,!0);z(()=>{ee(N,"href",s(p).href),R(U,s(p).name)}),ye("click",N,te=>us(te,s(p).href,s(p).dataHref)),D(d,x)}),B(_s),B(ds);var ei=S(ds,2),ms=W(ei),hs=W(ms),Qa=W(hs,!0),en=S(Qa);Jn(en),Tn(en,d=>E(Wo,d),()=>s(Wo)),B(hs);var ti=S(hs,2),el=W(ti),Ec=H(el,!0),Tc=S(el);Sr(Tc,16,()=>["directory","file","link"],Xr,(d,p)=>{var x=Id(),N=W(x);Jn(N);var U=S(N,1,!0);B(x),z(te=>{es(N,te),R(U,s(w).labels[p])},[()=>s(a).includes(p)]),ye("change",N,te=>E(a,te.currentTarget.checked?[...s(a),p]:s(a).filter(j=>j!==p),!0)),D(d,x)}),B(ti);var vs=S(ti,2),tl=W(vs,!0),Dr=S(tl),ri=W(Dr),kc=H(ri,!0);ri.value=ri.__value="name";var ni=S(ri),Ac=H(ni,!0);ni.value=ni.__value="size";var gs=S(ni),Sc=H(gs,!0);gs.value=gs.__value="modified",B(Dr);var oi;En(Dr),B(vs);var bs=S(vs,2),rl=W(bs,!0),Lr=S(rl),ii=W(Lr),Rc=H(ii,!0);ii.value=ii.__value="natural";var si=S(ii),Nc=H(si,!0);si.value=si.__value="locale";var ys=S(si),Cc=H(ys,!0);ys.value=ys.__value="unicode",B(Lr);var ai;En(Lr),B(bs);var $s=S(bs,2),nl=W($s,!0),Mr=S(nl),li=W(Mr),Oc=H(li,!0);li.value=li.__value="asc";var ws=S(li),Ic=H(ws,!0);ws.value=ws.__value="desc",B(Mr);var fi;En(Mr),B($s);var xs=S($s,2),lo=W(xs);Jn(lo);var Dc=S(lo,1,!0);B(xs);var Es=S(xs,2),ol=W(Es,!0),Fr=S(ol),ci=W(Fr),Lc=H(ci,!0);ci.value=ci.__value="system";var ui=S(ci),Mc=H(ui,!0);ui.value=ui.__value="light";var Ts=S(ui),Fc=H(Ts,!0);Ts.value=Ts.__value="dark",B(Fr);var di;En(Fr),B(Es);var Pc=S(Es,2);{var Hc=d=>{var p=ss(),x=H(p,!0);z(()=>{p.disabled=!s(v)||!s(n).searchIndexHref,R(x,s(w).labels.searchArchive)}),ye("click",p,()=>E(K,!0)),D(d,p)};ae(Pc,d=>{s(n).searchIndexHref&&d(Hc)})}B(ms);var ks=S(ms,2),As=W(ks),il=W(As,!0),sl=S(il),Uc=H(sl,!0),al=S(sl,1,!0),Vc=S(al),Bc=H(Vc,!0);B(As);var ll=S(As,2);{var Yc=d=>{var p=ss(),x=H(p,!0);z(()=>{p.disabled=s(h),R(x,s(w).labels.retry)}),ye("click",p,_c),D(d,p)};ae(ll,d=>{s(_)&&s(_)!=="copy"&&d(Yc)})}var fl=S(ll,2);{var qc=d=>{var p=qa(),x=H(p,!0);z(()=>{ee(p,"href",An[1]),R(x,s(w).labels.openNative)}),D(d,p)};ae(fl,d=>{s(_)==="folder"&&An&&d(qc)})}var fo=S(fl,2);let cl;Sr(fo,21,()=>s(w).columns,Xr,(d,p)=>{var x=Dd(),N=H(x,!0);z(U=>R(N,U),[()=>ic(s(p),s(w))]),D(d,x)}),B(fo);var pi=S(fo,2),ul=W(pi);{var zc=d=>{var p=Ld(),x=H(p);z(()=>ee(x,"href",s(n).parentHref)),ye("click",x,N=>us(N,s(n).parentHref,s(n).parentDataHref)),D(d,p)};ae(ul,d=>{s(n).parentHref&&d(zc)})}var dl=S(ul,2);{var jc=d=>{var p=dc();let x;z(()=>x=xn(p,"",x,{height:s(Cr)[s(no)]+"px"})),D(d,p)};ae(dl,d=>{s(no)&&d(jc)})}var pl=S(dl,2);Sr(pl,19,()=>s(ce).slice(s(no),s(as)),d=>d.id,(d,p,x)=>{var N=jd();let U;var te=W(N);Sr(te,17,()=>s(w).columns,Xr,(P,X)=>{var _e=Ar(),Ut=xt(_e);{var de=Ge=>{var Ee=Ud(),Ce=W(Ee);{var Oe=Nt=>{var et=Fd(),uo=W(et);{var Ss=Be=>{var Bt=Ar(),tn=xt(Bt);wn(tn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(Be,Bt)},Rs=Be=>{var Bt=Md(),tn=xt(Bt);Ea(tn,()=>ec(Ba(s(p))),!0),B(tn);var iu=S(tn);z(su=>R(iu,` ${s(p).name??""}${su??""}`),[()=>Jo(s(p))?"/":""]),D(Be,Bt)};ae(uo,Be=>{t.row?Be(Ss):Be(Rs,-1)})}B(et),z(Be=>{ee(et,"href",Be),ee(et,"target",s(p).exitsExplorer?"_blank":void 0),ee(et,"rel",s(p).exitsExplorer?"noopener":void 0)},[()=>Za(s(p))]),ye("click",et,Be=>mc(Be,s(p))),cr("focus",et,()=>E(u,s(p).id,!0)),D(Nt,et)},Rt=Nt=>{var et=Pd(),uo=W(et);{var Ss=Be=>{var Bt=Ar(),tn=xt(Bt);wn(tn,()=>t.row,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(Be,Bt)},Rs=Be=>{var Bt=Lo();z(()=>R(Bt,s(p).name)),D(Be,Bt)};ae(uo,Be=>{t.row?Be(Ss):Be(Rs,-1)})}B(et),D(Nt,et)};ae(Ce,Nt=>{s(p).href?Nt(Oe):Nt(Rt,-1)})}var Vt=S(Ce);{var co=Nt=>{var et=Hd(),uo=H(et);z(()=>R(uo,`${s(p).link.unavailable?s(w).labels.unavailable+" \xB7 ":"\u2192 "}${s(p).link.target??""}`)),D(Nt,et)};ae(Vt,Nt=>{s(p).link&&Nt(co)})}B(Ee),D(Ge,Ee)},me=Ge=>{var Ee=Vd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>Jo(s(p))?s(w).labels.folder:uc(s(p).size)]),D(Ge,Ee)},Ve=Ge=>{var Ee=Bd(),Ce=W(Ee),Oe=H(Ce,!0);B(Ee),z(Rt=>{Ee.disabled=!s(v),ee(Ce,"datetime",s(p).modifiedAt),R(Oe,Rt)},[()=>Ua(s(p).modifiedAt,s(w),s(v))]),ye("click",Ee,()=>E(y,s(p).modifiedAt,!0)),D(Ge,Ee)},Pr=Ge=>{var Ee=Yd(),Ce=H(Ee,!0);z(Oe=>R(Ce,Oe),[()=>sc(s(p).data?.[s(X).dataKey])]),D(Ge,Ee)};ae(Ut,Ge=>{s(X)==="name"?Ge(de):s(X)==="size"?Ge(me,1):s(X)==="modified"?Ge(Ve,2):Ge(Pr,-1)})}D(P,_e)});var j=S(te,2);{var Z=P=>{var X=zd(),_e=W(X);{var Ut=me=>{var Ve=Ar(),Pr=xt(Ve);wn(Pr,()=>t.actions,()=>({model:s(n),entry:s(p),selected:s(u)===s(p).id})),D(me,Ve)};ae(_e,me=>{t.actions&&me(Ut)})}var de=S(_e,2);Sr(de,17,()=>s(w).actions,Xr,(me,Ve)=>{var Pr=Ar(),Ge=xt(Pr);{var Ee=Rt=>{var Vt=qd(),co=H(Vt,!0);z(Nt=>{ee(Vt,"href",Nt),R(co,s(w).labels.download)},[()=>Za(s(p))]),D(Rt,Vt)},Ce=Ot(()=>s(Ve)==="download"&&s(p).href&&!Jo(s(p))&&!s(p).link?.unavailable),Oe=Rt=>{var Vt=ss(),co=H(Vt,!0);z(()=>{Vt.disabled=!s(v)||s(Ve)==="copy-link"&&!s(p).href,ee(Vt,"aria-label",(s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)+": "+s(p).name),R(co,s(Ve)==="copy-link"?s(w).labels.copyLink:s(w).labels.copyPath)}),ye("click",Vt,async()=>{try{await oc(s(Ve),s(p)),E(m,s(w).labels.copied,!0),E(_,null)}catch{E(m,s(w).labels.copyError,!0),E(_,"copy")}}),D(Rt,Vt)};ae(Ge,Rt=>{s(Ce)?Rt(Ee):s(Ve)!=="download"&&Rt(Oe,1)})}D(me,Pr)}),B(X),D(P,X)};ae(j,P=>{(t.actions||s(w).actions.length)&&P(Z)})}B(N),Ta(N,(P,X)=>pc?.(P,X),()=>s(p).id),z((P,X)=>{ee(N,"data-custom-columns",P),ee(N,"data-id",s(p).id),ee(N,"data-order",s(no)+s(x)),ee(N,"data-active",s(u)===s(p).id),U=xn(N,"",U,{"grid-template-columns":X})},[()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(P=>P==="name"?"minmax(0,1fr)":"minmax(6rem,max-content)").join(" "):void 0]),D(d,N)});var Gc=S(pl,2);{var Kc=d=>{var p=dc();let x;z(()=>x=xn(p,"",x,{height:s(Cr)[s(ce).length]-s(Cr)[s(as)]+"px"})),D(d,p)};ae(Gc,d=>{s(as)<s(ce).length&&d(Kc)})}B(pi),Tn(pi,d=>E(Or,d),()=>s(Or));var Zc=S(pi,2);{var Wc=d=>{var p=Gd(),x=H(p,!0);z(()=>R(x,s(n).total===0?s(w).labels.empty:s(w).labels.noMatches)),D(d,p)};ae(Zc,d=>{s(ce).length===0&&!s(h)&&d(Wc)})}B(ks);var _l=S(ks,2);{var Xc=d=>{var p=Wd(),x=W(p);{var N=Z=>{var P=Kd(),X=H(P,!0);z(()=>{ee(P,"href",s(n).page.previousHref),R(X,s(w).labels.previous)}),D(Z,P)};ae(x,Z=>{s(n).page.previousHref&&Z(N)})}var U=S(x),te=S(U);{var j=Z=>{var P=Zd(),X=H(P,!0);z(()=>{ee(P,"href",s(n).page.nextHref),R(X,s(w).labels.next)}),D(Z,P)};ae(te,Z=>{s(n).page.nextHref&&Z(j)})}B(p),z(Z=>{ee(p,"aria-label",s(w).labels.pagination),R(U,` ${Z??""} `)},[()=>Zo(s(w),"page",{page:s(n).page.number,pages:s(n).page.count})]),D(d,p)};ae(_l,d=>{s(n).page?.count>1&&!s(mt)&&d(Xc)})}var Jc=S(_l,2);{var Qc=d=>{var p=Ar(),x=xt(p);wn(x,()=>t.footer,()=>({model:s(n)})),D(d,p)},eu=d=>{var p=Xd(),x=W(p);{var N=te=>{var j=qa(),Z=H(j,!0);z(()=>{ee(j,"href",s(w).brand.footerUrl),R(Z,s(w).brand.footerText)}),D(te,j)},U=te=>{var j=Lo();z(()=>R(j,s(w).brand.footerText)),D(te,j)};ae(x,te=>{s(w).brand.footerUrl?te(N):te(U,-1)})}B(p),D(d,p)},tu=d=>{var p=Jd(),x=H(p,!0);z(()=>R(x,s(w).labels.keyboardHelp)),D(d,p)};ae(Jc,d=>{t.footer?d(Qc):s(w).brand.footerText?d(eu,1):d(tu,-1)})}B(ei);var ml=S(ei,2);{var ru=d=>{var p=Qd(),x=W(p),N=H(x,!0),U=S(x,2),te=H(U,!0),j=S(U,2),Z=H(j,!0),P=S(j,2),X=H(P,!0);B(p),Tn(p,_e=>E(oo,_e),()=>s(oo)),z(_e=>{R(N,s(w).labels.modifiedTime),R(te,s(y)),R(Z,_e),R(X,s(w).labels.close)},[()=>s(w).dateOptions.locale!==void 0||s(w).dateOptions.timeZone!==void 0?Ua(s(y),s(w),!0):new Date(s(y)).toLocaleString()]),cr("close",p,()=>E(y,null)),ye("click",P,()=>E(y,null)),D(d,p)};ae(ml,d=>{s(y)&&d(ru)})}var nu=S(ml,2);{var ou=d=>{var p=tp(),x=W(p),N=H(x,!0),U=S(x,2);Jn(U),Tn(U,de=>E(ls,de),()=>s(ls));var te=S(U,2),j=H(te,!0),Z=S(te,2);{var P=de=>{var me=ss(),Ve=H(me,!0);z(()=>R(Ve,s(w).labels.retry)),ye("click",me,Xa),D(de,me)};ae(Z,de=>{s(Qt)&&de(P)})}var X=S(Z,2);Sr(X,21,()=>s(xe),Xr,(de,me)=>{var Ve=ep(),Pr=W(Ve);{var Ge=Ce=>{var Oe=qa(),Rt=H(Oe,!0);z(()=>{ee(Oe,"href",s(me).href),ee(Oe,"target",s(me).exitsExplorer?"_blank":void 0),ee(Oe,"rel",s(me).exitsExplorer?"noopener":void 0),R(Rt,s(me).path)}),D(Ce,Oe)},Ee=Ce=>{var Oe=Lo();z(()=>R(Oe,s(me).path)),D(Ce,Oe)};ae(Pr,Ce=>{s(me).href?Ce(Ge):Ce(Ee,-1)})}B(Ve),D(de,Ve)}),B(X);var _e=S(X,2),Ut=H(_e,!0);B(p),Tn(p,de=>E(io,de),()=>s(io)),z(()=>{R(N,s(w).labels.searchArchive),ee(U,"aria-label",s(w).labels.archiveSearchInput),R(j,s(pt)),R(Ut,s(w).labels.close)}),cr("close",p,()=>E(K,!1)),ye("input",U,Xa),rs(U,()=>s(pe),de=>E(pe,de)),ye("click",_e,()=>E(K,!1)),D(d,p)};ae(nu,d=>{s(K)&&d(ou)})}z((d,p,x)=>{ee(_s,"aria-label",s(w).labels.breadcrumb),ee(Qo,"href",s(n).rootHref),R(wc,s(w).labels.home),ee(ei,"aria-busy",s(h)),R(Qa,s(w).labels.searchDirectory),ee(en,"placeholder",s(w).labels.searchFiles),en.disabled=!s(v)||!s(mt),ti.disabled=!s(v)||!s(mt),R(Ec,s(w).labels.types),R(tl,s(w).labels.sort),Dr.disabled=!s(v)||!s(mt),R(kc,s(w).labels.name),R(Ac,s(w).labels.size),R(Sc,s(w).labels.modified),oi!==(oi=s(l).field)&&(Dr.value=(Dr.__value=oi)??"",Jr(Dr,oi)),R(rl,s(w).labels.names),Lr.disabled=!s(v)||!s(mt),R(Rc,s(w).labels.natural),R(Nc,s(w).labels.locale),R(Cc,s(w).labels.unicode),ai!==(ai=s(l).nameMode)&&(Lr.value=(Lr.__value=ai)??"",Jr(Lr,ai)),R(nl,s(w).labels.order),Mr.disabled=!s(v)||!s(mt),R(Oc,s(w).labels.ascending),R(Ic,s(w).labels.descending),fi!==(fi=s(l).direction)&&(Mr.value=(Mr.__value=fi)??"",Jr(Mr,fi)),es(lo,s(l).directoriesFirst),lo.disabled=!s(v)||!s(mt),R(Dc,s(w).labels.directoriesFirst),R(ol,s(w).labels.appearance),Fr.disabled=!s(v),R(Lc,s(w).labels.system),R(Mc,s(w).labels.light),R(Fc,s(w).labels.dark),di!==(di=s(f))&&(Fr.value=(Fr.__value=di)??"",Jr(Fr,di)),R(il,s(_t)[0]),R(Uc,s(mt)?s(ce).length:s(o).length),R(al,d),R(Bc,s(h)?s(w).labels.loading:s(m)),ee(fo,"data-custom-columns",p),cl=xn(fo,"",cl,{"grid-template-columns":x})},[()=>s(_t).slice(1).join("__COUNT__"),()=>!!s(n).ui?.columns,()=>s(n).ui?.columns?s(w).columns.map(d=>d==="name"?"minmax(0,1fr)":typeof d=="object"?"minmax(0,12rem)":"minmax(6rem,max-content)").join(" "):void 0]),ye("click",Qo,d=>us(d,s(n).rootHref,s(n).rootDataHref)),cr("compositionstart",en,()=>E(g,!0)),cr("compositionend",en,()=>E(g,!1)),rs(en,()=>s(i),d=>E(i,d)),ye("change",Dr,d=>E(l,{...s(l),field:d.currentTarget.value})),ye("change",Lr,d=>E(l,{...s(l),nameMode:d.currentTarget.value})),ye("change",Mr,d=>E(l,{...s(l),direction:d.currentTarget.value})),ye("change",lo,d=>E(l,{...s(l),directoriesFirst:d.currentTarget.checked})),ye("change",Fr,d=>gc(d.currentTarget.value)),D(e,Ja),yo()}ji(["click","change","input"]);var np=document.querySelector("[data-dirwell-theme]"),op=JSON.parse(document.querySelector("#dirwell-page-data").textContent),ip=Uo(za,{target:np,props:{model:op}});globalThis.__dirwellUnmount=()=>Vo(ip);})();
|
|
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(),qi(),So(r),Te(!1),ts(e,t)}finally{Te(n),ne(o)}}var es=new Map;function jf(e,{target:t,anchor:r,props:n={},events:o,context:i,intro:a=!0,transformError:l}){qi();var f=void 0,d=Tf(()=>{var v=r??t.appendChild(be());Ta(v,{pending:()=>{}},_=>{Eo({});var y=q;if(i&&(y.c=i),o&&(n.$$events=o),T&&Je(_,null),ka=a,f=e(_,n)||ko(),ka=!0,T&&(k.nodes.end=M,M===null||M.nodeType!==vt||M.data!=="]"))throw Br(),it;To()},l);var h=new Set,m=_=>{for(var y=0;y<_.length;y++){var g=_[y];if(!h.has(g)){h.add(g);var $=Mf(g);for(let pe of[t,document]){var A=es.get(pe);A===void 0&&(A=new Map,es.set(pe,A));var K=A.get(g);K===void 0?(pe.addEventListener(g,Xi,{passive:$}),A.set(g,1)):A.set(g,K+1)}}}};return m(Cn(ga)),Zi.add(m),()=>{for(var _ of h)for(let $ of[t,document]){var y=es.get($),g=y.get(_);--g==0?($.removeEventListener(_,Xi),y.delete(_),y.size===0&&es.delete($)):y.set(_,g)}Zi.delete(m),v!==r&&v.parentNode?.removeChild(v)}});return Aa.set(f,d),f}var Aa=new WeakMap;function zo(e,t){let r=Aa.get(e);return r?(Aa.delete(e),r(t)):(b&&Nl(),Promise.resolve())}var Jt,pr,St,xn,Go,Ko,rs,_r=class{constructor(t,r=!0){re(this,"anchor");F(this,Jt,new Map);F(this,pr,new Map);F(this,St,new Map);F(this,xn,new Set);F(this,Go,!0);F(this,Ko,t=>{if(c(this,Jt).has(t)){var r=c(this,Jt).get(t),n=c(this,pr).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,pr).set(r,o.effect),c(this,St).delete(r),b&&(o.fragment.lastChild[Us]=this.anchor),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),n=o.effect)}for(let[i,a]of c(this,Jt)){if(c(this,Jt).delete(i),i===t)break;let l=c(this,St).get(a);l&&(ge(l.effect),c(this,St).delete(a))}for(let[i,a]of c(this,pr)){if(i===r||c(this,xn).has(i))continue;let l=()=>{if(Array.from(c(this,Jt).values()).includes(i)){var d=document.createDocumentFragment();Qn(a,d),d.append(be()),c(this,St).set(i,{effect:a,fragment:d})}else ge(a);c(this,xn).delete(i),c(this,pr).delete(i)};c(this,Go)||!n?(c(this,xn).add(i),fr(a,l,!1)):l()}}});F(this,rs,t=>{c(this,Jt).delete(t);let r=Array.from(c(this,Jt).values());for(let[n,o]of c(this,St))r.includes(n)||(ge(o.effect),c(this,St).delete(n))});this.anchor=t,I(this,Go,r)}ensure(t,r){var n=O,o=ji();if(r&&!c(this,pr).has(t)&&!c(this,St).has(t))if(o){var i=document.createDocumentFragment(),a=be();i.append(a),c(this,St).set(t,{effect:Ne(()=>r(a)),fragment:i})}else c(this,pr).set(t,Ne(()=>r(this.anchor)));if(c(this,Jt).set(n,t),o){for(let[l,f]of c(this,pr))l===t?n.unskip_effect(f):n.skip_effect(f);for(let[l,f]of c(this,St))l===t?n.unskip_effect(f.effect):n.skip_effect(f.effect);n.oncommit(c(this,Ko)),n.ondiscard(c(this,rs))}else T&&(this.anchor=M),c(this,Ko).call(this,n)}};Jt=new WeakMap,pr=new WeakMap,St=new WeakMap,xn=new WeakMap,Go=new WeakMap,Ko=new WeakMap,rs=new WeakMap;function le(e,t,r=!1){var n;T&&(n=M,De());var o=new _r(e),i=r?65536:0;function a(l,f){if(T){var d=an(n);if(l!==parseInt(d.substring(1))){var v=nr();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 h=t[l];fr(h,()=>{if(i){if(i.pending.delete(h),i.done.add(h),i.pending.size===0){var m=e.outrogroups;Sa(e,Cn(i.done)),m.delete(i),m.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var f=n.length===0&&r!==null&&e.pending.size===0;if(f){var d=r,v=d.parentNode;So(v),v.append(d),e.items.clear()}Sa(e,t,!f)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function Sa(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 ns;function Rr(e,t,r,n,o,i=null){var a=e,l=new Map,f=(t&4)!==0;if(f){var d=e;a=T?ne(ve(d)):d.appendChild(be())}T&&De();var v=null,h=Hn(()=>{var K=r();return qt(K)?K:K==null?[]:Cn(K)});b&&Ze(h,"{#each ...}");var m=new Map,_=!0;function y(K){if((A.effect.f&16384)===0){A.pending.delete(K);var pe=s(h);A.fallback=v,Zu(A,pe,a,t,n),v!==null&&(pe.length===0?(v.f&33554432)===0?Jn(v):(v.f^=33554432,Wo(v,null,a)):fr(v,()=>{v=null}))}}function g(K){A.pending.delete(K)}var $=pt(()=>{var K=s(h),pe=K.length;let $e=!1;if(T){var ot=an(a)==="[!";ot!==(pe===0)&&(a=nr(),ne(a),Te(!1),$e=!0)}for(var Ue=new Set,w=O,Qt=ji(),_t=0;_t<pe;_t+=1){T&&M.nodeType===vt&&M.data==="]"&&(a=M,$e=!0,Te(!1));var ze=K[_t],hr=n(ze,_t);if(b){var mt=n(ze,_t);hr!==mt&&Fl(String(_t),String(hr),String(mt))}var ue=_?null:l.get(hr);ue?(ue.v&&Kt(ue.v,ze),ue.i&&Kt(ue.i,_t),Qt&&w.unskip_effect(ue.e)):(ue=Wu(l,_?a:ns??(ns=be()),ze,hr,_t,o,t,r),_||(ue.e.f|=33554432),l.set(hr,ue)),Ue.add(hr)}if(pe===0&&i&&!v&&(_?v=Ne(()=>i(a)):(v=Ne(()=>i(ns??(ns=be()))),v.f|=33554432)),pe>Ue.size&&(b?Xu(K,n):qs("","","")),T&&pe>0&&ne(nr()),!_)if(m.set(w,Ue),Qt){for(let[io,Or]of l)Ue.has(io)||w.skip_effect(Or.e);w.oncommit(y),w.ondiscard(g)}else y(w);$e&&Te(!0),s(h)}),A={effect:$,flags:t,items:l,pending:m,outrogroups:null,fallback:v};_=!1,T&&(a=M)}function Zo(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=Zo(e.effect.first),d,v=null,h,m=[],_=[],y,g,$,A;if(i)for(A=0;A<a;A+=1)y=t[A],g=o(y,A),$=l.get(g).e,($.f&33554432)===0&&($.nodes?.a?.measure(),(h??(h=new Set)).add($));for(A=0;A<a;A+=1){if(y=t[A],g=o(y,A),$=l.get(g).e,e.outrogroups!==null)for(let ze of e.outrogroups)ze.pending.delete($),ze.done.delete($);if(($.f&8192)!==0&&(Jn($),i&&($.nodes?.a?.unfix(),(h??(h=new Set)).delete($))),($.f&33554432)!==0)if($.f^=33554432,$===f)Wo($,null,r);else{var K=v?v.next:f;$===e.effect.last&&(e.effect.last=$.prev),$.prev&&($.prev.next=$.next),$.next&&($.next.prev=$.prev),Xr(e,v,$),Xr(e,$,K),Wo($,K,r),v=$,m=[],_=[],f=Zo(v.next);continue}if($!==f){if(d!==void 0&&d.has($)){if(m.length<_.length){var pe=_[0],$e;v=pe.prev;var ot=m[0],Ue=m[m.length-1];for($e=0;$e<m.length;$e+=1)Wo(m[$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,A-=1,m=[],_=[]}else d.delete($),Wo($,f,r),Xr(e,$.prev,$.next),Xr(e,$,v===null?e.effect.first:v.next),Xr(e,v,$),v=$;continue}for(m=[],_=[];f!==null&&f!==$;)(d??(d=new Set)).add(f),_.push(f),f=Zo(f.next);if(f===null)continue}($.f&33554432)===0&&m.push($),v=$,f=Zo($.next)}if(e.outrogroups!==null){for(let ze of e.outrogroups)ze.pending.size===0&&(Sa(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=Zo(f.next);var Qt=w.length;if(Qt>0){var _t=(n&4)!==0&&a===0?r:null;if(i){for(A=0;A<Qt;A+=1)w[A].nodes?.a?.measure();for(A=0;A<Qt;A+=1)w[A].nodes?.a?.fix()}Ku(e,w,_t)}}i&&we(()=>{if(h!==void 0)for($ of h)$.nodes?.a?.apply()})}function Wu(e,t,r,n,o,i,a,l){var f=(a&1)!==0?(a&16)===0?mn(r,!1,!1):Xe(r):null,d=(a&2)!==0?Xe(o):null;return b&&f&&(f.trace=()=>{l()[d?.v??o]}),{v:f,i:d,e:Ne(()=>(i(t,f??r,d??o,l),()=>{e.delete(n)}))}}function Wo(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),qs(a,l,f)}r.set(i,o)}}function Ju(e,t,r){if(!t||t===Lf(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]}`),Rl(Ki(n))}function Ra(e,t,r=!1,n=!1,o=!1,i=!1){var a=e,l="";if(r){var f=e;T&&(a=ne(ve(f)))}z(()=>{var d=k;if(l===(l=t()??"")){T&&De();return}if(r&&!T){d.nodes=null,f.innerHTML=l,l!==""&&Je(ve(f),f.lastChild);return}if(d.nodes!==null&&(ma(d.nodes.start,d.nodes.end),d.nodes=null),l!==""){if(T){for(var v=M.data,h=De(),m=h;h!==null&&(h.nodeType!==vt||h.data!=="");)m=h,h=Le(h);if(h===null)throw Br(),it;b&&!i&&Ju(h.parentNode,v,l),Je(M,m),a=ne(h);return}var _=n?yo:o?Bs:void 0,y=Xt(n?"svg":o?"math":"template",_);y.innerHTML=l;var g=n||o?y:y.content;if(Je(ve(g),g.lastChild),n||o)for(;ve(g);)a.before(ve(g));else a.before(g)}})}function En(e,t,...r){var n=new _r(e);pt(()=>{let o=t()??null;b&&o==null&&Yl(),n.ensure(o,o&&(i=>o(i,...r)))},65536)}function Na(e,t,r){Et(()=>{var n=ae(()=>t(e,r?.())||{});if(r&&n?.update){var o=!1,i={};He(()=>{var a=r();Gi(a),o&&Si(i,a)&&(i=a,n.update(a))}),o=!0}if(n?.destroy)return()=>n.destroy()})}var j$=[...`
|
|
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);})();
|