@bkm016/basalt 0.1.9 → 0.1.10
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/{chunk-0xd9mnc2.js → chunk-0mjb3sm3.js} +2 -2
- package/{chunk-66h5qpc6.js → chunk-3mqf9ped.js} +89 -89
- package/compiled.js +1 -1
- package/package.json +1 -1
- package/ui-test-worker.js +1 -1
- package/web/chunk-045d3b5d.js +1 -0
- package/web/{chunk-ff1pmd3g.js → chunk-0770q5e1.js} +1 -1
- package/web/{chunk-2x4g9t37.js → chunk-18neka5g.js} +2 -2
- package/web/{chunk-w3w18stt.js → chunk-1ev0n3n4.js} +1 -1
- package/web/chunk-1ex3wgms.js +2 -0
- package/web/{chunk-7qkav30b.js → chunk-1qh7f5kr.js} +1 -1
- package/web/{chunk-rayf24gy.js → chunk-26ecc2xh.js} +8 -8
- package/web/{chunk-me7dza1c.js → chunk-2cz7tx8q.js} +1 -1
- package/web/{chunk-mdfksj61.js → chunk-32ty2xfn.js} +1 -1
- package/web/{chunk-ts6jsfdk.js → chunk-3eexx7y5.js} +1 -1
- package/web/{chunk-2dvbeqt0.js → chunk-46jnkghq.js} +1 -1
- package/web/chunk-4am8j3k3.js +1 -0
- package/web/{chunk-qz6r9v1z.js → chunk-5qvmefq2.js} +1 -1
- package/web/{chunk-9ctg0f30.js → chunk-5svqfj4g.js} +1 -1
- package/web/{chunk-qsqtwf34.js → chunk-5v5q13hz.js} +1 -1
- package/web/chunk-7np1jp3x.js +8 -0
- package/web/chunk-87e8d1hv.js +1 -0
- package/web/{chunk-kcjz03h5.js → chunk-88wd49xe.js} +2 -2
- package/web/{chunk-0pghpg4y.js → chunk-8h2x89tw.js} +1 -1
- package/web/chunk-8y2526ve.js +1 -0
- package/web/{chunk-8jcvdd5d.js → chunk-905vw286.js} +1 -1
- package/web/{chunk-2hrswh3d.js → chunk-918e5t4x.js} +1 -1
- package/web/chunk-96m2m3e8.js +1 -0
- package/web/{chunk-43g4wd7a.js → chunk-9f4zzqbx.js} +1 -1
- package/web/{chunk-dnv8dx72.js → chunk-a1n4468c.js} +1 -1
- package/web/{chunk-s37beysw.js → chunk-b46ws7rf.js} +1 -1
- package/web/{chunk-24jhbz82.js → chunk-bc3ajvfg.js} +1 -1
- package/web/{chunk-ket6g0yd.js → chunk-d5gshd1a.js} +1 -1
- package/web/{chunk-c6yacwbc.js → chunk-de40q05r.js} +1 -1
- package/web/chunk-dp0k5vhd.js +1 -0
- package/web/{chunk-5dr4tkem.js → chunk-dv1berk6.js} +3 -3
- package/web/{chunk-dwjmr0zj.js → chunk-eh7wp62z.js} +1 -1
- package/web/{chunk-ctzkqx2g.js → chunk-ehtmb6sn.js} +1 -1
- package/web/chunk-et1hytyv.js +1 -0
- package/web/chunk-f9m9seam.js +1 -0
- package/web/{chunk-3pd0qt83.js → chunk-fmmrthpa.js} +2 -2
- package/web/chunk-g2erm7k0.js +1 -0
- package/web/chunk-g3kbn0t2.js +1 -0
- package/web/{chunk-t893141g.js → chunk-g7dc4hrd.js} +1 -1
- package/web/{chunk-p9hfcamx.js → chunk-g7kz8f7q.js} +1 -1
- package/web/chunk-ght0t49g.js +1 -0
- package/web/{chunk-xa43ndfj.js → chunk-ghwm7bdj.js} +2 -2
- package/web/{chunk-8z0r0wtk.js → chunk-grm2208k.js} +1 -1
- package/web/{chunk-0zwc2rvh.js → chunk-gsw1tv96.js} +1 -1
- package/web/{chunk-tftc5v89.js → chunk-gw8x1g61.js} +1 -1
- package/web/chunk-gx340asc.js +1 -0
- package/web/{chunk-935mjq1c.js → chunk-h2txs73e.js} +1 -1
- package/web/chunk-h3tkacc7.js +1 -0
- package/web/{chunk-ewx42c11.js → chunk-h5ckjk48.js} +1 -1
- package/web/{chunk-nnyc889n.js → chunk-j37p0b13.js} +1 -1
- package/web/{chunk-fjb3ksfd.js → chunk-j89s11x8.js} +1 -1
- package/web/chunk-je78j3vr.js +1 -0
- package/web/{chunk-fpb2dd2d.js → chunk-jke2ev6m.js} +1 -1
- package/web/{chunk-98y92vmh.js → chunk-js6kb05s.js} +1 -1
- package/web/{chunk-30b33r2w.js → chunk-k0cg4n2k.js} +2 -2
- package/web/{chunk-b5h52neg.js → chunk-knm82fw9.js} +1 -1
- package/web/{chunk-vqmj6peg.js → chunk-kxdtg9dt.js} +1 -1
- package/web/{chunk-db3twjvk.js → chunk-m4fxd5d9.js} +5 -5
- package/web/chunk-m9xzt9p7.js +1 -0
- package/web/{chunk-xx11yv61.js → chunk-n4yzs2q0.js} +1 -1
- package/web/{chunk-zdyys4ar.js → chunk-nawxgz87.js} +2 -2
- package/web/chunk-ngt1j8py.js +1139 -0
- package/web/{chunk-3ak5dg10.js → chunk-p55vhns6.js} +1 -1
- package/web/{chunk-nvpp0ghj.js → chunk-pgwf37s2.js} +1 -1
- package/web/{chunk-af9evdza.js → chunk-q4bst4an.js} +1 -1
- package/web/{chunk-9fnr00kv.js → chunk-qdzy124b.js} +2 -2
- package/web/chunk-qe0bgeda.js +1 -0
- package/web/{chunk-60axh4sa.js → chunk-qy1zx2yw.js} +2 -2
- package/web/{chunk-sk1wkgjw.js → chunk-rag65pfs.js} +1 -1
- package/web/{chunk-5jdrev9p.js → chunk-rbqnre6q.js} +3 -3
- package/web/{chunk-ddyyc20r.js → chunk-rh3xb76f.js} +1 -1
- package/web/{chunk-wzd2a4k5.js → chunk-rwfmccmh.js} +1 -1
- package/web/{chunk-zb2bkr7f.js → chunk-rxvm70w5.js} +1 -1
- package/web/{chunk-z05x9cbm.js → chunk-sat7zyva.js} +1 -1
- package/web/{chunk-rrpn5r5w.js → chunk-sc63488q.js} +1 -1
- package/web/{chunk-v1exk5wd.js → chunk-sd3xat3r.js} +6 -6
- package/web/{chunk-4a6gdrbs.js → chunk-se4h6wx0.js} +1 -1
- package/web/{chunk-a0ryzdnp.js → chunk-sjkg40ay.js} +1 -1
- package/web/chunk-sk0hpa80.js +1 -0
- package/web/{chunk-spbs56wz.js → chunk-t5nvgz7z.js} +1 -1
- package/web/{chunk-veam6vk4.js → chunk-tfqarvdx.js} +30 -30
- package/web/{chunk-5a4mj3qz.js → chunk-tqze6d6b.js} +1 -1
- package/web/{chunk-8w7fyb3v.js → chunk-tt93zbn4.js} +7 -7
- package/web/chunk-tvcxrx6h.js +1 -0
- package/web/chunk-tzpnh70q.js +1 -0
- package/web/{chunk-79e08rk1.js → chunk-vasppf6b.js} +1 -1
- package/web/chunk-vb7g4xg6.js +1 -0
- package/web/{chunk-dz7g1gnv.js → chunk-w3zgfhjb.js} +1 -1
- package/web/{chunk-gn8kyz76.js → chunk-wrevb4ew.js} +1 -1
- package/web/{chunk-3ecrkvr3.js → chunk-wtvch4ad.js} +1 -1
- package/web/chunk-wzfe6jtq.js +1 -0
- package/web/{chunk-eadfxfkw.js → chunk-x5g1yy12.js} +1 -1
- package/web/{chunk-m9q5nr8f.js → chunk-x850q01z.js} +1 -1
- package/web/{chunk-a61zrp66.js → chunk-xk904wqv.js} +1 -1
- package/web/{chunk-3hr3ew9w.js → chunk-xtn305fd.js} +1 -1
- package/web/{chunk-3txxt0a7.js → chunk-yekaz74b.js} +1 -1
- package/web/{chunk-rasjtvsb.js → chunk-yppgejg7.js} +2 -2
- package/web/{chunk-66wb0p6e.js → chunk-z4bp6p32.js} +1 -1
- package/web/{chunk-5v2c0aqk.js → chunk-z5qn0xev.js} +1 -1
- package/web/{chunk-5baeh8q7.js → chunk-zms6mrqk.js} +4 -4
- package/web/{chunk-601k823s.js → chunk-zse05v6j.js} +2 -2
- package/web/{chunk-vsjpnwsr.js → chunk-zz1qkaar.js} +1 -1
- package/web/index.html +1 -1
- package/web/chunk-08sq3cwm.js +0 -1
- package/web/chunk-24fjnnee.js +0 -1
- package/web/chunk-2j2atyjw.js +0 -1
- package/web/chunk-3h3g3ca3.js +0 -1
- package/web/chunk-3pcrxg6m.js +0 -1
- package/web/chunk-814kkkmq.js +0 -8
- package/web/chunk-8w8atrdh.js +0 -1
- package/web/chunk-942g3eqn.js +0 -1
- package/web/chunk-avxk6jpc.js +0 -2
- package/web/chunk-fmthkpff.js +0 -1
- package/web/chunk-gv99c8zv.js +0 -1
- package/web/chunk-h0767tjv.js +0 -1
- package/web/chunk-hqynf99g.js +0 -1
- package/web/chunk-mbwwj216.js +0 -1
- package/web/chunk-n0wazxgz.js +0 -1
- package/web/chunk-nvt9tkt4.js +0 -1139
- package/web/chunk-ph1dgffm.js +0 -1
- package/web/chunk-rad2s9ha.js +0 -1
- package/web/chunk-s60s09mb.js +0 -1
- package/web/chunk-tfvcs2xx.js +0 -1
- package/web/chunk-wdq2tp9e.js +0 -1
- package/web/chunk-wkf5xfyr.js +0 -1
- package/web/chunk-y1qty77a.js +0 -1
- package/web/chunk-zgavhnt8.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t,a,l,I,Tt,ko,yt,en,At,Yn,tn}from"./chunk-veam6vk4.js";import{xe,Oe,Ke,Ee,ut,Wt,H,me,it,Gt,ot,cr,ha,ga,ya,yn,Ct,va,vn,$e,bn,$t,St,xn,Ht,_n,ba,xa,ur,_e,_a,wn,Yt,kn,dr,pr,Zt,wa,mr,ka,jr,dt,fr,Ca,Sa,Ta,Ge,hr,gr,Cn,Ea,yr,h,Qe,pt,we,Xt,re}from"./chunk-kcjz03h5.js";import{pa,ma,W,Bn,so,fa,lr}from"./chunk-zb2bkr7f.js";import{Lt}from"./chunk-nvt9tkt4.js";var br={};Lt(br,{default:()=>rr});var lo=/\s/;function mo(r){var e=r.length;while(e--&&lo.test(r.charAt(e)));return e}var te=mo;var ho=/^\s+/;function go(r){return r?r.slice(0,te(r)+1).replace(ho,""):r}var ne=go;var oe=NaN,vo=/^[-+]0x[0-9a-f]+$/i,bo=/^0b[01]+$/i,yo=/^0o[0-7]+$/i,wo=parseInt;function _o(r){if(typeof r=="number")return r;if(ut(r))return oe;if(me(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=me(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=ne(r);var n=bo.test(r);return n||yo.test(r)?wo(r.slice(2),n?2:8):vo.test(r)?oe:+r}var ie=_o;var ae=1/0,Eo=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function xo(r){if(!r)return r===0?r:0;if(r=ie(r),r===ae||r===-ae){var e=r<0?-1:1;return e*Eo}return r===r?r:0}var V=xo;function Oo(r){var e=V(r),n=e%1;return e===e?n?e-n:e:0}var fe=Oo;var se=Object.create,Lo=function(){function r(){}return function(e){if(!me(e))return{};if(se)return se(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}(),ue=Lo;function Io(r,e){var n=-1,o=r.length;e||(e=Array(o));while(++n<o)e[n]=r[n];return e}var sr=Io;function So(r,e,n){if(e=="__proto__"&&cr)cr(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0});else r[e]=n}var M=So;var Po=Object.prototype,To=Po.hasOwnProperty;function Co(r,e,n){var o=r[e];if(!(To.call(r,e)&&Ct(o,n))||n===void 0&&!(e in r))M(r,e,n)}var j=Co;function Ao(r,e,n,o){var i=!n;n||(n={});var f=-1,s=e.length;while(++f<s){var u=e[f],d=o?o(n[u],r[u],u,n,r):void 0;if(d===void 0)d=r[u];if(i)M(n,u,d);else j(n,u,d)}return n}var k=Ao;function Ro(r,e,n){if(!me(n))return!1;var o=typeof e;if(o=="number"?$e(n)&&yn(e,n.length):o=="string"&&(e in n))return Ct(n[e],r);return!1}var C=Ro;function jo(r){return vn(function(e,n){var o=-1,i=n.length,f=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;if(f=r.length>3&&typeof f=="function"?(i--,f):void 0,s&&C(n[0],n[1],s))f=i<3?void 0:f,i=1;e=Object(e);while(++o<i){var u=n[o];if(u)r(e,u,o,f)}return e})}var de=jo;function Bo(r){var e=[];if(r!=null)for(var n in Object(r))e.push(n);return e}var ce=Bo;var Fo=Object.prototype,Go=Fo.hasOwnProperty;function Xo(r){if(!me(r))return ce(r);var e=bn(r),n=[];for(var o in r)if(!(o=="constructor"&&(e||!Go.call(r,o))))n.push(o);return n}var pe=Xo;function Uo(r){return $e(r)?ba(r,!0):pe(r)}var L=Uo;function Vo(r){var e=r==null?0:r.length;return e?pr(r,1):[]}var N=Vo;function Yo(r){return ha(va(r,void 0,N),r+"")}var le=Yo;var zo=xa(Object.getPrototypeOf,Object),Y=zo;var Wo="[object Object]",qo=Function.prototype,Ho=Object.prototype,he=qo.toString,Ko=Ho.hasOwnProperty,Jo=he.call(Object);function Zo(r){if(!Ee(r)||Ke(r)!=Wo)return!1;var e=Y(r);if(e===null)return!0;var n=Ko.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&he.call(n)==Jo}var ge=Zo;var $o="\\ud800-\\udfff",Qo="\\u0300-\\u036f",ri="\\ufe20-\\ufe2f",ei="\\u20d0-\\u20ff",ti=Qo+ri+ei,ni="\\ufe0e\\ufe0f",oi="\\u200d",ii=RegExp("["+oi+$o+ti+ni+"]");function ai(r){return ii.test(r)}var ve=ai;function fi(r,e){return r&&k(e,_e(e),r)}var be=fi;function si(r,e){return r&&k(e,L(e),r)}var ye=si;var Ne=typeof br=="object"&&br&&!br.nodeType&&br,Le=Ne&&typeof vr=="object"&&vr&&!vr.nodeType&&vr,ui=Le&&Le.exports===Ne,Ie=ui?xe.Buffer:void 0,Se=Ie?Ie.allocUnsafe:void 0;function di(r,e){if(e)return r.slice();var n=r.length,o=Se?Se(n):new r.constructor(n);return r.copy(o),o}var rr=di;function ci(r,e){return k(r,mr(r),e)}var Pe=ci;var pi=Object.getOwnPropertySymbols,li=!pi?wa:function(r){var e=[];while(r)dr(e,mr(r)),r=Y(r);return e},wr=li;function mi(r,e){return k(r,wr(r),e)}var ke=mi;function hi(r){return ka(r,L,wr)}var Te=hi;var gi=Object.prototype,vi=gi.hasOwnProperty;function bi(r){var e=r.length,n=new r.constructor(e);if(e&&typeof r[0]=="string"&&vi.call(r,"index"))n.index=r.index,n.input=r.input;return n}var Ce=bi;function yi(r){var e=new r.constructor(r.byteLength);return new fr(e).set(new fr(r)),e}var z=yi;function wi(r,e){var n=e?z(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}var Ae=wi;var _i=/\w*$/;function Ei(r){var e=new r.constructor(r.source,_i.exec(r));return e.lastIndex=r.lastIndex,e}var Re=Ei;var Me=Oe?Oe.prototype:void 0,je=Me?Me.valueOf:void 0;function xi(r){return je?Object(je.call(r)):{}}var Be=xi;function Oi(r,e){var n=e?z(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}var _r=Oi;var Li="[object Boolean]",Ii="[object Date]",Si="[object Map]",Ni="[object Number]",Pi="[object RegExp]",ki="[object Set]",Ti="[object String]",Ci="[object Symbol]",Ai="[object ArrayBuffer]",Ri="[object DataView]",Mi="[object Float32Array]",ji="[object Float64Array]",Bi="[object Int8Array]",Di="[object Int16Array]",Fi="[object Int32Array]",Gi="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Ui="[object Uint16Array]",Vi="[object Uint32Array]";function Yi(r,e,n){var o=r.constructor;switch(e){case Ai:return z(r);case Li:case Ii:return new o(+r);case Ri:return Ae(r,n);case Mi:case ji:case Bi:case Di:case Fi:case Gi:case Xi:case Ui:case Vi:return _r(r,n);case Si:return new o;case Ni:case Ti:return new o(r);case Pi:return Re(r);case ki:return new o;case Ci:return Be(r)}}var De=Yi;function zi(r){return typeof r.constructor=="function"&&!bn(r)?ue(Y(r)):{}}var Er=zi;var Wi="[object Map]";function qi(r){return Ee(r)&&dt(r)==Wi}var Fe=qi;var Xe=Ht&&Ht.isMap,Hi=Xe?xn(Xe):Fe,Ue=Hi;var Ki="[object Set]";function Ji(r){return Ee(r)&&dt(r)==Ki}var Ve=Ji;var Ye=Ht&&Ht.isSet,Zi=Ye?xn(Ye):Ve,ze=Zi;var $i=1,Qi=2,ra=4,We="[object Arguments]",ea="[object Array]",ta="[object Boolean]",na="[object Date]",oa="[object Error]",qe="[object Function]",ia="[object GeneratorFunction]",aa="[object Map]",sa="[object Number]",He="[object Object]",ua="[object RegExp]",da="[object Set]",ca="[object String]",la="[object Symbol]",Oa="[object WeakMap]",La="[object ArrayBuffer]",Ia="[object DataView]",Na="[object Float32Array]",Pa="[object Float64Array]",Aa="[object Int8Array]",Ra="[object Int16Array]",Ma="[object Int32Array]",ja="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",Fa="[object Uint32Array]",x={};x[We]=x[ea]=x[La]=x[Ia]=x[ta]=x[na]=x[Na]=x[Pa]=x[Aa]=x[Ra]=x[Ma]=x[aa]=x[sa]=x[He]=x[ua]=x[da]=x[ca]=x[la]=x[ja]=x[Ba]=x[Da]=x[Fa]=!0;x[oa]=x[qe]=x[Oa]=!1;function xr(r,e,n,o,i,f){var s,u=e&$i,d=e&Qi,c=e&ra;if(n)s=i?n(r,o,i,f):n(r);if(s!==void 0)return s;if(!me(r))return r;var p=H(r);if(p){if(s=Ce(r),!u)return sr(r,s)}else{var m=dt(r),g=m==qe||m==ia;if(St(r))return rr(r,u);if(m==He||m==We||g&&!i){if(s=d||g?{}:Er(r),!u)return d?ke(r,ye(s,r)):Pe(r,be(s,r))}else{if(!x[m])return i?r:{};s=De(r,m,u)}}f||(f=new Zt);var b=f.get(r);if(b)return b;if(f.set(r,s),ze(r))r.forEach(function(v){s.add(xr(v,e,n,v,r,f))});else if(Ue(r))r.forEach(function(v,_){s.set(_,xr(v,e,n,_,r,f))});var w=c?d?Te:jr:d?L:_e,y=p?void 0:w(r);return ga(y||r,function(v,_){if(y)_=v,v=r[_];j(s,_,xr(v,e,n,_,r,f))}),s}var Je=xr;var Ga=1,Xa=4;function Ua(r){return Je(r,Ga|Xa)}var Ze=Ua;var Va=function(){return xe.Date.now()},kr=Va;var rt=Object.prototype,Ya=rt.hasOwnProperty,za=vn(function(r,e){r=Object(r);var n=-1,o=e.length,i=o>2?e[2]:void 0;if(i&&C(e[0],e[1],i))o=1;while(++n<o){var f=e[n],s=L(f),u=-1,d=s.length;while(++u<d){var c=s[u],p=r[c];if(p===void 0||Ct(p,rt[c])&&!Ya.call(r,c))r[c]=f[c]}}return r}),et=za;function Wa(r,e,n){if(n!==void 0&&!Ct(r[e],n)||n===void 0&&!(e in r))M(r,e,n)}var er=Wa;function qa(r,e){if(e==="constructor"&&typeof r[e]==="function")return;if(e=="__proto__")return;return r[e]}var tr=qa;function Ha(r){return k(r,L(r))}var tt=Ha;function Ka(r,e,n,o,i,f,s){var u=tr(r,n),d=tr(e,n),c=s.get(d);if(c){er(r,n,c);return}var p=f?f(u,d,n+"",r,e,s):void 0,m=p===void 0;if(m){var g=H(d),b=!g&&St(d),w=!g&&!b&&_n(d);if(p=d,g||b||w)if(H(u))p=u;else if(Ea(u))p=sr(u);else if(b)m=!1,p=rr(d,!0);else if(w)m=!1,p=_r(d,!0);else p=[];else if(ge(d)||$t(d)){if(p=u,$t(u))p=tt(u);else if(!me(u)||Gt(u))p=Er(d)}else m=!1}if(m)s.set(d,p),i(p,d,o,f,s),s.delete(d);er(r,n,p)}var nt=Ka;function at(r,e,n,o,i){if(r===e)return;hr(e,function(f,s){if(i||(i=new Zt),me(f))nt(r,e,s,n,at,o,i);else{var u=o?o(tr(r,s),f,s+"",r,e,i):void 0;if(u===void 0)u=f;er(r,s,u)}},L)}var ft=at;function Ja(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var X=Ja;function Za(r){return function(e,n,o){var i=Object(e);if(!$e(e)){var f=Ge(n,3);e=_e(e),n=function(u){return f(i[u],u,i)}}var s=r(e,n,o);return s>-1?i[f?e[s]:s]:void 0}}var st=Za;var $a=Math.max;function Qa(r,e,n){var o=r==null?0:r.length;if(!o)return-1;var i=n==null?0:fe(n);if(i<0)i=$a(o+i,0);return ya(r,Ge(e,3),i)}var ct=Qa;var rf=st(ct),nr=rf;function ef(r,e){var n=-1,o=$e(r)?Array(r.length):[];return Cn(r,function(i,f,s){o[++n]=e(i,f,s)}),o}var Or=ef;function tf(r,e){var n=H(r)?Wt:Or;return n(r,Ge(e,3))}var E=tf;function nf(r,e){return r==null?r:hr(r,yr(e),L)}var lt=nf;function of(r,e){return r&&gr(r,yr(e))}var mt=of;function af(r,e){return r>e}var ht=af;var ff=Object.prototype,sf=ff.hasOwnProperty;function uf(r,e){return r!=null&&sf.call(r,e)}var gt=uf;function df(r,e){return r!=null&&Ca(r,e,gt)}var Lr=df;var cf="[object String]";function pf(r){return typeof r=="string"||!H(r)&&Ee(r)&&Ke(r)==cf}var vt=pf;function lf(r,e){return r<e}var Ir=lf;function mf(r,e){var n={};return e=Ge(e,3),gr(r,function(o,i,f){M(n,i,e(o,i,f))}),n}var q=mf;function hf(r,e,n){var o=-1,i=r.length;while(++o<i){var f=r[o],s=e(f);if(s!=null&&(u===void 0?s===s&&!ut(s):n(s,u)))var u=s,d=f}return d}var K=hf;function gf(r){return r&&r.length?K(r,it,ht):void 0}var S=gf;var vf=de(function(r,e,n){ft(r,e,n)}),or=vf;function bf(r){return r&&r.length?K(r,it,Ir):void 0}var B=bf;function yf(r,e){return r&&r.length?K(r,Ge(e,2),Ir):void 0}var J=yf;function wf(r,e,n,o){if(!me(r))return r;e=wn(e,r);var i=-1,f=e.length,s=f-1,u=r;while(u!=null&&++i<f){var d=Yt(e[i]),c=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return r;if(i!=s){var p=u[d];if(c=o?o(p,d,u):void 0,c===void 0)c=me(p)?p:yn(e[i+1])?[]:{}}j(u,d,c),u=u[d]}return r}var bt=wf;function _f(r,e,n){var o=-1,i=e.length,f={};while(++o<i){var s=e[o],u=kn(r,s);if(n(u,s))bt(f,wn(s,r),u)}return f}var wt=_f;function Ef(r,e){var n=r.length;r.sort(e);while(n--)r[n]=r[n].value;return r}var _t=Ef;function xf(r,e){if(r!==e){var n=r!==void 0,o=r===null,i=r===r,f=ut(r),s=e!==void 0,u=e===null,d=e===e,c=ut(e);if(!u&&!c&&!f&&r>e||f&&s&&d&&!u&&!c||o&&s&&d||!n&&d||!i)return 1;if(!o&&!f&&!c&&r<e||c&&n&&i&&!o&&!f||u&&n&&i||!s&&i||!d)return-1}return 0}var Et=xf;function Of(r,e,n){var o=-1,i=r.criteria,f=e.criteria,s=i.length,u=n.length;while(++o<s){var d=Et(i[o],f[o]);if(d){if(o>=u)return d;var c=n[o];return d*(c=="desc"?-1:1)}}return r.index-e.index}var xt=Of;function Lf(r,e,n){if(e.length)e=Wt(e,function(f){if(H(f))return function(s){return kn(s,f.length===1?f[0]:f)};return f});else e=[it];var o=-1;e=Wt(e,xn(Ge));var i=Or(r,function(f,s,u){var d=Wt(e,function(c){return c(f)});return{criteria:d,index:++o,value:f}});return _t(i,function(f,s){return xt(f,s,n)})}var Ot=Lf;var If=Ta("length"),It=If;var Pt="\\ud800-\\udfff",Sf="\\u0300-\\u036f",Nf="\\ufe20-\\ufe2f",Pf="\\u20d0-\\u20ff",kf=Sf+Nf+Pf,Tf="\\ufe0e\\ufe0f",Cf="["+Pt+"]",Tr="["+kf+"]",Cr="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Tr+"|"+Cr+")",kt="[^"+Pt+"]",Rt="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rf="\\u200d",jt=Af+"?",Bt="["+Tf+"]?",Mf="(?:"+Rf+"(?:"+[kt,Rt,Mt].join("|")+")"+Bt+jt+")*",jf=Bt+jt+Mf,Bf="(?:"+[kt+Tr+"?",Tr,Rt,Mt,Cf].join("|")+")",Nt=RegExp(Cr+"(?="+Cr+")|"+Bf+jf,"g");function Df(r){var e=Nt.lastIndex=0;while(Nt.test(r))++e;return e}var Dt=Df;function Ff(r){return ve(r)?Dt(r):It(r)}var Ft=Ff;function Gf(r,e){return wt(r,e,function(n,o){return Sa(r,o)})}var Ut=Gf;var Xf=le(function(r,e){return r==null?{}:Ut(r,e)}),Z=Xf;var{ceil:Uf,max:Vf}=Math;function Yf(r,e,n,o){var i=-1,f=Vf(Uf((e-r)/(n||1)),0),s=Array(f);while(f--)s[o?f:++i]=r,r+=n;return s}var Vt=Yf;function zf(r){return function(e,n,o){if(o&&typeof o!="number"&&C(e,n,o))n=o=void 0;if(e=V(e),n===void 0)n=e,e=0;else n=V(n);return o=o===void 0?e<n?1:-1:V(o),Vt(e,n,o,r)}}var zt=zf;var Wf=zt(),P=Wf;var qf="[object Map]",Hf="[object Set]";function Kf(r){if(r==null)return 0;if($e(r))return vt(r)?Ft(r):r.length;var e=dt(r);if(e==qf||e==Hf)return r.size;return ur(r).length}var qt=Kf;var Jf=vn(function(r,e){if(r==null)return[];var n=e.length;if(n>1&&C(r,e[0],e[1]))e=[];else if(n>2&&C(e[0],e[1],e[2]))e=[e[0]];return Ot(r,pr(e,1),[])}),A=Jf;var Zf=0;function $f(r){var e=++Zf;return _a(r)+e}var Q=$f;function Qf(r,e,n){var o=-1,i=r.length,f=e.length,s={};while(++o<i){var u=o<f?e[o]:void 0;n(s,r[o],u)}return s}var Kt=Qf;function rs(r,e){return Kt(r||[],e||[],j)}var Ar=rs;class Rr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,e=r._prev;if(e!==r)return Jt(e),e}enqueue(r){var e=this._sentinel;if(r._prev&&r._next)Jt(r);r._next=e._next,e._next._prev=r,e._next=r,r._prev=e}toString(){var r=[],e=this._sentinel,n=e._prev;while(n!==e)r.push(JSON.stringify(n,es)),n=n._prev;return"["+r.join(", ")+"]"}}function Jt(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function es(r,e){if(r!=="_next"&&r!=="_prev")return e}var ts=ot(1);function Qt(r,e){if(r.nodeCount()<=1)return[];var n=os(r,e||ts),o=ns(n.graph,n.buckets,n.zeroIdx);return N(E(o,function(i){return r.outEdges(i.v,i.w)}))}function ns(r,e,n){var o=[],i=e[e.length-1],f=e[0],s;while(r.nodeCount()){while(s=f.dequeue())Mr(r,e,n,s);while(s=i.dequeue())Mr(r,e,n,s);if(r.nodeCount()){for(var u=e.length-2;u>0;--u)if(s=e[u].dequeue(),s){o=o.concat(Mr(r,e,n,s,!0));break}}}return o}function Mr(r,e,n,o,i){var f=i?[]:void 0;return h(r.inEdges(o.v),function(s){var u=r.edge(s),d=r.node(s.v);if(i)f.push({v:s.v,w:s.w});d.out-=u,Br(e,n,d)}),h(r.outEdges(o.v),function(s){var u=r.edge(s),d=s.w,c=r.node(d);c.in-=u,Br(e,n,c)}),r.removeNode(o.v),f}function os(r,e){var n=new re,o=0,i=0;h(r.nodes(),function(u){n.setNode(u,{v:u,in:0,out:0})}),h(r.edges(),function(u){var d=n.edge(u.v,u.w)||0,c=e(u),p=d+c;n.setEdge(u.v,u.w,p),i=Math.max(i,n.node(u.v).out+=c),o=Math.max(o,n.node(u.w).in+=c)});var f=P(i+o+3).map(function(){return new Rr}),s=o+1;return h(n.nodes(),function(u){Br(f,s,n.node(u))}),{graph:n,buckets:f,zeroIdx:s}}function Br(r,e,n){if(!n.out)r[0].enqueue(n);else if(!n.in)r[r.length-1].enqueue(n);else r[n.out-n.in+e].enqueue(n)}function rn(r){var e=r.graph().acyclicer==="greedy"?Qt(r,n(r)):is(r);h(e,function(o){var i=r.edge(o);r.removeEdge(o),i.forwardName=o.name,i.reversed=!0,r.setEdge(o.w,o.v,i,Q("rev"))});function n(o){return function(i){return o.edge(i).weight}}}function is(r){var e=[],n={},o={};function i(f){if(Object.prototype.hasOwnProperty.call(o,f))return;o[f]=!0,n[f]=!0,h(r.outEdges(f),function(s){if(Object.prototype.hasOwnProperty.call(n,s.w))e.push(s);else i(s.w)}),delete n[f]}return h(r.nodes(),i),e}function nn(r){h(r.edges(),function(e){var n=r.edge(e);if(n.reversed){r.removeEdge(e);var o=n.forwardName;delete n.reversed,delete n.forwardName,r.setEdge(e.w,e.v,n,o)}})}function T(r,e,n,o){var i;do i=Q(o);while(r.hasNode(i));return n.dummy=e,r.setNode(i,n),i}function an(r){var e=new re().setGraph(r.graph());return h(r.nodes(),function(n){e.setNode(n,r.node(n))}),h(r.edges(),function(n){var o=e.edge(n.v,n.w)||{weight:0,minlen:1},i=r.edge(n);e.setEdge(n.v,n.w,{weight:o.weight+i.weight,minlen:Math.max(o.minlen,i.minlen)})}),e}function Sr(r){var e=new re({multigraph:r.isMultigraph()}).setGraph(r.graph());return h(r.nodes(),function(n){if(!r.children(n).length)e.setNode(n,r.node(n))}),h(r.edges(),function(n){e.setEdge(n,r.edge(n))}),e}function Dr(r,e){var{x:n,y:o}=r,i=e.x-n,f=e.y-o,s=r.width/2,u=r.height/2;if(!i&&!f)throw Error("Not possible to find intersection inside of the rectangle");var d,c;if(Math.abs(f)*s>Math.abs(i)*u){if(f<0)u=-u;d=u*i/f,c=u}else{if(i<0)s=-s;d=s,c=s*f/i}return{x:n+d,y:o+c}}function D(r){var e=E(P(Gr(r)+1),function(){return[]});return h(r.nodes(),function(n){var o=r.node(n),i=o.rank;if(!we(i))e[i][o.order]=n}),e}function fn(r){var e=B(E(r.nodes(),function(n){return r.node(n).rank}));h(r.nodes(),function(n){var o=r.node(n);if(Lr(o,"rank"))o.rank-=e})}function sn(r){var e=B(E(r.nodes(),function(f){return r.node(f).rank})),n=[];h(r.nodes(),function(f){var s=r.node(f).rank-e;if(!n[s])n[s]=[];n[s].push(f)});var o=0,i=r.graph().nodeRankFactor;h(n,function(f,s){if(we(f)&&s%i!==0)--o;else if(o)h(f,function(u){r.node(u).rank+=o})})}function Fr(r,e,n,o){var i={width:0,height:0};if(arguments.length>=4)i.rank=n,i.order=o;return T(r,"border",i,e)}function Gr(r){return S(E(r.nodes(),function(e){var n=r.node(e).rank;if(!we(n))return n}))}function un(r,e){var n={lhs:[],rhs:[]};return h(r,function(o){if(e(o))n.lhs.push(o);else n.rhs.push(o)}),n}function dn(r,e){var n=kr();try{return e()}finally{console.log(r+" time: "+(kr()-n)+"ms")}}function cn(r,e){return e()}function ln(r){function e(n){var o=r.children(n),i=r.node(n);if(o.length)h(o,e);if(Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var f=i.minRank,s=i.maxRank+1;f<s;++f)pn(r,"borderLeft","_bl",n,i,f),pn(r,"borderRight","_br",n,i,f)}}h(r.children(),e)}function pn(r,e,n,o,i,f){var s={width:0,height:0,rank:f,borderType:e},u=i[e][f-1],d=T(r,"border",s,n);if(i[e][f]=d,r.setParent(d,o),u)r.setEdge(u,d,{weight:1})}function hn(r){var e=r.graph().rankdir.toLowerCase();if(e==="lr"||e==="rl")En(r)}function gn(r){var e=r.graph().rankdir.toLowerCase();if(e==="bt"||e==="rl")as(r);if(e==="lr"||e==="rl")fs(r),En(r)}function En(r){h(r.nodes(),function(e){mn(r.node(e))}),h(r.edges(),function(e){mn(r.edge(e))})}function mn(r){var e=r.width;r.width=r.height,r.height=e}function as(r){h(r.nodes(),function(e){Xr(r.node(e))}),h(r.edges(),function(e){var n=r.edge(e);if(h(n.points,Xr),Object.prototype.hasOwnProperty.call(n,"y"))Xr(n)})}function Xr(r){r.y=-r.y}function fs(r){h(r.nodes(),function(e){Ur(r.node(e))}),h(r.edges(),function(e){var n=r.edge(e);if(h(n.points,Ur),Object.prototype.hasOwnProperty.call(n,"x"))Ur(n)})}function Ur(r){var e=r.x;r.x=r.y,r.y=e}function On(r){r.graph().dummyChains=[],h(r.edges(),function(e){us(r,e)})}function us(r,e){var n=e.v,o=r.node(n).rank,i=e.w,f=r.node(i).rank,s=e.name,u=r.edge(e),d=u.labelRank;if(f===o+1)return;r.removeEdge(e);var c=void 0,p,m;for(m=0,++o;o<f;++m,++o){if(u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:e,rank:o},p=T(r,"edge",c,"_d"),o===d)c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos;if(r.setEdge(n,p,{weight:u.weight},s),m===0)r.graph().dummyChains.push(p);n=p}r.setEdge(n,i,{weight:u.weight},s)}function Ln(r){h(r.graph().dummyChains,function(e){var n=r.node(e),o=n.edgeLabel,i;r.setEdge(n.edgeObj,o);while(n.dummy){if(i=r.successors(e)[0],r.removeNode(e),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label")o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height;e=i,n=r.node(e)}})}function ir(r){var e={};function n(o){var i=r.node(o);if(Object.prototype.hasOwnProperty.call(e,o))return i.rank;e[o]=!0;var f=B(E(r.outEdges(o),function(s){return n(s.w)-r.edge(s).minlen}));if(f===Number.POSITIVE_INFINITY||f===void 0||f===null)f=0;return i.rank=f}h(r.sources(),n)}function U(r,e){return r.node(e.w).rank-r.node(e.v).rank-r.edge(e).minlen}function Nr(r){var e=new re({directed:!1}),n=r.nodes()[0],o=r.nodeCount();e.setNode(n,{});var i,f;while(ds(e,r)<o)i=cs(e,r),f=e.hasNode(i.v)?U(r,i):-U(r,i),ps(e,r,f);return e}function ds(r,e){function n(o){h(e.nodeEdges(o),function(i){var f=i.v,s=o===f?i.w:f;if(!r.hasNode(s)&&!U(e,i))r.setNode(s,{}),r.setEdge(o,s,{}),n(s)})}return h(r.nodes(),n),r.nodeCount()}function cs(r,e){return J(e.edges(),function(n){if(r.hasNode(n.v)!==r.hasNode(n.w))return U(e,n)})}function ps(r,e,n){h(r.nodes(),function(o){e.node(o).rank+=n})}var dh=ot(1);var vh=ot(1);Vr.CycleException=ar;function Vr(r){var e={},n={},o=[];function i(f){if(Object.prototype.hasOwnProperty.call(n,f))throw new ar;if(!Object.prototype.hasOwnProperty.call(e,f))n[f]=!0,e[f]=!0,h(r.predecessors(f),i),delete n[f],o.push(f)}if(h(r.sinks(),i),qt(e)!==r.nodeCount())throw new ar;return o}function ar(){}ar.prototype=Error();function Pr(r,e,n){if(!H(e))e=[e];var o=(r.isDirected()?r.successors:r.neighbors).bind(r),i=[],f={};return h(e,function(s){if(!r.hasNode(s))throw Error("Graph does not have node: "+s);Sn(r,s,n==="post",f,o,i)}),i}function Sn(r,e,n,o,i,f){if(!Object.prototype.hasOwnProperty.call(o,e)){if(o[e]=!0,!n)f.push(e);if(h(i(e),function(s){Sn(r,s,n,o,i,f)}),n)f.push(e)}}function Yr(r,e){return Pr(r,e,"post")}function zr(r,e){return Pr(r,e,"pre")}G.initLowLimValues=qr;G.initCutValues=Wr;G.calcCutValue=Pn;G.leaveEdge=An;G.enterEdge=Rn;G.exchangeEdges=Mn;function G(r){r=an(r),ir(r);var e=Nr(r);qr(e),Wr(e,r);var n,o;while(n=An(e))o=Rn(e,r,n),Mn(e,r,n,o)}function Wr(r,e){var n=Yr(r,r.nodes());n=n.slice(0,n.length-1),h(n,function(o){vs(r,e,o)})}function vs(r,e,n){var o=r.node(n),i=o.parent;r.edge(n,i).cutvalue=Pn(r,e,n)}function Pn(r,e,n){var o=r.node(n),i=o.parent,f=!0,s=e.edge(n,i),u=0;if(!s)f=!1,s=e.edge(i,n);return u=s.weight,h(e.nodeEdges(n),function(d){var c=d.v===n,p=c?d.w:d.v;if(p!==i){var m=c===f,g=e.edge(d).weight;if(u+=m?g:-g,ys(r,n,p)){var b=r.edge(n,p).cutvalue;u+=m?-b:b}}}),u}function qr(r,e){if(arguments.length<2)e=r.nodes()[0];Tn(r,{},1,e)}function Tn(r,e,n,o,i){var f=n,s=r.node(o);if(e[o]=!0,h(r.neighbors(o),function(u){if(!Object.prototype.hasOwnProperty.call(e,u))n=Tn(r,e,n,u,o)}),s.low=f,s.lim=n++,i)s.parent=i;else delete s.parent;return n}function An(r){return nr(r.edges(),function(e){return r.edge(e).cutvalue<0})}function Rn(r,e,n){var{v:o,w:i}=n;if(!e.hasEdge(o,i))o=n.w,i=n.v;var f=r.node(o),s=r.node(i),u=f,d=!1;if(f.lim>s.lim)u=s,d=!0;var c=Qe(e.edges(),function(p){return d===Nn(r,r.node(p.v),u)&&d!==Nn(r,r.node(p.w),u)});return J(c,function(p){return U(e,p)})}function Mn(r,e,n,o){var{v:i,w:f}=n;r.removeEdge(i,f),r.setEdge(o.v,o.w,{}),qr(r),Wr(r,e),bs(r,e)}function bs(r,e){var n=nr(r.nodes(),function(i){return!e.node(i).parent}),o=zr(r,n);o=o.slice(1),h(o,function(i){var f=r.node(i).parent,s=e.edge(i,f),u=!1;if(!s)s=e.edge(f,i),u=!0;e.node(i).rank=e.node(f).rank+(u?s.minlen:-s.minlen)})}function ys(r,e,n){return r.hasEdge(e,n)}function Nn(r,e,n){return n.low<=e.lim&&e.lim<=n.lim}function Hr(r){switch(r.graph().ranker){case"network-simplex":jn(r);break;case"tight-tree":_s(r);break;case"longest-path":ws(r);break;default:jn(r)}}var ws=ir;function _s(r){ir(r),Nr(r)}function jn(r){G(r)}function Dn(r){var e=T(r,"root",{},"_root"),n=Es(r),o=S(pt(n))-1,i=2*o+1;r.graph().nestingRoot=e,h(r.edges(),function(s){r.edge(s).minlen*=i});var f=xs(r)+1;h(r.children(),function(s){Fn(r,e,i,f,o,n,s)}),r.graph().nodeRankFactor=i}function Fn(r,e,n,o,i,f,s){var u=r.children(s);if(!u.length){if(s!==e)r.setEdge(e,s,{weight:0,minlen:n});return}var d=Fr(r,"_bt"),c=Fr(r,"_bb"),p=r.node(s);if(r.setParent(d,s),p.borderTop=d,r.setParent(c,s),p.borderBottom=c,h(u,function(m){Fn(r,e,n,o,i,f,m);var g=r.node(m),b=g.borderTop?g.borderTop:m,w=g.borderBottom?g.borderBottom:m,y=g.borderTop?o:2*o,v=b!==w?1:i-f[s]+1;r.setEdge(d,b,{weight:y,minlen:v,nestingEdge:!0}),r.setEdge(w,c,{weight:y,minlen:v,nestingEdge:!0})}),!r.parent(s))r.setEdge(e,d,{weight:0,minlen:i+f[s]})}function Es(r){var e={};function n(o,i){var f=r.children(o);if(f&&f.length)h(f,function(s){n(s,i+1)});e[o]=i}return h(r.children(),function(o){n(o,1)}),e}function xs(r){return Xt(r.edges(),function(e,n){return e+r.edge(n).weight},0)}function Gn(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,h(r.edges(),function(n){var o=r.edge(n);if(o.nestingEdge)r.removeEdge(n)})}function Xn(r,e,n){var o={},i;h(n,function(f){var s=r.parent(f),u,d;while(s){if(u=r.parent(s),u)d=o[u],o[u]=s;else d=i,i=s;if(d&&d!==s){e.setEdge(d,s);return}s=u}})}function Un(r,e,n){var o=Ls(r),i=new re({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(f){return r.node(f)});return h(r.nodes(),function(f){var s=r.node(f),u=r.parent(f);if(s.rank===e||s.minRank<=e&&e<=s.maxRank){if(i.setNode(f),i.setParent(f,u||o),h(r[n](f),function(d){var c=d.v===f?d.w:d.v,p=i.edge(c,f),m=!we(p)?p.weight:0;i.setEdge(c,f,{weight:r.edge(d).weight+m})}),Object.prototype.hasOwnProperty.call(s,"minRank"))i.setNode(f,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]})}}),i}function Ls(r){var e;while(r.hasNode(e=Q("_root")));return e}function Vn(r,e){var n=0;for(var o=1;o<e.length;++o)n+=Is(r,e[o-1],e[o]);return n}function Is(r,e,n){var o=Ar(n,E(n,function(c,p){return p})),i=N(E(e,function(c){return A(E(r.outEdges(c),function(p){return{pos:o[p.w],weight:r.edge(p).weight}}),"pos")})),f=1;while(f<n.length)f<<=1;var s=2*f-1;f-=1;var u=E(Array(s),function(){return 0}),d=0;return h(i.forEach(function(c){var p=c.pos+f;u[p]+=c.weight;var m=0;while(p>0){if(p%2)m+=u[p+1];p=p-1>>1,u[p]+=c.weight}d+=c.weight*m})),d}function zn(r){var e={},n=Qe(r.nodes(),function(u){return!r.children(u).length}),o=S(E(n,function(u){return r.node(u).rank})),i=E(P(o+1),function(){return[]});function f(u){if(Lr(e,u))return;e[u]=!0;var d=r.node(u);i[d.rank].push(u),h(r.successors(u),f)}var s=A(n,function(u){return r.node(u).rank});return h(s,f),i}function Wn(r,e){return E(e,function(n){var o=r.inEdges(n);if(!o.length)return{v:n};else{var i=Xt(o,function(f,s){var u=r.edge(s),d=r.node(s.v);return{sum:f.sum+u.weight*d.order,weight:f.weight+u.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}})}function qn(r,e){var n={};h(r,function(i,f){var s=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:f};if(!we(i.barycenter))s.barycenter=i.barycenter,s.weight=i.weight}),h(e.edges(),function(i){var f=n[i.v],s=n[i.w];if(!we(f)&&!we(s))s.indegree++,f.out.push(n[i.w])});var o=Qe(n,function(i){return!i.indegree});return Ss(o)}function Ss(r){var e=[];function n(f){return function(s){if(s.merged)return;if(we(s.barycenter)||we(f.barycenter)||s.barycenter>=f.barycenter)Ns(f,s)}}function o(f){return function(s){if(s.in.push(f),--s.indegree===0)r.push(s)}}while(r.length){var i=r.pop();e.push(i),h(i.in.reverse(),n(i)),h(i.out,o(i))}return E(Qe(e,function(f){return!f.merged}),function(f){return Z(f,["vs","i","barycenter","weight"])})}function Ns(r,e){var n=0,o=0;if(r.weight)n+=r.barycenter*r.weight,o+=r.weight;if(e.weight)n+=e.barycenter*e.weight,o+=e.weight;r.vs=e.vs.concat(r.vs),r.barycenter=n/o,r.weight=o,r.i=Math.min(e.i,r.i),e.merged=!0}function Kn(r,e){var n=un(r,function(p){return Object.prototype.hasOwnProperty.call(p,"barycenter")}),o=n.lhs,i=A(n.rhs,function(p){return-p.i}),f=[],s=0,u=0,d=0;o.sort(Ps(!!e)),d=Hn(f,i,d),h(o,function(p){d+=p.vs.length,f.push(p.vs),s+=p.barycenter*p.weight,u+=p.weight,d=Hn(f,i,d)});var c={vs:N(f)};if(u)c.barycenter=s/u,c.weight=u;return c}function Hn(r,e,n){var o;while(e.length&&(o=X(e)).i<=n)e.pop(),r.push(o.vs),n++;return n}function Ps(r){return function(e,n){if(e.barycenter<n.barycenter)return-1;else if(e.barycenter>n.barycenter)return 1;return!r?e.i-n.i:n.i-e.i}}function Kr(r,e,n,o){var i=r.children(e),f=r.node(e),s=f?f.borderLeft:void 0,u=f?f.borderRight:void 0,d={};if(s)i=Qe(i,function(w){return w!==s&&w!==u});var c=Wn(r,i);h(c,function(w){if(r.children(w.v).length){var y=Kr(r,w.v,n,o);if(d[w.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter"))Ts(w,y)}});var p=qn(c,n);ks(p,d);var m=Kn(p,o);if(s){if(m.vs=N([s,m.vs,u]),r.predecessors(s).length){var g=r.node(r.predecessors(s)[0]),b=r.node(r.predecessors(u)[0]);if(!Object.prototype.hasOwnProperty.call(m,"barycenter"))m.barycenter=0,m.weight=0;m.barycenter=(m.barycenter*m.weight+g.order+b.order)/(m.weight+2),m.weight+=2}}return m}function ks(r,e){h(r,function(n){n.vs=N(n.vs.map(function(o){if(e[o])return e[o].vs;return o}))})}function Ts(r,e){if(!we(r.barycenter))r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight;else r.barycenter=e.barycenter,r.weight=e.weight}function $n(r){var e=Gr(r),n=Jn(r,P(1,e+1),"inEdges"),o=Jn(r,P(e-1,-1,-1),"outEdges"),i=zn(r);Zn(r,i);var f=Number.POSITIVE_INFINITY,s;for(var u=0,d=0;d<4;++u,++d){Cs(u%2?n:o,u%4>=2),i=D(r);var c=Vn(r,i);if(c<f)d=0,s=Ze(i),f=c}Zn(r,s)}function Jn(r,e,n){return E(e,function(o){return Un(r,o,n)})}function Cs(r,e){var n=new re;h(r,function(o){var i=o.graph().root,f=Kr(o,i,n,e);h(f.vs,function(s,u){o.node(s).order=u}),Xn(o,n,f.vs)})}function Zn(r,e){h(e,function(n){h(n,function(o,i){r.node(o).order=i})})}function Qn(r){var e=Rs(r);h(r.graph().dummyChains,function(n){var o=r.node(n),i=o.edgeObj,f=As(r,e,i.v,i.w),{path:s,lca:u}=f,d=0,c=s[d],p=!0;while(n!==i.w){if(o=r.node(n),p){while((c=s[d])!==u&&r.node(c).maxRank<o.rank)d++;if(c===u)p=!1}if(!p){while(d<s.length-1&&r.node(c=s[d+1]).minRank<=o.rank)d++;c=s[d]}r.setParent(n,c),n=r.successors(n)[0]}})}function As(r,e,n,o){var i=[],f=[],s=Math.min(e[n].low,e[o].low),u=Math.max(e[n].lim,e[o].lim),d,c;d=n;do d=r.parent(d),i.push(d);while(d&&(e[d].low>s||u>e[d].lim));c=d,d=o;while((d=r.parent(d))!==c)f.push(d);return{path:i.concat(f.reverse()),lca:c}}function Rs(r){var e={},n=0;function o(i){var f=n;h(r.children(i),o),e[i]={low:f,lim:n++}}return h(r.children(),o),e}function Ms(r,e){var n={};function o(i,f){var s=0,u=0,d=i.length,c=X(f);return h(f,function(p,m){var g=Bs(r,p),b=g?r.node(g).order:d;if(g||p===c)h(f.slice(u,m+1),function(w){h(r.predecessors(w),function(y){var v=r.node(y),_=v.order;if((_<s||b<_)&&!(v.dummy&&r.node(w).dummy))ro(n,y,w)})}),u=m+1,s=b}),f}return Xt(e,o),n}function js(r,e){var n={};function o(f,s,u,d,c){var p;h(P(s,u),function(m){if(p=f[m],r.node(p).dummy)h(r.predecessors(p),function(g){var b=r.node(g);if(b.dummy&&(b.order<d||b.order>c))ro(n,g,p)})})}function i(f,s){var u=-1,d,c=0;return h(s,function(p,m){if(r.node(p).dummy==="border"){var g=r.predecessors(p);if(g.length)d=r.node(g[0]).order,o(s,c,m,u,d),c=m,u=d}o(s,c,s.length,d,f.length)}),s}return Xt(e,i),n}function Bs(r,e){if(r.node(e).dummy)return nr(r.predecessors(e),function(n){return r.node(n).dummy})}function ro(r,e,n){if(e>n){var o=e;e=n,n=o}if(!Object.prototype.hasOwnProperty.call(r,e))Object.defineProperty(r,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=r[e];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ds(r,e,n){if(e>n){var o=e;e=n,n=o}return!!r[e]&&Object.prototype.hasOwnProperty.call(r[e],n)}function Fs(r,e,n,o){var i={},f={},s={};return h(e,function(u){h(u,function(d,c){i[d]=d,f[d]=d,s[d]=c})}),h(e,function(u){var d=-1;h(u,function(c){var p=o(c);if(p.length){p=A(p,function(y){return s[y]});var m=(p.length-1)/2;for(var g=Math.floor(m),b=Math.ceil(m);g<=b;++g){var w=p[g];if(f[c]===c&&d<s[w]&&!Ds(n,c,w))f[w]=c,f[c]=i[c]=i[w],d=s[w]}}})}),{root:i,align:f}}function Gs(r,e,n,o,i){var f={},s=Xs(r,e,n,i),u=i?"borderLeft":"borderRight";function d(m,g){var b=s.nodes(),w=b.pop(),y={};while(w){if(y[w])m(w);else y[w]=!0,b.push(w),b=b.concat(g(w));w=b.pop()}}function c(m){f[m]=s.inEdges(m).reduce(function(g,b){return Math.max(g,f[b.v]+s.edge(b))},0)}function p(m){var g=s.outEdges(m).reduce(function(w,y){return Math.min(w,f[y.w]-s.edge(y))},Number.POSITIVE_INFINITY),b=r.node(m);if(g!==Number.POSITIVE_INFINITY&&b.borderType!==u)f[m]=Math.max(f[m],g)}return d(c,s.predecessors.bind(s)),d(p,s.successors.bind(s)),h(o,function(m){f[m]=f[n[m]]}),f}function Xs(r,e,n,o){var i=new re,f=r.graph(),s=zs(f.nodesep,f.edgesep,o);return h(e,function(u){var d;h(u,function(c){var p=n[c];if(i.setNode(p),d){var m=n[d],g=i.edge(m,p);i.setEdge(m,p,Math.max(s(r,c,d),g||0))}d=c})}),i}function Us(r,e){return J(pt(e),function(n){var{NEGATIVE_INFINITY:o,POSITIVE_INFINITY:i}=Number;return lt(n,function(f,s){var u=Ws(r,s)/2;o=Math.max(f+u,o),i=Math.min(f-u,i)}),o-i})}function Vs(r,e){var n=pt(e),o=B(n),i=S(n);h(["u","d"],function(f){h(["l","r"],function(s){var u=f+s,d=r[u],c;if(d===e)return;var p=pt(d);if(c=s==="l"?o-B(p):i-S(p),c)r[u]=q(d,function(m){return m+c})})})}function Ys(r,e){return q(r.ul,function(n,o){if(e)return r[e.toLowerCase()][o];else{var i=A(E(r,o));return(i[1]+i[2])/2}})}function eo(r){var e=D(r),n=or(Ms(r,e),js(r,e)),o={},i;h(["u","d"],function(s){i=s==="u"?e:pt(e).reverse(),h(["l","r"],function(u){if(u==="r")i=E(i,function(m){return pt(m).reverse()});var d=(s==="u"?r.predecessors:r.successors).bind(r),c=Fs(r,i,n,d),p=Gs(r,i,c.root,c.align,u==="r");if(u==="r")p=q(p,function(m){return-m});o[s+u]=p})});var f=Us(r,o);return Vs(o,f),Ys(o,r.graph().align)}function zs(r,e,n){return function(o,i,f){var s=o.node(i),u=o.node(f),d=0,c;if(d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=-s.width/2;break;case"r":c=s.width/2;break}if(c)d+=n?c:-c;if(c=0,d+=(s.dummy?e:r)/2,d+=(u.dummy?e:r)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":c=u.width/2;break;case"r":c=-u.width/2;break}if(c)d+=n?c:-c;return c=0,d}}function Ws(r,e){return r.node(e).width}function to(r){r=Sr(r),qs(r),mt(eo(r),function(e,n){r.node(n).x=e})}function qs(r){var e=D(r),n=r.graph().ranksep,o=0;h(e,function(i){var f=S(E(i,function(s){return r.node(s).height}));h(i,function(s){r.node(s).y=o+f/2}),o+=f+n})}function $r(r,e){var n=e&&e.debugTiming?dn:cn;n("layout",()=>{var o=n(" buildLayoutGraph",()=>ou(r));n(" runLayout",()=>Hs(o,n)),n(" updateInputGraph",()=>Ks(r,o))})}function Hs(r,e){e(" makeSpaceForEdgeLabels",()=>iu(r)),e(" removeSelfEdges",()=>mu(r)),e(" acyclic",()=>rn(r)),e(" nestingGraph.run",()=>Dn(r)),e(" rank",()=>Hr(Sr(r))),e(" injectEdgeLabelProxies",()=>au(r)),e(" removeEmptyRanks",()=>sn(r)),e(" nestingGraph.cleanup",()=>Gn(r)),e(" normalizeRanks",()=>fn(r)),e(" assignRankMinMax",()=>fu(r)),e(" removeEdgeLabelProxies",()=>su(r)),e(" normalize.run",()=>On(r)),e(" parentDummyChains",()=>Qn(r)),e(" addBorderSegments",()=>ln(r)),e(" order",()=>$n(r)),e(" insertSelfEdges",()=>hu(r)),e(" adjustCoordinateSystem",()=>hn(r)),e(" position",()=>to(r)),e(" positionSelfEdges",()=>gu(r)),e(" removeBorderNodes",()=>lu(r)),e(" normalize.undo",()=>Ln(r)),e(" fixupEdgeLabelCoords",()=>cu(r)),e(" undoCoordinateSystem",()=>gn(r)),e(" translateGraph",()=>uu(r)),e(" assignNodeIntersects",()=>du(r)),e(" reversePoints",()=>pu(r)),e(" acyclic.undo",()=>nn(r))}function Ks(r,e){h(r.nodes(),function(n){var o=r.node(n),i=e.node(n);if(o){if(o.x=i.x,o.y=i.y,e.children(n).length)o.width=i.width,o.height=i.height}}),h(r.edges(),function(n){var o=r.edge(n),i=e.edge(n);if(o.points=i.points,Object.prototype.hasOwnProperty.call(i,"x"))o.x=i.x,o.y=i.y}),r.graph().width=e.graph().width,r.graph().height=e.graph().height}var Js=["nodesep","edgesep","ranksep","marginx","marginy"],Zs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$s=["acyclicer","ranker","rankdir","align"],Qs=["width","height"],ru={width:0,height:0},eu=["minlen","weight","width","height","labeloffset"],tu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},nu=["labelpos"];function ou(r){var e=new re({multigraph:!0,compound:!0}),n=Zr(r.graph());return e.setGraph(or({},Zs,Jr(n,Js),Z(n,$s))),h(r.nodes(),function(o){var i=Zr(r.node(o));e.setNode(o,et(Jr(i,Qs),ru)),e.setParent(o,r.parent(o))}),h(r.edges(),function(o){var i=Zr(r.edge(o));e.setEdge(o,or({},tu,Jr(i,eu),Z(i,nu)))}),e}function iu(r){var e=r.graph();e.ranksep/=2,h(r.edges(),function(n){var o=r.edge(n);if(o.minlen*=2,o.labelpos.toLowerCase()!=="c")if(e.rankdir==="TB"||e.rankdir==="BT")o.width+=o.labeloffset;else o.height+=o.labeloffset})}function au(r){h(r.edges(),function(e){var n=r.edge(e);if(n.width&&n.height){var o=r.node(e.v),i=r.node(e.w),f={rank:(i.rank-o.rank)/2+o.rank,e};T(r,"edge-proxy",f,"_ep")}})}function fu(r){var e=0;h(r.nodes(),function(n){var o=r.node(n);if(o.borderTop)o.minRank=r.node(o.borderTop).rank,o.maxRank=r.node(o.borderBottom).rank,e=S(e,o.maxRank)}),r.graph().maxRank=e}function su(r){h(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="edge-proxy")r.edge(n.e).labelRank=n.rank,r.removeNode(e)})}function uu(r){var e=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,f=r.graph(),s=f.marginx||0,u=f.marginy||0;function d(c){var{x:p,y:m,width:g,height:b}=c;e=Math.min(e,p-g/2),n=Math.max(n,p+g/2),o=Math.min(o,m-b/2),i=Math.max(i,m+b/2)}h(r.nodes(),function(c){d(r.node(c))}),h(r.edges(),function(c){var p=r.edge(c);if(Object.prototype.hasOwnProperty.call(p,"x"))d(p)}),e-=s,o-=u,h(r.nodes(),function(c){var p=r.node(c);p.x-=e,p.y-=o}),h(r.edges(),function(c){var p=r.edge(c);if(h(p.points,function(m){m.x-=e,m.y-=o}),Object.prototype.hasOwnProperty.call(p,"x"))p.x-=e;if(Object.prototype.hasOwnProperty.call(p,"y"))p.y-=o}),f.width=n-e+s,f.height=i-o+u}function du(r){h(r.edges(),function(e){var n=r.edge(e),o=r.node(e.v),i=r.node(e.w),f,s;if(!n.points)n.points=[],f=i,s=o;else f=n.points[0],s=n.points[n.points.length-1];n.points.unshift(Dr(o,f)),n.points.push(Dr(i,s))})}function cu(r){h(r.edges(),function(e){var n=r.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x")){if(n.labelpos==="l"||n.labelpos==="r")n.width-=n.labeloffset;switch(n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}}})}function pu(r){h(r.edges(),function(e){var n=r.edge(e);if(n.reversed)n.points.reverse()})}function lu(r){h(r.nodes(),function(e){if(r.children(e).length){var n=r.node(e),o=r.node(n.borderTop),i=r.node(n.borderBottom),f=r.node(X(n.borderLeft)),s=r.node(X(n.borderRight));n.width=Math.abs(s.x-f.x),n.height=Math.abs(i.y-o.y),n.x=f.x+n.width/2,n.y=o.y+n.height/2}}),h(r.nodes(),function(e){if(r.node(e).dummy==="border")r.removeNode(e)})}function mu(r){h(r.edges(),function(e){if(e.v===e.w){var n=r.node(e.v);if(!n.selfEdges)n.selfEdges=[];n.selfEdges.push({e,label:r.edge(e)}),r.removeEdge(e)}})}function hu(r){var e=D(r);h(e,function(n){var o=0;h(n,function(i,f){var s=r.node(i);s.order=f+o,h(s.selfEdges,function(u){T(r,"selfedge",{width:u.label.width,height:u.label.height,rank:s.rank,order:f+ ++o,e:u.e,label:u.label},"_se")}),delete s.selfEdges})})}function gu(r){h(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="selfedge"){var o=r.node(n.e.v),i=o.x+o.width/2,f=o.y,s=n.x-i,u=o.height/2;r.setEdge(n.e,n.label),r.removeNode(e),n.label.points=[{x:i+2*s/3,y:f-u},{x:i+5*s/6,y:f-u},{x:i+s,y:f},{x:i+5*s/6,y:f+u},{x:i+2*s/3,y:f+u}],n.label.x=n.x,n.label.y=n.y}})}function Jr(r,e){return q(Z(r,e),Number)}function Zr(r){var e={};return h(r,function(n,o){e[o.toLowerCase()]=n}),e}var no=t((r,e,n)=>Math.max(e,Math.min(n,r)),"clamp"),fo=t((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),vu=t((r)=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram"||r==="er"||r==="classDiagram","shouldMergeSelfLoopSegments"),bu=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],yu=t((r,e,n,o,i)=>{let f=[],s=new Set;if(n.forEach(({start:p,end:m})=>{if(p!==o)s.add(p);if(m!==o)s.add(m)}),s.forEach((p)=>{let m=r.node(p);if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)}),f.length===0)n.forEach(({edge:p})=>{(p.points??[]).forEach((m)=>{if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)})});if(f.length===0)return fo(i);let u=f.reduce((p,m)=>({x:p.x+m.x/f.length,y:p.y+m.y/f.length}),{x:0,y:0}),d=u.x-e.x,c=u.y-e.y;if(Math.abs(d)>Math.abs(c))return d>0?"right":"left";if(Math.abs(c)>0)return c>0?"bottom":"top";return fo(i)},"getSelfLoopSide"),wu=t((r,e="top",n=0,o=0)=>{let i=r.x,f=r.y-n,s=r.width/2,u=r.height/2,d=Math.max(36,Math.min(100,r.width*0.8)),c=no(Math.max(o,r.width*0.35),36,d),p=no(Math.min(r.width,r.height)*0.45,24,48);switch(e){case"bottom":{let m=f+u;return[{x:i-c/2,y:m},{x:i-c/2,y:m+p},{x:i+c/2,y:m+p},{x:i+c/2,y:m}]}case"right":{let m=i+s;return[{x:m,y:f-c/2},{x:m+p,y:f-c/2},{x:m+p,y:f+c/2},{x:m,y:f+c/2}]}case"left":{let m=i-s;return[{x:m,y:f-c/2},{x:m-p,y:f-c/2},{x:m-p,y:f+c/2},{x:m,y:f+c/2}]}case"top":default:{let m=f-u;return[{x:i-c/2,y:m},{x:i-c/2,y:m-p},{x:i+c/2,y:m-p},{x:i+c/2,y:m}]}}},"getSelfLoopPoints"),_u=t((r,e,n="top",o=0,i={})=>{let s=r.x,u=r.y-o,d=i.width??0,c=i.height??0;switch(n){case"bottom":return{x:s,y:Math.max(...e.map((p)=>p.y))+c/2+4};case"right":return{x:Math.max(...e.map((p)=>p.x))+d/2+4,y:u};case"left":return{x:Math.min(...e.map((p)=>p.x))-d/2-4,y:u};case"top":default:return{x:s,y:Math.min(...e.map((p)=>p.y))-c/2-4}}},"getSelfLoopLabelPosition"),ao=t((r,e=0,{mergeSelfLoops:n=!0}={})=>{let o=new Map,i=[],f=r.graph()?.rankdir;return r.edges().forEach((s)=>{let u=r.edge(s);if(n&&u.selfLoop){let d=u.selfLoop.id;if(!o.has(d))o.set(d,[]);o.get(d).push({edge:u,start:s.v,end:s.w})}else i.push({edge:u,start:s.v,end:s.w})}),o.forEach((s)=>{if(s.length!==3){s.forEach((_)=>i.push(_));return}s.sort((_,R)=>_.edge.selfLoop.order-R.edge.selfLoop.order);let[u,d,c]=s,p=u.edge.originalEdge??d.edge.originalEdge??c.edge.originalEdge??d.edge,m=r.node(p.start);if(!m){s.forEach((_)=>i.push(_));return}let g={width:d.edge.width,height:d.edge.height},b=yu(r,m,s,p.start,f),w=wu(m,b,e,g.width??0),y=_u(m,w,b,e,g),v={...d.edge,...p,id:p.id,points:w,start:p.start,end:p.end,x:y.x,y:y.y,width:g.width,height:g.height,labelStyle:d.edge.labelStyle,fromCluster:u.edge.fromCluster??d.edge.fromCluster??c.edge.fromCluster,toCluster:u.edge.toCluster??d.edge.toCluster??c.edge.toCluster};delete v.selfLoop,delete v.originalEdge,i.push({edge:v,start:v.start,end:v.end})}),i},"getEdgesToRender"),co=t(async({element:r,graph:e,diagramType:n,id:o,parentCluster:i,siteConfig:f})=>{let s=e.graph().rankdir;a.trace("Dir in recursive render - dir:",s);let{clusters:u,edgePaths:d,edgeLabels:c,nodes:p,rootGroups:m}=pa(r,{edgePathsClass:"edgePaths"});if(!e.nodes())a.info("No nodes found for",e);else a.info("Recursive render XXX",e.nodes());if(e.edges().length>0)a.info("Recursive edges",e.edge(e.edges()[0]));let g=vu(n);await Promise.all(e.nodes().map(async function(y){let v=e.node(y);if(i!==void 0){let _=JSON.parse(JSON.stringify(i.clusterData));if(a.trace(`Setting data for parent cluster XXX
|
|
1
|
+
import{t,a,l,I,Tt,ko,vt,en,At,Yn,tn}from"./chunk-tfqarvdx.js";import{xe,Oe,Ke,Ee,dt,Wt,H,me,ot,Gt,st,cr,ha,ga,ya,yn,Ct,va,vn,$e,bn,$t,St,xn,Ht,_n,ba,xa,ur,_e,_a,wn,Yt,kn,dr,pr,Zt,wa,mr,ka,jr,pt,fr,Ca,Sa,Ta,Ge,hr,gr,Cn,Ea,yr,h,Qe,mt,we,Xt,re}from"./chunk-88wd49xe.js";import{pa,ma,W,Bn,so,fa,lr}from"./chunk-rxvm70w5.js";import{Lt}from"./chunk-ngt1j8py.js";var br={};Lt(br,{default:()=>rr});var lo=/\s/;function mo(r){var e=r.length;while(e--&&lo.test(r.charAt(e)));return e}var te=mo;var ho=/^\s+/;function go(r){return r?r.slice(0,te(r)+1).replace(ho,""):r}var ne=go;var oe=NaN,vo=/^[-+]0x[0-9a-f]+$/i,bo=/^0b[01]+$/i,yo=/^0o[0-7]+$/i,wo=parseInt;function _o(r){if(typeof r=="number")return r;if(dt(r))return oe;if(me(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=me(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=ne(r);var n=bo.test(r);return n||yo.test(r)?wo(r.slice(2),n?2:8):vo.test(r)?oe:+r}var ie=_o;var ae=1/0,Eo=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function xo(r){if(!r)return r===0?r:0;if(r=ie(r),r===ae||r===-ae){var e=r<0?-1:1;return e*Eo}return r===r?r:0}var V=xo;function Oo(r){var e=V(r),n=e%1;return e===e?n?e-n:e:0}var fe=Oo;var se=Object.create,Lo=function(){function r(){}return function(e){if(!me(e))return{};if(se)return se(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}(),ue=Lo;function Io(r,e){var n=-1,o=r.length;e||(e=Array(o));while(++n<o)e[n]=r[n];return e}var sr=Io;function So(r,e,n){if(e=="__proto__"&&cr)cr(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0});else r[e]=n}var M=So;var Po=Object.prototype,To=Po.hasOwnProperty;function Co(r,e,n){var o=r[e];if(!(To.call(r,e)&&Ct(o,n))||n===void 0&&!(e in r))M(r,e,n)}var j=Co;function Ao(r,e,n,o){var i=!n;n||(n={});var f=-1,s=e.length;while(++f<s){var u=e[f],d=o?o(n[u],r[u],u,n,r):void 0;if(d===void 0)d=r[u];if(i)M(n,u,d);else j(n,u,d)}return n}var k=Ao;function Ro(r,e,n){if(!me(n))return!1;var o=typeof e;if(o=="number"?$e(n)&&yn(e,n.length):o=="string"&&(e in n))return Ct(n[e],r);return!1}var C=Ro;function jo(r){return vn(function(e,n){var o=-1,i=n.length,f=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;if(f=r.length>3&&typeof f=="function"?(i--,f):void 0,s&&C(n[0],n[1],s))f=i<3?void 0:f,i=1;e=Object(e);while(++o<i){var u=n[o];if(u)r(e,u,o,f)}return e})}var de=jo;function Bo(r){var e=[];if(r!=null)for(var n in Object(r))e.push(n);return e}var ce=Bo;var Fo=Object.prototype,Go=Fo.hasOwnProperty;function Xo(r){if(!me(r))return ce(r);var e=bn(r),n=[];for(var o in r)if(!(o=="constructor"&&(e||!Go.call(r,o))))n.push(o);return n}var pe=Xo;function Uo(r){return $e(r)?ba(r,!0):pe(r)}var L=Uo;function Vo(r){var e=r==null?0:r.length;return e?pr(r,1):[]}var N=Vo;function Yo(r){return ha(va(r,void 0,N),r+"")}var le=Yo;var zo=xa(Object.getPrototypeOf,Object),Y=zo;var Wo="[object Object]",qo=Function.prototype,Ho=Object.prototype,he=qo.toString,Ko=Ho.hasOwnProperty,Jo=he.call(Object);function Zo(r){if(!Ee(r)||Ke(r)!=Wo)return!1;var e=Y(r);if(e===null)return!0;var n=Ko.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&he.call(n)==Jo}var ge=Zo;var $o="\\ud800-\\udfff",Qo="\\u0300-\\u036f",ri="\\ufe20-\\ufe2f",ei="\\u20d0-\\u20ff",ti=Qo+ri+ei,ni="\\ufe0e\\ufe0f",oi="\\u200d",ii=RegExp("["+oi+$o+ti+ni+"]");function ai(r){return ii.test(r)}var ve=ai;function fi(r,e){return r&&k(e,_e(e),r)}var be=fi;function si(r,e){return r&&k(e,L(e),r)}var ye=si;var Ne=typeof br=="object"&&br&&!br.nodeType&&br,Le=Ne&&typeof vr=="object"&&vr&&!vr.nodeType&&vr,ui=Le&&Le.exports===Ne,Ie=ui?xe.Buffer:void 0,Se=Ie?Ie.allocUnsafe:void 0;function di(r,e){if(e)return r.slice();var n=r.length,o=Se?Se(n):new r.constructor(n);return r.copy(o),o}var rr=di;function ci(r,e){return k(r,mr(r),e)}var Pe=ci;var pi=Object.getOwnPropertySymbols,li=!pi?wa:function(r){var e=[];while(r)dr(e,mr(r)),r=Y(r);return e},wr=li;function mi(r,e){return k(r,wr(r),e)}var ke=mi;function hi(r){return ka(r,L,wr)}var Te=hi;var gi=Object.prototype,vi=gi.hasOwnProperty;function bi(r){var e=r.length,n=new r.constructor(e);if(e&&typeof r[0]=="string"&&vi.call(r,"index"))n.index=r.index,n.input=r.input;return n}var Ce=bi;function yi(r){var e=new r.constructor(r.byteLength);return new fr(e).set(new fr(r)),e}var z=yi;function wi(r,e){var n=e?z(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}var Ae=wi;var _i=/\w*$/;function Ei(r){var e=new r.constructor(r.source,_i.exec(r));return e.lastIndex=r.lastIndex,e}var Re=Ei;var Me=Oe?Oe.prototype:void 0,je=Me?Me.valueOf:void 0;function xi(r){return je?Object(je.call(r)):{}}var Be=xi;function Oi(r,e){var n=e?z(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}var _r=Oi;var Li="[object Boolean]",Ii="[object Date]",Si="[object Map]",Ni="[object Number]",Pi="[object RegExp]",ki="[object Set]",Ti="[object String]",Ci="[object Symbol]",Ai="[object ArrayBuffer]",Ri="[object DataView]",Mi="[object Float32Array]",ji="[object Float64Array]",Bi="[object Int8Array]",Di="[object Int16Array]",Fi="[object Int32Array]",Gi="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Ui="[object Uint16Array]",Vi="[object Uint32Array]";function Yi(r,e,n){var o=r.constructor;switch(e){case Ai:return z(r);case Li:case Ii:return new o(+r);case Ri:return Ae(r,n);case Mi:case ji:case Bi:case Di:case Fi:case Gi:case Xi:case Ui:case Vi:return _r(r,n);case Si:return new o;case Ni:case Ti:return new o(r);case Pi:return Re(r);case ki:return new o;case Ci:return Be(r)}}var De=Yi;function zi(r){return typeof r.constructor=="function"&&!bn(r)?ue(Y(r)):{}}var Er=zi;var Wi="[object Map]";function qi(r){return Ee(r)&&pt(r)==Wi}var Fe=qi;var Xe=Ht&&Ht.isMap,Hi=Xe?xn(Xe):Fe,Ue=Hi;var Ki="[object Set]";function Ji(r){return Ee(r)&&pt(r)==Ki}var Ve=Ji;var Ye=Ht&&Ht.isSet,Zi=Ye?xn(Ye):Ve,ze=Zi;var $i=1,Qi=2,ra=4,We="[object Arguments]",ea="[object Array]",ta="[object Boolean]",na="[object Date]",oa="[object Error]",qe="[object Function]",ia="[object GeneratorFunction]",aa="[object Map]",sa="[object Number]",He="[object Object]",ua="[object RegExp]",da="[object Set]",ca="[object String]",la="[object Symbol]",Oa="[object WeakMap]",La="[object ArrayBuffer]",Ia="[object DataView]",Na="[object Float32Array]",Pa="[object Float64Array]",Aa="[object Int8Array]",Ra="[object Int16Array]",Ma="[object Int32Array]",ja="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",Fa="[object Uint32Array]",x={};x[We]=x[ea]=x[La]=x[Ia]=x[ta]=x[na]=x[Na]=x[Pa]=x[Aa]=x[Ra]=x[Ma]=x[aa]=x[sa]=x[He]=x[ua]=x[da]=x[ca]=x[la]=x[ja]=x[Ba]=x[Da]=x[Fa]=!0;x[oa]=x[qe]=x[Oa]=!1;function xr(r,e,n,o,i,f){var s,u=e&$i,d=e&Qi,c=e&ra;if(n)s=i?n(r,o,i,f):n(r);if(s!==void 0)return s;if(!me(r))return r;var p=H(r);if(p){if(s=Ce(r),!u)return sr(r,s)}else{var m=pt(r),g=m==qe||m==ia;if(St(r))return rr(r,u);if(m==He||m==We||g&&!i){if(s=d||g?{}:Er(r),!u)return d?ke(r,ye(s,r)):Pe(r,be(s,r))}else{if(!x[m])return i?r:{};s=De(r,m,u)}}f||(f=new Zt);var b=f.get(r);if(b)return b;if(f.set(r,s),ze(r))r.forEach(function(v){s.add(xr(v,e,n,v,r,f))});else if(Ue(r))r.forEach(function(v,_){s.set(_,xr(v,e,n,_,r,f))});var w=c?d?Te:jr:d?L:_e,y=p?void 0:w(r);return ga(y||r,function(v,_){if(y)_=v,v=r[_];j(s,_,xr(v,e,n,_,r,f))}),s}var Je=xr;var Ga=1,Xa=4;function Ua(r){return Je(r,Ga|Xa)}var Ze=Ua;var Va=function(){return xe.Date.now()},kr=Va;var rt=Object.prototype,Ya=rt.hasOwnProperty,za=vn(function(r,e){r=Object(r);var n=-1,o=e.length,i=o>2?e[2]:void 0;if(i&&C(e[0],e[1],i))o=1;while(++n<o){var f=e[n],s=L(f),u=-1,d=s.length;while(++u<d){var c=s[u],p=r[c];if(p===void 0||Ct(p,rt[c])&&!Ya.call(r,c))r[c]=f[c]}}return r}),et=za;function Wa(r,e,n){if(n!==void 0&&!Ct(r[e],n)||n===void 0&&!(e in r))M(r,e,n)}var er=Wa;function qa(r,e){if(e==="constructor"&&typeof r[e]==="function")return;if(e=="__proto__")return;return r[e]}var tr=qa;function Ha(r){return k(r,L(r))}var tt=Ha;function Ka(r,e,n,o,i,f,s){var u=tr(r,n),d=tr(e,n),c=s.get(d);if(c){er(r,n,c);return}var p=f?f(u,d,n+"",r,e,s):void 0,m=p===void 0;if(m){var g=H(d),b=!g&&St(d),w=!g&&!b&&_n(d);if(p=d,g||b||w)if(H(u))p=u;else if(Ea(u))p=sr(u);else if(b)m=!1,p=rr(d,!0);else if(w)m=!1,p=_r(d,!0);else p=[];else if(ge(d)||$t(d)){if(p=u,$t(u))p=tt(u);else if(!me(u)||Gt(u))p=Er(d)}else m=!1}if(m)s.set(d,p),i(p,d,o,f,s),s.delete(d);er(r,n,p)}var nt=Ka;function it(r,e,n,o,i){if(r===e)return;hr(e,function(f,s){if(i||(i=new Zt),me(f))nt(r,e,s,n,it,o,i);else{var u=o?o(tr(r,s),f,s+"",r,e,i):void 0;if(u===void 0)u=f;er(r,s,u)}},L)}var at=it;function Ja(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var X=Ja;function Za(r){return function(e,n,o){var i=Object(e);if(!$e(e)){var f=Ge(n,3);e=_e(e),n=function(u){return f(i[u],u,i)}}var s=r(e,n,o);return s>-1?i[f?e[s]:s]:void 0}}var ft=Za;var $a=Math.max;function Qa(r,e,n){var o=r==null?0:r.length;if(!o)return-1;var i=n==null?0:fe(n);if(i<0)i=$a(o+i,0);return ya(r,Ge(e,3),i)}var ut=Qa;var rf=ft(ut),nr=rf;function ef(r,e){var n=-1,o=$e(r)?Array(r.length):[];return Cn(r,function(i,f,s){o[++n]=e(i,f,s)}),o}var Or=ef;function tf(r,e){var n=H(r)?Wt:Or;return n(r,Ge(e,3))}var E=tf;function nf(r,e){return r==null?r:hr(r,yr(e),L)}var ct=nf;function of(r,e){return r&&gr(r,yr(e))}var lt=of;function af(r,e){return r>e}var ht=af;var ff=Object.prototype,sf=ff.hasOwnProperty;function uf(r,e){return r!=null&&sf.call(r,e)}var gt=uf;function df(r,e){return r!=null&&Ca(r,e,gt)}var Lr=df;var cf="[object String]";function pf(r){return typeof r=="string"||!H(r)&&Ee(r)&&Ke(r)==cf}var bt=pf;function lf(r,e){return r<e}var Ir=lf;function mf(r,e){var n={};return e=Ge(e,3),gr(r,function(o,i,f){M(n,i,e(o,i,f))}),n}var q=mf;function hf(r,e,n){var o=-1,i=r.length;while(++o<i){var f=r[o],s=e(f);if(s!=null&&(u===void 0?s===s&&!dt(s):n(s,u)))var u=s,d=f}return d}var K=hf;function gf(r){return r&&r.length?K(r,ot,ht):void 0}var S=gf;var vf=de(function(r,e,n){at(r,e,n)}),or=vf;function bf(r){return r&&r.length?K(r,ot,Ir):void 0}var B=bf;function yf(r,e){return r&&r.length?K(r,Ge(e,2),Ir):void 0}var J=yf;function wf(r,e,n,o){if(!me(r))return r;e=wn(e,r);var i=-1,f=e.length,s=f-1,u=r;while(u!=null&&++i<f){var d=Yt(e[i]),c=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return r;if(i!=s){var p=u[d];if(c=o?o(p,d,u):void 0,c===void 0)c=me(p)?p:yn(e[i+1])?[]:{}}j(u,d,c),u=u[d]}return r}var yt=wf;function _f(r,e,n){var o=-1,i=e.length,f={};while(++o<i){var s=e[o],u=kn(r,s);if(n(u,s))yt(f,wn(s,r),u)}return f}var wt=_f;function Ef(r,e){var n=r.length;r.sort(e);while(n--)r[n]=r[n].value;return r}var _t=Ef;function xf(r,e){if(r!==e){var n=r!==void 0,o=r===null,i=r===r,f=dt(r),s=e!==void 0,u=e===null,d=e===e,c=dt(e);if(!u&&!c&&!f&&r>e||f&&s&&d&&!u&&!c||o&&s&&d||!n&&d||!i)return 1;if(!o&&!f&&!c&&r<e||c&&n&&i&&!o&&!f||u&&n&&i||!s&&i||!d)return-1}return 0}var Et=xf;function Of(r,e,n){var o=-1,i=r.criteria,f=e.criteria,s=i.length,u=n.length;while(++o<s){var d=Et(i[o],f[o]);if(d){if(o>=u)return d;var c=n[o];return d*(c=="desc"?-1:1)}}return r.index-e.index}var xt=Of;function Lf(r,e,n){if(e.length)e=Wt(e,function(f){if(H(f))return function(s){return kn(s,f.length===1?f[0]:f)};return f});else e=[ot];var o=-1;e=Wt(e,xn(Ge));var i=Or(r,function(f,s,u){var d=Wt(e,function(c){return c(f)});return{criteria:d,index:++o,value:f}});return _t(i,function(f,s){return xt(f,s,n)})}var Ot=Lf;var If=Ta("length"),It=If;var Pt="\\ud800-\\udfff",Sf="\\u0300-\\u036f",Nf="\\ufe20-\\ufe2f",Pf="\\u20d0-\\u20ff",kf=Sf+Nf+Pf,Tf="\\ufe0e\\ufe0f",Cf="["+Pt+"]",Tr="["+kf+"]",Cr="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Tr+"|"+Cr+")",kt="[^"+Pt+"]",Rt="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rf="\\u200d",jt=Af+"?",Bt="["+Tf+"]?",Mf="(?:"+Rf+"(?:"+[kt,Rt,Mt].join("|")+")"+Bt+jt+")*",jf=Bt+jt+Mf,Bf="(?:"+[kt+Tr+"?",Tr,Rt,Mt,Cf].join("|")+")",Nt=RegExp(Cr+"(?="+Cr+")|"+Bf+jf,"g");function Df(r){var e=Nt.lastIndex=0;while(Nt.test(r))++e;return e}var Dt=Df;function Ff(r){return ve(r)?Dt(r):It(r)}var Ft=Ff;function Gf(r,e){return wt(r,e,function(n,o){return Sa(r,o)})}var Ut=Gf;var Xf=le(function(r,e){return r==null?{}:Ut(r,e)}),Z=Xf;var{ceil:Uf,max:Vf}=Math;function Yf(r,e,n,o){var i=-1,f=Vf(Uf((e-r)/(n||1)),0),s=Array(f);while(f--)s[o?f:++i]=r,r+=n;return s}var Vt=Yf;function zf(r){return function(e,n,o){if(o&&typeof o!="number"&&C(e,n,o))n=o=void 0;if(e=V(e),n===void 0)n=e,e=0;else n=V(n);return o=o===void 0?e<n?1:-1:V(o),Vt(e,n,o,r)}}var zt=zf;var Wf=zt(),P=Wf;var qf="[object Map]",Hf="[object Set]";function Kf(r){if(r==null)return 0;if($e(r))return bt(r)?Ft(r):r.length;var e=pt(r);if(e==qf||e==Hf)return r.size;return ur(r).length}var qt=Kf;var Jf=vn(function(r,e){if(r==null)return[];var n=e.length;if(n>1&&C(r,e[0],e[1]))e=[];else if(n>2&&C(e[0],e[1],e[2]))e=[e[0]];return Ot(r,pr(e,1),[])}),A=Jf;var Zf=0;function $f(r){var e=++Zf;return _a(r)+e}var Q=$f;function Qf(r,e,n){var o=-1,i=r.length,f=e.length,s={};while(++o<i){var u=o<f?e[o]:void 0;n(s,r[o],u)}return s}var Kt=Qf;function rs(r,e){return Kt(r||[],e||[],j)}var Ar=rs;class Rr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,e=r._prev;if(e!==r)return Jt(e),e}enqueue(r){var e=this._sentinel;if(r._prev&&r._next)Jt(r);r._next=e._next,e._next._prev=r,e._next=r,r._prev=e}toString(){var r=[],e=this._sentinel,n=e._prev;while(n!==e)r.push(JSON.stringify(n,es)),n=n._prev;return"["+r.join(", ")+"]"}}function Jt(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function es(r,e){if(r!=="_next"&&r!=="_prev")return e}var ts=st(1);function Qt(r,e){if(r.nodeCount()<=1)return[];var n=os(r,e||ts),o=ns(n.graph,n.buckets,n.zeroIdx);return N(E(o,function(i){return r.outEdges(i.v,i.w)}))}function ns(r,e,n){var o=[],i=e[e.length-1],f=e[0],s;while(r.nodeCount()){while(s=f.dequeue())Mr(r,e,n,s);while(s=i.dequeue())Mr(r,e,n,s);if(r.nodeCount()){for(var u=e.length-2;u>0;--u)if(s=e[u].dequeue(),s){o=o.concat(Mr(r,e,n,s,!0));break}}}return o}function Mr(r,e,n,o,i){var f=i?[]:void 0;return h(r.inEdges(o.v),function(s){var u=r.edge(s),d=r.node(s.v);if(i)f.push({v:s.v,w:s.w});d.out-=u,Br(e,n,d)}),h(r.outEdges(o.v),function(s){var u=r.edge(s),d=s.w,c=r.node(d);c.in-=u,Br(e,n,c)}),r.removeNode(o.v),f}function os(r,e){var n=new re,o=0,i=0;h(r.nodes(),function(u){n.setNode(u,{v:u,in:0,out:0})}),h(r.edges(),function(u){var d=n.edge(u.v,u.w)||0,c=e(u),p=d+c;n.setEdge(u.v,u.w,p),i=Math.max(i,n.node(u.v).out+=c),o=Math.max(o,n.node(u.w).in+=c)});var f=P(i+o+3).map(function(){return new Rr}),s=o+1;return h(n.nodes(),function(u){Br(f,s,n.node(u))}),{graph:n,buckets:f,zeroIdx:s}}function Br(r,e,n){if(!n.out)r[0].enqueue(n);else if(!n.in)r[r.length-1].enqueue(n);else r[n.out-n.in+e].enqueue(n)}function rn(r){var e=r.graph().acyclicer==="greedy"?Qt(r,n(r)):is(r);h(e,function(o){var i=r.edge(o);r.removeEdge(o),i.forwardName=o.name,i.reversed=!0,r.setEdge(o.w,o.v,i,Q("rev"))});function n(o){return function(i){return o.edge(i).weight}}}function is(r){var e=[],n={},o={};function i(f){if(Object.prototype.hasOwnProperty.call(o,f))return;o[f]=!0,n[f]=!0,h(r.outEdges(f),function(s){if(Object.prototype.hasOwnProperty.call(n,s.w))e.push(s);else i(s.w)}),delete n[f]}return h(r.nodes(),i),e}function nn(r){h(r.edges(),function(e){var n=r.edge(e);if(n.reversed){r.removeEdge(e);var o=n.forwardName;delete n.reversed,delete n.forwardName,r.setEdge(e.w,e.v,n,o)}})}function T(r,e,n,o){var i;do i=Q(o);while(r.hasNode(i));return n.dummy=e,r.setNode(i,n),i}function an(r){var e=new re().setGraph(r.graph());return h(r.nodes(),function(n){e.setNode(n,r.node(n))}),h(r.edges(),function(n){var o=e.edge(n.v,n.w)||{weight:0,minlen:1},i=r.edge(n);e.setEdge(n.v,n.w,{weight:o.weight+i.weight,minlen:Math.max(o.minlen,i.minlen)})}),e}function Sr(r){var e=new re({multigraph:r.isMultigraph()}).setGraph(r.graph());return h(r.nodes(),function(n){if(!r.children(n).length)e.setNode(n,r.node(n))}),h(r.edges(),function(n){e.setEdge(n,r.edge(n))}),e}function Dr(r,e){var{x:n,y:o}=r,i=e.x-n,f=e.y-o,s=r.width/2,u=r.height/2;if(!i&&!f)throw Error("Not possible to find intersection inside of the rectangle");var d,c;if(Math.abs(f)*s>Math.abs(i)*u){if(f<0)u=-u;d=u*i/f,c=u}else{if(i<0)s=-s;d=s,c=s*f/i}return{x:n+d,y:o+c}}function D(r){var e=E(P(Gr(r)+1),function(){return[]});return h(r.nodes(),function(n){var o=r.node(n),i=o.rank;if(!we(i))e[i][o.order]=n}),e}function fn(r){var e=B(E(r.nodes(),function(n){return r.node(n).rank}));h(r.nodes(),function(n){var o=r.node(n);if(Lr(o,"rank"))o.rank-=e})}function sn(r){var e=B(E(r.nodes(),function(f){return r.node(f).rank})),n=[];h(r.nodes(),function(f){var s=r.node(f).rank-e;if(!n[s])n[s]=[];n[s].push(f)});var o=0,i=r.graph().nodeRankFactor;h(n,function(f,s){if(we(f)&&s%i!==0)--o;else if(o)h(f,function(u){r.node(u).rank+=o})})}function Fr(r,e,n,o){var i={width:0,height:0};if(arguments.length>=4)i.rank=n,i.order=o;return T(r,"border",i,e)}function Gr(r){return S(E(r.nodes(),function(e){var n=r.node(e).rank;if(!we(n))return n}))}function un(r,e){var n={lhs:[],rhs:[]};return h(r,function(o){if(e(o))n.lhs.push(o);else n.rhs.push(o)}),n}function dn(r,e){var n=kr();try{return e()}finally{console.log(r+" time: "+(kr()-n)+"ms")}}function cn(r,e){return e()}function ln(r){function e(n){var o=r.children(n),i=r.node(n);if(o.length)h(o,e);if(Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var f=i.minRank,s=i.maxRank+1;f<s;++f)pn(r,"borderLeft","_bl",n,i,f),pn(r,"borderRight","_br",n,i,f)}}h(r.children(),e)}function pn(r,e,n,o,i,f){var s={width:0,height:0,rank:f,borderType:e},u=i[e][f-1],d=T(r,"border",s,n);if(i[e][f]=d,r.setParent(d,o),u)r.setEdge(u,d,{weight:1})}function hn(r){var e=r.graph().rankdir.toLowerCase();if(e==="lr"||e==="rl")En(r)}function gn(r){var e=r.graph().rankdir.toLowerCase();if(e==="bt"||e==="rl")as(r);if(e==="lr"||e==="rl")fs(r),En(r)}function En(r){h(r.nodes(),function(e){mn(r.node(e))}),h(r.edges(),function(e){mn(r.edge(e))})}function mn(r){var e=r.width;r.width=r.height,r.height=e}function as(r){h(r.nodes(),function(e){Xr(r.node(e))}),h(r.edges(),function(e){var n=r.edge(e);if(h(n.points,Xr),Object.prototype.hasOwnProperty.call(n,"y"))Xr(n)})}function Xr(r){r.y=-r.y}function fs(r){h(r.nodes(),function(e){Ur(r.node(e))}),h(r.edges(),function(e){var n=r.edge(e);if(h(n.points,Ur),Object.prototype.hasOwnProperty.call(n,"x"))Ur(n)})}function Ur(r){var e=r.x;r.x=r.y,r.y=e}function On(r){r.graph().dummyChains=[],h(r.edges(),function(e){us(r,e)})}function us(r,e){var n=e.v,o=r.node(n).rank,i=e.w,f=r.node(i).rank,s=e.name,u=r.edge(e),d=u.labelRank;if(f===o+1)return;r.removeEdge(e);var c=void 0,p,m;for(m=0,++o;o<f;++m,++o){if(u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:e,rank:o},p=T(r,"edge",c,"_d"),o===d)c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos;if(r.setEdge(n,p,{weight:u.weight},s),m===0)r.graph().dummyChains.push(p);n=p}r.setEdge(n,i,{weight:u.weight},s)}function Ln(r){h(r.graph().dummyChains,function(e){var n=r.node(e),o=n.edgeLabel,i;r.setEdge(n.edgeObj,o);while(n.dummy){if(i=r.successors(e)[0],r.removeNode(e),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label")o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height;e=i,n=r.node(e)}})}function ir(r){var e={};function n(o){var i=r.node(o);if(Object.prototype.hasOwnProperty.call(e,o))return i.rank;e[o]=!0;var f=B(E(r.outEdges(o),function(s){return n(s.w)-r.edge(s).minlen}));if(f===Number.POSITIVE_INFINITY||f===void 0||f===null)f=0;return i.rank=f}h(r.sources(),n)}function U(r,e){return r.node(e.w).rank-r.node(e.v).rank-r.edge(e).minlen}function Nr(r){var e=new re({directed:!1}),n=r.nodes()[0],o=r.nodeCount();e.setNode(n,{});var i,f;while(ds(e,r)<o)i=cs(e,r),f=e.hasNode(i.v)?U(r,i):-U(r,i),ps(e,r,f);return e}function ds(r,e){function n(o){h(e.nodeEdges(o),function(i){var f=i.v,s=o===f?i.w:f;if(!r.hasNode(s)&&!U(e,i))r.setNode(s,{}),r.setEdge(o,s,{}),n(s)})}return h(r.nodes(),n),r.nodeCount()}function cs(r,e){return J(e.edges(),function(n){if(r.hasNode(n.v)!==r.hasNode(n.w))return U(e,n)})}function ps(r,e,n){h(r.nodes(),function(o){e.node(o).rank+=n})}var dh=st(1);var vh=st(1);Vr.CycleException=ar;function Vr(r){var e={},n={},o=[];function i(f){if(Object.prototype.hasOwnProperty.call(n,f))throw new ar;if(!Object.prototype.hasOwnProperty.call(e,f))n[f]=!0,e[f]=!0,h(r.predecessors(f),i),delete n[f],o.push(f)}if(h(r.sinks(),i),qt(e)!==r.nodeCount())throw new ar;return o}function ar(){}ar.prototype=Error();function Pr(r,e,n){if(!H(e))e=[e];var o=(r.isDirected()?r.successors:r.neighbors).bind(r),i=[],f={};return h(e,function(s){if(!r.hasNode(s))throw Error("Graph does not have node: "+s);Sn(r,s,n==="post",f,o,i)}),i}function Sn(r,e,n,o,i,f){if(!Object.prototype.hasOwnProperty.call(o,e)){if(o[e]=!0,!n)f.push(e);if(h(i(e),function(s){Sn(r,s,n,o,i,f)}),n)f.push(e)}}function Yr(r,e){return Pr(r,e,"post")}function zr(r,e){return Pr(r,e,"pre")}G.initLowLimValues=qr;G.initCutValues=Wr;G.calcCutValue=Pn;G.leaveEdge=An;G.enterEdge=Rn;G.exchangeEdges=Mn;function G(r){r=an(r),ir(r);var e=Nr(r);qr(e),Wr(e,r);var n,o;while(n=An(e))o=Rn(e,r,n),Mn(e,r,n,o)}function Wr(r,e){var n=Yr(r,r.nodes());n=n.slice(0,n.length-1),h(n,function(o){vs(r,e,o)})}function vs(r,e,n){var o=r.node(n),i=o.parent;r.edge(n,i).cutvalue=Pn(r,e,n)}function Pn(r,e,n){var o=r.node(n),i=o.parent,f=!0,s=e.edge(n,i),u=0;if(!s)f=!1,s=e.edge(i,n);return u=s.weight,h(e.nodeEdges(n),function(d){var c=d.v===n,p=c?d.w:d.v;if(p!==i){var m=c===f,g=e.edge(d).weight;if(u+=m?g:-g,ys(r,n,p)){var b=r.edge(n,p).cutvalue;u+=m?-b:b}}}),u}function qr(r,e){if(arguments.length<2)e=r.nodes()[0];Tn(r,{},1,e)}function Tn(r,e,n,o,i){var f=n,s=r.node(o);if(e[o]=!0,h(r.neighbors(o),function(u){if(!Object.prototype.hasOwnProperty.call(e,u))n=Tn(r,e,n,u,o)}),s.low=f,s.lim=n++,i)s.parent=i;else delete s.parent;return n}function An(r){return nr(r.edges(),function(e){return r.edge(e).cutvalue<0})}function Rn(r,e,n){var{v:o,w:i}=n;if(!e.hasEdge(o,i))o=n.w,i=n.v;var f=r.node(o),s=r.node(i),u=f,d=!1;if(f.lim>s.lim)u=s,d=!0;var c=Qe(e.edges(),function(p){return d===Nn(r,r.node(p.v),u)&&d!==Nn(r,r.node(p.w),u)});return J(c,function(p){return U(e,p)})}function Mn(r,e,n,o){var{v:i,w:f}=n;r.removeEdge(i,f),r.setEdge(o.v,o.w,{}),qr(r),Wr(r,e),bs(r,e)}function bs(r,e){var n=nr(r.nodes(),function(i){return!e.node(i).parent}),o=zr(r,n);o=o.slice(1),h(o,function(i){var f=r.node(i).parent,s=e.edge(i,f),u=!1;if(!s)s=e.edge(f,i),u=!0;e.node(i).rank=e.node(f).rank+(u?s.minlen:-s.minlen)})}function ys(r,e,n){return r.hasEdge(e,n)}function Nn(r,e,n){return n.low<=e.lim&&e.lim<=n.lim}function Hr(r){switch(r.graph().ranker){case"network-simplex":jn(r);break;case"tight-tree":_s(r);break;case"longest-path":ws(r);break;default:jn(r)}}var ws=ir;function _s(r){ir(r),Nr(r)}function jn(r){G(r)}function Dn(r){var e=T(r,"root",{},"_root"),n=Es(r),o=S(mt(n))-1,i=2*o+1;r.graph().nestingRoot=e,h(r.edges(),function(s){r.edge(s).minlen*=i});var f=xs(r)+1;h(r.children(),function(s){Fn(r,e,i,f,o,n,s)}),r.graph().nodeRankFactor=i}function Fn(r,e,n,o,i,f,s){var u=r.children(s);if(!u.length){if(s!==e)r.setEdge(e,s,{weight:0,minlen:n});return}var d=Fr(r,"_bt"),c=Fr(r,"_bb"),p=r.node(s);if(r.setParent(d,s),p.borderTop=d,r.setParent(c,s),p.borderBottom=c,h(u,function(m){Fn(r,e,n,o,i,f,m);var g=r.node(m),b=g.borderTop?g.borderTop:m,w=g.borderBottom?g.borderBottom:m,y=g.borderTop?o:2*o,v=b!==w?1:i-f[s]+1;r.setEdge(d,b,{weight:y,minlen:v,nestingEdge:!0}),r.setEdge(w,c,{weight:y,minlen:v,nestingEdge:!0})}),!r.parent(s))r.setEdge(e,d,{weight:0,minlen:i+f[s]})}function Es(r){var e={};function n(o,i){var f=r.children(o);if(f&&f.length)h(f,function(s){n(s,i+1)});e[o]=i}return h(r.children(),function(o){n(o,1)}),e}function xs(r){return Xt(r.edges(),function(e,n){return e+r.edge(n).weight},0)}function Gn(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,h(r.edges(),function(n){var o=r.edge(n);if(o.nestingEdge)r.removeEdge(n)})}function Xn(r,e,n){var o={},i;h(n,function(f){var s=r.parent(f),u,d;while(s){if(u=r.parent(s),u)d=o[u],o[u]=s;else d=i,i=s;if(d&&d!==s){e.setEdge(d,s);return}s=u}})}function Un(r,e,n){var o=Ls(r),i=new re({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(f){return r.node(f)});return h(r.nodes(),function(f){var s=r.node(f),u=r.parent(f);if(s.rank===e||s.minRank<=e&&e<=s.maxRank){if(i.setNode(f),i.setParent(f,u||o),h(r[n](f),function(d){var c=d.v===f?d.w:d.v,p=i.edge(c,f),m=!we(p)?p.weight:0;i.setEdge(c,f,{weight:r.edge(d).weight+m})}),Object.prototype.hasOwnProperty.call(s,"minRank"))i.setNode(f,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]})}}),i}function Ls(r){var e;while(r.hasNode(e=Q("_root")));return e}function Vn(r,e){var n=0;for(var o=1;o<e.length;++o)n+=Is(r,e[o-1],e[o]);return n}function Is(r,e,n){var o=Ar(n,E(n,function(c,p){return p})),i=N(E(e,function(c){return A(E(r.outEdges(c),function(p){return{pos:o[p.w],weight:r.edge(p).weight}}),"pos")})),f=1;while(f<n.length)f<<=1;var s=2*f-1;f-=1;var u=E(Array(s),function(){return 0}),d=0;return h(i.forEach(function(c){var p=c.pos+f;u[p]+=c.weight;var m=0;while(p>0){if(p%2)m+=u[p+1];p=p-1>>1,u[p]+=c.weight}d+=c.weight*m})),d}function zn(r){var e={},n=Qe(r.nodes(),function(u){return!r.children(u).length}),o=S(E(n,function(u){return r.node(u).rank})),i=E(P(o+1),function(){return[]});function f(u){if(Lr(e,u))return;e[u]=!0;var d=r.node(u);i[d.rank].push(u),h(r.successors(u),f)}var s=A(n,function(u){return r.node(u).rank});return h(s,f),i}function Wn(r,e){return E(e,function(n){var o=r.inEdges(n);if(!o.length)return{v:n};else{var i=Xt(o,function(f,s){var u=r.edge(s),d=r.node(s.v);return{sum:f.sum+u.weight*d.order,weight:f.weight+u.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}})}function qn(r,e){var n={};h(r,function(i,f){var s=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:f};if(!we(i.barycenter))s.barycenter=i.barycenter,s.weight=i.weight}),h(e.edges(),function(i){var f=n[i.v],s=n[i.w];if(!we(f)&&!we(s))s.indegree++,f.out.push(n[i.w])});var o=Qe(n,function(i){return!i.indegree});return Ss(o)}function Ss(r){var e=[];function n(f){return function(s){if(s.merged)return;if(we(s.barycenter)||we(f.barycenter)||s.barycenter>=f.barycenter)Ns(f,s)}}function o(f){return function(s){if(s.in.push(f),--s.indegree===0)r.push(s)}}while(r.length){var i=r.pop();e.push(i),h(i.in.reverse(),n(i)),h(i.out,o(i))}return E(Qe(e,function(f){return!f.merged}),function(f){return Z(f,["vs","i","barycenter","weight"])})}function Ns(r,e){var n=0,o=0;if(r.weight)n+=r.barycenter*r.weight,o+=r.weight;if(e.weight)n+=e.barycenter*e.weight,o+=e.weight;r.vs=e.vs.concat(r.vs),r.barycenter=n/o,r.weight=o,r.i=Math.min(e.i,r.i),e.merged=!0}function Kn(r,e){var n=un(r,function(p){return Object.prototype.hasOwnProperty.call(p,"barycenter")}),o=n.lhs,i=A(n.rhs,function(p){return-p.i}),f=[],s=0,u=0,d=0;o.sort(Ps(!!e)),d=Hn(f,i,d),h(o,function(p){d+=p.vs.length,f.push(p.vs),s+=p.barycenter*p.weight,u+=p.weight,d=Hn(f,i,d)});var c={vs:N(f)};if(u)c.barycenter=s/u,c.weight=u;return c}function Hn(r,e,n){var o;while(e.length&&(o=X(e)).i<=n)e.pop(),r.push(o.vs),n++;return n}function Ps(r){return function(e,n){if(e.barycenter<n.barycenter)return-1;else if(e.barycenter>n.barycenter)return 1;return!r?e.i-n.i:n.i-e.i}}function Kr(r,e,n,o){var i=r.children(e),f=r.node(e),s=f?f.borderLeft:void 0,u=f?f.borderRight:void 0,d={};if(s)i=Qe(i,function(w){return w!==s&&w!==u});var c=Wn(r,i);h(c,function(w){if(r.children(w.v).length){var y=Kr(r,w.v,n,o);if(d[w.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter"))Ts(w,y)}});var p=qn(c,n);ks(p,d);var m=Kn(p,o);if(s){if(m.vs=N([s,m.vs,u]),r.predecessors(s).length){var g=r.node(r.predecessors(s)[0]),b=r.node(r.predecessors(u)[0]);if(!Object.prototype.hasOwnProperty.call(m,"barycenter"))m.barycenter=0,m.weight=0;m.barycenter=(m.barycenter*m.weight+g.order+b.order)/(m.weight+2),m.weight+=2}}return m}function ks(r,e){h(r,function(n){n.vs=N(n.vs.map(function(o){if(e[o])return e[o].vs;return o}))})}function Ts(r,e){if(!we(r.barycenter))r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight;else r.barycenter=e.barycenter,r.weight=e.weight}function $n(r){var e=Gr(r),n=Jn(r,P(1,e+1),"inEdges"),o=Jn(r,P(e-1,-1,-1),"outEdges"),i=zn(r);Zn(r,i);var f=Number.POSITIVE_INFINITY,s;for(var u=0,d=0;d<4;++u,++d){Cs(u%2?n:o,u%4>=2),i=D(r);var c=Vn(r,i);if(c<f)d=0,s=Ze(i),f=c}Zn(r,s)}function Jn(r,e,n){return E(e,function(o){return Un(r,o,n)})}function Cs(r,e){var n=new re;h(r,function(o){var i=o.graph().root,f=Kr(o,i,n,e);h(f.vs,function(s,u){o.node(s).order=u}),Xn(o,n,f.vs)})}function Zn(r,e){h(e,function(n){h(n,function(o,i){r.node(o).order=i})})}function Qn(r){var e=Rs(r);h(r.graph().dummyChains,function(n){var o=r.node(n),i=o.edgeObj,f=As(r,e,i.v,i.w),{path:s,lca:u}=f,d=0,c=s[d],p=!0;while(n!==i.w){if(o=r.node(n),p){while((c=s[d])!==u&&r.node(c).maxRank<o.rank)d++;if(c===u)p=!1}if(!p){while(d<s.length-1&&r.node(c=s[d+1]).minRank<=o.rank)d++;c=s[d]}r.setParent(n,c),n=r.successors(n)[0]}})}function As(r,e,n,o){var i=[],f=[],s=Math.min(e[n].low,e[o].low),u=Math.max(e[n].lim,e[o].lim),d,c;d=n;do d=r.parent(d),i.push(d);while(d&&(e[d].low>s||u>e[d].lim));c=d,d=o;while((d=r.parent(d))!==c)f.push(d);return{path:i.concat(f.reverse()),lca:c}}function Rs(r){var e={},n=0;function o(i){var f=n;h(r.children(i),o),e[i]={low:f,lim:n++}}return h(r.children(),o),e}function Ms(r,e){var n={};function o(i,f){var s=0,u=0,d=i.length,c=X(f);return h(f,function(p,m){var g=Bs(r,p),b=g?r.node(g).order:d;if(g||p===c)h(f.slice(u,m+1),function(w){h(r.predecessors(w),function(y){var v=r.node(y),_=v.order;if((_<s||b<_)&&!(v.dummy&&r.node(w).dummy))ro(n,y,w)})}),u=m+1,s=b}),f}return Xt(e,o),n}function js(r,e){var n={};function o(f,s,u,d,c){var p;h(P(s,u),function(m){if(p=f[m],r.node(p).dummy)h(r.predecessors(p),function(g){var b=r.node(g);if(b.dummy&&(b.order<d||b.order>c))ro(n,g,p)})})}function i(f,s){var u=-1,d,c=0;return h(s,function(p,m){if(r.node(p).dummy==="border"){var g=r.predecessors(p);if(g.length)d=r.node(g[0]).order,o(s,c,m,u,d),c=m,u=d}o(s,c,s.length,d,f.length)}),s}return Xt(e,i),n}function Bs(r,e){if(r.node(e).dummy)return nr(r.predecessors(e),function(n){return r.node(n).dummy})}function ro(r,e,n){if(e>n){var o=e;e=n,n=o}if(!Object.prototype.hasOwnProperty.call(r,e))Object.defineProperty(r,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=r[e];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ds(r,e,n){if(e>n){var o=e;e=n,n=o}return!!r[e]&&Object.prototype.hasOwnProperty.call(r[e],n)}function Fs(r,e,n,o){var i={},f={},s={};return h(e,function(u){h(u,function(d,c){i[d]=d,f[d]=d,s[d]=c})}),h(e,function(u){var d=-1;h(u,function(c){var p=o(c);if(p.length){p=A(p,function(y){return s[y]});var m=(p.length-1)/2;for(var g=Math.floor(m),b=Math.ceil(m);g<=b;++g){var w=p[g];if(f[c]===c&&d<s[w]&&!Ds(n,c,w))f[w]=c,f[c]=i[c]=i[w],d=s[w]}}})}),{root:i,align:f}}function Gs(r,e,n,o,i){var f={},s=Xs(r,e,n,i),u=i?"borderLeft":"borderRight";function d(m,g){var b=s.nodes(),w=b.pop(),y={};while(w){if(y[w])m(w);else y[w]=!0,b.push(w),b=b.concat(g(w));w=b.pop()}}function c(m){f[m]=s.inEdges(m).reduce(function(g,b){return Math.max(g,f[b.v]+s.edge(b))},0)}function p(m){var g=s.outEdges(m).reduce(function(w,y){return Math.min(w,f[y.w]-s.edge(y))},Number.POSITIVE_INFINITY),b=r.node(m);if(g!==Number.POSITIVE_INFINITY&&b.borderType!==u)f[m]=Math.max(f[m],g)}return d(c,s.predecessors.bind(s)),d(p,s.successors.bind(s)),h(o,function(m){f[m]=f[n[m]]}),f}function Xs(r,e,n,o){var i=new re,f=r.graph(),s=zs(f.nodesep,f.edgesep,o);return h(e,function(u){var d;h(u,function(c){var p=n[c];if(i.setNode(p),d){var m=n[d],g=i.edge(m,p);i.setEdge(m,p,Math.max(s(r,c,d),g||0))}d=c})}),i}function Us(r,e){return J(mt(e),function(n){var{NEGATIVE_INFINITY:o,POSITIVE_INFINITY:i}=Number;return ct(n,function(f,s){var u=Ws(r,s)/2;o=Math.max(f+u,o),i=Math.min(f-u,i)}),o-i})}function Vs(r,e){var n=mt(e),o=B(n),i=S(n);h(["u","d"],function(f){h(["l","r"],function(s){var u=f+s,d=r[u],c;if(d===e)return;var p=mt(d);if(c=s==="l"?o-B(p):i-S(p),c)r[u]=q(d,function(m){return m+c})})})}function Ys(r,e){return q(r.ul,function(n,o){if(e)return r[e.toLowerCase()][o];else{var i=A(E(r,o));return(i[1]+i[2])/2}})}function eo(r){var e=D(r),n=or(Ms(r,e),js(r,e)),o={},i;h(["u","d"],function(s){i=s==="u"?e:mt(e).reverse(),h(["l","r"],function(u){if(u==="r")i=E(i,function(m){return mt(m).reverse()});var d=(s==="u"?r.predecessors:r.successors).bind(r),c=Fs(r,i,n,d),p=Gs(r,i,c.root,c.align,u==="r");if(u==="r")p=q(p,function(m){return-m});o[s+u]=p})});var f=Us(r,o);return Vs(o,f),Ys(o,r.graph().align)}function zs(r,e,n){return function(o,i,f){var s=o.node(i),u=o.node(f),d=0,c;if(d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=-s.width/2;break;case"r":c=s.width/2;break}if(c)d+=n?c:-c;if(c=0,d+=(s.dummy?e:r)/2,d+=(u.dummy?e:r)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":c=u.width/2;break;case"r":c=-u.width/2;break}if(c)d+=n?c:-c;return c=0,d}}function Ws(r,e){return r.node(e).width}function to(r){r=Sr(r),qs(r),lt(eo(r),function(e,n){r.node(n).x=e})}function qs(r){var e=D(r),n=r.graph().ranksep,o=0;h(e,function(i){var f=S(E(i,function(s){return r.node(s).height}));h(i,function(s){r.node(s).y=o+f/2}),o+=f+n})}function $r(r,e){var n=e&&e.debugTiming?dn:cn;n("layout",()=>{var o=n(" buildLayoutGraph",()=>ou(r));n(" runLayout",()=>Hs(o,n)),n(" updateInputGraph",()=>Ks(r,o))})}function Hs(r,e){e(" makeSpaceForEdgeLabels",()=>iu(r)),e(" removeSelfEdges",()=>mu(r)),e(" acyclic",()=>rn(r)),e(" nestingGraph.run",()=>Dn(r)),e(" rank",()=>Hr(Sr(r))),e(" injectEdgeLabelProxies",()=>au(r)),e(" removeEmptyRanks",()=>sn(r)),e(" nestingGraph.cleanup",()=>Gn(r)),e(" normalizeRanks",()=>fn(r)),e(" assignRankMinMax",()=>fu(r)),e(" removeEdgeLabelProxies",()=>su(r)),e(" normalize.run",()=>On(r)),e(" parentDummyChains",()=>Qn(r)),e(" addBorderSegments",()=>ln(r)),e(" order",()=>$n(r)),e(" insertSelfEdges",()=>hu(r)),e(" adjustCoordinateSystem",()=>hn(r)),e(" position",()=>to(r)),e(" positionSelfEdges",()=>gu(r)),e(" removeBorderNodes",()=>lu(r)),e(" normalize.undo",()=>Ln(r)),e(" fixupEdgeLabelCoords",()=>cu(r)),e(" undoCoordinateSystem",()=>gn(r)),e(" translateGraph",()=>uu(r)),e(" assignNodeIntersects",()=>du(r)),e(" reversePoints",()=>pu(r)),e(" acyclic.undo",()=>nn(r))}function Ks(r,e){h(r.nodes(),function(n){var o=r.node(n),i=e.node(n);if(o){if(o.x=i.x,o.y=i.y,e.children(n).length)o.width=i.width,o.height=i.height}}),h(r.edges(),function(n){var o=r.edge(n),i=e.edge(n);if(o.points=i.points,Object.prototype.hasOwnProperty.call(i,"x"))o.x=i.x,o.y=i.y}),r.graph().width=e.graph().width,r.graph().height=e.graph().height}var Js=["nodesep","edgesep","ranksep","marginx","marginy"],Zs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$s=["acyclicer","ranker","rankdir","align"],Qs=["width","height"],ru={width:0,height:0},eu=["minlen","weight","width","height","labeloffset"],tu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},nu=["labelpos"];function ou(r){var e=new re({multigraph:!0,compound:!0}),n=Zr(r.graph());return e.setGraph(or({},Zs,Jr(n,Js),Z(n,$s))),h(r.nodes(),function(o){var i=Zr(r.node(o));e.setNode(o,et(Jr(i,Qs),ru)),e.setParent(o,r.parent(o))}),h(r.edges(),function(o){var i=Zr(r.edge(o));e.setEdge(o,or({},tu,Jr(i,eu),Z(i,nu)))}),e}function iu(r){var e=r.graph();e.ranksep/=2,h(r.edges(),function(n){var o=r.edge(n);if(o.minlen*=2,o.labelpos.toLowerCase()!=="c")if(e.rankdir==="TB"||e.rankdir==="BT")o.width+=o.labeloffset;else o.height+=o.labeloffset})}function au(r){h(r.edges(),function(e){var n=r.edge(e);if(n.width&&n.height){var o=r.node(e.v),i=r.node(e.w),f={rank:(i.rank-o.rank)/2+o.rank,e};T(r,"edge-proxy",f,"_ep")}})}function fu(r){var e=0;h(r.nodes(),function(n){var o=r.node(n);if(o.borderTop)o.minRank=r.node(o.borderTop).rank,o.maxRank=r.node(o.borderBottom).rank,e=S(e,o.maxRank)}),r.graph().maxRank=e}function su(r){h(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="edge-proxy")r.edge(n.e).labelRank=n.rank,r.removeNode(e)})}function uu(r){var e=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,f=r.graph(),s=f.marginx||0,u=f.marginy||0;function d(c){var{x:p,y:m,width:g,height:b}=c;e=Math.min(e,p-g/2),n=Math.max(n,p+g/2),o=Math.min(o,m-b/2),i=Math.max(i,m+b/2)}h(r.nodes(),function(c){d(r.node(c))}),h(r.edges(),function(c){var p=r.edge(c);if(Object.prototype.hasOwnProperty.call(p,"x"))d(p)}),e-=s,o-=u,h(r.nodes(),function(c){var p=r.node(c);p.x-=e,p.y-=o}),h(r.edges(),function(c){var p=r.edge(c);if(h(p.points,function(m){m.x-=e,m.y-=o}),Object.prototype.hasOwnProperty.call(p,"x"))p.x-=e;if(Object.prototype.hasOwnProperty.call(p,"y"))p.y-=o}),f.width=n-e+s,f.height=i-o+u}function du(r){h(r.edges(),function(e){var n=r.edge(e),o=r.node(e.v),i=r.node(e.w),f,s;if(!n.points)n.points=[],f=i,s=o;else f=n.points[0],s=n.points[n.points.length-1];n.points.unshift(Dr(o,f)),n.points.push(Dr(i,s))})}function cu(r){h(r.edges(),function(e){var n=r.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x")){if(n.labelpos==="l"||n.labelpos==="r")n.width-=n.labeloffset;switch(n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}}})}function pu(r){h(r.edges(),function(e){var n=r.edge(e);if(n.reversed)n.points.reverse()})}function lu(r){h(r.nodes(),function(e){if(r.children(e).length){var n=r.node(e),o=r.node(n.borderTop),i=r.node(n.borderBottom),f=r.node(X(n.borderLeft)),s=r.node(X(n.borderRight));n.width=Math.abs(s.x-f.x),n.height=Math.abs(i.y-o.y),n.x=f.x+n.width/2,n.y=o.y+n.height/2}}),h(r.nodes(),function(e){if(r.node(e).dummy==="border")r.removeNode(e)})}function mu(r){h(r.edges(),function(e){if(e.v===e.w){var n=r.node(e.v);if(!n.selfEdges)n.selfEdges=[];n.selfEdges.push({e,label:r.edge(e)}),r.removeEdge(e)}})}function hu(r){var e=D(r);h(e,function(n){var o=0;h(n,function(i,f){var s=r.node(i);s.order=f+o,h(s.selfEdges,function(u){T(r,"selfedge",{width:u.label.width,height:u.label.height,rank:s.rank,order:f+ ++o,e:u.e,label:u.label},"_se")}),delete s.selfEdges})})}function gu(r){h(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="selfedge"){var o=r.node(n.e.v),i=o.x+o.width/2,f=o.y,s=n.x-i,u=o.height/2;r.setEdge(n.e,n.label),r.removeNode(e),n.label.points=[{x:i+2*s/3,y:f-u},{x:i+5*s/6,y:f-u},{x:i+s,y:f},{x:i+5*s/6,y:f+u},{x:i+2*s/3,y:f+u}],n.label.x=n.x,n.label.y=n.y}})}function Jr(r,e){return q(Z(r,e),Number)}function Zr(r){var e={};return h(r,function(n,o){e[o.toLowerCase()]=n}),e}var no=t((r,e,n)=>Math.max(e,Math.min(n,r)),"clamp"),fo=t((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),vu=t((r)=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram"||r==="er"||r==="classDiagram","shouldMergeSelfLoopSegments"),bu=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],yu=t((r,e,n,o,i)=>{let f=[],s=new Set;if(n.forEach(({start:p,end:m})=>{if(p!==o)s.add(p);if(m!==o)s.add(m)}),s.forEach((p)=>{let m=r.node(p);if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)}),f.length===0)n.forEach(({edge:p})=>{(p.points??[]).forEach((m)=>{if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)})});if(f.length===0)return fo(i);let u=f.reduce((p,m)=>({x:p.x+m.x/f.length,y:p.y+m.y/f.length}),{x:0,y:0}),d=u.x-e.x,c=u.y-e.y;if(Math.abs(d)>Math.abs(c))return d>0?"right":"left";if(Math.abs(c)>0)return c>0?"bottom":"top";return fo(i)},"getSelfLoopSide"),wu=t((r,e="top",n=0,o=0)=>{let i=r.x,f=r.y-n,s=r.width/2,u=r.height/2,d=Math.max(36,Math.min(100,r.width*0.8)),c=no(Math.max(o,r.width*0.35),36,d),p=no(Math.min(r.width,r.height)*0.45,24,48);switch(e){case"bottom":{let m=f+u;return[{x:i-c/2,y:m},{x:i-c/2,y:m+p},{x:i+c/2,y:m+p},{x:i+c/2,y:m}]}case"right":{let m=i+s;return[{x:m,y:f-c/2},{x:m+p,y:f-c/2},{x:m+p,y:f+c/2},{x:m,y:f+c/2}]}case"left":{let m=i-s;return[{x:m,y:f-c/2},{x:m-p,y:f-c/2},{x:m-p,y:f+c/2},{x:m,y:f+c/2}]}case"top":default:{let m=f-u;return[{x:i-c/2,y:m},{x:i-c/2,y:m-p},{x:i+c/2,y:m-p},{x:i+c/2,y:m}]}}},"getSelfLoopPoints"),_u=t((r,e,n="top",o=0,i={})=>{let s=r.x,u=r.y-o,d=i.width??0,c=i.height??0;switch(n){case"bottom":return{x:s,y:Math.max(...e.map((p)=>p.y))+c/2+4};case"right":return{x:Math.max(...e.map((p)=>p.x))+d/2+4,y:u};case"left":return{x:Math.min(...e.map((p)=>p.x))-d/2-4,y:u};case"top":default:return{x:s,y:Math.min(...e.map((p)=>p.y))-c/2-4}}},"getSelfLoopLabelPosition"),ao=t((r,e=0,{mergeSelfLoops:n=!0}={})=>{let o=new Map,i=[],f=r.graph()?.rankdir;return r.edges().forEach((s)=>{let u=r.edge(s);if(n&&u.selfLoop){let d=u.selfLoop.id;if(!o.has(d))o.set(d,[]);o.get(d).push({edge:u,start:s.v,end:s.w})}else i.push({edge:u,start:s.v,end:s.w})}),o.forEach((s)=>{if(s.length!==3){s.forEach((_)=>i.push(_));return}s.sort((_,R)=>_.edge.selfLoop.order-R.edge.selfLoop.order);let[u,d,c]=s,p=u.edge.originalEdge??d.edge.originalEdge??c.edge.originalEdge??d.edge,m=r.node(p.start);if(!m){s.forEach((_)=>i.push(_));return}let g={width:d.edge.width,height:d.edge.height},b=yu(r,m,s,p.start,f),w=wu(m,b,e,g.width??0),y=_u(m,w,b,e,g),v={...d.edge,...p,id:p.id,points:w,start:p.start,end:p.end,x:y.x,y:y.y,width:g.width,height:g.height,labelStyle:d.edge.labelStyle,fromCluster:u.edge.fromCluster??d.edge.fromCluster??c.edge.fromCluster,toCluster:u.edge.toCluster??d.edge.toCluster??c.edge.toCluster};delete v.selfLoop,delete v.originalEdge,i.push({edge:v,start:v.start,end:v.end})}),i},"getEdgesToRender"),co=t(async({element:r,graph:e,diagramType:n,id:o,parentCluster:i,siteConfig:f})=>{let s=e.graph().rankdir;a.trace("Dir in recursive render - dir:",s);let{clusters:u,edgePaths:d,edgeLabels:c,nodes:p,rootGroups:m}=pa(r,{edgePathsClass:"edgePaths"});if(!e.nodes())a.info("No nodes found for",e);else a.info("Recursive render XXX",e.nodes());if(e.edges().length>0)a.info("Recursive edges",e.edge(e.edges()[0]));let g=vu(n);await Promise.all(e.nodes().map(async function(y){let v=e.node(y);if(i!==void 0){let _=JSON.parse(JSON.stringify(i.clusterData));if(a.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,y,`
|
|
3
3
|
data=`,_.height,`
|
|
4
|
-
Parent cluster`,i.height),e.setNode(i.id,_),!e.parent(y))a.trace("Setting parent",y,i.id),e.setParent(y,i.id,_)}if(a.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),v?.clusterNode){a.info("Cluster identified XBX",y,v.width,e.node(y));let{ranksep:_,nodesep:R}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:_+25,nodesep:R});let Qr=await Lu({element:p,graph:v.graph,diagramType:n,id:o,parentCluster:e.node(y),siteConfig:f}),ee=Qr.elem;I(v,ee),v.diff=Qr.diff||0,a.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),ko(ee,v)}else if(e.children(y).length>0)a.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",e),a.trace(Bn(v.id,e)),W.set(v.id,{id:Bn(v.id,e),node:v});else a.trace("Node - the non recursive path XAX",y,p,e.node(y),s),await ma(p,e.node(y),{config:f,dir:s})})),await t(async()=>{let y=e.edges().map(async function(v){let _=e.edge(v.v,v.w,v.name);if(a.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),a.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),a.info("Fix",W,"ids:",v.v,v.w,"Translating: ",W.get(v.v),W.get(v.w)),g&&_.selfLoop){if(_.selfLoop.order!==1)return;let R={..._.originalEdge,..._,id:_.selfLoop.id,startLabelLeft:_.originalEdge?.startLabelLeft??_.startLabelLeft,startLabelRight:_.originalEdge?.startLabelRight??_.startLabelRight,endLabelLeft:_.originalEdge?.endLabelLeft??_.endLabelLeft,endLabelRight:_.originalEdge?.endLabelRight??_.endLabelRight};await At(c,R),_.width=R.width,_.height=R.height,_.labelStyle=R.labelStyle;return}await At(c,_)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:w}=Tt(f);return{elem:m,graph:e,groups:{clusters:u,edgePaths:d,edgeLabels:c,nodes:p,rootGroups:m},diagramType:n,id:o,mergeSelfLoops:g,subGraphTitleTotalMargin:w}},"measureDagreGraph"),po=t((r)=>{a.info("############################################# XXX"),a.info("### Layout ### XXX"),a.info("############################################# XXX"),$r(r)},"runDagreGraphLayout"),Eu=t((r,e,n)=>{let o=r.node(e);if(!o)return;let i={...o};if(o?.clusterNode)i.y=(o.y??0)+n;else if(r.children(e).length>0)i.height=(o.height??0)+n;else i.y=(o.y??0)+n/2;return i},"normalizeDagreNode"),uo=t((r,e)=>{bu.forEach((n)=>{if(e[n]!==void 0)r[n]=e[n]})},"applyDagreNodeLayout"),xu=t((r,e,n,o)=>({...r,start:r.start??e,end:r.end??n,points:(r.points??[]).map((i)=>({...i,y:typeof i.y==="number"?i.y+o:i.y}))}),"normalizeDagreEdge"),Do=t((r,e)=>{let{graph:n,mergeSelfLoops:o,subGraphTitleTotalMargin:i=0}=e,f=new Map(r.nodes.map((u)=>[u.id,u]));fa(n).forEach((u)=>{let d=Eu(n,u,i);if(!d)return;uo(n.node(u),d);let c=f.get(u);if(c)uo(c,d)});let s=i/2;return r.edges=ao(n,s,{mergeSelfLoops:o}).map(({edge:u,start:d,end:c})=>xu(u,d,c,s)),r},"applyDagreLayoutResult"),Ou=t(async({elem:r,graph:e,groups:{clusters:n,edgePaths:o},diagramType:i,id:f,mergeSelfLoops:s,subGraphTitleTotalMargin:u})=>{let d=0;await Promise.all(fa(e).map(async function(m){let g=e.node(m);if(a.info("Position XBX => "+m+": ("+g.x,","+g.y,") width: ",g.width," height: ",g.height),g?.clusterNode)g.y+=u,a.info("A tainted cluster node XBX1",m,g.id,g.width,g.height,g.x,g.y,e.parent(m)),W.get(g.id).node=g,
|
|
4
|
+
Parent cluster`,i.height),e.setNode(i.id,_),!e.parent(y))a.trace("Setting parent",y,i.id),e.setParent(y,i.id,_)}if(a.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),v?.clusterNode){a.info("Cluster identified XBX",y,v.width,e.node(y));let{ranksep:_,nodesep:R}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:_+25,nodesep:R});let Qr=await Lu({element:p,graph:v.graph,diagramType:n,id:o,parentCluster:e.node(y),siteConfig:f}),ee=Qr.elem;I(v,ee),v.diff=Qr.diff||0,a.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),ko(ee,v)}else if(e.children(y).length>0)a.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",e),a.trace(Bn(v.id,e)),W.set(v.id,{id:Bn(v.id,e),node:v});else a.trace("Node - the non recursive path XAX",y,p,e.node(y),s),await ma(p,e.node(y),{config:f,dir:s})})),await t(async()=>{let y=e.edges().map(async function(v){let _=e.edge(v.v,v.w,v.name);if(a.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),a.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),a.info("Fix",W,"ids:",v.v,v.w,"Translating: ",W.get(v.v),W.get(v.w)),g&&_.selfLoop){if(_.selfLoop.order!==1)return;let R={..._.originalEdge,..._,id:_.selfLoop.id,startLabelLeft:_.originalEdge?.startLabelLeft??_.startLabelLeft,startLabelRight:_.originalEdge?.startLabelRight??_.startLabelRight,endLabelLeft:_.originalEdge?.endLabelLeft??_.endLabelLeft,endLabelRight:_.originalEdge?.endLabelRight??_.endLabelRight};await At(c,R),_.width=R.width,_.height=R.height,_.labelStyle=R.labelStyle;return}await At(c,_)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:w}=Tt(f);return{elem:m,graph:e,groups:{clusters:u,edgePaths:d,edgeLabels:c,nodes:p,rootGroups:m},diagramType:n,id:o,mergeSelfLoops:g,subGraphTitleTotalMargin:w}},"measureDagreGraph"),po=t((r)=>{a.info("############################################# XXX"),a.info("### Layout ### XXX"),a.info("############################################# XXX"),$r(r)},"runDagreGraphLayout"),Eu=t((r,e,n)=>{let o=r.node(e);if(!o)return;let i={...o};if(o?.clusterNode)i.y=(o.y??0)+n;else if(r.children(e).length>0)i.height=(o.height??0)+n;else i.y=(o.y??0)+n/2;return i},"normalizeDagreNode"),uo=t((r,e)=>{bu.forEach((n)=>{if(e[n]!==void 0)r[n]=e[n]})},"applyDagreNodeLayout"),xu=t((r,e,n,o)=>({...r,start:r.start??e,end:r.end??n,points:(r.points??[]).map((i)=>({...i,y:typeof i.y==="number"?i.y+o:i.y}))}),"normalizeDagreEdge"),Do=t((r,e)=>{let{graph:n,mergeSelfLoops:o,subGraphTitleTotalMargin:i=0}=e,f=new Map(r.nodes.map((u)=>[u.id,u]));fa(n).forEach((u)=>{let d=Eu(n,u,i);if(!d)return;uo(n.node(u),d);let c=f.get(u);if(c)uo(c,d)});let s=i/2;return r.edges=ao(n,s,{mergeSelfLoops:o}).map(({edge:u,start:d,end:c})=>xu(u,d,c,s)),r},"applyDagreLayoutResult"),Ou=t(async({elem:r,graph:e,groups:{clusters:n,edgePaths:o},diagramType:i,id:f,mergeSelfLoops:s,subGraphTitleTotalMargin:u})=>{let d=0;await Promise.all(fa(e).map(async function(m){let g=e.node(m);if(a.info("Position XBX => "+m+": ("+g.x,","+g.y,") width: ",g.width," height: ",g.height),g?.clusterNode)g.y+=u,a.info("A tainted cluster node XBX1",m,g.id,g.width,g.height,g.x,g.y,e.parent(m)),W.get(g.id).node=g,vt(g);else if(e.children(m).length>0){a.info("A pure cluster node XBX1",m,g.id,g.x,g.y,g.width,g.height,e.parent(m)),g.height+=u,e.node(g.parentId);let b=g?.padding/2||0,w=g?.labelBBox?.height||0,y=w-b||0;a.debug("OffsetY",y,"labelHeight",w,"halfPadding",b),await en(n,g),W.get(g.id).node=g}else{let b=e.node(g.parentId);g.y+=u/2,a.info("A regular node XBX1 - using the padding",g.id,"parent",g.parentId,g.width,g.height,g.x,g.y,"offsetY",g.offsetY,"parent",b,b?.offsetY,g),vt(g)}}));let c=u/2;return ao(e,c,{mergeSelfLoops:s}).forEach(function({edge:m,start:g,end:b}){a.info("Edge "+g+" -> "+b+": "+JSON.stringify(m),m),m.points.forEach((_)=>_.y+=c);let w=e.node(g),y=e.node(b),v=tn(o,m,W,i,w,y,f);Yn(m,v)}),e.nodes().forEach(function(m){let g=e.node(m);if(a.info(m,g.type,g.diff),g.isGroup)d=g.diff}),a.warn("Returning from recursive render XAX",r,d),{elem:r,diff:d}},"paintDagreLayoutCore"),Lu=t(async(r)=>{let e=await co(r);return po(e.graph),await Ou(e)},"renderDagreSubgraph"),io=t((r)=>{let e=new re({multigraph:!0,compound:!0}).setGraph({rankdir:r.direction,nodesep:r.config?.nodeSpacing||r.nodeSpacing||r.config?.flowchart?.nodeSpacing,ranksep:r.config?.rankSpacing||r.rankSpacing||r.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return r.nodes.forEach((n)=>{if(e.setNode(n.id,{...n}),n.parentId)e.setParent(n.id,n.parentId)}),a.debug("Edges:",r.edges),r.edges.forEach((n)=>{if(n.start===n.end){let o=n.start,i=o+"---"+o+"---1",f=o+"---"+o+"---2",s=e.node(o);e.setNode(i,{domId:i,id:i,parentId:s.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(i,s.parentId),e.setNode(f,{domId:f,id:f,parentId:s.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(f,s.parentId);let u=structuredClone(n),d=structuredClone(n),c=structuredClone(n),p=structuredClone(n);if(d.originalEdge=u,d.selfLoop={id:u.id,order:0},c.originalEdge=u,c.selfLoop={id:u.id,order:1},p.originalEdge=u,p.selfLoop={id:u.id,order:2},d.label="",d.arrowTypeEnd="none",d.endLabelLeft="",d.endLabelRight="",d.startLabelLeft="",d.id=o+"-cyclic-special-1",c.startLabelRight="",c.startLabelLeft="",c.endLabelLeft="",c.endLabelRight="",c.arrowTypeStart="none",c.arrowTypeEnd="none",c.id=o+"-cyclic-special-mid",p.label="",p.startLabelRight="",p.startLabelLeft="",p.arrowTypeStart="none",s.isGroup)d.fromCluster=o,p.toCluster=o;p.id=o+"-cyclic-special-2",p.arrowTypeStart="none",e.setEdge(o,i,d,o+"-cyclic-special-0"),e.setEdge(i,f,c,o+"-cyclic-special-1"),e.setEdge(f,o,p,o+"-cyclic-special-2")}else e.setEdge(n.start,n.end,{...n},n.id)}),so(e),{graph:e}},"prepareLayoutForDagre"),No=t(async(r,{element:e,preparedLayout:n})=>{let o=n??io(r),i=l(),f=await co({element:e,graph:o.graph,diagramType:r.type,id:r.diagramId,parentCluster:void 0,siteConfig:i});return o.measuredLayout=f,f},"measureDagreLayout"),Mo=t((r,e)=>{let n=e.preparedLayout?.measuredLayout;if(!n)throw Error("runDagreLayoutCore requires measureDagreLayout to run first");return po(n.graph),Do(r,n),n},"runDagreLayoutCore"),Iu=t((r,{measure:e})=>fa(e.graph).map((n)=>e.graph.node(n)).filter(Boolean),"getDagrePaintNodes"),Su=t((r,e,{measure:n})=>r?n.graph.node(r):void 0,"getDagreEdgeNode"),oo=lr({prepareLayout:io,measureLayout:No,runLayoutCore:Mo,paintOptions:{clusterDb:W,getNodes:Iu,getEdgeNode:Su,skipNode:t((r,{measure:e})=>!e.graph.hasNode(r.id),"skipNode"),isCluster:t((r,{measure:e})=>e.graph.hasNode(r.id)&&(e.graph.children(r.id)??[]).length>0,"isCluster")}});export{ao,Do,io,No,Mo,oo};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ei}from"./chunk-qy1zx2yw.js";export{Ei as createCynefinServices};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Lt,_}from"./chunk-nvt9tkt4.js";var un={};Lt(un,{AbnfAlternation:()=>Eo,AbnfConcatenation:()=>Co,AbnfElement:()=>hi,AbnfGroup:()=>bo,AbnfNumVal:()=>_o,AbnfOptionalGroup:()=>So,AbnfPrimary:()=>hr,AbnfRule:()=>yi,AbnfRuleName:()=>wo,AbnfStringLiteral:()=>Po,AbstractMermaidTokenBuilder:()=>ce,AbstractMermaidValueConverter:()=>Ie,Architecture:()=>ot,ArchitectureGrammarGeneratedModule:()=>Ml,Branch:()=>Zn,Commit:()=>Tr,CommonTokenBuilder:()=>kR,CommonValueConverter:()=>Je,Cynefin:()=>Yt,CynefinGrammarGeneratedModule:()=>Dl,DomainBlock:()=>Qn,DomainItem:()=>Hi,EbnfChoice:()=>ko,EbnfExceptionPostfix:()=>Io,EbnfGroup:()=>No,EbnfNonTerminal:()=>Oo,EbnfOneOrMorePostfix:()=>Mo,EbnfOptional:()=>Do,EbnfOptionalPostfix:()=>Lo,EbnfPostfix:()=>tn,EbnfPrimary:()=>Kt,EbnfRepetition:()=>xo,EbnfRule:()=>gi,EbnfSequence:()=>Go,EbnfSpecial:()=>Fo,EbnfTerm:()=>vi,EbnfTerminal:()=>jo,EbnfZeroOrMorePostfix:()=>zo,EmDataEntity:()=>yr,EmFrame:()=>Wt,EmptyFileSystem:()=>le,EventModel:()=>ht,EventModelingGeneratedModule:()=>Ll,GitGraph:()=>Xt,GitGraphGrammarGeneratedModule:()=>xl,Info:()=>sn,InfoGrammarGeneratedModule:()=>Gl,Merge:()=>$r,MermaidGeneratedSharedModule:()=>ue,Packet:()=>Rr,PacketBlock:()=>Ar,PacketGrammarGeneratedModule:()=>Fl,PegAny:()=>Bo,PegGroup:()=>Uo,PegIdentifier:()=>Vo,PegLiteral:()=>Ko,PegOrderedChoice:()=>Wo,PegPrefix:()=>$i,PegPrimary:()=>rn,PegRule:()=>bi,PegSequence:()=>qo,PegSuffix:()=>_i,Pie:()=>Jt,PieGrammarGeneratedModule:()=>jl,PieSection:()=>ea,Radar:()=>qt,RadarGrammarGeneratedModule:()=>zl,Railroad:()=>Er,RailroadAbnf:()=>Cr,RailroadAbnfGrammarGeneratedModule:()=>Bl,RailroadChoiceExpr:()=>Ho,RailroadEbnf:()=>br,RailroadEbnfGrammarGeneratedModule:()=>Ul,RailroadExpression:()=>yt,RailroadGrammarGeneratedModule:()=>Vl,RailroadNonTerminalExpr:()=>Yo,RailroadOneOrMoreExpr:()=>Xo,RailroadOptionalExpr:()=>Jo,RailroadPeg:()=>_r,RailroadPegGrammarGeneratedModule:()=>Kl,RailroadRule:()=>wi,RailroadSequenceExpr:()=>Zo,RailroadSpecialExpr:()=>Qo,RailroadTerminalExpr:()=>el,RailroadZeroOrMoreExpr:()=>tl,Statement:()=>gr,Transition:()=>on,TreeNode:()=>vr,TreeView:()=>nn,TreeViewGrammarGeneratedModule:()=>ql,Treemap:()=>Sr,TreemapGrammarGeneratedModule:()=>Wl,Wardley:()=>Oe,WardleyGrammarGeneratedModule:()=>Hl,__name:()=>i,createDefaultCoreModule:()=>ae,createDefaultSharedCoreModule:()=>ie,inject:()=>W,isArchitecture:()=>Vp,isBranch:()=>Kp,isCommit:()=>Wp,isCynefin:()=>qp,isDomainBlock:()=>Hp,isDomainItem:()=>Yp,isEmModelEntityType:()=>Xp,isEmResetFrame:()=>Fr,isGitGraph:()=>Jp,isInfo:()=>Zp,isMerge:()=>Qp,isPacket:()=>ed,isPacketBlock:()=>td,isPie:()=>rd,isPieSection:()=>nd,isRailroad:()=>ad,isRailroadAbnf:()=>id,isRailroadEbnf:()=>sd,isRailroadPeg:()=>od,isTransition:()=>ld,isTreemap:()=>ud,isWardley:()=>cd});var{create:rA,defineProperty:Yi,getOwnPropertyDescriptor:nA,getOwnPropertyNames:Sf,getPrototypeOf:aA}=Object,iA=Object.prototype.hasOwnProperty,i=(e,t)=>Yi(e,"name",{value:t,configurable:!0}),sA=(e,t)=>function(){return e&&(t=(0,e[Sf(e)[0]])(e=0)),t},Z=(e,t)=>function(){return t||(0,e[Sf(e)[0]])((t={exports:{}}).exports,t),t.exports},oA=(e,t)=>{for(var r in t)Yi(e,r,{get:t[r],enumerable:!0})},Nm=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let a of Sf(t))if(!iA.call(e,a)&&a!==r)Yi(e,a,{get:()=>t[a],enumerable:!(n=nA(t,a))||n.enumerable})}return e},wf=(e,t,r)=>(r=e!=null?rA(aA(e)):{},Nm(t||!e||!e.__esModule?Yi(r,"default",{value:e,enumerable:!0}):r,e)),Pf=(e)=>Nm(Yi({},"__esModule",{value:!0}),e),Xi=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.boolean=t,e.string=r,e.number=n,e.error=a,e.func=s,e.array=o,e.stringArray=l;function t(u){return u===!0||u===!1}i(t,"boolean");function r(u){return typeof u==="string"||u instanceof String}i(r,"string");function n(u){return typeof u==="number"||u instanceof Number}i(n,"number");function a(u){return u instanceof Error}i(a,"error");function s(u){return typeof u==="function"}i(s,"func");function o(u){return Array.isArray(u)}i(o,"array");function l(u){return o(u)&&u.every((c)=>r(c))}i(l,"stringArray")}}),Om=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){var t=e&&e.__createBinding||(Object.create?function(A,g,C,O){if(O===void 0)O=C;var w=Object.getOwnPropertyDescriptor(g,C);if(!w||("get"in w?!g.__esModule:w.writable||w.configurable))w={enumerable:!0,get:i(function(){return g[C]},"get")};Object.defineProperty(A,O,w)}:function(A,g,C,O){if(O===void 0)O=C;A[O]=g[C]}),r=e&&e.__setModuleDefault||(Object.create?function(A,g){Object.defineProperty(A,"default",{enumerable:!0,value:g})}:function(A,g){A.default=g}),n=e&&e.__importStar||function(){var A=i(function(g){return A=Object.getOwnPropertyNames||function(C){var O=[];for(var w in C)if(Object.prototype.hasOwnProperty.call(C,w))O[O.length]=w;return O},A(g)},"ownKeys");return function(g){if(g&&g.__esModule)return g;var C={};if(g!=null){for(var O=A(g),w=0;w<O.length;w++)if(O[w]!=="default")t(C,g,O[w])}return r(C,g),C}}();Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var a=n(Xi()),s;(function(A){A.ParseError=-32700,A.InvalidRequest=-32600,A.MethodNotFound=-32601,A.InvalidParams=-32602,A.InternalError=-32603,A.jsonrpcReservedErrorRangeStart=-32099,A.serverErrorStart=-32099,A.MessageWriteError=-32099,A.MessageReadError=-32098,A.PendingResponseRejected=-32097,A.ConnectionInactive=-32096,A.ServerNotInitialized=-32002,A.UnknownErrorCode=-32001,A.jsonrpcReservedErrorRangeEnd=-32000,A.serverErrorEnd=-32000})(s||(e.ErrorCodes=s={}));var o=class A extends Error{static{i(this,"ResponseError")}code;data;constructor(g,C,O){super(C);this.code=a.number(g)?g:s.UnknownErrorCode,this.data=O,Object.setPrototypeOf(this,A.prototype)}toJson(){let g={code:this.code,message:this.message};if(this.data!==void 0)g.data=this.data;return g}};e.ResponseError=o;var l=class A{static{i(this,"ParameterStructures")}kind;static auto=new A("auto");static byPosition=new A("byPosition");static byName=new A("byName");constructor(g){this.kind=g}static is(g){return g===A.auto||g===A.byName||g===A.byPosition}toString(){return this.kind}};e.ParameterStructures=l;var u=class{static{i(this,"AbstractMessageSignature")}method;numberOfParams;constructor(A,g){this.method=A,this.numberOfParams=g}get parameterStructures(){return l.auto}};e.AbstractMessageSignature=u;var c=class extends u{static{i(this,"RequestType0")}_;constructor(A){super(A,0)}};e.RequestType0=c;var p=class extends u{static{i(this,"RequestType")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.RequestType=p;var h=class extends u{static{i(this,"RequestType1")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.RequestType1=h;var y=class extends u{static{i(this,"RequestType2")}_;constructor(A){super(A,2)}};e.RequestType2=y;var d=class extends u{static{i(this,"RequestType3")}_;constructor(A){super(A,3)}};e.RequestType3=d;var E=class extends u{static{i(this,"RequestType4")}_;constructor(A){super(A,4)}};e.RequestType4=E;var T=class extends u{static{i(this,"RequestType5")}_;constructor(A){super(A,5)}};e.RequestType5=T;var v=class extends u{static{i(this,"RequestType6")}_;constructor(A){super(A,6)}};e.RequestType6=v;var R=class extends u{static{i(this,"RequestType7")}_;constructor(A){super(A,7)}};e.RequestType7=R;var P=class extends u{static{i(this,"RequestType8")}_;constructor(A){super(A,8)}};e.RequestType8=P;var S=class extends u{static{i(this,"RequestType9")}_;constructor(A){super(A,9)}};e.RequestType9=S;var D=class extends u{static{i(this,"NotificationType")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.NotificationType=D;var x=class extends u{static{i(this,"NotificationType0")}_;constructor(A){super(A,0)}};e.NotificationType0=x;var F=class extends u{static{i(this,"NotificationType1")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=F;var V=class extends u{static{i(this,"NotificationType2")}_;constructor(A){super(A,2)}};e.NotificationType2=V;var te=class extends u{static{i(this,"NotificationType3")}_;constructor(A){super(A,3)}};e.NotificationType3=te;var fe=class extends u{static{i(this,"NotificationType4")}_;constructor(A){super(A,4)}};e.NotificationType4=fe;var Q=class extends u{static{i(this,"NotificationType5")}_;constructor(A){super(A,5)}};e.NotificationType5=Q;var k=class extends u{static{i(this,"NotificationType6")}_;constructor(A){super(A,6)}};e.NotificationType6=k;var L=class extends u{static{i(this,"NotificationType7")}_;constructor(A){super(A,7)}};e.NotificationType7=L;var j=class extends u{static{i(this,"NotificationType8")}_;constructor(A){super(A,8)}};e.NotificationType8=j;var z=class extends u{static{i(this,"NotificationType9")}_;constructor(A){super(A,9)}};e.NotificationType9=z;var N;(function(A){function g(w){let M=w;return M&&a.string(M.method)&&(a.string(M.id)||a.number(M.id))}i(g,"isRequest"),A.isRequest=g;function C(w){let M=w;return M&&a.string(M.method)&&w.id===void 0}i(C,"isNotification"),A.isNotification=C;function O(w){let M=w;return M&&(M.result!==void 0||!!M.error)&&(a.string(M.id)||a.number(M.id)||M.id===null)}i(O,"isResponse"),A.isResponse=O})(N||(e.Message=N={}))}}),Mm=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var t;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(t||(e.Touch=t={}));var r=class{static{i(this,"LinkedMap")}[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(a){let s=this._map.get(a);return s?s.previous?.value:void 0}after(a){let s=this._map.get(a);return s?s.next?.value:void 0}has(a){return this._map.has(a)}get(a,s=t.None){let o=this._map.get(a);if(!o)return;if(s!==t.None)this.touch(o,s);return o.value}set(a,s,o=t.None){let l=this._map.get(a);if(l){if(l.value=s,o!==t.None)this.touch(l,o)}else{switch(l={key:a,value:s,next:void 0,previous:void 0},o){case t.None:this.addItemLast(l);break;case t.First:this.addItemFirst(l);break;case t.Last:this.addItemLast(l);break;default:this.addItemLast(l);break}this._map.set(a,l),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){let s=this._map.get(a);if(!s)return;return this._map.delete(a),this.removeItem(s),this._size--,s.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,s){let o=this._state,l=this._head;while(l){if(s)a.bind(s)(l.value,l.key,this);else a(l.value,l.key,this);if(this._state!==o)throw Error("LinkedMap got modified during iteration.");l=l.next}}keys(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:s.key,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}values(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:s.value,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}entries(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:[s.key,s.value],done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}[Symbol.iterator](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let s=this._head,o=this.size;while(s&&o>a)this._map.delete(s.key),s=s.next,o--;if(this._head=s,this._size=o,s)s.previous=void 0;this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(!this._head)throw Error("Invalid list");else a.next=this._head,this._head.previous=a;this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(!this._tail)throw Error("Invalid list");else a.previous=this._tail,this._tail.next=a;this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{let{next:s,previous:o}=a;if(!s||!o)throw Error("Invalid list");s.previous=o,o.next=s}a.next=void 0,a.previous=void 0,this._state++}touch(a,s){if(!this._head||!this._tail)throw Error("Invalid list");if(s!==t.First&&s!==t.Last)return;if(s===t.First){if(a===this._head)return;let{next:o,previous:l}=a;if(a===this._tail)l.next=void 0,this._tail=l;else o.previous=l,l.next=o;a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(s===t.Last){if(a===this._tail)return;let{next:o,previous:l}=a;if(a===this._head)o.previous=void 0,this._head=o;else o.previous=l,l.next=o;a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}toJSON(){let a=[];return this.forEach((s,o)=>{a.push([o,s])}),a}fromJSON(a){this.clear();for(let[s,o]of a)this.set(s,o)}};e.LinkedMap=r;var n=class extends r{static{i(this,"LRUCache")}_limit;_ratio;constructor(a,s=1){super();this._limit=a,this._ratio=Math.min(Math.max(0,s),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get ratio(){return this._ratio}set ratio(a){this._ratio=Math.min(Math.max(0,a),1),this.checkTrim()}get(a,s=t.AsNew){return super.get(a,s)}peek(a){return super.get(a,t.None)}set(a,s){return super.set(a,s,t.Last),this.checkTrim(),this}checkTrim(){if(this.size>this._limit)this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=n}}),lA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(a){return{dispose:a}}i(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),pn=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw Error("No runtime abstraction layer installed");return t}i(r,"RAL"),function(n){function a(s){if(s===void 0)throw Error("No runtime abstraction layer provided");t=s}i(a,"install"),n.install=a}(r||(r={})),e.default=r}}),Ji=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/events.js"(e){var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var r=t(pn()),n;(function(o){let l={dispose(){}};o.None=function(){return l}})(n||(e.Event=n={}));var a=class{static{i(this,"CallbackList")}_callbacks;_contexts;add(o,l=null,u){if(!this._callbacks)this._callbacks=[],this._contexts=[];if(this._callbacks.push(o),this._contexts.push(l),Array.isArray(u))u.push({dispose:i(()=>this.remove(o,l),"dispose")})}remove(o,l=null){if(!this._callbacks)return;let u=!1;for(let c=0,p=this._callbacks.length;c<p;c++)if(this._callbacks[c]===o)if(this._contexts[c]===l){this._callbacks.splice(c,1),this._contexts.splice(c,1);return}else u=!0;if(u)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...o){if(!this._callbacks)return[];let l=[],u=this._callbacks.slice(0),c=this._contexts.slice(0);for(let p=0,h=u.length;p<h;p++)try{l.push(u[p].apply(c[p],o))}catch(y){(0,r.default)().console.error(y)}return l}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},s=class o{static{i(this,"Emitter")}_options;static _noop=i(function(){},"_noop");_event;_callbacks;constructor(l){this._options=l}get event(){if(!this._event)this._event=(l,u,c)=>{if(!this._callbacks)this._callbacks=new a;if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty())this._options.onFirstListenerAdd(this);this._callbacks.add(l,u);let p={dispose:i(()=>{if(!this._callbacks)return;if(this._callbacks.remove(l,u),p.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty())this._options.onLastListenerRemove(this)},"dispose")};if(Array.isArray(c))c.push(p);return p};return this._event}fire(l){if(this._callbacks)this._callbacks.invoke.call(this._callbacks,l)}dispose(){if(this._callbacks)this._callbacks.dispose(),this._callbacks=void 0}};e.Emitter=s}}),kf=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){var t=e&&e.__createBinding||(Object.create?function(y,d,E,T){if(T===void 0)T=E;var v=Object.getOwnPropertyDescriptor(d,E);if(!v||("get"in v?!d.__esModule:v.writable||v.configurable))v={enumerable:!0,get:i(function(){return d[E]},"get")};Object.defineProperty(y,T,v)}:function(y,d,E,T){if(T===void 0)T=E;y[T]=d[E]}),r=e&&e.__setModuleDefault||(Object.create?function(y,d){Object.defineProperty(y,"default",{enumerable:!0,value:d})}:function(y,d){y.default=d}),n=e&&e.__importStar||function(){var y=i(function(d){return y=Object.getOwnPropertyNames||function(E){var T=[];for(var v in E)if(Object.prototype.hasOwnProperty.call(E,v))T[T.length]=v;return T},y(d)},"ownKeys");return function(d){if(d&&d.__esModule)return d;var E={};if(d!=null){for(var T=y(d),v=0;v<T.length;v++)if(T[v]!=="default")t(E,d,T[v])}return r(E,d),E}}(),a=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var s=a(pn()),o=n(Xi()),l=Ji(),u;(function(y){y.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:l.Event.None}),y.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:l.Event.None});function d(E){let T=E;return T&&(T===y.None||T===y.Cancelled||o.boolean(T.isCancellationRequested)&&!!T.onCancellationRequested)}i(d,"is"),y.is=d})(u||(e.CancellationToken=u={}));var c=Object.freeze(function(y,d){let E=(0,s.default)().timer.setTimeout(y.bind(d),0);return{dispose(){E.dispose()}}}),p=class{static{i(this,"MutableToken")}_isCancelled=!1;_emitter;cancel(){if(!this._isCancelled){if(this._isCancelled=!0,this._emitter)this._emitter.fire(void 0),this.dispose()}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled)return c;if(!this._emitter)this._emitter=new l.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}},h=class{static{i(this,"CancellationTokenSource")}_token;get token(){if(!this._token)this._token=new p;return this._token}cancel(){if(!this._token)this._token=u.Cancelled;else this._token.cancel()}dispose(){if(!this._token)this._token=u.None;else if(this._token instanceof p)this._token.dispose()}};e.CancellationTokenSource=h}}),uA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=kf(),r;(function(l){l.Continue=0,l.Cancelled=1})(r||(r={}));var n=class{static{i(this,"SharedArraySenderStrategy")}buffers;constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;let u=new SharedArrayBuffer(4),c=new Int32Array(u,0,1);c[0]=r.Continue,this.buffers.set(l.id,u),l.$cancellationData=u}async sendCancellation(l,u){let c=this.buffers.get(u);if(c===void 0)return;let p=new Int32Array(c,0,1);Atomics.store(p,0,r.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var a=class{static{i(this,"SharedArrayBufferCancellationToken")}data;constructor(l){this.data=new Int32Array(l,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{i(this,"SharedArrayBufferCancellationTokenSource")}token;constructor(l){this.token=new a(l)}cancel(){}dispose(){}},o=class{static{i(this,"SharedArrayReceiverStrategy")}kind="request";createCancellationTokenSource(l){let u=l.$cancellationData;if(u===void 0)return new t.CancellationTokenSource;return new s(u)}};e.SharedArrayReceiverStrategy=o}}),Dm=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var r=t(pn()),n=class{static{i(this,"Semaphore")}_capacity;_active;_waiting;constructor(a=1){if(a<=0)throw Error("Capacity must be greater than 0");this._capacity=a,this._active=0,this._waiting=[]}lock(a){return new Promise((s,o)=>{this._waiting.push({thunk:a,resolve:s,reject:o}),this.runNext()})}get active(){return this._active}runNext(){if(this._waiting.length===0||this._active===this._capacity)return;(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let a=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error("Too many thunks active");try{let s=a.thunk();if(s instanceof Promise)s.then((o)=>{this._active--,a.resolve(o),this.runNext()},(o)=>{this._active--,a.reject(o),this.runNext()});else this._active--,a.resolve(s),this.runNext()}catch(s){this._active--,a.reject(s),this.runNext()}}};e.Semaphore=n}}),cA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){var t=e&&e.__createBinding||(Object.create?function(d,E,T,v){if(v===void 0)v=T;var R=Object.getOwnPropertyDescriptor(E,T);if(!R||("get"in R?!E.__esModule:R.writable||R.configurable))R={enumerable:!0,get:i(function(){return E[T]},"get")};Object.defineProperty(d,v,R)}:function(d,E,T,v){if(v===void 0)v=T;d[v]=E[T]}),r=e&&e.__setModuleDefault||(Object.create?function(d,E){Object.defineProperty(d,"default",{enumerable:!0,value:E})}:function(d,E){d.default=E}),n=e&&e.__importStar||function(){var d=i(function(E){return d=Object.getOwnPropertyNames||function(T){var v=[];for(var R in T)if(Object.prototype.hasOwnProperty.call(T,R))v[v.length]=R;return v},d(E)},"ownKeys");return function(E){if(E&&E.__esModule)return E;var T={};if(E!=null){for(var v=d(E),R=0;R<v.length;R++)if(v[R]!=="default")t(T,E,v[R])}return r(T,E),T}}(),a=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var s=a(pn()),o=n(Xi()),l=Ji(),u=Dm(),c;(function(d){function E(T){let v=T;return v&&o.func(v.listen)&&o.func(v.dispose)&&o.func(v.onError)&&o.func(v.onClose)&&o.func(v.onPartialMessage)}i(E,"is"),d.is=E})(c||(e.MessageReader=c={}));var p=class{static{i(this,"AbstractMessageReader")}errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new l.Emitter,this.closeEmitter=new l.Emitter,this.partialMessageEmitter=new l.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(d){this.errorEmitter.fire(this.asError(d))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(d){this.partialMessageEmitter.fire(d)}asError(d){if(d instanceof Error)return d;else return Error(`Reader received error. Reason: ${o.string(d.message)?d.message:"unknown"}`)}};e.AbstractMessageReader=p;var h;(function(d){function E(T){let v,R,P,S=new Map,D,x=new Map;if(T===void 0||typeof T==="string")v=T??"utf-8";else{if(v=T.charset??"utf-8",T.contentDecoder!==void 0)P=T.contentDecoder,S.set(P.name,P);if(T.contentDecoders!==void 0)for(let F of T.contentDecoders)S.set(F.name,F);if(T.contentTypeDecoder!==void 0)D=T.contentTypeDecoder,x.set(D.name,D);if(T.contentTypeDecoders!==void 0)for(let F of T.contentTypeDecoders)x.set(F.name,F)}if(D===void 0)D=(0,s.default)().applicationJson.decoder,x.set(D.name,D);return{charset:v,contentDecoder:P,contentDecoders:S,contentTypeDecoder:D,contentTypeDecoders:x}}i(E,"fromOptions"),d.fromOptions=E})(h||(h={}));var y=class extends p{static{i(this,"ReadableStreamMessageReader")}readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(d,E){super();this.readable=d,this.options=h.fromOptions(E),this.buffer=(0,s.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new u.Semaphore(1)}set partialMessageTimeout(d){this._partialMessageTimeout=d}get partialMessageTimeout(){return this._partialMessageTimeout}listen(d){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=d;let E=this.readable.onData((T)=>{this.onData(T)});return this.readable.onError((T)=>this.fireError(T)),this.readable.onClose(()=>this.fireClose()),E}onData(d){try{this.buffer.append(d);while(!0){if(this.nextMessageLength===-1){let T=this.buffer.tryReadHeaders(!0);if(!T)return;let v=T.get("content-length");if(!v){this.fireError(Error(`Header must provide a Content-Length property.
|
|
1
|
+
import{Lt,_}from"./chunk-ngt1j8py.js";var un={};Lt(un,{AbnfAlternation:()=>Eo,AbnfConcatenation:()=>Co,AbnfElement:()=>hi,AbnfGroup:()=>bo,AbnfNumVal:()=>_o,AbnfOptionalGroup:()=>So,AbnfPrimary:()=>hr,AbnfRule:()=>yi,AbnfRuleName:()=>wo,AbnfStringLiteral:()=>Po,AbstractMermaidTokenBuilder:()=>ce,AbstractMermaidValueConverter:()=>Ie,Architecture:()=>ot,ArchitectureGrammarGeneratedModule:()=>Ml,Branch:()=>Zn,Commit:()=>Tr,CommonTokenBuilder:()=>kR,CommonValueConverter:()=>Je,Cynefin:()=>Yt,CynefinGrammarGeneratedModule:()=>Dl,DomainBlock:()=>Qn,DomainItem:()=>Hi,EbnfChoice:()=>ko,EbnfExceptionPostfix:()=>Io,EbnfGroup:()=>No,EbnfNonTerminal:()=>Oo,EbnfOneOrMorePostfix:()=>Mo,EbnfOptional:()=>Do,EbnfOptionalPostfix:()=>Lo,EbnfPostfix:()=>tn,EbnfPrimary:()=>Kt,EbnfRepetition:()=>xo,EbnfRule:()=>gi,EbnfSequence:()=>Go,EbnfSpecial:()=>Fo,EbnfTerm:()=>vi,EbnfTerminal:()=>jo,EbnfZeroOrMorePostfix:()=>zo,EmDataEntity:()=>yr,EmFrame:()=>Wt,EmptyFileSystem:()=>le,EventModel:()=>ht,EventModelingGeneratedModule:()=>Ll,GitGraph:()=>Xt,GitGraphGrammarGeneratedModule:()=>xl,Info:()=>sn,InfoGrammarGeneratedModule:()=>Gl,Merge:()=>$r,MermaidGeneratedSharedModule:()=>ue,Packet:()=>Rr,PacketBlock:()=>Ar,PacketGrammarGeneratedModule:()=>Fl,PegAny:()=>Bo,PegGroup:()=>Uo,PegIdentifier:()=>Vo,PegLiteral:()=>Ko,PegOrderedChoice:()=>Wo,PegPrefix:()=>$i,PegPrimary:()=>rn,PegRule:()=>bi,PegSequence:()=>qo,PegSuffix:()=>_i,Pie:()=>Jt,PieGrammarGeneratedModule:()=>jl,PieSection:()=>ea,Radar:()=>qt,RadarGrammarGeneratedModule:()=>zl,Railroad:()=>Er,RailroadAbnf:()=>Cr,RailroadAbnfGrammarGeneratedModule:()=>Bl,RailroadChoiceExpr:()=>Ho,RailroadEbnf:()=>br,RailroadEbnfGrammarGeneratedModule:()=>Ul,RailroadExpression:()=>yt,RailroadGrammarGeneratedModule:()=>Vl,RailroadNonTerminalExpr:()=>Yo,RailroadOneOrMoreExpr:()=>Xo,RailroadOptionalExpr:()=>Jo,RailroadPeg:()=>_r,RailroadPegGrammarGeneratedModule:()=>Kl,RailroadRule:()=>wi,RailroadSequenceExpr:()=>Zo,RailroadSpecialExpr:()=>Qo,RailroadTerminalExpr:()=>el,RailroadZeroOrMoreExpr:()=>tl,Statement:()=>gr,Transition:()=>on,TreeNode:()=>vr,TreeView:()=>nn,TreeViewGrammarGeneratedModule:()=>ql,Treemap:()=>Sr,TreemapGrammarGeneratedModule:()=>Wl,Wardley:()=>Oe,WardleyGrammarGeneratedModule:()=>Hl,__name:()=>i,createDefaultCoreModule:()=>ae,createDefaultSharedCoreModule:()=>ie,inject:()=>W,isArchitecture:()=>Vp,isBranch:()=>Kp,isCommit:()=>Wp,isCynefin:()=>qp,isDomainBlock:()=>Hp,isDomainItem:()=>Yp,isEmModelEntityType:()=>Xp,isEmResetFrame:()=>Fr,isGitGraph:()=>Jp,isInfo:()=>Zp,isMerge:()=>Qp,isPacket:()=>ed,isPacketBlock:()=>td,isPie:()=>rd,isPieSection:()=>nd,isRailroad:()=>ad,isRailroadAbnf:()=>id,isRailroadEbnf:()=>sd,isRailroadPeg:()=>od,isTransition:()=>ld,isTreemap:()=>ud,isWardley:()=>cd});var{create:rA,defineProperty:Yi,getOwnPropertyDescriptor:nA,getOwnPropertyNames:Sf,getPrototypeOf:aA}=Object,iA=Object.prototype.hasOwnProperty,i=(e,t)=>Yi(e,"name",{value:t,configurable:!0}),sA=(e,t)=>function(){return e&&(t=(0,e[Sf(e)[0]])(e=0)),t},Z=(e,t)=>function(){return t||(0,e[Sf(e)[0]])((t={exports:{}}).exports,t),t.exports},oA=(e,t)=>{for(var r in t)Yi(e,r,{get:t[r],enumerable:!0})},Nm=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let a of Sf(t))if(!iA.call(e,a)&&a!==r)Yi(e,a,{get:()=>t[a],enumerable:!(n=nA(t,a))||n.enumerable})}return e},wf=(e,t,r)=>(r=e!=null?rA(aA(e)):{},Nm(t||!e||!e.__esModule?Yi(r,"default",{value:e,enumerable:!0}):r,e)),Pf=(e)=>Nm(Yi({},"__esModule",{value:!0}),e),Xi=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.boolean=t,e.string=r,e.number=n,e.error=a,e.func=s,e.array=o,e.stringArray=l;function t(u){return u===!0||u===!1}i(t,"boolean");function r(u){return typeof u==="string"||u instanceof String}i(r,"string");function n(u){return typeof u==="number"||u instanceof Number}i(n,"number");function a(u){return u instanceof Error}i(a,"error");function s(u){return typeof u==="function"}i(s,"func");function o(u){return Array.isArray(u)}i(o,"array");function l(u){return o(u)&&u.every((c)=>r(c))}i(l,"stringArray")}}),Om=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){var t=e&&e.__createBinding||(Object.create?function(A,g,C,O){if(O===void 0)O=C;var w=Object.getOwnPropertyDescriptor(g,C);if(!w||("get"in w?!g.__esModule:w.writable||w.configurable))w={enumerable:!0,get:i(function(){return g[C]},"get")};Object.defineProperty(A,O,w)}:function(A,g,C,O){if(O===void 0)O=C;A[O]=g[C]}),r=e&&e.__setModuleDefault||(Object.create?function(A,g){Object.defineProperty(A,"default",{enumerable:!0,value:g})}:function(A,g){A.default=g}),n=e&&e.__importStar||function(){var A=i(function(g){return A=Object.getOwnPropertyNames||function(C){var O=[];for(var w in C)if(Object.prototype.hasOwnProperty.call(C,w))O[O.length]=w;return O},A(g)},"ownKeys");return function(g){if(g&&g.__esModule)return g;var C={};if(g!=null){for(var O=A(g),w=0;w<O.length;w++)if(O[w]!=="default")t(C,g,O[w])}return r(C,g),C}}();Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var a=n(Xi()),s;(function(A){A.ParseError=-32700,A.InvalidRequest=-32600,A.MethodNotFound=-32601,A.InvalidParams=-32602,A.InternalError=-32603,A.jsonrpcReservedErrorRangeStart=-32099,A.serverErrorStart=-32099,A.MessageWriteError=-32099,A.MessageReadError=-32098,A.PendingResponseRejected=-32097,A.ConnectionInactive=-32096,A.ServerNotInitialized=-32002,A.UnknownErrorCode=-32001,A.jsonrpcReservedErrorRangeEnd=-32000,A.serverErrorEnd=-32000})(s||(e.ErrorCodes=s={}));var o=class A extends Error{static{i(this,"ResponseError")}code;data;constructor(g,C,O){super(C);this.code=a.number(g)?g:s.UnknownErrorCode,this.data=O,Object.setPrototypeOf(this,A.prototype)}toJson(){let g={code:this.code,message:this.message};if(this.data!==void 0)g.data=this.data;return g}};e.ResponseError=o;var l=class A{static{i(this,"ParameterStructures")}kind;static auto=new A("auto");static byPosition=new A("byPosition");static byName=new A("byName");constructor(g){this.kind=g}static is(g){return g===A.auto||g===A.byName||g===A.byPosition}toString(){return this.kind}};e.ParameterStructures=l;var u=class{static{i(this,"AbstractMessageSignature")}method;numberOfParams;constructor(A,g){this.method=A,this.numberOfParams=g}get parameterStructures(){return l.auto}};e.AbstractMessageSignature=u;var c=class extends u{static{i(this,"RequestType0")}_;constructor(A){super(A,0)}};e.RequestType0=c;var p=class extends u{static{i(this,"RequestType")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.RequestType=p;var h=class extends u{static{i(this,"RequestType1")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.RequestType1=h;var y=class extends u{static{i(this,"RequestType2")}_;constructor(A){super(A,2)}};e.RequestType2=y;var d=class extends u{static{i(this,"RequestType3")}_;constructor(A){super(A,3)}};e.RequestType3=d;var E=class extends u{static{i(this,"RequestType4")}_;constructor(A){super(A,4)}};e.RequestType4=E;var T=class extends u{static{i(this,"RequestType5")}_;constructor(A){super(A,5)}};e.RequestType5=T;var v=class extends u{static{i(this,"RequestType6")}_;constructor(A){super(A,6)}};e.RequestType6=v;var R=class extends u{static{i(this,"RequestType7")}_;constructor(A){super(A,7)}};e.RequestType7=R;var P=class extends u{static{i(this,"RequestType8")}_;constructor(A){super(A,8)}};e.RequestType8=P;var S=class extends u{static{i(this,"RequestType9")}_;constructor(A){super(A,9)}};e.RequestType9=S;var D=class extends u{static{i(this,"NotificationType")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.NotificationType=D;var x=class extends u{static{i(this,"NotificationType0")}_;constructor(A){super(A,0)}};e.NotificationType0=x;var F=class extends u{static{i(this,"NotificationType1")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=F;var V=class extends u{static{i(this,"NotificationType2")}_;constructor(A){super(A,2)}};e.NotificationType2=V;var te=class extends u{static{i(this,"NotificationType3")}_;constructor(A){super(A,3)}};e.NotificationType3=te;var fe=class extends u{static{i(this,"NotificationType4")}_;constructor(A){super(A,4)}};e.NotificationType4=fe;var Q=class extends u{static{i(this,"NotificationType5")}_;constructor(A){super(A,5)}};e.NotificationType5=Q;var k=class extends u{static{i(this,"NotificationType6")}_;constructor(A){super(A,6)}};e.NotificationType6=k;var L=class extends u{static{i(this,"NotificationType7")}_;constructor(A){super(A,7)}};e.NotificationType7=L;var j=class extends u{static{i(this,"NotificationType8")}_;constructor(A){super(A,8)}};e.NotificationType8=j;var z=class extends u{static{i(this,"NotificationType9")}_;constructor(A){super(A,9)}};e.NotificationType9=z;var N;(function(A){function g(w){let M=w;return M&&a.string(M.method)&&(a.string(M.id)||a.number(M.id))}i(g,"isRequest"),A.isRequest=g;function C(w){let M=w;return M&&a.string(M.method)&&w.id===void 0}i(C,"isNotification"),A.isNotification=C;function O(w){let M=w;return M&&(M.result!==void 0||!!M.error)&&(a.string(M.id)||a.number(M.id)||M.id===null)}i(O,"isResponse"),A.isResponse=O})(N||(e.Message=N={}))}}),Mm=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var t;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(t||(e.Touch=t={}));var r=class{static{i(this,"LinkedMap")}[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(a){let s=this._map.get(a);return s?s.previous?.value:void 0}after(a){let s=this._map.get(a);return s?s.next?.value:void 0}has(a){return this._map.has(a)}get(a,s=t.None){let o=this._map.get(a);if(!o)return;if(s!==t.None)this.touch(o,s);return o.value}set(a,s,o=t.None){let l=this._map.get(a);if(l){if(l.value=s,o!==t.None)this.touch(l,o)}else{switch(l={key:a,value:s,next:void 0,previous:void 0},o){case t.None:this.addItemLast(l);break;case t.First:this.addItemFirst(l);break;case t.Last:this.addItemLast(l);break;default:this.addItemLast(l);break}this._map.set(a,l),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){let s=this._map.get(a);if(!s)return;return this._map.delete(a),this.removeItem(s),this._size--,s.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,s){let o=this._state,l=this._head;while(l){if(s)a.bind(s)(l.value,l.key,this);else a(l.value,l.key,this);if(this._state!==o)throw Error("LinkedMap got modified during iteration.");l=l.next}}keys(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:s.key,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}values(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:s.value,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}entries(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:[s.key,s.value],done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}[Symbol.iterator](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let s=this._head,o=this.size;while(s&&o>a)this._map.delete(s.key),s=s.next,o--;if(this._head=s,this._size=o,s)s.previous=void 0;this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(!this._head)throw Error("Invalid list");else a.next=this._head,this._head.previous=a;this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(!this._tail)throw Error("Invalid list");else a.previous=this._tail,this._tail.next=a;this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{let{next:s,previous:o}=a;if(!s||!o)throw Error("Invalid list");s.previous=o,o.next=s}a.next=void 0,a.previous=void 0,this._state++}touch(a,s){if(!this._head||!this._tail)throw Error("Invalid list");if(s!==t.First&&s!==t.Last)return;if(s===t.First){if(a===this._head)return;let{next:o,previous:l}=a;if(a===this._tail)l.next=void 0,this._tail=l;else o.previous=l,l.next=o;a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(s===t.Last){if(a===this._tail)return;let{next:o,previous:l}=a;if(a===this._head)o.previous=void 0,this._head=o;else o.previous=l,l.next=o;a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}toJSON(){let a=[];return this.forEach((s,o)=>{a.push([o,s])}),a}fromJSON(a){this.clear();for(let[s,o]of a)this.set(s,o)}};e.LinkedMap=r;var n=class extends r{static{i(this,"LRUCache")}_limit;_ratio;constructor(a,s=1){super();this._limit=a,this._ratio=Math.min(Math.max(0,s),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get ratio(){return this._ratio}set ratio(a){this._ratio=Math.min(Math.max(0,a),1),this.checkTrim()}get(a,s=t.AsNew){return super.get(a,s)}peek(a){return super.get(a,t.None)}set(a,s){return super.set(a,s,t.Last),this.checkTrim(),this}checkTrim(){if(this.size>this._limit)this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=n}}),lA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(a){return{dispose:a}}i(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),pn=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw Error("No runtime abstraction layer installed");return t}i(r,"RAL"),function(n){function a(s){if(s===void 0)throw Error("No runtime abstraction layer provided");t=s}i(a,"install"),n.install=a}(r||(r={})),e.default=r}}),Ji=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/events.js"(e){var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var r=t(pn()),n;(function(o){let l={dispose(){}};o.None=function(){return l}})(n||(e.Event=n={}));var a=class{static{i(this,"CallbackList")}_callbacks;_contexts;add(o,l=null,u){if(!this._callbacks)this._callbacks=[],this._contexts=[];if(this._callbacks.push(o),this._contexts.push(l),Array.isArray(u))u.push({dispose:i(()=>this.remove(o,l),"dispose")})}remove(o,l=null){if(!this._callbacks)return;let u=!1;for(let c=0,p=this._callbacks.length;c<p;c++)if(this._callbacks[c]===o)if(this._contexts[c]===l){this._callbacks.splice(c,1),this._contexts.splice(c,1);return}else u=!0;if(u)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...o){if(!this._callbacks)return[];let l=[],u=this._callbacks.slice(0),c=this._contexts.slice(0);for(let p=0,h=u.length;p<h;p++)try{l.push(u[p].apply(c[p],o))}catch(y){(0,r.default)().console.error(y)}return l}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},s=class o{static{i(this,"Emitter")}_options;static _noop=i(function(){},"_noop");_event;_callbacks;constructor(l){this._options=l}get event(){if(!this._event)this._event=(l,u,c)=>{if(!this._callbacks)this._callbacks=new a;if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty())this._options.onFirstListenerAdd(this);this._callbacks.add(l,u);let p={dispose:i(()=>{if(!this._callbacks)return;if(this._callbacks.remove(l,u),p.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty())this._options.onLastListenerRemove(this)},"dispose")};if(Array.isArray(c))c.push(p);return p};return this._event}fire(l){if(this._callbacks)this._callbacks.invoke.call(this._callbacks,l)}dispose(){if(this._callbacks)this._callbacks.dispose(),this._callbacks=void 0}};e.Emitter=s}}),kf=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){var t=e&&e.__createBinding||(Object.create?function(y,d,E,T){if(T===void 0)T=E;var v=Object.getOwnPropertyDescriptor(d,E);if(!v||("get"in v?!d.__esModule:v.writable||v.configurable))v={enumerable:!0,get:i(function(){return d[E]},"get")};Object.defineProperty(y,T,v)}:function(y,d,E,T){if(T===void 0)T=E;y[T]=d[E]}),r=e&&e.__setModuleDefault||(Object.create?function(y,d){Object.defineProperty(y,"default",{enumerable:!0,value:d})}:function(y,d){y.default=d}),n=e&&e.__importStar||function(){var y=i(function(d){return y=Object.getOwnPropertyNames||function(E){var T=[];for(var v in E)if(Object.prototype.hasOwnProperty.call(E,v))T[T.length]=v;return T},y(d)},"ownKeys");return function(d){if(d&&d.__esModule)return d;var E={};if(d!=null){for(var T=y(d),v=0;v<T.length;v++)if(T[v]!=="default")t(E,d,T[v])}return r(E,d),E}}(),a=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var s=a(pn()),o=n(Xi()),l=Ji(),u;(function(y){y.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:l.Event.None}),y.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:l.Event.None});function d(E){let T=E;return T&&(T===y.None||T===y.Cancelled||o.boolean(T.isCancellationRequested)&&!!T.onCancellationRequested)}i(d,"is"),y.is=d})(u||(e.CancellationToken=u={}));var c=Object.freeze(function(y,d){let E=(0,s.default)().timer.setTimeout(y.bind(d),0);return{dispose(){E.dispose()}}}),p=class{static{i(this,"MutableToken")}_isCancelled=!1;_emitter;cancel(){if(!this._isCancelled){if(this._isCancelled=!0,this._emitter)this._emitter.fire(void 0),this.dispose()}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled)return c;if(!this._emitter)this._emitter=new l.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}},h=class{static{i(this,"CancellationTokenSource")}_token;get token(){if(!this._token)this._token=new p;return this._token}cancel(){if(!this._token)this._token=u.Cancelled;else this._token.cancel()}dispose(){if(!this._token)this._token=u.None;else if(this._token instanceof p)this._token.dispose()}};e.CancellationTokenSource=h}}),uA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=kf(),r;(function(l){l.Continue=0,l.Cancelled=1})(r||(r={}));var n=class{static{i(this,"SharedArraySenderStrategy")}buffers;constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;let u=new SharedArrayBuffer(4),c=new Int32Array(u,0,1);c[0]=r.Continue,this.buffers.set(l.id,u),l.$cancellationData=u}async sendCancellation(l,u){let c=this.buffers.get(u);if(c===void 0)return;let p=new Int32Array(c,0,1);Atomics.store(p,0,r.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var a=class{static{i(this,"SharedArrayBufferCancellationToken")}data;constructor(l){this.data=new Int32Array(l,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{i(this,"SharedArrayBufferCancellationTokenSource")}token;constructor(l){this.token=new a(l)}cancel(){}dispose(){}},o=class{static{i(this,"SharedArrayReceiverStrategy")}kind="request";createCancellationTokenSource(l){let u=l.$cancellationData;if(u===void 0)return new t.CancellationTokenSource;return new s(u)}};e.SharedArrayReceiverStrategy=o}}),Dm=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var r=t(pn()),n=class{static{i(this,"Semaphore")}_capacity;_active;_waiting;constructor(a=1){if(a<=0)throw Error("Capacity must be greater than 0");this._capacity=a,this._active=0,this._waiting=[]}lock(a){return new Promise((s,o)=>{this._waiting.push({thunk:a,resolve:s,reject:o}),this.runNext()})}get active(){return this._active}runNext(){if(this._waiting.length===0||this._active===this._capacity)return;(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let a=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error("Too many thunks active");try{let s=a.thunk();if(s instanceof Promise)s.then((o)=>{this._active--,a.resolve(o),this.runNext()},(o)=>{this._active--,a.reject(o),this.runNext()});else this._active--,a.resolve(s),this.runNext()}catch(s){this._active--,a.reject(s),this.runNext()}}};e.Semaphore=n}}),cA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){var t=e&&e.__createBinding||(Object.create?function(d,E,T,v){if(v===void 0)v=T;var R=Object.getOwnPropertyDescriptor(E,T);if(!R||("get"in R?!E.__esModule:R.writable||R.configurable))R={enumerable:!0,get:i(function(){return E[T]},"get")};Object.defineProperty(d,v,R)}:function(d,E,T,v){if(v===void 0)v=T;d[v]=E[T]}),r=e&&e.__setModuleDefault||(Object.create?function(d,E){Object.defineProperty(d,"default",{enumerable:!0,value:E})}:function(d,E){d.default=E}),n=e&&e.__importStar||function(){var d=i(function(E){return d=Object.getOwnPropertyNames||function(T){var v=[];for(var R in T)if(Object.prototype.hasOwnProperty.call(T,R))v[v.length]=R;return v},d(E)},"ownKeys");return function(E){if(E&&E.__esModule)return E;var T={};if(E!=null){for(var v=d(E),R=0;R<v.length;R++)if(v[R]!=="default")t(T,E,v[R])}return r(T,E),T}}(),a=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var s=a(pn()),o=n(Xi()),l=Ji(),u=Dm(),c;(function(d){function E(T){let v=T;return v&&o.func(v.listen)&&o.func(v.dispose)&&o.func(v.onError)&&o.func(v.onClose)&&o.func(v.onPartialMessage)}i(E,"is"),d.is=E})(c||(e.MessageReader=c={}));var p=class{static{i(this,"AbstractMessageReader")}errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new l.Emitter,this.closeEmitter=new l.Emitter,this.partialMessageEmitter=new l.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(d){this.errorEmitter.fire(this.asError(d))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(d){this.partialMessageEmitter.fire(d)}asError(d){if(d instanceof Error)return d;else return Error(`Reader received error. Reason: ${o.string(d.message)?d.message:"unknown"}`)}};e.AbstractMessageReader=p;var h;(function(d){function E(T){let v,R,P,S=new Map,D,x=new Map;if(T===void 0||typeof T==="string")v=T??"utf-8";else{if(v=T.charset??"utf-8",T.contentDecoder!==void 0)P=T.contentDecoder,S.set(P.name,P);if(T.contentDecoders!==void 0)for(let F of T.contentDecoders)S.set(F.name,F);if(T.contentTypeDecoder!==void 0)D=T.contentTypeDecoder,x.set(D.name,D);if(T.contentTypeDecoders!==void 0)for(let F of T.contentTypeDecoders)x.set(F.name,F)}if(D===void 0)D=(0,s.default)().applicationJson.decoder,x.set(D.name,D);return{charset:v,contentDecoder:P,contentDecoders:S,contentTypeDecoder:D,contentTypeDecoders:x}}i(E,"fromOptions"),d.fromOptions=E})(h||(h={}));var y=class extends p{static{i(this,"ReadableStreamMessageReader")}readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(d,E){super();this.readable=d,this.options=h.fromOptions(E),this.buffer=(0,s.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new u.Semaphore(1)}set partialMessageTimeout(d){this._partialMessageTimeout=d}get partialMessageTimeout(){return this._partialMessageTimeout}listen(d){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=d;let E=this.readable.onData((T)=>{this.onData(T)});return this.readable.onError((T)=>this.fireError(T)),this.readable.onClose(()=>this.fireClose()),E}onData(d){try{this.buffer.append(d);while(!0){if(this.nextMessageLength===-1){let T=this.buffer.tryReadHeaders(!0);if(!T)return;let v=T.get("content-length");if(!v){this.fireError(Error(`Header must provide a Content-Length property.
|
|
2
2
|
${JSON.stringify(Object.fromEntries(T))}`));return}let R=parseInt(v);if(isNaN(R)){this.fireError(Error(`Content-Length value must be a number. Got ${v}`));return}this.nextMessageLength=R}let E=this.buffer.tryReadBody(this.nextMessageLength);if(E===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let T=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(E):E,v=await this.options.contentTypeDecoder.decode(T,this.options);this.callback(v)}).catch((T)=>{this.fireError(T)})}}catch(E){this.fireError(E)}}clearPartialMessageTimer(){if(this.partialMessageTimer)this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0}setPartialMessageTimer(){if(this.clearPartialMessageTimer(),this._partialMessageTimeout<=0)return;this.partialMessageTimer=(0,s.default)().timer.setTimeout((d,E)=>{if(this.partialMessageTimer=void 0,d===this.messageToken)this.firePartialMessage({messageToken:d,waitingTime:E}),this.setPartialMessageTimer()},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout)}};e.ReadableStreamMessageReader=y}}),fA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){var t=e&&e.__createBinding||(Object.create?function(T,v,R,P){if(P===void 0)P=R;var S=Object.getOwnPropertyDescriptor(v,R);if(!S||("get"in S?!v.__esModule:S.writable||S.configurable))S={enumerable:!0,get:i(function(){return v[R]},"get")};Object.defineProperty(T,P,S)}:function(T,v,R,P){if(P===void 0)P=R;T[P]=v[R]}),r=e&&e.__setModuleDefault||(Object.create?function(T,v){Object.defineProperty(T,"default",{enumerable:!0,value:v})}:function(T,v){T.default=v}),n=e&&e.__importStar||function(){var T=i(function(v){return T=Object.getOwnPropertyNames||function(R){var P=[];for(var S in R)if(Object.prototype.hasOwnProperty.call(R,S))P[P.length]=S;return P},T(v)},"ownKeys");return function(v){if(v&&v.__esModule)return v;var R={};if(v!=null){for(var P=T(v),S=0;S<P.length;S++)if(P[S]!=="default")t(R,v,P[S])}return r(R,v),R}}(),a=e&&e.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var s=a(pn()),o=n(Xi()),l=Dm(),u=Ji(),c="Content-Length: ",p=`\r
|
|
3
3
|
`,h;(function(T){function v(R){let P=R;return P&&o.func(P.dispose)&&o.func(P.onClose)&&o.func(P.onError)&&o.func(P.write)}i(v,"is"),T.is=v})(h||(e.MessageWriter=h={}));var y=class{static{i(this,"AbstractMessageWriter")}errorEmitter;closeEmitter;constructor(){this.errorEmitter=new u.Emitter,this.closeEmitter=new u.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(T,v,R){this.errorEmitter.fire([this.asError(T),v,R])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(T){if(T instanceof Error)return T;else return Error(`Writer received error. Reason: ${o.string(T.message)?T.message:"unknown"}`)}};e.AbstractMessageWriter=y;var d;(function(T){function v(R){if(R===void 0||typeof R==="string")return{charset:R??"utf-8",contentTypeEncoder:(0,s.default)().applicationJson.encoder};else return{charset:R.charset??"utf-8",contentEncoder:R.contentEncoder,contentTypeEncoder:R.contentTypeEncoder??(0,s.default)().applicationJson.encoder}}i(v,"fromOptions"),T.fromOptions=v})(d||(d={}));var E=class extends y{static{i(this,"WriteableStreamMessageWriter")}writable;options;errorCount;writeSemaphore;constructor(T,v){super();this.writable=T,this.options=d.fromOptions(v),this.errorCount=0,this.writeSemaphore=new l.Semaphore(1),this.writable.onError((R)=>this.fireError(R)),this.writable.onClose(()=>this.fireClose())}async write(T){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(T,this.options).then((R)=>{if(this.options.contentEncoder!==void 0)return this.options.contentEncoder.encode(R);else return R}).then((R)=>{let P=[];return P.push(c,R.byteLength.toString(),p),P.push(p),this.doWrite(T,P,R)},(R)=>{throw this.fireError(R),R}))}async doWrite(T,v,R){try{return await this.writable.write(v.join(""),"ascii"),this.writable.write(R)}catch(P){return this.handleError(P,T),Promise.reject(P)}}handleError(T,v){this.errorCount++,this.fireError(T,v,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=E}}),pA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,r=10,n=`\r
|
|
4
4
|
`,a=class{static{i(this,"AbstractMessageBuffer")}_encoding;_chunks;_totalLength;constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){let o=typeof s==="string"?this.fromString(s,this._encoding):s;this._chunks.push(o),this._totalLength+=o.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let o=0,l=0,u=0,c=0;e:while(l<this._chunks.length){let d=this._chunks[l];u=0;while(u<d.length){switch(d[u]){case t:switch(o){case 0:o=1;break;case 2:o=3;break;default:o=0}break;case r:switch(o){case 1:o=2;break;case 3:o=4,u++;break e;default:o=0}break;default:o=0}u++}c+=d.byteLength,l++}if(o!==4)return;let p=this._read(c+u),h=new Map,y=this.toString(p,"ascii").split(n);if(y.length<2)return h;for(let d=0;d<y.length-2;d++){let E=y[d],T=E.indexOf(":");if(T===-1)throw Error(`Message header must separate key and value using ':'
|
|
@@ -136,7 +136,7 @@ ${t}`;if(this.inline)return`{${n}}`;else return n}};function bR(e,t,r){if(e==="l
|
|
|
136
136
|
`);return}},Je=class extends Ie{static{i(this,"CommonValueConverter")}runCustomConverter(e,t,r){return}},ce=class extends aR{static{i(this,"AbstractMermaidTokenBuilder")}constructor(e){super();this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach((a)=>{if(this.keywords.has(a.name)&&a.PATTERN!==void 0)a.PATTERN=new RegExp(a.PATTERN.toString()+"(?:(?=%%)|(?!\\S))")}),n}},kR=class extends ce{static{i(this,"CommonTokenBuilder")}};var dP=class extends ce{static{i(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},IR={parser:{TokenBuilder:i(()=>new dP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Ci(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),zl,IR);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}i(Ci,"createRadarServices");var mP=class extends ce{static{i(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},NR=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
|
|
137
137
|
`;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),hP=class extends Ie{static{i(this,"RailroadValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return NR(a)}return n}runCustomConverter(e,t,r){if(e.name==="RR_STRING")return NR(t);return}},OR={parser:{TokenBuilder:i(()=>new mP,"TokenBuilder"),ValueConverter:i(()=>new hP,"ValueConverter")}};function rr(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Vl,OR);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}i(rr,"createRailroadServices");var yP=class extends ce{static{i(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},MR=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
|
|
138
138
|
`;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),gP=class extends Ie{static{i(this,"RailroadEbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return MR(a)}return n}runCustomConverter(e,t,r){if(e.name==="EBNF_STRING")return MR(t);if(e.name==="EBNF_SPECIAL_SEQUENCE")return t.slice(1,-1).trim();return}},DR={parser:{TokenBuilder:i(()=>new yP,"TokenBuilder"),ValueConverter:i(()=>new gP,"ValueConverter")}};function ar(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ul,DR);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}i(ar,"createRailroadEbnfServices");var vP=class extends ce{static{i(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},TP=class extends Ie{static{i(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return a.slice(1,-1)}return n}runCustomConverter(e,t,r){if(e.name==="ABNF_STRING")return t.slice(1,-1);return}},LR={parser:{TokenBuilder:i(()=>new vP,"TokenBuilder"),ValueConverter:i(()=>new TP,"ValueConverter")}};function ir(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Bl,LR);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}i(ir,"createRailroadAbnfServices");var $P=class extends ce{static{i(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},xR=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
|
|
139
|
-
`;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),RP=class extends Ie{static{i(this,"RailroadPegValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return xR(a)}return n}runCustomConverter(e,t,r){if(e.name==="PEG_STRING")return xR(t);return}},GR={parser:{TokenBuilder:i(()=>new $P,"TokenBuilder"),ValueConverter:i(()=>new RP,"ValueConverter")}};function or(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Kl,GR);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}i(or,"createRailroadPegServices");var AP=class extends ce{static{i(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},EP=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,CP=class extends Ie{static{i(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));else if(e.name==="SEPARATOR")return t.substring(1,t.length-1);else if(e.name==="STRING2")return t.substring(1,t.length-1);else if(e.name==="INDENTATION")return t.length;else if(e.name==="ClassDef"){if(typeof t!=="string")return t;let n=EP.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}return}};function FR(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}i(FR,"registerValidationChecks");var bP=class{static{i(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let n of e.TreemapRows){if(!n.item)continue;if(r===void 0&&n.indent===void 0)r=0;else if(n.indent===void 0)t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"});else if(r!==void 0&&r>=parseInt(n.indent,10))t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"})}}},jR={parser:{TokenBuilder:i(()=>new AP,"TokenBuilder"),ValueConverter:i(()=>new CP,"ValueConverter")},validation:{TreemapValidator:i(()=>new bP,"TreemapValidator")}};function Si(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Wl,jR);return t.ServiceRegistry.register(r),FR(r),{shared:t,Treemap:r}}i(Si,"createTreemapServices");var _P=class extends Ie{static{i(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},zR={parser:{ValueConverter:i(()=>new _P,"ValueConverter")}};function Ti(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Hl,zR);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}i(Ti,"createWardleyServices");var SP=class extends ce{static{i(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},BR={parser:{TokenBuilder:i(()=>new SP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Ei(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Dl,BR);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}i(Ei,"createCynefinServices");var wP=class extends ce{static{i(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},UR={parser:{TokenBuilder:i(()=>new wP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Ai(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),xl,UR);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}i(Ai,"createGitGraphServices");var PP=class extends ce{static{i(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},VR={parser:{TokenBuilder:i(()=>new PP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Ri(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Gl,VR);return t.ServiceRegistry.register(r),{shared:t,Info:r}}i(Ri,"createInfoServices");var kP=class extends ce{static{i(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},KR={parser:{TokenBuilder:i(()=>new kP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Li(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Fl,KR);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}i(Li,"createPacketServices");var IP=class extends ce{static{i(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},NP=class extends Ie{static{i(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name!=="PIE_SECTION_LABEL")return;return t.replace(/"/g,"").trim()}},WR={parser:{TokenBuilder:i(()=>new IP,"TokenBuilder"),ValueConverter:i(()=>new NP,"ValueConverter")}};function Ii(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),jl,WR);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}i(Ii,"createPieServices");var OP=class extends Ie{static{i(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="QUOTED_NAME")return t.substring(1,t.length-1);if(e.name==="BARE_NAME")return t.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return t.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){let n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim();return}},MP=class extends ce{static{i(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},qR={parser:{TokenBuilder:i(()=>new MP,"TokenBuilder"),ValueConverter:i(()=>new OP,"ValueConverter")}};function Di(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),ql,qR);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}i(Di,"createTreeViewServices");var DP=class extends ce{static{i(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},LP=class extends Ie{static{i(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();else if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");else if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'");return n.trim()}return}},HR={parser:{TokenBuilder:i(()=>new DP,"TokenBuilder"),ValueConverter:i(()=>new LP,"ValueConverter")}};function Ni(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ml,HR);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}i(Ni,"createArchitectureServices");var xP=class extends ce{static{i(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},YR=new Set(["cmd","command"]),XR=new Set(["evt","event"]),fd=new Set(["rmo","readmodel"]),JR=new Set(["pcr","processor"]),ZR=new Set(["ui"]);function QR(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}i(QR,"registerValidationChecks");var GP=class{static{i(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){if(e.sourceFrames.length===0)return;if(YR.has(e.modelEntityType))this.validateSources(e,new Set([...ZR,...JR]),"command","ui or processor",t);else if(XR.has(e.modelEntityType))this.validateSources(e,YR,"event","command",t);else if(fd.has(e.modelEntityType))this.validateSources(e,XR,"read model","event",t);else if(JR.has(e.modelEntityType))this.validateSources(e,fd,"processor","read model",t);else if(ZR.has(e.modelEntityType))this.validateSources(e,fd,"ui","read model",t)}validateSources(e,t,r,n,a){for(let s of e.sourceFrames){let o=s.ref;if(o!==void 0&&!t.has(o.modelEntityType))a("error",`A ${r} can only receive input from a ${n}, not from '${o.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},eA={parser:{TokenBuilder:i(()=>new xP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")},validation:{EventModelingValidator:i(()=>new GP,"EventModelingValidator")}};function Mi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ll,eA);return t.ServiceRegistry.register(r),QR(r),{shared:t,EventModel:r}}i(Mi,"createEventModelingServices");var je={},FP={info:i(async()=>{let{createInfoServices:e}=await (_("rad2s9ha"),import("./chunk-rad2s9ha.js")),t=e().Info.parser.LangiumParser;je.info=t},"info"),packet:i(async()=>{let{createPacketServices:e}=await (_("n0wazxgz"),import("./chunk-n0wazxgz.js")),t=e().Packet.parser.LangiumParser;je.packet=t},"packet"),pie:i(async()=>{let{createPieServices:e}=await (_("24fjnnee"),import("./chunk-24fjnnee.js")),t=e().Pie.parser.LangiumParser;je.pie=t},"pie"),treeView:i(async()=>{let{createTreeViewServices:e}=await (_("3pcrxg6m"),import("./chunk-3pcrxg6m.js")),t=e().TreeView.parser.LangiumParser;je.treeView=t},"treeView"),architecture:i(async()=>{let{createArchitectureServices:e}=await (_("08sq3cwm"),import("./chunk-08sq3cwm.js")),t=e().Architecture.parser.LangiumParser;je.architecture=t},"architecture"),gitGraph:i(async()=>{let{createGitGraphServices:e}=await (_("zgavhnt8"),import("./chunk-zgavhnt8.js")),t=e().GitGraph.parser.LangiumParser;je.gitGraph=t},"gitGraph"),eventmodeling:i(async()=>{let{createEventModelingServices:e}=await (_("3h3g3ca3"),import("./chunk-3h3g3ca3.js")),t=e().EventModel.parser.LangiumParser;je.eventmodeling=t},"eventmodeling"),radar:i(async()=>{let{createRadarServices:e}=await (_("y1qty77a"),import("./chunk-y1qty77a.js")),t=e().Radar.parser.LangiumParser;je.radar=t},"radar"),railroad:i(async()=>{let{createRailroadServices:e}=await (_("tfvcs2xx"),import("./chunk-tfvcs2xx.js")),t=e().Railroad.parser.LangiumParser;je.railroad=t},"railroad"),railroadEbnf:i(async()=>{let{createRailroadEbnfServices:e}=await (_("h0767tjv"),import("./chunk-h0767tjv.js")),t=e().RailroadEbnf.parser.LangiumParser;je.railroadEbnf=t},"railroadEbnf"),railroadAbnf:i(async()=>{let{createRailroadAbnfServices:e}=await (_("942g3eqn"),import("./chunk-942g3eqn.js")),t=e().RailroadAbnf.parser.LangiumParser;je.railroadAbnf=t},"railroadAbnf"),railroadPeg:i(async()=>{let{createRailroadPegServices:e}=await (_("ph1dgffm"),import("./chunk-ph1dgffm.js")),t=e().RailroadPeg.parser.LangiumParser;je.railroadPeg=t},"railroadPeg"),treemap:i(async()=>{let{createTreemapServices:e}=await (_("8w8atrdh"),import("./chunk-8w8atrdh.js")),t=e().Treemap.parser.LangiumParser;je.treemap=t},"treemap"),wardley:i(async()=>{let{createWardleyServices:e}=await (_("hqynf99g"),import("./chunk-hqynf99g.js")),t=e().Wardley.parser.LangiumParser;je.wardley=t},"wardley"),cynefin:i(async()=>{let{createCynefinServices:e}=await (_("2j2atyjw"),import("./chunk-2j2atyjw.js")),t=e().Cynefin.parser.LangiumParser;je.cynefin=t},"cynefin")};async function J(e,t){let r=FP[e];if(!r)throw Error(`Unknown diagram type: ${e}`);if(!je[e])await r();let a=je[e].parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new wt(a);return a.value}i(J,"parse");var Yl=i((e)=>e!==void 0&&e>=0?e:"?","formatLocation"),wt=class extends Error{constructor(e){let t=e.lexerErrors.map((n)=>{let a=Yl(n.line),s=Yl(n.column);return`Lexer error on line ${a}, column ${s}: ${n.message}`}).join(`
|
|
139
|
+
`;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),RP=class extends Ie{static{i(this,"RailroadPegValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return xR(a)}return n}runCustomConverter(e,t,r){if(e.name==="PEG_STRING")return xR(t);return}},GR={parser:{TokenBuilder:i(()=>new $P,"TokenBuilder"),ValueConverter:i(()=>new RP,"ValueConverter")}};function or(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Kl,GR);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}i(or,"createRailroadPegServices");var AP=class extends ce{static{i(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},EP=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,CP=class extends Ie{static{i(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));else if(e.name==="SEPARATOR")return t.substring(1,t.length-1);else if(e.name==="STRING2")return t.substring(1,t.length-1);else if(e.name==="INDENTATION")return t.length;else if(e.name==="ClassDef"){if(typeof t!=="string")return t;let n=EP.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}return}};function FR(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}i(FR,"registerValidationChecks");var bP=class{static{i(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let n of e.TreemapRows){if(!n.item)continue;if(r===void 0&&n.indent===void 0)r=0;else if(n.indent===void 0)t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"});else if(r!==void 0&&r>=parseInt(n.indent,10))t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"})}}},jR={parser:{TokenBuilder:i(()=>new AP,"TokenBuilder"),ValueConverter:i(()=>new CP,"ValueConverter")},validation:{TreemapValidator:i(()=>new bP,"TreemapValidator")}};function Si(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Wl,jR);return t.ServiceRegistry.register(r),FR(r),{shared:t,Treemap:r}}i(Si,"createTreemapServices");var _P=class extends Ie{static{i(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},zR={parser:{ValueConverter:i(()=>new _P,"ValueConverter")}};function Ti(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Hl,zR);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}i(Ti,"createWardleyServices");var SP=class extends ce{static{i(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},BR={parser:{TokenBuilder:i(()=>new SP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Ei(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Dl,BR);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}i(Ei,"createCynefinServices");var wP=class extends ce{static{i(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},UR={parser:{TokenBuilder:i(()=>new wP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Ai(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),xl,UR);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}i(Ai,"createGitGraphServices");var PP=class extends ce{static{i(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},VR={parser:{TokenBuilder:i(()=>new PP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Ri(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Gl,VR);return t.ServiceRegistry.register(r),{shared:t,Info:r}}i(Ri,"createInfoServices");var kP=class extends ce{static{i(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},KR={parser:{TokenBuilder:i(()=>new kP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function Li(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Fl,KR);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}i(Li,"createPacketServices");var IP=class extends ce{static{i(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},NP=class extends Ie{static{i(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name!=="PIE_SECTION_LABEL")return;return t.replace(/"/g,"").trim()}},WR={parser:{TokenBuilder:i(()=>new IP,"TokenBuilder"),ValueConverter:i(()=>new NP,"ValueConverter")}};function Ii(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),jl,WR);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}i(Ii,"createPieServices");var OP=class extends Ie{static{i(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="QUOTED_NAME")return t.substring(1,t.length-1);if(e.name==="BARE_NAME")return t.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return t.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){let n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim();return}},MP=class extends ce{static{i(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},qR={parser:{TokenBuilder:i(()=>new MP,"TokenBuilder"),ValueConverter:i(()=>new OP,"ValueConverter")}};function Di(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),ql,qR);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}i(Di,"createTreeViewServices");var DP=class extends ce{static{i(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},LP=class extends Ie{static{i(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();else if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");else if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'");return n.trim()}return}},HR={parser:{TokenBuilder:i(()=>new DP,"TokenBuilder"),ValueConverter:i(()=>new LP,"ValueConverter")}};function Ni(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ml,HR);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}i(Ni,"createArchitectureServices");var xP=class extends ce{static{i(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},YR=new Set(["cmd","command"]),XR=new Set(["evt","event"]),fd=new Set(["rmo","readmodel"]),JR=new Set(["pcr","processor"]),ZR=new Set(["ui"]);function QR(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}i(QR,"registerValidationChecks");var GP=class{static{i(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){if(e.sourceFrames.length===0)return;if(YR.has(e.modelEntityType))this.validateSources(e,new Set([...ZR,...JR]),"command","ui or processor",t);else if(XR.has(e.modelEntityType))this.validateSources(e,YR,"event","command",t);else if(fd.has(e.modelEntityType))this.validateSources(e,XR,"read model","event",t);else if(JR.has(e.modelEntityType))this.validateSources(e,fd,"processor","read model",t);else if(ZR.has(e.modelEntityType))this.validateSources(e,fd,"ui","read model",t)}validateSources(e,t,r,n,a){for(let s of e.sourceFrames){let o=s.ref;if(o!==void 0&&!t.has(o.modelEntityType))a("error",`A ${r} can only receive input from a ${n}, not from '${o.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},eA={parser:{TokenBuilder:i(()=>new xP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")},validation:{EventModelingValidator:i(()=>new GP,"EventModelingValidator")}};function Mi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ll,eA);return t.ServiceRegistry.register(r),QR(r),{shared:t,EventModel:r}}i(Mi,"createEventModelingServices");var je={},FP={info:i(async()=>{let{createInfoServices:e}=await (_("et1hytyv"),import("./chunk-et1hytyv.js")),t=e().Info.parser.LangiumParser;je.info=t},"info"),packet:i(async()=>{let{createPacketServices:e}=await (_("4am8j3k3"),import("./chunk-4am8j3k3.js")),t=e().Packet.parser.LangiumParser;je.packet=t},"packet"),pie:i(async()=>{let{createPieServices:e}=await (_("m9xzt9p7"),import("./chunk-m9xzt9p7.js")),t=e().Pie.parser.LangiumParser;je.pie=t},"pie"),treeView:i(async()=>{let{createTreeViewServices:e}=await (_("g3kbn0t2"),import("./chunk-g3kbn0t2.js")),t=e().TreeView.parser.LangiumParser;je.treeView=t},"treeView"),architecture:i(async()=>{let{createArchitectureServices:e}=await (_("tzpnh70q"),import("./chunk-tzpnh70q.js")),t=e().Architecture.parser.LangiumParser;je.architecture=t},"architecture"),gitGraph:i(async()=>{let{createGitGraphServices:e}=await (_("f9m9seam"),import("./chunk-f9m9seam.js")),t=e().GitGraph.parser.LangiumParser;je.gitGraph=t},"gitGraph"),eventmodeling:i(async()=>{let{createEventModelingServices:e}=await (_("dp0k5vhd"),import("./chunk-dp0k5vhd.js")),t=e().EventModel.parser.LangiumParser;je.eventmodeling=t},"eventmodeling"),radar:i(async()=>{let{createRadarServices:e}=await (_("wzfe6jtq"),import("./chunk-wzfe6jtq.js")),t=e().Radar.parser.LangiumParser;je.radar=t},"radar"),railroad:i(async()=>{let{createRailroadServices:e}=await (_("96m2m3e8"),import("./chunk-96m2m3e8.js")),t=e().Railroad.parser.LangiumParser;je.railroad=t},"railroad"),railroadEbnf:i(async()=>{let{createRailroadEbnfServices:e}=await (_("je78j3vr"),import("./chunk-je78j3vr.js")),t=e().RailroadEbnf.parser.LangiumParser;je.railroadEbnf=t},"railroadEbnf"),railroadAbnf:i(async()=>{let{createRailroadAbnfServices:e}=await (_("h3tkacc7"),import("./chunk-h3tkacc7.js")),t=e().RailroadAbnf.parser.LangiumParser;je.railroadAbnf=t},"railroadAbnf"),railroadPeg:i(async()=>{let{createRailroadPegServices:e}=await (_("ght0t49g"),import("./chunk-ght0t49g.js")),t=e().RailroadPeg.parser.LangiumParser;je.railroadPeg=t},"railroadPeg"),treemap:i(async()=>{let{createTreemapServices:e}=await (_("g2erm7k0"),import("./chunk-g2erm7k0.js")),t=e().Treemap.parser.LangiumParser;je.treemap=t},"treemap"),wardley:i(async()=>{let{createWardleyServices:e}=await (_("vb7g4xg6"),import("./chunk-vb7g4xg6.js")),t=e().Wardley.parser.LangiumParser;je.wardley=t},"wardley"),cynefin:i(async()=>{let{createCynefinServices:e}=await (_("qe0bgeda"),import("./chunk-qe0bgeda.js")),t=e().Cynefin.parser.LangiumParser;je.cynefin=t},"cynefin")};async function J(e,t){let r=FP[e];if(!r)throw Error(`Unknown diagram type: ${e}`);if(!je[e])await r();let a=je[e].parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new wt(a);return a.value}i(J,"parse");var Yl=i((e)=>e!==void 0&&e>=0?e:"?","formatLocation"),wt=class extends Error{constructor(e){let t=e.lexerErrors.map((n)=>{let a=Yl(n.line),s=Yl(n.column);return`Lexer error on line ${a}, column ${s}: ${n.message}`}).join(`
|
|
140
140
|
`),r=e.parserErrors.map((n)=>{let a=Yl(n.token.startLine),s=Yl(n.token.startColumn);return`Parse error on line ${a}, column ${s}: ${n.message}`}).join(`
|
|
141
141
|
`);super(`Parsing failed: ${t} ${r}`);this.result=e}static{i(this,"MermaidParseError")}};
|
|
142
142
|
export{Fr,Ci,rr,ar,ir,or,Si,Ti,Ei,Ai,Ri,Li,Ii,Di,Ni,Mi,J,wt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B,o,v,i,r,f,e,n,y,q,gi,Ao,to,Pr,nr,Ro,no,Lo,sa,la,On,yi,bi}from"./chunk-
|
|
1
|
+
import{B,o,v,i,r,f,e,n,y,q,gi,Ao,to,Pr,nr,Ro,no,Lo,sa,la,On,yi,bi}from"./chunk-ngt1j8py.js";var D={sealed:"已封存",folded:"已折叠",archived:"已移出"},R=["bg-accent","bg-accent-strong","bg-warning","bg-success"];function W(t,c){if(t.startsWith("recent-"))return"json";let d=c.trimStart();if(!d)return"markdown";if(d.startsWith("{")||d.startsWith("["))return"json";if(/^<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>/.test(d))return"xml";return"markdown"}function A(t){if(!t||t.length>32000)return t;if(!t.trimStart().startsWith("<"))return t;let d=[],s=0,a=(u)=>" ".repeat(u),m=/(<([a-zA-Z_][\w.-]*)(?:\s+[^>]*)?>([^\r\n<]*)<\/\2>)|(<\/[a-zA-Z_][\w.-]*>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?\/>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>)|([^<]+)/g;for(let u of t.matchAll(m)){let[,x,,,g,l,p,h]=u;if(x)d.push(`${a(s)}${x.trim()}`);else if(g)s=Math.max(0,s-1),d.push(`${a(s)}${g.trim()}`);else if(p)d.push(`${a(s)}${p.trim()}`),s++;else if(l)d.push(`${a(s)}${l.trim()}`);else if(h){let N=h.trim();if(N)for(let S of N.split(/\r?\n/)){let I=S.trim();if(I)d.push(`${a(s)}${I}`)}}}return d.length>0?d.join(`
|
|
2
2
|
`):t}function z(){return n("div",{role:"status","aria-busy":"true","aria-label":"正在加载上下文",className:"space-y-2 animate-pulse",children:[e("div",{className:"h-10 rounded-xl border border-line bg-panel/40"}),e("div",{className:"h-10 rounded-xl border border-line bg-panel/40"}),e("div",{className:"h-10 rounded-xl border border-line bg-panel/40"})]})}function k(t){let{style:c}=y();return e("p",{className:c("surface.empty"),children:t.children})}function E(t){let{Code:c}=y();return e(c,{code:t.code,lang:t.lang,className:"text-[11px]! leading-relaxed! [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere]"})}function O(t){let{cn:c}=y();if(!t.items.length)return e(k,{children:"新会话还没有上下文。发送第一条消息后,这里会显示构成。"});let d=t.items.reduce((s,a)=>s+a.tokens,0)||1;return n("div",{className:"space-y-2.5",children:[e("div",{className:"flex h-2 overflow-hidden rounded-full bg-raised",children:t.items.map((s,a)=>e("span",{className:c(R[a%R.length],"transition-[width] duration-300 ease-out-quint"),title:`${s.label}:${s.tokens.toLocaleString()} token`,style:{width:`${s.tokens/d*100}%`}},s.id))}),e("div",{className:"space-y-1.5",children:t.items.map((s,a)=>e(Q,{item:s,total:d,index:a,color:R[a%R.length]??"bg-accent"},s.id))})]})}function Q(t){let{cn:c,Chevron:d,CopyButton:s,style:a,useTheme:m}=y();m();let[u,x]=r(!1),g=(t.item.tokens/t.total*100).toFixed(1),l=v(()=>u&&t.item.detail?nr(t.item.detail):"",[u,t.item.detail]),p=v(()=>l?W(t.item.id,l):"markdown",[l,t.item.id]),h=v(()=>{if(!l)return"";return p==="xml"?A(l):l},[l,p]);return n("div",{"data-state":u?"open":"closed",className:a("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":u,onClick:()=>x((N)=>!N),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs",children:[e("span",{className:c("size-2 shrink-0 rounded-full",t.color),"aria-hidden":!0}),e("span",{className:"min-w-0 flex-1 truncate font-medium text-ink",children:t.item.label}),t.item.state&&e("span",{className:a("control.badge","text-[10px]"),children:D[t.item.state]}),e("span",{className:"font-mono tabular-nums text-dim",children:t.item.tokens.toLocaleString()}),n("span",{className:"w-10 text-right font-mono text-[11px] tabular-nums text-faint",children:[g,"%"]}),e(d,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),u&&n("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2 text-xs text-dim",children:[e("div",{className:"mb-2 h-1 overflow-hidden rounded-full bg-raised",children:e("div",{className:c("h-full",t.color),style:{width:`${g}%`}})}),h?n("div",{className:a("surface.subtle","group/detail relative overflow-hidden rounded-lg bg-panel/70 p-2.5"),children:[e("div",{className:"absolute right-1.5 top-1.5 z-10",children:e(s,{text:t.item.detail,size:"icon-xs",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink backdrop-blur-sm"})}),e("div",{className:"max-h-80 overflow-y-auto pr-6 text-dim",children:e(E,{code:h,lang:p})})]}):e("p",{className:"py-2 text-center text-xs text-faint",children:"(空)"})]})]})}var M=40,Y={accent:"bg-accent/15 text-accent",success:"bg-success/15 text-success",warning:"bg-warning/15 text-warning",danger:"bg-danger/15 text-danger",neutral:"bg-raised text-dim"};function L(t){let{Button:c,CopyButton:d,style:s,useTheme:a}=y();a();let[m,u]=r(M),x=i(null),g=m<t.entries.length;o(()=>{let p=x.current;if(!p||!g||typeof IntersectionObserver>"u")return;let h=new IntersectionObserver((N)=>{if(N.some((S)=>S.isIntersecting))u((S)=>Math.min(t.entries.length,S+M))},{rootMargin:"480px"});return h.observe(p),()=>h.disconnect()},[g,t.entries.length]);let l=v(()=>t.entries.slice(-m).reverse(),[t.entries,m]);if(!t.entries.length)return e(k,{children:"还没有消息。"});return n("div",{className:"space-y-1.5",children:[n("div",{className:s("surface.subtle","flex items-center justify-between px-3 py-1.5 text-xs text-faint"),children:[n("span",{children:["共 ",t.entries.length," 条记录"]}),e(d,{text:()=>t.entries.map((p)=>JSON.stringify(p,null,2)).join(`
|
|
3
3
|
|
|
4
4
|
`),size:"icon-xs",label:"复制全部原始 JSON",className:"hover:bg-raised text-faint hover:text-ink"})]}),l.map((p)=>e(ee,{entry:p},p.seq)),g&&n("div",{ref:x,className:s("surface.subtle","flex items-center justify-between bg-panel/40 px-3 py-2 text-xs text-faint"),children:[n("span",{children:["已显示 ",l.length," / ",t.entries.length," 条"]}),n("div",{className:"flex items-center gap-1.5",children:[e(c,{size:"sm",variant:"ghost",onClick:()=>u((p)=>Math.min(t.entries.length,p+M)),children:"加载更多"}),e(c,{size:"sm",variant:"ghost",onClick:()=>u(t.entries.length),children:"显示全部"})]})]})]})}var ee=B(function(c){let{Chevron:d,CopyButton:s,style:a,useTheme:m}=y();m();let[u,x]=r(!1),g=Ro(c.entry),l=v(()=>Ao(c.entry.time),[c.entry.time]);return n("div",{"data-state":u?"open":"closed",className:a("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":u,onClick:()=>x((p)=>!p),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs",children:[n("span",{className:"shrink-0 font-mono text-[10.5px] tabular-nums text-faint",children:["#",c.entry.seq]}),e("span",{className:a("control.badge","shrink-0 font-medium text-[10px]",Y[g.tone]),children:g.badge}),e("span",{className:"min-w-0 flex-1 truncate text-ink",children:g.title}),g.meta&&e("span",{className:a("control.badge","shrink-0 font-mono text-[10px] text-faint"),children:g.meta}),e("span",{className:"shrink-0 font-mono text-[10.5px] tabular-nums text-faint",children:l}),e(d,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),u&&e("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2.5 text-xs text-dim",children:n("div",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between text-[11px] text-faint",children:[n("span",{className:"font-mono",children:[c.entry.type," · #",c.entry.seq]}),e(s,{text:()=>JSON.stringify(c.entry,null,2),size:"icon-xs",label:"复制此条 JSON",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink"})]}),e(te,{entry:c.entry})]})})]})});function te(t){let{style:c,useTheme:d}=y();d();let s=t.entry;if(s.type==="user")return n("div",{className:"space-y-2",children:[s.text&&e("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-sans text-xs leading-relaxed text-ink whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),children:Pr(s.text)}),s.attachments&&s.attachments.length>0&&n("div",{className:"space-y-1",children:[n("div",{className:"text-[10.5px] font-medium text-faint",children:["附件(",s.attachments.length,")"]}),e("div",{className:"flex flex-wrap gap-1.5",children:s.attachments.map((a,m)=>{let u=a.kind==="image"?Math.floor(a.data.length*0.75):a.data.length;return n("div",{className:c("surface.subtle","inline-flex items-center gap-1.5 px-2 py-1 text-[11px]"),children:[e("span",{className:c("control.badge","text-[10px] text-faint"),children:a.kind==="image"?"图片":a.kind==="path"?"路径":"文本"}),e("span",{className:"max-w-40 truncate font-medium text-ink",children:a.name}),n("span",{className:"font-mono text-[10px] text-faint",children:[a.mimeType," · ",to(u)]})]},`${a.name}-${m}`)})})]}),s.notices&&s.notices.length>0&&n("div",{className:"space-y-1",children:[n("div",{className:"text-[10.5px] font-medium text-faint",children:["通知来源(",s.notices.length,")"]}),s.notices.map((a)=>n("div",{className:c("surface.subtle","flex items-center justify-between px-2.5 py-1.5 font-mono text-[11px]"),children:[n("span",{className:"truncate text-ink",children:[a.sourceKind,"/",a.sourceID]}),e("span",{className:"text-faint",children:a.state})]},a.dedupeKey))]})]});if(s.type==="assistant")return n("div",{className:"space-y-2",children:[n("div",{className:"font-mono text-[11px] text-faint",children:["模型:",s.model]}),s.error&&e("div",{className:"rounded-lg border border-danger/30 bg-danger/8 px-2.5 py-2 text-xs text-danger",children:s.error}),s.parts.map((a,m)=>{if(a.type==="thinking")return n("div",{className:c("surface.subtle","p-2.5 space-y-1"),children:[e("div",{className:"text-[10.5px] font-medium text-faint",children:"思考"}),e("pre",{className:"max-h-60 overflow-y-auto font-sans text-xs italic leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:Pr(a.text)})]},`thinking-${m}`);if(a.type==="text")return n("div",{className:c("surface.subtle","p-2.5 space-y-1"),children:[e("div",{className:"text-[10.5px] font-medium text-faint",children:"回复"}),e("pre",{className:"max-h-60 overflow-y-auto font-sans text-xs leading-relaxed text-ink whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:Pr(a.text)})]},`text-${m}`);return n("div",{className:c("surface.subtle","p-2.5 space-y-1.5"),children:[n("div",{className:"flex items-center justify-between gap-2 text-[11px]",children:[n("span",{className:"font-mono font-medium text-ink",children:["工具调用 · ",a.name]}),e("span",{className:"truncate font-mono text-[10px] text-faint",children:a.id})]}),e("div",{className:"max-h-60 overflow-y-auto text-dim",children:e(E,{code:nr(JSON.stringify(a.input,no,2)),lang:"json"})})]},a.id||`tool-${m}`)})]});if(s.type==="tool_result")return n("div",{className:"space-y-2",children:[n("div",{className:"flex flex-wrap items-center gap-2 font-mono text-[11px] text-faint",children:[e("span",{className:"text-ink",children:s.name}),e("span",{children:"·"}),e("span",{className:"truncate",children:s.callID}),e("span",{className:c("control.badge","ml-auto font-sans text-[10px]",s.isError?"bg-danger/15 text-danger":"text-dim"),children:s.isError?"执行失败":"执行完成"})]}),s.images&&s.images.length>0&&e("div",{className:"flex flex-wrap gap-1.5",children:s.images.map((a,m)=>n("span",{className:c("surface.subtle","px-2 py-1 font-mono text-[10.5px] text-faint"),children:["图片 #",m+1," · ",a.mimeType," · ",to(Math.floor(a.data.length*0.75))]},`${a.mimeType}-${m}`))}),gi(s.output)?e("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-words [overflow-wrap:anywhere]",s.isError?"text-danger":"text-dim"),children:Pr(s.output)}):e("p",{className:"py-1 text-faint",children:"(无文本输出)"})]});return e("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-mono text-[11px] leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),children:Lo(s)})}function j(t){let{cn:c,style:d,useTheme:s}=y();if(s(),!t.todos.length)return e(k,{children:"暂无待办。"});return e("ul",{className:"space-y-1.5",children:t.todos.map((a)=>n("li",{className:d("surface.interactive","flex items-start gap-2.5 px-3 py-2 text-xs"),children:[n("span",{className:c("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border transition-colors duration-300",a.status==="completed"&&"border-success bg-success text-panel",a.status==="in_progress"&&"border-accent",a.status==="pending"&&"border-line-strong"),children:[a.status==="completed"&&e(q,{className:"size-2.5 animate-pop",strokeWidth:3.5}),a.status==="in_progress"&&e("span",{className:"size-1.5 animate-pulse rounded-full bg-accent"})]}),e("span",{className:c("min-w-0 flex-1 break-words leading-relaxed [overflow-wrap:anywhere]",a.status==="completed"&&"text-faint line-through decoration-faint/60",a.status==="in_progress"&&"font-medium text-ink",a.status==="pending"&&"text-dim"),children:a.content})]},`${a.status}-${a.content}`))})}function F(t){let{cn:c,style:d,useTheme:s}=y();s();let[a,m]=r("all"),u=v(()=>t.tools.filter((l)=>l.deferred).length,[t.tools]),x=t.tools.length-u,g=v(()=>{if(a==="deferred")return t.tools.filter((l)=>l.deferred);if(a==="active")return t.tools.filter((l)=>!l.deferred);return t.tools},[t.tools,a]);if(!t.tools.length)return e(k,{children:"当前会话没有可用工具。"});return n("div",{className:"space-y-2",children:[u>0&&n("div",{className:"flex items-center gap-1 text-[11px]",children:[n("button",{type:"button",onClick:()=>m("all"),className:c("rounded-lg px-2 py-1 transition-colors",a==="all"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["全部 (",t.tools.length,")"]}),n("button",{type:"button",onClick:()=>m("active"),className:c("rounded-lg px-2 py-1 transition-colors",a==="active"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["常驻 (",x,")"]}),n("button",{type:"button",onClick:()=>m("deferred"),className:c("rounded-lg px-2 py-1 transition-colors",a==="deferred"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["延迟加载 (",u,")"]})]}),e("div",{className:"space-y-1.5",children:g.map((l)=>e(ae,{tool:l},`${l.group}-${l.name}`))})]})}function ae(t){let{Chevron:c,CopyButton:d,style:s,useTheme:a}=y();a();let[m,u]=r(!1),x=v(()=>m?JSON.stringify(t.tool.schema,null,2):"",[m,t.tool.schema]);return n("div",{"data-state":m?"open":"closed",className:s("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":m,onClick:()=>u((g)=>!g),className:"flex w-full items-center justify-between px-3 py-2 text-left text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 truncate font-mono text-ink",children:[e("span",{className:"truncate",children:t.tool.name}),t.tool.group&&e("span",{className:s("control.badge","font-sans text-[10px]"),children:t.tool.group}),t.tool.deferred&&e("span",{className:s("control.badge","font-sans text-[10px]"),children:"延迟加载"})]}),e(c,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),m&&n("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2 text-xs text-dim",children:[t.tool.deferred&&e("div",{className:s("surface.subtle","mb-2 px-2.5 py-1.5 text-[11px] text-faint"),children:"延迟加载:此工具默认以精简描述挂载,模型通过 toolsearch 取回定义后才向上下文注入完整参数 Schema。"}),t.tool.description&&e("pre",{className:"mb-2 max-h-60 overflow-y-auto font-sans text-xs leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:nr(t.tool.description)}),n("div",{className:s("surface.subtle","group/schema relative overflow-hidden rounded-lg p-2.5"),children:[e("div",{className:"absolute right-1.5 top-1.5 z-10",children:e(d,{text:x,size:"icon-xs",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink backdrop-blur-sm"})}),e("div",{className:"max-h-72 overflow-y-auto pr-6 text-dim",children:e(E,{code:nr(x),lang:"json"})})]})]})]})}function se(){try{let t=localStorage.getItem("basalt.contextSidebar.tab");if(t==="tools"||t==="todos"||t==="raw")return t}catch{}return"breakdown"}function ne(t){let{style:c,useTheme:d}=y();return d(),n("div",{className:c("surface.panel","bg-panel/70 px-3 py-2"),children:[e("div",{className:"text-[10px] font-medium uppercase tracking-wider text-faint",children:t.label}),e("div",{className:"mt-0.5 truncate font-mono text-xs font-semibold tabular-nums text-ink",children:t.value})]})}function Oe(t){let{Button:c,StatusChip:d,Segmented:s,cn:a,style:m,useTheme:u}=y();u();let[x,g]=r(se),[l,p]=r(()=>On.get(t.session.id)),[h,N]=r(!1),[S,I]=r(0),[H,U]=r(!1);o(()=>{let b=setTimeout(()=>U(!0),140);return()=>clearTimeout(b)},[]),o(()=>{let b=On.get(t.session.id);if(b)p(b);return yi((T,G)=>{if(T===t.session.id)p(G)})},[t.session.id]),o(()=>{let b=new AbortController;return N(!1),t.connection.request(`/api/sessions/${encodeURIComponent(t.session.id)}/context`,{signal:AbortSignal.any([b.signal,AbortSignal.timeout(15000)])}).then((T)=>{if(!b.signal.aborted)bi(t.session.id,T),p(T)},()=>{if(!b.signal.aborted)N(!0)}),()=>b.abort()},[t.connection,t.session.id,t.session.updated,t.entries.length,S]);let w=sa(l?.items??[],l?.usableWindow,l?.calibratedTokens,l?.lastInputTokens,l?.hasPendingOutput),C=la(w.percent),_=l?.lastCacheHitRate,P=l?.usage?.cacheHitRate,J=_===void 0?"—":`${(_*100).toFixed(1)}%`,Z=P===void 0?"—":`${(P*100).toFixed(1)}%`,K=(b)=>{g(b);try{localStorage.setItem("basalt.contextSidebar.tab",b)}catch{}},V=[{value:"breakdown",label:"构成"},{value:"tools",label:n("span",{className:"inline-flex items-center gap-1",children:["工具",l&&e("span",{className:"text-[10px] text-faint tabular-nums",children:l.tools.length})]})},{value:"todos",label:n("span",{className:"inline-flex items-center gap-1",children:["待办",t.session.todos.length>0&&e("span",{className:"text-[10px] text-faint tabular-nums",children:t.session.todos.length})]})},{value:"raw",label:"原始消息"}],X=n("div",{className:"px-3.5 pt-1 pb-3",children:[n("div",{className:"flex items-start justify-between gap-3",children:[n("div",{children:[e("div",{className:"text-[10.5px] font-medium uppercase tracking-wider text-faint",children:"上下文用量"}),n("div",{className:"mt-0.5 flex items-baseline gap-1.5",children:[e("span",{className:"font-mono text-xl font-semibold tabular-nums text-ink",children:l?w.totalTokens.toLocaleString():"—"}),n("span",{className:"font-mono text-xs text-dim",children:["/ ",l?.usableWindow.toLocaleString()??"—"]})]})]}),e(d,{tone:C==="overflow"||C==="near_limit"?"danger":C==="sealing"?"warning":"success",children:C==="overflow"?"预计超限":C==="near_limit"?"接近上限":C==="sealing"?"接近封存":"正常"})]}),w.percent!==null&&e("meter",{className:"sr-only","aria-label":"可用上下文窗口占比",min:0,max:100,value:Math.min(100,w.percent)}),e("div",{"aria-hidden":!0,className:a("relative mt-2.5 h-2 w-full overflow-hidden rounded-full bg-raised",!l&&"animate-pulse"),children:e("div",{className:"h-full rounded-full bg-accent transition-[width] duration-500 ease-out-quint",style:{width:`${Math.min(100,w.percent??0)}%`}})}),n("div",{className:"mt-2 flex items-center justify-between text-[11px]",children:[e("span",{className:"text-dim",children:w.percent===null?"暂无窗口数据":`${w.percent.toFixed(1)}% 可用窗口`}),n("span",{className:"text-faint",children:["总窗口 ",l?.contextWindow.toLocaleString()??"—"," · 80% 封存 · 97% 折叠"]})]}),l?.usage&&(l.usage.input>0||l.usage.output>0||l.usage.cacheRead>0||l.usage.cacheWrite>0||l.usage.cost>0)&&e("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[["Input",l.usage.input.toLocaleString()],["Output",l.usage.output.toLocaleString()],["缓存命中 当前 / 平均",`${J} / ${Z}`],["平均 TPS",l.usage.tps!==void 0?`${l.usage.tps.toFixed(1)} tok/s`:"—"]].map(([b,T])=>e(ne,{label:b,value:T},b))})]});return n(f,{children:[X,e("div",{className:"px-3 py-2",children:e(s,{value:x,onChange:K,options:V,className:"w-full grid grid-cols-4"})}),n("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[h&&!l&&n("div",{role:"alert",className:"flex items-center justify-between rounded-xl border border-danger/30 bg-danger/8 px-3 py-2 text-xs text-danger",children:[e("span",{children:"上下文加载失败。"}),e(c,{size:"sm",variant:"ghost",onClick:()=>I((b)=>b+1),children:"重试"})]}),e("div",{children:!H?e(z,{}):n(f,{children:[x==="raw"&&e(L,{entries:t.entries}),x==="todos"&&e(j,{todos:t.session.todos}),x==="breakdown"&&(l?e(O,{items:w.items}):!h?e(z,{}):null),x==="tools"&&(l?e(F,{tools:l.tools??[]}):!h?e(z,{}):null)]})},x)]})]})}export{Oe as ContextSidebar};
|