studiograph 1.3.44-next.26 → 1.3.44-next.28

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.
Files changed (41) hide show
  1. package/dist/web/_app/immutable/assets/0.C1FeWCrr.css +1 -0
  2. package/dist/web/_app/immutable/assets/3.BtaZagnv.css +1 -0
  3. package/dist/web/_app/immutable/assets/4.DSiqtN6T.css +1 -0
  4. package/dist/web/_app/immutable/chunks/4xwCIc_d.js +1 -0
  5. package/dist/web/_app/immutable/chunks/{i9c_RUF6.js → 7S2LGqoP.js} +2 -2
  6. package/dist/web/_app/immutable/chunks/{CVhaIh-p.js → BkWxx0Pi.js} +1 -1
  7. package/dist/web/_app/immutable/chunks/BkZMqbNG.js +1 -0
  8. package/dist/web/_app/immutable/chunks/{CBj5WBAa.js → C78etSEz.js} +1 -1
  9. package/dist/web/_app/immutable/chunks/{CLFba8FK.js → CSVbGg_b.js} +5 -5
  10. package/dist/web/_app/immutable/chunks/{CdE0nDdx.js → CVzXUC0Z.js} +1 -1
  11. package/dist/web/_app/immutable/chunks/DFyq2JCT.js +1 -0
  12. package/dist/web/_app/immutable/chunks/{BUgeKOdN.js → D_HCqmNS.js} +1 -1
  13. package/dist/web/_app/immutable/chunks/{CwMXbQhn.js → Dr_4kMt3.js} +1 -1
  14. package/dist/web/_app/immutable/chunks/{B2XK80j4.js → cd9A5gk6.js} +1 -1
  15. package/dist/web/_app/immutable/chunks/{BIMJw85l.js → v8Jb1TE5.js} +1 -1
  16. package/dist/web/_app/immutable/entry/{app.DMECd5Kt.js → app.CQaqMqd0.js} +2 -2
  17. package/dist/web/_app/immutable/entry/start.HW4LRr29.js +1 -0
  18. package/dist/web/_app/immutable/nodes/{0.Dg9SBatP.js → 0.CVlcEICa.js} +2 -2
  19. package/dist/web/_app/immutable/nodes/{1.B6uuAfGp.js → 1.D8W1vpHN.js} +1 -1
  20. package/dist/web/_app/immutable/nodes/{10.TuAqJYwO.js → 10.RfZlV3FZ.js} +1 -1
  21. package/dist/web/_app/immutable/nodes/{2.D38VRrAi.js → 2.B5yWmTQ0.js} +2 -2
  22. package/dist/web/_app/immutable/nodes/3.BBOAedxq.js +1 -0
  23. package/dist/web/_app/immutable/nodes/4.D1_iF6-x.js +12 -0
  24. package/dist/web/_app/immutable/nodes/{5.DVt5txAr.js → 5.DtHLwQno.js} +1 -1
  25. package/dist/web/_app/immutable/nodes/{6.HiY2oOCt.js → 6.ClRItfVT.js} +1 -1
  26. package/dist/web/_app/immutable/nodes/7.Be-NDRCc.js +2 -0
  27. package/dist/web/_app/immutable/nodes/{8.ByazYxU_.js → 8.C0CaB7Uh.js} +1 -1
  28. package/dist/web/_app/immutable/nodes/{9.4WdR4_BV.js → 9.DSj0xsIv.js} +1 -1
  29. package/dist/web/_app/version.json +1 -1
  30. package/dist/web/index.html +6 -6
  31. package/package.json +1 -1
  32. package/dist/web/_app/immutable/assets/0.DiU1D-7Q.css +0 -1
  33. package/dist/web/_app/immutable/assets/3.C94c_ZP-.css +0 -1
  34. package/dist/web/_app/immutable/assets/4.BFsrrYkk.css +0 -1
  35. package/dist/web/_app/immutable/chunks/7fw7Fdvz.js +0 -1
  36. package/dist/web/_app/immutable/chunks/BqtdCvqG.js +0 -1
  37. package/dist/web/_app/immutable/chunks/CEFISSHj.js +0 -1
  38. package/dist/web/_app/immutable/entry/start.CMO7v4mE.js +0 -1
  39. package/dist/web/_app/immutable/nodes/3.0l3L8YJI.js +0 -1
  40. package/dist/web/_app/immutable/nodes/4.BgnsmzSe.js +0 -12
  41. package/dist/web/_app/immutable/nodes/7.C7XF_19e.js +0 -2
@@ -0,0 +1,12 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/DnL9f0lc.js","../chunks/CX_61fY8.js","../chunks/CscoF-YL.js","../chunks/D7ZqAKi9.js","../chunks/C7VoTosa.js","../chunks/CrdV0ttd.js","../chunks/CWQRQXxy.js","../chunks/B340SUKR.js","../chunks/DFyq2JCT.js","../chunks/CSVbGg_b.js","../chunks/Dr_4kMt3.js","../chunks/PPVm8Dsz.js","../chunks/DwMoyB6r.js","../chunks/BkZMqbNG.js","../chunks/C88BjBh_.js","../chunks/koVwyjnn.js","../chunks/hE0jymgn.js","../chunks/DiQyiOFg.js","../chunks/S3zzfNyy.js","../chunks/7S2LGqoP.js"])))=>i.map(i=>d[i]);
2
+ import{h as Jt,w as dt,k as Gt}from"../chunks/C88BjBh_.js";import{_ as Ne}from"../chunks/PPVm8Dsz.js";import{d as _t,g as Pe,e as $e,a as d,c as Te,s as _e,b as M,f as rt,t as vt}from"../chunks/S3zzfNyy.js";import{p as He,e as Se,f as lt,a3 as st,aF as Qt,c as S,aa as q,r as b,g as e,s as w,b as Ye,a0 as de,t as ce,ab as we,l as et,d as qe,a as mt,n as We,m as tt,aB as Xt,aC as $t,aE as ea,aG as Wt,av as ta,a4 as aa,bt as ra}from"../chunks/DwMoyB6r.js";import{i as ie,b as ut}from"../chunks/DVe5EzgB.js";import{e as Ue,i as Be}from"../chunks/BnuoIjma.js";import{c as De}from"../chunks/BdfrxCf_.js";import{s as ot,c as na}from"../chunks/koVwyjnn.js";import{p as Oe,l as at,a as sa,b as ia}from"../chunks/DLfZVgnp.js";import{g as pt,i as oa}from"../chunks/BkZMqbNG.js";import{p as la}from"../chunks/4xwCIc_d.js";import{a as wt,V as ua}from"../chunks/BkWxx0Pi.js";import{r as ct,a as gt,c as Ve,d as ft,s as Et}from"../chunks/BYqzpKy3.js";import{b as Bt,B as it}from"../chunks/ClyoIkBa.js";import{e as bt,f as nt,A as ca}from"../chunks/CdeYcEuU.js";import{a as zt,b as Lt,S as Ot,R as Ft}from"../chunks/DlEABbVW.js";import{T as da,P as fa,C as va,I as Mt,a as kt,S as ha,R as pa,b as Pt,p as It}from"../chunks/CVzXUC0Z.js";import{i as yt}from"../chunks/CkRzikAP.js";import{T as Tt,E as _a,j as ma,r as ga}from"../chunks/BpCWEZIp.js";import{C as St,a as Ht}from"../chunks/DRAYcm5i.js";import{A as Dt}from"../chunks/BEQ3s_NB.js";import{g as ya}from"../chunks/CqkleIqs.js";import{n as At}from"../chunks/DiQyiOFg.js";import{e as Ke,r as wa}from"../chunks/Dr_4kMt3.js";import{chatStore as ba}from"../chunks/C78etSEz.js";import{A as ka,u as xa,v as Ca,x as Ea,y as Sa,z as Aa,G as Ra}from"../chunks/CDl-NinU.js";import{a as jt}from"../chunks/hE0jymgn.js";const Pa=async({params:Y,fetch:t})=>{const{repo:l,type:u,id:p}=Y,R=await Jt(l,u,p);return{repo:l,type:u,id:p,entity:R}},$n=Object.freeze(Object.defineProperty({__proto__:null,load:Pa},Symbol.toStringTag,{value:"Module"}));var Ta=M('<span class="chip svelte-84vb17"> <button class="chip-remove svelte-84vb17">&times;</button></span>'),Da=M('<span class="chip svelte-84vb17"> </span>'),za=M('<div><span class="entity-title svelte-84vb17"> </span> <span class="entity-meta svelte-84vb17"><span class="entity-type-badge svelte-84vb17"> </span> <span class="entity-repo svelte-84vb17"> </span></span></div>'),La=M('<div class="dropdown svelte-84vb17"></div>'),Oa=M('<div class="autocomplete svelte-84vb17"><div class="input-row svelte-84vb17"><!> <input class="ac-input svelte-84vb17" type="text" placeholder="Search entities..."/></div> <!></div>');function Fa(Y,t){He(t,!0);let l=Oe(t,"multi",3,!1),u=Oe(t,"showCurrent",3,!1);const p=typeof t.value=="string"?t.value:"";let R=Se(""),c=Se(0),x;const A=we(()=>dt.repos.flatMap(a=>a.entities.map(s=>({id:s.id,title:s.title,entityType:s.entityType,repo:a.name})))),v=we(()=>()=>{const a=e(R).toLowerCase().trim();return a?e(A).filter(s=>s.title.toLowerCase().includes(a)||s.id.toLowerCase().includes(a)).slice(0,20):e(A).slice(0,20)}),P=Array.isArray(t.value)?[...t.value]:t.value?[t.value]:[];let O=Se(lt(P));st(()=>{Qt().then(()=>x?.focus())});function g(a){l()?(e(O).includes(a)||w(O,[...e(O),a],!0),w(R,""),w(c,0),x?.focus()):t.onselect(a)}function D(a){w(O,e(O).filter(s=>s!==a),!0)}function pe(){e(O).length===P.length&&e(O).every((s,h)=>s===P[h])?t.oncancel():t.onselect(e(O))}function ge(a){const s=e(v)();a.key==="ArrowDown"?(a.preventDefault(),w(c,Math.min(e(c)+1,s.length-1),!0)):a.key==="ArrowUp"?(a.preventDefault(),w(c,Math.max(e(c)-1,0),!0)):a.key==="Enter"?(a.preventDefault(),s.length>0?g(s[e(c)].id):l()&&pe()):a.key==="Escape"?l()&&e(O).length>0?pe():t.oncancel():a.key==="Backspace"&&!e(R)&&l()&&e(O).length>0&&w(O,e(O).slice(0,-1),!0)}var ee=Oa(),ke=S(ee),oe=S(ke);{var W=a=>{var s=Te(),h=de(s);Ue(h,17,()=>e(O),Be,(f,F)=>{var ae=Ta(),be=S(ae),fe=q(be);b(ae),ce(()=>_e(be,`${e(F)??""} `)),Pe("click",fe,()=>D(e(F))),d(f,ae)}),d(a,s)},me=a=>{var s=Da(),h=S(s,!0);b(s),ce(()=>_e(h,p)),d(a,s)};ie(oe,a=>{l()?a(W):u()&&p&&a(me,1)})}var te=q(oe,2);ct(te),ut(te,a=>x=a,()=>x),b(ke);var $=q(ke,2);{var I=a=>{var s=La();Ue(s,21,()=>e(v)(),Be,(h,f,F)=>{var ae=za();let be;var fe=S(ae),H=S(fe,!0);b(fe);var U=q(fe,2),j=S(U),ye=S(j,!0);b(j);var Z=q(j,2),se=S(Z,!0);b(Z),b(U),b(ae),ce(()=>{be=ot(ae,1,"dropdown-item svelte-84vb17",null,be,{highlighted:F===e(c)}),_e(H,e(f).title),_e(ye,e(f).entityType),_e(se,e(f).repo)}),Pe("mousedown",ae,r=>{r.preventDefault(),g(e(f).id)}),$e("mouseenter",ae,()=>w(c,F,!0)),d(h,ae)}),b(s),d(a,s)},n=we(()=>e(v)().length>0);ie($,a=>{e(n)&&a(I)})}b(ee),Pe("keydown",te,ge),$e("blur",te,()=>{setTimeout(()=>{l()?pe():t.oncancel()},150)}),Bt(te,()=>e(R),a=>w(R,a)),d(Y,ee),Ye()}_t(["click","keydown","mousedown"]);var Ma=rt("<title> </title>"),Ia=rt('<svg><!><circle cx="16" cy="16" r="10"></circle><path d="M16,30A14,14,0,1,1,30,16,14.0158,14.0158,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12.0137,12.0137,0,0,0,16,4Z"></path></svg>');function ht(Y,t){const l=at(t,["children","$$slots","$$events","$$legacy"]),u=at(l,["size","title"]);He(t,!1);const p=tt(),R=tt();let c=Oe(t,"size",8,16),x=Oe(t,"title",8,void 0);et(()=>(qe(l),qe(x())),()=>{w(p,l["aria-label"]||l["aria-labelledby"]||x())}),et(()=>(e(p),qe(l)),()=>{w(R,{"aria-hidden":e(p)?void 0:!0,role:e(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),mt(),yt();var A=Ia();gt(A,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...e(R),...u}));var v=S(A);{var P=O=>{var g=Ma(),D=S(g,!0);b(g),ce(()=>_e(D,x())),d(O,g)};ie(v,O=>{x()&&O(P)})}We(2),b(A),d(Y,A),Ye()}var ja=rt("<title> </title>"),Ka=rt('<svg><!><path d="M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"></path><path d="M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"></path></svg>');function xt(Y,t){const l=at(t,["children","$$slots","$$events","$$legacy"]),u=at(l,["size","title"]);He(t,!1);const p=tt(),R=tt();let c=Oe(t,"size",8,16),x=Oe(t,"title",8,void 0);et(()=>(qe(l),qe(x())),()=>{w(p,l["aria-label"]||l["aria-labelledby"]||x())}),et(()=>(e(p),qe(l)),()=>{w(R,{"aria-hidden":e(p)?void 0:!0,role:e(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),mt(),yt();var A=Ka();gt(A,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...e(R),...u}));var v=S(A);{var P=O=>{var g=ja(),D=S(g,!0);b(g),ce(()=>_e(D,x())),d(O,g)};ie(v,O=>{x()&&O(P)})}We(2),b(A),d(Y,A),Ye()}var Ua=rt("<title> </title>"),qa=rt('<svg><!><path d="M26,28H6a2.0027,2.0027,0,0,1-2-2V6A2.0027,2.0027,0,0,1,6,4H16V6H6V26H26V16h2V26A2.0027,2.0027,0,0,1,26,28Z"></path><path d="M20 2 20 4 26.586 4 18 12.586 19.414 14 28 5.414 28 12 30 12 30 2 20 2z"></path></svg>');function Rt(Y,t){const l=at(t,["children","$$slots","$$events","$$legacy"]),u=at(l,["size","title"]);He(t,!1);const p=tt(),R=tt();let c=Oe(t,"size",8,16),x=Oe(t,"title",8,void 0);et(()=>(qe(l),qe(x())),()=>{w(p,l["aria-label"]||l["aria-labelledby"]||x())}),et(()=>(e(p),qe(l)),()=>{w(R,{"aria-hidden":e(p)?void 0:!0,role:e(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),mt(),yt();var A=qa();gt(A,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...e(R),...u}));var v=S(A);{var P=O=>{var g=Ua(),D=S(g,!0);b(g),ce(()=>_e(D,x())),d(O,g)};ie(v,O=>{x()&&O(P)})}We(2),b(A),d(Y,A),Ye()}var Na=M('<!> <span class="menu-label svelte-eh8ho9"> </span> <!>',1),Va=M('<!> <span class="menu-label svelte-eh8ho9">Remove</span>',1),Wa=M("<!> <!> <!>",1),Ba=M("<!> <!>",1),Ha=M('<span class="dot svelte-eh8ho9"></span> <span> </span>',1),Ya=M('<span class="dot svelte-eh8ho9"></span> <span> </span> <!>',1),Za=M("<!> <!>",1),Ja=M('<span class="dot svelte-eh8ho9"></span> ',1),Ga=M('<span class="dot svelte-eh8ho9"></span> <span> </span>',1),Qa=M('<span class="dot svelte-eh8ho9"></span> <span> </span> <!>',1),Xa=M("<!> <!>",1),$a=M('<span class="dot svelte-eh8ho9"></span> ',1),er=M('<input type="date"/>'),tr=M('<span class="date-value svelte-eh8ho9"> </span>'),ar=M('<span class="wikilink-chip svelte-eh8ho9"> </span>'),rr=M('<input class="wikilink-input svelte-eh8ho9" type="text" readonly=""/>'),nr=M('<div class="wikilink-display svelte-eh8ho9"><!> <!></div>'),sr=M('<input class="edit-input svelte-eh8ho9" type="url" placeholder="https://..."/>'),ir=M('<span class="url-edit-btn svelte-eh8ho9"><!></span>'),or=M('<a class="url-link svelte-eh8ho9" target="_blank" rel="noopener noreferrer"> </a> <!>',1),lr=M('<span class="empty-hint svelte-eh8ho9">Empty</span>'),ur=M('<span class="url-display svelte-eh8ho9"><!></span>'),cr=M('<span class="badge-value svelte-eh8ho9"> </span>'),dr=M('<textarea class="edit-textarea svelte-eh8ho9"></textarea>'),fr=M('<span class="empty-hint svelte-eh8ho9">Empty</span>'),vr=M('<span class="text-value svelte-eh8ho9"> <!></span>'),hr=M('<div class="property-row svelte-eh8ho9"><div class="prop-icon svelte-eh8ho9"><!></div> <span class="prop-key svelte-eh8ho9"> </span> <div class="prop-value svelte-eh8ho9"><!></div></div>');function pr(Y,t){He(t,!0);let l=Oe(t,"editable",3,!1),u=Oe(t,"protectedKeys",19,()=>new Set);const p=[{type:"text",label:"Text"},{type:"date",label:"Date"},{type:"status",label:"Status"},{type:"wikilink",label:"Connection"},{type:"url",label:"Link"}],R=["open","in-progress","done","cancelled","active","inactive","completed","draft","archived","current","former","won","lost","closed"];function c(){return typeof t.prop.value=="string"?t.prop.value:t.prop.value[0]??""}function x(r){switch(r.toLowerCase()){case"active":case"current":case"won":case"done":case"completed":return"#3ecf8e";case"in-progress":case"open":case"draft":return"#f0c246";case"inactive":case"lost":case"closed":case"former":case"cancelled":return"#e54d4d";default:return"#5c5c66"}}function A(r){return r.replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function v(r){return r.replace(/_/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function P(r){if(!r)return"";try{return new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return r}}function O(r){for(const i of dt.repos){const y=i.entities.find(z=>z.id===r);if(y){pt(`/${i.name}/${y.entityType}/${y.id}`);return}}}let g=Se(!1),D=Se(null),pe=Se(null);function ge(r){r!==c()&&t.onedit?.(t.prop.key,r),w(g,!1)}let ee=Se(!1);var ke=hr(),oe=S(ke),W=S(oe);{var me=r=>{ht(r,{size:14})},te=r=>{var i=Te(),y=de(i);De(y,()=>pa,(z,ve)=>{ve(z,{children:(C,m)=>{var T=Ba(),_=de(T);De(_,()=>da,(Q,E)=>{E(Q,{class:"icon-trigger",children:(V,B)=>{var xe=Te(),o=de(xe);{var k=K=>{wt(K,{size:14})},N=K=>{ht(K,{size:14})},L=K=>{xt(K,{size:14})},le=K=>{Rt(K,{size:14})},ue=K=>{kt(K,{size:14})};ie(o,K=>{t.prop.type==="date"?K(k):t.prop.type==="status"?K(N,1):t.prop.type==="wikilink"?K(L,2):t.prop.type==="url"?K(le,3):K(ue,!1)})}d(V,xe)},$$slots:{default:!0}})});var re=q(_,2);De(re,()=>fa,(Q,E)=>{E(Q,{children:(V,B)=>{var xe=Te(),o=de(xe);De(o,()=>va,(k,N)=>{N(k,{class:"type-menu-content",sideOffset:4,align:"start",children:(L,le)=>{var ue=Wa(),K=de(ue);Ue(K,17,()=>p,Be,(ne,X)=>{var G=Te(),Ee=de(G);De(Ee,()=>Mt,(Ae,Ce)=>{Ce(Ae,{class:"type-menu-item",onSelect:()=>t.ontypechange?.(t.prop.key,e(X).type),children:(Re,Ie)=>{var je=Na(),ze=de(je);{var Le=Me=>{kt(Me,{size:12})},Ze=Me=>{wt(Me,{size:12})},Je=Me=>{ht(Me,{size:12})},Ge=Me=>{xt(Me,{size:12})},Qe=Me=>{Rt(Me,{size:12})};ie(ze,Me=>{e(X).type==="text"?Me(Le):e(X).type==="date"?Me(Ze,1):e(X).type==="status"?Me(Je,2):e(X).type==="wikilink"?Me(Ge,3):e(X).type==="url"&&Me(Qe,4)})}var Fe=q(ze,2),Xe=S(Fe,!0);b(Fe);var Yt=q(Fe,2);{var Zt=Me=>{St(Me,{size:12})};ie(Yt,Me=>{t.prop.type===e(X).type&&Me(Zt)})}ce(()=>_e(Xe,e(X).label)),d(Re,je)},$$slots:{default:!0}})}),d(ne,G)});var he=q(K,2);De(he,()=>ha,(ne,X)=>{X(ne,{})});var J=q(he,2);De(J,()=>Mt,(ne,X)=>{X(ne,{class:"type-menu-item type-menu-danger",onSelect:()=>t.onremove?.(t.prop.key),children:(G,Ee)=>{var Ae=Va(),Ce=de(Ae);Tt(Ce,{size:12}),We(2),d(G,Ae)},$$slots:{default:!0}})}),d(L,ue)},$$slots:{default:!0}})}),d(V,xe)},$$slots:{default:!0}})}),d(C,T)},$$slots:{default:!0}})}),d(r,i)},$=we(()=>l()&&t.prop.type!=="badge"&&!u().has(t.prop.key)),I=r=>{wt(r,{size:14})},n=r=>{ht(r,{size:14})},a=r=>{xt(r,{size:14})},s=r=>{Rt(r,{size:14})},h=r=>{kt(r,{size:14})};ie(W,r=>{t.prop.type==="entity-type"?r(me):e($)?r(te,1):t.prop.type==="date"?r(I,2):t.prop.type==="status"?r(n,3):t.prop.type==="wikilink"?r(a,4):t.prop.type==="url"?r(s,5):r(h,!1)})}b(oe);var f=q(oe,2),F=S(f,!0);b(f);var ae=q(f,2),be=S(ae);{var fe=r=>{var i=Te(),y=de(i);{var z=C=>{var m=Te(),T=de(m);{let _=we(c);De(T,()=>Ft,(re,Q)=>{Q(re,{type:"single",get value(){return e(_)},onValueChange:E=>{E&&E!==c()&&t.onentitytypechange?.(E)},children:(E,V)=>{var B=Za(),xe=de(B);{let k=we(()=>nt(c()));De(xe,()=>zt,(N,L)=>{L(N,{class:"status-trigger",get value(){return e(k)},children:(le,ue)=>{var K=Ha(),he=de(K);let J;var ne=q(he,2),X=S(ne,!0);b(ne),ce((G,Ee)=>{J=Ve(he,"",J,G),_e(X,Ee)},[()=>({background:bt(c())}),()=>nt(c())]),d(le,K)},$$slots:{default:!0}})})}var o=q(xe,2);De(o,()=>Lt,(k,N)=>{N(k,{align:"start",children:(L,le)=>{var ue=Te(),K=de(ue);Ue(K,17,()=>ca,Be,(he,J)=>{var ne=Te(),X=de(ne);{let G=we(()=>nt(e(J)));De(X,()=>Ot,(Ee,Ae)=>{Ae(Ee,{get value(){return e(J)},get label(){return e(G)},class:"dotted-item",children:(Ce,Re)=>{var Ie=Ya(),je=de(Ie);let ze;var Le=q(je,2),Ze=S(Le,!0);b(Le);var Je=q(Le,2);{var Ge=Fe=>{St(Fe,{size:12,class:"item-check"})},Qe=we(()=>c()===e(J));ie(Je,Fe=>{e(Qe)&&Fe(Ge)})}ce((Fe,Xe)=>{ze=Ve(je,"",ze,Fe),_e(Ze,Xe)},[()=>({background:bt(e(J))}),()=>nt(e(J))]),d(Ce,Ie)},$$slots:{default:!0}})})}d(he,ne)}),d(L,ue)},$$slots:{default:!0}})}),d(E,B)},$$slots:{default:!0}})})}d(C,m)},ve=C=>{var m=Ja(),T=de(m);let _;var re=q(T);ce((Q,E)=>{_=Ve(T,"",_,Q),_e(re,` ${E??""}`)},[()=>({background:bt(c())}),()=>nt(c())]),d(C,m)};ie(y,C=>{l()?C(z):C(ve,!1)})}d(r,i)},H=r=>{var i=Te(),y=de(i);{var z=C=>{var m=Te(),T=de(m);{let _=we(c);De(T,()=>Ft,(re,Q)=>{Q(re,{type:"single",get value(){return e(_)},onValueChange:E=>{E&&t.onedit?.(t.prop.key,E)},children:(E,V)=>{var B=Xa(),xe=de(B);{let k=we(()=>A(c()));De(xe,()=>zt,(N,L)=>{L(N,{class:"status-trigger",get value(){return e(k)},children:(le,ue)=>{var K=Ga(),he=de(K);let J;var ne=q(he,2),X=S(ne,!0);b(ne),ce((G,Ee)=>{J=Ve(he,"",J,G),_e(X,Ee)},[()=>({background:x(c())}),()=>A(c())]),d(le,K)},$$slots:{default:!0}})})}var o=q(xe,2);De(o,()=>Lt,(k,N)=>{N(k,{align:"start",children:(L,le)=>{var ue=Te(),K=de(ue);Ue(K,17,()=>R,Be,(he,J)=>{var ne=Te(),X=de(ne);{let G=we(()=>A(e(J)));De(X,()=>Ot,(Ee,Ae)=>{Ae(Ee,{get value(){return e(J)},get label(){return e(G)},class:"dotted-item",children:(Ce,Re)=>{var Ie=Qa(),je=de(Ie);let ze;var Le=q(je,2),Ze=S(Le,!0);b(Le);var Je=q(Le,2);{var Ge=Fe=>{St(Fe,{size:12,class:"item-check"})},Qe=we(()=>c()===e(J));ie(Je,Fe=>{e(Qe)&&Fe(Ge)})}ce((Fe,Xe)=>{ze=Ve(je,"",ze,Fe),_e(Ze,Xe)},[()=>({background:x(e(J))}),()=>A(e(J))]),d(Ce,Ie)},$$slots:{default:!0}})})}d(he,ne)}),d(L,ue)},$$slots:{default:!0}})}),d(E,B)},$$slots:{default:!0}})})}d(C,m)},ve=C=>{var m=$a(),T=de(m);let _;var re=q(T);ce((Q,E)=>{_=Ve(T,"",_,Q),_e(re,` ${E??""}`)},[()=>({background:x(c())}),()=>A(c())]),d(C,m)};ie(y,C=>{l()?C(z):C(ve,!1)})}d(r,i)},U=r=>{var i=Te(),y=de(i);{var z=C=>{var m=er();ct(m);let T;ce((_,re)=>{T=ot(m,1,"edit-input date-input svelte-eh8ho9",null,T,_),ft(m,re)},[()=>({"date-empty":!c()?.trim()||!/^\d{4}-\d{2}-\d{2}/.test(c())}),()=>/^\d{4}-\d{2}-\d{2}/.test(c())?c().slice(0,10):""]),Pe("change",m,_=>{t.onedit?.(t.prop.key,_.currentTarget.value)}),d(C,m)},ve=C=>{var m=tr(),T=S(m,!0);b(m),ce(_=>_e(T,_),[()=>P(c())||"No date"]),d(C,m)};ie(y,C=>{l()?C(z):C(ve,!1)})}d(r,i)},j=r=>{var i=Te(),y=de(i);{var z=C=>{{let m=we(()=>Array.isArray(t.prop.value));Fa(C,{get value(){return t.prop.value},get multi(){return e(m)},onselect:T=>{t.onedit?.(t.prop.key,T),w(ee,!1)},oncancel:()=>{w(ee,!1)}})}},ve=C=>{var m=nr(),T=S(m);Ue(T,17,()=>(Array.isArray(t.prop.value)?t.prop.value:[t.prop.value]).filter(Boolean),Be,(Q,E)=>{var V=ar(),B=S(V,!0);b(V),ce(()=>_e(B,e(E))),Pe("click",V,xe=>{xe.stopPropagation(),O(e(E))}),d(Q,V)});var _=q(T,2);{var re=Q=>{var E=rr();ce(V=>Et(E,"placeholder",V),[()=>c()?"":"Empty"]),$e("focus",E,()=>{w(ee,!0)}),d(Q,E)};ie(_,Q=>{l()&&Q(re)})}b(m),d(C,m)};ie(y,C=>{e(ee)&&l()?C(z):C(ve,!1)})}d(r,i)},ye=r=>{var i=Te(),y=de(i);{var z=C=>{var m=sr();ct(m),ut(m,T=>w(D,T),()=>e(D)),ce(T=>ft(m,T),[c]),$e("blur",m,T=>{ge(T.currentTarget.value)}),Pe("keydown",m,T=>{T.key==="Enter"&&T.currentTarget.blur(),T.key==="Escape"&&w(g,!1)}),d(C,m)},ve=C=>{var m=ur(),T=S(m);{var _=E=>{var V=or(),B=de(V),xe=S(B,!0);b(B);var o=q(B,2);{var k=N=>{var L=ir(),le=S(L);_a(le,{size:12}),b(L),Pe("click",L,()=>{w(g,!0),requestAnimationFrame(()=>e(D)?.focus())}),d(N,L)};ie(o,N=>{l()&&N(k)})}ce((N,L)=>{Et(B,"href",N),_e(xe,L)},[c,c]),d(E,V)},re=we(()=>c()),Q=E=>{var V=lr();Pe("click",V,()=>{w(g,!0),requestAnimationFrame(()=>e(D)?.focus())}),d(E,V)};ie(T,E=>{e(re)?E(_):l()&&E(Q,1)})}b(m),d(C,m)};ie(y,C=>{e(g)&&l()?C(z):C(ve,!1)})}d(r,i)},Z=r=>{var i=cr(),y=S(i,!0);b(i),ce(z=>_e(y,z),[c]),d(r,i)},se=r=>{var i=Te(),y=de(i);{var z=C=>{var m=dr();Xt(m),ut(m,T=>w(pe,T),()=>e(pe)),ce((T,_)=>{Et(m,"rows",T),ft(m,_)},[()=>Math.max(1,c().split(`
3
+ `).length),c]),$e("blur",m,T=>{const _=T.currentTarget.value;_!==c()&&t.onedit?.(t.prop.key,_),w(g,!1)}),Pe("keydown",m,T=>{T.key==="Escape"&&(T.currentTarget.value=c(),w(g,!1))}),d(C,m)},ve=C=>{var m=vr(),T=S(m),_=q(T);{var re=E=>{var V=fr();d(E,V)},Q=we(()=>!c()&&l());ie(_,E=>{e(Q)&&E(re)})}b(m),ce(E=>_e(T,`${E??""} `),[()=>c()||""]),Pe("click",m,()=>{l()&&(w(g,!0),requestAnimationFrame(()=>e(pe)?.focus()))}),d(C,m)};ie(y,C=>{e(g)&&l()?C(z):C(ve,!1)})}d(r,i)};ie(be,r=>{t.prop.type==="entity-type"?r(fe):t.prop.type==="status"?r(H,1):t.prop.type==="date"?r(U,2):t.prop.type==="wikilink"?r(j,3):t.prop.type==="url"?r(ye,4):t.prop.type==="badge"?r(Z,5):r(se,!1)})}b(ae),b(ke),ce(r=>_e(F,r),[()=>v(t.prop.key)]),Pe("click",oe,r=>r.stopPropagation()),d(Y,ke),Ye()}_t(["click","change","keydown"]);var _r=M('<div class="name-headline svelte-1a2lez6"><input class="name-input svelte-1a2lez6" type="text" placeholder="Untitled"/></div>'),mr=M('<button class="fields-toggle svelte-1a2lez6"><span><!></span> <span class="fields-label svelte-1a2lez6">Fields</span> <span class="fields-count svelte-1a2lez6"> </span></button>'),gr=M('<div class="add-field-row svelte-1a2lez6"><input class="add-field-input svelte-1a2lez6" type="text" placeholder="Field name"/></div>'),yr=M("<!> <span>Add field</span>",1),wr=M('<div class="fields-list svelte-1a2lez6"><!> <!></div>'),br=M('<div class="entity-properties svelte-1a2lez6"><!> <!> <!></div>');function kr(Y,t){He(t,!0);let l=Oe(t,"editable",3,!1),u=Oe(t,"autofocusKey",3,null),p=Oe(t,"protectedKeys",19,()=>new Set);const R=we(()=>t.properties.find(s=>s.key==="name")),c=we(()=>t.properties.filter(s=>s.key!=="name"));let x=Se(null);const A=we(()=>e(R)?typeof e(R).value=="string"?e(R).value:e(R).value[0]:"");function v(s){s!==e(A)&&t.onedit?.("name",s)}let P=!1;st(()=>{u()==="name"&&!P&&e(x)&&(P=!0,requestAnimationFrame(()=>{e(x)?.focus(),e(x)?.select()})),u()||(P=!1)});const O="sg-properties-expanded";let g=Se(lt(typeof localStorage<"u"?localStorage.getItem(O)==="true":!1));function D(){w(g,!e(g)),localStorage.setItem(O,e(g)?"true":"false")}let pe=Se(!1),ge=Se(""),ee=Se(null);function ke(){w(pe,!0),w(ge,""),requestAnimationFrame(()=>e(ee)?.focus())}function oe(){const s=e(ge).trim().toLowerCase().replace(/\s+/g,"_");s&&!t.properties.some(h=>h.key===s)&&t.onadd?.(s,""),w(pe,!1),w(ge,"")}var W=br(),me=S(W);{var te=s=>{var h=_r(),f=S(h);ct(f),ut(f,F=>w(x,F),()=>e(x)),b(h),ce(()=>ft(f,e(A))),$e("blur",f,F=>v(F.currentTarget.value)),Pe("keydown",f,F=>{F.key==="Enter"&&(v(F.currentTarget.value),t.onfocuseditor?.()),F.key==="Escape"&&F.currentTarget.blur()}),d(s,h)};ie(me,s=>{e(R)&&s(te)})}var $=q(me,2);{var I=s=>{var h=mr(),f=S(h);let F;var ae=S(f);Ht(ae,{size:14}),b(f);var be=q(f,4),fe=S(be,!0);b(be),b(h),ce(()=>{F=ot(f,1,"fields-chevron svelte-1a2lez6",null,F,{expanded:e(g)}),_e(fe,e(c).length)}),Pe("mousedown",h,H=>H.preventDefault()),Pe("click",h,D),d(s,h)};ie($,s=>{e(c).length>0&&s(I)})}var n=q($,2);{var a=s=>{var h=wr(),f=S(h);Ue(f,17,()=>e(c),fe=>fe.key,(fe,H)=>{pr(fe,{get prop(){return e(H)},get editable(){return l()},get protectedKeys(){return p()},get onedit(){return t.onedit},get onremove(){return t.onremove},get ontypechange(){return t.ontypechange},get onentitytypechange(){return t.onentitytypechange}})});var F=q(f,2);{var ae=fe=>{var H=gr(),U=S(H);ct(U),ut(U,j=>w(ee,j),()=>e(ee)),b(H),Pe("keydown",U,j=>{j.key==="Enter"&&oe(),j.key==="Escape"&&w(pe,!1)}),$e("blur",U,()=>{w(pe,!1)}),Bt(U,()=>e(ge),j=>w(ge,j)),d(fe,H)},be=fe=>{it(fe,{variant:"ghost",class:"add-field-btn",onclick:H=>{H.stopPropagation(),ke()},children:(H,U)=>{var j=yr(),ye=de(j);Dt(ye,{size:16}),We(2),d(H,j)},$$slots:{default:!0}})};ie(F,fe=>{e(pe)?fe(ae):l()&&fe(be,1)})}b(h),d(s,h)};ie(n,s=>{e(g)&&s(a)})}b(W),d(Y,W),Ye()}_t(["keydown","mousedown","click"]);var xr=M('<button class="connection-chip svelte-16xienp"><span class="chip-dot svelte-16xienp"></span> <span class="chip-name svelte-16xienp"> </span> <span class="chip-type svelte-16xienp"> </span></button>'),Cr=M('<div class="connections-body svelte-16xienp"></div>'),Er=M('<div class="connections-panel svelte-16xienp"><button class="connections-header svelte-16xienp"><span><!></span> <span class="header-label svelte-16xienp">Connections</span> <span class="header-count svelte-16xienp"> </span></button> <!></div>');function Sr(Y,t){He(t,!0);const l="sg-linked-entities-expanded";let u=Se(lt(typeof localStorage<"u"?localStorage.getItem(l)!=="true":!0));function p(){w(u,!e(u)),localStorage.setItem(l,e(u)?"false":"true")}const R=we(()=>{const P=[],O=t.entityId.toLowerCase();for(const g of dt.repos)for(const D of g.entities)if(!(D.id===t.entityId&&D.repo===t.entityRepo)){for(const pe of D.wikilinks)if(pe.replace(/\[\[|\]\]/g,"").trim().toLowerCase()===O){P.push(D);break}}return P});function c(P){pt(`/${P.repo}/${P.entityType}/${P.id}`)}var x=Te(),A=de(x);{var v=P=>{var O=Er(),g=S(O),D=S(g);let pe;var ge=S(D);Ht(ge,{size:14}),b(D);var ee=q(D,4),ke=S(ee,!0);b(ee),b(g);var oe=q(g,2);{var W=me=>{var te=Cr();Ue(te,21,()=>e(R),Be,($,I)=>{const n=we(()=>bt(e(I).entityType));var a=xr(),s=S(a);let h;var f=q(s,2),F=S(f,!0);b(f);var ae=q(f,2),be=S(ae,!0);b(ae),b(a),ce(fe=>{h=Ve(s,"",h,{background:e(n)}),_e(F,e(I).title),_e(be,fe)},[()=>nt(e(I).entityType)]),Pe("click",a,()=>c(e(I))),d($,a)}),b(te),d(me,te)};ie(oe,me=>{e(u)||me(W)})}b(O),ce(()=>{pe=ot(D,1,"header-chevron svelte-16xienp",null,pe,{collapsed:e(u)}),_e(ke,e(R).length)}),Pe("mousedown",g,me=>me.preventDefault()),Pe("click",g,p),d(P,O)};ie(A,P=>{e(R).length>0&&P(v)})}d(Y,x),Ye()}_t(["mousedown","click"]);var Ar=M('<div class="remote-cursor svelte-ok7wy5"><span class="remote-cursor-label svelte-ok7wy5"> </span></div>'),Rr=M('<div class="cursor-overlay svelte-ok7wy5"></div>'),Pr=M('<div class="editor-wrap svelte-ok7wy5"><div class="cm-container svelte-ok7wy5"></div> <!></div>');function Tr(Y,t){He(t,!0);let l=Oe(t,"readonly",3,!0),u=Oe(t,"resetKey",3,0);const p=$t("theme");let R,c=null,x=null,A=Se(""),v=null,P=Se(lt([])),O=null,g=t.content;function D(W,me){return W.theme({"&":{backgroundColor:"transparent",color:"var(--color-text-primary)",fontSize:"15px",fontFamily:"var(--font-sans)"},".cm-content":{padding:"32px 0",fontFamily:"var(--font-sans)",caretColor:"var(--color-accent)",lineHeight:"1.6"},".cm-cursor":{borderLeftColor:"var(--color-accent)"},".cm-selectionBackground":{backgroundColor:me?"rgba(110,110,232,0.2)":"rgba(110,110,232,0.15)"},"&.cm-focused .cm-selectionBackground":{backgroundColor:me?"rgba(110,110,232,0.3)":"rgba(110,110,232,0.2)"},".cm-gutters":{display:"none"},".cm-activeLine":{backgroundColor:"transparent"},".cm-line":{padding:"0"},".cm-header-1":{fontSize:"22px",fontWeight:"600"},".cm-header-2":{fontSize:"16px",fontWeight:"600"},".cm-header-3":{fontSize:"15px",fontWeight:"600"},".cm-formatting":{color:"var(--color-text-tertiary)",opacity:"0.5"},".cm-link":{color:"var(--color-link)",textDecoration:"none"}},{dark:me})}async function pe(){c&&(c.destroy(),c=null),x&&(x.destroy(),x=null),w(P,[],!0);const{EditorState:W,Transaction:me}=await Ne(async()=>{const{EditorState:r,Transaction:i}=await import("../chunks/CX_61fY8.js");return{EditorState:r,Transaction:i}},[],import.meta.url);v=me;const{EditorView:te,keymap:$,ViewPlugin:I}=await Ne(async()=>{const{EditorView:r,keymap:i,ViewPlugin:y}=await import("../chunks/DnL9f0lc.js").then(z=>z.i);return{EditorView:r,keymap:i,ViewPlugin:y}},__vite__mapDeps([0,1]),import.meta.url),{markdown:n}=await Ne(async()=>{const{markdown:r}=await import("../chunks/CscoF-YL.js");return{markdown:r}},__vite__mapDeps([2,1,0,3,4,5]),import.meta.url),{syntaxHighlighting:a,HighlightStyle:s}=await Ne(async()=>{const{syntaxHighlighting:r,HighlightStyle:i}=await import("../chunks/D7ZqAKi9.js");return{syntaxHighlighting:r,HighlightStyle:i}},__vite__mapDeps([3,4,1,0]),import.meta.url),{history:h,defaultKeymap:f,historyKeymap:F}=await Ne(async()=>{const{history:r,defaultKeymap:i,historyKeymap:y}=await import("../chunks/CWQRQXxy.js");return{history:r,defaultKeymap:i,historyKeymap:y}},__vite__mapDeps([6,1,0,3,4]),import.meta.url),{tags:ae}=await Ne(async()=>{const{tags:r}=await import("../chunks/C7VoTosa.js").then(i=>i.i);return{tags:r}},[],import.meta.url),{livePreviewPlugin:be,livePreviewTheme:fe}=await Ne(async()=>{const{livePreviewPlugin:r,livePreviewTheme:i}=await import("../chunks/B340SUKR.js");return{livePreviewPlugin:r,livePreviewTheme:i}},__vite__mapDeps([7,0,1,3,4]),import.meta.url),H=p.current==="dark",U=D(te,H),j=s.define([{tag:ae.processingInstruction,color:"var(--color-text-tertiary)",opacity:"0.7"}]),ye=[n(),U,a(j),be,fe,te.lineWrapping];l()&&ye.push(W.readOnly.of(!0));let Z=!1;if(t.cursorDocName&&!l())try{let o=function(){if(!c||!_){w(P,[],!0);return}const L=_.awareness,le=_.ytext,ue=le.doc;if(!ue){w(P,[],!0);return}const K=[],he=c.dom.getBoundingClientRect();L.getStates().forEach((J,ne)=>{if(ne===xe)return;const X=J.cursor;if(!X?.head)return;const{name:G="Anonymous",color:Ee="#e05050"}=J.user||{};let Ae;try{Ae=m.createRelativePositionFromJSON(X.head)}catch{return}const Ce=m.createAbsolutePositionFromRelativePosition(Ae,ue);if(!Ce||Ce.type!==le)return;const Re=c.coordsAtPos(Math.min(Ce.index,c.state.doc.length));Re&&K.push({id:ne,name:G,color:Ee,top:Re.top-he.top,left:Re.left-he.left,height:Re.bottom-Re.top})}),w(P,K,!0)},k=function(){O&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{O=null,o()})},N=function({added:L,updated:le,removed:ue}){[...L,...le,...ue].some(he=>he!==xe)&&k()};const{createCollabSession:r}=await Ne(async()=>{const{createCollabSession:L}=await import("../chunks/DFyq2JCT.js");return{createCollabSession:L}},__vite__mapDeps([8,9,10,11,12,13,14,15,16,17,18]),import.meta.url),{ySync:i,ySyncFacet:y,YSyncConfig:z,yUndoManagerKeymap:ve}=await Ne(async()=>{const{ySync:L,ySyncFacet:le,YSyncConfig:ue,yUndoManagerKeymap:K}=await import("../chunks/7S2LGqoP.js");return{ySync:L,ySyncFacet:le,YSyncConfig:ue,yUndoManagerKeymap:K}},__vite__mapDeps([19,9,0,1]),import.meta.url),{auth:C}=await Ne(async()=>{const{auth:L}=await import("../chunks/hE0jymgn.js").then(le=>le.b);return{auth:L}},__vite__mapDeps([16,12,15]),import.meta.url),m=await Ne(()=>import("../chunks/CSVbGg_b.js").then(L=>L.B),[],import.meta.url),T=getComputedStyle(document.documentElement).getPropertyValue("--color-accent").trim()||"#e05050",_=r(t.cursorDocName,{name:C.user?.displayName??"Anonymous",color:T,colorLight:T+"33"}),re=new m.UndoManager(_.ytext,{captureTimeout:500}),{yUndoManagerFacet:Q,yUndoManager:E,YUndoManagerConfig:V}=await Ne(async()=>{const{yUndoManagerFacet:L,yUndoManager:le,YUndoManagerConfig:ue}=await import("../chunks/7S2LGqoP.js");return{yUndoManagerFacet:L,yUndoManager:le,YUndoManagerConfig:ue}},__vite__mapDeps([19,9,0,1]),import.meta.url),B=new z(_.ytext,_.awareness);ye.push(y.of(B),i,Q.of(new V(re)),E,$.of(ve)),ye.push(I.define(L=>{function le(){const ue=L.state.selection.main,K=_.ytext,he=m.createRelativePositionFromTypeIndex(K,ue.anchor),J=m.createRelativePositionFromTypeIndex(K,ue.head);_.awareness.setLocalStateField("cursor",{anchor:m.relativePositionToJSON(he),head:m.relativePositionToJSON(J)})}return le(),{update(ue){(ue.selectionSet||ue.docChanged)&&le()}}}));const xe=_.ydoc.clientID;_.awareness.on("change",N),ye.push(I.define(()=>({update(L){(L.docChanged||L.geometryChanged||L.viewportChanged)&&k()},destroy(){_.awareness.off("change",N)}}))),x=_,Z=!0}catch(r){console.warn("Yjs collab setup failed, falling back to solo editing:",r)}if(!l()&&!Z?(ye.push(h({newGroupDelay:500})),ye.push($.of([...f,...F]))):!l()&&Z&&ye.push($.of(f)),t.onchange)if(Z){const r=Date.now();ye.push(te.updateListener.of(i=>{if(i.docChanged&&Date.now()-r>1e3&&i.transactions.some(z=>z.isUserEvent("input")||z.isUserEvent("delete")||z.isUserEvent("move")||z.isUserEvent("undo")||z.isUserEvent("redo"))){const z=i.state.doc.toString();g=z,t.onchange(z)}}))}else ye.push(te.updateListener.of(r=>{if(r.docChanged){const i=r.state.doc.toString();g=i,t.onchange(i)}}));ye.push(te.domEventHandlers({click(r){const i=r.target;if(t.onwikilinkclick){const z=i.closest(".cm-live-wikilink");if(z){r.preventDefault();const ve=z.textContent?.replace(/^\[{1,2}|\]{1,2}$/g,"").trim();return ve&&t.onwikilinkclick(ve),!0}}const y=i.closest(".cm-live-link");if(y){const z=y.getAttribute("data-href");if(z)return r.preventDefault(),window.open(z,"_blank","noopener,noreferrer"),!0}return!1}})),t.onsave&&ye.push($.of([{key:"Mod-s",run:()=>(t.onsave(),!0)}]));const se=W.create({doc:Z?"":t.content,extensions:ye});c=new te({state:se,parent:R}),g=Z?"":t.content,w(A,t.cursorDocName??"",!0)}ea(()=>{pe()}),st(()=>{t.cursorDocName&&e(A)&&t.cursorDocName!==e(A)&&pe()}),st(()=>{if(u(),c&&!x&&t.content!==g){g=t.content;const W=R.closest(".document-scroll"),me=W?.scrollTop??0;c.dispatch({changes:{from:0,to:c.state.doc.length,insert:t.content},...v?{annotations:v.addToHistory.of(!1)}:{}}),W&&requestAnimationFrame(()=>{W.scrollTop=me})}}),Wt(()=>{O&&cancelAnimationFrame(O),x?.destroy(),x=null,c?.destroy()});var ge=Pr(),ee=S(ge);ut(ee,W=>R=W,()=>R);var ke=q(ee,2);{var oe=W=>{var me=Rr();Ue(me,21,()=>e(P),te=>te.id,(te,$)=>{var I=Ar(),n=S(I),a=S(n,!0);b(n),b(I),ce(()=>{Ve(I,`top: ${e($).top??""}px; left: ${e($).left??""}px; height: ${e($).height??""}px; --cursor-color: ${e($).color??""};`),Ve(n,`background-color: ${e($).color??""};`),_e(a,e($).name)}),d(te,I)}),b(me),d(W,me)};ie(ke,W=>{e(P).length>0&&W(oe)})}b(ge),d(Y,ge),Ye()}var Ct={exports:{}};var Dr=Ct.exports,Kt;function zr(){return Kt||(Kt=1,(function(Y,t){((l,u)=>{Y.exports=u()})(Dr,function l(){var u=typeof self<"u"?self:typeof window<"u"?window:u!==void 0?u:{},p,R=!u.document&&!!u.postMessage,c=u.IS_PAPA_WORKER||!1,x={},A=0,v={};function P(n){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(a){var s=te(a);s.chunkSize=parseInt(s.chunkSize),a.step||a.chunk||(s.chunkSize=null),this._handle=new ge(s),(this._handle.streamer=this)._config=s}).call(this,n),this.parseChunk=function(a,s){var h=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<h){let F=this._config.newline;F||(f=this._config.quoteChar||'"',F=this._handle.guessLineEndings(a,f)),a=[...a.split(F).slice(h)].join(F)}this.isFirstChunk&&I(this._config.beforeFirstChunk)&&(f=this._config.beforeFirstChunk(a))!==void 0&&(a=f),this.isFirstChunk=!1,this._halted=!1;var h=this._partialLine+a,f=(this._partialLine="",this._handle.parse(h,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(a=f.meta.cursor,h=(this._finished||(this._partialLine=h.substring(a-this._baseIndex),this._baseIndex=a),f&&f.data&&(this._rowCount+=f.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),c)u.postMessage({results:f,workerId:v.WORKER_ID,finished:h});else if(I(this._config.chunk)&&!s){if(this._config.chunk(f,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=f=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(f.data),this._completeResults.errors=this._completeResults.errors.concat(f.errors),this._completeResults.meta=f.meta),this._completed||!h||!I(this._config.complete)||f&&f.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),h||f&&f.meta.paused||this._nextChunk(),f}this._halted=!0},this._sendError=function(a){I(this._config.error)?this._config.error(a):c&&this._config.error&&u.postMessage({workerId:v.WORKER_ID,error:a,finished:!1})}}function O(n){var a;(n=n||{}).chunkSize||(n.chunkSize=v.RemoteChunkSize),P.call(this,n),this._nextChunk=R?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(s){this._input=s,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(a=new XMLHttpRequest,this._config.withCredentials&&(a.withCredentials=this._config.withCredentials),R||(a.onload=$(this._chunkLoaded,this),a.onerror=$(this._chunkError,this)),a.open(this._config.downloadRequestBody?"POST":"GET",this._input,!R),this._config.downloadRequestHeaders){var s,h=this._config.downloadRequestHeaders;for(s in h)a.setRequestHeader(s,h[s])}var f;this._config.chunkSize&&(f=this._start+this._config.chunkSize-1,a.setRequestHeader("Range","bytes="+this._start+"-"+f));try{a.send(this._config.downloadRequestBody)}catch(F){this._chunkError(F.message)}R&&a.status===0&&this._chunkError()}},this._chunkLoaded=function(){a.readyState===4&&(a.status<200||400<=a.status?this._chunkError():(this._start+=this._config.chunkSize||a.responseText.length,this._finished=!this._config.chunkSize||this._start>=(s=>(s=s.getResponseHeader("Content-Range"))!==null?parseInt(s.substring(s.lastIndexOf("/")+1)):-1)(a),this.parseChunk(a.responseText)))},this._chunkError=function(s){s=a.statusText||s,this._sendError(new Error(s))}}function g(n){(n=n||{}).chunkSize||(n.chunkSize=v.LocalChunkSize),P.call(this,n);var a,s,h=typeof FileReader<"u";this.stream=function(f){this._input=f,s=f.slice||f.webkitSlice||f.mozSlice,h?((a=new FileReader).onload=$(this._chunkLoaded,this),a.onerror=$(this._chunkError,this)):a=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var f=this._input,F=(this._config.chunkSize&&(F=Math.min(this._start+this._config.chunkSize,this._input.size),f=s.call(f,this._start,F)),a.readAsText(f,this._config.encoding));h||this._chunkLoaded({target:{result:F}})},this._chunkLoaded=function(f){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(f.target.result)},this._chunkError=function(){this._sendError(a.error)}}function D(n){var a;P.call(this,n=n||{}),this.stream=function(s){return a=s,this._nextChunk()},this._nextChunk=function(){var s,h;if(!this._finished)return s=this._config.chunkSize,a=s?(h=a.substring(0,s),a.substring(s)):(h=a,""),this._finished=!a,this.parseChunk(h)}}function pe(n){P.call(this,n=n||{});var a=[],s=!0,h=!1;this.pause=function(){P.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){P.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(f){this._input=f,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){h&&a.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),a.length?this.parseChunk(a.shift()):s=!0},this._streamData=$(function(f){try{a.push(typeof f=="string"?f:f.toString(this._config.encoding)),s&&(s=!1,this._checkIsFinished(),this.parseChunk(a.shift()))}catch(F){this._streamError(F)}},this),this._streamError=$(function(f){this._streamCleanUp(),this._sendError(f)},this),this._streamEnd=$(function(){this._streamCleanUp(),h=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ge(n){var a,s,h,f,F=Math.pow(2,53),ae=-F,be=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,fe=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,H=this,U=0,j=0,ye=!1,Z=!1,se=[],r={data:[],errors:[],meta:{}};function i(C){return n.skipEmptyLines==="greedy"?C.join("").trim()==="":C.length===1&&C[0].length===0}function y(){if(r&&h&&(ve("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+v.DefaultDelimiter+"'"),h=!1),n.skipEmptyLines&&(r.data=r.data.filter(function(_){return!i(_)})),z()){let _=function(re,Q){I(n.transformHeader)&&(re=n.transformHeader(re,Q)),se.push(re)};if(r)if(Array.isArray(r.data[0])){for(var C=0;z()&&C<r.data.length;C++)r.data[C].forEach(_);r.data.splice(0,1)}else r.data.forEach(_)}function m(_,re){for(var Q=n.header?{}:[],E=0;E<_.length;E++){var V=E,B=_[E],B=((xe,o)=>(k=>(n.dynamicTypingFunction&&n.dynamicTyping[k]===void 0&&(n.dynamicTyping[k]=n.dynamicTypingFunction(k)),(n.dynamicTyping[k]||n.dynamicTyping)===!0))(xe)?o==="true"||o==="TRUE"||o!=="false"&&o!=="FALSE"&&((k=>{if(be.test(k)&&(k=parseFloat(k),ae<k&&k<F))return 1})(o)?parseFloat(o):fe.test(o)?new Date(o):o===""?null:o):o)(V=n.header?E>=se.length?"__parsed_extra":se[E]:V,B=n.transform?n.transform(B,V):B);V==="__parsed_extra"?(Q[V]=Q[V]||[],Q[V].push(B)):Q[V]=B}return n.header&&(E>se.length?ve("FieldMismatch","TooManyFields","Too many fields: expected "+se.length+" fields but parsed "+E,j+re):E<se.length&&ve("FieldMismatch","TooFewFields","Too few fields: expected "+se.length+" fields but parsed "+E,j+re)),Q}var T;r&&(n.header||n.dynamicTyping||n.transform)&&(T=1,!r.data.length||Array.isArray(r.data[0])?(r.data=r.data.map(m),T=r.data.length):r.data=m(r.data,0),n.header&&r.meta&&(r.meta.fields=se),j+=T)}function z(){return n.header&&se.length===0}function ve(C,m,T,_){C={type:C,code:m,message:T},_!==void 0&&(C.row=_),r.errors.push(C)}I(n.step)&&(f=n.step,n.step=function(C){r=C,z()?y():(y(),r.data.length!==0&&(U+=C.data.length,n.preview&&U>n.preview?s.abort():(r.data=r.data[0],f(r,H))))}),this.parse=function(C,m,T){var _=n.quoteChar||'"',_=(n.newline||(n.newline=this.guessLineEndings(C,_)),h=!1,n.delimiter?I(n.delimiter)&&(n.delimiter=n.delimiter(C),r.meta.delimiter=n.delimiter):((_=((re,Q,E,V,B)=>{var xe,o,k,N;B=B||[","," ","|",";",v.RECORD_SEP,v.UNIT_SEP];for(var L=0;L<B.length;L++){for(var le,ue=B[L],K=0,he=0,J=0,ne=(k=void 0,new ke({comments:V,delimiter:ue,newline:Q,preview:10}).parse(re)),X=0;X<ne.data.length;X++)E&&i(ne.data[X])?J++:(le=ne.data[X].length,he+=le,k===void 0?k=le:0<le&&(K+=Math.abs(le-k),k=le));0<ne.data.length&&(he/=ne.data.length-J),(o===void 0||K<=o)&&(N===void 0||N<he)&&1.99<he&&(o=K,xe=ue,N=he)}return{successful:!!(n.delimiter=xe),bestDelimiter:xe}})(C,n.newline,n.skipEmptyLines,n.comments,n.delimitersToGuess)).successful?n.delimiter=_.bestDelimiter:(h=!0,n.delimiter=v.DefaultDelimiter),r.meta.delimiter=n.delimiter),te(n));return n.preview&&n.header&&_.preview++,a=C,s=new ke(_),r=s.parse(a,m,T),y(),ye?{meta:{paused:!0}}:r||{meta:{paused:!1}}},this.paused=function(){return ye},this.pause=function(){ye=!0,s.abort(),a=I(n.chunk)?"":a.substring(s.getCharIndex())},this.resume=function(){H.streamer._halted?(ye=!1,H.streamer.parseChunk(a,!0)):setTimeout(H.resume,3)},this.aborted=function(){return Z},this.abort=function(){Z=!0,s.abort(),r.meta.aborted=!0,I(n.complete)&&n.complete(r),a=""},this.guessLineEndings=function(re,_){re=re.substring(0,1048576);var _=new RegExp(ee(_)+"([^]*?)"+ee(_),"gm"),T=(re=re.replace(_,"")).split("\r"),_=re.split(`
4
+ `),re=1<_.length&&_[0].length<T[0].length;if(T.length===1||re)return`
5
+ `;for(var Q=0,E=0;E<T.length;E++)T[E][0]===`
6
+ `&&Q++;return Q>=T.length/2?`\r
7
+ `:"\r"}}function ee(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ke(n){var a=(n=n||{}).delimiter,s=n.newline,h=n.comments,f=n.step,F=n.preview,ae=n.fastMode,be=null,fe=!1,H=n.quoteChar==null?'"':n.quoteChar,U=H;if(n.escapeChar!==void 0&&(U=n.escapeChar),(typeof a!="string"||-1<v.BAD_DELIMITERS.indexOf(a))&&(a=","),h===a)throw new Error("Comment character same as delimiter");h===!0?h="#":(typeof h!="string"||-1<v.BAD_DELIMITERS.indexOf(h))&&(h=!1),s!==`
8
+ `&&s!=="\r"&&s!==`\r
9
+ `&&(s=`
10
+ `);var j=0,ye=!1;this.parse=function(Z,se,r){if(typeof Z!="string")throw new Error("Input must be a string");var i=Z.length,y=a.length,z=s.length,ve=h.length,C=I(f),m=[],T=[],_=[],re=j=0;if(!Z)return K();if(ae||ae!==!1&&Z.indexOf(H)===-1){for(var Q=Z.split(s),E=0;E<Q.length;E++){if(_=Q[E],j+=_.length,E!==Q.length-1)j+=s.length;else if(r)return K();if(!h||_.substring(0,ve)!==h){if(C){if(m=[],N(_.split(a)),he(),ye)return K()}else N(_.split(a));if(F&&F<=E)return m=m.slice(0,F),K(!0)}}return K()}for(var V=Z.indexOf(a,j),B=Z.indexOf(s,j),xe=new RegExp(ee(U)+ee(H),"g"),o=Z.indexOf(H,j);;)if(Z[j]===H)for(o=j,j++;;){if((o=Z.indexOf(H,o+1))===-1)return r||T.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:m.length,index:j}),le();if(o===i-1)return le(Z.substring(j,o).replace(xe,H));if(H===U&&Z[o+1]===U)o++;else if(H===U||o===0||Z[o-1]!==U){V!==-1&&V<o+1&&(V=Z.indexOf(a,o+1));var k=L((B=B!==-1&&B<o+1?Z.indexOf(s,o+1):B)===-1?V:Math.min(V,B));if(Z.substr(o+1+k,y)===a){_.push(Z.substring(j,o).replace(xe,H)),Z[j=o+1+k+y]!==H&&(o=Z.indexOf(H,j)),V=Z.indexOf(a,j),B=Z.indexOf(s,j);break}if(k=L(B),Z.substring(o+1+k,o+1+k+z)===s){if(_.push(Z.substring(j,o).replace(xe,H)),ue(o+1+k+z),V=Z.indexOf(a,j),o=Z.indexOf(H,j),C&&(he(),ye))return K();if(F&&m.length>=F)return K(!0);break}T.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:m.length,index:j}),o++}}else if(h&&_.length===0&&Z.substring(j,j+ve)===h){if(B===-1)return K();j=B+z,B=Z.indexOf(s,j),V=Z.indexOf(a,j)}else if(V!==-1&&(V<B||B===-1))_.push(Z.substring(j,V)),j=V+y,V=Z.indexOf(a,j);else{if(B===-1)break;if(_.push(Z.substring(j,B)),ue(B+z),C&&(he(),ye))return K();if(F&&m.length>=F)return K(!0)}return le();function N(J){m.push(J),re=j}function L(J){var ne=0;return ne=J!==-1&&(J=Z.substring(o+1,J))&&J.trim()===""?J.length:ne}function le(J){return r||(J===void 0&&(J=Z.substring(j)),_.push(J),j=i,N(_),C&&he()),K()}function ue(J){j=J,N(_),_=[],B=Z.indexOf(s,j)}function K(J){if(n.header&&!se&&m.length&&!fe){var ne=m[0],X=Object.create(null),G=new Set(ne);let Ee=!1;for(let Ae=0;Ae<ne.length;Ae++){let Ce=ne[Ae];if(X[Ce=I(n.transformHeader)?n.transformHeader(Ce,Ae):Ce]){let Re,Ie=X[Ce];for(;Re=Ce+"_"+Ie,Ie++,G.has(Re););G.add(Re),ne[Ae]=Re,X[Ce]++,Ee=!0,(be=be===null?{}:be)[Re]=Ce}else X[Ce]=1,ne[Ae]=Ce;G.add(Ce)}Ee&&console.warn("Duplicate headers found and renamed."),fe=!0}return{data:m,errors:T,meta:{delimiter:a,linebreak:s,aborted:ye,truncated:!!J,cursor:re+(se||0),renamedHeaders:be}}}function he(){f(K()),m=[],T=[]}},this.abort=function(){ye=!0},this.getCharIndex=function(){return j}}function oe(n){var a=n.data,s=x[a.workerId],h=!1;if(a.error)s.userError(a.error,a.file);else if(a.results&&a.results.data){var f={abort:function(){h=!0,W(a.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:me,resume:me};if(I(s.userStep)){for(var F=0;F<a.results.data.length&&(s.userStep({data:a.results.data[F],errors:a.results.errors,meta:a.results.meta},f),!h);F++);delete a.results}else I(s.userChunk)&&(s.userChunk(a.results,f,a.file),delete a.results)}a.finished&&!h&&W(a.workerId,a.results)}function W(n,a){var s=x[n];I(s.userComplete)&&s.userComplete(a),s.terminate(),delete x[n]}function me(){throw new Error("Not implemented.")}function te(n){if(typeof n!="object"||n===null)return n;var a,s=Array.isArray(n)?[]:{};for(a in n)s[a]=te(n[a]);return s}function $(n,a){return function(){n.apply(a,arguments)}}function I(n){return typeof n=="function"}return v.parse=function(n,a){var s=(a=a||{}).dynamicTyping||!1;if(I(s)&&(a.dynamicTypingFunction=s,s={}),a.dynamicTyping=s,a.transform=!!I(a.transform)&&a.transform,!a.worker||!v.WORKERS_SUPPORTED)return s=null,v.NODE_STREAM_INPUT,typeof n=="string"?(n=(h=>h.charCodeAt(0)!==65279?h:h.slice(1))(n),s=new(a.download?O:D)(a)):n.readable===!0&&I(n.read)&&I(n.on)?s=new pe(a):(u.File&&n instanceof File||n instanceof Object)&&(s=new g(a)),s.stream(n);(s=(()=>{var h;return!!v.WORKERS_SUPPORTED&&(h=(()=>{var f=u.URL||u.webkitURL||null,F=l.toString();return v.BLOB_URL||(v.BLOB_URL=f.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",F,")();"],{type:"text/javascript"})))})(),(h=new u.Worker(h)).onmessage=oe,h.id=A++,x[h.id]=h)})()).userStep=a.step,s.userChunk=a.chunk,s.userComplete=a.complete,s.userError=a.error,a.step=I(a.step),a.chunk=I(a.chunk),a.complete=I(a.complete),a.error=I(a.error),delete a.worker,s.postMessage({input:n,config:a,workerId:s.id})},v.unparse=function(n,a){var s=!1,h=!0,f=",",F=`\r
11
+ `,ae='"',be=ae+ae,fe=!1,H=null,U=!1,j=((()=>{if(typeof a=="object"){if(typeof a.delimiter!="string"||v.BAD_DELIMITERS.filter(function(se){return a.delimiter.indexOf(se)!==-1}).length||(f=a.delimiter),typeof a.quotes!="boolean"&&typeof a.quotes!="function"&&!Array.isArray(a.quotes)||(s=a.quotes),typeof a.skipEmptyLines!="boolean"&&typeof a.skipEmptyLines!="string"||(fe=a.skipEmptyLines),typeof a.newline=="string"&&(F=a.newline),typeof a.quoteChar=="string"&&(ae=a.quoteChar),typeof a.header=="boolean"&&(h=a.header),Array.isArray(a.columns)){if(a.columns.length===0)throw new Error("Option columns is empty");H=a.columns}a.escapeChar!==void 0&&(be=a.escapeChar+ae),a.escapeFormulae instanceof RegExp?U=a.escapeFormulae:typeof a.escapeFormulae=="boolean"&&a.escapeFormulae&&(U=/^[=+\-@\t\r].*$/)}})(),new RegExp(ee(ae),"g"));if(typeof n=="string"&&(n=JSON.parse(n)),Array.isArray(n)){if(!n.length||Array.isArray(n[0]))return ye(null,n,fe);if(typeof n[0]=="object")return ye(H||Object.keys(n[0]),n,fe)}else if(typeof n=="object")return typeof n.data=="string"&&(n.data=JSON.parse(n.data)),Array.isArray(n.data)&&(n.fields||(n.fields=n.meta&&n.meta.fields||H),n.fields||(n.fields=Array.isArray(n.data[0])?n.fields:typeof n.data[0]=="object"?Object.keys(n.data[0]):[]),Array.isArray(n.data[0])||typeof n.data[0]=="object"||(n.data=[n.data])),ye(n.fields||[],n.data||[],fe);throw new Error("Unable to serialize unrecognized input");function ye(se,r,i){var y="",z=(typeof se=="string"&&(se=JSON.parse(se)),typeof r=="string"&&(r=JSON.parse(r)),Array.isArray(se)&&0<se.length),ve=!Array.isArray(r[0]);if(z&&h){for(var C=0;C<se.length;C++)0<C&&(y+=f),y+=Z(se[C],C);0<r.length&&(y+=F)}for(var m=0;m<r.length;m++){var T=(z?se:r[m]).length,_=!1,re=z?Object.keys(r[m]).length===0:r[m].length===0;if(i&&!z&&(_=i==="greedy"?r[m].join("").trim()==="":r[m].length===1&&r[m][0].length===0),i==="greedy"&&z){for(var Q=[],E=0;E<T;E++){var V=ve?se[E]:E;Q.push(r[m][V])}_=Q.join("").trim()===""}if(!_){for(var B=0;B<T;B++){0<B&&!re&&(y+=f);var xe=z&&ve?se[B]:B;y+=Z(r[m][xe],B)}m<r.length-1&&(!i||0<T&&!re)&&(y+=F)}}return y}function Z(se,r){var i,y;return se==null?"":se.constructor===Date?JSON.stringify(se).slice(1,25):(y=!1,U&&typeof se=="string"&&U.test(se)&&(se="'"+se,y=!0),i=se.toString().replace(j,be),(y=y||s===!0||typeof s=="function"&&s(se,r)||Array.isArray(s)&&s[r]||((z,ve)=>{for(var C=0;C<ve.length;C++)if(-1<z.indexOf(ve[C]))return!0;return!1})(i,v.BAD_DELIMITERS)||-1<i.indexOf(f)||i.charAt(0)===" "||i.charAt(i.length-1)===" ")?ae+i+ae:i)}},v.RECORD_SEP="",v.UNIT_SEP="",v.BYTE_ORDER_MARK="\uFEFF",v.BAD_DELIMITERS=["\r",`
12
+ `,'"',v.BYTE_ORDER_MARK],v.WORKERS_SUPPORTED=!R&&!!u.Worker,v.NODE_STREAM_INPUT=1,v.LocalChunkSize=10485760,v.RemoteChunkSize=5242880,v.DefaultDelimiter=",",v.Parser=ke,v.ParserHandle=ge,v.NetworkStreamer=O,v.FileStreamer=g,v.StringStreamer=D,v.ReadableStreamStreamer=pe,u.jQuery&&((p=u.jQuery).fn.parse=function(n){var a=n.config||{},s=[];return this.each(function(F){if(!(p(this).prop("tagName").toUpperCase()==="INPUT"&&p(this).attr("type").toLowerCase()==="file"&&u.FileReader)||!this.files||this.files.length===0)return!0;for(var ae=0;ae<this.files.length;ae++)s.push({file:this.files[ae],inputElem:this,instanceConfig:p.extend({},a)})}),h(),this;function h(){if(s.length===0)I(n.complete)&&n.complete();else{var F,ae,be,fe,H=s[0];if(I(n.before)){var U=n.before(H.file,H.inputElem);if(typeof U=="object"){if(U.action==="abort")return F="AbortError",ae=H.file,be=H.inputElem,fe=U.reason,void(I(n.error)&&n.error({name:F},ae,be,fe));if(U.action==="skip")return void f();typeof U.config=="object"&&(H.instanceConfig=p.extend(H.instanceConfig,U.config))}else if(U==="skip")return void f()}var j=H.instanceConfig.complete;H.instanceConfig.complete=function(ye){I(j)&&j(ye,H.file,H.inputElem),f()},v.parse(H.file,H.instanceConfig)}}function f(){s.splice(0,1),h()}}),c&&(u.onmessage=function(n){n=n.data,v.WORKER_ID===void 0&&n&&(v.WORKER_ID=n.workerId),typeof n.input=="string"?u.postMessage({workerId:v.WORKER_ID,results:v.parse(n.input,n.config),finished:!0}):(u.File&&n.input instanceof File||n.input instanceof Object)&&(n=v.parse(n.input,n.config))&&u.postMessage({workerId:v.WORKER_ID,results:n,finished:!0})}),(O.prototype=Object.create(P.prototype)).constructor=O,(g.prototype=Object.create(P.prototype)).constructor=g,(D.prototype=Object.create(D.prototype)).constructor=D,(pe.prototype=Object.create(P.prototype)).constructor=pe,v})})(Ct)),Ct.exports}var Lr=zr();const Ut=ya(Lr);var Or=M('<span class="remote-cell-label svelte-63hltt"> </span>'),Fr=M('<th><!> <input class="cell-input header-input svelte-63hltt"/> <!></th>'),Mr=M('<span class="remote-cell-label svelte-63hltt"> </span>'),Ir=M('<td><!> <input class="cell-input svelte-63hltt"/></td>'),jr=M('<tr class="svelte-63hltt"><td class="row-num svelte-63hltt"></td><!><td class="actions svelte-63hltt"><!></td></tr>'),Kr=M("<!> <span>Add row</span>",1),Ur=M('<div class="csv-editor svelte-63hltt"><div class="table-scroll svelte-63hltt"><table class="svelte-63hltt"><thead><tr class="svelte-63hltt"><th class="row-num svelte-63hltt"></th><!><th class="col-add svelte-63hltt"><!></th></tr></thead><tbody></tbody></table></div> <div class="csv-footer svelte-63hltt"><!></div></div> <!> <!>',1);function qr(Y,t){He(t,!0);let l=Oe(t,"remoteCursors",19,()=>[]),u=Se(lt([])),p=Se(lt([])),R=Se(void 0);function c(r){const i=Ut.parse(r.trim(),{header:!1,skipEmptyLines:!0});if(i.data.length>0){const y=i.data[0],z=y.join("\0");w(u,y,!0),w(p,i.data.slice(1).filter(ve=>ve.join("\0")!==z),!0)}else w(u,[],!0),w(p,[],!0)}c(t.content),st(()=>{c(t.content)});function x(){return Ut.unparse([e(u),...e(p)])}function A(){const r=x();t.onchange?.(r)}function v(r,i,y){e(p)[r][i]=y,w(p,[...e(p)],!0),A()}function P(r,i){e(u)[r]=i,w(u,[...e(u)],!0),A()}function O(){w(p,[...e(p),e(u).map(()=>"")],!0),A(),W(e(p).length-1,0)}let g=Se(null),D=Se(null);function pe(r){w(g,r,!0)}function ge(r){w(p,e(p).filter((i,y)=>y!==r),!0),A()}function ee(){const r=`col${e(u).length+1}`;w(u,[...e(u),r],!0),w(p,e(p).map(i=>[...i,""]),!0),A(),requestAnimationFrame(()=>{const i=e(R)?.querySelector(`thead th:nth-child(${e(u).length+1}) input`);i&&(i.focus(),i.select())})}function ke(r){e(u).length<=1||w(D,r,!0)}function oe(r){e(u).length<=1||(w(u,e(u).filter((i,y)=>y!==r),!0),w(p,e(p).map(i=>i.filter((y,z)=>z!==r)),!0),A())}function W(r,i){requestAnimationFrame(()=>{if(!e(R))return;let y=null;r<0?y=e(R).querySelector(`thead th:nth-child(${i+2}) input`):y=e(R).querySelector(`tbody tr:nth-child(${r+1}) td:nth-child(${i+2}) input`),y&&(y.focus(),y.select())})}function me(r,i,y){if(r.key==="Tab"){r.preventDefault(),r.shiftKey?y>0?W(i,y-1):i>0?W(i-1,e(u).length-1):i===0&&W(-1,e(u).length-1):y<e(u).length-1?W(i,y+1):i<e(p).length-1?W(i+1,0):i===e(p).length-1&&O();return}if(r.key==="Enter"){r.preventDefault(),r.shiftKey?i>0?W(i-1,y):W(-1,y):i<e(p).length-1?W(i+1,y):O();return}if(r.key==="Escape"){r.target.blur();return}}function te(r,i){if(r.key==="Tab"){r.preventDefault(),r.shiftKey?i>0&&W(-1,i-1):i<e(u).length-1?W(-1,i+1):e(p).length>0&&W(0,0);return}if(r.key==="Enter"){r.preventDefault(),e(p).length>0?W(0,i):O();return}if(r.key==="Escape"){r.target.blur();return}}function $(r,i){return l().find(y=>y.row===r&&y.col===i)}function I(r,i){t.oncellselect?.(r,i)}function n(r){(r.metaKey||r.ctrlKey)&&r.key==="s"&&(r.preventDefault(),t.onsave?.())}var a=Ur(),s=de(a),h=S(s),f=S(h),F=S(f),ae=S(F),be=q(S(ae));Ue(be,17,()=>e(u),Be,(r,i,y)=>{const z=we(()=>$(-1,y));var ve=Fr();let C;var m=S(ve);{var T=E=>{var V=Or(),B=S(V,!0);b(V),ce(()=>{Ve(V,`background-color: ${e(z).color??""}`),_e(B,e(z).name)}),d(E,V)};ie(m,E=>{e(z)&&E(T)})}var _=q(m,2);ct(_);var re=q(_,2);{var Q=E=>{it(E,{variant:"ghost",size:"icon",class:"col-delete-btn",title:"Delete column",onclick:()=>ke(y),children:(V,B)=>{Tt(V,{size:12})},$$slots:{default:!0}})};ie(re,E=>{e(u).length>1&&E(Q)})}b(ve),ce(()=>{Ve(ve,e(z)?`--rc-color: ${e(z).color}`:""),C=ot(ve,1,"svelte-63hltt",null,C,{"remote-active":!!e(z)}),ft(_,e(i))}),Pe("input",_,E=>P(y,E.currentTarget.value)),Pe("keydown",_,E=>te(E,y)),$e("focus",_,()=>I(-1,y)),d(r,ve)});var fe=q(be),H=S(fe);it(H,{variant:"ghost",size:"icon",class:"col-add-btn",title:"Add column",onclick:ee,children:(r,i)=>{Dt(r,{size:16})},$$slots:{default:!0}}),b(fe),b(ae),b(F);var U=q(F);Ue(U,21,()=>e(p),Be,(r,i,y)=>{var z=jr(),ve=S(z);ve.textContent=y+1;var C=q(ve);Ue(C,17,()=>e(i),Be,(_,re,Q)=>{const E=we(()=>$(y,Q));var V=Ir();let B;var xe=S(V);{var o=N=>{var L=Mr(),le=S(L,!0);b(L),ce(()=>{Ve(L,`background-color: ${e(E).color??""}`),_e(le,e(E).name)}),d(N,L)};ie(xe,N=>{e(E)&&N(o)})}var k=q(xe,2);ct(k),b(V),ce(()=>{Ve(V,e(E)?`--rc-color: ${e(E).color}`:""),B=ot(V,1,"svelte-63hltt",null,B,{"remote-active":!!e(E)}),ft(k,e(re))}),Pe("input",k,N=>v(y,Q,N.currentTarget.value)),Pe("keydown",k,N=>me(N,y,Q)),$e("focus",k,()=>I(y,Q)),d(_,V)});var m=q(C),T=S(m);it(T,{variant:"ghost",size:"icon",class:"delete-btn",title:"Delete row",onclick:()=>pe(y),children:(_,re)=>{Tt(_,{size:12})},$$slots:{default:!0}}),b(m),b(z),d(r,z)}),b(U),b(f),ut(f,r=>w(R,r),()=>e(R)),b(h);var j=q(h,2),ye=S(j);it(ye,{variant:"ghost",class:"add-row-btn",onclick:O,children:(r,i)=>{var y=Kr(),z=de(y);Dt(z,{size:16}),We(2),d(r,y)},$$slots:{default:!0}}),b(j),b(s);var Z=q(s,2);{let r=we(()=>e(g)!==null),i=we(()=>(e(g)??0)+1);Pt(Z,{get open(){return e(r)},title:"Delete row",get message(){return`Are you sure you want to delete row ${e(i)??""}? This cannot be undone.`},confirmLabel:"Delete",destructive:!0,onconfirm:()=>{e(g)!==null&&ge(e(g)),w(g,null)},oncancel:()=>w(g,null)})}var se=q(Z,2);{let r=we(()=>e(D)!==null),i=we(()=>`Are you sure you want to delete column "${e(D)!==null?e(u)[e(D)]??"":""}"? This will remove data from all rows.`);Pt(se,{get open(){return e(r)},title:"Delete column",get message(){return e(i)},confirmLabel:"Delete",destructive:!0,onconfirm:()=>{e(D)!==null&&oe(e(D)),w(D,null)},oncancel:()=>w(D,null)})}Pe("keydown",s,n),d(Y,a),Ye()}_t(["keydown","input"]);const Nr=/^\d{4}-\d{2}-\d{2}/,Vr=new Set(["active","inactive","in-progress","completed","done","cancelled","draft","archived","current","former","contractor","client","partner","won","lost","open","closed"]),Wr=new Set(["format"]),Br=new Set(["entity_id","created_at","updated_at","created_by","updated_by"]);function Hr(Y,t){const l=[];for(const[p,R]of Object.entries(Y)){if(Br.has(p)||R==null)continue;const c=Yr(p,R);c&&l.push(c)}const u=["entity_type","name","date"];return l.sort((p,R)=>{const c=u.indexOf(p.key),x=u.indexOf(R.key);return c!==-1&&x!==-1?c-x:c!==-1?-1:x!==-1?1:p.key.localeCompare(R.key)}),l}function Yr(Y,t){if(Y==="entity_type")return{key:Y,value:String(t),type:"entity-type"};if(Wr.has(Y))return{key:Y,value:String(t).toUpperCase(),type:"badge"};if(Y==="status")return{key:Y,value:String(t),type:"status"};if(Array.isArray(t)){if(t.length>0&&typeof t[0]=="object"&&t[0]!==null){const x=t.map(A=>Object.entries(A).map(([P,O])=>`${P}: ${O}`).join(", "));return{key:Y,value:x.join(" | "),type:"text"}}const p=t.map(String),R=p.some(x=>/^\[\[.+?\]\]$/.test(x)),c=p.map(x=>{const A=x.match(/^\[\[(.+?)\]\]$/);return A?A[1]:x});return R||c.every(x=>qt(x))?{key:Y,value:c,type:"wikilink"}:{key:Y,value:p.join(", "),type:"text"}}const l=String(t),u=l.match(/^\[\[(.+?)\]\]$/);return u?{key:Y,value:u[1],type:"wikilink"}:Nr.test(l)||Y==="date"||Y.endsWith("_date")||Y.endsWith("_at")?{key:Y,value:l,type:"date"}:Vr.has(l.toLowerCase())?{key:Y,value:l,type:"status"}:/^https?:\/\//.test(l)||Y==="url"||Y==="website"?{key:Y,value:l,type:"url"}:qt(l)&&!l.includes(" ")?{key:Y,value:l,type:"wikilink"}:{key:Y,value:l,type:"text"}}function qt(Y){return/^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(Y)&&Y.includes("-")}var Zr=rt("<title> </title>"),Jr=rt('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"></path></svg>');function Nt(Y,t){const l=at(t,["children","$$slots","$$events","$$legacy"]),u=at(l,["size","title"]);He(t,!1);const p=tt(),R=tt();let c=Oe(t,"size",8,16),x=Oe(t,"title",8,void 0);et(()=>(qe(l),qe(x())),()=>{w(p,l["aria-label"]||l["aria-labelledby"]||x())}),et(()=>(e(p),qe(l)),()=>{w(R,{"aria-hidden":e(p)?void 0:!0,role:e(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),mt(),yt();var A=Jr();gt(A,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...e(R),...u}));var v=S(A);{var P=O=>{var g=Zr(),D=S(g,!0);b(g),ce(()=>_e(D,x())),d(O,g)};ie(v,O=>{x()&&O(P)})}We(),b(A),d(Y,A),Ye()}class Gr{diff(t,l,u={}){let p;typeof u=="function"?(p=u,u={}):"callback"in u&&(p=u.callback);const R=this.castInput(t,u),c=this.castInput(l,u),x=this.removeEmpty(this.tokenize(R,u)),A=this.removeEmpty(this.tokenize(c,u));return this.diffWithOptionsObj(x,A,u,p)}diffWithOptionsObj(t,l,u,p){var R;const c=oe=>{if(oe=this.postProcess(oe,u),p){setTimeout(function(){p(oe)},0);return}else return oe},x=l.length,A=t.length;let v=1,P=x+A;u.maxEditLength!=null&&(P=Math.min(P,u.maxEditLength));const O=(R=u.timeout)!==null&&R!==void 0?R:1/0,g=Date.now()+O,D=[{oldPos:-1,lastComponent:void 0}];let pe=this.extractCommon(D[0],l,t,0,u);if(D[0].oldPos+1>=A&&pe+1>=x)return c(this.buildValues(D[0].lastComponent,l,t));let ge=-1/0,ee=1/0;const ke=()=>{for(let oe=Math.max(ge,-v);oe<=Math.min(ee,v);oe+=2){let W;const me=D[oe-1],te=D[oe+1];me&&(D[oe-1]=void 0);let $=!1;if(te){const n=te.oldPos-oe;$=te&&0<=n&&n<x}const I=me&&me.oldPos+1<A;if(!$&&!I){D[oe]=void 0;continue}if(!I||$&&me.oldPos<te.oldPos?W=this.addToPath(te,!0,!1,0,u):W=this.addToPath(me,!1,!0,1,u),pe=this.extractCommon(W,l,t,oe,u),W.oldPos+1>=A&&pe+1>=x)return c(this.buildValues(W.lastComponent,l,t))||!0;D[oe]=W,W.oldPos+1>=A&&(ee=Math.min(ee,oe-1)),pe+1>=x&&(ge=Math.max(ge,oe+1))}v++};if(p)(function oe(){setTimeout(function(){if(v>P||Date.now()>g)return p(void 0);ke()||oe()},0)})();else for(;v<=P&&Date.now()<=g;){const oe=ke();if(oe)return oe}}addToPath(t,l,u,p,R){const c=t.lastComponent;return c&&!R.oneChangePerToken&&c.added===l&&c.removed===u?{oldPos:t.oldPos+p,lastComponent:{count:c.count+1,added:l,removed:u,previousComponent:c.previousComponent}}:{oldPos:t.oldPos+p,lastComponent:{count:1,added:l,removed:u,previousComponent:c}}}extractCommon(t,l,u,p,R){const c=l.length,x=u.length;let A=t.oldPos,v=A-p,P=0;for(;v+1<c&&A+1<x&&this.equals(u[A+1],l[v+1],R);)v++,A++,P++,R.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return P&&!R.oneChangePerToken&&(t.lastComponent={count:P,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=A,v}equals(t,l,u){return u.comparator?u.comparator(t,l):t===l||!!u.ignoreCase&&t.toLowerCase()===l.toLowerCase()}removeEmpty(t){const l=[];for(let u=0;u<t.length;u++)t[u]&&l.push(t[u]);return l}castInput(t,l){return t}tokenize(t,l){return Array.from(t)}join(t){return t.join("")}postProcess(t,l){return t}get useLongestToken(){return!1}buildValues(t,l,u){const p=[];let R;for(;t;)p.push(t),R=t.previousComponent,delete t.previousComponent,t=R;p.reverse();const c=p.length;let x=0,A=0,v=0;for(;x<c;x++){const P=p[x];if(P.removed)P.value=this.join(u.slice(v,v+P.count)),v+=P.count;else{if(!P.added&&this.useLongestToken){let O=l.slice(A,A+P.count);O=O.map(function(g,D){const pe=u[v+D];return pe.length>g.length?pe:g}),P.value=this.join(O)}else P.value=this.join(l.slice(A,A+P.count));A+=P.count,P.added||(v+=P.count)}}return p}}const Vt="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class Qr extends Gr{tokenize(t){const l=new RegExp(`(\\r?\\n)|[${Vt}]+|[^\\S\\n\\r]+|[^${Vt}]`,"ug");return t.match(l)||[]}}const Xr=new Qr;function $r(Y,t,l){return Xr.diff(Y,t,l)}var en=rt("<title> </title>"),tn=rt('<svg><!><path d="M10,14a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,10,14Zm0-6a2,2,0,1,0,1.998,2.0044A2.002,2.002,0,0,0,10,8Z"></path><path d="M16.6436,29.4145,2.5858,15.3555A2,2,0,0,1,2,13.9414V4A2,2,0,0,1,4,2h9.9413a2,2,0,0,1,1.4142.5858L29.4144,16.6436a2.0005,2.0005,0,0,1,0,2.8285l-9.9424,9.9425a2.0008,2.0008,0,0,1-2.8285,0ZM4,4v9.9417L18.0578,28,28,18.0579,13.9416,4Z"></path></svg>');function an(Y,t){const l=at(t,["children","$$slots","$$events","$$legacy"]),u=at(l,["size","title"]);He(t,!1);const p=tt(),R=tt();let c=Oe(t,"size",8,16),x=Oe(t,"title",8,void 0);et(()=>(qe(l),qe(x())),()=>{w(p,l["aria-label"]||l["aria-labelledby"]||x())}),et(()=>(e(p),qe(l)),()=>{w(R,{"aria-hidden":e(p)?void 0:!0,role:e(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),mt(),yt();var A=tn();gt(A,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...e(R),...u}));var v=S(A);{var P=O=>{var g=en(),D=S(g,!0);b(g),ce(()=>_e(D,x())),d(O,g)};ie(v,O=>{x()&&O(P)})}We(2),b(A),d(Y,A),Ye()}var rn=M('<div class="dp-row svelte-1g4tvol"><div class="dp-icon svelte-1g4tvol"><!></div> <div class="dp-key svelte-1g4tvol"> </div> <div class="dp-value svelte-1g4tvol"><div class="dp-diff-old svelte-1g4tvol"><span> </span></div> <div class="dp-diff-new svelte-1g4tvol"><span> </span></div></div></div>'),nn=M('<div class="diff-properties svelte-1g4tvol"></div>'),sn=M('<span class="db-added"> </span>'),on=M('<span class="db-removed"> </span>'),ln=M("<span> </span>"),un=M("<span> </span>"),cn=M('<div class="diff-view svelte-1g4tvol"><!> <div class="diff-body svelte-1g4tvol"><!></div></div>');function dn(Y,t){He(t,!0);function l(g){if(g==null)return"";if(typeof g!="object")return String(g);const D=g;return String(D.name??D.title??D.label??D.id??JSON.stringify(D))}function u(g){return g==null?"":Array.isArray(g)?g.map(l).join(", "):typeof g=="object"?l(g):String(g)}const p=we(()=>t.refreshResult.body_changed&&t.refreshResult.body_diff?$r(t.refreshResult.body_diff.old,t.refreshResult.body_diff.new):null);var R=cn(),c=S(R);{var x=g=>{var D=nn();Ue(D,21,()=>t.refreshResult.diffs,Be,(pe,ge)=>{const ee=we(()=>t.properties.find(U=>U.key===e(ge).field));var ke=rn(),oe=S(ke),W=S(oe);{var me=U=>{wt(U,{size:14})},te=U=>{ht(U,{size:14})},$=U=>{xt(U,{size:14})},I=U=>{an(U,{size:14})},n=U=>{kt(U,{size:14})};ie(W,U=>{e(ee)?.type==="date"?U(me):e(ee)?.type==="status"?U(te,1):e(ee)?.type==="wikilink"?U($,2):e(ee)?.type==="badge"?U(I,3):U(n,!1)})}b(oe);var a=q(oe,2),s=S(a,!0);b(a);var h=q(a,2),f=S(h),F=S(f),ae=S(F,!0);b(F),b(f);var be=q(f,2),fe=S(be),H=S(fe,!0);b(fe),b(be),b(h),b(ke),ce((U,j)=>{_e(s,e(ge).field),_e(ae,U),_e(H,j)},[()=>u(e(ge).old_value),()=>u(e(ge).new_value)]),d(pe,ke)}),b(D),d(g,D)};ie(c,g=>{t.refreshResult.diffs.length>0&&g(x)})}var A=q(c,2),v=S(A);{var P=g=>{var D=Te(),pe=de(D);Ue(pe,17,()=>e(p),Be,(ge,ee)=>{var ke=Te(),oe=de(ke);{var W=$=>{var I=sn(),n=S(I,!0);b(I),ce(()=>_e(n,e(ee).value)),d($,I)},me=$=>{var I=on(),n=S(I,!0);b(I),ce(()=>_e(n,e(ee).value)),d($,I)},te=$=>{var I=ln(),n=S(I,!0);b(I),ce(()=>_e(n,e(ee).value)),d($,I)};ie(oe,$=>{e(ee).added?$(W):e(ee).removed?$(me,1):$(te,!1)})}d(ge,ke)}),d(g,D)},O=g=>{var D=un(),pe=S(D,!0);b(D),ce(()=>_e(pe,t.bodyContent)),d(g,D)};ie(v,g=>{e(p)?g(P):g(O,!1)})}b(A),b(R),d(Y,R),Ye()}var fn=M("<!> ",1),vn=M('<span class="diff-action-title svelte-udj3er">Changes from source</span> <div class="diff-action-buttons svelte-udj3er"><!> <!></div>',1),hn=M('<span class="bc-sep svelte-udj3er">/</span>'),pn=M("<!><span> </span>",1),_n=M('<span class="status-text saving svelte-udj3er">Saving...</span>'),mn=M('<span class="status-text error svelte-udj3er"> </span>'),gn=M("<!> ",1),yn=M('<div class="breadcrumb-path svelte-udj3er"></div> <div class="editor-actions svelte-udj3er"><!> <!> <!></div>',1),wn=M('<div class="refresh-panel svelte-udj3er"><div class="refresh-uptodate svelte-udj3er">Entity is up to date with source.</div></div>'),bn=M('<div class="document-well svelte-udj3er"><!></div>'),kn=M('<div><div class="document-well svelte-udj3er"><!></div> <!> <div class="document-well svelte-udj3er"><!></div></div>'),xn=M("<!> <!>",1),Cn=M("<!> <!>",1),En=M("<!> <div><!></div> <!> <!> <!> <!>",1);function es(Y,t){He(t,!0);const l=()=>sa(la,"$page",u),[u,p]=ia(),R=we(()=>t.data.type==="dataset"||t.data.entity.document?.frontmatter?.entity_type==="dataset"),c=we(()=>dt.getAppForEntityType(t.data.entity.document?.frontmatter?.entity_type??t.data.type)),x=we(()=>()=>{const o=t.data.entity.path;if(o){const k=o.lastIndexOf(`/${t.data.repo}/`);if(k>=0)return o.substring(k+1).split("/")}return[t.data.repo,t.data.id,"main.md"]});let A=Se(""),v=Se(lt({})),P=Se(0);const O=we(()=>Hr(e(v))),g=new Set(["name","date"]);let D=Se(null);st(()=>{if(l().url.searchParams.has("new")){w(D,"name");const o=new URL(l().url);o.searchParams.delete("new"),history.replaceState({},"",o.pathname)}else w(D,null)});const pe=we(()=>!!t.data.entity.data?.source_ref);let ge=Se(!1),ee=Se(null),ke=Se(null);async function oe(){if(!e(ge)){w(ge,!0),w(ee,null),w(ke,null);try{const{result:o}=await ga(t.data.repo,t.data.type,t.data.id);w(ee,o,!0)}catch(o){w(ke,o.message||"Refresh failed",!0)}finally{w(ge,!1)}}}let W=Se(!1);async function me(){if(!e(W)){w(W,!0);try{await ma(t.data.repo,t.data.type,t.data.id),w(ee,null),await oa()}catch(o){w(ke,o.message||"Apply changes failed",!0)}finally{w(W,!1)}}}let te=null,$=Se(""),I=!1,n=Se(lt([]));function a(o){s(),Ne(async()=>{const{createCollabSession:k}=await import("../chunks/DFyq2JCT.js");return{createCollabSession:k}},__vite__mapDeps([8,9,10,11,12,13,14,15,16,17,18]),import.meta.url).then(({createCollabSession:k})=>{const N=getComputedStyle(document.documentElement).getPropertyValue("--color-accent").trim()||"#e05050",L=k(o,{name:jt.user?.displayName??"Anonymous",color:N,colorLight:N+"33"});L.ytext.observe(()=>{const K=L.ytext.toString();K!==e(A)&&(I=!0,w(A,K,!0),requestAnimationFrame(()=>{I=!1}))});const le=L.ydoc.clientID;function ue(){const K=[];L.awareness.getStates().forEach((he,J)=>{if(J===le)return;const ne=he.cell;if(ne==null||ne.row==null||ne.col==null)return;const{name:X="Anonymous",color:G="#e05050"}=he.user||{};K.push({row:ne.row,col:ne.col,name:X,color:G})}),w(n,K,!0)}L.awareness.on("change",ue),te=L,w($,o,!0)})}function s(){te&&(te.destroy(),te=null,w($,""),w(n,[],!0))}Wt(()=>s());let h=Se(""),f=Se(0);st(()=>{const o=`${t.data.repo}/${t.data.type}/${t.data.id}`,k=ba.mutationCount;if(o!==e(h)||k!==e(f)){e(h)&&o!==e(h)&&Ke.flush(),w(h,o),w(f,k,!0);const N=t.data.entity.document?.content??"";w(A,N.trim()===""?"":N,!0),w(v,{...t.data.entity.document?.frontmatter??t.data.entity.data??{}},!0),ta(P),Ke.reset();const L=`${t.data.repo}/${t.data.type}/${t.data.id}`;e(R)&&L!==e($)?a(L):e(R)||s()}}),st(()=>{const o=t.data.repo,k=t.data.type,N=t.data.id;aa(()=>{At.select(o,k,N),At.showEntity()})});function F(o){if(!I){if(w(A,o,!0),te?.synced){const k=te.ytext,N=k.toString();o!==N&&te.ydoc.transact(()=>{k.delete(0,k.length),k.insert(0,o)})}Ke.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{content:o})}}function ae(o,k){w(v,{...e(v),[o]:k},!0),Ke.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:e(v)})}function be(o){const{[o]:k,...N}=e(v);w(v,N,!0),Ke.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:e(v)})}function fe(o,k){w(v,{...e(v),[o]:k},!0),Ke.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:e(v)})}function H(o,k){Ke.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:e(v)})}let U=Se(null);function j(o){o!==t.data.type&&w(U,o,!0)}async function ye(){const o=e(U);if(w(U,null),!!o){Ke.reset();try{await Gt(t.data.repo,t.data.type,t.data.id,o),await dt.refreshEntities(t.data.repo),await pt(`/${t.data.repo}/${o}/${t.data.id}`,{invalidateAll:!0})}catch(k){console.error("Failed to change entity type:",k)}}}function Z(o){for(const k of dt.repos){const N=k.entities.find(L=>L.id===o);if(N){pt(`/${k.name}/${N.entityType}/${N.id}`);return}}wa.showToast(`"${o}" is in a collection you don't have access to`)}st(()=>(It.enter(t.data.repo,t.data.type,t.data.id),()=>It.leave()));const se=we(()=>e(ee)!==null&&(e(ee).diffs.length>0||e(ee).body_changed));function r(o){(o.metaKey||o.ctrlKey)&&o.key==="s"&&(o.preventDefault(),Ke.flush()),o.key==="Escape"&&!(o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)&&(Ke.flush(),At.deselect(),pt("/"))}var i=En();$e("keydown",ra,r);var y=de(i);ua(y,{activeView:"entity"});var z=q(y,2);let ve;var C=S(z);{var m=o=>{var k=vn(),N=q(de(k),2),L=S(N);it(L,{variant:"outline",size:"default",onclick:()=>w(ee,null),get disabled(){return e(W)},children:(ue,K)=>{We();var he=vt("Dismiss");d(ue,he)},$$slots:{default:!0}});var le=q(L,2);it(le,{variant:"accent",size:"default",onclick:me,get disabled(){return e(W)},children:(ue,K)=>{var he=fn(),J=de(he);{var ne=G=>{Nt(G,{class:"size-3 animate-spin",style:"display:inline;vertical-align:middle;margin-right:4px"})};ie(J,G=>{e(W)&&G(ne)})}var X=q(J,1,!0);ce(()=>_e(X,e(W)?"Applying...":"Apply changes")),d(ue,he)},$$slots:{default:!0}}),b(N),d(o,k)},T=o=>{var k=yn(),N=de(k);Ue(N,21,()=>e(x)(),Be,(G,Ee,Ae)=>{var Ce=pn(),Re=de(Ce);{var Ie=Le=>{var Ze=hn();d(Le,Ze)};ie(Re,Le=>{Ae>0&&Le(Ie)})}var je=q(Re),ze=S(je,!0);b(je),ce(Le=>{ot(je,1,Le,"svelte-udj3er"),_e(ze,e(Ee))},[()=>na(Ae===e(x)().length-1?"bc-current":"bc-segment")]),d(G,Ce)}),b(N);var L=q(N,2),le=S(L);{var ue=G=>{var Ee=_n();d(G,Ee)},K=G=>{var Ee=mn(),Ae=S(Ee,!0);b(Ee),ce(()=>_e(Ae,Ke.error)),d(G,Ee)};ie(le,G=>{Ke.saving?G(ue):Ke.error&&G(K,1)})}var he=q(le,2);{var J=G=>{it(G,{variant:"outline",size:"sm",class:"refresh-btn",onclick:oe,get disabled(){return e(ge)},children:(Ee,Ae)=>{var Ce=gn(),Re=de(Ce);{var Ie=ze=>{Nt(ze,{class:"size-3 animate-spin",style:"display:inline;vertical-align:middle;margin-right:4px"})};ie(Re,ze=>{e(ge)&&ze(Ie)})}var je=q(Re,1,!0);ce(()=>_e(je,e(ge)?"Refreshing...":"Refresh from source")),d(Ee,Ce)},$$slots:{default:!0}})};ie(he,G=>{e(pe)&&jt.user?.role==="admin"&&G(J)})}var ne=q(he,2);{var X=G=>{it(G,{variant:"link",size:"sm",class:"open-app",get href(){return`/${t.data.repo??""}/${t.data.type??""}/${t.data.id??""}/edit`},children:(Ee,Ae)=>{We();var Ce=vt();ce(()=>_e(Ce,`Open in ${e(c).name??""} →`)),d(Ee,Ce)},$$slots:{default:!0}})};ie(ne,G=>{e(c)&&G(X)})}b(L),d(o,k)};ie(C,o=>{e(se)?o(m):o(T,!1)})}b(z);var _=q(z,2);{var re=o=>{var k=wn();d(o,k)};ie(_,o=>{e(ee)&&!e(se)&&o(re)})}var Q=q(_,2);{var E=o=>{dn(o,{get properties(){return e(O)},get refreshResult(){return e(ee)},get bodyContent(){return e(A)}})},V=o=>{var k=kn();let N;var L=S(k),le=S(L);kr(le,{get properties(){return e(O)},editable:!0,get autofocusKey(){return e(D)},get protectedKeys(){return g},onedit:ae,onremove:be,onadd:fe,ontypechange:H,onentitytypechange:j,onfocuseditor:()=>{requestAnimationFrame(()=>requestAnimationFrame(()=>{const X=document.querySelector(".cm-content");if(X){X.focus();const G=window.getSelection();G&&X.firstChild?G.collapse(X.firstChild,0):G&&G.collapse(X,0)}}))}}),b(L);var ue=q(L,2);{var K=X=>{qr(X,{get content(){return e(A)},onchange:F,onsave:()=>Ke.flush(),oncellselect:(G,Ee)=>{te?.awareness.setLocalStateField("cell",{row:G,col:Ee})},get remoteCursors(){return e(n)}})},he=X=>{var G=bn(),Ee=S(G);{let Ae=we(()=>`${t.data.repo}/${t.data.type}/${t.data.id}`);Tr(Ee,{get content(){return e(A)},readonly:!1,onchange:F,onsave:()=>Ke.flush(),onwikilinkclick:Z,get resetKey(){return e(P)},get cursorDocName(){return e(Ae)}})}b(G),d(X,G)};ie(ue,X=>{e(R)?X(K):X(he,!1)})}var J=q(ue,2),ne=S(J);Sr(ne,{get entityId(){return t.data.id},get entityRepo(){return t.data.repo}}),b(J),b(k),ce(()=>N=ot(k,1,"document-scroll svelte-udj3er",null,N,{"dataset-view":e(R)})),d(o,k)};ie(Q,o=>{e(se)?o(E):o(V,!1)})}var B=q(Q,2);{let o=we(()=>!!e(ke));De(B,()=>Ra,(k,N)=>{N(k,{get open(){return e(o)},onOpenChange:L=>{L||w(ke,null)},children:(L,le)=>{var ue=Te(),K=de(ue);De(K,()=>ka,(he,J)=>{J(he,{children:(ne,X)=>{var G=Cn(),Ee=de(G);De(Ee,()=>xa,(Ce,Re)=>{Re(Ce,{children:(Ie,je)=>{var ze=xn(),Le=de(ze);De(Le,()=>Ca,(Je,Ge)=>{Ge(Je,{children:(Qe,Fe)=>{We();var Xe=vt("Refresh failed");d(Qe,Xe)},$$slots:{default:!0}})});var Ze=q(Le,2);De(Ze,()=>Ea,(Je,Ge)=>{Ge(Je,{children:(Qe,Fe)=>{We();var Xe=vt();ce(()=>_e(Xe,e(ke))),d(Qe,Xe)},$$slots:{default:!0}})}),d(Ie,ze)},$$slots:{default:!0}})});var Ae=q(Ee,2);De(Ae,()=>Sa,(Ce,Re)=>{Re(Ce,{children:(Ie,je)=>{var ze=Te(),Le=de(ze);De(Le,()=>Aa,(Ze,Je)=>{Je(Ze,{children:(Ge,Qe)=>{We();var Fe=vt("OK");d(Ge,Fe)},$$slots:{default:!0}})}),d(Ie,ze)},$$slots:{default:!0}})}),d(ne,G)},$$slots:{default:!0}})}),d(L,ue)},$$slots:{default:!0}})})}var xe=q(B,2);{let o=we(()=>e(U)!==null),k=we(()=>`Change this entity from ${nt(t.data.type)} to ${nt(e(U)??"")}? Fields specific to ${nt(t.data.type)} will be removed.`);Pt(xe,{get open(){return e(o)},title:"Change entity type",get message(){return e(k)},confirmLabel:"Change type",onconfirm:ye,oncancel:()=>{w(U,null)}})}ce(()=>ve=ot(z,1,"editor-bar svelte-udj3er",null,ve,{"editor-bar-diff":e(se)})),d(Y,i),Ye(),p()}export{es as component,$n as universal};
@@ -1,4 +1,4 @@
1
- import{h as lt,w as ut}from"../chunks/C88BjBh_.js";import{a as S,s as Z,b as M,c as ft}from"../chunks/S3zzfNyy.js";import{p as $,a3 as tt,aE as mt,c as I,aa as T,g as m,r as O,t as j,b as et,e as Q,s as k,aG as ht,a0 as vt,ab as yt}from"../chunks/DwMoyB6r.js";import{b as X,i as F}from"../chunks/DVe5EzgB.js";import{s as Y}from"../chunks/koVwyjnn.js";import{g as pt}from"../chunks/BqtdCvqG.js";import{n as E}from"../chunks/DiQyiOFg.js";const bt=async({params:b})=>{const{repo:o,type:l,id:s}=b,u=await lt(o,l,s);return{repo:o,type:l,id:s,entity:u}},Tt=Object.freeze(Object.defineProperty({__proto__:null,load:bt},Symbol.toStringTag,{value:"Module"}));var gt=M('<div class="loading-indicator svelte-1fltv0h">Loading editor...</div>'),wt=M('<div class="error-indicator svelte-1fltv0h"> </div>'),_t=M('<div><div class="header-mount svelte-1fltv0h"></div> <!> <!> <div></div></div>');function kt(b,o){$(o,!0);let l,s,u=Q(!0),h=Q(null),y=[],d=[],v=[],g={},x=[],p=null,w=null,_=0;function q(){const e=window.StudioChrome,i=document.querySelector(".sg-chrome-overflow-menu");if(i&&(i.innerHTML=""),e&&(e.clearViewAction(),e.clearSaveHandlers()),w&&(w.el.removeEventListener("click",w.handler,!0),w=null),e){e.unmountHeader();for(const{event:r,fn:c}of v)e.off(r,c)}v=[];for(const r of y)r.remove();y=[];for(const r of d)r.remove();d=[],p&&(p.remove(),p=null);for(const[r,c]of Object.entries(g))c===void 0?document.body.removeAttribute(r):document.body.setAttribute(r,c);g={};for(const r of x)document.body.classList.remove(r);x=[],s&&(s.innerHTML="")}async function B(){const e=++_;k(u,!0),k(h,null),q();try{const i=`${o.appMountPath}/edit/${encodeURIComponent(o.repo)}/${encodeURIComponent(o.entityId)}`,r=await fetch(i);if(!r.ok)throw new Error(`Failed to load editor: ${r.status}`);if(e!==_)return;const c=await r.text(),H=new DOMParser().parseFromString(c,"text/html"),at=H.querySelectorAll('link[rel="stylesheet"]');for(const t of at){if(t.href.includes("chrome.css"))continue;let n=t.getAttribute("href")||"";n&&!n.startsWith("http")&&!n.startsWith("/")&&(n=`${o.appMountPath}/${n}`);const a=document.createElement("link");a.rel="stylesheet",a.href=n,document.head.appendChild(a),y.push(a)}const it=H.querySelectorAll("head style");for(const t of it){const n=document.createElement("style");n.textContent=t.textContent,document.head.appendChild(n),y.push(n)}p=document.createElement("style"),p.textContent=`
1
+ import{h as lt,w as ut}from"../chunks/C88BjBh_.js";import{a as S,s as Z,b as M,c as ft}from"../chunks/S3zzfNyy.js";import{p as $,a3 as tt,aE as mt,c as I,aa as T,g as m,r as O,t as j,b as et,e as Q,s as k,aG as ht,a0 as vt,ab as yt}from"../chunks/DwMoyB6r.js";import{b as X,i as F}from"../chunks/DVe5EzgB.js";import{s as Y}from"../chunks/koVwyjnn.js";import{g as pt}from"../chunks/BkZMqbNG.js";import{n as E}from"../chunks/DiQyiOFg.js";const bt=async({params:b})=>{const{repo:o,type:l,id:s}=b,u=await lt(o,l,s);return{repo:o,type:l,id:s,entity:u}},Tt=Object.freeze(Object.defineProperty({__proto__:null,load:bt},Symbol.toStringTag,{value:"Module"}));var gt=M('<div class="loading-indicator svelte-1fltv0h">Loading editor...</div>'),wt=M('<div class="error-indicator svelte-1fltv0h"> </div>'),_t=M('<div><div class="header-mount svelte-1fltv0h"></div> <!> <!> <div></div></div>');function kt(b,o){$(o,!0);let l,s,u=Q(!0),h=Q(null),y=[],d=[],v=[],g={},x=[],p=null,w=null,_=0;function q(){const e=window.StudioChrome,i=document.querySelector(".sg-chrome-overflow-menu");if(i&&(i.innerHTML=""),e&&(e.clearViewAction(),e.clearSaveHandlers()),w&&(w.el.removeEventListener("click",w.handler,!0),w=null),e){e.unmountHeader();for(const{event:r,fn:c}of v)e.off(r,c)}v=[];for(const r of y)r.remove();y=[];for(const r of d)r.remove();d=[],p&&(p.remove(),p=null);for(const[r,c]of Object.entries(g))c===void 0?document.body.removeAttribute(r):document.body.setAttribute(r,c);g={};for(const r of x)document.body.classList.remove(r);x=[],s&&(s.innerHTML="")}async function B(){const e=++_;k(u,!0),k(h,null),q();try{const i=`${o.appMountPath}/edit/${encodeURIComponent(o.repo)}/${encodeURIComponent(o.entityId)}`,r=await fetch(i);if(!r.ok)throw new Error(`Failed to load editor: ${r.status}`);if(e!==_)return;const c=await r.text(),H=new DOMParser().parseFromString(c,"text/html"),at=H.querySelectorAll('link[rel="stylesheet"]');for(const t of at){if(t.href.includes("chrome.css"))continue;let n=t.getAttribute("href")||"";n&&!n.startsWith("http")&&!n.startsWith("/")&&(n=`${o.appMountPath}/${n}`);const a=document.createElement("link");a.rel="stylesheet",a.href=n,document.head.appendChild(a),y.push(a)}const it=H.querySelectorAll("head style");for(const t of it){const n=document.createElement("style");n.textContent=t.textContent,document.head.appendChild(n),y.push(n)}p=document.createElement("style"),p.textContent=`
2
2
  body.sg-chrome-active { height: auto !important; }
3
3
  body.sg-chrome-active > :not(.sg-chrome-header):not(.sg-chrome-footer) { overflow: visible !important; }
4
4
  `,document.head.appendChild(p);const C=H.body;for(const t of Array.from(C.attributes))t.name.startsWith("data-")&&(g[t.name]=document.body.getAttribute(t.name)??void 0,document.body.setAttribute(t.name,t.value));const st=Array.from(C.classList);for(const t of st)t!=="sg-chrome-active"&&(document.body.classList.contains(t)||(document.body.classList.add(t),x.push(t)));const ct=C.querySelectorAll("script"),G=[],K=[];for(const t of ct){if(t.src){const n=t.getAttribute("src")||"";if(n.includes("chrome.js"))continue;let a=n;a&&!a.startsWith("http")&&!a.startsWith("/")&&(a=`${o.appMountPath}/${a}`),G.push(a)}else t.textContent&&K.push(t.textContent);t.remove()}s.innerHTML=C.innerHTML;const f=window.StudioChrome;if(f){f.updateBreadcrumb(o.repo,o.entityId),f.mountHeader(l);const t=document.body.dataset.sgViewUrl,n=document.body.dataset.sgViewLabel;t?f.setViewAction(t,n):f.clearViewAction();const a=l.querySelector(".sg-chrome-back");if(a){const N=J=>{J.preventDefault(),J.stopPropagation(),pt(`/${o.repo}/${o.entityType}/${o.entityId}`)};a.addEventListener("click",N,!0),w={el:a,handler:N}}}let L=null;f&&(L=f.on,f.on=function(t,n){v.push({event:t,fn:n}),L.call(this,t,n)});const dt=`?_v=${Date.now()}`;for(const t of G){if(e!==_)return;await ot(t+dt)}for(const t of K){if(e!==_)return;const n=document.createElement("script");n.textContent=t,document.body.appendChild(n),d.push(n)}f&&L&&(f.on=L),k(u,!1)}catch(i){if(e!==_)return;k(h,i.message||"Failed to load editor",!0),k(u,!1)}}function ot(e){return new Promise((i,r)=>{const c=document.createElement("script");c.src=e,c.onload=()=>i(),c.onerror=()=>r(new Error(`Failed to load script: ${e}`)),document.body.appendChild(c),d.push(c)})}let P="";tt(()=>{const e=`${o.appMountPath}|${o.repo}|${o.entityId}`;P&&P!==e&&s&&B(),P=e}),mt(()=>(B(),q));var A=_t();let V;var W=I(A);X(W,e=>l=e,()=>l);var D=T(W,2);{var nt=e=>{var i=gt();S(e,i)};F(D,e=>{m(u)&&e(nt)})}var U=T(D,2);{var rt=e=>{var i=wt(),r=I(i,!0);O(i),j(()=>Z(r,m(h))),S(e,i)};F(U,e=>{m(h)&&e(rt)})}var R=T(U,2);let z;X(R,e=>s=e,()=>s),O(A),j(()=>{V=Y(A,1,"editor-frame svelte-1fltv0h",null,V,{loading:m(u)}),z=Y(R,1,"editor-container svelte-1fltv0h",null,z,{hidden:m(u)||!!m(h)})}),S(b,A),et()}var St=M('<div class="no-editor svelte-1406f3k"> </div>');function It(b,o){$(o,!0);const l=yt(()=>ut.getAppForEntityType(o.data.type));tt(()=>{E.select(o.data.repo,o.data.type,o.data.id),E.showEntity(),E.hideSidebar=!0}),ht(()=>{E.hideSidebar=!1});var s=ft(),u=vt(s);{var h=d=>{kt(d,{get appMountPath(){return m(l).mountPath},get repo(){return o.data.repo},get entityId(){return o.data.id},get entityType(){return o.data.type}})},y=d=>{var v=St(),g=I(v);O(v),j(()=>Z(g,`No app editor available for entity type "${o.data.type??""}"`)),S(d,v)};F(u,d=>{m(l)?d(h):d(y,!1)})}S(b,s),et()}export{It as component,Tt as universal};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js"])))=>i.map(i=>d[i]);
2
- import{d as Ae,g as Tt,a as ht,b as Dt,s as It,e as le,f as $t,c as Qe}from"../chunks/S3zzfNyy.js";import{p as Bt,aC as Je,a3 as St,g,ab as nt,aE as Ne,aG as qe,t as yt,b as Ft,c as at,s as q,e as pt,r as it,aa as gt,l as Ut,d as Pt,a as ze,n as Se,m as Zt,a0 as ke,bu as $e}from"../chunks/DwMoyB6r.js";import{V as tn}from"../chunks/CVhaIh-p.js";import{_ as en}from"../chunks/PPVm8Dsz.js";import{e as ce,i as fe}from"../chunks/BnuoIjma.js";import{s as nn}from"../chunks/koVwyjnn.js";import{c as kt,a as Pe}from"../chunks/BYqzpKy3.js";import{b as Ee,i as Kt}from"../chunks/DVe5EzgB.js";import{p as mt,l as Qt}from"../chunks/DLfZVgnp.js";import{g as rn}from"../chunks/BqtdCvqG.js";import{e as Mt}from"../chunks/CdeYcEuU.js";import{B as on}from"../chunks/ClyoIkBa.js";import{i as Re}from"../chunks/CkRzikAP.js";import{n as se}from"../chunks/DiQyiOFg.js";import{w as Wt}from"../chunks/C88BjBh_.js";import{chatStore as an}from"../chunks/CBj5WBAa.js";function sn(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Le(this.cover(e,n),e,n,t)}function Le(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,a=t._root,c={data:i},o=t._x0,u=t._y0,l=t._x1,f=t._y1,C,d,v,b,p,s,h,x;if(!a)return t._root=c,t;for(;a.length;)if((p=e>=(C=(o+l)/2))?o=C:l=C,(s=n>=(d=(u+f)/2))?u=d:f=d,r=a,!(a=a[h=s<<1|p]))return r[h]=c,t;if(v=+t._x.call(null,a.data),b=+t._y.call(null,a.data),e===v&&n===b)return c.next=a,r?r[h]=c:t._root=c,t;do r=r?r[h]=new Array(4):t._root=new Array(4),(p=e>=(C=(o+l)/2))?o=C:l=C,(s=n>=(d=(u+f)/2))?u=d:f=d;while((h=s<<1|p)===(x=(b>=d)<<1|v>=C));return r[x]=a,r[h]=c,t}function ln(t){var e,n,i=t.length,r,a,c=new Array(i),o=new Array(i),u=1/0,l=1/0,f=-1/0,C=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(a=+this._y.call(null,e))||(c[n]=r,o[n]=a,r<u&&(u=r),r>f&&(f=r),a<l&&(l=a),a>C&&(C=a));if(u>f||l>C)return this;for(this.cover(u,l).cover(f,C),n=0;n<i;++n)Le(this,c[n],o[n],t[n]);return this}function cn(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,a=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,a=(i=Math.floor(e))+1;else{for(var c=r-n||1,o=this._root,u,l;n>t||t>=r||i>e||e>=a;)switch(l=(e<i)<<1|t<n,u=new Array(4),u[l]=o,o=u,c*=2,l){case 0:r=n+c,a=i+c;break;case 1:n=r-c,a=i+c;break;case 2:r=n+c,i=a-c;break;case 3:n=r-c,i=a-c;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=i,this._x1=r,this._y1=a,this}function fn(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function un(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 st(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function hn(t,e,n){var i,r=this._x0,a=this._y0,c,o,u,l,f=this._x1,C=this._y1,d=[],v=this._root,b,p;for(v&&d.push(new st(v,r,a,f,C)),n==null?n=1/0:(r=t-n,a=e-n,f=t+n,C=e+n,n*=n);b=d.pop();)if(!(!(v=b.node)||(c=b.x0)>f||(o=b.y0)>C||(u=b.x1)<r||(l=b.y1)<a))if(v.length){var s=(c+u)/2,h=(o+l)/2;d.push(new st(v[3],s,h,u,l),new st(v[2],c,h,s,l),new st(v[1],s,o,u,h),new st(v[0],c,o,s,h)),(p=(e>=h)<<1|t>=s)&&(b=d[d.length-1],d[d.length-1]=d[d.length-1-p],d[d.length-1-p]=b)}else{var x=t-+this._x.call(null,v.data),D=e-+this._y.call(null,v.data),m=x*x+D*D;if(m<n){var N=Math.sqrt(n=m);r=t-N,a=e-N,f=t+N,C=e+N,i=v.data}}return i}function dn(t){if(isNaN(f=+this._x.call(null,t))||isNaN(C=+this._y.call(null,t)))return this;var e,n=this._root,i,r,a,c=this._x0,o=this._y0,u=this._x1,l=this._y1,f,C,d,v,b,p,s,h;if(!n)return this;if(n.length)for(;;){if((b=f>=(d=(c+u)/2))?c=d:u=d,(p=C>=(v=(o+l)/2))?o=v:l=v,e=n,!(n=n[s=p<<1|b]))return this;if(!n.length)break;(e[s+1&3]||e[s+2&3]||e[s+3&3])&&(i=e,h=s)}for(;n.data!==t;)if(r=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,r?(a?r.next=a:delete r.next,this):e?(a?e[s]=a:delete e[s],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(i?i[h]=n:this._root=n),this):(this._root=a,this)}function gn(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function vn(){return this._root}function pn(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function yn(t){var e=[],n,i=this._root,r,a,c,o,u;for(i&&e.push(new st(i,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(i=n.node,a=n.x0,c=n.y0,o=n.x1,u=n.y1)&&i.length){var l=(a+o)/2,f=(c+u)/2;(r=i[3])&&e.push(new st(r,l,f,o,u)),(r=i[2])&&e.push(new st(r,a,f,l,u)),(r=i[1])&&e.push(new st(r,l,c,o,f)),(r=i[0])&&e.push(new st(r,a,c,l,f))}return this}function mn(t){var e=[],n=[],i;for(this._root&&e.push(new st(this._root,this._x0,this._y0,this._x1,this._y1));i=e.pop();){var r=i.node;if(r.length){var a,c=i.x0,o=i.y0,u=i.x1,l=i.y1,f=(c+u)/2,C=(o+l)/2;(a=r[0])&&e.push(new st(a,c,o,f,C)),(a=r[1])&&e.push(new st(a,f,o,u,C)),(a=r[2])&&e.push(new st(a,c,C,f,l)),(a=r[3])&&e.push(new st(a,f,C,u,l))}n.push(i)}for(;i=n.pop();)t(i.node,i.x0,i.y0,i.x1,i.y1);return this}function xn(t){return t[0]}function wn(t){return arguments.length?(this._x=t,this):this._x}function _n(t){return t[1]}function bn(t){return arguments.length?(this._y=t,this):this._y}function de(t,e,n){var i=new ge(e??xn,n??_n,NaN,NaN,NaN,NaN);return t==null?i:i.addAll(t)}function ge(t,e,n,i,r,a){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=a,this._root=void 0}function ye(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ct=de.prototype=ge.prototype;ct.copy=function(){var t=new ge(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,i;if(!e)return t;if(!e.length)return t._root=ye(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var r=0;r<4;++r)(i=e.source[r])&&(i.length?n.push({source:i,target:e.target[r]=new Array(4)}):e.target[r]=ye(i));return t};ct.add=sn;ct.addAll=ln;ct.cover=cn;ct.data=fn;ct.extent=un;ct.find=hn;ct.remove=dn;ct.removeAll=gn;ct.root=vn;ct.size=pn;ct.visit=yn;ct.visitAfter=mn;ct.x=wn;ct.y=bn;function lt(t){return function(){return t}}function xt(t){return(t()-.5)*1e-6}function Mn(t){return t.x+t.vx}function Tn(t){return t.y+t.vy}function me(t){var e,n,i,r=1,a=1;typeof t!="function"&&(t=lt(t==null?1:+t));function c(){for(var l,f=e.length,C,d,v,b,p,s,h=0;h<a;++h)for(C=de(e,Mn,Tn).visitAfter(o),l=0;l<f;++l)d=e[l],p=n[d.index],s=p*p,v=d.x+d.vx,b=d.y+d.vy,C.visit(x);function x(D,m,N,S,W){var F=D.data,$=D.r,H=p+$;if(F){if(F.index>d.index){var ft=v-F.x-F.vx,Q=b-F.y-F.vy,ot=ft*ft+Q*Q;ot<H*H&&(ft===0&&(ft=xt(i),ot+=ft*ft),Q===0&&(Q=xt(i),ot+=Q*Q),ot=(H-(ot=Math.sqrt(ot)))/ot*r,d.vx+=(ft*=ot)*(H=($*=$)/(s+$)),d.vy+=(Q*=ot)*H,F.vx-=ft*(H=1-H),F.vy-=Q*H)}return}return m>v+H||S<v-H||N>b+H||W<b-H}}function o(l){if(l.data)return l.r=n[l.data.index];for(var f=l.r=0;f<4;++f)l[f]&&l[f].r>l.r&&(l.r=l[f].r)}function u(){if(e){var l,f=e.length,C;for(n=new Array(f),l=0;l<f;++l)C=e[l],n[C.index]=+t(C,l,e)}}return c.initialize=function(l,f){e=l,i=f,u()},c.iterations=function(l){return arguments.length?(a=+l,c):a},c.strength=function(l){return arguments.length?(r=+l,c):r},c.radius=function(l){return arguments.length?(t=typeof l=="function"?l:lt(+l),u(),c):t},c}function In(t){return t.index}function xe(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function we(t){var e=In,n=C,i,r=lt(30),a,c,o,u,l,f=1;t==null&&(t=[]);function C(s){return 1/Math.min(o[s.source.index],o[s.target.index])}function d(s){for(var h=0,x=t.length;h<f;++h)for(var D=0,m,N,S,W,F,$,H;D<x;++D)m=t[D],N=m.source,S=m.target,W=S.x+S.vx-N.x-N.vx||xt(l),F=S.y+S.vy-N.y-N.vy||xt(l),$=Math.sqrt(W*W+F*F),$=($-a[D])/$*s*i[D],W*=$,F*=$,S.vx-=W*(H=u[D]),S.vy-=F*H,N.vx+=W*(H=1-H),N.vy+=F*H}function v(){if(c){var s,h=c.length,x=t.length,D=new Map(c.map((N,S)=>[e(N,S,c),N])),m;for(s=0,o=new Array(h);s<x;++s)m=t[s],m.index=s,typeof m.source!="object"&&(m.source=xe(D,m.source)),typeof m.target!="object"&&(m.target=xe(D,m.target)),o[m.source.index]=(o[m.source.index]||0)+1,o[m.target.index]=(o[m.target.index]||0)+1;for(s=0,u=new Array(x);s<x;++s)m=t[s],u[s]=o[m.source.index]/(o[m.source.index]+o[m.target.index]);i=new Array(x),b(),a=new Array(x),p()}}function b(){if(c)for(var s=0,h=t.length;s<h;++s)i[s]=+n(t[s],s,t)}function p(){if(c)for(var s=0,h=t.length;s<h;++s)a[s]=+r(t[s],s,t)}return d.initialize=function(s,h){c=s,l=h,v()},d.links=function(s){return arguments.length?(t=s,v(),d):t},d.id=function(s){return arguments.length?(e=s,d):e},d.iterations=function(s){return arguments.length?(f=+s,d):f},d.strength=function(s){return arguments.length?(n=typeof s=="function"?s:lt(+s),b(),d):n},d.distance=function(s){return arguments.length?(r=typeof s=="function"?s:lt(+s),p(),d):r},d}var Cn={value:()=>{}};function Ve(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new jt(n)}function jt(t){this._=t}function Dn(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}jt.prototype=Ve.prototype={constructor:jt,on:function(t,e){var n=this._,i=Dn(t+"",n),r,a=-1,c=i.length;if(arguments.length<2){for(;++a<c;)if((r=(t=i[a]).type)&&(r=An(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<c;)if(r=(t=i[a]).type)n[r]=_e(n[r],t.name,e);else if(e==null)for(r in n)n[r]=_e(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new jt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,a;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],i=0,r=a.length;i<r;++i)a[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};function An(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function _e(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Cn,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Et=0,Lt=0,Rt=0,Xe=1e3,Jt,Vt,qt=0,Ct=0,te=0,Xt=typeof performance=="object"&&performance.now?performance:Date,Be=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Fe(){return Ct||(Be(Nn),Ct=Xt.now()+te)}function Nn(){Ct=0}function ue(){this._call=this._time=this._next=null}ue.prototype=Oe.prototype={constructor:ue,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Fe():+n)+(e==null?0:+e),!this._next&&Vt!==this&&(Vt?Vt._next=this:Jt=this,Vt=this),this._call=t,this._time=n,he()},stop:function(){this._call&&(this._call=null,this._time=1/0,he())}};function Oe(t,e,n){var i=new ue;return i.restart(t,e,n),i}function zn(){Fe(),++Et;for(var t=Jt,e;t;)(e=Ct-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Et}function be(){Ct=(qt=Xt.now())+te,Et=Lt=0;try{zn()}finally{Et=0,kn(),Ct=0}}function Sn(){var t=Xt.now(),e=t-qt;e>Xe&&(te-=e,qt=t)}function kn(){for(var t,e=Jt,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Jt=n);Vt=t,he(i)}function he(t){if(!Et){Lt&&(Lt=clearTimeout(Lt));var e=t-Ct;e>24?(t<1/0&&(Lt=setTimeout(be,t-Xt.now()-te)),Rt&&(Rt=clearInterval(Rt))):(Rt||(qt=Xt.now(),Rt=setInterval(Sn,Xe)),Et=1,Be(be))}}const Pn=1664525,En=1013904223,Me=4294967296;function Rn(){let t=1;return()=>(t=(Pn*t+En)%Me)/Me}function Ln(t){return t.x}function Vn(t){return t.y}var Xn=10,Bn=Math.PI*(3-Math.sqrt(5));function Te(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),a=0,c=.6,o=new Map,u=Oe(C),l=Ve("tick","end"),f=Rn();t==null&&(t=[]);function C(){d(),l.call("tick",e),n<i&&(u.stop(),l.call("end",e))}function d(p){var s,h=t.length,x;p===void 0&&(p=1);for(var D=0;D<p;++D)for(n+=(a-n)*r,o.forEach(function(m){m(n)}),s=0;s<h;++s)x=t[s],x.fx==null?x.x+=x.vx*=c:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=c:(x.y=x.fy,x.vy=0);return e}function v(){for(var p=0,s=t.length,h;p<s;++p){if(h=t[p],h.index=p,h.fx!=null&&(h.x=h.fx),h.fy!=null&&(h.y=h.fy),isNaN(h.x)||isNaN(h.y)){var x=Xn*Math.sqrt(.5+p),D=p*Bn;h.x=x*Math.cos(D),h.y=x*Math.sin(D)}(isNaN(h.vx)||isNaN(h.vy))&&(h.vx=h.vy=0)}}function b(p){return p.initialize&&p.initialize(t,f),p}return v(),e={tick:d,restart:function(){return u.restart(C),e},stop:function(){return u.stop(),e},nodes:function(p){return arguments.length?(t=p,v(),o.forEach(b),e):t},alpha:function(p){return arguments.length?(n=+p,e):n},alphaMin:function(p){return arguments.length?(i=+p,e):i},alphaDecay:function(p){return arguments.length?(r=+p,e):+r},alphaTarget:function(p){return arguments.length?(a=+p,e):a},velocityDecay:function(p){return arguments.length?(c=1-p,e):1-c},randomSource:function(p){return arguments.length?(f=p,o.forEach(b),e):f},force:function(p,s){return arguments.length>1?(s==null?o.delete(p):o.set(p,b(s)),e):o.get(p)},find:function(p,s,h){var x=0,D=t.length,m,N,S,W,F;for(h==null?h=1/0:h*=h,x=0;x<D;++x)W=t[x],m=p-W.x,N=s-W.y,S=m*m+N*N,S<h&&(F=W,h=S);return F},on:function(p,s){return arguments.length>1?(l.on(p,s),e):l.on(p)}}}function Ie(){var t,e,n,i,r=lt(-30),a,c=1,o=1/0,u=.81;function l(v){var b,p=t.length,s=de(t,Ln,Vn).visitAfter(C);for(i=v,b=0;b<p;++b)e=t[b],s.visit(d)}function f(){if(t){var v,b=t.length,p;for(a=new Array(b),v=0;v<b;++v)p=t[v],a[p.index]=+r(p,v,t)}}function C(v){var b=0,p,s,h=0,x,D,m;if(v.length){for(x=D=m=0;m<4;++m)(p=v[m])&&(s=Math.abs(p.value))&&(b+=p.value,h+=s,x+=s*p.x,D+=s*p.y);v.x=x/h,v.y=D/h}else{p=v,p.x=p.data.x,p.y=p.data.y;do b+=a[p.data.index];while(p=p.next)}v.value=b}function d(v,b,p,s){if(!v.value)return!0;var h=v.x-e.x,x=v.y-e.y,D=s-b,m=h*h+x*x;if(D*D/u<m)return m<o&&(h===0&&(h=xt(n),m+=h*h),x===0&&(x=xt(n),m+=x*x),m<c&&(m=Math.sqrt(c*m)),e.vx+=h*v.value*i/m,e.vy+=x*v.value*i/m),!0;if(v.length||m>=o)return;(v.data!==e||v.next)&&(h===0&&(h=xt(n),m+=h*h),x===0&&(x=xt(n),m+=x*x),m<c&&(m=Math.sqrt(c*m)));do v.data!==e&&(D=a[v.data.index]*i/m,e.vx+=h*D,e.vy+=x*D);while(v=v.next)}return l.initialize=function(v,b){t=v,n=b,f()},l.strength=function(v){return arguments.length?(r=typeof v=="function"?v:lt(+v),f(),l):r},l.distanceMin=function(v){return arguments.length?(c=v*v,l):Math.sqrt(c)},l.distanceMax=function(v){return arguments.length?(o=v*v,l):Math.sqrt(o)},l.theta=function(v){return arguments.length?(u=v*v,l):Math.sqrt(u)},l}function Ce(t){var e=lt(.1),n,i,r;typeof t!="function"&&(t=lt(t==null?0:+t));function a(o){for(var u=0,l=n.length,f;u<l;++u)f=n[u],f.vx+=(r[u]-f.x)*i[u]*o}function c(){if(n){var o,u=n.length;for(i=new Array(u),r=new Array(u),o=0;o<u;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return a.initialize=function(o){n=o,c()},a.strength=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),c(),a):e},a.x=function(o){return arguments.length?(t=typeof o=="function"?o:lt(+o),c(),a):t},a}function De(t){var e=lt(.1),n,i,r;typeof t!="function"&&(t=lt(t==null?0:+t));function a(o){for(var u=0,l=n.length,f;u<l;++u)f=n[u],f.vy+=(r[u]-f.y)*i[u]*o}function c(){if(n){var o,u=n.length;for(i=new Array(u),r=new Array(u),o=0;o<u;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return a.initialize=function(o){n=o,c()},a.strength=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),c(),a):e},a.y=function(o){return arguments.length?(t=typeof o=="function"?o:lt(+o),c(),a):t},a}var Fn=Dt('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),On=Dt('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><div class="legend-panel svelte-1i33fky"></div></div></div>');function Yn(t,e){Bt(e,!0);let n=mt(e,"selectedEntityId",3,null),i=mt(e,"filteredIds",3,null),r=mt(e,"sidebarHoveredId",3,null),a=mt(e,"highlightedIds",3,null);function c(y){return e.nameMap?.get(y)??y.replace(/-/g," ").replace(/\b\w/g,w=>w.toUpperCase())}const o=Je("theme"),u=nt(()=>o.current==="light"?{default:14211288,dim:15263976,conn:12632256,labelText:1710623}:{default:2763306,dim:1315860,conn:4210752,labelText:15592943}),l=nt(()=>o.current==="light"?16316666:592139),f=.75;St(()=>{o.current,K&&(K.style.fill=g(u).labelText);const y=g(Ht);for(const w of b)Mt(w.type)===Nt&&(w.color=y);et()}),St(()=>{i(),et()}),St(()=>{a(),et()}),St(()=>{n(),et()});let C=!1;St(()=>{const y=e.graphData;if(!tt||!A||!R)return;if(!C){C=!0;return}const w=new Map;for(const T of y.edges)w.set(T.source,(w.get(T.source)??0)+1),w.set(T.target,(w.get(T.target)??0)+1);const _=new Map;for(const T of b)_.set(T.id,{x:T.x,y:T.y});const O=3600*y.nodes.length,Y=Math.sqrt(O),B=y.nodes.map(T=>{const G=w.get(T.id)??0,dt=_.get(T.id);return{id:T.id,type:T.type,repo:T.repo,color:Mt(T.type)===Nt?g(Ht):Mt(T.type),weight:G,x:dt?.x??(Math.random()-.5)*Y,y:dt?.y??(Math.random()-.5)*Y,vx:0,vy:0,r:At(G)}}),Z=new Map;for(const T of B)Z.set(T.id,T);const rt=new Set(L.keys()),ut=new Set(y.nodes.map(T=>T.id));for(const T of rt)if(!ut.has(T)){const G=L.get(T);G&&(R.removeChild(G),G.destroy()),L.delete(T)}let X=null;if(L.size>0&&(X=L.values().next().value?.texture),!X){const T=document.createElement("canvas");T.width=100,T.height=100;const G=T.getContext("2d");G.beginPath(),G.arc(50,50,48,0,Math.PI*2),G.fillStyle="#ffffff",G.fill(),X=tt.Texture.from(T)}for(const T of B){let G=L.get(T.id);G||(G=new tt.Sprite(X),G.anchor.set(.5),R.addChild(G),L.set(T.id,G)),G.tint=Yt(T.color)}b=B,v?.stop();const vt=y.edges.map(T=>({source:T.source,target:T.target})),V=we(vt).id(T=>T.id).distance(250);v=Te(b).force("link",V).force("charge",Ie().strength(-1e3).distanceMin(30)).force("x",Ce(0).strength(.1)).force("y",De(0).strength(.1)).force("collide",me().radius(60).strength(.5)).velocityDecay(.4).alpha(.3).on("tick",()=>{ot||ne(),et()}),p=V.links(),N=null,Ot(),et()}),St(()=>{const y=r();if(y){const w=b.find(_=>_.id===y)??null;N=w,Ot(),M=w?1:0}else S||(M=0);et()});let d,v=null,b=[],p=[],s=!1,h=0,x=0,D=0,m=1,N=null,S=null,W=pt(!1),F=0,$=0,H=0,ft=0,Q=new Set,ot=!1,wt=pt(null),I=0,M=0;const E=4;let A=null,k=null,j=null,R=null,L=new Map,U=null,K=null,tt=null;function At(y){return Math.max(3,Math.min(Math.sqrt(y+1)+2,10))}function ee(y,w){const _=d.getBoundingClientRect();return{x:(y-_.left-x)/m,y:(w-_.top-D)/m}}function ve(y,w){for(let _=b.length-1;_>=0;_--){const P=b[_],O=y-P.x,Y=w-P.y,B=(P.r*1.5+4)/m;if(O*O+Y*Y<=B*B)return P}return null}function Ot(){const y=N??null;if(Q.clear(),!!y){Q.add(y.id);for(const w of p)w.source.id===y.id&&Q.add(w.target.id),w.target.id===y.id&&Q.add(w.source.id);if(R){const w=L.get(y.id);w&&R.setChildIndex(w,R.children.length-1)}}}function ne(){if(b.length===0||!d)return;let y=1/0,w=-1/0,_=1/0,P=-1/0,O=0;for(const X of b)X.x<y&&(y=X.x),X.x>w&&(w=X.x),X.y<_&&(_=X.y),X.y>P&&(P=X.y),X.r>O&&(O=X.r);const Y=d.clientWidth,B=d.clientHeight,Z=w-y,rt=P-_;if(Z===0||rt===0)return;const ut=(60+O)*2;m=Math.min((Y-ut)/Z,(B-ut)/rt,3),x=Y/2-(y+w)/2*m,D=B/2-(_+P)/2*m,et()}function et(){s=!0,h=0}function Yt(y){return parseInt(y.replace("#",""),16)}function _t(y,w,_){const P=(y>>16&255)+_*((w>>16&255)-(y>>16&255)),O=(y>>8&255)+_*((w>>8&255)-(y>>8&255)),Y=(y&255)+_*((w&255)-(y&255));return Math.round(P)<<16|Math.round(O)<<8|Math.round(Y)}function Ye(){if(!tt||!k||!j)return;k.clear(),j.clear();const w=N!==null,_=I,P=g(wt),O=a(),Y=i(),B=g(u).default,Z=g(u).dim,rt=g(u).conn;for(let ut=0;ut<p.length;ut++){const X=p[ut],vt=X.source.x*m+x,V=X.source.y*m+D,T=X.target.x*m+x,G=X.target.y*m+D,dt=w&&_>.01&&Q.has(X.source.id)&&Q.has(X.target.id);let z=B;w&&_>.01?z=dt?_t(B,rt,_):_t(B,Z,_):(P!==null||O!==null||Y!==null)&&(z=Z);const J=dt?j:k,zt=dt?1:.2;J.setStrokeStyle({width:1,color:z,alpha:zt}),J.moveTo(vt,V),J.lineTo(T,G),J.stroke()}}function Ge(){if(!tt)return;const y=N,w=y!==null,_=I,P=g(wt),O=a(),Y=i(),B=!y&&n()?b.find(V=>V.id===n())??null:null,Z=new Set;if(B){Z.add(B.id);for(const V of p)V.source.id===B.id&&Z.add(V.target.id),V.target.id===B.id&&Z.add(V.source.id)}for(const V of b){const T=L.get(V.id);if(!T)continue;const G=V.x*m+x,dt=V.y*m+D;T.position.set(G,dt),T.scale.set(V.r/50),T.alpha=1;const z=Yt(V.color);if(B&&!y){const J=Z.has(V.id);T.tint=J?z:_t(z,g(l),f)}else{const J=V===y,zt=w&&Q.has(V.id),Ze=P!==null&&(P==="other"?Mt(V.type)===Nt:V.type===P);if(J&&_>.01)T.tint=z,T.scale.set(V.r*(1+_*.4)/50);else if(zt)T.tint=z;else if(P!==null)T.tint=Ze?z:_t(z,g(l),f);else if(O!==null){const ae=O.has(V.id)?_*f:f;T.tint=_t(z,g(l),ae)}else if(Y!==null){const ae=Y.has(V.id)?_*f:f;T.tint=_t(z,g(l),ae)}else T.tint=_t(z,g(l),_*f)}}const rt=y??B,ut=y?_>.01:!!B;if(rt&&ut&&U){U.visible=!0;const V=rt.x*m+x,T=rt.y*m+D;U.position.set(V,T),U.scale.set(rt.r*5/64),U.alpha=y?_*.25:.25,U.tint=Yt(rt.color)}else U&&(U.visible=!1);const X=y??B,vt=y?_>.01:!!B;if(X&&vt&&K){const V=X.x*m+x,T=X.y*m+D;K.text=c(X.id),K.style.fontSize=12,K.position.set(V,T+X.r+8),K.alpha=y?_:1,K.visible=!0}else K&&(K.visible=!1)}let Gt=!1;function He(y){if(y.button!==0)return;Gt=!1;const w=ee(y.clientX,y.clientY),_=ve(w.x,w.y);_?(S=_,ot=!0,_.fx=_.x,_.fy=_.y,v?.alphaTarget(.3).restart(),et()):(q(W,!0),F=y.clientX,$=y.clientY,H=x,ft=D),d.setPointerCapture(y.pointerId),window.addEventListener("pointerup",ie,{once:!0})}function We(y){if(S){Gt=!0;const w=ee(y.clientX,y.clientY);S.fx=w.x,S.fy=w.y,et()}else if(g(W))Gt=!0,x=H+(y.clientX-F),D=ft+(y.clientY-$),et();else{const w=ee(y.clientX,y.clientY),_=ve(w.x,w.y);_?_!==N?(N&&(I=.15),N=_,Ot(),M=1,d.style.cursor="pointer",et()):M!==1&&(M=1,d.style.cursor="pointer",et()):M!==0&&(M=0,d.style.cursor="grab",et())}}function ie(y){if(!S&&!g(W))return;window.removeEventListener("pointerup",ie);const w=Gt;if(S){const _=S;S.fx=null,S.fy=null,v?.alphaTarget(0),S=null,M=0,et(),w||rn(`/${_.repo}/${_.type}/${_.id}`)}else g(W)&&q(W,!1);try{d.releasePointerCapture(y.pointerId)}catch{}}const Nt="#5c5c66",je="#b0b0b8",Ht=nt(()=>o.current==="light"?je:Nt),Ue=nt(()=>{const y=new Map;for(const P of e.graphData.nodes)y.set(P.type,(y.get(P.type)??0)+1);const w=[];let _=0;for(const[P,O]of y){const Y=Mt(P);Y===Nt?_+=O:w.push({name:P,color:Y,count:O})}return w.sort((P,O)=>O.count-P.count),_>0&&w.push({name:"other",color:g(Ht),count:_}),w});Ne(async()=>{tt=await en(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url),A=new tt.Application,await A.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:d}),d.insertBefore(A.canvas,d.firstChild),A.canvas.style.position="absolute",A.canvas.style.inset="0",k=new tt.Graphics,A.stage.addChild(k),j=new tt.Graphics,A.stage.addChild(j),R=new tt.Container,A.stage.addChild(R);const y=document.createElement("canvas");y.width=128,y.height=128;const w=y.getContext("2d"),_=w.createRadialGradient(64,64,0,64,64,64);_.addColorStop(0,"rgba(255,255,255,0.5)"),_.addColorStop(1,"rgba(255,255,255,0)"),w.fillStyle=_,w.fillRect(0,0,128,128);const P=tt.Texture.from(y);U=new tt.Sprite(P),U.anchor.set(.5),U.visible=!1,A.stage.addChild(U);const O=document.createElement("canvas");O.width=100,O.height=100;const Y=O.getContext("2d");Y.beginPath(),Y.arc(50,50,48,0,Math.PI*2),Y.fillStyle="#ffffff",Y.fill();const B=tt.Texture.from(O),Z=new Map;for(const z of e.graphData.edges)Z.set(z.source,(Z.get(z.source)??0)+1),Z.set(z.target,(Z.get(z.target)??0)+1);const rt=new Map,X=3600*e.graphData.nodes.length,vt=Math.sqrt(X);b=e.graphData.nodes.map(z=>{const J=Z.get(z.id)??0,zt={id:z.id,type:z.type,repo:z.repo,color:Mt(z.type)===Nt?g(Ht):Mt(z.type),weight:J,x:(Math.random()-.5)*vt,y:(Math.random()-.5)*vt,vx:0,vy:0,r:At(J)};return rt.set(z.id,zt),zt});for(const z of b){const J=new tt.Sprite(B);J.anchor.set(.5),J.tint=Yt(z.color),R.addChild(J),L.set(z.id,J)}K=new tt.Text({text:"",style:{fontFamily:"Inter, system-ui, sans-serif",fontWeight:"500",fontSize:12,fill:g(u).labelText,align:"center"}}),K.anchor.set(.5,0),K.visible=!1,A.stage.addChild(K);const V=e.graphData.edges.map(z=>({source:z.source,target:z.target})),T=we(V).id(z=>z.id).distance(250);v=Te(b).force("link",T).force("charge",Ie().strength(-1e3).distanceMin(30)).force("x",Ce(0).strength(.1)).force("y",De(0).strength(.1)).force("collide",me().radius(60).strength(.5)).velocityDecay(.4).alpha(1).on("tick",()=>{ot||ne(),et()}),p=T.links();let G=0;A.ticker.add(()=>{const z=performance.now(),J=G?Math.min((z-G)/1e3,.05):.016;G=z,I<M?(I=Math.min(M,I+E*J),s=!0):I>M&&(I=Math.max(M,I-E*J),s=!0),I===0&&M===0&&N&&!S&&(N=null,Ot(),s=!0),(s||h<120)&&(Ye(),Ge(),s=!1,h++)});const dt=new ResizeObserver(()=>{A.renderer.resize(d.clientWidth,d.clientHeight),ne()});return dt.observe(d),()=>{dt.disconnect()}}),qe(()=>{v?.stop(),A&&(A.destroy(!0,{children:!0}),A=null)});var re=On(),bt=at(re);let pe;var oe=at(bt);ce(oe,21,()=>g(Ue),fe,(y,w)=>{var _=Fn();let P;var O=at(_);let Y;var B=gt(O,2),Z=at(B,!0);it(B);var rt=gt(B,2),ut=at(rt,!0);it(rt),it(_),yt(()=>{P=nn(_,1,"legend-item svelte-1i33fky",null,P,{"legend-item-active":g(wt)===g(w).name}),Y=kt(O,"",Y,{background:g(w).color}),It(Z,g(w).name),It(ut,g(w).count)}),le("mouseenter",_,()=>{q(wt,g(w).name,!0),et()}),le("mouseleave",_,()=>{q(wt,null),et()}),ht(y,_)}),it(oe),it(bt),Ee(bt,y=>d=y,()=>d),it(re),yt(()=>pe=kt(bt,"",pe,{cursor:g(W)?"grabbing":"grab"})),Tt("pointerdown",bt,He),Tt("pointermove",bt,We),Tt("pointerup",bt,ie),Tt("pointerdown",oe,y=>y.stopPropagation()),ht(t,re),Ft()}Ae(["pointerdown","pointermove","pointerup"]);var Gn=$t("<title> </title>"),Hn=$t('<svg><!><path d="M7,28a1,1,0,0,1-1-1V5a1,1,0,0,1,1.4819-.8763l20,11a1,1,0,0,1,0,1.7525l-20,11A1.0005,1.0005,0,0,1,7,28ZM8,6.6909V25.3088L24.9248,16Z"></path></svg>');function Wn(t,e){const n=Qt(e,["children","$$slots","$$events","$$legacy"]),i=Qt(n,["size","title"]);Bt(e,!1);const r=Zt(),a=Zt();let c=mt(e,"size",8,16),o=mt(e,"title",8,void 0);Ut(()=>(Pt(n),Pt(o())),()=>{q(r,n["aria-label"]||n["aria-labelledby"]||o())}),Ut(()=>(g(r),Pt(n)),()=>{q(a,{"aria-hidden":g(r)?void 0:!0,role:g(r)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ze(),Re();var u=Hn();Pe(u,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...g(a),...i}));var l=at(u);{var f=C=>{var d=Gn(),v=at(d,!0);it(d),yt(()=>It(v,o())),ht(C,d)};Kt(l,C=>{o()&&C(f)})}Se(),it(u),ht(t,u),Ft()}var jn=$t("<title> </title>"),Un=$t('<svg><!><path d="M12,8V24H8V8h4m0-2H8A2,2,0,0,0,6,8V24a2,2,0,0,0,2,2h4a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"></path><path d="M24,8V24H20V8h4m0-2H20a2,2,0,0,0-2,2V24a2,2,0,0,0,2,2h4a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"></path></svg>');function Zn(t,e){const n=Qt(e,["children","$$slots","$$events","$$legacy"]),i=Qt(n,["size","title"]);Bt(e,!1);const r=Zt(),a=Zt();let c=mt(e,"size",8,16),o=mt(e,"title",8,void 0);Ut(()=>(Pt(n),Pt(o())),()=>{q(r,n["aria-label"]||n["aria-labelledby"]||o())}),Ut(()=>(g(r),Pt(n)),()=>{q(a,{"aria-hidden":g(r)?void 0:!0,role:g(r)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ze(),Re();var u=Un();Pe(u,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...g(a),...i}));var l=at(u);{var f=C=>{var d=jn(),v=at(d,!0);it(d),yt(()=>It(v,o())),ht(C,d)};Kt(l,C=>{o()&&C(f)})}Se(2),it(u),ht(t,u),Ft()}var Kn=Dt('<div class="density-bar svelte-lzvab"></div>'),Qn=Dt('<span class="date-label svelte-lzvab"> </span>'),Jn=Dt('<div class="timeline-tooltip svelte-lzvab"><div class="tooltip-date svelte-lzvab"> </div> <div class="tooltip-count svelte-lzvab"> </div></div>'),qn=Dt('<div class="timeline-bar svelte-lzvab"><!> <div class="timeline-track svelte-lzvab"><div class="track-line svelte-lzvab"></div> <div class="density-bars svelte-lzvab"></div> <div class="playhead svelte-lzvab"></div> <div class="date-labels svelte-lzvab"></div> <!></div></div>');function $n(t,e){Bt(e,!0);let n=pt(null),i=pt(0),r=pt(!1),a=pt(!1),c=pt(null),o=null;const u=nt(()=>{let I=1/0,M=-1/0;for(const E of e.entities){const A=E.createdAt?new Date(E.createdAt).getTime():0;A>0&&A<I&&(I=A),A>M&&(M=A)}return I===1/0&&(I=Date.now()),M===-1/0&&(M=Date.now()),{min:I,max:M}}),l=nt(()=>{let{min:I,max:M}=g(u);return M-I<864e5&&(I-=864e5*15,M+=864e5*15),{min:new Date(I),max:new Date(M)}}),f=nt(()=>{const M=g(l).min.getTime(),E=g(l).max.getTime(),A=new Map;for(const k of e.entities){const j=k.createdAt?new Date(k.createdAt).getTime():0;if(j<=0)continue;const R=Math.floor((j-M)/864e5),L=M+R*864e5,U=A.get(L)??[];U.push(k),A.set(L,U)}return{map:A,minTime:M,maxTime:E,dayMs:864e5}}),C=nt(()=>{let I=0;for(const M of g(f).map.values())M.length>I&&(I=M.length);return Math.max(1,I)}),d=nt(()=>{const{minTime:I,maxTime:M}=g(f),E=M-I,A=[],k=Math.max(4,Math.min(8,Math.floor(g(i)/100))),j=E/k;for(let R=0;R<=k;R++){const L=I+R*j,K=new Date(L).toLocaleDateString("en-US",{month:"short",day:"numeric"});A.push({label:K,x:R/k})}return A}),v=nt(()=>{const{minTime:I,maxTime:M}=g(f),E=M-I;if(E<=0)return .5;const A=e.currentDate?e.currentDate.getTime():g(u).max,k=Math.max(g(u).min,Math.min(g(u).max,A));return Math.max(0,Math.min(1,(k-I)/E))});function b(I){if(!g(n))return new Date;const M=g(n).getBoundingClientRect(),E=40,k=M.width-E-12,j=Math.max(0,Math.min(1,(I-M.left-E)/k)),{minTime:R,maxTime:L}=g(f),U=R+j*(L-R);return new Date(Math.max(g(u).min,Math.min(g(u).max,U)))}function p(I){q(r,!0),N();const M=b(I.clientX);e.onDateChange(M),I.target.setPointerCapture(I.pointerId)}function s(I){if(g(r)&&e.onDateChange(b(I.clientX)),!g(n))return;const M=g(n).getBoundingClientRect(),E=40,k=M.width-E-12,j=(I.clientX-M.left-E)/k;if(j<0||j>1){q(c,null);return}const{minTime:R,dayMs:L,map:U}=g(f),K=R+j*(g(f).maxTime-R),tt=R+Math.floor((K-R)/L)*L,At=U.get(tt);At&&At.length>0?q(c,{date:new Date(tt),count:At.length,x:I.clientX-M.left},!0):q(c,null)}function h(){q(r,!1)}function x(){q(c,null)}function D(){g(a)?N():m()}function m(){q(a,!0);const{min:I,max:M}=g(u),A=(M-I)/200;let k=e.currentDate?.getTime()??I;k>=M&&(k=I),o=setInterval(()=>{if(k+=A,k>=M){e.onDateChange(null),N();return}e.onDateChange(new Date(k))},50)}function N(){q(a,!1),o&&(clearInterval(o),o=null)}Ne(()=>{if(g(n)){const I=new ResizeObserver(M=>{q(i,M[0]?.contentRect.width??0,!0)});return I.observe(g(n)),()=>I.disconnect()}});var S=qn(),W=at(S);{let I=nt(()=>g(a)?"Pause":"Play");on(W,{variant:"ghost",size:"icon",class:"play-btn",onclick:D,get title(){return g(I)},children:(M,E)=>{var A=Qe(),k=ke(A);{var j=L=>{Zn(L,{size:14})},R=L=>{Wn(L,{size:14})};Kt(k,L=>{g(a)?L(j):L(R,!1)})}ht(M,A)},$$slots:{default:!0}})}var F=gt(W,2),$=gt(at(F),2);ce($,21,()=>Array.from(g(f).map.entries()),fe,(I,M)=>{var E=nt(()=>$e(g(M),2));let A=()=>g(E)[0],k=()=>g(E)[1];const j=nt(()=>(A()-g(f).minTime)/(g(f).maxTime-g(f).minTime)),R=nt(()=>k().length/g(C)),L=nt(()=>.05+.95*g(R)*g(R));var U=Kn();let K;yt(()=>K=kt(U,"",K,{left:`${g(j)*100}%`,opacity:g(L)})),ht(I,U)}),it($);var H=gt($,2);let ft;var Q=gt(H,2);ce(Q,21,()=>g(d),fe,(I,M)=>{var E=Qn();let A;var k=at(E,!0);it(E),yt(()=>{A=kt(E,"",A,{left:`${g(M).x*100}%`}),It(k,g(M).label)}),ht(I,E)}),it(Q);var ot=gt(Q,2);{var wt=I=>{var M=Jn();let E;var A=at(M),k=at(A,!0);it(A);var j=gt(A,2),R=at(j);it(j),it(M),yt(L=>{E=kt(M,"",E,{left:`${g(c).x??""}px`}),It(k,L),It(R,`${g(c).count??""} ${g(c).count===1?"entity":"entities"}`)},[()=>g(c).date.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]),ht(I,M)};Kt(ot,I=>{g(c)&&!g(r)&&I(wt)})}it(F),it(S),Ee(S,I=>q(n,I),()=>g(n)),yt(()=>ft=kt(H,"",ft,{left:`${g(v)*100}%`})),Tt("pointerdown",F,p),Tt("pointermove",F,s),Tt("pointerup",F,h),le("pointerleave",F,x),ht(t,S),Ft()}Ae(["pointerdown","pointermove","pointerup"]);var ti=Dt("<!> <!> <!>",1);function yi(t,e){Bt(e,!0),se.showGraph();let n=pt(null);const i=nt(()=>{const f=new Map;for(const C of Wt.repos)for(const d of C.entities)f.set(d.id,d.title);return f}),r=nt(()=>{const f=[];for(const C of Wt.repos)for(const d of C.entities)d.id.toLowerCase().startsWith("readme")||f.push(d);return f}),a=nt(()=>{const f=[],C=[],d=new Set,v=new Set,b=g(n)?.getTime()??1/0;for(const s of Wt.repos)for(const h of s.entities){if(h.id.toLowerCase().startsWith("readme")||d.has(h.id)||(h.createdAt?new Date(h.createdAt).getTime():0)>b)continue;d.add(h.id),f.push({id:h.id,type:h.entityType,repo:s.name});const D=h.wikilinks??[];for(const m of D){const N=h.id<m?`${h.id}|${m}`:`${m}|${h.id}`;!v.has(N)&&h.id!==m&&(v.add(N),C.push({source:h.id,target:m}))}}const p=C.filter(s=>d.has(s.source)&&d.has(s.target));return{nodes:f,edges:p}});var c=ti(),o=ke(c);tn(o,{activeView:"graph"});var u=gt(o,2);Yn(u,{get graphData(){return g(a)},get selectedEntityId(){return se.selectedId},get nameMap(){return g(i)},get filteredIds(){return Wt.filteredIds},get sidebarHoveredId(){return se.hoveredEntityId},get highlightedIds(){return an.highlightedIds}});var l=gt(u,2);$n(l,{get entities(){return g(r)},get currentDate(){return g(n)},onDateChange:f=>{q(n,f,!0)}}),ht(t,c),Ft()}export{yi as component};
2
+ import{d as Ae,g as Tt,a as ht,b as Dt,s as It,e as le,f as $t,c as Qe}from"../chunks/S3zzfNyy.js";import{p as Bt,aC as Je,a3 as St,g,ab as nt,aE as Ne,aG as qe,t as yt,b as Ft,c as at,s as q,e as pt,r as it,aa as gt,l as Ut,d as Pt,a as ze,n as Se,m as Zt,a0 as ke,bu as $e}from"../chunks/DwMoyB6r.js";import{V as tn}from"../chunks/BkWxx0Pi.js";import{_ as en}from"../chunks/PPVm8Dsz.js";import{e as ce,i as fe}from"../chunks/BnuoIjma.js";import{s as nn}from"../chunks/koVwyjnn.js";import{c as kt,a as Pe}from"../chunks/BYqzpKy3.js";import{b as Ee,i as Kt}from"../chunks/DVe5EzgB.js";import{p as mt,l as Qt}from"../chunks/DLfZVgnp.js";import{g as rn}from"../chunks/BkZMqbNG.js";import{e as Mt}from"../chunks/CdeYcEuU.js";import{B as on}from"../chunks/ClyoIkBa.js";import{i as Re}from"../chunks/CkRzikAP.js";import{n as se}from"../chunks/DiQyiOFg.js";import{w as Wt}from"../chunks/C88BjBh_.js";import{chatStore as an}from"../chunks/C78etSEz.js";function sn(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Le(this.cover(e,n),e,n,t)}function Le(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,a=t._root,c={data:i},o=t._x0,u=t._y0,l=t._x1,f=t._y1,C,d,v,b,p,s,h,x;if(!a)return t._root=c,t;for(;a.length;)if((p=e>=(C=(o+l)/2))?o=C:l=C,(s=n>=(d=(u+f)/2))?u=d:f=d,r=a,!(a=a[h=s<<1|p]))return r[h]=c,t;if(v=+t._x.call(null,a.data),b=+t._y.call(null,a.data),e===v&&n===b)return c.next=a,r?r[h]=c:t._root=c,t;do r=r?r[h]=new Array(4):t._root=new Array(4),(p=e>=(C=(o+l)/2))?o=C:l=C,(s=n>=(d=(u+f)/2))?u=d:f=d;while((h=s<<1|p)===(x=(b>=d)<<1|v>=C));return r[x]=a,r[h]=c,t}function ln(t){var e,n,i=t.length,r,a,c=new Array(i),o=new Array(i),u=1/0,l=1/0,f=-1/0,C=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(a=+this._y.call(null,e))||(c[n]=r,o[n]=a,r<u&&(u=r),r>f&&(f=r),a<l&&(l=a),a>C&&(C=a));if(u>f||l>C)return this;for(this.cover(u,l).cover(f,C),n=0;n<i;++n)Le(this,c[n],o[n],t[n]);return this}function cn(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,a=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,a=(i=Math.floor(e))+1;else{for(var c=r-n||1,o=this._root,u,l;n>t||t>=r||i>e||e>=a;)switch(l=(e<i)<<1|t<n,u=new Array(4),u[l]=o,o=u,c*=2,l){case 0:r=n+c,a=i+c;break;case 1:n=r-c,a=i+c;break;case 2:r=n+c,i=a-c;break;case 3:n=r-c,i=a-c;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=i,this._x1=r,this._y1=a,this}function fn(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function un(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 st(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function hn(t,e,n){var i,r=this._x0,a=this._y0,c,o,u,l,f=this._x1,C=this._y1,d=[],v=this._root,b,p;for(v&&d.push(new st(v,r,a,f,C)),n==null?n=1/0:(r=t-n,a=e-n,f=t+n,C=e+n,n*=n);b=d.pop();)if(!(!(v=b.node)||(c=b.x0)>f||(o=b.y0)>C||(u=b.x1)<r||(l=b.y1)<a))if(v.length){var s=(c+u)/2,h=(o+l)/2;d.push(new st(v[3],s,h,u,l),new st(v[2],c,h,s,l),new st(v[1],s,o,u,h),new st(v[0],c,o,s,h)),(p=(e>=h)<<1|t>=s)&&(b=d[d.length-1],d[d.length-1]=d[d.length-1-p],d[d.length-1-p]=b)}else{var x=t-+this._x.call(null,v.data),D=e-+this._y.call(null,v.data),m=x*x+D*D;if(m<n){var N=Math.sqrt(n=m);r=t-N,a=e-N,f=t+N,C=e+N,i=v.data}}return i}function dn(t){if(isNaN(f=+this._x.call(null,t))||isNaN(C=+this._y.call(null,t)))return this;var e,n=this._root,i,r,a,c=this._x0,o=this._y0,u=this._x1,l=this._y1,f,C,d,v,b,p,s,h;if(!n)return this;if(n.length)for(;;){if((b=f>=(d=(c+u)/2))?c=d:u=d,(p=C>=(v=(o+l)/2))?o=v:l=v,e=n,!(n=n[s=p<<1|b]))return this;if(!n.length)break;(e[s+1&3]||e[s+2&3]||e[s+3&3])&&(i=e,h=s)}for(;n.data!==t;)if(r=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,r?(a?r.next=a:delete r.next,this):e?(a?e[s]=a:delete e[s],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(i?i[h]=n:this._root=n),this):(this._root=a,this)}function gn(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function vn(){return this._root}function pn(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function yn(t){var e=[],n,i=this._root,r,a,c,o,u;for(i&&e.push(new st(i,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(i=n.node,a=n.x0,c=n.y0,o=n.x1,u=n.y1)&&i.length){var l=(a+o)/2,f=(c+u)/2;(r=i[3])&&e.push(new st(r,l,f,o,u)),(r=i[2])&&e.push(new st(r,a,f,l,u)),(r=i[1])&&e.push(new st(r,l,c,o,f)),(r=i[0])&&e.push(new st(r,a,c,l,f))}return this}function mn(t){var e=[],n=[],i;for(this._root&&e.push(new st(this._root,this._x0,this._y0,this._x1,this._y1));i=e.pop();){var r=i.node;if(r.length){var a,c=i.x0,o=i.y0,u=i.x1,l=i.y1,f=(c+u)/2,C=(o+l)/2;(a=r[0])&&e.push(new st(a,c,o,f,C)),(a=r[1])&&e.push(new st(a,f,o,u,C)),(a=r[2])&&e.push(new st(a,c,C,f,l)),(a=r[3])&&e.push(new st(a,f,C,u,l))}n.push(i)}for(;i=n.pop();)t(i.node,i.x0,i.y0,i.x1,i.y1);return this}function xn(t){return t[0]}function wn(t){return arguments.length?(this._x=t,this):this._x}function _n(t){return t[1]}function bn(t){return arguments.length?(this._y=t,this):this._y}function de(t,e,n){var i=new ge(e??xn,n??_n,NaN,NaN,NaN,NaN);return t==null?i:i.addAll(t)}function ge(t,e,n,i,r,a){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=a,this._root=void 0}function ye(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ct=de.prototype=ge.prototype;ct.copy=function(){var t=new ge(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,i;if(!e)return t;if(!e.length)return t._root=ye(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var r=0;r<4;++r)(i=e.source[r])&&(i.length?n.push({source:i,target:e.target[r]=new Array(4)}):e.target[r]=ye(i));return t};ct.add=sn;ct.addAll=ln;ct.cover=cn;ct.data=fn;ct.extent=un;ct.find=hn;ct.remove=dn;ct.removeAll=gn;ct.root=vn;ct.size=pn;ct.visit=yn;ct.visitAfter=mn;ct.x=wn;ct.y=bn;function lt(t){return function(){return t}}function xt(t){return(t()-.5)*1e-6}function Mn(t){return t.x+t.vx}function Tn(t){return t.y+t.vy}function me(t){var e,n,i,r=1,a=1;typeof t!="function"&&(t=lt(t==null?1:+t));function c(){for(var l,f=e.length,C,d,v,b,p,s,h=0;h<a;++h)for(C=de(e,Mn,Tn).visitAfter(o),l=0;l<f;++l)d=e[l],p=n[d.index],s=p*p,v=d.x+d.vx,b=d.y+d.vy,C.visit(x);function x(D,m,N,S,W){var F=D.data,$=D.r,H=p+$;if(F){if(F.index>d.index){var ft=v-F.x-F.vx,Q=b-F.y-F.vy,ot=ft*ft+Q*Q;ot<H*H&&(ft===0&&(ft=xt(i),ot+=ft*ft),Q===0&&(Q=xt(i),ot+=Q*Q),ot=(H-(ot=Math.sqrt(ot)))/ot*r,d.vx+=(ft*=ot)*(H=($*=$)/(s+$)),d.vy+=(Q*=ot)*H,F.vx-=ft*(H=1-H),F.vy-=Q*H)}return}return m>v+H||S<v-H||N>b+H||W<b-H}}function o(l){if(l.data)return l.r=n[l.data.index];for(var f=l.r=0;f<4;++f)l[f]&&l[f].r>l.r&&(l.r=l[f].r)}function u(){if(e){var l,f=e.length,C;for(n=new Array(f),l=0;l<f;++l)C=e[l],n[C.index]=+t(C,l,e)}}return c.initialize=function(l,f){e=l,i=f,u()},c.iterations=function(l){return arguments.length?(a=+l,c):a},c.strength=function(l){return arguments.length?(r=+l,c):r},c.radius=function(l){return arguments.length?(t=typeof l=="function"?l:lt(+l),u(),c):t},c}function In(t){return t.index}function xe(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function we(t){var e=In,n=C,i,r=lt(30),a,c,o,u,l,f=1;t==null&&(t=[]);function C(s){return 1/Math.min(o[s.source.index],o[s.target.index])}function d(s){for(var h=0,x=t.length;h<f;++h)for(var D=0,m,N,S,W,F,$,H;D<x;++D)m=t[D],N=m.source,S=m.target,W=S.x+S.vx-N.x-N.vx||xt(l),F=S.y+S.vy-N.y-N.vy||xt(l),$=Math.sqrt(W*W+F*F),$=($-a[D])/$*s*i[D],W*=$,F*=$,S.vx-=W*(H=u[D]),S.vy-=F*H,N.vx+=W*(H=1-H),N.vy+=F*H}function v(){if(c){var s,h=c.length,x=t.length,D=new Map(c.map((N,S)=>[e(N,S,c),N])),m;for(s=0,o=new Array(h);s<x;++s)m=t[s],m.index=s,typeof m.source!="object"&&(m.source=xe(D,m.source)),typeof m.target!="object"&&(m.target=xe(D,m.target)),o[m.source.index]=(o[m.source.index]||0)+1,o[m.target.index]=(o[m.target.index]||0)+1;for(s=0,u=new Array(x);s<x;++s)m=t[s],u[s]=o[m.source.index]/(o[m.source.index]+o[m.target.index]);i=new Array(x),b(),a=new Array(x),p()}}function b(){if(c)for(var s=0,h=t.length;s<h;++s)i[s]=+n(t[s],s,t)}function p(){if(c)for(var s=0,h=t.length;s<h;++s)a[s]=+r(t[s],s,t)}return d.initialize=function(s,h){c=s,l=h,v()},d.links=function(s){return arguments.length?(t=s,v(),d):t},d.id=function(s){return arguments.length?(e=s,d):e},d.iterations=function(s){return arguments.length?(f=+s,d):f},d.strength=function(s){return arguments.length?(n=typeof s=="function"?s:lt(+s),b(),d):n},d.distance=function(s){return arguments.length?(r=typeof s=="function"?s:lt(+s),p(),d):r},d}var Cn={value:()=>{}};function Ve(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new jt(n)}function jt(t){this._=t}function Dn(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}jt.prototype=Ve.prototype={constructor:jt,on:function(t,e){var n=this._,i=Dn(t+"",n),r,a=-1,c=i.length;if(arguments.length<2){for(;++a<c;)if((r=(t=i[a]).type)&&(r=An(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<c;)if(r=(t=i[a]).type)n[r]=_e(n[r],t.name,e);else if(e==null)for(r in n)n[r]=_e(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new jt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,a;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],i=0,r=a.length;i<r;++i)a[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};function An(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function _e(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Cn,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Et=0,Lt=0,Rt=0,Xe=1e3,Jt,Vt,qt=0,Ct=0,te=0,Xt=typeof performance=="object"&&performance.now?performance:Date,Be=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Fe(){return Ct||(Be(Nn),Ct=Xt.now()+te)}function Nn(){Ct=0}function ue(){this._call=this._time=this._next=null}ue.prototype=Oe.prototype={constructor:ue,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Fe():+n)+(e==null?0:+e),!this._next&&Vt!==this&&(Vt?Vt._next=this:Jt=this,Vt=this),this._call=t,this._time=n,he()},stop:function(){this._call&&(this._call=null,this._time=1/0,he())}};function Oe(t,e,n){var i=new ue;return i.restart(t,e,n),i}function zn(){Fe(),++Et;for(var t=Jt,e;t;)(e=Ct-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Et}function be(){Ct=(qt=Xt.now())+te,Et=Lt=0;try{zn()}finally{Et=0,kn(),Ct=0}}function Sn(){var t=Xt.now(),e=t-qt;e>Xe&&(te-=e,qt=t)}function kn(){for(var t,e=Jt,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Jt=n);Vt=t,he(i)}function he(t){if(!Et){Lt&&(Lt=clearTimeout(Lt));var e=t-Ct;e>24?(t<1/0&&(Lt=setTimeout(be,t-Xt.now()-te)),Rt&&(Rt=clearInterval(Rt))):(Rt||(qt=Xt.now(),Rt=setInterval(Sn,Xe)),Et=1,Be(be))}}const Pn=1664525,En=1013904223,Me=4294967296;function Rn(){let t=1;return()=>(t=(Pn*t+En)%Me)/Me}function Ln(t){return t.x}function Vn(t){return t.y}var Xn=10,Bn=Math.PI*(3-Math.sqrt(5));function Te(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),a=0,c=.6,o=new Map,u=Oe(C),l=Ve("tick","end"),f=Rn();t==null&&(t=[]);function C(){d(),l.call("tick",e),n<i&&(u.stop(),l.call("end",e))}function d(p){var s,h=t.length,x;p===void 0&&(p=1);for(var D=0;D<p;++D)for(n+=(a-n)*r,o.forEach(function(m){m(n)}),s=0;s<h;++s)x=t[s],x.fx==null?x.x+=x.vx*=c:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=c:(x.y=x.fy,x.vy=0);return e}function v(){for(var p=0,s=t.length,h;p<s;++p){if(h=t[p],h.index=p,h.fx!=null&&(h.x=h.fx),h.fy!=null&&(h.y=h.fy),isNaN(h.x)||isNaN(h.y)){var x=Xn*Math.sqrt(.5+p),D=p*Bn;h.x=x*Math.cos(D),h.y=x*Math.sin(D)}(isNaN(h.vx)||isNaN(h.vy))&&(h.vx=h.vy=0)}}function b(p){return p.initialize&&p.initialize(t,f),p}return v(),e={tick:d,restart:function(){return u.restart(C),e},stop:function(){return u.stop(),e},nodes:function(p){return arguments.length?(t=p,v(),o.forEach(b),e):t},alpha:function(p){return arguments.length?(n=+p,e):n},alphaMin:function(p){return arguments.length?(i=+p,e):i},alphaDecay:function(p){return arguments.length?(r=+p,e):+r},alphaTarget:function(p){return arguments.length?(a=+p,e):a},velocityDecay:function(p){return arguments.length?(c=1-p,e):1-c},randomSource:function(p){return arguments.length?(f=p,o.forEach(b),e):f},force:function(p,s){return arguments.length>1?(s==null?o.delete(p):o.set(p,b(s)),e):o.get(p)},find:function(p,s,h){var x=0,D=t.length,m,N,S,W,F;for(h==null?h=1/0:h*=h,x=0;x<D;++x)W=t[x],m=p-W.x,N=s-W.y,S=m*m+N*N,S<h&&(F=W,h=S);return F},on:function(p,s){return arguments.length>1?(l.on(p,s),e):l.on(p)}}}function Ie(){var t,e,n,i,r=lt(-30),a,c=1,o=1/0,u=.81;function l(v){var b,p=t.length,s=de(t,Ln,Vn).visitAfter(C);for(i=v,b=0;b<p;++b)e=t[b],s.visit(d)}function f(){if(t){var v,b=t.length,p;for(a=new Array(b),v=0;v<b;++v)p=t[v],a[p.index]=+r(p,v,t)}}function C(v){var b=0,p,s,h=0,x,D,m;if(v.length){for(x=D=m=0;m<4;++m)(p=v[m])&&(s=Math.abs(p.value))&&(b+=p.value,h+=s,x+=s*p.x,D+=s*p.y);v.x=x/h,v.y=D/h}else{p=v,p.x=p.data.x,p.y=p.data.y;do b+=a[p.data.index];while(p=p.next)}v.value=b}function d(v,b,p,s){if(!v.value)return!0;var h=v.x-e.x,x=v.y-e.y,D=s-b,m=h*h+x*x;if(D*D/u<m)return m<o&&(h===0&&(h=xt(n),m+=h*h),x===0&&(x=xt(n),m+=x*x),m<c&&(m=Math.sqrt(c*m)),e.vx+=h*v.value*i/m,e.vy+=x*v.value*i/m),!0;if(v.length||m>=o)return;(v.data!==e||v.next)&&(h===0&&(h=xt(n),m+=h*h),x===0&&(x=xt(n),m+=x*x),m<c&&(m=Math.sqrt(c*m)));do v.data!==e&&(D=a[v.data.index]*i/m,e.vx+=h*D,e.vy+=x*D);while(v=v.next)}return l.initialize=function(v,b){t=v,n=b,f()},l.strength=function(v){return arguments.length?(r=typeof v=="function"?v:lt(+v),f(),l):r},l.distanceMin=function(v){return arguments.length?(c=v*v,l):Math.sqrt(c)},l.distanceMax=function(v){return arguments.length?(o=v*v,l):Math.sqrt(o)},l.theta=function(v){return arguments.length?(u=v*v,l):Math.sqrt(u)},l}function Ce(t){var e=lt(.1),n,i,r;typeof t!="function"&&(t=lt(t==null?0:+t));function a(o){for(var u=0,l=n.length,f;u<l;++u)f=n[u],f.vx+=(r[u]-f.x)*i[u]*o}function c(){if(n){var o,u=n.length;for(i=new Array(u),r=new Array(u),o=0;o<u;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return a.initialize=function(o){n=o,c()},a.strength=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),c(),a):e},a.x=function(o){return arguments.length?(t=typeof o=="function"?o:lt(+o),c(),a):t},a}function De(t){var e=lt(.1),n,i,r;typeof t!="function"&&(t=lt(t==null?0:+t));function a(o){for(var u=0,l=n.length,f;u<l;++u)f=n[u],f.vy+=(r[u]-f.y)*i[u]*o}function c(){if(n){var o,u=n.length;for(i=new Array(u),r=new Array(u),o=0;o<u;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return a.initialize=function(o){n=o,c()},a.strength=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),c(),a):e},a.y=function(o){return arguments.length?(t=typeof o=="function"?o:lt(+o),c(),a):t},a}var Fn=Dt('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),On=Dt('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><div class="legend-panel svelte-1i33fky"></div></div></div>');function Yn(t,e){Bt(e,!0);let n=mt(e,"selectedEntityId",3,null),i=mt(e,"filteredIds",3,null),r=mt(e,"sidebarHoveredId",3,null),a=mt(e,"highlightedIds",3,null);function c(y){return e.nameMap?.get(y)??y.replace(/-/g," ").replace(/\b\w/g,w=>w.toUpperCase())}const o=Je("theme"),u=nt(()=>o.current==="light"?{default:14211288,dim:15263976,conn:12632256,labelText:1710623}:{default:2763306,dim:1315860,conn:4210752,labelText:15592943}),l=nt(()=>o.current==="light"?16316666:592139),f=.75;St(()=>{o.current,K&&(K.style.fill=g(u).labelText);const y=g(Ht);for(const w of b)Mt(w.type)===Nt&&(w.color=y);et()}),St(()=>{i(),et()}),St(()=>{a(),et()}),St(()=>{n(),et()});let C=!1;St(()=>{const y=e.graphData;if(!tt||!A||!R)return;if(!C){C=!0;return}const w=new Map;for(const T of y.edges)w.set(T.source,(w.get(T.source)??0)+1),w.set(T.target,(w.get(T.target)??0)+1);const _=new Map;for(const T of b)_.set(T.id,{x:T.x,y:T.y});const O=3600*y.nodes.length,Y=Math.sqrt(O),B=y.nodes.map(T=>{const G=w.get(T.id)??0,dt=_.get(T.id);return{id:T.id,type:T.type,repo:T.repo,color:Mt(T.type)===Nt?g(Ht):Mt(T.type),weight:G,x:dt?.x??(Math.random()-.5)*Y,y:dt?.y??(Math.random()-.5)*Y,vx:0,vy:0,r:At(G)}}),Z=new Map;for(const T of B)Z.set(T.id,T);const rt=new Set(L.keys()),ut=new Set(y.nodes.map(T=>T.id));for(const T of rt)if(!ut.has(T)){const G=L.get(T);G&&(R.removeChild(G),G.destroy()),L.delete(T)}let X=null;if(L.size>0&&(X=L.values().next().value?.texture),!X){const T=document.createElement("canvas");T.width=100,T.height=100;const G=T.getContext("2d");G.beginPath(),G.arc(50,50,48,0,Math.PI*2),G.fillStyle="#ffffff",G.fill(),X=tt.Texture.from(T)}for(const T of B){let G=L.get(T.id);G||(G=new tt.Sprite(X),G.anchor.set(.5),R.addChild(G),L.set(T.id,G)),G.tint=Yt(T.color)}b=B,v?.stop();const vt=y.edges.map(T=>({source:T.source,target:T.target})),V=we(vt).id(T=>T.id).distance(250);v=Te(b).force("link",V).force("charge",Ie().strength(-1e3).distanceMin(30)).force("x",Ce(0).strength(.1)).force("y",De(0).strength(.1)).force("collide",me().radius(60).strength(.5)).velocityDecay(.4).alpha(.3).on("tick",()=>{ot||ne(),et()}),p=V.links(),N=null,Ot(),et()}),St(()=>{const y=r();if(y){const w=b.find(_=>_.id===y)??null;N=w,Ot(),M=w?1:0}else S||(M=0);et()});let d,v=null,b=[],p=[],s=!1,h=0,x=0,D=0,m=1,N=null,S=null,W=pt(!1),F=0,$=0,H=0,ft=0,Q=new Set,ot=!1,wt=pt(null),I=0,M=0;const E=4;let A=null,k=null,j=null,R=null,L=new Map,U=null,K=null,tt=null;function At(y){return Math.max(3,Math.min(Math.sqrt(y+1)+2,10))}function ee(y,w){const _=d.getBoundingClientRect();return{x:(y-_.left-x)/m,y:(w-_.top-D)/m}}function ve(y,w){for(let _=b.length-1;_>=0;_--){const P=b[_],O=y-P.x,Y=w-P.y,B=(P.r*1.5+4)/m;if(O*O+Y*Y<=B*B)return P}return null}function Ot(){const y=N??null;if(Q.clear(),!!y){Q.add(y.id);for(const w of p)w.source.id===y.id&&Q.add(w.target.id),w.target.id===y.id&&Q.add(w.source.id);if(R){const w=L.get(y.id);w&&R.setChildIndex(w,R.children.length-1)}}}function ne(){if(b.length===0||!d)return;let y=1/0,w=-1/0,_=1/0,P=-1/0,O=0;for(const X of b)X.x<y&&(y=X.x),X.x>w&&(w=X.x),X.y<_&&(_=X.y),X.y>P&&(P=X.y),X.r>O&&(O=X.r);const Y=d.clientWidth,B=d.clientHeight,Z=w-y,rt=P-_;if(Z===0||rt===0)return;const ut=(60+O)*2;m=Math.min((Y-ut)/Z,(B-ut)/rt,3),x=Y/2-(y+w)/2*m,D=B/2-(_+P)/2*m,et()}function et(){s=!0,h=0}function Yt(y){return parseInt(y.replace("#",""),16)}function _t(y,w,_){const P=(y>>16&255)+_*((w>>16&255)-(y>>16&255)),O=(y>>8&255)+_*((w>>8&255)-(y>>8&255)),Y=(y&255)+_*((w&255)-(y&255));return Math.round(P)<<16|Math.round(O)<<8|Math.round(Y)}function Ye(){if(!tt||!k||!j)return;k.clear(),j.clear();const w=N!==null,_=I,P=g(wt),O=a(),Y=i(),B=g(u).default,Z=g(u).dim,rt=g(u).conn;for(let ut=0;ut<p.length;ut++){const X=p[ut],vt=X.source.x*m+x,V=X.source.y*m+D,T=X.target.x*m+x,G=X.target.y*m+D,dt=w&&_>.01&&Q.has(X.source.id)&&Q.has(X.target.id);let z=B;w&&_>.01?z=dt?_t(B,rt,_):_t(B,Z,_):(P!==null||O!==null||Y!==null)&&(z=Z);const J=dt?j:k,zt=dt?1:.2;J.setStrokeStyle({width:1,color:z,alpha:zt}),J.moveTo(vt,V),J.lineTo(T,G),J.stroke()}}function Ge(){if(!tt)return;const y=N,w=y!==null,_=I,P=g(wt),O=a(),Y=i(),B=!y&&n()?b.find(V=>V.id===n())??null:null,Z=new Set;if(B){Z.add(B.id);for(const V of p)V.source.id===B.id&&Z.add(V.target.id),V.target.id===B.id&&Z.add(V.source.id)}for(const V of b){const T=L.get(V.id);if(!T)continue;const G=V.x*m+x,dt=V.y*m+D;T.position.set(G,dt),T.scale.set(V.r/50),T.alpha=1;const z=Yt(V.color);if(B&&!y){const J=Z.has(V.id);T.tint=J?z:_t(z,g(l),f)}else{const J=V===y,zt=w&&Q.has(V.id),Ze=P!==null&&(P==="other"?Mt(V.type)===Nt:V.type===P);if(J&&_>.01)T.tint=z,T.scale.set(V.r*(1+_*.4)/50);else if(zt)T.tint=z;else if(P!==null)T.tint=Ze?z:_t(z,g(l),f);else if(O!==null){const ae=O.has(V.id)?_*f:f;T.tint=_t(z,g(l),ae)}else if(Y!==null){const ae=Y.has(V.id)?_*f:f;T.tint=_t(z,g(l),ae)}else T.tint=_t(z,g(l),_*f)}}const rt=y??B,ut=y?_>.01:!!B;if(rt&&ut&&U){U.visible=!0;const V=rt.x*m+x,T=rt.y*m+D;U.position.set(V,T),U.scale.set(rt.r*5/64),U.alpha=y?_*.25:.25,U.tint=Yt(rt.color)}else U&&(U.visible=!1);const X=y??B,vt=y?_>.01:!!B;if(X&&vt&&K){const V=X.x*m+x,T=X.y*m+D;K.text=c(X.id),K.style.fontSize=12,K.position.set(V,T+X.r+8),K.alpha=y?_:1,K.visible=!0}else K&&(K.visible=!1)}let Gt=!1;function He(y){if(y.button!==0)return;Gt=!1;const w=ee(y.clientX,y.clientY),_=ve(w.x,w.y);_?(S=_,ot=!0,_.fx=_.x,_.fy=_.y,v?.alphaTarget(.3).restart(),et()):(q(W,!0),F=y.clientX,$=y.clientY,H=x,ft=D),d.setPointerCapture(y.pointerId),window.addEventListener("pointerup",ie,{once:!0})}function We(y){if(S){Gt=!0;const w=ee(y.clientX,y.clientY);S.fx=w.x,S.fy=w.y,et()}else if(g(W))Gt=!0,x=H+(y.clientX-F),D=ft+(y.clientY-$),et();else{const w=ee(y.clientX,y.clientY),_=ve(w.x,w.y);_?_!==N?(N&&(I=.15),N=_,Ot(),M=1,d.style.cursor="pointer",et()):M!==1&&(M=1,d.style.cursor="pointer",et()):M!==0&&(M=0,d.style.cursor="grab",et())}}function ie(y){if(!S&&!g(W))return;window.removeEventListener("pointerup",ie);const w=Gt;if(S){const _=S;S.fx=null,S.fy=null,v?.alphaTarget(0),S=null,M=0,et(),w||rn(`/${_.repo}/${_.type}/${_.id}`)}else g(W)&&q(W,!1);try{d.releasePointerCapture(y.pointerId)}catch{}}const Nt="#5c5c66",je="#b0b0b8",Ht=nt(()=>o.current==="light"?je:Nt),Ue=nt(()=>{const y=new Map;for(const P of e.graphData.nodes)y.set(P.type,(y.get(P.type)??0)+1);const w=[];let _=0;for(const[P,O]of y){const Y=Mt(P);Y===Nt?_+=O:w.push({name:P,color:Y,count:O})}return w.sort((P,O)=>O.count-P.count),_>0&&w.push({name:"other",color:g(Ht),count:_}),w});Ne(async()=>{tt=await en(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url),A=new tt.Application,await A.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:d}),d.insertBefore(A.canvas,d.firstChild),A.canvas.style.position="absolute",A.canvas.style.inset="0",k=new tt.Graphics,A.stage.addChild(k),j=new tt.Graphics,A.stage.addChild(j),R=new tt.Container,A.stage.addChild(R);const y=document.createElement("canvas");y.width=128,y.height=128;const w=y.getContext("2d"),_=w.createRadialGradient(64,64,0,64,64,64);_.addColorStop(0,"rgba(255,255,255,0.5)"),_.addColorStop(1,"rgba(255,255,255,0)"),w.fillStyle=_,w.fillRect(0,0,128,128);const P=tt.Texture.from(y);U=new tt.Sprite(P),U.anchor.set(.5),U.visible=!1,A.stage.addChild(U);const O=document.createElement("canvas");O.width=100,O.height=100;const Y=O.getContext("2d");Y.beginPath(),Y.arc(50,50,48,0,Math.PI*2),Y.fillStyle="#ffffff",Y.fill();const B=tt.Texture.from(O),Z=new Map;for(const z of e.graphData.edges)Z.set(z.source,(Z.get(z.source)??0)+1),Z.set(z.target,(Z.get(z.target)??0)+1);const rt=new Map,X=3600*e.graphData.nodes.length,vt=Math.sqrt(X);b=e.graphData.nodes.map(z=>{const J=Z.get(z.id)??0,zt={id:z.id,type:z.type,repo:z.repo,color:Mt(z.type)===Nt?g(Ht):Mt(z.type),weight:J,x:(Math.random()-.5)*vt,y:(Math.random()-.5)*vt,vx:0,vy:0,r:At(J)};return rt.set(z.id,zt),zt});for(const z of b){const J=new tt.Sprite(B);J.anchor.set(.5),J.tint=Yt(z.color),R.addChild(J),L.set(z.id,J)}K=new tt.Text({text:"",style:{fontFamily:"Inter, system-ui, sans-serif",fontWeight:"500",fontSize:12,fill:g(u).labelText,align:"center"}}),K.anchor.set(.5,0),K.visible=!1,A.stage.addChild(K);const V=e.graphData.edges.map(z=>({source:z.source,target:z.target})),T=we(V).id(z=>z.id).distance(250);v=Te(b).force("link",T).force("charge",Ie().strength(-1e3).distanceMin(30)).force("x",Ce(0).strength(.1)).force("y",De(0).strength(.1)).force("collide",me().radius(60).strength(.5)).velocityDecay(.4).alpha(1).on("tick",()=>{ot||ne(),et()}),p=T.links();let G=0;A.ticker.add(()=>{const z=performance.now(),J=G?Math.min((z-G)/1e3,.05):.016;G=z,I<M?(I=Math.min(M,I+E*J),s=!0):I>M&&(I=Math.max(M,I-E*J),s=!0),I===0&&M===0&&N&&!S&&(N=null,Ot(),s=!0),(s||h<120)&&(Ye(),Ge(),s=!1,h++)});const dt=new ResizeObserver(()=>{A.renderer.resize(d.clientWidth,d.clientHeight),ne()});return dt.observe(d),()=>{dt.disconnect()}}),qe(()=>{v?.stop(),A&&(A.destroy(!0,{children:!0}),A=null)});var re=On(),bt=at(re);let pe;var oe=at(bt);ce(oe,21,()=>g(Ue),fe,(y,w)=>{var _=Fn();let P;var O=at(_);let Y;var B=gt(O,2),Z=at(B,!0);it(B);var rt=gt(B,2),ut=at(rt,!0);it(rt),it(_),yt(()=>{P=nn(_,1,"legend-item svelte-1i33fky",null,P,{"legend-item-active":g(wt)===g(w).name}),Y=kt(O,"",Y,{background:g(w).color}),It(Z,g(w).name),It(ut,g(w).count)}),le("mouseenter",_,()=>{q(wt,g(w).name,!0),et()}),le("mouseleave",_,()=>{q(wt,null),et()}),ht(y,_)}),it(oe),it(bt),Ee(bt,y=>d=y,()=>d),it(re),yt(()=>pe=kt(bt,"",pe,{cursor:g(W)?"grabbing":"grab"})),Tt("pointerdown",bt,He),Tt("pointermove",bt,We),Tt("pointerup",bt,ie),Tt("pointerdown",oe,y=>y.stopPropagation()),ht(t,re),Ft()}Ae(["pointerdown","pointermove","pointerup"]);var Gn=$t("<title> </title>"),Hn=$t('<svg><!><path d="M7,28a1,1,0,0,1-1-1V5a1,1,0,0,1,1.4819-.8763l20,11a1,1,0,0,1,0,1.7525l-20,11A1.0005,1.0005,0,0,1,7,28ZM8,6.6909V25.3088L24.9248,16Z"></path></svg>');function Wn(t,e){const n=Qt(e,["children","$$slots","$$events","$$legacy"]),i=Qt(n,["size","title"]);Bt(e,!1);const r=Zt(),a=Zt();let c=mt(e,"size",8,16),o=mt(e,"title",8,void 0);Ut(()=>(Pt(n),Pt(o())),()=>{q(r,n["aria-label"]||n["aria-labelledby"]||o())}),Ut(()=>(g(r),Pt(n)),()=>{q(a,{"aria-hidden":g(r)?void 0:!0,role:g(r)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ze(),Re();var u=Hn();Pe(u,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...g(a),...i}));var l=at(u);{var f=C=>{var d=Gn(),v=at(d,!0);it(d),yt(()=>It(v,o())),ht(C,d)};Kt(l,C=>{o()&&C(f)})}Se(),it(u),ht(t,u),Ft()}var jn=$t("<title> </title>"),Un=$t('<svg><!><path d="M12,8V24H8V8h4m0-2H8A2,2,0,0,0,6,8V24a2,2,0,0,0,2,2h4a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"></path><path d="M24,8V24H20V8h4m0-2H20a2,2,0,0,0-2,2V24a2,2,0,0,0,2,2h4a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"></path></svg>');function Zn(t,e){const n=Qt(e,["children","$$slots","$$events","$$legacy"]),i=Qt(n,["size","title"]);Bt(e,!1);const r=Zt(),a=Zt();let c=mt(e,"size",8,16),o=mt(e,"title",8,void 0);Ut(()=>(Pt(n),Pt(o())),()=>{q(r,n["aria-label"]||n["aria-labelledby"]||o())}),Ut(()=>(g(r),Pt(n)),()=>{q(a,{"aria-hidden":g(r)?void 0:!0,role:g(r)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ze(),Re();var u=Un();Pe(u,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...g(a),...i}));var l=at(u);{var f=C=>{var d=jn(),v=at(d,!0);it(d),yt(()=>It(v,o())),ht(C,d)};Kt(l,C=>{o()&&C(f)})}Se(2),it(u),ht(t,u),Ft()}var Kn=Dt('<div class="density-bar svelte-lzvab"></div>'),Qn=Dt('<span class="date-label svelte-lzvab"> </span>'),Jn=Dt('<div class="timeline-tooltip svelte-lzvab"><div class="tooltip-date svelte-lzvab"> </div> <div class="tooltip-count svelte-lzvab"> </div></div>'),qn=Dt('<div class="timeline-bar svelte-lzvab"><!> <div class="timeline-track svelte-lzvab"><div class="track-line svelte-lzvab"></div> <div class="density-bars svelte-lzvab"></div> <div class="playhead svelte-lzvab"></div> <div class="date-labels svelte-lzvab"></div> <!></div></div>');function $n(t,e){Bt(e,!0);let n=pt(null),i=pt(0),r=pt(!1),a=pt(!1),c=pt(null),o=null;const u=nt(()=>{let I=1/0,M=-1/0;for(const E of e.entities){const A=E.createdAt?new Date(E.createdAt).getTime():0;A>0&&A<I&&(I=A),A>M&&(M=A)}return I===1/0&&(I=Date.now()),M===-1/0&&(M=Date.now()),{min:I,max:M}}),l=nt(()=>{let{min:I,max:M}=g(u);return M-I<864e5&&(I-=864e5*15,M+=864e5*15),{min:new Date(I),max:new Date(M)}}),f=nt(()=>{const M=g(l).min.getTime(),E=g(l).max.getTime(),A=new Map;for(const k of e.entities){const j=k.createdAt?new Date(k.createdAt).getTime():0;if(j<=0)continue;const R=Math.floor((j-M)/864e5),L=M+R*864e5,U=A.get(L)??[];U.push(k),A.set(L,U)}return{map:A,minTime:M,maxTime:E,dayMs:864e5}}),C=nt(()=>{let I=0;for(const M of g(f).map.values())M.length>I&&(I=M.length);return Math.max(1,I)}),d=nt(()=>{const{minTime:I,maxTime:M}=g(f),E=M-I,A=[],k=Math.max(4,Math.min(8,Math.floor(g(i)/100))),j=E/k;for(let R=0;R<=k;R++){const L=I+R*j,K=new Date(L).toLocaleDateString("en-US",{month:"short",day:"numeric"});A.push({label:K,x:R/k})}return A}),v=nt(()=>{const{minTime:I,maxTime:M}=g(f),E=M-I;if(E<=0)return .5;const A=e.currentDate?e.currentDate.getTime():g(u).max,k=Math.max(g(u).min,Math.min(g(u).max,A));return Math.max(0,Math.min(1,(k-I)/E))});function b(I){if(!g(n))return new Date;const M=g(n).getBoundingClientRect(),E=40,k=M.width-E-12,j=Math.max(0,Math.min(1,(I-M.left-E)/k)),{minTime:R,maxTime:L}=g(f),U=R+j*(L-R);return new Date(Math.max(g(u).min,Math.min(g(u).max,U)))}function p(I){q(r,!0),N();const M=b(I.clientX);e.onDateChange(M),I.target.setPointerCapture(I.pointerId)}function s(I){if(g(r)&&e.onDateChange(b(I.clientX)),!g(n))return;const M=g(n).getBoundingClientRect(),E=40,k=M.width-E-12,j=(I.clientX-M.left-E)/k;if(j<0||j>1){q(c,null);return}const{minTime:R,dayMs:L,map:U}=g(f),K=R+j*(g(f).maxTime-R),tt=R+Math.floor((K-R)/L)*L,At=U.get(tt);At&&At.length>0?q(c,{date:new Date(tt),count:At.length,x:I.clientX-M.left},!0):q(c,null)}function h(){q(r,!1)}function x(){q(c,null)}function D(){g(a)?N():m()}function m(){q(a,!0);const{min:I,max:M}=g(u),A=(M-I)/200;let k=e.currentDate?.getTime()??I;k>=M&&(k=I),o=setInterval(()=>{if(k+=A,k>=M){e.onDateChange(null),N();return}e.onDateChange(new Date(k))},50)}function N(){q(a,!1),o&&(clearInterval(o),o=null)}Ne(()=>{if(g(n)){const I=new ResizeObserver(M=>{q(i,M[0]?.contentRect.width??0,!0)});return I.observe(g(n)),()=>I.disconnect()}});var S=qn(),W=at(S);{let I=nt(()=>g(a)?"Pause":"Play");on(W,{variant:"ghost",size:"icon",class:"play-btn",onclick:D,get title(){return g(I)},children:(M,E)=>{var A=Qe(),k=ke(A);{var j=L=>{Zn(L,{size:14})},R=L=>{Wn(L,{size:14})};Kt(k,L=>{g(a)?L(j):L(R,!1)})}ht(M,A)},$$slots:{default:!0}})}var F=gt(W,2),$=gt(at(F),2);ce($,21,()=>Array.from(g(f).map.entries()),fe,(I,M)=>{var E=nt(()=>$e(g(M),2));let A=()=>g(E)[0],k=()=>g(E)[1];const j=nt(()=>(A()-g(f).minTime)/(g(f).maxTime-g(f).minTime)),R=nt(()=>k().length/g(C)),L=nt(()=>.05+.95*g(R)*g(R));var U=Kn();let K;yt(()=>K=kt(U,"",K,{left:`${g(j)*100}%`,opacity:g(L)})),ht(I,U)}),it($);var H=gt($,2);let ft;var Q=gt(H,2);ce(Q,21,()=>g(d),fe,(I,M)=>{var E=Qn();let A;var k=at(E,!0);it(E),yt(()=>{A=kt(E,"",A,{left:`${g(M).x*100}%`}),It(k,g(M).label)}),ht(I,E)}),it(Q);var ot=gt(Q,2);{var wt=I=>{var M=Jn();let E;var A=at(M),k=at(A,!0);it(A);var j=gt(A,2),R=at(j);it(j),it(M),yt(L=>{E=kt(M,"",E,{left:`${g(c).x??""}px`}),It(k,L),It(R,`${g(c).count??""} ${g(c).count===1?"entity":"entities"}`)},[()=>g(c).date.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]),ht(I,M)};Kt(ot,I=>{g(c)&&!g(r)&&I(wt)})}it(F),it(S),Ee(S,I=>q(n,I),()=>g(n)),yt(()=>ft=kt(H,"",ft,{left:`${g(v)*100}%`})),Tt("pointerdown",F,p),Tt("pointermove",F,s),Tt("pointerup",F,h),le("pointerleave",F,x),ht(t,S),Ft()}Ae(["pointerdown","pointermove","pointerup"]);var ti=Dt("<!> <!> <!>",1);function yi(t,e){Bt(e,!0),se.showGraph();let n=pt(null);const i=nt(()=>{const f=new Map;for(const C of Wt.repos)for(const d of C.entities)f.set(d.id,d.title);return f}),r=nt(()=>{const f=[];for(const C of Wt.repos)for(const d of C.entities)d.id.toLowerCase().startsWith("readme")||f.push(d);return f}),a=nt(()=>{const f=[],C=[],d=new Set,v=new Set,b=g(n)?.getTime()??1/0;for(const s of Wt.repos)for(const h of s.entities){if(h.id.toLowerCase().startsWith("readme")||d.has(h.id)||(h.createdAt?new Date(h.createdAt).getTime():0)>b)continue;d.add(h.id),f.push({id:h.id,type:h.entityType,repo:s.name});const D=h.wikilinks??[];for(const m of D){const N=h.id<m?`${h.id}|${m}`:`${m}|${h.id}`;!v.has(N)&&h.id!==m&&(v.add(N),C.push({source:h.id,target:m}))}}const p=C.filter(s=>d.has(s.source)&&d.has(s.target));return{nodes:f,edges:p}});var c=ti(),o=ke(c);tn(o,{activeView:"graph"});var u=gt(o,2);Yn(u,{get graphData(){return g(a)},get selectedEntityId(){return se.selectedId},get nameMap(){return g(i)},get filteredIds(){return Wt.filteredIds},get sidebarHoveredId(){return se.hoveredEntityId},get highlightedIds(){return an.highlightedIds}});var l=gt(u,2);$n(l,{get entities(){return g(r)},get currentDate(){return g(n)},onDateChange:f=>{q(n,f,!0)}}),ht(t,c),Ft()}export{yi as component};