studiograph 1.3.48-next.21 → 1.3.48-next.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/tools/message-tools.js +7 -3
- package/dist/agent/tools/message-tools.js.map +1 -1
- package/dist/server/routes/messages-api.js +134 -2
- package/dist/server/routes/messages-api.js.map +1 -1
- package/dist/server/ws-hub.d.ts +23 -4
- package/dist/server/ws-hub.js +4 -0
- package/dist/server/ws-hub.js.map +1 -1
- package/dist/services/message-service.d.ts +40 -5
- package/dist/services/message-service.js +154 -6
- package/dist/services/message-service.js.map +1 -1
- package/dist/web/_app/immutable/assets/2.BT_zrekP.css +1 -0
- package/dist/web/_app/immutable/chunks/BA905oIh.js +2 -0
- package/dist/web/_app/immutable/chunks/{BGk8kfOE.js → C2yWcTgh.js} +2 -2
- package/dist/web/_app/immutable/chunks/{BFNNbCAM.js → C50QlEfb.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BIBCr278.js → CBxCHi8W.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DY8-EONP.js → CE5FBajK.js} +1 -1
- package/dist/web/_app/immutable/chunks/{-jG4Obyh.js → Ceu9tef6.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DujahU3W.js → CzvyORji.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CDRHrs0g.js → DDbu87xK.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CWyU-seV.js → DHouWzJA.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CPne482a.js → DKVwX-g0.js} +1 -1
- package/dist/web/_app/immutable/chunks/{pBTf4stg.js → DeTlzd-_.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BzJTZOK2.js → DgdJAo4A.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BEn6N5c2.js → YxOzuzo0.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CN5_py1I.js → hKIlbeTO.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DKaafS50.js → tlhR7r2b.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.ZHiTM8WS.js → app.xtJS_T6-.js} +2 -2
- package/dist/web/_app/immutable/entry/start.CplP4Tta.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.D92Orz8k.js → 0.CXKwjs4U.js} +2 -2
- package/dist/web/_app/immutable/nodes/{1.BMdyglM_.js → 1.DNx5LZv1.js} +1 -1
- package/dist/web/_app/immutable/nodes/{10.BilVDHSL.js → 10.12cppxWZ.js} +1 -1
- package/dist/web/_app/immutable/nodes/{11.CS9E0Hic.js → 11.uVqRL_He.js} +1 -1
- package/dist/web/_app/immutable/nodes/{12.D3BOxYzG.js → 12.Cm9ETZkQ.js} +1 -1
- package/dist/web/_app/immutable/nodes/{13.CClMKYtN.js → 13.CmoH0CCC.js} +1 -1
- package/dist/web/_app/immutable/nodes/2.BVueWdeX.js +267 -0
- package/dist/web/_app/immutable/nodes/{3.C5n5uiWU.js → 3.B7iHCEWu.js} +3 -3
- package/dist/web/_app/immutable/nodes/{4.DcGVvgiL.js → 4.B52sGhtq.js} +3 -3
- package/dist/web/_app/immutable/nodes/{5.DxIjnFQO.js → 5.CNrv7A5m.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.lkh6kKLj.js → 6.lTIzFo68.js} +1 -1
- package/dist/web/_app/immutable/nodes/{7.Bg7SbfhA.js → 7.Ea5Cjcvm.js} +1 -1
- package/dist/web/_app/immutable/nodes/{8.DcXWCNBE.js → 8.CVTUi9tC.js} +1 -1
- package/dist/web/_app/immutable/nodes/{9.Cefi8Jfm.js → 9.CGLfUHbZ.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/dist/web/_app/immutable/assets/2.DpQWr6q6.css +0 -1
- package/dist/web/_app/immutable/chunks/UwYfmrPx.js +0 -2
- package/dist/web/_app/immutable/entry/start.C9-FfAVc.js +0 -1
- package/dist/web/_app/immutable/nodes/2.C8KKElPL.js +0 -267
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BB_5th5W.js","./PPVm8Dsz.js","./CqkleIqs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as en}from"./PPVm8Dsz.js";import"./DsnmJJEf.js";import{p as nn,aG as rn,u as Et,g as x,a4 as Nt,aC as on,aE as sn,t as re,b as an,a3 as V,c as Y,s as ht,w as gt,r as X,v as ln}from"./C3uBrOS5.js";import{d as cn,g as wt,a as ie,b as le,s as vt,e as Ce}from"./W25ZVI8L.js";import{i as fn,b as un}from"./D5aIYSkd.js";import{e as hn,i as dn}from"./-jG4Obyh.js";import{s as ke,r as At}from"./DkoHPElM.js";import{s as pn}from"./B8ydT5xX.js";import{b as It}from"./ZD6ARAtb.js";import{p as oe}from"./FBn-ES5k.js";import{g as gn}from"./BEn6N5c2.js";import{e as _t,f as vn}from"./BFZZEUd5.js";function yn(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,r){if(isNaN(e)||isNaN(n))return t;var i,s=t._root,f={data:r},o=t._x0,v=t._y0,l=t._x1,y=t._y1,C,b,u,M,h,a,d,m;if(!s)return t._root=f,t;for(;s.length;)if((h=e>=(C=(o+l)/2))?o=C:l=C,(a=n>=(b=(v+y)/2))?v=b:y=b,i=s,!(s=s[d=a<<1|h]))return i[d]=f,t;if(u=+t._x.call(null,s.data),M=+t._y.call(null,s.data),e===u&&n===M)return f.next=s,i?i[d]=f:t._root=f,t;do i=i?i[d]=new Array(4):t._root=new Array(4),(h=e>=(C=(o+l)/2))?o=C:l=C,(a=n>=(b=(v+y)/2))?v=b:y=b;while((d=a<<1|h)===(m=(M>=b)<<1|u>=C));return i[m]=s,i[d]=f,t}function xn(t){var e,n,r=t.length,i,s,f=new Array(r),o=new Array(r),v=1/0,l=1/0,y=-1/0,C=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(s=+this._y.call(null,e))||(f[n]=i,o[n]=s,i<v&&(v=i),i>y&&(y=i),s<l&&(l=s),s>C&&(C=s));if(v>y||l>C)return this;for(this.cover(v,l).cover(y,C),n=0;n<r;++n)Le(this,f[n],o[n],t[n]);return this}function mn(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,s=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,s=(r=Math.floor(e))+1;else{for(var f=i-n||1,o=this._root,v,l;n>t||t>=i||r>e||e>=s;)switch(l=(e<r)<<1|t<n,v=new Array(4),v[l]=o,o=v,f*=2,l){case 0:i=n+f,s=r+f;break;case 1:n=i-f,s=r+f;break;case 2:i=n+f,r=s-f;break;case 3:n=i-f,r=s-f;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=r,this._x1=i,this._y1=s,this}function wn(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function _n(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 J(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function bn(t,e,n){var r,i=this._x0,s=this._y0,f,o,v,l,y=this._x1,C=this._y1,b=[],u=this._root,M,h;for(u&&b.push(new J(u,i,s,y,C)),n==null?n=1/0:(i=t-n,s=e-n,y=t+n,C=e+n,n*=n);M=b.pop();)if(!(!(u=M.node)||(f=M.x0)>y||(o=M.y0)>C||(v=M.x1)<i||(l=M.y1)<s))if(u.length){var a=(f+v)/2,d=(o+l)/2;b.push(new J(u[3],a,d,v,l),new J(u[2],f,d,a,l),new J(u[1],a,o,v,d),new J(u[0],f,o,a,d)),(h=(e>=d)<<1|t>=a)&&(M=b[b.length-1],b[b.length-1]=b[b.length-1-h],b[b.length-1-h]=M)}else{var m=t-+this._x.call(null,u.data),I=e-+this._y.call(null,u.data),_=m*m+I*I;if(_<n){var L=Math.sqrt(n=_);i=t-L,s=e-L,y=t+L,C=e+L,r=u.data}}return r}function Mn(t){if(isNaN(y=+this._x.call(null,t))||isNaN(C=+this._y.call(null,t)))return this;var e,n=this._root,r,i,s,f=this._x0,o=this._y0,v=this._x1,l=this._y1,y,C,b,u,M,h,a,d;if(!n)return this;if(n.length)for(;;){if((M=y>=(b=(f+v)/2))?f=b:v=b,(h=C>=(u=(o+l)/2))?o=u:l=u,e=n,!(n=n[a=h<<1|M]))return this;if(!n.length)break;(e[a+1&3]||e[a+2&3]||e[a+3&3])&&(r=e,d=a)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,i?(s?i.next=s:delete i.next,this):e?(s?e[a]=s:delete e[a],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[d]=n:this._root=n),this):(this._root=s,this)}function Cn(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function kn(){return this._root}function Nn(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function An(t){var e=[],n,r=this._root,i,s,f,o,v;for(r&&e.push(new J(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,s=n.x0,f=n.y0,o=n.x1,v=n.y1)&&r.length){var l=(s+o)/2,y=(f+v)/2;(i=r[3])&&e.push(new J(i,l,y,o,v)),(i=r[2])&&e.push(new J(i,s,y,l,v)),(i=r[1])&&e.push(new J(i,l,f,o,y)),(i=r[0])&&e.push(new J(i,s,f,l,y))}return this}function In(t){var e=[],n=[],r;for(this._root&&e.push(new J(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var s,f=r.x0,o=r.y0,v=r.x1,l=r.y1,y=(f+v)/2,C=(o+l)/2;(s=i[0])&&e.push(new J(s,f,o,y,C)),(s=i[1])&&e.push(new J(s,y,o,v,C)),(s=i[2])&&e.push(new J(s,f,C,y,l)),(s=i[3])&&e.push(new J(s,y,C,v,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Sn(t){return t[0]}function Tn(t){return arguments.length?(this._x=t,this):this._x}function Dn(t){return t[1]}function Pn(t){return arguments.length?(this._y=t,this):this._y}function ce(t,e,n){var r=new fe(e??Sn,n??Dn,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function fe(t,e,n,r,i,s){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=s,this._root=void 0}function Ne(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var q=ce.prototype=fe.prototype;q.copy=function(){var t=new fe(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=Ne(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=Ne(r));return t};q.add=yn;q.addAll=xn;q.cover=mn;q.data=wn;q.extent=_n;q.find=bn;q.remove=Mn;q.removeAll=Cn;q.root=kn;q.size=Nn;q.visit=An;q.visitAfter=In;q.x=Tn;q.y=Pn;function Z(t){return function(){return t}}function yt(t){return(t()-.5)*1e-6}function En(t){return t.x+t.vx}function zn(t){return t.y+t.vy}function Ae(t){var e,n,r,i=1,s=1;typeof t!="function"&&(t=Z(t==null?1:+t));function f(){for(var l,y=e.length,C,b,u,M,h,a,d=0;d<s;++d)for(C=ce(e,En,zn).visitAfter(o),l=0;l<y;++l)b=e[l],h=n[b.index],a=h*h,u=b.x+b.vx,M=b.y+b.vy,C.visit(m);function m(I,_,L,S,O){var T=I.data,G=I.r,F=h+G;if(T){if(T.index>b.index){var ot=u-T.x-T.vx,U=M-T.y-T.vy,j=ot*ot+U*U;j<F*F&&(ot===0&&(ot=yt(r),j+=ot*ot),U===0&&(U=yt(r),j+=U*U),j=(F-(j=Math.sqrt(j)))/j*i,b.vx+=(ot*=j)*(F=(G*=G)/(a+G)),b.vy+=(U*=j)*F,T.vx-=ot*(F=1-F),T.vy-=U*F)}return}return _>u+F||S<u-F||L>M+F||O<M-F}}function o(l){if(l.data)return l.r=n[l.data.index];for(var y=l.r=0;y<4;++y)l[y]&&l[y].r>l.r&&(l.r=l[y].r)}function v(){if(e){var l,y=e.length,C;for(n=new Array(y),l=0;l<y;++l)C=e[l],n[C.index]=+t(C,l,e)}}return f.initialize=function(l,y){e=l,r=y,v()},f.iterations=function(l){return arguments.length?(s=+l,f):s},f.strength=function(l){return arguments.length?(i=+l,f):i},f.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Z(+l),v(),f):t},f}function Rn(t){return t.index}function Ie(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Se(t){var e=Rn,n=C,r,i=Z(30),s,f,o,v,l,y=1;t==null&&(t=[]);function C(a){return 1/Math.min(o[a.source.index],o[a.target.index])}function b(a){for(var d=0,m=t.length;d<y;++d)for(var I=0,_,L,S,O,T,G,F;I<m;++I)_=t[I],L=_.source,S=_.target,O=S.x+S.vx-L.x-L.vx||yt(l),T=S.y+S.vy-L.y-L.vy||yt(l),G=Math.sqrt(O*O+T*T),G=(G-s[I])/G*a*r[I],O*=G,T*=G,S.vx-=O*(F=v[I]),S.vy-=T*F,L.vx+=O*(F=1-F),L.vy+=T*F}function u(){if(f){var a,d=f.length,m=t.length,I=new Map(f.map((L,S)=>[e(L,S,f),L])),_;for(a=0,o=new Array(d);a<m;++a)_=t[a],_.index=a,typeof _.source!="object"&&(_.source=Ie(I,_.source)),typeof _.target!="object"&&(_.target=Ie(I,_.target)),o[_.source.index]=(o[_.source.index]||0)+1,o[_.target.index]=(o[_.target.index]||0)+1;for(a=0,v=new Array(m);a<m;++a)_=t[a],v[a]=o[_.source.index]/(o[_.source.index]+o[_.target.index]);r=new Array(m),M(),s=new Array(m),h()}}function M(){if(f)for(var a=0,d=t.length;a<d;++a)r[a]=+n(t[a],a,t)}function h(){if(f)for(var a=0,d=t.length;a<d;++a)s[a]=+i(t[a],a,t)}return b.initialize=function(a,d){f=a,l=d,u()},b.links=function(a){return arguments.length?(t=a,u(),b):t},b.id=function(a){return arguments.length?(e=a,b):e},b.iterations=function(a){return arguments.length?(y=+a,b):y},b.strength=function(a){return arguments.length?(n=typeof a=="function"?a:Z(+a),M(),b):n},b.distance=function(a){return arguments.length?(i=typeof a=="function"?a:Z(+a),h(),b):i},b}var Fn={value:()=>{}};function $e(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Yt(n)}function Yt(t){this._=t}function Ln(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Yt.prototype=$e.prototype={constructor:Yt,on:function(t,e){var n=this._,r=Ln(t+"",n),i,s=-1,f=r.length;if(arguments.length<2){for(;++s<f;)if((i=(t=r[s]).type)&&(i=$n(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<f;)if(i=(t=r[s]).type)n[i]=Te(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Te(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Yt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,i=s.length;r<i;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,s=r.length;i<s;++i)r[i].value.apply(e,n)}};function $n(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Te(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Fn,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var St=0,Rt=0,zt=0,Oe=1e3,jt,Ft,Gt=0,bt=0,Ut=0,Lt=typeof performance=="object"&&performance.now?performance:Date,Xe=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ye(){return bt||(Xe(On),bt=Lt.now()+Ut)}function On(){bt=0}function se(){this._call=this._time=this._next=null}se.prototype=je.prototype={constructor:se,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ye():+n)+(e==null?0:+e),!this._next&&Ft!==this&&(Ft?Ft._next=this:jt=this,Ft=this),this._call=t,this._time=n,ae()},stop:function(){this._call&&(this._call=null,this._time=1/0,ae())}};function je(t,e,n){var r=new se;return r.restart(t,e,n),r}function Xn(){Ye(),++St;for(var t=jt,e;t;)(e=bt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--St}function De(){bt=(Gt=Lt.now())+Ut,St=Rt=0;try{Xn()}finally{St=0,jn(),bt=0}}function Yn(){var t=Lt.now(),e=t-Gt;e>Oe&&(Ut-=e,Gt=t)}function jn(){for(var t,e=jt,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:jt=n);Ft=t,ae(r)}function ae(t){if(!St){Rt&&(Rt=clearTimeout(Rt));var e=t-bt;e>24?(t<1/0&&(Rt=setTimeout(De,t-Lt.now()-Ut)),zt&&(zt=clearInterval(zt))):(zt||(Gt=Lt.now(),zt=setInterval(Yn,Oe)),St=1,Xe(De))}}const Gn=1664525,Un=1013904223,Pe=4294967296;function Hn(){let t=1;return()=>(t=(Gn*t+Un)%Pe)/Pe}function Wn(t){return t.x}function Bn(t){return t.y}var Vn=10,Qn=Math.PI*(3-Math.sqrt(5));function Ee(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),s=0,f=.6,o=new Map,v=je(C),l=$e("tick","end"),y=Hn();t==null&&(t=[]);function C(){b(),l.call("tick",e),n<r&&(v.stop(),l.call("end",e))}function b(h){var a,d=t.length,m;h===void 0&&(h=1);for(var I=0;I<h;++I)for(n+=(s-n)*i,o.forEach(function(_){_(n)}),a=0;a<d;++a)m=t[a],m.fx==null?m.x+=m.vx*=f:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=f:(m.y=m.fy,m.vy=0);return e}function u(){for(var h=0,a=t.length,d;h<a;++h){if(d=t[h],d.index=h,d.fx!=null&&(d.x=d.fx),d.fy!=null&&(d.y=d.fy),isNaN(d.x)||isNaN(d.y)){var m=Vn*Math.sqrt(.5+h),I=h*Qn;d.x=m*Math.cos(I),d.y=m*Math.sin(I)}(isNaN(d.vx)||isNaN(d.vy))&&(d.vx=d.vy=0)}}function M(h){return h.initialize&&h.initialize(t,y),h}return u(),e={tick:b,restart:function(){return v.restart(C),e},stop:function(){return v.stop(),e},nodes:function(h){return arguments.length?(t=h,u(),o.forEach(M),e):t},alpha:function(h){return arguments.length?(n=+h,e):n},alphaMin:function(h){return arguments.length?(r=+h,e):r},alphaDecay:function(h){return arguments.length?(i=+h,e):+i},alphaTarget:function(h){return arguments.length?(s=+h,e):s},velocityDecay:function(h){return arguments.length?(f=1-h,e):1-f},randomSource:function(h){return arguments.length?(y=h,o.forEach(M),e):y},force:function(h,a){return arguments.length>1?(a==null?o.delete(h):o.set(h,M(a)),e):o.get(h)},find:function(h,a,d){var m=0,I=t.length,_,L,S,O,T;for(d==null?d=1/0:d*=d,m=0;m<I;++m)O=t[m],_=h-O.x,L=a-O.y,S=_*_+L*L,S<d&&(T=O,d=S);return T},on:function(h,a){return arguments.length>1?(l.on(h,a),e):l.on(h)}}}function ze(){var t,e,n,r,i=Z(-30),s,f=1,o=1/0,v=.81;function l(u){var M,h=t.length,a=ce(t,Wn,Bn).visitAfter(C);for(r=u,M=0;M<h;++M)e=t[M],a.visit(b)}function y(){if(t){var u,M=t.length,h;for(s=new Array(M),u=0;u<M;++u)h=t[u],s[h.index]=+i(h,u,t)}}function C(u){var M=0,h,a,d=0,m,I,_;if(u.length){for(m=I=_=0;_<4;++_)(h=u[_])&&(a=Math.abs(h.value))&&(M+=h.value,d+=a,m+=a*h.x,I+=a*h.y);u.x=m/d,u.y=I/d}else{h=u,h.x=h.data.x,h.y=h.data.y;do M+=s[h.data.index];while(h=h.next)}u.value=M}function b(u,M,h,a){if(!u.value)return!0;var d=u.x-e.x,m=u.y-e.y,I=a-M,_=d*d+m*m;if(I*I/v<_)return _<o&&(d===0&&(d=yt(n),_+=d*d),m===0&&(m=yt(n),_+=m*m),_<f&&(_=Math.sqrt(f*_)),e.vx+=d*u.value*r/_,e.vy+=m*u.value*r/_),!0;if(u.length||_>=o)return;(u.data!==e||u.next)&&(d===0&&(d=yt(n),_+=d*d),m===0&&(m=yt(n),_+=m*m),_<f&&(_=Math.sqrt(f*_)));do u.data!==e&&(I=s[u.data.index]*r/_,e.vx+=d*I,e.vy+=m*I);while(u=u.next)}return l.initialize=function(u,M){t=u,n=M,y()},l.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Z(+u),y(),l):i},l.distanceMin=function(u){return arguments.length?(f=u*u,l):Math.sqrt(f)},l.distanceMax=function(u){return arguments.length?(o=u*u,l):Math.sqrt(o)},l.theta=function(u){return arguments.length?(v=u*u,l):Math.sqrt(v)},l}function Re(t){var e=Z(.1),n,r,i;typeof t!="function"&&(t=Z(t==null?0:+t));function s(o){for(var v=0,l=n.length,y;v<l;++v)y=n[v],y.vx+=(i[v]-y.x)*r[v]*o}function f(){if(n){var o,v=n.length;for(r=new Array(v),i=new Array(v),o=0;o<v;++o)r[o]=isNaN(i[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,f()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:Z(+o),f(),s):e},s.x=function(o){return arguments.length?(t=typeof o=="function"?o:Z(+o),f(),s):t},s}function Fe(t){var e=Z(.1),n,r,i;typeof t!="function"&&(t=Z(t==null?0:+t));function s(o){for(var v=0,l=n.length,y;v<l;++v)y=n[v],y.vy+=(i[v]-y.y)*r[v]*o}function f(){if(n){var o,v=n.length;for(r=new Array(v),i=new Array(v),o=0;o<v;++o)r[o]=isNaN(i[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,f()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:Z(+o),f(),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:Z(+o),f(),s):t},s}var Kn=le('<div class="debug-panel svelte-1i33fky"><label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="5" max="1000" step="5" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="0.5" max="5" step="0.1" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="30" max="500" step="10" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="0.01" max="0.5" step="0.01" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="-3000" max="-100" step="50" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="10" max="100" step="5" class="svelte-1i33fky"/></label> <div class="debug-actions svelte-1i33fky"><button class="svelte-1i33fky">Regenerate</button> <button class="svelte-1i33fky">Copy params</button></div></div>'),Jn=le('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),Zn=le('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><!> <div class="legend-panel svelte-1i33fky"></div></div></div>');function ur(t,e){nn(e,!0);let n=oe(e,"filteredIds",3,null),r=oe(e,"sidebarHoveredId",3,null),i=oe(e,"highlightedIds",3,null);const s=typeof window<"u"&&new URLSearchParams(window.location.search).get("debug")==="graph";let f=gt(500),o=gt(1.8),v=gt(100),l=gt(.1),y=gt(-750),C=gt(50),b=gt(0);const u=Nt(()=>{if(!s)return e.graphData;x(b);const c=["project","person","organization","meeting","decision","task","document","note","process","case-study","deal","reference","deliverable","practice-area"],g=Array.from({length:x(f)},(z,D)=>({id:`sim-${D}`,type:c[D%c.length],repo:`collection-${D%5}`})),p=[],k=Math.floor(x(f)*x(o));for(let z=0;z<k;z++){const D=Math.floor(Math.random()*x(f));let N=Math.floor(Math.random()*x(f));N===D&&(N=(D+1)%x(f)),p.push({source:`sim-${D}`,target:`sim-${N}`})}return{nodes:g,edges:p}}),M=Nt(()=>s?{linkDist:x(v),centerStr:x(l),chargeStr:x(y),collideR:x(C)}:null);function h(c){return e.nameMap?.get(c)??c.replace(/-/g," ").replace(/\b\w/g,g=>g.toUpperCase())}const a=rn("theme"),d=Nt(()=>a.current==="light"?{default:14211288,dim:15263976,conn:8947848,labelText:1710623}:{default:2763306,dim:1315860,conn:6710886,labelText:15592943}),m=Nt(()=>a.current==="light"?16316666:592139),I=.75;Et(()=>{a.current,Q&&(Q.style.fill=x(d).labelText,Q.style.stroke={color:x(m),width:5});const c=x(Xt);for(const g of T)_t(g.type)===kt&&(g.color=c);H()}),Et(()=>{n(),H()}),Et(()=>{i(),H()});function _(c){return{linkDist:100,centerStr:.1,chargeStr:-750,collideR:50}}let L=!1;Et(()=>{const c=x(u);if(x(M),!et||!B||!at)return;if(!L){L=!0;return}const g=new Map;for(const w of c.edges)g.set(w.source,(g.get(w.source)??0)+1),g.set(w.target,(g.get(w.target)??0)+1);const p=new Map;for(const w of T)p.set(w.id,{x:w.x,y:w.y});const z=3600*c.nodes.length,D=Math.sqrt(z);Math.max(0,...g.values());const N=c.nodes.map(w=>{const E=g.get(w.id)??0,ut=p.get(w.id);return{id:w.id,type:w.type,repo:w.repo,color:_t(w.type)===kt?x(Xt):_t(w.type),weight:E,x:ut?.x??(Math.random()-.5)*D,y:ut?.y??(Math.random()-.5)*D,vx:0,vy:0,r:ve()}}),R=new Map;for(const w of N)R.set(w.id,w);const K=new Set(lt.keys()),$=new Set(c.nodes.map(w=>w.id));for(const w of K)if(!$.has(w)){const E=lt.get(w);E&&(E.parent===pt?pt.removeChild(E):at.removeChild(E),E.destroy()),lt.delete(w)}let A=null;if(lt.size>0&&(A=lt.values().next().value?.texture),!A){const w=document.createElement("canvas");w.width=100,w.height=100;const E=w.getContext("2d");E.beginPath(),E.arc(50,50,48,0,Math.PI*2),E.fillStyle="#ffffff",E.fill(),A=et.Texture.from(w)}for(const w of N){let E=lt.get(w.id);E||(E=new et.Sprite(A),E.anchor.set(.5),at.addChild(E),lt.set(w.id,E)),E.tint=Qt(w.color)}T=N,O?.stop();const it=c.edges.map(w=>({source:w.source,target:w.target})),nt=x(M)??_(T.length),P=Se(it).id(w=>w.id).distance(nt.linkDist);O=Ee(T).force("link",P).force("charge",ze().strength(nt.chargeStr).distanceMin(30)).force("x",Re(0).strength(nt.centerStr)).force("y",Fe(0).strength(nt.centerStr)).force("collide",Ae().radius(nt.collideR).strength(.5)).velocityDecay(.4).alpha(.3).on("tick",()=>{Ht||Vt(),H()}),G=P.links(),ct=null,$t(),H()}),Et(()=>{const c=r();if(c){const g=T.find(p=>p.id===c)??null;ct=g,$t(),rt=g?1:0}else st||(rt=0);H()});let S,O=null,T=[],G=[],F=!1,ot=0,U=0,j=0,tt=1,ct=null,st=null,Mt=gt(!1),ue=0,he=0,de=0,pe=0,dt=new Set,Ht=!1,Tt=gt(null),ft=0,rt=0;const ge=4;let B=null,Dt=null,Pt=null,at=null,pt=null,lt=new Map,Q=null,et=null;const Ge=5;function ve(c,g){return Ge}function Wt(c,g){const p=S.getBoundingClientRect();return{x:(c-p.left-U)/tt,y:(g-p.top-j)/tt}}function ye(c,g){for(let p=T.length-1;p>=0;p--){const k=T[p],z=c-k.x,D=g-k.y,N=(k.r*1.5+4)/tt;if(z*z+D*D<=N*N)return k}return null}let Bt=new Set;function $t(){const c=ct??null;if(at&&pt)for(const g of Bt){const p=lt.get(g);p&&p.parent===pt&&(pt.removeChild(p),at.addChild(p))}if(dt.clear(),Bt.clear(),!!c){dt.add(c.id);for(const g of G)g.source.id===c.id&&dt.add(g.target.id),g.target.id===c.id&&dt.add(g.source.id);if(Bt=new Set(dt),at&&pt)for(const g of dt){const p=lt.get(g);p&&p.parent===at&&(at.removeChild(p),pt.addChild(p))}}}function Vt(){if(T.length===0||!S)return;let c=1/0,g=-1/0,p=1/0,k=-1/0,z=0;for(const A of T)A.x<c&&(c=A.x),A.x>g&&(g=A.x),A.y<p&&(p=A.y),A.y>k&&(k=A.y),A.r>z&&(z=A.r);const D=S.clientWidth,N=S.clientHeight,R=g-c,K=k-p;if(R===0||K===0)return;const $=(60+z)*2;tt=Math.min((D-$)/R,(N-$)/K,3),U=D/2-(c+g)/2*tt,j=N/2-(p+k)/2*tt,H()}function H(){F=!0,ot=0}function Qt(c){return parseInt(c.replace("#",""),16)}function Ct(c,g,p){const k=(c>>16&255)+p*((g>>16&255)-(c>>16&255)),z=(c>>8&255)+p*((g>>8&255)-(c>>8&255)),D=(c&255)+p*((g&255)-(c&255));return Math.round(k)<<16|Math.round(z)<<8|Math.round(D)}function Ue(){if(!et||!Dt||!Pt)return;Dt.clear(),Pt.clear();const c=ct,g=c!==null,p=ft,k=x(Tt),z=i(),D=n(),N=x(d).default,R=x(d).dim,K=x(d).conn;for(let $=0;$<G.length;$++){const A=G[$],it=A.source.x*tt+U,nt=A.source.y*tt+j,P=A.target.x*tt+U,w=A.target.y*tt+j,E=g&&p>.01&&(A.source===c||A.target===c)&&dt.has(A.source.id)&&dt.has(A.target.id);let ut=N;g&&p>.01?ut=E?Ct(N,K,p):Ct(N,R,p):(k!==null||z!==null||D!==null)&&(ut=R);const mt=E?Pt:Dt;mt.setStrokeStyle({width:1,color:ut}),mt.moveTo(it,nt),mt.lineTo(P,w),mt.stroke()}}function He(){if(!et)return;const c=ct,g=c!==null,p=ft,k=x(Tt),z=i(),D=n();for(const N of T){const R=lt.get(N.id);if(!R)continue;const K=N.x*tt+U,$=N.y*tt+j;R.position.set(K,$),R.scale.set(N.r/50),R.alpha=1;const A=Qt(N.color);{const it=N===c,nt=g&&dt.has(N.id),P=k!==null&&(k==="other"?_t(N.type)===kt:N.type===k);if(it&&p>.01)R.tint=A;else if(nt)R.tint=A;else if(k!==null)R.tint=P?A:Ct(A,x(m),I);else if(z!==null){const E=z.has(N.id)?p*I:I;R.tint=Ct(A,x(m),E)}else if(D!==null){const E=D.has(N.id)?p*I:I;R.tint=Ct(A,x(m),E)}else R.tint=Ct(A,x(m),p*I)}}if(c&&p>.01&&Q){const N=c.x*tt+U,R=c.y*tt+j;Q.text=h(c.id),Q.style.fontSize=14,Q.position.set(N,R+c.r+8),Q.alpha=p,Q.visible=!0}else Q&&(Q.visible=!1)}let Ot=!1;function We(c){if(c.button!==0)return;Ot=!1;const g=Wt(c.clientX,c.clientY),p=ye(g.x,g.y);p?(st=p,Ht=!0,p.fx=p.x,p.fy=p.y,O?.alphaTarget(.3).restart(),H()):(ht(Mt,!0),ue=c.clientX,he=c.clientY,de=U,pe=j),S.setPointerCapture(c.pointerId),window.addEventListener("pointerup",Kt,{once:!0})}function Be(c){if(st){Ot=!0;const g=Wt(c.clientX,c.clientY);st.fx=g.x,st.fy=g.y,H()}else if(x(Mt))Ot=!0,U=de+(c.clientX-ue),j=pe+(c.clientY-he),H();else{const g=Wt(c.clientX,c.clientY),p=ye(g.x,g.y);p?p!==ct?(ct&&(ft=.15),ct=p,$t(),rt=1,S.style.cursor="pointer",H()):rt!==1&&(rt=1,S.style.cursor="pointer",H()):rt!==0&&(rt=0,S.style.cursor="grab",H())}}function Kt(c){if(!st&&!x(Mt))return;window.removeEventListener("pointerup",Kt);const g=Ot;if(st){const p=st;st.fx=null,st.fy=null,O?.alphaTarget(0),st=null,rt=0,H(),g||gn(`/${p.repo}/${p.type}/${p.id}`)}else x(Mt)&&ht(Mt,!1);try{S.releasePointerCapture(c.pointerId)}catch{}}const kt="#5c5c66",Ve="#b0b0b8",Xt=Nt(()=>a.current==="light"?Ve:kt),Qe=Nt(()=>{const c=new Map;for(const k of x(u).nodes)c.set(k.type,(c.get(k.type)??0)+1);const g=[];let p=0;for(const[k,z]of c){const D=_t(k);D===kt?p+=z:g.push({name:k,color:D,count:z})}return g.sort((k,z)=>z.count-k.count),p>0&&g.push({name:"other",color:x(Xt),count:p}),g});on(async()=>{et=await en(()=>import("./BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url),B=new et.Application,await B.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:S}),S.insertBefore(B.canvas,S.firstChild),B.canvas.style.position="absolute",B.canvas.style.inset="0",Dt=new et.Graphics,B.stage.addChild(Dt),at=new et.Container,B.stage.addChild(at),Pt=new et.Graphics,B.stage.addChild(Pt),pt=new et.Container,B.stage.addChild(pt);const c=document.createElement("canvas");c.width=100,c.height=100;const g=c.getContext("2d");g.beginPath(),g.arc(50,50,48,0,Math.PI*2),g.fillStyle="#ffffff",g.fill();const p=et.Texture.from(c),k=new Map;for(const P of x(u).edges)k.set(P.source,(k.get(P.source)??0)+1),k.set(P.target,(k.get(P.target)??0)+1);const z=new Map,N=3600*x(u).nodes.length,R=Math.sqrt(N);Math.max(0,...k.values()),T=x(u).nodes.map(P=>{const w=k.get(P.id)??0,E={id:P.id,type:P.type,repo:P.repo,color:_t(P.type)===kt?x(Xt):_t(P.type),weight:w,x:(Math.random()-.5)*R,y:(Math.random()-.5)*R,vx:0,vy:0,r:ve()};return z.set(P.id,E),E});for(const P of T){const w=new et.Sprite(p);w.anchor.set(.5),w.tint=Qt(P.color),at.addChild(w),lt.set(P.id,w)}Q=new et.Text({text:"",style:{fontFamily:"IBM Plex Sans, system-ui, sans-serif",fontWeight:"400",fontSize:12,fill:x(d).labelText,align:"center",stroke:{color:x(m),width:5}}}),Q.anchor.set(.5,0),Q.visible=!1,B.stage.addChild(Q);const K=x(u).edges.map(P=>({source:P.source,target:P.target})),$=x(M)??_(),A=Se(K).id(P=>P.id).distance($.linkDist);O=Ee(T).force("link",A).force("charge",ze().strength($.chargeStr).distanceMin(30)).force("x",Re(0).strength($.centerStr)).force("y",Fe(0).strength($.centerStr)).force("collide",Ae().radius($.collideR).strength(.5)).velocityDecay(.4).alpha(1).on("tick",()=>{Ht||Vt(),H()}),G=A.links();let it=0;B.ticker.add(()=>{const P=performance.now(),w=it?Math.min((P-it)/1e3,.05):.016;it=P,ft<rt?(ft=Math.min(rt,ft+ge*w),F=!0):ft>rt&&(ft=Math.max(rt,ft-ge*w),F=!0),ft===0&&rt===0&&ct&&!st&&(ct=null,$t(),F=!0),(F||ot<120)&&(Ue(),He(),F=!1,ot++)});const nt=new ResizeObserver(()=>{B.renderer.resize(S.clientWidth,S.clientHeight),Vt()});return nt.observe(S),()=>{nt.disconnect()}}),sn(()=>{O?.stop(),B&&(B.destroy(!0,{children:!0}),B=null)});var Jt=Zn(),xt=Y(Jt);let xe;var me=Y(xt);{var Ke=c=>{var g=Kn(),p=Y(g),k=Y(p),z=Y(k);X(k);var D=V(k);At(D),X(p);var N=V(p,2),R=Y(N),K=Y(R);X(R);var $=V(R);At($),X(N);var A=V(N,2),it=Y(A),nt=Y(it);X(it);var P=V(it);At(P),X(A);var w=V(A,2),E=Y(w),ut=Y(E);X(E);var mt=V(E);At(mt),X(w);var qt=V(w,2),te=Y(qt),Je=Y(te);X(te);var we=V(te);At(we),X(qt);var ee=V(qt,2),ne=Y(ee),Ze=Y(ne);X(ne);var _e=V(ne);At(_e),X(ee);var be=V(ee,2),Me=Y(be),qe=V(Me,2);X(be),X(g),re((W,tn)=>{vt(z,`Nodes: ${x(f)??""}`),vt(K,`Edges/node: ${W??""}`),vt(nt,`Link dist: ${x(v)??""}`),vt(ut,`Center: ${tn??""}`),vt(Je,`Charge: ${x(y)??""}`),vt(Ze,`Collide R: ${x(C)??""}`)},[()=>x(o).toFixed(1),()=>x(l).toFixed(2)]),wt("pointerdown",g,W=>W.stopPropagation()),It(D,()=>x(f),W=>ht(f,W)),It($,()=>x(o),W=>ht(o,W)),It(P,()=>x(v),W=>ht(v,W)),It(mt,()=>x(l),W=>ht(l,W)),It(we,()=>x(y),W=>ht(y,W)),It(_e,()=>x(C),W=>ht(C,W)),wt("click",Me,()=>{ln(b)}),wt("click",qe,()=>{const W=`forceParams(${x(f)}) = { linkDist: ${x(v)}, centerStr: ${x(l)}, chargeStr: ${x(y)}, collideR: ${x(C)} }`;navigator.clipboard.writeText(W)}),ie(c,g)};fn(me,c=>{s&&c(Ke)})}var Zt=V(me,2);hn(Zt,21,()=>x(Qe),dn,(c,g)=>{var p=Jn();let k;var z=Y(p);let D;var N=V(z,2),R=Y(N,!0);X(N);var K=V(N,2),$=Y(K,!0);X(K),X(p),re(A=>{k=pn(p,1,"legend-item svelte-1i33fky",null,k,{"legend-item-active":x(Tt)===x(g).name}),D=ke(z,"",D,{background:x(g).color}),vt(R,A),vt($,x(g).count)},[()=>vn(x(g).name)]),Ce("mouseenter",p,()=>{ht(Tt,x(g).name,!0),H()}),Ce("mouseleave",p,()=>{ht(Tt,null),H()}),ie(c,p)}),X(Zt),X(xt),un(xt,c=>S=c,()=>S),X(Jt),re(()=>xe=ke(xt,"",xe,{cursor:x(Mt)?"grabbing":"grab"})),wt("pointerdown",xt,We),wt("pointermove",xt,Be),wt("pointerup",xt,Kt),wt("pointerdown",Zt,c=>c.stopPropagation()),ie(t,Jt),an()}cn(["pointerdown","pointermove","pointerup","click"]);export{ur as G};
|
|
2
|
+
import{_ as en}from"./PPVm8Dsz.js";import"./DsnmJJEf.js";import{p as nn,aG as rn,u as Et,g as x,a4 as Nt,aC as on,aE as sn,t as re,b as an,a3 as V,c as Y,s as ht,w as gt,r as X,v as ln}from"./C3uBrOS5.js";import{d as cn,g as wt,a as ie,b as le,s as vt,e as Ce}from"./W25ZVI8L.js";import{i as fn,b as un}from"./D5aIYSkd.js";import{e as hn,i as dn}from"./Ceu9tef6.js";import{s as ke,r as At}from"./DkoHPElM.js";import{s as pn}from"./B8ydT5xX.js";import{b as It}from"./ZD6ARAtb.js";import{p as oe}from"./FBn-ES5k.js";import{g as gn}from"./YxOzuzo0.js";import{e as _t,f as vn}from"./BFZZEUd5.js";function yn(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,r){if(isNaN(e)||isNaN(n))return t;var i,s=t._root,f={data:r},o=t._x0,v=t._y0,l=t._x1,y=t._y1,C,b,u,M,h,a,d,m;if(!s)return t._root=f,t;for(;s.length;)if((h=e>=(C=(o+l)/2))?o=C:l=C,(a=n>=(b=(v+y)/2))?v=b:y=b,i=s,!(s=s[d=a<<1|h]))return i[d]=f,t;if(u=+t._x.call(null,s.data),M=+t._y.call(null,s.data),e===u&&n===M)return f.next=s,i?i[d]=f:t._root=f,t;do i=i?i[d]=new Array(4):t._root=new Array(4),(h=e>=(C=(o+l)/2))?o=C:l=C,(a=n>=(b=(v+y)/2))?v=b:y=b;while((d=a<<1|h)===(m=(M>=b)<<1|u>=C));return i[m]=s,i[d]=f,t}function xn(t){var e,n,r=t.length,i,s,f=new Array(r),o=new Array(r),v=1/0,l=1/0,y=-1/0,C=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(s=+this._y.call(null,e))||(f[n]=i,o[n]=s,i<v&&(v=i),i>y&&(y=i),s<l&&(l=s),s>C&&(C=s));if(v>y||l>C)return this;for(this.cover(v,l).cover(y,C),n=0;n<r;++n)Le(this,f[n],o[n],t[n]);return this}function mn(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,s=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,s=(r=Math.floor(e))+1;else{for(var f=i-n||1,o=this._root,v,l;n>t||t>=i||r>e||e>=s;)switch(l=(e<r)<<1|t<n,v=new Array(4),v[l]=o,o=v,f*=2,l){case 0:i=n+f,s=r+f;break;case 1:n=i-f,s=r+f;break;case 2:i=n+f,r=s-f;break;case 3:n=i-f,r=s-f;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=r,this._x1=i,this._y1=s,this}function wn(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function _n(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 J(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function bn(t,e,n){var r,i=this._x0,s=this._y0,f,o,v,l,y=this._x1,C=this._y1,b=[],u=this._root,M,h;for(u&&b.push(new J(u,i,s,y,C)),n==null?n=1/0:(i=t-n,s=e-n,y=t+n,C=e+n,n*=n);M=b.pop();)if(!(!(u=M.node)||(f=M.x0)>y||(o=M.y0)>C||(v=M.x1)<i||(l=M.y1)<s))if(u.length){var a=(f+v)/2,d=(o+l)/2;b.push(new J(u[3],a,d,v,l),new J(u[2],f,d,a,l),new J(u[1],a,o,v,d),new J(u[0],f,o,a,d)),(h=(e>=d)<<1|t>=a)&&(M=b[b.length-1],b[b.length-1]=b[b.length-1-h],b[b.length-1-h]=M)}else{var m=t-+this._x.call(null,u.data),I=e-+this._y.call(null,u.data),_=m*m+I*I;if(_<n){var L=Math.sqrt(n=_);i=t-L,s=e-L,y=t+L,C=e+L,r=u.data}}return r}function Mn(t){if(isNaN(y=+this._x.call(null,t))||isNaN(C=+this._y.call(null,t)))return this;var e,n=this._root,r,i,s,f=this._x0,o=this._y0,v=this._x1,l=this._y1,y,C,b,u,M,h,a,d;if(!n)return this;if(n.length)for(;;){if((M=y>=(b=(f+v)/2))?f=b:v=b,(h=C>=(u=(o+l)/2))?o=u:l=u,e=n,!(n=n[a=h<<1|M]))return this;if(!n.length)break;(e[a+1&3]||e[a+2&3]||e[a+3&3])&&(r=e,d=a)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,i?(s?i.next=s:delete i.next,this):e?(s?e[a]=s:delete e[a],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[d]=n:this._root=n),this):(this._root=s,this)}function Cn(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function kn(){return this._root}function Nn(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function An(t){var e=[],n,r=this._root,i,s,f,o,v;for(r&&e.push(new J(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,s=n.x0,f=n.y0,o=n.x1,v=n.y1)&&r.length){var l=(s+o)/2,y=(f+v)/2;(i=r[3])&&e.push(new J(i,l,y,o,v)),(i=r[2])&&e.push(new J(i,s,y,l,v)),(i=r[1])&&e.push(new J(i,l,f,o,y)),(i=r[0])&&e.push(new J(i,s,f,l,y))}return this}function In(t){var e=[],n=[],r;for(this._root&&e.push(new J(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var s,f=r.x0,o=r.y0,v=r.x1,l=r.y1,y=(f+v)/2,C=(o+l)/2;(s=i[0])&&e.push(new J(s,f,o,y,C)),(s=i[1])&&e.push(new J(s,y,o,v,C)),(s=i[2])&&e.push(new J(s,f,C,y,l)),(s=i[3])&&e.push(new J(s,y,C,v,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Sn(t){return t[0]}function Tn(t){return arguments.length?(this._x=t,this):this._x}function Dn(t){return t[1]}function Pn(t){return arguments.length?(this._y=t,this):this._y}function ce(t,e,n){var r=new fe(e??Sn,n??Dn,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function fe(t,e,n,r,i,s){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=s,this._root=void 0}function Ne(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var q=ce.prototype=fe.prototype;q.copy=function(){var t=new fe(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=Ne(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=Ne(r));return t};q.add=yn;q.addAll=xn;q.cover=mn;q.data=wn;q.extent=_n;q.find=bn;q.remove=Mn;q.removeAll=Cn;q.root=kn;q.size=Nn;q.visit=An;q.visitAfter=In;q.x=Tn;q.y=Pn;function Z(t){return function(){return t}}function yt(t){return(t()-.5)*1e-6}function En(t){return t.x+t.vx}function zn(t){return t.y+t.vy}function Ae(t){var e,n,r,i=1,s=1;typeof t!="function"&&(t=Z(t==null?1:+t));function f(){for(var l,y=e.length,C,b,u,M,h,a,d=0;d<s;++d)for(C=ce(e,En,zn).visitAfter(o),l=0;l<y;++l)b=e[l],h=n[b.index],a=h*h,u=b.x+b.vx,M=b.y+b.vy,C.visit(m);function m(I,_,L,S,O){var T=I.data,G=I.r,F=h+G;if(T){if(T.index>b.index){var ot=u-T.x-T.vx,U=M-T.y-T.vy,j=ot*ot+U*U;j<F*F&&(ot===0&&(ot=yt(r),j+=ot*ot),U===0&&(U=yt(r),j+=U*U),j=(F-(j=Math.sqrt(j)))/j*i,b.vx+=(ot*=j)*(F=(G*=G)/(a+G)),b.vy+=(U*=j)*F,T.vx-=ot*(F=1-F),T.vy-=U*F)}return}return _>u+F||S<u-F||L>M+F||O<M-F}}function o(l){if(l.data)return l.r=n[l.data.index];for(var y=l.r=0;y<4;++y)l[y]&&l[y].r>l.r&&(l.r=l[y].r)}function v(){if(e){var l,y=e.length,C;for(n=new Array(y),l=0;l<y;++l)C=e[l],n[C.index]=+t(C,l,e)}}return f.initialize=function(l,y){e=l,r=y,v()},f.iterations=function(l){return arguments.length?(s=+l,f):s},f.strength=function(l){return arguments.length?(i=+l,f):i},f.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Z(+l),v(),f):t},f}function Rn(t){return t.index}function Ie(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Se(t){var e=Rn,n=C,r,i=Z(30),s,f,o,v,l,y=1;t==null&&(t=[]);function C(a){return 1/Math.min(o[a.source.index],o[a.target.index])}function b(a){for(var d=0,m=t.length;d<y;++d)for(var I=0,_,L,S,O,T,G,F;I<m;++I)_=t[I],L=_.source,S=_.target,O=S.x+S.vx-L.x-L.vx||yt(l),T=S.y+S.vy-L.y-L.vy||yt(l),G=Math.sqrt(O*O+T*T),G=(G-s[I])/G*a*r[I],O*=G,T*=G,S.vx-=O*(F=v[I]),S.vy-=T*F,L.vx+=O*(F=1-F),L.vy+=T*F}function u(){if(f){var a,d=f.length,m=t.length,I=new Map(f.map((L,S)=>[e(L,S,f),L])),_;for(a=0,o=new Array(d);a<m;++a)_=t[a],_.index=a,typeof _.source!="object"&&(_.source=Ie(I,_.source)),typeof _.target!="object"&&(_.target=Ie(I,_.target)),o[_.source.index]=(o[_.source.index]||0)+1,o[_.target.index]=(o[_.target.index]||0)+1;for(a=0,v=new Array(m);a<m;++a)_=t[a],v[a]=o[_.source.index]/(o[_.source.index]+o[_.target.index]);r=new Array(m),M(),s=new Array(m),h()}}function M(){if(f)for(var a=0,d=t.length;a<d;++a)r[a]=+n(t[a],a,t)}function h(){if(f)for(var a=0,d=t.length;a<d;++a)s[a]=+i(t[a],a,t)}return b.initialize=function(a,d){f=a,l=d,u()},b.links=function(a){return arguments.length?(t=a,u(),b):t},b.id=function(a){return arguments.length?(e=a,b):e},b.iterations=function(a){return arguments.length?(y=+a,b):y},b.strength=function(a){return arguments.length?(n=typeof a=="function"?a:Z(+a),M(),b):n},b.distance=function(a){return arguments.length?(i=typeof a=="function"?a:Z(+a),h(),b):i},b}var Fn={value:()=>{}};function $e(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Yt(n)}function Yt(t){this._=t}function Ln(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Yt.prototype=$e.prototype={constructor:Yt,on:function(t,e){var n=this._,r=Ln(t+"",n),i,s=-1,f=r.length;if(arguments.length<2){for(;++s<f;)if((i=(t=r[s]).type)&&(i=$n(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<f;)if(i=(t=r[s]).type)n[i]=Te(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Te(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Yt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,i=s.length;r<i;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,s=r.length;i<s;++i)r[i].value.apply(e,n)}};function $n(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Te(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Fn,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var St=0,Rt=0,zt=0,Oe=1e3,jt,Ft,Gt=0,bt=0,Ut=0,Lt=typeof performance=="object"&&performance.now?performance:Date,Xe=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ye(){return bt||(Xe(On),bt=Lt.now()+Ut)}function On(){bt=0}function se(){this._call=this._time=this._next=null}se.prototype=je.prototype={constructor:se,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ye():+n)+(e==null?0:+e),!this._next&&Ft!==this&&(Ft?Ft._next=this:jt=this,Ft=this),this._call=t,this._time=n,ae()},stop:function(){this._call&&(this._call=null,this._time=1/0,ae())}};function je(t,e,n){var r=new se;return r.restart(t,e,n),r}function Xn(){Ye(),++St;for(var t=jt,e;t;)(e=bt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--St}function De(){bt=(Gt=Lt.now())+Ut,St=Rt=0;try{Xn()}finally{St=0,jn(),bt=0}}function Yn(){var t=Lt.now(),e=t-Gt;e>Oe&&(Ut-=e,Gt=t)}function jn(){for(var t,e=jt,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:jt=n);Ft=t,ae(r)}function ae(t){if(!St){Rt&&(Rt=clearTimeout(Rt));var e=t-bt;e>24?(t<1/0&&(Rt=setTimeout(De,t-Lt.now()-Ut)),zt&&(zt=clearInterval(zt))):(zt||(Gt=Lt.now(),zt=setInterval(Yn,Oe)),St=1,Xe(De))}}const Gn=1664525,Un=1013904223,Pe=4294967296;function Hn(){let t=1;return()=>(t=(Gn*t+Un)%Pe)/Pe}function Wn(t){return t.x}function Bn(t){return t.y}var Vn=10,Qn=Math.PI*(3-Math.sqrt(5));function Ee(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),s=0,f=.6,o=new Map,v=je(C),l=$e("tick","end"),y=Hn();t==null&&(t=[]);function C(){b(),l.call("tick",e),n<r&&(v.stop(),l.call("end",e))}function b(h){var a,d=t.length,m;h===void 0&&(h=1);for(var I=0;I<h;++I)for(n+=(s-n)*i,o.forEach(function(_){_(n)}),a=0;a<d;++a)m=t[a],m.fx==null?m.x+=m.vx*=f:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=f:(m.y=m.fy,m.vy=0);return e}function u(){for(var h=0,a=t.length,d;h<a;++h){if(d=t[h],d.index=h,d.fx!=null&&(d.x=d.fx),d.fy!=null&&(d.y=d.fy),isNaN(d.x)||isNaN(d.y)){var m=Vn*Math.sqrt(.5+h),I=h*Qn;d.x=m*Math.cos(I),d.y=m*Math.sin(I)}(isNaN(d.vx)||isNaN(d.vy))&&(d.vx=d.vy=0)}}function M(h){return h.initialize&&h.initialize(t,y),h}return u(),e={tick:b,restart:function(){return v.restart(C),e},stop:function(){return v.stop(),e},nodes:function(h){return arguments.length?(t=h,u(),o.forEach(M),e):t},alpha:function(h){return arguments.length?(n=+h,e):n},alphaMin:function(h){return arguments.length?(r=+h,e):r},alphaDecay:function(h){return arguments.length?(i=+h,e):+i},alphaTarget:function(h){return arguments.length?(s=+h,e):s},velocityDecay:function(h){return arguments.length?(f=1-h,e):1-f},randomSource:function(h){return arguments.length?(y=h,o.forEach(M),e):y},force:function(h,a){return arguments.length>1?(a==null?o.delete(h):o.set(h,M(a)),e):o.get(h)},find:function(h,a,d){var m=0,I=t.length,_,L,S,O,T;for(d==null?d=1/0:d*=d,m=0;m<I;++m)O=t[m],_=h-O.x,L=a-O.y,S=_*_+L*L,S<d&&(T=O,d=S);return T},on:function(h,a){return arguments.length>1?(l.on(h,a),e):l.on(h)}}}function ze(){var t,e,n,r,i=Z(-30),s,f=1,o=1/0,v=.81;function l(u){var M,h=t.length,a=ce(t,Wn,Bn).visitAfter(C);for(r=u,M=0;M<h;++M)e=t[M],a.visit(b)}function y(){if(t){var u,M=t.length,h;for(s=new Array(M),u=0;u<M;++u)h=t[u],s[h.index]=+i(h,u,t)}}function C(u){var M=0,h,a,d=0,m,I,_;if(u.length){for(m=I=_=0;_<4;++_)(h=u[_])&&(a=Math.abs(h.value))&&(M+=h.value,d+=a,m+=a*h.x,I+=a*h.y);u.x=m/d,u.y=I/d}else{h=u,h.x=h.data.x,h.y=h.data.y;do M+=s[h.data.index];while(h=h.next)}u.value=M}function b(u,M,h,a){if(!u.value)return!0;var d=u.x-e.x,m=u.y-e.y,I=a-M,_=d*d+m*m;if(I*I/v<_)return _<o&&(d===0&&(d=yt(n),_+=d*d),m===0&&(m=yt(n),_+=m*m),_<f&&(_=Math.sqrt(f*_)),e.vx+=d*u.value*r/_,e.vy+=m*u.value*r/_),!0;if(u.length||_>=o)return;(u.data!==e||u.next)&&(d===0&&(d=yt(n),_+=d*d),m===0&&(m=yt(n),_+=m*m),_<f&&(_=Math.sqrt(f*_)));do u.data!==e&&(I=s[u.data.index]*r/_,e.vx+=d*I,e.vy+=m*I);while(u=u.next)}return l.initialize=function(u,M){t=u,n=M,y()},l.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Z(+u),y(),l):i},l.distanceMin=function(u){return arguments.length?(f=u*u,l):Math.sqrt(f)},l.distanceMax=function(u){return arguments.length?(o=u*u,l):Math.sqrt(o)},l.theta=function(u){return arguments.length?(v=u*u,l):Math.sqrt(v)},l}function Re(t){var e=Z(.1),n,r,i;typeof t!="function"&&(t=Z(t==null?0:+t));function s(o){for(var v=0,l=n.length,y;v<l;++v)y=n[v],y.vx+=(i[v]-y.x)*r[v]*o}function f(){if(n){var o,v=n.length;for(r=new Array(v),i=new Array(v),o=0;o<v;++o)r[o]=isNaN(i[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,f()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:Z(+o),f(),s):e},s.x=function(o){return arguments.length?(t=typeof o=="function"?o:Z(+o),f(),s):t},s}function Fe(t){var e=Z(.1),n,r,i;typeof t!="function"&&(t=Z(t==null?0:+t));function s(o){for(var v=0,l=n.length,y;v<l;++v)y=n[v],y.vy+=(i[v]-y.y)*r[v]*o}function f(){if(n){var o,v=n.length;for(r=new Array(v),i=new Array(v),o=0;o<v;++o)r[o]=isNaN(i[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,f()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:Z(+o),f(),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:Z(+o),f(),s):t},s}var Kn=le('<div class="debug-panel svelte-1i33fky"><label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="5" max="1000" step="5" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="0.5" max="5" step="0.1" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="30" max="500" step="10" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="0.01" max="0.5" step="0.01" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="-3000" max="-100" step="50" class="svelte-1i33fky"/></label> <label class="svelte-1i33fky"><span class="svelte-1i33fky"> </span><input type="range" min="10" max="100" step="5" class="svelte-1i33fky"/></label> <div class="debug-actions svelte-1i33fky"><button class="svelte-1i33fky">Regenerate</button> <button class="svelte-1i33fky">Copy params</button></div></div>'),Jn=le('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),Zn=le('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><!> <div class="legend-panel svelte-1i33fky"></div></div></div>');function ur(t,e){nn(e,!0);let n=oe(e,"filteredIds",3,null),r=oe(e,"sidebarHoveredId",3,null),i=oe(e,"highlightedIds",3,null);const s=typeof window<"u"&&new URLSearchParams(window.location.search).get("debug")==="graph";let f=gt(500),o=gt(1.8),v=gt(100),l=gt(.1),y=gt(-750),C=gt(50),b=gt(0);const u=Nt(()=>{if(!s)return e.graphData;x(b);const c=["project","person","organization","meeting","decision","task","document","note","process","case-study","deal","reference","deliverable","practice-area"],g=Array.from({length:x(f)},(z,D)=>({id:`sim-${D}`,type:c[D%c.length],repo:`collection-${D%5}`})),p=[],k=Math.floor(x(f)*x(o));for(let z=0;z<k;z++){const D=Math.floor(Math.random()*x(f));let N=Math.floor(Math.random()*x(f));N===D&&(N=(D+1)%x(f)),p.push({source:`sim-${D}`,target:`sim-${N}`})}return{nodes:g,edges:p}}),M=Nt(()=>s?{linkDist:x(v),centerStr:x(l),chargeStr:x(y),collideR:x(C)}:null);function h(c){return e.nameMap?.get(c)??c.replace(/-/g," ").replace(/\b\w/g,g=>g.toUpperCase())}const a=rn("theme"),d=Nt(()=>a.current==="light"?{default:14211288,dim:15263976,conn:8947848,labelText:1710623}:{default:2763306,dim:1315860,conn:6710886,labelText:15592943}),m=Nt(()=>a.current==="light"?16316666:592139),I=.75;Et(()=>{a.current,Q&&(Q.style.fill=x(d).labelText,Q.style.stroke={color:x(m),width:5});const c=x(Xt);for(const g of T)_t(g.type)===kt&&(g.color=c);H()}),Et(()=>{n(),H()}),Et(()=>{i(),H()});function _(c){return{linkDist:100,centerStr:.1,chargeStr:-750,collideR:50}}let L=!1;Et(()=>{const c=x(u);if(x(M),!et||!B||!at)return;if(!L){L=!0;return}const g=new Map;for(const w of c.edges)g.set(w.source,(g.get(w.source)??0)+1),g.set(w.target,(g.get(w.target)??0)+1);const p=new Map;for(const w of T)p.set(w.id,{x:w.x,y:w.y});const z=3600*c.nodes.length,D=Math.sqrt(z);Math.max(0,...g.values());const N=c.nodes.map(w=>{const E=g.get(w.id)??0,ut=p.get(w.id);return{id:w.id,type:w.type,repo:w.repo,color:_t(w.type)===kt?x(Xt):_t(w.type),weight:E,x:ut?.x??(Math.random()-.5)*D,y:ut?.y??(Math.random()-.5)*D,vx:0,vy:0,r:ve()}}),R=new Map;for(const w of N)R.set(w.id,w);const K=new Set(lt.keys()),$=new Set(c.nodes.map(w=>w.id));for(const w of K)if(!$.has(w)){const E=lt.get(w);E&&(E.parent===pt?pt.removeChild(E):at.removeChild(E),E.destroy()),lt.delete(w)}let A=null;if(lt.size>0&&(A=lt.values().next().value?.texture),!A){const w=document.createElement("canvas");w.width=100,w.height=100;const E=w.getContext("2d");E.beginPath(),E.arc(50,50,48,0,Math.PI*2),E.fillStyle="#ffffff",E.fill(),A=et.Texture.from(w)}for(const w of N){let E=lt.get(w.id);E||(E=new et.Sprite(A),E.anchor.set(.5),at.addChild(E),lt.set(w.id,E)),E.tint=Qt(w.color)}T=N,O?.stop();const it=c.edges.map(w=>({source:w.source,target:w.target})),nt=x(M)??_(T.length),P=Se(it).id(w=>w.id).distance(nt.linkDist);O=Ee(T).force("link",P).force("charge",ze().strength(nt.chargeStr).distanceMin(30)).force("x",Re(0).strength(nt.centerStr)).force("y",Fe(0).strength(nt.centerStr)).force("collide",Ae().radius(nt.collideR).strength(.5)).velocityDecay(.4).alpha(.3).on("tick",()=>{Ht||Vt(),H()}),G=P.links(),ct=null,$t(),H()}),Et(()=>{const c=r();if(c){const g=T.find(p=>p.id===c)??null;ct=g,$t(),rt=g?1:0}else st||(rt=0);H()});let S,O=null,T=[],G=[],F=!1,ot=0,U=0,j=0,tt=1,ct=null,st=null,Mt=gt(!1),ue=0,he=0,de=0,pe=0,dt=new Set,Ht=!1,Tt=gt(null),ft=0,rt=0;const ge=4;let B=null,Dt=null,Pt=null,at=null,pt=null,lt=new Map,Q=null,et=null;const Ge=5;function ve(c,g){return Ge}function Wt(c,g){const p=S.getBoundingClientRect();return{x:(c-p.left-U)/tt,y:(g-p.top-j)/tt}}function ye(c,g){for(let p=T.length-1;p>=0;p--){const k=T[p],z=c-k.x,D=g-k.y,N=(k.r*1.5+4)/tt;if(z*z+D*D<=N*N)return k}return null}let Bt=new Set;function $t(){const c=ct??null;if(at&&pt)for(const g of Bt){const p=lt.get(g);p&&p.parent===pt&&(pt.removeChild(p),at.addChild(p))}if(dt.clear(),Bt.clear(),!!c){dt.add(c.id);for(const g of G)g.source.id===c.id&&dt.add(g.target.id),g.target.id===c.id&&dt.add(g.source.id);if(Bt=new Set(dt),at&&pt)for(const g of dt){const p=lt.get(g);p&&p.parent===at&&(at.removeChild(p),pt.addChild(p))}}}function Vt(){if(T.length===0||!S)return;let c=1/0,g=-1/0,p=1/0,k=-1/0,z=0;for(const A of T)A.x<c&&(c=A.x),A.x>g&&(g=A.x),A.y<p&&(p=A.y),A.y>k&&(k=A.y),A.r>z&&(z=A.r);const D=S.clientWidth,N=S.clientHeight,R=g-c,K=k-p;if(R===0||K===0)return;const $=(60+z)*2;tt=Math.min((D-$)/R,(N-$)/K,3),U=D/2-(c+g)/2*tt,j=N/2-(p+k)/2*tt,H()}function H(){F=!0,ot=0}function Qt(c){return parseInt(c.replace("#",""),16)}function Ct(c,g,p){const k=(c>>16&255)+p*((g>>16&255)-(c>>16&255)),z=(c>>8&255)+p*((g>>8&255)-(c>>8&255)),D=(c&255)+p*((g&255)-(c&255));return Math.round(k)<<16|Math.round(z)<<8|Math.round(D)}function Ue(){if(!et||!Dt||!Pt)return;Dt.clear(),Pt.clear();const c=ct,g=c!==null,p=ft,k=x(Tt),z=i(),D=n(),N=x(d).default,R=x(d).dim,K=x(d).conn;for(let $=0;$<G.length;$++){const A=G[$],it=A.source.x*tt+U,nt=A.source.y*tt+j,P=A.target.x*tt+U,w=A.target.y*tt+j,E=g&&p>.01&&(A.source===c||A.target===c)&&dt.has(A.source.id)&&dt.has(A.target.id);let ut=N;g&&p>.01?ut=E?Ct(N,K,p):Ct(N,R,p):(k!==null||z!==null||D!==null)&&(ut=R);const mt=E?Pt:Dt;mt.setStrokeStyle({width:1,color:ut}),mt.moveTo(it,nt),mt.lineTo(P,w),mt.stroke()}}function He(){if(!et)return;const c=ct,g=c!==null,p=ft,k=x(Tt),z=i(),D=n();for(const N of T){const R=lt.get(N.id);if(!R)continue;const K=N.x*tt+U,$=N.y*tt+j;R.position.set(K,$),R.scale.set(N.r/50),R.alpha=1;const A=Qt(N.color);{const it=N===c,nt=g&&dt.has(N.id),P=k!==null&&(k==="other"?_t(N.type)===kt:N.type===k);if(it&&p>.01)R.tint=A;else if(nt)R.tint=A;else if(k!==null)R.tint=P?A:Ct(A,x(m),I);else if(z!==null){const E=z.has(N.id)?p*I:I;R.tint=Ct(A,x(m),E)}else if(D!==null){const E=D.has(N.id)?p*I:I;R.tint=Ct(A,x(m),E)}else R.tint=Ct(A,x(m),p*I)}}if(c&&p>.01&&Q){const N=c.x*tt+U,R=c.y*tt+j;Q.text=h(c.id),Q.style.fontSize=14,Q.position.set(N,R+c.r+8),Q.alpha=p,Q.visible=!0}else Q&&(Q.visible=!1)}let Ot=!1;function We(c){if(c.button!==0)return;Ot=!1;const g=Wt(c.clientX,c.clientY),p=ye(g.x,g.y);p?(st=p,Ht=!0,p.fx=p.x,p.fy=p.y,O?.alphaTarget(.3).restart(),H()):(ht(Mt,!0),ue=c.clientX,he=c.clientY,de=U,pe=j),S.setPointerCapture(c.pointerId),window.addEventListener("pointerup",Kt,{once:!0})}function Be(c){if(st){Ot=!0;const g=Wt(c.clientX,c.clientY);st.fx=g.x,st.fy=g.y,H()}else if(x(Mt))Ot=!0,U=de+(c.clientX-ue),j=pe+(c.clientY-he),H();else{const g=Wt(c.clientX,c.clientY),p=ye(g.x,g.y);p?p!==ct?(ct&&(ft=.15),ct=p,$t(),rt=1,S.style.cursor="pointer",H()):rt!==1&&(rt=1,S.style.cursor="pointer",H()):rt!==0&&(rt=0,S.style.cursor="grab",H())}}function Kt(c){if(!st&&!x(Mt))return;window.removeEventListener("pointerup",Kt);const g=Ot;if(st){const p=st;st.fx=null,st.fy=null,O?.alphaTarget(0),st=null,rt=0,H(),g||gn(`/${p.repo}/${p.type}/${p.id}`)}else x(Mt)&&ht(Mt,!1);try{S.releasePointerCapture(c.pointerId)}catch{}}const kt="#5c5c66",Ve="#b0b0b8",Xt=Nt(()=>a.current==="light"?Ve:kt),Qe=Nt(()=>{const c=new Map;for(const k of x(u).nodes)c.set(k.type,(c.get(k.type)??0)+1);const g=[];let p=0;for(const[k,z]of c){const D=_t(k);D===kt?p+=z:g.push({name:k,color:D,count:z})}return g.sort((k,z)=>z.count-k.count),p>0&&g.push({name:"other",color:x(Xt),count:p}),g});on(async()=>{et=await en(()=>import("./BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url),B=new et.Application,await B.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:S}),S.insertBefore(B.canvas,S.firstChild),B.canvas.style.position="absolute",B.canvas.style.inset="0",Dt=new et.Graphics,B.stage.addChild(Dt),at=new et.Container,B.stage.addChild(at),Pt=new et.Graphics,B.stage.addChild(Pt),pt=new et.Container,B.stage.addChild(pt);const c=document.createElement("canvas");c.width=100,c.height=100;const g=c.getContext("2d");g.beginPath(),g.arc(50,50,48,0,Math.PI*2),g.fillStyle="#ffffff",g.fill();const p=et.Texture.from(c),k=new Map;for(const P of x(u).edges)k.set(P.source,(k.get(P.source)??0)+1),k.set(P.target,(k.get(P.target)??0)+1);const z=new Map,N=3600*x(u).nodes.length,R=Math.sqrt(N);Math.max(0,...k.values()),T=x(u).nodes.map(P=>{const w=k.get(P.id)??0,E={id:P.id,type:P.type,repo:P.repo,color:_t(P.type)===kt?x(Xt):_t(P.type),weight:w,x:(Math.random()-.5)*R,y:(Math.random()-.5)*R,vx:0,vy:0,r:ve()};return z.set(P.id,E),E});for(const P of T){const w=new et.Sprite(p);w.anchor.set(.5),w.tint=Qt(P.color),at.addChild(w),lt.set(P.id,w)}Q=new et.Text({text:"",style:{fontFamily:"IBM Plex Sans, system-ui, sans-serif",fontWeight:"400",fontSize:12,fill:x(d).labelText,align:"center",stroke:{color:x(m),width:5}}}),Q.anchor.set(.5,0),Q.visible=!1,B.stage.addChild(Q);const K=x(u).edges.map(P=>({source:P.source,target:P.target})),$=x(M)??_(),A=Se(K).id(P=>P.id).distance($.linkDist);O=Ee(T).force("link",A).force("charge",ze().strength($.chargeStr).distanceMin(30)).force("x",Re(0).strength($.centerStr)).force("y",Fe(0).strength($.centerStr)).force("collide",Ae().radius($.collideR).strength(.5)).velocityDecay(.4).alpha(1).on("tick",()=>{Ht||Vt(),H()}),G=A.links();let it=0;B.ticker.add(()=>{const P=performance.now(),w=it?Math.min((P-it)/1e3,.05):.016;it=P,ft<rt?(ft=Math.min(rt,ft+ge*w),F=!0):ft>rt&&(ft=Math.max(rt,ft-ge*w),F=!0),ft===0&&rt===0&&ct&&!st&&(ct=null,$t(),F=!0),(F||ot<120)&&(Ue(),He(),F=!1,ot++)});const nt=new ResizeObserver(()=>{B.renderer.resize(S.clientWidth,S.clientHeight),Vt()});return nt.observe(S),()=>{nt.disconnect()}}),sn(()=>{O?.stop(),B&&(B.destroy(!0,{children:!0}),B=null)});var Jt=Zn(),xt=Y(Jt);let xe;var me=Y(xt);{var Ke=c=>{var g=Kn(),p=Y(g),k=Y(p),z=Y(k);X(k);var D=V(k);At(D),X(p);var N=V(p,2),R=Y(N),K=Y(R);X(R);var $=V(R);At($),X(N);var A=V(N,2),it=Y(A),nt=Y(it);X(it);var P=V(it);At(P),X(A);var w=V(A,2),E=Y(w),ut=Y(E);X(E);var mt=V(E);At(mt),X(w);var qt=V(w,2),te=Y(qt),Je=Y(te);X(te);var we=V(te);At(we),X(qt);var ee=V(qt,2),ne=Y(ee),Ze=Y(ne);X(ne);var _e=V(ne);At(_e),X(ee);var be=V(ee,2),Me=Y(be),qe=V(Me,2);X(be),X(g),re((W,tn)=>{vt(z,`Nodes: ${x(f)??""}`),vt(K,`Edges/node: ${W??""}`),vt(nt,`Link dist: ${x(v)??""}`),vt(ut,`Center: ${tn??""}`),vt(Je,`Charge: ${x(y)??""}`),vt(Ze,`Collide R: ${x(C)??""}`)},[()=>x(o).toFixed(1),()=>x(l).toFixed(2)]),wt("pointerdown",g,W=>W.stopPropagation()),It(D,()=>x(f),W=>ht(f,W)),It($,()=>x(o),W=>ht(o,W)),It(P,()=>x(v),W=>ht(v,W)),It(mt,()=>x(l),W=>ht(l,W)),It(we,()=>x(y),W=>ht(y,W)),It(_e,()=>x(C),W=>ht(C,W)),wt("click",Me,()=>{ln(b)}),wt("click",qe,()=>{const W=`forceParams(${x(f)}) = { linkDist: ${x(v)}, centerStr: ${x(l)}, chargeStr: ${x(y)}, collideR: ${x(C)} }`;navigator.clipboard.writeText(W)}),ie(c,g)};fn(me,c=>{s&&c(Ke)})}var Zt=V(me,2);hn(Zt,21,()=>x(Qe),dn,(c,g)=>{var p=Jn();let k;var z=Y(p);let D;var N=V(z,2),R=Y(N,!0);X(N);var K=V(N,2),$=Y(K,!0);X(K),X(p),re(A=>{k=pn(p,1,"legend-item svelte-1i33fky",null,k,{"legend-item-active":x(Tt)===x(g).name}),D=ke(z,"",D,{background:x(g).color}),vt(R,A),vt($,x(g).count)},[()=>vn(x(g).name)]),Ce("mouseenter",p,()=>{ht(Tt,x(g).name,!0),H()}),Ce("mouseleave",p,()=>{ht(Tt,null),H()}),ie(c,p)}),X(Zt),X(xt),un(xt,c=>S=c,()=>S),X(Jt),re(()=>xe=ke(xt,"",xe,{cursor:x(Mt)?"grabbing":"grab"})),wt("pointerdown",xt,We),wt("pointermove",xt,Be),wt("pointerup",xt,Kt),wt("pointerdown",Zt,c=>c.stopPropagation()),ie(t,Jt),an()}cn(["pointerdown","pointermove","pointerup","click"]);export{ur as G};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as _,f as P,g as b,e as W,w as m,a as G,t as k,c as A,r as I,b as q,d as j,h as V,i as R,j as z,k as C,l as K,D as Q,p as X,m as Z}from"./CSVbGg_b.js";import{r as O}from"./
|
|
1
|
+
import{O as _,f as P,g as b,e as W,w as m,a as G,t as k,c as A,r as I,b as q,d as j,h as V,i as R,j as z,k as C,l as K,D as Q,p as X,m as Z}from"./CSVbGg_b.js";import{r as O}from"./BA905oIh.js";const T=3e4;class $ extends _{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=b();this.getLocalState()!==null&&T/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&T<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&Y(this,s,"timeout")},P(T/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:b()});const i=[],u=[],r=[],f=[];n===null?f.push(e):c==null?n!=null&&i.push(e):(u.push(e),W(c,n)||r.push(e)),(i.length>0||r.length>0||f.length>0)&&this.emit("change",[{added:i,updated:r,removed:f},"local"]),this.emit("update",[{added:i,updated:u,removed:f},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const Y=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const i=t.meta.get(c);t.meta.set(c,{clock:i.clock+1,lastUpdated:b()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},H=(t,n,e=t.states)=>{const s=n.length,a=A();m(a,s);for(let c=0;c<s;c++){const i=n[c],u=e.get(i)||null,r=t.meta.get(i).clock;m(a,i),m(a,r),G(a,JSON.stringify(u))}return k(a)},tt=(t,n,e)=>{const s=j(n),a=b(),c=[],i=[],u=[],r=[],f=I(s);for(let w=0;w<f;w++){const d=I(s);let y=I(s);const h=JSON.parse(q(s)),g=t.meta.get(d),U=t.states.get(d),S=g===void 0?0:g.clock;(S<y||S===y&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?y++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:y,lastUpdated:a}),g===void 0&&h!==null?c.push(d):g!==void 0&&h===null?r.push(d):h!==null&&(W(h,U)||u.push(d),i.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||i.length>0||r.length>0)&&t.emit("update",[{added:c,updated:i,removed:r},e])},B=0,M=1,N=2,et=(t,n)=>{m(t,B);const e=R(n);V(t,e)},nt=(t,n,e)=>{m(t,M),V(t,K(n,e))},st=(t,n,e)=>nt(n,e,C(t)),F=(t,n,e,s)=>{try{z(n,C(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},at=(t,n)=>{m(t,N),V(t,n)},ct=F,ot=(t,n,e,s,a)=>{const c=I(t);switch(c){case B:st(t,n,e);break;case M:F(t,e,s,a);break;case N:ct(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},L=0,x=1;function it(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function lt(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function ut(t,n){const e=new Q,s=e.getText("content"),a=new $(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,i=!1,u=!1;function r(){return O.ws??null}function f(o,p){const l=r();!l||l.readyState!==WebSocket.OPEN||l.send(it(t,o,p))}function w(){const o=A();et(o,e),f(L,k(o))}function d(o){const p=o??[e.clientID],l=H(a,p);f(x,l)}function y(o){if(i||typeof o.data=="string")return;const p=o.data instanceof ArrayBuffer?o.data:null;if(!p)return;const l=lt(p);if(!(!l||l.docName!==t))if(l.msgType===L){const v=j(l.payload),D=X(v),E=A();ot(v,E,e,"ws-server"),Z(E)>0&&f(L,k(E)),!u&&(D===M||D===N)&&(u=!0,S.synced=!0)}else l.msgType===x&&tt(a,l.payload,"ws-server")}function h(o,p){if(i||p==="ws-server")return;const l=A();at(l,o),f(L,k(l))}function g({added:o,updated:p,removed:l},v){if(i||v==="ws-server")return;const D=o.concat(p,l);d(D)}function U(){if(i)return;const o=r();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=y,o.addEventListener("message",c),w(),d())}const S={ydoc:e,ytext:s,awareness:a,synced:!1,destroy:J};e.on("update",h),a.on("update",g),U(),O.addConnectHandler(U);function J(){if(i)return;i=!0,Y(a,[e.clientID],"local"),d([e.clientID]);const o=r();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",h),a.off("update",g),a.destroy(),e.destroy()}return S}export{ut as createCollabSession};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bA as Le,aC as Ge,w as A,g as U,s as P,aD as ne,bB as vt}from"./C3uBrOS5.js";class Ae{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ue{constructor(t,n){this.status=t,this.location=n}}class Pe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Te(e)),Rt(e,t));const G=new Map;function xt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&G.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Lt(e,t,n){if(G.size>0){const r=Te(e,n),a=G.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);G.delete(r)}}return window.fetch(t,n)}function Te(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Et(...a)}"]`}return r}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ut(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=At.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Pt)}function It(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=Ut(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return It(v,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_bigvdp?.base??"",Ct=globalThis.__sveltekit_bigvdp?.assets??x??"",$t="1776115778471",Qe="sveltekit:snapshot",Ze="sveltekit:scroll",et="sveltekit:states",jt="sveltekit:pageurl",B="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},he=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const He={...N,"":N.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||pe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===he&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=tt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:He[r??"off"],preload_data:He[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function We(e){const t=Le(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const rt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ct}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),rt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function pe(e,t,n){return e.origin!==he||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function qt(e){return e.filter(t=>t!=null)}function Oe(e){return e instanceof Ae||e instanceof Pe?e.status:500}function Vt(e){return e instanceof Pe?e.text:"Internal Error"}let b,W,ve;const Bt=Ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ge.toString());Bt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},ve={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){P(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){P(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){P(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){P(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){P(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){P(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){P(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){P(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},rt.v=()=>ve.current=!0);function ot(e){Object.assign(b,e)}const Je={spanContext(){return Kt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Kt={traceId:"",spanId:"",traceFlags:0},Ft=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Xe(Ze)??{},J=Xe(Qe)??{},$={url:We({}),page:We({}),navigating:Le(null),updated:Nt()};function Ce(e){j[e]=D()}function Gt(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ke(){}let $e,Ee,ae,T,Se,w;const oe=[],se=[];let L=null;function ie(){L?.fork?.then(e=>e?.discard()),L=null}const te=new Map,it=new Set,Mt=new Set,M=new Set;let _={branch:[],error:null,url:null},lt=!1,le=!1,Ye=!0,z=!1,F=!1,ct=!1,Q=!1,je,y,R,I;const ce=new Set;let we;const ue=new Map;async function hn(e,t,n){globalThis.__sveltekit_bigvdp?.data&&globalThis.__sveltekit_bigvdp.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),$e=Ot(e),T=document.documentElement,Se=t,Ee=e.nodes[0],ae=e.nodes[1],Ee(),ae(),y=history.state?.[B],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[H]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await rn(Se,n)):(await K({type:"enter",url:Ie(w.hash?sn(new URL(location.href)):location.href),replace_state:!0}),a()),nn()}async function Ht(e=!0,t=!0){if(await(we||=Promise.resolve()),!we)return;we=null;const n=I={},r=await Z(_.url,!0);if(ie(),Q&&ue.forEach(({resource:a})=>{a.refresh?.()}),e){const a=b.state,i=r&&await Ve(r);if(!i||n!==I)return;if(i.type==="redirect")return Ne(new URL(i.location,_.url).href,{replaceState:!0},1,n);t||(i.props.page.state=a),ot(i.props.page),_=i.state,Re(),je.$set(i.props)}else Re();await Promise.all([...ue.values()].map(({resource:a})=>a)).catch(ke)}function Re(){oe.length=0,Q=!1}function ut(e){se.some(t=>t?.snapshot)&&(J[e]=se.map(t=>t?.snapshot?.capture()))}function ft(e){J[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function ze(){Ce(y),Me(Ze,j),ut(R),Me(Qe,J)}async function Ne(e,t,n,r){let a;t.invalidateAll&&ie(),await K({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Q=!0,a=[...ue.keys()]),t.invalidate&&t.invalidate.forEach(tn)}}),t.invalidateAll&&ne().then(ne).then(()=>{ue.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){ie();const t={};ce.add(t),L={id:e.id,token:t,promise:Ve({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return L.promise}async function ye(e){const t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function dt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(b,e.props.page),je=new w.root({target:t,props:{...e.props,stores:$,components:se},hydrate:n,sync:!1}),await Promise.resolve(),ft(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}le=!0}function fe({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:Fe(b)}};s!==void 0&&(l.props.form=s);let c={},d=!b,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],v=_.branch[u];h?.data!==v?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==b.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:b.data}),l}async function De({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Je,current:Je},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:kt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},w.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:v}=ht(f,u,n);return o&&d(h.href),v},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=le?Lt(r,a.href,t):xt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Q)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(oe.some(o=>o(new URL(s))))return!0;return!1}function qe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Fe(b),constructors:[]}}}async function Ve({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ce.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==de(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Jt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,De({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let C=0;C<g;C+=1)Object.assign(O,(await h[C])?.data);return O},server_data_node:qe(m[0]?{type:"skip"}:null,m[0]?E?.server:void 0)}))});for(const m of h)m.catch(()=>{});const v=[];for(let m=0;m<c.length;m+=1)if(c[m])try{v.push(await h[m])}catch(g){if(g instanceof Ue)return{type:"redirect",location:g.location};if(ce.has(i))return zt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Oe(g),S;if(g instanceof Ae)S=g.body;else{if(await $.updated.check())return await st(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const O=await Xt(m,v,s);return O?fe({url:n,params:r,branch:v.slice(0,O.idx).concat(O.node),status:E,error:S,route:a}):await gt(n,{id:a.id},S,E)}else v.push(void 0);return fe({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await De({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ue)return Ne(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ht(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);w.hash?i.hash=a:i.pathname=a,a=i}return a})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function Z(e,t){if(e&&!pe(e,x,w.hash)){const n=await Qt(e);if(!n)return;const r=Zt(n);for(const a of $e){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:bt(i),url:e}}}}function Zt(e){return yt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function de(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function pt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ke(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return z||it.forEach(c=>c(l)),s?null:o}async function K({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=ke,block:d=ke,event:p}){const f=I;I=l;const u=await Z(t,!1),h=e==="enter"?Ke(_,u,t,e):pt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),I===l&&(I=f);return}const v=y,m=R;c(),z=!0,le&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await Ve(u);if(!g){if(pe(t,x,w.hash))return await Y(t,i);g=await gt(t,{id:null},await X(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,I!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await K({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Be({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await st(),await Y(t,i));if(Re(),Ce(v),ut(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,ee={[B]:y+=k,[H]:R+=k,[et]:s};(i?history.replaceState:history.pushState).call(history,ee,"",t),i||Gt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(Mt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(k.length>0){let q=function(){k.forEach(ge=>{M.delete(ge)})};k.push(q),k.forEach(ge=>{M.add(ge)})}_=g.state,g.props.page&&(g.props.page.url=t);const ee=E&&await E;ee?S=ee.commit():(je.$set(g.props),ot(g.props.page),S=vt?.()),ct=!0}else await dt(g,Se,!1);const{activeElement:O}=document;await S,await ne(),await ne();let C=null;if(Ye){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(C=t.hash&&document.getElementById(mt(t)))?C.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&on(t,!C),Ye=!0,g.props.page&&Object.assign(b,g.props.page),z=!1,e==="popstate"&&ft(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(k=>k(h.navigation)),$.navigating.set(W.current=null)}async function gt(e,t,n,r,a){return e.origin===he&&e.pathname===location.pathname&&!lt?await Be({status:r,error:n,url:e,route:t}):await Y(e,a)}function en(){let e,t={element:void 0,href:void 0},n;T.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}T.addEventListener("mousedown",r),T.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=nt(o,T),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=be(c,x,w.hash);if(f||u)return;const h=re(c),v=p&&de(_.url)===de(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await Z(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of T.querySelectorAll("a")){const{url:l,external:c,download:d}=be(o,x,w.hash);if(c||d)continue;const p=re(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ye(l))}}M.add(s),s()}function X(e,t){if(e instanceof Ae)return e.body;const n=Oe(e),r=Vt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function pn(e,t={}){return e=new URL(Ie(e)),e.origin!==he?Promise.reject(new Error("goto: invalid URL")):Ne(e,t,0)}function tn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function gn(){return Q=!0,Ht()}function nn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!z){const r=Ke(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||en(),T.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],T);if(!n)return;const{url:r,external:a,target:i,download:s}=be(n,x,w.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=re(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(w.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===me(location);if(a||o.reload&&(!p||!d)){pt({url:r,type:"link",event:t})?z=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(F=!0,Ce(y),e(r),!o.replace_state)return;F=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await K({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),T.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(pe(s,x,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),K({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[B]){const n=t.state[B];if(I={},n===y)return;const r=j[n],a=t.state[et]??{},i=new URL(t.state[jt]??location.href),s=t.state[H],o=_.url?me(location)===me(_.url):!1;if(s===R&&(ct||o)){a!==b.state&&(b.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await K({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:I,event:t})}else if(!F){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[B]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=b.url=t,$.page.set(Fe(b)),$.page.notify()}}async function rn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){lt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await Z(c,!1)||{}),d=$e.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(v,m)=>{const g=o[m];return g?.uses&&(g.uses=an(g.uses)),De({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:qe(g)})}),h=await Promise.all(u);if(d){const v=d.layouts;for(let m=0;m<v.length;m++)v[m]||h.splice(m,0,void 0)}p=fe({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ue){await Y(new URL(u.location,location.href));return}p=await Be({status:Oe(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await dt(p,e,f)}function an(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function on(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ke(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function Fe(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{hn as a,pn as g,gn as i,cn as l,b as p,$ as s};
|
|
1
|
+
import{bA as Le,aC as Fe,w as A,g as U,s as P,aD as ne,bB as wt}from"./C3uBrOS5.js";class Ae{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ue{constructor(t,n){this.status=t,this.location=n}}class Pe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function vt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&F.delete(Te(e)),Rt(e,t));const F=new Map;function xt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&F.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Lt(e,t,n){if(F.size>0){const r=Te(e,n),a=F.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);F.delete(r)}}return window.fetch(t,n)}function Te(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Et(...a)}"]`}return r}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ut(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(w=>parseInt(w,16))));const d=At.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Pt)}function It(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=Ut(o),u={id:o,exec:h=>{const w=p.exec(h);if(w)return It(w,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Ge(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_7n6zw7?.base??"",Ct=globalThis.__sveltekit_7n6zw7?.assets??x??"",$t="1776138226797",Qe="sveltekit:snapshot",Ze="sveltekit:scroll",et="sveltekit:states",jt="sveltekit:pageurl",B="sveltekit:history",M="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},he=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Me={...N,"":N.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||pe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===he&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=tt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Me[r??"off"],preload_data:Me[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function He(e){const t=Le(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const rt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ct}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),rt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function pe(e,t,n){return e.origin!==he||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function qt(e){return e.filter(t=>t!=null)}function Oe(e){return e instanceof Ae||e instanceof Pe?e.status:500}function Vt(e){return e instanceof Pe?e.text:"Internal Error"}let b,H,we;const Bt=Fe.toString().includes("$$")||/function \w+\(\) \{\}/.test(Fe.toString());Bt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},H={current:null},we={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){P(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){P(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){P(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){P(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){P(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){P(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){P(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){P(this.#i,t)}},H=new class{#e=A(null);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},we=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},rt.v=()=>we.current=!0);function ot(e){Object.assign(b,e)}const We={spanContext(){return zt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},zt={traceId:"",spanId:"",traceFlags:0},Kt=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Xe(Ze)??{},W=Xe(Qe)??{},$={url:He({}),page:He({}),navigating:Le(null),updated:Nt()};function Ce(e){j[e]=D()}function Ft(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;W[n];)delete W[n],n+=1}function J(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ke(){}let $e,Ee,ae,T,Se,v;const oe=[],se=[];let L=null;function ie(){L?.fork?.then(e=>e?.discard()),L=null}const te=new Map,it=new Set,Gt=new Set,G=new Set;let _={branch:[],error:null,url:null},lt=!1,le=!1,Je=!0,Y=!1,K=!1,ct=!1,Q=!1,je,y,R,I;const ce=new Set;let ve;const ue=new Map;async function hn(e,t,n){globalThis.__sveltekit_7n6zw7?.data&&globalThis.__sveltekit_7n6zw7.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),$e=Ot(e),T=document.documentElement,Se=t,Ee=e.nodes[0],ae=e.nodes[1],Ee(),ae(),y=history.state?.[B],R=history.state?.[M],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[M]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await rn(Se,n)):(await z({type:"enter",url:Ie(v.hash?sn(new URL(location.href)):location.href),replace_state:!0}),a()),nn()}async function Mt(e=!0,t=!0){if(await(ve||=Promise.resolve()),!ve)return;ve=null;const n=I={},r=await Z(_.url,!0);if(ie(),Q&&ue.forEach(({resource:a})=>{a.refresh?.()}),e){const a=b.state,i=r&&await Ve(r);if(!i||n!==I)return;if(i.type==="redirect")return Ne(new URL(i.location,_.url).href,{replaceState:!0},1,n);t||(i.props.page.state=a),ot(i.props.page),_=i.state,Re(),je.$set(i.props)}else Re();await Promise.all([...ue.values()].map(({resource:a})=>a)).catch(ke)}function Re(){oe.length=0,Q=!1}function ut(e){se.some(t=>t?.snapshot)&&(W[e]=se.map(t=>t?.snapshot?.capture()))}function ft(e){W[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function Ye(){Ce(y),Ge(Ze,j),ut(R),Ge(Qe,W)}async function Ne(e,t,n,r){let a;t.invalidateAll&&ie(),await z({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Q=!0,a=[...ue.keys()]),t.invalidate&&t.invalidate.forEach(tn)}}),t.invalidateAll&&ne().then(ne).then(()=>{ue.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Ht(e){if(e.id!==L?.id){ie();const t={};ce.add(t),L={id:e.id,token:t,promise:Ve({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return L.promise}async function ye(e){const t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function dt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(b,e.props.page),je=new v.root({target:t,props:{...e.props,stores:$,components:se},hydrate:n,sync:!1}),await Promise.resolve(),ft(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};G.forEach(i=>i(a))}le=!0}function fe({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=vt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:Ke(b)}};s!==void 0&&(l.props.form=s);let c={},d=!b,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],w=_.branch[u];h?.data!==w?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==b.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:b.data}),l}async function De({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:We,current:We},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:kt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},v.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:w}=ht(f,u,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=le?Lt(r,a.href,t):xt(r,t);return{resolved:a,promise:i}}function Wt(e,t,n,r,a,i){if(Q)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(oe.some(o=>o(new URL(s))))return!0;return!1}function qe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Jt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Yt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ke(b),constructors:[]}}}async function Ve({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ce.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==de(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Jt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Wt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,De({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let C=0;C<g;C+=1)Object.assign(O,(await h[C])?.data);return O},server_data_node:qe(m[0]?{type:"skip"}:null,m[0]?E?.server:void 0)}))});for(const m of h)m.catch(()=>{});const w=[];for(let m=0;m<c.length;m+=1)if(c[m])try{w.push(await h[m])}catch(g){if(g instanceof Ue)return{type:"redirect",location:g.location};if(ce.has(i))return Yt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Oe(g),S;if(g instanceof Ae)S=g.body;else{if(await $.updated.check())return await st(),await J(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const O=await Xt(m,w,s);return O?fe({url:n,params:r,branch:w.slice(0,O.idx).concat(O.node),status:E,error:S,route:a}):await gt(n,{id:a.id},S,E)}else w.push(void 0);return fe({url:n,params:r,branch:w,status:200,error:null,route:a,form:t?void 0:null})}async function Xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await De({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ue)return Ne(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ht(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);v.hash?i.hash=a:i.pathname=a,a=i}return a})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function Z(e,t){if(e&&!pe(e,x,v.hash)){const n=await Qt(e);if(!n)return;const r=Zt(n);for(const a of $e){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:bt(i),url:e}}}}function Zt(e){return yt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function de(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function pt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=ze(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return Y||it.forEach(c=>c(l)),s?null:o}async function z({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=ke,block:d=ke,event:p}){const f=I;I=l;const u=await Z(t,!1),h=e==="enter"?ze(_,u,t,e):pt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),I===l&&(I=f);return}const w=y,m=R;c(),Y=!0,le&&h.navigation.type!=="enter"&&$.navigating.set(H.current=h.navigation);let g=u&&await Ve(u);if(!g){if(pe(t,x,v.hash))return await J(t,i);g=await gt(t,{id:null},await X(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,I!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await z({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Be({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await st(),await J(t,i));if(Re(),Ce(w),ut(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,ee={[B]:y+=k,[M]:R+=k,[et]:s};(i?history.replaceState:history.pushState).call(history,ee,"",t),i||Ft(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(Gt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(k.length>0){let q=function(){k.forEach(ge=>{G.delete(ge)})};k.push(q),k.forEach(ge=>{G.add(ge)})}_=g.state,g.props.page&&(g.props.page.url=t);const ee=E&&await E;ee?S=ee.commit():(je.$set(g.props),ot(g.props.page),S=wt?.()),ct=!0}else await dt(g,Se,!1);const{activeElement:O}=document;await S,await ne(),await ne();let C=null;if(Je){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(C=t.hash&&document.getElementById(mt(t)))?C.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&on(t,!C),Je=!0,g.props.page&&Object.assign(b,g.props.page),Y=!1,e==="popstate"&&ft(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),G.forEach(k=>k(h.navigation)),$.navigating.set(H.current=null)}async function gt(e,t,n,r,a){return e.origin===he&&e.pathname===location.pathname&&!lt?await Be({status:r,error:n,url:e,route:t}):await J(e,a)}function en(){let e,t={element:void 0,href:void 0},n;T.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}T.addEventListener("mousedown",r),T.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=nt(o,T),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=be(c,x,v.hash);if(f||u)return;const h=re(c),w=p&&de(_.url)===de(p);if(!(h.reload||w))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await Z(p,!1);if(!m)return;Ht(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of T.querySelectorAll("a")){const{url:l,external:c,download:d}=be(o,x,v.hash);if(c||d)continue;const p=re(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ye(l))}}G.add(s),s()}function X(e,t){if(e instanceof Ae)return e.body;const n=Oe(e),r=Vt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function pn(e,t={}){return e=new URL(Ie(e)),e.origin!==he?Promise.reject(new Error("goto: invalid URL")):Ne(e,t,0)}function tn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function gn(){return Q=!0,Mt()}function nn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ye(),!Y){const r=ze(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ye()}),navigator.connection?.saveData||en(),T.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],T);if(!n)return;const{url:r,external:a,target:i,download:s}=be(n,x,v.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=re(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===me(location);if(a||o.reload&&(!p||!d)){pt({url:r,type:"link",event:t})?Y=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(K=!0,Ce(y),e(r),!o.replace_state)return;K=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await z({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),T.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(pe(s,x,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),z({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[B]){const n=t.state[B];if(I={},n===y)return;const r=j[n],a=t.state[et]??{},i=new URL(t.state[jt]??location.href),s=t.state[M],o=_.url?me(location)===me(_.url):!1;if(s===R&&(ct||o)){a!==b.state&&(b.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await z({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:I,event:t})}else if(!K){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{K&&(K=!1,history.replaceState({...history.state,[B]:++y,[M]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Kt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(H.current=null)});function e(t){_.url=b.url=t,$.page.set(Ke(b)),$.page.notify()}}async function rn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){lt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await Z(c,!1)||{}),d=$e.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(w,m)=>{const g=o[m];return g?.uses&&(g.uses=an(g.uses)),De({loader:v.nodes[w],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:qe(g)})}),h=await Promise.all(u);if(d){const w=d.layouts;for(let m=0;m<w.length;m++)w[m]||h.splice(m,0,void 0)}p=fe({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ue){await J(new URL(u.location,location.href));return}p=await Be({status:Oe(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await dt(p,e,f)}function an(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function on(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function ze(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function Ke(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{hn as a,pn as g,gn as i,cn as l,b as p,$ as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as n,g as e,v as M,w as i}from"./C3uBrOS5.js";import{g as $}from"./
|
|
1
|
+
import{s as n,g as e,v as M,w as i}from"./C3uBrOS5.js";import{g as $}from"./YxOzuzo0.js";import{c as v}from"./BhlvzGQx.js";import{apiFetch as I}from"./DFYOFE3o.js";let o=i("idle"),g=i(!1),u=i(null),d=i(null),c=i(null),s=i(""),f=i(null),m=i(0),p=null;const q={get state(){return e(o)},get isElectron(){return e(g)},get activeEntityId(){return e(u)},get activeRepo(){return e(d)},get meetingTitle(){return e(s)},get platform(){return e(f)},get elapsedSeconds(){return e(m)},get recordingStartTime(){return e(c)},handleElectronReady(){n(g,!0),console.log("[Meeting] Electron detected")},async handleRecordingStarted(t){if(e(o)!=="idle")return;const r=t.repo||await R();if(!r){console.error("[Meeting] No collection configured for meetings");return}n(s,t.meetingTitle||"",!0),n(f,t.platform||null,!0),n(d,r,!0),n(c,new Date,!0),n(o,"recording"),n(m,0),p=setInterval(()=>{M(m)},1e3);const l=T(e(s)||"Meeting",e(c));try{await v(r,"meeting",l,{name:e(s)||`Meeting ${h(e(c))}`,date:e(c).toISOString().slice(0,10),attendees:(t.attendees||[]).filter(a=>!a.isSelf).map(a=>`[[${S(a.name)}]]`),tags:["auto-transcribed",t.platform].filter(Boolean)},""),n(u,l,!0),$(`/${r}/meeting/${l}`),window.postMessage({type:"sg:entity-created",repo:r,entityType:"meeting",entityId:l},"*"),console.log(`[Meeting] Created entity ${l}, navigating`)}catch(a){console.error("[Meeting] Failed to create entity:",a),n(o,"idle"),y()}},async handleRecordingStopped(t){if(e(o)!=="recording")return;n(o,"stopping"),y();const r=E();window.postMessage({type:"sg:stop-ack",entityId:e(u),repo:e(d),memo:r},"*"),n(o,"processing"),console.log(`[Meeting] Stop acknowledged, memo length: ${r.length}`)},startRecording(){e(g)&&window.postMessage({type:"sg:start-recording"},"*")},stopRecording(){!e(g)||e(o)!=="recording"||window.postMessage({type:"sg:stop-recording"},"*")},reset(){n(o,"idle"),n(u,null),n(d,null),n(c,null),n(s,""),n(f,null),n(m,0),y()}};function y(){p&&(clearInterval(p),p=null)}function S(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function T(t,r){const l=r.toISOString().slice(0,10),a=r.toTimeString().slice(0,5).replace(":",""),w=S(t);return`${l}-${w}-${a}`}function h(t){return t.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function E(){const t=document.querySelector(".cm-content");if(t)return t.textContent||"";const r=document.querySelector(".entity-editor textarea");return r?r.value:""}async function R(){try{const t=await I("/api/preferences/settings");if(t.default_meeting_collection)return t.default_meeting_collection}catch{}return null}export{q as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./DsnmJJEf.js";import{p as Q,l as te,s as a,d as O,g as t,a as we,c as u,n as ke,r as v,b as Y,m as ae,t as L,a2 as ie,a3 as _,aG as xe,w as A,G as Se,aH as Te}from"./C3uBrOS5.js";import{a as y,s as D,f as oe,d as ne,c as le,g as E,b as H,e as K}from"./W25ZVI8L.js";import{a as $e,d as Ce,r as ze,s as Me,c as He}from"./DkoHPElM.js";import{i as $,b as Re}from"./D5aIYSkd.js";import{e as Ve,i as qe}from"
|
|
1
|
+
import"./DsnmJJEf.js";import{p as Q,l as te,s as a,d as O,g as t,a as we,c as u,n as ke,r as v,b as Y,m as ae,t as L,a2 as ie,a3 as _,aG as xe,w as A,G as Se,aH as Te}from"./C3uBrOS5.js";import{a as y,s as D,f as oe,d as ne,c as le,g as E,b as H,e as K}from"./W25ZVI8L.js";import{a as $e,d as Ce,r as ze,s as Me,c as He}from"./DkoHPElM.js";import{i as $,b as Re}from"./D5aIYSkd.js";import{e as Ve,i as qe}from"./Ceu9tef6.js";import{s as se}from"./B8ydT5xX.js";import{b as Ae,B as Ee}from"./ZD6ARAtb.js";import{l as re,p as W}from"./FBn-ES5k.js";import{g as ce}from"./YxOzuzo0.js";import{i as de}from"./C8R1sDpW.js";import{S as Ie,a as Le,e as De,f as Be}from"./BFZZEUd5.js";import{apiFetch as Fe}from"./DFYOFE3o.js";import{m}from"./hKIlbeTO.js";var Ke=oe("<title> </title>"),Ue=oe('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function Ge(p,o){const h=re(o,["children","$$slots","$$events","$$legacy"]),R=re(h,["size","title"]);Q(o,!1);const f=ae(),g=ae();let d=W(o,"size",8,16),r=W(o,"title",8,void 0);te(()=>(O(h),O(r())),()=>{a(f,h["aria-label"]||h["aria-labelledby"]||r())}),te(()=>(t(f),O(h)),()=>{a(g,{"aria-hidden":t(f)?void 0:!0,role:t(f)?"img":void 0,focusable:Number(h.tabindex)===0?!0:void 0})}),we(),de();var n=Ue();$e(n,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(g),...R}));var s=u(n);{var k=C=>{var z=Ke(),V=u(z,!0);v(z),L(()=>D(V,r())),y(C,z)};$(s,C=>{r()&&C(k)})}ke(3),v(n),y(p,n),Y()}function Ne(p){const o=new URLSearchParams;return p.q&&o.set("q",p.q),p.type&&o.set("type",p.type),p.tags&&o.set("tags",p.tags),p.repos&&o.set("repos",p.repos),Fe(`/api/search?${o.toString()}`)}var Pe=H('<span class="recording-title svelte-65kpoi"> </span>'),Oe=H('<button class="stop-btn svelte-65kpoi" title="Stop recording"><!></button>'),We=H('<span class="stopping-text svelte-65kpoi">Stopping...</span>'),Qe=H('<div class="recording-indicator svelte-65kpoi"><button class="recording-info svelte-65kpoi" title="Go to meeting"><span class="recording-dot svelte-65kpoi"></span> <span class="recording-time svelte-65kpoi"> </span> <!></button> <!></div>');function Ye(p,o){Q(o,!1);function h(r){const n=Math.floor(r/60),s=r%60;return`${n}:${s.toString().padStart(2,"0")}`}function R(){m.activeRepo&&m.activeEntityId&&ce(`/${m.activeRepo}/meeting/${m.activeEntityId}`)}de();var f=le(),g=ie(f);{var d=r=>{var n=Qe(),s=u(n),k=_(u(s),2),C=u(k,!0);v(k);var z=_(k,2);{var V=l=>{var c=Pe(),q=u(c,!0);v(c),L(()=>D(q,m.meetingTitle)),y(l,c)};$(z,l=>{m.meetingTitle&&l(V)})}v(s);var I=_(s,2);{var U=l=>{var c=Oe(),q=u(c);Ie(q,{size:14}),v(c),E("click",c,()=>m.stopRecording()),y(l,c)},G=l=>{var c=We();y(l,c)};$(I,l=>{m.state==="recording"?l(U):l(G,!1)})}v(n),L(l=>D(C,l),[()=>h(m.elapsedSeconds)]),E("click",s,R),y(r,n)};$(g,r=>{(m.state==="recording"||m.state==="stopping")&&r(d)})}y(p,f),Y()}ne(["click"]);var Ze=H('<button><span class="search-result-dot svelte-r6dy5f"></span> <span class="search-result-name svelte-r6dy5f"> </span> <span class="search-result-type svelte-r6dy5f"> </span></button>'),je=H('<div class="search-dropdown svelte-r6dy5f"></div>'),Je=H('<div class="top-bar svelte-r6dy5f"><div class="bar-left svelte-r6dy5f"></div> <div><!> <input class="search-input svelte-r6dy5f" type="text"/> <!></div> <div class="bar-right svelte-r6dy5f"><!> <!> <!></div></div>');function ft(p,o){Q(o,!0),W(o,"activeView",3,"entity");const h=xe("chat");function R(e){ce(e,{noScroll:!0})}let f=A(null),g=A(""),d=A(Se([])),r=A(!1),n=A(!1),s=A(-1),k=null;function C(){const e=t(g).trim();if(!e){a(d,[],!0),a(r,!1),a(s,-1);return}k&&clearTimeout(k),k=setTimeout(async()=>{try{const b=await Ne({q:e}),S=e.toLowerCase();a(d,b.filter(i=>!i.id.toLowerCase().startsWith("readme")).map(i=>{const T=i.data?.name||i.id.replace(/-/g," ").replace(/\b\w/g,F=>F.toUpperCase()),w=T.toLowerCase(),B=i.id.toLowerCase();let M=0;return w===S?M=4:w.startsWith(S)?M=3:(w.includes(S)||B.includes(S))&&(M=2),{id:i.id,entityType:i.entityType,name:T,repo:i.repoName??i.path.split("/")[0],_score:M,_updated:i.data?.updated_at??""}}).sort((i,T)=>T._score!==i._score?T._score-i._score:T._updated.localeCompare(i._updated)),!0),a(r,t(d).length>0),a(s,-1)}catch{a(d,[],!0),a(r,!1)}},150)}function z(e){e.key==="ArrowDown"?(e.preventDefault(),a(s,Math.min(t(s)+1,t(d).length-1),!0)):e.key==="ArrowUp"?(e.preventDefault(),a(s,Math.max(t(s)-1,-1),!0)):e.key==="Enter"?(e.preventDefault(),t(s)>=0&&t(d)[t(s)]?V(t(d)[t(s)]):t(g).trim()&&(R(`/workspace/search?q=${encodeURIComponent(t(g).trim())}`),I())):e.key==="Escape"&&(I(),t(f)?.blur())}function V(e){I(),R(`/${e.repo}/${e.entityType}/${e.id}`)}function I(){a(g,""),a(d,[],!0),a(r,!1),a(s,-1)}function U(){a(n,!1),setTimeout(()=>{a(r,!1)},150)}function G(){a(n,!0),t(d).length>0&&a(r,!0)}var l=Je();K("keydown",Te,e=>{(e.metaKey||e.ctrlKey)&&e.key==="k"&&(e.preventDefault(),t(f)?.focus())});var c=_(u(l),2);let q;var Z=u(c);{var pe=e=>{Le(e,{size:14})};$(Z,e=>{t(n)||e(pe)})}var x=_(Z,2);ze(x),Re(x,e=>a(f,e),()=>t(f));var ve=_(x,2);{var fe=e=>{var b=je();Ve(b,21,()=>t(d),qe,(S,i,T)=>{var w=Ze();let B;var M=u(w);let F;var N=_(M,2),_e=u(N,!0);v(N);var ee=_(N,2),ye=u(ee,!0);v(ee),v(w),L((P,be)=>{B=se(w,1,"search-result svelte-r6dy5f",null,B,{selected:T===t(s)}),F=Me(M,"",F,P),D(_e,t(i).name),D(ye,be)},[()=>({background:De(t(i).entityType)}),()=>Be(t(i).entityType)]),E("mousedown",w,P=>{P.preventDefault(),V(t(i))}),K("mouseenter",w,()=>{a(s,T,!0)}),y(S,w)}),v(b),y(e,b)};$(ve,e=>{t(r)&&e(fe)})}v(c);var j=_(c,2),J=u(j);{var ue=e=>{Ye(e,{})};$(J,e=>{m.state!=="idle"&&e(ue)})}var X=_(J,2);{var me=e=>{var b=le(),S=ie(b);He(S,()=>o.right),y(e,b)};$(X,e=>{o.right&&e(me)})}var he=_(X,2);{var ge=e=>{Ee(e,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return h.toggle},children:(b,S)=>{Ge(b,{size:14})},$$slots:{default:!0}})};$(he,e=>{h.open||e(ge)})}v(j),v(l),L(e=>{q=se(c,1,"search-area svelte-r6dy5f",null,q,{focused:t(n)}),Ce(x,"placeholder",e)},[()=>t(n)?"":`Search entries... (${navigator?.platform?.includes("Mac")?"⌘":"Ctrl+"}K)`]),E("click",c,()=>t(f)?.focus()),E("input",x,C),E("keydown",x,z),K("blur",x,U),K("focus",x,G),Ae(x,()=>t(g),e=>a(g,e)),y(p,l),Y()}ne(["click","input","keydown","mousedown"]);export{ft as V,Ne as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{_ as s}from"../chunks/PPVm8Dsz.js";import{s as V,V as $,g as m,aB as tt,a1 as et,m as rt,p as at,a6 as st,u as ot,aC as nt,aD as it,a2 as v,a3 as mt,b as _t,w as k,a4 as O,c as ct,r as ut,t as dt}from"../chunks/C3uBrOS5.js";import{h as lt,m as ft,u as vt,a as u,c as p,b as G,t as gt,s as ht}from"../chunks/W25ZVI8L.js";import"../chunks/DsnmJJEf.js";import{i as D,b as R}from"../chunks/D5aIYSkd.js";import{c as A}from"../chunks/2nrc8f_O.js";import{p as L}from"../chunks/FBn-ES5k.js";function pt(o){return class extends Et{constructor(t){super({component:o,...t})}}}class Et{#e;#t;constructor(t){var a=new Map,_=(r,e)=>{var c=rt(e,!1,!1);return a.set(r,c),c};const i=new Proxy({...t.props||{},$$events:{}},{get(r,e){return m(a.get(e)??_(e,Reflect.get(r,e)))},has(r,e){return e===$?!0:(m(a.get(e)??_(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,c){return V(a.get(e)??_(e,c),c),Reflect.set(r,e,c)}});this.#t=(t.hydrate?lt:ft)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&tt(),this.#e=i.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||et(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(i,r)},this.#t.$destroy=()=>{vt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const _=(...i)=>a.call(this,...i);return this.#e[t].push(_),()=>{this.#e[t]=this.#e[t].filter(i=>i!==_)}}$destroy(){this.#t.$destroy()}}const kt={};var Pt=G('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),yt=G("<!> <!>",1);function bt(o,t){at(t,!0);let a=L(t,"components",23,()=>[]),_=L(t,"data_0",3,null),i=L(t,"data_1",3,null),r=L(t,"data_2",3,null);st(()=>t.stores.page.set(t.page)),ot(()=>{t.stores,t.page,t.constructors,a(),t.form,_(),i(),r(),t.stores.page.notify()});let e=k(!1),c=k(!1),j=k(null);nt(()=>{const n=t.stores.page.subscribe(()=>{m(e)&&(V(c,!0),it().then(()=>{V(j,document.title||"untitled page",!0)}))});return V(e,!0),n});const q=O(()=>t.constructors[2]);var C=yt(),S=v(C);{var z=n=>{const d=O(()=>t.constructors[0]);var l=p(),E=v(l);A(E,()=>m(d),(f,g)=>{R(g(f,{get data(){return _()},get form(){return t.form},get params(){return t.page.params},children:(P,Rt)=>{var M=p(),K=v(M);{var N=h=>{const I=O(()=>t.constructors[1]);var y=p(),T=v(y);A(T,()=>m(I),(w,x)=>{R(x(w,{get data(){return i()},get form(){return t.form},get params(){return t.page.params},children:(b,At)=>{var B=p(),U=v(B);A(U,()=>m(q),(W,X)=>{R(X(W,{get data(){return r()},get form(){return t.form},get params(){return t.page.params}}),Z=>a()[2]=Z,()=>a()?.[2])}),u(b,B)},$$slots:{default:!0}}),b=>a()[1]=b,()=>a()?.[1])}),u(h,y)},Q=h=>{const I=O(()=>t.constructors[1]);var y=p(),T=v(y);A(T,()=>m(I),(w,x)=>{R(x(w,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),b=>a()[1]=b,()=>a()?.[1])}),u(h,y)};D(K,h=>{t.constructors[2]?h(N):h(Q,!1)})}u(P,M)},$$slots:{default:!0}}),P=>a()[0]=P,()=>a()?.[0])}),u(n,l)},F=n=>{const d=O(()=>t.constructors[0]);var l=p(),E=v(l);A(E,()=>m(d),(f,g)=>{R(g(f,{get data(){return _()},get form(){return t.form},get params(){return t.page.params}}),P=>a()[0]=P,()=>a()?.[0])}),u(n,l)};D(S,n=>{t.constructors[1]?n(z):n(F,!1)})}var H=mt(S,2);{var J=n=>{var d=Pt(),l=ct(d);{var E=f=>{var g=gt();dt(()=>ht(g,m(j))),u(f,g)};D(l,f=>{m(c)&&f(E)})}ut(d),u(n,d)};D(H,n=>{m(e)&&n(J)})}u(o,C),_t()}const jt=pt(bt),Ct=[()=>s(()=>import("../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CXKwjs4U.js","../chunks/PPVm8Dsz.js","../chunks/DsnmJJEf.js","../chunks/C3uBrOS5.js","../chunks/W25ZVI8L.js","../chunks/D5aIYSkd.js","../chunks/DkoHPElM.js","../chunks/B8ydT5xX.js","../chunks/DFYOFE3o.js","../chunks/HQpwSOb3.js","../chunks/YxOzuzo0.js","../chunks/BPCkkwqe.js","../chunks/BhlvzGQx.js","../chunks/DUMOo1Pn.js","../chunks/Ceu9tef6.js","../chunks/BA905oIh.js","../chunks/BlMknQeF.js","../chunks/CtYLtD7K.js","../chunks/hKIlbeTO.js","../chunks/FBn-ES5k.js","../chunks/D-HDy5qS.js","../chunks/CzvyORji.js","../chunks/2nrc8f_O.js","../chunks/C8R1sDpW.js","../assets/Toaster.rN8r_Hzv.css","../chunks/BpjqrlCg.js","../assets/0.uPSqtsC5.css","../nodes/1.DNx5LZv1.js","../nodes/2.BVueWdeX.js","../chunks/ZD6ARAtb.js","../chunks/C50QlEfb.js","../chunks/BFZZEUd5.js","../chunks/XjsuEnNE.js","../chunks/DHouWzJA.js","../assets/wikilinks.CzMBkUMB.css","../chunks/DKVwX-g0.js","../chunks/DWX9f6AF.js","../chunks/CE5FBajK.js","../chunks/ByBZ7JIT.js","../chunks/CojKppbh.js","../chunks/vxEtkL8z.js","../chunks/DBBXARVf.js","../assets/2.BT_zrekP.css","../nodes/3.B7iHCEWu.js","../chunks/tlhR7r2b.js","../assets/ViewToolbar.BWE03S64.css","../chunks/8Q3ZJIYu.js","../chunks/ChsiIm-E.js","../assets/3.BxdqT7zi.css","../nodes/4.B52sGhtq.js","../chunks/rGIarcnp.js","../chunks/CqkleIqs.js","../assets/4.DdNqjd0T.css","../nodes/5.CNrv7A5m.js","../assets/5.DFeGxLYf.css","../nodes/6.lTIzFo68.js","../chunks/DeTlzd-_.js","../assets/GraphView.D9ePpZez.css","../assets/6.DXZr_rI_.css","../nodes/7.Ea5Cjcvm.js","../nodes/8.CVTUi9tC.js","../nodes/9.CGLfUHbZ.js","../chunks/C2yWcTgh.js","../assets/WorkspaceView.CgGDi_Zb.css","../nodes/10.12cppxWZ.js","../nodes/11.uVqRL_He.js","../assets/11.2jzI3cZY.css","../nodes/12.Cm9ETZkQ.js","../assets/12.CT4xL4K3.css","../nodes/13.CmoH0CCC.js","../assets/13.BUrHkYry.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s}from"../chunks/PPVm8Dsz.js";import{s as V,V as $,g as m,aB as tt,a1 as et,m as rt,p as at,a6 as st,u as ot,aC as nt,aD as it,a2 as v,a3 as mt,b as _t,w as k,a4 as O,c as ct,r as ut,t as dt}from"../chunks/C3uBrOS5.js";import{h as lt,m as ft,u as vt,a as u,c as p,b as G,t as gt,s as ht}from"../chunks/W25ZVI8L.js";import"../chunks/DsnmJJEf.js";import{i as D,b as R}from"../chunks/D5aIYSkd.js";import{c as A}from"../chunks/2nrc8f_O.js";import{p as L}from"../chunks/FBn-ES5k.js";function pt(o){return class extends Et{constructor(t){super({component:o,...t})}}}class Et{#e;#t;constructor(t){var a=new Map,_=(r,e)=>{var c=rt(e,!1,!1);return a.set(r,c),c};const i=new Proxy({...t.props||{},$$events:{}},{get(r,e){return m(a.get(e)??_(e,Reflect.get(r,e)))},has(r,e){return e===$?!0:(m(a.get(e)??_(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,c){return V(a.get(e)??_(e,c),c),Reflect.set(r,e,c)}});this.#t=(t.hydrate?lt:ft)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&tt(),this.#e=i.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||et(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(i,r)},this.#t.$destroy=()=>{vt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const _=(...i)=>a.call(this,...i);return this.#e[t].push(_),()=>{this.#e[t]=this.#e[t].filter(i=>i!==_)}}$destroy(){this.#t.$destroy()}}const kt={};var Pt=G('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),yt=G("<!> <!>",1);function bt(o,t){at(t,!0);let a=L(t,"components",23,()=>[]),_=L(t,"data_0",3,null),i=L(t,"data_1",3,null),r=L(t,"data_2",3,null);st(()=>t.stores.page.set(t.page)),ot(()=>{t.stores,t.page,t.constructors,a(),t.form,_(),i(),r(),t.stores.page.notify()});let e=k(!1),c=k(!1),j=k(null);nt(()=>{const n=t.stores.page.subscribe(()=>{m(e)&&(V(c,!0),it().then(()=>{V(j,document.title||"untitled page",!0)}))});return V(e,!0),n});const q=O(()=>t.constructors[2]);var C=yt(),S=v(C);{var z=n=>{const d=O(()=>t.constructors[0]);var l=p(),E=v(l);A(E,()=>m(d),(f,g)=>{R(g(f,{get data(){return _()},get form(){return t.form},get params(){return t.page.params},children:(P,Rt)=>{var M=p(),K=v(M);{var N=h=>{const I=O(()=>t.constructors[1]);var y=p(),T=v(y);A(T,()=>m(I),(w,x)=>{R(x(w,{get data(){return i()},get form(){return t.form},get params(){return t.page.params},children:(b,At)=>{var B=p(),U=v(B);A(U,()=>m(q),(W,X)=>{R(X(W,{get data(){return r()},get form(){return t.form},get params(){return t.page.params}}),Z=>a()[2]=Z,()=>a()?.[2])}),u(b,B)},$$slots:{default:!0}}),b=>a()[1]=b,()=>a()?.[1])}),u(h,y)},Q=h=>{const I=O(()=>t.constructors[1]);var y=p(),T=v(y);A(T,()=>m(I),(w,x)=>{R(x(w,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),b=>a()[1]=b,()=>a()?.[1])}),u(h,y)};D(K,h=>{t.constructors[2]?h(N):h(Q,!1)})}u(P,M)},$$slots:{default:!0}}),P=>a()[0]=P,()=>a()?.[0])}),u(n,l)},F=n=>{const d=O(()=>t.constructors[0]);var l=p(),E=v(l);A(E,()=>m(d),(f,g)=>{R(g(f,{get data(){return _()},get form(){return t.form},get params(){return t.page.params}}),P=>a()[0]=P,()=>a()?.[0])}),u(n,l)};D(S,n=>{t.constructors[1]?n(z):n(F,!1)})}var H=mt(S,2);{var J=n=>{var d=Pt(),l=ct(d);{var E=f=>{var g=gt();dt(()=>ht(g,m(j))),u(f,g)};D(l,f=>{m(c)&&f(E)})}ut(d),u(n,d)};D(H,n=>{m(e)&&n(J)})}u(o,C),_t()}const jt=pt(bt),Ct=[()=>s(()=>import("../nodes/0.CXKwjs4U.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url),()=>s(()=>import("../nodes/1.DNx5LZv1.js"),__vite__mapDeps([27,2,23,3,4,10]),import.meta.url),()=>s(()=>import("../nodes/2.BVueWdeX.js"),__vite__mapDeps([28,2,3,4,6,5,7,8,1,14,10,13,12,11,22,29,19,20,30,31,23,32,33,15,16,34,35,36,37,38,39,40,41,17,42]),import.meta.url),()=>s(()=>import("../nodes/3.B7iHCEWu.js"),__vite__mapDeps([43,1,2,3,4,5,14,10,13,12,8,11,6,7,22,44,29,19,20,23,31,18,45,41,36,38,32,17,25,46,47,48]),import.meta.url),()=>s(()=>import("../nodes/4.B52sGhtq.js"),__vite__mapDeps([49,12,8,1,2,3,4,5,7,10,33,23,6,19,20,32,22,29,15,11,13,16,14,34,44,31,18,45,37,50,39,46,51,36,52]),import.meta.url),()=>s(()=>import("../nodes/5.CNrv7A5m.js"),__vite__mapDeps([53,12,8,2,3,4,5,7,10,13,11,54]),import.meta.url),()=>s(()=>import("../nodes/6.lTIzFo68.js"),__vite__mapDeps([55,2,3,4,44,6,5,7,8,14,10,13,12,11,29,19,20,23,31,18,45,56,1,57,58]),import.meta.url),()=>s(()=>import("../nodes/7.Ea5Cjcvm.js"),__vite__mapDeps([59,2,3,10,13,12,8]),import.meta.url),()=>s(()=>import("../nodes/8.CVTUi9tC.js"),__vite__mapDeps([60,2,3,20,30,10,13,12,8]),import.meta.url),()=>s(()=>import("../nodes/9.CGLfUHbZ.js"),__vite__mapDeps([61,2,3,4,33,23,5,6,7,8,19,20,32,22,29,15,1,10,11,12,13,16,14,34,44,31,18,45,62,35,41,46,50,40,56,57,47,63]),import.meta.url),()=>s(()=>import("../nodes/10.12cppxWZ.js"),__vite__mapDeps([64,2,3,4,33,23,5,6,7,8,19,20,32,22,29,15,1,10,11,12,13,16,14,34,44,31,18,45,62,35,41,46,50,40,56,57,47,63]),import.meta.url),()=>s(()=>import("../nodes/11.uVqRL_He.js"),__vite__mapDeps([65,2,3,4,5,10,44,6,7,8,14,13,12,11,29,19,20,23,31,18,45,62,1,22,35,15,16,41,33,32,34,46,50,40,56,57,47,63,66]),import.meta.url),()=>s(()=>import("../nodes/12.Cm9ETZkQ.js"),__vite__mapDeps([67,2,3,4,5,9,10,6,7,8,29,19,20,39,68]),import.meta.url),()=>s(()=>import("../nodes/13.CmoH0CCC.js"),__vite__mapDeps([69,2,3,4,5,9,10,6,7,8,11,12,29,19,20,39,70]),import.meta.url)],St=[],Mt={"/(app)":[3,[2]],"/(app)/graph":[6,[2]],"/login":[12],"/(app)/settings":[7,[2]],"/(app)/settings/[tab]":[8,[2]],"/setup":[13],"/(app)/workspace/collection/[name]":[10,[2]],"/(app)/workspace/search":[11,[2]],"/(app)/workspace/[type]":[9,[2]],"/(app)/[repo]/[type]/[id]":[4,[2]],"/(app)/[repo]/[type]/[id]/edit":[5,[2]]},Y={handleError:(({error:o})=>{console.error(o)}),reroute:(()=>{}),transport:{}},Ot=Object.fromEntries(Object.entries(Y.transport).map(([o,t])=>[o,t.decode])),Bt=Object.fromEntries(Object.entries(Y.transport).map(([o,t])=>[o,t.encode])),Gt=!1,Yt=(o,t)=>Ot[o](t);export{Yt as decode,Ot as decoders,Mt as dictionary,Bt as encoders,Gt as hash,Y as hooks,kt as matchers,Ct as nodes,jt as root,St as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/YxOzuzo0.js";export{o as load_css,r as start};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks
|
|
2
|
-
import{_ as A}from"../chunks/PPVm8Dsz.js";import"../chunks/DsnmJJEf.js";import{p as S,l as x,a as H,g as r,c as w,n as O,r as I,b as L,m as y,s as c,d as p,t as Z,aG as ee,w as B,G as U,bq as W,u as D,aC as te,a3 as ae,aa as re,ab as oe,a2 as ie}from"../chunks/C3uBrOS5.js";import{a as _,s as T,f as z,b as ne,c as le}from"../chunks/W25ZVI8L.js";import{i as C}from"../chunks/D5aIYSkd.js";import{a as V,b as R,d as se,c as de}from"../chunks/DkoHPElM.js";import{h as ce}from"../chunks/HQpwSOb3.js";import{g as F}from"../chunks/
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/Ceu9tef6.js","../chunks/C3uBrOS5.js","../chunks/YxOzuzo0.js","../chunks/DUMOo1Pn.js","../chunks/BhlvzGQx.js","../chunks/DFYOFE3o.js","../chunks/BPCkkwqe.js","../chunks/DkoHPElM.js","../chunks/D5aIYSkd.js","../chunks/W25ZVI8L.js","../chunks/B8ydT5xX.js","../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js","../chunks/DnL9f0lc.js","../chunks/CX_61fY8.js","../chunks/BrebtJNG.js","../chunks/wDIGUaoU.js","../chunks/Bz0ZjVQE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as A}from"../chunks/PPVm8Dsz.js";import"../chunks/DsnmJJEf.js";import{p as S,l as x,a as H,g as r,c as w,n as O,r as I,b as L,m as y,s as c,d as p,t as Z,aG as ee,w as B,G as U,bq as W,u as D,aC as te,a3 as ae,aa as re,ab as oe,a2 as ie}from"../chunks/C3uBrOS5.js";import{a as _,s as T,f as z,b as ne,c as le}from"../chunks/W25ZVI8L.js";import{i as C}from"../chunks/D5aIYSkd.js";import{a as V,b as R,d as se,c as de}from"../chunks/DkoHPElM.js";import{h as ce}from"../chunks/HQpwSOb3.js";import{g as F}from"../chunks/YxOzuzo0.js";import{w as N}from"../chunks/BPCkkwqe.js";import{n as me}from"../chunks/DUMOo1Pn.js";import{c as ue}from"../chunks/Ceu9tef6.js";import{r as j}from"../chunks/BA905oIh.js";import{insightsStore as Y}from"../chunks/CtYLtD7K.js";import{m as q}from"../chunks/hKIlbeTO.js";import{l as E,p as M,s as he,r as fe}from"../chunks/FBn-ES5k.js";import{T as pe}from"../chunks/CzvyORji.js";import{R as ge}from"../chunks/BpjqrlCg.js";import{i as k}from"../chunks/C8R1sDpW.js";let J=!1;function ve(){J||typeof window>"u"||(J=!0,window.addEventListener("sg:electron-ready",l=>{q.handleElectronReady()}),window.addEventListener("sg:recording-started",l=>{q.handleRecordingStarted(l.detail||{})}),window.addEventListener("sg:recording-stopped",l=>{q.handleRecordingStopped(l.detail||{})}),window.addEventListener("sg:meeting-detected",l=>{console.log("[ElectronBridge] Meeting detected:",l.detail)}),console.log("[ElectronBridge] Initialized"))}var _e=z("<title> </title>"),be=z('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function we(l,o){const e=E(o,["children","$$slots","$$events","$$legacy"]),g=E(e,["size","title"]);S(o,!1);const t=y(),h=y();let m=M(o,"size",8,16),a=M(o,"title",8,void 0);x(()=>(p(e),p(a())),()=>{c(t,e["aria-label"]||e["aria-labelledby"]||a())}),x(()=>(r(t),p(e)),()=>{c(h,{"aria-hidden":r(t)?void 0:!0,role:r(t)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),H(),k();var i=be();V(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:m(),height:m(),...r(h),...g}));var s=w(i);{var f=n=>{var d=_e(),b=w(d,!0);I(d),Z(()=>T(b,a())),_(n,d)};C(s,n=>{a()&&n(f)})}O(2),I(i),_(l,i),L()}var Ie=z("<title> </title>"),$e=z('<svg><!><path fill="none" d="M14.9 7.2H17.1V24.799H14.9z" data-icon-path="inner-path" transform="rotate(-45 16 16)"></path><path d="M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"></path></svg>');function xe(l,o){const e=E(o,["children","$$slots","$$events","$$legacy"]),g=E(e,["size","title"]);S(o,!1);const t=y(),h=y();let m=M(o,"size",8,16),a=M(o,"title",8,void 0);x(()=>(p(e),p(a())),()=>{c(t,e["aria-label"]||e["aria-labelledby"]||a())}),x(()=>(r(t),p(e)),()=>{c(h,{"aria-hidden":r(t)?void 0:!0,role:r(t)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),H(),k();var i=$e();V(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:m(),height:m(),...r(h),...g}));var s=w(i);{var f=n=>{var d=Ie(),b=w(d,!0);I(d),Z(()=>T(b,a())),_(n,d)};C(s,n=>{a()&&n(f)})}O(2),I(i),_(l,i),L()}var ye=z("<title> </title>"),Ee=z('<svg><!><path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>');function Me(l,o){const e=E(o,["children","$$slots","$$events","$$legacy"]),g=E(e,["size","title"]);S(o,!1);const t=y(),h=y();let m=M(o,"size",8,16),a=M(o,"title",8,void 0);x(()=>(p(e),p(a())),()=>{c(t,e["aria-label"]||e["aria-labelledby"]||a())}),x(()=>(r(t),p(e)),()=>{c(h,{"aria-hidden":r(t)?void 0:!0,role:r(t)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),H(),k();var i=Ee();V(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:m(),height:m(),...r(h),...g}));var s=w(i);{var f=n=>{var d=ye(),b=w(d,!0);I(d),Z(()=>T(b,a())),_(n,d)};C(s,n=>{a()&&n(f)})}O(2),I(i),_(l,i),L()}var ze=z("<title> </title>"),Ae=z('<svg><!><path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>');function Se(l,o){const e=E(o,["children","$$slots","$$events","$$legacy"]),g=E(e,["size","title"]);S(o,!1);const t=y(),h=y();let m=M(o,"size",8,16),a=M(o,"title",8,void 0);x(()=>(p(e),p(a())),()=>{c(t,e["aria-label"]||e["aria-labelledby"]||a())}),x(()=>(r(t),p(e)),()=>{c(h,{"aria-hidden":r(t)?void 0:!0,role:r(t)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),H(),k();var i=Ae();V(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:m(),height:m(),...r(h),...g}));var s=w(i);{var f=n=>{var d=ze(),b=w(d,!0);I(d),Z(()=>T(b,a())),_(n,d)};C(s,n=>{a()&&n(f)})}O(3),I(i),_(l,i),L()}function Le(l,o){S(o,!0);const e=ee("theme");let g=fe(o,["$$slots","$$events","$$legacy"]);pe(l,he({get theme(){return e.current},class:"toaster group",style:"--normal-bg: var(--color-bg-elevated); --normal-text: var(--color-text-primary); --normal-border: var(--color-border-strong);",duration:6e3},()=>g,{loadingIcon:s=>{ge(s,{class:"size-4 animate-spin"})},successIcon:s=>{we(s,{class:"size-4"})},errorIcon:s=>{xe(s,{class:"size-4"})},infoIcon:s=>{Me(s,{class:"size-4"})},warningIcon:s=>{Se(s,{class:"size-4"})},$$slots:{loadingIcon:!0,successIcon:!0,errorIcon:!0,infoIcon:!0,warningIcon:!0}})),L()}var Pe=ne('<div style="display: contents;"><!> <!></div>');function Je(l,o){S(o,!0);const e=typeof localStorage<"u"?localStorage.getItem("theme"):null,g=typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: light)").matches?"light":"dark";let t=B(U(e||g));W("theme",{get current(){return r(t)},toggle(){c(t,r(t)==="dark"?"light":"dark",!0),localStorage.setItem("theme",r(t))}});const m=typeof localStorage<"u"?localStorage.getItem("chatMode")==="panel"||localStorage.getItem("chatMode")==="full":!1;let a=B(U(m));function i(){localStorage.setItem("chatMode",r(a)?"panel":"closed"),localStorage.removeItem("chatOpen")}W("chat",{get open(){return r(a)},toggle(){c(a,!r(a)),i()},close(){c(a,!1),i()},sendPrompt(u,$){r(a)||(c(a,!0),i()),A(()=>import("../chunks/Ceu9tef6.js").then(v=>v.a),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(v=>{v.chatStore.send(u,$),setTimeout(()=>v.chatStore.triggerScroll(),100)})}}),D(()=>{document.documentElement.setAttribute("data-theme",r(t))}),D(()=>{Y.briefLoaded&&N.applyUserAccentColor(Y.accentColor)});let f=B(null);D(()=>{if(R.loading)return;const u=R.user?.email??(R.authEnabled?null:"__open__");u&&u!==r(f)&&(r(f)!==null&&me.deselect(),c(f,u,!0),N.load(),Y.load(),ue.reinitialize(),j.connect()),!u&&r(f)&&(c(f,null),j.disconnect())}),te(async()=>{ve();const u=window.location.pathname,$=u==="/login",v=u==="/setup",{authenticated:G,authEnabled:Q,needsSetup:X}=await R.checkAuth();if(X&&!v){F("/setup");return}if(Q&&!G&&!$){F("/login");return}if(G&&($||v)){F("/");return}$||v||(A(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([11,12,13]),import.meta.url).catch(()=>{}),Promise.all([A(()=>import("../chunks/CX_61fY8.js"),[],import.meta.url),A(()=>import("../chunks/DnL9f0lc.js").then(P=>P.i),__vite__mapDeps([14,15]),import.meta.url),A(()=>import("../chunks/BrebtJNG.js"),__vite__mapDeps([16,15,14,17,18]),import.meta.url),A(()=>import("../chunks/wDIGUaoU.js"),__vite__mapDeps([17,18,15,14]),import.meta.url),A(()=>import("../chunks/Bz0ZjVQE.js").then(P=>P.i),[],import.meta.url)]).catch(()=>{}),window.addEventListener("sg-theme-change",P=>{c(t,P.detail,!0)}))});var n=Pe();ce("12qhfyh",u=>{re(()=>{oe.title=(N.name||"Studiograph")??""})});var d=w(n);{var b=u=>{var $=le(),v=ie($);de(v,()=>o.children),_(u,$)};C(d,u=>{R.loading||u(b)})}var K=ae(d,2);Le(K,{}),I(n),Z(()=>se(n,"data-theme",r(t))),_(l,n),L()}export{Je as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunks/DsnmJJEf.js";import{i as u}from"../chunks/C8R1sDpW.js";import{p as h,a2 as g,t as l,b as v,c as s,r as e,a3 as d}from"../chunks/C3uBrOS5.js";import{a as _,b as x,s as o}from"../chunks/W25ZVI8L.js";import{s as b,p}from"../chunks/
|
|
1
|
+
import"../chunks/DsnmJJEf.js";import{i as u}from"../chunks/C8R1sDpW.js";import{p as h,a2 as g,t as l,b as v,c as s,r as e,a3 as d}from"../chunks/C3uBrOS5.js";import{a as _,b as x,s as o}from"../chunks/W25ZVI8L.js";import{s as b,p}from"../chunks/YxOzuzo0.js";const $={get error(){return p.error},get status(){return p.status}};b.updated.check;const m=$;var k=x("<h1> </h1> <p> </p>",1);function z(i,c){h(c,!1),u();var t=k(),r=g(t),n=s(r,!0);e(r);var a=d(r,2),f=s(a,!0);e(a),l(()=>{o(n,m.status),o(f,m.error?.message)}),_(i,t),v()}export{z as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunks/DsnmJJEf.js";import{p as d,u as l,g as e,a2 as u,b as _,a4 as r,a3 as g}from"../chunks/C3uBrOS5.js";import{a as v,b as w}from"../chunks/W25ZVI8L.js";import{p as c,k as b}from"../chunks/
|
|
1
|
+
import"../chunks/DsnmJJEf.js";import{p as d,u as l,g as e,a2 as u,b as _,a4 as r,a3 as g}from"../chunks/C3uBrOS5.js";import{a as v,b as w}from"../chunks/W25ZVI8L.js";import{p as c,k as b}from"../chunks/DHouWzJA.js";import{V as y}from"../chunks/tlhR7r2b.js";import{W as h}from"../chunks/C2yWcTgh.js";import{n as k}from"../chunks/DUMOo1Pn.js";import{w as N}from"../chunks/BPCkkwqe.js";function S({params:t}){return{collectionName:t.name}}const I=Object.freeze(Object.defineProperty({__proto__:null,load:S},Symbol.toStringTag,{value:"Module"}));var V=w("<!> <!>",1);function K(t,n){d(n,!0);const a=r(()=>n.data.collectionName),m=r(()=>N.repos.find(o=>o.name===e(a))?.displayName??e(a));l(()=>{k.showView(-1)}),l(()=>{const o=e(a);return c.enter(o,"_collection","_chat"),()=>c.leave()});var s=V(),i=u(s);y(i,{activeView:"view"});var p=g(i,2);b(p,()=>e(a),o=>{{let f=r(()=>`collection-${e(a)}`);h(o,{get name(){return e(m)},get storageId(){return e(f)},get lockedCollection(){return e(a)},defaultSortKey:"created_at",defaultSortAsc:!1})}}),v(t,s),_()}export{K as component,I as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunks/DsnmJJEf.js";import{p as w,w as p,G as q,u,g as a,s as t,a2 as V,b as P,a4 as d,a3 as W}from"../chunks/C3uBrOS5.js";import{a as g,b as v}from"../chunks/W25ZVI8L.js";import{i as j}from"../chunks/D5aIYSkd.js";import{g as k}from"../chunks/
|
|
1
|
+
import"../chunks/DsnmJJEf.js";import{p as w,w as p,G as q,u,g as a,s as t,a2 as V,b as P,a4 as d,a3 as W}from"../chunks/C3uBrOS5.js";import{a as g,b as v}from"../chunks/W25ZVI8L.js";import{i as j}from"../chunks/D5aIYSkd.js";import{g as k}from"../chunks/YxOzuzo0.js";import{s as x,V as E}from"../chunks/tlhR7r2b.js";import{W as O}from"../chunks/C2yWcTgh.js";import{n as T}from"../chunks/DUMOo1Pn.js";import{r as z,t as A}from"../chunks/BPCkkwqe.js";const C=({url:i})=>({query:i.searchParams.get("q")??""}),Q=Object.freeze(Object.defineProperty({__proto__:null,load:C},Symbol.toStringTag,{value:"Module"}));var F=v('<div class="search-loading svelte-u56y4m">Searching...</div>'),G=v("<!> <!>",1);function R(i,m){w(m,!0);const n=d(()=>m.data.query);let r=p(q([])),s=p(!1);u(()=>{T.showView(-1)}),u(()=>{const e=a(n);if(!e){t(r,[],!0),k("/",{replaceState:!0});return}t(s,!0),x({q:e}).then(l=>{t(r,l.filter(o=>!o.id.toLowerCase().startsWith("readme")).map(o=>{const S=z(o.path);return A(o,S)}),!0),t(s,!1)}).catch(()=>{t(r,[],!0),t(s,!1)})});const h=d(()=>a(n)?`Search: ${a(n)}`:"Search");var c=G(),f=V(c);E(f,{activeView:"view"});var _=W(f,2);{var y=e=>{var l=F();g(e,l)},b=e=>{O(e,{get name(){return a(h)},storageId:"search",get entities(){return a(r)},defaultSortKey:"created_at",defaultSortAsc:!1})};j(_,e=>{a(s)&&a(r).length===0?e(y):e(b,!1)})}g(i,c),P()}export{R as component,Q as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunks/DsnmJJEf.js";import{p as G,t as S,b as H,aa as J,g as s,w as p,a3 as l,a4 as K,c as a,ab as L,r as t,s as o,n as M}from"../chunks/C3uBrOS5.js";import{e as O,a as b,t as Q,s as _,b as P}from"../chunks/W25ZVI8L.js";import{i as R}from"../chunks/D5aIYSkd.js";import{h as V}from"../chunks/HQpwSOb3.js";import{g as W}from"../chunks/
|
|
1
|
+
import"../chunks/DsnmJJEf.js";import{p as G,t as S,b as H,aa as J,g as s,w as p,a3 as l,a4 as K,c as a,ab as L,r as t,s as o,n as M}from"../chunks/C3uBrOS5.js";import{e as O,a as b,t as Q,s as _,b as P}from"../chunks/W25ZVI8L.js";import{i as R}from"../chunks/D5aIYSkd.js";import{h as V}from"../chunks/HQpwSOb3.js";import{g as W}from"../chunks/YxOzuzo0.js";import{b as q}from"../chunks/DkoHPElM.js";import{B as X}from"../chunks/ZD6ARAtb.js";import{I}from"../chunks/CojKppbh.js";var Y=P('<p class="error-msg svelte-1x05zx6"> </p>'),Z=P('<div class="login-page svelte-1x05zx6"><div class="login-card svelte-1x05zx6"><div class="logo svelte-1x05zx6"><div class="logo-icon svelte-1x05zx6"> </div> <span class="logo-text svelte-1x05zx6"> </span></div> <form class="svelte-1x05zx6"><label class="field svelte-1x05zx6"><span class="field-label svelte-1x05zx6">Email</span> <!></label> <label class="field svelte-1x05zx6"><span class="field-label svelte-1x05zx6">Password</span> <!></label> <!> <!></form></div></div>');function pe(k,B){G(B,!0);const v=K(()=>q.workspaceName||"Studiograph");let h=p(""),z=p(""),n=p(""),u=p(!1);async function E(e){e.preventDefault();const r=e.currentTarget,i=r.querySelector('input[type="email"]').value,j=r.querySelector('input[type="password"]').value;o(n,""),o(u,!0);try{await q.login(i,j),W("/")}catch(F){o(n,F.message||"Invalid credentials",!0)}finally{o(u,!1)}}var d=Z();V("1x05zx6",e=>{J(()=>{L.title=`Sign in — ${s(v)??""}`})});var y=a(d),c=a(y),m=a(c),N=a(m,!0);t(m);var w=l(m,2),A=a(w,!0);t(w),t(c);var f=l(c,2),x=a(f),C=l(a(x),2);I(C,{type:"email",required:!0,autocomplete:"email",autofocus:!0,class:"field-input",get value(){return s(h)},set value(e){o(h,e,!0)}}),t(x);var g=l(x,2),D=l(a(g),2);I(D,{type:"password",required:!0,autocomplete:"current-password",class:"field-input",get value(){return s(z)},set value(e){o(z,e,!0)}}),t(g);var $=l(g,2);{var T=e=>{var r=Y(),i=a(r,!0);t(r),S(()=>_(i,s(n))),b(e,r)};R($,e=>{s(n)&&e(T)})}var U=l($,2);X(U,{variant:"accent",type:"submit",class:"submit-btn",get disabled(){return s(u)},children:(e,r)=>{M();var i=Q("Sign in");b(e,i)},$$slots:{default:!0}}),t(f),t(y),t(d),S(e=>{_(N,e),_(A,s(v))},[()=>s(v).charAt(0).toUpperCase()]),O("submit",f,E),b(k,d),H()}export{pe as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunks/DsnmJJEf.js";import{p as G,t as N,b as H,aa as J,s as r,g as a,w as o,a3 as l,c as t,a4 as K,ab as O,r as s,n as q}from"../chunks/C3uBrOS5.js";import{e as Q,a as y,t as R,s as $,b as B}from"../chunks/W25ZVI8L.js";import{i as T}from"../chunks/D5aIYSkd.js";import{h as V}from"../chunks/HQpwSOb3.js";import{g as W}from"../chunks/
|
|
1
|
+
import"../chunks/DsnmJJEf.js";import{p as G,t as N,b as H,aa as J,s as r,g as a,w as o,a3 as l,c as t,a4 as K,ab as O,r as s,n as q}from"../chunks/C3uBrOS5.js";import{e as Q,a as y,t as R,s as $,b as B}from"../chunks/W25ZVI8L.js";import{i as T}from"../chunks/D5aIYSkd.js";import{h as V}from"../chunks/HQpwSOb3.js";import{g as W}from"../chunks/YxOzuzo0.js";import{b as A}from"../chunks/DkoHPElM.js";import{w as X}from"../chunks/BPCkkwqe.js";import{B as Z}from"../chunks/ZD6ARAtb.js";import{I as S}from"../chunks/CojKppbh.js";var ee=B('<p class="error-msg svelte-g40i6i"> </p>'),ae=B('<div class="setup-page svelte-g40i6i"><div class="setup-card svelte-g40i6i"><div class="logo svelte-g40i6i"><div class="logo-icon svelte-g40i6i"> </div> <span class="logo-text svelte-g40i6i"> </span></div> <p class="subtitle svelte-g40i6i">Create your admin account to get started.</p> <form class="svelte-g40i6i"><label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Name</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Email</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Password</span> <!> <span class="field-hint svelte-g40i6i">At least 8 characters</span></label> <!> <!></form></div></div>');function de(P,D){G(D,!0);const n=K(()=>A.workspaceName||"Studiograph");let u=o(""),v=o(""),d=o(""),p=o(""),c=o(!1);async function E(e){e.preventDefault(),r(p,""),r(c,!0);try{await A.setup(a(u),a(v),a(d)||void 0),localStorage.setItem("chatMode","panel"),X.load(),W("/")}catch(i){r(p,i.message||"Setup failed",!0)}finally{r(c,!1)}}var m=ae();V("g40i6i",e=>{J(()=>{O.title=`Setup — ${a(n)??""}`})});var k=t(m),f=t(k),g=t(f),L=t(g,!0);s(g);var C=l(g,2),M=t(C,!0);s(C),s(f);var b=l(f,4),_=t(b),U=l(t(_),2);S(U,{type:"text",placeholder:"Your name",autocomplete:"name",autofocus:!0,class:"field-input",get value(){return a(d)},set value(e){r(d,e,!0)}}),s(_);var h=l(_,2),Y=l(t(h),2);S(Y,{type:"email",required:!0,autocomplete:"email",class:"field-input",get value(){return a(u)},set value(e){r(u,e,!0)}}),s(h);var w=l(h,2),j=l(t(w),2);S(j,{type:"password",required:!0,minlength:8,autocomplete:"new-password",class:"field-input",get value(){return a(v)},set value(e){r(v,e,!0)}}),q(2),s(w);var I=l(w,2);{var z=e=>{var i=ee(),x=t(i,!0);s(i),N(()=>$(x,a(p))),y(e,i)};T(I,e=>{a(p)&&e(z)})}var F=l(I,2);Z(F,{variant:"accent",type:"submit",class:"submit-btn",get disabled(){return a(c)},children:(e,i)=>{q();var x=R("Create account");y(e,x)},$$slots:{default:!0}}),s(b),s(k),s(m),N(e=>{$(L,e),$(M,a(n))},[()=>a(n).charAt(0).toUpperCase()]),Q("submit",b,E),y(P,m),H()}export{de as component};
|