@lukawi/toporealm 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.en.md +113 -0
- package/README.md +115 -0
- package/dist/cli/index.d.ts +46 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +276 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +48 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/core/errors.d.ts +16 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +40 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/store.d.ts +27 -0
- package/dist/core/store.d.ts.map +1 -0
- package/dist/core/store.js +390 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/types.d.ts +108 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +3 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/validate.d.ts +16 -0
- package/dist/core/validate.d.ts.map +1 -0
- package/dist/core/validate.js +32 -0
- package/dist/core/validate.js.map +1 -0
- package/dist/distribution/hosts.d.ts +12 -0
- package/dist/distribution/hosts.d.ts.map +1 -0
- package/dist/distribution/hosts.js +122 -0
- package/dist/distribution/hosts.js.map +1 -0
- package/dist/distribution/index.d.ts +4 -0
- package/dist/distribution/index.d.ts.map +1 -0
- package/dist/distribution/index.js +4 -0
- package/dist/distribution/index.js.map +1 -0
- package/dist/distribution/installer.d.ts +23 -0
- package/dist/distribution/installer.d.ts.map +1 -0
- package/dist/distribution/installer.js +179 -0
- package/dist/distribution/installer.js.map +1 -0
- package/dist/distribution/skills.d.ts +11 -0
- package/dist/distribution/skills.d.ts.map +1 -0
- package/dist/distribution/skills.js +20 -0
- package/dist/distribution/skills.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/skills/toporealm/SKILL.md +19 -0
- package/dist/integrations/skills/toporealm/agents/openai.yaml +6 -0
- package/dist/integrations/skills/toporealm-design/SKILL.md +14 -0
- package/dist/integrations/skills/toporealm-design/agents/openai.yaml +6 -0
- package/dist/integrations/skills/toporealm-grilling/SKILL.md +26 -0
- package/dist/integrations/skills/toporealm-grilling/agents/openai.yaml +6 -0
- package/dist/integrations/skills/toporealm-join/SKILL.md +18 -0
- package/dist/integrations/skills/toporealm-join/agents/openai.yaml +6 -0
- package/dist/mcp/index.d.ts +31 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +128 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/module-sdk/actions.d.ts +33 -0
- package/dist/module-sdk/actions.d.ts.map +1 -0
- package/dist/module-sdk/actions.js +56 -0
- package/dist/module-sdk/actions.js.map +1 -0
- package/dist/module-sdk/index.d.ts +47 -0
- package/dist/module-sdk/index.d.ts.map +1 -0
- package/dist/module-sdk/index.js +7 -0
- package/dist/module-sdk/index.js.map +1 -0
- package/dist/module-sdk/registry.d.ts +81 -0
- package/dist/module-sdk/registry.d.ts.map +1 -0
- package/dist/module-sdk/registry.js +294 -0
- package/dist/module-sdk/registry.js.map +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +168 -0
- package/dist/server/index.js.map +1 -0
- package/dist/web/index.d.ts +26 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +107 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web-assets/assets/index-BUAvvLwY.js +35 -0
- package/dist/web-assets/assets/index-DtKFY9Hh.css +1 -0
- package/dist/web-assets/index.html +175 -0
- package/package.json +65 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var lu=Object.defineProperty;var Ha=t=>{throw TypeError(t)};var uu=(t,e,n)=>e in t?lu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Bt=(t,e,n)=>uu(t,typeof e!="symbol"?e+"":e,n),Ss=(t,e,n)=>e.has(t)||Ha("Cannot "+n);var _=(t,e,n)=>(Ss(t,e,"read from private field"),n?n.call(t):e.get(t)),J=(t,e,n)=>e.has(t)?Ha("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ft=(t,e,n,r)=>(Ss(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Et=(t,e,n)=>(Ss(t,e,"access private method"),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Co,Ro;const Va=(Ro=(Co=globalThis.process)==null?void 0:Co.env)==null?void 0:Ro.NODE_ENV,R=Va&&!Va.toLowerCase().startsWith("prod");var ps=Array.isArray,cu=Array.prototype.indexOf,Wr=Array.prototype.includes,gs=Array.from,Tn=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,fu=Object.getOwnPropertyDescriptors,du=Object.prototype,hu=Array.prototype,Fo=Object.getPrototypeOf,Ba=Object.isExtensible;const vu=()=>{};function pu(t){for(var e=0;e<t.length;e++)t[e]()}function Lo(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}const te=2,xr=4,_s=8,zo=1<<24,Be=16,Re=32,mn=64,Gs=128,_a=256,Ce=512,Jt=1024,Gt=2048,Ge=4096,fe=8192,ke=16384,qr=32768,ns=1<<25,Qn=65536,Jr=1<<17,gu=1<<18,Nr=1<<19,_u=1<<20,en=1<<25,On=65536,Qr=1<<21,Xn=1<<22,qn=1<<23,ur=Symbol("$state"),jo=Symbol("component"),yu=Symbol(""),Ho=Symbol("proxy path"),Xi=Symbol("attributes"),Ys=Symbol("class"),Xs=Symbol("style"),Lr=Symbol("text"),Ui=Symbol("form reset"),mu=Symbol("hmr anchor"),Ni=new class extends Error{constructor(){super(...arguments);Bt(this,"name","StaleReactionError");Bt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},wu=1,bu=2,Vo=4,xu=8,ku=16,Eu=1,Mu=2,Kt=Symbol("uninitialized"),Su=Symbol("filename"),$u="http://www.w3.org/1999/xhtml";var Ti="font-weight: bold",Oi="font-weight: normal";function Au(t){R?console.warn(`%c[svelte] await_reactivity_loss
|
|
2
|
+
%cDetected reactivity loss when reading \`${t}\`. This happens when state is read in an async function after an earlier \`await\`
|
|
3
|
+
https://svelte.dev/e/await_reactivity_loss`,Ti,Oi):console.warn("https://svelte.dev/e/await_reactivity_loss")}function qu(){R?console.warn(`%c[svelte] derived_inert
|
|
4
|
+
%cReading a derived belonging to a now-destroyed effect may result in stale values
|
|
5
|
+
https://svelte.dev/e/derived_inert`,Ti,Oi):console.warn("https://svelte.dev/e/derived_inert")}function Nu(){R?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",Ti,Oi):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function $s(t){R?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
6
|
+
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results
|
|
7
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,Ti,Oi):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function Tu(){R?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",Ti,Oi):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Bo(t){return t===this.v}function Ou(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Go(t){return!Ou(t,this.v)}function Iu(t){if(R){const e=new Error(`invariant_violation
|
|
8
|
+
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${t}"
|
|
9
|
+
https://svelte.dev/e/invariant_violation`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invariant_violation")}function Yo(t){if(R){const e=new Error(`lifecycle_outside_component
|
|
10
|
+
\`${t}(...)\` can only be used during component initialisation
|
|
11
|
+
https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cu(){if(R){const t=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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ga(){if(R){const t=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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function Ru(){if(R){const t=new Error(`derived_references_self
|
|
12
|
+
A derived value cannot reference itself recursively
|
|
13
|
+
https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function Xo(t,e,n){if(R){const r=new Error(`each_key_duplicate
|
|
14
|
+
${n?`Keyed each block has duplicate key \`${n}\` at indexes ${t} and ${e}`:`Keyed each block has duplicate key at indexes ${t} and ${e}`}
|
|
15
|
+
https://svelte.dev/e/each_key_duplicate`);throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function Pu(t,e,n){if(R){const r=new Error(`each_key_volatile
|
|
16
|
+
Keyed each block has key that is not idempotent — the key for item at index ${t} was \`${e}\` but is now \`${n}\`. Keys must be the same each time for a given item
|
|
17
|
+
https://svelte.dev/e/each_key_volatile`);throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/each_key_volatile")}function Du(t){if(R){const e=new Error(`effect_in_teardown
|
|
18
|
+
\`${t}\` cannot be used inside an effect cleanup function
|
|
19
|
+
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function Fu(){if(R){const t=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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Lu(t){if(R){const e=new Error(`effect_orphan
|
|
20
|
+
\`${t}\` can only be used inside an effect (e.g. during component initialisation)
|
|
21
|
+
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function zu(){if(R){const t=new Error(`effect_update_depth_exceeded
|
|
22
|
+
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
|
23
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ju(){if(R){const t=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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invalid_snippet")}function Hu(t){if(R){const e=new Error(`rune_outside_svelte
|
|
24
|
+
The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
25
|
+
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function Vu(){if(R){const t=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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Bu(){if(R){const t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Gu(){if(R){const t=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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Yu(){if(R){const t=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 t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}let Xu=!1;function ze(t,e){return t.label=e,Uo(t.v,e),t}function Uo(t,e){var n;return(n=t==null?void 0:t[Ho])==null||n.call(t,e),t}function Ko(t){const e=new Error,n=Uu();return n.length===0?null:(n.unshift(`
|
|
26
|
+
`),Tn(e,"stack",{value:n.join(`
|
|
27
|
+
`)}),Tn(e,"name",{value:t}),e)}function Uu(){const t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const e=new Error().stack;if(Error.stackTraceLimit=t,!e)return[];const n=e.split(`
|
|
28
|
+
`),r=[];for(let i=0;i<n.length;i++){const s=n[i],a=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||r.push(s)}}return r}function Ku(t,e){if(!R)throw new Error("invariant(...) was not guarded by if (DEV)");t||Iu(e)}let jt=null;function kr(t){jt=t}let Zr=null;function rs(t){Zr=t}let Ii=null;function Ya(t){Ii=t}function Tr(t,e=!1,n){jt={p:jt,i:!1,c:null,e:null,s:t,x:null,r:wt,l:null},R&&(jt.function=n,Ii=n)}function Or(t){var e=jt,n=e.e;if(n!==null){e.e=null;for(var r of n)_l(r)}return e.i=!0,jt=e.p,R&&(Ii=(jt==null?void 0:jt.function)??null),ya(t)}function ya(t={}){return Tn(t,jo,{value:!0}),t}function Wo(){return!0}let Dn=[];function Jo(){var t=Dn;Dn=[],pu(t)}function _n(t){if(Dn.length===0&&!Xr){var e=Dn;queueMicrotask(()=>{e===Dn&&Jo()})}Dn.push(t)}function Wu(){for(;Dn.length>0;)Jo()}const Ju=-7169;function Lt(t,e){t.f=t.f&Ju|e}function ma(t){(t.f&Ce)!==0||t.deps===null?Lt(t,Jt):Lt(t,Ge)}function Qo(t){if(t!==null)for(const e of t)(e.f&te)===0||(e.f&On)===0||(e.f^=On,Qo(e.deps))}function Zo(t,e,n){(t.f&Gt)!==0?e.add(t):(t.f&Ge)!==0&&n.add(t),Qo(t.deps),Lt(t,Jt)}let Xa=!1;function Qu(){Xa||(Xa=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)(e=n[Ui])==null||e.call(n)})},{capture:!0}))}function Ir(t){var e=mt,n=wt;Pe(null),Ye(null);try{return t()}finally{Pe(e),Ye(n)}}function tl(t,e,n,r=n){t.addEventListener(e,()=>Ir(n));const i=t[Ui];i?t[Ui]=()=>{i(),r(!0)}:t[Ui]=()=>r(!0),Qu()}function Zu(t,e,n,r){const i=wa;var s=t.filter(d=>!d.settled),a=e.map(i);if(R&&a.forEach((d,m)=>{d.label=e[m].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(g,p)=>p)}),n.length===0&&s.length===0){r(a);return}var o=wt,l=tc(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function c(d){if((o.f&ke)===0){l();try{r([...a,...d])}catch(m){tn(m,o)}is()}}var v=el();if(n.length===0){u.then(()=>c([])).finally(v);return}function f(){Promise.all(n.map(d=>nc(d))).then(c).catch(d=>tn(d,o)).finally(v)}u?u.then(()=>{l(),f(),is()}):f()}function tc(){var t=wt,e=mt,n=jt,r=nt;if(R)var i=Zr;return function(a=!0){Ye(t),Pe(e),kr(n),a&&(t.f&ke)===0&&(r==null||r.activate(),r==null||r.apply()),R&&(nl(null),rs(i))}}function is(t=!0){Ye(null),Pe(null),kr(null),t&&(nt==null||nt.deactivate()),R&&(nl(null),rs(null))}function el(){var t=wt,e=t.b,n=nt,r=!!(e!=null&&e.is_rendered());return e==null||e.update_pending_count(1,n),n.increment(r,t),()=>{e==null||e.update_pending_count(-1,n),n.decrement(r,t)}}let Oe=null;function nl(t){Oe=t}const ec=new Set;function wa(t){var e=te|Gt;return wt!==null&&(wt.f|=Nr),{ctx:jt,deps:null,effects:null,equals:Bo,f:e,fn:t,reactions:null,rv:0,v:Kt,wv:0,parent:wt,ac:null}}const zr=Symbol("obsolete");function nc(t,e,n){let r=wt;r===null&&Cu();var i=void 0,s=tr(Kt);R&&(s.label=t.toString());var a=!mt,o=new Set;return kc(()=>{var d,m;var l=wt;R&&(Oe={effect:l,effect_deps:new Set,warned:!1});var u=Lo();i=u.promise;try{Promise.resolve(t()).then(u.resolve,g=>{g!==Ni&&u.reject(g)}).finally(is)}catch(g){u.reject(g),is()}if(R){if(Oe){if(l.deps!==null)for(let g=0;g<ge;g+=1)Oe.effect_deps.add(l.deps[g]);if(re!==null)for(let g=0;g<re.length;g+=1)Oe.effect_deps.add(re[g])}Oe=null}var c=nt;if(a){if((l.f&qr)!==0)var v=el();if((d=r.b)!=null&&d.is_rendered())(m=c.async_deriveds.get(l))==null||m.reject(zr);else for(const g of o.values())g.reject(zr);o.add(u),c.async_deriveds.set(l,u)}const f=(g,p=void 0)=>{R&&(Oe=null),v==null||v(),o.delete(u),p!==zr&&(c.activate(),p?(s.f|=qn,Mr(s,p)):((s.f&qn)!==0&&(s.f^=qn),Mr(s,g)),c.deactivate())};u.promise.then(f,g=>f(null,g||"unknown"))}),$a(()=>{for(const l of o)l.reject(zr)}),R&&(s.f|=Xn),new Promise(l=>{function u(c){function v(){c===i?l(s):u(i)}c.then(v,v)}u(i)})}function Wt(t){const e=wa(t);return kl(e),e}function rc(t){const e=wa(t);return e.equals=Go,e}function Ua(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)ye(e[n])}}let As=[];function ba(t){var e,n=wt,r=t.parent;if(!In&&r!==null&&t.v!==Kt&&(r.f&(ke|fe))!==0)return qu(),t.v;if(Ye(r),R){let i=Er;Ja(new Set);try{Wr.call(As,t)&&Ru(),As.push(t),t.f&=~On,Ua(t),e=Zs(t)}finally{Ye(n),Ja(i),As.pop()}}else try{t.f&=~On,Ua(t),e=Zs(t)}finally{Ye(n)}return e}function rl(t){var e=ba(t);if(!t.equals(e)&&(t.wv=Ml(),(!(nt!=null&&nt.is_fork)||t.deps===null)&&(nt!==null?(nt.capture(t,e,!0),cr==null||cr.capture(t,e,!0)):t.v=e,t.deps===null))){Lt(t,Jt);return}In||(ne!==null?(Sa()||nt!=null&&nt.is_fork)&&ne.set(t,e):ma(t))}function ic(t){var e;if(t.effects!==null)for(const n of t.effects)(n.teardown||n.ac)&&((e=n.teardown)==null||e.call(n),n.ac!==null&&Ir(()=>{n.ac.abort(Ni),n.ac=null}),n.fn!==null&&(n.teardown=vu),ei(n,0),qa(n))}function il(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&Sr(e)}let qs=null,ir=null,nt=null,cr=null,ne=null,Us=null,Xr=!1,Ns=!1,ar=null,Ki=null;var Ka=0,Ts=new Set;let sc=1;var pr,Mn,Vn,gr,_r,yr,hn,mr,oe,oi,vn,je,We,wr,Sn,Tt,Ks,jr,Ws,sl,al,sr,ac,Hr;const ds=class ds{constructor(){J(this,Tt);Bt(this,"id",sc++);J(this,pr,!1);Bt(this,"linked",!0);J(this,Mn,null);J(this,Vn,null);Bt(this,"async_deriveds",new Map);Bt(this,"current",new Map);Bt(this,"previous",new Map);J(this,gr,new Set);J(this,_r,new Set);J(this,yr,0);J(this,hn,new Map);J(this,mr,null);J(this,oe,[]);J(this,oi,[]);J(this,vn,new Set);J(this,je,new Set);J(this,We,new Map);J(this,wr,new Set);Bt(this,"is_fork",!1);J(this,Sn,!1);ir===null?qs=ir=this:(ft(ir,Vn,this),ft(this,Mn,ir)),ir=this}skip_effect(e){_(this,We).has(e)||_(this,We).set(e,{d:[],m:[]}),_(this,wr).delete(e)}unskip_effect(e,n=r=>this.schedule(r)){var r=_(this,We).get(e);if(r){_(this,We).delete(e);for(var i of r.d)Lt(i,Gt),n(i);for(i of r.m)Lt(i,Ge),n(i)}_(this,wr).add(e)}capture(e,n,r=!1){e.v!==Kt&&!this.previous.has(e)&&this.previous.set(e,e.v),(e.f&qn)===0&&(this.current.set(e,[n,r]),ne==null||ne.set(e,n)),this.is_fork||(e.v=n)}activate(){nt=this}deactivate(){nt=null,ne=null}flush(){try{R&&Ts.clear(),Ns=!0,nt=this,Et(this,Tt,jr).call(this)}finally{if(Ka=0,Us=null,ar=null,Ki=null,Ns=!1,nt=null,ne=null,nn.clear(),R)for(const e of Ts)e.updated=null}}discard(){var e;for(const n of _(this,_r))n(this);_(this,_r).clear();for(const n of this.async_deriveds.values())n.reject(zr);Et(this,Tt,Hr).call(this),(e=_(this,mr))==null||e.resolve()}register_created_effect(e){_(this,oi).push(e)}increment(e,n){if(ft(this,yr,_(this,yr)+1),e){let r=_(this,hn).get(n)??0;_(this,hn).set(n,r+1)}}decrement(e,n){if(ft(this,yr,_(this,yr)-1),e){let r=_(this,hn).get(n)??0;r===1?_(this,hn).delete(n):_(this,hn).set(n,r-1)}_(this,Sn)||(ft(this,Sn,!0),_n(()=>{ft(this,Sn,!1),this.linked&&this.flush()}))}transfer_effects(e,n){for(const r of e)_(this,vn).add(r);for(const r of n)_(this,je).add(r);e.clear(),n.clear()}oncommit(e){_(this,gr).add(e)}ondiscard(e){_(this,_r).add(e)}settled(){return(_(this,mr)??ft(this,mr,Lo())).promise}static ensure(){if(nt===null){const e=nt=new ds;!Ns&&!Xr&&_n(()=>{_(e,pr)||e.flush()})}return nt}apply(){{ne=null;return}}schedule(e){var i;if(Us=e,(i=e.b)!=null&&i.is_pending&&(e.f&(xr|_s|zo))!==0&&(e.f&qr)===0){e.b.defer_effect(e);return}for(var n=e;n.parent!==null;){n=n.parent;var r=n.f;if(ar!==null&&n===wt&&(mt===null||(mt.f&te)===0))return;if((r&(mn|Re))!==0){if((r&Jt)===0)return;n.f^=Jt}}_(this,oe).push(n)}};pr=new WeakMap,Mn=new WeakMap,Vn=new WeakMap,gr=new WeakMap,_r=new WeakMap,yr=new WeakMap,hn=new WeakMap,mr=new WeakMap,oe=new WeakMap,oi=new WeakMap,vn=new WeakMap,je=new WeakMap,We=new WeakMap,wr=new WeakMap,Sn=new WeakMap,Tt=new WeakSet,Ks=function(){if(this.is_fork)return!0;for(const r of _(this,hn).keys()){for(var e=r,n=!1;e.parent!==null;){if(_(this,We).has(e)){n=!0;break}e=e.parent}if(!n)return!0}return!1},jr=function(){var l,u,c,v;if(ft(this,pr,!0),Ka++>1e3&&(Et(this,Tt,Hr).call(this),lc()),R)for(const f of this.current.keys())Ts.add(f);for(const f of _(this,vn))_(this,je).delete(f),Lt(f,Gt),this.schedule(f);for(const f of _(this,je))Lt(f,Ge),this.schedule(f);const e=_(this,oe);ft(this,oe,[]),this.apply();var n=ar=[],r=[],i=Ki=[];for(const f of e)try{Et(this,Tt,Ws).call(this,f,n,r)}catch(d){throw ul(f),Et(this,Tt,Ks).call(this)||this.discard(),d}if(nt=null,i.length>0){var s=ds.ensure();for(const f of i)s.schedule(f)}if(ar=null,Ki=null,Et(this,Tt,Ks).call(this)){Et(this,Tt,sr).call(this,r),Et(this,Tt,sr).call(this,n);for(const[f,d]of _(this,We))ll(f,d);i.length>0&&Et(l=nt,Tt,jr).call(l);return}const a=Et(this,Tt,sl).call(this);if(a){Et(this,Tt,sr).call(this,r),Et(this,Tt,sr).call(this,n),Et(u=a,Tt,al).call(u,this);return}_(this,vn).clear(),_(this,je).clear();for(const f of _(this,gr))f(this);_(this,gr).clear(),cr=this,Wa(r),Wa(n),cr=null,(c=_(this,mr))==null||c.resolve();var o=nt;if(_(this,yr)===0&&(_(this,oe).length===0||o!==null)&&Et(this,Tt,Hr).call(this),_(this,oe).length>0)if(o!==null){const f=o;_(f,oe).push(..._(this,oe).filter(d=>!_(f,oe).includes(d)))}else o=this;o!==null&&(nn.clear(),Et(v=o,Tt,jr).call(v))},Ws=function(e,n,r){e.f^=Jt;for(var i=e.first;i!==null;){var s=i.f,a=(s&(Re|mn))!==0,o=a&&(s&Jt)!==0,l=o||(s&fe)!==0||_(this,We).has(i);if(!l&&i.fn!==null){a?i.f^=Jt:(s&xr)!==0?n.push(i):Ri(i)&&((s&Be)!==0&&_(this,je).add(i),Sr(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}},sl=function(){for(var e=_(this,Mn);e!==null;){if(!e.is_fork){for(const[n,[,r]]of this.current)if(e.current.has(n)&&!r)return e}e=_(e,Mn)}return null},al=function(e){var r;for(const[i,s]of e.current)!this.previous.has(i)&&e.previous.has(i)&&this.previous.set(i,e.previous.get(i)),this.current.set(i,s);for(const[i,s]of e.async_deriveds){const a=this.async_deriveds.get(i);a&&s.promise.then(a.resolve).catch(a.reject)}e.async_deriveds.clear(),this.transfer_effects(_(e,vn),_(e,je));const n=i=>{var s=i.reactions;if(s!==null&&!((i.f&te)!==0&&(i.f&(Gt|Ge))===0))for(const l of s){var a=l.f;if((a&te)!==0)n(l);else{var o=l;a&(Xn|Be)&&!this.async_deriveds.has(o)&&(_(this,je).delete(o),Lt(o,Gt),this.schedule(o))}}};for(const i of this.current.keys())n(i);this.oncommit(()=>e.discard()),Et(r=e,Tt,Hr).call(r),nt=this,Et(this,Tt,jr).call(this)},sr=function(e){for(var n=0;n<e.length;n+=1)Zo(e[n],_(this,vn),_(this,je))},ac=function(){var v;for(let f=qs;f!==null;f=_(f,Vn)){var e=f.id<this.id,n=[];for(const[d,[m,g]]of this.current){if(f.current.has(d)){var r=f.current.get(d)[0];if(e&&m!==r)f.current.set(d,[m,g]);else continue}n.push(d)}if(e)for(const[d,m]of this.async_deriveds){const g=f.async_deriveds.get(d);g&&m.promise.then(g.resolve).catch(g.reject)}var i=[...f.current.keys()].filter(d=>!f.current.get(d)[1]);if(!(!_(f,pr)||i.length===0)){var s=i.filter(d=>!this.current.has(d));if(s.length===0)e&&f.discard();else if(n.length>0){if(R&&!_(f,Sn)&&Ku(_(f,oe).length===0,"Batch has scheduled roots"),e)for(const d of _(this,wr))f.unskip_effect(d,m=>{var g;(m.f&(Be|Xn))!==0?f.schedule(m):Et(g=f,Tt,sr).call(g,[m])});f.activate();var a=new Set,o=new Map;for(var l of n)ol(l,s,a,o);o=new Map;var u=[...f.current].filter(([d,m])=>{const g=this.current.get(d);return g?g[0]!==m[0]||g[1]!==m[1]:!0}).map(([d])=>d);if(u.length>0)for(const d of _(this,oi))(d.f&(ke|fe|Jr))===0&&xa(d,u,o)&&((d.f&(Xn|Be))!==0?(Lt(d,Gt),f.schedule(d)):_(f,vn).add(d));if(_(f,oe).length>0&&!_(f,Sn)){f.apply();for(var c of _(f,oe))Et(v=f,Tt,Ws).call(v,c,[],[]);ft(f,oe,[])}f.deactivate()}}}},Hr=function(){if(this.linked){var e=_(this,Mn),n=_(this,Vn);e===null?qs=n:ft(e,Vn,n),n===null?ir=e:ft(n,Mn,e),this.linked=!1}};let Zn=ds;function oc(t){var e=Xr;Xr=!0;try{for(var n;;){if(Wu(),nt===null)return n;nt.flush()}}finally{Xr=e}}function lc(){if(R){var t=new Map;for(const n of nt.current.keys())for(const[r,i]of n.updated??[]){var e=t.get(r);e||(e={error:i.error,count:0},t.set(r,e)),e.count+=i.count}for(const n of t.values())n.error&&console.error(n.error)}try{zu()}catch(n){R&&Tn(n,"stack",{value:""}),tn(n,Us)}}let Fe=null;function Wa(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(ke|fe))===0&&Ri(r)&&(Fe=new Set,Sr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&wl(r),(Fe==null?void 0:Fe.size)>0)){nn.clear();for(const i of Fe){if((i.f&(ke|fe))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Fe.has(a)&&(Fe.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&(ke|fe))===0&&Sr(l)}}Fe.clear()}}Fe=null}}function ol(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const i of t.reactions){const s=i.f;(s&te)!==0?ol(i,e,n,r):(s&(Xn|Be))!==0&&(s&Gt)===0&&xa(i,e,r)&&(Lt(i,Gt),ka(i))}}function xa(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const i of t.deps){if(Wr.call(e,i))return!0;if((i.f&te)!==0&&xa(i,e,n))return n.set(i,!0),!0}return n.set(t,!1),!1}function ka(t){nt.schedule(t)}function ll(t,e){if(!((t.f&Re)!==0&&(t.f&Jt)!==0)){(t.f&Gt)!==0?e.d.push(t):(t.f&Ge)!==0&&e.m.push(t),Lt(t,Jt);for(var n=t.first;n!==null;)ll(n,e),n=n.next}}function ul(t){Lt(t,Jt);for(var e=t.first;e!==null;)ul(e),e=e.next}let Er=new Set;const nn=new Map;function Ja(t){Er=t}let Ea=!1;function uc(){Ea=!0}function tr(t,e){var n={f:0,v:t,reactions:null,equals:Bo,rv:0,wv:0};return n}function dt(t,e){const n=tr(t);return kl(n),n}function cc(t,e=!1,n=!0){const r=tr(t);return e||(r.equals=Go),r}function O(t,e,n=!1){mt!==null&&(!Ie||(mt.f&Jr)!==0)&&Wo()&&(mt.f&(te|Be|Xn|Jr))!==0&&(sn===null||!sn.has(t))&&Gu();let r=n?Fn(e):e;return R&&Uo(r,t.label),Mr(t,r,Ki)}function Mr(t,e,n=null){var i;if(!t.equals(e)){In?nn.set(t,e):nn.has(t)||nn.set(t,t.v);var r=Zn.ensure();if(r.capture(t,e),R){if(wt!==null){t.updated??(t.updated=new Map);const s=(((i=t.updated.get(""))==null?void 0:i.count)??0)+1;if(t.updated.set("",{error:null,count:s}),s>5){const a=Ko("updated at");if(a!==null){let o=t.updated.get(a.stack);o||(o={error:a,count:0},t.updated.set(a.stack,o)),o.count++}}}wt!==null&&(t.set_during_effect=!0)}if((t.f&te)!==0){const s=t;(t.f&Gt)!==0&&ba(s),ne===null&&ma(s)}t.wv=Ml(),fl(t,Gt,n),wt!==null&&(wt.f&Jt)!==0&&(wt.f&(Re|mn))===0&&($e===null?Sc([t]):$e.push(t)),!r.is_fork&&Er.size>0&&!Ea&&cl()}return e}function cl(){Ea=!1;for(const t of Er){(t.f&Jt)!==0&&Lt(t,Ge);let e;try{e=Ri(t)}catch{e=!0}e&&Sr(t)}Er.clear()}function Ur(t){O(t,t.v+1)}function fl(t,e,n){var r=t.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var a=r[s],o=a.f,l=(o&Gt)===0;if(l&&Lt(a,e),(o&Jr)!==0)Er.add(a);else if((o&te)!==0){var u=a;ne==null||ne.delete(u),(o&On)===0&&(o&Ce&&(wt===null||(wt.f&Qr)===0)&&(a.f|=On),fl(u,Ge,n))}else if(l){var c=a;(o&Be)!==0&&Fe!==null&&Fe.add(c),n!==null?n.push(c):ka(c)}}}const fc=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Fn(t){if(typeof t!="object"||t===null||ur in t||jo in t)return t;const e=Fo(t);if(e!==du&&e!==hu)return t;var n=new Map,r=ps(t),i=dt(0),s=Kn,a=c=>{if(Kn===s)return c();var v=mt,f=Kn;Pe(null),Za(s);var d=c();return Pe(v),Za(f),d};r&&(n.set("length",dt(t.length)),R&&(t=hc(t)));var o="";let l=!1;function u(c){if(!l){l=!0,o=c,ze(i,`${o} version`);for(const[v,f]of n)ze(f,Rn(o,v));l=!1}}return new Proxy(t,{defineProperty(c,v,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Vu();var d=n.get(v);return d===void 0?a(()=>{var m=dt(f.value);return n.set(v,m),R&&typeof v=="string"&&ze(m,Rn(o,v)),m}):O(d,f.value,!0),!0},deleteProperty(c,v){var f=n.get(v);if(f===void 0){if(v in c){const d=a(()=>dt(Kt));n.set(v,d),Ur(i),R&&ze(d,Rn(o,v))}}else O(f,Kt),Ur(i);return!0},get(c,v,f){var p;if(v===ur)return t;if(R&&v===Ho)return u;var d=n.get(v),m=v in c;if(d===void 0&&(!m||(p=lr(c,v))!=null&&p.writable)&&(d=a(()=>{var y=Fn(m?c[v]:Kt),$=dt(y);return R&&ze($,Rn(o,v)),$}),n.set(v,d)),d!==void 0){var g=h(d);return g===Kt?void 0:g}return Reflect.get(c,v,f)},getOwnPropertyDescriptor(c,v){var f=Reflect.getOwnPropertyDescriptor(c,v);if(f&&"value"in f){var d=n.get(v);d&&(f.value=h(d))}else if(f===void 0){var m=n.get(v),g=m==null?void 0:m.v;if(m!==void 0&&g!==Kt)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return f},has(c,v){var g;if(v===ur)return!0;var f=n.get(v),d=f!==void 0&&f.v!==Kt||Reflect.has(c,v);if(f!==void 0||wt!==null&&(!d||(g=lr(c,v))!=null&&g.writable)){f===void 0&&(f=a(()=>{var p=d?Fn(c[v]):Kt,y=dt(p);return R&&ze(y,Rn(o,v)),y}),n.set(v,f));var m=h(f);if(m===Kt)return!1}return d},set(c,v,f,d){var F;var m=n.get(v),g=v in c;if(r&&v==="length")for(var p=f;p<m.v;p+=1){var y=n.get(p+"");y!==void 0?O(y,Kt):p in c&&(y=a(()=>dt(Kt)),n.set(p+"",y),R&&ze(y,Rn(o,p)))}if(m===void 0)(!g||(F=lr(c,v))!=null&&F.writable)&&(m=a(()=>dt(void 0)),R&&ze(m,Rn(o,v)),O(m,Fn(f)),n.set(v,m));else{g=m.v!==Kt;var $=a(()=>Fn(f));O(m,$)}var q=Reflect.getOwnPropertyDescriptor(c,v);if(q!=null&&q.set&&q.set.call(d,f),!g){if(r&&typeof v=="string"){var x=n.get("length"),T=Number(v);Number.isInteger(T)&&T>=x.v&&O(x,T+1)}Ur(i)}return!0},ownKeys(c){h(i);var v=Reflect.ownKeys(c).filter(m=>{var g=n.get(m);return g===void 0||g.v!==Kt});for(var[f,d]of n)d.v!==Kt&&!(f in c)&&v.push(f);return v},setPrototypeOf(){Bu()}})}function Rn(t,e){return typeof e=="symbol"?`${t}[Symbol(${e.description??""})]`:fc.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Kr(t){try{if(t!==null&&typeof t=="object"&&ur in t)return t[ur]}catch{}return t}function dl(t,e){return Object.is(Kr(t),Kr(e))}const dc=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function hc(t){return new Proxy(t,{get(e,n,r){var i=Reflect.get(e,n,r);return dc.has(n)?function(...s){uc();var a=i.apply(this,s);return cl(),a}:i}})}function vc(){const t=Array.prototype,e=Array.__svelte_cleanup;e&&e();const{indexOf:n,lastIndexOf:r,includes:i}=t;t.indexOf=function(s,a){const o=n.call(this,s,a);if(o===-1){for(let l=a??0;l<this.length;l+=1)if(Kr(this[l])===s){$s("array.indexOf(...)");break}}return o},t.lastIndexOf=function(s,a){const o=r.call(this,s,a??this.length-1);if(o===-1){for(let l=0;l<=(a??this.length-1);l+=1)if(Kr(this[l])===s){$s("array.lastIndexOf(...)");break}}return o},t.includes=function(s,a){const o=i.call(this,s,a);if(!o){for(let l=0;l<this.length;l+=1)if(Kr(this[l])===s){$s("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{t.indexOf=n,t.lastIndexOf=r,t.includes=i}}var Js,Ma,hl,vl;function pc(){if(Js===void 0){Js=window,Ma=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;hl=lr(e,"firstChild").get,vl=lr(e,"nextSibling").get,Ba(t)&&(t[Ys]=void 0,t[Xi]=null,t[Xs]=void 0,t.__e=void 0),Ba(n)&&(n[Lr]=void 0),R&&(t.__svelte_meta=null,vc())}}function Nn(t=""){return document.createTextNode(t)}function ti(t){return hl.call(t)}function Ci(t){return vl.call(t)}function z(t,e){return ti(t)}function rn(t,e=!1){{var n=ti(t);return n instanceof Comment&&n.data===""?Ci(n):n}}function lt(t,e=!1){return ti(t)}function M(t,e=1,n=!1){let r=t;for(;e--;)r=Ci(r);return r}function gc(t){t.textContent=""}function pl(){return!1}function _c(t,e,n){return n?document.createElement(t,{is:n}):document.createElement(t)}const Qs=new WeakMap;function yc(t){var e=wt;if(e===null)return mt.f|=qn,t;if(R&&t instanceof Error&&!Qs.has(t)&&Qs.set(t,mc(t,e)),(e.f&qr)===0&&(e.f&xr)===0)throw R&&!e.parent&&t instanceof Error&&gl(t),t;tn(t,e)}function tn(t,e){if(!(e!==null&&(e.f&ke)!==0)){for(;e!==null;){if((e.f&Gs)!==0&&(e.f&(ke|ns))===0){if((e.f&qr)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw R&&t instanceof Error&&gl(t),t}}function mc(t,e){var a,o,l;const n=lr(t,"message");if(!(n&&!n.configurable)){for(var r=Ma?" ":" ",i=`
|
|
29
|
+
${r}in ${((a=e.fn)==null?void 0:a.name)||"<unknown>"}`,s=e.ctx;s!==null;)i+=`
|
|
30
|
+
${r}in ${(o=s.function)==null?void 0:o[Su].split("/").pop()}`,s=s.p;return{message:t.message+`
|
|
31
|
+
${i}
|
|
32
|
+
`,stack:(l=t.stack)==null?void 0:l.split(`
|
|
33
|
+
`).filter(u=>!u.includes("svelte/src/internal")).join(`
|
|
34
|
+
`)}}}function gl(t){const e=Qs.get(t);e&&(Tn(t,"message",{value:e.message}),Tn(t,"stack",{value:e.stack}))}function wc(t){wt===null&&(mt===null&&Lu(t),Fu()),In&&Du(t)}function bc(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function bn(t,e){var n=wt;if(R)for(;n!==null&&(n.f&Jr)!==0;)n=n.parent;n!==null&&(n.f&fe)!==0&&(t|=fe);var r={ctx:jt,deps:null,nodes:null,f:t|Gt|Ce,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};R&&(r.component_function=Ii),nt==null||nt.register_created_effect(r);var i=r;if((t&xr)!==0)ar!==null?ar.push(r):Zn.ensure().schedule(r);else if(e!==null){try{Sr(r)}catch(a){throw ye(r),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Nr)===0&&(i=i.first,(t&Be)!==0&&(t&Qn)!==0&&i!==null&&(i.f|=Qn))}if(i!==null&&(i.parent=n,n!==null&&bc(i,n),mt!==null&&(mt.f&te)!==0&&(t&mn)===0)){var s=mt;(s.effects??(s.effects=[])).push(i)}return r}function Sa(){return mt!==null&&!Ie}function $a(t){const e=bn(_s,null);return Lt(e,Jt),e.teardown=t,e}function pn(t){wc("$effect"),R&&Tn(t,"name",{value:"$effect"});var e=wt.f,n=!mt&&(e&Re)!==0&&jt!==null&&!jt.i;if(n){var r=jt;(r.e??(r.e=[])).push(t)}else return _l(t)}function _l(t){return bn(xr|_u,t)}function xc(t){Zn.ensure();const e=bn(mn|Nr,t);return(n={})=>new Promise(r=>{n.outro?Un(e,()=>{ye(e),r(void 0)}):(ye(e),r(void 0))})}function yl(t){return bn(xr,t)}function kc(t){return bn(Xn|Nr,t)}function Aa(t,e=0){return bn(_s|e,t)}function gt(t,e=[],n=[],r=[]){Zu(r,e,n,i=>{bn(_s,()=>{t(...i.map(h))})})}function ys(t,e=0){var n=bn(Be|e,t);return R&&(n.dev_stack=Zr),n}function Ne(t){return bn(Re|Nr,t)}function ml(t){var e=t.teardown;if(e!==null){const n=In,r=mt;Qa(!0),Pe(null);try{e.call(null)}catch(i){tn(i,t.parent)}finally{Qa(n),Pe(r)}}}function qa(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&Ir(()=>{i.abort(Ni)});var r=n.next;(n.f&mn)!==0?n.parent=null:ye(n,e),n=r}}function Ec(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&Re)===0&&ye(e),e=n}}function ye(t,e=!0){var n=!1;(e||(t.f&gu)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(Mc(t.nodes.start,t.nodes.end),n=!0),t.f|=ns,qa(t,e&&!n),ei(t,0);var r=t.nodes&&t.nodes.t;if(r!==null)for(const s of r)s.stop();ml(t),t.f^=ns,t.f|=ke;var i=t.parent;i!==null&&i.first!==null&&wl(t),R&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Mc(t,e){for(;t!==null;){var n=t===e?null:Ci(t);t.remove(),t=n}}function wl(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Un(t,e,n=!0){var r=[];t.f|=_a,bl(t,r,!0);var i=()=>{n&&ye(t),e&&e()},s=r.length;if(s>0){var a=()=>--s||i();for(var o of r)o.out(a)}else i()}function bl(t,e,n){if((t.f&fe)===0){t.f^=fe;var r=t.nodes&&t.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&e.push(o);for(var i=t.first;i!==null;){var s=i.next;if((i.f&mn)===0){var a=(i.f&Qn)!==0||(i.f&Re)!==0&&(t.f&Be)!==0;bl(i,e,a?n:!1)}i=s}}}function ss(t){t.f&=~_a,xl(t,!0)}function xl(t,e){if((t.f&_a)===0&&(t.f&fe)!==0){t.f^=fe,(t.f&Jt)===0&&(Lt(t,Gt),Zn.ensure().schedule(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&Qn)!==0||(n.f&Re)!==0;xl(n,i?e:!1),n=r}var s=t.nodes&&t.nodes.t;if(s!==null)for(const a of s)(a.is_global||e)&&a.in()}}function Na(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var i=n===r?null:Ci(n);e.append(n),n=i}}let Wi=!1,In=!1;function Qa(t){In=t}let mt=null,Ie=!1;function Pe(t){mt=t}let wt=null;function Ye(t){wt=t}let sn=null;function kl(t){mt!==null&&(sn??(sn=new Set)).add(t)}let re=null,ge=0,$e=null;function Sc(t){$e=t}let El=1,Ln=0,Kn=Ln;function Za(t){Kn=t}function Ml(){return++El}function Ri(t){var e=t.f;if((e&Gt)!==0)return!0;if(e&te&&(t.f&=~On),(e&Ge)!==0){for(var n=t.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Ri(s)&&rl(s),s.wv>t.wv)return!0}(e&Ce)!==0&&ne===null&&Lt(t,Jt)}return!1}function Sl(t,e,n=!0){var r=t.reactions;if(r!==null&&!(sn!==null&&sn.has(t)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&te)!==0?Sl(s,e,!1):e===s&&(n?Lt(s,Gt):(s.f&Jt)!==0&&Lt(s,Ge),ka(s))}}function Zs(t){var e=re,n=ge,r=$e,i=mt,s=sn,a=jt,o=Ie,l=Kn,u=t.f;re=null,ge=0,$e=null,mt=(u&(Re|mn))===0?t:null,sn=null,kr(t.ctx),Ie=!1,Kn=++Ln,t.ac!==null&&(Ir(()=>{t.ac.abort(Ni)}),t.ac=null);try{t.f|=Qr;var c=t.fn,v=c();t.f|=qr;var f=to(t);if(Wo()&&$e!==null&&!Ie&&f!==null&&(t.f&(te|Ge|Gt))===0)for(var d=0;d<$e.length;d++)Sl($e[d],t);if(i!==null&&i!==t){if(Ln++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=Ln;if(e!==null)for(const m of e)m.rv=Ln;$e!==null&&(r===null?r=$e:r.push(...$e))}return(t.f&qn)!==0&&(t.f^=qn),v}catch(m){return to(t),yc(m)}finally{t.f^=Qr,re=e,ge=n,$e=r,mt=i,sn=s,kr(a),Ie=o,Kn=l}}function to(t){var i;var e=t.deps,n=nt==null?void 0:nt.is_fork;if(re!==null){var r;if(n||ei(t,ge),e!==null&&ge>0)for(e.length=ge+re.length,r=0;r<re.length;r++)e[ge+r]=re[r];else t.deps=e=re;if(Sa()&&(t.f&Ce)!==0)for(r=ge;r<e.length;r++)((i=e[r]).reactions??(i.reactions=[])).push(t)}else!n&&e!==null&&ge<e.length&&(ei(t,ge),e.length=ge);return e}function $c(t,e){let n=e.reactions;if(n!==null){var r=cu.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(e.f&te)!==0&&(re===null||!Wr.call(re,e))){var s=e;(s.f&Ce)!==0&&(s.f^=Ce,s.f&=~On),s.v!==Kt&&ma(s),s.ac!==null&&Ir(()=>{s.ac.abort(Ni),s.ac=null,Lt(s,Gt)}),ic(s),ei(s,0)}}function ei(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)$c(t,n[r])}function Sr(t){var e=t.f;if((e&ke)===0){Lt(t,Jt);var n=wt,r=Wi;if(wt=t,Wi=(e&(Re|mn))===0,R){var i=Ii;Ya(t.component_function);var s=Zr;rs(t.dev_stack??Zr)}try{(e&(Be|zo))!==0?Ec(t):qa(t),ml(t);var a=Zs(t);t.teardown=typeof a=="function"?a:null,t.wv=El;var o;R&&Xu&&(t.f&Gt)!==0&&t.deps}finally{Wi=r,wt=n,R&&(Ya(i),rs(s))}}}async function Ac(){await Promise.resolve(),oc()}function h(t){var e=t.f,n=(e&te)!==0;if(mt!==null&&!Ie){var r=wt!==null&&(wt.f&ke)!==0;if(!r&&(sn===null||!sn.has(t))){var i=mt.deps;if((mt.f&Qr)!==0)t.rv<Ln&&(t.rv=Ln,re===null&&i!==null&&i[ge]===t?ge++:re===null?re=[t]:re.push(t));else{mt.deps??(mt.deps=[]),Wr.call(mt.deps,t)||mt.deps.push(t);var s=t.reactions;s===null?t.reactions=[mt]:Wr.call(s,mt)||s.push(mt)}}}if(R){if(!Ie&&Oe&&nt===null&&cr===null&&!Oe.warned&&(Oe.effect.f&Qr)===0&&!Oe.effect_deps.has(t)){Oe.warned=!0,Au(t.label);var a=Ko("traced at");a&&console.warn(a)}ec.delete(t)}if(In&&nn.has(t))return nn.get(t);if(n){var o=t;if(In){var l=o.v;return((o.f&Jt)===0&&o.reactions!==null||Al(o))&&(l=ba(o)),nn.set(o,l),l}var u=(o.f&Ce)===0&&!Ie&&mt!==null&&(Wi||(mt.f&Ce)!==0),c=(o.f&qr)===0;Ri(o)&&(u&&(o.f|=Ce),rl(o)),u&&!c&&(il(o),$l(o))}if(ne!=null&&ne.has(t))return ne.get(t);if((t.f&qn)!==0)throw t.v;return t.v}function $l(t){if(t.f|=Ce,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),(e.f&te)!==0&&(e.f&Ce)===0&&(il(e),$l(e))}function Al(t){if(t.v===Kt)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(nn.has(e)||(e.f&te)!==0&&Al(e))return!0;return!1}function Pi(t){var e=Ie;try{return Ie=!0,t()}finally{Ie=e}}const qc=["touchstart","touchmove"];function Nc(t){return qc.includes(t)}const zn=Symbol("events"),ql=new Set,ta=new Set;function Tc(t,e,n,r={}){function i(s){if(r.capture||ea.call(e,s),!s.cancelBubble)return Ir(()=>n==null?void 0:n.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?_n(()=>{e.addEventListener(t,i,r)}):e.addEventListener(t,i,r),i}function Nl(t,e,n,r,i){var s={capture:r,passive:i},a=Tc(t,e,n,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&$a(()=>{e.removeEventListener(t,a,s)})}function vt(t,e,n){(e[zn]??(e[zn]={}))[t]=n}function nr(t){for(var e=0;e<t.length;e++)ql.add(t[e]);for(var n of ta)n(t)}let Os=null,Is=!1;function ea(t){var g,p;var e=this,n=e.ownerDocument,r=t.type,i=((g=t.composedPath)==null?void 0:g.call(t))||[],s=i[0]||t.target;Os=t,Is||(Is=!0,setTimeout(()=>{Is=!1,Os=null}));var a=0,o=Os===t&&t[zn];if(o){var l=i.indexOf(o);if(l!==-1&&(e===document||e===window)){t[zn]=e;return}var u=i.indexOf(e);if(u===-1)return;l<=u&&(a=l)}if(s=i[a]||t.target,s!==e){Tn(t,"currentTarget",{configurable:!0,get(){return s||n}});var c=mt,v=wt;Pe(null),Ye(null);try{for(var f,d=[];s!==null&&s!==e;){try{var m=(p=s[zn])==null?void 0:p[r];m!=null&&(!s.disabled||t.target===s)&&m.call(s,t)}catch(y){f?d.push(y):f=y}if(t.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(f){for(let y of d)queueMicrotask(()=>{throw y});throw f}}finally{t[zn]=e,delete t.currentTarget,Pe(c),Ye(v)}}}var Po;const Cs=((Po=globalThis==null?void 0:globalThis.window)==null?void 0:Po.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Oc(t){return(Cs==null?void 0:Cs.createHTML(t))??t}function Ic(t){var e=_c("template");return e.innerHTML=Oc(t.replaceAll("<!>","<!---->")),e.content}function na(t,e){var n=wt;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function et(t,e){var n=(e&Eu)!==0,r=(e&Mu)!==0,i,s=!t.startsWith("<!>");return()=>{i===void 0&&(i=Ic(s?t:"<!>"+t),n||(i=ti(i)));var a=r||Ma?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=ti(a),l=a.lastChild;na(o,l)}else na(a,a);return a}}function ms(){var t=document.createDocumentFragment(),e=document.createComment(""),n=Nn();return t.append(e,n),na(e,n),t}function Y(t,e){t!==null&&t.before(e)}function Cc(t){let e=0,n=tr(0),r;return R&&ze(n,"createSubscriber version"),()=>{Sa()&&(h(n),Aa(()=>(e===0&&(r=Pi(()=>t(()=>Ur(n)))),e+=1,()=>{_n(()=>{e-=1,e===0&&(r==null||r(),r=void 0,Ur(n))})})))}}var Rc=Qn|Nr;function Pc(t,e,n,r){new Dc(t,e,n,r)}var Ae,ga,qe,Bn,le,we,ue,be,Je,Gn,$n,br,li,ui,Qe,hs,It,Fc,Lc,ra,zc,ia,Vr,Ji,sa,aa;class Dc{constructor(e,n,r,i){J(this,It);Bt(this,"parent");Bt(this,"is_pending",!1);Bt(this,"transform_error");J(this,Ae);J(this,ga,null);J(this,qe);J(this,Bn);J(this,le);J(this,we,null);J(this,ue,null);J(this,be,null);J(this,Je,null);J(this,Gn,0);J(this,$n,0);J(this,br,!1);J(this,li,new Set);J(this,ui,new Set);J(this,Qe,null);J(this,hs,Cc(()=>(ft(this,Qe,tr(_(this,Gn))),R&&ze(_(this,Qe),"$effect.pending()"),()=>{ft(this,Qe,null)})));var s;ft(this,Ae,e),ft(this,qe,n),ft(this,Bn,a=>{var o=wt;o.b=this,o.f|=Gs,r(a)}),this.parent=wt.b,this.transform_error=i??((s=this.parent)==null?void 0:s.transform_error)??(a=>a),ft(this,le,ys(()=>{Et(this,It,ia).call(this)},Rc))}defer_effect(e){Zo(e,_(this,li),_(this,ui))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!_(this,qe).pending}update_pending_count(e,n){Et(this,It,sa).call(this,e,n),ft(this,Gn,_(this,Gn)+e),!(!_(this,Qe)||_(this,br))&&(ft(this,br,!0),_n(()=>{ft(this,br,!1),_(this,Qe)&&Mr(_(this,Qe),_(this,Gn))}))}get_effect_pending(){return _(this,hs).call(this),h(_(this,Qe))}error(e){if(!_(this,qe).onerror&&!_(this,qe).failed)throw e;nt!=null&&nt.is_fork?(_(this,we)&&nt.skip_effect(_(this,we)),_(this,ue)&&nt.skip_effect(_(this,ue)),_(this,be)&&nt.skip_effect(_(this,be)),nt.oncommit(()=>{Et(this,It,aa).call(this,e)})):Et(this,It,aa).call(this,e)}}Ae=new WeakMap,ga=new WeakMap,qe=new WeakMap,Bn=new WeakMap,le=new WeakMap,we=new WeakMap,ue=new WeakMap,be=new WeakMap,Je=new WeakMap,Gn=new WeakMap,$n=new WeakMap,br=new WeakMap,li=new WeakMap,ui=new WeakMap,Qe=new WeakMap,hs=new WeakMap,It=new WeakSet,Fc=function(){try{ft(this,we,Ne(()=>_(this,Bn).call(this,_(this,Ae))))}catch(e){this.error(e)}},Lc=function(e){const n=_(this,qe).failed,{reset:r,invoke_onerror:i}=Et(this,It,ra).call(this,e);_n(i),n&&ft(this,be,Ne(()=>{n(_(this,Ae),()=>e,()=>r)}))},ra=function(e){var n=!1,r=!1;const i=()=>{if(n){Tu();return}n=!0,r&&Yu(),_(this,be)!==null&&Un(_(this,be),()=>{ft(this,be,null)}),Et(this,It,Ji).call(this,()=>{Et(this,It,ia).call(this)})};return{reset:i,invoke_onerror:()=>{var a,o;try{r=!0,(o=(a=_(this,qe)).onerror)==null||o.call(a,e,i),r=!1}catch(l){tn(l,_(this,le)&&_(this,le).parent)}}}},zc=function(){const e=_(this,qe).pending;e&&(this.is_pending=!0,ft(this,ue,Ne(()=>e(_(this,Ae)))),_n(()=>{var n=ft(this,Je,document.createDocumentFragment()),r=Nn(),i=!1;if(n.append(r),ft(this,we,Et(this,It,Ji).call(this,()=>{try{return Ne(()=>_(this,Bn).call(this,r))}catch(s){try{this.error(s),i=!0}catch(a){tn(a,_(this,le).parent)}return null}})),_(this,we)===null){ft(this,Je,null),i&&Et(this,It,Vr).call(this,nt);return}_(this,$n)===0&&(_(this,Ae).before(n),ft(this,Je,null),Un(_(this,ue),()=>{ft(this,ue,null)}),Et(this,It,Vr).call(this,nt))}))},ia=function(){try{if(this.is_pending=this.has_pending_snippet(),ft(this,$n,0),ft(this,Gn,0),ft(this,we,Ne(()=>{_(this,Bn).call(this,_(this,Ae))})),_(this,$n)>0){var e=ft(this,Je,document.createDocumentFragment());Na(_(this,we),e);const n=_(this,qe).pending;ft(this,ue,Ne(()=>n(_(this,Ae))))}else Et(this,It,Vr).call(this,nt)}catch(n){this.error(n)}},Vr=function(e){this.is_pending=!1,e.transfer_effects(_(this,li),_(this,ui))},Ji=function(e){var n=wt,r=mt,i=jt;Ye(_(this,le)),Pe(_(this,le)),kr(_(this,le).ctx);try{return Zn.ensure(),e()}finally{Ye(n),Pe(r),kr(i)}},sa=function(e,n){var r;if(!this.has_pending_snippet()){this.parent&&Et(r=this.parent,It,sa).call(r,e,n);return}ft(this,$n,_(this,$n)+e),_(this,$n)===0&&(Et(this,It,Vr).call(this,n),_(this,ue)&&Un(_(this,ue),()=>{ft(this,ue,null)}),_(this,Je)&&(_(this,Ae).before(_(this,Je)),ft(this,Je,null)))},aa=function(e){_(this,we)&&(ye(_(this,we)),ft(this,we,null)),_(this,ue)&&(ye(_(this,ue)),ft(this,ue,null)),_(this,be)&&(ye(_(this,be)),ft(this,be,null));let n=_(this,qe).failed;const r=i=>{const{reset:s,invoke_onerror:a}=Et(this,It,ra).call(this,i);a(),n&&ft(this,be,Et(this,It,Ji).call(this,()=>{try{return Ne(()=>{var o=wt;o.b=this,o.f|=Gs,n(_(this,Ae),()=>i,()=>s)})}catch(o){return tn(o,_(this,le).parent),null}}))};_n(()=>{var i;try{i=this.transform_error(e)}catch(s){tn(s,_(this,le)&&_(this,le).parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(r,s=>tn(s,_(this,le)&&_(this,le).parent)):r(i)})};function rt(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t[Lr]??(t[Lr]=t.nodeValue))&&(t[Lr]=n,t.nodeValue=`${n}`)}function jc(t,e){return Hc(t,e)}const zi=new Map;function Hc(t,{target:e,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:o}){pc();var l=void 0,u=xc(()=>{var c=n??e.appendChild(Nn());Pc(c,{pending:()=>{}},d=>{Tr({});var m=jt;s&&(m.c=s),i&&(r.$$events=i),l=t(d,r)||ya(),Or()},o);var v=new Set,f=d=>{for(var m=0;m<d.length;m++){var g=d[m];if(!v.has(g)){v.add(g);var p=Nc(g);for(const q of[e,document]){var y=zi.get(q);y===void 0&&(y=new Map,zi.set(q,y));var $=y.get(g);$===void 0?(q.addEventListener(g,ea,{passive:p}),y.set(g,1)):y.set(g,$+1)}}}};return f(gs(ql)),ta.add(f),()=>{var p;for(var d of v)for(const y of[e,document]){var m=zi.get(y),g=m.get(d);--g==0?(y.removeEventListener(d,ea),m.delete(d),m.size===0&&zi.delete(y)):m.set(d,g)}ta.delete(f),c!==n&&((p=c.parentNode)==null||p.removeChild(c))}});return Vc.set(l,u),l}let Vc=new WeakMap;var He,Ze,xe,Yn,ci,fi,vs;class Tl{constructor(e,n=!0){Bt(this,"anchor");J(this,He,new Map);J(this,Ze,new Map);J(this,xe,new Map);J(this,Yn,new Set);J(this,ci,!0);J(this,fi,e=>{if(_(this,He).has(e)){var n=_(this,He).get(e),r=_(this,Ze).get(n);if(r)ss(r),_(this,Yn).delete(n);else{var i=_(this,xe).get(n);i&&(ss(i.effect),_(this,Ze).set(n,i.effect),_(this,xe).delete(n),R&&(i.fragment.lastChild[mu]=this.anchor),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,a]of _(this,He)){if(_(this,He).delete(s),s===e)break;const o=_(this,xe).get(a);o&&(ye(o.effect),_(this,xe).delete(a))}for(const[s,a]of _(this,Ze)){if(s===n||_(this,Yn).has(s))continue;const o=()=>{if(Array.from(_(this,He).values()).includes(s)){var u=document.createDocumentFragment();Na(a,u),u.append(Nn()),_(this,xe).set(s,{effect:a,fragment:u})}else ye(a);_(this,Yn).delete(s),_(this,Ze).delete(s)};_(this,ci)||!r?(_(this,Yn).add(s),Un(a,o,!1)):o()}}});J(this,vs,e=>{_(this,He).delete(e);const n=Array.from(_(this,He).values());for(const[r,i]of _(this,xe))n.includes(r)||(ye(i.effect),_(this,xe).delete(r))});this.anchor=e,ft(this,ci,n)}ensure(e,n){var r=nt,i=pl();if(n&&!_(this,Ze).has(e)&&!_(this,xe).has(e))if(i){var s=document.createDocumentFragment(),a=Nn();s.append(a),_(this,xe).set(e,{effect:Ne(()=>n(a)),fragment:s})}else _(this,Ze).set(e,Ne(()=>n(this.anchor)));if(_(this,He).set(r,e),i){for(const[o,l]of _(this,Ze))o===e?r.unskip_effect(l):r.skip_effect(l);for(const[o,l]of _(this,xe))o===e?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(_(this,fi)),r.ondiscard(_(this,vs))}else _(this,fi).call(this,r)}}He=new WeakMap,Ze=new WeakMap,xe=new WeakMap,Yn=new WeakMap,ci=new WeakMap,fi=new WeakMap,vs=new WeakMap;function Mt(t,e,n=!1){var r=new Tl(t),i=n?Qn:0;function s(a,o){r.ensure(a,o)}ys(()=>{var a=!1;e((o,l=0)=>{a=!0,s(l,o)}),a||s(-1,null)},i)}function Bc(t,e,n){for(var r=[],i=e.length,s,a=e.length,o=0;o<i;o++){let v=e[o];Un(v,()=>{if(s){if(s.pending.delete(v),s.done.add(v),s.pending.size===0){var f=t.outrogroups;oa(t,gs(s.done)),f.delete(s),f.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=r.length===0&&n!==null&&t.pending.size===0;if(l){var u=n,c=u.parentNode;gc(c),c.append(u),t.items.clear()}oa(t,e,!l)}else s={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(s)}function oa(t,e,n=!0){var r;if(t.pending.size>0){r=new Set;for(const a of t.pending.values())for(const o of a)r.add(t.items.get(o).e)}for(var i=0;i<e.length;i++){var s=e[i];if(r!=null&&r.has(s)){s.f|=en;const a=document.createDocumentFragment();Na(s,a)}else ye(e[i],n)}}var eo;function gn(t,e,n,r,i,s=null){var a=t,o=new Map,l=(e&Vo)!==0;if(l){var u=t;a=u.appendChild(Nn())}var c=null,v=rc(()=>{var q=n();return ps(q)?q:q==null?[]:gs(q)});R&&ze(v,"{#each ...}");var f,d=new Map,m=!0;function g(q){($.effect.f&ke)===0&&($.pending.delete(q),$.fallback=c,Gc($,f,a,e,r),c!==null&&(f.length===0?(c.f&en)===0?ss(c):(c.f^=en,Br(c,null,a)):Un(c,()=>{c=null})))}function p(q){$.pending.delete(q)}var y=ys(()=>{f=h(v);for(var q=f.length,x=new Set,T=nt,F=pl(),L=0;L<q;L+=1){var K=f[L],it=r(K,L);if(R){var N=r(K,L);it!==N&&Pu(String(L),String(it),String(N))}var j=m?null:o.get(it);j?(j.v&&Mr(j.v,K),j.i&&Mr(j.i,L),F&&T.unskip_effect(j.e)):(j=Yc(o,m?a:eo??(eo=Nn()),K,it,L,i,e,n),m||(j.e.f|=en),o.set(it,j)),x.add(it)}if(q===0&&s&&!c&&(m?c=Ne(()=>s(a)):(c=Ne(()=>s(eo??(eo=Nn()))),c.f|=en)),q>x.size&&(R?Xc(f,r):Xo("","","")),!m)if(d.set(T,x),F){for(const[st,bt]of o)x.has(st)||T.skip_effect(bt.e);T.oncommit(g),T.ondiscard(p)}else g(T);h(v)}),$={effect:y,items:o,pending:d,outrogroups:null,fallback:c};m=!1}function Pr(t){for(;t!==null&&(t.f&Re)===0;)t=t.next;return t}function Gc(t,e,n,r,i){var N,j,st,bt,k,I,A,P,Q;var s=(r&xu)!==0,a=e.length,o=t.items,l=Pr(t.effect.first),u,c=null,v,f=[],d=[],m,g,p,y;if(s)for(y=0;y<a;y+=1)m=e[y],g=i(m,y),p=o.get(g).e,(p.f&en)===0&&((j=(N=p.nodes)==null?void 0:N.a)==null||j.measure(),(v??(v=new Set)).add(p));for(y=0;y<a;y+=1){if(m=e[y],g=i(m,y),p=o.get(g).e,t.outrogroups!==null)for(const V of t.outrogroups)V.pending.delete(p),V.done.delete(p);if((p.f&fe)!==0&&(ss(p),s&&((bt=(st=p.nodes)==null?void 0:st.a)==null||bt.unfix(),(v??(v=new Set)).delete(p))),(p.f&en)!==0)if(p.f^=en,p===l)Br(p,null,n);else{var $=c?c.next:l;p===t.effect.last&&(t.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),kn(t,c,p),kn(t,p,$),Br(p,$,n),c=p,f=[],d=[],l=Pr(c.next);continue}if(p!==l){if(u!==void 0&&u.has(p)){if(f.length<d.length){var q=d[0],x;c=q.prev;var T=f[0],F=f[f.length-1];for(x=0;x<f.length;x+=1)Br(f[x],q,n);for(x=0;x<d.length;x+=1)u.delete(d[x]);kn(t,T.prev,F.next),kn(t,c,T),kn(t,F,q),l=q,c=F,y-=1,f=[],d=[]}else u.delete(p),Br(p,l,n),kn(t,p.prev,p.next),kn(t,p,c===null?t.effect.first:c.next),kn(t,c,p),c=p;continue}for(f=[],d=[];l!==null&&l!==p;)(u??(u=new Set)).add(l),d.push(l),l=Pr(l.next);if(l===null)continue}(p.f&en)===0&&f.push(p),c=p,l=Pr(p.next)}if(t.outrogroups!==null){for(const V of t.outrogroups)V.pending.size===0&&(oa(t,gs(V.done)),(k=t.outrogroups)==null||k.delete(V));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||u!==void 0){var L=[];if(u!==void 0)for(p of u)(p.f&fe)===0&&L.push(p);for(;l!==null;)(l.f&fe)===0&&l!==t.fallback&&L.push(l),l=Pr(l.next);var K=L.length;if(K>0){var it=(r&Vo)!==0&&a===0?n:null;if(s){for(y=0;y<K;y+=1)(A=(I=L[y].nodes)==null?void 0:I.a)==null||A.measure();for(y=0;y<K;y+=1)(Q=(P=L[y].nodes)==null?void 0:P.a)==null||Q.fix()}Bc(t,L,it)}}s&&_n(()=>{var V,Z;if(v!==void 0)for(p of v)(Z=(V=p.nodes)==null?void 0:V.a)==null||Z.apply()})}function Yc(t,e,n,r,i,s,a,o){var l=(a&wu)!==0?(a&ku)===0?cc(n,!1,!1):tr(n):null,u=(a&bu)!==0?tr(i):null;return R&&l&&(l.trace=()=>{o()[(u==null?void 0:u.v)??i]}),{v:l,i:u,e:Ne(()=>(s(e,l??n,u??i,o),()=>{t.delete(r)}))}}function Br(t,e,n){if(t.nodes)for(var r=t.nodes.start,i=t.nodes.end,s=e&&(e.f&en)===0?e.nodes.start:n;r!==null;){var a=Ci(r);if(s.before(r),r===i)return;r=a}}function kn(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function Xc(t,e){const n=new Map,r=t.length;for(let i=0;i<r;i++){const s=e(t[i],i);if(n.has(s)){const a=String(n.get(s)),o=String(i);let l=String(s);l.startsWith("[object ")&&(l=null),Xo(a,o,l)}n.set(s,i)}}function Uc(t,e,...n){var r=new Tl(t);ys(()=>{const i=e()??null;R&&i==null&&ju(),r.ensure(i,i&&(s=>i(s,...n)))},Qn)}const no=[...`
|
|
35
|
+
\r\f \v\uFEFF`];function Kc(t,e,n){var r=t==null?"":""+t;if(n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,a=0;(a=r.indexOf(i,a))>=0;){var o=a+s;(a===0||no.includes(r[a-1]))&&(o===r.length||no.includes(r[o]))?r=(a===0?"":r.substring(0,a))+r.substring(o+1):a=o}}return r===""?null:r}function ro(t,e=!1){var n=e?" !important;":";",r="";for(var i of Object.keys(t)){var s=t[i];s!=null&&s!==""&&(r+=" "+i+": "+s+n)}return r}function Rs(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Wc(t,e){if(e){var n="",r,i;if(Array.isArray(e)?(r=e[0],i=e[1]):r=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var s=!1,a=0,o=!1,l=[];r&&l.push(...Object.keys(r).map(Rs)),i&&l.push(...Object.keys(i).map(Rs));var u=0,c=-1;const g=t.length;for(var v=0;v<g;v++){var f=t[v];if(o?f==="/"&&t[v-1]==="*"&&(o=!1):s?s===f&&(s=!1):f==="/"&&t[v+1]==="*"?o=!0:f==='"'||f==="'"?s=f:f==="("?a++:f===")"&&a--,!o&&s===!1&&a===0){if(f===":"&&c===-1)c=v;else if(f===";"||v===g-1){if(c!==-1){var d=Rs(t.substring(u,c).trim());if(!l.includes(d)){f!==";"&&v++;var m=t.substring(u,v).trim();n+=" "+m+";"}}u=v+1,c=-1}}}}return r&&(n+=ro(r)),i&&(n+=ro(i,!0)),n=n.trim(),n===""?null:n}return t==null?null:String(t)}function Se(t,e,n,r,i,s){var a=t[Ys];if(a!==n||a===void 0){var o=Kc(n,r,s);o==null?t.removeAttribute("class"):e?t.className=o:t.setAttribute("class",o),t[Ys]=n}else if(s&&i!==s)for(var l in s){var u=!!s[l];(i==null||u!==!!i[l])&&t.classList.toggle(l,u)}return s}function Ps(t,e={},n,r){for(var i in n){var s=n[i];e[i]!==s&&(n[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,r))}}function ws(t,e,n,r){var i=t[Xs];if(i!==e){var s=Wc(e,r);s==null?t.removeAttribute("style"):t.style.cssText=s,t[Xs]=e}else r&&(Array.isArray(r)?(Ps(t,n==null?void 0:n[0],r[0]),Ps(t,n==null?void 0:n[1],r[1],"important")):Ps(t,n,r));return r}function Jc(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Qc(t,e){var n=t.__defaultValue,r=t.multiple,i=r?n??[]:null;if(!(r&&!ps(i))){t.selectedIndex;for(var s of t.options){var a=fr(s);Jc(s,r?i.includes(a):dl(a,n))}}}function Ol(t,e,n=!1){if(t.multiple){if(e==null)return;if(!ps(e))return Nu();for(var r of t.options)r.selected=e.includes(fr(r));return}for(r of t.options){var i=fr(r);if(dl(i,e)){r.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Zc(t){var e=new MutationObserver(n=>{n.every(ef)||("__defaultValue"in t&&Qc(t),"__value"in t&&Ol(t,t.__value))});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),$a(()=>{e.disconnect()})}function tf(t,e,n=e){var r=new WeakSet,i=!0;tl(t,"change",s=>{var a=s?"[selected]":":checked",o;if(t.multiple)o=[].map.call(t.querySelectorAll(a),fr);else{var l=t.querySelector(a)??t.querySelector("option:not([disabled])");o=l&&fr(l)}n(o),t.__value=o,nt!==null&&r.add(nt)}),yl(()=>{var s=e();if(t===document.activeElement){var a=nt;if(r.has(a))return}if(Ol(t,s,i),i&&s===void 0){var o=t.querySelector(":checked");o!==null&&(s=fr(o),n(s))}t.__value=s,i=!1})}function fr(t){return"__value"in t?t.__value:t.value}function ef(t){if(t.target.closest("selectedcontent")!==null)return!0;if(t.type==="childList"){var e=[...t.addedNodes,...t.removedNodes];return e.length>0&&e.every(n=>n.nodeName==="SELECTEDCONTENT")}return!1}const nf=Symbol("is custom element"),rf=Symbol("is html");function Le(t,e,n,r){var i=sf(t);i[e]!==(i[e]=n)&&(e==="loading"&&(t[yu]=n),n==null?t.removeAttribute(e):typeof n!="string"&&af(t).has(e)?t[e]=n:t.setAttribute(e,n))}function sf(t){return t[Xi]??(t[Xi]={[nf]:t.nodeName.includes("-"),[rf]:t.namespaceURI===$u})}var io=new Map;function af(t){var e=t.getAttribute("is")||t.nodeName,n=io.get(e);if(n)return n;io.set(e,n=new Set);for(var r,i=t,s=Element.prototype;s!==i;){r=fu(i);for(var a in r)r[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&n.add(a);i=Fo(i)}return n}function Pn(t,e,n=e){var r=new WeakSet;tl(t,"input",async i=>{R&&t.type==="checkbox"&&Ga();var s=i?t.defaultValue:t.value;if(s=Ds(t)?Fs(s):s,n(s),nt!==null&&r.add(nt),await Ac(),s!==(s=e())){var a=t.selectionStart,o=t.selectionEnd,l=t.value.length;if(t.value=s??"",o!==null){var u=t.value.length;a===o&&o===l&&u>l?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=a,t.selectionEnd=Math.min(o,u))}}}),Pi(e)==null&&t.value&&(n(Ds(t)?Fs(t.value):t.value),nt!==null&&r.add(nt)),Aa(()=>{R&&t.type==="checkbox"&&Ga();var i=e();if(t===document.activeElement){var s=nt;if(r.has(s))return}Ds(t)&&i===Fs(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Ds(t){var e=t.type;return e==="number"||e==="range"}function Fs(t){return t===""?null:+t}function Ls(t,e){return t===e||(t==null?void 0:t[ur])===e}function ji(t=ya(),e,n,r){var i=jt.r,s=wt;return yl(()=>{var a,o;return Aa(()=>{a=o,o=[],Pi(()=>{Ls(n(...o),t)||(e(t,...o),a&&Ls(n(...a),t)&&e(null,...a))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&ns;)l=l.parent;const u=()=>{o&&Ls(n(...o),t)&&e(null,...o)},c=l.teardown;l.teardown=()=>{u(),c==null||c()}}}),t}function of(t,e,n,r){var i=r,s=!0,a=()=>(s&&(s=!1,i=r),i),o;o=t[e],o===void 0&&r!==void 0&&(o=a());var l;return l=()=>{var u=t[e];return u===void 0?a():(s=!0,u)},l}if(R){let t=function(e){if(!(e in globalThis)){let n;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(n!==void 0)return n;Hu(e)},set:r=>{n=r}})}};var D0=t;t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}function Ta(t){jt===null&&Yo("onMount"),pn(()=>{const e=Pi(t);if(typeof e=="function")return e})}function lf(t){jt===null&&Yo("onDestroy"),Ta(()=>()=>Pi(t))}const uf="5";var Do;typeof window<"u"&&((Do=window.__svelte??(window.__svelte={})).v??(Do.v=new Set)).add(uf);var cf={value:()=>{}};function Di(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Qi(n)}function Qi(t){this._=t}function ff(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Qi.prototype=Di.prototype={constructor:Qi,on:function(t,e){var n=this._,r=ff(t+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(t=r[s]).type)&&(i=df(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<a;)if(i=(t=r[s]).type)n[i]=so(n[i],t.name,e);else if(e==null)for(i in n)n[i]=so(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Qi(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,i=s.length;r<i;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,s=r.length;i<s;++i)r[i].value.apply(e,n)}};function df(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function so(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=cf,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var la="http://www.w3.org/1999/xhtml";const ao={svg:"http://www.w3.org/2000/svg",xhtml:la,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bs(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),ao.hasOwnProperty(e)?{space:ao[e],local:t}:t}function hf(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===la&&e.documentElement.namespaceURI===la?e.createElement(t):e.createElementNS(n,t)}}function vf(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Il(t){var e=bs(t);return(e.local?vf:hf)(e)}function pf(){}function Oa(t){return t==null?pf:function(){return this.querySelector(t)}}function gf(t){typeof t!="function"&&(t=Oa(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],a=s.length,o=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=s[c])&&(u=t.call(l,l.__data__,c,s))&&("__data__"in l&&(u.__data__=l.__data__),o[c]=u);return new Ee(r,this._parents)}function _f(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function yf(){return[]}function Cl(t){return t==null?yf:function(){return this.querySelectorAll(t)}}function mf(t){return function(){return _f(t.apply(this,arguments))}}function wf(t){typeof t=="function"?t=mf(t):t=Cl(t);for(var e=this._groups,n=e.length,r=[],i=[],s=0;s<n;++s)for(var a=e[s],o=a.length,l,u=0;u<o;++u)(l=a[u])&&(r.push(t.call(l,l.__data__,u,a)),i.push(l));return new Ee(r,i)}function Rl(t){return function(){return this.matches(t)}}function Pl(t){return function(e){return e.matches(t)}}var bf=Array.prototype.find;function xf(t){return function(){return bf.call(this.children,t)}}function kf(){return this.firstElementChild}function Ef(t){return this.select(t==null?kf:xf(typeof t=="function"?t:Pl(t)))}var Mf=Array.prototype.filter;function Sf(){return Array.from(this.children)}function $f(t){return function(){return Mf.call(this.children,t)}}function Af(t){return this.selectAll(t==null?Sf:$f(typeof t=="function"?t:Pl(t)))}function qf(t){typeof t!="function"&&(t=Rl(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],a=s.length,o=r[i]=[],l,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new Ee(r,this._parents)}function Dl(t){return new Array(t.length)}function Nf(){return new Ee(this._enter||this._groups.map(Dl),this._parents)}function as(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}as.prototype={constructor:as,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Tf(t){return function(){return t}}function Of(t,e,n,r,i,s){for(var a=0,o,l=e.length,u=s.length;a<u;++a)(o=e[a])?(o.__data__=s[a],r[a]=o):n[a]=new as(t,s[a]);for(;a<l;++a)(o=e[a])&&(i[a]=o)}function If(t,e,n,r,i,s,a){var o,l,u=new Map,c=e.length,v=s.length,f=new Array(c),d;for(o=0;o<c;++o)(l=e[o])&&(f[o]=d=a.call(l,l.__data__,o,e)+"",u.has(d)?i[o]=l:u.set(d,l));for(o=0;o<v;++o)d=a.call(t,s[o],o,s)+"",(l=u.get(d))?(r[o]=l,l.__data__=s[o],u.delete(d)):n[o]=new as(t,s[o]);for(o=0;o<c;++o)(l=e[o])&&u.get(f[o])===l&&(i[o]=l)}function Cf(t){return t.__data__}function Rf(t,e){if(!arguments.length)return Array.from(this,Cf);var n=e?If:Of,r=this._parents,i=this._groups;typeof t!="function"&&(t=Tf(t));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),u=0;u<s;++u){var c=r[u],v=i[u],f=v.length,d=Pf(t.call(c,c&&c.__data__,u,r)),m=d.length,g=o[u]=new Array(m),p=a[u]=new Array(m),y=l[u]=new Array(f);n(c,v,g,p,y,d,e);for(var $=0,q=0,x,T;$<m;++$)if(x=g[$]){for($>=q&&(q=$+1);!(T=p[q])&&++q<m;);x._next=T||null}}return a=new Ee(a,r),a._enter=o,a._exit=l,a}function Pf(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Df(){return new Ee(this._exit||this._groups.map(Dl),this._parents)}function Ff(t,e,n){var r=this.enter(),i=this,s=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function Lf(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var u=n[l],c=r[l],v=u.length,f=o[l]=new Array(v),d,m=0;m<v;++m)(d=u[m]||c[m])&&(f[m]=d);for(;l<i;++l)o[l]=n[l];return new Ee(o,this._parents)}function zf(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function jf(t){t||(t=Hf);function e(v,f){return v&&f?t(v.__data__,f.__data__):!v-!f}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),u,c=0;c<o;++c)(u=a[c])&&(l[c]=u);l.sort(e)}return new Ee(i,this._parents).order()}function Hf(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Vf(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Bf(){return Array.from(this)}function Gf(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}function Yf(){let t=0;for(const e of this)++t;return t}function Xf(){return!this.node()}function Uf(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],s=0,a=i.length,o;s<a;++s)(o=i[s])&&t.call(o,o.__data__,s,i);return this}function Kf(t){return function(){this.removeAttribute(t)}}function Wf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Jf(t,e){return function(){this.setAttribute(t,e)}}function Qf(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Zf(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function td(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function ed(t,e){var n=bs(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Wf:Kf:typeof e=="function"?n.local?td:Zf:n.local?Qf:Jf)(n,e))}function Fl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function nd(t){return function(){this.style.removeProperty(t)}}function rd(t,e,n){return function(){this.style.setProperty(t,e,n)}}function id(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function sd(t,e,n){return arguments.length>1?this.each((e==null?nd:typeof e=="function"?id:rd)(t,e,n??"")):$r(this.node(),t)}function $r(t,e){return t.style.getPropertyValue(e)||Fl(t).getComputedStyle(t,null).getPropertyValue(e)}function ad(t){return function(){delete this[t]}}function od(t,e){return function(){this[t]=e}}function ld(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function ud(t,e){return arguments.length>1?this.each((e==null?ad:typeof e=="function"?ld:od)(t,e)):this.node()[t]}function Ll(t){return t.trim().split(/^|\s+/)}function Ia(t){return t.classList||new zl(t)}function zl(t){this._node=t,this._names=Ll(t.getAttribute("class")||"")}zl.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function jl(t,e){for(var n=Ia(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Hl(t,e){for(var n=Ia(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function cd(t){return function(){jl(this,t)}}function fd(t){return function(){Hl(this,t)}}function dd(t,e){return function(){(e.apply(this,arguments)?jl:Hl)(this,t)}}function hd(t,e){var n=Ll(t+"");if(arguments.length<2){for(var r=Ia(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?dd:e?cd:fd)(n,e))}function vd(){this.textContent=""}function pd(t){return function(){this.textContent=t}}function gd(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function _d(t){return arguments.length?this.each(t==null?vd:(typeof t=="function"?gd:pd)(t)):this.node().textContent}function yd(){this.innerHTML=""}function md(t){return function(){this.innerHTML=t}}function wd(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function bd(t){return arguments.length?this.each(t==null?yd:(typeof t=="function"?wd:md)(t)):this.node().innerHTML}function xd(){this.nextSibling&&this.parentNode.appendChild(this)}function kd(){return this.each(xd)}function Ed(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Md(){return this.each(Ed)}function Sd(t){var e=typeof t=="function"?t:Il(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function $d(){return null}function Ad(t,e){var n=typeof t=="function"?t:Il(t),r=e==null?$d:typeof e=="function"?e:Oa(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function qd(){var t=this.parentNode;t&&t.removeChild(this)}function Nd(){return this.each(qd)}function Td(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Od(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Id(t){return this.select(t?Od:Td)}function Cd(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Rd(t){return function(e){t.call(this,e,this.__data__)}}function Pd(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Dd(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,s;n<i;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function Fd(t,e,n){return function(){var r=this.__on,i,s=Rd(e);if(r){for(var a=0,o=r.length;a<o;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=e;return}}this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},r?r.push(i):this.__on=[i]}}function Ld(t,e,n){var r=Pd(t+""),i,s=r.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,c;l<u;++l)for(i=0,c=o[l];i<s;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(o=e?Fd:Dd,i=0;i<s;++i)this.each(o(r[i],e,n));return this}function Vl(t,e,n){var r=Fl(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function zd(t,e){return function(){return Vl(this,t,e)}}function jd(t,e){return function(){return Vl(this,t,e.apply(this,arguments))}}function Hd(t,e){return this.each((typeof e=="function"?jd:zd)(t,e))}function*Vd(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}var Bl=[null];function Ee(t,e){this._groups=t,this._parents=e}function Fi(){return new Ee([[document.documentElement]],Bl)}function Bd(){return this}Ee.prototype=Fi.prototype={constructor:Ee,select:gf,selectAll:wf,selectChild:Ef,selectChildren:Af,filter:qf,data:Rf,enter:Nf,exit:Df,join:Ff,merge:Lf,selection:Bd,order:zf,sort:jf,call:Vf,nodes:Bf,node:Gf,size:Yf,empty:Xf,each:Uf,attr:ed,style:sd,property:ud,classed:hd,text:_d,html:bd,raise:kd,lower:Md,append:Sd,insert:Ad,remove:Nd,clone:Id,datum:Cd,on:Ld,dispatch:Hd,[Symbol.iterator]:Vd};function Nt(t){return typeof t=="string"?new Ee([[document.querySelector(t)]],[document.documentElement]):new Ee([[t]],Bl)}function Gd(t){let e;for(;e=t.sourceEvent;)t=e;return t}function dn(t,e){if(t=Gd(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const Yd={passive:!1},ni={capture:!0,passive:!1};function zs(t){t.stopImmediatePropagation()}function dr(t){t.preventDefault(),t.stopImmediatePropagation()}function Gl(t){var e=t.document.documentElement,n=Nt(t).on("dragstart.drag",dr,ni);"onselectstart"in e?n.on("selectstart.drag",dr,ni):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Yl(t,e){var n=t.document.documentElement,r=Nt(t).on("dragstart.drag",null);e&&(r.on("click.drag",dr,ni),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Hi=t=>()=>t;function ua(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:s,x:a,y:o,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}ua.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Xd(t){return!t.ctrlKey&&!t.button}function Ud(){return this.parentNode}function Kd(t,e){return e??{x:t.x,y:t.y}}function Wd(){return navigator.maxTouchPoints||"ontouchstart"in this}function Jd(){var t=Xd,e=Ud,n=Kd,r=Wd,i={},s=Di("start","drag","end"),a=0,o,l,u,c,v=0;function f(x){x.on("mousedown.drag",d).filter(r).on("touchstart.drag",p).on("touchmove.drag",y,Yd).on("touchend.drag touchcancel.drag",$).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(x,T){if(!(c||!t.call(this,x,T))){var F=q(this,e.call(this,x,T),x,T,"mouse");F&&(Nt(x.view).on("mousemove.drag",m,ni).on("mouseup.drag",g,ni),Gl(x.view),zs(x),u=!1,o=x.clientX,l=x.clientY,F("start",x))}}function m(x){if(dr(x),!u){var T=x.clientX-o,F=x.clientY-l;u=T*T+F*F>v}i.mouse("drag",x)}function g(x){Nt(x.view).on("mousemove.drag mouseup.drag",null),Yl(x.view,u),dr(x),i.mouse("end",x)}function p(x,T){if(t.call(this,x,T)){var F=x.changedTouches,L=e.call(this,x,T),K=F.length,it,N;for(it=0;it<K;++it)(N=q(this,L,x,T,F[it].identifier,F[it]))&&(zs(x),N("start",x,F[it]))}}function y(x){var T=x.changedTouches,F=T.length,L,K;for(L=0;L<F;++L)(K=i[T[L].identifier])&&(dr(x),K("drag",x,T[L]))}function $(x){var T=x.changedTouches,F=T.length,L,K;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),L=0;L<F;++L)(K=i[T[L].identifier])&&(zs(x),K("end",x,T[L]))}function q(x,T,F,L,K,it){var N=s.copy(),j=dn(it||F,T),st,bt,k;if((k=n.call(x,new ua("beforestart",{sourceEvent:F,target:f,identifier:K,active:a,x:j[0],y:j[1],dx:0,dy:0,dispatch:N}),L))!=null)return st=k.x-j[0]||0,bt=k.y-j[1]||0,function I(A,P,Q){var V=j,Z;switch(A){case"start":i[K]=I,Z=a++;break;case"end":delete i[K],--a;case"drag":j=dn(Q||P,T),Z=a;break}N.call(A,x,new ua(A,{sourceEvent:P,subject:k,target:f,identifier:K,active:Z,x:j[0]+st,y:j[1]+bt,dx:j[0]-V[0],dy:j[1]-V[1],dispatch:N}),L)}}return f.filter=function(x){return arguments.length?(t=typeof x=="function"?x:Hi(!!x),f):t},f.container=function(x){return arguments.length?(e=typeof x=="function"?x:Hi(x),f):e},f.subject=function(x){return arguments.length?(n=typeof x=="function"?x:Hi(x),f):n},f.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:Hi(!!x),f):r},f.on=function(){var x=s.on.apply(s,arguments);return x===s?f:x},f.clickDistance=function(x){return arguments.length?(v=(x=+x)*x,f):Math.sqrt(v)},f}function Ca(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Xl(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Li(){}var ri=.7,os=1/ri,hr="\\s*([+-]?\\d+)\\s*",ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",an="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qd=/^#([0-9a-f]{3,8})$/,Zd=new RegExp(`^rgb\\(${hr},${hr},${hr}\\)$`),th=new RegExp(`^rgb\\(${an},${an},${an}\\)$`),eh=new RegExp(`^rgba\\(${hr},${hr},${hr},${ii}\\)$`),nh=new RegExp(`^rgba\\(${an},${an},${an},${ii}\\)$`),rh=new RegExp(`^hsl\\(${ii},${an},${an}\\)$`),ih=new RegExp(`^hsla\\(${ii},${an},${an},${ii}\\)$`),oo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ca(Li,si,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:lo,formatHex:lo,formatHex8:sh,formatHsl:ah,formatRgb:uo,toString:uo});function lo(){return this.rgb().formatHex()}function sh(){return this.rgb().formatHex8()}function ah(){return Ul(this).formatHsl()}function uo(){return this.rgb().formatRgb()}function si(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Qd.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?co(e):n===3?new _e(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Vi(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Vi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Zd.exec(t))?new _e(e[1],e[2],e[3],1):(e=th.exec(t))?new _e(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eh.exec(t))?Vi(e[1],e[2],e[3],e[4]):(e=nh.exec(t))?Vi(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rh.exec(t))?vo(e[1],e[2]/100,e[3]/100,1):(e=ih.exec(t))?vo(e[1],e[2]/100,e[3]/100,e[4]):oo.hasOwnProperty(t)?co(oo[t]):t==="transparent"?new _e(NaN,NaN,NaN,0):null}function co(t){return new _e(t>>16&255,t>>8&255,t&255,1)}function Vi(t,e,n,r){return r<=0&&(t=e=n=NaN),new _e(t,e,n,r)}function oh(t){return t instanceof Li||(t=si(t)),t?(t=t.rgb(),new _e(t.r,t.g,t.b,t.opacity)):new _e}function ca(t,e,n,r){return arguments.length===1?oh(t):new _e(t,e,n,r??1)}function _e(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ca(_e,ca,Xl(Li,{brighter(t){return t=t==null?os:Math.pow(os,t),new _e(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ri:Math.pow(ri,t),new _e(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _e(Wn(this.r),Wn(this.g),Wn(this.b),ls(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:fo,formatHex:fo,formatHex8:lh,formatRgb:ho,toString:ho}));function fo(){return`#${jn(this.r)}${jn(this.g)}${jn(this.b)}`}function lh(){return`#${jn(this.r)}${jn(this.g)}${jn(this.b)}${jn((isNaN(this.opacity)?1:this.opacity)*255)}`}function ho(){const t=ls(this.opacity);return`${t===1?"rgb(":"rgba("}${Wn(this.r)}, ${Wn(this.g)}, ${Wn(this.b)}${t===1?")":`, ${t})`}`}function ls(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Wn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function jn(t){return t=Wn(t),(t<16?"0":"")+t.toString(16)}function vo(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ve(t,e,n,r)}function Ul(t){if(t instanceof Ve)return new Ve(t.h,t.s,t.l,t.opacity);if(t instanceof Li||(t=si(t)),!t)return new Ve;if(t instanceof Ve)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(e===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-e)/o+2:a=(e-n)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new Ve(a,o,l,t.opacity)}function uh(t,e,n,r){return arguments.length===1?Ul(t):new Ve(t,e,n,r??1)}function Ve(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ca(Ve,uh,Xl(Li,{brighter(t){return t=t==null?os:Math.pow(os,t),new Ve(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ri:Math.pow(ri,t),new Ve(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new _e(js(t>=240?t-240:t+120,i,r),js(t,i,r),js(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ve(po(this.h),Bi(this.s),Bi(this.l),ls(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ls(this.opacity);return`${t===1?"hsl(":"hsla("}${po(this.h)}, ${Bi(this.s)*100}%, ${Bi(this.l)*100}%${t===1?")":`, ${t})`}`}}));function po(t){return t=(t||0)%360,t<0?t+360:t}function Bi(t){return Math.max(0,Math.min(1,t||0))}function js(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Kl=t=>()=>t;function ch(t,e){return function(n){return t+n*e}}function fh(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function dh(t){return(t=+t)==1?Wl:function(e,n){return n-e?fh(e,n,t):Kl(isNaN(e)?n:e)}}function Wl(t,e){var n=e-t;return n?ch(t,n):Kl(isNaN(t)?e:t)}const go=(function t(e){var n=dh(e);function r(i,s){var a=n((i=ca(i)).r,(s=ca(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),u=Wl(i.opacity,s.opacity);return function(c){return i.r=a(c),i.g=o(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=t,r})(1);function En(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var fa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hs=new RegExp(fa.source,"g");function hh(t){return function(){return t}}function vh(t){return function(e){return t(e)+""}}function ph(t,e){var n=fa.lastIndex=Hs.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(t=t+"",e=e+"";(r=fa.exec(t))&&(i=Hs.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:En(r,i)})),n=Hs.lastIndex;return n<e.length&&(s=e.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?vh(l[0].x):hh(e):(e=l.length,function(u){for(var c=0,v;c<e;++c)o[(v=l[c]).i]=v.x(u);return o.join("")})}var _o=180/Math.PI,da={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jl(t,e,n,r,i,s){var a,o,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*_o,skewX:Math.atan(l)*_o,scaleX:a,scaleY:o}}var Gi;function gh(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?da:Jl(e.a,e.b,e.c,e.d,e.e,e.f)}function _h(t){return t==null||(Gi||(Gi=document.createElementNS("http://www.w3.org/2000/svg","g")),Gi.setAttribute("transform",t),!(t=Gi.transform.baseVal.consolidate()))?da:(t=t.matrix,Jl(t.a,t.b,t.c,t.d,t.e,t.f))}function Ql(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function s(u,c,v,f,d,m){if(u!==v||c!==f){var g=d.push("translate(",null,e,null,n);m.push({i:g-4,x:En(u,v)},{i:g-2,x:En(c,f)})}else(v||f)&&d.push("translate("+v+e+f+n)}function a(u,c,v,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:v.push(i(v)+"rotate(",null,r)-2,x:En(u,c)})):c&&v.push(i(v)+"rotate("+c+r)}function o(u,c,v,f){u!==c?f.push({i:v.push(i(v)+"skewX(",null,r)-2,x:En(u,c)}):c&&v.push(i(v)+"skewX("+c+r)}function l(u,c,v,f,d,m){if(u!==v||c!==f){var g=d.push(i(d)+"scale(",null,",",null,")");m.push({i:g-4,x:En(u,v)},{i:g-2,x:En(c,f)})}else(v!==1||f!==1)&&d.push(i(d)+"scale("+v+","+f+")")}return function(u,c){var v=[],f=[];return u=t(u),c=t(c),s(u.translateX,u.translateY,c.translateX,c.translateY,v,f),a(u.rotate,c.rotate,v,f),o(u.skewX,c.skewX,v,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,v,f),u=c=null,function(d){for(var m=-1,g=f.length,p;++m<g;)v[(p=f[m]).i]=p.x(d);return v.join("")}}}var yh=Ql(gh,"px, ","px)","deg)"),mh=Ql(_h,", ",")",")"),wh=1e-12;function yo(t){return((t=Math.exp(t))+1/t)/2}function bh(t){return((t=Math.exp(t))-1/t)/2}function xh(t){return((t=Math.exp(2*t))-1)/(t+1)}const kh=(function t(e,n,r){function i(s,a){var o=s[0],l=s[1],u=s[2],c=a[0],v=a[1],f=a[2],d=c-o,m=v-l,g=d*d+m*m,p,y;if(g<wh)y=Math.log(f/u)/e,p=function(L){return[o+L*d,l+L*m,u*Math.exp(e*L*y)]};else{var $=Math.sqrt(g),q=(f*f-u*u+r*g)/(2*u*n*$),x=(f*f-u*u-r*g)/(2*f*n*$),T=Math.log(Math.sqrt(q*q+1)-q),F=Math.log(Math.sqrt(x*x+1)-x);y=(F-T)/e,p=function(L){var K=L*y,it=yo(T),N=u/(n*$)*(it*xh(e*K+T)-bh(T));return[o+N*d,l+N*m,u*it/yo(e*K+T)]}}return p.duration=y*1e3*e/Math.SQRT2,p}return i.rho=function(s){var a=Math.max(.001,+s),o=a*a,l=o*o;return t(a,o,l)},i})(Math.SQRT2,2,4);var Ar=0,Gr=0,Dr=0,Zl=1e3,us,Yr,cs=0,er=0,xs=0,ai=typeof performance=="object"&&performance.now?performance:Date,tu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ra(){return er||(tu(Eh),er=ai.now()+xs)}function Eh(){er=0}function fs(){this._call=this._time=this._next=null}fs.prototype=Pa.prototype={constructor:fs,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ra():+n)+(e==null?0:+e),!this._next&&Yr!==this&&(Yr?Yr._next=this:us=this,Yr=this),this._call=t,this._time=n,ha()},stop:function(){this._call&&(this._call=null,this._time=1/0,ha())}};function Pa(t,e,n){var r=new fs;return r.restart(t,e,n),r}function Mh(){Ra(),++Ar;for(var t=us,e;t;)(e=er-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ar}function mo(){er=(cs=ai.now())+xs,Ar=Gr=0;try{Mh()}finally{Ar=0,$h(),er=0}}function Sh(){var t=ai.now(),e=t-cs;e>Zl&&(xs-=e,cs=t)}function $h(){for(var t,e=us,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:us=n);Yr=t,ha(r)}function ha(t){if(!Ar){Gr&&(Gr=clearTimeout(Gr));var e=t-er;e>24?(t<1/0&&(Gr=setTimeout(mo,t-ai.now()-xs)),Dr&&(Dr=clearInterval(Dr))):(Dr||(cs=ai.now(),Dr=setInterval(Sh,Zl)),Ar=1,tu(mo))}}function wo(t,e,n){var r=new fs;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Ah=Di("start","end","cancel","interrupt"),qh=[],eu=0,bo=1,va=2,Zi=3,xo=4,pa=5,ts=6;function ks(t,e,n,r,i,s){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Nh(t,n,{name:e,index:r,group:i,on:Ah,tween:qh,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:eu})}function Da(t,e){var n=Xe(t,e);if(n.state>eu)throw new Error("too late; already scheduled");return n}function on(t,e){var n=Xe(t,e);if(n.state>Zi)throw new Error("too late; already running");return n}function Xe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Nh(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Pa(s,0,n.time);function s(u){n.state=bo,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,v,f,d;if(n.state!==bo)return l();for(c in r)if(d=r[c],d.name===n.name){if(d.state===Zi)return wo(a);d.state===xo?(d.state=ts,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[c]):+c<e&&(d.state=ts,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[c])}if(wo(function(){n.state===Zi&&(n.state=xo,n.timer.restart(o,n.delay,n.time),o(u))}),n.state=va,n.on.call("start",t,t.__data__,n.index,n.group),n.state===va){for(n.state=Zi,i=new Array(f=n.tween.length),c=0,v=-1;c<f;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++v]=d);i.length=v+1}}function o(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=pa,1),v=-1,f=i.length;++v<f;)i[v].call(t,c);n.state===pa&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=ts,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function es(t,e){var n=t.__transition,r,i,s=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){s=!1;continue}i=r.state>va&&r.state<pa,r.state=ts,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}s&&delete t.__transition}}function Th(t){return this.each(function(){es(this,t)})}function Oh(t,e){var n,r;return function(){var i=on(this,t),s=i.tween;if(s!==n){r=n=s;for(var a=0,o=r.length;a<o;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function Ih(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=on(this,t),a=s.tween;if(a!==r){i=(r=a).slice();for(var o={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=o;break}l===u&&i.push(o)}s.tween=i}}function Ch(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Xe(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?Oh:Ih)(n,t,e))}function Fa(t,e,n){var r=t._id;return t.each(function(){var i=on(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Xe(i,r).value[e]}}function nu(t,e){var n;return(typeof e=="number"?En:e instanceof si?go:(n=si(e))?(e=n,go):ph)(t,e)}function Rh(t){return function(){this.removeAttribute(t)}}function Ph(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Dh(t,e,n){var r,i=n+"",s;return function(){var a=this.getAttribute(t);return a===i?null:a===r?s:s=e(r=a,n)}}function Fh(t,e,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?s:s=e(r=a,n)}}function Lh(t,e,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=e(r=a,o)))}}function zh(t,e,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=e(r=a,o)))}}function jh(t,e){var n=bs(t),r=n==="transform"?mh:nu;return this.attrTween(t,typeof e=="function"?(n.local?zh:Lh)(n,r,Fa(this,"attr."+t,e)):e==null?(n.local?Ph:Rh)(n):(n.local?Fh:Dh)(n,r,e))}function Hh(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Vh(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Bh(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Vh(t,s)),n}return i._value=e,i}function Gh(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Hh(t,s)),n}return i._value=e,i}function Yh(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=bs(t);return this.tween(n,(r.local?Bh:Gh)(r,e))}function Xh(t,e){return function(){Da(this,t).delay=+e.apply(this,arguments)}}function Uh(t,e){return e=+e,function(){Da(this,t).delay=e}}function Kh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Xh:Uh)(e,t)):Xe(this.node(),e).delay}function Wh(t,e){return function(){on(this,t).duration=+e.apply(this,arguments)}}function Jh(t,e){return e=+e,function(){on(this,t).duration=e}}function Qh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Wh:Jh)(e,t)):Xe(this.node(),e).duration}function Zh(t,e){if(typeof e!="function")throw new Error;return function(){on(this,t).ease=e}}function tv(t){var e=this._id;return arguments.length?this.each(Zh(e,t)):Xe(this.node(),e).ease}function ev(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;on(this,t).ease=n}}function nv(t){if(typeof t!="function")throw new Error;return this.each(ev(this._id,t))}function rv(t){typeof t!="function"&&(t=Rl(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],a=s.length,o=r[i]=[],l,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new wn(r,this._parents,this._name,this._id)}function iv(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=e[o],u=n[o],c=l.length,v=a[o]=new Array(c),f,d=0;d<c;++d)(f=l[d]||u[d])&&(v[d]=f);for(;o<r;++o)a[o]=e[o];return new wn(a,this._parents,this._name,this._id)}function sv(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function av(t,e,n){var r,i,s=sv(e)?Da:on;return function(){var a=s(this,t),o=a.on;o!==r&&(i=(r=o).copy()).on(e,n),a.on=i}}function ov(t,e){var n=this._id;return arguments.length<2?Xe(this.node(),n).on.on(t):this.each(av(n,t,e))}function lv(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function uv(){return this.on("end.remove",lv(this._id))}function cv(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Oa(t));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,u=s[a]=new Array(l),c,v,f=0;f<l;++f)(c=o[f])&&(v=t.call(c,c.__data__,f,o))&&("__data__"in c&&(v.__data__=c.__data__),u[f]=v,ks(u[f],e,n,f,u,Xe(c,n)));return new wn(s,this._parents,e,n)}function fv(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Cl(t));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],u=l.length,c,v=0;v<u;++v)if(c=l[v]){for(var f=t.call(c,c.__data__,v,l),d,m=Xe(c,n),g=0,p=f.length;g<p;++g)(d=f[g])&&ks(d,e,n,g,f,m);s.push(f),a.push(c)}return new wn(s,a,e,n)}var dv=Fi.prototype.constructor;function hv(){return new dv(this._groups,this._parents)}function vv(t,e){var n,r,i;return function(){var s=$r(this,t),a=(this.style.removeProperty(t),$r(this,t));return s===a?null:s===n&&a===r?i:i=e(n=s,r=a)}}function ru(t){return function(){this.style.removeProperty(t)}}function pv(t,e,n){var r,i=n+"",s;return function(){var a=$r(this,t);return a===i?null:a===r?s:s=e(r=a,n)}}function gv(t,e,n){var r,i,s;return function(){var a=$r(this,t),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),$r(this,t))),a===l?null:a===r&&l===i?s:(i=l,s=e(r=a,o))}}function _v(t,e){var n,r,i,s="style."+e,a="end."+s,o;return function(){var l=on(this,t),u=l.on,c=l.value[s]==null?o||(o=ru(e)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function yv(t,e,n){var r=(t+="")=="transform"?yh:nu;return e==null?this.styleTween(t,vv(t,r)).on("end.style."+t,ru(t)):typeof e=="function"?this.styleTween(t,gv(t,r,Fa(this,"style."+t,e))).each(_v(this._id,t)):this.styleTween(t,pv(t,r,e),n).on("end.style."+t,null)}function mv(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function wv(t,e,n){var r,i;function s(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&mv(t,a,n)),r}return s._value=e,s}function bv(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,wv(t,e,n??""))}function xv(t){return function(){this.textContent=t}}function kv(t){return function(){var e=t(this);this.textContent=e??""}}function Ev(t){return this.tween("text",typeof t=="function"?kv(Fa(this,"text",t)):xv(t==null?"":t+""))}function Mv(t){return function(e){this.textContent=t.call(this,e)}}function Sv(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&Mv(i)),e}return r._value=t,r}function $v(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Sv(t))}function Av(){for(var t=this._name,e=this._id,n=iu(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,u=0;u<o;++u)if(l=a[u]){var c=Xe(l,e);ks(l,t,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new wn(r,this._parents,t,n)}function qv(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--i===0&&s()}};n.each(function(){var u=on(this,r),c=u.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),i===0&&s()})}var Nv=0;function wn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function iu(){return++Nv}var cn=Fi.prototype;wn.prototype={constructor:wn,select:cv,selectAll:fv,selectChild:cn.selectChild,selectChildren:cn.selectChildren,filter:rv,merge:iv,selection:hv,transition:Av,call:cn.call,nodes:cn.nodes,node:cn.node,size:cn.size,empty:cn.empty,each:cn.each,on:ov,attr:jh,attrTween:Yh,style:yv,styleTween:bv,text:Ev,textTween:$v,remove:uv,tween:Ch,delay:Kh,duration:Qh,ease:tv,easeVarying:nv,end:qv,[Symbol.iterator]:cn[Symbol.iterator]};function ko(t){return--t*t*t+1}function Tv(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Ov={time:null,delay:0,duration:250,ease:Tv};function Iv(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Cv(t){var e,n;t instanceof wn?(e=t._id,t=t._name):(e=iu(),(n=Ov).time=Ra(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,u=0;u<o;++u)(l=a[u])&&ks(l,t,e,u,a,n||Iv(l,e));return new wn(r,this._parents,t,e)}Fi.prototype.interrupt=Th;Fi.prototype.transition=Cv;function Rv(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var s,a=n.length,o,l=0,u=0;for(s=0;s<a;++s)o=n[s],l+=o.x,u+=o.y;for(l=(l/a-t)*r,u=(u/a-e)*r,s=0;s<a;++s)o=n[s],o.x-=l,o.y-=u}return i.initialize=function(s){n=s},i.x=function(s){return arguments.length?(t=+s,i):t},i.y=function(s){return arguments.length?(e=+s,i):e},i.strength=function(s){return arguments.length?(r=+s,i):r},i}function Pv(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return su(this.cover(e,n),e,n,t)}function su(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,s=t._root,a={data:r},o=t._x0,l=t._y0,u=t._x1,c=t._y1,v,f,d,m,g,p,y,$;if(!s)return t._root=a,t;for(;s.length;)if((g=e>=(v=(o+u)/2))?o=v:u=v,(p=n>=(f=(l+c)/2))?l=f:c=f,i=s,!(s=s[y=p<<1|g]))return i[y]=a,t;if(d=+t._x.call(null,s.data),m=+t._y.call(null,s.data),e===d&&n===m)return a.next=s,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(v=(o+u)/2))?o=v:u=v,(p=n>=(f=(l+c)/2))?l=f:c=f;while((y=p<<1|g)===($=(m>=f)<<1|d>=v));return i[$]=s,i[y]=a,t}function Dv(t){var e,n,r=t.length,i,s,a=new Array(r),o=new Array(r),l=1/0,u=1/0,c=-1/0,v=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(s=+this._y.call(null,e))||(a[n]=i,o[n]=s,i<l&&(l=i),i>c&&(c=i),s<u&&(u=s),s>v&&(v=s));if(l>c||u>v)return this;for(this.cover(l,u).cover(c,v),n=0;n<r;++n)su(this,a[n],o[n],t[n]);return this}function Fv(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,s=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,s=(r=Math.floor(e))+1;else{for(var a=i-n||1,o=this._root,l,u;n>t||t>=i||r>e||e>=s;)switch(u=(e<r)<<1|t<n,l=new Array(4),l[u]=o,o=l,a*=2,u){case 0:i=n+a,s=r+a;break;case 1:n=i-a,s=r+a;break;case 2:i=n+a,r=s-a;break;case 3:n=i-a,r=s-a;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=r,this._x1=i,this._y1=s,this}function Lv(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function zv(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ce(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function jv(t,e,n){var r,i=this._x0,s=this._y0,a,o,l,u,c=this._x1,v=this._y1,f=[],d=this._root,m,g;for(d&&f.push(new ce(d,i,s,c,v)),n==null?n=1/0:(i=t-n,s=e-n,c=t+n,v=e+n,n*=n);m=f.pop();)if(!(!(d=m.node)||(a=m.x0)>c||(o=m.y0)>v||(l=m.x1)<i||(u=m.y1)<s))if(d.length){var p=(a+l)/2,y=(o+u)/2;f.push(new ce(d[3],p,y,l,u),new ce(d[2],a,y,p,u),new ce(d[1],p,o,l,y),new ce(d[0],a,o,p,y)),(g=(e>=y)<<1|t>=p)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=m)}else{var $=t-+this._x.call(null,d.data),q=e-+this._y.call(null,d.data),x=$*$+q*q;if(x<n){var T=Math.sqrt(n=x);i=t-T,s=e-T,c=t+T,v=e+T,r=d.data}}return r}function Hv(t){if(isNaN(c=+this._x.call(null,t))||isNaN(v=+this._y.call(null,t)))return this;var e,n=this._root,r,i,s,a=this._x0,o=this._y0,l=this._x1,u=this._y1,c,v,f,d,m,g,p,y;if(!n)return this;if(n.length)for(;;){if((m=c>=(f=(a+l)/2))?a=f:l=f,(g=v>=(d=(o+u)/2))?o=d:u=d,e=n,!(n=n[p=g<<1|m]))return this;if(!n.length)break;(e[p+1&3]||e[p+2&3]||e[p+3&3])&&(r=e,y=p)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,i?(s?i.next=s:delete i.next,this):e?(s?e[p]=s:delete e[p],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=s,this)}function Vv(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function Bv(){return this._root}function Gv(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function Yv(t){var e=[],n,r=this._root,i,s,a,o,l;for(r&&e.push(new ce(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,s=n.x0,a=n.y0,o=n.x1,l=n.y1)&&r.length){var u=(s+o)/2,c=(a+l)/2;(i=r[3])&&e.push(new ce(i,u,c,o,l)),(i=r[2])&&e.push(new ce(i,s,c,u,l)),(i=r[1])&&e.push(new ce(i,u,a,o,c)),(i=r[0])&&e.push(new ce(i,s,a,u,c))}return this}function Xv(t){var e=[],n=[],r;for(this._root&&e.push(new ce(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var s,a=r.x0,o=r.y0,l=r.x1,u=r.y1,c=(a+l)/2,v=(o+u)/2;(s=i[0])&&e.push(new ce(s,a,o,c,v)),(s=i[1])&&e.push(new ce(s,c,o,l,v)),(s=i[2])&&e.push(new ce(s,a,v,c,u)),(s=i[3])&&e.push(new ce(s,c,v,l,u))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Uv(t){return t[0]}function Kv(t){return arguments.length?(this._x=t,this):this._x}function Wv(t){return t[1]}function Jv(t){return arguments.length?(this._y=t,this):this._y}function La(t,e,n){var r=new za(e??Uv,n??Wv,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function za(t,e,n,r,i,s){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=s,this._root=void 0}function Eo(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var de=La.prototype=za.prototype;de.copy=function(){var t=new za(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=Eo(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=Eo(r));return t};de.add=Pv;de.addAll=Dv;de.cover=Fv;de.data=Lv;de.extent=zv;de.find=jv;de.remove=Hv;de.removeAll=Vv;de.root=Bv;de.size=Gv;de.visit=Yv;de.visitAfter=Xv;de.x=Kv;de.y=Jv;function Jn(t){return function(){return t}}function An(t){return(t()-.5)*1e-6}function Qv(t){return t.x+t.vx}function Zv(t){return t.y+t.vy}function tp(t){var e,n,r,i=1,s=1;typeof t!="function"&&(t=Jn(t==null?1:+t));function a(){for(var u,c=e.length,v,f,d,m,g,p,y=0;y<s;++y)for(v=La(e,Qv,Zv).visitAfter(o),u=0;u<c;++u)f=e[u],g=n[f.index],p=g*g,d=f.x+f.vx,m=f.y+f.vy,v.visit($);function $(q,x,T,F,L){var K=q.data,it=q.r,N=g+it;if(K){if(K.index>f.index){var j=d-K.x-K.vx,st=m-K.y-K.vy,bt=j*j+st*st;bt<N*N&&(j===0&&(j=An(r),bt+=j*j),st===0&&(st=An(r),bt+=st*st),bt=(N-(bt=Math.sqrt(bt)))/bt*i,f.vx+=(j*=bt)*(N=(it*=it)/(p+it)),f.vy+=(st*=bt)*N,K.vx-=j*(N=1-N),K.vy-=st*N)}return}return x>d+N||F<d-N||T>m+N||L<m-N}}function o(u){if(u.data)return u.r=n[u.data.index];for(var c=u.r=0;c<4;++c)u[c]&&u[c].r>u.r&&(u.r=u[c].r)}function l(){if(e){var u,c=e.length,v;for(n=new Array(c),u=0;u<c;++u)v=e[u],n[v.index]=+t(v,u,e)}}return a.initialize=function(u,c){e=u,r=c,l()},a.iterations=function(u){return arguments.length?(s=+u,a):s},a.strength=function(u){return arguments.length?(i=+u,a):i},a.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Jn(+u),l(),a):t},a}function ep(t){return t.index}function Mo(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function So(t){var e=ep,n=v,r,i=Jn(30),s,a,o,l,u,c=1;t==null&&(t=[]);function v(p){return 1/Math.min(o[p.source.index],o[p.target.index])}function f(p){for(var y=0,$=t.length;y<c;++y)for(var q=0,x,T,F,L,K,it,N;q<$;++q)x=t[q],T=x.source,F=x.target,L=F.x+F.vx-T.x-T.vx||An(u),K=F.y+F.vy-T.y-T.vy||An(u),it=Math.sqrt(L*L+K*K),it=(it-s[q])/it*p*r[q],L*=it,K*=it,F.vx-=L*(N=l[q]),F.vy-=K*N,T.vx+=L*(N=1-N),T.vy+=K*N}function d(){if(a){var p,y=a.length,$=t.length,q=new Map(a.map((T,F)=>[e(T,F,a),T])),x;for(p=0,o=new Array(y);p<$;++p)x=t[p],x.index=p,typeof x.source!="object"&&(x.source=Mo(q,x.source)),typeof x.target!="object"&&(x.target=Mo(q,x.target)),o[x.source.index]=(o[x.source.index]||0)+1,o[x.target.index]=(o[x.target.index]||0)+1;for(p=0,l=new Array($);p<$;++p)x=t[p],l[p]=o[x.source.index]/(o[x.source.index]+o[x.target.index]);r=new Array($),m(),s=new Array($),g()}}function m(){if(a)for(var p=0,y=t.length;p<y;++p)r[p]=+n(t[p],p,t)}function g(){if(a)for(var p=0,y=t.length;p<y;++p)s[p]=+i(t[p],p,t)}return f.initialize=function(p,y){a=p,u=y,d()},f.links=function(p){return arguments.length?(t=p,d(),f):t},f.id=function(p){return arguments.length?(e=p,f):e},f.iterations=function(p){return arguments.length?(c=+p,f):c},f.strength=function(p){return arguments.length?(n=typeof p=="function"?p:Jn(+p),m(),f):n},f.distance=function(p){return arguments.length?(i=typeof p=="function"?p:Jn(+p),g(),f):i},f}const np=1664525,rp=1013904223,$o=4294967296;function ip(){let t=1;return()=>(t=(np*t+rp)%$o)/$o}function sp(t){return t.x}function ap(t){return t.y}var op=10,lp=Math.PI*(3-Math.sqrt(5));function up(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),s=0,a=.6,o=new Map,l=Pa(v),u=Di("tick","end"),c=ip();t==null&&(t=[]);function v(){f(),u.call("tick",e),n<r&&(l.stop(),u.call("end",e))}function f(g){var p,y=t.length,$;g===void 0&&(g=1);for(var q=0;q<g;++q)for(n+=(s-n)*i,o.forEach(function(x){x(n)}),p=0;p<y;++p)$=t[p],$.fx==null?$.x+=$.vx*=a:($.x=$.fx,$.vx=0),$.fy==null?$.y+=$.vy*=a:($.y=$.fy,$.vy=0);return e}function d(){for(var g=0,p=t.length,y;g<p;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var $=op*Math.sqrt(.5+g),q=g*lp;y.x=$*Math.cos(q),y.y=$*Math.sin(q)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function m(g){return g.initialize&&g.initialize(t,c),g}return d(),e={tick:f,restart:function(){return l.restart(v),e},stop:function(){return l.stop(),e},nodes:function(g){return arguments.length?(t=g,d(),o.forEach(m),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(s=+g,e):s},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(c=g,o.forEach(m),e):c},force:function(g,p){return arguments.length>1?(p==null?o.delete(g):o.set(g,m(p)),e):o.get(g)},find:function(g,p,y){var $=0,q=t.length,x,T,F,L,K;for(y==null?y=1/0:y*=y,$=0;$<q;++$)L=t[$],x=g-L.x,T=p-L.y,F=x*x+T*T,F<y&&(K=L,y=F);return K},on:function(g,p){return arguments.length>1?(u.on(g,p),e):u.on(g)}}}function cp(){var t,e,n,r,i=Jn(-30),s,a=1,o=1/0,l=.81;function u(d){var m,g=t.length,p=La(t,sp,ap).visitAfter(v);for(r=d,m=0;m<g;++m)e=t[m],p.visit(f)}function c(){if(t){var d,m=t.length,g;for(s=new Array(m),d=0;d<m;++d)g=t[d],s[g.index]=+i(g,d,t)}}function v(d){var m=0,g,p,y=0,$,q,x;if(d.length){for($=q=x=0;x<4;++x)(g=d[x])&&(p=Math.abs(g.value))&&(m+=g.value,y+=p,$+=p*g.x,q+=p*g.y);d.x=$/y,d.y=q/y}else{g=d,g.x=g.data.x,g.y=g.data.y;do m+=s[g.data.index];while(g=g.next)}d.value=m}function f(d,m,g,p){if(!d.value)return!0;var y=d.x-e.x,$=d.y-e.y,q=p-m,x=y*y+$*$;if(q*q/l<x)return x<o&&(y===0&&(y=An(n),x+=y*y),$===0&&($=An(n),x+=$*$),x<a&&(x=Math.sqrt(a*x)),e.vx+=y*d.value*r/x,e.vy+=$*d.value*r/x),!0;if(d.length||x>=o)return;(d.data!==e||d.next)&&(y===0&&(y=An(n),x+=y*y),$===0&&($=An(n),x+=$*$),x<a&&(x=Math.sqrt(a*x)));do d.data!==e&&(q=s[d.data.index]*r/x,e.vx+=y*q,e.vy+=$*q);while(d=d.next)}return u.initialize=function(d,m){t=d,n=m,c()},u.strength=function(d){return arguments.length?(i=typeof d=="function"?d:Jn(+d),c(),u):i},u.distanceMin=function(d){return arguments.length?(a=d*d,u):Math.sqrt(a)},u.distanceMax=function(d){return arguments.length?(o=d*d,u):Math.sqrt(o)},u.theta=function(d){return arguments.length?(l=d*d,u):Math.sqrt(l)},u}const Yi=t=>()=>t;function fp(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function yn(t,e,n){this.k=t,this.x=e,this.y=n}yn.prototype={constructor:yn,scale:function(t){return t===1?this:new yn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new yn(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Hn=new yn(1,0,0);au.prototype=yn.prototype;function au(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Hn;return t.__zoom}function Vs(t){t.stopImmediatePropagation()}function Fr(t){t.preventDefault(),t.stopImmediatePropagation()}function dp(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function hp(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Ao(){return this.__zoom||Hn}function vp(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function pp(){return navigator.maxTouchPoints||"ontouchstart"in this}function gp(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function _p(){var t=dp,e=hp,n=gp,r=vp,i=pp,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,l=kh,u=Di("start","zoom","end"),c,v,f,d=500,m=150,g=0,p=10;function y(k){k.property("__zoom",Ao).on("wheel.zoom",K,{passive:!1}).on("mousedown.zoom",it).on("dblclick.zoom",N).filter(i).on("touchstart.zoom",j).on("touchmove.zoom",st).on("touchend.zoom touchcancel.zoom",bt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(k,I,A,P){var Q=k.selection?k.selection():k;Q.property("__zoom",Ao),k!==Q?T(k,I,A,P):Q.interrupt().each(function(){F(this,arguments).event(P).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},y.scaleBy=function(k,I,A,P){y.scaleTo(k,function(){var Q=this.__zoom.k,V=typeof I=="function"?I.apply(this,arguments):I;return Q*V},A,P)},y.scaleTo=function(k,I,A,P){y.transform(k,function(){var Q=e.apply(this,arguments),V=this.__zoom,Z=A==null?x(Q):typeof A=="function"?A.apply(this,arguments):A,pt=V.invert(Z),_t=typeof I=="function"?I.apply(this,arguments):I;return n(q($(V,_t),Z,pt),Q,a)},A,P)},y.translateBy=function(k,I,A,P){y.transform(k,function(){return n(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof A=="function"?A.apply(this,arguments):A),e.apply(this,arguments),a)},null,P)},y.translateTo=function(k,I,A,P,Q){y.transform(k,function(){var V=e.apply(this,arguments),Z=this.__zoom,pt=P==null?x(V):typeof P=="function"?P.apply(this,arguments):P;return n(Hn.translate(pt[0],pt[1]).scale(Z.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof A=="function"?-A.apply(this,arguments):-A),V,a)},P,Q)};function $(k,I){return I=Math.max(s[0],Math.min(s[1],I)),I===k.k?k:new yn(I,k.x,k.y)}function q(k,I,A){var P=I[0]-A[0]*k.k,Q=I[1]-A[1]*k.k;return P===k.x&&Q===k.y?k:new yn(k.k,P,Q)}function x(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function T(k,I,A,P){k.on("start.zoom",function(){F(this,arguments).event(P).start()}).on("interrupt.zoom end.zoom",function(){F(this,arguments).event(P).end()}).tween("zoom",function(){var Q=this,V=arguments,Z=F(Q,V).event(P),pt=e.apply(Q,V),_t=A==null?x(pt):typeof A=="function"?A.apply(Q,V):A,D=Math.max(pt[1][0]-pt[0][0],pt[1][1]-pt[0][1]),X=Q.__zoom,at=typeof I=="function"?I.apply(Q,V):I,ut=l(X.invert(_t).concat(D/X.k),at.invert(_t).concat(D/at.k));return function(yt){if(yt===1)yt=at;else{var At=ut(yt),qt=D/At[2];yt=new yn(qt,_t[0]-At[0]*qt,_t[1]-At[1]*qt)}Z.zoom(null,yt)}})}function F(k,I,A){return!A&&k.__zooming||new L(k,I)}function L(k,I){this.that=k,this.args=I,this.active=0,this.sourceEvent=null,this.extent=e.apply(k,I),this.taps=0}L.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,I){return this.mouse&&k!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var I=Nt(this.that).datum();u.call(k,this.that,new fp(k,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),I)}};function K(k,...I){if(!t.apply(this,arguments))return;var A=F(this,I).event(k),P=this.__zoom,Q=Math.max(s[0],Math.min(s[1],P.k*Math.pow(2,r.apply(this,arguments)))),V=dn(k);if(A.wheel)(A.mouse[0][0]!==V[0]||A.mouse[0][1]!==V[1])&&(A.mouse[1]=P.invert(A.mouse[0]=V)),clearTimeout(A.wheel);else{if(P.k===Q)return;A.mouse=[V,P.invert(V)],es(this),A.start()}Fr(k),A.wheel=setTimeout(Z,m),A.zoom("mouse",n(q($(P,Q),A.mouse[0],A.mouse[1]),A.extent,a));function Z(){A.wheel=null,A.end()}}function it(k,...I){if(f||!t.apply(this,arguments))return;var A=k.currentTarget,P=F(this,I,!0).event(k),Q=Nt(k.view).on("mousemove.zoom",_t,!0).on("mouseup.zoom",D,!0),V=dn(k,A),Z=k.clientX,pt=k.clientY;Gl(k.view),Vs(k),P.mouse=[V,this.__zoom.invert(V)],es(this),P.start();function _t(X){if(Fr(X),!P.moved){var at=X.clientX-Z,ut=X.clientY-pt;P.moved=at*at+ut*ut>g}P.event(X).zoom("mouse",n(q(P.that.__zoom,P.mouse[0]=dn(X,A),P.mouse[1]),P.extent,a))}function D(X){Q.on("mousemove.zoom mouseup.zoom",null),Yl(X.view,P.moved),Fr(X),P.event(X).end()}}function N(k,...I){if(t.apply(this,arguments)){var A=this.__zoom,P=dn(k.changedTouches?k.changedTouches[0]:k,this),Q=A.invert(P),V=A.k*(k.shiftKey?.5:2),Z=n(q($(A,V),P,Q),e.apply(this,I),a);Fr(k),o>0?Nt(this).transition().duration(o).call(T,Z,P,k):Nt(this).call(y.transform,Z,P,k)}}function j(k,...I){if(t.apply(this,arguments)){var A=k.touches,P=A.length,Q=F(this,I,k.changedTouches.length===P).event(k),V,Z,pt,_t;for(Vs(k),Z=0;Z<P;++Z)pt=A[Z],_t=dn(pt,this),_t=[_t,this.__zoom.invert(_t),pt.identifier],Q.touch0?!Q.touch1&&Q.touch0[2]!==_t[2]&&(Q.touch1=_t,Q.taps=0):(Q.touch0=_t,V=!0,Q.taps=1+!!c);c&&(c=clearTimeout(c)),V&&(Q.taps<2&&(v=_t[0],c=setTimeout(function(){c=null},d)),es(this),Q.start())}}function st(k,...I){if(this.__zooming){var A=F(this,I).event(k),P=k.changedTouches,Q=P.length,V,Z,pt,_t;for(Fr(k),V=0;V<Q;++V)Z=P[V],pt=dn(Z,this),A.touch0&&A.touch0[2]===Z.identifier?A.touch0[0]=pt:A.touch1&&A.touch1[2]===Z.identifier&&(A.touch1[0]=pt);if(Z=A.that.__zoom,A.touch1){var D=A.touch0[0],X=A.touch0[1],at=A.touch1[0],ut=A.touch1[1],yt=(yt=at[0]-D[0])*yt+(yt=at[1]-D[1])*yt,At=(At=ut[0]-X[0])*At+(At=ut[1]-X[1])*At;Z=$(Z,Math.sqrt(yt/At)),pt=[(D[0]+at[0])/2,(D[1]+at[1])/2],_t=[(X[0]+ut[0])/2,(X[1]+ut[1])/2]}else if(A.touch0)pt=A.touch0[0],_t=A.touch0[1];else return;A.zoom("touch",n(q(Z,pt,_t),A.extent,a))}}function bt(k,...I){if(this.__zooming){var A=F(this,I).event(k),P=k.changedTouches,Q=P.length,V,Z;for(Vs(k),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),V=0;V<Q;++V)Z=P[V],A.touch0&&A.touch0[2]===Z.identifier?delete A.touch0:A.touch1&&A.touch1[2]===Z.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(Z=dn(Z,this),Math.hypot(v[0]-Z[0],v[1]-Z[1])<p)){var pt=Nt(this).on("dblclick.zoom");pt&&pt.apply(this,arguments)}}}return y.wheelDelta=function(k){return arguments.length?(r=typeof k=="function"?k:Yi(+k),y):r},y.filter=function(k){return arguments.length?(t=typeof k=="function"?k:Yi(!!k),y):t},y.touchable=function(k){return arguments.length?(i=typeof k=="function"?k:Yi(!!k),y):i},y.extent=function(k){return arguments.length?(e=typeof k=="function"?k:Yi([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),y):e},y.scaleExtent=function(k){return arguments.length?(s[0]=+k[0],s[1]=+k[1],y):[s[0],s[1]]},y.translateExtent=function(k){return arguments.length?(a[0][0]=+k[0][0],a[1][0]=+k[1][0],a[0][1]=+k[0][1],a[1][1]=+k[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(k){return arguments.length?(n=k,y):n},y.duration=function(k){return arguments.length?(o=+k,y):o},y.interpolate=function(k){return arguments.length?(l=k,y):l},y.on=function(){var k=u.on.apply(u,arguments);return k===u?y:k},y.clickDistance=function(k){return arguments.length?(g=(k=+k)*k,y):Math.sqrt(g)},y.tapDistance=function(k){return arguments.length?(p=+k,y):p},y}class Te extends Error{constructor(n,r,i,s){super(r);Bt(this,"code");Bt(this,"status");Bt(this,"details");this.name="GraphApiError",this.code=n,this.status=i,s!==void 0&&(this.details=s)}}function fn(t){return structuredClone(t)}function qo(t,e){return t.id.localeCompare(e.id)}class No{constructor(e){Bt(this,"current");this.current=fn(e)}get snapshot(){return fn(this.current)}applyPatch(e){if(e.fromRevision!==this.current.revision)throw new Te("PATCH_GAP",`Web 视图需要 revision ${this.current.revision},收到 ${e.fromRevision}。`,409,{expectedRevision:this.current.revision,patchFrom:e.fromRevision});if(e.toRevision<e.fromRevision)throw new Te("INVALID_PATCH","收到的 patch revision 逆序。",400,{fromRevision:e.fromRevision,toRevision:e.toRevision});const n=new Map(this.current.objects.map(i=>[i.id,fn(i)])),r=new Map(this.current.relations.map(i=>[i.id,fn(i)]));for(const i of e.objects.added)n.set(i.id,fn(i));for(const i of e.objects.updated)n.set(i.id,fn(i));for(const i of e.objects.deleted)n.delete(i);for(const i of e.relations.added)r.set(i.id,fn(i));for(const i of e.relations.updated)r.set(i.id,fn(i));for(const i of e.relations.deleted)r.delete(i);return this.current={manifest:e.manifestChanged&&e.manifest?fn(e.manifest):this.current.manifest,objects:[...n.values()].sort(qo),relations:[...r.values()].sort(qo),revision:e.toRevision},this.snapshot}}class yp{constructor(e=""){this.baseUrl=e}async readGraph(){return this.request("/api/graph")}async apply(e){return this.request("/api/mutations",{method:"POST",body:JSON.stringify(e)})}async undo(e){return this.historyMutation("/api/undo",e)}async redo(e){return this.historyMutation("/api/redo",e)}async history(){return this.request("/api/history")}async listGraphs(){return this.request("/api/graphs")}async switchGraph(e){return this.request("/api/graph/switch",{method:"POST",body:JSON.stringify({id:e})})}async modules(){return this.request("/api/modules")}async executeAction(e,n,r,i){const s={operation:e,input:r};return n!==void 0&&(s.target=n),i!==void 0&&(s.registryRevision=i),this.request("/api/actions",{method:"POST",body:JSON.stringify(s)})}async validate(){return this.request("/api/validate")}async validateComplete(){return this.request("/api/validate?mode=complete")}async historyMutation(e,n){const r={};return n!==void 0&&(r.expectedRevision=n),this.request(e,{method:"POST",body:JSON.stringify(r)})}async request(e,n={}){const r=await fetch(`${this.baseUrl}${e}`,{...n,headers:{"content-type":"application/json",...n.headers??{}}});let i;try{i=await r.json()}catch{throw new Te("INVALID_RESPONSE","Server 返回了无法读取的响应。",r.status)}if(!r.ok){const s=i.error;throw new Te((s==null?void 0:s.code)??"HTTP_ERROR",(s==null?void 0:s.message)??`请求失败(HTTP ${r.status})。`,r.status,s==null?void 0:s.details)}return i}}function Bs(t){return t instanceof Te&&(t.code==="REVISION_CONFLICT"||t.code==="PATCH_GAP")}var di,hi,vi,pi,gi,_i,yi,mi,wi,bi,xi,ki,Ei,Mi,Si,$i,Ai,qi;class mp{constructor(e=new yp){J(this,di,dt(null));J(this,hi,dt(Fn({canUndo:!1,canRedo:!1})));J(this,vi,dt(Fn([])));J(this,pi,dt(null));J(this,gi,dt(null));J(this,_i,dt(!0));J(this,yi,dt(""));J(this,mi,dt(null));J(this,wi,dt(""));J(this,bi,dt(!1));J(this,xi,dt(null));J(this,ki,dt(""));J(this,Ei,dt(""));J(this,Mi,dt(!1));J(this,Si,dt(!1));J(this,$i,dt(null));J(this,Ai,dt(null));Bt(this,"commandSeq",0);J(this,qi,dt(null));Bt(this,"graphState",null);Bt(this,"api");this.api=e}get snapshot(){return h(_(this,di))}set snapshot(e){O(_(this,di),e,!0)}get history(){return h(_(this,hi))}set history(e){O(_(this,hi),e,!0)}get graphs(){return h(_(this,vi))}set graphs(e){O(_(this,vi),e,!0)}get moduleStatus(){return h(_(this,pi))}set moduleStatus(e){O(_(this,pi),e,!0)}get validation(){return h(_(this,gi))}set validation(e){O(_(this,gi),e,!0)}get loading(){return h(_(this,_i))}set loading(e){O(_(this,_i),e,!0)}get error(){return h(_(this,yi))}set error(e){O(_(this,yi),e,!0)}get recovery(){return h(_(this,mi))}set recovery(e){O(_(this,mi),e,!0)}get actionMessage(){return h(_(this,wi))}set actionMessage(e){O(_(this,wi),e,!0)}get readOnly(){return h(_(this,bi))}set readOnly(e){O(_(this,bi),e,!0)}get selection(){return h(_(this,xi))}set selection(e){O(_(this,xi),e,!0)}get searchQuery(){return h(_(this,ki))}set searchQuery(e){O(_(this,ki),e,!0)}get kindFilter(){return h(_(this,Ei))}set kindFilter(e){O(_(this,Ei),e,!0)}get switching(){return h(_(this,Mi))}set switching(e){O(_(this,Mi),e,!0)}get writing(){return h(_(this,Si))}set writing(e){O(_(this,Si),e,!0)}get zoomRequest(){return h(_(this,$i))}set zoomRequest(e){O(_(this,$i),e,!0)}get locateRequest(){return h(_(this,Ai))}set locateRequest(e){O(_(this,Ai),e,!0)}get editor(){return h(_(this,qi))}set editor(e){O(_(this,qi),e,!0)}openEditor(e,n={}){if(this.readOnly||this.switching){this.actionMessage=this.switching?"图切换中,编辑已暂时禁用。":"只读模式已禁用编辑。";return}this.editor={mode:e,...n}}closeEditor(){this.editor=null}requestZoom(e){this.zoomRequest={kind:e,seq:++this.commandSeq}}locateNode(e){this.locateRequest={nodeId:e,seq:++this.commandSeq}}get revision(){var e;return((e=this.snapshot)==null?void 0:e.revision)??0}get objects(){var e;return((e=this.snapshot)==null?void 0:e.objects)??[]}get relations(){var e;return((e=this.snapshot)==null?void 0:e.relations)??[]}get selectedObject(){var e,n;return((e=this.selection)==null?void 0:e.type)==="object"?(n=this.snapshot)==null?void 0:n.objects.find(r=>{var i;return r.id===((i=this.selection)==null?void 0:i.id)}):void 0}get selectedRelation(){var e,n;return((e=this.selection)==null?void 0:e.type)==="relation"?(n=this.snapshot)==null?void 0:n.relations.find(r=>{var i;return r.id===((i=this.selection)==null?void 0:i.id)}):void 0}select(e){this.selection=e}clearFilters(){this.searchQuery="",this.kindFilter=""}async load(){this.loading=!0,this.error="";try{const e=await this.api.readGraph();this.graphState=new No(e),this.snapshot=this.graphState.snapshot;const[n,r]=await Promise.all([this.api.history(),this.api.listGraphs()]);this.history=n,this.graphs=r.graphs,await this.refreshModules()}catch(e){this.error=e instanceof Error?e.message:"图快照读取失败"}finally{this.loading=!1}}async reload(){this.recovery=null,await this.load()}async refreshModules(){try{this.moduleStatus=await this.api.modules()}catch{this.moduleStatus=null}}async runValidation(e){try{this.validation=e==="basic"?await this.api.validate():await this.api.validateComplete(),this.actionMessage=e==="basic"?"基础校验完成":"完整校验完成"}catch(n){this.actionMessage=n instanceof Error?n.message:"校验失败"}}async commit(e){if(this.readOnly)throw new Te("READ_ONLY","只读模式已禁用编辑。",403);if(this.switching)throw new Te("GRAPH_SWITCHING","图切换中,不能提交编辑。",409);if(this.writing)throw new Te("WRITE_IN_PROGRESS","已有写操作正在进行。",409);if(!this.graphState)throw new Te("NO_SNAPSHOT","图快照尚未加载,请先刷新。",400);this.writing=!0;try{let n;try{n=await this.api.apply({...e,expectedRevision:this.graphState.snapshot.revision}),this.absorb(n)}catch(r){throw Bs(r)&&(this.recovery={code:r.code,message:r.message}),r}try{this.graphs=(await this.api.listGraphs()).graphs}catch{}return await this.refreshModules(),n}finally{this.writing=!1}}async undo(){await this.runHistoryAction("undo")}async redo(){await this.runHistoryAction("redo")}async switchGraph(e){var n;if(!(!e||e===((n=this.snapshot)==null?void 0:n.manifest.id)||this.switching)){if(this.writing){this.actionMessage="写操作进行中,暂时不能切换图。";return}this.switching=!0,this.error="",this.editor=null,this.selection=null;try{const r=await this.api.switchGraph(e);this.graphState=new No(r.snapshot),this.snapshot=this.graphState.snapshot,this.history=r.history,this.clearFilters(),this.validation=null,this.recovery=null,this.graphs=(await this.api.listGraphs()).graphs,await this.refreshModules(),this.actionMessage=`已切换到图 ${this.snapshot.manifest.id}`}catch(r){this.actionMessage=r instanceof Error?r.message:"图切换失败"}finally{this.switching=!1}}}async executeAction(e,n,r,i){if(this.readOnly)throw new Te("READ_ONLY","只读模式已禁用模块动作。",403);if(this.switching)throw new Te("GRAPH_SWITCHING","图切换中,不能执行模块动作。",409);if(this.writing)throw new Te("WRITE_IN_PROGRESS","已有写操作正在进行。",409);this.writing=!0;try{const s=await this.api.executeAction(e,n,r,i);if(s.kind==="mutation"){try{this.absorb(s.mutation)}catch(a){throw Bs(a)&&(this.recovery={code:a.code,message:a.message}),a}try{this.graphs=(await this.api.listGraphs()).graphs}catch{}await this.refreshModules()}return s}finally{this.writing=!1}}absorb(e){var n;(n=this.graphState)==null||n.applyPatch(e.patch),this.graphState&&(this.snapshot=this.graphState.snapshot),this.history=e.history}async runHistoryAction(e){if(this.actionMessage="",this.readOnly){this.actionMessage="只读模式已禁用历史写操作。";return}if(this.switching||this.writing){this.actionMessage=this.switching?"图切换中,历史写操作已暂时禁用。":"已有写操作正在进行。";return}if(!this.graphState){this.actionMessage="图快照尚未加载";return}if(e==="undo"&&!this.history.canUndo||e==="redo"&&!this.history.canRedo){this.actionMessage=e==="undo"?"没有可撤销的操作":"没有可重做的操作";return}this.writing=!0;try{const n=e==="undo"?await this.api.undo(this.graphState.snapshot.revision):await this.api.redo(this.graphState.snapshot.revision);this.absorb(n),this.actionMessage=e==="undo"?"已撤销":"已重做"}catch(n){Bs(n)?(this.recovery={code:n.code,message:n.message},this.actionMessage=""):this.actionMessage=n instanceof Error?n.message:"历史操作失败"}finally{this.writing=!1}}}di=new WeakMap,hi=new WeakMap,vi=new WeakMap,pi=new WeakMap,gi=new WeakMap,_i=new WeakMap,yi=new WeakMap,mi=new WeakMap,wi=new WeakMap,bi=new WeakMap,xi=new WeakMap,ki=new WeakMap,Ei=new WeakMap,Mi=new WeakMap,Si=new WeakMap,$i=new WeakMap,Ai=new WeakMap,qi=new WeakMap;const w=new mp;function wp(t){return t!=null&&t.isTrusted?t.type==="wheel"||t.type==="dblclick"||t.type==="touchstart"||t.type==="touchmove":!1}function bp(t,e=96,n=76){if(t<=0)return[];const r=Math.max(1,Math.ceil(Math.sqrt(t*1.6))),i=Math.ceil(t/r),s=(r-1)/2*e,a=(i-1)/2*n;return Array.from({length:t},(o,l)=>({x:l%r*e-s,y:Math.floor(l/r)*n-a}))}function xp(t,e,n,r={}){const i=r.padding??40,s=r.nodeRadius??20,a=r.maxScale??2;if(t.length===0)return null;let o=1/0,l=1/0,u=-1/0,c=-1/0;for(const p of t)!Number.isFinite(p.x)||!Number.isFinite(p.y)||(o=Math.min(o,p.x-s),l=Math.min(l,p.y-s),u=Math.max(u,p.x+s),c=Math.max(c,p.y+s));if(o===1/0)return null;const v=Math.max(1,u-o),f=Math.max(1,c-l),d=Math.min((e-i*2)/v,(n-i*2)/f,a),m=(o+u)/2,g=(l+c)/2;return{scale:d,tx:e/2-m*d,ty:n/2-g*d}}function or(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function kp(t,e){const n=t.includes(".")?t.slice(0,t.indexOf(".")):void 0;if(!n)return;const r=e.modules.find(i=>i.id===n||i.namespace===n);return r?{id:r.id,available:r.status==="available",reason:r.reason}:{id:n,available:!1,reason:"当前图未注册此命名空间。"}}function Ep(t,e,n){var l;const r=or((l=n.ui)==null?void 0:l[e]),i=or(or(r.presentation)[t]),s={};typeof i.color=="string"&&(s.color=i.color),typeof i.icon=="string"&&(s.icon=i.icon);const a=or(r.forms)[t],o=Array.isArray(a)?a.filter(u=>typeof u=="string"):[];return{presentation:Object.keys(s).length?s:void 0,fields:o}}function Mp(t){const e=or(t.declaration),n={operation:t.fullId};return typeof e.input_schema=="string"&&(n.inputSchema=e.input_schema),e.input_template!==void 0&&(n.inputTemplate=e.input_template),n}const To=["#5b8def","#34c98d","#e8a54b","#d96a8b","#9b7fe6","#4bbcbc","#c9b458","#8a95a5"];function Sp(t){let e=0;for(let n=0;n<t.length;n++)e=e*31+t.charCodeAt(n)|0;return To[Math.abs(e)%To.length]}function Es(t,e){var n;return((n=Ms(t,e).presentation)==null?void 0:n.color)??Sp(t)}function Ms(t,e){const n={kind:t,available:!0,fields:[],operations:[]};if(!e)return n;const r=kp(t,e);if(!r||(n.moduleId=r.id,n.available=r.available,r.reason!==void 0&&(n.reason=r.reason),!r.available))return n;const i=Ep(t,r.id,e);return i.presentation!==void 0&&(n.presentation=i.presentation),n.fields=i.fields,n.operations=(e.operations??[]).filter(s=>or(s.declaration).applies_to===t).map(Mp),n}var $p=et('<div class="canvas-wrapper svelte-7bxg53"><div class="sky-bg svelte-7bxg53" aria-hidden="true"><div class="sky-band svelte-7bxg53"></div> <svg class="sky-dust svelte-7bxg53"></svg></div> <svg class="graph-canvas svelte-7bxg53"></svg> <div class="node-tooltip svelte-7bxg53"></div> <div class="zoom-hint svelte-7bxg53"><span class="hint-key svelte-7bxg53">scroll</span> 缩放 <span class="hint-sep svelte-7bxg53">·</span> <span class="hint-key svelte-7bxg53">中键拖动</span> 平移 <span class="hint-sep svelte-7bxg53">·</span> <span class="hint-key svelte-7bxg53">双击</span> 重置 <span class="hint-sep svelte-7bxg53">·</span> <span class="hint-key svelte-7bxg53">0</span> 适配 <span class="hint-sep svelte-7bxg53">·</span> <span class="hint-key svelte-7bxg53">Tab</span> 选节点</div></div>');function Ap(t,e){Tr(e,!0);const n=20;let r,i,s,a,o=null,l=null,u=null,c=null,v=null;const f=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1,d=f?0:400;function m(b){return b.button===1&&b.pointerType!=="touch"}function g(b=null){if(c===null||b!==null&&b!==c)return;const S=c;if(c=null,v=null,r&&typeof r.releasePointerCapture=="function")try{r.releasePointerCapture(S)}catch{}r&&(r.style.cursor="grab")}function p(b){if(!(!r||!l||!m(b))&&c===null){if(Nt(r).interrupt(),c=b.pointerId,v={x:b.clientX,y:b.clientY},typeof r.setPointerCapture=="function")try{r.setPointerCapture(b.pointerId)}catch{}r.style.cursor="grabbing",b.preventDefault()}}function y(b){if(c!==b.pointerId||!v||!r||!l)return;const S=b.clientX-v.x,E=b.clientY-v.y;if(v={x:b.clientX,y:b.clientY},S===0&&E===0)return;K=!0;const C=au(r),H=Hn.translate(C.x+S,C.y+E).scale(C.k);Nt(r).call(l.transform,H),b.preventDefault()}const $=new Map;function q(b){let S=$.get(b);return S||(S=new Map,$.set(b,S)),S}let x="",T=new Map,F=!1,L=null,K=!1,it=[];function N(){return{w:(i==null?void 0:i.clientWidth)||960,h:(i==null?void 0:i.clientHeight)||680}}function j(b){return Es(b,w.moduleStatus)}function st(b){if(b===null)return"null";if(b===void 0)return"undefined";if(typeof b!="object")return JSON.stringify(b);if(Array.isArray(b))return`[${b.map(st).join(",")}]`;const S=b;return`{${Object.keys(S).sort().map(E=>`${JSON.stringify(E)}:${st(S[E])}`).join(",")}}`}function bt(b){return st(b.map(S=>({id:S.id,kind:S.kind,label:S.label})))}function k(b){return st([...b].sort((S,E)=>S.id.localeCompare(E.id)))}function I(b){const S=w.kindFilter.trim();if(S&&b.kind!==S)return!1;const E=w.searchQuery.trim().toLowerCase();return E?`${b.id} ${b.kind} ${b.label}`.toLowerCase().includes(E):!0}function A(b){const S=it.find(H=>H.id===(typeof b.source=="object"?b.source.id:b.source)),E=it.find(H=>H.id===(typeof b.target=="object"?b.target.id:b.target));if(!S||!E||!I(S)||!I(E))return!1;const C=w.searchQuery.trim().toLowerCase();return C?`${b.id} ${b.kind} ${b.label??""} ${b.source} ${b.target}`.toLowerCase().includes(C):!0}function P(){u&&(u.selectAll(".nodes > g.node").classed("dimmed",b=>!I(b)).classed("is-selected",b=>{var S;return((S=w.selection)==null?void 0:S.type)==="object"&&w.selection.id===b.id}),u.selectAll(".edges .edge-group").classed("dimmed",b=>!A(b)).classed("is-selected",b=>{var S;return((S=w.selection)==null?void 0:S.type)==="relation"&&w.selection.id===b.id}))}const Q={default:{spike:44,glow:.7,core:2.6}};function V(b){return{...Q[b.kind]??Q.default,s:n/20}}function Z(b){const S=Math.max(1,b*.041);return`M0,${-b} L${S},0 L0,${b} L${-S},0 Z`}function pt(b){const S=Math.max(1,b*.041);return`M${-b},0 L0,${-S} L${b},0 L0,${S} Z`}function _t(b){let S=0;for(let E=0;E<b.length;E++)S=S*31+b.charCodeAt(E)|0;return Math.abs(S)}function D(b){return b.label.length>20?`${b.label.slice(0,18)}…`:b.label}function X(b){b.select(".node-hit-area").attr("x",-28).attr("y",-28).attr("height",(n+8)*2).attr("width",E=>{const C=Math.max(D(E).length*6.5,E.kind.length*5.2);return n+8+V(E).spike+12+C+8}),b.select(".node-hit").attr("r",n+8);const S=E=>V(E).spike*V(E).s;b.select(".star-halo").attr("r",E=>S(E)*.88).attr("fill",E=>`url(#halo-${at(E.kind)})`).style("animation-delay",E=>`${-(_t(E.id)%3600)}ms`),b.select(".star-spikes").attr("opacity",E=>V(E).glow).style("animation-delay",E=>`${-(_t(E.id)*7%5200)}ms`),b.selectAll(".spike-v,.prism-v").attr("d",E=>Z(S(E))),b.selectAll(".spike-h,.prism-h").attr("d",E=>pt(S(E))),b.selectAll(".spike-d1,.spike-d2").attr("d",E=>Z(S(E)*.565)),b.select(".prism-r").style("animation-delay",E=>`${-(_t(E.id)*3%2200)}ms`),b.select(".prism-b").style("animation-delay",E=>`${-(_t(E.id)*3%2200+1100)}ms`),b.select(".star-core").attr("r",E=>V(E).core*V(E).s).style("animation-delay",E=>`${-(_t(E.id)*13%2800)}ms`),b.select(".hover-flash").attr("r",E=>S(E)*1.1),b.select(".hover-ring").attr("r",E=>S(E)*.95),b.select(".node-label").attr("x",E=>S(E)+12),b.select(".kind-label").attr("x",E=>S(E)+12).attr("y",12)}function at(b){return b.replace(/[^a-zA-Z0-9_-]/g,"_")}function ut(b){return typeof b=="object"?b.id:b}function yt(b){return b.direction!=="undirected"}function At(b,S=qt){return 1.5*S}let qt=1,he=1;function De(b){const S=Math.min(2.2,Math.max(1,1/Math.sqrt(b)));if(Math.abs(S-he)<.03){qt=he;return}qt=S,he=S,u==null||u.selectAll(".edges .edge-line").attr("stroke-width",E=>At())}function xt(b){b.select("linearGradient.edge-grad").each(function(S){const E=Nt(this);E.selectAll("stop").remove();const C=it.find(ct=>ct.id===ut(S.source)),H="#ffffff";yt(S)?(E.append("stop").attr("offset","0%").attr("stop-color",H).attr("stop-opacity",.5),E.append("stop").attr("offset","55%").attr("stop-color",H).attr("stop-opacity",.34),E.append("stop").attr("offset","100%").attr("stop-color",H).attr("stop-opacity",.08)):(E.append("stop").attr("offset","0%").attr("stop-color",H).attr("stop-opacity",0),E.append("stop").attr("offset","10%").attr("stop-color",H).attr("stop-opacity",.35),E.append("stop").attr("offset","90%").attr("stop-color",H).attr("stop-opacity",.35),E.append("stop").attr("offset","100%").attr("stop-color",H).attr("stop-opacity",0));const B=(C==null?void 0:C.x)??0,U=(C==null?void 0:C.y)??0;E.attr("x1",B).attr("y1",U)}),b.select(".edge-line").attr("stroke",S=>`url(#eg-${at(S.id)})`).attr("stroke-width",S=>At()).attr("stroke-opacity",1),b.select(".edge-hit").attr("stroke","transparent").attr("stroke-width",12).attr("stroke-opacity",1).style("pointer-events","stroke")}function kt(b,S,E,C){const B=b+(E-b)*.72,U=S+(C-S)*.72,ct=Math.atan2(C-S,E-b),ht=7,Vt=B-ht*Math.cos(ct-Math.PI/5),G=U-ht*Math.sin(ct-Math.PI/5),tt=B-ht*Math.cos(ct+Math.PI/5),pe=U-ht*Math.sin(ct+Math.PI/5);return`M${Vt.toFixed(1)},${G.toFixed(1)} L${B.toFixed(1)},${U.toFixed(1)} L${tt.toFixed(1)},${pe.toFixed(1)}`}function Ct(b,S){let E=b.select(".edges");E.empty()&&(E=b.append("g").attr("class","edges"));const C=E.selectAll("g.edge-group").data(S,U=>U.id);C.exit().remove();const H=C.enter().append("g").attr("class","edge-group").style("cursor","pointer");H.append("linearGradient").attr("class","edge-grad").attr("id",U=>`eg-${at(U.id)}`).attr("gradientUnits","userSpaceOnUse").attr("x1",0).attr("y1",0).attr("x2",1).attr("y2",0),H.append("line").attr("class","edge-line"),H.append("path").attr("class","edge-dir").attr("fill","none").attr("stroke","rgba(255,255,255,0.6)").attr("stroke-width",1.2).attr("stroke-linecap","round").attr("stroke-linejoin","round"),H.append("line").attr("class","edge-hit"),H.append("text").attr("class","edge-label");const B=H.merge(C);xt(B),B.select(".edge-dir").attr("opacity",U=>yt(U)?1:0),B.select(".edge-label").attr("text-anchor","middle").attr("font-size","11px").style("font-family","var(--font-sans)").attr("fill","rgba(255, 255, 255, 0.92)").attr("paint-order","stroke").attr("stroke","#000000").attr("stroke-width","3px").attr("stroke-linejoin","round").attr("opacity",0).text(U=>U.label??U.kind),B.on("mouseenter",(U,ct)=>{const ht=Nt(U.currentTarget);ht.select(".edge-line").attr("stroke-width",2.5*qt),ht.select(".edge-label").attr("opacity",1);const Vt=ut(ct.source),G=ut(ct.target);if(b.selectAll(".nodes > g.node").filter(tt=>tt.id===Vt||tt.id===G).classed("edge-hilite",!0),s&&i){s.textContent=`${Vt} ${yt(ct)?"→":"—"} ${G} · ${ct.kind}`,s.style.display="block";const tt=i.getBoundingClientRect();s.style.left=`${U.clientX-tt.left+12}px`,s.style.top=`${U.clientY-tt.top-8}px`}}).on("mouseleave",(U,ct)=>{s&&(s.style.display="none");const ht=Nt(U.currentTarget);ht.select(".edge-line").attr("stroke-width",At()),ht.select(".edge-label").attr("opacity",0);const Vt=ut(ct.source),G=ut(ct.target);b.selectAll(".nodes > g.node").filter(tt=>tt.id===Vt||tt.id===G).classed("edge-hilite",!1)}).on("click",(U,ct)=>{U.stopPropagation(),w.select({type:"relation",id:ct.id})})}function Qt(b,S){let E=b.select(".nodes");E.empty()&&(E=b.append("g").attr("class","nodes"));const C=E.selectAll("g.node").data(S,G=>G.id);C.exit().remove();const H=C.enter().append("g").attr("class","node").style("cursor","pointer").attr("tabindex",0).attr("role","button");H.append("rect").attr("class","node-hit-area").attr("fill","transparent").attr("rx",6),H.append("circle").attr("class","node-hit").attr("fill","transparent");const B=H.append("g").attr("class","star-sky");B.append("circle").attr("class","star-halo"),B.append("circle").attr("class","hover-flash").attr("fill","url(#flash-grad)"),B.append("circle").attr("class","hover-ring").attr("fill","none").attr("stroke","#ffffff").attr("stroke-width",1).attr("stroke-opacity",.9);const U=[{cls:"prism-r",color:"#e5504f",offV:"translate(0.8,0)",offH:"translate(0,-0.8)"},{cls:"prism-b",color:"#4a93e8",offV:"translate(-0.8,0)",offH:"translate(0,0.8)"}];for(const G of U){const tt=B.append("g").attr("class",G.cls).attr("fill",G.color).attr("opacity",.5);tt.append("path").attr("class","prism-v").attr("transform",G.offV),tt.append("path").attr("class","prism-h").attr("transform",G.offH)}const ct=B.append("g").attr("class","star-spikes");ct.append("path").attr("class","spike-v").attr("fill",G=>`url(#spike-v-${at(G.kind)})`),ct.append("path").attr("class","spike-h").attr("fill",G=>`url(#spike-h-${at(G.kind)})`),ct.append("path").attr("class","spike-d1").attr("transform","rotate(45)").attr("fill","rgba(255,255,255,0.95)").attr("fill-opacity",.55),ct.append("path").attr("class","spike-d2").attr("transform","rotate(-45)").attr("fill","rgba(255,255,255,0.95)").attr("fill-opacity",.55),B.append("circle").attr("class","star-core").attr("fill","#ffffff"),H.append("text").attr("class","node-label"),H.append("text").attr("class","kind-label");const ht=H.merge(C);ht.select(".node-label").text(D).attr("text-anchor","start").attr("dominant-baseline","central").style("font-family","var(--font-sans)").attr("font-size","11px").attr("font-weight","500").attr("fill",G=>j(G.kind)).attr("paint-order","stroke").attr("stroke","#000000").attr("stroke-width","3px").attr("stroke-linejoin","round").style("pointer-events","none").style("user-select","none"),ht.select(".kind-label").text(G=>G.kind).attr("text-anchor","start").style("font-family","var(--font-mono)").attr("font-size","9px").attr("fill","var(--ink-faint)").attr("paint-order","stroke").attr("stroke","#000000").attr("stroke-width","3px").attr("stroke-linejoin","round").style("pointer-events","none").style("user-select","none"),X(ht),ht.attr("aria-label",G=>`${G.label}(${G.kind})`).on("keydown",function(G,tt){(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),w.select({type:"object",id:tt.id}))}).on("focus",function(){Nt(this).classed("is-focused",!0)}).on("blur",function(){Nt(this).classed("is-focused",!1)}).on("mouseenter",function(G,tt){if(tt.label.length>20&&s&&i){const pe=i.getBoundingClientRect();s.textContent=tt.label,s.style.display="block",s.style.left=`${G.clientX-pe.left+12}px`,s.style.top=`${G.clientY-pe.top-8}px`}Nt(this).select(".node-label").attr("opacity",1)}).on("mouseleave",function(){s&&(s.style.display="none")}).on("click",(G,tt)=>{G.stopPropagation(),w.select({type:"object",id:tt.id})});const Vt=Jd().on("start",function(G,tt){!G.active&&o&&o.alphaTarget(.3).restart(),tt.fx=tt.x,tt.fy=tt.y,T.set(tt.id,{x:tt.x??0,y:tt.y??0}),Nt(this).classed("is-dragging",!0)}).on("drag",(G,tt)=>{tt.fx=G.x,tt.fy=G.y,T.set(tt.id,{x:G.x,y:G.y})}).on("end",function(G,tt){!G.active&&o&&o.alphaTarget(0),tt.fx=null,tt.fy=null,T.set(tt.id,{x:tt.x??0,y:tt.y??0}),Nt(this).classed("is-dragging",!1)});ht.call(Vt)}function Ft(){if(!a||!i)return;const b=Math.max(320,i.clientWidth||960),S=Math.max(240,i.clientHeight||680),E=Nt(a);E.selectAll("*").remove(),E.attr("viewBox",`0 0 ${b} ${S}`).attr("preserveAspectRatio","xMidYMid slice");const C=E.append("g"),H=Math.min(120,Math.max(30,Math.round(b*S/18e3)));for(let B=0;B<H;B++){const U=Math.random()<.7?.5+Math.random()*.5:1+Math.random()*.4,ct=Math.random()<.2,ht=C.append("circle").attr("cx",(Math.random()*b).toFixed(1)).attr("cy",(Math.random()*S).toFixed(1)).attr("r",U.toFixed(2)).attr("class",ct?"dust dust-tw":"dust");ct&&ht.style("animation-delay",`${(-Math.random()*4.5).toFixed(2)}s`)}}function St(){if(!r||!l)return;const{w:b,h:S}=N(),E=it.filter(H=>H.x!==void 0&&H.y!==void 0),C=xp(E,b,S,{nodeRadius:n+8,padding:48});C&&Nt(r).transition().duration(f?0:500).call(l.transform,Hn.translate(C.tx,C.ty).scale(C.scale))}function Ot(){!r||!l||Nt(r).transition().duration(300).call(l.scaleBy,1.3)}function Rt(){!r||!l||Nt(r).transition().duration(300).call(l.scaleBy,.7)}function Yt(){var Me;if(!r||!i)return;const b=w.snapshot;if(!b)return;const{w:S,h:E}=N(),C=b.manifest.id,H=x!==""&&x!==C;x=C;const B=q(C);T=B;const U=Nt(r),ct=r.__zoom;U.selectAll("*").remove(),U.attr("viewBox",`0 0 ${S} ${E}`).attr("preserveAspectRatio","xMidYMid meet");const ht=U.append("defs");ht.append("pattern").attr("id","dot-grid").attr("width",20).attr("height",20).attr("patternUnits","userSpaceOnUse").append("circle").attr("cx",10).attr("cy",10).attr("r",.8).attr("fill","rgba(255, 255, 255, 0.04)");const Vt=[...new Set(b.objects.map(W=>W.kind))];for(const W of Vt){const $t=j(W),zt=at(W),Ut=ht.append("radialGradient").attr("id",`halo-${zt}`);Ut.append("stop").attr("offset","0%").attr("stop-color",$t).attr("stop-opacity",.5),Ut.append("stop").attr("offset","45%").attr("stop-color",$t).attr("stop-opacity",.11),Ut.append("stop").attr("offset","100%").attr("stop-color",$t).attr("stop-opacity",0);const ae=ht.append("linearGradient").attr("id",`spike-v-${zt}`).attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",1);ae.append("stop").attr("offset","0%").attr("stop-color",$t).attr("stop-opacity",0),ae.append("stop").attr("offset","50%").attr("stop-color","#ffffff").attr("stop-opacity",.85),ae.append("stop").attr("offset","100%").attr("stop-color",$t).attr("stop-opacity",0);const un=ht.append("linearGradient").attr("id",`spike-h-${zt}`).attr("x1",0).attr("y1",0).attr("x2",1).attr("y2",0);un.append("stop").attr("offset","0%").attr("stop-color",$t).attr("stop-opacity",0),un.append("stop").attr("offset","50%").attr("stop-color","#ffffff").attr("stop-opacity",.85),un.append("stop").attr("offset","100%").attr("stop-color",$t).attr("stop-opacity",0)}const G=ht.append("radialGradient").attr("id","flash-grad");G.append("stop").attr("offset","0%").attr("stop-color","#ffffff").attr("stop-opacity",.85),G.append("stop").attr("offset","45%").attr("stop-color","#ffffff").attr("stop-opacity",.18),G.append("stop").attr("offset","100%").attr("stop-color","#ffffff").attr("stop-opacity",0),U.append("rect").attr("width",S).attr("height",E).attr("fill","url(#dot-grid)").attr("class","grid-bg"),u=U.append("g").attr("class","zoom-group"),l||(l=_p().scaleExtent([.15,4]).filter(W=>W.type==="wheel"||W.type==="dblclick"||W.type==="touchstart").on("zoom",W=>{u&&u.attr("transform",W.transform),wp(W.sourceEvent)&&(K=!0);const $t=Math.min(1,W.transform.k*1.5);U.select(".grid-bg").attr("opacity",$t),De(W.transform.k)})),U.call(l).on("dblclick.zoom",()=>{U.transition().duration(f?0:500).call(l.transform,Hn)}).style("cursor","grab"),U.on("pointerdown.middle-pan",p).on("pointermove.middle-pan",y).on("pointerup.middle-pan",W=>g(W.pointerId)).on("pointercancel.middle-pan",W=>g(W.pointerId)).on("pointerleave.middle-pan",W=>g(W.pointerId)).on("lostpointercapture.middle-pan",W=>g(W.pointerId)),ct&&!H&&u.attr("transform",ct);const tt=bp(b.objects.length),pe=new Map(b.objects.map((W,$t)=>[W.id,tt[$t]])),se=b.objects.map(W=>{const zt=B.get(W.id)??pe.get(W.id)??{x:0,y:0};return{...W,x:zt.x,y:zt.y}}),ln=new Set(se.map(W=>W.id)),Ke=b.relations.filter(W=>ln.has(W.source)&&ln.has(W.target)).map(W=>({...W}));it=se,o==null||o.stop(),o=up(se).force("link",So(Ke).id(W=>W.id).distance(160)).force("charge",cp().strength(-Math.min(800,300+se.length*25))).force("center",Rv(S/2,E/2)).force("collision",tp().radius(n+8)).alphaDecay(.02),Ct(u,Ke),Qt(u,se),P(),De(((Me=r.__zoom)==null?void 0:Me.k)??1),!f&&!H&&u.selectAll(".nodes > g.node").attr("opacity",0).transition().delay((W,$t)=>Math.min($t,40)*15).duration(d).ease(ko).attr("opacity",1);const xn=u.selectAll(".edges .edge-group"),Cn=u.selectAll(".nodes > g.node"),rr=()=>{xn.each(function(W){const $t=Nt(this),zt=typeof W.source=="object"?W.source:null,Ut=typeof W.target=="object"?W.target:null,ae=(zt==null?void 0:zt.x)??0,un=(zt==null?void 0:zt.y)??0,Cr=(Ut==null?void 0:Ut.x)??0,Rr=(Ut==null?void 0:Ut.y)??0;$t.select(".edge-line").attr("x1",ae).attr("y1",un).attr("x2",Cr).attr("y2",Rr),$t.select(".edge-hit").attr("x1",ae).attr("y1",un).attr("x2",Cr).attr("y2",Rr),$t.select(".edge-grad").attr("x1",ae).attr("y1",un).attr("x2",Cr).attr("y2",Rr),yt(W)?$t.select(".edge-dir").attr("d",kt(ae,un,Cr,Rr)).attr("opacity",1):$t.select(".edge-dir").attr("opacity",0),$t.select(".edge-label").attr("opacity")!=="0"&&$t.select(".edge-label").attr("x",(ae+Cr)/2).attr("y",(un+Rr)/2-5)}),Cn.attr("transform",W=>`translate(${W.x??0},${W.y??0})`),!F&&o&&o.alpha()<=.3&&(F=!0,St())};o.on("tick",rr),o.on("end",()=>{for(const W of se)W.x!==void 0&&W.y!==void 0&&B.set(W.id,{x:W.x,y:W.y});K||St()}),L&&clearTimeout(L),F=!1,se.length>0&&(L=setTimeout(()=>{F||(F=!0,St())},4e3))}function me(){if(!r||!u||!o){Yt();return}const b=w.snapshot;if(!b)return;const S=new Set(b.objects.map(B=>B.id));if(!(it.length===b.objects.length&&it.every(B=>S.has(B.id))&&bt(it)===bt(b.objects))){Yt();return}const C=new Set(b.objects.map(B=>B.id)),H=b.relations.filter(B=>C.has(B.source)&&C.has(B.target)).map(B=>({...B}));Ct(u,H),o.force("link",So(H).id(B=>B.id).distance(160)),o.alpha(.3).restart(),P()}let ot=null,Pt=null;pn(()=>{const b=w.snapshot;if(!b||!r)return;const S=bt(b.objects),E=k(b.relations),C=b.manifest.id!==x,H=ot!==null&&S!==ot,B=Pt!==null&&E!==Pt,U=ot===null;ot=S,Pt=E,U||C||H?Yt():B&&me()}),pn(()=>{if(w.moduleStatus,!u||!w.snapshot)return;const S=Nt(r).select("defs");if(!S.empty()){for(const E of new Set(w.objects.map(C=>C.kind))){const C=j(E),H=at(E),B=S.select(`#halo-${H}`);B.empty()||(B.selectAll("stop").remove(),B.append("stop").attr("offset","0%").attr("stop-color",C).attr("stop-opacity",.5),B.append("stop").attr("offset","45%").attr("stop-color",C).attr("stop-opacity",.11),B.append("stop").attr("offset","100%").attr("stop-color",C).attr("stop-opacity",0))}X(u.selectAll(".nodes > g.node")),u.selectAll(".nodes > g.node").select(".node-label").attr("fill",E=>j(E.kind)),xt(u.selectAll(".edges .edge-group"))}}),pn(()=>{w.selection,w.searchQuery,w.kindFilter,P()}),pn(()=>{const b=w.zoomRequest;b&&(b.kind==="in"?Ot():b.kind==="out"?Rt():b.kind==="fit"&&St())}),pn(()=>{var B;const b=w.locateRequest;if(!b||!r||!l)return;const S=it.find(U=>U.id===b.nodeId);if(!S||S.x===void 0||S.y===void 0)return;const{w:E,h:C}=N(),H=((B=r.__zoom)==null?void 0:B.k)??1;Nt(r).transition().duration(f?0:450).ease(ko).call(l.transform,Hn.translate(E/2,C/2).scale(H).translate(-S.x,-S.y))});function Ht(b){if(b.key!=="Tab")return;const S=document.activeElement;if(!(S!=null&&S.classList.contains("node")))return;b.preventDefault();const E=Array.from((i==null?void 0:i.querySelectorAll("g.node:not(.dimmed)"))??[]);if(E.length===0)return;const C=E.indexOf(S),H=E[(C+(b.shiftKey?-1:1)+E.length)%E.length];H==null||H.focus()}let Dt=null,Zt=null;Ta(()=>{if(!i)return;typeof ResizeObserver<"u"&&(Dt=new ResizeObserver(()=>{if(!w.snapshot||!r)return;const{w:E,h:C}=N();Nt(r).attr("viewBox",`0 0 ${E} ${C}`),Zt&&clearTimeout(Zt),Zt=setTimeout(()=>{F=!0,St()},180),Ft()}),Dt.observe(i)),Ft(),Nt(r).on("click.bg",E=>{var H,B,U;const C=E.target;(C===r||(H=C.classList)!=null&&H.contains("grid-bg"))&&(document.activeElement instanceof Element&&document.activeElement.closest("g.node")&&((U=(B=document.activeElement).blur)==null||U.call(B)),w.select(null))});const b=E=>{E.target instanceof HTMLInputElement||E.target instanceof HTMLTextAreaElement||(E.key==="+"||E.key==="="?(E.preventDefault(),Ot()):E.key==="-"?(E.preventDefault(),Rt()):E.key==="0"&&(E.preventDefault(),St()))};window.addEventListener("keydown",b);const S=E=>g(E.pointerId);return window.addEventListener("pointerup",S),window.addEventListener("pointercancel",S),()=>{window.removeEventListener("keydown",b),window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S)}}),lf(()=>{g(),o==null||o.stop(),Dt==null||Dt.disconnect(),L&&clearTimeout(L),Zt&&clearTimeout(Zt)});var Xt=$p(),ee=z(Xt),Ue=M(z(ee),2);ji(Ue,b=>a=b,()=>a);var ie=M(ee,2);ji(ie,b=>r=b,()=>r);var ve=M(ie,2);ji(ve,b=>s=b,()=>s),ji(Xt,b=>i=b,()=>i),vt("keydown",Xt,Ht),Y(t,Xt),Or()}nr(["keydown"]);var qp=et('<div><div class="drawer-header svelte-9ocgkg"><span class="drawer-title svelte-9ocgkg"> </span> <span class="drawer-kbd svelte-9ocgkg">Esc 关闭</span> <button class="drawer-close svelte-9ocgkg" aria-label="关闭"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3.5 3.5l8 8M11.5 3.5l-8 8" stroke-linecap="round"></path></svg></button></div> <div class="drawer-body svelte-9ocgkg"><!></div></div>');function ja(t,e){let n=of(e,"width",3,400);var r=qp();let i,s;var a=z(r),o=z(a),l=lt(o,!0),u=M(o,4),c=M(a,2),v=z(c);Uc(v,()=>e.children),gt(()=>{i=Se(r,1,"drawer svelte-9ocgkg",null,i,{visible:e.open}),s=ws(r,"",s,{width:`${n()??""}px`}),rt(l,e.title)}),vt("click",u,function(...f){var d;(d=e.onclose)==null||d.apply(this,f)}),Y(t,r)}nr(["click"]);var Np=et('<button class="json-copy svelte-o53x5"> </button>'),Tp=et('<pre class="json-body svelte-o53x5"> </pre>'),Op=et('<div class="json-block svelte-o53x5"><div class="json-head svelte-o53x5"><button class="json-toggle svelte-o53x5"><svg width="9" height="9" viewBox="0 0 9 9" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><path d="M2.5 1 6.5 4.5 2.5 8" stroke-linecap="round" stroke-linejoin="round"></path></svg> </button> <!></div> <!></div>');function vr(t,e){let n=dt(!1),r=dt(!1);const i=Wt(()=>e.value===void 0?"":JSON.stringify(e.value,null,2));async function s(){try{await navigator.clipboard.writeText(h(i)),O(r,!0),setTimeout(()=>O(r,!1),1500)}catch{O(r,!1)}}var a=Op(),o=z(a),l=z(o),u=z(l);let c;var v=M(u),f=M(l,2);{var d=p=>{var y=Np(),$=lt(y,!0);gt(()=>rt($,h(r)?"已复制":"复制")),vt("click",y,s),Y(p,y)};Mt(f,p=>{h(n)&&p(d)})}var m=M(o,2);{var g=p=>{var y=Tp(),$=lt(y,!0);gt(()=>rt($,h(i))),Y(p,y)};Mt(m,p=>{h(n)&&p(g)})}gt(()=>{Le(l,"aria-expanded",h(n)),c=Se(u,0,"svelte-o53x5",null,c,{open:h(n)}),rt(v,` ${e.label??""}`)}),vt("click",l,()=>O(n,!h(n))),Y(t,a)}nr(["click"]);var Ip=et('<div class="degraded svelte-nf0sji" role="note"><span class="degraded-tag svelte-nf0sji">降级</span> </div>'),Cp=et('<section class="section"><h3 class="section-title">标签</h3> <p class="plan-desc"> </p></section>'),Rp=et('<p class="plan-desc">暂无关系——在画布上选择该对象后可从它创建第一条关系。</p>'),Pp=et('<button class="relation-row svelte-nf0sji"><span class="relation-dir svelte-nf0sji">→</span> <span class="relation-name svelte-nf0sji"> </span> <span class="relation-endpoint svelte-nf0sji"> </span></button>'),Dp=et('<button class="relation-row svelte-nf0sji"><span class="relation-dir svelte-nf0sji">←</span> <span class="relation-name svelte-nf0sji"> </span> <span class="relation-endpoint svelte-nf0sji"> </span></button>'),Fp=et('<div class="sub-list column"><!> <!></div>'),Lp=et('<button class="chip chip-link"> </button>'),zp=et('<div class="action-error svelte-nf0sji" role="alert"><span class="action-error-code svelte-nf0sji"> </span> <span class="action-error-text svelte-nf0sji"> </span></div>'),jp=et('<section class="section"><h3 class="section-title">模块动作</h3> <div class="sub-list"></div> <!></section>'),Hp=et('<h2 class="entity-title"> </h2> <div class="meta-grid"><span class="meta-tag id-tag"> </span> <span class="meta-tag"><span class="kind-dot svelte-nf0sji"></span> </span> <span class="meta-tag"> </span></div> <div class="object-actions svelte-nf0sji"><button class="action-btn svelte-nf0sji">编辑</button> <button class="action-btn svelte-nf0sji">以此为起点创建关系</button></div> <!> <!> <section class="section"><h3 class="section-title">关系 <span class="section-count"> </span></h3> <!></section> <!> <section class="section"><h3 class="section-title">主类型数据</h3> <!> <!> <!></section>',1);function Vp(t,e){Tr(e,!0);let n=dt(!1),r;pn(()=>{const m=w.selection;(m==null?void 0:m.type)==="object"?m.id!==r&&(O(n,!1),requestAnimationFrame(()=>O(n,!0)),r=m.id):(O(n,!1),r=void 0)});const i=Wt(()=>w.selectedObject),s=Wt(()=>h(i)?Ms(h(i).kind,w.moduleStatus):null),a=Wt(()=>h(i)?w.relations.filter(m=>m.source===h(i).id):[]),o=Wt(()=>h(i)?w.relations.filter(m=>m.target===h(i).id):[]);let l=dt(null),u=dt(null);async function c(m,g){var y;if(!h(i)||w.readOnly||h(u))return;O(l,null);const p=g&&typeof g=="object"?JSON.parse(JSON.stringify(g)):{};O(u,m,!0);try{const $=await w.executeAction(m,h(i).id,p,(y=w.moduleStatus)==null?void 0:y.registryRevision);$.kind==="mutation"?w.actionMessage=`动作 ${m} 已提交 · r${$.mutation.snapshot.revision}`:w.actionMessage=`动作 ${m} 返回结果`}catch($){const q=$;O(l,{code:(q==null?void 0:q.code)??"UNKNOWN",message:(q==null?void 0:q.message)??"动作执行失败。"},!0)}finally{O(u,null)}}var v=ms(),f=rn(v);{var d=m=>{ja(m,{title:"对象详情",get open(){return h(n)},onclose:()=>w.select(null),children:(g,p)=>{var y=Hp(),$=rn(y),q=lt($,!0),x=M($,2),T=z(x),F=lt(T,!0),L=M(T,2),K=z(L),it=M(K,1,!0),N=M(L,2),j=lt(N),st=M(x,2),bt=z(st),k=M(bt,2),I=M(st,2);{var A=xt=>{var kt=Ip(),Ct=M(z(kt));gt(()=>rt(Ct,` 模块 ${h(s).moduleId??"(未注册)"??""} 不可用:${h(s).reason??"原始数据保持可读,依赖该模块的编辑与动作已禁用。"??""}`)),Y(xt,kt)};Mt(I,xt=>{h(s)&&!h(s).available&&xt(A)})}var P=M(I,2);{var Q=xt=>{var kt=Cp(),Ct=M(z(kt),2),Qt=lt(Ct,!0);gt(()=>rt(Qt,h(i).label)),Y(xt,kt)};Mt(P,xt=>{h(i).label&&xt(Q)})}var V=M(P,2),Z=z(V),pt=M(z(Z)),_t=lt(pt,!0),D=M(Z,2);{var X=xt=>{var kt=Rp();Y(xt,kt)},at=xt=>{var kt=Fp(),Ct=z(kt);gn(Ct,17,()=>h(a),Ft=>Ft.id,(Ft,St)=>{var Ot=Pp(),Rt=M(z(Ot),2),Yt=lt(Rt,!0),me=M(Rt,2),ot=lt(me,!0);gt(()=>{rt(Yt,h(St).label??h(St).kind),rt(ot,h(St).target)}),vt("click",Ot,()=>w.select({type:"relation",id:h(St).id})),Y(Ft,Ot)});var Qt=M(Ct,2);gn(Qt,17,()=>h(o),Ft=>Ft.id,(Ft,St)=>{var Ot=Dp(),Rt=M(z(Ot),2),Yt=lt(Rt,!0),me=M(Rt,2),ot=lt(me,!0);gt(()=>{rt(Yt,h(St).label??h(St).kind),rt(ot,h(St).source)}),vt("click",Ot,()=>w.select({type:"relation",id:h(St).id})),Y(Ft,Ot)}),Y(xt,kt)};Mt(D,xt=>{h(a).length+h(o).length===0?xt(X):xt(at,-1)})}var ut=M(V,2);{var yt=xt=>{var kt=jp(),Ct=M(z(kt),2);gn(Ct,21,()=>h(s).operations,St=>St.operation,(St,Ot)=>{var Rt=Lp(),Yt=lt(Rt,!0);gt(()=>{Rt.disabled=w.readOnly||h(u)!==null,rt(Yt,h(u)===h(Ot).operation?"执行中…":h(Ot).operation)}),vt("click",Rt,()=>c(h(Ot).operation,h(Ot).inputTemplate)),Y(St,Rt)});var Qt=M(Ct,2);{var Ft=St=>{var Ot=zp(),Rt=z(Ot),Yt=lt(Rt,!0),me=M(Rt,2),ot=lt(me,!0);gt(()=>{rt(Yt,h(l).code),rt(ot,h(l).message)}),Y(St,Ot)};Mt(Qt,St=>{h(l)&&St(Ft)})}Y(xt,kt)};Mt(ut,xt=>{h(s)&&h(s).operations.length>0&&xt(yt)})}var At=M(ut,2),qt=M(z(At),2);vr(qt,{label:"data",get value(){return h(i).data}});var he=M(qt,2);vr(he,{label:"capabilities",get value(){return h(i).capabilities}});var De=M(he,2);vr(De,{label:"meta",get value(){return h(i).meta}}),gt(xt=>{rt(q,h(i).label||h(i).id),rt(F,h(i).id),ws(K,`background: ${xt??""}`),rt(it,h(i).kind),rt(j,`r${w.revision??""}`),bt.disabled=w.readOnly,k.disabled=w.readOnly,rt(_t,h(a).length+h(o).length)},[()=>Es(h(i).kind,w.moduleStatus)]),vt("click",bt,()=>w.openEditor("edit-object",{targetId:h(i).id})),vt("click",k,()=>w.openEditor("create-relation",{sourceId:h(i).id})),Y(g,y)},$$slots:{default:!0}})};Mt(f,m=>{h(i)&&m(d)})}Y(t,v),Or()}nr(["click"]);var Bp=et('<div class="degraded svelte-n9davv" role="note"><span class="degraded-tag svelte-n9davv">降级</span> </div>'),Gp=et('<section class="section"><h3 class="section-title">标签</h3> <p class="plan-desc"> </p></section>'),Yp=et('<h2 class="entity-title"> </h2> <div class="meta-grid"><span class="meta-tag id-tag"> </span> <span class="meta-tag"><span class="kind-dot svelte-n9davv"></span> </span> <span class="meta-tag"> </span></div> <div class="relation-actions svelte-n9davv"><button class="action-btn svelte-n9davv">编辑</button> <button class="action-btn svelte-n9davv">编辑 source 对象</button></div> <!> <section class="section"><h3 class="section-title">端点</h3> <div class="endpoint-row svelte-n9davv"><span class="endpoint-label svelte-n9davv">source</span> <button class="endpoint-link svelte-n9davv"> </button></div> <div class="endpoint-row svelte-n9davv"><span class="endpoint-label svelte-n9davv">target</span> <button class="endpoint-link svelte-n9davv"> </button></div></section> <!> <section class="section"><h3 class="section-title">关系数据</h3> <!> <!> <!></section>',1);function Xp(t,e){Tr(e,!0);let n=dt(!1),r;pn(()=>{const c=w.selection;(c==null?void 0:c.type)==="relation"?c.id!==r&&(O(n,!1),requestAnimationFrame(()=>O(n,!0)),r=c.id):(O(n,!1),r=void 0)});const i=Wt(()=>w.selectedRelation),s=Wt(()=>h(i)?Ms(h(i).kind,w.moduleStatus):null);function a(c){w.select({type:"object",id:c})}var o=ms(),l=rn(o);{var u=c=>{ja(c,{title:"关系详情",get open(){return h(n)},width:360,onclose:()=>w.select(null),children:(v,f)=>{var d=Yp(),m=rn(d),g=lt(m,!0),p=M(m,2),y=z(p),$=lt(y,!0),q=M(y,2),x=z(q),T=M(x,1,!0),F=M(q,2),L=lt(F),K=M(p,2),it=z(K),N=M(it,2),j=M(K,2);{var st=ut=>{var yt=Bp(),At=M(z(yt));gt(()=>rt(At,` 模块 ${h(s).moduleId??"(未注册)"??""} 不可用:${h(s).reason??"原始数据保持可读。"??""}`)),Y(ut,yt)};Mt(j,ut=>{h(s)&&!h(s).available&&ut(st)})}var bt=M(j,2),k=M(z(bt),2),I=M(z(k),2),A=lt(I,!0),P=M(k,2),Q=M(z(P),2),V=lt(Q,!0),Z=M(bt,2);{var pt=ut=>{var yt=Gp(),At=M(z(yt),2),qt=lt(At,!0);gt(()=>rt(qt,h(i).label)),Y(ut,yt)};Mt(Z,ut=>{h(i).label&&ut(pt)})}var _t=M(Z,2),D=M(z(_t),2);vr(D,{label:"data",get value(){return h(i).data}});var X=M(D,2);vr(X,{label:"capabilities",get value(){return h(i).capabilities}});var at=M(X,2);vr(at,{label:"meta",get value(){return h(i).meta}}),gt(ut=>{rt(g,h(i).label??h(i).kind),rt($,h(i).id),ws(x,`background: ${ut??""}`),rt(T,h(i).kind),rt(L,`${h(i).direction==="undirected"?"无向":"有向"}${h(i).direction==="directed"?" →":""}`),it.disabled=w.readOnly,N.disabled=w.readOnly,rt(A,h(i).source),rt(V,h(i).target)},[()=>Es(h(i).kind,w.moduleStatus)]),vt("click",it,()=>w.openEditor("edit-relation",{targetId:h(i).id})),vt("click",N,()=>w.openEditor("edit-object",{targetId:h(i).source})),vt("click",I,()=>a(h(i).source)),vt("click",Q,()=>a(h(i).target)),Y(v,d)},$$slots:{default:!0}})};Mt(l,c=>{h(i)&&c(u)})}Y(t,o),Or()}nr(["click"]);var Up=et('<div class="readonly-note svelte-y9fra9" role="note">只读模式:所有写入口已禁用。</div>'),Kp=et("<option></option>"),Wp=et('<span class="field-hint svelte-y9fra9"> </span>'),Jp=et('<div class="field-pair svelte-y9fra9"><label class="field svelte-y9fra9"><span class="field-label svelte-y9fra9">source</span> <input class="field-input mono svelte-y9fra9" type="text" required="" placeholder="起点对象 ID"/></label> <label class="field svelte-y9fra9"><span class="field-label svelte-y9fra9">target</span> <input class="field-input mono svelte-y9fra9" type="text" required="" placeholder="终点对象 ID"/></label></div> <label class="field svelte-y9fra9"><span class="field-label svelte-y9fra9">方向</span> <select class="field-input svelte-y9fra9"><option class="svelte-y9fra9">有向(directed)</option><option class="svelte-y9fra9">无向(undirected)</option></select></label>',1),Qp=et('<button type="button" class="mini-btn svelte-y9fra9">重新读取</button>'),Zp=et('<div class="form-error svelte-y9fra9" role="alert"><span class="error-code svelte-y9fra9"> </span> <span class="error-text svelte-y9fra9"> </span> <!></div>'),t0=et('<span class="confirm-text svelte-y9fra9"> </span> <button class="danger-btn svelte-y9fra9" type="button">确认删除</button> <button class="ghost-btn svelte-y9fra9" type="button">取消</button>',1),e0=et('<button class="danger-btn svelte-y9fra9" type="button">删除</button>'),n0=et('<div class="danger-zone svelte-y9fra9"><!></div>'),r0=et('<form class="editor-form svelte-y9fra9"><!> <label class="field svelte-y9fra9"><span class="field-label svelte-y9fra9"> </span> <input class="field-input mono svelte-y9fra9" type="text" required=""/></label> <label class="field svelte-y9fra9"><span class="field-label svelte-y9fra9">kind</span> <input class="field-input mono svelte-y9fra9" type="text" required="" list="known-kinds" placeholder="例如 research.question"/> <datalist id="known-kinds"></datalist> <!></label> <!> <label class="field svelte-y9fra9"><span class="field-label svelte-y9fra9">标签</span> <input class="field-input svelte-y9fra9" type="text" placeholder="可选的人类可读名称"/></label> <label class="field svelte-y9fra9"><span class="field-label svelte-y9fra9">data(JSON,可选)</span> <textarea class="field-input mono svelte-y9fra9" rows="5" placeholder="{"key": "value"}"></textarea></label> <!> <div class="form-actions svelte-y9fra9"><button class="primary-btn svelte-y9fra9" type="submit"> </button> <button class="ghost-btn svelte-y9fra9" type="button">取消</button></div> <!></form>');function i0(t,e){Tr(e,!0);const n=Wt(()=>w.editor),r=Wt(()=>{var N;return((N=h(n))==null?void 0:N.mode)==="edit-object"?w.objects.find(j=>j.id===h(n).targetId):void 0}),i=Wt(()=>{var N;return((N=h(n))==null?void 0:N.mode)==="edit-relation"?w.relations.find(j=>j.id===h(n).targetId):void 0});let s=dt(""),a=dt(""),o=dt(""),l=dt(""),u=dt(""),c=dt("directed"),v=dt(""),f=dt(!1),d=dt(null),m=dt(!1),g=null;const p=Wt(()=>[...new Set([...w.objects.map(N=>N.kind),...w.relations.map(N=>N.kind)])].sort()),y=Wt(()=>h(a).trim()?Ms(h(a).trim(),w.moduleStatus).fields:[]);pn(()=>{const N=w.editor;if(!N){g=null;return}const j=`${N.mode}:${N.targetId??""}:${N.sourceId??""}`;g!==j&&(g=j,O(d,null),O(m,!1),N.mode==="create-object"?(O(s,""),O(a,""),O(o,""),O(v,"")):N.mode==="edit-object"&&h(r)?(O(s,h(r).id,!0),O(a,h(r).kind,!0),O(o,h(r).label,!0),O(v,h(r).data?JSON.stringify(h(r).data,null,2):"",!0)):N.mode==="create-relation"?(O(s,""),O(a,""),O(o,""),O(l,N.sourceId??"",!0),O(u,""),O(c,"directed"),O(v,"")):N.mode==="edit-relation"&&h(i)&&(O(s,h(i).id,!0),O(a,h(i).kind,!0),O(o,h(i).label??"",!0),O(l,h(i).source,!0),O(u,h(i).target,!0),O(c,h(i).direction,!0),O(v,h(i).data?JSON.stringify(h(i).data,null,2):"",!0)))});function $(){if(!h(v).trim())return;let N;try{N=JSON.parse(h(v))}catch{throw{code:"INVALID_JSON",message:"data 必须是合法的 JSON 对象。"}}if(!N||typeof N!="object"||Array.isArray(N))throw{code:"INVALID_JSON",message:"data 必须是 JSON 对象(不能是数组或标量)。"};return N}function q(N,j){if(!N.trim())throw{code:"MISSING_FIELD",message:`${j}不能为空。`};return N.trim()}async function x(N){if(N.preventDefault(),!(h(f)||!h(n))){O(d,null);try{const j=$(),st=[];h(n).mode==="create-object"||h(n).mode==="edit-object"?st.push({op:"upsert_object",object:{id:q(h(s),"对象 ID"),kind:q(h(a),"kind"),label:h(o).trim(),...j?{data:j}:{}}}):st.push({op:"upsert_relation",relation:{id:q(h(s),"关系 ID"),kind:q(h(a),"kind"),source:q(h(l),"source"),target:q(h(u),"target"),direction:h(c),...h(o).trim()?{label:h(o).trim()}:{},...j?{data:j}:{}}}),O(f,!0);const bt=await w.commit({mutations:st,label:h(n).mode}),k=st[0],I=k.op==="upsert_object"?k.object.id:k.op==="upsert_relation"?k.relation.id:"";w.actionMessage=`已保存 ${I} · r${bt.snapshot.revision}`,w.select(k.op==="upsert_object"?{type:"object",id:I}:{type:"relation",id:I}),w.closeEditor()}catch(j){const st=j;O(d,{code:(st==null?void 0:st.code)??"UNKNOWN",message:(st==null?void 0:st.message)??(j instanceof Error?j.message:"提交失败,请稍后重试。")},!0)}finally{O(f,!1)}}}async function T(){var N;if(!(!h(n)||!h(n).targetId||h(f))){O(d,null);try{const j=h(n).mode==="edit-object"?"delete_object":"delete_relation",st=await w.commit({mutations:[{op:j,id:h(n).targetId}],label:`delete ${h(n).targetId}`});w.actionMessage=`已删除 ${h(n).targetId} · r${st.snapshot.revision}`,((N=w.selection)==null?void 0:N.id)===h(n).targetId&&w.select(null),w.closeEditor()}catch(j){const st=j;O(d,{code:(st==null?void 0:st.code)??"UNKNOWN",message:(st==null?void 0:st.message)??"删除失败。"},!0)}finally{O(f,!1),O(m,!1)}}}async function F(){await w.reload(),w.error||O(d,null)}var L=ms(),K=rn(L);{var it=N=>{{let j=Wt(()=>h(n).mode==="create-object"?"新增对象":h(n).mode==="edit-object"?"编辑对象":h(n).mode==="create-relation"?"新增关系":"编辑关系");ja(N,{get title(){return h(j)},open:!0,onclose:()=>w.closeEditor(),children:(st,bt)=>{var k=r0(),I=z(k);{var A=ot=>{var Pt=Up();Y(ot,Pt)};Mt(I,ot=>{w.readOnly&&ot(A)})}var P=M(I,2),Q=z(P),V=lt(Q),Z=M(Q,2),pt=M(P,2),_t=M(z(pt),2),D=M(_t,2);gn(D,20,()=>h(p),ot=>ot,(ot,Pt)=>{var Ht=Kp(),Dt={};gt(()=>{Dt!==(Dt=Pt)&&(Ht.value=(Ht.__value=Dt)??"")}),Y(ot,Ht)});var X=M(D,2);{var at=ot=>{var Pt=Wp(),Ht=lt(Pt);gt(Dt=>rt(Ht,`模块声明字段:${Dt??""}(仅提示,不做领域解释)`),[()=>h(y).join("、")]),Y(ot,Pt)};Mt(X,ot=>{h(y).length&&ot(at)})}var ut=M(pt,2);{var yt=ot=>{var Pt=Jp(),Ht=rn(Pt),Dt=z(Ht),Zt=M(z(Dt),2),Xt=M(Dt,2),ee=M(z(Xt),2),Ue=M(Ht,2),ie=M(z(Ue),2),ve=z(ie);ve.value=ve.__value="directed";var b=M(ve);b.value=b.__value="undirected",Zc(ie),gt(()=>{Zt.disabled=w.readOnly,ee.disabled=w.readOnly,ie.disabled=w.readOnly}),Pn(Zt,()=>h(l),S=>O(l,S)),Pn(ee,()=>h(u),S=>O(u,S)),tf(ie,()=>h(c),S=>O(c,S)),Y(ot,Pt)},At=Wt(()=>h(n).mode.includes("relation"));Mt(ut,ot=>{h(At)&&ot(yt)})}var qt=M(ut,2),he=M(z(qt),2),De=M(qt,2),xt=M(z(De),2),kt=M(De,2);{var Ct=ot=>{var Pt=Zp(),Ht=z(Pt),Dt=lt(Ht,!0),Zt=M(Ht,2),Xt=lt(Zt,!0),ee=M(Zt,2);{var Ue=ie=>{var ve=Qp();vt("click",ve,F),Y(ie,ve)};Mt(ee,ie=>{(h(d).code==="REVISION_CONFLICT"||h(d).code==="PATCH_GAP")&&ie(Ue)})}gt(()=>{rt(Dt,h(d).code),rt(Xt,h(d).message)}),Y(ot,Pt)};Mt(kt,ot=>{h(d)&&ot(Ct)})}var Qt=M(kt,2),Ft=z(Qt),St=lt(Ft,!0),Ot=M(Ft,2),Rt=M(Qt,2);{var Yt=ot=>{var Pt=n0(),Ht=z(Pt);{var Dt=Xt=>{var ee=t0(),Ue=rn(ee),ie=lt(Ue),ve=M(Ue,2),b=M(ve,2);gt(()=>{rt(ie,`确认删除 ${h(n).targetId??""}?${h(n).mode==="edit-object"?"其关联关系将按 Core 语义一并消失。":""}`),ve.disabled=w.readOnly||h(f)}),vt("click",ve,T),vt("click",b,()=>O(m,!1)),Y(Xt,ee)},Zt=Xt=>{var ee=e0();gt(()=>ee.disabled=w.readOnly||h(f)),vt("click",ee,()=>O(m,!0)),Y(Xt,ee)};Mt(Ht,Xt=>{h(m)?Xt(Dt):Xt(Zt,-1)})}Y(ot,Pt)},me=Wt(()=>h(n).mode.startsWith("edit")&&h(n).targetId);Mt(Rt,ot=>{h(me)&&ot(Yt)})}gt((ot,Pt,Ht,Dt,Zt)=>{rt(V,`${ot??""}${Pt??""}`),Z.disabled=Ht,Le(Z,"placeholder",Dt),_t.disabled=w.readOnly,he.disabled=w.readOnly,xt.disabled=w.readOnly,Ft.disabled=w.readOnly||h(f),rt(St,Zt),Ot.disabled=h(f)},[()=>h(n).mode.includes("relation")?"关系 ID":"对象 ID",()=>h(n).mode.startsWith("edit")?"(不可变)":"",()=>w.readOnly||h(n).mode.startsWith("edit"),()=>h(n).mode.includes("relation")?"例如 rel-9":"例如 note-9",()=>h(f)?"提交中…":h(n).mode.startsWith("create")?"创建":"保存修改"]),Nl("submit",k,x),Pn(Z,()=>h(s),ot=>O(s,ot)),Pn(_t,()=>h(a),ot=>O(a,ot)),Pn(he,()=>h(o),ot=>O(o,ot)),Pn(xt,()=>h(v),ot=>O(v,ot)),vt("click",Ot,()=>w.closeEditor()),Y(st,k)},$$slots:{default:!0}})}};Mt(K,N=>{h(n)&&N(it)})}Y(t,L),Or()}nr(["click"]);function Oo(t,e){return!e||t.toLocaleLowerCase().includes(e)}function s0(t,e={}){var o,l;if(!t)return{objects:[],relations:[]};const n=((o=e.query)==null?void 0:o.trim().toLocaleLowerCase())??"",r=((l=e.kind)==null?void 0:l.trim())??"",i=t.objects.filter(u=>Oo(`${u.id} ${u.kind} ${u.label} ${JSON.stringify(u.data??{})}`,n)&&(!r||u.kind===r)),s=new Set(i.map(u=>u.id)),a=t.relations.filter(u=>Oo(`${u.id} ${u.kind} ${u.label??""} ${u.source} ${u.target}`,n)&&(!r||s.has(u.source)||s.has(u.target))&&s.has(u.source)&&s.has(u.target));return{objects:i,relations:a}}var a0=et('<span class="graph-label svelte-1n46o8q"> </span>'),o0=et('<button><span class="sb-dot svelte-1n46o8q"></span> <span class="sb-n svelte-1n46o8q"> </span> <span class="sb-label svelte-1n46o8q"> </span></button>'),l0=et('<button class="sb-clear svelte-1n46o8q" title="清除全部过滤">清除</button>'),u0=et('<div class="status-bar svelte-1n46o8q" role="group" aria-label="按 kind 过滤(计数即图例)"><span class="sb-total svelte-1n46o8q"><span class="sb-n svelte-1n46o8q"> </span> objects</span> <!> <!></div>'),c0=et('<span class="conn-off svelte-1n46o8q" title="只读模式:所有写操作入口已禁用">只读</span>'),f0=et('<div class="loading-state svelte-1n46o8q"><div class="skeleton-graph svelte-1n46o8q"><div class="skeleton-node svelte-1n46o8q" style="left: 20%; top: 30%;"></div> <div class="skeleton-node svelte-1n46o8q" style="left: 45%; top: 25%;"></div> <div class="skeleton-node svelte-1n46o8q" style="left: 70%; top: 35%;"></div> <div class="skeleton-node svelte-1n46o8q" style="left: 30%; top: 60%;"></div> <div class="skeleton-node svelte-1n46o8q" style="left: 55%; top: 65%;"></div> <div class="skeleton-node svelte-1n46o8q" style="left: 80%; top: 55%;"></div> <svg class="skeleton-edges svelte-1n46o8q" viewBox="0 0 100 100" preserveAspectRatio="none"><line x1="20" y1="30" x2="45" y2="25" class="skeleton-edge svelte-1n46o8q"></line><line x1="45" y1="25" x2="70" y2="35" class="skeleton-edge svelte-1n46o8q"></line><line x1="20" y1="30" x2="30" y2="60" class="skeleton-edge svelte-1n46o8q"></line><line x1="45" y1="25" x2="55" y2="65" class="skeleton-edge svelte-1n46o8q"></line><line x1="70" y1="35" x2="80" y2="55" class="skeleton-edge svelte-1n46o8q"></line></svg></div> <p class="loading-text svelte-1n46o8q">正在连接 TopoRealm Core…</p></div>'),d0=et('<div class="error-state svelte-1n46o8q" role="alert"><svg width="48" height="48" viewBox="0 0 48 48" fill="none" stroke="var(--status-failed)" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M8 32c6-8 12-8 16 0s10 8 16 0" class="svelte-1n46o8q"></path><path d="M24 12v10M24 27v3" class="svelte-1n46o8q"></path><circle cx="24" cy="38" r="1.6" fill="var(--status-failed)" stroke="none" class="svelte-1n46o8q"></circle></svg> <h3 class="error-title svelte-1n46o8q">图快照加载失败</h3> <p class="error-hint svelte-1n46o8q"> </p> <button class="retry-btn svelte-1n46o8q">重试</button></div>'),h0=et('<div class="empty-state svelte-1n46o8q"><svg width="80" height="80" viewBox="0 0 80 80" fill="none" stroke="var(--ink-faint)" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><circle cx="20" cy="20" r="6" class="svelte-1n46o8q"></circle><circle cx="60" cy="40" r="6" class="svelte-1n46o8q"></circle><circle cx="20" cy="60" r="6" class="svelte-1n46o8q"></circle><path d="M26 20h14M26 60h14M46 40H34" stroke-dasharray="4 3" class="svelte-1n46o8q"></path></svg> <h3 class="empty-title svelte-1n46o8q">空拓扑</h3> <p class="empty-hint svelte-1n46o8q">通过编辑器或 CLI / MCP 添加第一个对象与关系</p></div>'),v0=et('<div class="filter-chip svelte-1n46o8q" role="status"> <button class="filter-clear svelte-1n46o8q" aria-label="清除过滤">清除</button></div>'),p0=et("<!> <!>",1),g0=et('<span class="rail-badge svelte-1n46o8q"> </span>'),_0=et('<button><span class="graph-item-body svelte-1n46o8q"><span class="graph-item-name svelte-1n46o8q"> </span> <span class="graph-item-label svelte-1n46o8q"> </span></span> <span class="graph-item-count svelte-1n46o8q"> </span></button>'),y0=et('<aside class="rail-flyout graphs-flyout svelte-1n46o8q" aria-label="图库(切换查看的图)"><span class="flyout-title svelte-1n46o8q">图库</span> <!></aside>'),Io=et('<li class="svelte-1n46o8q"> </li>'),m0=et('<ul class="validation-list errors svelte-1n46o8q"></ul>'),w0=et('<ul class="validation-list warnings svelte-1n46o8q"></ul>'),b0=et('<div role="status"><span class="validation-verdict svelte-1n46o8q"> </span> <!> <!></div>'),x0=et('<p class="flyout-hint svelte-1n46o8q">基础校验只查图结构;完整校验需模块注册参与。</p>'),k0=et('<aside class="rail-flyout validation-flyout svelte-1n46o8q" aria-label="校验"><span class="flyout-title svelte-1n46o8q">校验</span> <div class="flyout-actions svelte-1n46o8q"><button class="flyout-btn svelte-1n46o8q">基础校验</button> <button class="flyout-btn svelte-1n46o8q">完整校验</button></div> <!></aside>'),E0=et('<span class="module-reason svelte-1n46o8q"> </span>'),M0=et('<div class="module-item svelte-1n46o8q"><span></span> <span class="module-name svelte-1n46o8q"> </span> <span> </span> <!></div>'),S0=et('<p class="flyout-hint svelte-1n46o8q">暂无模块注册信息。</p>'),$0=et('<aside class="rail-flyout modules-flyout svelte-1n46o8q" aria-label="模块状态"><span class="flyout-title svelte-1n46o8q">模块状态</span> <!></aside>'),A0=et('<aside class="rail-flyout raw-flyout svelte-1n46o8q" aria-label="原始快照"><span class="flyout-title svelte-1n46o8q">原始快照</span> <pre class="raw-snapshot svelte-1n46o8q"> </pre></aside>'),q0=et('<!> <nav class="tool-rail svelte-1n46o8q" aria-label="画布工具轨"><button title="图库(切换查看的图)" aria-label="图库"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M2 5.5 8 2.5l6 3-6 3-6-3Z" class="svelte-1n46o8q"></path><path d="M2 8.5 8 11.5l6-3" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"></path><path d="M2 11.5 8 14.5l6-3" stroke-linecap="round" stroke-linejoin="round" opacity="0.55" class="svelte-1n46o8q"></path></svg> <!></button> <button title="校验(基础 / 完整)" aria-label="校验"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M8 2 13.5 4.5V8c0 3-2.4 5.2-5.5 6-3.1-.8-5.5-3-5.5-6V4.5L8 2Z" stroke-linejoin="round" class="svelte-1n46o8q"></path><path d="M5.8 8l1.6 1.6L10.5 6.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"></path></svg></button> <button title="模块状态" aria-label="模块状态"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><rect x="2.5" y="2.5" width="4.5" height="4.5" rx="1.2" class="svelte-1n46o8q"></rect><rect x="9" y="2.5" width="4.5" height="4.5" rx="1.2" class="svelte-1n46o8q"></rect><rect x="2.5" y="9" width="4.5" height="4.5" rx="1.2" class="svelte-1n46o8q"></rect><rect x="9" y="9" width="4.5" height="4.5" rx="1.2" class="svelte-1n46o8q"></rect></svg></button> <button title="原始快照(JSON)" aria-label="原始快照"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M5.5 4 2 8l3.5 4M10.5 4 14 8l-3.5 4" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"></path></svg></button> <span class="rail-sep svelte-1n46o8q" aria-hidden="true"></span> <button class="rail-btn svelte-1n46o8q" title="新增对象" aria-label="新增对象"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><circle cx="8" cy="8" r="5.5" class="svelte-1n46o8q"></circle><path d="M8 5.5v5M5.5 8h5" stroke-linecap="round" class="svelte-1n46o8q"></path></svg></button> <button class="rail-btn svelte-1n46o8q" title="新增关系" aria-label="新增关系"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><circle cx="3.5" cy="12" r="2" class="svelte-1n46o8q"></circle><circle cx="12.5" cy="4" r="2" class="svelte-1n46o8q"></circle><path d="M5.2 10.3 10.8 5.7" stroke-linecap="round" class="svelte-1n46o8q"></path></svg></button> <span class="rail-sep svelte-1n46o8q" aria-hidden="true"></span> <button class="rail-btn svelte-1n46o8q" title="撤销(Ctrl+Z)" aria-label="撤销"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M6 3.5 3 6.5l3 3" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"></path><path d="M3 6.5h6a4 4 0 0 1 0 8H7" stroke-linecap="round" class="svelte-1n46o8q"></path></svg></button> <button class="rail-btn svelte-1n46o8q" title="重做(Ctrl+Y)" aria-label="重做"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M10 3.5l3 3-3 3" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"></path><path d="M13 6.5H7a4 4 0 0 0 0 8h2" stroke-linecap="round" class="svelte-1n46o8q"></path></svg></button> <span class="rail-sep svelte-1n46o8q" aria-hidden="true"></span> <button class="rail-btn svelte-1n46o8q" title="放大(+)" aria-label="放大"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M8 3v10M3 8h10" class="svelte-1n46o8q"></path></svg></button> <button class="rail-btn svelte-1n46o8q" title="缩小(-)" aria-label="缩小"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M3 8h10" class="svelte-1n46o8q"></path></svg></button> <button class="rail-btn svelte-1n46o8q" title="适配全图(0)" aria-label="适配全图"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M2 6V2h4M14 6V2h-4M2 10v4h4M14 10v4h-4" class="svelte-1n46o8q"></path></svg></button> <span class="rail-sep svelte-1n46o8q" aria-hidden="true"></span> <button class="rail-btn svelte-1n46o8q" title="重新读取快照" aria-label="刷新"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><path d="M13.5 8a5.5 5.5 0 1 1-1.6-3.9" stroke-linecap="round" class="svelte-1n46o8q"></path><path d="M13.5 1.5v3h-3" stroke-linecap="round" stroke-linejoin="round" class="svelte-1n46o8q"></path></svg></button> <button title="只读模式(禁用所有写入口)" aria-label="只读模式"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true" class="svelte-1n46o8q"><rect x="3" y="7.5" width="10" height="6" rx="1.5" class="svelte-1n46o8q"></rect><path d="M5.5 7.5V5a2.5 2.5 0 0 1 5 0v2.5" class="svelte-1n46o8q"></path></svg></button></nav> <!>',1),N0=et('<div class="action-chip recovery svelte-1n46o8q" role="alert"><span class="recovery-code svelte-1n46o8q"> </span> <span class="recovery-text svelte-1n46o8q"> </span> <button class="filter-clear svelte-1n46o8q">重新读取</button></div>'),T0=et('<button class="filter-clear svelte-1n46o8q">重新读取</button>'),O0=et('<div class="action-chip svelte-1n46o8q" role="status"> <!></div>'),I0=et('<div class="app svelte-1n46o8q"><header class="topbar svelte-1n46o8q"><div class="brand svelte-1n46o8q"><div class="brand-text svelte-1n46o8q"><span class="title svelte-1n46o8q">TopoRealm</span> <!></div></div> <!> <div class="topbar-right svelte-1n46o8q"><div class="search-box svelte-1n46o8q"><svg class="search-icon svelte-1n46o8q" width="13" height="13" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><circle cx="6" cy="6" r="4.2" class="svelte-1n46o8q"></circle><path d="M9.2 9.2 12.5 12.5" stroke-linecap="round" class="svelte-1n46o8q"></path></svg> <input class="search-input svelte-1n46o8q" type="search" placeholder="搜索 ID / label / kind…" autocomplete="off" aria-label="搜索图对象"/></div> <div class="stats svelte-1n46o8q"><span class="stat svelte-1n46o8q"> <span class="stat-unit svelte-1n46o8q">obj</span></span> <span class="stat-divider svelte-1n46o8q">·</span> <span class="stat svelte-1n46o8q"> <span class="stat-unit svelte-1n46o8q">rel</span></span> <span class="stat-divider svelte-1n46o8q">·</span> <span class="stat svelte-1n46o8q"> </span> <!></div></div></header> <main class="main svelte-1n46o8q"><!> <!></main> <!> <!> <!></div>');function C0(t,e){Tr(e,!0);const n=Wt(()=>s0(w.snapshot,{query:w.searchQuery,kind:w.kindFilter})),r=Wt(()=>{const D=new Map;for(const X of w.objects)D.set(X.kind,(D.get(X.kind)??0)+1);return[...D.entries()].sort(([X],[at])=>X.localeCompare(at)).map(([X,at])=>({kind:X,count:at,color:Es(X,w.moduleStatus)}))});let i=dt(null);function s(D){if(D.key!=="Enter")return;const X=w.searchQuery.trim().toLowerCase();if(!X)return;const at=w.objects.find(ut=>`${ut.id} ${ut.kind} ${ut.label}`.toLowerCase().includes(X));at&&(w.select({type:"object",id:at.id}),w.locateNode(at.id))}function a(D){O(i,h(i)===D?null:D,!0)}function o(D){if(D.key==="Escape"){w.editor?w.closeEditor():w.selection?w.select(null):h(i)?O(i,null):(w.searchQuery||w.kindFilter)&&w.clearFilters();return}!(D.ctrlKey||D.metaKey)||D.target instanceof HTMLInputElement||D.target instanceof HTMLTextAreaElement||D.target instanceof HTMLSelectElement||(D.key.toLowerCase()==="z"?(D.preventDefault(),w.undo()):D.key.toLowerCase()==="y"&&(D.preventDefault(),w.redo()))}Ta(()=>{w.load()});var l=I0();Nl("keydown",Js,o);var u=z(l),c=z(u),v=z(c),f=M(z(v),2);{var d=D=>{var X=a0(),at=lt(X);gt(()=>{Le(X,"title",w.snapshot.manifest.label??w.snapshot.manifest.id),rt(at,`${w.snapshot.manifest.label??w.snapshot.manifest.id??""} · r${w.revision??""}`)}),Y(D,X)};Mt(f,D=>{w.snapshot&&D(d)})}var m=M(c,2);{var g=D=>{var X=u0(),at=z(X),ut=z(at),yt=lt(ut,!0),At=M(at,2);gn(At,17,()=>h(r),xt=>xt.kind,(xt,kt)=>{var Ct=o0();let Qt;var Ft=z(Ct),St=M(Ft,2),Ot=lt(St,!0),Rt=M(St,2),Yt=lt(Rt,!0);gt(()=>{Qt=Se(Ct,1,"sb-chip svelte-1n46o8q",null,Qt,{zero:h(kt).count===0}),Le(Ct,"aria-pressed",w.kindFilter===h(kt).kind),Le(Ct,"title",`点击只看 ${h(kt).kind??""}`),ws(Ft,`background: ${h(kt).color??""}`),rt(Ot,h(kt).count),rt(Yt,h(kt).kind)}),vt("click",Ct,()=>w.kindFilter=w.kindFilter===h(kt).kind?"":h(kt).kind),Y(xt,Ct)});var qt=M(At,2);{var he=xt=>{var kt=l0();vt("click",kt,()=>w.clearFilters()),Y(xt,kt)},De=Wt(()=>w.kindFilter||w.searchQuery.trim());Mt(qt,xt=>{h(De)&&xt(he)})}gt(()=>rt(yt,w.objects.length)),Y(D,X)};Mt(m,D=>{w.snapshot&&D(g)})}var p=M(m,2),y=z(p),$=M(z(y),2),q=M(y,2),x=z(q),T=z(x),F=M(x,4),L=z(F),K=M(F,4),it=lt(K),N=M(K,2);{var j=D=>{var X=c0();Y(D,X)};Mt(N,D=>{w.readOnly&&D(j)})}var st=M(u,2),bt=z(st);{var k=D=>{var X=f0();Y(D,X)},I=D=>{var X=d0(),at=M(z(X),4),ut=lt(at,!0),yt=M(at,2);gt(()=>rt(ut,w.error)),vt("click",yt,()=>w.load()),Y(D,X)},A=D=>{var X=q0(),at=rn(X);{var ut=E=>{var C=h0();Y(E,C)},yt=E=>{var C=p0(),H=rn(C);Ap(H,{});var B=M(H,2);{var U=ht=>{var Vt=v0(),G=z(Vt),tt=M(G);gt(()=>rt(G,`过滤中:${h(n).objects.length??""}/${w.objects.length??""} 对象 · ${h(n).relations.length??""}/${w.relations.length??""} 关系 `)),vt("click",tt,()=>w.clearFilters()),Y(ht,Vt)},ct=Wt(()=>w.searchQuery.trim()||w.kindFilter);Mt(B,ht=>{h(ct)&&ht(U)})}Y(E,C)};Mt(at,E=>{w.objects.length===0&&w.relations.length===0?E(ut):E(yt,-1)})}var At=M(at,2),qt=z(At);let he;var De=M(z(qt),2);{var xt=E=>{var C=g0(),H=lt(C,!0);gt(()=>rt(H,w.graphs.length)),Y(E,C)};Mt(De,E=>{w.graphs.length>1&&E(xt)})}var kt=M(qt,2);let Ct;var Qt=M(kt,2);let Ft;var St=M(Qt,2);let Ot;var Rt=M(St,4),Yt=M(Rt,2),me=M(Yt,4),ot=M(me,2),Pt=M(ot,4),Ht=M(Pt,2),Dt=M(Ht,2),Zt=M(Dt,4),Xt=M(Zt,2);let ee;var Ue=M(At,2);{var ie=E=>{var C=y0(),H=M(z(C),2);gn(H,17,()=>w.graphs,B=>B.id,(B,U)=>{var ct=_0();let ht;var Vt=z(ct),G=z(Vt),tt=lt(G,!0),pe=M(G,2),se=lt(pe),ln=M(Vt,2),Ke=lt(ln,!0);gt(()=>{var xn;ht=Se(ct,1,"graph-item svelte-1n46o8q",null,ht,{active:h(U).id===((xn=w.snapshot)==null?void 0:xn.manifest.id)}),Le(ct,"title",h(U).label??h(U).id),rt(tt,h(U).label??h(U).id),rt(se,`${h(U).id??""} · r${h(U).revision??""}`),rt(Ke,h(U).objectCount)}),vt("click",ct,()=>w.switchGraph(h(U).id)),Y(B,ct)}),Y(E,C)},ve=E=>{var C=k0(),H=M(z(C),2),B=z(H),U=M(B,2),ct=M(H,2);{var ht=G=>{var tt=b0();let pe;var se=z(tt),ln=lt(se),Ke=M(se,2);{var xn=Me=>{var W=m0();gn(W,21,()=>w.validation.errors,$t=>$t.code+$t.message,($t,zt)=>{var Ut=Io(),ae=lt(Ut,!0);gt(()=>rt(ae,h(zt).message)),Y($t,Ut)}),Y(Me,W)};Mt(Ke,Me=>{w.validation.errors.length&&Me(xn)})}var Cn=M(Ke,2);{var rr=Me=>{var W=w0();gn(W,21,()=>w.validation.warnings,$t=>$t.code+$t.message,($t,zt)=>{var Ut=Io(),ae=lt(Ut,!0);gt(()=>rt(ae,h(zt).message)),Y($t,Ut)}),Y(Me,W)};Mt(Cn,Me=>{w.validation.warnings.length&&Me(rr)})}gt(()=>{pe=Se(tt,1,"validation-summary svelte-1n46o8q",null,pe,{valid:w.validation.ok}),rt(ln,`${w.validation.ok?"通过":`${w.validation.errors.length} 个错误`} · ${w.validation.complete?"含模块注册":"仅结构校验"}`)}),Y(G,tt)},Vt=G=>{var tt=x0();Y(G,tt)};Mt(ct,G=>{w.validation?G(ht):G(Vt,-1)})}vt("click",B,()=>w.runValidation("basic")),vt("click",U,()=>w.runValidation("complete")),Y(E,C)},b=E=>{var C=$0(),H=M(z(C),2);{var B=ct=>{var ht=ms(),Vt=rn(ht);gn(Vt,17,()=>w.moduleStatus.modules,G=>G.id,(G,tt)=>{var pe=M0(),se=z(pe);let ln;var Ke=M(se,2),xn=lt(Ke,!0),Cn=M(Ke,2);let rr;var Me=lt(Cn,!0),W=M(Cn,2);{var $t=zt=>{var Ut=E0(),ae=lt(Ut,!0);gt(()=>rt(ae,h(tt).reason)),Y(zt,Ut)};Mt(W,zt=>{h(tt).reason&&zt($t)})}gt(()=>{ln=Se(se,1,"module-dot svelte-1n46o8q",null,ln,{ok:h(tt).status==="available"}),rt(xn,h(tt).namespace??h(tt).id),rr=Se(Cn,1,"module-state svelte-1n46o8q",null,rr,{ok:h(tt).status==="available"}),rt(Me,h(tt).status==="available"?"可用":"不可用")}),Y(G,pe)}),Y(ct,ht)},U=ct=>{var ht=S0();Y(ct,ht)};Mt(H,ct=>{var ht;(ht=w.moduleStatus)!=null&&ht.modules.length?ct(B):ct(U,-1)})}Y(E,C)},S=E=>{var C=A0(),H=M(z(C),2),B=lt(H,!0);gt(U=>rt(B,U),[()=>JSON.stringify(w.snapshot,null,2)]),Y(E,C)};Mt(Ue,E=>{h(i)==="graphs"?E(ie):h(i)==="validation"?E(ve,1):h(i)==="modules"?E(b,2):h(i)==="raw"&&E(S,3)})}gt(()=>{he=Se(qt,1,"rail-btn svelte-1n46o8q",null,he,{active:h(i)==="graphs"}),Le(qt,"aria-expanded",h(i)==="graphs"),Ct=Se(kt,1,"rail-btn svelte-1n46o8q",null,Ct,{active:h(i)==="validation"}),Le(kt,"aria-expanded",h(i)==="validation"),Ft=Se(Qt,1,"rail-btn svelte-1n46o8q",null,Ft,{active:h(i)==="modules"}),Le(Qt,"aria-expanded",h(i)==="modules"),Ot=Se(St,1,"rail-btn svelte-1n46o8q",null,Ot,{active:h(i)==="raw"}),Le(St,"aria-expanded",h(i)==="raw"),Rt.disabled=w.readOnly,Yt.disabled=w.readOnly,me.disabled=w.readOnly||!w.history.canUndo,ot.disabled=w.readOnly||!w.history.canRedo,ee=Se(Xt,1,"rail-btn svelte-1n46o8q",null,ee,{active:w.readOnly}),Le(Xt,"aria-pressed",w.readOnly)}),vt("click",qt,()=>a("graphs")),vt("click",kt,()=>a("validation")),vt("click",Qt,()=>a("modules")),vt("click",St,()=>a("raw")),vt("click",Rt,()=>w.openEditor("create-object")),vt("click",Yt,()=>w.openEditor("create-relation")),vt("click",me,()=>w.undo()),vt("click",ot,()=>w.redo()),vt("click",Pt,()=>w.requestZoom("in")),vt("click",Ht,()=>w.requestZoom("out")),vt("click",Dt,()=>w.requestZoom("fit")),vt("click",Zt,()=>w.load()),vt("click",Xt,()=>w.readOnly=!w.readOnly),Y(D,X)};Mt(bt,D=>{w.loading&&!w.snapshot?D(k):w.error&&!w.snapshot?D(I,1):w.snapshot&&D(A,2)})}var P=M(bt,2);{var Q=D=>{var X=N0(),at=z(X),ut=lt(at,!0),yt=M(at,2),At=lt(yt),qt=M(yt,2);gt(()=>{rt(ut,w.recovery.code),rt(At,`${w.recovery.message??""} 本地视图未写入,可重新读取服务器快照。`)}),vt("click",qt,()=>w.reload()),Y(D,X)},V=D=>{var X=O0(),at=z(X),ut=M(at);{var yt=At=>{var qt=T0();vt("click",qt,()=>w.load()),Y(At,qt)};Mt(ut,At=>{w.error&&w.snapshot&&At(yt)})}gt(()=>rt(at,`${w.actionMessage??""} `)),Y(D,X)};Mt(P,D=>{w.recovery?D(Q):w.actionMessage&&D(V,1)})}var Z=M(st,2);Vp(Z,{});var pt=M(Z,2);Xp(pt,{});var _t=M(pt,2);i0(_t,{}),gt(()=>{rt(T,w.objects.length),rt(L,w.relations.length),rt(it,`r${w.revision??""}`)}),vt("keydown",$,s),Pn($,()=>w.searchQuery,D=>w.searchQuery=D),Y(t,l),Or()}nr(["click","keydown"]);const ou=document.getElementById("app");if(!ou)throw new Error("TopoRealm Web UI 找不到应用挂载点。");jc(C0,{target:ou});
|