@bkm016/basalt 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/{chunk-gw05p4g3.js → chunk-053vb71h.js} +1 -1
- package/{chunk-3c330qna.js → chunk-063vbmtp.js} +2 -2
- package/{chunk-bgkegf0k.js → chunk-0javrjcm.js} +4 -4
- package/{chunk-pjr91g6k.js → chunk-10p3mb40.js} +1 -1
- package/{chunk-mkp28k1x.js → chunk-39vwrg8n.js} +2 -2
- package/{chunk-dddsrff6.js → chunk-654cny9a.js} +123 -121
- package/{chunk-8xb636vr.js → chunk-6kdgk70p.js} +2 -2
- package/{chunk-9z7sdh5e.js → chunk-6ptv4g5e.js} +1 -1
- package/{chunk-zzwjt7fp.js → chunk-75434aay.js} +1 -1
- package/{chunk-ar3dbfp9.js → chunk-7hr6zw2m.js} +1 -1
- package/{chunk-h1rypb99.js → chunk-8gw5bvh3.js} +4 -4
- package/{chunk-a4b75ekk.js → chunk-8saewt61.js} +2 -2
- package/{chunk-sqaam5ak.js → chunk-8wj32837.js} +1 -1
- package/{chunk-539ekagy.js → chunk-8wv5t0w6.js} +5 -5
- package/{chunk-aw65h276.js → chunk-8x21n7y9.js} +1 -1
- package/{chunk-0n99m9m4.js → chunk-a0c989ky.js} +1 -1
- package/{chunk-srjgvdvs.js → chunk-a5apjjcn.js} +6 -6
- package/chunk-a81p46j7.js +2 -0
- package/chunk-agsfy9w7.js +2 -0
- package/{chunk-2qcpq99g.js → chunk-arcqjt91.js} +1 -1
- package/{chunk-rxj6tct8.js → chunk-bdy4jksd.js} +1 -1
- package/{chunk-zrkh5dw7.js → chunk-benrzwea.js} +1 -1
- package/chunk-bpw6q7g0.js +3 -0
- package/{chunk-36cqq0ga.js → chunk-c7rcw9fb.js} +5 -5
- package/{chunk-x89em726.js → chunk-ca982n62.js} +1 -1
- package/chunk-d20p02ny.js +2 -0
- package/{chunk-5v4g21rw.js → chunk-d6p2hgxh.js} +1 -1
- package/{chunk-t7sc0wwc.js → chunk-dnx91jrd.js} +2 -2
- package/{chunk-mat08ab1.js → chunk-dpz4hwqb.js} +2 -2
- package/{chunk-zn0g0859.js → chunk-ebpyvs1d.js} +2 -2
- package/{chunk-00gwse5r.js → chunk-ecf896fz.js} +1 -1
- package/{chunk-0stvywr8.js → chunk-ejsneb6f.js} +1 -1
- package/{chunk-7as47pcw.js → chunk-ey15ye2h.js} +1 -1
- package/{chunk-v4k3qmdm.js → chunk-f156y565.js} +1 -1
- package/{chunk-7tgqhveh.js → chunk-f544p9rh.js} +1 -1
- package/chunk-fmq3zwzk.js +2 -0
- package/{chunk-ebzkckyw.js → chunk-fx7f4m3c.js} +1 -1
- package/{chunk-3k7ejpkc.js → chunk-g0t9c3gv.js} +1 -1
- package/{chunk-7w0mefgk.js → chunk-gv7wqkey.js} +2 -2
- package/{chunk-1xa7d5mh.js → chunk-j7yvh0ae.js} +1 -1
- package/{chunk-0j0qggej.js → chunk-n85qs7cs.js} +1 -1
- package/{chunk-7qq99360.js → chunk-n981vx1t.js} +4 -4
- package/{chunk-0fwdxd45.js → chunk-peja51xv.js} +1 -1
- package/{chunk-6dsq0fns.js → chunk-pg5nkf1y.js} +1 -1
- package/{chunk-jyrwk08p.js → chunk-prgm07j4.js} +1 -1
- package/{chunk-jvwg4rn1.js → chunk-q9dd6fhj.js} +4 -4
- package/{chunk-nxkmd29x.js → chunk-r8vvcp6c.js} +1 -1
- package/{chunk-stj493dn.js → chunk-r9aatvwm.js} +2 -2
- package/chunk-rfb85nj7.js +2 -0
- package/{chunk-980drajf.js → chunk-rfdt992v.js} +12 -12
- package/{chunk-e63c1186.js → chunk-s6dejhfj.js} +1 -1
- package/{chunk-wfyrfvfn.js → chunk-s7skpgm2.js} +1 -1
- package/{chunk-2nkfxhef.js → chunk-sjjtxpg2.js} +247 -230
- package/{chunk-r0jc8e7t.js → chunk-w67dvqtb.js} +2 -2
- package/{chunk-b9fqretv.js → chunk-whj87h4r.js} +2 -2
- package/{chunk-vt1anydc.js → chunk-y8dkfpmj.js} +3 -3
- package/{chunk-nx3jnbv8.js → chunk-z02sj1je.js} +2 -2
- package/{chunk-hq5ke1yp.js → chunk-zxkq9m8e.js} +1 -1
- package/compiled.js +3 -3
- package/package.json +1 -1
- package/ui-test-worker.js +27 -27
- package/web/{chunk-7znyd1mj.js → chunk-079091ar.js} +1 -1
- package/web/{chunk-65nwc4cf.js → chunk-083r4f80.js} +1 -1
- package/web/{chunk-h2ag4kvz.js → chunk-0cng7r2x.js} +1 -1
- package/web/chunk-0k0ande6.js +1 -0
- package/web/{chunk-14bad871.js → chunk-14deqqhr.js} +1 -1
- package/web/{chunk-pyg1mr80.js → chunk-1s53190z.js} +20 -20
- package/web/{chunk-1pasbxwh.js → chunk-2b63adsj.js} +1 -1
- package/web/{chunk-zc1mk10n.js → chunk-2cem4sv7.js} +2 -2
- package/web/{chunk-y7jq61nv.js → chunk-30b33r2w.js} +2 -2
- package/web/{chunk-xsrvw7dt.js → chunk-3baypnwn.js} +3 -3
- package/web/{chunk-s24qs1bn.js → chunk-4067nwjp.js} +6 -6
- package/web/{chunk-paywgcf7.js → chunk-4fm55fgb.js} +2 -2
- package/web/{chunk-yvgs6bm3.js → chunk-4q7wf0wd.js} +1 -1
- package/web/{chunk-g5jxwkdh.js → chunk-4sve9xrj.js} +1 -1
- package/web/{chunk-56krfj3b.js → chunk-4vjnrz87.js} +1 -1
- package/web/chunk-59678wmg.js +1 -0
- package/web/chunk-5k8sv4f5.js +1 -0
- package/web/{chunk-tcp77cp2.js → chunk-5vjhvw1m.js} +1 -1
- package/web/{chunk-f9k3xrwb.js → chunk-5wbnjjhg.js} +1 -1
- package/web/chunk-6ft5pz3c.js +1 -0
- package/web/chunk-7c8rwqtx.js +1 -0
- package/web/chunk-7qzz025k.js +1 -0
- package/web/chunk-7xbaqqd7.css +1 -0
- package/web/chunk-80eyv2mk.js +1 -0
- package/web/chunk-89paytbk.js +4 -0
- package/web/chunk-8ceej2g7.js +1 -0
- package/web/chunk-8nyhy122.js +1 -0
- package/web/{chunk-01hcjafh.js → chunk-989jq2h8.js} +1 -1
- package/web/{chunk-bnb9xhgw.js → chunk-aangfjqc.js} +6 -6
- package/web/{chunk-1cfh0e2e.js → chunk-bdydzbqk.js} +7 -7
- package/web/chunk-cpwtt6ny.js +1 -0
- package/web/{chunk-dzg1pv80.js → chunk-czjk218p.js} +3 -3
- package/web/{chunk-m8knte9z.js → chunk-dg3p8db5.js} +1 -1
- package/web/chunk-dsw5t58p.js +1 -0
- package/web/{chunk-j34q5jn6.js → chunk-dv72fat3.js} +1 -1
- package/web/{chunk-affear07.js → chunk-dvvs1jjq.js} +1 -1
- package/web/{chunk-g9sqbafw.js → chunk-e131rg6p.js} +1 -1
- package/web/{chunk-4m3zdd41.js → chunk-e8yj05t1.js} +1 -1
- package/web/chunk-ekw54h1q.js +1 -0
- package/web/{chunk-0k9aec1s.js → chunk-femhej5w.js} +3 -3
- package/web/chunk-fmthkpff.js +1 -0
- package/web/{chunk-d60dpf69.js → chunk-geh05ghh.js} +1 -1
- package/web/{chunk-892nf39p.js → chunk-gksf7cek.js} +7 -7
- package/web/{chunk-abhad4zj.js → chunk-ht4mx2dt.js} +4 -4
- package/web/chunk-hwsvhst3.js +1 -0
- package/web/{chunk-d6ddkh6e.js → chunk-k02b36g1.js} +1 -1
- package/web/{chunk-2nht58dc.js → chunk-kjacapzd.js} +1 -1
- package/web/{chunk-zz397b0v.js → chunk-kkfrs7d1.js} +1 -1
- package/web/{chunk-aqt7kc3s.js → chunk-kkyn8yhj.js} +1 -1
- package/web/chunk-mh4rx5cf.js +1 -0
- package/web/{chunk-4a4j030b.js → chunk-n448vaba.js} +1 -1
- package/web/{chunk-k67v6dyg.js → chunk-n754s8xd.js} +2 -2
- package/web/chunk-n8j88qxy.js +1 -0
- package/web/{chunk-kza0t0gj.js → chunk-nfvqjzz5.js} +1 -1
- package/web/chunk-nmpbsvwb.js +2 -0
- package/web/chunk-nws1s56b.js +1 -0
- package/web/{chunk-12z7d0hp.js → chunk-p7126wwy.js} +2 -2
- package/web/chunk-phnqnhj9.js +1 -0
- package/web/{chunk-5shygfgb.js → chunk-pjz30xcp.js} +2 -2
- package/web/{chunk-vhzys0rr.js → chunk-q3jevm51.js} +1 -1
- package/web/{chunk-advfpyb9.js → chunk-q97hn4j5.js} +4 -4
- package/web/chunk-qg31p6cn.js +1 -0
- package/web/{chunk-jcdw85mv.js → chunk-qhm3cfq9.js} +1 -1
- package/web/chunk-qsd595b9.js +1 -0
- package/web/{chunk-9xgspn75.js → chunk-r7frwjqx.js} +2 -2
- package/web/chunk-rddft5ce.js +1139 -0
- package/web/{chunk-x7sb3bwf.js → chunk-rgbdf2m9.js} +22 -22
- package/web/{chunk-fnnrrzqa.js → chunk-rsbkbg6x.js} +1 -1
- package/web/chunk-s2bs5vxh.js +2 -0
- package/web/{chunk-sd22cnjy.js → chunk-sgwccs54.js} +1 -1
- package/web/{chunk-c53xmf48.js → chunk-sjh8gtm9.js} +1 -1
- package/web/{chunk-zqht0jzx.js → chunk-sn3tkwme.js} +1 -1
- package/web/{chunk-gcv91974.js → chunk-svh4n157.js} +1 -1
- package/web/{chunk-7a3c137d.js → chunk-sy7e4dmq.js} +1 -1
- package/web/{chunk-vttgyb5v.js → chunk-t3658ehb.js} +1 -1
- package/web/{chunk-h6gh63xj.js → chunk-t6sq85s6.js} +1 -1
- package/web/{chunk-z4aj066q.js → chunk-t81p4wqc.js} +1 -1
- package/web/{chunk-qq5gh5zr.js → chunk-tewmsd7t.js} +1 -1
- package/web/chunk-tf57s7ry.js +1 -0
- package/web/{chunk-gxqaa4sv.js → chunk-tfn0rqg9.js} +5 -5
- package/web/{chunk-0qr891eq.js → chunk-tmndcktk.js} +1 -1
- package/web/chunk-tqr80b5w.js +2 -0
- package/web/{chunk-mnzramhc.js → chunk-twdy2f67.js} +1 -1
- package/web/chunk-tz4twwmw.js +2 -0
- package/web/{chunk-crzseqbx.js → chunk-v282r683.js} +1 -1
- package/web/chunk-v4vjjtn7.js +1 -0
- package/web/chunk-vbwdwcdp.js +1 -0
- package/web/{chunk-6enn8p66.js → chunk-vjngfh0q.js} +1 -1
- package/web/{chunk-g8kkc6vz.js → chunk-wbgkwxrc.js} +1 -1
- package/web/{chunk-ybw6vgf6.js → chunk-wjbk50hn.js} +1 -1
- package/web/chunk-wjy848e2.js +1 -0
- package/web/{chunk-3hkgdw6f.js → chunk-wqsczy57.js} +3 -3
- package/web/chunk-wvfmmw1v.js +8 -0
- package/web/chunk-x1jm4zsg.js +1 -0
- package/web/{chunk-26bwh1sb.js → chunk-xbpc6x9m.js} +6 -6
- package/web/{chunk-xk1t58c4.js → chunk-xckxtfp8.js} +4 -4
- package/web/{chunk-qrdh9j62.js → chunk-xmsb2g71.js} +1 -1
- package/web/{chunk-ka7c5rhx.js → chunk-y99ed8rd.js} +6 -6
- package/web/{chunk-0p1nmj5n.js → chunk-z1geewdf.js} +1 -1
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-2nb3d92s.js +0 -2
- package/chunk-2pa1z37c.js +0 -2
- package/chunk-4g5f43ea.js +0 -3
- package/chunk-eegztdzb.js +0 -2
- package/chunk-wd3z74av.js +0 -2
- package/chunk-yna8bwqc.js +0 -2
- package/web/chunk-0ytga215.js +0 -1
- package/web/chunk-1amzv4ha.js +0 -1
- package/web/chunk-1s2hp6h1.js +0 -1
- package/web/chunk-2y0rc1fe.js +0 -1
- package/web/chunk-4w298aqs.js +0 -1
- package/web/chunk-6stt9d18.js +0 -1
- package/web/chunk-7e47b1sn.js +0 -1
- package/web/chunk-7pypx5h8.js +0 -2
- package/web/chunk-9dy7z3ej.js +0 -2
- package/web/chunk-9mq2cdtq.js +0 -1
- package/web/chunk-b5hah4mf.js +0 -1
- package/web/chunk-b8tfetd8.js +0 -1
- package/web/chunk-ckgpy4r4.js +0 -1
- package/web/chunk-dbnrfxt1.js +0 -8
- package/web/chunk-ddxf8e84.js +0 -1
- package/web/chunk-e8h45nyr.js +0 -1
- package/web/chunk-ej9vb61c.js +0 -1
- package/web/chunk-fjag6yg8.js +0 -2
- package/web/chunk-gxsb5tx3.js +0 -1
- package/web/chunk-jg6fmz2d.js +0 -1
- package/web/chunk-mpfgr049.js +0 -1
- package/web/chunk-mz1dabxh.js +0 -1
- package/web/chunk-p53n0hwr.js +0 -1
- package/web/chunk-pfcnr9tw.js +0 -1
- package/web/chunk-q7xkscc5.js +0 -1
- package/web/chunk-qmbgb79a.js +0 -1139
- package/web/chunk-sfq6cw45.js +0 -2
- package/web/chunk-svqj4az8.js +0 -1
- package/web/chunk-t7jwyvvr.js +0 -1
- package/web/chunk-tf18d2dk.css +0 -1
- package/web/chunk-v0g4cqc1.js +0 -4
- package/web/chunk-vqfz99ff.js +0 -1
- package/web/chunk-zazs8p6c.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Rt}from"./chunk-rddft5ce.js";var Z={};Rt(Z,{default:()=>St});var Q={};Rt(Q,{default:()=>Yt});var Kr=typeof global=="object"&&global&&global.Object===Object&&global,q=Kr;var Hr=typeof self=="object"&&self&&self.Object===Object&&self,qr=q||Hr||Function("return this")(),xe=qr;var $r=xe.Symbol,Oe=$r;var Tt=Object.prototype,{hasOwnProperty:kr,toString:Yr}=Tt,G=Oe?Oe.toStringTag:void 0;function Xr(t){var e=kr.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(i){}var a=Yr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var wt=Xr;var Zr=Object.prototype,Jr=Zr.toString;function Qr(t){return Jr.call(t)}var Pt=Qr;var Vr="[object Null]",to="[object Undefined]",Et=Oe?Oe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return Et&&Et in Object(t)?wt(t):Pt(t)}var Qe=eo;function ro(t){return t!=null&&typeof t=="object"}var Ee=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Ee(t)&&Qe(t)==oo}var dt=ao;function fo(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var Gt=fo;var io=Array.isArray,H=io;var no=1/0,It=Oe?Oe.prototype:void 0,Lt=It?It.toString:void 0;function jt(t){if(typeof t=="string")return t;if(H(t))return Gt(t,jt)+"";if(dt(t))return Lt?Lt.call(t):"";var e=t+"";return e=="0"&&1/t==-no?"-0":e}var Mt=jt;function so(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var me=so;function po(t){return t}var it=po;var uo="[object AsyncFunction]",mo="[object Function]",lo="[object GeneratorFunction]",xo="[object Proxy]";function ho(t){if(!me(t))return!1;var e=Qe(t);return e==mo||e==lo||e==uo||e==xo}var Ht=ho;var co=xe["__core-js_shared__"],k=co;var Nt=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function go(t){return!!Nt&&Nt in t}var Dt=go;var yo=Function.prototype,_o=yo.toString;function bo(t){if(t!=null){try{return _o.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var _=bo;var vo=/[\\^$.*+?()[\]{}|]/g,Oo=/^\[object .+?Constructor\]$/,Ao=Function.prototype,To=Object.prototype,wo=Ao.toString,So=To.hasOwnProperty,Po=RegExp("^"+wo.call(So).replace(vo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Co(t){if(!me(t)||Dt(t))return!1;var e=Ht(t)?Po:Oo;return e.test(_(t))}var Bt=Co;function Eo(t,e){return t==null?void 0:t[e]}var Ut=Eo;function Io(t,e){var r=Ut(t,e);return Bt(r)?r:void 0}var h=Io;var Lo=h(xe,"WeakMap"),Y=Lo;function jo(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var zt=jo;function Mo(){}var Wt=Mo;var No=800,Do=16,Ro=Date.now;function Fo(t){var e=0,r=0;return function(){var o=Ro(),a=Do-(o-r);if(r=o,a>0){if(++e>=No)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var qt=Fo;function Bo(t){return function(){return t}}var ot=Bo;var Go=function(){try{var t=h(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),ur=Go;var Uo=!ur?it:function(t,e){return ur(t,"toString",{configurable:!0,enumerable:!1,value:ot(e),writable:!0})},$t=Uo;var zo=qt($t),da=zo;function Wo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var pa=Wo;function Ko(t,e,r,o){var a=t.length,i=r+(o?1:-1);while(o?i--:++i<a)if(e(t[i],i,t))return i;return-1}var ma=Ko;function Ho(t){return t!==t}var kt=Ho;function qo(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Jt=qo;function $o(t,e,r){return e===e?Jt(t,e,r):ma(t,kt,r)}var Qt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Qt(t,e,0)>-1}var Vt=ko;var Yo=9007199254740991,Xo=/^(?:0|[1-9]\d*)$/;function Zo(t,e){var r=typeof t;return e=e==null?Yo:e,!!e&&(r=="number"||r!="symbol"&&Xo.test(t))&&(t>-1&&t%1==0&&t<e)}var bn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var Ct=Jo;var ee=Math.max;function Qo(t,e,r){return e=ee(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,i=ee(o.length-e,0),n=Array(i);while(++a<i)n[a]=o[e+a];a=-1;var s=Array(e+1);while(++a<e)s[a]=o[a];return s[e]=r(n),zt(t,this,s)}}var fa=Qo;function Vo(t,e){return da(fa(t,e,it),t+"")}var xn=Vo;var ta=9007199254740991;function ea(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ta}var j=ea;function ra(t){return t!=null&&j(t.length)&&!Ht(t)}var $e=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var _n=aa;function ia(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var re=ia;var na="[object Arguments]";function sa(t){return Ee(t)&&Qe(t)==na}var ct=sa;var oe=Object.prototype,{hasOwnProperty:ua,propertyIsEnumerable:la}=oe,ca=ct(function(){return arguments}())?ct:function(t){return Ee(t)&&ua.call(t,"callee")&&!la.call(t,"callee")},Ft=ca;function Oa(){return!1}var ae=Oa;var ne=typeof Z=="object"&&Z&&!Z.nodeType&&Z,fe=ne&&typeof X=="object"&&X&&!X.nodeType&&X,Aa=fe&&fe.exports===ne,ie=Aa?xe.Buffer:void 0,Ta=ie?ie.isBuffer:void 0,Sa=Ta||ae,St=Sa;var Pa="[object Arguments]",Ca="[object Array]",Ea="[object Boolean]",Ia="[object Date]",La="[object Error]",ja="[object Function]",Ma="[object Map]",Na="[object Number]",Da="[object Object]",Ra="[object RegExp]",Fa="[object Set]",Ba="[object String]",Ga="[object WeakMap]",Ua="[object ArrayBuffer]",za="[object DataView]",Wa="[object Float32Array]",Ka="[object Float64Array]",Ha="[object Int8Array]",qa="[object Int16Array]",$a="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",m={};m[Wa]=m[Ka]=m[Ha]=m[qa]=m[$a]=m[Ya]=m[Xa]=m[Za]=m[Ja]=!0;m[Pa]=m[Ca]=m[Ua]=m[Ea]=m[za]=m[Ia]=m[La]=m[ja]=m[Ma]=m[Na]=m[Da]=m[Ra]=m[Fa]=m[Ba]=m[Ga]=!1;function Qa(t){return Ee(t)&&j(t.length)&&!!m[Qe(t)]}var se=Qa;function Va(t){return function(e){return t(e)}}var wn=Va;var pe=typeof Q=="object"&&Q&&!Q.nodeType&&Q,U=pe&&typeof J=="object"&&J&&!J.nodeType&&J,tf=U&&U.exports===pe,gt=tf&&q.process,ef=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return gt&>.binding&>.binding("util")}catch(e){}}(),Yt=ef;var ue=Yt&&Yt.isTypedArray,rf=ue?wn(ue):se,kn=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&Ft(t),a=!r&&!o&&St(t),i=!r&&!o&&!a&&kn(t),n=r||o||a||i,s=n?re(t.length,String):[],p=s.length;for(var u in t)if((e||af.call(t,u))&&!(n&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bn(u,p))))s.push(u);return s}var ha=ff;function nf(t,e){return function(r){return t(e(r))}}var ga=nf;var sf=ga(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!_n(t))return le(t);var e=[];for(var r in Object(t))if(uf.call(t,r)&&r!="constructor")e.push(r);return e}var dr=mf;function lf(t){return $e(t)?ha(t):dr(t)}var _e=lf;var df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xf=/^\w*$/;function hf(t,e){if(H(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||dt(t))return!0;return xf.test(t)||!df.test(t)||e!=null&&t in Object(e)}var M=hf;var cf=h(Object,"create"),b=cf;function gf(){this.__data__=b?b(null):{},this.size=0}var de=gf;function yf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var he=yf;var _f="__lodash_hash_undefined__",bf=Object.prototype,vf=bf.hasOwnProperty;function Of(t){var e=this.__data__;if(b){var r=e[t];return r===_f?void 0:r}return vf.call(e,t)?e[t]:void 0}var ce=Of;var Af=Object.prototype,Tf=Af.hasOwnProperty;function wf(t){var e=this.__data__;return b?e[t]!==void 0:Tf.call(e,t)}var ge=wf;var Sf="__lodash_hash_undefined__";function Pf(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=b&&e===void 0?Sf:e,this}var ye=Pf;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=de;N.prototype.delete=he;N.prototype.get=ce;N.prototype.has=ge;N.prototype.set=ye;var yt=N;function Cf(){this.__data__=[],this.size=0}var be=Cf;function Ef(t,e){var r=t.length;while(r--)if(Ct(t[r][0],e))return r;return-1}var O=Ef;var If=Array.prototype,Lf=If.splice;function jf(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else Lf.call(e,r,1);return--this.size,!0}var ve=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var Ae=Mf;function Nf(t){return O(this.__data__,t)>-1}var Te=Nf;function Df(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var Se=Df;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=be;D.prototype.delete=ve;D.prototype.get=Ae;D.prototype.has=Te;D.prototype.set=Se;var A=D;var Rf=h(xe,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new yt,map:new(T||A),string:new yt}}var Pe=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ce=Bf;function Gf(t,e){var r=t.__data__;return Ce(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=Gf;function Uf(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var Ie=Uf;function zf(t){return w(this,t).get(t)}var Le=zf;function Wf(t){return w(this,t).has(t)}var je=Wf;function Kf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var Me=Kf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=Pe;R.prototype.delete=Ie;R.prototype.get=Le;R.prototype.has=je;R.prototype.set=Me;var E=R;var Hf="Expected a function";function _t(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Hf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],i=r.cache;if(i.has(a))return i.get(a);var n=t.apply(this,o);return r.cache=i.set(a,n)||i,n};return r.cache=new(_t.Cache||E),r}_t.Cache=E;var Ne=_t;var qf=500;function $f(t){var e=Ne(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var De=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=De(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(kf,function(r,o,a,i){e.push(a?i.replace(Yf,"$1"):o||r)}),e}),Re=Xf;function Zf(t){return t==null?"":Mt(t)}var ya=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Re(ya(t))}var Cn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||dt(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Zt=Vf;function ti(t,e){e=Cn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Zt(e[r++])];return r&&r==o?t:void 0}var Sn=ti;function ei(t,e,r){var o=t==null?void 0:Sn(t,e);return o===void 0?r:o}var Fe=ei;function ri(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var pr=ri;var Be=Oe?Oe.isConcatSpreadable:void 0;function oi(t){return H(t)||Ft(t)||!!(Be&&t&&t[Be])}var Ue=oi;function ze(t,e,r,o,a){var i=-1,n=t.length;r||(r=Ue),a||(a=[]);while(++i<n){var s=t[i];if(e>0&&r(s))if(e>1)ze(s,e-1,r,o,a);else pr(a,s);else if(!o)a[a.length]=s}return a}var mr=ze;function ai(t,e,r,o){var a=-1,i=t==null?0:t.length;if(o&&i)r=t[++a];while(++a<i)r=e(r,t[a],a,t);return r}var We=ai;function fi(){this.__data__=new A,this.size=0}var Ke=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var He=ii;function ni(t){return this.__data__.get(t)}var qe=ni;function si(t){return this.__data__.has(t)}var ke=si;var pi=200;function ui(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<pi-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Ye=ui;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=Ke;F.prototype.delete=He;F.prototype.get=qe;F.prototype.has=ke;F.prototype.set=Ye;var Xt=F;function mi(t,e){var r=-1,o=t==null?0:t.length,a=0,i=[];while(++r<o){var n=t[r];if(e(n,r,t))i[a++]=n}return i}var V=mi;function li(){return[]}var va=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,hi=!Xe?va:function(t){if(t==null)return[];return t=Object(t),V(Xe(t),function(e){return xi.call(t,e)})},fr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:pr(o,r(t))}var ba=ci;function gi(t){return ba(t,_e,fr)}var Ur=gi;var yi=h(xe,"DataView"),tt=yi;var _i=h(xe,"Promise"),et=_i;var bi=h(xe,"Set"),S=bi;var Ze="[object Map]",vi="[object Object]",Ve="[object Promise]",tr="[object Set]",er="[object WeakMap]",rr="[object DataView]",Oi=_(tt),Ai=_(T),Ti=_(et),wi=_(S),Si=_(Y),I=Qe;if(tt&&I(new tt(new ArrayBuffer(1)))!=rr||T&&I(new T)!=Ze||et&&I(et.resolve())!=Ve||S&&I(new S)!=tr||Y&&I(new Y)!=er)I=function(t){var e=Qe(t),r=e==vi?t.constructor:void 0,o=r?_(r):"";if(o)switch(o){case Oi:return rr;case Ai:return Ze;case Ti:return Ve;case wi:return tr;case Si:return er}return e};var pt=I;var Pi=xe.Uint8Array,hr=Pi;var Ci="__lodash_hash_undefined__";function Ei(t){return this.__data__.set(t,Ci),this}var or=Ei;function Ii(t){return this.__data__.has(t)}var ar=Ii;function rt(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}rt.prototype.add=rt.prototype.push=or;rt.prototype.has=ar;var at=rt;function Li(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var ir=Li;function ji(t,e){return t.has(e)}var ft=ji;var Mi=1,Ni=2;function Di(t,e,r,o,a,i){var n=r&Mi,s=t.length,p=e.length;if(s!=p&&!(n&&p>s))return!1;var u=i.get(t),x=i.get(e);if(u&&x)return u==e&&x==t;var d=-1,l=!0,y=r&Ni?new at:void 0;i.set(t,e),i.set(e,t);while(++d<s){var c=t[d],g=e[d];if(o)var v=n?o(g,c,d,e,t,i):o(c,g,d,t,e,i);if(v!==void 0){if(v)continue;l=!1;break}if(y){if(!ir(e,function(P,C){if(!ft(y,C)&&(c===P||a(c,P,r,o,i)))return y.push(C)})){l=!1;break}}else if(!(c===g||a(c,g,r,o,i))){l=!1;break}}return i.delete(t),i.delete(e),l}var nt=Di;function Ri(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var nr=Ri;function Fi(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=Fi;var Bi=1,Gi=2,Ui="[object Boolean]",zi="[object Date]",Wi="[object Error]",Ki="[object Map]",Hi="[object Number]",qi="[object RegExp]",$i="[object Set]",ki="[object String]",Yi="[object Symbol]",Xi="[object ArrayBuffer]",Zi="[object DataView]",sr=Oe?Oe.prototype:void 0,bt=sr?sr.valueOf:void 0;function Ji(t,e,r,o,a,i,n){switch(r){case Zi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xi:if(t.byteLength!=e.byteLength||!i(new hr(t),new hr(e)))return!1;return!0;case Ui:case zi:case Hi:return Ct(+t,+e);case Wi:return t.name==e.name&&t.message==e.message;case qi:case ki:return t==e+"";case Ki:var s=nr;case $i:var p=o&Bi;if(s||(s=B),t.size!=e.size&&!p)return!1;var u=n.get(t);if(u)return u==e;o|=Gi,n.set(t,e);var x=nt(s(t),s(e),o,a,i,n);return n.delete(t),x;case Yi:if(bt)return bt.call(t)==bt.call(e)}return!1}var lr=Ji;var Qi=1,Vi=Object.prototype,tn=Vi.hasOwnProperty;function en(t,e,r,o,a,i){var n=r&Qi,s=Ur(t),p=s.length,u=Ur(e),x=u.length;if(p!=x&&!n)return!1;var d=p;while(d--){var l=s[d];if(!(n?l in e:tn.call(e,l)))return!1}var y=i.get(t),c=i.get(e);if(y&&c)return y==e&&c==t;var g=!0;i.set(t,e),i.set(e,t);var v=n;while(++d<p){l=s[d];var P=t[l],C=e[l];if(o)var At=n?o(C,P,l,e,t,i):o(P,C,l,t,e,i);if(!(At===void 0?P===C||a(P,C,r,o,i):At)){g=!1;break}v||(v=l=="constructor")}if(g&&!v){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))g=!1}return i.delete(t),i.delete(e),g}var xr=en;var rn=1,cr="[object Arguments]",_r="[object Array]",st="[object Object]",on=Object.prototype,br=on.hasOwnProperty;function an(t,e,r,o,a,i){var n=H(t),s=H(e),p=n?_r:pt(t),u=s?_r:pt(e);p=p==cr?st:p,u=u==cr?st:u;var x=p==st,d=u==st,l=p==u;if(l&&St(t)){if(!St(e))return!1;n=!0,x=!1}if(l&&!x)return i||(i=new Xt),n||kn(t)?nt(t,e,r,o,a,i):lr(t,e,p,r,o,a,i);if(!(r&rn)){var y=x&&br.call(t,"__wrapped__"),c=d&&br.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return i||(i=new Xt),a(g,v,r,o,i)}}if(!l)return!1;return i||(i=new Xt),xr(t,e,r,o,a,i)}var Or=an;function Ar(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!Ee(t)&&!Ee(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var ut=Ar;var fn=1,nn=2;function sn(t,e,r,o){var a=r.length,i=a,n=!o;if(t==null)return!i;t=Object(t);while(a--){var s=r[a];if(n&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}while(++a<i){s=r[a];var p=s[0],u=t[p],x=s[1];if(n&&s[2]){if(u===void 0&&!(p in t))return!1}else{var d=new Xt;if(o)var l=o(u,x,p,t,e,d);if(!(l===void 0?ut(x,u,fn|nn,o,d):l))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!me(t)}var lt=pn;function un(t){var e=_e(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,lt(a)]}return e}var wr=un;function mn(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var xt=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return xt(e[0][0],e[0][1]);return function(r){return r===t||Tr(r,t,e)}}var Sr=ln;function dn(t,e){return t!=null&&e in Object(t)}var Pr=dn;function hn(t,e,r){e=Cn(e,t);var o=-1,a=e.length,i=!1;while(++o<a){var n=Zt(e[o]);if(!(i=t!=null&&r(t,n)))break;t=t[n]}if(i||++o!=a)return i;return a=t==null?0:t.length,!!a&&j(a)&&bn(n,a)&&(H(t)||Ft(t))}var xa=hn;function cn(t,e){return t!=null&&xa(t,e,Pr)}var _a=cn;var gn=1,yn=2;function vn(t,e){if(M(t)&<(e))return xt(Zt(t),e);return function(r){var o=Fe(r,t);return o===void 0&&o===e?_a(r,t):ut(e,o,gn|yn)}}var Cr=vn;function On(t){return function(e){return e==null?void 0:e[t]}}var wa=On;function An(t){return function(e){return Sn(e,t)}}var Er=An;function Pn(t){return M(t)?wa(Zt(t)):Er(t)}var Ir=Pn;function En(t){if(typeof t=="function")return t;if(t==null)return it;if(typeof t=="object")return H(t)?Cr(t[0],t[1]):Sr(t);return Ir(t)}var Ge=En;function In(t){return function(e,r,o){var a=-1,i=Object(e),n=o(e),s=n.length;while(s--){var p=n[t?s:++a];if(r(i[p],p,i)===!1)break}return e}}var Lr=In;var Ln=Lr(),gr=Ln;function jn(t,e){return t&&gr(t,e,_e)}var yr=jn;function Mn(t,e){return function(r,o){if(r==null)return r;if(!$e(r))return t(r,o);var a=r.length,i=e?a:-1,n=Object(r);while(e?i--:++i<a)if(o(n[i],i,n)===!1)break;return r}}var jr=Mn;var Nn=jr(yr),Tn=Nn;function Dn(t){return Ee(t)&&$e(t)}var ka=Dn;function Rn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var Mr=Rn;function Fn(t){return typeof t=="function"?t:it}var vr=Fn;function Bn(t,e){var r=H(t)?pa:Tn;return r(t,vr(e))}var f=Bn;function Gn(t,e){var r=[];return Tn(t,function(o,a,i){if(e(o,a,i))r.push(o)}),r}var Nr=Gn;function Un(t,e){var r=H(t)?V:Nr;return r(t,Ge(e,3))}var Je=Un;function zn(t,e){return Gt(e,function(r){return t[r]})}var Dr=zn;function Wn(t){return t==null?[]:Dr(t,_e(t))}var mt=Wn;var Kn="[object Map]",Hn="[object Set]",qn=Object.prototype,$n=qn.hasOwnProperty;function Yn(t){if(t==null)return!0;if($e(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||St(t)||kn(t)||Ft(t)))return!t.length;var e=pt(t);if(e==Kn||e==Hn)return!t.size;if(_n(t))return!dr(t).length;for(var r in t)if($n.call(t,r))return!1;return!0}var ht=Yn;function Xn(t){return t===void 0}var we=Xn;function Zn(t,e,r,o,a){return a(t,function(i,n,s){r=o?(o=!1,i):e(r,i,n,s)}),r}var Rr=Zn;function Jn(t,e,r){var o=H(t)?We:Rr,a=arguments.length<3;return o(t,Ge(e,4),r,a,Tn)}var Kt=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?Wt:function(t){return new S(t)},Fr=Vn;var ts=200;function es(t,e,r){var o=-1,a=Vt,i=t.length,n=!0,s=[],p=s;if(r)n=!1,a=Mr;else if(i>=ts){var u=e?null:Fr(t);if(u)return B(u);n=!1,a=ft,p=new at}else p=e?[]:s;t:while(++o<i){var x=t[o],d=e?e(x):x;if(x=r||x!==0?x:0,n&&d===d){var l=p.length;while(l--)if(p[l]===d)continue t;if(e)p.push(d);s.push(x)}else if(!a(p,d,r)){if(p!==s)p.push(d);s.push(x)}}return s}var Br=es;var rs=xn(function(t){return Br(mr(t,1,ka,!0))}),vt=rs;var as="\x00",L="\x00",Gr="\x01";class te{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ot(void 0),this._defaultEdgeLabelFn=ot(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!Ht(t))t=ot(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return _e(this._nodes)}sources(){var t=this;return Je(this.nodes(),function(e){return ht(t._in[e])})}sinks(){var t=this;return Je(this.nodes(),function(e){return ht(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return f(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],f(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];f(_e(this._in[t]),e),delete this._in[t],delete this._preds[t],f(_e(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(we(e))e=L;else{e+="";for(var r=e;!we(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(we(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return _e(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return _e(e)}successors(t){var e=this._sucs[t];if(e)return _e(e)}neighbors(t){var e=this.predecessors(t);if(e)return vt(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;f(this._nodes,function(i,n){if(t(n))e.setNode(n,i)}),f(this._edgeObjs,function(i){if(e.hasNode(i.v)&&e.hasNode(i.w))e.setEdge(i,r.edge(i))});var o={};function a(i){var n=r.parent(i);if(n===void 0||e.hasNode(n))return o[i]=n,n;else if(n in o)return o[n];else return a(n)}if(this._isCompound)f(e.nodes(),function(i){e.setParent(i,a(i))});return e}setDefaultEdgeLabel(t){if(!Ht(t))t=ot(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return mt(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Kt(t,function(a,i){if(o.length>1)r.setEdge(a,i,e);else r.setEdge(a,i);return i}),this}setEdge(){var t,e,r,o,a=!1,i=arguments[0];if(typeof i==="object"&&i!==null&&"v"in i){if(t=i.v,e=i.w,r=i.name,arguments.length===2)o=arguments[1],a=!0}else if(t=i,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!we(r))r=""+r;var n=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n)){if(a)this._edgeLabels[n]=o;return this}if(!we(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[n]=a?o:this._defaultEdgeLabelFn(t,e,r);var s=fs(this._isDirected,t,e,r);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[n]=s,zr(this._preds[e],t),zr(this._sucs[t],e),this._in[e][n]=s,this._out[t][n]=s,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Wr(this._preds[e],t),Wr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=mt(r);if(!e)return o;return Je(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=mt(r);if(!e)return o;return Je(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}te.prototype._nodeCount=0;te.prototype._edgeCount=0;function zr(t,e){if(t[e])t[e]++;else t[e]=1}function Wr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}return a+Gr+i+Gr+(we(o)?as:o)}function fs(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}var s={v:a,w:i};if(o)s.name=o;return s}function Ot(t,e){return z(t,e.v,e.w,e.name)}
|
|
2
|
+
export{xe,Oe,Qe,Ee,dt,Gt,H,me,it,Ht,ot,ur,da,pa,ma,bn,Ct,fa,xn,$e,_n,Ft,St,wn,Yt,kn,ha,ga,dr,_e,ya,Cn,Zt,Sn,pr,mr,Xt,va,fr,ba,Ur,pt,hr,xa,_a,wa,Ge,gr,yr,Tn,ka,vr,f,Je,mt,we,Kt,te};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{G}from"./chunk-
|
|
1
|
+
import{G}from"./chunk-14deqqhr.js";import{e,a,D,b,B,C,S,E,T,A,R,L,V,U}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";var N=D.packet,F=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T}static{e(this,"PacketDB")}getConfig(){let t=U({...N,...b().packet});if(t.showBits)t.paddingY+=10;return t}getPacket(){return this.packet}pushWord(t){if(t.length>0)this.packet.push(t)}clear(){C(),this.packet=[]}},M=1e4,Y=e((t,r)=>{G(t,r);let i=-1,s=[],l=1,{bitsPerRow:d}=r.getConfig();for(let{start:o,end:n,bits:g,label:f}of t.blocks){if(o!==void 0&&n!==void 0&&n<o)throw Error(`Packet block ${o} - ${n} is invalid. End must be greater than start.`);if(o??=i+1,o!==i+1)throw Error(`Packet block ${o} - ${n??o} is not contiguous. It should start from ${i+1}.`);if(g===0)throw Error(`Packet block ${o} is invalid. Cannot have a zero bit field.`);n??=o+(g??1)-1,g??=n-o+1,i=n,a.debug(`Packet block ${o} - ${i} with label ${f}`);while(s.length<=d+1&&r.getPacket().length<M){let[p,h]=I({start:o,end:n,bits:g,label:f},l,d);if(s.push(p),p.end+1===l*d)r.pushWord(s),s=[],l++;if(!h)break;({start:o,end:n,bits:g,label:f}=h)}}r.pushWord(s)},"populate"),I=e((t,r,i)=>{if(t.start===void 0)throw Error("start should have been set during first phase");if(t.end===void 0)throw Error("end should have been set during first phase");if(t.start>t.end)throw Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=r*i)return[t,void 0];let s=r*i-1,l=r*i;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:l,end:t.end,label:t.label,bits:t.end-l}]},"getNextFittingBlock"),P={parser:{yy:void 0},parse:e(async(t)=>{let r=await X("packet",t),i=P.parser?.yy;if(!(i instanceof F))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");a.debug(r),Y(r,i)},"parse")},O=e((t,r,i,s)=>{let l=s.db,d=l.getConfig(),{rowHeight:o,paddingY:n,bitWidth:g,bitsPerRow:f}=d,p=l.getPacket(),h=l.getDiagramTitle(),w=o+n,c=w*(p.length+1)-(h?0:o),k=g*f+2,m=V(r);m.attr("viewBox",`0 0 ${k} ${c}`),B(m,c,k,d.useMaxWidth);for(let[y,u]of p.entries())j(m,u,y,d);m.append("text").text(h).attr("x",k/2).attr("y",c-w/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),j=e((t,r,i,{rowHeight:s,paddingX:l,paddingY:d,bitWidth:o,bitsPerRow:n,showBits:g,bitOrder:f})=>{let p=t.append("g"),h=i*(s+d)+d,w=f==="descending";for(let c of r){let k=c.end-c.start+1,m=c.start%n,u=(w?n-m-k:m)*o+1,v=k*o-l;if(p.append("rect").attr("x",u).attr("y",h).attr("width",v).attr("height",s).attr("class","packetBlock"),p.append("text").attr("x",u+v/2).attr("y",h+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),!g)continue;let[W,_]=w?[c.end,c.start]:[c.start,c.end],x=k===1,z=h-2;if(p.append("text").attr("x",u+(x?v/2:0)).attr("y",z).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",x?"middle":"start").text(W),!x)p.append("text").attr("x",u+v).attr("y",z).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(_)}},"drawWord"),H={draw:O},K={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=e(({packet:t}={})=>{let r=U(K,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${r.byteFontSize};
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Si}from"./chunk-2cem4sv7.js";export{Si as createTreeViewServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-1s53190z.js";import"./chunk-5vjhvw1m.js";import{Co}from"./chunk-femhej5w.js";import"./chunk-dg3p8db5.js";import"./chunk-tqr80b5w.js";import"./chunk-r7frwjqx.js";import"./chunk-989jq2h8.js";export{Co as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,
|
|
1
|
+
import{r,g,t,n,_,s,Z,ae,j,lt}from"./chunk-rddft5ce.js";var I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],h=s("circle-slash",I);function R(o){let{Button:N,Panel:y,style:k}=_(),e=o.payload,[i,c]=r(!1),[b,C]=r(!1),[l,p]=r();if(!e)return null;let a=b?"killed":e.state,m=a==="running",d=a==="exited"&&e.code===0,u=a==="killed"||a==="timeout",f=e.output?.trim(),P=async()=>{if(i)return;c(!0),p(void 0);try{await o.connection.request(`/api/sessions/${encodeURIComponent(o.sessionID)}/jobs/${encodeURIComponent(e.id)}/kill`,{method:"POST"}),C(!0)}catch(x){p(x instanceof Error?x.message:"停止失败,后台任务可能已结束")}finally{c(!1)}};return n(y,{className:"my-2",header:n(g,{children:[t(lt,{className:"size-3.5 shrink-0 text-faint"}),t("span",{className:"truncate font-mono text-ink/90",title:e.command??e.id,children:e.command??`任务 ${e.id}`})]}),actions:n(g,{children:[m&&n(g,{children:[n("span",{className:"flex items-center gap-1 text-warning",children:[t(ae,{className:"size-3.5 animate-spin"}),t("span",{children:"后台运行中"})]}),t(N,{size:"sm",variant:"danger-ghost",className:"h-6 rounded-md px-2 text-xs",disabled:i,onClick:()=>{P()},children:"停止"})]}),d&&n("span",{className:"flex items-center gap-1 text-success",children:[t(j,{className:"size-3.5"}),t("span",{children:"已完成"})]}),u&&n("span",{className:"flex items-center gap-1 text-faint",children:[t(h,{className:"size-3.5"}),t("span",{children:a==="timeout"?"已超时":"已停止"})]}),!m&&!d&&!u&&n("span",{className:"flex items-center gap-1 text-danger",children:[t(Z,{className:"size-3.5"}),n("span",{children:["退出码 ",e.code??"异常"]})]})]}),children:[l&&t("p",{role:"status",className:"border-b border-line px-4 py-2.5 text-xs text-danger",children:l}),f&&t("pre",{className:k("chat.toolOutput","max-h-60 text-ink/90 select-text"),children:f})]})}export{R as BashJobCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h,o,i,r,t,n,_,Z,
|
|
1
|
+
import{h,o,i,r,t,n,_,Z,ee,at,bt}from"./chunk-rddft5ce.js";import{vn}from"./chunk-t3658ehb.js";var I={config:"自定义路径",env:"环境变量",system:"系统预装"};function L({connection:p,onClose:S}){let{Button:m,Input:O,Switch:C,SettingGroup:N,SettingRow:v,cn:w}=_(),[b,B]=r({}),[a,g]=r({}),[l,y]=r(null),[u,A]=r(!0),[k,z]=r(!1),[d,R]=r(!1),[f,c]=r(null),P=i(null),q=(a.executable??"")!==(b.executable??"")||Boolean(a.noSandbox)!==Boolean(b.noSandbox)||Boolean(a.ignoreCertErrors)!==Boolean(b.ignoreCertErrors),E=h(async(e)=>{z(!0);try{let s=await p.request("/api/plugins/browser/status",{signal:e});y(s)}catch(s){if(!e?.aborted)y({available:!1,error:s instanceof Error?s.message:"无法获取浏览器状态"})}finally{if(!e?.aborted)z(!1)}},[p]);o(()=>{let e=new AbortController;return P.current=e,Promise.all([p.request("/api/plugins/browser/settings",{signal:e.signal}),p.request("/api/plugins/browser/status",{signal:e.signal})]).then(([s,x])=>{if(!e.signal.aborted)B(s),g(s),y(x)}).catch((s)=>{if(!e.signal.aborted)c({type:"error",text:s instanceof Error?s.message:"读取浏览器设置失败"})}).finally(()=>{if(!e.signal.aborted)A(!1)}),()=>e.abort()},[p]);let T=async(e)=>{if(e?.preventDefault(),d||u)return;let s=new AbortController;R(!0),c(null);try{if(await p.request("/api/plugins/browser/settings",{method:"PATCH",signal:s.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),!s.signal.aborted)B(a),c({type:"success",text:"设置已保存,将在浏览器进程下次启动时生效。"}),await E(s.signal)}catch(x){if(!s.signal.aborted)c({type:"error",text:x instanceof Error?x.message:"保存设置失败"})}finally{if(!s.signal.aborted)R(!1)}},G=()=>{g(b),c(null)};return n("div",{className:"min-w-0 space-y-6",children:[t(N,{title:"运行环境",action:n(m,{size:"sm",variant:"ghost",disabled:u||k,onClick:()=>void E(),className:"h-8 px-2.5 text-xs text-dim hover:text-ink",children:[t(ee,{className:w("mr-1.5 size-3.5",k&&"animate-spin")}),"重新检测"]}),children:t("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4",children:n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-2",children:[t("span",{className:w("size-2 shrink-0 rounded-full",l?.available?"bg-success shadow-[0_0_8px_var(--color-success)]":"bg-danger")}),t("span",{className:"text-sm font-medium text-ink",children:l?l.available?"浏览器可用":"未检测到可用浏览器":"正在检测…"}),l?.available&&l.source&&t("span",{className:"rounded-md bg-raised px-2 py-0.5 text-xs text-dim",children:I[l.source]??l.source})]}),l&&!l.available&&l.error&&t("p",{className:"mt-2 text-xs leading-5 text-danger",children:l.error})]})})}),n("form",{onSubmit:T,children:[n(N,{title:"启动参数",children:[t(v,{vertical:!0,title:"可执行文件路径",children:n("div",{className:"flex gap-2",children:[t(O,{id:"browser-executable",disabled:u||d,value:a.executable??"",placeholder:"留空自动探测系统浏览器",onChange:(e)=>{g({...a,executable:e.target.value}),c(null)}}),a.executable&&t(m,{type:"button",variant:"ghost",size:"sm",disabled:u||d,onClick:()=>{g({...a,executable:""}),c(null)},className:"shrink-0",children:"清空"})]})}),t(v,{title:"禁用沙箱 (--no-sandbox)",description:"容器或 root 环境使用",children:t(C,{label:"禁用沙箱",disabled:u||d,checked:a.noSandbox??!1,onCheckedChange:(e)=>{g({...a,noSandbox:e}),c(null)}})}),t(v,{title:"忽略证书错误 (--ignore-certificate-errors)",description:"跳过自签名与证书有效性检查",children:t(C,{label:"忽略证书错误",disabled:u||d,checked:a.ignoreCertErrors??!1,onCheckedChange:(e)=>{g({...a,ignoreCertErrors:e}),c(null)}})})]}),n("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3 px-0.5",children:[t("div",{className:"min-w-0 flex-1",children:f&&n("div",{className:w("flex items-center gap-2 text-xs",f.type==="success"?"text-success":"text-danger"),children:[f.type==="success"?t(vn,{className:"size-3.5 shrink-0"}):t(Z,{className:"size-3.5 shrink-0"}),t("span",{children:f.text})]})}),n("div",{className:"flex items-center gap-2",children:[q&&n(m,{type:"button",variant:"ghost",size:"sm",disabled:u||d,onClick:G,children:[t(at,{className:"mr-1.5 size-3.5"}),"重置"]}),n(m,{type:"submit",variant:"primary",size:"sm",disabled:u||d,children:[t(bt,{className:"mr-1.5 size-3.5"}),d?"保存中…":"保存"]}),S&&t(m,{type:"button",variant:"secondary",size:"sm",onClick:S,children:"关闭"})]})]})]})]})}export{L as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
1
|
+
import{e}from"./chunk-1s53190z.js";var yn=class{constructor(t){this.init=t,this.records=this.init()}static{e(this,"ImperativeState")}reset(){this.records=this.init()}};
|
|
2
2
|
export{yn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ki}from"./chunk-2cem4sv7.js";export{ki as createPacketServices};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{G}from"./chunk-14bad871.js";import{e,a,D,b,O,ft,C,S,E,T,A,R,L,l,p,V,Fi,Dn,nt,U,ze,Ie}from"./chunk-pyg1mr80.js";import{X}from"./chunk-zc1mk10n.js";import{ct,lr}from"./chunk-892nf39p.js";import{Se,Te}from"./chunk-qmbgb79a.js";var gt=Te(function(rt,st){(function(i,s){if(typeof rt==="object"&&typeof st==="object")st.exports=s(lr());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof rt==="object")rt.cytoscapeFcose=s(lr());else i.cytoscapeFcose=s(i.coseBase)})(rt,function(t){return(()=>{var i={658:(N)=>{N.exports=Object.assign!=null?Object.assign.bind(Object):function(B){for(var v=arguments.length,I=Array(v>1?v-1:0),c=1;c<v;c++)I[c-1]=arguments[c];return I.forEach(function(y){Object.keys(y).forEach(function(d){return B[d]=y[d]})}),B}},548:(N,B,v)=>{var I=function(){function d(f,u){var g=[],r=!0,_=!1,F=void 0;try{for(var o=f[Symbol.iterator](),h;!(r=(h=o.next()).done);r=!0)if(g.push(h.value),u&&g.length===u)break}catch(k){_=!0,F=k}finally{try{if(!r&&o.return)o.return()}finally{if(_)throw F}}return g}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return d(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=v(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(d){var f={};for(var u=0;u<d.length;u++)f[d[u].id()]=!0;var g=d.filter(function(r,_){if(typeof r==="number")r=_;var F=r.parent()[0];while(F!=null){if(f[F.id()])return!1;F=F.parent()[0]}return!0});return g},y.connectComponents=function(d,f,u,g){var r=new c,_=new Set,F=[],o=void 0,h=void 0,k=void 0,n=!1,P=1,j=[],M=[],q=function(){var x=d.collection();M.push(x);var H=u[0],Z=d.collection();Z.merge(H).merge(H.descendants().intersection(f)),F.push(H),Z.forEach(function(re){r.push(re),_.add(re),x.merge(re)});var Q=function(){H=r.shift();var ue=d.collection();H.neighborhood().nodes().forEach(function(W){if(f.intersection(H.edgesWith(W)).length>0)ue.merge(W)});for(var Le=0;Le<ue.length;Le++){var $e=ue[Le];if(o=u.intersection($e.union($e.ancestors())),o!=null&&!_.has(o[0])){var de=o.union(o.descendants());de.forEach(function(W){if(r.push(W),_.add(W),x.merge(W),u.has(W))F.push(W)})}}};while(r.length!=0)Q();if(x.forEach(function(re){f.intersection(re.connectedEdges()).forEach(function(ue){if(x.has(ue.source())&&x.has(ue.target()))x.merge(ue)})}),F.length==u.length)n=!0;if(!n||n&&P>1){h=F[0],k=h.connectedEdges().length,F.forEach(function(re){if(re.connectedEdges().length<k)k=re.connectedEdges().length,h=re}),j.push(h.id());var se=d.collection();se.merge(F[0]),F.forEach(function(re){se.merge(re)}),F=[],u=u.difference(se),P++}};do q();while(!n);if(g){if(j.length>0)g.set("dummy"+(g.size+1),j)}return M},y.relocateComponent=function(d,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:_,NEGATIVE_INFINITY:F}=Number;if(u.quality=="draft"){var o=!0,h=!1,k=void 0;try{for(var n=f.nodeIndexes[Symbol.iterator](),P;!(o=(P=n.next()).done);o=!0){var j=P.value,M=I(j,2),q=M[0],Y=M[1],x=u.cy.getElementById(q);if(x){var H=x.boundingBox(),Z=f.xCoords[Y]-H.w/2,Q=f.xCoords[Y]+H.w/2,se=f.yCoords[Y]-H.h/2,re=f.yCoords[Y]+H.h/2;if(Z<g)g=Z;if(Q>r)r=Q;if(se<_)_=se;if(re>F)F=re}}}catch(W){h=!0,k=W}finally{try{if(!o&&n.return)n.return()}finally{if(h)throw k}}var ue=d.x-(r+g)/2,Le=d.y-(F+_)/2;f.xCoords=f.xCoords.map(function(W){return W+ue}),f.yCoords=f.yCoords.map(function(W){return W+Le})}else{Object.keys(f).forEach(function(W){var oe=f[W],Ne=oe.getRect().x,ke=oe.getRect().x+oe.getRect().width,De=oe.getRect().y,xe=oe.getRect().y+oe.getRect().height;if(Ne<g)g=Ne;if(ke>r)r=ke;if(De<_)_=De;if(xe>F)F=xe});var $e=d.x-(r+g)/2,de=d.y-(F+_)/2;Object.keys(f).forEach(function(W){var oe=f[W];oe.setCenter(oe.getCenterX()+$e,oe.getCenterY()+de)})}}},y.calcBoundingBox=function(d,f,u,g){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:_,MAX_SAFE_INTEGER:F,MIN_SAFE_INTEGER:o}=Number,h=void 0,k=void 0,n=void 0,P=void 0,j=d.descendants().not(":parent"),M=j.length;for(var q=0;q<M;q++){var Y=j[q];if(h=f[g.get(Y.id())]-Y.width()/2,k=f[g.get(Y.id())]+Y.width()/2,n=u[g.get(Y.id())]-Y.height()/2,P=u[g.get(Y.id())]+Y.height()/2,r>h)r=h;if(_<k)_=k;if(F>n)F=n;if(o<P)o=P}var x={};return x.topLeftX=r,x.topLeftY=F,x.width=_-r,x.height=o-F,x},y.calcParentsWithoutChildren=function(d,f){var u=d.collection();return f.nodes(":parent").forEach(function(g){var r=!1;if(g.children().forEach(function(_){if(_.css("display")!="none")r=!0}),!r)u.merge(g)}),u},N.exports=y},816:(N,B,v)=>{var I=v(548),c=v(140).CoSELayout,y=v(140).CoSENode,d=v(140).layoutBase.PointD,f=v(140).layoutBase.DimensionD,u=v(140).layoutBase.LayoutConstants,g=v(140).layoutBase.FDLayoutConstants,r=v(140).CoSEConstants,_=function(o,h){var{cy:k,eles:n}=o,P=n.nodes(),j=n.edges(),M=void 0,q=void 0,Y=void 0,x={};if(o.randomize)M=h.nodeIndexes,q=h.xCoords,Y=h.yCoords;var H=function(W){return typeof W==="function"},Z=function(W,oe){if(H(W))return W(oe);else return W},Q=I.calcParentsWithoutChildren(k,n),se=function de(W,oe,Ne,ke){var De=oe.length;for(var xe=0;xe<De;xe++){var J=oe[xe],Ae=null;if(J.intersection(Q).length==0)Ae=J.children();var ie=void 0,ve=J.layoutDimensions({nodeDimensionsIncludeLabels:ke.nodeDimensionsIncludeLabels});if(J.outerWidth()!=null&&J.outerHeight()!=null)if(ke.randomize)if(!J.isParent())ie=W.add(new y(Ne.graphManager,new d(q[M.get(J.id())]-ve.w/2,Y[M.get(J.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var Me=I.calcBoundingBox(J,q,Y,M);if(J.intersection(Q).length==0)ie=W.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(Me.width,Me.height)));else ie=W.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else ie=W.add(new y(Ne.graphManager,new d(J.position("x")-ve.w/2,J.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else ie=W.add(new y(this.graphManager));if(ie.id=J.data("id"),ie.nodeRepulsion=Z(ke.nodeRepulsion,J),ie.paddingLeft=parseInt(J.css("padding")),ie.paddingTop=parseInt(J.css("padding")),ie.paddingRight=parseInt(J.css("padding")),ie.paddingBottom=parseInt(J.css("padding")),ke.nodeDimensionsIncludeLabels)ie.labelWidth=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ie.labelHeight=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ie.labelPosVertical=J.css("text-valign"),ie.labelPosHorizontal=J.css("text-halign");if(x[J.data("id")]=ie,isNaN(ie.rect.x))ie.rect.x=0;if(isNaN(ie.rect.y))ie.rect.y=0;if(Ae!=null&&Ae.length>0){var Ge=void 0;Ge=Ne.getGraphManager().add(Ne.newGraph(),ie),de(Ge,Ae,Ne,ke)}}},re=function(W,oe,Ne){var ke=0,De=0;for(var xe=0;xe<Ne.length;xe++){var J=Ne[xe],Ae=x[J.data("source")],ie=x[J.data("target")];if(Ae&&ie&&Ae!==ie&&Ae.getEdgesBetween(ie).length==0){var ve=oe.add(W.newEdge(),Ae,ie);ve.id=J.id(),ve.idealLength=Z(o.idealEdgeLength,J),ve.edgeElasticity=Z(o.edgeElasticity,J),ke+=ve.idealLength,De++}}if(o.idealEdgeLength!=null){if(De>0)r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ke/De;else if(!H(o.idealEdgeLength))r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50;r.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH}},ue=function(W,oe){if(oe.fixedNodeConstraint)W.constraints.fixedNodeConstraint=oe.fixedNodeConstraint;if(oe.alignmentConstraint)W.constraints.alignmentConstraint=oe.alignmentConstraint;if(oe.relativePlacementConstraint)W.constraints.relativePlacementConstraint=oe.relativePlacementConstraint};if(o.nestingFactor!=null)r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)r.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)r.MAX_ITERATIONS=g.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)r.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)r.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)r.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=g.ANIMATE=u.ANIMATE=o.animate,r.TILE=o.tile,r.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!1;if(o.step=="enforced")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!1;if(o.step=="cose")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)r.TREE_REDUCTION_ON_INCREMENTAL=!1;else r.TREE_REDUCTION_ON_INCREMENTAL=!0;var Le=new c,$e=Le.newGraphManager();return se($e.addRoot(),I.getTopMostNodes(P),Le,o),re(Le,$e,j),ue(Le,o),Le.runLayout(),x};N.exports={coseLayout:_}},212:(N,B,v)=>{var I=function(){function o(h,k){for(var n=0;n<k.length;n++){var P=k[n];if(P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P)P.writable=!0;Object.defineProperty(h,P.key,P)}}return function(h,k,n){if(k)o(h.prototype,k);if(n)o(h,n);return h}}();function c(o,h){if(!(o instanceof h))throw TypeError("Cannot call a class as a function")}var y=v(658),d=v(548),f=v(657),u=f.spectralLayout,g=v(816),r=g.coseLayout,_=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),F=function(){function o(h){c(this,o),this.options=y({},_,h)}return I(o,[{key:"run",value:function(){var k=this,n=this.options,{cy:P,eles:j}=n,M=[],q=void 0,Y=void 0,x=[],H=void 0,Z=[];if(n.fixedNodeConstraint&&(!Array.isArray(n.fixedNodeConstraint)||n.fixedNodeConstraint.length==0))n.fixedNodeConstraint=void 0;if(n.alignmentConstraint){if(n.alignmentConstraint.vertical&&(!Array.isArray(n.alignmentConstraint.vertical)||n.alignmentConstraint.vertical.length==0))n.alignmentConstraint.vertical=void 0;if(n.alignmentConstraint.horizontal&&(!Array.isArray(n.alignmentConstraint.horizontal)||n.alignmentConstraint.horizontal.length==0))n.alignmentConstraint.horizontal=void 0}if(n.relativePlacementConstraint&&(!Array.isArray(n.relativePlacementConstraint)||n.relativePlacementConstraint.length==0))n.relativePlacementConstraint=void 0;var Q=n.fixedNodeConstraint||n.alignmentConstraint||n.relativePlacementConstraint;if(Q)n.tile=!1,n.packComponents=!1;var se=void 0,re=!1;if(P.layoutUtilities&&n.packComponents){if(se=P.layoutUtilities("get"),!se)se=P.layoutUtilities();re=!0}if(j.nodes().length>0)if(!re){var ue=n.eles.boundingBox();if(Z.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),n.randomize){var Le=u(n);M.push(Le)}if(n.quality=="default"||n.quality=="proof")x.push(r(n,M[0])),d.relocateComponent(Z[0],x[0],n);else d.relocateComponent(Z[0],M[0],n)}else{var $e=d.getTopMostNodes(n.eles.nodes());if(H=d.connectComponents(P,n.eles,$e),H.forEach(function(K){var z=K.boundingBox();Z.push({x:z.x1+z.w/2,y:z.y1+z.h/2})}),n.randomize)H.forEach(function(K){n.eles=K,M.push(u(n))});if(n.quality=="default"||n.quality=="proof"){var de=P.collection();if(n.tile){var W=new Map,oe=[],Ne=[],ke=0,De={nodeIndexes:W,xCoords:oe,yCoords:Ne},xe=[];if(H.forEach(function(K,z){if(K.edges().length==0)K.nodes().forEach(function(pe,le){if(de.merge(K.nodes()[le]),!pe.isParent())De.nodeIndexes.set(K.nodes()[le].id(),ke++),De.xCoords.push(K.nodes()[0].position().x),De.yCoords.push(K.nodes()[0].position().y)}),xe.push(z)}),de.length>1){var J=de.boundingBox();Z.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),H.push(de),M.push(De);for(var Ae=xe.length-1;Ae>=0;Ae--)H.splice(xe[Ae],1),M.splice(xe[Ae],1),Z.splice(xe[Ae],1)}}H.forEach(function(K,z){n.eles=K,x.push(r(n,M[z])),d.relocateComponent(Z[z],x[z],n)})}else H.forEach(function(K,z){d.relocateComponent(Z[z],M[z],n)});var ie=new Set;if(H.length>1){var ve=[],Me=j.filter(function(K){return K.css("display")=="none"});H.forEach(function(K,z){var pe=void 0;if(n.quality=="draft")pe=M[z].nodeIndexes;if(K.nodes().not(Me).length>0){var le={};le.edges=[],le.nodes=[];var me=void 0;if(K.nodes().not(Me).forEach(function(fe){if(n.quality=="draft")if(!fe.isParent())me=pe.get(fe.id()),le.nodes.push({x:M[z].xCoords[me]-fe.boundingbox().w/2,y:M[z].yCoords[me]-fe.boundingbox().h/2,width:fe.boundingbox().w,height:fe.boundingbox().h});else{var he=d.calcBoundingBox(fe,M[z].xCoords,M[z].yCoords,pe);le.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(x[z][fe.id()])le.nodes.push({x:x[z][fe.id()].getLeft(),y:x[z][fe.id()].getTop(),width:x[z][fe.id()].getWidth(),height:x[z][fe.id()].getHeight()})}),K.edges().forEach(function(fe){var he=fe.source(),Ee=fe.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(n.quality=="draft"){var Be=pe.get(he.id()),et=pe.get(Ee.id()),Pe=[],Ye=[];if(he.isParent()){var We=d.calcBoundingBox(he,M[z].xCoords,M[z].yCoords,pe);Pe.push(We.topLeftX+We.width/2),Pe.push(We.topLeftY+We.height/2)}else Pe.push(M[z].xCoords[Be]),Pe.push(M[z].yCoords[Be]);if(Ee.isParent()){var Je=d.calcBoundingBox(Ee,M[z].xCoords,M[z].yCoords,pe);Ye.push(Je.topLeftX+Je.width/2),Ye.push(Je.topLeftY+Je.height/2)}else Ye.push(M[z].xCoords[et]),Ye.push(M[z].yCoords[et]);le.edges.push({startX:Pe[0],startY:Pe[1],endX:Ye[0],endY:Ye[1]})}else if(x[z][he.id()]&&x[z][Ee.id()])le.edges.push({startX:x[z][he.id()].getCenterX(),startY:x[z][he.id()].getCenterY(),endX:x[z][Ee.id()].getCenterX(),endY:x[z][Ee.id()].getCenterY()})}}),le.nodes.length>0)ve.push(le),ie.add(z)}});var Ge=se.packComponents(ve,n.randomize).shifts;if(n.quality=="draft")M.forEach(function(K,z){var pe=K.xCoords.map(function(me){return me+Ge[z].dx}),le=K.yCoords.map(function(me){return me+Ge[z].dy});K.xCoords=pe,K.yCoords=le});else{var Ke=0;ie.forEach(function(K){Object.keys(x[K]).forEach(function(z){var pe=x[K][z];pe.setCenter(pe.getCenterX()+Ge[Ke].dx,pe.getCenterY()+Ge[Ke].dy)}),Ke++})}}}var je=function(z,pe){if(n.quality=="default"||n.quality=="proof"){if(typeof z==="number")z=pe;var le=void 0,me=void 0,fe=z.data("id");if(x.forEach(function(Ee){if(fe in Ee)le={x:Ee[fe].getRect().getCenterX(),y:Ee[fe].getRect().getCenterY()},me=Ee[fe]}),n.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")le.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")le.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")le.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")le.y-=me.labelHeight/2}}if(le==null)le={x:z.position("x"),y:z.position("y")};return{x:le.x,y:le.y}}else{var he=void 0;if(M.forEach(function(Ee){var Be=Ee.nodeIndexes.get(z.id());if(Be!=null)he={x:Ee.xCoords[Be],y:Ee.yCoords[Be]}}),he==null)he={x:z.position("x"),y:z.position("y")};return{x:he.x,y:he.y}}};if(n.quality=="default"||n.quality=="proof"||n.randomize){var at=d.calcParentsWithoutChildren(P,j),qe=j.filter(function(K){return K.css("display")=="none"});if(n.eles=j.not(qe),j.nodes().not(":parent").not(qe).layoutPositions(k,n,je),at.length>0)at.forEach(function(K){K.position(je(K))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();N.exports=F},657:(N,B,v)=>{var I=v(548),c=v(140).layoutBase.Matrix,y=v(140).layoutBase.SVD,d=function(u){var{cy:g,eles:r}=u,_=r.nodes(),F=r.nodes(":parent"),o=new Map,h=new Map,k=new Map,n=[],P=[],j=[],M=[],q=[],Y=[],x=[],H=[],Z=void 0,Q=void 0,se=1e8,re=0.000000001,{piTol:ue,samplingType:Le,nodeSeparation:$e}=u,de=void 0,W=function(){var ee=0,te=0,ne=!1;while(te<de){ee=Math.floor(Math.random()*Q),ne=!1;for(var ae=0;ae<te;ae++)if(M[ae]==ee){ne=!0;break}if(!ne)M[te]=ee,te++;else continue}},oe=function(ee,te,ne){var ae=[],we=0,ge=0,ce=0,Ce=void 0,be=[],Fe=0,_e=1;for(var Ue=0;Ue<Q;Ue++)be[Ue]=se;ae[ge]=ee,be[ee]=0;while(ge>=we){ce=ae[we++];var Xe=n[ce];for(var He=0;He<Xe.length;He++)if(Ce=h.get(Xe[He]),be[Ce]==se)be[Ce]=be[ce]+1,ae[++ge]=Ce;Y[ce][te]=be[ce]*$e}if(ne){for(var Oe=0;Oe<Q;Oe++)if(Y[Oe][te]<q[Oe])q[Oe]=Y[Oe][te];for(var tt=0;tt<Q;tt++)if(q[tt]>Fe)Fe=q[tt],_e=tt}return _e},Ne=function(ee){var te=void 0;if(!ee){W();for(var ne=0;ne<de;ne++)oe(M[ne],ne,ee,!1)}else{te=Math.floor(Math.random()*Q),Z=te;for(var ae=0;ae<Q;ae++)q[ae]=se;for(var we=0;we<de;we++)M[we]=te,te=oe(te,we,ee)}for(var ge=0;ge<Q;ge++)for(var ce=0;ce<de;ce++)Y[ge][ce]*=Y[ge][ce];for(var Ce=0;Ce<de;Ce++)x[Ce]=[];for(var be=0;be<de;be++)for(var Fe=0;Fe<de;Fe++)x[be][Fe]=Y[M[Fe]][be]},ke=function(){var ee=y.svd(x),{S:te,U:ne,V:ae}=ee,we=te[0]*te[0]*te[0],ge=[];for(var ce=0;ce<de;ce++){ge[ce]=[];for(var Ce=0;Ce<de;Ce++)if(ge[ce][Ce]=0,ce==Ce)ge[ce][Ce]=te[ce]/(te[ce]*te[ce]+we/(te[ce]*te[ce]))}H=c.multMat(c.multMat(ae,ge),c.transpose(ne))},De=function(){var ee=void 0,te=void 0,ne=[],ae=[],we=[],ge=[];for(var ce=0;ce<Q;ce++)ne[ce]=Math.random(),ae[ce]=Math.random();ne=c.normalize(ne),ae=c.normalize(ae);var Ce=0,be=re,Fe=re,_e=void 0;while(!0){Ce++;for(var Ue=0;Ue<Q;Ue++)we[Ue]=ne[Ue];if(ne=c.multGamma(c.multL(c.multGamma(we),Y,H)),ee=c.dotProduct(we,ne),ne=c.normalize(ne),be=c.dotProduct(we,ne),_e=Math.abs(be/Fe),_e<=1+ue&&_e>=1)break;Fe=be}for(var Xe=0;Xe<Q;Xe++)we[Xe]=ne[Xe];Ce=0,Fe=re;while(!0){Ce++;for(var He=0;He<Q;He++)ge[He]=ae[He];if(ge=c.minusOp(ge,c.multCons(we,c.dotProduct(we,ge))),ae=c.multGamma(c.multL(c.multGamma(ge),Y,H)),te=c.dotProduct(ge,ae),ae=c.normalize(ae),be=c.dotProduct(ge,ae),_e=Math.abs(be/Fe),_e<=1+ue&&_e>=1)break;Fe=be}for(var Oe=0;Oe<Q;Oe++)ge[Oe]=ae[Oe];P=c.multCons(we,Math.sqrt(Math.abs(ee))),j=c.multCons(ge,Math.sqrt(Math.abs(te)))};I.connectComponents(g,r,I.getTopMostNodes(_),o),F.forEach(function(ye){I.connectComponents(g,r,I.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var J=0;J<_.length;J++)if(!_[J].isParent())h.set(_[J].id(),xe++);var Ae=!0,ie=!1,ve=void 0;try{for(var Me=o.keys()[Symbol.iterator](),Ge;!(Ae=(Ge=Me.next()).done);Ae=!0){var Ke=Ge.value;h.set(Ke,xe++)}}catch(ye){ie=!0,ve=ye}finally{try{if(!Ae&&Me.return)Me.return()}finally{if(ie)throw ve}}for(var je=0;je<h.size;je++)n[je]=[];F.forEach(function(ye){var ee=ye.children().intersection(r);while(ee.nodes(":childless").length==0)ee=ee.nodes()[0].children().intersection(r);var te=0,ne=ee.nodes(":childless")[0].connectedEdges().length;ee.nodes(":childless").forEach(function(ae,we){if(ae.connectedEdges().length<ne)ne=ae.connectedEdges().length,te=we}),k.set(ye.id(),ee.nodes(":childless")[te].id())}),_.forEach(function(ye){var ee=void 0;if(ye.isParent())ee=h.get(k.get(ye.id()));else ee=h.get(ye.id());ye.neighborhood().nodes().forEach(function(te){if(r.intersection(ye.edgesWith(te)).length>0)if(te.isParent())n[ee].push(k.get(te.id()));else n[ee].push(te.id())})});var at=function(ee){var te=h.get(ee),ne=void 0;o.get(ee).forEach(function(ae){if(g.getElementById(ae).isParent())ne=k.get(ae);else ne=ae;n[te].push(ne),n[h.get(ne)].push(ee)})},qe=!0,K=!1,z=void 0;try{for(var pe=o.keys()[Symbol.iterator](),le;!(qe=(le=pe.next()).done);qe=!0){var me=le.value;at(me)}}catch(ye){K=!0,z=ye}finally{try{if(!qe&&pe.return)pe.return()}finally{if(K)throw z}}Q=h.size;var fe=void 0;if(Q>2){de=Q<u.sampleSize?Q:u.sampleSize;for(var he=0;he<Q;he++)Y[he]=[];for(var Ee=0;Ee<de;Ee++)H[Ee]=[];if(u.quality=="draft"||u.step=="all")Ne(Le),ke(),De(),fe={nodeIndexes:h,xCoords:P,yCoords:j};else h.forEach(function(ye,ee){P.push(g.getElementById(ee).position("x")),j.push(g.getElementById(ee).position("y"))}),fe={nodeIndexes:h,xCoords:P,yCoords:j};return fe}else{var Be=h.keys(),et=g.getElementById(Be.next().value),Pe=et.position(),Ye=et.outerWidth();if(P.push(Pe.x),j.push(Pe.y),Q==2){var We=g.getElementById(Be.next().value),Je=We.outerWidth();P.push(Pe.x+Ye/2+Je/2+u.idealEdgeLength),j.push(Pe.y)}return fe={nodeIndexes:h,xCoords:P,yCoords:j},fe}};N.exports={spectralLayout:d}},579:(N,B,v)=>{var I=v(212),c=function(d){if(!d)return;d("layout","fcose",I)};if(typeof cytoscape<"u")c(cytoscape);N.exports=c},140:(N)=>{N.exports=t}},s={};function w(N){var B=s[N];if(B!==void 0)return B.exports;var v=s[N]={exports:{}};return i[N](v,v.exports,w),v.exports}var m=w(579);return m})()})});var xt=Se(gt(),1);var ht={L:"left",R:"right",T:"top",B:"bottom"},vt={L:e((t)=>`${t},${t/2} 0,${t} 0,0`,"L"),R:e((t)=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:e((t)=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:e((t)=>`${t/2},0 ${t},${t} 0,${t}`,"B")},ot={L:e((t,i)=>t-i+2,"L"),R:e((t,i)=>t-2,"R"),T:e((t,i)=>t-i+2,"T"),B:e((t,i)=>t-2,"B")},kt=e(function(t){if(Re(t))return t==="L"?"R":"L";else return t==="T"?"B":"T"},"getOppositeArchitectureDirection"),pt=e(function(t){let i=t;return i==="L"||i==="R"||i==="T"||i==="B"},"isArchitectureDirection"),Re=e(function(t){let i=t;return i==="L"||i==="R"},"isArchitectureDirectionX"),Ve=e(function(t){let i=t;return i==="T"||i==="B"},"isArchitectureDirectionY"),ut=e(function(t,i){let s=Re(t)&&Ve(i),w=Ve(t)&&Re(i);return s||w},"isArchitectureDirectionXY"),Dt=e(function(t){let i=t[0],s=t[1],w=Re(i)&&Ve(s),m=Ve(i)&&Re(s);return w||m},"isArchitecturePairXY"),Rt=e(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),lt=e(function(t,i){let s=`${t}${i}`;return Rt(s)?s:void 0},"getArchitectureDirectionPair"),Mt=e(function([t,i],s){let w=s[0],m=s[1];if(Re(w))if(Ve(m))return[t+(w==="L"?-1:1),i+(m==="T"?1:-1)];else return[t+(w==="L"?-1:1),i];else if(Re(m))return[t+(m==="L"?1:-1),i+(w==="T"?1:-1)];else return[t,i+(w==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ft=e(function(t){if(t==="LT"||t==="TL")return[1,1];else if(t==="BL"||t==="LB")return[1,-1];else if(t==="BR"||t==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),$t=e(function(t,i){if(ut(t,i))return"bend";else if(Re(t))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Pt=e(function(t){return t.type==="service"},"isArchitectureService"),Ot=e(function(t){return t.type==="junction"},"isArchitectureJunction"),mt=e((t,i)=>{let[s,w]=[t,i].sort();return`${JSON.stringify(s)}-${JSON.stringify(w)}`},"architectureGroupAlignmentKey"),yt=e((t)=>t.data(),"edgeData"),Qe=e((t)=>t.data(),"nodeData"),Gt=D.architecture,Et=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T,this.clear()}static{e(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",C()}addService({id:t,icon:i,in:s,title:w,iconText:m}){if(this.registeredIds.has(t))throw Error(`The service id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(s!==void 0){if(t===s)throw Error(`The service [${t}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(s)==="node")throw Error(`The service [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"service",icon:i,iconText:m,title:w,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Pt)}addJunction({id:t,in:i}){if(this.registeredIds.has(t))throw Error(`The junction id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(i!==void 0){if(t===i)throw Error(`The junction [${t}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(i)==="node")throw Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"junction",edges:[],in:i})}getJunctions(){return[...this.nodes.values()].filter(Ot)}getNodes(){return[...this.nodes.values()]}getNode(t){return this.nodes.get(t)??null}addGroup({id:t,icon:i,in:s,title:w}){if(this.registeredIds.has(t))throw Error(`The group id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(s!==void 0){if(t===s)throw Error(`The group [${t}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(s)==="node")throw Error(`The group [${t}]'s parent is not a group`)}this.registeredIds.set(t,"group"),this.groups.set(t,{id:t,icon:i,title:w,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:t,rhsId:i,lhsDir:s,rhsDir:w,lhsInto:m,rhsInto:N,lhsGroup:B,rhsGroup:v,title:I}){if(!pt(s))throw Error(`Invalid direction given for left hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(s)}`);if(!pt(w))throw Error(`Invalid direction given for right hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(w)}`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(i)&&!this.groups.has(i))throw Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);let c=this.nodes.get(t).in,y=this.nodes.get(i).in;if(B&&c&&y&&c==y)throw Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(v&&c&&y&&c==y)throw Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:t,lhsDir:s,lhsInto:m,lhsGroup:B,rhsId:i,rhsDir:w,rhsInto:N,rhsGroup:v,title:I};this.edges.push(d);let f=this.nodes.get(t),u=this.nodes.get(i);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw Error(`An align directive requires at least two members; got ${t.members.length}`);let i=new Set;t.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${t.direction} references [${s}], which is not a service or junction`);if(i.has(s))throw Error(`align ${t.direction} lists [${s}] more than once`);i.add(s)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let t=new Map,i=new Map;for(let[B,v]of this.nodes.entries()){let I=new Map;for(let c of v.edges){let y=this.getNode(c.lhsId)?.in,d=this.getNode(c.rhsId)?.in;if(y&&d&&y!==d){let f=$t(c.lhsDir,c.rhsDir);if(f!=="bend")t.set(mt(y,d),f)}if(c.lhsId===B){let f=lt(c.lhsDir,c.rhsDir);if(f)I.set(f,c.rhsId)}else{let f=lt(c.rhsDir,c.lhsDir);if(f)I.set(f,c.lhsId)}}i.set(B,I)}let s=new Set,w=new Set(i.keys()),m=e((B)=>{let v=new Map([[B,[0,0]]]),I=[B];while(I.length>0){let c=I.shift();if(c){s.add(c),w.delete(c);let y=i.get(c);if(!y)throw Error(`BFS error: adjacency list for id ${c} not found. Please report this as a bug.`);let d=v.get(c);if(!d)throw Error(`BFS error: position for id ${c} not found in spatial map. Please report this as a bug.`);let[f,u]=d;y.forEach((g,r)=>{if(!s.has(g))v.set(g,Mt([f,u],r)),I.push(g)})}}return v},"BFS"),N=[];while(w.size>0){let B=w.values().next().value;N.push(m(B))}this.dataStructures={adjList:i,spatialMaps:N,groupAlignments:t}}return this.dataStructures}setElementForId(t,i){this.elements.set(t,i)}getElementById(t){return this.elements.get(t)}getConfig(){return U({...Gt,...b().architecture})}getConfigField(t){return this.getConfig()[t]}},zt=e((t,i)=>{G(t,i),t.groups.map((s)=>i.addGroup(s)),t.services.map((s)=>i.addService({...s,type:"service"})),t.junctions.map((s)=>i.addJunction({...s,type:"junction"})),t.edges.map((s)=>i.addEdge(s)),t.alignments?.map((s)=>i.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),wt={parser:{yy:void 0},parse:e(async(t)=>{let i=await X("architecture",t);a.debug(i);let s=wt.parser?.yy;if(!(s instanceof Et))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");zt(i,s)},"parse")},Bt=e((t)=>`
|
|
1
|
+
import{G}from"./chunk-14deqqhr.js";import{e,a,D,b,O,ht,C,S,E,T,A,R,L,l,p,V,Fi,Dn,nt,U,ze,Ie}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";import{ut,lr}from"./chunk-gksf7cek.js";import{Se,Te}from"./chunk-rddft5ce.js";var ft=Te(function(rt,st){(function(i,s){if(typeof rt==="object"&&typeof st==="object")st.exports=s(lr());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof rt==="object")rt.cytoscapeFcose=s(lr());else i.cytoscapeFcose=s(i.coseBase)})(rt,function(t){return(()=>{var i={658:(N)=>{N.exports=Object.assign!=null?Object.assign.bind(Object):function(B){for(var v=arguments.length,I=Array(v>1?v-1:0),c=1;c<v;c++)I[c-1]=arguments[c];return I.forEach(function(y){Object.keys(y).forEach(function(d){return B[d]=y[d]})}),B}},548:(N,B,v)=>{var I=function(){function d(f,u){var g=[],r=!0,_=!1,F=void 0;try{for(var o=f[Symbol.iterator](),h;!(r=(h=o.next()).done);r=!0)if(g.push(h.value),u&&g.length===u)break}catch(k){_=!0,F=k}finally{try{if(!r&&o.return)o.return()}finally{if(_)throw F}}return g}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return d(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=v(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(d){var f={};for(var u=0;u<d.length;u++)f[d[u].id()]=!0;var g=d.filter(function(r,_){if(typeof r==="number")r=_;var F=r.parent()[0];while(F!=null){if(f[F.id()])return!1;F=F.parent()[0]}return!0});return g},y.connectComponents=function(d,f,u,g){var r=new c,_=new Set,F=[],o=void 0,h=void 0,k=void 0,n=!1,P=1,j=[],M=[],q=function(){var x=d.collection();M.push(x);var H=u[0],Z=d.collection();Z.merge(H).merge(H.descendants().intersection(f)),F.push(H),Z.forEach(function(re){r.push(re),_.add(re),x.merge(re)});var Q=function(){H=r.shift();var ue=d.collection();H.neighborhood().nodes().forEach(function(W){if(f.intersection(H.edgesWith(W)).length>0)ue.merge(W)});for(var Le=0;Le<ue.length;Le++){var $e=ue[Le];if(o=u.intersection($e.union($e.ancestors())),o!=null&&!_.has(o[0])){var de=o.union(o.descendants());de.forEach(function(W){if(r.push(W),_.add(W),x.merge(W),u.has(W))F.push(W)})}}};while(r.length!=0)Q();if(x.forEach(function(re){f.intersection(re.connectedEdges()).forEach(function(ue){if(x.has(ue.source())&&x.has(ue.target()))x.merge(ue)})}),F.length==u.length)n=!0;if(!n||n&&P>1){h=F[0],k=h.connectedEdges().length,F.forEach(function(re){if(re.connectedEdges().length<k)k=re.connectedEdges().length,h=re}),j.push(h.id());var se=d.collection();se.merge(F[0]),F.forEach(function(re){se.merge(re)}),F=[],u=u.difference(se),P++}};do q();while(!n);if(g){if(j.length>0)g.set("dummy"+(g.size+1),j)}return M},y.relocateComponent=function(d,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:_,NEGATIVE_INFINITY:F}=Number;if(u.quality=="draft"){var o=!0,h=!1,k=void 0;try{for(var n=f.nodeIndexes[Symbol.iterator](),P;!(o=(P=n.next()).done);o=!0){var j=P.value,M=I(j,2),q=M[0],Y=M[1],x=u.cy.getElementById(q);if(x){var H=x.boundingBox(),Z=f.xCoords[Y]-H.w/2,Q=f.xCoords[Y]+H.w/2,se=f.yCoords[Y]-H.h/2,re=f.yCoords[Y]+H.h/2;if(Z<g)g=Z;if(Q>r)r=Q;if(se<_)_=se;if(re>F)F=re}}}catch(W){h=!0,k=W}finally{try{if(!o&&n.return)n.return()}finally{if(h)throw k}}var ue=d.x-(r+g)/2,Le=d.y-(F+_)/2;f.xCoords=f.xCoords.map(function(W){return W+ue}),f.yCoords=f.yCoords.map(function(W){return W+Le})}else{Object.keys(f).forEach(function(W){var oe=f[W],Ne=oe.getRect().x,ke=oe.getRect().x+oe.getRect().width,De=oe.getRect().y,xe=oe.getRect().y+oe.getRect().height;if(Ne<g)g=Ne;if(ke>r)r=ke;if(De<_)_=De;if(xe>F)F=xe});var $e=d.x-(r+g)/2,de=d.y-(F+_)/2;Object.keys(f).forEach(function(W){var oe=f[W];oe.setCenter(oe.getCenterX()+$e,oe.getCenterY()+de)})}}},y.calcBoundingBox=function(d,f,u,g){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:_,MAX_SAFE_INTEGER:F,MIN_SAFE_INTEGER:o}=Number,h=void 0,k=void 0,n=void 0,P=void 0,j=d.descendants().not(":parent"),M=j.length;for(var q=0;q<M;q++){var Y=j[q];if(h=f[g.get(Y.id())]-Y.width()/2,k=f[g.get(Y.id())]+Y.width()/2,n=u[g.get(Y.id())]-Y.height()/2,P=u[g.get(Y.id())]+Y.height()/2,r>h)r=h;if(_<k)_=k;if(F>n)F=n;if(o<P)o=P}var x={};return x.topLeftX=r,x.topLeftY=F,x.width=_-r,x.height=o-F,x},y.calcParentsWithoutChildren=function(d,f){var u=d.collection();return f.nodes(":parent").forEach(function(g){var r=!1;if(g.children().forEach(function(_){if(_.css("display")!="none")r=!0}),!r)u.merge(g)}),u},N.exports=y},816:(N,B,v)=>{var I=v(548),c=v(140).CoSELayout,y=v(140).CoSENode,d=v(140).layoutBase.PointD,f=v(140).layoutBase.DimensionD,u=v(140).layoutBase.LayoutConstants,g=v(140).layoutBase.FDLayoutConstants,r=v(140).CoSEConstants,_=function(o,h){var{cy:k,eles:n}=o,P=n.nodes(),j=n.edges(),M=void 0,q=void 0,Y=void 0,x={};if(o.randomize)M=h.nodeIndexes,q=h.xCoords,Y=h.yCoords;var H=function(W){return typeof W==="function"},Z=function(W,oe){if(H(W))return W(oe);else return W},Q=I.calcParentsWithoutChildren(k,n),se=function de(W,oe,Ne,ke){var De=oe.length;for(var xe=0;xe<De;xe++){var J=oe[xe],Ae=null;if(J.intersection(Q).length==0)Ae=J.children();var ie=void 0,ve=J.layoutDimensions({nodeDimensionsIncludeLabels:ke.nodeDimensionsIncludeLabels});if(J.outerWidth()!=null&&J.outerHeight()!=null)if(ke.randomize)if(!J.isParent())ie=W.add(new y(Ne.graphManager,new d(q[M.get(J.id())]-ve.w/2,Y[M.get(J.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var Me=I.calcBoundingBox(J,q,Y,M);if(J.intersection(Q).length==0)ie=W.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(Me.width,Me.height)));else ie=W.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else ie=W.add(new y(Ne.graphManager,new d(J.position("x")-ve.w/2,J.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else ie=W.add(new y(this.graphManager));if(ie.id=J.data("id"),ie.nodeRepulsion=Z(ke.nodeRepulsion,J),ie.paddingLeft=parseInt(J.css("padding")),ie.paddingTop=parseInt(J.css("padding")),ie.paddingRight=parseInt(J.css("padding")),ie.paddingBottom=parseInt(J.css("padding")),ke.nodeDimensionsIncludeLabels)ie.labelWidth=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ie.labelHeight=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ie.labelPosVertical=J.css("text-valign"),ie.labelPosHorizontal=J.css("text-halign");if(x[J.data("id")]=ie,isNaN(ie.rect.x))ie.rect.x=0;if(isNaN(ie.rect.y))ie.rect.y=0;if(Ae!=null&&Ae.length>0){var Ge=void 0;Ge=Ne.getGraphManager().add(Ne.newGraph(),ie),de(Ge,Ae,Ne,ke)}}},re=function(W,oe,Ne){var ke=0,De=0;for(var xe=0;xe<Ne.length;xe++){var J=Ne[xe],Ae=x[J.data("source")],ie=x[J.data("target")];if(Ae&&ie&&Ae!==ie&&Ae.getEdgesBetween(ie).length==0){var ve=oe.add(W.newEdge(),Ae,ie);ve.id=J.id(),ve.idealLength=Z(o.idealEdgeLength,J),ve.edgeElasticity=Z(o.edgeElasticity,J),ke+=ve.idealLength,De++}}if(o.idealEdgeLength!=null){if(De>0)r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ke/De;else if(!H(o.idealEdgeLength))r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50;r.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH}},ue=function(W,oe){if(oe.fixedNodeConstraint)W.constraints.fixedNodeConstraint=oe.fixedNodeConstraint;if(oe.alignmentConstraint)W.constraints.alignmentConstraint=oe.alignmentConstraint;if(oe.relativePlacementConstraint)W.constraints.relativePlacementConstraint=oe.relativePlacementConstraint};if(o.nestingFactor!=null)r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)r.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)r.MAX_ITERATIONS=g.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)r.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)r.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)r.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=g.ANIMATE=u.ANIMATE=o.animate,r.TILE=o.tile,r.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!1;if(o.step=="enforced")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!1;if(o.step=="cose")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)r.TREE_REDUCTION_ON_INCREMENTAL=!1;else r.TREE_REDUCTION_ON_INCREMENTAL=!0;var Le=new c,$e=Le.newGraphManager();return se($e.addRoot(),I.getTopMostNodes(P),Le,o),re(Le,$e,j),ue(Le,o),Le.runLayout(),x};N.exports={coseLayout:_}},212:(N,B,v)=>{var I=function(){function o(h,k){for(var n=0;n<k.length;n++){var P=k[n];if(P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P)P.writable=!0;Object.defineProperty(h,P.key,P)}}return function(h,k,n){if(k)o(h.prototype,k);if(n)o(h,n);return h}}();function c(o,h){if(!(o instanceof h))throw TypeError("Cannot call a class as a function")}var y=v(658),d=v(548),f=v(657),u=f.spectralLayout,g=v(816),r=g.coseLayout,_=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),F=function(){function o(h){c(this,o),this.options=y({},_,h)}return I(o,[{key:"run",value:function(){var k=this,n=this.options,{cy:P,eles:j}=n,M=[],q=void 0,Y=void 0,x=[],H=void 0,Z=[];if(n.fixedNodeConstraint&&(!Array.isArray(n.fixedNodeConstraint)||n.fixedNodeConstraint.length==0))n.fixedNodeConstraint=void 0;if(n.alignmentConstraint){if(n.alignmentConstraint.vertical&&(!Array.isArray(n.alignmentConstraint.vertical)||n.alignmentConstraint.vertical.length==0))n.alignmentConstraint.vertical=void 0;if(n.alignmentConstraint.horizontal&&(!Array.isArray(n.alignmentConstraint.horizontal)||n.alignmentConstraint.horizontal.length==0))n.alignmentConstraint.horizontal=void 0}if(n.relativePlacementConstraint&&(!Array.isArray(n.relativePlacementConstraint)||n.relativePlacementConstraint.length==0))n.relativePlacementConstraint=void 0;var Q=n.fixedNodeConstraint||n.alignmentConstraint||n.relativePlacementConstraint;if(Q)n.tile=!1,n.packComponents=!1;var se=void 0,re=!1;if(P.layoutUtilities&&n.packComponents){if(se=P.layoutUtilities("get"),!se)se=P.layoutUtilities();re=!0}if(j.nodes().length>0)if(!re){var ue=n.eles.boundingBox();if(Z.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),n.randomize){var Le=u(n);M.push(Le)}if(n.quality=="default"||n.quality=="proof")x.push(r(n,M[0])),d.relocateComponent(Z[0],x[0],n);else d.relocateComponent(Z[0],M[0],n)}else{var $e=d.getTopMostNodes(n.eles.nodes());if(H=d.connectComponents(P,n.eles,$e),H.forEach(function(K){var z=K.boundingBox();Z.push({x:z.x1+z.w/2,y:z.y1+z.h/2})}),n.randomize)H.forEach(function(K){n.eles=K,M.push(u(n))});if(n.quality=="default"||n.quality=="proof"){var de=P.collection();if(n.tile){var W=new Map,oe=[],Ne=[],ke=0,De={nodeIndexes:W,xCoords:oe,yCoords:Ne},xe=[];if(H.forEach(function(K,z){if(K.edges().length==0)K.nodes().forEach(function(pe,le){if(de.merge(K.nodes()[le]),!pe.isParent())De.nodeIndexes.set(K.nodes()[le].id(),ke++),De.xCoords.push(K.nodes()[0].position().x),De.yCoords.push(K.nodes()[0].position().y)}),xe.push(z)}),de.length>1){var J=de.boundingBox();Z.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),H.push(de),M.push(De);for(var Ae=xe.length-1;Ae>=0;Ae--)H.splice(xe[Ae],1),M.splice(xe[Ae],1),Z.splice(xe[Ae],1)}}H.forEach(function(K,z){n.eles=K,x.push(r(n,M[z])),d.relocateComponent(Z[z],x[z],n)})}else H.forEach(function(K,z){d.relocateComponent(Z[z],M[z],n)});var ie=new Set;if(H.length>1){var ve=[],Me=j.filter(function(K){return K.css("display")=="none"});H.forEach(function(K,z){var pe=void 0;if(n.quality=="draft")pe=M[z].nodeIndexes;if(K.nodes().not(Me).length>0){var le={};le.edges=[],le.nodes=[];var me=void 0;if(K.nodes().not(Me).forEach(function(fe){if(n.quality=="draft")if(!fe.isParent())me=pe.get(fe.id()),le.nodes.push({x:M[z].xCoords[me]-fe.boundingbox().w/2,y:M[z].yCoords[me]-fe.boundingbox().h/2,width:fe.boundingbox().w,height:fe.boundingbox().h});else{var he=d.calcBoundingBox(fe,M[z].xCoords,M[z].yCoords,pe);le.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(x[z][fe.id()])le.nodes.push({x:x[z][fe.id()].getLeft(),y:x[z][fe.id()].getTop(),width:x[z][fe.id()].getWidth(),height:x[z][fe.id()].getHeight()})}),K.edges().forEach(function(fe){var he=fe.source(),Ee=fe.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(n.quality=="draft"){var Be=pe.get(he.id()),et=pe.get(Ee.id()),Pe=[],Ye=[];if(he.isParent()){var We=d.calcBoundingBox(he,M[z].xCoords,M[z].yCoords,pe);Pe.push(We.topLeftX+We.width/2),Pe.push(We.topLeftY+We.height/2)}else Pe.push(M[z].xCoords[Be]),Pe.push(M[z].yCoords[Be]);if(Ee.isParent()){var Je=d.calcBoundingBox(Ee,M[z].xCoords,M[z].yCoords,pe);Ye.push(Je.topLeftX+Je.width/2),Ye.push(Je.topLeftY+Je.height/2)}else Ye.push(M[z].xCoords[et]),Ye.push(M[z].yCoords[et]);le.edges.push({startX:Pe[0],startY:Pe[1],endX:Ye[0],endY:Ye[1]})}else if(x[z][he.id()]&&x[z][Ee.id()])le.edges.push({startX:x[z][he.id()].getCenterX(),startY:x[z][he.id()].getCenterY(),endX:x[z][Ee.id()].getCenterX(),endY:x[z][Ee.id()].getCenterY()})}}),le.nodes.length>0)ve.push(le),ie.add(z)}});var Ge=se.packComponents(ve,n.randomize).shifts;if(n.quality=="draft")M.forEach(function(K,z){var pe=K.xCoords.map(function(me){return me+Ge[z].dx}),le=K.yCoords.map(function(me){return me+Ge[z].dy});K.xCoords=pe,K.yCoords=le});else{var Ke=0;ie.forEach(function(K){Object.keys(x[K]).forEach(function(z){var pe=x[K][z];pe.setCenter(pe.getCenterX()+Ge[Ke].dx,pe.getCenterY()+Ge[Ke].dy)}),Ke++})}}}var je=function(z,pe){if(n.quality=="default"||n.quality=="proof"){if(typeof z==="number")z=pe;var le=void 0,me=void 0,fe=z.data("id");if(x.forEach(function(Ee){if(fe in Ee)le={x:Ee[fe].getRect().getCenterX(),y:Ee[fe].getRect().getCenterY()},me=Ee[fe]}),n.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")le.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")le.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")le.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")le.y-=me.labelHeight/2}}if(le==null)le={x:z.position("x"),y:z.position("y")};return{x:le.x,y:le.y}}else{var he=void 0;if(M.forEach(function(Ee){var Be=Ee.nodeIndexes.get(z.id());if(Be!=null)he={x:Ee.xCoords[Be],y:Ee.yCoords[Be]}}),he==null)he={x:z.position("x"),y:z.position("y")};return{x:he.x,y:he.y}}};if(n.quality=="default"||n.quality=="proof"||n.randomize){var at=d.calcParentsWithoutChildren(P,j),qe=j.filter(function(K){return K.css("display")=="none"});if(n.eles=j.not(qe),j.nodes().not(":parent").not(qe).layoutPositions(k,n,je),at.length>0)at.forEach(function(K){K.position(je(K))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();N.exports=F},657:(N,B,v)=>{var I=v(548),c=v(140).layoutBase.Matrix,y=v(140).layoutBase.SVD,d=function(u){var{cy:g,eles:r}=u,_=r.nodes(),F=r.nodes(":parent"),o=new Map,h=new Map,k=new Map,n=[],P=[],j=[],M=[],q=[],Y=[],x=[],H=[],Z=void 0,Q=void 0,se=1e8,re=0.000000001,{piTol:ue,samplingType:Le,nodeSeparation:$e}=u,de=void 0,W=function(){var ee=0,te=0,ne=!1;while(te<de){ee=Math.floor(Math.random()*Q),ne=!1;for(var ae=0;ae<te;ae++)if(M[ae]==ee){ne=!0;break}if(!ne)M[te]=ee,te++;else continue}},oe=function(ee,te,ne){var ae=[],we=0,ge=0,ce=0,Ce=void 0,be=[],Fe=0,_e=1;for(var Ue=0;Ue<Q;Ue++)be[Ue]=se;ae[ge]=ee,be[ee]=0;while(ge>=we){ce=ae[we++];var Xe=n[ce];for(var He=0;He<Xe.length;He++)if(Ce=h.get(Xe[He]),be[Ce]==se)be[Ce]=be[ce]+1,ae[++ge]=Ce;Y[ce][te]=be[ce]*$e}if(ne){for(var Oe=0;Oe<Q;Oe++)if(Y[Oe][te]<q[Oe])q[Oe]=Y[Oe][te];for(var tt=0;tt<Q;tt++)if(q[tt]>Fe)Fe=q[tt],_e=tt}return _e},Ne=function(ee){var te=void 0;if(!ee){W();for(var ne=0;ne<de;ne++)oe(M[ne],ne,ee,!1)}else{te=Math.floor(Math.random()*Q),Z=te;for(var ae=0;ae<Q;ae++)q[ae]=se;for(var we=0;we<de;we++)M[we]=te,te=oe(te,we,ee)}for(var ge=0;ge<Q;ge++)for(var ce=0;ce<de;ce++)Y[ge][ce]*=Y[ge][ce];for(var Ce=0;Ce<de;Ce++)x[Ce]=[];for(var be=0;be<de;be++)for(var Fe=0;Fe<de;Fe++)x[be][Fe]=Y[M[Fe]][be]},ke=function(){var ee=y.svd(x),{S:te,U:ne,V:ae}=ee,we=te[0]*te[0]*te[0],ge=[];for(var ce=0;ce<de;ce++){ge[ce]=[];for(var Ce=0;Ce<de;Ce++)if(ge[ce][Ce]=0,ce==Ce)ge[ce][Ce]=te[ce]/(te[ce]*te[ce]+we/(te[ce]*te[ce]))}H=c.multMat(c.multMat(ae,ge),c.transpose(ne))},De=function(){var ee=void 0,te=void 0,ne=[],ae=[],we=[],ge=[];for(var ce=0;ce<Q;ce++)ne[ce]=Math.random(),ae[ce]=Math.random();ne=c.normalize(ne),ae=c.normalize(ae);var Ce=0,be=re,Fe=re,_e=void 0;while(!0){Ce++;for(var Ue=0;Ue<Q;Ue++)we[Ue]=ne[Ue];if(ne=c.multGamma(c.multL(c.multGamma(we),Y,H)),ee=c.dotProduct(we,ne),ne=c.normalize(ne),be=c.dotProduct(we,ne),_e=Math.abs(be/Fe),_e<=1+ue&&_e>=1)break;Fe=be}for(var Xe=0;Xe<Q;Xe++)we[Xe]=ne[Xe];Ce=0,Fe=re;while(!0){Ce++;for(var He=0;He<Q;He++)ge[He]=ae[He];if(ge=c.minusOp(ge,c.multCons(we,c.dotProduct(we,ge))),ae=c.multGamma(c.multL(c.multGamma(ge),Y,H)),te=c.dotProduct(ge,ae),ae=c.normalize(ae),be=c.dotProduct(ge,ae),_e=Math.abs(be/Fe),_e<=1+ue&&_e>=1)break;Fe=be}for(var Oe=0;Oe<Q;Oe++)ge[Oe]=ae[Oe];P=c.multCons(we,Math.sqrt(Math.abs(ee))),j=c.multCons(ge,Math.sqrt(Math.abs(te)))};I.connectComponents(g,r,I.getTopMostNodes(_),o),F.forEach(function(ye){I.connectComponents(g,r,I.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var J=0;J<_.length;J++)if(!_[J].isParent())h.set(_[J].id(),xe++);var Ae=!0,ie=!1,ve=void 0;try{for(var Me=o.keys()[Symbol.iterator](),Ge;!(Ae=(Ge=Me.next()).done);Ae=!0){var Ke=Ge.value;h.set(Ke,xe++)}}catch(ye){ie=!0,ve=ye}finally{try{if(!Ae&&Me.return)Me.return()}finally{if(ie)throw ve}}for(var je=0;je<h.size;je++)n[je]=[];F.forEach(function(ye){var ee=ye.children().intersection(r);while(ee.nodes(":childless").length==0)ee=ee.nodes()[0].children().intersection(r);var te=0,ne=ee.nodes(":childless")[0].connectedEdges().length;ee.nodes(":childless").forEach(function(ae,we){if(ae.connectedEdges().length<ne)ne=ae.connectedEdges().length,te=we}),k.set(ye.id(),ee.nodes(":childless")[te].id())}),_.forEach(function(ye){var ee=void 0;if(ye.isParent())ee=h.get(k.get(ye.id()));else ee=h.get(ye.id());ye.neighborhood().nodes().forEach(function(te){if(r.intersection(ye.edgesWith(te)).length>0)if(te.isParent())n[ee].push(k.get(te.id()));else n[ee].push(te.id())})});var at=function(ee){var te=h.get(ee),ne=void 0;o.get(ee).forEach(function(ae){if(g.getElementById(ae).isParent())ne=k.get(ae);else ne=ae;n[te].push(ne),n[h.get(ne)].push(ee)})},qe=!0,K=!1,z=void 0;try{for(var pe=o.keys()[Symbol.iterator](),le;!(qe=(le=pe.next()).done);qe=!0){var me=le.value;at(me)}}catch(ye){K=!0,z=ye}finally{try{if(!qe&&pe.return)pe.return()}finally{if(K)throw z}}Q=h.size;var fe=void 0;if(Q>2){de=Q<u.sampleSize?Q:u.sampleSize;for(var he=0;he<Q;he++)Y[he]=[];for(var Ee=0;Ee<de;Ee++)H[Ee]=[];if(u.quality=="draft"||u.step=="all")Ne(Le),ke(),De(),fe={nodeIndexes:h,xCoords:P,yCoords:j};else h.forEach(function(ye,ee){P.push(g.getElementById(ee).position("x")),j.push(g.getElementById(ee).position("y"))}),fe={nodeIndexes:h,xCoords:P,yCoords:j};return fe}else{var Be=h.keys(),et=g.getElementById(Be.next().value),Pe=et.position(),Ye=et.outerWidth();if(P.push(Pe.x),j.push(Pe.y),Q==2){var We=g.getElementById(Be.next().value),Je=We.outerWidth();P.push(Pe.x+Ye/2+Je/2+u.idealEdgeLength),j.push(Pe.y)}return fe={nodeIndexes:h,xCoords:P,yCoords:j},fe}};N.exports={spectralLayout:d}},579:(N,B,v)=>{var I=v(212),c=function(d){if(!d)return;d("layout","fcose",I)};if(typeof cytoscape<"u")c(cytoscape);N.exports=c},140:(N)=>{N.exports=t}},s={};function w(N){var B=s[N];if(B!==void 0)return B.exports;var v=s[N]={exports:{}};return i[N](v,v.exports,w),v.exports}var m=w(579);return m})()})});var xt=Se(ft(),1);var gt={L:"left",R:"right",T:"top",B:"bottom"},vt={L:e((t)=>`${t},${t/2} 0,${t} 0,0`,"L"),R:e((t)=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:e((t)=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:e((t)=>`${t/2},0 ${t},${t} 0,${t}`,"B")},ot={L:e((t,i)=>t-i+2,"L"),R:e((t,i)=>t-2,"R"),T:e((t,i)=>t-i+2,"T"),B:e((t,i)=>t-2,"B")},kt=e(function(t){if(Re(t))return t==="L"?"R":"L";else return t==="T"?"B":"T"},"getOppositeArchitectureDirection"),pt=e(function(t){let i=t;return i==="L"||i==="R"||i==="T"||i==="B"},"isArchitectureDirection"),Re=e(function(t){let i=t;return i==="L"||i==="R"},"isArchitectureDirectionX"),Ve=e(function(t){let i=t;return i==="T"||i==="B"},"isArchitectureDirectionY"),dt=e(function(t,i){let s=Re(t)&&Ve(i),w=Ve(t)&&Re(i);return s||w},"isArchitectureDirectionXY"),Dt=e(function(t){let i=t[0],s=t[1],w=Re(i)&&Ve(s),m=Ve(i)&&Re(s);return w||m},"isArchitecturePairXY"),Rt=e(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),lt=e(function(t,i){let s=`${t}${i}`;return Rt(s)?s:void 0},"getArchitectureDirectionPair"),Mt=e(function([t,i],s){let w=s[0],m=s[1];if(Re(w))if(Ve(m))return[t+(w==="L"?-1:1),i+(m==="T"?1:-1)];else return[t+(w==="L"?-1:1),i];else if(Re(m))return[t+(m==="L"?1:-1),i+(w==="T"?1:-1)];else return[t,i+(w==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ft=e(function(t){if(t==="LT"||t==="TL")return[1,1];else if(t==="BL"||t==="LB")return[1,-1];else if(t==="BR"||t==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),$t=e(function(t,i){if(dt(t,i))return"bend";else if(Re(t))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Pt=e(function(t){return t.type==="service"},"isArchitectureService"),Ot=e(function(t){return t.type==="junction"},"isArchitectureJunction"),mt=e((t,i)=>{let[s,w]=[t,i].sort();return`${JSON.stringify(s)}-${JSON.stringify(w)}`},"architectureGroupAlignmentKey"),yt=e((t)=>t.data(),"edgeData"),Qe=e((t)=>t.data(),"nodeData"),Gt=D.architecture,Et=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T,this.clear()}static{e(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",C()}addService({id:t,icon:i,in:s,title:w,iconText:m}){if(this.registeredIds.has(t))throw Error(`The service id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(s!==void 0){if(t===s)throw Error(`The service [${t}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(s)==="node")throw Error(`The service [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"service",icon:i,iconText:m,title:w,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Pt)}addJunction({id:t,in:i}){if(this.registeredIds.has(t))throw Error(`The junction id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(i!==void 0){if(t===i)throw Error(`The junction [${t}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(i)==="node")throw Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"junction",edges:[],in:i})}getJunctions(){return[...this.nodes.values()].filter(Ot)}getNodes(){return[...this.nodes.values()]}getNode(t){return this.nodes.get(t)??null}addGroup({id:t,icon:i,in:s,title:w}){if(this.registeredIds.has(t))throw Error(`The group id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(s!==void 0){if(t===s)throw Error(`The group [${t}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(s)==="node")throw Error(`The group [${t}]'s parent is not a group`)}this.registeredIds.set(t,"group"),this.groups.set(t,{id:t,icon:i,title:w,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:t,rhsId:i,lhsDir:s,rhsDir:w,lhsInto:m,rhsInto:N,lhsGroup:B,rhsGroup:v,title:I}){if(!pt(s))throw Error(`Invalid direction given for left hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(s)}`);if(!pt(w))throw Error(`Invalid direction given for right hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(w)}`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(i)&&!this.groups.has(i))throw Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);let c=this.nodes.get(t).in,y=this.nodes.get(i).in;if(B&&c&&y&&c==y)throw Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(v&&c&&y&&c==y)throw Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:t,lhsDir:s,lhsInto:m,lhsGroup:B,rhsId:i,rhsDir:w,rhsInto:N,rhsGroup:v,title:I};this.edges.push(d);let f=this.nodes.get(t),u=this.nodes.get(i);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw Error(`An align directive requires at least two members; got ${t.members.length}`);let i=new Set;t.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${t.direction} references [${s}], which is not a service or junction`);if(i.has(s))throw Error(`align ${t.direction} lists [${s}] more than once`);i.add(s)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let t=new Map,i=new Map;for(let[B,v]of this.nodes.entries()){let I=new Map;for(let c of v.edges){let y=this.getNode(c.lhsId)?.in,d=this.getNode(c.rhsId)?.in;if(y&&d&&y!==d){let f=$t(c.lhsDir,c.rhsDir);if(f!=="bend")t.set(mt(y,d),f)}if(c.lhsId===B){let f=lt(c.lhsDir,c.rhsDir);if(f)I.set(f,c.rhsId)}else{let f=lt(c.rhsDir,c.lhsDir);if(f)I.set(f,c.lhsId)}}i.set(B,I)}let s=new Set,w=new Set(i.keys()),m=e((B)=>{let v=new Map([[B,[0,0]]]),I=[B];while(I.length>0){let c=I.shift();if(c){s.add(c),w.delete(c);let y=i.get(c);if(!y)throw Error(`BFS error: adjacency list for id ${c} not found. Please report this as a bug.`);let d=v.get(c);if(!d)throw Error(`BFS error: position for id ${c} not found in spatial map. Please report this as a bug.`);let[f,u]=d;y.forEach((g,r)=>{if(!s.has(g))v.set(g,Mt([f,u],r)),I.push(g)})}}return v},"BFS"),N=[];while(w.size>0){let B=w.values().next().value;N.push(m(B))}this.dataStructures={adjList:i,spatialMaps:N,groupAlignments:t}}return this.dataStructures}setElementForId(t,i){this.elements.set(t,i)}getElementById(t){return this.elements.get(t)}getConfig(){return U({...Gt,...b().architecture})}getConfigField(t){return this.getConfig()[t]}},zt=e((t,i)=>{G(t,i),t.groups.map((s)=>i.addGroup(s)),t.services.map((s)=>i.addService({...s,type:"service"})),t.junctions.map((s)=>i.addJunction({...s,type:"junction"})),t.edges.map((s)=>i.addEdge(s)),t.alignments?.map((s)=>i.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),wt={parser:{yy:void 0},parse:e(async(t)=>{let i=await X("architecture",t);a.debug(i);let s=wt.parser?.yy;if(!(s instanceof Et))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");zt(i,s)},"parse")},Bt=e((t)=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${t.archEdgeWidth};
|
|
4
4
|
stroke: ${t.archEdgeColor};
|
|
@@ -29,8 +29,8 @@ import{G}from"./chunk-14bad871.js";import{e,a,D,b,O,ft,C,S,E,T,A,R,L,l,p,V,Fi,Dn
|
|
|
29
29
|
display: -webkit-box;
|
|
30
30
|
-webkit-box-orient: vertical;
|
|
31
31
|
}
|
|
32
|
-
`,"getStyles"),_t=Bt;function
|
|
32
|
+
`,"getStyles"),_t=Bt;function ct(t,i){if(t===0)return i();let s=Math.random,w=t>>>0;Math.random=function(){w=w+1831565813>>>0;let m=w;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296};try{return i()}finally{Math.random=s}}e(ct,"withSeededRandom");var Ze=e((t)=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),it={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Ze('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:Ze('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:Ze('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:Ze('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:Ze('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Fi,blank:{body:Ze("")}}},Yt=e(async function(t,i,s,w){let m=s.getConfigField("padding"),N=s.getConfigField("iconSize"),B=N/2,v=N/6,I=v/2;await Promise.all(i.edges().map(async(c)=>{let{source:y,sourceDir:d,sourceArrow:f,sourceGroup:u,target:g,targetDir:r,targetArrow:_,targetGroup:F,label:o}=yt(c),{x:h,y:k}=c[0].sourceEndpoint(),{x:n,y:P}=c[0].midpoint(),{x:j,y:M}=c[0].targetEndpoint(),q=m+4;if(u)if(Re(d))h+=d==="L"?-q:q;else k+=d==="T"?-q:q+18;if(F)if(Re(r))j+=r==="L"?-q:q;else M+=r==="T"?-q:q+18;if(!u&&s.getNode(y)?.type==="junction")if(Re(d))h+=d==="L"?B:-B;else k+=d==="T"?B:-B;if(!F&&s.getNode(g)?.type==="junction")if(Re(r))j+=r==="L"?B:-B;else M+=r==="T"?B:-B;if(c[0]._private.rscratch){let Y=t.insert("g");if(Y.insert("path").attr("d",`M ${h},${k} L ${n},${P} L${j},${M} `).attr("class","edge").attr("id",`${w}-${ze(y,g,{prefix:"L"})}`),f){let x=Re(d)?ot[d](h,v):h-I,H=Ve(d)?ot[d](k,v):k-I;Y.insert("polygon").attr("points",vt[d](v)).attr("transform",`translate(${x},${H})`).attr("class","arrow")}if(_){let x=Re(r)?ot[r](j,v):j-I,H=Ve(r)?ot[r](M,v):M-I;Y.insert("polygon").attr("points",vt[r](v)).attr("transform",`translate(${x},${H})`).attr("class","arrow")}if(o){let x=!dt(d,r)?Re(d)?"X":"Y":"XY",H=0;if(x==="X")H=Math.abs(h-j);else if(x==="Y")H=Math.abs(k-M)/1.5;else H=Math.abs(h-j)/2;let Z=Y.append("g");if(await Ie(Z,o,{useHtmlLabels:!1,width:H,classes:"architecture-service-label"},l()),Z.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),x==="X")Z.attr("transform","translate("+n+", "+P+")");else if(x==="Y")Z.attr("transform","translate("+n+", "+P+") rotate(-90)");else if(x==="XY"){let Q=lt(d,r);if(Q&&Dt(Q)){let se=Z.node().getBoundingClientRect(),[re,ue]=Ft(Q);Z.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*re*ue*45})`);let Le=Z.node().getBoundingClientRect();Z.attr("transform",`
|
|
33
33
|
translate(${n}, ${P-se.height/2})
|
|
34
34
|
translate(${re*Le.width/2}, ${ue*Le.height/2})
|
|
35
35
|
rotate(${-1*re*ue*45}, 0, ${se.height/2})
|
|
36
|
-
`)}}}}}))},"drawEdges"),Ut=e(async function(t,i,s,w){let N=s.getConfigField("padding")*0.75,B=s.getConfigField("fontSize"),I=s.getConfigField("iconSize")/2;await Promise.all(i.nodes().map(async(c)=>{let y=Qe(c);if(y.type==="group"){let{h:d,w:f,x1:u,y1:g}=c.boundingBox(),r=t.append("rect");r.attr("id",`${w}-group-${y.id}`).attr("x",u+I).attr("y",g+I).attr("width",f).attr("height",d).attr("class","node-bkg");let _=t.append("g"),F=u,o=g;if(y.icon){let h=_.append("g");h.html(`<g>${await nt(y.icon,{height:N,width:N,fallbackPrefix:it.prefix})}</g>`),h.attr("transform","translate("+(F+I+1)+", "+(o+I+1)+")"),F+=N,o+=B/2-1-2}if(y.label){let h=_.append("g");await Ie(h,y.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},l()),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),h.attr("transform","translate("+(F+I+4)+", "+(o+I+2)+")")}s.setElementForId(y.id,r)}}))},"drawGroups"),Ht=e(async function(t,i,s,w){let m=l();for(let N of s){let B=i.append("g"),v=t.getConfigField("iconSize");if(N.title){let d=B.append("g");await Ie(d,N.title,{useHtmlLabels:!1,width:v*1.5,classes:"architecture-service-label"},m),d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),d.attr("transform","translate("+v/2+", "+v+")")}let I=B.append("g");if(N.icon)I.html(`<g>${await nt(N.icon,{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);else if(N.iconText){I.html(`<g>${await nt("blank",{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);let u=I.append("g").append("foreignObject").attr("width",v).attr("height",v).append("div").attr("class","node-icon-text").attr("style",`height: ${v}px;`).append("div").html(O(N.iconText,m)),g=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((v-2)/g)};`)}else I.append("path").attr("class","node-bkg").attr("id",`${w}-node-${N.id}`).attr("d",`M0,${v} V5 Q0,0 5,0 H${v-5} Q${v},0 ${v},5 V${v} Z`);B.attr("id",`${w}-service-${N.id}`).attr("class","architecture-service");let{width:c,height:y}=B.node().getBBox();N.width=c,N.height=y,t.setElementForId(N.id,B)}return 0},"drawServices"),Vt=e(function(t,i,s,w){s.forEach((m)=>{let N=i.append("g"),B=t.getConfigField("iconSize");N.append("g").append("rect").attr("id",`${w}-node-${m.id}`).attr("fill-opacity","0").attr("width",B).attr("height",B),N.attr("class","architecture-junction");let{width:I,height:c}=N._groups[0][0].getBBox();N.width=I,N.height=c,t.setElementForId(m.id,N)})},"drawJunctions");Dn([{name:it.prefix,icons:it}]);ct.use(xt.default);function Tt(t,i,s){t.forEach((w)=>{i.add({group:"nodes",data:{type:"service",id:w.id,icon:w.icon,label:w.title,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-service"})})}e(Tt,"addServices");function At(t,i,s){t.forEach((w)=>{i.add({group:"nodes",data:{type:"junction",id:w.id,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-junction"})})}e(At,"addJunctions");function Lt(t,i){i.nodes().map((s)=>{let w=Qe(s);if(w.type==="group")return;w.x=s.position().x,w.y=s.position().y,t.getElementById(w.id).attr("transform","translate("+(w.x||0)+","+(w.y||0)+")")})}e(Lt,"positionNodes");function Ct(t,i){t.forEach((s)=>{i.add({group:"nodes",data:{type:"group",id:s.id,icon:s.icon,label:s.title,parent:s.in},classes:"node-group"})})}e(Ct,"addGroups");function It(t,i){t.forEach((s)=>{let{lhsId:w,rhsId:m,lhsInto:N,lhsGroup:B,rhsInto:v,lhsDir:I,rhsDir:c,rhsGroup:y,title:d}=s,f=ut(s.lhsDir,s.rhsDir)?"segments":"straight",u={id:`${w}-${m}`,label:d,source:w,sourceDir:I,sourceArrow:N,sourceGroup:B,sourceEndpoint:I==="L"?"0 50%":I==="R"?"100% 50%":I==="T"?"50% 0":"50% 100%",target:m,targetDir:c,targetArrow:v,targetGroup:y,targetEndpoint:c==="L"?"0 50%":c==="R"?"100% 50%":c==="T"?"50% 0":"50% 100%"};i.add({group:"edges",data:u,classes:f})})}e(It,"addEdges");function bt(t,i,s,w=[]){let m=e((f,u)=>{let g=new Map;for(let[r,_]of f.entries()){let F=`${r}`,o=0,h=[..._.entries()];if(h.length===1){g.set(F,h[0][1]);continue}for(let k=0;k<h.length-1;k++)for(let n=k+1;n<h.length;n++){let[P,j]=h[k],[M,q]=h[n];if(s.get(mt(P,M))===u)g.set(F,[...g.get(F)??[],...j,...q]);else if(P==="default"||M==="default")g.set(F,[...g.get(F)??[],...j,...q]);else{let x=`${F}-${o++}`;g.set(x,j);let H=`${F}-${o++}`;g.set(H,q)}}}return g},"flattenAlignments"),N=i.map((f)=>{let u=new Map,g=new Map;return f.forEach(([r,_],F)=>{let o=t.getNode(F)?.in??"default",h=u.get(_)??new Map;if(!u.has(_))u.set(_,h);let k=g.get(r)??new Map;if(!g.has(r))g.set(r,k);for(let n of[h,k]){let P=n.get(o)??[];if(!n.has(o))n.set(o,P);P.push(F)}}),{horiz:[...m(u,"horizontal").values()].filter((r)=>r.length>1),vert:[...m(g,"vertical").values()].filter((r)=>r.length>1)}}),[B,v]=N.reduce(([f,u],{horiz:g,vert:r})=>[[...f,...g],[...u,...r]],[[],[]]),I=new Set;w.forEach((f)=>f.members.forEach((u)=>I.add(u)));let c=e((f)=>f.filter((u)=>!u.some((g)=>I.has(g))),"dropOverlapping"),y=c(B),d=c(v);return w.forEach((f)=>{if(f.members.length<2)return;if(f.direction==="row")y.push([...f.members]);else d.push([...f.members])}),{horizontal:y,vertical:d}}e(bt,"getAlignments");function Nt(t,i,s=[]){let w=[],m=i.getConfigField("iconSize"),N=i.getConfigField("idealEdgeLengthMultiplier"),B=N*m,v=new Set;s.forEach((y)=>{for(let d=0;d<y.members.length-1;d++){let f=y.members[d],u=y.members[d+1];if(v.add(`${f}|${u}`),v.add(`${u}|${f}`),y.direction==="row")w.push({left:f,right:u,gap:B});else w.push({top:f,bottom:u,gap:B})}});let I=e((y)=>`${y[0]},${y[1]}`,"posToStr"),c=e((y)=>y.split(",").map((d)=>parseInt(d)),"strToPos");return t.forEach((y)=>{let d=new Map([...y.entries()].map(([r,_])=>[I(_),r])),f=[I([0,0])],u={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};while(f.length>0){let r=f.shift();if(r){u[r]=1;let _=d.get(r);if(_){let F=c(r);Object.entries(g).forEach(([o,h])=>{let k=I([F[0]+h[0],F[1]+h[1]]),n=d.get(k);if(n&&!u[k]){if(f.push(k),v.has(`${_}|${n}`))return;w.push({[ht[o]]:n,[ht[kt(o)]]:_,gap:N*m})}})}}}}),w}e(Nt,"getRelativeConstraints");function St(t,i,s,w,m,{spatialMaps:N,groupAlignments:B}){return new Promise((v)=>{let I=p("body").append("div").attr("id","cy").attr("style","display:none"),c=ct({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[0.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${m.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${m.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});I.remove(),Ct(s,c),Tt(t,c,m),At(i,c,m),It(w,c);let y=m.getLayoutHints(),d=bt(m,N,B,y),f=Nt(N,m,y),u=m.getConfigField("iconSize"),g=m.getConfigField("idealEdgeLengthMultiplier")*u,r=0.5*u,_=m.getConfigField("edgeElasticity"),F=m.getConfigField("seed"),o=c.layout({name:"fcose",quality:"proof",randomize:m.getConfigField("randomize"),nodeSeparation:m.getConfigField("nodeSeparation"),numIter:m.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:j}=Qe(n);return P===j?g:r},edgeElasticity(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:j}=Qe(n);return P===j?_:0.001},alignmentConstraint:d,relativePlacementConstraint:f});o.one("layoutstop",()=>{function h(k,n,P,j){let M,q,{x:Y,y:x}=k,{x:H,y:Z}=n;q=(j-x+(Y-P)*(x-Z)/(Y-H))/Math.sqrt(1+Math.pow((x-Z)/(Y-H),2)),M=Math.sqrt(Math.pow(j-x,2)+Math.pow(P-Y,2)-Math.pow(q,2));let Q=Math.sqrt(Math.pow(H-Y,2)+Math.pow(Z-x,2));M=M/Q;let se=(H-Y)*(j-x)-(Z-x)*(P-Y);switch(!0){case se>=0:se=1;break;case se<0:se=-1;break}let re=(H-Y)*(P-Y)+(Z-x)*(j-x);switch(!0){case re>=0:re=1;break;case re<0:re=-1;break}return q=Math.abs(q)*se,M=M*re,{distances:q,weights:M}}e(h,"getSegmentWeights"),c.startBatch();for(let k of Object.values(c.edges()))if(k.data?.()){let{x:n,y:P}=k.source().position(),{x:j,y:M}=k.target().position();if(n!==j&&P!==M){let q=k.sourceEndpoint(),Y=k.targetEndpoint(),{sourceDir:x}=yt(k),[H,Z]=Ve(x)?[q.x,Y.y]:[Y.x,q.y],{weights:Q,distances:se}=h(q,Y,H,Z);k.style("segment-distances",se),k.style("segment-weights",Q)}}c.endBatch(),dt(F,()=>o.run())});try{dt(F,()=>o.run())}catch(h){if(h instanceof RangeError&&h.message.includes("Invalid array length"))throw Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw h}c.ready((h)=>{a.info("Ready",h),v(c)})})}e(St,"layoutArchitecture");var Xt=e(async(t,i,s,w)=>{let m=w.db;m.setDiagramId(i);let N=m.getServices(),B=m.getJunctions(),v=m.getGroups(),I=m.getEdges(),c=m.getDataStructures(),y=V(i),d=y.append("g");d.attr("class","architecture-edges");let f=y.append("g");f.attr("class","architecture-services");let u=y.append("g");u.attr("class","architecture-groups"),await Ht(m,f,N,i),Vt(m,f,B,i);let g=await St(N,B,v,I,m,c);await Yt(d,g,m,i),await Ut(u,g,m,i),Lt(m,g),ft(void 0,y,m.getConfigField("padding"),m.getConfigField("useMaxWidth"))},"draw"),jt={draw:Xt},ar={parser:wt,get db(){return new Et},renderer:jt,styles:_t};export{ar as diagram};
|
|
36
|
+
`)}}}}}))},"drawEdges"),Ut=e(async function(t,i,s,w){let N=s.getConfigField("padding")*0.75,B=s.getConfigField("fontSize"),I=s.getConfigField("iconSize")/2;await Promise.all(i.nodes().map(async(c)=>{let y=Qe(c);if(y.type==="group"){let{h:d,w:f,x1:u,y1:g}=c.boundingBox(),r=t.append("rect");r.attr("id",`${w}-group-${y.id}`).attr("x",u+I).attr("y",g+I).attr("width",f).attr("height",d).attr("class","node-bkg");let _=t.append("g"),F=u,o=g;if(y.icon){let h=_.append("g");h.html(`<g>${await nt(y.icon,{height:N,width:N,fallbackPrefix:it.prefix})}</g>`),h.attr("transform","translate("+(F+I+1)+", "+(o+I+1)+")"),F+=N,o+=B/2-1-2}if(y.label){let h=_.append("g");await Ie(h,y.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},l()),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),h.attr("transform","translate("+(F+I+4)+", "+(o+I+2)+")")}s.setElementForId(y.id,r)}}))},"drawGroups"),Ht=e(async function(t,i,s,w){let m=l();for(let N of s){let B=i.append("g"),v=t.getConfigField("iconSize");if(N.title){let d=B.append("g");await Ie(d,N.title,{useHtmlLabels:!1,width:v*1.5,classes:"architecture-service-label"},m),d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),d.attr("transform","translate("+v/2+", "+v+")")}let I=B.append("g");if(N.icon)I.html(`<g>${await nt(N.icon,{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);else if(N.iconText){I.html(`<g>${await nt("blank",{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);let u=I.append("g").append("foreignObject").attr("width",v).attr("height",v).append("div").attr("class","node-icon-text").attr("style",`height: ${v}px;`).append("div").html(O(N.iconText,m)),g=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((v-2)/g)};`)}else I.append("path").attr("class","node-bkg").attr("id",`${w}-node-${N.id}`).attr("d",`M0,${v} V5 Q0,0 5,0 H${v-5} Q${v},0 ${v},5 V${v} Z`);B.attr("id",`${w}-service-${N.id}`).attr("class","architecture-service");let{width:c,height:y}=B.node().getBBox();N.width=c,N.height=y,t.setElementForId(N.id,B)}return 0},"drawServices"),Vt=e(function(t,i,s,w){s.forEach((m)=>{let N=i.append("g"),B=t.getConfigField("iconSize");N.append("g").append("rect").attr("id",`${w}-node-${m.id}`).attr("fill-opacity","0").attr("width",B).attr("height",B),N.attr("class","architecture-junction");let{width:I,height:c}=N._groups[0][0].getBBox();N.width=I,N.height=c,t.setElementForId(m.id,N)})},"drawJunctions");Dn([{name:it.prefix,icons:it}]);ut.use(xt.default);function Tt(t,i,s){t.forEach((w)=>{i.add({group:"nodes",data:{type:"service",id:w.id,icon:w.icon,label:w.title,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-service"})})}e(Tt,"addServices");function At(t,i,s){t.forEach((w)=>{i.add({group:"nodes",data:{type:"junction",id:w.id,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-junction"})})}e(At,"addJunctions");function Lt(t,i){i.nodes().map((s)=>{let w=Qe(s);if(w.type==="group")return;w.x=s.position().x,w.y=s.position().y,t.getElementById(w.id).attr("transform","translate("+(w.x||0)+","+(w.y||0)+")")})}e(Lt,"positionNodes");function Ct(t,i){t.forEach((s)=>{i.add({group:"nodes",data:{type:"group",id:s.id,icon:s.icon,label:s.title,parent:s.in},classes:"node-group"})})}e(Ct,"addGroups");function It(t,i){t.forEach((s)=>{let{lhsId:w,rhsId:m,lhsInto:N,lhsGroup:B,rhsInto:v,lhsDir:I,rhsDir:c,rhsGroup:y,title:d}=s,f=dt(s.lhsDir,s.rhsDir)?"segments":"straight",u={id:`${w}-${m}`,label:d,source:w,sourceDir:I,sourceArrow:N,sourceGroup:B,sourceEndpoint:I==="L"?"0 50%":I==="R"?"100% 50%":I==="T"?"50% 0":"50% 100%",target:m,targetDir:c,targetArrow:v,targetGroup:y,targetEndpoint:c==="L"?"0 50%":c==="R"?"100% 50%":c==="T"?"50% 0":"50% 100%"};i.add({group:"edges",data:u,classes:f})})}e(It,"addEdges");function bt(t,i,s,w=[]){let m=e((f,u)=>{let g=new Map;for(let[r,_]of f.entries()){let F=`${r}`,o=0,h=[..._.entries()];if(h.length===1){g.set(F,h[0][1]);continue}for(let k=0;k<h.length-1;k++)for(let n=k+1;n<h.length;n++){let[P,j]=h[k],[M,q]=h[n];if(s.get(mt(P,M))===u)g.set(F,[...g.get(F)??[],...j,...q]);else if(P==="default"||M==="default")g.set(F,[...g.get(F)??[],...j,...q]);else{let x=`${F}-${o++}`;g.set(x,j);let H=`${F}-${o++}`;g.set(H,q)}}}return g},"flattenAlignments"),N=i.map((f)=>{let u=new Map,g=new Map;return f.forEach(([r,_],F)=>{let o=t.getNode(F)?.in??"default",h=u.get(_)??new Map;if(!u.has(_))u.set(_,h);let k=g.get(r)??new Map;if(!g.has(r))g.set(r,k);for(let n of[h,k]){let P=n.get(o)??[];if(!n.has(o))n.set(o,P);P.push(F)}}),{horiz:[...m(u,"horizontal").values()].filter((r)=>r.length>1),vert:[...m(g,"vertical").values()].filter((r)=>r.length>1)}}),[B,v]=N.reduce(([f,u],{horiz:g,vert:r})=>[[...f,...g],[...u,...r]],[[],[]]),I=new Set;w.forEach((f)=>f.members.forEach((u)=>I.add(u)));let c=e((f)=>f.filter((u)=>!u.some((g)=>I.has(g))),"dropOverlapping"),y=c(B),d=c(v);return w.forEach((f)=>{if(f.members.length<2)return;if(f.direction==="row")y.push([...f.members]);else d.push([...f.members])}),{horizontal:y,vertical:d}}e(bt,"getAlignments");function Nt(t,i,s=[]){let w=[],m=i.getConfigField("iconSize"),N=i.getConfigField("idealEdgeLengthMultiplier"),B=N*m,v=new Set;s.forEach((y)=>{for(let d=0;d<y.members.length-1;d++){let f=y.members[d],u=y.members[d+1];if(v.add(`${f}|${u}`),v.add(`${u}|${f}`),y.direction==="row")w.push({left:f,right:u,gap:B});else w.push({top:f,bottom:u,gap:B})}});let I=e((y)=>`${y[0]},${y[1]}`,"posToStr"),c=e((y)=>y.split(",").map((d)=>parseInt(d)),"strToPos");return t.forEach((y)=>{let d=new Map([...y.entries()].map(([r,_])=>[I(_),r])),f=[I([0,0])],u={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};while(f.length>0){let r=f.shift();if(r){u[r]=1;let _=d.get(r);if(_){let F=c(r);Object.entries(g).forEach(([o,h])=>{let k=I([F[0]+h[0],F[1]+h[1]]),n=d.get(k);if(n&&!u[k]){if(f.push(k),v.has(`${_}|${n}`))return;w.push({[gt[o]]:n,[gt[kt(o)]]:_,gap:N*m})}})}}}}),w}e(Nt,"getRelativeConstraints");function St(t,i,s,w,m,{spatialMaps:N,groupAlignments:B}){return new Promise((v)=>{let I=p("body").append("div").attr("id","cy").attr("style","display:none"),c=ut({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[0.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${m.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${m.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});I.remove(),Ct(s,c),Tt(t,c,m),At(i,c,m),It(w,c);let y=m.getLayoutHints(),d=bt(m,N,B,y),f=Nt(N,m,y),u=m.getConfigField("iconSize"),g=m.getConfigField("idealEdgeLengthMultiplier")*u,r=0.5*u,_=m.getConfigField("edgeElasticity"),F=m.getConfigField("seed"),o=c.layout({name:"fcose",quality:"proof",randomize:m.getConfigField("randomize"),nodeSeparation:m.getConfigField("nodeSeparation"),numIter:m.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:j}=Qe(n);return P===j?g:r},edgeElasticity(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:j}=Qe(n);return P===j?_:0.001},alignmentConstraint:d,relativePlacementConstraint:f});o.one("layoutstop",()=>{function h(k,n,P,j){let M,q,{x:Y,y:x}=k,{x:H,y:Z}=n;q=(j-x+(Y-P)*(x-Z)/(Y-H))/Math.sqrt(1+Math.pow((x-Z)/(Y-H),2)),M=Math.sqrt(Math.pow(j-x,2)+Math.pow(P-Y,2)-Math.pow(q,2));let Q=Math.sqrt(Math.pow(H-Y,2)+Math.pow(Z-x,2));M=M/Q;let se=(H-Y)*(j-x)-(Z-x)*(P-Y);switch(!0){case se>=0:se=1;break;case se<0:se=-1;break}let re=(H-Y)*(P-Y)+(Z-x)*(j-x);switch(!0){case re>=0:re=1;break;case re<0:re=-1;break}return q=Math.abs(q)*se,M=M*re,{distances:q,weights:M}}e(h,"getSegmentWeights"),c.startBatch();for(let k of Object.values(c.edges()))if(k.data?.()){let{x:n,y:P}=k.source().position(),{x:j,y:M}=k.target().position();if(n!==j&&P!==M){let q=k.sourceEndpoint(),Y=k.targetEndpoint(),{sourceDir:x}=yt(k),[H,Z]=Ve(x)?[q.x,Y.y]:[Y.x,q.y],{weights:Q,distances:se}=h(q,Y,H,Z);k.style("segment-distances",se),k.style("segment-weights",Q)}}c.endBatch(),ct(F,()=>o.run())});try{ct(F,()=>o.run())}catch(h){if(h instanceof RangeError&&h.message.includes("Invalid array length"))throw Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw h}c.ready((h)=>{a.info("Ready",h),v(c)})})}e(St,"layoutArchitecture");var Xt=e(async(t,i,s,w)=>{let m=w.db;m.setDiagramId(i);let N=m.getServices(),B=m.getJunctions(),v=m.getGroups(),I=m.getEdges(),c=m.getDataStructures(),y=V(i),d=y.append("g");d.attr("class","architecture-edges");let f=y.append("g");f.attr("class","architecture-services");let u=y.append("g");u.attr("class","architecture-groups"),await Ht(m,f,N,i),Vt(m,f,B,i);let g=await St(N,B,v,I,m,c);await Yt(d,g,m,i),await Ut(u,g,m,i),Lt(m,g),ht(void 0,y,m.getConfigField("padding"),m.getConfigField("useMaxWidth"))},"draw"),jt={draw:Xt},ar={parser:wt,get db(){return new Et},renderer:jt,styles:_t};export{ar as diagram};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{e}from"./chunk-1s53190z.js";import"./chunk-5vjhvw1m.js";import{Ai,Li}from"./chunk-femhej5w.js";import"./chunk-dg3p8db5.js";import"./chunk-tqr80b5w.js";import"./chunk-r7frwjqx.js";import"./chunk-989jq2h8.js";var r=e((t)=>`${Ai(t)}
|
|
2
|
+
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
+
stroke: ${t.clusterBorder} !important;
|
|
4
|
+
}
|
|
5
|
+
[data-look="neo"].cluster rect {
|
|
6
|
+
filter: none;
|
|
7
|
+
}
|
|
8
|
+
`,"getStyles"),o=r,D=Li({styles:o});export{D as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bi}from"./chunk-2cem4sv7.js";export{bi as createWardleyServices};
|