|
|
!(function(){var Gv=Object.defineProperty,Uv=Object.defineProperties;var Vv=Object.getOwnPropertyDescriptors;var lf=Object.getOwnPropertySymbols;var Yv=Object.prototype.hasOwnProperty,Hv=Object.prototype.propertyIsEnumerable;var dc=Math.pow,id=(yt,Et,y)=>Et in yt?Gv(yt,Et,{enumerable:!0,configurable:!0,writable:!0,value:y}):yt[Et]=y,Fl=(yt,Et)=>{for(var y in Et||(Et={}))Yv.call(Et,y)&&id(yt,y,Et[y]);if(lf)for(var y of lf(Et))Hv.call(Et,y)&&id(yt,y,Et[y]);return yt},ad=(yt,Et)=>Uv(yt,Vv(Et));var Wi=(yt,Et,y)=>id(yt,typeof Et!="symbol"?Et+"":Et,y);(self.webpackChunk=self.webpackChunk||[]).push([[2225],{55532:function(yt,Et,y){"use strict";y.d(Et,{ni:function(){return yo},EF:function(){return Pa}});var c=function(X,st){var xt=X.nodes,jt=X.edges,$t=[],ee={};if(!xt)throw new Error("invalid nodes data!");return xt&&xt.forEach(function(De,Fe){ee[De.id]=Fe;var Je=[];$t.push(Je)}),jt&&jt.forEach(function(De){var Fe=De.source,Je=De.target,cn=ee[Fe],an=ee[Je];!cn&&cn!==0||!an&&an!==0||($t[cn][an]=1,st||($t[an][cn]=1))}),$t},_=c,I=function(X,st){return X===st},z=function(){function Ot(X,st){st===void 0&&(st=null),this.value=X,this.next=st}return Ot.prototype.toString=function(X){return X?X(this.value):"".concat(this.value)},Ot}(),S=function(){function Ot(X){X===void 0&&(X=I),this.head=null,this.tail=null,this.compare=X}return Ot.prototype.prepend=function(X){var st=new z(X,this.head);return this.head=st,this.tail||(this.tail=st),this},Ot.prototype.append=function(X){var st=new z(X);return this.head?(this.tail.next=st,this.tail=st,this):(this.head=st,this.tail=st,this)},Ot.prototype.delete=function(X){if(!this.head)return null;for(var st=null;this.head&&this.compare(this.head.value,X);)st=this.head,this.head=this.head.next;var xt=this.head;if(xt!==null)for(;xt.next;)this.compare(xt.next.value,X)?(st=xt.next,xt.next=xt.next.next):xt=xt.next;return this.compare(this.tail.value,X)&&(this.tail=xt),st},Ot.prototype.find=function(X){var st=X.value,xt=st===void 0?void 0:st,jt=X.callback,$t=jt===void 0?void 0:jt;if(!this.head)return null;for(var ee=this.head;ee;){if($t&&$t(ee.value)||xt!==void 0&&this.compare(ee.value,xt))return ee;ee=ee.next}return null},Ot.prototype.deleteTail=function(){var X=this.tail;if(this.head===this.tail)return this.head=null,this.tail=null,X;for(var st=this.head;st.next;)st.next.next?st=st.next:st.next=null;return this.tail=st,X},Ot.prototype.deleteHead=function(){if(!this.head)return null;var X=this.head;return this.head.next?this.head=this.head.next:(this.head=null,this.tail=null),X},Ot.prototype.fromArray=function(X){var st=this;return X.forEach(function(xt){return st.append(xt)}),this},Ot.prototype.toArray=function(){for(var X=[],st=this.head;st;)X.push(st),st=st.next;return X},Ot.prototype.reverse=function(){for(var X=this.head,st=null,xt=null;X;)xt=X.next,X.next=st,st=X,X=xt;this.tail=this.head,this.head=st},Ot.prototype.toString=function(X){return X===void 0&&(X=void 0),this.toArray().map(function(st){return st.toString(X)}).toString()},Ot}(),R=S,w=function(){function Ot(){this.linkedList=new R}return Ot.prototype.isEmpty=function(){return!this.linkedList.head},Ot.prototype.peek=function(){return this.linkedList.head?this.linkedList.head.value:null},Ot.prototype.enqueue=function(X){this.linkedList.append(X)},Ot.prototype.dequeue=function(){var X=this.linkedList.deleteHead();return X?X.value:null},Ot.prototype.toString=function(X){return this.linkedList.toString(X)},Ot}(),N=w,D=function(X,st,xt){st===void 0&&(st=[]);var jt=st.filter(function(Fe){return Fe.source===X||Fe.target===X});if(xt==="target"){var $t=function(Je){return Je.source===X};return jt.filter($t).map(function(Fe){return Fe.target})}if(xt==="source"){var ee=function(Je){return Je.target===X};return jt.filter(ee).map(function(Fe){return Fe.source})}var De=function(Je){return Je.source===X?Je.target:Je.source};return jt.map(De)},A=function(X,st){return st.filter(function(xt){return xt.source===X})},L=function(X,st){return st.filter(function(xt){return xt.source===X||xt.target===X})},F=function(X){X===void 0&&(X=0);var st="".concat(Math.random()).split(".")[1].substr(0,5),xt="".concat(Math.random()).split(".")[1].substr(0,5);return"".concat(X,"-").concat(st).concat(xt)};function it(Ot){Ot===void 0&&(Ot={});var X=Ot,st=function(){},xt=function(){var jt={};return function($t){var ee=$t.next,De=ee;return jt[De]?!1:(jt[De]=!0,!0)}}();return X.allowTraversal=Ot.allowTraversal||xt,X.enter=Ot.enter||st,X.leave=Ot.leave||st,X}var G=function(X,st,xt,jt){jt===void 0&&(jt=!0);var $t=it(xt),ee=new N,De=X.edges,Fe=De===void 0?[]:De;ee.enqueue(st);for(var Je="",cn=function(){var Tn=ee.dequeue();$t.enter({current:Tn,previous:Je}),D(Tn,Fe,jt?"target":void 0).forEach(function(Mn){$t.allowTraversal({previous:Je,current:Tn,next:Mn})&&ee.enqueue(Mn)}),$t.leave({current:Tn,previous:Je}),Je=Tn};!ee.isEmpty();)cn()},kt=G,gt=function(X){for(var st=X.nodes,xt=st===void 0?[]:st,jt=X.edges,$t=jt===void 0?[]:jt,ee=[],De={},Fe=[],Je=function Mn(Ln){Fe.push(Ln),De[Ln.id]=!0;for(var jn=D(Ln.id,$t),In=function(rr){var dr=jn[rr];if(!De[dr]){var gr=xt.filter(function(mr){return mr.id===dr});gr.length>0&&Mn(gr[0])}},$n=0;$n<jn.length;++$n)In($n)},cn=0;cn<xt.length;cn++){var an=xt[cn];if(!De[an.id]){Je(an);for(var Tn=[];Fe.length>0;)Tn.push(Fe.pop());ee.push(Tn)}}return ee},Q=function(X){for(var st=X.nodes,xt=st===void 0?[]:st,jt=X.edges,$t=jt===void 0?[]:jt,ee=[],De={},Fe={},Je={},cn=[],an=0,Tn=function In($n){Fe[$n.id]=an,Je[$n.id]=an,an+=1,ee.push($n),De[$n.id]=!0;for(var sr=D($n.id,$t,"target").filter(function(_r){return xt.map(function(Or){return Or.id}).indexOf(_r)>-1}),rr=function(Or){var Nr=sr[Or];if(!Fe[Nr]&&Fe[Nr]!==0){var Zr=xt.filter(function(Wr){return Wr.id===Nr});Zr.length>0&&In(Zr[0]),Je[$n.id]=Math.min(Je[$n.id],Je[Nr])}else De[Nr]&&(Je[$n.id]=Math.min(Je[$n.id],Fe[Nr]))},dr=0;dr<sr.length;dr++)rr(dr);if(Je[$n.id]===Fe[$n.id]){for(var gr=[];ee.length>0;){var mr=ee.pop();if(De[mr.id]=!1,gr.push(mr),mr===$n)break}gr.length>0&&cn.push(gr)}},Mn=0,Ln=xt;Mn<Ln.length;Mn++){var jn=Ln[Mn];!Fe[jn.id]&&Fe[jn.id]!==0&&Tn(jn)}return cn};function Rt(Ot,X){return X?Q(Ot):gt(Ot)}var Ct=function(X){var st={},xt=X.nodes,jt=xt===void 0?[]:xt,$t=X.edges,ee=$t===void 0?[]:$t;return jt.forEach(function(De){st[De.id]={degree:0,inDegree:0,outDegree:0}}),ee.forEach(function(De){st[De.source].degree++,st[De.source].outDegree++,st[De.target].degree++,st[De.target].inDegree++}),st},Ht=Ct,de=function(X,st){var xt=Ct(X);return xt[st]?Ct(X)[st].inDegree:0},ue=function(X,st){var xt=Ct(X);return xt[st]?Ct(X)[st].outDegree:0};function Te(Ot){Ot===void 0&&(Ot={});var X=Ot,st=function(){},xt=function(){var jt={};return function($t){var ee=$t.next;return jt[ee]?!1:(jt[ee]=!0,!0)}}();return X.allowTraversal=Ot.allowTraversal||xt,X.enter=Ot.enter||st,X.leave=Ot.leave||st,X}function be(Ot,X,st,xt,jt){jt===void 0&&(jt=!0),xt.enter({current:X,previous:st});var $t=Ot.edges,ee=$t===void 0?[]:$t;D(X,ee,jt?"target":void 0).forEach(function(De){xt.allowTraversal({previous:st,current:X,next:De})&&be(Ot,De,X,xt,jt)}),xt.leave({current:X,previous:st})}function we(Ot,X,st,xt){xt===void 0&&(xt=!0),be(Ot,X,"",Te(st),xt)}var re=function(X){var st=null,xt=X.nodes,jt=xt===void 0?[]:xt,$t={},ee={},De={},Fe={};jt.forEach(function(an){ee[an.id]=an});for(var Je={enter:function(Tn){var Mn=Tn.current,Ln=Tn.previous;if(De[Mn]){st={};for(var jn=Mn,In=Ln;In!==Mn;)st[jn]=In,jn=In,In=$t[In];st[jn]=In}else De[Mn]=Mn,delete ee[Mn],$t[Mn]=Ln},leave:function(Tn){var Mn=Tn.current;Fe[Mn]=Mn,delete De[Mn]},allowTraversal:function(Tn){var Mn=Tn.next;return st?!1:!Fe[Mn]}};Object.keys(ee).length;){var cn=Object.keys(ee)[0];we(X,cn,Je)}return st},Ge=function(X,st,xt){var jt,$t;xt===void 0&&(xt=!0);for(var ee=[],De=Rt(X,!1),Fe=0,Je=De;Fe<Je.length;Fe++){var cn=Je[Fe];if(cn.length)for(var an=cn[0],Tn=an.id,Mn=[an],Ln=(jt={},jt[Tn]=an,jt),jn=($t={},$t[Tn]=new Set,$t);Mn.length>0;)for(var In=Mn.pop(),$n=In.id,sr=D($n,X.edges),rr=function(mr){var _r,Or=sr[mr],Nr=X.nodes.find(function(k){return k.id===Or});if(Or===$n)ee.push((_r={},_r[Or]=In,_r));else if(!(Or in jn))Ln[Or]=In,Mn.push(Nr),jn[Or]=new Set([In]);else if(!jn[$n].has(Nr)){for(var Zr=!0,Wr=[Nr,In],j=Ln[$n];jn[Or].size&&!jn[Or].has(j)&&(Wr.push(j),j!==Ln[j.id]);)j=Ln[j.id];if(Wr.push(j),st&&xt?(Zr=!1,Wr.findIndex(function(k){return st.indexOf(k.id)>-1})>-1&&(Zr=!0)):st&&!xt&&Wr.findIndex(function(k){return st.indexOf(k.id)>-1})>-1&&(Zr=!1),Zr){for(var B={},P=1;P<Wr.length;P+=1)B[Wr[P-1].id]=Wr[P];Wr.length&&(B[Wr[Wr.length-1].id]=Wr[0]),ee.push(B)}jn[Or].add(In)}},dr=0;dr<sr.length;dr+=1)rr(dr)}return ee},rn=function(X,st,xt){xt===void 0&&(xt=!0);for(var jt=[],$t=new Set,ee=[],De=[],Fe={},Je={},cn=function(j){for(var B=[j];B.length>0;){var P=B.pop();$t.has(P)&&($t.delete(P),ee[P.id].forEach(function(k){B.push(k)}),ee[P.id].clear())}},an=function Wr(j,B,P){var k=!1;if(st&&xt===!1&&st.indexOf(j.id)>-1)return k;jt.push(j),$t.add(j);for(var U=P[j.id],rt=0;rt<U.length;rt+=1){var ct=Fe[U[rt]];if(ct===B){for(var lt={},mt=1;mt<jt.length;mt+=1)lt[jt[mt-1].id]=jt[mt];jt.length&&(lt[jt[jt.length-1].id]=jt[0]),De.push(lt),k=!0}else $t.has(ct)||Wr(ct,B,P)&&(k=!0)}if(k)cn(j);else for(var rt=0;rt<U.length;rt+=1){var ct=Fe[U[rt]];ee[ct.id].has(j)||ee[ct.id].add(j)}return jt.pop(),k},Tn=X.nodes,Mn=Tn===void 0?[]:Tn,Ln=0;Ln<Mn.length;Ln+=1){var jn=Mn[Ln],In=jn.id;Je[In]=Ln,Fe[Ln]=jn}if(st&&xt)for(var $n=function(j){var B=st[j];Je[Mn[j].id]=Je[B],Je[B]=0,Fe[0]=Mn.find(function(P){return P.id===B}),Fe[Je[Mn[j].id]]=Mn[j]},Ln=0;Ln<st.length;Ln++)$n(Ln);for(var sr=function(j){for(var B,P,k=1/0,U=0;U<j.length;U+=1)for(var rt=j[U],ct=0;ct<rt.length;ct++){var lt=Je[rt[ct].id];lt<k&&(k=lt,P=U)}for(var mt=j[P],Ft=[],U=0;U<mt.length;U+=1){var ae=mt[U];Ft[ae.id]=[];for(var me=0,Oe=D(ae.id,X.edges,"target").filter(function(mn){return mt.map(function(bn){return bn.id}).indexOf(mn)>-1});me<Oe.length;me++){var _e=Oe[me];_e===ae.id&&!(xt===!1&&st.indexOf(ae.id)>-1)?De.push((B={},B[ae.id]=ae,B)):Ft[ae.id].push(Je[_e])}}return{component:mt,adjList:Ft,minIdx:k}},rr=0;rr<Mn.length;){var dr=Mn.filter(function(Wr){return Je[Wr.id]>=rr}),gr=Q({nodes:dr,edges:X.edges}).filter(function(Wr){return Wr.length>1});if(gr.length===0)break;var mr=sr(gr),_r=mr.minIdx,Or=mr.adjList,Nr=mr.component;if(Nr.length>1){Nr.forEach(function(Wr){ee[Wr.id]=new Set});var Zr=Fe[_r];if(st&&xt&&st.indexOf(Zr.id)===-1)return De;an(Zr,Zr,Or),rr=_r+1}else break}return De},Xe=function(X,st,xt,jt){return jt===void 0&&(jt=!0),st?rn(X,xt,jt):Ge(X,xt,jt)},En=re,Pn=y(80813),tn={}.toString,xn=function(Ot,X){return tn.call(Ot)==="[object "+X+"]"},It=xn,Ee=function(Ot){return It(Ot,"Function")},fn=function(Ot){return Array.isArray?Array.isArray(Ot):It(Ot,"Array")},on=function(Ot){var X=typeof Ot;return Ot!==null&&X==="object"||X==="function"};function Pe(Ot,X){if(Ot){var st;if(fn(Ot))for(var xt=0,jt=Ot.length;xt<jt&&(st=X(Ot[xt],xt),st!==!1);xt++);else if(on(Ot)){for(var $t in Ot)if(Ot.hasOwnProperty($t)&&(st=X(Ot[$t],$t),st===!1))break}}}var Ze=Pe,Ke=Object.keys?function(Ot){return Object.keys(Ot)}:function(Ot){var X=[];return Ze(Ot,function(st,xt){Ee(Ot)&&xt==="prototype"||X.push(xt)}),X},le=null;function Ae(Ot,X){var st=keys(X),xt=st.length;if(isNil(Ot))return!xt;for(var jt=0;jt<xt;jt+=1){var $t=st[jt];if(X[$t]!==Ot[$t]||!($t in Ot))return!1}return!0}var Pt=null,wt=function(Ot){if(!isObjectLike(Ot)||!isType(Ot,"Object"))return!1;if(Object.getPrototypeOf(Ot)===null)return!0;for(var X=Ot;Object.getPrototypeOf(X)!==null;)X=Object.getPrototypeOf(X);return Object.getPrototypeOf(Ot)===X},he=null;function je(Ot,X){if(!isArray(Ot))return null;var st;if(isFunction(X)&&(st=X),isPlainObject(X)&&(st=function(jt){return isMatch(jt,X)}),st){for(var xt=0;xt<Ot.length;xt+=1)if(st(Ot[xt]))return Ot[xt]}return null}var Re=null,ce=function(Ot,X){for(var st=null,xt=0;xt<Ot.length;xt++){var jt=Ot[xt],$t=jt[X];if(!isNil($t)){isArray($t)?st=$t[0]:st=$t;break}}return st},Le=null,xe=function(Ot){if(!isArray(Ot))return[];for(var X=[],st=0;st<Ot.length;st++)X=X.concat(Ot[st]);return X},_t=null,ie=function(Ot,X){if(X===void 0&&(X=[]),!isArray(Ot))X.push(Ot);else for(var st=0;st<Ot.length;st+=1)ie(Ot[st],X);return X},Me=null,T=function(Ot){if(isArray(Ot))return Ot.reduce(function(X,st){return Math.max(X,st)},Ot[0])},at=function(Ot){if(isArray(Ot))return Ot.reduce(function(X,st){return Math.min(X,st)},Ot[0])},fe=function(Ot){var X=Ot.filter(function(ee){return!isNaN(ee)});if(!X.length)return{min:0,max:0};if(isArray(Ot[0])){for(var st=[],xt=0;xt<Ot.length;xt++)st=st.concat(Ot[xt]);X=st}var jt=getMax(X),$t=getMin(X);return{min:$t,max:jt}},Jt=null,Ie=Array.prototype,Ne=Ie.splice,en=Ie.indexOf,St=function(Ot){for(var X=[],st=1;st<arguments.length;st++)X[st-1]=arguments[st];for(var xt=0;xt<X.length;xt++)for(var jt=X[xt],$t=-1;($t=en.call(Ot,jt))>-1;)Ne.call(Ot,$t,1);return Ot},tt=null,Nt=Array.prototype.splice,Xt=function(X,st){if(!isArrayLike(X))return[];for(var xt=X?st.length:0,jt=xt-1;xt--;){var $t=void 0,ee=st[xt];(xt===jt||ee!==$t)&&($t=ee,Nt.call(X,ee,1))}return X},Lt=null,Zt=function(Ot,X,st){if(!isArray(Ot)&&!isPlainObject(Ot))return Ot;var xt=st;return each(Ot,function(jt,$t){xt=X(xt,jt,$t)}),xt},Ut=null,qt=function(Ot,X){var st=[];if(!isArrayLike(Ot))return st;for(var xt=-1,jt=[],$t=Ot.length;++xt<$t;){var ee=Ot[xt];X(ee,xt,Ot)&&(st.push(ee),jt.push(xt))}return pullAt(Ot,jt),st},se=null,te=function(Ot){return It(Ot,"String")};function ke(Ot,X){var st;if(isFunction(X))st=function(jt,$t){return X(jt)-X($t)};else{var xt=[];isString(X)?xt.push(X):isArray(X)&&(xt=X),st=function(jt,$t){for(var ee=0;ee<xt.length;ee+=1){var De=xt[ee];if(jt[De]>$t[De])return 1;if(jt[De]<$t[De])return-1}return 0}}return Ot.sort(st),Ot}var He=null;function Ve(Ot,X){X===void 0&&(X=new Map);var st=[];if(Array.isArray(Ot))for(var xt=0,jt=Ot.length;xt<jt;xt++){var $t=Ot[xt];X.has($t)||(st.push($t),X.set($t,!0))}return st}var ln=function(Ot,X){for(var st=[],xt={},jt=0;jt<Ot.length;jt++){var $t=Ot[jt],ee=$t[X];if(!isNil(ee)){isArray(ee)||(ee=[ee]);for(var De=0;De<ee.length;De++){var Fe=ee[De];xt[Fe]||(st.push(Fe),xt[Fe]=!0)}}}return st};function On(Ot,X){return isArray(Ot)||isString(Ot)?Ot[0]===X:!1}var yn=null;function lr(Ot,X){return isArray(Ot)||isString(Ot)?Ot[Ot.length-1]===X:!1}var Zn=null,Yn=Object.prototype.hasOwnProperty;function ye(Ot,X){if(!X||!isArray(Ot))return{};for(var st={},xt=isFunction(X)?X:function(De){return De[X]},jt,$t=0;$t<Ot.length;$t++){var ee=Ot[$t];jt=xt(ee),Yn.call(st,jt)?st[jt].push(ee):st[jt]=[ee]}return st}var xr=null;function Hn(Ot,X){if(!X)return{0:Ot};if(!isFunction(X)){var st=isArray(X)?X:X.replace(/\s+/g,"").split("*");X=function(xt){for(var jt="_",$t=0,ee=st.length;$t<ee;$t++)jt+=xt[st[$t]]&&xt[st[$t]].toString();return jt}}return groupBy(Ot,X)}var Br=function(Ot,X){if(!X)return[Ot];var st=groupToMap(Ot,X),xt=[];for(var jt in st)xt.push(st[jt]);return xt},Ar={};function ri(Ot){var X=Ar[Ot];if(!X){for(var st=Ot.toString(16),xt=st.length;xt<6;xt++)st="0"+st;X="#"+st,Ar[Ot]=X}return X}var mi=null;function si(Ot){var X=0,st=0,xt=0,jt=0;return isArray(Ot)?Ot.length===1?X=st=xt=jt=Ot[0]:Ot.length===2?(X=xt=Ot[0],st=jt=Ot[1]):Ot.length===3?(X=Ot[0],st=jt=Ot[1],xt=Ot[2]):(X=Ot[0],st=Ot[1],xt=Ot[2],jt=Ot[3]):X=st=xt=jt=Ot,{r1:X,r2:st,r3:xt,r4:jt}}var Jr=null,_i=function(Ot){return It(Ot,"Number")},Yi=_i,Ei=function(Ot){return isNumber(Ot)&&Ot%1!==0},ti=null,xa=function(Ot){return isNumber(Ot)&&Ot%2===0},Di=null,ft=Number.isInteger?Number.isInteger:function(Ot){return Yi(Ot)&&Ot%1===0},b=null,E=function(Ot){return isNumber(Ot)&&Ot<0},h=null,g=function(Ot){return isNumber(Ot)&&Ot%2!==0},M=null,Y=function(Ot){return isNumber(Ot)&&Ot>0},J=null,ot=function(Ot,X){if(isArray(Ot)){for(var st,xt=-1/0,jt=0;jt<Ot.length;jt++){var $t=Ot[jt],ee=isFunction(X)?X($t):$t[X];ee>xt&&(st=$t,xt=ee)}return st}},vt=function(Ot,X){if(isArray(Ot)){for(var st,xt=1/0,jt=0;jt<Ot.length;jt++){var $t=Ot[jt],ee=isFunction(X)?X($t):$t[X];ee<xt&&(st=$t,xt=ee)}return st}},zt=180/Math.PI,q=function(Ot){return zt*Ot},$=null,H=Math.PI/180,nt=function(Ot){return H*Ot},Mt=null,Wt=null,Tt=Object.values?function(Ot){return Object.values(Ot)}:function(Ot){var X=[];return Ze(Ot,function(st,xt){Ee(Ot)&&xt==="prototype"||X.push(st)}),X},Kt=Tt,bt=function(Ot,X){return contains(values(Ot),X)},pt={}.toString,ut=function(Ot){return pt.call(Ot).replace(/^\[object /,"").replace(/]$/,"")},Gt=null,Vt=function(Ot){return isType(Ot,"Arguments")},ve=null,ge=function(Ot){return isType(Ot,"Boolean")},Yt=null,Ce=function(Ot){return isType(Ot,"Date")},qe=null,Qe=function(Ot){return isType(Ot,"Error")},Nn=null;function Dn(Ot){return isNumber(Ot)&&isFinite(Ot)}var Rn=Object.prototype,Xn=function(Ot){var X=Ot&&Ot.constructor,st=typeof X=="function"&&X.prototype||Rn;return Ot===st},tr=null,Mr=function(Ot){return isType(Ot,"RegExp")},yr=null,vr=function(){for(var Ot=[],X=0;X<arguments.length;X++)Ot[X]=arguments[X];for(var st=Ot[0],xt=1;xt<Ot.length;xt++){var jt=Ot[xt];isFunction(jt)&&(jt=jt.prototype),mix(st.prototype,jt)}},Cr=null,ur=function(Ot){if(typeof Ot!="object"||Ot===null)return Ot;var X;if(fn(Ot)){X=[];for(var st=0,xt=Ot.length;st<xt;st++)typeof Ot[st]=="object"&&Ot[st]!=null?X[st]=ur(Ot[st]):X[st]=Ot[st]}else{X={};for(var jt in Ot)typeof Ot[jt]=="object"&&Ot[jt]!=null?X[jt]=ur(Ot[jt]):X[jt]=Ot[jt]}return X},Kn=ur,Ur=function(Ot,X){if(!Ee(Ot))throw new TypeError("Expected a function");var st=function(){for(var xt=[],jt=0;jt<arguments.length;jt++)xt[jt]=arguments[jt];var $t=X?X.apply(this,xt):xt[0],ee=st.cache;if(ee.has($t))return ee.get($t);var De=Ot.apply(this,xt);return ee.set($t,De),De};return st.cache=new Map,st},Yr=5;function br(Ot,X,st,xt){st=st||0,xt=xt||Yr;for(var jt in X)if(X.hasOwnProperty(jt)){var $t=X[jt];$t!==null&&isPlainObject($t)?(isPlainObject(Ot[jt])||(Ot[jt]={}),st<xt?br(Ot[jt],$t,st+1,xt):Ot[jt]=X[jt]):isArray($t)?(Ot[jt]=[],Ot[jt]=Ot[jt].concat($t)):$t!==void 0&&(Ot[jt]=$t)}}var xi=function(Ot){for(var X=[],st=1;st<arguments.length;st++)X[st-1]=arguments[st];for(var xt=0;xt<X.length;xt+=1)br(Ot,X[xt]);return Ot},di=null,Lr=function(Ot,X,st,xt){isFunction(X)||(st=X,X=Ot,Ot=function(){});var jt=Object.create?function(ee,De){return Object.create(ee,{constructor:{value:De}})}:function(ee,De){function Fe(){}Fe.prototype=ee;var Je=new Fe;return Je.constructor=De,Je},$t=jt(X.prototype,Ot);return Ot.prototype=mix($t,Ot.prototype),Ot.superclass=jt(X.prototype,X),mix($t,st),mix(Ot,xt),Ot},Ci=null,fi=Object.prototype.hasOwnProperty;function Ni(Ot){if(isNil(Ot))return!0;if(isArrayLike(Ot))return!Ot.length;var X=getType(Ot);if(X==="Map"||X==="Set")return!Ot.size;if(isPrototype(Ot))return!Object.keys(Ot).length;for(var st in Ot)if(fi.call(Ot,st))return!1;return!0}var Ji=null,Fa=function(Ot){return typeof Ot=="object"&&Ot!==null},La=Fa,_a=function(Ot){return Ot!==null&&typeof Ot!="function"&&isFinite(Ot.length)},ta=_a,pi=function(Ot,X){if(Ot===X)return!0;if(!Ot||!X||te(Ot)||te(X))return!1;if(ta(Ot)||ta(X)){if(Ot.length!==X.length)return!1;for(var st=!0,xt=0;xt<Ot.length&&(st=pi(Ot[xt],X[xt]),!!st);xt++);return st}if(La(Ot)||La(X)){var jt=Object.keys(Ot),$t=Object.keys(X);if(jt.length!==$t.length)return!1;for(var st=!0,xt=0;xt<jt.length&&(st=pi(Ot[jt[xt]],X[jt[xt]]),!!st);xt++);return st}return!1},mo=pi,us=function(Ot,X,st){return isFunction(st)?!!st(Ot,X):isEqual(Ot,X)},Bs=function(Ot,X,st){for(var xt=0,jt=isString(X)?X.split("."):X;Ot&&xt<jt.length;)Ot=Ot[jt[xt++]];return Ot===void 0||xt<jt.length?st:Ot},Fs=function(Ot,X,st){var xt=Ot,jt=isString(X)?X.split("."):X;return jt.forEach(function($t,ee){ee<jt.length-1?(isObject(xt[$t])||(xt[$t]=isNumber(jt[ee+1])?[]:{}),xt=xt[$t]):xt[$t]=st}),Ot},qn=Object.prototype.hasOwnProperty,Za=function(Ot,X){if(Ot===null||!isPlainObject(Ot))return{};var st={};return each(X,function(xt){qn.call(Ot,xt)&&(st[xt]=Ot[xt])}),st},za=function(Ot,X){return reduce(Ot,function(st,xt,jt){return X.includes(jt)||(st[jt]=xt),st},{})},ja={},xs=function(Ot){return Ot=Ot||"g",ja[Ot]?ja[Ot]+=1:ja[Ot]=1,Ot+ja[Ot]},Wa,Ga=Ur(function(Ot,X){X===void 0&&(X={});var st=X.fontSize,xt=X.fontFamily,jt=X.fontWeight,$t=X.fontStyle,ee=X.fontVariant;return Wa||(Wa=document.createElement("canvas").getContext("2d")),Wa.font=[$t,ee,jt,st+"px",xt].join(" "),Wa.measureText(te(Ot)?Ot:"").width},function(Ot,X){return X===void 0&&(X={}),(0,Pn.pr)([Ot],Kt(X)).join("")}),Da=function(Ot,X,st,xt){xt===void 0&&(xt="...");var jt=16,$t=measureTextWidth(xt,st),ee=isString(Ot)?Ot:toString(Ot),De=X,Fe=[],Je,cn;if(measureTextWidth(Ot,st)<=X)return Ot;for(;Je=ee.substr(0,jt),cn=measureTextWidth(Je,st),!(cn+$t>De&&cn>De);)if(Fe.push(Je),De-=cn,ee=ee.substr(jt),!ee)return Fe.join("");for(;Je=ee.substr(0,1),cn=measureTextWidth(Je,st),!(cn+$t>De);)if(Fe.push(Je),De-=cn,ee=ee.substr(1),!ee)return Fe.join("");return""+Fe.join("")+xt},wa=function(){function Ot(){this.map={}}return Ot.prototype.has=function(X){return this.map[X]!==void 0},Ot.prototype.get=function(X,st){var xt=this.map[X];return xt===void 0?st:xt},Ot.prototype.set=function(X,st){this.map[X]=st},Ot.prototype.clear=function(){this.map={}},Ot.prototype.delete=function(X){delete this.map[X]},Ot.prototype.size=function(){return Object.keys(this.map).length},Ot}(),ha=null,da=function(X,st,xt){for(var jt=1/0,$t,ee=0;ee<st.length;ee++){var De=st[ee].id;!xt[De]&&X[De]<=jt&&(jt=X[De],$t=st[ee])}return $t},$s=function(X,st,xt,jt){var $t=X.nodes,ee=$t===void 0?[]:$t,De=X.edges,Fe=De===void 0?[]:De,Je=[],cn={},an={},Tn={};ee.forEach(function(rr,dr){var gr=rr.id;Je.push(gr),an[gr]=1/0,gr===st&&(an[gr]=0)});for(var Mn=ee.length,Ln=function(dr){var gr=da(an,ee,cn),mr=gr.id;if(cn[mr]=!0,an[mr]===1/0)return"continue";var _r=[];xt?_r=A(mr,Fe):_r=L(mr,Fe),_r.forEach(function(Or){var Nr=Or.target,Zr=Or.source,Wr=Nr===mr?Zr:Nr,j=jt&&Or[jt]?Or[jt]:1;an[Wr]>an[gr.id]+j?(an[Wr]=an[gr.id]+j,Tn[Wr]=[gr.id]):an[Wr]===an[gr.id]+j&&Tn[Wr].push(gr.id)})},jn=0;jn<Mn;jn++)Ln(jn);Tn[st]=[st];var In={};for(var $n in an)an[$n]!==1/0&&ws(st,$n,Tn,In);var sr={};for(var $n in In)sr[$n]=In[$n][0];return{length:an,path:sr,allPath:In}},qs=$s;function ws(Ot,X,st,xt){if(Ot===X)return[Ot];if(xt[X])return xt[X];for(var jt=[],$t=0,ee=st[X];$t<ee.length;$t++){var De=ee[$t],Fe=ws(Ot,De,st,xt);if(!Fe)return;for(var Je=0,cn=Fe;Je<cn.length;Je++){var an=cn[Je];fn(an)?jt.push((0,Pn.ev)((0,Pn.ev)([],an,!0),[X],!1)):jt.push([an,X])}}return xt[X]=jt,xt[X]}var yo=function(X,st,xt,jt,$t){var ee=qs(X,st,jt,$t),De=ee.length,Fe=ee.path,Je=ee.allPath;return{length:De[xt],path:Fe[xt],allPath:Je[xt]}},_s=function(X,st,xt,jt){var $t;if(st===xt)return[[st]];var ee=X.edges,De=ee===void 0?[]:ee,Fe=[st],Je=($t={},$t[st]=!0,$t),cn=[],an=[],Tn=jt?D(st,De,"target"):D(st,De);for(cn.push(Tn);Fe.length>0&&cn.length>0;){var Mn=cn[cn.length-1];if(Mn.length){var Ln=Mn.shift();Ln&&(Fe.push(Ln),Je[Ln]=!0,Tn=jt?D(Ln,De,"target"):D(Ln,De),cn.push(Tn.filter(function($n){return!Je[$n]})))}else{var jn=Fe.pop();Je[jn]=!1,cn.pop();continue}if(Fe[Fe.length-1]===xt){var In=Fe.map(function(sr){return sr});an.push(In);var jn=Fe.pop();Je[jn]=!1,cn.pop()}}return an},wi=function(X,st){for(var xt=_(X,st),jt=[],$t=xt.length,ee=0;ee<$t;ee+=1){jt[ee]=[];for(var De=0;De<$t;De+=1)ee===De?jt[ee][De]=0:xt[ee][De]===0||!xt[ee][De]?jt[ee][De]=1/0:jt[ee][De]=xt[ee][De]}for(var Fe=0;Fe<$t;Fe+=1)for(var ee=0;ee<$t;ee+=1)for(var De=0;De<$t;De+=1)jt[ee][De]>jt[ee][Fe]+jt[Fe][De]&&(jt[ee][De]=jt[ee][Fe]+jt[Fe][De]);return jt},Ua=wi,Ms=function(X,st,xt,jt){st===void 0&&(st=!1),xt===void 0&&(xt="weight"),jt===void 0&&(jt=1e3);var $t=X.nodes,ee=$t===void 0?[]:$t,De=X.edges,Fe=De===void 0?[]:De,Je={},cn={};ee.forEach(function(dr,gr){var mr=F();dr.clusterId=mr,Je[mr]={id:mr,nodes:[dr]},cn[dr.id]={node:dr,idx:gr}});var an=_(X,st),Tn=[],Mn={};an.forEach(function(dr,gr){var mr=0,_r=ee[gr].id;Mn[_r]={},dr.forEach(function(Or,Nr){if(Or){mr+=Or;var Zr=ee[Nr].id;Mn[_r][Zr]=Or}}),Tn.push(mr)});for(var Ln=0,jn=function(){var gr=!1;if(ee.forEach(function(mr){var _r={};Object.keys(Mn[mr.id]).forEach(function(k){var U=Mn[mr.id][k],rt=cn[k].node,ct=rt.clusterId;_r[ct]||(_r[ct]=0),_r[ct]+=U});var Or=-1/0,Nr=[];if(Object.keys(_r).forEach(function(k){Or<_r[k]?(Or=_r[k],Nr=[k]):Or===_r[k]&&Nr.push(k)}),!(Nr.length===1&&Nr[0]===mr.clusterId)){var Zr=Nr.indexOf(mr.clusterId);if(Zr>=0&&Nr.splice(Zr,1),Nr&&Nr.length){gr=!0;var Wr=Je[mr.clusterId],j=Wr.nodes.indexOf(mr);Wr.nodes.splice(j,1);var B=Math.floor(Math.random()*Nr.length),P=Je[Nr[B]];P.nodes.push(mr),mr.clusterId=P.id}}}),!gr)return"break";Ln++};Ln<jt;){var In=jn();if(In==="break")break}Object.keys(Je).forEach(function(dr){var gr=Je[dr];(!gr.nodes||!gr.nodes.length)&&delete Je[dr]});var $n=[],sr={};Fe.forEach(function(dr){var gr=dr.source,mr=dr.target,_r=dr[xt]||1,Or=cn[gr].node.clusterId,Nr=cn[mr].node.clusterId,Zr="".concat(Or,"---").concat(Nr);if(sr[Zr])sr[Zr].weight+=_r,sr[Zr].count++;else{var Wr={source:Or,target:Nr,weight:_r,count:1};sr[Zr]=Wr,$n.push(Wr)}});var rr=[];return Object.keys(Je).forEach(function(dr){rr.push(Je[dr])}),{clusters:rr,clusterEdges:$n}},ol=Ms,ea=function(){function Ot(X){this.arr=X}return Ot.prototype.getArr=function(){return this.arr||[]},Ot.prototype.add=function(X){var st,xt=X.arr;if(!(!((st=this.arr)===null||st===void 0)&&st.length))return new Ot(xt);if(!(xt!=null&&xt.length))return new Ot(this.arr);if(this.arr.length===xt.length){var jt=[];for(var $t in this.arr)jt[$t]=this.arr[$t]+xt[$t];return new Ot(jt)}},Ot.prototype.subtract=function(X){var st,xt=X.arr;if(!(!((st=this.arr)===null||st===void 0)&&st.length))return new Ot(xt);if(!(xt!=null&&xt.length))return new Ot(this.arr);if(this.arr.length===xt.length){var jt=[];for(var $t in this.arr)jt[$t]=this.arr[$t]-xt[$t];return new Ot(jt)}},Ot.prototype.avg=function(X){var st=[];if(X!==0)for(var xt in this.arr)st[xt]=this.arr[xt]/X;return new Ot(st)},Ot.prototype.negate=function(){var X=[];for(var st in this.arr)X[st]=-this.arr[st];return new Ot(X)},Ot.prototype.squareEuclideanDistance=function(X){var st,xt=X.arr;if(!(!((st=this.arr)===null||st===void 0)&&st.length)||!(xt!=null&&xt.length))return 0;if(this.arr.length===xt.length){var jt=0;for(var $t in this.arr)jt+=Math.pow(this.arr[$t]-X.arr[$t],2);return jt}},Ot.prototype.euclideanDistance=function(X){var st,xt=X.arr;if(!(!((st=this.arr)===null||st===void 0)&&st.length)||!(xt!=null&&xt.length))return 0;if(this.arr.length===xt.length){var jt=0;for(var $t in this.arr)jt+=Math.pow(this.arr[$t]-X.arr[$t],2);return Math.sqrt(jt)}else console.error("The two vectors are unequal in length.")},Ot.prototype.normalize=function(){var X=[],st=Kn(this.arr);st.sort(function(ee,De){return ee-De});var xt=st[st.length-1],jt=st[0];for(var $t in this.arr)X[$t]=(this.arr[$t]-jt)/(xt-jt);return new Ot(X)},Ot.prototype.norm2=function(){var X;if(!(!((X=this.arr)===null||X===void 0)&&X.length))return 0;var st=0;for(var xt in this.arr)st+=Math.pow(this.arr[xt],2);return Math.sqrt(st)},Ot.prototype.dot=function(X){var st,xt=X.arr;if(!(!((st=this.arr)===null||st===void 0)&&st.length)||!(xt!=null&&xt.length))return 0;if(this.arr.length===xt.length){var jt=0;for(var $t in this.arr)jt+=this.arr[$t]*X.arr[$t];return jt}else console.error("The two vectors are unequal in length.")},Ot.prototype.equal=function(X){var st,xt=X.arr;if(((st=this.arr)===null||st===void 0?void 0:st.length)!==(xt==null?void 0:xt.length))return!1;for(var jt in this.arr)if(this.arr[jt]!==xt[jt])return!1;return!0},Ot}(),$i=ea,Ss=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/,Pi=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/,to=function(X,st){X===void 0&&(X=[]),st===void 0&&(st=100);var xt={};X.forEach(function($t){$t.properties&&Object.keys($t.properties).forEach(function(ee){if(ee==="id"||!"".concat($t.properties[ee]).match(Ss)&&!"".concat($t.properties[ee]).match(Pi)&&isNaN(Number($t.properties[ee]))){xt.hasOwnProperty(ee)&&delete xt[ee];return}xt.hasOwnProperty(ee)?xt[ee]+=1:xt[ee]=1})});var jt=Object.keys(xt).sort(function($t,ee){return xt[ee]-xt[$t]});return jt.length<st?jt:jt.slice(0,st)},Zs=function(X,st){return st.map(function(xt){return X.hasOwnProperty(xt)?X[xt]:0})},qi=function(X){for(var st=to(X),xt=[],jt=0;jt<X.length;jt++)xt[jt]=Zs(X[jt].properties,st);return xt},As=function(X,st){st===void 0&&(st=void 0);var xt=[];return X.forEach(function(jt){st===void 0&&xt.push(jt),jt[st]!==void 0&&xt.push(jt[st])}),xt},Bo={getAllSortProperties:to,getPropertyWeight:qi,getAllProperties:As},oa;(function(Ot){Ot.EuclideanDistance="euclideanDistance"})(oa||(oa={}));var hs=function(X,st,xt){var jt=[];st!=null&&st.length?jt=st:(X.forEach(function(ee){jt=jt.concat(Object.keys(ee))}),jt=Ve(jt));var $t={};return jt.forEach(function(ee){var De=[];X.forEach(function(Fe){Fe[ee]!==void 0&&Fe[ee]!==""&&De.push(Fe[ee])}),De.length&&!(xt!=null&&xt.includes(ee))&&($t[ee]=Ve(De))}),$t},Ma=function(X,st,xt){var jt=hs(X,st,xt),$t=[];if(!Object.keys(jt).length)return $t;var ee=Object.values(jt),De=ee.every(function(Fe){return Fe.every(function(Je){return typeof Je=="number"})});return X.forEach(function(Fe,Je){var cn=[];Object.keys(jt).forEach(function(an){var Tn=Fe[an],Mn=jt[an],Ln=Mn.findIndex(function($n){return Tn===$n}),jn=[];if(De)jn.push(Tn);else for(var In=0;In<Mn.length;In++)In===Ln?jn.push(1):jn.push(0);cn=cn.concat(jn)}),$t[Je]=cn}),$t},Ii=function(X,st,xt,jt){xt===void 0&&(xt=oa.EuclideanDistance);var $t=0;switch(xt){case oa.EuclideanDistance:$t=new $i(X).euclideanDistance(new $i(st));break;default:break}return $t},$a={getAllKeyValueMap:hs,oneHot:Ma,getDistance:Ii},qa=function(X,st,xt,jt){for(var $t=st.length,ee=2*jt,De=0,Fe=0;Fe<$t;Fe++)for(var Je=X[Fe].clusterId,cn=0;cn<$t;cn++){var an=X[cn].clusterId;if(Je===an){var Tn=st[Fe][cn]||0,Mn=xt[Fe]||0,Ln=xt[cn]||0;De+=Tn-Mn*Ln/ee}}return De*=1/ee,De},ts=function(X,st){X===void 0&&(X=[]);for(var xt=X.length,jt=new $i([]),$t=0;$t<xt;$t++)jt=jt.add(new $i(st[$t]));var ee=jt.avg(xt);ee.normalize();for(var De=0,$t=0;$t<xt;$t++){var Fe=new $i(st[$t]),Je=Fe.squareEuclideanDistance(ee);De+=Je}var cn=[];X.forEach(function(){cn.push([])});for(var $t=0;$t<xt;$t++){var Fe=new $i(st[$t]);X[$t].clusterInertial=0;for(var an=0;an<xt;an++){if($t===an){cn[$t][an]=0;continue}var Tn=new $i(st[an]);cn[$t][an]=Fe.squareEuclideanDistance(Tn),X[$t].clusterInertial+=cn[$t][an]}}for(var Mn=0,Ln=2*xt*De,$t=0;$t<xt;$t++)for(var jn=X[$t].clusterId,an=0;an<xt;an++){var In=X[an].clusterId;if(!($t===an||jn!==In)){var $n=X[$t].clusterInertial*X[an].clusterInertial/Math.pow(Ln,2)-cn[$t][an]/Ln;Mn+=$n}}return Number(Mn.toFixed(4))},Na=function(X,st,xt,jt,$t,ee,De,Fe,Je){st===void 0&&(st=!1),xt===void 0&&(xt="weight"),jt===void 0&&(jt=1e-4),$t===void 0&&($t=!1),ee===void 0&&(ee=void 0),De===void 0&&(De=[]),Fe===void 0&&(Fe=["id"]),Je===void 0&&(Je=1);var cn=X.nodes,an=cn===void 0?[]:cn,Tn=X.edges,Mn=Tn===void 0?[]:Tn,Ln=[];if($t){an.forEach(function(lt,mt){lt.properties=lt.properties||{},lt.originIndex=mt});var jn=[];an.every(function(lt){return lt.hasOwnProperty("nodeType")})&&(jn=Array.from(new Set(an.map(function(lt){return lt.nodeType}))),an.forEach(function(lt){lt.properties.nodeType=jn.findIndex(function(mt){return mt===lt.nodeType})}));var In=As(an,ee);Ln=Ma(In,De,Fe)}var $n=1,sr={},rr={};an.forEach(function(lt,mt){var Ft=String($n++);lt.clusterId=Ft,sr[Ft]={id:Ft,nodes:[lt]},rr[lt.id]={node:lt,idx:mt}});var dr=_(X,st),gr=[],mr={},_r=0;dr.forEach(function(lt,mt){var Ft=0,ae=an[mt].id;mr[ae]={},lt.forEach(function(me,Oe){if(me){Ft+=me;var _e=an[Oe].id;mr[ae][_e]=me,_r+=me}}),gr.push(Ft)}),_r/=2;for(var Or=1/0,Nr=1/0,Zr=0,Wr=[],j={};;){$t&&an.every(function(lt){return lt.hasOwnProperty("properties")})?Or=qa(an,dr,gr,_r)+ts(an,Ln)*Je:Or=qa(an,dr,gr,_r),Zr===0&&(Nr=Or,Wr=an,j=sr);var B=Or>0&&Or>Nr&&Or-Nr<jt;if(Or>Nr&&(Wr=an.map(function(lt){return{node:lt,clusterId:lt.clusterId}}),j=Kn(sr),Nr=Or),B||Zr>100)break;Zr++,Object.keys(sr).forEach(function(lt){var mt=0;Mn.forEach(function(Ft){var ae=Ft.source,me=Ft.target,Oe=rr[ae].node.clusterId,_e=rr[me].node.clusterId;(Oe===lt&&_e!==lt||_e===lt&&Oe!==lt)&&(mt=mt+(Ft[xt]||1))}),sr[lt].sumTot=mt}),an.forEach(function(lt,mt){var Ft=sr[lt.clusterId],ae=0,me,Oe=gr[mt]/(2*_r),_e=0,Ye=Ft.nodes;Ye.forEach(function(pr){var Dr=rr[pr.id].idx;_e+=dr[mt][Dr]||0});var mn=_e-Ft.sumTot*Oe,bn=Ye.filter(function(pr){return pr.id!==lt.id}),Cn=[];bn.forEach(function(pr,Dr){Cn[Dr]=Ln[pr.originIndex]});var Bn=ts(bn,Ln)*Je,Fn=mr[lt.id];if(Object.keys(Fn).forEach(function(pr){var Dr=rr[pr].node,li=Dr.clusterId;if(li!==lt.clusterId){var ui=sr[li],Hr=ui.nodes;if(!(!Hr||!Hr.length)){var wr=0;Hr.forEach(function(oi){var ii=rr[oi.id].idx;wr+=dr[mt][ii]||0});var Gr=wr-ui.sumTot*Oe,Tr=Hr.concat([lt]),Xr=[];Tr.forEach(function(oi,ii){Xr[ii]=Ln[oi.originIndex]});var bi=ts(Tr,Ln)*Je,Sr=Gr-mn;$t&&(Sr=Gr+bi-(mn+Bn)),Sr>ae&&(ae=Sr,me=ui)}}}),ae>0){me.nodes.push(lt);var Qn=lt.clusterId;lt.clusterId=me.id;var Vn=Ft.nodes.indexOf(lt);Ft.nodes.splice(Vn,1);var ir=0,or=0;Mn.forEach(function(pr){var Dr=pr.source,li=pr.target,ui=rr[Dr].node.clusterId,Hr=rr[li].node.clusterId;(ui===me.id&&Hr!==me.id||Hr===me.id&&ui!==me.id)&&(ir=ir+(pr[xt]||1)),(ui===Qn&&Hr!==Qn||Hr===Qn&&ui!==Qn)&&(or=or+(pr[xt]||1))}),me.sumTot=ir,Ft.sumTot=or}})}var P={},k=0;Object.keys(j).forEach(function(lt){var mt=j[lt];if(!mt.nodes||!mt.nodes.length){delete j[lt];return}var Ft=String(k+1);Ft!==lt&&(mt.id=Ft,mt.nodes=mt.nodes.map(function(ae){return{id:ae.id,clusterId:Ft}}),j[Ft]=mt,P[lt]=Ft,delete j[lt],k++)}),Wr.forEach(function(lt){var mt=lt.node,Ft=lt.clusterId;mt&&(mt.clusterId=Ft,mt.clusterId&&P[mt.clusterId]&&(mt.clusterId=P[mt.clusterId]))});var U=[],rt={};Mn.forEach(function(lt){var mt=lt.source,Ft=lt.target,ae=lt[xt]||1,me=rr[mt].node.clusterId,Oe=rr[Ft].node.clusterId;if(!(!me||!Oe)){var _e="".concat(me,"---").concat(Oe);if(rt[_e])rt[_e].weight+=ae,rt[_e].count++;else{var Ye={source:me,target:Oe,weight:ae,count:1};rt[_e]=Ye,U.push(Ye)}}});var ct=[];return Object.keys(j).forEach(function(lt){ct.push(j[lt])}),{clusters:ct,clusterEdges:U}},fa=Na,Ia=function(X,st,xt,jt,$t,ee,De,Fe){return st===void 0&&(st=!1),xt===void 0&&(xt="weight"),jt===void 0&&(jt=1e-4),$t===void 0&&($t=void 0),ee===void 0&&(ee=[]),De===void 0&&(De=["id"]),Fe===void 0&&(Fe=1),fa(X,st,xt,jt,!0,$t,ee,De,Fe)},eo=Ia,Oi=function(X,st){var xt;st===void 0&&(st=1);for(var jt=Kn(X),$t=jt.nodes,ee=$t===void 0?[]:$t,De=jt.edges,Fe=De===void 0?[]:De,Je=function(){var Tn=Ht({nodes:ee,edges:Fe}),Mn=Object.keys(Tn);Mn.sort(function(In,$n){var sr,rr;return((sr=Tn[In])===null||sr===void 0?void 0:sr.degree)-((rr=Tn[$n])===null||rr===void 0?void 0:rr.degree)});var Ln=Mn[0];if(!ee.length||((xt=Tn[Ln])===null||xt===void 0?void 0:xt.degree)>=st)return"break";var jn=ee.findIndex(function(In){return In.id===Ln});ee.splice(jn,1),Fe=Fe.filter(function(In){return!(In.source===Ln||In.target===Ln)})};;){var cn=Je();if(cn==="break")break}return{nodes:ee,edges:Fe}},nr=Oi,va=function(X,st,xt){var jt=[];switch(X){case oa.EuclideanDistance:jt=st[xt];break;default:jt=[];break}return jt},bo=function(X,st,xt,jt,$t,ee){st===void 0&&(st=3),xt===void 0&&(xt=void 0),jt===void 0&&(jt=[]),$t===void 0&&($t=["id"]),ee===void 0&&(ee=oa.EuclideanDistance);var De=X.nodes,Fe=De===void 0?[]:De,Je=X.edges,cn=Je===void 0?[]:Je,an={clusters:[{id:"0",nodes:Fe}],clusterEdges:[]};if(ee===oa.EuclideanDistance&&!Fe.every(function(Ft){return Ft.hasOwnProperty(xt)}))return an;var Tn=[],Mn=[];if(ee===oa.EuclideanDistance&&(Tn=As(Fe,xt),Mn=Ma(Tn,jt,$t)),!Mn.length)return an;for(var Ln=Ve(Mn.map(function(Ft){return Ft.join("")})),jn=Math.min(st,Fe.length,Ln.length),In=0;In<Fe.length;In++)Fe[In].originIndex=In;for(var $n=[],sr=[],rr=[],In=0;In<jn;In++)if(In===0){var dr=Math.floor(Math.random()*Fe.length);switch(ee){case oa.EuclideanDistance:$n[In]=Mn[dr];break;default:$n[In]=[];break}sr.push(dr),rr[In]=[Fe[dr]],Fe[dr].clusterId=String(In)}else{for(var gr=-1/0,mr=0,_r=function(me){if(!sr.includes(me)){for(var Oe=0,_e=0;_e<$n.length;_e++){var Ye=0;switch(ee){case oa.EuclideanDistance:Ye=Ii(Mn[Fe[me].originIndex],$n[_e],ee);break;default:break}Oe+=Ye}var mn=Oe/$n.length;mn>gr&&!$n.find(function(bn){return mo(bn,va(ee,Mn,Fe[me].originIndex))})&&(gr=mn,mr=me)}},Or=0;Or<Fe.length;Or++)_r(Or);$n[In]=va(ee,Mn,mr),sr.push(mr),rr[In]=[Fe[mr]],Fe[mr].clusterId=String(In)}for(var Nr=0;;){for(var In=0;In<Fe.length;In++){var Zr=0,Wr=1/0;if(!(Nr===0&&sr.includes(In))){for(var j=0;j<$n.length;j++){var B=0;switch(ee){case oa.EuclideanDistance:B=Ii(Mn[In],$n[j],ee);break;default:break}B<Wr&&(Wr=B,Zr=j)}if(Fe[In].clusterId!==void 0)for(var P=rr[Number(Fe[In].clusterId)].length-1;P>=0;P--)rr[Number(Fe[In].clusterId)][P].id===Fe[In].id&&rr[Number(Fe[In].clusterId)].splice(P,1);Fe[In].clusterId=String(Zr),rr[Zr].push(Fe[In])}}for(var k=!1,In=0;In<rr.length;In++){for(var U=rr[In],rt=new $i([]),j=0;j<U.length;j++)rt=rt.add(new $i(Mn[U[j].originIndex]));var ct=rt.avg(U.length);ct.equal(new $i($n[In]))||(k=!0,$n[In]=ct.getArr())}if(Nr++,Fe.every(function(Ft){return Ft.clusterId!==void 0})&&k||Nr>=1e3)break}var lt=[],mt={};return cn.forEach(function(Ft){var ae,me,Oe=Ft.source,_e=Ft.target,Ye=(ae=Fe.find(function(Bn){return Bn.id===Oe}))===null||ae===void 0?void 0:ae.clusterId,mn=(me=Fe.find(function(Bn){return Bn.id===_e}))===null||me===void 0?void 0:me.clusterId,bn="".concat(Ye,"---").concat(mn);if(mt[bn])mt[bn].count++;else{var Cn={source:Ye,target:mn,count:1};mt[bn]=Cn,lt.push(Cn)}}),{clusters:rr,clusterEdges:lt}},Os=bo,Eo=function(X,st){var xt=new $i(st),jt=xt.norm2(),$t=new $i(X),ee=$t.norm2(),De=xt.dot($t),Fe=jt*ee,Je=Fe?De/Fe:0;return Je},Sa=Eo,Fo=function(X,st,xt,jt,$t){X===void 0&&(X=[]),xt===void 0&&(xt=void 0),jt===void 0&&(jt=[]),$t===void 0&&($t=[]);var ee=Kn(X.filter(function(Tn){return Tn.id!==st.id})),De=X.findIndex(function(Tn){return Tn.id===st.id}),Fe=As(X,xt),Je=Ma(Fe,jt,$t),cn=Je[De],an=[];return ee.forEach(function(Tn,Mn){if(Tn.id!==st.id){var Ln=Je[Mn],jn=Sa(Ln,cn);an.push(jn),Tn.cosineSimilarity=jn}}),ee.sort(function(Tn,Mn){return Mn.cosineSimilarity-Tn.cosineSimilarity}),{allCosineSimilarity:an,similarNodes:ee}},_o=Fo,zs=function(){function Ot(X){this.count=X.length,this.parent={};for(var st=0,xt=X;st<xt.length;st++){var jt=xt[st];this.parent[jt]=jt}}return Ot.prototype.find=function(X){for(;this.parent[X]!==X;)X=this.parent[X];return X},Ot.prototype.union=function(X,st){var xt=this.find(X),jt=this.find(st);xt!==jt&&(xt<jt?(this.parent[st]!==st&&this.union(this.parent[st],X),this.parent[st]=this.parent[X]):(this.parent[X]!==X&&this.union(this.parent[X],st),this.parent[X]=this.parent[st]))},Ot.prototype.connected=function(X,st){return this.find(X)===this.find(st)},Ot}(),Ts=zs,Va=function(X,st){return X-st},ds=function(){function Ot(X){X===void 0&&(X=Va),this.compareFn=X,this.list=[]}return Ot.prototype.getLeft=function(X){return 2*X+1},Ot.prototype.getRight=function(X){return 2*X+2},Ot.prototype.getParent=function(X){return X===0?null:Math.floor((X-1)/2)},Ot.prototype.isEmpty=function(){return this.list.length<=0},Ot.prototype.top=function(){return this.isEmpty()?void 0:this.list[0]},Ot.prototype.delMin=function(){var X=this.top(),st=this.list.pop();return this.list.length>0&&(this.list[0]=st,this.moveDown(0)),X},Ot.prototype.insert=function(X){if(X!==null){this.list.push(X);var st=this.list.length-1;return this.moveUp(st),!0}return!1},Ot.prototype.moveUp=function(X){for(var st=this.getParent(X);X&&X>0&&this.compareFn(this.list[st],this.list[X])>0;){var xt=this.list[st];this.list[st]=this.list[X],this.list[X]=xt,X=st,st=this.getParent(X)}},Ot.prototype.moveDown=function(X){var st,xt=X,jt=this.getLeft(X),$t=this.getRight(X),ee=this.list.length;jt!==null&&jt<ee&&this.compareFn(this.list[xt],this.list[jt])>0?xt=jt:$t!==null&&$t<ee&&this.compareFn(this.list[xt],this.list[$t])>0&&(xt=$t),X!==xt&&(st=[this.list[xt],this.list[X]],this.list[X]=st[0],this.list[xt]=st[1],this.moveDown(xt))},Ot}(),es=ds,js=function(X,st){var xt=[],jt=X.nodes,$t=jt===void 0?[]:jt,ee=X.edges,De=ee===void 0?[]:ee;if($t.length===0)return xt;var Fe=$t[0],Je=new Set;Je.add(Fe);var cn=function(In,$n){return st?In.weight-$n.weight:0},an=new es(cn);for(L(Fe.id,De).forEach(function(jn){an.insert(jn)});!an.isEmpty();){var Tn=an.delMin(),Mn=Tn.source,Ln=Tn.target;Je.has(Mn)&&Je.has(Ln)||(xt.push(Tn),Je.has(Mn)||(Je.add(Mn),L(Mn,De).forEach(function(jn){an.insert(jn)})),Je.has(Ln)||(Je.add(Ln),L(Ln,De).forEach(function(jn){an.insert(jn)})))}return xt},ns=function(X,st){var xt=[],jt=X.nodes,$t=jt===void 0?[]:jt,ee=X.edges,De=ee===void 0?[]:ee;if($t.length===0)return xt;var Fe=De.map(function(Mn){return Mn});st&&Fe.sort(function(Mn,Ln){return Mn.weight-Ln.weight});for(var Je=new Ts($t.map(function(Mn){return Mn.id}));Fe.length>0;){var cn=Fe.shift(),an=cn.source,Tn=cn.target;Je.connected(an,Tn)||(xt.push(cn),Je.union(an,Tn))}return xt},rs=function(X,st,xt){var jt={prim:js,kruskal:ns};return xt?jt[xt](X,st):ns(X,st)},Ti=rs,Zo=function(X,st,xt){typeof st!="number"&&(st=1e-6),typeof xt!="number"&&(xt=.85);for(var jt=1,$t=0,ee=1e3,De=X.nodes,Fe=De===void 0?[]:De,Je=X.edges,cn=Je===void 0?[]:Je,an=Fe.length,Tn,Mn={},Ln={},jn=0;jn<an;++jn){var In=Fe[jn],$n=In.id;Mn[$n]=1/an,Ln[$n]=1/an}for(var sr=Ht(X);ee>0&&jt>st;){$t=0;for(var jn=0;jn<an;++jn){var In=Fe[jn],$n=In.id;if(Tn=0,sr[In.id].inDegree===0)Mn[$n]=0;else{for(var rr=D($n,cn,"source"),dr=0;dr<rr.length;++dr){var gr=rr[dr],mr=sr[gr].outDegree;mr>0&&(Tn+=Ln[gr]/mr)}Mn[$n]=xt*Tn,$t+=Mn[$n]}}$t=(1-$t)/an,jt=0;for(var jn=0;jn<an;++jn){var In=Fe[jn],$n=In.id;Tn=Mn[$n]+$t,jt+=Math.abs(Tn-Ln[$n]),Ln[$n]=Tn}ee-=1}return Ln},Pa=Zo,ci=-1,Hi=-1,Ya="-1",Gi="-1",fs=-1,ll="-1",xo=function(){function Ot(X,st,xt,jt){X===void 0&&(X=ci),st===void 0&&(st=Hi),xt===void 0&&(xt=Hi),jt===void 0&&(jt=Ya),this.id=X,this.from=st,this.to=xt,this.label=jt}return Ot}(),no=function(){function Ot(X,st){X===void 0&&(X=Hi),st===void 0&&(st=Gi),this.id=X,this.label=st,this.edges=[],this.edgeMap={}}return Ot.prototype.addEdge=function(X){this.edges.push(X),this.edgeMap[X.id]=X},Ot}(),Cs=function(){function Ot(X,st,xt){X===void 0&&(X=Hi),st===void 0&&(st=!0),xt===void 0&&(xt=!1),this.id=X,this.edgeIdAutoIncrease=st,this.edges=[],this.nodes=[],this.nodeMap={},this.edgeMap={},this.nodeLabelMap={},this.edgeLabelMap={},this.counter=0,this.directed=xt}return Ot.prototype.getNodeNum=function(){return this.nodes.length},Ot.prototype.addNode=function(X,st){if(!this.nodeMap[X]){var xt=new no(X,st);this.nodes.push(xt),this.nodeMap[X]=xt,this.nodeLabelMap[st]||(this.nodeLabelMap[st]=[]),this.nodeLabelMap[st].push(X)}},Ot.prototype.addEdge=function(X,st,xt,jt){if((this.edgeIdAutoIncrease||X===void 0)&&(X=this.counter++),!(this.nodeMap[st]&&this.nodeMap[xt]&&this.nodeMap[xt].edgeMap[X])){var $t=new xo(X,st,xt,jt);if(this.edges.push($t),this.edgeMap[X]=$t,this.nodeMap[st].addEdge($t),this.edgeLabelMap[jt]||(this.edgeLabelMap[jt]=[]),this.edgeLabelMap[jt].push($t),!this.directed){var ee=new xo(X,xt,st,jt);this.nodeMap[xt].addEdge(ee),this.edgeLabelMap[jt].push(ee)}}},Ot}(),Ha=function(){function Ot(X,st,xt,jt,$t){this.fromNode=X,this.toNode=st,this.nodeEdgeNodeLabel={nodeLabel1:xt||Gi,edgeLabel:jt||Ya,nodeLabel2:$t||Gi}}return Ot.prototype.equalTo=function(X){return this.fromNode===X.formNode&&this.toNode===X.toNode&&this.nodeEdgeNodeLabel===X.nodeEdgeNodeLabel},Ot.prototype.notEqualTo=function(X){return!this.equalTo(X)},Ot}(),Aa=function(){function Ot(){this.rmpath=[],this.dfsEdgeList=[]}return Ot.prototype.equalTo=function(X){var st=this.dfsEdgeList.length,xt=X.length;if(st!==xt)return!1;for(var jt=0;jt<st;jt++)if(this.dfsEdgeList[jt]!==X[jt])return!1;return!0},Ot.prototype.notEqualTo=function(X){return!this.equalTo(X)},Ot.prototype.pushBack=function(X,st,xt,jt,$t){return this.dfsEdgeList.push(new Ha(X,st,xt,jt,$t)),this.dfsEdgeList},Ot.prototype.toGraph=function(X,st){X===void 0&&(X=fs),st===void 0&&(st=!1);var xt=new Cs(X,!0,st);return this.dfsEdgeList.forEach(function(jt){var $t=jt.fromNode,ee=jt.toNode,De=jt.nodeEdgeNodeLabel,Fe=De.nodeLabel1,Je=De.edgeLabel,cn=De.nodeLabel2;Fe!==Gi&&xt.addNode($t,Fe),cn!==Gi&&xt.addNode(ee,cn),Fe!==Gi&&cn!==Fe&&xt.addEdge(void 0,$t,ee,Je)}),xt},Ot.prototype.buildRmpath=function(){this.rmpath=[];for(var X=void 0,st=this.dfsEdgeList.length,xt=st-1;xt>=0;xt--){var jt=this.dfsEdgeList[xt],$t=jt.fromNode,ee=jt.toNode;$t<ee&&(X===void 0||ee===X)&&(this.rmpath.push(xt),X=$t)}return this.rmpath},Ot.prototype.getNodeNum=function(){var X={};return this.dfsEdgeList.forEach(function(st){X[st.fromNode]||(X[st.fromNode]=!0),X[st.toNode]||(X[st.toNode]=!0)}),Object.keys(X).length},Ot}(),la=function(){function Ot(X){if(this.his={},this.nodesUsed={},this.edgesUsed={},this.edges=[],!!X){for(;X;){var st=X.edge;this.edges.push(st),this.nodesUsed[st.from]=1,this.nodesUsed[st.to]=1,this.edgesUsed[st.id]=1,X=X.preNode}this.edges=this.edges.reverse()}}return Ot.prototype.hasNode=function(X){return this.nodesUsed[X.id]===1},Ot.prototype.hasEdge=function(X){return this.edgesUsed[X.id]===1},Ot}(),jr=function(){function Ot(X){var st=X.graphs,xt=X.minSupport,jt=xt===void 0?2:xt,$t=X.minNodeNum,ee=$t===void 0?1:$t,De=X.maxNodeNum,Fe=De===void 0?4:De,Je=X.top,cn=Je===void 0?10:Je,an=X.directed,Tn=an===void 0?!1:an,Mn=X.verbose,Ln=Mn===void 0?!1:Mn;this.graphs=st,this.dfsCode=new Aa,this.support=0,this.frequentSize1Subgraphs=[],this.frequentSubgraphs=[],this.minSupport=jt,this.top=cn,this.directed=Tn,this.counter=0,this.maxNodeNum=Fe,this.minNodeNum=ee,this.verbose=Ln,this.maxNodeNum<this.minNodeNum&&(this.maxNodeNum=this.minNodeNum),this.reportDF=[]}return Ot.prototype.findForwardRootEdges=function(X,st){var xt=this,jt=[],$t=X.nodeMap;return st.edges.forEach(function(ee){(xt.directed||st.label<=$t[ee.to].label)&&jt.push(ee)}),jt},Ot.prototype.findBackwardEdge=function(X,st,xt,jt){if(!this.directed&&st===xt)return null;for(var $t=X.nodeMap,ee=$t[xt.to],De=ee.edges,Fe=De.length,Je=0;Je<Fe;Je++){var cn=De[Je];if(!(jt.hasEdge(cn)||cn.to!==st.from)){if(this.directed){if($t[st.from].label<$t[xt.to].label||$t[st.from].label===$t[xt.to].label&&st.label<=cn.label)return cn}else if(st.label<cn.label||st.label===cn.label&&$t[st.to].label<=$t[xt.to].label)return cn}}return null},Ot.prototype.findForwardPureEdges=function(X,st,xt,jt){for(var $t=[],ee=st.to,De=X.nodeMap[ee].edges,Fe=De.length,Je=0;Je<Fe;Je++){var cn=De[Je],an=X.nodeMap[cn.to];xt<=an.label&&!jt.hasNode(an)&&$t.push(cn)}return $t},Ot.prototype.findForwardRmpathEdges=function(X,st,xt,jt){for(var $t=[],ee=X.nodeMap,De=ee[st.to].label,Fe=ee[st.from],Je=Fe.edges,cn=Je.length,an=0;an<cn;an++){var Tn=Je[an],Mn=ee[Tn.to].label;st.to===Tn.to||xt>Mn||jt.hasNode(ee[Tn.to])||(st.label<Tn.label||st.label===Tn.label&&De<=Mn)&&$t.push(Tn)}return $t},Ot.prototype.getSupport=function(X){var st={};return X.forEach(function(xt){st[xt.graphId]||(st[xt.graphId]=!0)}),Object.keys(st).length},Ot.prototype.findMinLabel=function(X){var st=void 0;return Object.keys(X).forEach(function(xt){var jt=X[xt],$t=jt.nodeLabel1,ee=jt.edgeLabel,De=jt.nodeLabel2;if(!st){st={nodeLabel1:$t,edgeLabel:ee,nodeLabel2:De};return}($t<st.nodeLabel1||$t===st.nodeLabel1&&ee<st.edgeLabel||$t===st.nodeLabel1&&ee===st.edgeLabel&&De<st.nodeLabel2)&&(st={nodeLabel1:$t,edgeLabel:ee,nodeLabel2:De})}),st},Ot.prototype.isMin=function(){var X=this,st=this.dfsCode;if(this.verbose&&console.log("isMin checking",st),st.dfsEdgeList.length===1)return!0;var xt=this.directed,jt=st.toGraph(fs,xt),$t=jt.nodeMap,ee=new Aa,De={};jt.nodes.forEach(function(an){var Tn=X.findForwardRootEdges(jt,an);Tn.forEach(function(Mn){var Ln=$t[Mn.to],jn="".concat(an.label,"-").concat(Mn.label,"-").concat(Ln.label);De[jn]||(De[jn]={projected:[],nodeLabel1:an.label,edgeLabel:Mn.label,nodeLabel2:Ln.label});var In={graphId:jt.id,edge:Mn,preNode:null};De[jn].projected.push(In)})});var Fe=this.findMinLabel(De);if(Fe){ee.dfsEdgeList.push(new Ha(0,1,Fe.nodeLabel1,Fe.edgeLabel,Fe.nodeLabel2));var Je=function an(Tn){for(var Mn=ee.buildRmpath(),Ln=ee.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,jn=ee.dfsEdgeList[Mn[0]].toNode,In={},$n=!1,sr=0,rr=xt?-1:0,dr=function(rt){if($n)return"break";Tn.forEach(function(ct){var lt=new la(ct),mt=X.findBackwardEdge(jt,lt.edges[Mn[rt]],lt.edges[Mn[0]],lt);mt&&(In[mt.label]||(In[mt.label]={projected:[],edgeLabel:mt.label}),In[mt.label].projected.push({graphId:jt.id,edge:In,preNode:ct}),sr=ee.dfsEdgeList[Mn[rt]].fromNode,$n=!0)})},gr=Mn.length-1;gr>rr;gr--){var mr=dr(gr);if(mr==="break")break}if($n){var _r=X.findMinLabel(In);ee.dfsEdgeList.push(new Ha(jn,sr,Gi,_r.edgeLabel,Gi));var Or=ee.dfsEdgeList.length-1;return X.dfsCode.dfsEdgeList[Or]!==ee.dfsEdgeList[Or]?!1:an(In[_r.edgeLabel].projected)}var Nr={};$n=!1;var Zr=0;Tn.forEach(function(U){var rt=new la(U),ct=X.findForwardPureEdges(jt,rt.edges[Mn[0]],Ln,rt);ct.length>0&&($n=!0,Zr=jn,ct.forEach(function(lt){var mt="".concat(lt.label,"-").concat($t[lt.to].label);Nr[mt]||(Nr[mt]={projected:[],edgeLabel:lt.label,nodeLabel2:$t[lt.to].label}),Nr[mt].projected.push({graphId:jt.id,edge:lt,preNode:U})}))});for(var Wr=Mn.length,j=function(rt){if($n)return"break";var ct=Mn[rt];Tn.forEach(function(lt){var mt=new la(lt),Ft=X.findForwardRmpathEdges(jt,mt.edges[ct],Ln,mt);Ft.length>0&&($n=!0,Zr=ee.dfsEdgeList[ct].fromNode,Ft.forEach(function(ae){var me="".concat(ae.label,"-").concat($t[ae.to].label);Nr[me]||(Nr[me]={projected:[],edgeLabel:ae.label,nodeLabel2:$t[ae.to].label}),Nr[me].projected.push({graphId:jt.id,edge:ae,preNode:lt})}))})},gr=0;gr<Wr;gr++){var B=j(gr);if(B==="break")break}if(!$n)return!0;var P=X.findMinLabel(Nr);ee.dfsEdgeList.push(new Ha(Zr,jn+1,Gi,P.edgeLabel,P.nodeLabel2));var k=ee.dfsEdgeList.length-1;return st.dfsEdgeList[k]!==ee.dfsEdgeList[k]?!1:an(Nr["".concat(P.edgeLabel,"-").concat(P.nodeLabel2)].projected)},cn="".concat(Fe.nodeLabel1,"-").concat(Fe.edgeLabel,"-").concat(Fe.nodeLabel2);return Je(De[cn].projected)}},Ot.prototype.report=function(){if(!(this.dfsCode.getNodeNum()<this.minNodeNum)){this.counter++;var X=this.dfsCode.toGraph(this.counter,this.directed);this.frequentSubgraphs.push(Kn(X))}},Ot.prototype.subGraphMining=function(X){var st=this,xt=this.getSupport(X);if(!(xt<this.minSupport)&&this.isMin()){this.report();var jt=this.dfsCode.getNodeNum(),$t=this.dfsCode.buildRmpath(),ee=this.dfsCode.dfsEdgeList[$t[0]].toNode,De=this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,Fe={},Je={};X.forEach(function(cn){for(var an=st.graphs[cn.graphId],Tn=an.nodeMap,Mn=new la(cn),Ln=$t.length-1;Ln>=0;Ln--){var jn=st.findBackwardEdge(an,Mn.edges[$t[Ln]],Mn.edges[$t[0]],Mn);if(jn){var In="".concat(st.dfsCode.dfsEdgeList[$t[Ln]].fromNode,"-").concat(jn.label);Je[In]||(Je[In]={projected:[],toNodeId:st.dfsCode.dfsEdgeList[$t[Ln]].fromNode,edgeLabel:jn.label}),Je[In].projected.push({graphId:cn.graphId,edge:jn,preNode:cn})}}if(!(jt>=st.maxNodeNum)){var $n=st.findForwardPureEdges(an,Mn.edges[$t[0]],De,Mn);$n.forEach(function(rr){var dr="".concat(ee,"-").concat(rr.label,"-").concat(Tn[rr.to].label);Fe[dr]||(Fe[dr]={projected:[],fromNodeId:ee,edgeLabel:rr.label,nodeLabel2:Tn[rr.to].label}),Fe[dr].projected.push({graphId:cn.graphId,edge:rr,preNode:cn})});for(var sr=function(dr){var gr=st.findForwardRmpathEdges(an,Mn.edges[$t[dr]],De,Mn);gr.forEach(function(mr){var _r="".concat(st.dfsCode.dfsEdgeList[$t[dr]].fromNode,"-").concat(mr.label,"-").concat(Tn[mr.to].label);Fe[_r]||(Fe[_r]={projected:[],fromNodeId:st.dfsCode.dfsEdgeList[$t[dr]].fromNode,edgeLabel:mr.label,nodeLabel2:Tn[mr.to].label}),Fe[_r].projected.push({graphId:cn.graphId,edge:mr,preNode:cn})})},Ln=0;Ln<$t.length;Ln++)sr(Ln)}}),Object.keys(Je).forEach(function(cn){var an=Je[cn],Tn=an.toNodeId,Mn=an.edgeLabel;st.dfsCode.dfsEdgeList.push(new Ha(ee,Tn,"-1",Mn,"-1")),st.subGraphMining(Je[cn].projected),st.dfsCode.dfsEdgeList.pop()}),Object.keys(Fe).forEach(function(cn){var an=Fe[cn],Tn=an.fromNodeId,Mn=an.edgeLabel,Ln=an.nodeLabel2;st.dfsCode.dfsEdgeList.push(new Ha(Tn,ee+1,Gi,Mn,Ln)),st.subGraphMining(Fe[cn].projected),st.dfsCode.dfsEdgeList.pop()})}},Ot.prototype.generate1EdgeFrequentSubGraphs=function(){var X=this.graphs,st=this.directed,xt=this.minSupport,jt=this.frequentSize1Subgraphs,$t={},ee={},De={},Fe={};return Object.keys(X).forEach(function(Je){var cn=X[Je],an=cn.nodeMap;cn.nodes.forEach(function(Tn,Mn){var Ln=Tn.label,jn="".concat(Je,"-").concat(Ln);if(!De[jn]){var In=$t[Ln]||0;In++,$t[Ln]=In}De[jn]={graphKey:Je,label:Ln},Tn.edges.forEach(function($n){var sr=Ln,rr=an[$n.to].label;if(!st&&sr>rr){var dr=rr;rr=sr,sr=dr}var gr=$n.label,mr="".concat(Je,"-").concat(sr,"-").concat(gr,"-").concat(rr),_r="".concat(sr,"-").concat(gr,"-").concat(rr);if(!ee[_r]){var Or=ee[_r]||0;Or++,ee[_r]=Or}Fe[mr]={graphId:Je,nodeLabel1:sr,edgeLabel:gr,nodeLabel2:rr}})})}),Object.keys($t).forEach(function(Je){var cn=$t[Je];if(!(cn<xt)){var an={nodes:[],edges:[]};an.nodes.push({id:"0",label:Je}),jt.push(an)}}),jt},Ot.prototype.run=function(){var X=this;if(this.frequentSize1Subgraphs=this.generate1EdgeFrequentSubGraphs(),!(this.maxNodeNum<2)){var st=this.graphs,xt=this.directed,jt={};Object.keys(st).forEach(function($t){var ee=st[$t],De=ee.nodeMap;ee.nodes.forEach(function(Fe){var Je=X.findForwardRootEdges(ee,Fe);Je.forEach(function(cn){var an=De[cn.to],Tn="".concat(Fe.label,"-").concat(cn.label,"-").concat(an.label);jt[Tn]||(jt[Tn]={projected:[],nodeLabel1:Fe.label,edgeLabel:cn.label,nodeLabel2:an.label});var Mn={graphId:$t,edge:cn,preNode:null};jt[Tn].projected.push(Mn)})})}),Object.keys(jt).forEach(function($t){var ee=jt[$t],De=ee.projected,Fe=ee.nodeLabel1,Je=ee.edgeLabel,cn=ee.nodeLabel2;X.dfsCode.dfsEdgeList.push(new Ha(0,1,Fe,Je,cn)),X.subGraphMining(De),X.dfsCode.dfsEdgeList.pop()})}},Ot}(),zo=function(X,st,xt,jt){var $t={};return Object.keys(X).forEach(function(ee,De){var Fe=X[ee],Je=new Cs(De,!0,st),cn={};Fe.nodes.forEach(function(an,Tn){Je.addNode(Tn,an[xt]),cn[an.id]=Tn}),Fe.edges.forEach(function(an,Tn){var Mn=cn[an.source],Ln=cn[an.target];Je.addEdge(-1,Mn,Ln,an[jt])}),Je&&Je.getNodeNum()&&($t[Je.id]=Je)}),$t},Ws=function(X,st,xt){var jt=[];return X.forEach(function($t){var ee={nodes:[],edges:[]};$t.nodes.forEach(function(De){var Fe;ee.nodes.push((Fe={id:"".concat(De.id)},Fe[st]=De.label,Fe))}),$t.edges.forEach(function(De){var Fe;ee.edges.push((Fe={source:"".concat(De.from),target:"".concat(De.to)},Fe[xt]=De.label,Fe))}),jt.push(ee)}),jt},ro="cluster",Ns=function(X){var st=X.graphs,xt=X.directed,jt=xt===void 0?!1:xt,$t=X.nodeLabelProp,ee=$t===void 0?ro:$t,De=X.edgeLabelProp,Fe=De===void 0?ro:De,Je=zo(st,jt,ee,Fe),cn=X.minSupport,an=X.maxNodeNum,Tn=X.minNodeNum,Mn=X.verbose,Ln=X.top,jn={graphs:Je,minSupport:cn,maxNodeNum:an,minNodeNum:Tn,top:Ln,verbose:Mn,directed:jt},In=new jr(jn);In.run();var $n=Ws(In.frequentSubgraphs,ee,Fe);return $n},jo=Ns,io=function(X,st,xt,jt){xt===void 0&&(xt="cluster"),jt===void 0&&(jt=2);var $t=[],ee=X.nodes;return st.forEach(function(De,Fe){$t.push(Ps(ee,De,Fe,xt,jt))}),$t},Ps=function(X,st,xt,jt,$t){var ee=[xt],De=[],Fe={};return st.forEach(function(Je,cn){if(Je<=$t&&xt!==cn){ee.push(cn),De.push(X[cn]);var an=X[cn][jt];Fe[an]?(Fe[an].count++,Fe[an].dists.push(Je)):Fe[an]={count:1,dists:[Je]}}}),Object.keys(Fe).forEach(function(Je){Fe[Je].dists=Fe[Je].dists.sort(function(cn,an){return cn-an})}),{nodeIdx:xt,nodeId:X[xt].id,nodeIdxs:ee,neighbors:De,neighborNum:ee.length-1,nodeLabelCountMap:Fe}},Gs=function(X,st,xt,jt,$t){var ee=Math.ceil(xt/st),De={},Fe=0;return jt.forEach(function(Je,cn){for(var an=0,Tn=0,Mn=Je.nodeIdxs,Ln=Je.neighborNum-1;an<ee;){for(var jn=Mn[1+Math.floor(Math.random()*Ln)],In=0;(De["".concat(cn,"-").concat(jn)]||De["".concat(jn,"-").concat(cn)])&&(jn=Math.floor(Math.random()*st),In++,!(In>2*st)););if(In<2*st&&(De["".concat(cn,"-").concat(jn)]={start:cn,end:jn,distance:$t[cn][jn]},an++,Fe++,Fe>=xt))return De;if(Tn++,Tn>2*st)break}if(an<ee){var $n=ee-an;ee=(ee+$n)/(st-cn-1)}}),De},ka=function(X,st,xt,jt){var $t=xt.nodes;return jt||(jt={}),Object.keys(X).forEach(function(ee){var De,Fe;if(!(jt&&jt[ee])){jt[ee]={nodes:[],edges:[]};var Je=X[ee],cn=(De=st[Je.start])===null||De===void 0?void 0:De.nodeIdxs,an=(Fe=st[Je.end])===null||Fe===void 0?void 0:Fe.nodeIdxs;if(!(!cn||!an)){var Tn=new Set(an),Mn=cn.filter(function(sr){return Tn.has(sr)});if(!(!Mn||!Mn.length)){for(var Ln={},jn=Mn.length,In=0;In<jn;In++){var $n=$t[Mn[In]];jt[ee].nodes.push($n),Ln[$n.id]=!0}xt.edges.forEach(function(sr){Ln[sr.source]&&Ln[sr.target]&&jt[ee].edges.push(sr)})}}}}),jt},Us=function(X,st,xt,jt){var $t,ee,De={};X.nodes.forEach(function(Je){De[Je.id]=Je});var Fe=0;return!(!(($t=st==null?void 0:st.edges)===null||$t===void 0)&&$t.length)||((ee=st==null?void 0:st.nodes)===null||ee===void 0?void 0:ee.length)<2?0:(X.edges.forEach(function(Je){var cn=De[Je.source][xt],an=De[Je.target][xt],Tn=st==null?void 0:st.nodes[0][xt],Mn=st==null?void 0:st.nodes[1][xt],Ln=st==null?void 0:st.edges[0][jt];Je[jt]===Ln&&(cn===Tn&&an===Mn||cn===Mn&&an===Tn)&&Fe++}),Fe)},wo=function(X,st,xt){for(var jt=1/0,$t=0,ee=function(Je){var cn=X[Je],an=Object.keys(cn).sort(function(sr,rr){return cn[sr]-cn[rr]}),Tn=10,Mn=[];an.forEach(function(sr,rr){Mn[rr%Tn]||(Mn[rr%Tn]={graphs:[],totalCount:0,aveCount:0}),Mn[rr%Tn].graphs.push(sr),Mn[rr%Tn].totalCount+=cn[sr]});var Ln=0,jn=[];Mn.forEach(function(sr){var rr=sr.totalCount/sr.graphs.length;sr.aveCount=rr,jn.push(rr);var dr=0,gr=sr.length;sr.graphs.forEach(function(mr,_r){var Or=cn[mr];sr.graphs.forEach(function(Nr,Zr){_r!==Zr&&(dr+=Math.abs(Or-cn[Nr]))})}),dr/=gr*(gr-1)/2,Ln+=dr}),Ln/=Mn.length;var In=0;jn.forEach(function(sr,rr){jn.forEach(function(dr,gr){rr!==gr&&(In+=Math.abs(sr-dr))}),In/=jn.length*(jn.length-1)/2});var $n=In-Ln;jt<$n&&(jt=$n,$t=Je)},De=0;De<st;De++)ee(De);return{structure:xt[$t],structureCountMap:X[$t]}},ao=function(X,st){var xt={},jt={};return X.forEach(function($t,ee){xt[$t.id]={idx:ee,node:$t,degree:0,inDegree:0,outDegree:0};var De=$t[st];jt[De]||(jt[De]=[]),jt[De].push($t)}),{nodeMap:xt,nodeLabelMap:jt}},so=function(X,st,xt){var jt={},$t={};return X.forEach(function(ee,De){jt["".concat(F)]={idx:De,edge:ee};var Fe=ee[st];$t[Fe]||($t[Fe]=[]),$t[Fe].push(ee);var Je=xt[ee.source];Je&&(Je.degree++,Je.outDegree++);var cn=xt[ee.target];cn&&(cn.degree++,cn.inDegree++)}),{edgeMap:jt,edgeLabelMap:$t}},ga=function(X,st,xt){var jt=st.length,$t={};return st.forEach(function(ee,De){for(var Fe=xt?0:De+1,Je=X[De].id,cn=Fe;cn<jt;cn++)if(De!==cn){var an=X[cn].id,Tn=ee[cn];$t["".concat(Je,"-").concat(an)]=Tn,xt||($t["".concat(an,"-").concat(Je)]=Tn)}}),$t},pa=function(X,st,xt,jt,$t,ee,De,Fe,Je,cn,an){var Tn,Mn="".concat(st.id,"-").concat(xt.id);if(cn&&cn[Mn])return cn[Mn];var Ln=an?an[Mn]:void 0;if(!Ln){var jn=(Tn={},Tn[Mn]={start:jt[st.id].idx,end:jt[xt.id].idx,distance:$t},Tn);an=ka(jn,ee,X,an),Ln=an[Mn]}return Us(Ln,De,Fe,Je)},Mo=function(X,st,xt,jt){var $t,ee,De,Fe=($t=X[st])===null||$t===void 0?void 0:$t.degree,Je=(ee=X[st])===null||ee===void 0?void 0:ee.inDegree,cn=(De=X[st])===null||De===void 0?void 0:De.outDegree;return X[st]===void 0&&(Fe=1/0,Je=1/0,cn=1/0,jt[st].forEach(function(an){var Tn=xt[an.id].degree;Fe>Tn&&(Fe=Tn);var Mn=xt[an.id].inDegree;Je>Mn&&(Je=Mn);var Ln=xt[an.id].outDegree;cn>Ln&&(cn=Ln)}),X[st]={degree:Fe,inDegree:Je,outDegree:cn}),{minPatternNodeLabelDegree:Fe,minPatternNodeLabelInDegree:Je,minPatternNodeLabelOutDegree:cn}},Xi=function(X,st,xt,jt,$t,ee,De){var Fe;if(xt===void 0&&(xt=!1),ee===void 0&&(ee="cluster"),De===void 0&&(De="cluster"),!(!X||!X.nodes)){var Je=X.nodes.length;if(Je){var cn=Ua(X,xt),an=Ua(st,xt),Tn=ga(X.nodes,cn,xt),Mn=ga(st.nodes,an,xt),Ln=ao(X.nodes,ee),jn=Ln.nodeMap,In=Ln.nodeLabelMap,$n=ao(st.nodes,ee),sr=$n.nodeMap,rr=$n.nodeLabelMap;so(X.edges,De,jn);var dr=so(st.edges,De,sr).edgeLabelMap,gr=[];an==null||an.forEach(function(wr){gr=gr.concat(wr)}),$t||($t=Math.max.apply(Math,(0,Pn.ev)((0,Pn.ev)([],gr,!1),[2],!1))),jt||(jt=$t);var mr=io(X,cn,ee,jt),_r=io(st,an,ee,jt),Or=Math.min(100,Je*(Je-1)/2),Nr=Gs(jt,Je,Or,mr,cn),Zr=ka(Nr,mr,X),Wr=10,j=1,B=1,P=4,k={graphs:Zr,nodeLabelProp:ee,edgeLabelProp:De,minSupport:j,minNodeNum:B,maxNodeNum:P,directed:xt},U=jo(k).slice(0,Wr),rt=U.length,ct=[];U.forEach(function(wr,Gr){ct[Gr]={},Object.keys(Zr).forEach(function(Tr){var Xr=Zr[Tr],bi=Us(Xr,wr,ee,De);ct[Gr][Tr]=bi})});var lt=wo(ct,rt,U),mt=lt.structure,Ft=lt.structureCountMap,ae=st.nodes[0],me=[],Oe=(Fe=st.nodes[0])===null||Fe===void 0?void 0:Fe[ee],_e=-1/0;st.nodes.forEach(function(wr){var Gr=wr[ee],Tr=In[Gr];(Tr==null?void 0:Tr.length)>_e&&(_e=Tr.length,me=Tr,Oe=Gr,ae=wr)});var Ye={},mn={},bn={},Cn={},Bn={},Fn={};Object.keys(rr).forEach(function(wr,Gr){Bn[wr]=[],xt&&(Fn[wr]=[]);var Tr=-1/0,Xr=rr[wr],bi={};Xr.forEach(function(ni){var ai=Mn["".concat(ae.id,"-").concat(ni.id)];if(ai&&Bn[wr].push(ai),Tr<ai&&(Tr=ai),bi["".concat(ae.id,"-").concat(ni.id)]={start:0,end:sr[ni.id].idx,distance:ai},xt){var Mi=Mn["".concat(ni.id,"-").concat(ae.id)];Mi&&Fn[wr].push(Mi)}}),Bn[wr]=Bn[wr].sort(function(ni,ai){return ni-ai}),xt&&(Fn[wr]=Fn[wr].sort(function(ni,ai){return ni-ai})),mn=ka(bi,_r,st,mn);var Sr=[];if(Object.keys(bi).forEach(function(ni){if(bn[ni]){Sr.push(bn[ni]);return}var ai=mn[ni];bn[ni]=Us(ai,mt,ee,De),Sr.push(bn[ni])}),Sr=Sr.sort(function(ni,ai){return ai-ni}),Cn["".concat(ae.id,"-").concat(wr)]=Sr,wr!==Oe)for(var oi=(me==null?void 0:me.length)||0,ii=function(ai){var Mi=me[ai],Oa=mr[jn[Mi.id].idx],Fi=Oa.nodeLabelCountMap[wr],gs=rr[wr].length;if(!Fi||Fi.count<gs)return me.splice(ai,1),"continue";for(var Rs=!1,ca=0;ca<gs;ca++)if(Fi.dists[ca]>Bn[wr][ca]){Rs=!0;break}if(Rs)return me.splice(ai,1),"continue";var ma={};Oa.neighbors.forEach(function(na){var Ba=Tn["".concat(Mi.id,"-").concat(na.id)];ma["".concat(Mi.id,"-").concat(na.id)]={start:jn[Mi.id].idx,end:jn[na.id].idx,distance:Ba}}),Zr=ka(ma,mr,X,Zr);var Ka=[];Object.keys(ma).forEach(function(na){if(Ft[na]){Ka.push(Ft[na]);return}var Ba=Zr[na];Ft[na]=Us(Ba,mt,ee,De),Ka.push(Ft[na])}),Ka=Ka.sort(function(na,Ba){return Ba-na});for(var Qa=!1,ca=0;ca<gs;ca++)if(Ka[ca]<Sr[ca]){Qa=!0;break}if(Qa)return me.splice(ai,1),"continue"},yi=oi-1;yi>=0;yi--)ii(yi)});var Qn=[];me==null||me.forEach(function(wr){for(var Gr=jn[wr.id].idx,Tr=Ps(X.nodes,cn[Gr],Gr,ee,$t),Xr=Tr.neighbors,bi=Xr.length,Sr=!1,oi=bi-1;oi>=0;oi--){if(Xr.length+1<st.nodes.length){Sr=!0;return}var ii=Xr[oi],yi=ii[ee];if(!rr[yi]||!rr[yi].length){Xr.splice(oi,1);continue}if(!Bn[yi]||!Bn[yi].length){Xr.splice(oi,1);continue}var ni="".concat(wr.id,"-").concat(ii.id),ai=Tn[ni],Mi=Bn[yi].length-1,Oa=Bn[yi][Mi];if(ai>Oa){Xr.splice(oi,1);continue}if(xt){var Fi="".concat(ii.id,"-").concat(wr.id),gs=Tn[Fi];Mi=Fn[yi].length-1;var Rs=Fn[yi][Mi];if(gs>Rs){Xr.splice(oi,1);continue}}var ca=Ft[ni]?Ft[ni]:pa(X,wr,ii,jn,ai,mr,mt,ee,De,Ft,Zr),ma="".concat(ae.id,"-").concat(yi),Ka=Cn[ma][Cn[ma].length-1];if(ca<Ka){Xr.splice(oi,1);continue}var Qa=Mo(Ye,yi,sr,rr),na=Qa.minPatternNodeLabelDegree,Ba=Qa.minPatternNodeLabelInDegree,Ta=Qa.minPatternNodeLabelOutDegree;if(jn[ii.id].degree<na){Xr.splice(oi,1);continue}}Sr||Qn.push({nodes:[wr].concat(Xr)})});var Vn=qs(st,ae.id,!1).length,ir={};xt?(Object.keys(Vn).forEach(function(wr){var Gr=sr[wr].node[ee];ir[Gr]?ir[Gr].push(Vn[wr]):ir[Gr]=[Vn[wr]]}),Object.keys(ir).forEach(function(wr){ir[wr].sort(function(Gr,Tr){return Gr-Tr})})):ir=Bn;for(var or=Qn.length,pr=function(Gr){var Tr=Qn[Gr],Xr=Tr.nodes[0],bi={},Sr={};Tr.nodes.forEach(function($r,ra){Sr[$r.id]={idx:ra,node:$r,degree:0,inDegree:0,outDegree:0};var Ui=$r[ee];bi[Ui]?bi[Ui]++:bi[Ui]=1});var oi=[],ii={};X.edges.forEach(function($r){Sr[$r.source]&&Sr[$r.target]&&(oi.push($r),ii[$r[De]]?ii[$r[De]]++:ii[$r[De]]=1,Sr[$r.source].degree++,Sr[$r.target].degree++,Sr[$r.source].outDegree++,Sr[$r.target].inDegree++)});for(var yi=Object.keys(dr).length,ni=!1,ai=0;ai<yi;ai++){var Mi=Object.keys(dr)[ai];if(!ii[Mi]||ii[Mi]<dr[Mi].length){ni=!0;break}}if(ni)return Qn.splice(Gr,1),"continue";var Oa=oi.length;if(Oa<st.edges.length)return Qn.splice(Gr,1),"break";for(var Fi=!1,gs=function(ra){var Ui=oi[ra],is=Ui[De],ms=dr[is];if(!ms||!ms.length)return ii[is]--,ms&&ii[is]<ms.length?(Fi=!0,"break"):(oi.splice(ra,1),Sr[Ui.source].degree--,Sr[Ui.target].degree--,Sr[Ui.source].outDegree--,Sr[Ui.target].inDegree--,"continue");var dl=Sr[Ui.source].node[ee],Uo=Sr[Ui.target].node[ee],Vo=!1;if(ms.forEach(function(lo){var Yo=sr[lo.source].node,co=sr[lo.target].node;Yo[ee]===dl&&co[ee]===Uo&&(Vo=!0),!xt&&Yo[ee]===Uo&&co[ee]===dl&&(Vo=!0)}),!Vo)return ii[is]--,ms&&ii[is]<ms.length?(Fi=!0,"break"):(oi.splice(ra,1),Sr[Ui.source].degree--,Sr[Ui.target].degree--,Sr[Ui.source].outDegree--,Sr[Ui.target].inDegree--,"continue")},ai=Oa-1;ai>=0;ai--){var Rs=gs(ai);if(Rs==="break")break}if(Fi)return Qn.splice(Gr,1),"continue";Tr.edges=oi;var ca=qs(Tr,Tr.nodes[0].id,!1).length;if(Object.keys(ca).reverse().forEach(function($r){if(!($r===Tr.nodes[0].id||Fi)){if(ca[$r]===1/0){var ra=Sr[$r].node[ee];if(bi[ra]--,bi[ra]<rr[ra].length){Fi=!0;return}var Ui=Tr.nodes.indexOf(Sr[$r].node);Tr.nodes.splice(Ui,1),Sr[$r]=void 0;return}var is=jn[$r].node[ee];if(!ir[is]||!ir[is].length||ca[$r]>ir[is][ir[is].length-1]){var ra=Sr[$r].node[ee];if(bi[ra]--,bi[ra]<rr[ra].length){Fi=!0;return}var Ui=Tr.nodes.indexOf(Sr[$r].node);Tr.nodes.splice(Ui,1),Sr[$r]=void 0}}}),Fi)return Qn.splice(Gr,1),"continue";for(var ma=!0,Ka=0;ma&&!Fi;){ma=!1;var Qa=xt?Sr[Xr.id].degree<sr[ae.id].degree||Sr[Xr.id].inDegree<sr[ae.id].inDegree||Sr[Xr.id].outDegree<sr[ae.id].outDegree:Sr[Xr.id].degree<sr[ae.id].degree;if(Qa){Fi=!0;break}if(bi[Xr[ee]]<rr[Xr[ee]].length){Fi=!0;break}for(var na=Tr.nodes.length,Ba=na-1;Ba>=0;Ba--){var Ta=Tr.nodes[Ba],cl=Sr[Ta.id].degree,So=Sr[Ta.id].inDegree,ul=Sr[Ta.id].outDegree,Ys=Ta[ee],Go=Mo(Ye,Ys,sr,rr),oo=Go.minPatternNodeLabelDegree,Ao=Go.minPatternNodeLabelInDegree,Oo=Go.minPatternNodeLabelOutDegree,hl=xt?cl<oo||So<Ao||ul<Oo:cl<oo;if(hl){if(bi[Ta[ee]]--,bi[Ta[ee]]<rr[Ta[ee]].length){Fi=!0;break}Tr.nodes.splice(Ba,1),Sr[Ta.id]=void 0,ma=!0}}if(Fi||!ma&&Ka!==0)break;Oa=oi.length;for(var Ls=Oa-1;Ls>=0;Ls--){var Ja=oi[Ls];if(!Sr[Ja.source]||!Sr[Ja.target]){oi.splice(Ls,1);var ps=Ja[De];if(ii[ps]--,Sr[Ja.source]&&(Sr[Ja.source].degree--,Sr[Ja.source].outDegree--),Sr[Ja.target]&&(Sr[Ja.target].degree--,Sr[Ja.target].inDegree--),dr[ps]&&ii[ps]<dr[ps].length){Fi=!0;break}ma=!0}}Ka++}if(Fi||Fi||Tr.nodes.length<st.nodes.length||oi.length<st.edges.length)return Qn.splice(Gr,1),"continue"},Dr=or-1;Dr>=0;Dr--){var li=pr(Dr);if(li==="break")break}for(var ui=Qn.length,Hr=function(Gr){var Tr=Qn[Gr],Xr={};Tr.edges.forEach(function(oi){var ii="".concat(oi.source,"-").concat(oi.target,"-").concat(oi.label);Xr[ii]?Xr[ii]++:Xr[ii]=1});for(var bi=function(ii){var yi=Qn[ii],ni={};yi.edges.forEach(function(Mi){var Oa="".concat(Mi.source,"-").concat(Mi.target,"-").concat(Mi.label);ni[Oa]?ni[Oa]++:ni[Oa]=1});var ai=!0;Object.keys(ni).length!==Object.keys(Xr).length?ai=!1:Object.keys(Xr).forEach(function(Mi){ni[Mi]!==Xr[Mi]&&(ai=!1)}),ai&&Qn.splice(ii,1)},Sr=ui-1;Sr>Gr;Sr--)bi(Sr);ui=Qn.length},Dr=0;Dr<=ui-1;Dr++)Hr(Dr);return Qn}}},ks=Xi,vs=function(){function Ot(X){X===void 0&&(X=10),this.linkedList=new R,this.maxStep=X}return Object.defineProperty(Ot.prototype,"length",{get:function(){return this.linkedList.toArray().length},enumerable:!1,configurable:!0}),Ot.prototype.isEmpty=function(){return!this.linkedList.head},Ot.prototype.isMaxStack=function(){return this.toArray().length>=this.maxStep},Ot.prototype.peek=function(){return this.isEmpty()?null:this.linkedList.head.value},Ot.prototype.push=function(X){this.linkedList.prepend(X),this.length>this.maxStep&&this.linkedList.deleteTail()},Ot.prototype.pop=function(){var X=this.linkedList.deleteHead();return X?X.value:null},Ot.prototype.toArray=function(){return this.linkedList.toArray().map(function(X){return X.value})},Ot.prototype.clear=function(){for(;!this.isEmpty();)this.pop()},Ot}(),Vs=vs,Xa=En,Wo={getAdjMatrix:_,breadthFirstSearch:kt,connectedComponent:Rt,getDegree:Ht,getInDegree:de,getOutDegree:ue,detectCycle:En,detectDirectedCycle:Xa,detectAllCycles:Xe,detectAllDirectedCycle:rn,detectAllUndirectedCycle:Ge,depthFirstSearch:we,dijkstra:qs,findAllPath:_s,findShortestPath:yo,floydWarshall:Ua,labelPropagation:ol,louvain:fa,iLouvain:eo,kCore:nr,kMeans:Os,cosineSimilarity:Sa,nodesCosineSimilarity:_o,minimumSpanningTree:Ti,pageRank:Pa,getNeighbors:D,Stack:Vs,GADDI:ks}},86314:function(yt,Et,y){"use strict";y.d(Et,{MG:function(){return S},V7:function(){return w},Yq:function(){return R},eR:function(){return F},jt:function(){return D},tT:function(){return L}});var c=y(80813),_=y(76075),I=y(69014);function z(it){return typeof it=="boolean"?!1:"enter"in it&&"update"in it&&"exit"in it}function S(it){if(!it)return{enter:!1,update:!1,exit:!1};var G=["enter","update","exit"],kt=Object.fromEntries(Object.entries(it).filter(function(gt){var Q=(0,c.CR)(gt,1),Rt=Q[0];return!G.includes(Rt)}));return Object.fromEntries(G.map(function(gt){return z(it)?it[gt]===!1?[gt,!1]:[gt,(0,c.pi)((0,c.pi)({},it[gt]),kt)]:[gt,kt]}))}function R(it,G){it?it.finished.then(G):G()}function w(it,G){it.length===0?G():Promise.all(it.map(function(kt){return kt==null?void 0:kt.finished})).then(G)}function N(it,G){"update"in it?it.update(G):it.attr(G)}function D(it,G,kt){if(G.length===0)return null;if(!kt){var gt=G.slice(-1)[0];return N(it,{style:gt}),null}return it.animate(G,kt)}function A(it,G){return!(it.nodeName!=="text"||G.nodeName!=="text"||it.attributes.text!==G.attributes.text)}function L(it,G,kt,gt){if(gt===void 0&&(gt="destroy"),A(it,G))return it.remove(),[null];var Q=function(){gt==="destroy"?it.destroy():gt==="hide"&&(0,I.Cp)(it),G.isVisible()&&(0,I.$Z)(G)};if(!kt)return Q(),[null];var Rt=kt.duration,Ct=Rt===void 0?0:Rt,Ht=kt.delay,de=Ht===void 0?0:Ht,ue=Math.ceil(+Ct/2),Te=+Ct/4,be=(0,c.CR)(it.getGeometryBounds().center,2),we=be[0],re=be[1],Ge=(0,c.CR)(G.getGeometryBounds().center,2),rn=Ge[0],Xe=Ge[1],En=(0,c.CR)([(we+rn)/2-we,(re+Xe)/2-re],2),Pn=En[0],tn=En[1],xn=it.style.opacity,It=xn===void 0?1:xn,Ee=G.style.opacity,fn=Ee===void 0?1:Ee,on=it.style.transform||"",Pe=G.style.transform||"",Ze=it.animate([{opacity:It,transform:"translate(0, 0) ".concat(on)},{opacity:0,transform:"translate(".concat(Pn,", ").concat(tn,") ").concat(on)}],(0,c.pi)((0,c.pi)({fill:"both"},kt),{duration:de+ue+Te})),Ke=G.animate([{opacity:0,transform:"translate(".concat(-Pn,", ").concat(-tn,") ").concat(Pe),offset:.01},{opacity:fn,transform:"translate(0, 0) ".concat(Pe)}],(0,c.pi)((0,c.pi)({fill:"both"},kt),{duration:ue+Te,delay:de+ue-Te}));return R(Ke,Q),[Ze,Ke]}function F(it,G,kt){var gt={},Q={};return Object.entries(G).forEach(function(Rt){var Ct=(0,c.CR)(Rt,2),Ht=Ct[0],de=Ct[1];if(!(0,_.Z)(de)){var ue=it.style[Ht]||it.parsedStyle[Ht]||0;ue!==de&&(gt[Ht]=ue,Q[Ht]=de)}}),kt?D(it,[gt,Q],(0,c.pi)({fill:"both"},kt)):(N(it,Q),null)}},97304:function(yt,Et,y){"use strict";y.d(Et,{w:function(){return w}});var c=y(80813),_=y(7225),I=y(69014),z=y(99247),S=y(16915);function R(){(0,I.WD)(this,this.attributes.visibility!=="hidden")}var w=function(N){(0,c.ZT)(D,N);function D(A,L){L===void 0&&(L={});var F=N.call(this,(0,z.n)({},{style:L},A))||this;return F.initialized=!1,F._defaultOptions=L,F}return Object.defineProperty(D.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=(0,S.g)(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),D.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},D.prototype.disconnectedCallback=function(){var A;(A=this._offscreen)===null||A===void 0||A.destroy()},D.prototype.attributeChangedCallback=function(A){A==="visibility"&&R.call(this)},D.prototype.update=function(A,L){var F;return this.attr((0,z.n)({},this.attributes,A||{})),(F=this.render)===null||F===void 0?void 0:F.call(this,this.attributes,this,L)},D.prototype.clear=function(){this.removeChildren()},D.prototype.bindEvents=function(A,L){},D.prototype.getSubShapeStyle=function(A){var L=A.x,F=A.y,it=A.transform,G=A.transformOrigin,kt=A.class,gt=A.className,Q=A.zIndex,Rt=(0,c._T)(A,["x","y","transform","transformOrigin","class","className","zIndex"]);return Rt},D}(_.b_)},42777:function(yt,Et,y){"use strict";y.d(Et,{x:function(){return z}});var c=y(80813),_=y(7225),I=y(16915),z=function(S){(0,c.ZT)(R,S);function R(w){w===void 0&&(w={});var N=w.style,D=(0,c._T)(w,["style"]);return S.call(this,(0,c.pi)({style:(0,c.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},N)},D))||this}return Object.defineProperty(R.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=(0,I.g)(this)),this._offscreen},enumerable:!1,configurable:!0}),R.prototype.disconnectedCallback=function(){var w;(w=this._offscreen)===null||w===void 0||w.destroy()},R}(_.xv)},65244:function(yt,Et,y){"use strict";y.d(Et,{W:function(){return zt}});var c=y(80813),_=y(97304),I=y(7225),z=y(88839),S=y(38974),R=y(17911),w=y(58688),N=y(33253),D=y(98294),A=y(67756);function L(q,$,H){return H?"".concat(q," ").concat(H,"legend-").concat($):q}function F(q,$,H){var nt=q.classNamePrefix,Mt=nt===void 0?"":nt;return L($.name,H,Mt)}var it={title:"title",item:"item",marker:"marker",label:"label",value:"value",focusIcon:"focus-icon",background:"background",ribbon:"ribbon",track:"track",selection:"selection",handle:"handle",handleMarker:"handle-marker",handleLabel:"handle-label",indicator:"indicator",prevBtn:"prev-btn",nextBtn:"next-btn",pageInfo:"page-info"},G=(0,w.A)({text:"text"},"title");function kt(q,$){var H=q.attributes,nt=H.position,Mt=H.spacing,Wt=H.inset,Tt=H.text,Kt=q.getBBox(),bt=$.getBBox(),pt=(0,N.l)(nt),ut=(0,c.CR)((0,D.j)(Tt?Mt:0),4),Gt=ut[0],Vt=ut[1],ve=ut[2],ge=ut[3],Yt=(0,c.CR)((0,D.j)(Wt),4),Ce=Yt[0],qe=Yt[1],Qe=Yt[2],Nn=Yt[3],Dn=(0,c.CR)([ge+Vt,Gt+ve],2),Rn=Dn[0],Xn=Dn[1],tr=(0,c.CR)([Nn+qe,Ce+Qe],2),Mr=tr[0],yr=tr[1];if(pt[0]==="l")return new R.b(Kt.x,Kt.y,bt.width+Kt.width+Rn+Mr,Math.max(bt.height+yr,Kt.height));if(pt[0]==="t")return new R.b(Kt.x,Kt.y,Math.max(bt.width+Mr,Kt.width),bt.height+Kt.height+Xn+yr);var vr=(0,c.CR)([$.attributes.width||bt.width,$.attributes.height||bt.height],2),Cr=vr[0],ur=vr[1];return new R.b(bt.x,bt.y,Cr+Kt.width+Rn+Mr,ur+Kt.height+Xn+yr)}function gt(q,$){var H=Object.entries($).reduce(function(nt,Mt){var Wt=(0,c.CR)(Mt,2),Tt=Wt[0],Kt=Wt[1],bt=q.node().attr(Tt);return bt||(nt[Tt]=Kt),nt},{});q.styles(H)}function Q(q){var $,H,nt,Mt,Wt=q,Tt=Wt.width,Kt=Wt.height,bt=Wt.position,pt=(0,c.CR)([+Tt/2,+Kt/2],2),ut=pt[0],Gt=pt[1],Vt=(0,c.CR)([+ut,+Gt,"center","middle"],4),ve=Vt[0],ge=Vt[1],Yt=Vt[2],Ce=Vt[3],qe=(0,N.l)(bt);return qe.includes("l")&&($=(0,c.CR)([0,"start"],2),ve=$[0],Yt=$[1]),qe.includes("r")&&(H=(0,c.CR)([+Tt,"end"],2),ve=H[0],Yt=H[1]),qe.includes("t")&&(nt=(0,c.CR)([0,"top"],2),ge=nt[0],Ce=nt[1]),qe.includes("b")&&(Mt=(0,c.CR)([+Kt,"bottom"],2),ge=Mt[0],Ce=Mt[1]),{x:ve,y:ge,textAlign:Yt,textBaseline:Ce}}var Rt=function(q){(0,c.ZT)($,q);function $(H){return q.call(this,H,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return $.prototype.getAvailableSpace=function(){var H=this,nt=this.attributes,Mt=nt.width,Wt=nt.height,Tt=nt.position,Kt=nt.spacing,bt=nt.inset,pt=H.querySelector(G.text.class);if(!pt)return new R.b(0,0,+Mt,+Wt);var ut=pt.getBBox(),Gt=ut.width,Vt=ut.height,ve=(0,c.CR)((0,D.j)(Kt),4),ge=ve[0],Yt=ve[1],Ce=ve[2],qe=ve[3],Qe=(0,c.CR)([0,0,+Mt,+Wt],4),Nn=Qe[0],Dn=Qe[1],Rn=Qe[2],Xn=Qe[3],tr=(0,N.l)(Tt);if(tr.includes("i"))return new R.b(Nn,Dn,Rn,Xn);tr.forEach(function(br,xi){var di,Lr,Ci,fi;br==="t"&&(di=(0,c.CR)(xi===0?[Vt+Ce,+Wt-Vt-Ce]:[0,+Wt],2),Dn=di[0],Xn=di[1]),br==="r"&&(Lr=(0,c.CR)([+Mt-Gt-qe],1),Rn=Lr[0]),br==="b"&&(Ci=(0,c.CR)([+Wt-Vt-ge],1),Xn=Ci[0]),br==="l"&&(fi=(0,c.CR)(xi===0?[Gt+Yt,+Mt-Gt-Yt]:[0,+Mt],2),Nn=fi[0],Rn=fi[1])});var Mr=(0,c.CR)((0,D.j)(bt),4),yr=Mr[0],vr=Mr[1],Cr=Mr[2],ur=Mr[3],Kn=(0,c.CR)([ur+vr,yr+Cr],2),Ur=Kn[0],Yr=Kn[1];return new R.b(Nn+ur,Dn+yr,Rn-Ur,Xn-Yr)},$.prototype.getBBox=function(){return this.title?this.title.getBBox():new R.b(0,0,0,0)},$.prototype.render=function(H,nt){var Mt=this,Wt=H.width,Tt=H.height,Kt=H.position,bt=H.spacing,pt=H.classNamePrefix,ut=(0,c._T)(H,["width","height","position","spacing","classNamePrefix"]),Gt=(0,c.CR)((0,z.Hm)(ut),1),Vt=Gt[0],ve=Q(H),ge=ve.x,Yt=ve.y,Ce=ve.textAlign,qe=ve.textBaseline;(0,A.z)(!!ut.text,(0,S.Ys)(nt),function(Qe){var Nn=L(G.text.name,it.title,pt);Mt.title=Qe.maybeAppendByClassName(G.text,"text").attr("className",Nn).styles(Vt).call(gt,{x:ge,y:Yt,textAlign:Ce,textBaseline:qe}).node()})},$}(_.w),Ct=function(){},Ht=y(37004),de=y(38242);function ue(q,$){return q.reduce(function(H,nt){return(H[nt[$]]=H[nt[$]]||[]).push(nt),H},{})}var Te=y(99247),be=y(70208),we=y(78431),re=y(86314);function Ge(q){var $;return(($=q[0])===null||$===void 0?void 0:$.map(function(H,nt){return q.map(function(Mt){return Mt[nt]})}))||[]}var rn=y(69014),Xe=y(99769),En=function(q,$,H){return[["M",q-H,$],["A",H,H,0,1,0,q+H,$],["A",H,H,0,1,0,q-H,$],["Z"]]},Pn=En,tn=function(q,$,H){return[["M",q-H,$-H],["L",q+H,$-H],["L",q+H,$+H],["L",q-H,$+H],["Z"]]},xn=function(q,$,H){return[["M",q-H,$],["L",q,$-H],["L",q+H,$],["L",q,$+H],["Z"]]},It=function(q,$,H){var nt=H*Math.sin(.3333333333333333*Math.PI);return[["M",q-H,$+nt],["L",q,$-nt],["L",q+H,$+nt],["Z"]]},Ee=function(q,$,H){var nt=H*Math.sin(.3333333333333333*Math.PI);return[["M",q-H,$-nt],["L",q+H,$-nt],["L",q,$+nt],["Z"]]},fn=function(q,$,H){var nt=H/2*Math.sqrt(3);return[["M",q,$-H],["L",q+nt,$-H/2],["L",q+nt,$+H/2],["L",q,$+H],["L",q-nt,$+H/2],["L",q-nt,$-H/2],["Z"]]},on=function(q,$,H){var nt=H-1.5;return[["M",q-H,$-nt],["L",q+H,$+nt],["L",q+H,$-nt],["L",q-H,$+nt],["Z"]]},Pe=function(q,$,H){return[["M",q,$+H],["L",q,$-H]]},Ze=function(q,$,H){return[["M",q-H,$-H],["L",q+H,$+H],["M",q+H,$-H],["L",q-H,$+H]]},Ke=function(q,$,H){return[["M",q-H/2,$-H],["L",q+H/2,$-H],["M",q,$-H],["L",q,$+H],["M",q-H/2,$+H],["L",q+H/2,$+H]]},le=function(q,$,H){return[["M",q-H,$],["L",q+H,$],["M",q,$-H],["L",q,$+H]]},Ae=function(q,$,H){return[["M",q-H,$],["L",q+H,$]]},Pt=function(q,$,H){return[["M",q-H,$],["L",q+H,$]]},wt=Pt,he=function(q,$,H){return[["M",q-H,$],["A",H/2,H/2,0,1,1,q,$],["A",H/2,H/2,0,1,0,q+H,$]]},je=function(q,$,H){return[["M",q-H-1,$-2.5],["L",q,$-2.5],["L",q,$+2.5],["L",q+H+1,$+2.5]]},Re=function(q,$,H){return[["M",q-H-1,$+2.5],["L",q,$+2.5],["L",q,$-2.5],["L",q+H+1,$-2.5]]},ce=function(q,$,H){return[["M",q-(H+1),$+2.5],["L",q-H/2,$+2.5],["L",q-H/2,$-2.5],["L",q+H/2,$-2.5],["L",q+H/2,$+2.5],["L",q+H+1,$+2.5]]};function Le(q,$){return[["M",q-5,$+2.5],["L",q-5,$],["L",q,$],["L",q,$-3],["L",q,$+3],["L",q+6.5,$+3]]}var xe=function(q,$,H){return[["M",q-H,$-H],["L",q+H,$],["L",q-H,$+H],["Z"]]},_t=function(q,$,H){var nt=H,Mt=H*.2,Wt=H*.7;return[["M",q-nt,$],["A",nt,nt,0,1,0,q+nt,$],["A",nt,nt,0,1,0,q-nt,$],["Z"],["M",q-Wt,$],["L",q-Mt,$],["M",q+Mt,$],["L",q+Wt,$],["M",q,$-Wt],["L",q,$-Mt],["M",q,$+Mt],["L",q,$+Wt]]},ie=(0,w.A)({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),Me=function(q){(0,c.ZT)($,q);function $(H){var nt=q.call(this,H,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:xe(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(Mt,Wt){return"".concat(Mt,"/").concat(Wt)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return nt.playState="idle",nt.contentGroup=nt.appendChild(new I.ZA({class:ie.contentGroup.name})),nt.playWindow=nt.contentGroup.appendChild(new I.ZA({class:ie.playWindow.name})),nt.innerCurrPage=nt.defaultPage,nt}return Object.defineProperty($.prototype,"defaultPage",{get:function(){var H=this.attributes.defaultPage;return(0,be.Z)(H,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"pageShape",{get:function(){var H=this.pageViews,nt=(0,c.CR)(Ge(H.map(function(Gt){var Vt=Gt.getBBox(),ve=Vt.width,ge=Vt.height;return[ve,ge]})).map(function(Gt){return Math.max.apply(Math,(0,c.ev)([],(0,c.CR)(Gt),!1))}),2),Mt=nt[0],Wt=nt[1],Tt=this.attributes,Kt=Tt.pageWidth,bt=Kt===void 0?Mt:Kt,pt=Tt.pageHeight,ut=pt===void 0?Wt:pt;return{pageWidth:bt,pageHeight:ut}},enumerable:!1,configurable:!0}),$.prototype.getContainer=function(){return this.playWindow},Object.defineProperty($.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),$.prototype.getBBox=function(){var H=q.prototype.getBBox.call(this),nt=H.x,Mt=H.y,Wt=this.controllerShape,Tt=this.pageShape,Kt=Tt.pageWidth,bt=Tt.pageHeight;return new R.b(nt,Mt,Kt+Wt.width,bt)},$.prototype.goTo=function(H){var nt=this,Mt=this.attributes.animate,Wt=this,Tt=Wt.currPage,Kt=Wt.playState,bt=Wt.playWindow,pt=Wt.pageViews;if(Kt!=="idle"||H<0||pt.length<=0||H>=pt.length)return null;pt[Tt].setLocalPosition(0,0),this.prepareFollowingPage(H);var ut=(0,c.CR)(this.getFollowingPageDiff(H),2),Gt=ut[0],Vt=ut[1];this.playState="running";var ve=(0,re.jt)(bt,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-Gt,", ").concat(-Vt,")")}],Mt);return(0,re.Yq)(ve,function(){nt.innerCurrPage=H,nt.playState="idle",nt.setVisiblePages([H]),nt.updatePageInfo()}),ve},$.prototype.prev=function(){var H=this.attributes.loop,nt=this.pageViews.length,Mt=this.currPage;if(!H&&Mt<=0)return null;var Wt=H?(Mt-1+nt)%nt:(0,be.Z)(Mt-1,0,nt);return this.goTo(Wt)},$.prototype.next=function(){var H=this.attributes.loop,nt=this.pageViews.length,Mt=this.currPage;if(!H&&Mt>=nt-1)return null;var Wt=H?(Mt+1)%nt:(0,be.Z)(Mt+1,0,nt);return this.goTo(Wt)},$.prototype.renderClipPath=function(H){var nt=this.pageShape,Mt=nt.pageWidth,Wt=nt.pageHeight;if(!Mt||!Wt){this.contentGroup.style.clipPath=void 0;return}this.clipPath=H.maybeAppendByClassName(ie.clipPath,"rect").styles({width:Mt,height:Wt}),this.contentGroup.attr("clipPath",this.clipPath.node())},$.prototype.setVisiblePages=function(H){this.playWindow.children.forEach(function(nt,Mt){H.includes(Mt)?(0,rn.$Z)(nt):(0,rn.Cp)(nt)})},$.prototype.adjustControllerLayout=function(){var H=this,nt=H.prevBtnGroup,Mt=H.nextBtnGroup,Wt=H.pageInfoGroup,Tt=this.attributes,Kt=Tt.orientation,bt=Tt.controllerPadding,pt=Wt.getBBox(),ut=pt.width,Gt=pt.height,Vt=(0,c.CR)(Kt==="horizontal"?[-180,0]:[-90,90],2),ve=Vt[0],ge=Vt[1];nt.setLocalEulerAngles(ve),Mt.setLocalEulerAngles(ge);var Yt=nt.getBBox(),Ce=Yt.width,qe=Yt.height,Qe=Mt.getBBox(),Nn=Qe.width,Dn=Qe.height,Rn=Math.max(Ce,ut,Nn),Xn=Kt==="horizontal"?{offset:[[0,0],[Ce/2+bt,0],[Ce+ut+bt*2,0]],textAlign:"start"}:{offset:[[Rn/2,-qe-bt],[Rn/2,0],[Rn/2,Dn+bt]],textAlign:"center"},tr=(0,c.CR)(Xn.offset,3),Mr=(0,c.CR)(tr[0],2),yr=Mr[0],vr=Mr[1],Cr=(0,c.CR)(tr[1],2),ur=Cr[0],Kn=Cr[1],Ur=(0,c.CR)(tr[2],2),Yr=Ur[0],br=Ur[1],xi=Xn.textAlign,di=Wt.querySelector("text");di&&(di.style.textAlign=xi),nt.setLocalPosition(yr,vr),Wt.setLocalPosition(ur,Kn),Mt.setLocalPosition(Yr,br)},$.prototype.updatePageInfo=function(){var H,nt=this,Mt=nt.currPage,Wt=nt.pageViews,Tt=nt.attributes.formatter;Wt.length<2||((H=this.pageInfoGroup.querySelector(ie.pageInfo.class))===null||H===void 0||H.attr("text",Tt(Mt+1,Wt.length)),this.adjustControllerLayout())},$.prototype.getFollowingPageDiff=function(H){var nt=this.currPage;if(nt===H)return[0,0];var Mt=this.attributes.orientation,Wt=this.pageShape,Tt=Wt.pageWidth,Kt=Wt.pageHeight,bt=H<nt?-1:1;return Mt==="horizontal"?[bt*Tt,0]:[0,bt*Kt]},$.prototype.prepareFollowingPage=function(H){var nt=this,Mt=nt.currPage,Wt=nt.pageViews;if(this.setVisiblePages([H,Mt]),H!==Mt){var Tt=(0,c.CR)(this.getFollowingPageDiff(H),2),Kt=Tt[0],bt=Tt[1];Wt[H].setLocalPosition(Kt,bt)}},$.prototype.renderController=function(H){var nt=this,Mt=this.attributes,Wt=Mt.controllerSpacing,Tt=Mt.classNamePrefix,Kt=Tt===void 0?"":Tt,bt=this.pageShape,pt=bt.pageWidth,ut=bt.pageHeight,Gt=this.pageViews.length>=2,Vt=H.maybeAppendByClassName(ie.controller,"g");if((0,rn.WD)(Vt.node(),Gt),!!Gt){var ve=(0,z.zs)(this.attributes,"button"),ge=(0,z.zs)(this.attributes,"pageNum"),Yt=(0,c.CR)((0,z.Hm)(ve),2),Ce=Yt[0],qe=Yt[1],Qe=Ce.size,Nn=(0,c._T)(Ce,["size"]),Dn=!Vt.select(ie.prevBtnGroup.class).node(),Rn=Vt.maybeAppendByClassName(ie.prevBtnGroup,"g").styles(qe);this.prevBtnGroup=Rn.node();var Xn=Rn.maybeAppendByClassName(ie.prevBtn,"path");if(Kt){var tr=L(ie.prevBtn.name,it.prevBtn,Kt);Xn.node().setAttribute("class",tr)}var Mr=Vt.maybeAppendByClassName(ie.nextBtnGroup,"g").styles(qe);this.nextBtnGroup=Mr.node();var yr=Mr.maybeAppendByClassName(ie.nextBtn,"path");if(Kt){var vr=L(ie.nextBtn.name,it.nextBtn,Kt);yr.node().setAttribute("class",vr)}[Xn,yr].forEach(function(Ur){Ur.styles((0,c.pi)((0,c.pi)({},Nn),{transformOrigin:"center"})),(0,Xe.b)(Ur.node(),Qe,!0)});var Cr=Vt.maybeAppendByClassName(ie.pageInfoGroup,"g");this.pageInfoGroup=Cr.node();var ur=Cr.maybeAppendByClassName(ie.pageInfo,"text");if(ur.styles(ge),Kt){var Kn=L(ie.pageInfo.name,it.pageInfo,Kt);ur.node().setAttribute("class",Kn)}this.updatePageInfo(),Vt.node().setLocalPosition(pt+Wt,ut/2),Dn&&(this.prevBtnGroup.addEventListener("click",function(){nt.prev()}),this.nextBtnGroup.addEventListener("click",function(){nt.next()}))}},$.prototype.render=function(H,nt){var Mt=H.x,Wt=Mt===void 0?0:Mt,Tt=H.y,Kt=Tt===void 0?0:Tt;this.attr("transform","translate(".concat(Wt,", ").concat(Kt,")"));var bt=(0,S.Ys)(nt);this.renderClipPath(bt),this.renderController(bt),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},$.prototype.bindEvents=function(){var H=this,nt=(0,we.Z)(function(){return H.render(H.attributes,H)},50);this.playWindow.addEventListener(I.Dk.INSERTED,nt),this.playWindow.addEventListener(I.Dk.REMOVED,nt)},$}(_.w),T=y(71018),at=y(93785),fe=y(71879);function Jt(q){var $="default";if((0,at.Z)(q)&&q instanceof Image)$="image";else if((0,T.Z)(q))$="symbol";else if((0,fe.Z)(q)){var H=new RegExp("data:(image|text)");q.match(H)?$="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(q)?$="url":$="symbol"}return $}function Ie(q){var $=Jt(q);return["base64","url","image"].includes($)?"image":q&&$==="symbol"?"path":null}var Ne=function(q){(0,c.ZT)($,q);function $(){return q!==null&&q.apply(this,arguments)||this}return $.prototype.render=function(H,nt){var Mt=H.x,Wt=Mt===void 0?0:Mt,Tt=H.y,Kt=Tt===void 0?0:Tt,bt=this.getSubShapeStyle(H),pt=bt.symbol,ut=bt.size,Gt=ut===void 0?16:ut,Vt=(0,c._T)(bt,["symbol","size"]),ve=Ie(pt);(0,A.z)(!!ve,(0,S.Ys)(nt),function(ge){ge.maybeAppendByClassName("marker",ve).attr("className","marker ".concat(ve,"-marker")).call(function(Yt){if(ve==="image"){var Ce=Gt*2;Yt.styles({img:pt,width:Ce,height:Ce,x:Wt-Gt,y:Kt-Gt})}else{var Ce=Gt/2,qe=(0,T.Z)(pt)?pt:$.getSymbol(pt);Yt.styles((0,c.pi)({d:qe==null?void 0:qe(Wt,Kt,Ce)},Vt))}})})},$.MARKER_SYMBOL_MAP=new Map,$.registerSymbol=function(H,nt){$.MARKER_SYMBOL_MAP.set(H,nt)},$.getSymbol=function(H){return $.MARKER_SYMBOL_MAP.get(H)},$.getSymbols=function(){return Array.from($.MARKER_SYMBOL_MAP.keys())},$}(_.w);Ne.registerSymbol("cross",Ze),Ne.registerSymbol("hyphen",Ae),Ne.registerSymbol("line",Pe),Ne.registerSymbol("plus",le),Ne.registerSymbol("tick",Ke),Ne.registerSymbol("circle",En),Ne.registerSymbol("point",Pn),Ne.registerSymbol("bowtie",on),Ne.registerSymbol("hexagon",fn),Ne.registerSymbol("square",tn),Ne.registerSymbol("diamond",xn),Ne.registerSymbol("triangle",It),Ne.registerSymbol("triangle-down",Ee),Ne.registerSymbol("line",Pe),Ne.registerSymbol("dot",Pt),Ne.registerSymbol("dash",wt),Ne.registerSymbol("smooth",he),Ne.registerSymbol("hv",je),Ne.registerSymbol("vh",Re),Ne.registerSymbol("hvh",ce),Ne.registerSymbol("vhv",Le),Ne.registerSymbol("focus",_t);function en(q,$,H){var nt=Math.round((q-H)/$);return H+nt*$}function St(q,$,H){var nt=1.4,Mt=nt*H;return[["M",q-H,$-Mt],["L",q+H,$-Mt],["L",q+H,$+Mt],["L",q-H,$+Mt],["Z"]]}var tt=1.4,Nt=.4;function Xt(q,$,H){var nt=H,Mt=nt*tt,Wt=nt/2,Tt=nt/6,Kt=q+Mt*Nt;return[["M",q,$],["L",Kt,$+Wt],["L",q+Mt,$+Wt],["L",q+Mt,$-Wt],["L",Kt,$-Wt],["Z"],["M",Kt,$+Tt],["L",q+Mt-2,$+Tt],["M",Kt,$-Tt],["L",q+Mt-2,$-Tt]]}function Lt(q,$,H){var nt=H,Mt=nt*tt,Wt=nt/2,Tt=nt/6,Kt=$+Mt*Nt;return[["M",q,$],["L",q-Wt,Kt],["L",q-Wt,$+Mt],["L",q+Wt,$+Mt],["L",q+Wt,Kt],["Z"],["M",q-Tt,Kt],["L",q-Tt,$+Mt-2],["M",q+Tt,Kt],["L",q+Tt,$+Mt-2]]}Ne.registerSymbol("hiddenHandle",St),Ne.registerSymbol("verticalHandle",Xt),Ne.registerSymbol("horizontalHandle",Lt);var Zt=function(q,$,H){return q===void 0&&(q="horizontal"),q==="horizontal"?$:H};function Ut(q,$,H,nt){var Mt;nt===void 0&&(nt=4);var Wt=__read(q,2),Tt=Wt[0],Kt=Wt[1],bt=__read($,2),pt=bt[0],ut=bt[1],Gt=__read(H,2),Vt=Gt[0],ve=Gt[1],ge=__read([pt,ut],2),Yt=ge[0],Ce=ge[1],qe=Ce-Yt;return Yt>Ce&&(Mt=__read([Ce,Yt],2),Yt=Mt[0],Ce=Mt[1]),qe>Kt-Tt?[Tt,Kt]:Yt<Tt?Vt===Tt&&ve===Ce?[Tt,Ce]:[Tt,qe+Tt]:Ce>Kt?ve===Kt&&Vt===Yt?[Yt,Kt]:[Kt-qe,Kt]:[Yt,Ce]}function qt(q,$,H){return q===void 0&&(q="horizontal"),q==="horizontal"?$:H}var se=y(49527),te=y(2080),ke=y(88170),He=y(53160),Ve=y(23343);function ln(q,$){for(var H in $)$.hasOwnProperty(H)&&H!=="constructor"&&$[H]!==void 0&&(q[H]=$[H])}function On(q,$,H,nt){return $&&ln(q,$),H&&ln(q,H),nt&&ln(q,nt),q}var yn=y(5759);function lr(q){return q instanceof Element||q instanceof Document}var Zn,Yn="component-poptip",ye={CONTAINER:"component-poptip",ARROW:"component-poptip-arrow",TEXT:"component-poptip-text"},xr=(Zn={},Zn[".".concat(ye.CONTAINER)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},Zn[".".concat(ye.TEXT)]={"text-align":"center"},Zn[".".concat(ye.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, -100%)"},Zn[".".concat(ye.CONTAINER,"[data-position='left']")]={transform:"translate(-100%, -50%)"},Zn[".".concat(ye.CONTAINER,"[data-position='right']")]={transform:"translate(0, -50%)"},Zn[".".concat(ye.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},Zn[".".concat(ye.CONTAINER,"[data-position='top-left']")]={transform:"translate(0,-100%)"},Zn[".".concat(ye.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},Zn[".".concat(ye.CONTAINER,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},Zn[".".concat(ye.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},Zn[".".concat(ye.CONTAINER,"[data-position='right-top']")]={transform:"translate(0, 0)"},Zn[".".concat(ye.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},Zn[".".concat(ye.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},Zn[".".concat(ye.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},Zn[".".concat(ye.ARROW)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},Zn[".".concat(ye.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},Zn["[data-position='top'] .".concat(ye.ARROW)]={bottom:"-2px"},Zn[".".concat(ye.CONTAINER,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},Zn["[data-position='left'] .".concat(ye.ARROW)]={right:"-2px"},Zn[".".concat(ye.CONTAINER,"[data-position='right']")]={transform:"translate(5px, -50%)"},Zn["[data-position='right'] .".concat(ye.ARROW)]={left:"-2px"},Zn[".".concat(ye.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},Zn["[data-position='bottom'] .".concat(ye.ARROW)]={top:"-2px"},Zn[".".concat(ye.CONTAINER,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},Zn["[data-position='top-left'] .".concat(ye.ARROW)]={left:"10px",bottom:"-2px"},Zn[".".concat(ye.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},Zn["[data-position='top-right'] .".concat(ye.ARROW)]={right:"10px",bottom:"-2px"},Zn[".".concat(ye.CONTAINER,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},Zn["[data-position='left-top'] .".concat(ye.ARROW)]={right:"-2px",top:"8px"},Zn[".".concat(ye.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},Zn["[data-position='left-bottom'] .".concat(ye.ARROW)]={right:"-2px",bottom:"8px"},Zn[".".concat(ye.CONTAINER,"[data-position='right-top']")]={transform:"translate(5px, 0)"},Zn["[data-position='right-top'] .".concat(ye.ARROW)]={left:"-2px",top:"8px"},Zn[".".concat(ye.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},Zn["[data-position='right-bottom'] .".concat(ye.ARROW)]={left:"-2px",bottom:"8px"},Zn[".".concat(ye.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},Zn["[data-position='bottom-left'] .".concat(ye.ARROW)]={top:"-2px",left:"8px"},Zn[".".concat(ye.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},Zn["[data-position='bottom-right'] .".concat(ye.ARROW)]={top:"-2px",right:"8px"},Zn),Hn=void 0;function Br(q,$,H,nt,Mt,Wt){if(Mt===void 0&&(Mt=!1),Wt===void 0&&(Wt=!1),Wt)return[q,$];var Tt=H.getBoundingClientRect(),Kt=Tt.x,bt=Tt.y,pt=Tt.width,ut=Tt.height;switch(nt){case"top":return Mt?[Kt+pt/2,bt]:[q,bt];case"left":return Mt?[Kt,bt+ut/2]:[Kt,$];case"bottom":return Mt?[Kt+pt/2,bt+ut]:[q,bt+ut];case"right":return Mt?[Kt+pt,bt+ut/2]:[Kt+pt,$];case"top-right":case"right-top":return[Kt+pt,bt];case"left-bottom":case"bottom-left":return[Kt,bt+ut];case"right-bottom":case"bottom-right":return[Kt+pt,bt+ut];case"top-left":case"left-top":default:return[Kt,bt]}}var Ar=function(q){var $;return function(){for(var H=[],nt=0;nt<arguments.length;nt++)H[nt]=arguments[nt];return $||($=q.apply(Hn,H)),$}};function ri(q){var $=q&&document.getElementById(q);return $||($=document.createElement("div"),$.setAttribute("id",q),document.body.appendChild($)),$}function mi(q){var $=Ar(ri)(q);return $}var si=function(q){(0,c.ZT)($,q);function $(H){var nt=q.call(this,(0,Ve.Z)({style:{id:Yn}},$.defaultOptions,H))||this;return nt.visibility="visible",nt.map=new Map,nt.domStyles="",nt.initShape(),nt.render(nt.attributes,nt),nt}return Object.defineProperty($.prototype,"visible",{get:function(){return this.visibility==="visible"},enumerable:!1,configurable:!0}),$.prototype.render=function(H,nt){this.visibility=this.style.visibility,this.updatePoptipElement()},$.prototype.update=function(H){this.attr((0,Ve.Z)({},this.style,H)),this.render(this.attributes,this)},$.prototype.bind=function(H,nt){var Mt=this;if(H){var Wt=this.style.text,Tt=function(bt){var pt=H,ut=Mt.style,Gt=Wt;if(nt){var Vt=typeof nt=="function"?nt.call(null,bt):nt,ve=Vt.html,ge=Vt.target,Yt=(0,c._T)(Vt,["html","target"]);ut=On({},Mt.style,Yt),(ge||ge===!1)&&(pt=ge),typeof ve=="string"&&(Gt=ve)}var Ce=ut.position,qe=ut.arrowPointAtCenter,Qe=ut.follow,Nn=ut.offset;if(pt){var Dn=bt,Rn=Dn.clientX,Xn=Dn.clientY,tr=(0,c.CR)(Br(Rn,Xn,pt,Ce,qe,Qe),2),Mr=tr[0],yr=tr[1];Mt.showTip(Mr,yr,{text:Gt,position:Ce,offset:Nn})}else Mt.hideTip()},Kt=function(){Mt.hideTip()};H.addEventListener("mousemove",Tt),H.addEventListener("mouseleave",Kt),this.map.set(H,[Tt,Kt])}},$.prototype.unbind=function(H){if(this.map.has(H)){var nt=(0,c.CR)(this.map.get(H)||[],2),Mt=nt[0],Wt=nt[1];Mt&&H.removeEventListener("mousemove",Mt),Wt&&H.removeEventListener("mouseleave",Wt),this.map.delete(H)}},$.prototype.clear=function(){this.container.innerHTML=""},$.prototype.destroy=function(){var H=this,nt;(0,c.ev)([],(0,c.CR)(this.map.keys()),!1).forEach(function(Mt){return H.unbind(Mt)}),(nt=this.container)===null||nt===void 0||nt.remove(),q.prototype.destroy.call(this)},$.prototype.showTip=function(H,nt,Mt){var Wt=(0,yn.Z)(Mt,"text");if(!(Wt&&typeof Wt!="string")&&(this.applyStyles(),H&&nt&&Mt)){var Tt=Mt.offset,Kt=Mt.position;if(Kt&&this.container.setAttribute("data-position",Kt),this.setOffsetPosition(H,nt,Tt),typeof Wt=="string"){var bt=this.container.querySelector(".".concat(ye.TEXT));bt&&(bt.innerHTML=Wt)}this.visibility="visible",this.container.style.visibility="visible"}},$.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},$.prototype.getContainer=function(){return this.container},$.prototype.getClassName=function(){var H=this.style.containerClassName;return"".concat(ye.CONTAINER).concat(H?" ".concat(H):"")},$.prototype.initShape=function(){var H=this,nt=this.style.id;this.container=mi(nt),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return H.showTip()}),this.container.addEventListener("mouseleave",function(){return H.hideTip()})},$.prototype.updatePoptipElement=function(){var H=this.container;this.clear();var nt=this.style,Mt=nt.id,Wt=nt.template,Tt=nt.text;this.container.setAttribute("id",Mt),this.container.className=this.getClassName();var Kt='<span class="'.concat(ye.ARROW,'"></span>');H.innerHTML=Kt,(0,fe.Z)(Wt)?H.innerHTML+=Wt:Wt&&lr(Wt)&&H.appendChild(Wt),Tt&&(H.getElementsByClassName(ye.TEXT)[0].textContent=Tt),this.applyStyles(),this.container.style.visibility=this.visibility},$.prototype.applyStyles=function(){var H=(0,Te.n)({},xr,this.style.domStyles),nt=Object.entries(H).reduce(function(Wt,Tt){var Kt=(0,c.CR)(Tt,2),bt=Kt[0],pt=Kt[1],ut=Object.entries(pt).reduce(function(Gt,Vt){var ve=(0,c.CR)(Vt,2),ge=ve[0],Yt=ve[1];return"".concat(Gt).concat(ge,": ").concat(Yt,";")},"");return"".concat(Wt).concat(bt,"{").concat(ut,"}")},"");if(this.domStyles!==nt){this.domStyles=nt;var Mt=this.container.querySelector("style");Mt&&this.container.removeChild(Mt),Mt=document.createElement("style"),Mt.innerHTML=nt,this.container.appendChild(Mt)}},$.prototype.setOffsetPosition=function(H,nt,Mt){Mt===void 0&&(Mt=this.style.offset);var Wt=(0,c.CR)(Mt,2),Tt=Wt[0],Kt=Tt===void 0?0:Tt,bt=Wt[1],pt=bt===void 0?0:bt;this.container.style.left="".concat(H+Kt,"px"),this.container.style.top="".concat(nt+pt,"px")},$.tag="poptip",$.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:xr,template:'<div class="'.concat(ye.TEXT,'"></div>')}},$}(_.w),Jr=(0,w.A)({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),_i={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};function Yi(q){var $=q.querySelector(Jr.marker.class);return $?$.style:{}}var Ei=function(q){(0,c.ZT)($,q);function $(H,nt){var Mt=q.call(this,H,{span:[1,1],marker:function(){return new I.Cd({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this;return Mt.keyFields={},Mt.keyFields=nt||{},Mt}return Object.defineProperty($.prototype,"showValue",{get:function(){var H=this.attributes.valueText;return H?typeof H=="string"||typeof H=="number"?H!=="":typeof H=="function"?!0:H.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"actualSpace",{get:function(){var H=this.labelGroup,nt=this.valueGroup,Mt=this.attributes,Wt=Mt.markerSize,Tt=Mt.focus,Kt=Mt.focusMarkerSize,bt=H.node().getBBox(),pt=bt.width,ut=bt.height,Gt=nt.node().getBBox(),Vt=Gt.width,ve=Gt.height,ge=Tt?Kt!=null?Kt:12:0;return{markerWidth:Wt,labelWidth:pt,valueWidth:Vt,focusWidth:ge,height:Math.max(Wt,ut,ve)}},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"span",{get:function(){var H=this.attributes.span;if(!H)return[1,1];var nt=(0,c.CR)((0,D.j)(H),2),Mt=nt[0],Wt=nt[1],Tt=this.showValue?Wt:0,Kt=Mt+Tt;return[Mt/Kt,Tt/Kt]},enumerable:!1,configurable:!0}),$.prototype.setAttribute=function(H,nt){q.prototype.setAttribute.call(this,H,nt)},Object.defineProperty($.prototype,"shape",{get:function(){var H,nt=this.attributes,Mt=nt.markerSize,Wt=nt.width,Tt=this.actualSpace,Kt=Tt.markerWidth,bt=Tt.focusWidth,pt=Tt.height,ut=this.actualSpace,Gt=ut.labelWidth,Vt=ut.valueWidth,ve=(0,c.CR)(this.spacing,3),ge=ve[0],Yt=ve[1],Ce=ve[2];if(Wt){var qe=Wt-Mt-ge-Yt-bt-Ce,Qe=(0,c.CR)(this.span,2),Nn=Qe[0],Dn=Qe[1];H=(0,c.CR)([Nn*qe,Dn*qe],2),Gt=H[0],Vt=H[1]}var Rn=Kt+Gt+Vt+ge+Yt+bt+Ce;return{width:Rn,height:pt,markerWidth:Kt,labelWidth:Gt,valueWidth:Vt,focusWidth:bt}},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"spacing",{get:function(){var H=this.attributes,nt=H.spacing,Mt=H.focus;if(!nt)return[0,0,0];var Wt=(0,c.CR)((0,D.j)(nt),3),Tt=Wt[0],Kt=Wt[1],bt=Wt[2];return[Tt,this.showValue?Kt:0,Mt?bt:0]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"layout",{get:function(){var H=this.shape,nt=H.markerWidth,Mt=H.labelWidth,Wt=H.valueWidth,Tt=H.focusWidth,Kt=H.width,bt=H.height,pt=(0,c.CR)(this.spacing,3),ut=pt[0],Gt=pt[1],Vt=pt[2];return{height:bt,width:Kt,markerWidth:nt,labelWidth:Mt,valueWidth:Wt,focusWidth:Tt,position:[nt/2,nt+ut,nt+Mt+ut+Gt,nt+Mt+Wt+ut+Gt+Vt+Tt/2]}},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"scaleSize",{get:function(){var H=Yi(this.markerGroup.node()),nt=this.attributes,Mt=nt.markerSize,Wt=nt.markerStrokeWidth,Tt=Wt===void 0?H.strokeWidth:Wt,Kt=nt.markerLineWidth,bt=Kt===void 0?H.lineWidth:Kt,pt=nt.markerStroke,ut=pt===void 0?H.stroke:pt,Gt=+(Tt||bt||(ut?1:0))*Math.sqrt(2),Vt=this.markerGroup.node().getBBox(),ve=Vt.width,ge=Vt.height;return(1-Gt/Math.max(ve,ge))*Mt},enumerable:!1,configurable:!0}),$.prototype.renderMarker=function(H){var nt=this,Mt=this.attributes,Wt=Mt.marker,Tt=Mt.classNamePrefix,Kt=(0,z.zs)(this.attributes,"marker");this.markerGroup=H.maybeAppendByClassName(Jr.markerGroup,"g").style("zIndex",0),(0,A.z)(!!Wt,this.markerGroup,function(){var bt,pt=nt.markerGroup.node(),ut=(bt=pt.childNodes)===null||bt===void 0?void 0:bt[0],Gt=L(Jr.marker.name,it.marker,Tt),Vt=typeof Wt=="string"?new Ne({style:{symbol:Wt},className:Gt}):Wt();if(ut)if(Vt.nodeName===ut.nodeName)ut instanceof Ne?ut.update((0,c.pi)((0,c.pi)({},Kt),{symbol:Wt})):((0,te.DM)(ut,Vt),(0,S.Ys)(ut).styles(Kt));else{if(ut.remove(),!(Vt instanceof Ne)){var ge=L(Jr.marker.name,it.marker,Tt);Vt.className=ge}(0,S.Ys)(Vt).styles(Kt),pt.appendChild(Vt)}else{if(!(Vt instanceof Ne)){var ve=L(Jr.marker.name,it.marker,Tt);Vt.className=ve,(0,S.Ys)(Vt).styles(Kt)}pt.appendChild(Vt)}nt.markerGroup.node().scale(1/nt.markerGroup.node().getScale()[0]);var Yt=(0,Xe.b)(nt.markerGroup.node(),nt.scaleSize,!0);nt.markerGroup.node().style._transform="scale(".concat(Yt,")")})},$.prototype.renderLabel=function(H){var nt=(0,z.zs)(this.attributes,"label"),Mt=nt.text,Wt=(0,c._T)(nt,["text"]),Tt=this.attributes.classNamePrefix;this.labelGroup=H.maybeAppendByClassName(Jr.labelGroup,"g").style("zIndex",0);var Kt=L(Jr.label.name,it.label,Tt),bt=this.labelGroup.maybeAppendByClassName(Jr.label,function(){return(0,ke.S)(Mt)});bt.node().setAttribute("class",Kt),bt.styles(Wt)},$.prototype.renderValue=function(H){var nt=this,Mt=(0,z.zs)(this.attributes,"value"),Wt=Mt.text,Tt=(0,c._T)(Mt,["text"]),Kt=this.attributes.classNamePrefix;this.valueGroup=H.maybeAppendByClassName(Jr.valueGroup,"g").style("zIndex",0),(0,A.z)(this.showValue,this.valueGroup,function(){var bt=L(Jr.value.name,it.value,Kt),pt=nt.valueGroup.maybeAppendByClassName(Jr.value,function(){return(0,ke.S)(Wt)});pt.node().setAttribute("class",bt),pt.styles(Tt)})},$.prototype.createPoptip=function(){var H=this.attributes.poptip,nt=H||{},Mt=nt.render,Wt=(0,c._T)(nt,["render"]),Tt=new si({style:(0,Te.n)(_i,Wt)});return this.poptipGroup=Tt,Tt},$.prototype.bindPoptip=function(H){var nt=this,Mt=this.attributes.poptip;if(Mt){var Wt=this.poptipGroup||this.createPoptip();Wt.bind(H,function(){var Tt=nt.attributes,Kt=Tt.labelText,bt=Tt.valueText,pt=Tt.markerFill,ut=typeof Kt=="string"?Kt:Kt==null?void 0:Kt.attr("text"),Gt=typeof bt=="string"?bt:bt==null?void 0:bt.attr("text");if(typeof Mt.render=="function")return{html:Mt.render((0,c.pi)((0,c.pi)({},nt.keyFields),{label:ut,value:Gt,color:pt}))};var Vt="";return(typeof ut=="string"||typeof ut=="number")&&(Vt+='<div class="component-poptip-label">'.concat(ut,"</div>")),(typeof Gt=="string"||typeof Gt=="number")&&(Vt+='<div class="component-poptip-value">'.concat(Gt,"</div>")),{html:Vt}})}},$.prototype.renderFocus=function(H){var nt=this,Mt=this.attributes,Wt=Mt.focus,Tt=Mt.focusMarkerSize,Kt=Mt.classNamePrefix,bt={x:0,y:0,size:Tt,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};(0,se.Z)(Wt)||(this.focusGroup=H.maybeAppendByClassName(Jr.focusGroup,"g").style("zIndex",0),(0,A.z)(Wt,this.focusGroup,function(){var pt=L(Jr.focus.name,it.focusIcon,Kt),ut=new Ne({style:(0,c.pi)((0,c.pi)({},bt),{symbol:"focus"}),className:pt}),Gt=new I.Cd({style:{r:bt.size/2,fill:"transparent"}}),Vt=nt.focusGroup.node();Vt.appendChild(Gt),Vt.appendChild(ut),ut.update({opacity:0}),H.node().addEventListener("pointerenter",function(){ut.update({opacity:1})}),H.node().addEventListener("pointerleave",function(){ut.update({opacity:0})})}))},$.prototype.renderPoptip=function(H){var nt=this,Mt=this.attributes.poptip;if(Mt){var Wt=H.maybeAppendByClassName(Jr.value,"g").node(),Tt=H.maybeAppendByClassName(Jr.label,"g").node();[Wt,Tt].forEach(function(Kt){Kt&&nt.bindPoptip(Kt)})}},$.prototype.renderBackground=function(H){var nt=this.shape,Mt=nt.width,Wt=nt.height,Tt=(0,z.zs)(this.attributes,"background");this.background=H.maybeAppendByClassName(Jr.backgroundGroup,"g").style("zIndex",-1);var Kt=this.background.maybeAppendByClassName(Jr.background,"rect");Kt.styles((0,c.pi)({width:Mt,height:Wt},Tt));var bt=this.attributes.classNamePrefix,pt=bt===void 0?"":bt;if(pt){var ut=L(Jr.background.name,it.background,pt);Kt.node().setAttribute("class",ut)}},$.prototype.adjustLayout=function(){var H=this.layout,nt=H.labelWidth,Mt=H.valueWidth,Wt=H.height,Tt=(0,c.CR)(H.position,4),Kt=Tt[0],bt=Tt[1],pt=Tt[2],ut=Tt[3],Gt=Wt/2;this.markerGroup.styles({transform:"translate(".concat(Kt,", ").concat(Gt,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(bt,", ").concat(Gt,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(ut,", ").concat(Gt,")")}),(0,He.O)(this.labelGroup.select(Jr.label.class).node(),Math.ceil(nt)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(pt,", ").concat(Gt,")")}),(0,He.O)(this.valueGroup.select(Jr.value.class).node(),Math.ceil(Mt)))},$.prototype.render=function(H,nt){var Mt=(0,S.Ys)(nt),Wt=H.x,Tt=Wt===void 0?0:Wt,Kt=H.y,bt=Kt===void 0?0:Kt;Mt.styles({transform:"translate(".concat(Tt,", ").concat(bt,")")}),this.renderMarker(Mt),this.renderLabel(Mt),this.renderValue(Mt),this.renderBackground(Mt),this.renderPoptip(Mt),this.renderFocus(Mt),this.adjustLayout()},$}(_.w),ti=(0,w.A)({page:"item-page",navigator:"navigator",item:"item"},"items"),xa=function(q,$,H){return H===void 0&&(H=!0),q?$(q):H},Di=function(q){(0,c.ZT)($,q);function $(H){var nt=q.call(this,H,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:Ct,mouseenter:Ct,mouseleave:Ct})||this;return nt.navigatorShape=[0,0],nt}return Object.defineProperty($.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"grid",{get:function(){var H=this.attributes,nt=H.gridRow,Mt=H.gridCol,Wt=H.data;if(!nt&&!Mt)throw new Error("gridRow and gridCol can not be set null at the same time");return nt&&Mt?[nt,Mt]:nt?[nt,Wt.length]:[Wt.length,Mt]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"renderData",{get:function(){var H=this.attributes,nt=H.data,Mt=H.layout,Wt=H.poptip,Tt=H.focus,Kt=H.focusMarkerSize,bt=H.classNamePrefix,pt=(0,z.zs)(this.attributes,"item"),ut=nt.map(function(Gt,Vt){var ve=Gt.id,ge=ve===void 0?Vt:ve,Yt=Gt.label,Ce=Gt.value;return{id:"".concat(ge),index:Vt,style:(0,c.pi)({layout:Mt,labelText:Yt,valueText:Ce,poptip:Wt,focus:Tt,focusMarkerSize:Kt,classNamePrefix:bt},Object.fromEntries(Object.entries(pt).map(function(qe){var Qe=(0,c.CR)(qe,2),Nn=Qe[0],Dn=Qe[1];return[Nn,(0,de.S)(Dn,[Gt,Vt,nt])]})))}});return ut},enumerable:!1,configurable:!0}),$.prototype.getGridLayout=function(){var H=this,nt=this.attributes,Mt=nt.orientation,Wt=nt.width,Tt=nt.rowPadding,Kt=nt.colPadding,bt=(0,c.CR)(this.navigatorShape,1),pt=bt[0],ut=(0,c.CR)(this.grid,2),Gt=ut[0],Vt=ut[1],ve=Vt*Gt,ge=0;return this.pageViews.children.map(function(Yt,Ce){var qe,Qe,Nn=Math.floor(Ce/ve),Dn=Ce%ve,Rn=H.ifHorizontal(Vt,Gt),Xn=[Math.floor(Dn/Rn),Dn%Rn];Mt==="vertical"&&Xn.reverse();var tr=(0,c.CR)(Xn,2),Mr=tr[0],yr=tr[1],vr=(Wt-pt-(Vt-1)*Kt)/Vt,Cr=Yt.getBBox().height,ur=(0,c.CR)([0,0],2),Kn=ur[0],Ur=ur[1];return Mt==="horizontal"?(qe=(0,c.CR)([ge,Mr*(Cr+Tt)],2),Kn=qe[0],Ur=qe[1],ge=yr===Vt-1?0:ge+vr+Kt):(Qe=(0,c.CR)([yr*(vr+Kt),ge],2),Kn=Qe[0],Ur=Qe[1],ge=Mr===Gt-1?0:ge+Cr+Tt),{page:Nn,index:Ce,row:Mr,col:yr,pageIndex:Dn,width:vr,height:Cr,x:Kn,y:Ur}})},$.prototype.getFlexLayout=function(){var H=this.attributes,nt=H.width,Mt=H.height,Wt=H.rowPadding,Tt=H.colPadding,Kt=(0,c.CR)(this.navigatorShape,1),bt=Kt[0],pt=(0,c.CR)(this.grid,2),ut=pt[0],Gt=pt[1],Vt=(0,c.CR)([nt-bt,Mt],2),ve=Vt[0],ge=Vt[1],Yt=(0,c.CR)([0,0,0,0,0,0,0,0],8),Ce=Yt[0],qe=Yt[1],Qe=Yt[2],Nn=Yt[3],Dn=Yt[4],Rn=Yt[5],Xn=Yt[6],tr=Yt[7];return this.pageViews.children.map(function(Mr,yr){var vr,Cr,ur,Kn,Ur=Mr.getBBox(),Yr=Ur.width,br=Ur.height,xi=Xn===0?0:Tt,di=Xn+xi+Yr;if(di<=ve&&xa(Dn,function(Ci){return Ci<Gt}))return vr=(0,c.CR)([Xn+xi,tr,di],3),Ce=vr[0],qe=vr[1],Xn=vr[2],{width:Yr,height:br,x:Ce,y:qe,page:Qe,index:yr,pageIndex:Nn++,row:Rn,col:Dn++};Cr=(0,c.CR)([Rn+1,0,0,tr+br+Wt],4),Rn=Cr[0],Dn=Cr[1],Xn=Cr[2],tr=Cr[3];var Lr=tr+br;return Lr<=ge&&xa(Rn,function(Ci){return Ci<ut})?(ur=(0,c.CR)([Xn,tr,Yr],3),Ce=ur[0],qe=ur[1],Xn=ur[2],{width:Yr,height:br,x:Ce,y:qe,page:Qe,index:yr,pageIndex:Nn++,row:Rn,col:Dn++}):(Kn=(0,c.CR)([0,0,Yr,0,Qe+1,0,0,0],8),Ce=Kn[0],qe=Kn[1],Xn=Kn[2],tr=Kn[3],Qe=Kn[4],Nn=Kn[5],Rn=Kn[6],Dn=Kn[7],{width:Yr,height:br,x:Ce,y:qe,page:Qe,index:yr,pageIndex:Nn++,row:Rn,col:Dn++})})},Object.defineProperty($.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var H=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,nt=H.call(this);return nt.slice(-1)[0].page>0?(this.navigatorShape=[55,0],H.call(this)):nt},enumerable:!1,configurable:!0}),$.prototype.ifHorizontal=function(H,nt){var Mt=this.attributes.orientation;return qt(Mt,H,nt)},$.prototype.flattenPage=function(H){H.querySelectorAll(ti.item.class).forEach(function(nt){H.appendChild(nt)}),H.querySelectorAll(ti.page.class).forEach(function(nt){var Mt=H.removeChild(nt);Mt.destroy()})},$.prototype.renderItems=function(H){var nt=this.attributes,Mt=nt.click,Wt=nt.mouseenter,Tt=nt.mouseleave,Kt=nt.classNamePrefix;this.flattenPage(H);var bt=this.dispatchCustomEvent.bind(this),pt=L(ti.item.name,it.item,Kt);(0,S.Ys)(H).selectAll(ti.item.class).data(this.renderData,function(ut){return ut.id}).join(function(ut){return ut.append(function(Gt){var Vt=Gt.style,ve=(0,c._T)(Gt,["style"]);return new Ei({style:Vt},ve)}).attr("className",pt).on("click",function(){Mt==null||Mt(this),bt("itemClick",{item:this})}).on("pointerenter",function(){Wt==null||Wt(this),bt("itemMouseenter",{item:this})}).on("pointerleave",function(){Tt==null||Tt(this),bt("itemMouseleave",{item:this})})},function(ut){return ut.each(function(Gt){var Vt=Gt.style;this.update(Vt)})},function(ut){return ut.remove()})},$.prototype.relayoutNavigator=function(){var H,nt=this.attributes,Mt=nt.layout,Wt=nt.width,Tt=((H=this.pageViews.children[0])===null||H===void 0?void 0:H.getBBox().height)||0,Kt=(0,c.CR)(this.navigatorShape,2),bt=Kt[0],pt=Kt[1];this.navigator.update(Mt==="grid"?{pageWidth:Wt-bt,pageHeight:Tt-pt}:{})},$.prototype.adjustLayout=function(){var H=this,nt=Object.entries(ue(this.itemsLayout,"page")).map(function(Wt){var Tt=(0,c.CR)(Wt,2),Kt=Tt[0],bt=Tt[1];return{page:Kt,layouts:bt}}),Mt=(0,c.ev)([],(0,c.CR)(this.navigator.getContainer().children),!1);nt.forEach(function(Wt){var Tt=Wt.layouts,Kt=H.pageViews.appendChild(new I.ZA({className:ti.page.name}));Tt.forEach(function(bt){var pt=bt.x,ut=bt.y,Gt=bt.index,Vt=bt.width,ve=bt.height,ge=Mt[Gt];Kt.appendChild(ge),(0,Ht.Z)(ge,"__layout__",bt),ge.update({x:pt,y:ut,width:Vt,height:ve})})}),this.relayoutNavigator()},$.prototype.renderNavigator=function(H){var nt=this.attributes,Mt=nt.orientation,Wt=nt.classNamePrefix,Tt=(0,z.zs)(this.attributes,"nav"),Kt=(0,Te.n)({orientation:Mt,classNamePrefix:Wt},Tt),bt=this;return H.selectAll(ti.navigator.class).data(["nav"]).join(function(pt){return pt.append(function(){return new Me({style:Kt})}).attr("className",ti.navigator.name).each(function(){bt.navigator=this})},function(pt){return pt.each(function(){this.update(Kt)})},function(pt){return pt.remove()}),this.navigator},$.prototype.getBBox=function(){return this.navigator.getBBox()},$.prototype.render=function(H,nt){var Mt=this.attributes.data;if(!(!Mt||Mt.length===0)){var Wt=this.renderNavigator((0,S.Ys)(nt));this.renderItems(Wt.getContainer()),this.adjustLayout()}},$.prototype.dispatchCustomEvent=function(H,nt){var Mt=new I.Aw(H,{detail:nt});this.dispatchEvent(Mt)},$}(_.w),ft=(0,w.A)({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),b={showLabel:!0,formatter:function(q){return q.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},E=function(q){(0,c.ZT)($,q);function $(H){return q.call(this,H,b)||this}return $.prototype.render=function(H,nt){var Mt=(0,S.Ys)(nt).maybeAppendByClassName(ft.markerGroup,"g");this.renderMarker(Mt);var Wt=(0,S.Ys)(nt).maybeAppendByClassName(ft.labelGroup,"g");this.renderLabel(Wt)},$.prototype.renderMarker=function(H){var nt=this,Mt=this.attributes,Wt=Mt.orientation,Tt=Mt.classNamePrefix,Kt=Mt.markerSymbol,bt=Kt===void 0?qt(Wt,"horizontalHandle","verticalHandle"):Kt;(0,A.z)(!!bt,H,function(pt){var ut=(0,z.zs)(nt.attributes,"marker"),Gt=(0,c.pi)({symbol:bt},ut),Vt=L(ft.marker.name,it.handleMarker,Tt);if(nt.marker=pt.maybeAppendByClassName(ft.marker,function(){return new Ne({style:Gt,className:Vt})}).update(Gt),Tt){var ve=nt.marker.node().querySelector(".marker");if(ve){var ge=ve.getAttribute("class")||"",Yt=ge.split(" ")[0],Ce=L(Yt,it.handleMarker,Tt);ve.setAttribute("class",Ce)}}})},$.prototype.renderLabel=function(H){var nt=this,Mt=this.attributes,Wt=Mt.showLabel,Tt=Mt.orientation,Kt=Mt.spacing,bt=Kt===void 0?0:Kt,pt=Mt.formatter,ut=Mt.classNamePrefix;(0,A.z)(Wt,H,function(Gt){var Vt,ve=(0,z.zs)(nt.attributes,"label"),ge=ve.text,Yt=(0,c._T)(ve,["text"]),Ce=((Vt=Gt.select(ft.marker.class))===null||Vt===void 0?void 0:Vt.node().getBBox())||{},qe=Ce.width,Qe=qe===void 0?0:qe,Nn=Ce.height,Dn=Nn===void 0?0:Nn,Rn=(0,c.CR)(qt(Tt,[0,Dn+bt,"center","top"],[Qe+bt,0,"start","middle"]),4),Xn=Rn[0],tr=Rn[1],Mr=Rn[2],yr=Rn[3],vr=L(ft.label.name,it.handleLabel,ut);Gt.maybeAppendByClassName(ft.label,"text").attr("className",vr).styles((0,c.pi)((0,c.pi)({},Yt),{x:Xn,y:tr,text:pt(ge).toString(),textAlign:Mr,textBaseline:yr}))})},$}(_.w),h={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},g=(0,Te.n)({},h,{}),M=(0,Te.n)({},h,(0,z.dq)(b,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),Y=.01,J=.5,ot=(0,w.A)({title:"title",html:"html",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),vt=function(q){(0,c.ZT)($,q);function $(){return q!==null&&q.apply(this,arguments)||this}return $.prototype.update=function(H){this.attr(H)},$}(I.k9),zt=function(q){(0,c.ZT)($,q);function $(H){return q.call(this,H,g)||this}return $.prototype.renderTitle=function(H,nt,Mt){var Wt=this.attributes,Tt=Wt.showTitle,Kt=Wt.titleText,bt=Wt.classNamePrefix,pt=(0,z.zs)(this.attributes,"title"),ut=(0,c.CR)((0,z.Hm)(pt),2),Gt=ut[0],Vt=ut[1];this.titleGroup=H.maybeAppendByClassName(ot.titleGroup,"g").styles(Vt);var ve=(0,c.pi)((0,c.pi)({width:nt,height:Mt},Gt),{text:Tt?Kt:"",classNamePrefix:bt});this.title=this.titleGroup.maybeAppendByClassName(ot.title,function(){return new Rt({style:ve})}).update(ve)},$.prototype.renderCustom=function(H){var nt=this.attributes.data,Mt={innerHTML:this.attributes.render(nt),pointerEvents:"auto"};H.maybeAppendByClassName(ot.html,function(){return new vt({className:ot.html.name,style:Mt})}).update(Mt)},$.prototype.renderItems=function(H,nt){var Mt=nt.x,Wt=nt.y,Tt=nt.width,Kt=nt.height,bt=(0,z.zs)(this.attributes,"title",!0),pt=(0,c.CR)((0,z.Hm)(bt),2),ut=pt[0],Gt=pt[1],Vt=(0,c.pi)((0,c.pi)({},ut),{width:Tt,height:Kt,x:0,y:0});this.itemsGroup=H.maybeAppendByClassName(ot.itemsGroup,"g").styles((0,c.pi)((0,c.pi)({},Gt),{transform:"translate(".concat(Mt,", ").concat(Wt,")")}));var ve=this;this.itemsGroup.selectAll(ot.items.class).data(["items"]).join(function(ge){return ge.append(function(){return new Di({style:Vt})}).attr("className",ot.items.name).each(function(){ve.items=(0,S.Ys)(this)})},function(ge){return ge.update(Vt)},function(ge){return ge.remove()})},$.prototype.adjustLayout=function(){var H=this.attributes.showTitle;if(H){var nt=this.title.node().getAvailableSpace(),Mt=nt.x,Wt=nt.y;this.itemsGroup.node().style.transform="translate(".concat(Mt,", ").concat(Wt,")")}},Object.defineProperty($.prototype,"availableSpace",{get:function(){var H=this.attributes,nt=H.showTitle,Mt=H.width,Wt=H.height;return nt?this.title.node().getAvailableSpace():new R.b(0,0,Mt,Wt)},enumerable:!1,configurable:!0}),$.prototype.getBBox=function(){var H,nt,Mt=(H=this.title)===null||H===void 0?void 0:H.node(),Wt=(nt=this.items)===null||nt===void 0?void 0:nt.node();return!Mt||!Wt?q.prototype.getBBox.call(this):kt(Mt,Wt)},$.prototype.render=function(H,nt){var Mt=this.attributes,Wt=Mt.width,Tt=Mt.height,Kt=Mt.x,bt=Kt===void 0?0:Kt,pt=Mt.y,ut=pt===void 0?0:pt,Gt=Mt.classNamePrefix,Vt=Mt.render,ve=(0,S.Ys)(nt),ge=nt.className||"legend-category";Gt?nt.attr("className","".concat(ge," ").concat(Gt,"legend")):nt.className||nt.attr("className","legend-category"),nt.style.transform="translate(".concat(bt,", ").concat(ut,")"),Vt?this.renderCustom(ve):(this.renderTitle(ve,Wt,Tt),this.renderItems(ve,this.availableSpace),this.adjustLayout())},$}(_.w)},91498:function(yt,Et,y){"use strict";y.d(Et,{s:function(){return Wr}});var c=y(80813),_=y(70208),I=y(97304),z=y(7225),S=y(99247),R=y(17911),w=y(88839),N=null,D=null;function A(j){return j instanceof Date?j:new Date(j)}function L(j){for(var B=__read(j,2),P=B[0],k=B[1],U=N.indexOf(P),rt=N.indexOf(k),ct="",lt=U;lt<=rt;lt+=1)if(ct+=D[lt],lt<rt){var mt="-";lt===2?mt=" ":lt>2&&(mt=":"),ct+=mt}return ct}function F(j,B){var P={YYYY:j.getFullYear(),MM:j.getMonth()+1,DD:j.getDate(),HH:j.getHours(),mm:j.getMinutes(),ss:j.getSeconds()},k=B;return Object.keys(P).forEach(function(U){var rt=P[U];k=k.replace(U,U==="YYYY"?"".concat(rt):"".concat(rt).padStart(2,"0"))}),k}function it(j,B){return A(j).getTime()-A(B).getTime()}function G(j,B){var P=__read([A(j),A(B)],2),k=P[0],U=P[1];return k.getFullYear()!==U.getFullYear()?"year":k.getMonth()!==U.getMonth()?"month":k.getDay()!==U.getDay()?"day":k.getHours()!==U.getHours()?"hour":k.getMinutes()!==U.getMinutes()?"minute":"second"}function kt(j,B){var P=new Date(j),k={year:function(U){U.setMonth(0),U.setHours(0,0,0,0)},month:function(U){U.setDate(1),U.setHours(0,0,0,0)},day:function(U){return U.setHours(0,0,0,0)},hour:function(U){return U.setMinutes(0,0,0)},minute:function(U){return U.setSeconds(0,0)},second:function(U){return U.setMilliseconds(0)}};return k[B](P),F(P,L(["year",B]))}var gt=y(86314),Q=y(67756);function Rt(j,B){if(j.length<=B)return j;for(var P=Math.floor(j.length/B),k=[],U=0;U<j.length;U+=P)k.push(j[U]);return k}var Ct=y(38974),Ht=y(23343),de=y(58688),ue={gridGroup:"grid-group",mainGroup:"main-group",lineGroup:"line-group",tickGroup:"tick-group",labelGroup:"label-group",titleGroup:"title-group",grid:"grid",line:"line",lineFirst:"line-first",lineSecond:"line-second",tick:"tick",tickItem:"tick-item",label:"label",labelItem:"label-item",title:"title"},Te={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new z.y$({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},be=(0,Ht.Z)({},Te,{style:{type:"arc"}}),we=(0,Ht.Z)({},Te,{style:{}}),re=(0,de.A)({mainGroup:ue.mainGroup,gridGroup:ue.gridGroup,grid:ue.grid,lineGroup:ue.lineGroup,line:ue.line,tickGroup:ue.tickGroup,tick:ue.tick,tickItem:ue.tickItem,labelGroup:ue.labelGroup,label:ue.label,labelItem:ue.labelItem,titleGroup:ue.titleGroup,title:ue.title,lineFirst:ue.lineFirst,lineSecond:ue.lineSecond},"axis"),Ge=y(71018);function rn(j,B){return[j[0]*B,j[1]*B]}function Xe(j,B){return[j[0]+B[0],j[1]+B[1]]}function En(j,B){return[j[0]-B[0],j[1]-B[1]]}function Pn(j,B){return[Math.min(j[0],B[0]),Math.min(j[1],B[1])]}function tn(j,B){return[Math.max(j[0],B[0]),Math.max(j[1],B[1])]}function xn(j,B){return Math.sqrt(Math.pow(j[0]-B[0],2)+Math.pow(j[1]-B[1],2))}function It(j){if(j[0]===0&&j[1]===0)return[0,0];var B=Math.sqrt(Math.pow(j[0],2)+Math.pow(j[1],2));return[j[0]/B,j[1]/B]}function Ee(j,B,P){var k=__read(j,2),U=k[0],rt=k[1],ct=__read(B,2),lt=ct[0],mt=ct[1],Ft=U-lt,ae=rt-mt,me=Math.sin(P),Oe=Math.cos(P);return[Ft*Oe-ae*me+lt,Ft*me+ae*Oe+mt]}function fn(j,B){return B?[j[1],-j[0]]:[-j[1],j[0]]}function on(j){return j*Math.PI/180}function Pe(j){return Number((j*180/Math.PI).toPrecision(5))}var Ze=y(38242);function Ke(j,B){return j.style.opacity||(j.style.opacity=1),(0,gt.eR)(j,{opacity:0},B)}var le=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function Ae(j){return le.includes(j)}function Pt(j){var B={};for(var P in j)Ae(P)&&(B[P]=j[P]);return B}var wt=(0,de.A)({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function he(j){return j.reduce(function(B,P,k){return B.push((0,c.ev)([k===0?"M":"L"],(0,c.CR)(P),!1)),B},[])}function je(j,B,P){var k=B.connect,U=k===void 0?"line":k,rt=B.center;if(U==="line")return he(j);if(!rt)return[];var ct=xn(j[0],rt),lt=P?0:1;return j.reduce(function(mt,Ft,ae){return ae===0?mt.push((0,c.ev)(["M"],(0,c.CR)(Ft),!1)):mt.push((0,c.ev)(["A",ct,ct,0,0,lt],(0,c.CR)(Ft),!1)),mt},[])}function Re(j,B,P){return B.type==="surround"?je(j,B,P):he(j)}function ce(j,B,P){var k=P.type,U=P.connect,rt=P.center,ct=P.closed,lt=ct?[["Z"]]:[],mt=(0,c.CR)([Re(j,P),Re(B.slice().reverse(),P,!0)],2),Ft=mt[0],ae=mt[1],me=(0,c.CR)([j[0],B.slice(-1)[0]],2),Oe=me[0],_e=me[1],Ye=function(Bn,Fn){return[Ft,Bn,ae,Fn,lt].flat()};if(U==="line"||k==="surround")return Ye([(0,c.ev)(["L"],(0,c.CR)(_e),!1)],[(0,c.ev)(["L"],(0,c.CR)(Oe),!1)]);if(!rt)throw new Error("Arc grid need to specified center");var mn=(0,c.CR)([xn(_e,rt),xn(Oe,rt)],2),bn=mn[0],Cn=mn[1];return Ye([(0,c.ev)(["A",bn,bn,0,0,1],(0,c.CR)(_e),!1),(0,c.ev)(["L"],(0,c.CR)(_e),!1)],[(0,c.ev)(["A",Cn,Cn,0,0,0],(0,c.CR)(Oe),!1),(0,c.ev)(["L"],(0,c.CR)(Oe),!1)])}function Le(j,B,P,k){var U=P.animate,rt=P.isBillboard,ct=B.map(function(lt,mt){return{id:lt.id||"grid-line-".concat(mt),d:Re(lt.points,P)}});return j.selectAll(wt.line.class).data(ct,function(lt){return lt.id}).join(function(lt){return lt.append("path").each(function(mt,Ft){var ae=(0,Ze.S)(Pt((0,c.pi)({d:mt.d},k)),[mt,Ft,ct]);this.attr((0,c.pi)({class:wt.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:rt},ae))})},function(lt){return lt.transition(function(mt,Ft){var ae=(0,Ze.S)(Pt((0,c.pi)({d:mt.d},k)),[mt,Ft,ct]);return(0,gt.eR)(this,ae,U.update)})},function(lt){return lt.transition(function(){var mt=this,Ft=Ke(this,U.exit);return(0,gt.Yq)(Ft,function(){return mt.remove()}),Ft})}).transitions()}function xe(j,B,P){var k=P.animate,U=P.connect,rt=P.areaFill;if(B.length<2||!rt||!U)return[];for(var ct=Array.isArray(rt)?rt:[rt,"transparent"],lt=function(Ye){return ct[Ye%ct.length]},mt=[],Ft=0;Ft<B.length-1;Ft++){var ae=(0,c.CR)([B[Ft].points,B[Ft+1].points],2),me=ae[0],Oe=ae[1],_e=ce(me,Oe,P);mt.push({d:_e,fill:lt(Ft)})}return j.selectAll(wt.region.class).data(mt,function(Ye,mn){return mn}).join(function(Ye){return Ye.append("path").each(function(mn,bn){var Cn=(0,Ze.S)(mn,[mn,bn,mt]);this.attr(Cn)}).attr("className",wt.region.name)},function(Ye){return Ye.transition(function(mn,bn){var Cn=(0,Ze.S)(mn,[mn,bn,mt]);return(0,gt.eR)(this,Cn,k.update)})},function(Ye){return Ye.transition(function(){var mn=this,bn=Ke(this,k.exit);return(0,gt.Yq)(bn,function(){return mn.remove()}),bn})}).transitions()}function _t(j){var B=j.data,P=B===void 0?[]:B,k=j.closed;return k?P.map(function(U){var rt=U.points,ct=(0,c.CR)(rt,1),lt=ct[0];return(0,c.pi)((0,c.pi)({},U),{points:(0,c.ev)((0,c.ev)([],(0,c.CR)(rt),!1),[lt],!1)})}):P}var ie=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return B.prototype.render=function(P,k){var U=P.type,rt=P.center,ct=P.areaFill,lt=P.closed,mt=(0,c._T)(P,["type","center","areaFill","closed"]),Ft=_t(P),ae=(0,Ct.Ys)(k).maybeAppendByClassName(wt.lineGroup,"g"),me=(0,Ct.Ys)(k).maybeAppendByClassName(wt.regionGroup,"g"),Oe=Le(ae,Ft,P,mt),_e=xe(me,Ft,P);return(0,c.ev)((0,c.ev)([],(0,c.CR)(Oe),!1),(0,c.CR)(_e),!1)},B}(I.w),Me=y(5759),T=function(j,B){return function(P){return j*(1-P)+B*P}};function at(j,B){var P=B?B.length:0,k=j?Math.min(P,j.length):0;return function(U){var rt=new Array(k),ct=new Array(P),lt=0;for(lt=0;lt<k;++lt)rt[lt]=Jt(j[lt],B[lt]);for(;lt<P;++lt)ct[lt]=B[lt];for(lt=0;lt<k;++lt)ct[lt]=rt[lt](U);return ct}}function fe(j,B){j===void 0&&(j={}),B===void 0&&(B={});var P={},k={};return Object.entries(B).forEach(function(U){var rt=(0,c.CR)(U,2),ct=rt[0],lt=rt[1];ct in j?P[ct]=Jt(j[ct],lt):k[ct]=lt}),function(U){return Object.entries(P).forEach(function(rt){var ct=(0,c.CR)(rt,2),lt=ct[0],mt=ct[1];return k[lt]=mt(U)}),k}}function Jt(j,B){return typeof j=="number"&&typeof B=="number"?T(j,B):Array.isArray(j)&&Array.isArray(B)?at(j,B):typeof j=="object"&&typeof B=="object"?fe(j,B):function(P){return j}}function Ie(j,B,P,k){if(!k)return j.attr("__keyframe_data__",P),null;var U=k.duration,rt=U===void 0?0:U,ct=Jt(B,P),lt=Math.ceil(+rt/16),mt=new Array(lt).fill(0).map(function(Ft,ae,me){return{__keyframe_data__:ct(ae/(me.length-1))}});return j.animate(mt,(0,c.pi)({fill:"both"},k))}var Ne=y(88170),en=y(99769);function St(j,B){var P={},k=Array.isArray(B)?B:[B];for(var U in j)k.includes(U)||(P[U]=j[U]);return P}function tt(j,B){return Object.fromEntries(Object.entries(j).map(function(P){var k=(0,c.CR)(P,2),U=k[0],rt=k[1];return[U,(0,Ze.S)(rt,B)]}))}function Nt(j){if(j.type==="linear"){var B=j.startPos,P=j.endPos;return __spreadArray(__spreadArray([],__read(B),!1),__read(P),!1)}var k=j.startAngle,U=j.endAngle,rt=j.center,ct=j.radius;return __spreadArray(__spreadArray([k,U],__read(rt),!1),[ct],!1)}function Xt(j,B){return B&&(0,Ge.Z)(B)?j.filter(B):j}function Lt(j,B){var P=B.startAngle,k=B.endAngle;return(k-P)*j+P}function Zt(j,B){if(B.type==="linear"){var P=(0,c.CR)(B.startPos,2),k=P[0],U=P[1],rt=(0,c.CR)(B.endPos,2),ct=rt[0],lt=rt[1],mt=(0,c.CR)([ct-k,lt-U],2),Ft=mt[0],ae=mt[1];return It([Ft,ae])}var me=on(Lt(j,B));return[-Math.sin(me),Math.cos(me)]}function Ut(j,B,P){var k=Zt(j,P);return fn(k,B!=="positive")}function qt(j,B){return Ut(j,B.labelDirection,B)}function se(j,B,P){return P?"".concat(j," ").concat(P,"axis-").concat(B):j}function te(j,B,P){var k=j.classNamePrefix,U=k===void 0?"":k;return se(B.name,P,U)}function ke(j,B,P,k){return k&&j.attr("className",se(B.name,P,k)),j}function He(j,B){var P=(0,c.CR)(B.startPos,2),k=P[0],U=P[1],rt=(0,c.CR)(B.endPos,2),ct=rt[0],lt=rt[1],mt=(0,c.CR)([ct-k,lt-U],2),Ft=mt[0],ae=mt[1];return[k+Ft*j,U+ae*j]}function Ve(j,B){var P=B.radius,k=(0,c.CR)(B.center,2),U=k[0],rt=k[1],ct=on(Lt(j,B));return[U+P*Math.cos(ct),rt+P*Math.sin(ct)]}function ln(j,B){return B.type==="linear"?He(j,B):Ve(j,B)}function On(j){return Zt(0,j)[1]===0}function yn(j){return Zt(0,j)[0]===0}function lr(j,B){return B-j===360}function Zn(j,B,P,k,U){var rt=B-j,ct=(0,c.CR)([U,U],2),lt=ct[0],mt=ct[1],Ft=(0,c.CR)([on(j),on(B)],2),ae=Ft[0],me=Ft[1],Oe=function(li){return[P+U*Math.cos(li),k+U*Math.sin(li)]},_e=(0,c.CR)(Oe(ae),2),Ye=_e[0],mn=_e[1],bn=(0,c.CR)(Oe(me),2),Cn=bn[0],Bn=bn[1];if(lr(j,B)){var Fn=(me+ae)/2,Qn=(0,c.CR)(Oe(Fn),2),Vn=Qn[0],ir=Qn[1];return[["M",Ye,mn],["A",lt,mt,0,1,0,Vn,ir],["A",lt,mt,0,1,0,Cn,Bn]]}var or=rt>180?1:0,pr=j>B?0:1,Dr=!1;return Dr?"M".concat(P,",").concat(k,",L").concat(Ye,",").concat(mn,",A").concat(lt,",").concat(mt,",0,").concat(or,",").concat(pr,",").concat(Cn,",").concat(Bn,",L").concat(P,",").concat(k):"M".concat(Ye,",").concat(mn,",A").concat(lt,",").concat(mt,",0,").concat(or,",").concat(pr,",").concat(Cn,",").concat(Bn)}function Yn(j){var B=j.attributes,P=B.startAngle,k=B.endAngle,U=B.center,rt=B.radius;return(0,c.ev)((0,c.ev)([P,k],(0,c.CR)(U),!1),[rt],!1)}function ye(j,B,P,k){var U=B.startAngle,rt=B.endAngle,ct=B.center,lt=B.radius,mt=B.classNamePrefix;return j.selectAll(re.line.class).data([{d:Zn.apply(void 0,(0,c.ev)((0,c.ev)([U,rt],(0,c.CR)(ct),!1),[lt],!1))}],function(Ft,ae){return ae}).join(function(Ft){var ae=Ft.append("path").attr("className",re.line.name).styles(B).styles({d:function(me){return me.d}});return ke(ae,re.line,ue.line,mt),ae},function(Ft){return Ft.transition(function(){var ae=this,me=Ie(this,Yn(this),(0,c.ev)((0,c.ev)([U,rt],(0,c.CR)(ct),!1),[lt],!1),k.update);if(me){var Oe=function(){var _e=(0,Me.Z)(ae.attributes,"__keyframe_data__");ae.style.d=Zn.apply(void 0,(0,c.ev)([],(0,c.CR)(_e),!1))};me.onframe=Oe,me.onfinish=Oe}return me}).styles(B)},function(Ft){return Ft.remove()}).styles(P).transitions()}function xr(j,B){var P=B.truncRange,k=B.truncShape,U=B.lineExtension}function Hn(j,B,P){P===void 0&&(P=[0,0]);var k=(0,c.CR)([j,B,P],3),U=(0,c.CR)(k[0],2),rt=U[0],ct=U[1],lt=(0,c.CR)(k[1],2),mt=lt[0],Ft=lt[1],ae=(0,c.CR)(k[2],2),me=ae[0],Oe=ae[1],_e=(0,c.CR)([mt-rt,Ft-ct],2),Ye=_e[0],mn=_e[1],bn=Math.sqrt(Math.pow(Ye,2)+Math.pow(mn,2)),Cn=(0,c.CR)([-me/bn,Oe/bn],2),Bn=Cn[0],Fn=Cn[1];return[Bn*Ye,Bn*mn,Fn*Ye,Fn*mn]}function Br(j){var B=(0,c.CR)(j,2),P=(0,c.CR)(B[0],2),k=P[0],U=P[1],rt=(0,c.CR)(B[1],2),ct=rt[0],lt=rt[1];return{x1:k,y1:U,x2:ct,y2:lt}}function Ar(j,B,P,k){var U=B.showTrunc,rt=B.startPos,ct=B.endPos,lt=B.truncRange,mt=B.lineExtension,Ft=B.classNamePrefix,ae=(0,c.CR)([rt,ct],2),me=(0,c.CR)(ae[0],2),Oe=me[0],_e=me[1],Ye=(0,c.CR)(ae[1],2),mn=Ye[0],bn=Ye[1],Cn=(0,c.CR)(mt?Hn(rt,ct,mt):new Array(4).fill(0),4),Bn=Cn[0],Fn=Cn[1],Qn=Cn[2],Vn=Cn[3],ir=function(oi){return j.selectAll(re.line.class).data(oi,function(ii,yi){return yi}).join(function(ii){var yi=ii.append("line").styles(P).transition(function(ni){return(0,gt.eR)(this,Br(ni.line),!1)});return yi.attr("className",function(ni){if(!Ft)return"".concat(re.line.name," ").concat(ni.className);var ai=se(re.line.name,ue.line,Ft);if(ni.className===re.lineFirst.name){var Mi=se(re.lineFirst.name,ue.lineFirst,Ft);return"".concat(ai," ").concat(Mi)}if(ni.className===re.lineSecond.name){var Mi=se(re.lineSecond.name,ue.lineSecond,Ft);return"".concat(ai," ").concat(Mi)}return ai}),yi},function(ii){return ii.styles(P).transition(function(yi){var ni=yi.line;return(0,gt.eR)(this,Br(ni),k.update)})},function(ii){return ii.remove()}).transitions()};if(!U||!lt)return ir([{line:[[Oe+Bn,_e+Fn],[mn+Qn,bn+Vn]],className:re.line.name}]);var or=(0,c.CR)(lt,2),pr=or[0],Dr=or[1],li=mn-Oe,ui=bn-_e,Hr=(0,c.CR)([Oe+li*pr,_e+ui*pr],2),wr=Hr[0],Gr=Hr[1],Tr=(0,c.CR)([Oe+li*Dr,_e+ui*Dr],2),Xr=Tr[0],bi=Tr[1],Sr=ir([{line:[[Oe+Bn,_e+Fn],[wr,Gr]],className:re.lineFirst.name},{line:[[Xr,bi],[mn+Qn,bn+Vn]],className:re.lineSecond.name}]);return xr(j,B),Sr}function ri(j,B,P,k){var U=P.showArrow,rt=P.showTrunc,ct=P.lineArrow,lt=P.lineArrowOffset,mt=P.lineArrowSize,Ft;if(B==="arc"?Ft=j.select(re.line.class):rt?Ft=j.select(re.lineSecond.class):Ft=j.select(re.line.class),!U||!ct||P.type==="arc"&&lr(P.startAngle,P.endAngle)){var ae=Ft.node();ae&&(ae.style.markerEnd=void 0);return}var me=(0,Ne.S)(ct);me.attr(k),(0,en.b)(me,mt,!0),Ft.style("markerEnd",me).style("markerEndOffset",-lt)}function mi(j,B,P){var k=B.type,U,rt=(0,w.zs)(B,"line");return k==="linear"?U=Ar(j,B,St(rt,"arrow"),P):U=ye(j,B,St(rt,"arrow"),P),ri(j,k,B,rt),U}function si(j,B){return Ut(j,B.gridDirection,B)}function Jr(j){var B=j.type,P=j.gridCenter;return B==="linear"?P:P||j.center}function _i(j,B){var P=B.gridLength;return j.map(function(k,U){var rt=k.value,ct=(0,c.CR)(ln(rt,B),2),lt=ct[0],mt=ct[1],Ft=(0,c.CR)(rn(si(rt,B),P),2),ae=Ft[0],me=Ft[1];return{id:U,points:[[lt,mt],[lt+ae,mt+me]]}})}function Yi(j,B){var P=B.gridControlAngles,k=Jr(B);if(!k)throw new Error("grid center is not provide");if(j.length<2)throw new Error("Invalid grid data");if(!P||P.length===0)throw new Error("Invalid gridControlAngles");var U=(0,c.CR)(k,2),rt=U[0],ct=U[1];return j.map(function(lt,mt){var Ft=lt.value,ae=(0,c.CR)(ln(Ft,B),2),me=ae[0],Oe=ae[1],_e=(0,c.CR)([me-rt,Oe-ct],2),Ye=_e[0],mn=_e[1],bn=[];return P.forEach(function(Cn){var Bn=on(Cn),Fn=(0,c.CR)([Math.cos(Bn),Math.sin(Bn)],2),Qn=Fn[0],Vn=Fn[1],ir=Ye*Qn-mn*Vn+rt,or=Ye*Vn+mn*Qn+ct;bn.push([ir,or])}),{points:bn,id:mt}})}function Ei(j,B,P,k){var U=P.classNamePrefix,rt=(0,w.zs)(P,"grid"),ct=rt.type,lt=rt.areaFill,mt=Jr(P),Ft=Xt(B,P.gridFilter),ae=ct==="segment"?_i(Ft,P):Yi(Ft,P),me=(0,c.pi)((0,c.pi)({},rt),{center:mt,areaFill:(0,Ge.Z)(lt)?Ft.map(function(Oe,_e){return(0,Ze.S)(lt,[Oe,_e,Ft])}):lt,animate:k,data:ae});return j.selectAll(re.grid.class).data([1]).join(function(Oe){var _e=Oe.append(function(){return new ie({style:me})}).attr("className",re.grid.name);return ke(_e,re.grid,ue.grid,U),_e},function(Oe){return Oe.transition(function(){return this.update(me)})},function(Oe){return Oe.remove()}).transitions()}function ti(j,B,P,k,U){return k===void 0&&(k=!0),U===void 0&&(U=!1),k&&j===B||U&&j===P?!0:j>B&&j<P}var xa=function(j){var B=new DOMParser,P=B.parseFromString(j,"text/html"),k=P.body.firstElementChild;if(console.log(k==null?void 0:k.getClientRects(),11),!k)return 0;var U=k.getAttribute("style")||"",rt=Object.fromEntries(U.split(";").map(function(bn){return bn.trim()}).filter(function(bn){return bn.includes(":")}).map(function(bn){var Cn=(0,c.CR)(bn.split(":").map(function(Qn){return Qn.trim()}),2),Bn=Cn[0],Fn=Cn[1];return[Bn.toLowerCase(),Fn]})),ct=function(bn){if(!bn)return 0;var Cn=bn.match(/([\d.]+)px/);return Cn?parseFloat(Cn[1]):0};if(rt.height)return ct(rt.height);var lt=ct(rt["font-size"])||16,mt=rt["line-height"],Ft;!mt||mt==="normal"?Ft=1.2*lt:mt.endsWith("px")?Ft=ct(mt):/^[\d.]+$/.test(mt)?Ft=parseFloat(mt)*lt:Ft=lt;var ae=ct(rt["padding-top"]),me=ct(rt["padding-bottom"]);if(rt.padding){var Oe=rt.padding.split(/\s+/).map(ct);Oe.length===1||Oe.length===2?(ae=Oe[0],me=Oe[0]):(Oe.length===3||Oe.length===4)&&(ae=Oe[0],me=Oe[2])}var _e=ct(rt["border-top-width"]),Ye=ct(rt["border-bottom-width"]);if(rt.border){var mn=rt.border.match(/([\d.]+)px/);mn&&(_e=parseFloat(mn[1]),Ye=parseFloat(mn[1]))}if(rt["border-width"]){var Oe=rt["border-width"].split(/\s+/).map(ct);Oe.length===1||Oe.length===2?(_e=Oe[0],Ye=Oe[0]):(Oe.length===3||Oe.length===4)&&(_e=Oe[0],Ye=Oe[2])}return Ft+ae+me+_e+Ye},Di=y(69014),ft=y(53160),b=y(58533);function E(j,B,P,k){P===void 0&&(P=2),k===void 0&&(k="top"),(0,b.Rm)(j,{wordWrap:!0,wordWrapWidth:B,maxLines:P,textBaseline:k})}function h(j,B,P){var k=j.getBBox(),U=k.width,rt=k.height,ct=(0,c.CR)([B,P].map(function(Ft,ae){var me;return Ft.includes("%")?parseFloat(((me=Ft.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||me===void 0?void 0:me[0])||"0")/100*(ae===0?U:rt):Ft}),2),lt=ct[0],mt=ct[1];return[lt,mt]}function g(j,B){if(B)try{var P=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,k=B.replace(P,function(U,rt,ct){return"translate(".concat(h(j,rt,ct),")")});j.attr("transform",k)}catch(U){}}var M=y(16915),Y=y(76075),J=y(98294),ot=function(){function j(B,P,k,U){this.set(B,P,k,U)}return Object.defineProperty(j.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),j.prototype.rotatedPoints=function(B,P,k){var U=this,rt=U.x1,ct=U.y1,lt=U.x2,mt=U.y2,Ft=Math.cos(B),ae=Math.sin(B),me=P-P*Ft+k*ae,Oe=k-P*ae-k*Ft,_e=[[Ft*rt-ae*mt+me,ae*rt+Ft*mt+Oe],[Ft*lt-ae*mt+me,ae*lt+Ft*mt+Oe],[Ft*rt-ae*ct+me,ae*rt+Ft*ct+Oe],[Ft*lt-ae*ct+me,ae*lt+Ft*ct+Oe]];return _e},j.prototype.set=function(B,P,k,U){return k<B?(this.x2=B,this.x1=k):(this.x1=B,this.x2=k),U<P?(this.y2=P,this.y1=U):(this.y1=P,this.y2=U),this},j.prototype.defined=function(B){return this[B]!==Number.MAX_VALUE&&this[B]!==-Number.MAX_VALUE},j}();function vt(j,B){var P=j.getEulerAngles()||0;j.setEulerAngles(0);var k=j.getBounds(),U=(0,c.CR)(k.min,2),rt=U[0],ct=U[1],lt=(0,c.CR)(k.max,2),mt=lt[0],Ft=lt[1],ae=j.getBBox(),me=ae.width,Oe=ae.height,_e=Oe,Ye=0,mn=0,bn=rt,Cn=ct,Bn=(0,b.U4)(j);if(Bn){_e-=1.5;var Fn=Bn.style.textAlign,Qn=Bn.style.textBaseline;Fn==="center"?bn=(rt+mt)/2:(Fn==="right"||Fn==="end")&&(bn=mt),Qn==="middle"?Cn=(ct+Ft)/2:Qn==="bottom"&&(Cn=Ft)}var Vn=(0,c.CR)((0,J.j)(B),4),ir=Vn[0],or=ir===void 0?0:ir,pr=Vn[1],Dr=pr===void 0?0:pr,li=Vn[2],ui=li===void 0?or:li,Hr=Vn[3],wr=Hr===void 0?Dr:Hr,Gr=new ot((Ye+=rt)-wr,(mn+=ct)-or,Ye+me+Dr,mn+_e+ui);return j.setEulerAngles(P),Gr.rotatedPoints(on(P),bn,Cn)}function zt(j,B){return B[0]<=Math.max(j[0][0],j[1][0])&&B[0]<=Math.min(j[0][0],j[1][0])&&B[1]<=Math.max(j[0][1],j[1][1])&&B[1]<=Math.min(j[0][1],j[1][1])}function q(j,B,P){var k=(B[1]-j[1])*(P[0]-B[0])-(B[0]-j[0])*(P[1]-B[1]);return k===0?0:k<0?2:1}function $(j,B){var P=q(j[0],j[1],B[0]),k=q(j[0],j[1],B[1]),U=q(B[0],B[1],j[0]),rt=q(B[0],B[1],j[1]);return!!(P!==k&&U!==rt||P===0&&zt(j,B[0])||k===0&&zt(j,B[1])||U===0&&zt(B,j[0])||rt===0&&zt(B,j[1]))}function H(j,B){var P=j.length;if(P<3)return!1;var k=[B,[9999,B[1]]],U=0,rt=0;do{var ct=[j[rt],j[(rt+1)%P]];if($(ct,k)){if(q(ct[0],B,ct[1])===0)return zt(ct,B);U++}rt=(rt+1)%P}while(rt!==0);return!!(U&1)}function nt(j,B){return B.every(function(P){return H(j,P)})}function Mt(j,B,P){var k=j.x1,U=j.x2,rt=j.y1,ct=j.y2,lt=[[k,rt],[U,rt],[U,ct],[k,ct]],mt=vt(B,P);return nt(lt,mt)}function Wt(j,B){var P=(0,c.CR)(j,4),k=P[0],U=P[1],rt=P[2],ct=P[3],lt=(0,c.CR)(B,4),mt=lt[0],Ft=lt[1],ae=lt[2],me=lt[3],Oe=rt-k,_e=ct-U,Ye=ae-mt,mn=me-Ft,bn=Oe*mn-Ye*_e;if(bn===0)return!1;var Cn=bn>0,Bn=k-mt,Fn=U-Ft,Qn=Oe*Fn-_e*Bn;if(Qn<0===Cn)return!1;var Vn=Ye*Fn-mn*Bn;return!(Vn<0===Cn||Qn>bn===Cn||Vn>bn===Cn)}function Tt(j,B){var P=[[j[0],j[1],j[2],j[3]],[j[2],j[3],j[4],j[5]],[j[4],j[5],j[6],j[7]],[j[6],j[7],j[0],j[1]]];return P.some(function(k){return Wt(B,k)})}var Kt={lineToLine:Wt,intersectBoxLine:Tt,getBounds:vt};function bt(j,B,P){var k,U,rt=vt(j,P).flat(1),ct=vt(B,P).flat(1),lt=[[rt[0],rt[1],rt[2],rt[3]],[rt[0],rt[1],rt[4],rt[5]],[rt[4],rt[5],rt[6],rt[7]],[rt[2],rt[3],rt[6],rt[7]]];try{for(var mt=(0,c.XA)(lt),Ft=mt.next();!Ft.done;Ft=mt.next()){var ae=Ft.value;if(Tt(ct,ae))return!0}}catch(me){k={error:me}}finally{try{Ft&&!Ft.done&&(U=mt.return)&&U.call(mt)}finally{if(k)throw k.error}}return!1}function pt(j,B){var P=j.type,k=j.labelDirection,U=j.crossSize;if(!U)return!1;if(P==="arc"){var rt=j.center,ct=j.radius,lt=(0,c.CR)(rt,2),mt=lt[0],Ft=lt[1],ae=k==="negative"?0:U,me=-ct-ae,Oe=ct+ae,_e=(0,c.CR)((0,J.j)(B),4),Ye=_e[0],mn=_e[1],bn=_e[2],Cn=_e[3];return new ot(mt+me-Cn,Ft+me-Ye,mt+Oe+mn,Ft+Oe+bn)}var Bn=(0,c.CR)(j.startPos,2),Fn=Bn[0],Qn=Bn[1],Vn=(0,c.CR)(j.endPos,2),ir=Vn[0],or=Vn[1],pr=(0,c.CR)(yn(j)?[-B,0,B,0]:[0,B,0,-B],4),Dr=pr[0],li=pr[1],ui=pr[2],Hr=pr[3],wr=qt(0,j),Gr=rn(wr,U),Tr=new ot(Fn,Qn,ir,or);return Tr.x1+=Hr,Tr.y1+=Dr,Tr.x2+=li+Gr[0],Tr.y2+=ui+Gr[1],Tr}function ut(j,B,P){var k,U,rt=B.crossPadding,ct=new Set,lt=null,mt=pt(B,rt),Ft=function(Ye){return mt?Mt(mt,Ye):!0},ae=function(Ye,mn){return!Ye||!Ye.firstChild?!0:!bt(Ye.firstChild,mn.firstChild,(0,J.j)(P))};try{for(var me=(0,c.XA)(j),Oe=me.next();!Oe.done;Oe=me.next()){var _e=Oe.value;Ft(_e)?!lt||ae(lt,_e)?lt=_e:(ct.add(lt),ct.add(_e)):ct.add(_e)}}catch(Ye){k={error:Ye}}finally{try{Oe&&!Oe.done&&(U=me.return)&&U.call(me)}finally{if(k)throw k.error}}return Array.from(ct)}function Gt(j,B){return B===void 0&&(B={}),(0,Y.Z)(j)?0:typeof j=="number"?j:Math.floor((0,b.Ux)(j,B))}function Vt(j,B,P,k){if(!(j.length<=0)){var U=B.suffix,rt=U===void 0?"...":U,ct=B.minLength,lt=B.maxLength,mt=lt===void 0?1/0:lt,Ft=B.step,ae=Ft===void 0?" ":Ft,me=B.margin,Oe=me===void 0?[0,0,0,0]:me,_e=(0,b.qT)(k.getTextShape(j[0])),Ye=Gt(ae,_e),mn=ct?Gt(ct,_e):Ye,bn=Gt(mt,_e);((0,Y.Z)(bn)||bn===1/0)&&(bn=Math.max.apply(null,j.map(function(Gr){return Gr.getBBox().width})));for(var Cn=j.slice(),Bn=(0,c.CR)(Oe,4),Fn=Bn[0],Qn=Fn===void 0?0:Fn,Vn=Bn[1],ir=Vn===void 0?0:Vn,or=Bn[2],pr=or===void 0?Qn:or,Dr=Bn[3],li=Dr===void 0?ir:Dr,ui=function(Gr){if(Cn.forEach(function(Tr){k.ellipsis(k.getTextShape(Tr),Gr,rt)}),Cn=ut(j,P,Oe),Cn.length<1)return{value:void 0}},Hr=bn;Hr>mn+Ye;Hr-=Ye){var wr=ui(Hr);if(typeof wr=="object")return wr.value}}}var ve=function(j){return j!==void 0&&j!=null&&!Number.isNaN(j)},ge=y(2080),Yt={parity:function(j,B){var P=B.seq,k=P===void 0?2:P;return j.filter(function(U,rt){return rt%k?((0,Di.Cp)(U),!1):!0})}},Ce=function(j){return j.filter(ve)};function qe(j,B,P,k){var U=j.length,rt=B.keepHeader,ct=B.keepTail;if(!(U<=1||U===2&&rt&&ct)){var lt=Yt.parity,mt=function(Fn){return Fn.forEach(k.show),Fn},Ft=2,ae=j.slice(),me=j.slice(),Oe=Math.min.apply(Math,(0,c.ev)([1],(0,c.CR)(j.map(function(Fn){return Fn.getBBox().width})),!1));if(P.type==="linear"&&(On(P)||yn(P))){var _e=(0,ge._v)(j[0]).left,Ye=(0,ge._v)(j[U-1]).right,mn=Math.abs(Ye-_e)||1;Ft=Math.max(Math.floor(U*Oe/mn),Ft)}var bn,Cn;for(rt&&(bn=ae.splice(0,1)[0]),ct&&(Cn=ae.splice(-1,1)[0],ae.reverse()),mt(ae);Ft<j.length&&ut(Ce(Cn?(0,c.ev)((0,c.ev)([Cn],(0,c.CR)(me),!1),[bn],!1):(0,c.ev)([bn],(0,c.CR)(me),!1)),P,B==null?void 0:B.margin).length;){if(Cn&&!bn&&Ft%2===0){var Bn=ae.splice(0,1);Bn.forEach(k.hide)}else if(Cn&&bn){var Bn=ae.splice(0,1);Bn.forEach(k.hide)}me=lt(mt(ae),{seq:Ft}),Ft++}}}function Qe(j,B,P,k){var U,rt,ct=B.optionalAngles,lt=ct===void 0?[0,45,90]:ct,mt=B.margin,Ft=B.recoverWhenFailed,ae=Ft===void 0?!0:Ft,me=j.map(function(Cn){return Cn.getLocalEulerAngles()}),Oe=function(){return ut(j,P,mt).length<1},_e=function(Cn){return j.forEach(function(Bn,Fn){var Qn=Array.isArray(Cn)?Cn[Fn]:Cn;k.rotate(Bn,+Qn)})};try{for(var Ye=(0,c.XA)(lt),mn=Ye.next();!mn.done;mn=Ye.next()){var bn=mn.value;if(_e(bn),Oe())return}}catch(Cn){U={error:Cn}}finally{try{mn&&!mn.done&&(rt=Ye.return)&&rt.call(Ye)}finally{if(U)throw U.error}}ae&&_e(me)}function Nn(j){var B=j.type,P=j.labelDirection;return B==="linear"&&On(j)?P==="negative"?"bottom":"top":"middle"}function Dn(j,B,P,k,U){var rt,ct=B.maxLines,lt=ct===void 0?3:ct,mt=B.recoverWhenFailed,Ft=mt===void 0?!0:mt,ae=B.margin,me=ae===void 0?[0,0,0,0]:ae,Oe=(0,Ze.S)((rt=B.wordWrapWidth)!==null&&rt!==void 0?rt:50,[U]),_e=j.map(function(Fn){return Fn.attr("maxLines")||1}),Ye=Math.min.apply(Math,(0,c.ev)([],(0,c.CR)(_e),!1)),mn=function(){return ut(j,P,me).length<1},bn=Nn(P),Cn=function(Fn){return j.forEach(function(Qn,Vn){var ir=Array.isArray(Fn)?Fn[Vn]:Fn;k.wrap(Qn,Oe,ir,bn)})};if(!(Ye>lt)){if(P.type==="linear"&&On(P)){if(Cn(lt),mn())return}else for(var Bn=Ye;Bn<=lt;Bn++)if(Cn(Bn),mn())return;Ft&&Cn(_e)}}var Rn=new Map([["hide",qe],["rotate",Qe],["ellipsis",Vt],["wrap",Dn]]);function Xn(j,B,P){return B.labelOverlap.length<1?!1:P==="hide"?!(0,M.X)(j[0]):P==="rotate"?!j.some(function(k){var U;return!!(!((U=k.attr("transform"))===null||U===void 0)&&U.includes("rotate"))}):P==="ellipsis"||P==="wrap"?j.filter(function(k){return k.querySelector("text")}).length>=1:!0}function tr(j,B,P,k){var U=B.labelOverlap,rt=U===void 0?[]:U;rt.length&&rt.forEach(function(ct){var lt=ct.type,mt=Rn.get(lt);Xn(j,B,lt)&&(mt==null||mt(j,ct,B,k,P))})}function Mr(){for(var j=[],B=0;B<arguments.length;B++)j[B]=arguments[B];var P=function(k){return k==="positive"?-1:1};return j.reduce(function(k,U){return k*P(U)},1)}function yr(j){for(var B=j;B<0;)B+=360;return Math.round(B%360)}function vr(j,B){var P=(0,c.CR)(j,2),k=P[0],U=P[1],rt=(0,c.CR)(B,2),ct=rt[0],lt=rt[1],mt=(0,c.CR)([k*ct+U*lt,k*lt-U*ct],2),Ft=mt[0],ae=mt[1];return Math.atan2(ae,Ft)}function Cr(j){var B=(j+360)%180;return ti(B,-90,90)||(B+=180),B}function ur(j,B,P){var k,U=P.labelAlign,rt=(k=B.style.transform)===null||k===void 0?void 0:k.includes("rotate");if(rt)return B.getLocalEulerAngles();var ct=0,lt=qt(j.value,P),mt=Zt(j.value,P);return U==="horizontal"?0:(U==="perpendicular"?ct=vr([1,0],lt):ct=vr([mt[0]<0?-1:1,0],mt),Cr(Pe(ct)))}function Kn(j,B,P){var k=P.type,U=P.labelAlign,rt=qt(j,P),ct=yr(B),lt=yr(Pe(vr([1,0],rt))),mt="center",Ft="middle";return k==="linear"?[90,270].includes(lt)&&ct===0?(mt="center",Ft=rt[1]===1?"top":"bottom"):!(lt%180)&&[90,270].includes(ct)?mt="center":lt===0?(ti(ct,0,90,!1,!0)||ti(ct,0,90)||ti(ct,270,360))&&(mt="start"):lt===90?ti(ct,0,90,!1,!0)?mt="start":(ti(ct,90,180)||ti(ct,270,360))&&(mt="end"):lt===270?ti(ct,0,90,!1,!0)?mt="end":(ti(ct,90,180)||ti(ct,270,360))&&(mt="start"):lt===180&&(ct===90?mt="start":(ti(ct,0,90)||ti(ct,270,360))&&(mt="end")):U==="parallel"?ti(lt,0,180,!0)?Ft="top":Ft="bottom":U==="horizontal"?ti(lt,90,270,!1)?mt="end":(ti(lt,270,360,!1)||ti(lt,0,90))&&(mt="start"):U==="perpendicular"&&(ti(lt,90,270)?mt="end":mt="start"),{textAlign:mt,textBaseline:Ft}}function Ur(j,B,P){B.setLocalEulerAngles(j);var k=B.__data__.value,U=Kn(k,j,P),rt=B.querySelector(re.labelItem.class);rt&&Lr(rt,U)}function Yr(j,B,P){var k=P.showTick,U=P.tickLength,rt=P.tickDirection,ct=P.labelDirection,lt=P.labelSpacing,mt=B.indexOf(j),Ft=(0,Ze.S)(lt,[j,mt,B]),ae=(0,c.CR)([qt(j.value,P),Mr(ct,rt)],2),me=ae[0],Oe=ae[1],_e=Oe===1?(0,Ze.S)(k?U:0,[j,mt,B]):0,Ye=(0,c.CR)(Xe(rn(me,Ft+_e),ln(j.value,P)),2),mn=Ye[0],bn=Ye[1];return{x:mn,y:bn}}function br(j,B,P,k){var U=k.labelFormatter,rt=(0,Ge.Z)(U)?function(){return(0,Ne.S)((0,Ze.S)(U,[j,B,P,qt(j.value,k)]))}:function(){return(0,Ne.S)(j.label||"")};return rt}function xi(j,B,P,k){var U=k.labelRender,rt=((0,Me.Z)(k,"endPos.0",400)-(0,Me.Z)(k,"startPos.0",0))/P.length,ct=(0,Ge.Z)(U)?(0,Ze.S)(U,[j,B,P,qt(j.value,k)]):j.label||"",lt=xa(ct)||30;return function(){return(0,Ne.$)(ct,{width:rt,height:lt})}}var di={html:["fill"],text:[]};function Lr(j,B){["text","html"].includes(j.nodeName)&&j.attr(St(B,di[j.nodeName]))}function Ci(j,B){tr(this.node().childNodes,j,B,{hide:Di.Cp,show:Di.$Z,rotate:function(P,k){Ur(+k,P,j)},ellipsis:function(P,k,U){P&&(0,ft.O)(P,k||1/0,U)},wrap:function(P,k,U){P&&E(P,k,U)},getTextShape:function(P){return P.querySelector(re.labelItem.class)}})}function fi(j,B,P,k,U){var rt=P.indexOf(B),ct=U.labelRender,lt=U.classNamePrefix,mt=(0,Ct.Ys)(j).append(ct?xi(B,rt,P,U):br(B,rt,P,U)).attr("className",re.labelItem.name).node();ke((0,Ct.Ys)(mt),re.labelItem,ue.labelItem,lt);var Ft=(0,c.CR)((0,w.Hm)(tt(k,[B,rt,P])),2),ae=Ft[0],me=Ft[1],Oe=me.transform,_e=(0,c._T)(me,["transform"]);g(mt,Oe);var Ye=ur(B,mt,U);if(mt.getLocalEulerAngles()||mt.setLocalEulerAngles(Ye),Lr(mt,(0,c.pi)((0,c.pi)({},Kn(B.value,Ye,U)),ae)),mt.nodeName==="html"){var mn=mt.getBBox(),bn=mt.style.x||0;mt.attr("x",bn-mn.width/2)}return j.attr(_e),mt}function Ni(j,B,P,k,U){var rt=P.classNamePrefix,ct=Xt(B,P.labelFilter),lt=(0,w.zs)(P,"label"),mt,Ft=j.selectAll(re.label.class).data(ct,function(ae,me){return me}).join(function(ae){var me=ae.append("g").attr("className",re.label.name).transition(function(Oe){fi(this,Oe,B,lt,P);var _e=Yr(Oe,B,P),Ye=_e.x,mn=_e.y;return this.style.transform="translate(".concat(Ye,", ").concat(mn,")"),null});return ke(me,re.label,ue.label,rt),me},function(ae){return ae.transition(function(me){var Oe=this.querySelector(re.labelItem.class),_e=fi(this,me,B,lt,P),Ye=(0,gt.tT)(Oe,_e,k.update),mn=Yr(me,B,P),bn=mn.x,Cn=mn.y,Bn=(0,gt.eR)(this,{transform:"translate(".concat(bn,", ").concat(Cn,")")},k.update);return(0,c.ev)((0,c.ev)([],(0,c.CR)(Ye),!1),[Bn],!1)})},function(ae){return mt=ae,ae.transition(function(){var me=this,Oe=Ke(this.childNodes[0],k.exit);return(0,gt.Yq)(Oe,function(){return(0,Ct.Ys)(me).remove()}),Oe}),mt}).transitions();return(0,gt.V7)(Ft,function(){Ci.call(j,P,U)}),Ft}function Ji(j,B){return Ut(j,B.tickDirection,B)}function Fa(j,B){var P=(0,c.CR)(j,2),k=P[0],U=P[1];return[[0,0],[k*B,U*B]]}function La(j,B,P,k,U){var rt=U.tickLength,ct=(0,c.CR)(Fa(k,(0,Ze.S)(rt,[j,B,P])),2),lt=(0,c.CR)(ct[0],2),mt=lt[0],Ft=lt[1],ae=(0,c.CR)(ct[1],2),me=ae[0],Oe=ae[1];return{x1:mt,x2:me,y1:Ft,y2:Oe}}function _a(j,B,P,k,U){var rt=U.tickFormatter,ct=U.classNamePrefix,lt=Ji(B.value,U),mt="line";(0,Ge.Z)(rt)&&(mt=function(){return(0,Ze.S)(rt,[B,P,k,lt])});var Ft=j.append(mt).attr("className",re.tickItem.name);return ke(Ft,re.tickItem,ue.tickItem,ct),Ft}function ta(j,B,P,k,U,rt,ct){var lt=Ji(j.value,rt),mt=La(j,B,P,lt,rt),Ft=mt.x1,ae=mt.x2,me=mt.y1,Oe=mt.y2,_e=(0,c.CR)((0,w.Hm)(tt(ct,[j,B,P,lt])),2),Ye=_e[0],mn=_e[1];k.node().nodeName==="line"&&k.styles((0,c.pi)({x1:Ft,x2:ae,y1:me,y2:Oe},Ye)),U.attr(mn),k.styles(Ye)}function pi(j,B,P,k,U,rt){var ct=_a((0,Ct.Ys)(this),j,B,P,k);ta(j,B,P,ct,this,k,U);var lt=(0,c.CR)(ln(j.value,k),2),mt=lt[0],Ft=lt[1];return(0,gt.eR)(this,{transform:"translate(".concat(mt,", ").concat(Ft,")")},rt)}function mo(j,B,P,k){var U=P.classNamePrefix,rt=Xt(B,P.tickFilter),ct=(0,w.zs)(P,"tick");return j.selectAll(re.tick.class).data(rt,function(lt){return lt.id||lt.label}).join(function(lt){var mt=lt.append("g").attr("className",re.tick.name).transition(function(Ft,ae){return pi.call(this,Ft,ae,rt,P,ct,!1)});return ke(mt,re.tick,ue.tick,U),mt},function(lt){return lt.transition(function(mt,Ft){return this.removeChildren(),pi.call(this,mt,Ft,rt,P,ct,k.update)})},function(lt){return lt.transition(function(){var mt=this,Ft=Ke(this.childNodes[0],k.exit);return(0,gt.Yq)(Ft,function(){return mt.remove()}),Ft})}).transitions()}var us=y(33253);function Bs(j,B,P){var k=P.titlePosition,U=k===void 0?"lb":k,rt=P.titleSpacing,ct=(0,us.l)(U),lt=j.node().getLocalBounds(),mt=(0,c.CR)(lt.min,2),Ft=mt[0],ae=mt[1],me=(0,c.CR)(lt.halfExtents,2),Oe=me[0],_e=me[1],Ye=(0,c.CR)(B.node().getLocalBounds().halfExtents,2),mn=Ye[0],bn=Ye[1],Cn=(0,c.CR)([Ft+Oe,ae+_e],2),Bn=Cn[0],Fn=Cn[1],Qn=(0,c.CR)((0,J.j)(rt),4),Vn=Qn[0],ir=Qn[1],or=Qn[2],pr=Qn[3];if(["start","end"].includes(U)&&P.type==="linear"){var Dr=P.startPos,li=P.endPos,ui=(0,c.CR)(U==="start"?[Dr,li]:[li,Dr],2),Hr=ui[0],wr=ui[1],Gr=It([-wr[0]+Hr[0],-wr[1]+Hr[1]]),Tr=(0,c.CR)(rn(Gr,Vn),2),Xr=Tr[0],bi=Tr[1];return{x:Hr[0]+Xr,y:Hr[1]+bi}}return ct.includes("t")&&(Fn-=_e+bn+Vn),ct.includes("r")&&(Bn+=Oe+mn+ir),ct.includes("l")&&(Bn-=Oe+mn+pr),ct.includes("b")&&(Fn+=_e+bn+or),{x:Bn,y:Fn}}function Fs(j,B,P){var k=j.getGeometryBounds().halfExtents,U=k[1]*2;if(B==="vertical"){if(P==="left")return"rotate(-90) translate(0, ".concat(U/2,")");if(P==="right")return"rotate(-90) translate(0, -".concat(U/2,")")}return""}function qn(j,B,P,k,U){var rt=(0,w.zs)(k,"title"),ct=(0,c.CR)((0,w.Hm)(rt),2),lt=ct[0],mt=ct[1],Ft=mt.transform,ae=mt.transformOrigin,me=(0,c._T)(mt,["transform","transformOrigin"]);B.styles(me);var Oe=Ft||Fs(j.node(),lt.direction,lt.position);j.styles((0,c.pi)((0,c.pi)({},lt),{transformOrigin:ae})),g(j.node(),Oe);var _e=Bs((0,Ct.Ys)(P._offscreen||P.querySelector(re.mainGroup.class)),B,k),Ye=_e.x,mn=_e.y,bn=(0,gt.eR)(B.node(),{transform:"translate(".concat(Ye,", ").concat(mn,")")},U);return bn}function Za(j,B,P,k){var U=P.titleText,rt=P.classNamePrefix;return j.selectAll(re.title.class).data([{title:U}].filter(function(ct){return!!ct.title}),function(ct,lt){return ct.title}).join(function(ct){var lt=ct.append(function(){return(0,Ne.S)(U)}).attr("className",re.title.name).transition(function(){return qn((0,Ct.Ys)(this),j,B,P,k.enter)});return ke(lt,re.title,ue.title,rt),lt},function(ct){return ct.transition(function(){return qn((0,Ct.Ys)(this),j,B,P,k.update)})},function(ct){return ct.remove()}).transitions()}function za(j,B,P,k){var U=j.showLine,rt=j.showTick,ct=j.showLabel,lt=j.classNamePrefix,mt=B.maybeAppendByClassName(re.lineGroup,"g");ke(mt,re.lineGroup,ue.lineGroup,lt);var Ft=(0,Q.z)(U,mt,function(Ye){return mi(Ye,j,k)})||[],ae=B.maybeAppendByClassName(re.tickGroup,"g");ke(ae,re.tickGroup,ue.tickGroup,lt);var me=(0,Q.z)(rt,ae,function(Ye){return mo(Ye,P,j,k)})||[],Oe=B.maybeAppendByClassName(re.labelGroup,"g");ke(Oe,re.labelGroup,ue.labelGroup,lt);var _e=(0,Q.z)(ct,Oe,function(Ye){return Ni(Ye,P,j,k,B.node())})||[];return(0,c.ev)((0,c.ev)((0,c.ev)([],(0,c.CR)(Ft),!1),(0,c.CR)(me),!1),(0,c.CR)(_e),!1).filter(function(Ye){return!!Ye})}var ja=function(j){(0,c.ZT)(B,j);function B(P){return j.call(this,P,Te)||this}return B.prototype.render=function(P,k,U){var rt=this,ct=P.titleText,lt=P.data,mt=P.animate,Ft=P.showTitle,ae=P.showGrid,me=P.dataThreshold,Oe=P.truncRange,_e=P.classNamePrefix,Ye=k.className||"axis";_e?k.attr("className","".concat(Ye," ").concat(_e,"axis")):k.className||k.attr("className","axis");var mn=Rt(lt,me).filter(function(or){var pr=or.value;return!(Oe&&pr>Oe[0]&&pr<Oe[1])}),bn=(0,gt.MG)(U===void 0?mt:U),Cn=(0,Ct.Ys)(k).maybeAppendByClassName(re.gridGroup,"g");ke(Cn,re.gridGroup,ue.gridGroup,_e);var Bn=(0,Q.z)(ae,Cn,function(or){return Ei(or,mn,P,bn)})||[],Fn=(0,Ct.Ys)(k).maybeAppendByClassName(re.mainGroup,"g");ke(Fn,re.mainGroup,ue.mainGroup,_e),ct&&(!this.initialized&&bn.enter||this.initialized&&bn.update)&&za(P,(0,Ct.Ys)(this.offscreenGroup),mn,(0,gt.MG)(!1));var Qn=za(P,(0,Ct.Ys)(Fn.node()),mn,bn),Vn=(0,Ct.Ys)(k).maybeAppendByClassName(re.titleGroup,"g");ke(Vn,re.titleGroup,ue.titleGroup,_e);var ir=(0,Q.z)(Ft,Vn,function(or){return Za(or,rt,P,bn)})||[];return(0,c.ev)((0,c.ev)((0,c.ev)([],(0,c.CR)(Bn),!1),(0,c.CR)(Qn),!1),(0,c.CR)(ir),!1).flat().filter(function(or){return!!or})},B}(I.w),xs=y(42777);function Wa(j){var B=j.canvas,P=j.touches,k=j.offsetX,U=j.offsetY;if(B){var rt=B.x,ct=B.y;return[rt,ct]}if(P){var lt=P[0],mt=lt.clientX,Ft=lt.clientY;return[mt,Ft]}return k&&U?[k,U]:[0,0]}function Ga(j){var B=j.nativeEvent,P=j.touches,k=j.clientX,U=j.clientY;if(B)return[B.clientX,B.clientY];if(P){var rt=P[0],ct=rt.clientX,lt=rt.clientY;return[ct,lt]}return typeof k=="number"&&typeof U=="number"?[k,U]:[0,0]}function Da(j,B){return+j.toPrecision(B)}function wa(j){return j.toLocaleString()}function ha(j){return j.toExponential()}function da(j,B){return B===void 0&&(B=0),Math.abs(j)<1e3?String(j):"".concat(Da(j/1e3,B).toLocaleString(),"K")}var $s=function(j,B,P){return j<0&&Number.isFinite(j)?B:P},qs=function(j,B,P){return j>0&&Number.isFinite(j)?B:P},ws=function(j,B){return j*B},yo=function(j,B){return j/2+(B||0)/2},_s=function(j){return j};class wi{constructor(B){this.options=(0,Ht.Z)({},this.getDefaultOptions()),this.update(B)}getOptions(){return this.options}update(B={}){this.options=(0,Ht.Z)({},this.options,B),this.rescale(B)}rescale(B){}}function Ua(j,B){return B-j?P=>(P-j)/(B-j):P=>.5}function Ms(j,...B){return B.reduce((P,k)=>U=>P(k(U)),j)}function ol(j,B,P,k,U){let rt=P||0,ct=k||j.length;const lt=U||(mt=>mt);for(;rt<ct;){const mt=Math.floor((rt+ct)/2);lt(j[mt])>B?ct=mt:rt=mt+1}return rt}var ea=y(75196),$i=y.n(ea);function Ss(j,B,P){let k=P;return k<0&&(k+=1),k>1&&(k-=1),k<1/6?j+(B-j)*6*k:k<1/2?B:k<2/3?j+(B-j)*(2/3-k)*6:j}function Pi(j){const B=j[0]/360,P=j[1]/100,k=j[2]/100,U=j[3];if(P===0)return[k*255,k*255,k*255,U];const rt=k<.5?k*(1+P):k+P-k*P,ct=2*k-rt,lt=Ss(ct,rt,B+1/3),mt=Ss(ct,rt,B),Ft=Ss(ct,rt,B-1/3);return[lt*255,mt*255,Ft*255,U]}function to(j){const B=$i().get(j);if(!B)return null;const{model:P,value:k}=B;return P==="rgb"?k:P==="hsl"?Pi(k):null}const Zs=(j,B)=>P=>j*(1-P)+B*P,qi=(j,B)=>{const P=to(j),k=to(B);return P===null||k===null?P?()=>j:()=>B:U=>{const rt=new Array(4);for(let ae=0;ae<4;ae+=1){const me=P[ae],Oe=k[ae];rt[ae]=me*(1-U)+Oe*U}const[ct,lt,mt,Ft]=rt;return`rgba(${Math.round(ct)}, ${Math.round(lt)}, ${Math.round(mt)}, ${Ft})`}},As=(j,B)=>typeof j=="number"&&typeof B=="number"?Zs(j,B):typeof j=="string"&&typeof B=="string"?qi(j,B):()=>j,Bo=(j,B)=>{const P=Zs(j,B);return k=>Math.round(P(k))};var oa=y(49527);function hs(j){return j===null}function Ma(j){return!(0,oa.Z)(j)&&!hs(j)&&!Number.isNaN(j)}const Ii=Math.sqrt(50),$a=Math.sqrt(10),qa=Math.sqrt(2);function ts(j,B,P){const k=(B-j)/Math.max(0,P),U=Math.floor(Math.log(k)/Math.LN10),rt=k/dc(10,U);return U>=0?(rt>=Ii?10:rt>=$a?5:rt>=qa?2:1)*dc(10,U):-dc(10,-U)/(rt>=Ii?10:rt>=$a?5:rt>=qa?2:1)}function Na(j,B,P){const k=Math.abs(B-j)/Math.max(0,P);let U=dc(10,Math.floor(Math.log(k)/Math.LN10));const rt=k/U;return rt>=Ii?U*=10:rt>=$a?U*=5:rt>=qa&&(U*=2),B<j?-U:U}const fa=(j,B,P=5)=>{const k=[j,B];let U=0,rt=k.length-1,ct=k[U],lt=k[rt],mt;return lt<ct&&([ct,lt]=[lt,ct],[U,rt]=[rt,U]),mt=ts(ct,lt,P),mt>0?(ct=Math.floor(ct/mt)*mt,lt=Math.ceil(lt/mt)*mt,mt=ts(ct,lt,P)):mt<0&&(ct=Math.ceil(ct*mt)/mt,lt=Math.floor(lt*mt)/mt,mt=ts(ct,lt,P)),mt>0?(k[U]=Math.floor(ct/mt)*mt,k[rt]=Math.ceil(lt/mt)*mt):mt<0&&(k[U]=Math.ceil(ct*mt)/mt,k[rt]=Math.floor(lt*mt)/mt),k};function Ia(j,B){const P=B<j?B:j,k=j>B?j:B;return U=>Math.min(Math.max(P,U),k)}const eo=(j,B,P)=>{const[k,U]=j,[rt,ct]=B;let lt,mt;return k<U?(lt=Ua(k,U),mt=P(rt,ct)):(lt=Ua(U,k),mt=P(ct,rt)),Ms(mt,lt)},Oi=(j,B,P)=>{const k=Math.min(j.length,B.length)-1,U=new Array(k),rt=new Array(k),ct=j[0]>j[k],lt=ct?[...j].reverse():j,mt=ct?[...B].reverse():B;for(let Ft=0;Ft<k;Ft+=1)U[Ft]=Ua(lt[Ft],lt[Ft+1]),rt[Ft]=P(mt[Ft],mt[Ft+1]);return Ft=>{const ae=ol(j,Ft,1,k)-1,me=U[ae],Oe=rt[ae];return Ms(Oe,me)(Ft)}},nr=(j,B,P,k)=>(Math.min(j.length,B.length)>2?Oi:eo)(j,B,k?Bo:P);class va extends wi{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Zs,tickCount:5}}map(B){return Ma(B)?this.output(B):this.options.unknown}invert(B){return Ma(B)?this.input(B):this.options.unknown}nice(){if(!this.options.nice)return;const[B,P,k,...U]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(B,P,k,...U)}getTicks(){const{tickMethod:B}=this.options,[P,k,U,...rt]=this.getTickMethodOptions();return B(P,k,U,...rt)}getTickMethodOptions(){const{domain:B,tickCount:P}=this.options,k=B[0],U=B[B.length-1];return[k,U,P]}chooseNice(){return fa}rescale(){this.nice();const[B,P]=this.chooseTransforms();this.composeOutput(B,this.chooseClamp(B)),this.composeInput(B,P,this.chooseClamp(P))}chooseClamp(B){const{clamp:P,range:k}=this.options,U=this.options.domain.map(B),rt=Math.min(U.length,k.length);return P?Ia(U[0],U[rt-1]):_s}composeOutput(B,P){const{domain:k,range:U,round:rt,interpolate:ct}=this.options,lt=nr(k.map(B),U,ct,rt);this.output=Ms(lt,P,B)}composeInput(B,P,k){const{domain:U,range:rt}=this.options,ct=nr(rt,U.map(B),Zs);this.input=Ms(P,k,ct)}}const bo=(j,B,P)=>{let k,U,rt=j,ct=B;if(rt===ct&&P>0)return[rt];let lt=ts(rt,ct,P);if(lt===0||!Number.isFinite(lt))return[];if(lt>0){rt=Math.ceil(rt/lt),ct=Math.floor(ct/lt),U=new Array(k=Math.ceil(ct-rt+1));for(let mt=0;mt<k;mt+=1)U[mt]=(rt+mt)*lt}else{lt=-lt,rt=Math.ceil(rt*lt),ct=Math.floor(ct*lt),U=new Array(k=Math.ceil(ct-rt+1));for(let mt=0;mt<k;mt+=1)U[mt]=(rt+mt)/lt}return U};class Os extends va{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:As,tickMethod:bo,tickCount:5}}chooseTransforms(){return[_s,_s]}clone(){return new Os(this.options)}}function Eo({map:j,initKey:B},P){const k=B(P);return j.has(k)?j.get(k):P}function Sa({map:j,initKey:B},P){const k=B(P);return j.has(k)?j.get(k):(j.set(k,P),P)}function Fo({map:j,initKey:B},P){const k=B(P);return j.has(k)&&(P=j.get(k),j.delete(k)),P}function _o(j){return typeof j=="object"?j.valueOf():j}class zs extends Map{constructor(B){if(super(),this.map=new Map,this.initKey=_o,B!==null)for(const[P,k]of B)this.set(P,k)}get(B){return super.get(Eo({map:this.map,initKey:this.initKey},B))}has(B){return super.has(Eo({map:this.map,initKey:this.initKey},B))}set(B,P){return super.set(Sa({map:this.map,initKey:this.initKey},B),P)}delete(B){return super.delete(Fo({map:this.map,initKey:this.initKey},B))}}const Ts=Symbol("defaultUnknown");function Va(j,B,P){for(let k=0;k<B.length;k+=1)j.has(B[k])||j.set(P(B[k]),k)}function ds(j){const{value:B,from:P,to:k,mapper:U,notFoundReturn:rt}=j;let ct=U.get(B);if(ct===void 0){if(rt!==Ts)return rt;ct=P.push(B)-1,U.set(B,ct)}return k[ct%k.length]}function es(j){return j instanceof Date?B=>`${B}`:typeof j=="object"?B=>JSON.stringify(B):B=>B}class js extends wi{getDefaultOptions(){return{domain:[],range:[],unknown:Ts}}constructor(B){super(B)}map(B){return this.domainIndexMap.size===0&&Va(this.domainIndexMap,this.getDomain(),this.domainKey),ds({value:this.domainKey(B),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(B){return this.rangeIndexMap.size===0&&Va(this.rangeIndexMap,this.getRange(),this.rangeKey),ds({value:this.rangeKey(B),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(B){const[P]=this.options.domain,[k]=this.options.range;if(this.domainKey=es(P),this.rangeKey=es(k),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!B||B.range)&&this.rangeIndexMap.clear(),(!B||B.domain||B.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new js(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:B,compare:P}=this.options;return this.sortedDomain=P?[...B].sort(P):B,this.sortedDomain}}function ns(j){const B=Math.min(...j);return j.map(P=>P/B)}function rs(j,B){const P=j.length,k=B-P;return k>0?[...j,...new Array(k).fill(1)]:k<0?j.slice(0,B):j}function Ti(j){return Math.round(j*1e12)/1e12}function Zo(j){const{domain:B,range:P,paddingOuter:k,paddingInner:U,flex:rt,round:ct,align:lt}=j,mt=B.length,Ft=rs(rt,mt),[ae,me]=P,Oe=me-ae,_e=2/mt*k+1-1/mt*U,Ye=Oe/_e,mn=Ye*U/mt,bn=Ye-mt*mn,Cn=ns(Ft),Bn=Cn.reduce((Hr,wr)=>Hr+wr),Fn=bn/Bn,Qn=new zs(B.map((Hr,wr)=>{const Gr=Cn[wr]*Fn;return[Hr,ct?Math.floor(Gr):Gr]})),Vn=new zs(B.map((Hr,wr)=>{const Tr=Cn[wr]*Fn+mn;return[Hr,ct?Math.floor(Tr):Tr]})),ir=Array.from(Vn.values()).reduce((Hr,wr)=>Hr+wr),pr=(Oe-(ir-ir/mt*U))*lt,Dr=ae+pr;let li=ct?Math.round(Dr):Dr;const ui=new Array(mt);for(let Hr=0;Hr<mt;Hr+=1){ui[Hr]=Ti(li);const wr=B[Hr];li+=Vn.get(wr)}return{valueBandWidth:Qn,valueStep:Vn,adjustedRange:ui}}function Pa(j){var B;const{domain:P}=j,k=P.length;if(k===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((B=j.flex)===null||B===void 0)&&B.length))return Zo(j);const{range:rt,paddingOuter:ct,paddingInner:lt,round:mt,align:Ft}=j;let ae,me,Oe=rt[0];const Ye=rt[1]-Oe,mn=ct*2,bn=k-lt;ae=Ye/Math.max(1,mn+bn),mt&&(ae=Math.floor(ae)),Oe+=(Ye-ae*(k-lt))*Ft,me=ae*(1-lt),mt&&(Oe=Math.round(Oe),me=Math.round(me));const Cn=new Array(k).fill(0).map((Bn,Fn)=>Oe+Fn*ae);return{valueStep:ae,valueBandWidth:me,adjustedRange:Cn}}class ci extends js{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Ts,flex:[]}}constructor(B){super(B)}clone(){return new ci(this.options)}getStep(B){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:B===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(B)}getBandWidth(B){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:B===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(B)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:B,paddingInner:P}=this.options;return B>0?B:P}getPaddingOuter(){const{padding:B,paddingOuter:P}=this.options;return B>0?B:P}rescale(){super.rescale();const{align:B,domain:P,range:k,round:U,flex:rt}=this.options,{adjustedRange:ct,valueBandWidth:lt,valueStep:mt}=Pa({align:B,range:k,round:U,flex:rt,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:P});this.valueStep=mt,this.valueBandWidth=lt,this.adjustedRange=ct}}var Hi=y(37547),Ya=y(1933),Gi=y(39934),fs=function(j){(0,c.ZT)(B,j);function B(P){var k=this,U=P.style,rt=(0,c._T)(P,["style"]);return k=j.call(this,(0,Ht.Z)({},{type:"column"},(0,c.pi)({style:U},rt)))||this,k.columnsGroup=new z.ZA({name:"columns"}),k.appendChild(k.columnsGroup),k.render(),k}return B.prototype.render=function(){var P=this.attributes,k=P.columns,U=P.x,rt=P.y;this.columnsGroup.style.transform="translate(".concat(U,", ").concat(rt,")"),(0,Ct.Ys)(this.columnsGroup).selectAll(".column").data(k.flat()).join(function(ct){return ct.append("rect").attr("className","column").each(function(lt){this.attr(lt)})},function(ct){return ct.each(function(lt){this.attr(lt)})},function(ct){return ct.remove()})},B.prototype.update=function(P){this.attr((0,S.n)({},this.attributes,P)),this.render()},B.prototype.clear=function(){this.removeChildren()},B}(z.s$),ll=function(j){(0,c.ZT)(B,j);function B(P){var k=this,U=P.style,rt=(0,c._T)(P,["style"]);return k=j.call(this,(0,Ht.Z)({},{type:"lines"},(0,c.pi)({style:U},rt)))||this,k.linesGroup=k.appendChild(new z.ZA),k.areasGroup=k.appendChild(new z.ZA),k.render(),k}return B.prototype.render=function(){var P=this.attributes,k=P.lines,U=P.areas,rt=P.x,ct=P.y;this.style.transform="translate(".concat(rt,", ").concat(ct,")"),k&&this.renderLines(k),U&&this.renderAreas(U)},B.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},B.prototype.update=function(P){this.attr((0,S.n)({},this.attributes,P)),this.render()},B.prototype.renderLines=function(P){(0,Ct.Ys)(this.linesGroup).selectAll(".line").data(P).join(function(k){return k.append("path").attr("className","line").each(function(U){this.attr(U)})},function(k){return k.each(function(U){this.attr(U)})},function(k){return k.remove()})},B.prototype.renderAreas=function(P){(0,Ct.Ys)(this.linesGroup).selectAll(".area").data(P).join(function(k){return k.append("path").attr("className","area").each(function(U){this.attr(U)})},function(k){return k.each(function(U){this.style(U)})},function(k){return k.remove()})},B}(z.s$),xo=y(62099);function no(j,B,P,k){var U,rt=[],ct=!!k,lt,mt,Ft=[1/0,1/0],ae=[-1/0,-1/0],me,Oe,_e;if(ct){U=(0,c.CR)(k,2),Ft=U[0],ae=U[1];for(var Ye=0,mn=j.length;Ye<mn;Ye+=1){var bn=j[Ye];Ft=Pn(Ft,bn),ae=tn(ae,bn)}}for(var Ye=0,Cn=j.length;Ye<Cn;Ye+=1){var bn=j[Ye];if(Ye===0&&!P)_e=bn;else if(Ye===Cn-1&&!P)Oe=bn,rt.push(_e),rt.push(Oe);else{var Bn=[Ye?Ye-1:Cn-1,Ye-1][P?0:1];lt=j[Bn],mt=j[P?(Ye+1)%Cn:Ye+1];var Fn=[0,0];Fn=En(mt,lt),Fn=rn(Fn,B);var Qn=xn(bn,lt),Vn=xn(bn,mt),ir=Qn+Vn;ir!==0&&(Qn/=ir,Vn/=ir);var or=rn(Fn,-Qn),pr=rn(Fn,Vn);Oe=Xe(bn,or),me=Xe(bn,pr),me=Pn(me,tn(mt,bn)),me=tn(me,Pn(mt,bn)),or=En(me,bn),or=rn(or,-Qn/Vn),Oe=Xe(bn,or),Oe=Pn(Oe,tn(lt,bn)),Oe=tn(Oe,Pn(lt,bn)),pr=En(bn,Oe),pr=rn(pr,Vn/Qn),me=Xe(bn,pr),ct&&(Oe=tn(Oe,Ft),Oe=Pn(Oe,ae),me=tn(me,Ft),me=Pn(me,ae)),rt.push(_e),rt.push(Oe),_e=me}}return P&&rt.push(rt.shift()),rt}function Cs(j,B,P){var k;B===void 0&&(B=!1),P===void 0&&(P=[[0,0],[1,1]]);for(var U=!!B,rt=[],ct=0,lt=j.length;ct<lt;ct+=2)rt.push([j[ct],j[ct+1]]);for(var mt=no(rt,.4,U,P),Ft=rt.length,ae=[],me,Oe,_e,ct=0;ct<Ft-1;ct+=1)me=mt[ct*2],Oe=mt[ct*2+1],_e=rt[ct+1],ae.push(["C",me[0],me[1],Oe[0],Oe[1],_e[0],_e[1]]);return U&&(me=mt[Ft],Oe=mt[Ft+1],k=(0,c.CR)(rt,1),_e=k[0],ae.push(["C",me[0],me[1],Oe[0],Oe[1],_e[0],_e[1]])),ae}function Ha(j,B){var P,k=B.x,U=B.y,rt=(0,c.CR)(U.getOptions().range||[0,0],2),ct=rt[0],lt=rt[1];return lt>ct&&(P=(0,c.CR)([ct,lt],2),lt=P[0],ct=P[1]),j.map(function(mt){var Ft=mt.map(function(ae,me){return[k.map(me),(0,_.Z)(U.map(ae),lt,ct)]});return Ft})}function Aa(j,B){B===void 0&&(B=!1);var P=B?j.length-1:0,k=j.map(function(U,rt){return(0,c.ev)([rt===P?"M":"L"],(0,c.CR)(U),!1)});return B?k.reverse():k}function la(j,B){if(B===void 0&&(B=!1),j.length<=2)return Aa(j);for(var P=[],k=j.length,U=0;U<k;U+=1){var rt=B?j[k-U-1]:j[U];(0,xo.Z)(rt,P.slice(-2))||P.push.apply(P,(0,c.ev)([],(0,c.CR)(rt),!1))}var ct=Cs(P,!1);return B?ct.unshift((0,c.ev)(["M"],(0,c.CR)(j[k-1]),!1)):ct.unshift((0,c.ev)(["M"],(0,c.CR)(j[0]),!1)),ct}function jr(j,B,P){var k=(0,Hi.Z)(j);return k.push(["L",B,P],["L",0,P],["Z"]),k}function zo(j,B,P,k){return j.map(function(U){return jr(B?la(U):Aa(U),P,k)})}function Ws(j,B,P){for(var k=[],U=j.length-1;U>=0;U-=1){var rt=j[U],ct=Aa(rt),lt=void 0;if(U===0)lt=jr(ct,B,P);else{var mt=j[U-1],Ft=Aa(mt,!0);Ft[0][0]="L",lt=(0,c.ev)((0,c.ev)((0,c.ev)([],(0,c.CR)(ct),!1),(0,c.CR)(Ft),!1),[["Z"]],!1)}k.push(lt)}return k}function ro(j,B,P){for(var k=[],U=j.length-1;U>=0;U-=1){var rt=j[U],ct=la(rt),lt=void 0;if(U===0)lt=jr(ct,B,P);else{var mt=j[U-1],Ft=la(mt,!0),ae=rt[0];Ft[0][0]="L",lt=(0,c.ev)((0,c.ev)((0,c.ev)([],(0,c.CR)(ct),!1),(0,c.CR)(Ft),!1),[(0,c.ev)(["M"],(0,c.CR)(ae),!1),["Z"]],!1)}k.push(lt)}return k}var Ns=y(2078),jo=function(j,B){if((0,Gi.Z)(j)){for(var P,k=1/0,U=0;U<j.length;U++){var rt=j[U],ct=(0,Ge.Z)(B)?B(rt):rt[B];ct<k&&(P=rt,k=ct)}return P}},io=y(82639),Ps=function(j,B){if((0,Gi.Z)(j)){for(var P,k=-1/0,U=0;U<j.length;U++){var rt=j[U],ct=(0,Ge.Z)(B)?B(rt):rt[B];ct>k&&(P=rt,k=ct)}return P}};function Gs(j){return j.length===0?[0,0]:[(0,Ns.Z)(jo(j,function(B){return(0,Ns.Z)(B)||0})),(0,io.Z)(Ps(j,function(B){return(0,io.Z)(B)||0}))]}function ka(j){for(var B=(0,Hi.Z)(j),P=B[0].length,k=(0,c.CR)([Array(P).fill(0),Array(P).fill(0)],2),U=k[0],rt=k[1],ct=0;ct<B.length;ct+=1)for(var lt=B[ct],mt=0;mt<P;mt+=1)lt[mt]>=0?(lt[mt]+=U[mt],U[mt]=lt[mt]):(lt[mt]+=rt[mt],rt[mt]=lt[mt]);return B}var Us=function(j){(0,c.ZT)(B,j);function B(P){return j.call(this,P,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(B.prototype,"rawData",{get:function(){var P=this.attributes.data;if(!P||(P==null?void 0:P.length)===0)return[[]];var k=(0,Hi.Z)(P);return(0,Ya.Z)(k[0])?[k]:k},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"data",{get:function(){return this.attributes.isStack?ka(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"baseline",{get:function(){var P=this.scales.y,k=(0,c.CR)(P.getOptions().domain||[0,0],2),U=k[0],rt=k[1];return rt<0?P.map(rt):P.map(U<0?0:U)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"containerShape",{get:function(){var P=this.attributes,k=P.width,U=P.height;return{width:k,height:U}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"linesStyle",{get:function(){var P=this,k=this.attributes,U=k.type,rt=k.isStack,ct=k.smooth;if(U!=="line")throw new Error("linesStyle can only be used in line type");var lt=(0,w.zs)(this.attributes,"area"),mt=(0,w.zs)(this.attributes,"line"),Ft=this.containerShape.width,ae=this.data;if(ae[0].length===0)return{lines:[],areas:[]};var me=this.scales,Oe=me.x,_e=me.y,Ye=Ha(ae,{type:"line",x:Oe,y:_e}),mn=[];if(lt){var bn=this.baseline;rt?mn=ct?ro(Ye,Ft,bn):Ws(Ye,Ft,bn):mn=zo(Ye,ct,Ft,bn)}return{lines:Ye.map(function(Cn,Bn){return(0,c.pi)({stroke:P.getColor(Bn),d:ct?la(Cn):Aa(Cn)},mt)}),areas:mn.map(function(Cn,Bn){return(0,c.pi)({d:Cn,fill:P.getColor(Bn)},lt)})}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"columnsStyle",{get:function(){var P=this,k=(0,w.zs)(this.attributes,"column"),U=this.attributes,rt=U.isStack,ct=U.type,lt=U.scale;if(ct!=="column")throw new Error("columnsStyle can only be used in column type");var mt=this.containerShape.height,Ft=this.rawData;if(!Ft)return{columns:[]};rt&&(Ft=ka(Ft));var ae=this.createScales(Ft),me=ae.x,Oe=ae.y,_e=(0,c.CR)(Gs(Ft),2),Ye=_e[0],mn=_e[1],bn=new Os({domain:[0,mn-(Ye>0?0:Ye)],range:[0,mt*lt]}),Cn=me.getBandWidth(),Bn=this.rawData;return{columns:Ft.map(function(Fn,Qn){return Fn.map(function(Vn,ir){var or=Cn/Ft.length,pr=function(){return{x:me.map(ir)+or*Qn,y:Vn>=0?Oe.map(Vn):Oe.map(0),width:or,height:bn.map(Math.abs(Vn))}},Dr=function(){return{x:me.map(ir),y:Oe.map(Vn),width:Cn,height:bn.map(Bn[Qn][ir])}};return(0,c.pi)((0,c.pi)({fill:P.getColor(Qn)},k),rt?Dr():pr())})})}},enumerable:!1,configurable:!0}),B.prototype.render=function(P,k){(0,Ct.OV)(k,".container","rect").attr("className","container").node();var U=P.type,rt=P.x,ct=P.y,lt="spark".concat(U),mt=(0,c.pi)({x:rt,y:ct},U==="line"?this.linesStyle:this.columnsStyle);(0,Ct.Ys)(k).selectAll(".spark").data([U]).join(function(Ft){return Ft.append(function(ae){return ae==="line"?new ll({className:lt,style:mt}):new fs({className:lt,style:mt})}).attr("className","spark ".concat(lt))},function(Ft){return Ft.update(mt)},function(Ft){return Ft.remove()})},B.prototype.getColor=function(P){var k=this.attributes.color;return(0,Gi.Z)(k)?k[P%k.length]:(0,Ge.Z)(k)?k.call(null,P):k},B.prototype.createScales=function(P){var k,U,rt=this.attributes,ct=rt.type,lt=rt.scale,mt=rt.range,Ft=mt===void 0?[]:mt,ae=rt.spacing,me=this.containerShape,Oe=me.width,_e=me.height,Ye=(0,c.CR)(Gs(P),2),mn=Ye[0],bn=Ye[1],Cn=new Os({domain:[(k=Ft[0])!==null&&k!==void 0?k:mn,(U=Ft[1])!==null&&U!==void 0?U:bn],range:[_e,_e*(1-lt)]});return ct==="line"?{type:ct,x:new Os({domain:[0,P[0].length-1],range:[0,Oe]}),y:Cn}:{type:ct,x:new ci({domain:P[0].map(function(Bn,Fn){return Fn}),range:[0,Oe],paddingInner:ae,paddingOuter:ae/2,align:.5}),y:Cn}},B.tag="sparkline",B}(I.w),wo={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},ao={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},so={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},ga=(0,de.A)({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),pa=(0,de.A)({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Mo=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return B.prototype.render=function(P,k){var U=P.x,rt=P.y,ct=P.size,lt=ct===void 0?10:ct,mt=P.radius,Ft=mt===void 0?lt/4:mt,ae=P.orientation,me=P.classNamePrefix,Oe=(0,c._T)(P,["x","y","size","radius","orientation","classNamePrefix"]),_e=lt,Ye=_e*2.4,mn=me?"".concat(pa.iconRect.name," ").concat(me,"handle-icon-rect"):pa.iconRect.name,bn=function(ir){return me?"".concat(pa.iconLine,"-").concat(ir," ").concat(me,"handle-icon-line"):"".concat(pa.iconLine,"-").concat(ir)},Cn=(0,Ct.Ys)(k).maybeAppendByClassName(pa.iconRect,"rect").attr("className",mn).styles((0,c.pi)((0,c.pi)({},Oe),{width:_e,height:Ye,radius:Ft,x:U-_e/2,y:rt-Ye/2,transformOrigin:"center"})),Bn=U+1/3*_e-_e/2,Fn=U+2/3*_e-_e/2,Qn=rt+1/4*Ye-Ye/2,Vn=rt+3/4*Ye-Ye/2;Cn.maybeAppendByClassName("".concat(pa.iconLine,"-1"),"line").attr("className",bn(1)).styles((0,c.pi)({x1:Bn,x2:Bn,y1:Qn,y2:Vn},Oe)),Cn.maybeAppendByClassName("".concat(pa.iconLine,"-2"),"line").attr("className",bn(2)).styles((0,c.pi)({x1:Fn,x2:Fn,y1:Qn,y2:Vn},Oe)),ae==="vertical"&&(Cn.node().style.transform="rotate(90)")},B}(I.w),Xi=function(j){(0,c.ZT)(B,j);function B(P){return j.call(this,P,so)||this}return B.prototype.renderLabel=function(P){var k=this,U=this.attributes,rt=U.x,ct=U.y,lt=U.showLabel,mt=(0,w.zs)(this.attributes,"label"),Ft=mt.x,ae=Ft===void 0?0:Ft,me=mt.y,Oe=me===void 0?0:me,_e=mt.transform,Ye=mt.transformOrigin,mn=(0,c._T)(mt,["x","y","transform","transformOrigin"]),bn=(0,c.CR)((0,w.Hm)(mn,[]),2),Cn=bn[0],Bn=bn[1],Fn=(0,Ct.Ys)(P).maybeAppendByClassName(pa.labelGroup,"g").styles(Bn),Qn=(0,c.pi)((0,c.pi)({},ao),Cn),Vn=Qn.text,ir=(0,c._T)(Qn,["text"]);(0,Q.z)(!!lt,Fn,function(or){k.label=or.maybeAppendByClassName(pa.label,"text").styles((0,c.pi)((0,c.pi)({},ir),{x:rt+ae,y:ct+Oe,transform:_e,transformOrigin:Ye,text:"".concat(Vn)})),k.label.on("mousedown",function(pr){pr.stopPropagation()}),k.label.on("touchstart",function(pr){pr.stopPropagation()})})},B.prototype.renderIcon=function(P){var k=this.attributes,U=k.x,rt=k.y,ct=k.orientation,lt=k.type,mt=k.classNamePrefix,Ft=(0,c.pi)((0,c.pi)({x:U,y:rt,orientation:ct,classNamePrefix:mt},wo),(0,w.zs)(this.attributes,"icon")),ae=this.attributes.iconShape,me=ae===void 0?function(){return new Mo({style:Ft})}:ae,Oe=(0,Ct.Ys)(P).maybeAppendByClassName(pa.iconGroup,"g");Oe.selectAll(pa.icon.class).data([me]).join(function(_e){return _e.append(typeof me=="string"?me:function(){return me(lt)}).attr("className",pa.icon.name)},function(_e){return _e.update(Ft)},function(_e){return _e.remove()})},B.prototype.render=function(P,k){this.renderIcon(k),this.renderLabel(k)},B}(I.w),ks=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,P,(0,c.pi)((0,c.pi)((0,c.pi)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(U){return U.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},(0,w.dq)(so,"handle")),(0,w.dq)(wo,"handleIcon")),(0,w.dq)(ao,"handleLabel")))||this;return k.range=[0,1],k.onDragStart=function(U){return function(rt){rt.stopPropagation(),k.target=U,k.prevPos=k.getOrientVal(Ga(rt));var ct=k.availableSpace,lt=ct.x,mt=ct.y,Ft=k.getBBox(),ae=Ft.x,me=Ft.y;k.selectionStartPos=k.getRatio(k.prevPos-k.getOrientVal([lt,mt])-k.getOrientVal([+ae,+me])),k.selectionWidth=0,document.addEventListener("pointermove",k.onDragging),document.addEventListener("pointerup",k.onDragEnd)}},k.onDragging=function(U){var rt=k.attributes,ct=rt.slidable,lt=rt.brushable,mt=rt.type;U.stopPropagation();var Ft=k.getOrientVal(Ga(U)),ae=Ft-k.prevPos;if(ae){var me=k.getRatio(ae);switch(k.target){case"start":ct&&k.setValuesOffset(me);break;case"end":ct&&k.setValuesOffset(0,me);break;case"selection":ct&&k.setValuesOffset(me,me);break;case"track":if(!lt)return;k.selectionWidth+=me,mt==="range"?k.innerSetValues([k.selectionStartPos,k.selectionStartPos+k.selectionWidth].sort(),!0):k.innerSetValues([0,k.selectionStartPos+k.selectionWidth],!0);break;default:break}k.prevPos=Ft}},k.onDragEnd=function(){document.removeEventListener("pointermove",k.onDragging),document.removeEventListener("pointermove",k.onDragging),document.removeEventListener("pointerup",k.onDragEnd),k.target="",k.updateHandlesPosition(!1)},k.onValueChange=function(U){var rt=k.attributes,ct=rt.onChange,lt=rt.type,mt=lt==="range"?U:U[1],Ft=lt==="range"?k.getValues():k.getValues()[1],ae=new z.Aw("valuechange",{detail:{oldValue:mt,value:Ft}});k.dispatchEvent(ae),ct==null||ct(Ft)},k.selectionStartPos=0,k.selectionWidth=0,k.prevPos=0,k.target="",k}return Object.defineProperty(B.prototype,"values",{get:function(){return this.attributes.values},set:function(P){this.attributes.values=this.clampValues(P)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"sparklineStyle",{get:function(){var P=this.attributes.orientation;if(P!=="horizontal")return null;var k=(0,w.zs)(this.attributes,"sparkline");return(0,c.pi)((0,c.pi)({zIndex:0},this.availableSpace),k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"shape",{get:function(){var P=this.attributes,k=P.trackLength,U=P.trackSize,rt=(0,c.CR)(this.getOrientVal([[k,U],[U,k]]),2),ct=rt[0],lt=rt[1];return{width:ct,height:lt}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"availableSpace",{get:function(){var P=this.attributes,k=P.x,U=P.y,rt=P.padding,ct=(0,c.CR)((0,J.j)(rt),4),lt=ct[0],mt=ct[1],Ft=ct[2],ae=ct[3],me=this.shape,Oe=me.width,_e=me.height;return{x:ae,y:lt,width:Oe-(ae+mt),height:_e-(lt+Ft)}},enumerable:!1,configurable:!0}),B.prototype.getValues=function(){return this.values},B.prototype.setValues=function(P,k){P===void 0&&(P=[0,0]),k===void 0&&(k=!1),this.attributes.values=P;var U=k===!1?!1:this.attributes.animate;this.updateSelectionArea(U),this.updateHandlesPosition(U)},B.prototype.updateSelectionArea=function(P){var k=this.calcSelectionArea();this.foregroundGroup.selectAll(ga.selection.class).each(function(U,rt){(0,gt.eR)(this,k[rt],P)})},B.prototype.updateHandlesPosition=function(P){this.attributes.showHandle&&(this.startHandle&&(0,gt.eR)(this.startHandle,this.getHandleStyle("start"),P),this.endHandle&&(0,gt.eR)(this.endHandle,this.getHandleStyle("end"),P))},B.prototype.innerSetValues=function(P,k){P===void 0&&(P=[0,0]),k===void 0&&(k=!1);var U=this.values,rt=this.clampValues(P);this.attributes.values=rt,this.setValues(rt),k&&this.onValueChange(U)},B.prototype.renderTrack=function(P){var k=this.attributes,U=k.x,rt=k.y,ct=(0,w.zs)(this.attributes,"track");this.trackShape=(0,Ct.Ys)(P).maybeAppendByClassName(ga.track,"rect").styles((0,c.pi)((0,c.pi)({x:U,y:rt},this.shape),ct))},B.prototype.renderBrushArea=function(P){var k=this.attributes,U=k.x,rt=k.y,ct=k.brushable;this.brushArea=(0,Ct.Ys)(P).maybeAppendByClassName(ga.brushArea,"rect").styles((0,c.pi)({x:U,y:rt,fill:"transparent",cursor:ct?"crosshair":"default"},this.shape))},B.prototype.renderSparkline=function(P){var k=this,U=this.attributes,rt=U.x,ct=U.y,lt=U.orientation,mt=(0,Ct.Ys)(P).maybeAppendByClassName(ga.sparklineGroup,"g");(0,Q.z)(lt==="horizontal",mt,function(Ft){var ae=(0,c.pi)((0,c.pi)({},k.sparklineStyle),{x:rt,y:ct});Ft.maybeAppendByClassName(ga.sparkline,function(){return new Us({style:ae})}).update(ae)})},B.prototype.renderHandles=function(){var P=this,k,U=this.attributes,rt=U.showHandle,ct=U.type,lt=ct==="range"?["start","end"]:["end"],mt=rt?lt:[],Ft=this;(k=this.foregroundGroup)===null||k===void 0||k.selectAll(ga.handle.class).data(mt.map(function(ae){return{type:ae}}),function(ae){return ae.type}).join(function(ae){return ae.append(function(me){var Oe=me.type;return new Xi({style:P.getHandleStyle(Oe)})}).each(function(me){var Oe=me.type;this.attr("class","".concat(ga.handle.name," ").concat(Oe,"-handle"));var _e="".concat(Oe,"Handle");Ft[_e]=this,this.addEventListener("pointerdown",Ft.onDragStart(Oe))})},function(ae){return ae.each(function(me){var Oe=me.type;this.update(Ft.getHandleStyle(Oe))})},function(ae){return ae.each(function(me){var Oe=me.type,_e="".concat(Oe,"Handle");Ft[_e]=void 0}).remove()})},B.prototype.renderSelection=function(P){var k=this.attributes,U=k.x,rt=k.y,ct=k.type,lt=k.selectionType;this.foregroundGroup=(0,Ct.Ys)(P).maybeAppendByClassName(ga.foreground,"g");var mt=(0,w.zs)(this.attributes,"selection"),Ft=function(me){return me.style("visibility",function(Oe){return Oe.show?"visible":"hidden"}).style("cursor",function(Oe){return lt==="select"?"grab":lt==="invert"?"crosshair":"default"}).styles((0,c.pi)((0,c.pi)({},mt),{transform:"translate(".concat(U,", ").concat(rt,")")}))},ae=this;this.foregroundGroup.selectAll(ga.selection.class).data(ct==="value"?[]:this.calcSelectionArea().map(function(me,Oe){return{style:(0,c.pi)({},me),index:Oe,show:lt==="select"?Oe===1:Oe!==1}}),function(me){return me.index}).join(function(me){return me.append("rect").attr("className",ga.selection.name).call(Ft).each(function(Oe,_e){var Ye=this;_e===1?(ae.selectionShape=(0,Ct.Ys)(this),this.on("pointerdown",function(mn){Ye.attr("cursor","grabbing"),ae.onDragStart("selection")(mn)}),ae.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),ae.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),ae.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){Ye.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){Ye.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){Ye.attr("cursor","pointer")})):this.on("pointerdown",ae.onDragStart("track"))})},function(me){return me.call(Ft)},function(me){return me.remove()}),this.updateSelectionArea(!1),this.renderHandles()},B.prototype.render=function(P,k){this.renderTrack(k),this.renderSparkline(k),this.renderBrushArea(k),this.renderSelection(k)},B.prototype.clampValues=function(P,k){var U;k===void 0&&(k=4);var rt=(0,c.CR)(this.range,2),ct=rt[0],lt=rt[1],mt=(0,c.CR)(this.getValues().map(function(bn){return Da(bn,k)}),2),Ft=mt[0],ae=mt[1],me=Array.isArray(P)?P:[Ft,P!=null?P:ae],Oe=(0,c.CR)((me||[Ft,ae]).map(function(bn){return Da(bn,k)}),2),_e=Oe[0],Ye=Oe[1];if(this.attributes.type==="value")return[0,(0,_.Z)(Ye,ct,lt)];_e>Ye&&(U=(0,c.CR)([Ye,_e],2),_e=U[0],Ye=U[1]);var mn=Ye-_e;return mn>lt-ct?[ct,lt]:_e<ct?Ft===ct&&ae===Ye?[ct,Ye]:[ct,mn+ct]:Ye>lt?ae===lt&&Ft===_e?[_e,lt]:[lt-mn,lt]:[_e,Ye]},B.prototype.calcSelectionArea=function(P){var k=(0,c.CR)(this.clampValues(P),2),U=k[0],rt=k[1],ct=this.availableSpace,lt=ct.x,mt=ct.y,Ft=ct.width,ae=ct.height;return this.getOrientVal([[{y:mt,height:ae,x:lt,width:U*Ft},{y:mt,height:ae,x:U*Ft+lt,width:(rt-U)*Ft},{y:mt,height:ae,x:rt*Ft,width:(1-rt)*Ft}],[{x:lt,width:Ft,y:mt,height:U*ae},{x:lt,width:Ft,y:U*ae+mt,height:(rt-U)*ae},{x:lt,width:Ft,y:rt*ae,height:(1-rt)*ae}]])},B.prototype.calcHandlePosition=function(P){var k=this.attributes.handleIconOffset,U=this.availableSpace,rt=U.x,ct=U.y,lt=U.width,mt=U.height,Ft=(0,c.CR)(this.clampValues(),2),ae=Ft[0],me=Ft[1],Oe=P==="start"?-k:k,_e=(P==="start"?ae:me)*this.getOrientVal([lt,mt])+Oe;return{x:rt+this.getOrientVal([_e,lt/2]),y:ct+this.getOrientVal([mt/2,_e])}},B.prototype.inferTextStyle=function(P){var k=this.attributes.orientation;return k==="horizontal"?{}:P==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:P==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},B.prototype.calcHandleText=function(P){var k,U=this.attributes,rt=U.type,ct=U.orientation,lt=U.formatter,mt=U.autoFitLabel,Ft=(0,w.zs)(this.attributes,"handle"),ae=(0,w.zs)(Ft,"label"),me=Ft.spacing,Oe=this.getHandleSize(),_e=this.clampValues(),Ye=P==="start"?_e[0]:_e[1],mn=lt(Ye),bn=new xs.x({style:(0,c.pi)((0,c.pi)((0,c.pi)({},ae),this.inferTextStyle(P)),{text:mn})}),Cn=bn.getBBox(),Bn=Cn.width,Fn=Cn.height;if(bn.destroy(),!mt){if(rt==="value")return{text:mn,x:0,y:-Fn-me};var Qn=me+Oe+(ct==="horizontal"?Bn/2:0);return k={text:mn},k[ct==="horizontal"?"x":"y"]=P==="start"?-Qn:Qn,k}var Vn=0,ir=0,or=this.availableSpace,pr=or.width,Dr=or.height,li=this.calcSelectionArea()[1],ui=li.x,Hr=li.y,wr=li.width,Gr=li.height,Tr=me+Oe;if(ct==="horizontal"){var Xr=Tr+Bn/2;if(P==="start"){var bi=ui-Tr-Bn;Vn=bi>0?-Xr:Xr}else{var Sr=pr-ui-wr-Tr>Bn;Vn=Sr?Xr:-Xr}}else{var oi=Tr,ii=Fn+Tr;P==="start"?ir=Hr-Oe>Fn?-ii:oi:ir=Dr-(Hr+Gr)-Oe>Fn?ii:-oi}return{x:Vn,y:ir,text:mn}},B.prototype.getHandleLabelStyle=function(P){var k=(0,w.zs)(this.attributes,"handleLabel");return(0,c.pi)((0,c.pi)((0,c.pi)({},k),this.calcHandleText(P)),this.inferTextStyle(P))},B.prototype.getHandleIconStyle=function(){var P=this.attributes.handleIconShape,k=(0,w.zs)(this.attributes,"handleIcon"),U=this.getOrientVal(["ew-resize","ns-resize"]),rt=this.getHandleSize();return(0,c.pi)({cursor:U,shape:P,size:rt},k)},B.prototype.getHandleStyle=function(P){var k=this.attributes,U=k.x,rt=k.y,ct=k.showLabel,lt=k.showLabelOnInteraction,mt=k.orientation,Ft=this.calcHandlePosition(P),ae=Ft.x,me=Ft.y,Oe=this.calcHandleText(P),_e=ct;return!ct&<&&(this.target?_e=!0:_e=!1),(0,c.pi)((0,c.pi)((0,c.pi)({},(0,w.dq)(this.getHandleIconStyle(),"icon")),(0,w.dq)((0,c.pi)((0,c.pi)({},this.getHandleLabelStyle(P)),Oe),"label")),{transform:"translate(".concat(ae+U,", ").concat(me+rt,")"),orientation:mt,showLabel:_e,type:P,zIndex:3})},B.prototype.getHandleSize=function(){var P=this.attributes,k=P.handleIconSize,U=P.width,rt=P.height;return k||Math.floor((this.getOrientVal([+rt,+U])+4)/2.4)},B.prototype.getOrientVal=function(P){var k=(0,c.CR)(P,2),U=k[0],rt=k[1],ct=this.attributes.orientation;return ct==="horizontal"?U:rt},B.prototype.setValuesOffset=function(P,k){k===void 0&&(k=0);var U=this.attributes.type,rt=(0,c.CR)(this.getValues(),2),ct=rt[0],lt=rt[1],mt=U==="range"?P:0,Ft=[ct+mt,lt+k].sort();this.innerSetValues(Ft,!0)},B.prototype.getRatio=function(P){var k=this.availableSpace,U=k.width,rt=k.height;return P/this.getOrientVal([U,rt])},B.prototype.dispatchCustomEvent=function(P,k,U){var rt=this;P.on(k,function(ct){ct.stopPropagation(),rt.dispatchEvent(new z.Aw(U,{detail:ct}))})},B.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var P=this.brushArea;this.dispatchCustomEvent(P,"click","trackClick"),this.dispatchCustomEvent(P,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(P,"pointerleave","trackMouseleave"),P.on("pointerdown",this.onDragStart("track"))},B.prototype.onScroll=function(P){var k=this.attributes.scrollable;if(k){var U=P.deltaX,rt=P.deltaY,ct=rt||U,lt=this.getRatio(ct);this.setValuesOffset(lt,lt)}},B.tag="slider",B}(I.w),vs=y(92387),Vs={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(j){return j.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},Xa=(0,de.A)({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Wo=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,P,Vs)||this;return k.point=[0,0],k.group=k.appendChild(new z.ZA({})),k.isMutationObserved=!0,k}return B.prototype.renderBackground=function(){if(this.label){var P=this.attributes,k=P.position,U=P.padding,rt=(0,c.CR)((0,J.j)(U),4),ct=rt[0],lt=rt[1],mt=rt[2],Ft=rt[3],ae=this.label.node().getLocalBounds(),me=ae.min,Oe=ae.max,_e=new R.b(me[0]-Ft,me[1]-ct,Oe[0]+lt-me[0]+Ft,Oe[1]+mt-me[1]+ct),Ye=this.getPath(k,_e),mn=(0,w.zs)(this.attributes,"background");this.background=(0,Ct.Ys)(this.group).maybeAppendByClassName(Xa.background,"path").styles((0,c.pi)((0,c.pi)({},mn),{d:Ye})),this.group.appendChild(this.label.node())}},B.prototype.renderLabel=function(){var P=this.attributes,k=P.formatter,U=P.labelText,rt=(0,w.zs)(this.attributes,"label"),ct=(0,c.CR)((0,w.Hm)(rt),2),lt=ct[0],mt=ct[1],Ft=lt.text,ae=(0,c._T)(lt,["text"]);if(this.label=(0,Ct.Ys)(this.group).maybeAppendByClassName(Xa.labelGroup,"g").styles(mt),!!U){var me=this.label.maybeAppendByClassName(Xa.label,function(){return(0,Ne.S)(k(U))}).style("text",k(U).toString());me.selectAll("text").styles(ae)}},B.prototype.adjustLayout=function(){var P=(0,c.CR)(this.point,2),k=P[0],U=P[1],rt=this.attributes,ct=rt.x,lt=rt.y;this.group.attr("transform","translate(".concat(ct-k,", ").concat(lt-U,")"))},B.prototype.getPath=function(P,k){var U=this.attributes.radius,rt=k.x,ct=k.y,lt=k.width,mt=k.height,Ft=[["M",rt+U,ct],["L",rt+lt-U,ct],["A",U,U,0,0,1,rt+lt,ct+U],["L",rt+lt,ct+mt-U],["A",U,U,0,0,1,rt+lt-U,ct+mt],["L",rt+U,ct+mt],["A",U,U,0,0,1,rt,ct+mt-U],["L",rt,ct+U],["A",U,U,0,0,1,rt+U,ct],["Z"]],ae={top:4,right:6,bottom:0,left:2},me=ae[P],Oe=this.createCorner([Ft[me].slice(-2),Ft[me+1].slice(-2)]);return Ft.splice.apply(Ft,(0,c.ev)([me+1,1],(0,c.CR)(Oe),!1)),Ft[0][0]="M",Ft},B.prototype.createCorner=function(P,k){k===void 0&&(k=10);var U=.8,rt=ge.wE.apply(void 0,(0,c.ev)([],(0,c.CR)(P),!1)),ct=(0,c.CR)(P,2),lt=(0,c.CR)(ct[0],2),mt=lt[0],Ft=lt[1],ae=(0,c.CR)(ct[1],2),me=ae[0],Oe=ae[1],_e=(0,c.CR)(rt?[me-mt,[mt,me]]:[Oe-Ft,[Ft,Oe]],2),Ye=_e[0],mn=(0,c.CR)(_e[1],2),bn=mn[0],Cn=mn[1],Bn=Ye/2,Fn=Ye/Math.abs(Ye),Qn=k*Fn,Vn=Qn/2,ir=Qn*Math.sqrt(3)/2*U,or=(0,c.CR)([bn,bn+Bn-Vn,bn+Bn,bn+Bn+Vn,Cn],5),pr=or[0],Dr=or[1],li=or[2],ui=or[3],Hr=or[4];return rt?(this.point=[li,Ft-ir],[["L",pr,Ft],["L",Dr,Ft],["L",li,Ft-ir],["L",ui,Ft],["L",Hr,Ft]]):(this.point=[mt+ir,li],[["L",mt,pr],["L",mt,Dr],["L",mt+ir,li],["L",mt,ui],["L",mt,Hr]])},B.prototype.applyVisibility=function(){var P=this.attributes.visibility;P==="hidden"?(0,Di.Cp)(this):(0,Di.$Z)(this)},B.prototype.bindEvents=function(){this.label.on(z.Dk.BOUNDS_CHANGED,this.renderBackground)},B.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},B}(I.w),Ot=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;return k.hoverColor="#f5f5f5",k.selectedColor="#e6f7ff",k.background=k.appendChild(new z.UL({})),k.label=k.background.appendChild(new z.ZA({})),k}return Object.defineProperty(B.prototype,"padding",{get:function(){return(0,J.j)(this.style.padding)},enumerable:!1,configurable:!0}),B.prototype.renderLabel=function(){var P=this.style,k=P.label,U=P.value,rt=(0,w.zs)(this.attributes,"label");(0,Ct.Ys)(this.label).maybeAppend(".label",function(){return(0,Ne.S)(k)}).attr("className","label").styles(rt),this.label.attr("__data__",U)},B.prototype.renderBackground=function(){var P=this.label.getBBox(),k=(0,c.CR)(this.padding,4),U=k[0],rt=k[1],ct=k[2],lt=k[3],mt=P.width,Ft=P.height,ae=mt+lt+rt,me=Ft+U+ct,Oe=(0,w.zs)(this.attributes,"background"),_e=this.style,Ye=_e.width,mn=Ye===void 0?0:Ye,bn=_e.height,Cn=bn===void 0?0:bn,Bn=_e.selected;this.background.attr((0,c.pi)((0,c.pi)({},Oe),{width:Math.max(ae,mn),height:Math.max(me,Cn),fill:Bn?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(lt,", ").concat((me-Ft)/2,")")})},B.prototype.render=function(){this.renderLabel(),this.renderBackground()},B.prototype.bindEvents=function(){var P=this;this.addEventListener("pointerenter",function(){P.style.selected||P.background.attr("fill",P.hoverColor)}),this.addEventListener("pointerleave",function(){P.style.selected||P.background.attr("fill",P.style.backgroundFill)});var k=this;this.addEventListener("click",function(){var U=P.style,rt=U.label,ct=U.value,lt=U.onClick;lt==null||lt(ct,{label:rt,value:ct},k)})},B.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},B}(I.w),X=function(j){(0,c.ZT)(B,j);function B(P){var k,U,rt=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;rt.currentValue=(k=B.defaultOptions.style)===null||k===void 0?void 0:k.defaultValue,rt.isPointerInSelect=!1,rt.select=rt.appendChild(new z.UL({className:"select",style:{cursor:"pointer",width:0,height:0}})),rt.dropdown=rt.appendChild(new z.UL({className:"dropdown"}));var ct=rt.style.defaultValue;return ct&&(!((U=rt.style.options)===null||U===void 0)&&U.some(function(lt){return lt.value===ct}))&&(rt.currentValue=ct),rt}return B.prototype.setValue=function(P){this.currentValue=P,this.render()},B.prototype.getValue=function(){return this.currentValue},Object.defineProperty(B.prototype,"dropdownPadding",{get:function(){return(0,J.j)(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),B.prototype.renderSelect=function(){var P=this,k,U=this.style,rt=U.x,ct=U.y,lt=U.width,mt=U.height,Ft=U.bordered,ae=U.showDropdownIcon,me=(0,w.zs)(this.attributes,"select"),Oe=(0,w.zs)(this.attributes,"placeholder");this.select.attr((0,c.pi)((0,c.pi)({x:rt,y:ct,width:lt,height:mt},me),{fill:"#fff",strokeWidth:Ft?1:0}));var _e=this.dropdownPadding,Ye=10;ae&&(0,Ct.Ys)(this.select).maybeAppend(".dropdown-icon","path").style("d","M-5,-3.5 L0,3.5 L5,-3.5").style("transform","translate(".concat(rt+lt-Ye-_e[1]-_e[3],", ").concat(ct+mt/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var mn=(k=this.style.options)===null||k===void 0?void 0:k.find(function(Fn){return Fn.value===P.currentValue}),bn=(0,c.pi)({x:rt+_e[3]},Oe);(0,Ct.Ys)(this.select).selectAll(".placeholder").data(mn?[]:[1]).join(function(Fn){return Fn.append("text").attr("className","placeholder").styles(bn).style("y",function(){var Qn=this.getBBox();return ct+(mt-Qn.height)/2})},function(Fn){return Fn.styles(bn)},function(Fn){return Fn.remove()});var Cn=(0,w.zs)(this.attributes,"optionLabel"),Bn=(0,c.pi)({x:rt+_e[3]},Cn);(0,Ct.Ys)(this.select).selectAll(".value").data(mn?[mn]:[]).join(function(Fn){return Fn.append(function(Qn){return(0,Ne.S)(Qn.label)}).attr("className","value").styles(Bn).style("y",function(){var Qn=this.getBBox();return ct+(mt-Qn.height)/2})},function(Fn){return Fn.styles(Bn)},function(Fn){return Fn.remove()})},B.prototype.renderDropdown=function(){var P=this,k,U,rt=this.style,ct=rt.x,lt=rt.y,mt=rt.width,Ft=rt.height,ae=rt.options,me=rt.onSelect,Oe=rt.open,_e=(0,w.zs)(this.attributes,"dropdown"),Ye=(0,w.zs)(this.attributes,"option"),mn=this.dropdownPadding;(0,Ct.Ys)(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(ae,function(Bn){return Bn.value}).join(function(Bn){return Bn.append(function(Fn){return new Ot({className:"dropdown-item",style:(0,c.pi)((0,c.pi)((0,c.pi)({},Fn),Ye),{width:mt-mn[1]-mn[3],selected:Fn.value===P.currentValue,onClick:function(Qn,Vn,ir){P.setValue(Qn),me==null||me(Qn,Vn,ir),P.dispatchEvent(new z.Aw("change",{detail:{value:Qn,option:Vn,item:ir}})),(0,Di.Cp)(P.dropdown)}})})}).each(function(Fn,Qn){var Vn,ir=(Vn=this.parentNode)===null||Vn===void 0?void 0:Vn.children,or=ir.reduce(function(pr,Dr,li){return li<Qn&&(pr+=Dr.getBBox().height),pr},0);this.attr("transform","translate(".concat(mn[3],", ").concat(mn[0]+or,")"))})},function(Bn){return Bn.update(function(Fn){return{selected:Fn.value===P.currentValue}})},function(Bn){return Bn.remove()});var bn=(U=(k=this.dropdown.getElementsByClassName("dropdown-container"))===null||k===void 0?void 0:k[0])===null||U===void 0?void 0:U.getBBox(),Cn=_e.spacing;this.dropdown.attr((0,c.pi)({transform:"translate(".concat(ct,", ").concat(lt+Ft+Cn,")"),width:bn.width+mn[1]+mn[3],height:bn.height+mn[0]+mn[2]},_e)),!Oe&&(0,Di.Cp)(this.dropdown)},B.prototype.render=function(){this.renderSelect(),this.renderDropdown()},B.prototype.bindEvents=function(){var P=this;this.addEventListener("click",function(k){k.stopPropagation()}),this.select.addEventListener("click",function(){P.dropdown.style.visibility==="visible"?(0,Di.Cp)(P.dropdown):(0,Di.$Z)(P.dropdown)}),this.addEventListener("pointerenter",function(){P.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){P.isPointerInSelect=!1}),document==null||document.addEventListener("click",function(){P.isPointerInSelect||(0,Di.Cp)(P.dropdown)})},B.defaultOptions={style:{x:0,y:0,width:140,height:32,options:[],bordered:!0,defaultValue:"",selectRadius:8,selectStroke:"#d9d9d9",showDropdownIcon:!0,placeholderText:"\u8BF7\u9009\u62E9",placeholderFontSize:12,placeholderTextBaseline:"top",placeholderFill:"#c2c2c2",dropdownFill:"#fff",dropdownStroke:"#d9d9d9",dropdownRadius:8,dropdownShadowBlur:4,dropdownShadowColor:"rgba(0, 0, 0, 0.08)",dropdownPadding:8,dropdownSpacing:10,optionPadding:[8,12],optionFontSize:12,optionTextBaseline:"top",optionBackgroundFill:"#fff",optionBackgroundRadius:4,optionLabelFontSize:12,optionLabelTextBaseline:"top"}},B}(I.w),st=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{backgroundOpacity:B.backgroundOpacities.default}},B.defaultOptions,P))||this;return k.showBackground=!0,k.background=k.appendChild(new z.UL({})),k.icon=k.appendChild(new z.ZA({})),k}return Object.defineProperty(B.prototype,"label",{get:function(){return"BaseIcon"},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"lineWidth",{get:function(){return Math.log10(this.attributes.size)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"padding",{get:function(){return(0,J.j)(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"iconSize",{get:function(){var P=this.attributes.size,k=(0,c.CR)(this.padding,4),U=k[0],rt=k[1],ct=k[2],lt=k[3];return Math.max(P-Math.max(lt+rt,U+ct),this.lineWidth*2+1)},enumerable:!1,configurable:!0}),B.prototype.renderBackground=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.size,ct=rt/2,lt=(0,w.zs)(this.attributes,"background");this.background.attr((0,c.pi)({x:k-ct,y:U-ct,width:rt,height:rt},lt))},B.prototype.showIndicator=function(){if(this.label){var P=this.attributes.size,k=this.background.getBBox(),U=k.x,rt=k.y;this.indicator.update({x:U+P/2,y:rt-5,labelText:this.label,visibility:"visible"})}},B.prototype.hideIndicator=function(){this.indicator.update({visibility:"hidden"})},B.prototype.connectedCallback=function(){var P;j.prototype.connectedCallback.call(this);var k=this.attributes.size,U=this.background.getBBox(),rt=U.x,ct=U.y,lt=(P=this.ownerDocument)===null||P===void 0?void 0:P.defaultView;lt&&(this.indicator=lt.appendChild(new Wo({style:{x:rt+k/2,y:ct-k/2,visibility:"hidden",position:"top",radius:3,zIndex:100}})))},B.prototype.disconnectedCallback=function(){this.indicator.destroy()},B.prototype.render=function(){this.renderIcon(),this.showBackground&&this.renderBackground()},B.prototype.bindEvents=function(){var P=this,k=this.attributes.onClick;if(this.addEventListener("click",function(){k==null||k(P)}),this.showBackground){var U=function(){return P.background.attr({opacity:B.backgroundOpacities.default})},rt=function(){return P.background.attr({opacity:B.backgroundOpacities.hover})},ct=function(){return P.background.attr({opacity:B.backgroundOpacities.active})};this.addEventListener("pointerenter",function(){rt(),P.showIndicator()}),this.addEventListener("pointerleave",function(){U(),P.hideIndicator()}),this.addEventListener("pointerdown",function(){ct()}),this.addEventListener("pointerup",function(){U()})}},B.tag="IconBase",B.defaultOptions={style:{x:0,y:0,size:10,color:"#565758",backgroundRadius:4,backgroundFill:"#e2e2e2"}},B.backgroundOpacities={default:0,hover:.8,active:1},B}(I.w),xt=function(j,B){return B===void 0&&(B="#565758"),new z.y$({style:{fill:B,d:"M ".concat(j,",").concat(j," L -").concat(j,",0 L ").concat(j,",-").concat(j," Z"),transformOrigin:"center"}})},jt=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return B.prototype.arcPath=function(P,k,U){var rt=(0,c.CR)([U,U],2),ct=rt[0],lt=rt[1],mt=function(mn){return[P+U*Math.cos(mn),k+U*Math.sin(mn)]},Ft=(0,c.CR)(mt(-5/4*Math.PI),2),ae=Ft[0],me=Ft[1],Oe=(0,c.CR)(mt(1/4*Math.PI),2),_e=Oe[0],Ye=Oe[1];return"M".concat(ae,",").concat(me,",A").concat(ct,",").concat(lt,",0,1,1,").concat(_e,",").concat(Ye)},Object.defineProperty(B.prototype,"label",{get:function(){return"\u91CD\u7F6E"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this.iconSize,lt=this.lineWidth,mt=lt+.5;(0,Ct.Ys)(this.icon).maybeAppend(".reset","path").styles({stroke:rt,lineWidth:lt,d:this.arcPath(k,U,ct/2-lt),markerStart:xt(mt,rt)})},B}(st),$t=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u5FEB\u9000"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this.iconSize,lt=ct/2,mt=ct/2/Math.pow(3,.5),Ft=[[k,U],[k,U-mt],[k-lt,U],[k,U+mt],[k,U],[k+lt,U-mt],[k+lt,U+mt],[k,U]];(0,Ct.Ys)(this.icon).maybeAppend(".backward","polygon").styles({points:Ft,fill:rt})},B}(st),ee=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u5FEB\u8FDB"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this.iconSize,lt=ct/2,mt=ct/2/Math.pow(3,.5),Ft=[[k,U],[k,U-mt],[k+lt,U],[k,U+mt],[k,U],[k-lt,U-mt],[k-lt,U+mt],[k,U]];(0,Ct.Ys)(this.icon).maybeAppend(".forward","polygon").styles({points:Ft,fill:rt})},B}(st),De=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u64AD\u653E"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this.iconSize,lt=ct/3*Math.pow(3,.5)*.8,mt=[[k+lt,U],[k-lt/2,U-ct/2*.8],[k-lt/2,U+ct/2*.8],[k+lt,U]];(0,Ct.Ys)(this.icon).maybeAppend(".play","polygon").styles({points:mt,fill:rt})},B}(st),Fe=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u6682\u505C"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this.iconSize,lt=ct/3,mt=[[k-lt,U-ct/2],[k-lt,U+ct/2],[k-lt/2,U+ct/2],[k-lt/2,U-ct/2],[k-lt,U-ct/2],[k+lt/2,U-ct/2],[k+lt/2,U+ct/2],[k+lt,U+ct/2],[k+lt,U-ct/2]];(0,Ct.Ys)(this.icon).maybeAppend(".pause","polygon").styles({points:mt,fill:rt})},B}(st),Je=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u8303\u56F4\u65F6\u95F4"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this,lt=ct.iconSize,mt=ct.lineWidth,Ft=mt;(0,Ct.Ys)(this.icon).maybeAppend(".left-line","line").styles({x1:k-lt/2,y1:U-lt/2,x2:k-lt/2,y2:U+lt/2,stroke:rt,lineWidth:mt}),(0,Ct.Ys)(this.icon).maybeAppend(".right-line","line").styles({x1:k+lt/2,y1:U-lt/2,x2:k+lt/2,y2:U+lt/2,stroke:rt,lineWidth:mt}),(0,Ct.Ys)(this.icon).maybeAppend(".left-arrow","line").styles({x1:k,y1:U,x2:k-lt/2+Ft*2,y2:U,stroke:rt,lineWidth:mt,markerEnd:xt(mt*2,rt)}),(0,Ct.Ys)(this.icon).maybeAppend(".right-arrow","line").styles({x1:k,y1:U,x2:k+lt/2-Ft*2,y2:U,stroke:rt,lineWidth:mt,markerEnd:xt(mt*2,rt)})},B}(st),cn=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u5355\u4E00\u65F6\u95F4"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this,lt=ct.iconSize,mt=ct.lineWidth;(0,Ct.Ys)(this.icon).maybeAppend(".line","line").styles({x1:k,y1:U-lt/2,x2:k,y2:U+lt/2,stroke:rt,lineWidth:mt});var Ft=mt;(0,Ct.Ys)(this.icon).maybeAppend(".left-arrow","line").styles({x1:k-lt/2-Ft*2,y1:U,x2:k-Ft*2,y2:U,stroke:rt,lineWidth:mt,markerEnd:xt(mt*2,rt)}),(0,Ct.Ys)(this.icon).maybeAppend(".right-arrow","line").styles({x1:k+lt/2+Ft*2,y1:U,x2:k+Ft*2,y2:U,stroke:rt,lineWidth:mt,markerEnd:xt(mt*2,rt)})},B}(st),an=function(j){return[[-j/2,-j/2],[-j/2,j/2],[j/2,j/2]]},Tn=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u6298\u7EBF\u56FE"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this,lt=ct.iconSize,mt=ct.lineWidth,Ft=mt,ae=(lt-Ft*2-mt)/4,me=(lt-Ft*2-mt)/2,Oe=(0,c.CR)([k-lt/2+Ft,U+lt/2-Ft*2],2),_e=Oe[0],Ye=Oe[1];(0,Ct.Ys)(this.icon).maybeAppend(".coordinate","polyline").styles({points:an(lt).map(function(mn){var bn=(0,c.CR)(mn,2),Cn=bn[0],Bn=bn[1];return[Cn+k,Bn+U]}),stroke:rt,lineWidth:mt}),(0,Ct.Ys)(this.icon).maybeAppend(".line","polyline").styles({points:[[_e,Ye],[_e+ae,Ye-me],[_e+ae*2,Ye],[_e+ae*4,Ye-me*2]],stroke:rt,lineWidth:mt})},B}(st),Mn=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u6761\u5F62\u56FE"},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"data",{get:function(){return[1,4,2,4,3]},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.data,k=this.attributes,U=k.x,rt=k.y,ct=k.color,lt=this,mt=lt.iconSize,Ft=lt.lineWidth,ae=Ft,me=(mt-ae)/P.length,Oe=(mt-ae*2)/4,_e=(0,c.CR)([U-mt/2+ae*2,rt+mt/2-ae],2),Ye=_e[0],mn=_e[1];(0,Ct.Ys)(this.icon).maybeAppend(".coordinate","polyline").styles({points:an(mt).map(function(bn){var Cn=(0,c.CR)(bn,2),Bn=Cn[0],Fn=Cn[1];return[Bn+U,Fn+rt]}),stroke:ct,lineWidth:Ft}),(0,Ct.Ys)(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(bn,Cn){return{value:bn,index:Cn}})).join(function(bn){return bn.append("line").attr("className","column").style("x1",function(Cn){var Bn=Cn.index;return Ye+me*Bn}).style("y1",mn).style("x2",function(Cn){var Bn=Cn.index;return Ye+me*Bn}).style("y2",function(Cn){var Bn=Cn.value;return mn-Oe*Bn}).styles({y1:mn,stroke:ct,lineWidth:Ft})})},B}(st),Ln=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{color:"#d8d9d9"}},P))||this;return k.showBackground=!1,k}return B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.color,ct=this,lt=ct.iconSize,mt=ct.lineWidth;(0,Ct.Ys)(this.icon).maybeAppend(".split","line").styles({x1:k,y1:U-lt/2,x2:k,y2:U+lt/2,stroke:rt,lineWidth:mt})},B}(st),jn=function(j){(0,c.ZT)(B,j);function B(){var P=j.apply(this,(0,c.ev)([],(0,c.CR)(arguments),!1))||this;return P.showBackground=!1,P}return Object.defineProperty(B.prototype,"padding",{get:function(){return(0,J.j)(0)},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.iconSize,k=this.attributes,U=k.x,rt=k.y,ct=k.speed,lt=ct===void 0?1:ct,mt=(0,vs.Z)(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),Ft=(0,_.Z)(P,20,1/0),ae=20,me=(0,c.pi)((0,c.pi)({},mt),{x:U-Ft/2,y:rt-ae/2,width:Ft,height:ae,defaultValue:lt,bordered:!1,showDropdownIcon:!1,selectRadius:2,dropdownPadding:this.padding,dropdownRadius:2,dropdownSpacing:P/5,placeholderFontSize:P/2,optionPadding:0,optionLabelFontSize:P/2,optionBackgroundRadius:1,options:[{label:"1x",value:1},{label:"1.5x",value:1.5},{label:"2x",value:2}]});(0,Ct.Ys)(this.icon).maybeAppend(".speed",function(){return new X({style:me})}).attr("className","speed").each(function(){this.update(me)})},B.tag="SpeedSelect",B}(st),In=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,P)||this;return k.icon=k.appendChild(new z.ZA({})),k.currentType=k.attributes.type,k}return B.prototype.getType=function(){return this.currentType},B.prototype.render=function(){var P=this,k=this.attributes,U=k.onChange,rt=(0,c._T)(k,["onChange"]);(0,Ct.Ys)(this.icon).selectAll(".icon").data([this.currentType]).join(function(ct){return ct.append(function(lt){var mt,Ft=(mt=P.toggles.find(function(ae){var me=(0,c.CR)(ae,1),Oe=me[0];return Oe===lt}))===null||mt===void 0?void 0:mt[1];if(!Ft)throw new Error("Invalid type: ".concat(lt));return new Ft({})}).attr("className","icon").styles(rt,!1).update({})},function(ct){return ct.styles({restStyles:rt}).update({})},function(ct){return ct.remove()})},B.prototype.bindEvents=function(){var P=this,k=this.attributes.onChange;this.addEventListener("click",function(U){U.preventDefault(),U.stopPropagation();var rt=(P.toggles.findIndex(function(lt){var mt=(0,c.CR)(lt,1),Ft=mt[0];return Ft===P.currentType})+1)%P.toggles.length,ct=P.toggles[rt][0];k==null||k(P.currentType),P.currentType=ct,P.render()})},B.tag="ToggleIcon",B}(I.w),$n=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{type:"play"}},P))||this;return k.toggles=[["play",De],["pause",Fe]],k}return B}(In),sr=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{type:"range"}},P))||this;return k.toggles=[["range",Je],["value",cn]],k}return B}(In),rr=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{type:"column"}},P))||this;return k.toggles=[["line",Tn],["column",Mn]],k}return B}(In),dr={reset:jt,speed:jn,backward:$t,playPause:$n,forward:ee,selectionType:sr,chartType:rr,split:Ln},gr=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;return k.background=k.appendChild(new z.UL({})),k.functions=k.appendChild(new z.ZA({})),k}return Object.defineProperty(B.prototype,"padding",{get:function(){return(0,J.j)(this.attributes.padding)},enumerable:!1,configurable:!0}),B.prototype.renderBackground=function(){var P=this.style,k=P.x,U=P.y,rt=P.width,ct=P.height,lt=(0,w.zs)(this.attributes,"background");this.background.attr((0,c.pi)({x:k,y:U,width:rt,height:ct},lt))},B.prototype.renderFunctions=function(){var P=this,k,U=this.attributes,rt=U.functions,ct=U.iconSize,lt=U.iconSpacing,mt=U.x,Ft=U.y,ae=U.width,me=U.height,Oe=U.align,_e=(0,c.CR)(this.padding,4),Ye=_e[1],mn=_e[3],bn=rt.reduce(function(Fn,Qn){return Fn.length&&Qn.length?Fn.concat.apply(Fn,(0,c.ev)(["split"],(0,c.CR)(Qn),!1)):Fn.concat.apply(Fn,(0,c.ev)([],(0,c.CR)(Qn),!1))},[]),Cn=bn.length*(ct+lt)-lt,Bn={left:mn+ct/2,center:(ae-Cn)/2+ct/2,right:ae-Cn-mn-Ye+ct/2}[Oe]||0;(k=this.speedSelect)===null||k===void 0||k.destroy(),this.functions.removeChildren(),bn.forEach(function(Fn,Qn){var Vn,ir=dr[Fn],or={x:mt+Qn*(ct+lt)+Bn,y:Ft+me/2,size:ct};if(ir===jn?(or.speed=P.attributes.speed,or.onSelect=function(Dr){return P.handleFunctionChange(Fn,{value:Dr})}):[$n,sr,rr].includes(ir)?(or.onChange=function(Dr){return P.handleFunctionChange(Fn,{value:Dr})},ir===$n&&(or.type=P.attributes.state==="play"?"pause":"play"),ir===sr&&(or.type=P.attributes.selectionType==="range"?"value":"range"),ir===rr&&(or.type=P.attributes.chartType==="line"?"column":"line")):or.onClick=function(){return P.handleFunctionChange(Fn,{value:Fn})},ir===jn){var pr=(Vn=P.ownerDocument)===null||Vn===void 0?void 0:Vn.defaultView;pr&&(P.speedSelect=new ir({style:(0,c.pi)((0,c.pi)({},or),{zIndex:100})}),pr.appendChild(P.speedSelect))}else P.functions.appendChild(new ir({style:or}))})},B.prototype.disconnectedCallback=function(){var P;j.prototype.disconnectedCallback.call(this),(P=this.speedSelect)===null||P===void 0||P.destroy()},B.prototype.render=function(){this.renderBackground(),this.renderFunctions()},B.prototype.handleFunctionChange=function(P,k){var U=this.attributes.onChange;U==null||U(P,k)},B.defaultOptions={style:{x:0,y:0,width:300,height:40,padding:0,align:"center",iconSize:25,iconSpacing:0,speed:1,state:"pause",chartType:"line",selectionType:"range",backgroundFill:"#fbfdff",backgroundStroke:"#ebedf0",functions:[["reset","speed"],["backward","playPause","forward"],["selectionType","chartType"]]}},B}(I.w),mr=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;return k.bindEvents(),k}return B.prototype.bindEvents=function(){var P=this;this.addEventListener("mouseenter",function(){P.attr("lineWidth",Math.ceil(+(P.style.r||0)/2))}),this.addEventListener("mouseleave",function(){P.attr("lineWidth",0)})},B.defaultOptions={style:{r:5,fill:"#3f7cf7",lineWidth:0,stroke:"#3f7cf7",strokeOpacity:.5,cursor:"pointer"}},B}(z.Cd),_r=function(j){(0,c.ZT)(B,j);function B(P){return j.call(this,(0,S.n)({},B.defaultOptions,P))||this}return B.prototype.renderBackground=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.width,ct=P.height,lt=(0,w.zs)(this.attributes,"background");(0,Ct.Ys)(this).maybeAppend("background","rect").attr("className","background").styles((0,c.pi)({x:k-rt/2,y:U-ct/2,width:rt,height:ct},lt))},B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.iconSize,ct=(0,w.zs)(this.attributes,"icon"),lt=1,mt=rt/2;(0,Ct.Ys)(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles((0,c.pi)({x1:k-lt,y1:U-mt,x2:k-lt,y2:U+mt},ct)),(0,Ct.Ys)(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles((0,c.pi)({x1:k+lt,y1:U-mt,x2:k+lt,y2:U+mt},ct))},B.prototype.renderBorder=function(){var P=this.attributes,k=P.x,U=P.y,rt=P.width,ct=P.height,lt=P.type,mt=(0,w.zs)(this.attributes,"border"),Ft=lt==="start"?+rt/2:-rt/2;(0,Ct.Ys)(this).maybeAppend("border","line").attr("className","border").styles((0,c.pi)({x1:Ft+k,y1:U-ct/2,x2:Ft+k,y2:U+ct/2},mt))},B.prototype.render=function(){this.renderBackground(),this.renderIcon(),this.renderBorder()},B.defaultOptions={style:{x:0,y:0,width:10,height:50,iconSize:10,type:"start",backgroundFill:"#fff",backgroundFillOpacity:.5,iconStroke:"#9a9a9a",iconLineWidth:1,borderStroke:"#e8e8e8",borderLineWidth:1}},B}(I.w);function Or(j,B){return typeof j=="number"?Zr(j):Nr(j,B)}function Nr(j,B){var P=new Date(j);switch(B){case"half-hour":case"hour":case"four-hour":return[0,6,12,18].includes(P.getHours())&&P.getMinutes()===0?F(P,`HH:mm
|
|
|
YYYY-MM-DD`):F(P,"HH:mm");case"half-day":return P.getHours()<12?`AM
|
|
|
`.concat(F(P,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(P.getDate())?F(P,`DD
|
|
|
YYYY-MM`):F(P,"DD");case"week":return P.getDate()<=7?F(P,`DD
|
|
|
YYYY-MM`):F(P,"DD");case"month":return[0,6].includes(P.getMonth())?F(P,`MM\u6708
|
|
|
YYYY`):F(P,"MM\u6708");case"season":return[0].includes(P.getMonth())?F(P,`MM\u6708
|
|
|
YYYY`):F(P,"MM\u6708");case"year":return F(P,"YYYY");default:return F(P,"YYYY-MM-DD HH:mm")}}function Zr(j){var B=String(Math.floor(j/3600)).padStart(2,"0"),P=String(Math.floor(j%3600/60)).padStart(2,"0"),k=String(Math.floor(j%60)).padStart(2,"0");return j<3600?"".concat(P,":").concat(k):"".concat(B,":").concat(P,":").concat(k)}var Wr=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;k.axis=k.appendChild(new ja({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),k.timeline=k.appendChild(new ks({style:{onChange:function(me){k.handleSliderChange(me)}}})),k.controller=k.appendChild(new gr({})),k.states={},k.handleSliderChange=function(me){var Oe=function(){var _e=k.states.values;return Array.isArray(_e)?(0,c.ev)([],(0,c.CR)(_e),!1):_e}();k.setBySliderValues(me),k.dispatchOnChange(Oe)};var U=k.attributes,rt=U.selectionType,ct=U.chartType,lt=U.speed,mt=U.state,Ft=U.playMode,ae=U.values;return k.states={chartType:ct,playMode:Ft,selectionType:rt,speed:lt,state:mt},k.setByTimebarValues(ae),k}return Object.defineProperty(B.prototype,"data",{get:function(){var P=this.attributes.data,k=function(U,rt){return U.time<rt.time?-1:U.time>rt.time?1:0};return P.sort(k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"space",{get:function(){var P=this.attributes,k=P.x,U=P.y,rt=P.width,ct=P.height,lt=P.type,mt=P.controllerHeight,Ft=(0,_.Z)(+ct-mt,0,+ct),ae=new R.b(k,U+ +ct-mt,+rt,mt),me,Oe=0;lt==="chart"?(Oe=35,me=new R.b(k,U+Ft-Oe,+rt,Oe)):me=new R.b;var _e=lt==="time"?10:Ft,Ye=new R.b(k,U+(lt==="time"?Ft:Ft-_e),+rt,_e-Oe);return{axisBBox:me,controllerBBox:ae,timelineBBox:Ye}},enumerable:!1,configurable:!0}),B.prototype.setBySliderValues=function(P){var k,U,rt=this.data,ct=(0,c.CR)(Array.isArray(P)?P:[0,P],2),lt=ct[0],mt=ct[1],Ft=rt.length,ae=rt[Math.floor(lt*Ft)],me=rt[Math.ceil(mt*Ft)-(Array.isArray(P)?0:1)];this.states.values=[(k=ae==null?void 0:ae.time)!==null&&k!==void 0?k:rt[0].time,(U=me==null?void 0:me.time)!==null&&U!==void 0?U:1/0]},B.prototype.setByTimebarValues=function(P){var k,U,rt,ct=this.data,lt=(0,c.CR)(Array.isArray(P)?P:[void 0,P],2),mt=lt[0],Ft=lt[1],ae=ct.find(function(Oe){var _e=Oe.time;return _e===mt}),me=ct.find(function(Oe){var _e=Oe.time;return _e===Ft});this.states.values=[(k=ae==null?void 0:ae.time)!==null&&k!==void 0?k:(U=ct[0])===null||U===void 0?void 0:U.time,(rt=me==null?void 0:me.time)!==null&&rt!==void 0?rt:1/0]},B.prototype.setByIndex=function(P){var k,U,rt,ct,lt=this.data,mt=(0,c.CR)(P,2),Ft=mt[0],ae=mt[1];this.states.values=[(U=(k=lt[Ft])===null||k===void 0?void 0:k.time)!==null&&U!==void 0?U:lt[0].time,(ct=(rt=this.data[ae])===null||rt===void 0?void 0:rt.time)!==null&&ct!==void 0?ct:1/0]},Object.defineProperty(B.prototype,"sliderValues",{get:function(){var P=this.states,k=P.values,U=P.selectionType,rt=(0,c.CR)(Array.isArray(k)?k:[void 0,k],2),ct=rt[0],lt=rt[1],mt=this.data,Ft=mt.length,ae=U==="value",me=function(){var _e=mt.findIndex(function(Ye){var mn=Ye.time;return mn===ct});return ae?0:_e>-1?_e/Ft:0},Oe=function(){if(lt===1/0)return 1;var _e=mt.findIndex(function(Ye){var mn=Ye.time;return mn===lt});return _e>-1?_e/Ft:ae?.5:1};return[me(),Oe()]},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"values",{get:function(){var P=this.states,k=P.values,U=P.selectionType,rt=(0,c.CR)(Array.isArray(k)?k:[this.data[0].time,k],2),ct=rt[0],lt=rt[1];return U==="value"?lt:[ct,lt]},enumerable:!1,configurable:!0}),B.prototype.getDatumByRatio=function(P){var k=this.data,U=k.length,rt=Math.floor(P*(U-1));return k[rt]},Object.defineProperty(B.prototype,"chartHandleIconShape",{get:function(){var P=this.states.selectionType,k=this.space.timelineBBox.height;return P==="range"?function(U){return new _r({style:{type:U,height:k,iconSize:k/6}})}:function(){return new z.x1({style:{x1:0,y1:-k/2,x2:0,y2:k/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),B.prototype.getChartStyle=function(P){var k=this,U=P.x,rt=P.y,ct=P.width,lt=P.height,mt=this.states,Ft=mt.selectionType,ae=mt.chartType,me=this.data,Oe=this.attributes,_e=Oe.type,Ye=Oe.labelFormatter,mn=(0,w.zs)(this.attributes,"chart"),bn=mn.type,Cn=(0,c._T)(mn,["type"]),Bn=Ft==="range";if(_e==="time")return(0,c.pi)({handleIconShape:function(){return new mr({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:Bn?-15:0,autoFitLabel:Bn,handleSpacing:Bn?-15:0,trackFill:"#edeeef",trackLength:ct,trackOpacity:.5,trackRadius:lt/2,trackSize:lt/2,type:Ft,values:this.sliderValues,formatter:function(Vn){if(Ye)return Ye(Vn);var ir=k.getDatumByRatio(Vn).time;return typeof ir=="number"?Zr(ir):F(ir,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(U,", ").concat(rt,")"),zIndex:1},Cn);var Fn=Ft==="range"?5:0,Qn=me.map(function(Vn){var ir=Vn.value;return ir});return(0,c.pi)({handleIconOffset:Fn,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:Qn,sparklineType:ae,sparklineScale:.8,trackLength:ct,trackSize:lt,type:Ft,values:this.sliderValues,transform:"translate(".concat(U,", ").concat(rt,")"),zIndex:1},Cn)},B.prototype.renderChart=function(P){P===void 0&&(P=this.space.timelineBBox),this.timeline.update(this.getChartStyle(P))},B.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},B.prototype.getAxisStyle=function(P){var k=this.data,U=this.attributes,rt=U.interval,ct=U.labelFormatter,lt=(0,w.zs)(this.attributes,"axis"),mt=P.x,Ft=P.y,ae=P.width,me=(0,c.ev)((0,c.ev)([],(0,c.CR)(k),!1),[{time:0}],!1).map(function(_e,Ye,mn){var bn=_e.time;return{label:"".concat(bn),value:Ye/(mn.length-1),time:bn}}),Oe=(0,c.pi)({startPos:[mt,Ft],endPos:[mt+ae,Ft],data:me,labelFilter:function(_e,Ye){return Ye<me.length-1},labelFormatter:function(_e){var Ye=_e.time;return ct?ct(Ye):Or(Ye,rt)}},lt);return Oe},B.prototype.renderAxis=function(P){P===void 0&&(P=this.space.axisBBox);var k=this.attributes.type;k==="chart"&&this.axis.update(this.getAxisStyle(P))},B.prototype.renderController=function(P){P===void 0&&(P=this.space.controllerBBox);var k=this.attributes.type,U=this.states,rt=U.state,ct=U.speed,lt=U.selectionType,mt=U.chartType,Ft=(0,w.zs)(this.attributes,"controller"),ae=this,me=(0,c.pi)((0,c.pi)((0,c.pi)({},P),{iconSize:20,speed:ct,state:rt,selectionType:lt,chartType:mt,onChange:function(Oe,_e){var Ye=_e.value;switch(Oe){case"reset":ae.internalReset();break;case"speed":ae.handleSpeedChange(Ye);break;case"backward":ae.internalBackward();break;case"playPause":Ye==="play"?ae.internalPlay():ae.internalPause();break;case"forward":ae.internalForward();break;case"selectionType":ae.handleSelectionTypeChange(Ye);break;case"chartType":ae.handleChartTypeChange(Ye);break;default:break}}}),Ft);k==="time"&&(me.functions=[["reset","speed"],["backward","playPause","forward"],["selectionType"]]),this.controller.update(me)},B.prototype.dispatchOnChange=function(P){var k=this.data,U=this.attributes.onChange,rt=this.states,ct=rt.values,lt=rt.selectionType,mt=(0,c.CR)(ct,2),Ft=mt[0],ae=mt[1],me=ae===1/0?k.at(-1).time:ae,Oe=lt==="range"?[Ft,me]:me,_e=function(Ye,mn){return Array.isArray(Ye)?Array.isArray(mn)?Ye[0]===mn[0]&&(Ye[1]===mn[1]||Ye[1]===1/0||mn[1]===1/0):!1:Array.isArray(mn)?!1:Ye===mn};(!P||!_e(P,Oe))&&(U==null||U(lt==="range"?[Ft,me]:me))},B.prototype.internalReset=function(P){var k,U,rt=this.states.selectionType;this.internalPause(),this.setBySliderValues(rt==="range"?[0,1]:[0,0]),this.renderController(),this.updateSelection(),P||((U=(k=this.attributes)===null||k===void 0?void 0:k.onReset)===null||U===void 0||U.call(k),this.dispatchOnChange())},B.prototype.reset=function(){this.internalReset()},B.prototype.moveSelection=function(P,k){var U=this.data,rt=U.length,ct=this.states,lt=ct.values,mt=ct.selectionType,Ft=ct.playMode,ae=(0,c.CR)(lt,2),me=ae[0],Oe=ae[1],_e=U.findIndex(function(Fn){var Qn=Fn.time;return Qn===me}),Ye=U.findIndex(function(Fn){var Qn=Fn.time;return Qn===Oe});Ye===-1&&(Ye=rt);var mn=P==="backward"?-1:1,bn;mt==="range"?Ft==="acc"?(bn=[_e,Ye+mn],mn===-1&&_e===Ye&&(bn=[_e,rt])):bn=[_e+mn,Ye+mn]:bn=[_e,Ye+mn];var Cn=function(Fn){var Qn=(0,c.CR)(Fn.sort(function(pr,Dr){return pr-Dr}),2),Vn=Qn[0],ir=Qn[1],or=function(pr){return(0,_.Z)(pr,0,rt)};return ir>rt?mt==="value"?[0,0]:Ft==="acc"?[or(Vn),or(Vn)]:[0,or(ir-Vn)]:Vn<0?Ft==="acc"?[0,or(ir)]:[or(Vn+rt-ir),rt]:[or(Vn),or(ir)]},Bn=Cn(bn);return this.setByIndex(Bn),this.updateSelection(),Bn},B.prototype.internalBackward=function(P){var k,U,rt=this.moveSelection("backward",P);return P||((U=(k=this.attributes)===null||k===void 0?void 0:k.onBackward)===null||U===void 0||U.call(k),this.dispatchOnChange()),rt},B.prototype.backward=function(){this.internalBackward()},B.prototype.internalPlay=function(P){var k=this,U,rt,ct=this.data,lt=this.attributes.loop,mt=this.states.speed,Ft=mt===void 0?1:mt;this.playInterval=window.setInterval(function(){var ae=k.internalForward();ae[1]===ct.length&&!lt&&(k.internalPause(),k.renderController())},1e3/Ft),this.states.state="play",!P&&((rt=(U=this.attributes)===null||U===void 0?void 0:U.onPlay)===null||rt===void 0||rt.call(U))},B.prototype.play=function(){this.internalPlay()},B.prototype.internalPause=function(P){var k,U;clearInterval(this.playInterval),this.states.state="pause",!P&&((U=(k=this.attributes)===null||k===void 0?void 0:k.onPause)===null||U===void 0||U.call(k))},B.prototype.pause=function(){this.internalPause()},B.prototype.internalForward=function(P){var k,U,rt=this.moveSelection("forward",P);return P||((U=(k=this.attributes)===null||k===void 0?void 0:k.onForward)===null||U===void 0||U.call(k),this.dispatchOnChange()),rt},B.prototype.forward=function(){this.internalForward()},B.prototype.handleSpeedChange=function(P){var k,U;this.states.speed=P;var rt=this.states.state;rt==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(U=(k=this.attributes)===null||k===void 0?void 0:k.onSpeedChange)===null||U===void 0||U.call(k,P)},B.prototype.handleSelectionTypeChange=function(P){var k,U;this.states.selectionType=P,this.renderChart(),(U=(k=this.attributes)===null||k===void 0?void 0:k.onSelectionTypeChange)===null||U===void 0||U.call(k,P)},B.prototype.handleChartTypeChange=function(P){var k,U;this.states.chartType=P,this.renderChart(),(U=(k=this.attributes)===null||k===void 0?void 0:k.onChartTypeChange)===null||U===void 0||U.call(k,P)},B.prototype.render=function(){var P=this.space,k=P.axisBBox,U=P.controllerBBox,rt=P.timelineBBox;this.renderController(U),this.renderAxis(k),this.renderChart(rt),this.states.state==="play"&&this.internalPlay()},B.prototype.destroy=function(){j.prototype.destroy.call(this),this.internalPause(!0)},B.defaultOptions={style:{x:0,y:0,axisLabelFill:"#6e6e6e",axisLabelTextAlign:"left",axisLabelTextBaseline:"top",axisLabelTransform:"translate(5, -12)",axisLineLineWidth:1,axisLineStroke:"#cacdd1",axisTickLength:15,axisTickLineWidth:1,axisTickStroke:"#cacdd1",chartShowLabel:!1,chartType:"line",controllerAlign:"center",controllerHeight:40,data:[],interval:"day",loop:!1,playMode:"acc",selectionType:"range",type:"time"}},B}(I.w)},75242:function(yt,Et,y){"use strict";y.d(Et,{u:function(){return F}});var c=y(80813),_=y(85580);function I(it,G){return!it||!G?it:it.replace(/\\?\{([^{}]+)\}/g,function(kt,gt){return kt.charAt(0)==="\\"?kt.slice(1):G[gt]===void 0?"":G[gt]})}var z=I,S=y(97304),R=function(it,G){if(G==null){it.innerHTML="";return}it.replaceChildren?Array.isArray(G)?it.replaceChildren.apply(it,(0,c.ev)([],(0,c.CR)(G),!1)):it.replaceChildren(G):(it.innerHTML="",Array.isArray(G)?G.forEach(function(kt){return it.appendChild(kt)}):it.appendChild(G))},w=y(88839),N=y(17911);function D(it){return it===void 0&&(it=""),{CONTAINER:"".concat(it,"tooltip"),TITLE:"".concat(it,"tooltip-title"),LIST:"".concat(it,"tooltip-list"),LIST_ITEM:"".concat(it,"tooltip-list-item"),NAME:"".concat(it,"tooltip-list-item-name"),MARKER:"".concat(it,"tooltip-list-item-marker"),NAME_LABEL:"".concat(it,"tooltip-list-item-name-label"),VALUE:"".concat(it,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(it,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(it,"tooltip-crosshair-y")}}var A={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function L(it){var G;it===void 0&&(it="");var kt=D(it);return G={},G[".".concat(kt.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},G[".".concat(kt.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},G[".".concat(kt.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},G[".".concat(kt.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},G[".".concat(kt.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},G[".".concat(kt.NAME)]={display:"flex","align-items":"center","max-width":"216px"},G[".".concat(kt.NAME_LABEL)]=(0,c.pi)({flex:1},A),G[".".concat(kt.VALUE)]=(0,c.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},A),G[".".concat(kt.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},G[".".concat(kt.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},G}var F=function(it){(0,c.ZT)(G,it);function G(kt){var gt=this,Q,Rt,Ct=(Rt=(Q=kt.style)===null||Q===void 0?void 0:Q.template)===null||Rt===void 0?void 0:Rt.prefixCls,Ht=D(Ct);return gt=it.call(this,kt,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(Ht.CONTAINER,'"></div>'),title:'<div class="'.concat(Ht.TITLE,'"></div>'),item:'<li class="'.concat(Ht.LIST_ITEM,`" data-index={index}>
|
|
|
<span class="`).concat(Ht.NAME,`">
|
|
|
<span class="`).concat(Ht.MARKER,`" style="background:{color}"></span>
|
|
|
<span class="`).concat(Ht.NAME_LABEL,`" title="{name}">{name}</span>
|
|
|
</span>
|
|
|
<span class="`).concat(Ht.VALUE,`" title="{value}">{value}</span>
|
|
|
</li>`)},style:L(Ct)})||this,gt.timestamp=-1,gt.prevCustomContentKey=gt.attributes.contentKey,gt.initShape(),gt.render(gt.attributes,gt),gt}return Object.defineProperty(G.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),G.prototype.getContainer=function(){return this.element},Object.defineProperty(G.prototype,"elementSize",{get:function(){var kt=this.element.offsetWidth,gt=this.element.offsetHeight;return{width:kt,height:gt}},enumerable:!1,configurable:!0}),Object.defineProperty(G.prototype,"HTMLTooltipItemsElements",{get:function(){var kt=this.attributes,gt=kt.data,Q=kt.template;return gt.map(function(Rt,Ct){var Ht=Rt.name,de=Ht===void 0?"":Ht,ue=Rt.color,Te=ue===void 0?"black":ue,be=Rt.index,we=(0,c._T)(Rt,["name","color","index"]),re=(0,c.pi)({name:de,color:Te,index:be!=null?be:Ct},we);return(0,_.L)(z(Q.item,re))})},enumerable:!1,configurable:!0}),G.prototype.render=function(kt,gt){this.renderHTMLTooltipElement(),this.updatePosition()},G.prototype.destroy=function(){var kt;(kt=this.element)===null||kt===void 0||kt.remove(),it.prototype.destroy.call(this)},G.prototype.show=function(kt,gt){var Q=this;if(kt!==void 0&>!==void 0){var Rt=this.element.style.visibility==="hidden",Ct=function(){Q.attributes.x=kt!=null?kt:Q.attributes.x,Q.attributes.y=gt!=null?gt:Q.attributes.y,Q.updatePosition()};Rt?this.closeTransition(Ct):Ct()}this.element.style.visibility="visible"},G.prototype.hide=function(kt,gt){kt===void 0&&(kt=0),gt===void 0&&(gt=0);var Q=this.attributes.enterable;Q&&this.isCursorEntered(kt,gt)||(this.element.style.visibility="hidden")},G.prototype.initShape=function(){var kt=this.attributes.template;this.element=(0,_.L)(kt.container),this.id&&this.element.setAttribute("id",this.id)},G.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var kt=this.attributes.content;kt&&(typeof kt=="string"?this.element.innerHTML=kt:R(this.element,kt))}},G.prototype.renderHTMLTooltipElement=function(){var kt,gt,Q=this.attributes,Rt=Q.template,Ct=Q.title,Ht=Q.enterable,de=Q.style,ue=Q.content,Te=D(Rt.prefixCls),be=this.element;if(this.element.style.pointerEvents=Ht?"auto":"none",ue)this.renderCustomContent();else{Ct?(be.innerHTML=Rt.title,be.getElementsByClassName(Te.TITLE)[0].innerHTML=Ct):(gt=(kt=be.getElementsByClassName(Te.TITLE))===null||kt===void 0?void 0:kt[0])===null||gt===void 0||gt.remove();var we=this.HTMLTooltipItemsElements,re=document.createElement("ul");re.className=Te.LIST,R(re,we);var Ge=this.element.querySelector(".".concat(Te.LIST));Ge?Ge.replaceWith(re):be.appendChild(re)}(0,w.MC)(be,de)},G.prototype.getRelativeOffsetFromCursor=function(kt){var gt=this.attributes,Q=gt.position,Rt=gt.offset,Ct=kt||Q,Ht=Ct.split("-"),de={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},ue=this.elementSize,Te=ue.width,be=ue.height,we=[-Te/2,-be/2];return Ht.forEach(function(re){var Ge=(0,c.CR)(we,2),rn=Ge[0],Xe=Ge[1],En=(0,c.CR)(de[re],2),Pn=En[0],tn=En[1];we=[rn+(Te/2+Rt[0])*Pn,Xe+(be/2+Rt[1])*tn]}),we},G.prototype.setOffsetPosition=function(kt){var gt=(0,c.CR)(kt,2),Q=gt[0],Rt=gt[1],Ct=this.attributes,Ht=Ct.x,de=Ht===void 0?0:Ht,ue=Ct.y,Te=ue===void 0?0:ue,be=Ct.container,we=be.x,re=be.y;this.element.style.left="".concat(+de+we+Q,"px"),this.element.style.top="".concat(+Te+re+Rt,"px")},G.prototype.updatePosition=function(){var kt=this.attributes.showDelay,gt=kt===void 0?60:kt,Q=Date.now();this.timestamp>0&&Q-this.timestamp<gt||(this.timestamp=Q,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},G.prototype.autoPosition=function(kt){var gt=(0,c.CR)(kt,2),Q=gt[0],Rt=gt[1],Ct=this.attributes,Ht=Ct.x,de=Ct.y,ue=Ct.bounding,Te=Ct.position;if(!ue)return[Q,Rt];var be=this.element,we=be.offsetWidth,re=be.offsetHeight,Ge=(0,c.CR)([+Ht+Q,+de+Rt],2),rn=Ge[0],Xe=Ge[1],En={left:"right",right:"left",top:"bottom",bottom:"top"},Pn=ue.x,tn=ue.y,xn=ue.width,It=ue.height,Ee={left:rn<Pn,right:rn+we>Pn+xn,top:Xe<tn,bottom:Xe+re>tn+It},fn=[];Te.split("-").forEach(function(Pe){Ee[Pe]?fn.push(En[Pe]):fn.push(Pe)});var on=fn.join("-");return this.getRelativeOffsetFromCursor(on)},G.prototype.isCursorEntered=function(kt,gt){if(this.element){var Q=this.element.getBoundingClientRect(),Rt=Q.x,Ct=Q.y,Ht=Q.width,de=Q.height;return new N.b(Rt,Ct,Ht,de).isPointIn(kt,gt)}return!1},G.prototype.closeTransition=function(kt){var gt=this,Q=this.element.style.transition;this.element.style.transition="none",kt(),setTimeout(function(){gt.element.style.transition=Q},10)},G.tag="tooltip",G}(S.w)},17911:function(yt,Et,y){"use strict";y.d(Et,{b:function(){return c}});var c=function(){function I(z,S,R,w){z===void 0&&(z=0),S===void 0&&(S=0),R===void 0&&(R=0),w===void 0&&(w=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=z,this.y=S,this.width=R,this.height=w}return Object.defineProperty(I.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),I.fromRect=function(z){return new I(z.x,z.y,z.width,z.height)},I.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},I.prototype.isPointIn=function(z,S){return z>=this.left&&z<=this.right&&S>=this.top&&S<=this.bottom},I}();function _(I){var z=I.getRenderBounds(),S=__read(z.min,2),R=S[0],w=S[1],N=__read(z.max,2),D=N[0],A=N[1],L=D-R,F=A-w;return new c(R,w,L,F)}},38242:function(yt,Et,y){"use strict";y.d(Et,{S:function(){return I}});var c=y(80813),_=y(71018);function I(z,S){return(0,_.Z)(z)?z.apply(void 0,(0,c.ev)([],(0,c.CR)(S),!1)):z}},58688:function(yt,Et,y){"use strict";y.d(Et,{A:function(){return _}});var c=y(80813),_=function(I,z){var S=function(w){return"".concat(z,"-").concat(w)},R=Object.fromEntries(Object.entries(I).map(function(w){var N=(0,c.CR)(w,2),D=N[0],A=N[1],L=S(A);return[D,{name:L,class:".".concat(L),id:"#".concat(L),toString:function(){return L}}]}));return Object.assign(R,{prefix:S}),R}},99247:function(yt,Et,y){"use strict";y.d(Et,{n:function(){return R}});var c=y(80813),_=y(63467),I=y(39934),z=5,S=function(w,N,D,A){D===void 0&&(D=0),A===void 0&&(A=z),Object.entries(N).forEach(function(L){var F=(0,c.CR)(L,2),it=F[0],G=F[1],kt=w;Object.prototype.hasOwnProperty.call(N,it)&&(G?(0,_.Z)(G)?((0,_.Z)(w[it])||(kt[it]={}),D<A?S(w[it],G,D+1,A):kt[it]=N[it]):(0,I.Z)(G)?(kt[it]=[],kt[it]=kt[it].concat(G)):kt[it]=G:kt[it]=G)})},R=function(w){for(var N=[],D=1;D<arguments.length;D++)N[D-1]=arguments[D];for(var A=0;A<N.length;A+=1)S(w,N[A]);return w}},53160:function(yt,Et,y){"use strict";y.d(Et,{O:function(){return _}});var c=y(58533);function _(I,z,S){S===void 0&&(S="..."),(0,c.Rm)(I,{wordWrap:!0,wordWrapWidth:z,maxLines:1,textOverflow:S})}},88170:function(yt,Et,y){"use strict";y.d(Et,{$:function(){return w},S:function(){return R}});var c=y(80813),_=y(71879),I=y(1933),z=y(42777),S=y(7225);function R(N){return typeof N=="function"?N():(0,_.Z)(N)||(0,I.Z)(N)?new z.x({style:{text:String(N)}}):N}function w(N,D){return typeof N=="function"?N():(0,_.Z)(N)||(0,I.Z)(N)?new S.k9({style:(0,c.pi)((0,c.pi)({pointerEvents:"auto"},D),{innerHTML:N})}):N}},67756:function(yt,Et,y){"use strict";y.d(Et,{z:function(){return c}});function c(_,I,z,S,R){return S===void 0&&(S=!0),R===void 0&&(R=function(w){w.node().removeChildren()}),_?z(I):(S&&R(I),null)}},16915:function(yt,Et,y){"use strict";y.d(Et,{X:function(){return R},g:function(){return S}});var c=y(80813),_=y(7225),I=y(69014),z=function(w){(0,c.ZT)(N,w);function N(){for(var D=[],A=0;A<arguments.length;A++)D[A]=arguments[A];var L=w.apply(this,(0,c.ev)([],(0,c.CR)(D),!1))||this;return L.isMutationObserved=!0,L.addEventListener(_.Dk.INSERTED,function(){(0,I.Cp)(L)}),L}return N}(_.ZA);function S(w){var N=w.appendChild(new z({class:"offscreen"}));return(0,I.Cp)(N),N}function R(w){for(var N=w;N;){if(N.className==="offscreen")return!0;N=N.parent}return!1}},33253:function(yt,Et,y){"use strict";y.d(Et,{l:function(){return c}});function c(_){return/\S+-\S+/g.test(_)?_.split("-").map(function(I){return I[0]}):_.length>2?[_[0]]:_.split("")}},99769:function(yt,Et,y){"use strict";y.d(Et,{b:function(){return c}});function c(_,I,z){z===void 0&&(z=!1);var S=_.getBBox(),R=S.width,w=S.height,N=I/Math.max(R,w);return z&&(_.style.transform="scale(".concat(N,")")),N}},38974:function(yt,Et,y){"use strict";y.d(Et,{OV:function(){return L},Ys:function(){return A}});var c=y(80813),_=y(39934),I=function(F){if(!(0,_.Z)(F))return[];for(var it=[],G=0;G<F.length;G++)it=it.concat(F[G]);return it},z=I,S=y(7225),R=y(42777);function w(F,it){var G=new Map;return F.forEach(function(kt){var gt=it(kt);G.has(gt)||G.set(gt,[]),G.get(gt).push(kt)}),G}function N(F){throw new Error(F)}var D=function(){function F(gt,Q,Rt,Ct,Ht,de,ue){gt===void 0&&(gt=null),Q===void 0&&(Q=null),Rt===void 0&&(Rt=null),Ct===void 0&&(Ct=null),Ht===void 0&&(Ht=[null,null,null,null,null]),de===void 0&&(de=[]),ue===void 0&&(ue=[]),it.add(this),this._elements=Array.from(gt),this._data=Q,this._parent=Rt,this._document=Ct,this._enter=Ht[0],this._update=Ht[1],this._exit=Ht[2],this._merge=Ht[3],this._split=Ht[4],this._transitions=de,this._facetElements=ue}F.prototype.selectAll=function(gt){var Q=typeof gt=="string"?this._parent.querySelectorAll(gt):gt;return new G(Q,null,this._elements[0],this._document)},F.prototype.selectFacetAll=function(gt){var Q=typeof gt=="string"?this._parent.querySelectorAll(gt):gt;return new G(this._elements,null,this._parent,this._document,void 0,void 0,Q)},F.prototype.select=function(gt){var Q=typeof gt=="string"?this._parent.querySelectorAll(gt)[0]||null:gt;return new G([Q],null,Q,this._document)},F.prototype.append=function(gt){var Q=this,Rt=typeof gt=="function"?gt:function(){return Q.createElement(gt)},Ct=[];if(this._data!==null){for(var Ht=0;Ht<this._data.length;Ht++){var de=this._data[Ht],ue=(0,c.CR)(Array.isArray(de)?de:[de,null],2),Te=ue[0],be=ue[1],we=Rt(Te,Ht);we.__data__=Te,be!==null&&(we.__fromElements__=be),this._parent.appendChild(we),Ct.push(we)}return new G(Ct,null,this._parent,this._document)}for(var Ht=0;Ht<this._elements.length;Ht++){var re=this._elements[Ht],Te=re.__data__,we=Rt(Te,Ht);re.appendChild(we),Ct.push(we)}return new G(Ct,null,Ct[0],this._document)},F.prototype.maybeAppend=function(gt,Q){var Rt=(0,c.Q_)(this,it,"m",kt).call(this,gt[0]==="#"?gt:"#".concat(gt),Q);return Rt.attr("id",gt),Rt},F.prototype.maybeAppendByClassName=function(gt,Q){var Rt=gt.toString(),Ct=(0,c.Q_)(this,it,"m",kt).call(this,Rt[0]==="."?Rt:".".concat(Rt),Q);return Ct.attr("className",Rt),Ct},F.prototype.maybeAppendByName=function(gt,Q){var Rt=(0,c.Q_)(this,it,"m",kt).call(this,'[name="'.concat(gt,'"]'),Q);return Rt.attr("name",gt),Rt},F.prototype.data=function(gt,Q,Rt){var Ct,Ht;Q===void 0&&(Q=function(Pe){return Pe}),Rt===void 0&&(Rt=function(){return null});for(var de=[],ue=[],Te=new Set(this._elements),be=[],we=new Set,re=new Map(this._elements.map(function(Pe,Ze){return[Q(Pe.__data__,Ze),Pe]})),Ge=new Map(this._facetElements.map(function(Pe,Ze){return[Q(Pe.__data__,Ze),Pe]})),rn=w(this._elements,function(Pe){return Rt(Pe.__data__)}),Xe=0;Xe<gt.length;Xe++){var En=gt[Xe],Pn=Q(En,Xe),tn=Rt(En,Xe);if(re.has(Pn)){var xn=re.get(Pn);xn.__data__=En,xn.__facet__=!1,ue.push(xn),Te.delete(xn),re.delete(Pn)}else if(Ge.has(Pn)){var xn=Ge.get(Pn);xn.__data__=En,xn.__facet__=!0,ue.push(xn),Ge.delete(Pn)}else if(rn.has(Pn)){var It=rn.get(Pn);be.push([En,It]);try{for(var Ee=(Ct=void 0,(0,c.XA)(It)),fn=Ee.next();!fn.done;fn=Ee.next()){var xn=fn.value;Te.delete(xn)}}catch(Pe){Ct={error:Pe}}finally{try{fn&&!fn.done&&(Ht=Ee.return)&&Ht.call(Ee)}finally{if(Ct)throw Ct.error}}rn.delete(Pn)}else if(re.has(tn)){var xn=re.get(tn);xn.__toData__?xn.__toData__.push(En):xn.__toData__=[En],we.add(xn),Te.delete(xn)}else de.push(En)}var on=[new G([],de,this._parent,this._document),new G(ue,null,this._parent,this._document),new G(Te,null,this._parent,this._document),new G([],be,this._parent,this._document),new G(we,null,this._parent,this._document)];return new G(this._elements,null,this._parent,this._document,on)},F.prototype.merge=function(gt){var Q=(0,c.ev)((0,c.ev)([],(0,c.CR)(this._elements),!1),(0,c.CR)(gt._elements),!1),Rt=(0,c.ev)((0,c.ev)([],(0,c.CR)(this._transitions),!1),(0,c.CR)(gt._transitions),!1);return new G(Q,null,this._parent,this._document,void 0,Rt)},F.prototype.createElement=function(gt){if(this._document)return this._document.createElement(gt,{});var Q=G.registry[gt];return Q?new Q:N("Unknown node type: ".concat(gt))},F.prototype.join=function(gt,Q,Rt,Ct,Ht){gt===void 0&&(gt=function(re){return re}),Q===void 0&&(Q=function(re){return re}),Rt===void 0&&(Rt=function(re){return re.remove()}),Ct===void 0&&(Ct=function(re){return re}),Ht===void 0&&(Ht=function(re){return re.remove()});var de=gt(this._enter),ue=Q(this._update),Te=Rt(this._exit),be=Ct(this._merge),we=Ht(this._split);return ue.merge(de).merge(Te).merge(be).merge(we)},F.prototype.remove=function(){for(var gt=function(Ct){var Ht=Q._elements[Ct],de=Q._transitions[Ct];de?de.then(function(){return Ht.remove()}):Ht.remove()},Q=this,Rt=0;Rt<this._elements.length;Rt++)gt(Rt);return new G([],null,this._parent,this._document,void 0,this._transitions)},F.prototype.each=function(gt){for(var Q=0;Q<this._elements.length;Q++){var Rt=this._elements[Q],Ct=Rt.__data__;gt.call(Rt,Ct,Q)}return this},F.prototype.attr=function(gt,Q){var Rt=typeof Q!="function"?function(){return Q}:Q;return this.each(function(Ct,Ht){Q!==void 0&&(this[gt]=Rt.call(this,Ct,Ht))})},F.prototype.style=function(gt,Q,Rt){Rt===void 0&&(Rt=!0);var Ct=typeof Q!="function"||!Rt?function(){return Q}:Q;return this.each(function(Ht,de){Q!==void 0&&(this.style[gt]=Ct.call(this,Ht,de))})},F.prototype.styles=function(gt,Q){return gt===void 0&&(gt={}),Q===void 0&&(Q=!0),this.each(function(Rt,Ct){var Ht=this;Object.entries(gt).forEach(function(de){var ue=(0,c.CR)(de,2),Te=ue[0],be=ue[1],we=typeof be!="function"||!Q?function(){return be}:be;be!==void 0&&Ht.attr(Te,we.call(Ht,Rt,Ct))})})},F.prototype.update=function(gt,Q){Q===void 0&&(Q=!0);var Rt=typeof gt!="function"||!Q?function(){return gt}:gt;return this.each(function(Ct,Ht){gt&&this.update&&this.update(Rt.call(this,Ct,Ht))})},F.prototype.maybeUpdate=function(gt,Q){Q===void 0&&(Q=!0);var Rt=typeof gt!="function"||!Q?function(){return gt}:gt;return this.each(function(Ct,Ht){gt&&this.update&&this.update(Rt.call(this,Ct,Ht))})},F.prototype.transition=function(gt){var Q=this._transitions,Rt=new Array(this._elements.length);return this.each(function(Ct,Ht){Rt[Ht]=gt.call(this,Ct,Ht)}),this._transitions=z(Rt),this},F.prototype.on=function(gt,Q){return this.each(function(){this.addEventListener(gt,Q)}),this},F.prototype.call=function(gt){for(var Q=[],Rt=1;Rt<arguments.length;Rt++)Q[Rt-1]=arguments[Rt];return gt.call.apply(gt,(0,c.ev)([this._parent,this],(0,c.CR)(Q),!1)),this},F.prototype.node=function(){return this._elements[0]},F.prototype.nodes=function(){return this._elements},F.prototype.transitions=function(){return this._transitions.filter(function(gt){return!!gt})},F.prototype.parent=function(){return this._parent};var it,G,kt;return G=F,it=new WeakSet,kt=function(Q,Rt){var Ct=this._elements[0],Ht=Ct.querySelector(Q);if(Ht)return new G([Ht],null,this._parent,this._document);var de=typeof Rt=="string"?this.createElement(Rt):Rt();return Ct.appendChild(de),new G([de],null,this._parent,this._document)},F.registry={g:S.ZA,rect:S.UL,circle:S.Cd,path:S.y$,text:R.x,ellipse:S.Pj,image:S.Ee,line:S.x1,polygon:S.mg,polyline:S.aH,html:S.k9},F}();function A(F){return new D([F],null,F,F.ownerDocument)}function L(F,it,G){return F.querySelector(it)?A(F).select(it):A(F).append(G)}},98294:function(yt,Et,y){"use strict";y.d(Et,{j:function(){return I}});var c=y(1933),_=y(39934);function I(z){if((0,c.Z)(z))return[z,z,z,z];if((0,_.Z)(z)){var S=z.length;if(S===1)return[z[0],z[0],z[0],z[0]];if(S===2)return[z[0],z[1],z[0],z[1]];if(S===3)return[z[0],z[1],z[2],z[1]];if(S===4)return z}return[0,0,0,0]}},2080:function(yt,Et,y){"use strict";y.d(Et,{DM:function(){return w},_v:function(){return I},wE:function(){return S}});var c=y(80813);function _(N){var D=N&&N.getRenderBounds();if(!D)return{width:0,height:0};var A=D.getMax(),L=D.getMin();return{width:A[0]-L[0],height:A[1]-L[1]}}function I(N){var D=N.getLocalBounds(),A=D.min,L=D.max,F=(0,c.CR)([A,L],2),it=(0,c.CR)(F[0],2),G=it[0],kt=it[1],gt=(0,c.CR)(F[1],2),Q=gt[0],Rt=gt[1];return{x:G,y:kt,width:Q-G,height:Rt-kt,left:G,bottom:Rt,top:kt,right:Q}}function z(N,D){var A=select(N).append("text").node();return A.attr(__assign(__assign({},D),{visibility:"hidden"})),A}function S(N,D){var A=(0,c.CR)(N,2),L=A[0],F=A[1],it=(0,c.CR)(D,2),G=it[0],kt=it[1];return L!==G&&F===kt}function R(N,D){var A=__read(N,2),L=A[0],F=A[1],it=__read(D,2),G=it[0],kt=it[1];return L===G&&F!==kt}function w(N,D){var A,L,F=D.attributes;try{for(var it=(0,c.XA)(Object.entries(F)),G=it.next();!G.done;G=it.next()){var kt=(0,c.CR)(G.value,2),gt=kt[0],Q=kt[1];gt!=="id"&>!=="className"&&N.attr(gt,Q)}}catch(Rt){A={error:Rt}}finally{try{G&&!G.done&&(L=it.return)&&L.call(it)}finally{if(A)throw A.error}}}},88839:function(yt,Et,y){"use strict";y.d(Et,{MC:function(){return R},Hm:function(){return A},zs:function(){return N},dq:function(){return D}});var c=y(80813);function _(L){return L.toString().charAt(0).toUpperCase()+L.toString().slice(1)}function I(L){return L.toString().charAt(0).toLowerCase()+L.toString().slice(1)}function z(L,F){return"".concat(F).concat(_(L))}function S(L,F,it){var G;it===void 0&&(it=!0);var kt=F||((G=L.match(/^([a-z][a-z0-9]+)/))===null||G===void 0?void 0:G[0])||"",gt=L.replace(new RegExp("^(".concat(kt,")")),"");return it?I(gt):gt}function R(L,F){Object.entries(F).forEach(function(it){var G=(0,c.CR)(it,2),kt=G[0],gt=G[1];(0,c.ev)([L],(0,c.CR)(L.querySelectorAll(kt)),!1).filter(function(Q){return Q.matches(kt)}).forEach(function(Q){if(Q){var Rt=Q;Rt.style.cssText+=Object.entries(gt).reduce(function(Ct,Ht){return"".concat(Ct).concat(Ht.join(":"),";")},"")}})})}var w=function(L,F){if(!(L!=null&&L.startsWith(F)))return!1;var it=L[F.length];return it>="A"&&it<="Z"};function N(L,F,it){it===void 0&&(it=!1);var G={};return Object.entries(L).forEach(function(kt){var gt=(0,c.CR)(kt,2),Q=gt[0],Rt=gt[1];if(!(Q==="className"||Q==="class")){if(w(Q,"show")&&w(S(Q,"show"),F)!==it)Q===z(F,"show")?G[Q]=Rt:G[Q.replace(new RegExp(_(F)),"")]=Rt;else if(!w(Q,"show")&&w(Q,F)!==it){var Ct=S(Q,F);Ct==="filter"&&typeof Rt=="function"||(G[Ct]=Rt)}}}),G}function D(L,F){return Object.entries(L).reduce(function(it,G){var kt=(0,c.CR)(G,2),gt=kt[0],Q=kt[1];return gt.startsWith("show")?it["show".concat(F).concat(gt.slice(4))]=Q:it["".concat(F).concat(_(gt))]=Q,it},{})}function A(L,F){F===void 0&&(F=["x","y","class","className"]);var it=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],G={},kt={};return Object.entries(L).forEach(function(gt){var Q=(0,c.CR)(gt,2),Rt=Q[0],Ct=Q[1];F.includes(Rt)||(it.indexOf(Rt)!==-1?kt[Rt]=Ct:G[Rt]=Ct)}),[G,kt]}},58533:function(yt,Et,y){"use strict";y.d(Et,{Rm:function(){return D},U4:function(){return N},Ux:function(){return R},qT:function(){return w}});var c=y(7225),_=y(40455),I,z;function S(A){z=A}var R=(0,_.Z)(function(A,L){var F=L.fontSize,it=L.fontFamily,G=L.fontWeight,kt=L.fontStyle,gt=L.fontVariant;return z?z(A,F):(I||(I=c.GZ.offscreenCanvasCreator.getOrCreateContext(void 0)),I.font=[kt,gt,G,"".concat(F,"px"),it].join(" "),I.measureText(A).width)},function(A,L){return[A,Object.values(L||w(A)).join()].join("")},4096),w=function(A){var L=A.style.fontFamily||"sans-serif",F=A.style.fontWeight||"normal",it=A.style.fontStyle||"normal",G=A.style.fontVariant,kt=A.style.fontSize;return kt=typeof kt=="object"?kt.value:kt,{fontSize:kt,fontFamily:L,fontWeight:F,fontStyle:it,fontVariant:G}};function N(A){return A.nodeName==="text"?A:A.nodeName==="g"&&A.children.length===1&&A.children[0].nodeName==="text"?A.children[0]:null}function D(A,L){var F=N(A);F&&F.attr(L)}},69014:function(yt,Et,y){"use strict";y.d(Et,{Cp:function(){return I},$Z:function(){return _},WD:function(){return z}});function c(S,R){R(S),S.children&&S.children.forEach(function(w){w&&c(w,R)})}function _(S){z(S,!0)}function I(S){z(S,!1)}function z(S,R){var w=R?"visible":"hidden";c(S,function(N){N.attr("visibility",w)})}},49336:function(yt,Et){"use strict";var y="*",c=function(){function _(){this._events={}}return _.prototype.on=function(I,z,S){return this._events[I]||(this._events[I]=[]),this._events[I].push({callback:z,once:!!S}),this},_.prototype.once=function(I,z){return this.on(I,z,!0)},_.prototype.emit=function(I){for(var z=this,S=[],R=1;R<arguments.length;R++)S[R-1]=arguments[R];var w=this._events[I]||[],N=this._events[y]||[],D=function(A){for(var L=A.length,F=0;F<L;F++)if(A[F]){var it=A[F],G=it.callback,kt=it.once;kt&&(A.splice(F,1),A.length===0&&delete z._events[I],L--,F--),G.apply(z,S)}};D(w),D(N)},_.prototype.off=function(I,z){if(!I)this._events={};else if(!z)delete this._events[I];else{for(var S=this._events[I]||[],R=S.length,w=0;w<R;w++)S[w].callback===z&&(S.splice(w,1),R--,w--);S.length===0&&delete this._events[I]}return this},_.prototype.getEvents=function(){return this._events},_}();Et.Z=c},30259:function(yt,Et,y){"use strict";y.d(Et,{Th:function(){return ft}});var c=y(83652),_=y(67732),I=y(22214),z=y(42403),S=y(9350),R=y(20068),w=y(42978),N=y(70208);function D(b,E){var h=E.cx,g=h===void 0?0:h,M=E.cy,Y=M===void 0?0:M,J=E.r;b.arc(g,Y,J,0,Math.PI*2,!1)}function A(b,E){var h=E.cx,g=h===void 0?0:h,M=E.cy,Y=M===void 0?0:M,J=E.rx,ot=E.ry;if(b.ellipse)b.ellipse(g,Y,J,ot,0,0,Math.PI*2,!1);else{var vt=J>ot?J:ot,zt=J>ot?1:J/ot,q=J>ot?ot/J:1;b.save(),b.scale(zt,q),b.arc(g,Y,vt,0,Math.PI*2)}}function L(b,E){var h=E.x1,g=E.y1,M=E.x2,Y=E.y2,J=E.markerStart,ot=E.markerEnd,vt=E.markerStartOffset,zt=E.markerEndOffset,q=0,$=0,H=0,nt=0,Mt=0,Wt,Tt;J&&(0,S.RV)(J)&&vt&&(Wt=M-h,Tt=Y-g,Mt=Math.atan2(Tt,Wt),q=Math.cos(Mt)*(vt||0),$=Math.sin(Mt)*(vt||0)),ot&&(0,S.RV)(ot)&&zt&&(Wt=h-M,Tt=g-Y,Mt=Math.atan2(Tt,Wt),H=Math.cos(Mt)*(zt||0),nt=Math.sin(Mt)*(zt||0)),b.moveTo(h+q,g+$),b.lineTo(M+H,Y+nt)}function F(b,E){var h=E.markerStart,g=E.markerEnd,M=E.markerStartOffset,Y=E.markerEndOffset,J=E.d,ot=J.absolutePath,vt=J.segments,zt=0,q=0,$=0,H=0,nt=0,Mt,Wt;if(h&&(0,S.RV)(h)&&M){var Tt=h.parentNode.getStartTangent(),Kt=(0,w.Z)(Tt,2),bt=Kt[0],pt=Kt[1];Mt=bt[0]-pt[0],Wt=bt[1]-pt[1],nt=Math.atan2(Wt,Mt),zt=Math.cos(nt)*(M||0),q=Math.sin(nt)*(M||0)}if(g&&(0,S.RV)(g)&&Y){var ut=g.parentNode.getEndTangent(),Gt=(0,w.Z)(ut,2),Vt=Gt[0],ve=Gt[1];Mt=Vt[0]-ve[0],Wt=Vt[1]-ve[1],nt=Math.atan2(Wt,Mt),$=Math.cos(nt)*(Y||0),H=Math.sin(nt)*(Y||0)}for(var ge=0;ge<ot.length;ge++){var Yt=ot[ge],Ce=Yt[0],qe=ot[ge+1],Qe=ge===0&&(zt!==0||q!==0),Nn=(ge===ot.length-1||qe&&(qe[0]==="M"||qe[0]==="Z"))&&$!==0&&H!==0,Dn=Qe?[zt,q]:[0,0],Rn=(0,w.Z)(Dn,2),Xn=Rn[0],tr=Rn[1],Mr=Nn?[$,H]:[0,0],yr=(0,w.Z)(Mr,2),vr=yr[0],Cr=yr[1];switch(Ce){case"M":b.moveTo(Yt[1]+Xn,Yt[2]+tr);break;case"L":b.lineTo(Yt[1]+vr,Yt[2]+Cr);break;case"Q":b.quadraticCurveTo(Yt[1],Yt[2],Yt[3]+vr,Yt[4]+Cr);break;case"C":b.bezierCurveTo(Yt[1],Yt[2],Yt[3],Yt[4],Yt[5]+vr,Yt[6]+Cr);break;case"A":{var ur=vt[ge].arcParams,Kn=ur.cx,Ur=ur.cy,Yr=ur.rx,br=ur.ry,xi=ur.startAngle,di=ur.endAngle,Lr=ur.xRotation,Ci=ur.sweepFlag;if(b.ellipse)b.ellipse(Kn,Ur,Yr,br,Lr,xi,di,!!(1-Ci));else{var fi=Yr>br?Yr:br,Ni=Yr>br?1:Yr/br,Ji=Yr>br?br/Yr:1;b.translate(Kn,Ur),b.rotate(Lr),b.scale(Ni,Ji),b.arc(0,0,fi,xi,di,!!(1-Ci)),b.scale(1/Ni,1/Ji),b.rotate(-Lr),b.translate(-Kn,-Ur)}Nn&&b.lineTo(Yt[6]+$,Yt[7]+H);break}case"Z":b.closePath();break}}}function it(b,E){var h=E.markerStart,g=E.markerEnd,M=E.markerStartOffset,Y=E.markerEndOffset,J=E.points.points,ot=J.length,vt=J[0][0],zt=J[0][1],q=J[ot-1][0],$=J[ot-1][1],H=0,nt=0,Mt=0,Wt=0,Tt=0,Kt,bt;h&&(0,S.RV)(h)&&M&&(Kt=J[1][0]-J[0][0],bt=J[1][1]-J[0][1],Tt=Math.atan2(bt,Kt),H=Math.cos(Tt)*(M||0),nt=Math.sin(Tt)*(M||0)),g&&(0,S.RV)(g)&&Y&&(Kt=J[ot-1][0]-J[0][0],bt=J[ot-1][1]-J[0][1],Tt=Math.atan2(bt,Kt),Mt=Math.cos(Tt)*(Y||0),Wt=Math.sin(Tt)*(Y||0)),b.moveTo(vt+(H||Mt),zt+(nt||Wt));for(var pt=1;pt<ot-1;pt++){var ut=J[pt];b.lineTo(ut[0],ut[1])}b.lineTo(q,$)}function G(b,E){var h=E.markerStart,g=E.markerEnd,M=E.markerStartOffset,Y=E.markerEndOffset,J=E.points.points,ot=J.length,vt=J[0][0],zt=J[0][1],q=J[ot-1][0],$=J[ot-1][1],H=0,nt=0,Mt=0,Wt=0,Tt=0,Kt,bt;h&&(0,S.RV)(h)&&M&&(Kt=J[1][0]-J[0][0],bt=J[1][1]-J[0][1],Tt=Math.atan2(bt,Kt),H=Math.cos(Tt)*(M||0),nt=Math.sin(Tt)*(M||0)),g&&(0,S.RV)(g)&&Y&&(Kt=J[ot-2][0]-J[ot-1][0],bt=J[ot-2][1]-J[ot-1][1],Tt=Math.atan2(bt,Kt),Mt=Math.cos(Tt)*(Y||0),Wt=Math.sin(Tt)*(Y||0)),b.moveTo(vt+H,zt+nt);for(var pt=1;pt<ot-1;pt++){var ut=J[pt];b.lineTo(ut[0],ut[1])}b.lineTo(q+Mt,$+Wt)}function kt(b,E){var h=E.x,g=h===void 0?0:h,M=E.y,Y=M===void 0?0:M,J=E.radius,ot=E.width,vt=E.height,zt=ot,q=vt,$=J&&J.some(function(Gt){return Gt!==0});if(!$)b.rect(g,Y,zt,q);else{var H=ot>0?1:-1,nt=vt>0?1:-1,Mt=H+nt===0,Wt=J.map(function(Gt){return(0,N.Z)(Gt,0,Math.min(Math.abs(zt)/2,Math.abs(q)/2))}),Tt=(0,w.Z)(Wt,4),Kt=Tt[0],bt=Tt[1],pt=Tt[2],ut=Tt[3];b.moveTo(H*Kt+g,Y),b.lineTo(zt-H*bt+g,Y),bt!==0&&b.arc(zt-H*bt+g,nt*bt+Y,bt,-nt*Math.PI/2,H>0?0:Math.PI,Mt),b.lineTo(zt+g,q-nt*pt+Y),pt!==0&&b.arc(zt-H*pt+g,q-nt*pt+Y,pt,H>0?0:Math.PI,nt>0?Math.PI/2:1.5*Math.PI,Mt),b.lineTo(H*ut+g,q+Y),ut!==0&&b.arc(H*ut+g,q-nt*ut+Y,ut,nt>0?Math.PI/2:-Math.PI/2,H>0?Math.PI:0,Mt),b.lineTo(g,nt*Kt+Y),Kt!==0&&b.arc(H*Kt+g,nt*Kt+Y,Kt,H>0?Math.PI:0,nt>0?Math.PI*1.5:Math.PI/2,Mt)}}var gt=function(b){function E(){var h;(0,_.Z)(this,E);for(var g=arguments.length,M=new Array(g),Y=0;Y<g;Y++)M[Y]=arguments[Y];return h=(0,I.Z)(this,E,[].concat(M)),h.name="canvas-path-generator",h}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"init",value:function(){var g,M=(g={},(0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)(g,S.bn.CIRCLE,D),S.bn.ELLIPSE,A),S.bn.RECT,kt),S.bn.LINE,L),S.bn.POLYLINE,G),S.bn.POLYGON,it),S.bn.PATH,F),S.bn.TEXT,void 0),S.bn.GROUP,void 0),S.bn.IMAGE,void 0),(0,R.Z)((0,R.Z)((0,R.Z)(g,S.bn.HTML,void 0),S.bn.MESH,void 0),S.bn.FRAGMENT,void 0));this.context.pathGeneratorFactory=M}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(S.F6),Q=y(19251),Rt=y(75044),Ct=y(3202),Ht=y(92421),de=y(60187),ue=y(52402),Te=y(66045),be=y(33885);var we=Ht.Ue(),re=Ht.Ue(),Ge=Ht.Ue(),rn=de.create(),Xe=function(){function b(){var E=this;(0,_.Z)(this,b),this.isHit=function(h,g,M,Y){var J=E.context.pointInPathPickerFactory[h.nodeName];if(J){var ot=de.invert(rn,M),vt=Ht.fF(re,Ht.t8(Ge,g[0],g[1],0),ot);if(J(h,new S.E9(vt[0],vt[1]),Y,E.isPointInPath,E.context,E.runtime))return!0}return!1},this.isPointInPath=function(h,g){var M=E.runtime.offscreenCanvasCreator.getOrCreateContext(E.context.config.offscreenCanvas),Y=E.context.pathGeneratorFactory[h.nodeName];return Y&&(M.beginPath(),Y(M,h.parsedStyle),M.closePath()),M.isPointInPath(g.x,g.y)}}return(0,c.Z)(b,[{key:"apply",value:function(h,g){var M,Y=this,J=h.renderingService,ot=h.renderingContext;this.context=h,this.runtime=g;var vt=(M=ot.root)===null||M===void 0?void 0:M.ownerDocument;J.hooks.pick.tapPromise(b.tag,function(){var zt=(0,Ct.Z)((0,Rt.Z)().mark(function q($){return(0,Rt.Z)().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.abrupt("return",Y.pick(vt,$));case 1:case"end":return H.stop()}},q)}));return function(q){return zt.apply(this,arguments)}}()),J.hooks.pickSync.tap(b.tag,function(zt){return Y.pick(vt,zt)})}},{key:"pick",value:function(h,g){var M=g.topmost,Y=g.position,J=Y.x,ot=Y.y,vt=Ht.t8(we,J,ot,0),zt=h.elementsFromBBox(vt[0],vt[1],vt[0],vt[1]),q=[],$=(0,Q.Z)(zt),H;try{for($.s();!(H=$.n()).done;){var nt=H.value,Mt=nt.getWorldTransform(),Wt=this.isHit(nt,vt,Mt,!1);if(Wt){var Tt=(0,S.Oi)(nt);if(Tt){var Kt=Tt.parsedStyle.clipPath,bt=this.isHit(Kt,vt,Kt.getWorldTransform(),!0);if(bt){if(M)return g.picked=[nt],g;q.push(nt)}}else{if(M)return g.picked=[nt],g;q.push(nt)}}}}catch(pt){$.e(pt)}finally{$.f()}return g.picked=q,g}}])}();Xe.tag="CanvasPicker";function En(b,E,h){var g=b.parsedStyle,M=g.cx,Y=M===void 0?0:M,J=g.cy,ot=J===void 0?0:J,vt=g.r,zt=g.fill,q=g.stroke,$=g.lineWidth,H=$===void 0?1:$,nt=g.increasedLineWidthForHitTesting,Mt=nt===void 0?0:nt,Wt=g.pointerEvents,Tt=Wt===void 0?"auto":Wt,Kt=(H+Mt)/2,bt=(0,ue.TE)(Y,ot,E.x,E.y),pt=(0,S.L1)(Tt,zt,q),ut=(0,w.Z)(pt,2),Gt=ut[0],Vt=ut[1];return Gt&&Vt||h?bt<=vt+Kt:Gt?bt<=vt:Vt?bt>=vt-Kt&&bt<=vt+Kt:!1}function Pn(b,E,h,g){return b/(h*h)+E/(g*g)}function tn(b,E,h){var g=b.parsedStyle,M=g.cx,Y=M===void 0?0:M,J=g.cy,ot=J===void 0?0:J,vt=g.rx,zt=g.ry,q=g.fill,$=g.stroke,H=g.lineWidth,nt=H===void 0?1:H,Mt=g.increasedLineWidthForHitTesting,Wt=Mt===void 0?0:Mt,Tt=g.pointerEvents,Kt=Tt===void 0?"auto":Tt,bt=E.x,pt=E.y,ut=(0,S.L1)(Kt,q,$),Gt=(0,w.Z)(ut,2),Vt=Gt[0],ve=Gt[1],ge=(nt+Wt)/2,Yt=(bt-Y)*(bt-Y),Ce=(pt-ot)*(pt-ot);return Vt&&ve||h?Pn(Yt,Ce,vt+ge,zt+ge)<=1:Vt?Pn(Yt,Ce,vt,zt)<=1:ve?Pn(Yt,Ce,vt-ge,zt-ge)>=1&&Pn(Yt,Ce,vt+ge,zt+ge)<=1:!1}function xn(b,E,h,g,M,Y){return M>=b&&M<=b+h&&Y>=E&&Y<=E+g}function It(b,E,h,g,M,Y,J){var ot=M/2;return xn(b-ot,E-ot,h,M,Y,J)||xn(b+h-ot,E-ot,M,g,Y,J)||xn(b+ot,E+g-ot,h,M,Y,J)||xn(b-ot,E+ot,M,g,Y,J)}function Ee(b,E,h,g,M,Y,J,ot){var vt=(Math.atan2(ot-E,J-b)+Math.PI*2)%(Math.PI*2),zt={x:b+h*Math.cos(vt),y:E+h*Math.sin(vt)};return(0,ue.TE)(zt.x,zt.y,J,ot)<=Y/2}function fn(b,E,h,g,M,Y,J){var ot=Math.min(b,h),vt=Math.max(b,h),zt=Math.min(E,g),q=Math.max(E,g),$=M/2;return Y>=ot-$&&Y<=vt+$&&J>=zt-$&&J<=q+$?(0,ue._x)(b,E,h,g,Y,J)<=M/2:!1}function on(b,E,h,g,M){var Y=b.length;if(Y<2)return!1;for(var J=0;J<Y-1;J++){var ot=b[J][0],vt=b[J][1],zt=b[J+1][0],q=b[J+1][1];if(fn(ot,vt,zt,q,E,h,g))return!0}if(M){var $=b[0],H=b[Y-1];if(fn($[0],$[1],H[0],H[1],E,h,g))return!0}return!1}var Pe=1e-6;function Ze(b){return Math.abs(b)<Pe?0:b<0?-1:1}function Ke(b,E,h){return(h[0]-b[0])*(E[1]-b[1])===(E[0]-b[0])*(h[1]-b[1])&&Math.min(b[0],E[0])<=h[0]&&h[0]<=Math.max(b[0],E[0])&&Math.min(b[1],E[1])<=h[1]&&h[1]<=Math.max(b[1],E[1])}function le(b,E,h){var g=!1,M=b.length;if(M<=2)return!1;for(var Y=0;Y<M;Y++){var J=b[Y],ot=b[(Y+1)%M];if(Ke(J,ot,[E,h]))return!0;Ze(J[1]-h)>0!=Ze(ot[1]-h)>0&&Ze(E-(h-J[1])*(J[0]-ot[0])/(J[1]-ot[1])-J[0])<0&&(g=!g)}return g}function Ae(b,E,h){for(var g=!1,M=0;M<b.length;M++){var Y=b[M];if(g=le(Y,E,h),g)break}return g}function Pt(b,E,h){var g=b.parsedStyle,M=g.x1,Y=g.y1,J=g.x2,ot=g.y2,vt=g.lineWidth,zt=vt===void 0?1:vt,q=g.increasedLineWidthForHitTesting,$=q===void 0?0:q,H=g.pointerEvents,nt=H===void 0?"auto":H,Mt=g.fill,Wt=g.stroke,Tt=(0,S.L1)(nt,Mt,Wt),Kt=(0,w.Z)(Tt,2),bt=Kt[1];return!bt&&!h||!zt?!1:fn(M,Y,J,ot,zt+$,E.x,E.y)}function wt(b,E,h,g,M){for(var Y=!1,J=E/2,ot=0;ot<b.length;ot++){var vt=b[ot],zt=vt.currentPoint,q=vt.params,$=vt.prePoint,H=vt.box;if(!(H&&!xn(H.x-J,H.y-J,H.width+E,H.height+E,h,g)))switch(vt.command){case"L":case"Z":if(Y=fn($[0],$[1],zt[0],zt[1],E,h,g),Y)return!0;break;case"Q":var nt=(0,ue.Y1)($[0],$[1],q[1],q[2],q[3],q[4],h,g);if(Y=nt<=E/2,Y)return!0;break;case"C":var Mt=(0,ue.ph)($[0],$[1],q[1],q[2],q[3],q[4],q[5],q[6],h,g,M);if(Y=Mt<=E/2,Y)return!0;break;case"A":vt.cubicParams||(vt.cubicParams=(0,Te.W)($[0],$[1],q[1],q[2],q[3],q[4],q[5],q[6],q[7],void 0));for(var Wt=vt.cubicParams,Tt=$,Kt=0;Kt<Wt.length;Kt+=6){var bt=(0,ue.ph)(Tt[0],Tt[1],Wt[Kt],Wt[Kt+1],Wt[Kt+2],Wt[Kt+3],Wt[Kt+4],Wt[Kt+5],h,g,M);if(Tt=[Wt[Kt+4],Wt[Kt+5]],Y=bt<=E/2,Y)return!0}break}}return Y}function he(b,E,h,g,M,Y){var J=b.parsedStyle,ot=J.lineWidth,vt=ot===void 0?1:ot,zt=J.increasedLineWidthForHitTesting,q=zt===void 0?0:zt,$=J.stroke,H=J.fill,nt=J.d,Mt=J.pointerEvents,Wt=Mt===void 0?"auto":Mt,Tt=nt.segments,Kt=nt.hasArc,bt=nt.polylines,pt=nt.polygons,ut=(0,S.L1)(Wt,(pt==null?void 0:pt.length)&&H,$),Gt=(0,w.Z)(ut,2),Vt=Gt[0],ve=Gt[1],ge=(0,S.gz)(b),Yt=!1;return Vt||h?(Kt?Yt=g(b,E):Yt=Ae(pt,E.x,E.y)||Ae(bt,E.x,E.y),Yt):((ve||h)&&(Yt=wt(Tt,vt+q,E.x,E.y,ge)),Yt)}function je(b,E,h){var g=b.parsedStyle,M=g.stroke,Y=g.fill,J=g.lineWidth,ot=J===void 0?1:J,vt=g.increasedLineWidthForHitTesting,zt=vt===void 0?0:vt,q=g.points,$=g.pointerEvents,H=$===void 0?"auto":$,nt=(0,S.L1)(H,Y,M),Mt=(0,w.Z)(nt,2),Wt=Mt[0],Tt=Mt[1],Kt=!1;return(Tt||h)&&(Kt=on(q.points,ot+zt,E.x,E.y,!0)),!Kt&&(Wt||h)&&(Kt=le(q.points,E.x,E.y)),Kt}function Re(b,E,h){var g=b.parsedStyle,M=g.lineWidth,Y=M===void 0?1:M,J=g.increasedLineWidthForHitTesting,ot=J===void 0?0:J,vt=g.points,zt=g.pointerEvents,q=zt===void 0?"auto":zt,$=g.fill,H=g.stroke,nt=(0,S.L1)(q,$,H),Mt=(0,w.Z)(nt,2),Wt=Mt[1];return!Wt&&!h||!Y?!1:on(vt.points,Y+ot,E.x,E.y,!1)}function ce(b,E,h,g,M){var Y=b.parsedStyle,J=Y.radius,ot=Y.fill,vt=Y.stroke,zt=Y.lineWidth,q=zt===void 0?1:zt,$=Y.increasedLineWidthForHitTesting,H=$===void 0?0:$,nt=Y.x,Mt=nt===void 0?0:nt,Wt=Y.y,Tt=Wt===void 0?0:Wt,Kt=Y.width,bt=Y.height,pt=Y.pointerEvents,ut=pt===void 0?"auto":pt,Gt=(0,S.L1)(ut,ot,vt),Vt=(0,w.Z)(Gt,2),ve=Vt[0],ge=Vt[1],Yt=J&&J.some(function(Nn){return Nn!==0}),Ce=q+H;if(Yt){var Qe=!1;return(ge||h)&&(Qe=Le(Mt,Tt,Kt,bt,J.map(function(Nn){return(0,N.Z)(Nn,0,Math.min(Math.abs(Kt)/2,Math.abs(bt)/2))}),Ce,E.x,E.y)),!Qe&&(ve||h)&&(Qe=g(b,E)),Qe}else{var qe=Ce/2;if(ve&&ge||h)return xn(Mt-qe,Tt-qe,Kt+qe,bt+qe,E.x,E.y);if(ve)return xn(Mt,Tt,Kt,bt,E.x,E.y);if(ge)return It(Mt,Tt,Kt,bt,Ce,E.x,E.y)}return!1}function Le(b,E,h,g,M,Y,J,ot){var vt=(0,w.Z)(M,4),zt=vt[0],q=vt[1],$=vt[2],H=vt[3];return fn(b+zt,E,b+h-q,E,Y,J,ot)||fn(b+h,E+q,b+h,E+g-$,Y,J,ot)||fn(b+h-$,E+g,b+H,E+g,Y,J,ot)||fn(b,E+g-H,b,E+zt,Y,J,ot)||Ee(b+h-q,E+q,q,1.5*Math.PI,2*Math.PI,Y,J,ot)||Ee(b+h-$,E+g-$,$,0,.5*Math.PI,Y,J,ot)||Ee(b+H,E+g-H,H,.5*Math.PI,Math.PI,Y,J,ot)||Ee(b+zt,E+zt,zt,Math.PI,1.5*Math.PI,Y,J,ot)}function xe(b,E,h,g,M,Y){var J=b.parsedStyle,ot=J.pointerEvents,vt=ot===void 0?"auto":ot,zt=J.x,q=zt===void 0?0:zt,$=J.y,H=$===void 0?0:$,nt=J.width,Mt=J.height;if(vt==="non-transparent-pixel"){var Wt=M.config.offscreenCanvas,Tt=Y.offscreenCanvasCreator.getOrCreateCanvas(Wt),Kt=Y.offscreenCanvasCreator.getOrCreateContext(Wt,{willReadFrequently:!0});Tt.width=nt,Tt.height=Mt,M.defaultStyleRendererFactory[S.bn.IMAGE].render(Kt,(0,be.Z)((0,be.Z)({},b.parsedStyle),{},{x:0,y:0}),b,void 0,void 0,void 0);var bt=Kt.getImageData(E.x-q,E.y-H,1,1).data;return bt.every(function(pt){return pt!==0})}return!0}function _t(b,E,h,g){var M=b.getGeometryBounds();return E.x>=M.min[0]&&E.y>=M.min[1]&&E.x<=M.max[0]&&E.y<=M.max[1]}var ie=function(b){function E(){var h;(0,_.Z)(this,E);for(var g=arguments.length,M=new Array(g),Y=0;Y<g;Y++)M[Y]=arguments[Y];return h=(0,I.Z)(this,E,[].concat(M)),h.name="canvas-picker",h}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"init",value:function(){var g,M=(g={},(0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)(g,S.bn.CIRCLE,En),S.bn.ELLIPSE,tn),S.bn.RECT,ce),S.bn.LINE,Pt),S.bn.POLYLINE,Re),S.bn.POLYGON,je),S.bn.PATH,he),S.bn.TEXT,_t),S.bn.GROUP,null),S.bn.IMAGE,xe),(0,R.Z)((0,R.Z)(g,S.bn.HTML,null),S.bn.MESH,null));this.context.pointInPathPickerFactory=M,this.addRenderingPlugin(new Xe)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(S.F6),Me=y(94480);function T(b,E){if(!{}.hasOwnProperty.call(b,E))throw new TypeError("attempted to use private field on non-instance");return b}var at=0;function fe(b){return"__private_"+at+++"_"+b}var Jt=y(76075),Ie=y(71879);var Ne=function(){function b(){(0,_.Z)(this,b),this.cacheStore=new Map}return(0,c.Z)(b,[{key:"onRefAdded",value:function(h){}},{key:"has",value:function(h){return this.cacheStore.has(h)}},{key:"put",value:function(h,g,M){return this.cacheStore.has(h)?!1:(this.cacheStore.set(h,{value:g,counter:new Set([M.entity])}),this.onRefAdded(M),!0)}},{key:"get",value:function(h,g){var M=this.cacheStore.get(h);return M?(M.counter.has(g.entity)||(M.counter.add(g.entity),this.onRefAdded(g)),M.value):null}},{key:"update",value:function(h,g,M){var Y=this.cacheStore.get(h);return Y?(Y.value=(0,be.Z)((0,be.Z)({},Y.value),g),Y.counter.has(M.entity)||(Y.counter.add(M.entity),this.onRefAdded(M)),!0):!1}},{key:"release",value:function(h,g){var M=this.cacheStore.get(h);return M?(M.counter.delete(g.entity),M.counter.size<=0&&this.cacheStore.delete(h),!0):!1}},{key:"releaseRef",value:function(h){var g=this;Array.from(this.cacheStore.keys()).forEach(function(M){g.release(M,h)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),en=[],St=[],tt=function(){function b(){(0,_.Z)(this,b)}return(0,c.Z)(b,null,[{key:"stop",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b.api;b.rafId&&(h.cancelAnimationFrame(b.rafId),b.rafId=null)}},{key:"executeTask",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b.api;en.length<=0&&St.length<=0||(St.forEach(function(g){return g()}),St=en.splice(0,b.TASK_NUM_PER_FRAME),b.rafId=h.requestAnimationFrame(function(){b.executeTask(h)}))}},{key:"sliceImage",value:function(h,g,M,Y){for(var J=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,ot=arguments.length>5&&arguments[5]!==void 0?arguments[5]:b.api,vt=h.naturalWidth||h.width,zt=h.naturalHeight||h.height,q=g-J,$=M-J,H=Math.ceil(vt/q),nt=Math.ceil(zt/$),Mt={tileSize:[g,M],gridSize:[nt,H],tiles:Array(nt).fill(null).map(function(){return Array(H).fill(null)})},Wt=function(bt){for(var pt=function(Vt){en.push(function(){var ve=Vt*q,ge=bt*$,Yt=[Math.min(g,vt-ve),Math.min(M,zt-ge)],Ce=Yt[0],qe=Yt[1],Qe=ot.createCanvas();Qe.width=g,Qe.height=M;var Nn=Qe.getContext("2d");Nn.drawImage(h,ve,ge,Ce,qe,0,0,Ce,qe),Mt.tiles[bt][Vt]={x:ve,y:ge,tileX:Vt,tileY:bt,data:Qe},Y()})},ut=0;ut<H;ut++)pt(ut)},Tt=0;Tt<nt;Tt++)Wt(Tt);return b.stop(),b.executeTask(),Mt}}])}();tt.TASK_NUM_PER_FRAME=10;var Nt=new Ne;Nt.onRefAdded=function(E){var h=this;E.addEventListener(S.Dk.DESTROY,function(){h.releaseRef(E)},{once:!0})};var Xt=function(){function b(E,h){(0,_.Z)(this,b),this.gradientCache={},this.patternCache={},this.context=E,this.runtime=h}return(0,c.Z)(b,[{key:"getImageSync",value:function(h,g,M){var Y=(0,Ie.Z)(h)?h:h.src;if(Nt.has(Y)){var J=Nt.get(Y,g);if(J.img.complete)return M==null||M(J),J}return this.getOrCreateImage(h,g).then(function(ot){M==null||M(ot)}).catch(function(ot){console.error(ot)}),null}},{key:"getOrCreateImage",value:function(h,g){var M=this,Y=(0,Ie.Z)(h)?h:h.src;if(!(0,Ie.Z)(h)&&!Nt.has(Y)){var J={img:h,size:[h.naturalWidth||h.width,h.naturalHeight||h.height],tileSize:Lt(h)};Nt.put(Y,J,g)}if(Nt.has(Y)){var ot=Nt.get(Y,g);return ot.img.complete?Promise.resolve(ot):new Promise(function(vt,zt){ot.img.addEventListener("load",function(){ot.size=[ot.img.naturalWidth||ot.img.width,ot.img.naturalHeight||ot.img.height],ot.tileSize=Lt(ot.img),vt(ot)}),ot.img.addEventListener("error",function(q){zt(q)})})}return new Promise(function(vt,zt){var q=M.context.config.createImage();if(q){var $={img:q,size:[0,0],tileSize:Lt(q)};Nt.put(Y,$,g),q.onload=function(){$.size=[q.naturalWidth||q.width,q.naturalHeight||q.height],$.tileSize=Lt($.img),vt($)},q.onerror=function(H){zt(H)},q.crossOrigin="Anonymous",q.src=Y}})}},{key:"createDownSampledImage",value:function(){var E=(0,Ct.Z)((0,Rt.Z)().mark(function g(M,Y){var J,ot,vt,zt,q,$,H,nt,Mt,Wt,Tt,Kt,bt,pt;return(0,Rt.Z)().wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return ut.next=1,this.getOrCreateImage(M,Y);case 1:if(J=ut.sent,typeof J.downSamplingRate=="undefined"){ut.next=2;break}return ut.abrupt("return",J);case 2:if(ot=this.context.config.enableLargeImageOptimization,vt=typeof ot=="boolean"?{}:ot,zt=vt.maxDownSampledImageSize,q=zt===void 0?2048:zt,$=vt.downSamplingRateThreshold,H=$===void 0?.5:$,nt=this.runtime.globalThis.createImageBitmap,Mt=(0,w.Z)(J.size,2),Wt=Mt[0],Tt=Mt[1],Kt=J.img,bt=Math.min((q+q)/(Wt+Tt),Math.max(.01,Math.min(H,.5))),pt=(0,be.Z)((0,be.Z)({},J),{},{downSamplingRate:bt}),Nt.update(J.img.src,pt,Y),!nt){ut.next=7;break}return ut.prev=3,ut.next=4,nt(J.img,{resizeWidth:Wt*bt,resizeHeight:Tt*bt});case 4:Kt=ut.sent,ut.next=6;break;case 5:ut.prev=5,ut.catch(3),bt=1;case 6:ut.next=8;break;case 7:bt=1;case 8:return pt=(0,be.Z)((0,be.Z)({},this.getImageSync(M,Y)),{},{downSampled:Kt,downSamplingRate:bt}),Nt.update(J.img.src,pt,Y),ut.abrupt("return",pt);case 9:case"end":return ut.stop()}},g,this,[[3,5]])}));function h(g,M){return E.apply(this,arguments)}return h}()},{key:"createImageTiles",value:function(){var E=(0,Ct.Z)((0,Rt.Z)().mark(function g(M,Y,J,ot){var vt,zt,q,$,H;return(0,Rt.Z)().wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.next=1,this.getOrCreateImage(M,ot);case 1:return vt=nt.sent,zt=ot.ownerDocument.defaultView,q=zt.requestAnimationFrame,$=zt.cancelAnimationFrame,tt.api={requestAnimationFrame:q,cancelAnimationFrame:$,createCanvas:function(){return S.jB.createCanvas()}},H=(0,be.Z)((0,be.Z)({},vt),tt.sliceImage(vt.img,vt.tileSize[0],vt.tileSize[0],J)),Nt.update(vt.img.src,H,ot),nt.abrupt("return",H);case 2:case"end":return nt.stop()}},g,this)}));function h(g,M,Y,J){return E.apply(this,arguments)}return h}()},{key:"releaseImage",value:function(h,g){Nt.release((0,Ie.Z)(h)?h:h.src,g)}},{key:"releaseImageRef",value:function(h){Nt.releaseRef(h)}},{key:"getOrCreatePatternSync",value:function(h,g,M,Y,J,ot,vt){var zt=this.generatePatternKey(g);if(zt&&this.patternCache[zt])return this.patternCache[zt];var q=g.image,$=g.repetition,H=g.transform,nt,Mt=!1;if((0,Ie.Z)(q)){var Wt=this.getImageSync(q,h,vt);nt=Wt==null?void 0:Wt.img}else Y?(nt=Y,Mt=!0):nt=q;var Tt=nt&&M.createPattern(nt,$);if(Tt){var Kt;H?Kt=(0,S.G0)((0,S.G$)(H),new S.s$({})):Kt=de.identity(de.create()),Mt&&de.scale(Kt,Kt,[1/J,1/J,1]),Tt.setTransform({a:Kt[0],b:Kt[1],c:Kt[4],d:Kt[5],e:Kt[12]+ot[0],f:Kt[13]+ot[1]})}return zt&&Tt&&(this.patternCache[zt]=Tt),Tt}},{key:"getOrCreateGradient",value:function(h,g){var M=this.generateGradientKey(h),Y=h.type,J=h.steps,ot=h.min,vt=h.width,zt=h.height,q=h.angle,$=h.cx,H=h.cy,nt=h.size;if(this.gradientCache[M])return this.gradientCache[M];var Mt=null;if(Y===S.GL.LinearGradient){var Wt=(0,S.Rx)(ot,vt,zt,q),Tt=Wt.x1,Kt=Wt.y1,bt=Wt.x2,pt=Wt.y2;Mt=g.createLinearGradient(Tt,Kt,bt,pt)}else if(Y===S.GL.RadialGradient){var ut=(0,S.o6)(ot,vt,zt,$,H,nt),Gt=ut.x,Vt=ut.y,ve=ut.r;Mt=g.createRadialGradient(Gt,Vt,0,Gt,Vt,ve)}return Mt&&(J.forEach(function(ge){var Yt=ge.offset,Ce=ge.color;if(Yt.unit===S.Cm.kPercentage){var qe;(qe=Mt)===null||qe===void 0||qe.addColorStop(Yt.value/100,Ce.toString())}}),this.gradientCache[M]=Mt),this.gradientCache[M]}},{key:"generateGradientKey",value:function(h){var g=h.type,M=h.min,Y=h.width,J=h.height,ot=h.steps,vt=h.angle,zt=h.cx,q=h.cy,$=h.size;return"gradient-".concat(g,"-").concat((vt==null?void 0:vt.toString())||0,"-").concat((zt==null?void 0:zt.toString())||0,"-").concat((q==null?void 0:q.toString())||0,"-").concat(($==null?void 0:$.toString())||0,"-").concat(M[0],"-").concat(M[1],"-").concat(Y,"-").concat(J,"-").concat(ot.map(function(H){var nt=H.offset,Mt=H.color;return"".concat(nt).concat(Mt)}).join("-"))}},{key:"generatePatternKey",value:function(h){var g=h.image,M=h.repetition;if((0,Ie.Z)(g))return"pattern-".concat(g,"-").concat(M);if(g.nodeName==="rect")return"pattern-".concat(g.entity,"-").concat(M)}}])}();Xt.isSupportTile=!!S.jB.createCanvas();function Lt(b){if(!b.complete)return[0,0];var E=b.naturalWidth||b.width,h=b.naturalHeight||b.height,g=256;return[256,512].forEach(function(M){var Y=Math.ceil(h/M),J=Math.ceil(E/M);Y*J<1e3&&(g=M)}),[g,g]}var Zt=function(){function b(){(0,_.Z)(this,b)}return(0,c.Z)(b,[{key:"apply",value:function(h){var g=h.renderingService,M=h.renderingContext,Y=h.imagePool,J=M.root.ownerDocument.defaultView,ot=function($,H,nt){var Mt=$.parsedStyle,Wt=Mt.width,Tt=Mt.height;Wt&&!Tt?$.setAttribute("height",nt/H*Wt):!Wt&&Tt&&$.setAttribute("width",H/nt*Tt)},vt=function($){var H=$.target,nt=H.nodeName,Mt=H.attributes;if(nt===S.bn.IMAGE){var Wt=Mt.src,Tt=Mt.keepAspectRatio;Y.getImageSync(Wt,H,function(Kt){var bt=Kt.img,pt=bt.width,ut=bt.height;Tt&&ot(H,pt,ut),H.renderable.dirty=!0,g.dirtify()})}},zt=function($){var H=$.target,nt=$.attrName,Mt=$.prevValue,Wt=$.newValue;H.nodeName!==S.bn.IMAGE||nt!=="src"||(Mt!==Wt&&Y.releaseImage(Mt,H),(0,Ie.Z)(Wt)&&Y.getOrCreateImage(Wt,H).then(function(Tt){var Kt=Tt.img,bt=Kt.width,pt=Kt.height;H.attributes.keepAspectRatio&&ot(H,bt,pt),H.renderable.dirty=!0,g.dirtify()}).catch(function(){}))};g.hooks.init.tap(b.tag,function(){J.addEventListener(S.Dk.MOUNTED,vt),J.addEventListener(S.Dk.ATTR_MODIFIED,zt)}),g.hooks.destroy.tap(b.tag,function(){J.removeEventListener(S.Dk.MOUNTED,vt),J.removeEventListener(S.Dk.ATTR_MODIFIED,zt)})}}])}();Zt.tag="LoadImage";var Ut=function(b){function E(){var h;(0,_.Z)(this,E);for(var g=arguments.length,M=new Array(g),Y=0;Y<g;Y++)M[Y]=arguments[Y];return h=(0,I.Z)(this,E,[].concat(M)),h.name="image-loader",h}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"init",value:function(g){this.context.imagePool=new Xt(this.context,g),this.addRenderingPlugin(new Zt)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(S.F6);var qt=fe("renderState"),se=function(){function b(E){(0,_.Z)(this,b),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,qt,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=de.create(),this.dprMatrix=de.create(),this.tmpMat4=de.create(),this.vec3a=Ht.Ue(),this.vec3b=Ht.Ue(),this.vec3c=Ht.Ue(),this.vec3d=Ht.Ue(),this.canvasRendererPluginOptions=E}return(0,c.Z)(b,[{key:"apply",value:function(h,g){var M=this;this.context=h;var Y=this.context,J=Y.config,ot=Y.camera,vt=Y.renderingService,zt=Y.renderingContext,q=Y.rBushRoot,$=Y.pathGeneratorFactory,H=J.renderer.getConfig().enableRenderingOptimization;J.renderer.getConfig().enableDirtyCheck=!1,J.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=q,this.pathGeneratorFactory=$;var nt=h.contextService,Mt=zt.root.ownerDocument.defaultView,Wt=function(ut){var Gt=ut.target,Vt=Gt.rBushNode;Vt!=null&&Vt.aabb&&M.removedRBushNodeAABBs.push(Vt.aabb)},Tt=function(ut){var Gt=ut.target,Vt=Gt.rBushNode;Vt.aabb&&M.removedRBushNodeAABBs.push(Vt.aabb)};vt.hooks.init.tap(b.tag,function(){Mt.addEventListener(S.Dk.UNMOUNTED,Wt),Mt.addEventListener(S.Dk.CULLED,Tt);var pt=nt.getDPR(),ut=J.width,Gt=J.height,Vt=nt.getContext();M.clearRect(Vt,0,0,ut*pt,Gt*pt,J.background)}),vt.hooks.destroy.tap(b.tag,function(){Mt.removeEventListener(S.Dk.UNMOUNTED,Wt),Mt.removeEventListener(S.Dk.CULLED,Tt),M.renderQueue=[],M.removedRBushNodeAABBs=[],T(M,qt)[qt]={restoreStack:[],prevObject:null,currentContext:null}});var Kt=function(){var ut,Gt=nt.getContext(),Vt=nt.getDPR(),ve=J.width,ge=J.height,Yt=M.canvasRendererPluginOptions,Ce=Yt.dirtyObjectNumThreshold,qe=Yt.dirtyObjectRatioThreshold,Qe=vt.getStats(),Nn=Qe.total,Dn=Qe.rendered,Rn=Dn/Nn;M.clearFullScreen=M.clearFullScreenLastFrame||!((ut=Mt.context.renderingPlugins[1])!==null&&ut!==void 0&&ut.isFirstTimeRenderingFinished)||vt.disableDirtyRectangleRendering()||Dn>Ce&&Rn>qe,Gt&&(typeof Gt.resetTransform=="function"?Gt.resetTransform():Gt.setTransform(1,0,0,1,0,0),M.clearFullScreen&&M.clearRect(Gt,0,0,ve*Vt,ge*Vt,J.background))},bt=function(ut,Gt){for(var Vt=[ut];Vt.length>0;){var ve,ge=Vt.pop();ge.isVisible()&&!ge.isCulled()&&(H?M.renderDisplayObjectOptimized(ge,Gt,M.context,T(M,qt)[qt],g):M.renderDisplayObject(ge,Gt,M.context,T(M,qt)[qt],g));for(var Yt=((ve=ge.sortable)===null||ve===void 0||(ve=ve.sorted)===null||ve===void 0?void 0:ve.length)>0?ge.sortable.sorted:ge.childNodes,Ce=Yt.length-1;Ce>=0;Ce--)Vt.push(Yt[Ce])}};vt.hooks.endFrame.tap(b.tag,function(){if(Kt(),zt.root.childNodes.length===0){M.clearFullScreenLastFrame=!0;return}H=J.renderer.getConfig().enableRenderingOptimization,T(M,qt)[qt]={restoreStack:[],prevObject:null,currentContext:T(M,qt)[qt].currentContext},T(M,qt)[qt].currentContext.clear(),M.clearFullScreenLastFrame=!1;var pt=nt.getContext(),ut=nt.getDPR();if(de.fromScaling(M.dprMatrix,[ut,ut,1]),de.multiply(M.vpMatrix,M.dprMatrix,ot.getOrthoMatrix()),M.clearFullScreen)H?(pt.save(),bt(zt.root,pt),pt.restore()):bt(zt.root,pt),M.removedRBushNodeAABBs=[];else{var Gt=M.safeMergeAABB.apply(M,[M.mergeDirtyAABBs(M.renderQueue)].concat((0,Me.Z)(M.removedRBushNodeAABBs.map(function(br){var xi=br.minX,di=br.minY,Lr=br.maxX,Ci=br.maxY,fi=new S.mN;return fi.setMinMax([xi,di,0],[Lr,Ci,0]),fi}))));if(M.removedRBushNodeAABBs=[],S.mN.isEmpty(Gt)){M.renderQueue=[];return}var Vt=M.convertAABB2Rect(Gt),ve=Vt.x,ge=Vt.y,Yt=Vt.width,Ce=Vt.height,qe=Ht.fF(M.vec3a,[ve,ge,0],M.vpMatrix),Qe=Ht.fF(M.vec3b,[ve+Yt,ge,0],M.vpMatrix),Nn=Ht.fF(M.vec3c,[ve,ge+Ce,0],M.vpMatrix),Dn=Ht.fF(M.vec3d,[ve+Yt,ge+Ce,0],M.vpMatrix),Rn=Math.min(qe[0],Qe[0],Dn[0],Nn[0]),Xn=Math.min(qe[1],Qe[1],Dn[1],Nn[1]),tr=Math.max(qe[0],Qe[0],Dn[0],Nn[0]),Mr=Math.max(qe[1],Qe[1],Dn[1],Nn[1]),yr=Math.floor(Rn),vr=Math.floor(Xn),Cr=Math.ceil(tr-Rn),ur=Math.ceil(Mr-Xn);pt.save(),M.clearRect(pt,yr,vr,Cr,ur,J.background),pt.beginPath(),pt.rect(yr,vr,Cr,ur),pt.clip(),pt.setTransform(M.vpMatrix[0],M.vpMatrix[1],M.vpMatrix[4],M.vpMatrix[5],M.vpMatrix[12],M.vpMatrix[13]);var Kn=J.renderer.getConfig(),Ur=Kn.enableDirtyRectangleRenderingDebug;Ur&&Mt.dispatchEvent(new S.Aw(S.$6.DIRTY_RECTANGLE,{dirtyRect:{x:yr,y:vr,width:Cr,height:ur}}));var Yr=M.searchDirtyObjects(Gt);Yr.sort(function(br,xi){return br.sortable.renderOrder-xi.sortable.renderOrder}).forEach(function(br){br&&br.isVisible()&&!br.isCulled()&&M.renderDisplayObject(br,pt,M.context,T(M,qt)[qt],g)}),pt.restore(),M.renderQueue.forEach(function(br){M.saveDirtyAABB(br)}),M.renderQueue=[]}T(M,qt)[qt].restoreStack.forEach(function(){pt.restore()}),T(M,qt)[qt].restoreStack=[]}),vt.hooks.render.tap(b.tag,function(pt){M.clearFullScreen||M.renderQueue.push(pt)})}},{key:"clearRect",value:function(h,g,M,Y,J,ot){h.clearRect(g,M,Y,J),ot&&(h.fillStyle=ot,h.fillRect(g,M,Y,J))}},{key:"renderDisplayObjectOptimized",value:function(h,g,M,Y,J){var ot=h.nodeName,vt=!1,zt=!1,q=this.context.styleRendererFactory[ot],$=this.pathGeneratorFactory[ot],H=h.parsedStyle.clipPath;if(H){vt=!Y.prevObject||!de.exactEquals(H.getWorldTransform(),Y.prevObject.getWorldTransform()),vt&&(this.applyWorldTransform(g,H),Y.prevObject=null);var nt=this.pathGeneratorFactory[H.nodeName];nt&&(g.save(),zt=!0,g.beginPath(),nt(g,H.parsedStyle),g.closePath(),g.clip())}if(q){vt=!Y.prevObject||!de.exactEquals(h.getWorldTransform(),Y.prevObject.getWorldTransform()),vt&&this.applyWorldTransform(g,h);var Mt=!Y.prevObject;if(!Mt){var Wt=Y.prevObject.nodeName;ot===S.bn.TEXT?Mt=Wt!==S.bn.TEXT:ot===S.bn.IMAGE?Mt=Wt!==S.bn.IMAGE:Mt=Wt===S.bn.TEXT||Wt===S.bn.IMAGE}q.applyStyleToContext(g,h,Mt,Y),Y.prevObject=h}$&&(g.beginPath(),$(g,h.parsedStyle),ot!==S.bn.LINE&&ot!==S.bn.PATH&&ot!==S.bn.POLYLINE&&g.closePath()),q&&q.drawToContext(g,h,T(this,qt)[qt],this,J),zt&&g.restore(),h.dirty(!1)}},{key:"renderDisplayObject",value:function(h,g,M,Y,J){var ot=h.nodeName,vt=Y.restoreStack[Y.restoreStack.length-1];vt&&!(h.compareDocumentPosition(vt)&S.NB.DOCUMENT_POSITION_CONTAINS)&&(g.restore(),Y.restoreStack.pop());var zt=this.context.styleRendererFactory[ot],q=this.pathGeneratorFactory[ot],$=h.parsedStyle.clipPath;if($){this.applyWorldTransform(g,$);var H=this.pathGeneratorFactory[$.nodeName];H&&(g.save(),Y.restoreStack.push(h),g.beginPath(),H(g,$.parsedStyle),g.closePath(),g.clip())}zt&&(this.applyWorldTransform(g,h),g.save(),this.applyAttributesToContext(g,h)),q&&(g.beginPath(),q(g,h.parsedStyle),ot!==S.bn.LINE&&ot!==S.bn.PATH&&ot!==S.bn.POLYLINE&&g.closePath()),zt&&(zt.render(g,h.parsedStyle,h,M,this,J),g.restore()),h.dirty(!1)}},{key:"applyAttributesToContext",value:function(h,g){var M=g.parsedStyle,Y=M.stroke,J=M.fill,ot=M.opacity,vt=M.lineDash,zt=M.lineDashOffset;vt&&h.setLineDash(vt),(0,Jt.Z)(zt)||(h.lineDashOffset=zt),(0,Jt.Z)(ot)||(h.globalAlpha*=ot),!(0,Jt.Z)(Y)&&!Array.isArray(Y)&&!Y.isNone&&(h.strokeStyle=g.attributes.stroke),!(0,Jt.Z)(J)&&!Array.isArray(J)&&!J.isNone&&(h.fillStyle=g.attributes.fill)}},{key:"convertAABB2Rect",value:function(h){var g=h.getMin(),M=h.getMax(),Y=Math.floor(g[0]),J=Math.floor(g[1]),ot=Math.ceil(M[0]),vt=Math.ceil(M[1]),zt=ot-Y,q=vt-J;return{x:Y,y:J,width:zt,height:q}}},{key:"mergeDirtyAABBs",value:function(h){var g=new S.mN;return h.forEach(function(M){var Y=M.getRenderBounds();g.add(Y);var J=M.renderable.dirtyRenderBounds;J&&g.add(J)}),g}},{key:"searchDirtyObjects",value:function(h){var g=h.getMin(),M=(0,w.Z)(g,2),Y=M[0],J=M[1],ot=h.getMax(),vt=(0,w.Z)(ot,2),zt=vt[0],q=vt[1],$=this.rBush.search({minX:Y,minY:J,maxX:zt,maxY:q});return $.map(function(H){var nt=H.displayObject;return nt})}},{key:"saveDirtyAABB",value:function(h){var g=h.renderable;g.dirtyRenderBounds||(g.dirtyRenderBounds=new S.mN);var M=h.getRenderBounds();M&&g.dirtyRenderBounds.update(M.center,M.halfExtents)}},{key:"applyWorldTransform",value:function(h,g,M){M?(de.copy(this.tmpMat4,g.getLocalTransform()),de.multiply(this.tmpMat4,M,this.tmpMat4),de.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(de.copy(this.tmpMat4,g.getWorldTransform()),de.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)),h.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var h=new S.mN,g=arguments.length,M=new Array(g),Y=0;Y<g;Y++)M[Y]=arguments[Y];return M.forEach(function(J){h.add(J)}),h}}])}();se.tag="CanvasRenderer";function te(b,E,h,g,M,Y,J){var ot,vt;if(b.image.nodeName==="rect"){var zt=b.image.parsedStyle,q=zt.width,$=zt.height;vt=g.contextService.getDPR();var H=g.config.offscreenCanvas;ot=Y.offscreenCanvasCreator.getOrCreateCanvas(H),ot.width=q*vt,ot.height=$*vt;var nt=Y.offscreenCanvasCreator.getOrCreateContext(H),Mt={restoreStack:[],prevObject:null,currentContext:new Map};b.image.forEach(function(Tt){M.renderDisplayObject(Tt,nt,g,Mt,Y)}),Mt.restoreStack.forEach(function(){nt.restore()})}var Wt=J.getOrCreatePatternSync(E,b,h,ot,vt,E.getGeometryBounds().min,function(){E.dirty(),g.renderingService.dirtify()});return Wt}function ke(b,E,h,g){var M;if(b.type===S.GL.LinearGradient||b.type===S.GL.RadialGradient){var Y=E.getGeometryBounds(),J=Y&&Y.halfExtents[0]*2||1,ot=Y&&Y.halfExtents[1]*2||1,vt=Y&&Y.min||[0,0];M=g.getOrCreateGradient((0,be.Z)((0,be.Z)({type:b.type},b.value),{},{min:vt,width:J,height:ot}),h)}return M}var He=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ve=["lineCap","lineJoin","miterLimit"],ln={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},On={};function yn(b,E,h,g){var M=g.has(E)?g.get(E):ln[E];return M!==h&&(E==="lineDash"?b.setLineDash(h):b[E]=h,g.set(E,h)),M}var lr=function(){function b(E){(0,_.Z)(this,b),this.imagePool=E}return(0,c.Z)(b,[{key:"applyAttributesToContext",value:function(h,g){}},{key:"render",value:function(h,g,M,Y,J,ot){}},{key:"applyCommonStyleToContext",value:function(h,g,M,Y){var J=M?On:Y.prevObject.parsedStyle,ot=g.parsedStyle;(M||ot.opacity!==J.opacity)&&yn(h,"globalAlpha",(0,Jt.Z)(ot.opacity)?ln.globalAlpha:ot.opacity,Y.currentContext),(M||ot.blend!==J.blend)&&yn(h,"globalCompositeOperation",(0,Jt.Z)(ot.blend)?ln.globalCompositeOperation:ot.blend,Y.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(h,g,M,Y){var J=M?On:Y.prevObject.parsedStyle,ot=g.parsedStyle,vt=ot.lineWidth,zt=vt===void 0?ln.lineWidth:vt,q=ot.fill&&!ot.fill.isNone,$=ot.stroke&&!ot.stroke.isNone&&zt>0;if($){if(M||g.attributes.stroke!==Y.prevObject.attributes.stroke){var H=!(0,Jt.Z)(ot.stroke)&&!Array.isArray(ot.stroke)&&!ot.stroke.isNone?g.attributes.stroke:ln.strokeStyle;yn(h,"strokeStyle",H,Y.currentContext)}(M||ot.lineWidth!==J.lineWidth)&&yn(h,"lineWidth",(0,Jt.Z)(ot.lineWidth)?ln.lineWidth:ot.lineWidth,Y.currentContext),(M||ot.lineDash!==J.lineDash)&&yn(h,"lineDash",ot.lineDash||ln.lineDash,Y.currentContext),(M||ot.lineDashOffset!==J.lineDashOffset)&&yn(h,"lineDashOffset",(0,Jt.Z)(ot.lineDashOffset)?ln.lineDashOffset:ot.lineDashOffset,Y.currentContext);for(var nt=0;nt<Ve.length;nt++){var Mt=Ve[nt];(M||ot[Mt]!==J[Mt])&&yn(h,Mt,(0,Jt.Z)(ot[Mt])?ln[Mt]:ot[Mt],Y.currentContext)}}if(q&&(M||g.attributes.fill!==Y.prevObject.attributes.fill)){var Wt=!(0,Jt.Z)(ot.fill)&&!Array.isArray(ot.fill)&&!ot.fill.isNone?g.attributes.fill:ln.fillStyle;yn(h,"fillStyle",Wt,Y.currentContext)}}},{key:"applyStyleToContext",value:function(h,g,M,Y){var J=g.nodeName;this.applyCommonStyleToContext(h,g,M,Y),J===S.bn.IMAGE||this.applyStrokeFillStyleToContext(h,g,M,Y)}},{key:"applyShadowAndFilterStyleToContext",value:function(h,g,M,Y){var J=g.parsedStyle;if(M){yn(h,"shadowColor",J.shadowColor.toString(),Y.currentContext);for(var ot=0;ot<He.length;ot++){var vt=He[ot];yn(h,vt,J[vt]||ln[vt],Y.currentContext)}}J.filter&&J.filter.length&&yn(h,"filter",g.attributes.filter,Y.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(h,g,M,Y){var J=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(g){yn(h,"shadowColor",ln.shadowColor,Y.currentContext);for(var ot=0;ot<He.length;ot++){var vt=He[ot];yn(h,vt,ln[vt],Y.currentContext)}}if(M)if(g&&J){var zt=h.filter;!(0,Jt.Z)(zt)&&zt.indexOf("drop-shadow")>-1&&yn(h,"filter",zt.replace(/drop-shadow\([^)]*\)/,"").trim()||ln.filter,Y.currentContext)}else yn(h,"filter",ln.filter,Y.currentContext)}},{key:"fillToContext",value:function(h,g,M,Y,J){var ot=this,vt=g.parsedStyle,zt=vt.fill,q=vt.fillRule,$=null;if(Array.isArray(zt)&&zt.length>0)zt.forEach(function(nt){var Mt=yn(h,"fillStyle",ke(nt,g,h,ot.imagePool),M.currentContext);$=$!=null?$:Mt,q?h.fill(q):h.fill()});else{if((0,S.R)(zt)){var H=te(zt,g,h,g.ownerDocument.defaultView.context,Y,J,this.imagePool);H&&(h.fillStyle=H,$=!0)}q?h.fill(q):h.fill()}$!==null&&yn(h,"fillStyle",$,M.currentContext)}},{key:"strokeToContext",value:function(h,g,M,Y,J){var ot=this,vt=g.parsedStyle.stroke,zt=null;if(Array.isArray(vt)&&vt.length>0)vt.forEach(function(H){var nt=yn(h,"strokeStyle",ke(H,g,h,ot.imagePool),M.currentContext);zt=zt!=null?zt:nt,h.stroke()});else{if((0,S.R)(vt)){var q=te(vt,g,h,g.ownerDocument.defaultView.context,Y,J,this.imagePool);if(q){var $=yn(h,"strokeStyle",q,M.currentContext);zt=zt!=null?zt:$}}h.stroke()}zt!==null&&yn(h,"strokeStyle",zt,M.currentContext)}},{key:"drawToContext",value:function(h,g,M,Y,J){var ot,vt=g.nodeName,zt=g.parsedStyle,q=zt.opacity,$=q===void 0?ln.globalAlpha:q,H=zt.fillOpacity,nt=H===void 0?ln.fillOpacity:H,Mt=zt.strokeOpacity,Wt=Mt===void 0?ln.strokeOpacity:Mt,Tt=zt.lineWidth,Kt=Tt===void 0?ln.lineWidth:Tt,bt=zt.fill&&!zt.fill.isNone,pt=zt.stroke&&!zt.stroke.isNone&&Kt>0;if(!(!bt&&!pt)){var ut=!(0,Jt.Z)(zt.shadowColor)&&zt.shadowBlur>0,Gt=zt.shadowType==="inner",Vt=((ot=zt.fill)===null||ot===void 0?void 0:ot.alpha)===0,ve=!!(zt.filter&&zt.filter.length),ge=ut&&pt&&(vt===S.bn.PATH||vt===S.bn.LINE||vt===S.bn.POLYLINE||Vt||Gt),Yt=null;if(bt){ge||this.applyShadowAndFilterStyleToContext(h,g,ut,M);var Ce=$*nt;Yt=yn(h,"globalAlpha",Ce,M.currentContext),this.fillToContext(h,g,M,Y,J),ge||this.clearShadowAndFilterStyleForContext(h,ut,ve,M)}if(pt){var qe=!1,Qe=$*Wt,Nn=yn(h,"globalAlpha",Qe,M.currentContext);if(Yt=bt?Yt:Nn,ge&&(this.applyShadowAndFilterStyleToContext(h,g,ut,M),qe=!0,Gt)){var Dn=h.globalCompositeOperation;h.globalCompositeOperation="source-atop",this.strokeToContext(h,g,M,Y,J),h.globalCompositeOperation=Dn,this.clearShadowAndFilterStyleForContext(h,ut,ve,M,!0)}this.strokeToContext(h,g,M,Y,J),qe&&this.clearShadowAndFilterStyleForContext(h,ut,ve,M)}Yt!==null&&yn(h,"globalAlpha",Yt,M.currentContext)}}}])}(),Zn=function(b){function E(){return(0,_.Z)(this,E),(0,I.Z)(this,E,arguments)}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"render",value:function(g,M,Y,J,ot,vt){var zt=M.fill,q=M.fillRule,$=M.opacity,H=$===void 0?1:$,nt=M.fillOpacity,Mt=nt===void 0?1:nt,Wt=M.stroke,Tt=M.strokeOpacity,Kt=Tt===void 0?1:Tt,bt=M.lineWidth,pt=bt===void 0?1:bt,ut=M.lineCap,Gt=M.lineJoin,Vt=M.shadowType,ve=M.shadowColor,ge=M.shadowBlur,Yt=M.filter,Ce=M.miterLimit,qe=zt&&!zt.isNone,Qe=Wt&&!Wt.isNone&&pt>0,Nn=(zt==null?void 0:zt.alpha)===0,Dn=!!(Yt&&Yt.length),Rn=!(0,Jt.Z)(ve)&&ge>0,Xn=Y.nodeName,tr=Vt==="inner",Mr=Qe&&Rn&&(Xn===S.bn.PATH||Xn===S.bn.LINE||Xn===S.bn.POLYLINE||Nn||tr);qe&&(g.globalAlpha=H*Mt,Mr||Yn(Y,g,Rn),ye(g,Y,zt,q,J,ot,vt,this.imagePool),Mr||this.clearShadowAndFilter(g,Dn,Rn)),Qe&&(g.globalAlpha=H*Kt,g.lineWidth=pt,(0,Jt.Z)(Ce)||(g.miterLimit=Ce),(0,Jt.Z)(ut)||(g.lineCap=ut),(0,Jt.Z)(Gt)||(g.lineJoin=Gt),Mr&&(tr&&(g.globalCompositeOperation="source-atop"),Yn(Y,g,!0),tr&&(xr(g,Y,Wt,J,ot,vt,this.imagePool),g.globalCompositeOperation=ln.globalCompositeOperation,this.clearShadowAndFilter(g,Dn,!0))),xr(g,Y,Wt,J,ot,vt,this.imagePool))}},{key:"clearShadowAndFilter",value:function(g,M,Y){if(Y&&(g.shadowColor="transparent",g.shadowBlur=0),M){var J=g.filter;!(0,Jt.Z)(J)&&J.indexOf("drop-shadow")>-1&&(g.filter=J.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(lr);function Yn(b,E,h){var g=b.parsedStyle,M=g.filter,Y=g.shadowColor,J=g.shadowBlur,ot=g.shadowOffsetX,vt=g.shadowOffsetY;M&&M.length&&(E.filter=b.style.filter),h&&(E.shadowColor=Y.toString(),E.shadowBlur=J||0,E.shadowOffsetX=ot||0,E.shadowOffsetY=vt||0)}function ye(b,E,h,g,M,Y,J,ot){var vt=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(h)?h.forEach(function(zt){b.fillStyle=ke(zt,E,b,ot),vt||(g?b.fill(g):b.fill())}):((0,S.R)(h)&&(b.fillStyle=te(h,E,b,M,Y,J,ot)),vt||(g?b.fill(g):b.fill()))}function xr(b,E,h,g,M,Y,J){var ot=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(h)?h.forEach(function(vt){b.strokeStyle=ke(vt,E,b,J),ot||b.stroke()}):((0,S.R)(h)&&(b.strokeStyle=te(h,E,b,g,M,Y,J)),ot||b.stroke())}function Hn(b,E){var h=(0,w.Z)(b,4),g=h[0],M=h[1],Y=h[2],J=h[3],ot=(0,w.Z)(E,4),vt=ot[0],zt=ot[1],q=ot[2],$=ot[3],H=Math.max(g,vt),nt=Math.max(M,zt),Mt=Math.min(g+Y,vt+q),Wt=Math.min(M+J,zt+$);return Mt<=H||Wt<=nt?null:[H,nt,Mt-H,Wt-nt]}function Br(b,E){var h=Ht.fF(Ht.Ue(),[b[0],b[1],0],E),g=Ht.fF(Ht.Ue(),[b[0]+b[2],b[1],0],E),M=Ht.fF(Ht.Ue(),[b[0],b[1]+b[3],0],E),Y=Ht.fF(Ht.Ue(),[b[0]+b[2],b[1]+b[3],0],E);return[Math.min(h[0],g[0],M[0],Y[0]),Math.min(h[1],g[1],M[1],Y[1]),Math.max(h[0],g[0],M[0],Y[0])-Math.min(h[0],g[0],M[0],Y[0]),Math.max(h[1],g[1],M[1],Y[1])-Math.min(h[1],g[1],M[1],Y[1])]}var Ar=function(b){function E(){return(0,_.Z)(this,E),(0,I.Z)(this,E,arguments)}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"renderDownSampled",value:function(g,M,Y,J){var ot=J.src,vt=J.imageCache;if(!vt.downSampled){this.imagePool.createDownSampledImage(ot,Y).then(function(){Y.ownerDocument&&(Y.dirty(),Y.ownerDocument.defaultView.context.renderingService.dirtify())}).catch(function(zt){console.error(zt)});return}g.drawImage(vt.downSampled,Math.floor(J.drawRect[0]),Math.floor(J.drawRect[1]),Math.ceil(J.drawRect[2]),Math.ceil(J.drawRect[3]))}},{key:"renderTile",value:function(g,M,Y,J){var ot=J.src,vt=J.imageCache,zt=J.imageRect,q=J.drawRect,$=vt.size,H=g.getTransform(),nt=H.a,Mt=H.b,Wt=H.c,Tt=H.d,Kt=H.e,bt=H.f;if(g.resetTransform(),!(vt!=null&&vt.gridSize)){this.imagePool.createImageTiles(ot,[],function(){Y.ownerDocument&&(Y.dirty(),Y.ownerDocument.defaultView.context.renderingService.dirtify())},Y).catch(function(Rn){console.error(Rn)});return}for(var pt=[$[0]/zt[2],$[1]/zt[3]],ut=[vt.tileSize[0]/pt[0],vt.tileSize[1]/pt[1]],Gt=[Math.floor((q[0]-zt[0])/ut[0]),Math.ceil((q[0]+q[2]-zt[0])/ut[0])],Vt=Gt[0],ve=Gt[1],ge=[Math.floor((q[1]-zt[1])/ut[1]),Math.ceil((q[1]+q[3]-zt[1])/ut[1])],Yt=ge[0],Ce=ge[1],qe=Yt;qe<=Ce;qe++)for(var Qe=Vt;Qe<=ve;Qe++){var Nn=vt.tiles[qe][Qe];if(Nn){var Dn=[Math.floor(zt[0]+Nn.tileX*ut[0]),Math.floor(zt[1]+Nn.tileY*ut[1]),Math.ceil(ut[0]),Math.ceil(ut[1])];g.drawImage(Nn.data,Dn[0],Dn[1],Dn[2],Dn[3])}}g.setTransform(nt,Mt,Wt,Tt,Kt,bt)}},{key:"render",value:function(g,M,Y){var J=M.x,ot=J===void 0?0:J,vt=M.y,zt=vt===void 0?0:vt,q=M.width,$=M.height,H=M.src,nt=M.shadowColor,Mt=M.shadowBlur,Wt=this.imagePool.getImageSync(H,Y),Tt=Wt==null?void 0:Wt.img,Kt=q,bt=$;if(Tt){Kt||(Kt=Tt.width),bt||(bt=Tt.height);var pt=!(0,Jt.Z)(nt)&&Mt>0;Yn(Y,g,pt);try{var ut=Y.ownerDocument.defaultView.getContextService().getDomElement(),Gt=ut.width,Vt=ut.height,ve=g.getTransform(),ge=ve.a,Yt=ve.b,Ce=ve.c,qe=ve.d,Qe=ve.e,Nn=ve.f,Dn=de.fromValues(ge,Ce,0,0,Yt,qe,0,0,0,0,1,0,Qe,Nn,0,1),Rn=Br([ot,zt,Kt,bt],Dn),Xn=Hn([0,0,Gt,Vt],Rn);if(!Xn)return;if(!Y.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){E.renderFull(g,M,Y,{image:Tt,drawRect:[ot,zt,Kt,bt]});return}var tr=Rn[2]/Wt.size[0];if(tr<(Wt.downSamplingRate||.5)){this.renderDownSampled(g,M,Y,{src:H,imageCache:Wt,drawRect:[ot,zt,Kt,bt]});return}if(!Xt.isSupportTile){E.renderFull(g,M,Y,{image:Tt,drawRect:[ot,zt,Kt,bt]});return}this.renderTile(g,M,Y,{src:H,imageCache:Wt,imageRect:Rn,drawRect:Xn})}catch(Mr){}}}},{key:"drawToContext",value:function(g,M,Y,J,ot){this.render(g,M.parsedStyle,M)}}],[{key:"renderFull",value:function(g,M,Y,J){g.drawImage(J.image,Math.floor(J.drawRect[0]),Math.floor(J.drawRect[1]),Math.ceil(J.drawRect[2]),Math.ceil(J.drawRect[3]))}}])}(Zn),ri=function(b){function E(){return(0,_.Z)(this,E),(0,I.Z)(this,E,arguments)}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"render",value:function(g,M,Y,J,ot,vt){Y.getBounds();var zt=M.lineWidth,q=zt===void 0?1:zt,$=M.textAlign,H=$===void 0?"start":$,nt=M.textBaseline,Mt=nt===void 0?"alphabetic":nt,Wt=M.lineJoin,Tt=Wt===void 0?"miter":Wt,Kt=M.miterLimit,bt=Kt===void 0?10:Kt,pt=M.letterSpacing,ut=pt===void 0?0:pt,Gt=M.stroke,Vt=M.fill,ve=M.fillRule,ge=M.fillOpacity,Yt=ge===void 0?1:ge,Ce=M.strokeOpacity,qe=Ce===void 0?1:Ce,Qe=M.opacity,Nn=Qe===void 0?1:Qe,Dn=M.metrics,Rn=M.x,Xn=Rn===void 0?0:Rn,tr=M.y,Mr=tr===void 0?0:tr,yr=M.dx,vr=M.dy,Cr=M.shadowColor,ur=M.shadowBlur,Kn=Dn.font,Ur=Dn.lines,Yr=Dn.height,br=Dn.lineHeight,xi=Dn.lineMetrics;g.font=Kn,g.lineWidth=q,g.textAlign=H==="middle"?"center":H;var di=Mt;di==="alphabetic"&&(di="bottom"),g.lineJoin=Tt,(0,Jt.Z)(bt)||(g.miterLimit=bt);var Lr=Mr;Mt==="middle"?Lr+=-Yr/2-br/2:Mt==="bottom"||Mt==="alphabetic"||Mt==="ideographic"?Lr+=-Yr:(Mt==="top"||Mt==="hanging")&&(Lr+=-br);var Ci=Xn+(yr||0);Lr+=vr||0,Ur.length===1&&(di==="bottom"?(di="middle",Lr-=.5*Yr):di==="top"&&(di="middle",Lr+=.5*Yr)),g.textBaseline=di;var fi=!(0,Jt.Z)(Cr)&&ur>0;Yn(Y,g,fi);for(var Ni=0;Ni<Ur.length;Ni++){var Ji=q/2+Ci;Lr+=br,!(0,Jt.Z)(Gt)&&!Gt.isNone&&q&&this.drawLetterSpacing(g,Y,Ur[Ni],xi[Ni],H,Ji,Lr,ut,Vt,ve,Yt,Gt,qe,Nn,!0,J,ot,vt),(0,Jt.Z)(Vt)||this.drawLetterSpacing(g,Y,Ur[Ni],xi[Ni],H,Ji,Lr,ut,Vt,ve,Yt,Gt,qe,Nn,!1,J,ot,vt)}}},{key:"drawLetterSpacing",value:function(g,M,Y,J,ot,vt,zt,q,$,H,nt,Mt,Wt,Tt,Kt,bt,pt,ut){if(q===0){Kt?this.strokeText(g,M,Y,vt,zt,Mt,Wt,bt,pt,ut):this.fillText(g,M,Y,vt,zt,$,H,nt,Tt,bt,pt,ut);return}var Gt=g.textAlign;g.textAlign="left";var Vt=vt;ot==="center"||ot==="middle"?Vt=vt-J.width/2:(ot==="right"||ot==="end")&&(Vt=vt-J.width);for(var ve=Array.from(Y),ge=g.measureText(Y).width,Yt=0,Ce=0;Ce<ve.length;++Ce){var qe=ve[Ce];Kt?this.strokeText(g,M,qe,Vt,zt,Mt,Wt,bt,pt,ut):this.fillText(g,M,qe,Vt,zt,$,H,nt,Tt,bt,pt,ut),Yt=g.measureText(Y.substring(Ce+1)).width,Vt+=ge-Yt+q,ge=Yt}g.textAlign=Gt}},{key:"fillText",value:function(g,M,Y,J,ot,vt,zt,q,$,H,nt,Mt){ye(g,M,vt,zt,H,nt,Mt,this.imagePool,!0);var Wt,Tt=!(0,Jt.Z)(q)&&q!==1;Tt&&(Wt=g.globalAlpha,g.globalAlpha=q*$),g.fillText(Y,J,ot),Tt&&(g.globalAlpha=Wt)}},{key:"strokeText",value:function(g,M,Y,J,ot,vt,zt,q,$,H){xr(g,M,vt,q,$,H,this.imagePool,!0);var nt,Mt=!(0,Jt.Z)(zt)&&zt!==1;Mt&&(nt=g.globalAlpha,g.globalAlpha=zt),g.strokeText(Y,J,ot),Mt&&(g.globalAlpha=nt)}},{key:"drawToContext",value:function(g,M,Y,J,ot){this.render(g,M.parsedStyle,M,M.ownerDocument.defaultView.context,J,ot)}}])}(Zn),mi=function(b){function E(){var h,g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,E),h=(0,I.Z)(this,E),h.name="canvas-renderer",h.options=g,h}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"init",value:function(){var g,M=(0,be.Z)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),Y=this.context.imagePool,J=new Zn(Y),ot=(g={},(0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)(g,S.bn.CIRCLE,J),S.bn.ELLIPSE,J),S.bn.RECT,J),S.bn.IMAGE,new Ar(Y)),S.bn.TEXT,new ri(Y)),S.bn.LINE,J),S.bn.POLYLINE,J),S.bn.POLYGON,J),S.bn.PATH,J),S.bn.GROUP,void 0),(0,R.Z)((0,R.Z)((0,R.Z)(g,S.bn.HTML,void 0),S.bn.MESH,void 0),S.bn.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=ot,this.context.styleRendererFactory=ot,this.addRenderingPlugin(new se(M))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(S.F6);var si=function(){function b(){(0,_.Z)(this,b)}return(0,c.Z)(b,[{key:"apply",value:function(h,g){var M=this,Y=h.renderingService,J=h.renderingContext,ot=h.config;this.context=h;var vt=J.root.ownerDocument.defaultView,zt=function(ge){Y.hooks.pointerMove.call(ge)},q=function(ge){Y.hooks.pointerUp.call(ge)},$=function(ge){Y.hooks.pointerDown.call(ge)},H=function(ge){Y.hooks.pointerOver.call(ge)},nt=function(ge){Y.hooks.pointerOut.call(ge)},Mt=function(ge){Y.hooks.pointerCancel.call(ge)},Wt=function(ge){Y.hooks.pointerWheel.call(ge)},Tt=function(ge){Y.hooks.click.call(ge)},Kt=function(ge){g.globalThis.document.addEventListener("pointermove",zt,!0),ge.addEventListener("pointerdown",$,!0),ge.addEventListener("pointerleave",nt,!0),ge.addEventListener("pointerover",H,!0),g.globalThis.addEventListener("pointerup",q,!0),g.globalThis.addEventListener("pointercancel",Mt,!0)},bt=function(ge){ge.addEventListener("touchstart",$,!0),ge.addEventListener("touchend",q,!0),ge.addEventListener("touchmove",zt,!0),ge.addEventListener("touchcancel",Mt,!0)},pt=function(ge){g.globalThis.document.addEventListener("mousemove",zt,!0),ge.addEventListener("mousedown",$,!0),ge.addEventListener("mouseout",nt,!0),ge.addEventListener("mouseover",H,!0),g.globalThis.addEventListener("mouseup",q,!0)},ut=function(ge){g.globalThis.document.removeEventListener("pointermove",zt,!0),ge.removeEventListener("pointerdown",$,!0),ge.removeEventListener("pointerleave",nt,!0),ge.removeEventListener("pointerover",H,!0),g.globalThis.removeEventListener("pointerup",q,!0),g.globalThis.removeEventListener("pointercancel",Mt,!0)},Gt=function(ge){ge.removeEventListener("touchstart",$,!0),ge.removeEventListener("touchend",q,!0),ge.removeEventListener("touchmove",zt,!0),ge.removeEventListener("touchcancel",Mt,!0)},Vt=function(ge){g.globalThis.document.removeEventListener("mousemove",zt,!0),ge.removeEventListener("mousedown",$,!0),ge.removeEventListener("mouseout",nt,!0),ge.removeEventListener("mouseover",H,!0),g.globalThis.removeEventListener("mouseup",q,!0)};Y.hooks.init.tap(b.tag,function(){var ve=M.context.contextService.getDomElement();g.globalThis.navigator.msPointerEnabled?(ve.style.msContentZooming="none",ve.style.msTouchAction="none"):vt.supportsPointerEvents&&(ve.style.touchAction="none"),vt.supportsPointerEvents?Kt(ve):pt(ve),vt.supportsTouchEvents&&bt(ve),ot.useNativeClickEvent&&ve.addEventListener("click",Tt,!0),ve.addEventListener("wheel",Wt,{passive:!0,capture:!0})}),Y.hooks.destroy.tap(b.tag,function(){var ve=M.context.contextService.getDomElement();g.globalThis.navigator.msPointerEnabled?(ve.style.msContentZooming="",ve.style.msTouchAction=""):vt.supportsPointerEvents&&(ve.style.touchAction=""),vt.supportsPointerEvents?ut(ve):Vt(ve),vt.supportsTouchEvents&&Gt(ve),ot.useNativeClickEvent&&ve.removeEventListener("click",Tt,!0),ve.removeEventListener("wheel",Wt,!0)})}}])}();si.tag="DOMInteraction";var Jr=function(b){function E(){var h;(0,_.Z)(this,E);for(var g=arguments.length,M=new Array(g),Y=0;Y<g;Y++)M[Y]=arguments[Y];return h=(0,I.Z)(this,E,[].concat(M)),h.name="dom-interaction",h}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"init",value:function(){this.addRenderingPlugin(new si)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(S.F6),_i=y(1933);var Yi="g-canvas-camera",Ei=function(){function b(){(0,_.Z)(this,b),this.displayObjectHTMLElementMap=new WeakMap}return(0,c.Z)(b,[{key:"joinTransformMatrix",value:function(h){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([h[0],h[1],h[4],h[5],h[12]+g[0],h[13]+g[1]].join(","),")")}},{key:"apply",value:function(h,g){var M=this,Y=h.camera,J=h.renderingContext,ot=h.renderingService;this.context=h;var vt=J.root.ownerDocument.defaultView,zt=vt.context.eventService.nativeHTMLMap,q=function(Kt,bt){bt.style.transform=M.joinTransformMatrix(Kt.getWorldTransform(),Kt.getOrigin())},$=function(Kt){var bt=Kt.target;if(bt.nodeName===S.bn.HTML){M.$camera||(M.$camera=M.createCamera(Y));var pt=M.getOrCreateEl(bt);M.$camera.appendChild(pt),Object.keys(bt.attributes).forEach(function(ut){M.updateAttribute(ut,bt)}),q(bt,pt),zt.set(pt,bt)}},H=function(Kt){var bt=Kt.target;if(bt.nodeName===S.bn.HTML&&M.$camera){var pt=M.getOrCreateEl(bt);pt&&(pt.remove(),zt.delete(pt))}},nt=function(Kt){var bt=Kt.target;if(bt.nodeName===S.bn.HTML){var pt=Kt.attrName;M.updateAttribute(pt,bt)}},Mt=function(Kt){var bt=Kt.target,pt=bt.nodeName===S.bn.FRAGMENT?bt.childNodes:[bt];pt.forEach(function(ut){if(ut.nodeName===S.bn.HTML){var Gt=M.getOrCreateEl(ut);q(ut,Gt)}})},Wt=function(){if(M.$camera){var Kt=M.context.config,bt=Kt.width,pt=Kt.height;M.$camera.parentElement.style.width="".concat(bt||0,"px"),M.$camera.parentElement.style.height="".concat(pt||0,"px")}};ot.hooks.init.tap(b.tag,function(){vt.addEventListener(S.$6.RESIZE,Wt),vt.addEventListener(S.Dk.MOUNTED,$),vt.addEventListener(S.Dk.UNMOUNTED,H),vt.addEventListener(S.Dk.ATTR_MODIFIED,nt),vt.addEventListener(S.Dk.BOUNDS_CHANGED,Mt)}),ot.hooks.endFrame.tap(b.tag,function(){M.$camera&&J.renderReasons.has(S.Rr.CAMERA_CHANGED)&&(M.$camera.style.transform=M.joinTransformMatrix(Y.getOrthoMatrix()))}),ot.hooks.destroy.tap(b.tag,function(){M.$camera&&M.$camera.remove(),vt.removeEventListener(S.$6.RESIZE,Wt),vt.removeEventListener(S.Dk.MOUNTED,$),vt.removeEventListener(S.Dk.UNMOUNTED,H),vt.removeEventListener(S.Dk.ATTR_MODIFIED,nt),vt.removeEventListener(S.Dk.BOUNDS_CHANGED,Mt)})}},{key:"createCamera",value:function(h){var g=this.context.config,M=g.document,Y=g.width,J=g.height,ot=this.context.contextService.getDomElement(),vt=ot.parentNode;if(vt){var zt=Yi,q=vt.querySelector("#".concat(zt));if(!q){var $=(M||document).createElement("div");$.style.overflow="hidden",$.style.pointerEvents="none",$.style.position="absolute",$.style.left="0px",$.style.top="0px",$.style.width="".concat(Y||0,"px"),$.style.height="".concat(J||0,"px");var H=(M||document).createElement("div");q=H,H.id=zt,H.style.position="absolute",H.style.left="".concat(ot.offsetLeft||0,"px"),H.style.top="".concat(ot.offsetTop||0,"px"),H.style.transformOrigin="left top",H.style.transform=this.joinTransformMatrix(h.getOrthoMatrix()),H.style.pointerEvents="none",H.style.width="100%",H.style.height="100%",$.appendChild(H),vt.appendChild($)}return q}return null}},{key:"getOrCreateEl",value:function(h){var g=this.context.config.document,M=this.displayObjectHTMLElementMap.get(h);return M||(M=(g||document).createElement("div"),h.parsedStyle.$el=M,this.displayObjectHTMLElementMap.set(h,M),h.id&&(M.id=h.id),h.name&&M.setAttribute("name",h.name),h.className&&(M.className=h.className),M.style.position="absolute",M.style["will-change"]="transform",M.style.transform=this.joinTransformMatrix(h.getWorldTransform(),h.getOrigin())),M}},{key:"updateAttribute",value:function(h,g){var M=this.getOrCreateEl(g);switch(h){case"innerHTML":var Y=g.parsedStyle.innerHTML;(0,Ie.Z)(Y)?M.innerHTML=Y:(M.innerHTML="",M.appendChild(Y));break;case"x":M.style.left="".concat(g.parsedStyle.x,"px");break;case"y":M.style.top="".concat(g.parsedStyle.y,"px");break;case"transformOrigin":var J=g.parsedStyle.transformOrigin;M.style["transform-origin"]="".concat(J[0].buildCSSText(null,null,"")," ").concat(J[1].buildCSSText(null,null,""));break;case"width":var ot=g.parsedStyle.width;M.style.width=(0,_i.Z)(ot)?"".concat(ot,"px"):ot.toString();break;case"height":var vt=g.parsedStyle.height;M.style.height=(0,_i.Z)(vt)?"".concat(vt,"px"):vt.toString();break;case"zIndex":var zt=g.parsedStyle.zIndex;M.style["z-index"]="".concat(zt);break;case"visibility":var q=g.parsedStyle.visibility;M.style.visibility=q;break;case"pointerEvents":var $=g.parsedStyle.pointerEvents,H=$===void 0?"auto":$;M.style.pointerEvents=H;break;case"opacity":var nt=g.parsedStyle.opacity;M.style.opacity="".concat(nt);break;case"fill":var Mt=g.parsedStyle.fill,Wt="";(0,S.qA)(Mt)?Mt.isNone?Wt="transparent":Wt=g.getAttribute("fill"):Array.isArray(Mt)?Wt=g.getAttribute("fill"):(0,S.R)(Mt),M.style.background=Wt;break;case"stroke":var Tt=g.parsedStyle.stroke,Kt="";(0,S.qA)(Tt)?Tt.isNone?Kt="transparent":Kt=g.getAttribute("stroke"):Array.isArray(Tt)?Kt=g.getAttribute("stroke"):(0,S.R)(Tt),M.style["border-color"]=Kt,M.style["border-style"]="solid";break;case"lineWidth":var bt=g.parsedStyle.lineWidth;M.style["border-width"]="".concat(bt||0,"px");break;case"lineDash":M.style["border-style"]="dashed";break;case"filter":var pt=g.style.filter;M.style.filter=pt;break;default:!(0,Jt.Z)(g.style[h])&&g.style[h]!==""&&(M.style[h]=g.style[h])}}}])}();Ei.tag="HTMLRendering";var ti=function(b){function E(){var h;(0,_.Z)(this,E);for(var g=arguments.length,M=new Array(g),Y=0;Y<g;Y++)M[Y]=arguments[Y];return h=(0,I.Z)(this,E,[].concat(M)),h.name="html-renderer",h}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"init",value:function(){this.addRenderingPlugin(new Ei)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(S.F6);var xa=function(){function b(E){(0,_.Z)(this,b),this.renderingContext=E.renderingContext,this.canvasConfig=E.config}return(0,c.Z)(b,[{key:"init",value:function(){var h=this.canvasConfig,g=h.container,M=h.canvas;if(M)this.$canvas=M,g&&M.parentElement!==g&&g.appendChild(M),this.$container=M.parentElement,this.canvasConfig.container=this.$container;else if(g&&(this.$container=(0,Ie.Z)(g)?document.getElementById(g):g,this.$container)){var Y=document.createElement("canvas");this.$container.appendChild(Y),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=Y}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(h,g){var M=this.canvasConfig.devicePixelRatio;this.dpr=M,this.$canvas&&(this.$canvas.width=this.dpr*h,this.$canvas.height=this.dpr*g,(0,S.$p)(this.$canvas,h,g)),this.renderingContext.renderReasons.add(S.Rr.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(h){this.$container&&this.$container.style&&(this.$container.style.cursor=h)}},{key:"toDataURL",value:function(){var E=(0,Ct.Z)((0,Rt.Z)().mark(function g(){var M,Y,J,ot=arguments;return(0,Rt.Z)().wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return M=ot.length>0&&ot[0]!==void 0?ot[0]:{},Y=M.type,J=M.encoderOptions,vt.abrupt("return",this.context.canvas.toDataURL(Y,J));case 1:case"end":return vt.stop()}},g,this)}));function h(){return E.apply(this,arguments)}return h}()}])}(),Di=function(b){function E(){var h;(0,_.Z)(this,E);for(var g=arguments.length,M=new Array(g),Y=0;Y<g;Y++)M[Y]=arguments[Y];return h=(0,I.Z)(this,E,[].concat(M)),h.name="canvas-context-register",h}return(0,z.Z)(E,b),(0,c.Z)(E,[{key:"init",value:function(){this.context.ContextService=xa}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(S.F6),ft=function(b){function E(h){var g;return(0,_.Z)(this,E),g=(0,I.Z)(this,E,[h]),g.registerPlugin(new Di),g.registerPlugin(new Ut),g.registerPlugin(new gt),g.registerPlugin(new mi),g.registerPlugin(new Jr),g.registerPlugin(new ie),g.registerPlugin(new ti),g}return(0,z.Z)(E,b),(0,c.Z)(E)}(S.I8)},9350:function(yt,Et,y){"use strict";y.d(Et,{mN:function(){return zt},I8:function(){return h},F6:function(){return E},V1:function(){return Fa},iM:function(){return Lr},Xz:function(){return ic},$6:function(){return ys},Cd:function(){return Al},b_:function(){return Vc},Aw:function(){return ya},s$:function(){return Ri},BB:function(){return Xc},jf:function(){return Wt},Dk:function(){return Ki},Pj:function(){return Jl},xA:function(){return El},nR:function(){return xl},GL:function(){return ns},ZA:function(){return Jo},k9:function(){return $l},Ee:function(){return ql},x1:function(){return tc},NB:function(){return ki},jB:function(){return Lc},y$:function(){return ec},E9:function(){return nt},mg:function(){return $o},aH:function(){return nc},UL:function(){return rc},Rr:function(){return Ko},bn:function(){return ft},xv:function(){return ko},Cm:function(){return nr},Rx:function(){return ro},o6:function(){return Ns},O4:function(){return ut},Vl:function(){return Vt},Oi:function(){return co},_O:function(){return bt},gz:function(){return rr},qA:function(){return ks},RV:function(){return Si},L1:function(){return pl},R:function(){return Xi},G$:function(){return ui},G0:function(){return Ac},N1:function(){return ma},BV:function(){return ge},GZ:function(){return Jn},$p:function(){return _u}});var c=y(33885),_=y(67732),I=y(83652),z=y(94480),S=y(22214),R=y(42403),w=y(42978),N=y(37271),D=N,A=y(92421),L=y(20263),F=y(60187),it=y(79111),G=y(94569),kt=y(45545),gt=y(1933),Q=y(68901),Rt=y(76075),Ct=y(71879),Ht=y(70208),de=y(80813),ue={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Te(d){return Array.isArray(d)&&d.every(function(v){var s=v[0].toLowerCase();return ue[s]===v.length-1&&"achlmqstvz".includes(s)})}function be(d){return Te(d)&&d.every(function(v){var s=v[0];return s===s.toUpperCase()})}function we(d){return be(d)&&d.every(function(v){var s=v[0];return"ACLMQZ".includes(s)})}var re={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Ge(d){for(var v=d.pathValue[d.segmentStart],s=v.toLowerCase(),o=d.data;o.length>=ue[s]&&(s==="m"&&o.length>2?(d.segments.push([v].concat(o.splice(0,2))),s="l",v=v==="m"?"l":"L"):d.segments.push([v].concat(o.splice(0,ue[s]))),!!ue[s]););}function rn(d){var v=d.index,s=d.pathValue,o=s.charCodeAt(v);if(o===48){d.param=0,d.index+=1;return}if(o===49){d.param=1,d.index+=1;return}d.err='[path-util]: invalid Arc flag "'.concat(s[v],'", expecting 0 or 1 at index ').concat(v)}function Xe(d){return d>=48&&d<=57||d===43||d===45||d===46}function En(d){return d>=48&&d<=57}function Pn(d){var v=d.max,s=d.pathValue,o=d.index,p=o,C=!1,O=!1,W=!1,K=!1,ht;if(p>=v){d.err="[path-util]: Invalid path value at index ".concat(p,', "pathValue" is missing param');return}if(ht=s.charCodeAt(p),(ht===43||ht===45)&&(p+=1,ht=s.charCodeAt(p)),!En(ht)&&ht!==46){d.err="[path-util]: Invalid path value at index ".concat(p,', "').concat(s[p],'" is not a number');return}if(ht!==46){if(C=ht===48,p+=1,ht=s.charCodeAt(p),C&&p<v&&ht&&En(ht)){d.err="[path-util]: Invalid path value at index ".concat(o,', "').concat(s[o],'" illegal number');return}for(;p<v&&En(s.charCodeAt(p));)p+=1,O=!0;ht=s.charCodeAt(p)}if(ht===46){for(K=!0,p+=1;En(s.charCodeAt(p));)p+=1,W=!0;ht=s.charCodeAt(p)}if(ht===101||ht===69){if(K&&!O&&!W){d.err="[path-util]: Invalid path value at index ".concat(p,', "').concat(s[p],'" invalid float exponent');return}if(p+=1,ht=s.charCodeAt(p),(ht===43||ht===45)&&(p+=1),p<v&&En(s.charCodeAt(p)))for(;p<v&&En(s.charCodeAt(p));)p+=1;else{d.err="[path-util]: Invalid path value at index ".concat(p,', "').concat(s[p],'" invalid integer exponent');return}}d.index=p,d.param=+d.pathValue.slice(o,p)}function tn(d){var v=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return d===10||d===13||d===8232||d===8233||d===32||d===9||d===11||d===12||d===160||d>=5760&&v.includes(d)}function xn(d){for(var v=d.pathValue,s=d.max;d.index<s&&tn(v.charCodeAt(d.index));)d.index+=1}function It(d){switch(d|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function Ee(d){return(d|32)===97}function fn(d){var v=d.max,s=d.pathValue,o=d.index,p=s.charCodeAt(o),C=ue[s[o].toLowerCase()];if(d.segmentStart=o,!It(p)){d.err='[path-util]: Invalid path value "'.concat(s[o],'" is not a path command');return}if(d.index+=1,xn(d),d.data=[],!C){Ge(d);return}for(;;){for(var O=C;O>0;O-=1){if(Ee(p)&&(O===3||O===4)?rn(d):Pn(d),d.err.length)return;d.data.push(d.param),xn(d),d.index<v&&s.charCodeAt(d.index)===44&&(d.index+=1,xn(d))}if(d.index>=d.max||!Xe(s.charCodeAt(d.index)))break}Ge(d)}var on=function(){function d(v){this.pathValue=v,this.segments=[],this.max=v.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return d}();function Pe(d){if(Te(d))return[].concat(d);var v=new on(d);for(xn(v);v.index<v.max&&!v.err.length;)fn(v);return v.err?v.err:v.segments}function Ze(d){if(be(d))return[].concat(d);var v=Pe(d),s=0,o=0,p=0,C=0;return v.map(function(O){var W=O.slice(1).map(Number),K=O[0],ht=K.toUpperCase();if(K==="M")return s=W[0],o=W[1],p=s,C=o,["M",s,o];var Bt;if(K!==ht)switch(ht){case"A":Bt=[ht,W[0],W[1],W[2],W[3],W[4],W[5]+s,W[6]+o];break;case"V":Bt=[ht,W[0]+o];break;case"H":Bt=[ht,W[0]+s];break;default:{var ne=W.map(function(ze,We){return ze+(We%2?o:s)});Bt=[ht].concat(ne)}}else Bt=[ht].concat(W);var Se=Bt.length;switch(ht){case"Z":s=p,o=C;break;case"H":s=Bt[1];break;case"V":o=Bt[1];break;default:s=Bt[Se-2],o=Bt[Se-1],ht==="M"&&(p=s,C=o)}return Bt})}function Ke(d,v){var s=d[0],o=v.x1,p=v.y1,C=v.x2,O=v.y2,W=d.slice(1).map(Number),K=d;if("TQ".includes(s)||(v.qx=null,v.qy=null),s==="H")K=["L",d[1],p];else if(s==="V")K=["L",o,d[1]];else if(s==="S"){var ht=o*2-C,Bt=p*2-O;v.x1=ht,v.y1=Bt,K=["C",ht,Bt].concat(W)}else if(s==="T"){var ne=o*2-v.qx,Se=p*2-v.qy;v.qx=ne,v.qy=Se,K=["Q",ne,Se].concat(W)}else if(s==="Q"){var ze=W[0],We=W[1];v.qx=ze,v.qy=We}return K}function le(d){if(we(d))return[].concat(d);for(var v=Ze(d),s=(0,de.pi)({},re),o=0;o<v.length;o+=1){v[o]=Ke(v[o],s);var p=v[o],C=p.length;s.x1=+p[C-2],s.y1=+p[C-1],s.x2=+p[C-4]||s.x1,s.y2=+p[C-3]||s.y1}return v}function Ae(d,v,s){var o=d[0],p=d[1],C=v[0],O=v[1];return[o+(C-o)*s,p+(O-p)*s]}function Pt(d,v,s,o,p){var C=(0,Q.y)([d,v],[s,o]),O={x:0,y:0};if(typeof p=="number")if(p<=0)O={x:d,y:v};else if(p>=C)O={x:s,y:o};else{var W=Ae([d,v],[s,o],p/C),K=W[0],ht=W[1];O={x:K,y:ht}}return{length:C,point:O,min:{x:Math.min(d,s),y:Math.min(v,o)},max:{x:Math.max(d,s),y:Math.max(v,o)}}}function wt(d,v){var s=d.x,o=d.y,p=v.x,C=v.y,O=s*p+o*C,W=Math.sqrt((Math.pow(s,2)+Math.pow(o,2))*(Math.pow(p,2)+Math.pow(C,2))),K=s*C-o*p<0?-1:1,ht=K*Math.acos(O/W);return ht}function he(d,v,s,o,p,C,O,W,K,ht){var Bt=Math.abs,ne=Math.sin,Se=Math.cos,ze=Math.sqrt,We=Math.PI,dn=Bt(s),gn=Bt(o),pn=(p%360+360)%360,sn=pn*(We/180);if(d===W&&v===K)return{x:d,y:v};if(dn===0||gn===0)return Pt(d,v,W,K,ht).point;var Sn=(d-W)/2,Wn=(v-K)/2,hn={x:Se(sn)*Sn+ne(sn)*Wn,y:-ne(sn)*Sn+Se(sn)*Wn},Ue=Math.pow(hn.x,2)/Math.pow(dn,2)+Math.pow(hn.y,2)/Math.pow(gn,2);Ue>1&&(dn*=ze(Ue),gn*=ze(Ue));var un=Math.pow(dn,2)*Math.pow(gn,2)-Math.pow(dn,2)*Math.pow(hn.y,2)-Math.pow(gn,2)*Math.pow(hn.x,2),wn=Math.pow(dn,2)*Math.pow(hn.y,2)+Math.pow(gn,2)*Math.pow(hn.x,2),_n=un/wn;_n=_n<0?0:_n;var kn=(C!==O?1:-1)*ze(_n),Un={x:kn*(dn*hn.y/gn),y:kn*(-(gn*hn.x)/dn)},Gn={x:Se(sn)*Un.x-ne(sn)*Un.y+(d+W)/2,y:ne(sn)*Un.x+Se(sn)*Un.y+(v+K)/2},ar={x:(hn.x-Un.x)/dn,y:(hn.y-Un.y)/gn},Ir=wt({x:1,y:0},ar),zr={x:(-hn.x-Un.x)/dn,y:(-hn.y-Un.y)/gn},qr=wt(ar,zr);!O&&qr>0?qr-=2*We:O&&qr<0&&(qr+=2*We),qr%=2*We;var hr=Ir+qr*ht,kr=dn*Se(hr),Pr=gn*ne(hr),zi={x:Se(sn)*kr-ne(sn)*Pr+Gn.x,y:ne(sn)*kr+Se(sn)*Pr+Gn.y};return zi}function je(d,v,s,o,p,C,O,W,K,ht,Bt){var ne,Se=Bt.bbox,ze=Se===void 0?!0:Se,We=Bt.length,dn=We===void 0?!0:We,gn=Bt.sampleSize,pn=gn===void 0?30:gn,sn=typeof ht=="number",Sn=d,Wn=v,hn=0,Ue=[Sn,Wn,hn],un=[Sn,Wn],wn=0,_n={x:0,y:0},kn=[{x:Sn,y:Wn}];sn&&ht<=0&&(_n={x:Sn,y:Wn});for(var Un=0;Un<=pn;Un+=1){if(wn=Un/pn,ne=he(d,v,s,o,p,C,O,W,K,wn),Sn=ne.x,Wn=ne.y,ze&&kn.push({x:Sn,y:Wn}),dn&&(hn+=(0,Q.y)(un,[Sn,Wn])),un=[Sn,Wn],sn&&hn>=ht&&ht>Ue[2]){var Gn=(hn-ht)/(hn-Ue[2]);_n={x:un[0]*(1-Gn)+Ue[0]*Gn,y:un[1]*(1-Gn)+Ue[1]*Gn}}Ue=[Sn,Wn,hn]}return sn&&ht>=hn&&(_n={x:W,y:K}),{length:hn,point:_n,min:{x:Math.min.apply(null,kn.map(function(ar){return ar.x})),y:Math.min.apply(null,kn.map(function(ar){return ar.y}))},max:{x:Math.max.apply(null,kn.map(function(ar){return ar.x})),y:Math.max.apply(null,kn.map(function(ar){return ar.y}))}}}function Re(d,v,s,o,p,C,O,W,K){var ht=1-K;return{x:Math.pow(ht,3)*d+3*Math.pow(ht,2)*K*s+3*ht*Math.pow(K,2)*p+Math.pow(K,3)*O,y:Math.pow(ht,3)*v+3*Math.pow(ht,2)*K*o+3*ht*Math.pow(K,2)*C+Math.pow(K,3)*W}}function ce(d,v,s,o,p,C,O,W,K,ht){var Bt,ne=ht.bbox,Se=ne===void 0?!0:ne,ze=ht.length,We=ze===void 0?!0:ze,dn=ht.sampleSize,gn=dn===void 0?10:dn,pn=typeof K=="number",sn=d,Sn=v,Wn=0,hn=[sn,Sn,Wn],Ue=[sn,Sn],un=0,wn={x:0,y:0},_n=[{x:sn,y:Sn}];pn&&K<=0&&(wn={x:sn,y:Sn});for(var kn=0;kn<=gn;kn+=1){if(un=kn/gn,Bt=Re(d,v,s,o,p,C,O,W,un),sn=Bt.x,Sn=Bt.y,Se&&_n.push({x:sn,y:Sn}),We&&(Wn+=(0,Q.y)(Ue,[sn,Sn])),Ue=[sn,Sn],pn&&Wn>=K&&K>hn[2]){var Un=(Wn-K)/(Wn-hn[2]);wn={x:Ue[0]*(1-Un)+hn[0]*Un,y:Ue[1]*(1-Un)+hn[1]*Un}}hn=[sn,Sn,Wn]}return pn&&K>=Wn&&(wn={x:O,y:W}),{length:Wn,point:wn,min:{x:Math.min.apply(null,_n.map(function(Gn){return Gn.x})),y:Math.min.apply(null,_n.map(function(Gn){return Gn.y}))},max:{x:Math.max.apply(null,_n.map(function(Gn){return Gn.x})),y:Math.max.apply(null,_n.map(function(Gn){return Gn.y}))}}}function Le(d,v,s,o,p,C,O){var W=1-O;return{x:Math.pow(W,2)*d+2*W*O*s+Math.pow(O,2)*p,y:Math.pow(W,2)*v+2*W*O*o+Math.pow(O,2)*C}}function xe(d,v,s,o,p,C,O,W){var K,ht=W.bbox,Bt=ht===void 0?!0:ht,ne=W.length,Se=ne===void 0?!0:ne,ze=W.sampleSize,We=ze===void 0?10:ze,dn=typeof O=="number",gn=d,pn=v,sn=0,Sn=[gn,pn,sn],Wn=[gn,pn],hn=0,Ue={x:0,y:0},un=[{x:gn,y:pn}];dn&&O<=0&&(Ue={x:gn,y:pn});for(var wn=0;wn<=We;wn+=1){if(hn=wn/We,K=Le(d,v,s,o,p,C,hn),gn=K.x,pn=K.y,Bt&&un.push({x:gn,y:pn}),Se&&(sn+=(0,Q.y)(Wn,[gn,pn])),Wn=[gn,pn],dn&&sn>=O&&O>Sn[2]){var _n=(sn-O)/(sn-Sn[2]);Ue={x:Wn[0]*(1-_n)+Sn[0]*_n,y:Wn[1]*(1-_n)+Sn[1]*_n}}Sn=[gn,pn,sn]}return dn&&O>=sn&&(Ue={x:p,y:C}),{length:sn,point:Ue,min:{x:Math.min.apply(null,un.map(function(kn){return kn.x})),y:Math.min.apply(null,un.map(function(kn){return kn.y}))},max:{x:Math.max.apply(null,un.map(function(kn){return kn.x})),y:Math.max.apply(null,un.map(function(kn){return kn.y}))}}}function _t(d,v,s){for(var o,p,C,O,W,K,ht=le(d),Bt=typeof v=="number",ne,Se=[],ze,We=0,dn=0,gn=0,pn=0,sn,Sn=[],Wn=[],hn=0,Ue={x:0,y:0},un=Ue,wn=Ue,_n=Ue,kn=0,Un=0,Gn=ht.length;Un<Gn;Un+=1)sn=ht[Un],ze=sn[0],ne=ze==="M",Se=ne?Se:[We,dn].concat(sn.slice(1)),ne?(gn=sn[1],pn=sn[2],Ue={x:gn,y:pn},un=Ue,hn=0,Bt&&v<.001&&(_n=Ue)):ze==="L"?(o=Pt(Se[0],Se[1],Se[2],Se[3],(v||0)-kn),hn=o.length,Ue=o.min,un=o.max,wn=o.point):ze==="A"?(p=je(Se[0],Se[1],Se[2],Se[3],Se[4],Se[5],Se[6],Se[7],Se[8],(v||0)-kn,s||{}),hn=p.length,Ue=p.min,un=p.max,wn=p.point):ze==="C"?(C=ce(Se[0],Se[1],Se[2],Se[3],Se[4],Se[5],Se[6],Se[7],(v||0)-kn,s||{}),hn=C.length,Ue=C.min,un=C.max,wn=C.point):ze==="Q"?(O=xe(Se[0],Se[1],Se[2],Se[3],Se[4],Se[5],(v||0)-kn,s||{}),hn=O.length,Ue=O.min,un=O.max,wn=O.point):ze==="Z"&&(Se=[We,dn,gn,pn],W=Pt(Se[0],Se[1],Se[2],Se[3],(v||0)-kn),hn=W.length,Ue=W.min,un=W.max,wn=W.point),Bt&&kn<v&&kn+hn>=v&&(_n=wn),Wn.push(un),Sn.push(Ue),kn+=hn,K=ze!=="Z"?sn.slice(-2):[gn,pn],We=K[0],dn=K[1];return Bt&&v>=kn&&(_n={x:We,y:dn}),{length:kn,point:_n,min:{x:Math.min.apply(null,Sn.map(function(ar){return ar.x})),y:Math.min.apply(null,Sn.map(function(ar){return ar.y}))},max:{x:Math.max.apply(null,Wn.map(function(ar){return ar.x})),y:Math.max.apply(null,Wn.map(function(ar){return ar.y}))}}}function ie(d,v){return _t(d,void 0,(0,de.pi)((0,de.pi)({},v),{bbox:!1,length:!0})).length}var Me=y(2078),T=y(82639),at=y(5131),fe=function(d,v){return(d%v+v)%v},Jt=fe;function Ie(d,v,s){if(d[s].length>7){d[s].shift();for(var o=d[s],p=s;o.length;)v[s]="A",d.splice(p+=1,0,["C"].concat(o.splice(0,6)));d.splice(s,1)}}function Ne(d){return we(d)&&d.every(function(v){var s=v[0];return"MC".includes(s)})}var en=y(66045);function St(d,v,s,o,p,C){var O=.3333333333333333,W=2/3;return[O*d+W*s,O*v+W*o,O*p+W*s,O*C+W*o,p,C]}var tt=function(d,v,s,o){var p=.5,C=Ae([d,v],[s,o],p);return(0,de.ev)((0,de.ev)([],C,!0),[s,o,s,o],!1)};function Nt(d,v){var s=d[0],o=d.slice(1).map(Number),p=o[0],C=o[1],O,W=v.x1,K=v.y1,ht=v.x,Bt=v.y;switch("TQ".includes(s)||(v.qx=null,v.qy=null),s){case"M":return v.x=p,v.y=C,d;case"A":return O=[W,K].concat(o),["C"].concat((0,en.W)(O[0],O[1],O[2],O[3],O[4],O[5],O[6],O[7],O[8],O[9]));case"Q":return v.qx=p,v.qy=C,O=[W,K].concat(o),["C"].concat(St(O[0],O[1],O[2],O[3],O[4],O[5]));case"L":return["C"].concat(tt(W,K,p,C));case"Z":return W===ht&&K===Bt?["C",W,K,ht,Bt,ht,Bt]:["C"].concat(tt(W,K,ht,Bt));default:}return d}function Xt(d,v){if(v===void 0&&(v=!1),Ne(d)){var s=[].concat(d);return v?[s,[]]:s}for(var o=le(d),p=(0,de.pi)({},re),C=[],O="",W=o.length,K,ht,Bt=[],ne=0;ne<W;ne+=1){o[ne]&&(O=o[ne][0]),C[ne]=O;var Se=Nt(o[ne],p);o[ne]=Se,Ie(o,C,ne),W=o.length,O==="Z"&&Bt.push(ne),K=o[ne],ht=K.length,p.x1=+K[ht-2],p.y1=+K[ht-1],p.x2=+K[ht-4]||p.x1,p.y2=+K[ht-3]||p.y1}return v?[o,Bt]:o}var Lt=50;function Zt(d,v){v===void 0&&(v=.5);var s=d.slice(0,2),o=d.slice(2,4),p=d.slice(4,6),C=d.slice(6,8),O=Ae(s,o,v),W=Ae(o,p,v),K=Ae(p,C,v),ht=Ae(O,W,v),Bt=Ae(W,K,v),ne=Ae(ht,Bt,v);return[["C"].concat(O,ht,ne),["C"].concat(Bt,K,C)]}function Ut(d){return d.map(function(v,s,o){var p=s&&o[s-1].slice(-2).concat(v.slice(1)),C=s?ce(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],{bbox:!1}).length:0,O;return s?O=C?Zt(p):[v,v]:O=[v],{s:v,ss:O,l:C}})}function qt(d,v,s,o){if(o===void 0&&(o=0),o>Lt)return console.warn("Maximum recursion depth reached in equalizeSegments"),[d,v];var p=Ut(d),C=Ut(v),O=p.length,W=C.length,K=p.filter(function(pn){return pn.l}).length,ht=C.filter(function(pn){return pn.l}).length,Bt=p.filter(function(pn){return pn.l}).reduce(function(pn,sn){var Sn=sn.l;return pn+Sn},0)/K||0,ne=C.filter(function(pn){return pn.l}).reduce(function(pn,sn){var Sn=sn.l;return pn+Sn},0)/ht||0,Se=s||Math.max(O,W),ze=[Bt,ne],We=[Se-O,Se-W],dn=0,gn=[p,C].map(function(pn,sn){return pn.l===Se?pn.map(function(Sn){return Sn.s}):pn.map(function(Sn,Wn){return dn=Wn&&We[sn]&&Sn.l>=ze[sn],We[sn]-=dn?1:0,dn?Sn.ss:[Sn.s]}).flat()});return gn[0].length===gn[1].length?gn:qt(gn[0],gn[1],Se,o+1)}function se(d,v,s,o,p,C,O,W){return 3*((W-v)*(s+p)-(O-d)*(o+C)+o*(d-p)-s*(v-C)+W*(p+d/3)-O*(C+v/3))/20}function te(d){var v=0,s=0,o=0;return Xt(d).map(function(p){var C;switch(p[0]){case"M":return v=p[1],s=p[2],0;default:var O=p.slice(1),W=O[0],K=O[1],ht=O[2],Bt=O[3],ne=O[4],Se=O[5];return o=se(v,s,W,K,ht,Bt,ne,Se),C=p.slice(-2),v=C[0],s=C[1],o}}).reduce(function(p,C){return p+C},0)}function ke(d){return te(d)>=0}function He(d){var v=d.slice(1).map(function(s,o,p){return o?p[o-1].slice(-2).concat(s.slice(1)):d[0].slice(1).concat(s.slice(1))}).map(function(s){return s.map(function(o,p){return s[s.length-p-2*(1-p%2)]})}).reverse();return[["M"].concat(v[0].slice(0,2))].concat(v.map(function(s){return["C"].concat(s.slice(2))}))}function Ve(d){return d.map(function(v){return Array.isArray(v)?[].concat(v):v})}function ln(d){var v=d.length,s=v-1;return d.map(function(o,p){return d.map(function(C,O){var W=p+O,K;return O===0||d[W]&&d[W][0]==="M"?(K=d[W],["M"].concat(K.slice(-2))):(W>=v&&(W-=s),d[W])})})}function On(d,v){var s=d.length-1,o=[],p=0,C=0,O=ln(d);return O.forEach(function(W,K){d.slice(1).forEach(function(ht,Bt){C+=(0,Q.y)(d[(K+Bt)%s].slice(-2),v[Bt%s].slice(-2))}),o[K]=C,C=0}),p=o.indexOf(Math.min.apply(null,o)),O[p]}var yn=y(49527),lr=y(39934),Zn=y(50264),Yn=y(71018),ye=y(93785);function xr(d,v,s){return _t(d,v,(0,de.pi)((0,de.pi)({},s),{bbox:!1,length:!0})).point}var Hn=y(20068),Br=y(58289);function Ar(d,v){for(;!{}.hasOwnProperty.call(d,v)&&(d=(0,Br.Z)(d))!==null;);return d}function ri(){return ri=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(d,v,s){var o=Ar(d,v);if(o){var p=Object.getOwnPropertyDescriptor(o,v);return p.get?p.get.call(arguments.length<3?d:s):p.value}},ri.apply(null,arguments)}function mi(d,v,s,o){var p=ri((0,Br.Z)(1&o?d.prototype:d),v,s);return 2&o&&typeof p=="function"?function(C){return p.apply(s,C)}:p}var si=y(52402),Jr=y(75044),_i=y(3202),Yi=y(19251),Ei=y(75931);var ti=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof y.g!="undefined"?y.g:typeof self!="undefined"?self:{},xa={exports:{}};(function(d,v){(function(s,o){d.exports=o()})(ti,function(){function s(hn,Ue,un,wn,_n){o(hn,Ue,un||0,wn||hn.length-1,_n||C)}function o(hn,Ue,un,wn,_n){for(;wn>un;){if(wn-un>600){var kn=wn-un+1,Un=Ue-un+1,Gn=Math.log(kn),ar=.5*Math.exp(2*Gn/3),Ir=.5*Math.sqrt(Gn*ar*(kn-ar)/kn)*(Un-kn/2<0?-1:1),zr=Math.max(un,Math.floor(Ue-Un*ar/kn+Ir)),qr=Math.min(wn,Math.floor(Ue+(kn-Un)*ar/kn+Ir));o(hn,Ue,zr,qr,_n)}var hr=hn[Ue],kr=un,Pr=wn;for(p(hn,un,Ue),_n(hn[wn],hr)>0&&p(hn,un,wn);kr<Pr;){for(p(hn,kr,Pr),kr++,Pr--;_n(hn[kr],hr)<0;)kr++;for(;_n(hn[Pr],hr)>0;)Pr--}_n(hn[un],hr)===0?p(hn,un,Pr):(Pr++,p(hn,Pr,wn)),Pr<=Ue&&(un=Pr+1),Ue<=Pr&&(wn=Pr-1)}}function p(hn,Ue,un){var wn=hn[Ue];hn[Ue]=hn[un],hn[un]=wn}function C(hn,Ue){return hn<Ue?-1:hn>Ue?1:0}var O=function(Ue){Ue===void 0&&(Ue=9),this._maxEntries=Math.max(4,Ue),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};O.prototype.all=function(){return this._all(this.data,[])},O.prototype.search=function(Ue){var un=this.data,wn=[];if(!sn(Ue,un))return wn;for(var _n=this.toBBox,kn=[];un;){for(var Un=0;Un<un.children.length;Un++){var Gn=un.children[Un],ar=un.leaf?_n(Gn):Gn;sn(Ue,ar)&&(un.leaf?wn.push(Gn):pn(Ue,ar)?this._all(Gn,wn):kn.push(Gn))}un=kn.pop()}return wn},O.prototype.collides=function(Ue){var un=this.data;if(!sn(Ue,un))return!1;for(var wn=[];un;){for(var _n=0;_n<un.children.length;_n++){var kn=un.children[_n],Un=un.leaf?this.toBBox(kn):kn;if(sn(Ue,Un)){if(un.leaf||pn(Ue,Un))return!0;wn.push(kn)}}un=wn.pop()}return!1},O.prototype.load=function(Ue){if(!(Ue&&Ue.length))return this;if(Ue.length<this._minEntries){for(var un=0;un<Ue.length;un++)this.insert(Ue[un]);return this}var wn=this._build(Ue.slice(),0,Ue.length-1,0);if(!this.data.children.length)this.data=wn;else if(this.data.height===wn.height)this._splitRoot(this.data,wn);else{if(this.data.height<wn.height){var _n=this.data;this.data=wn,wn=_n}this._insert(wn,this.data.height-wn.height-1,!0)}return this},O.prototype.insert=function(Ue){return Ue&&this._insert(Ue,this.data.height-1),this},O.prototype.clear=function(){return this.data=Sn([]),this},O.prototype.remove=function(Ue,un){if(!Ue)return this;for(var wn=this.data,_n=this.toBBox(Ue),kn=[],Un=[],Gn,ar,Ir;wn||kn.length;){if(wn||(wn=kn.pop(),ar=kn[kn.length-1],Gn=Un.pop(),Ir=!0),wn.leaf){var zr=W(Ue,wn.children,un);if(zr!==-1)return wn.children.splice(zr,1),kn.push(wn),this._condense(kn),this}!Ir&&!wn.leaf&&pn(wn,_n)?(kn.push(wn),Un.push(Gn),Gn=0,ar=wn,wn=wn.children[0]):ar?(Gn++,wn=ar.children[Gn],Ir=!1):wn=null}return this},O.prototype.toBBox=function(Ue){return Ue},O.prototype.compareMinX=function(Ue,un){return Ue.minX-un.minX},O.prototype.compareMinY=function(Ue,un){return Ue.minY-un.minY},O.prototype.toJSON=function(){return this.data},O.prototype.fromJSON=function(Ue){return this.data=Ue,this},O.prototype._all=function(Ue,un){for(var wn=[];Ue;)Ue.leaf?un.push.apply(un,Ue.children):wn.push.apply(wn,Ue.children),Ue=wn.pop();return un},O.prototype._build=function(Ue,un,wn,_n){var kn=wn-un+1,Un=this._maxEntries,Gn;if(kn<=Un)return Gn=Sn(Ue.slice(un,wn+1)),K(Gn,this.toBBox),Gn;_n||(_n=Math.ceil(Math.log(kn)/Math.log(Un)),Un=Math.ceil(kn/Math.pow(Un,_n-1))),Gn=Sn([]),Gn.leaf=!1,Gn.height=_n;var ar=Math.ceil(kn/Un),Ir=ar*Math.ceil(Math.sqrt(Un));Wn(Ue,un,wn,Ir,this.compareMinX);for(var zr=un;zr<=wn;zr+=Ir){var qr=Math.min(zr+Ir-1,wn);Wn(Ue,zr,qr,ar,this.compareMinY);for(var hr=zr;hr<=qr;hr+=ar){var kr=Math.min(hr+ar-1,qr);Gn.children.push(this._build(Ue,hr,kr,_n-1))}}return K(Gn,this.toBBox),Gn},O.prototype._chooseSubtree=function(Ue,un,wn,_n){for(;_n.push(un),!(un.leaf||_n.length-1===wn);){for(var kn=1/0,Un=1/0,Gn=void 0,ar=0;ar<un.children.length;ar++){var Ir=un.children[ar],zr=ze(Ir),qr=dn(Ue,Ir)-zr;qr<Un?(Un=qr,kn=zr<kn?zr:kn,Gn=Ir):qr===Un&&zr<kn&&(kn=zr,Gn=Ir)}un=Gn||un.children[0]}return un},O.prototype._insert=function(Ue,un,wn){var _n=wn?Ue:this.toBBox(Ue),kn=[],Un=this._chooseSubtree(_n,this.data,un,kn);for(Un.children.push(Ue),Bt(Un,_n);un>=0&&kn[un].children.length>this._maxEntries;)this._split(kn,un),un--;this._adjustParentBBoxes(_n,kn,un)},O.prototype._split=function(Ue,un){var wn=Ue[un],_n=wn.children.length,kn=this._minEntries;this._chooseSplitAxis(wn,kn,_n);var Un=this._chooseSplitIndex(wn,kn,_n),Gn=Sn(wn.children.splice(Un,wn.children.length-Un));Gn.height=wn.height,Gn.leaf=wn.leaf,K(wn,this.toBBox),K(Gn,this.toBBox),un?Ue[un-1].children.push(Gn):this._splitRoot(wn,Gn)},O.prototype._splitRoot=function(Ue,un){this.data=Sn([Ue,un]),this.data.height=Ue.height+1,this.data.leaf=!1,K(this.data,this.toBBox)},O.prototype._chooseSplitIndex=function(Ue,un,wn){for(var _n,kn=1/0,Un=1/0,Gn=un;Gn<=wn-un;Gn++){var ar=ht(Ue,0,Gn,this.toBBox),Ir=ht(Ue,Gn,wn,this.toBBox),zr=gn(ar,Ir),qr=ze(ar)+ze(Ir);zr<kn?(kn=zr,_n=Gn,Un=qr<Un?qr:Un):zr===kn&&qr<Un&&(Un=qr,_n=Gn)}return _n||wn-un},O.prototype._chooseSplitAxis=function(Ue,un,wn){var _n=Ue.leaf?this.compareMinX:ne,kn=Ue.leaf?this.compareMinY:Se,Un=this._allDistMargin(Ue,un,wn,_n),Gn=this._allDistMargin(Ue,un,wn,kn);Un<Gn&&Ue.children.sort(_n)},O.prototype._allDistMargin=function(Ue,un,wn,_n){Ue.children.sort(_n);for(var kn=this.toBBox,Un=ht(Ue,0,un,kn),Gn=ht(Ue,wn-un,wn,kn),ar=We(Un)+We(Gn),Ir=un;Ir<wn-un;Ir++){var zr=Ue.children[Ir];Bt(Un,Ue.leaf?kn(zr):zr),ar+=We(Un)}for(var qr=wn-un-1;qr>=un;qr--){var hr=Ue.children[qr];Bt(Gn,Ue.leaf?kn(hr):hr),ar+=We(Gn)}return ar},O.prototype._adjustParentBBoxes=function(Ue,un,wn){for(var _n=wn;_n>=0;_n--)Bt(un[_n],Ue)},O.prototype._condense=function(Ue){for(var un=Ue.length-1,wn=void 0;un>=0;un--)Ue[un].children.length===0?un>0?(wn=Ue[un-1].children,wn.splice(wn.indexOf(Ue[un]),1)):this.clear():K(Ue[un],this.toBBox)};function W(hn,Ue,un){if(!un)return Ue.indexOf(hn);for(var wn=0;wn<Ue.length;wn++)if(un(hn,Ue[wn]))return wn;return-1}function K(hn,Ue){ht(hn,0,hn.children.length,Ue,hn)}function ht(hn,Ue,un,wn,_n){_n||(_n=Sn(null)),_n.minX=1/0,_n.minY=1/0,_n.maxX=-1/0,_n.maxY=-1/0;for(var kn=Ue;kn<un;kn++){var Un=hn.children[kn];Bt(_n,hn.leaf?wn(Un):Un)}return _n}function Bt(hn,Ue){return hn.minX=Math.min(hn.minX,Ue.minX),hn.minY=Math.min(hn.minY,Ue.minY),hn.maxX=Math.max(hn.maxX,Ue.maxX),hn.maxY=Math.max(hn.maxY,Ue.maxY),hn}function ne(hn,Ue){return hn.minX-Ue.minX}function Se(hn,Ue){return hn.minY-Ue.minY}function ze(hn){return(hn.maxX-hn.minX)*(hn.maxY-hn.minY)}function We(hn){return hn.maxX-hn.minX+(hn.maxY-hn.minY)}function dn(hn,Ue){return(Math.max(Ue.maxX,hn.maxX)-Math.min(Ue.minX,hn.minX))*(Math.max(Ue.maxY,hn.maxY)-Math.min(Ue.minY,hn.minY))}function gn(hn,Ue){var un=Math.max(hn.minX,Ue.minX),wn=Math.max(hn.minY,Ue.minY),_n=Math.min(hn.maxX,Ue.maxX),kn=Math.min(hn.maxY,Ue.maxY);return Math.max(0,_n-un)*Math.max(0,kn-wn)}function pn(hn,Ue){return hn.minX<=Ue.minX&&hn.minY<=Ue.minY&&Ue.maxX<=hn.maxX&&Ue.maxY<=hn.maxY}function sn(hn,Ue){return Ue.minX<=hn.maxX&&Ue.minY<=hn.maxY&&Ue.maxX>=hn.minX&&Ue.maxY>=hn.minY}function Sn(hn){return{children:hn,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Wn(hn,Ue,un,wn,_n){for(var kn=[Ue,un];kn.length;)if(un=kn.pop(),Ue=kn.pop(),!(un-Ue<=wn)){var Un=Ue+Math.ceil((un-Ue)/wn/2)*wn;s(hn,Un,Ue,un,_n),kn.push(Ue,Un,Un,un)}}return O})})(xa);var Di=xa.exports,ft=function(d){return d.GROUP="g",d.FRAGMENT="fragment",d.CIRCLE="circle",d.ELLIPSE="ellipse",d.IMAGE="image",d.RECT="rect",d.LINE="line",d.POLYLINE="polyline",d.POLYGON="polygon",d.TEXT="text",d.PATH="path",d.HTML="html",d.MESH="mesh",d}({}),b=function(d){return d[d.ZERO=0]="ZERO",d[d.NEGATIVE_ONE=1]="NEGATIVE_ONE",d}({}),E=function(){function d(){(0,_.Z)(this,d),this.plugins=[]}return(0,I.Z)(d,[{key:"addRenderingPlugin",value:function(s){this.plugins.push(s),this.context.renderingPlugins.push(s)}},{key:"removeAllRenderingPlugins",value:function(){var s=this;this.plugins.forEach(function(o){var p=s.context.renderingPlugins.indexOf(o);p>=0&&s.context.renderingPlugins.splice(p,1)})}}])}(),h=function(){function d(v){(0,_.Z)(this,d),this.clipSpaceNearZ=b.NEGATIVE_ONE,this.plugins=[],this.config=(0,c.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},v)}return(0,I.Z)(d,[{key:"registerPlugin",value:function(s){var o=this.plugins.findIndex(function(p){return p===s});o===-1&&this.plugins.push(s)}},{key:"unregisterPlugin",value:function(s){var o=this.plugins.findIndex(function(p){return p===s});o>-1&&this.plugins.splice(o,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(s){return this.plugins.find(function(o){return o.name===s})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(s){Object.assign(this.config,s)}}])}(),g=A.IH,M=A.JG,Y=A.Fp,J=A.VV,ot=A.bA,vt=A.lu,zt=function(){function d(){(0,_.Z)(this,d),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,I.Z)(d,[{key:"update",value:function(s,o){M(this.center,s),M(this.halfExtents,o),vt(this.min,this.center,this.halfExtents),g(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(s,o){g(this.center,o,s),ot(this.center,this.center,.5),vt(this.halfExtents,o,s),ot(this.halfExtents,this.halfExtents,.5),M(this.min,s),M(this.max,o)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(s){if(!d.isEmpty(s)){if(d.isEmpty(this)){this.setMinMax(s.getMin(),s.getMax());return}var o=this.center,p=o[0],C=o[1],O=o[2],W=this.halfExtents,K=W[0],ht=W[1],Bt=W[2],ne=p-K,Se=p+K,ze=C-ht,We=C+ht,dn=O-Bt,gn=O+Bt,pn=s.center,sn=pn[0],Sn=pn[1],Wn=pn[2],hn=s.halfExtents,Ue=hn[0],un=hn[1],wn=hn[2],_n=sn-Ue,kn=sn+Ue,Un=Sn-un,Gn=Sn+un,ar=Wn-wn,Ir=Wn+wn;_n<ne&&(ne=_n),kn>Se&&(Se=kn),Un<ze&&(ze=Un),Gn>We&&(We=Gn),ar<dn&&(dn=ar),Ir>gn&&(gn=Ir),o[0]=(ne+Se)*.5,o[1]=(ze+We)*.5,o[2]=(dn+gn)*.5,W[0]=(Se-ne)*.5,W[1]=(We-ze)*.5,W[2]=(gn-dn)*.5,this.min[0]=ne,this.min[1]=ze,this.min[2]=dn,this.max[0]=Se,this.max[1]=We,this.max[2]=gn}}},{key:"setFromTransformedAABB",value:function(s,o){var p=this.center,C=this.halfExtents,O=s.center,W=s.halfExtents,K=o[0],ht=o[4],Bt=o[8],ne=o[1],Se=o[5],ze=o[9],We=o[2],dn=o[6],gn=o[10],pn=Math.abs(K),sn=Math.abs(ht),Sn=Math.abs(Bt),Wn=Math.abs(ne),hn=Math.abs(Se),Ue=Math.abs(ze),un=Math.abs(We),wn=Math.abs(dn),_n=Math.abs(gn);p[0]=o[12]+K*O[0]+ht*O[1]+Bt*O[2],p[1]=o[13]+ne*O[0]+Se*O[1]+ze*O[2],p[2]=o[14]+We*O[0]+dn*O[1]+gn*O[2],C[0]=pn*W[0]+sn*W[1]+Sn*W[2],C[1]=Wn*W[0]+hn*W[1]+Ue*W[2],C[2]=un*W[0]+wn*W[1]+_n*W[2],vt(this.min,p,C),g(this.max,p,C)}},{key:"intersects",value:function(s){var o=this.getMax(),p=this.getMin(),C=s.getMax(),O=s.getMin();return p[0]<=C[0]&&o[0]>=O[0]&&p[1]<=C[1]&&o[1]>=O[1]&&p[2]<=C[2]&&o[2]>=O[2]}},{key:"intersection",value:function(s){if(!this.intersects(s))return null;var o=new d,p=Y([0,0,0],this.getMin(),s.getMin()),C=J([0,0,0],this.getMax(),s.getMax());return o.setMinMax(p,C),o}},{key:"getNegativeFarPoint",value:function(s){return s.pnVertexFlag===273?M([0,0,0],this.min):s.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:s.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:s.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:s.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:s.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:s.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(s){return s.pnVertexFlag===273?M([0,0,0],this.max):s.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:s.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:s.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:s.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:s.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:s.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(s){return!s||s.halfExtents[0]===0&&s.halfExtents[1]===0&&s.halfExtents[2]===0}}])}(),q=function(){function d(v,s){(0,_.Z)(this,d),this.distance=v||0,this.normal=s||A.al(0,1,0),this.updatePNVertexFlag()}return(0,I.Z)(d,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(s){return A.AK(s,this.normal)-this.distance}},{key:"normalize",value:function(){var s=1/A.Zh(this.normal);A.bA(this.normal,this.normal,s),this.distance*=s}},{key:"intersectsLine",value:function(s,o,p){var C=this.distanceToPoint(s),O=this.distanceToPoint(o),W=C/(C-O),K=W>=0&&W<=1;return K&&p&&A.t7(p,s,o,W),K}}])}(),$=function(d){return d[d.OUTSIDE=4294967295]="OUTSIDE",d[d.INSIDE=0]="INSIDE",d[d.INDETERMINATE=2147483647]="INDETERMINATE",d}({}),H=function(){function d(v){if((0,_.Z)(this,d),this.planes=[],v)this.planes=v;else for(var s=0;s<6;s++)this.planes.push(new q)}return(0,I.Z)(d,[{key:"extractFromVPMatrix",value:function(s){var o=(0,w.Z)(s,16),p=o[0],C=o[1],O=o[2],W=o[3],K=o[4],ht=o[5],Bt=o[6],ne=o[7],Se=o[8],ze=o[9],We=o[10],dn=o[11],gn=o[12],pn=o[13],sn=o[14],Sn=o[15];A.t8(this.planes[0].normal,W-p,ne-K,dn-Se),this.planes[0].distance=Sn-gn,A.t8(this.planes[1].normal,W+p,ne+K,dn+Se),this.planes[1].distance=Sn+gn,A.t8(this.planes[2].normal,W+C,ne+ht,dn+ze),this.planes[2].distance=Sn+pn,A.t8(this.planes[3].normal,W-C,ne-ht,dn-ze),this.planes[3].distance=Sn-pn,A.t8(this.planes[4].normal,W-O,ne-Bt,dn-We),this.planes[4].distance=Sn-sn,A.t8(this.planes[5].normal,W+O,ne+Bt,dn+We),this.planes[5].distance=Sn+sn,this.planes.forEach(function(Wn){Wn.normalize(),Wn.updatePNVertexFlag()})}}])}(),nt=function(){function d(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;(0,_.Z)(this,d),this.x=0,this.y=0,this.x=v,this.y=s}return(0,I.Z)(d,[{key:"clone",value:function(){return new d(this.x,this.y)}},{key:"copyFrom",value:function(s){this.x=s.x,this.y=s.y}}])}(),Mt=function(){function d(v,s,o,p){(0,_.Z)(this,d),this.x=v,this.y=s,this.width=o,this.height=p,this.left=v,this.right=v+o,this.top=s,this.bottom=s+p}return(0,I.Z)(d,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(s){return new d(s.x,s.y,s.width,s.height)}},{key:"applyTransform",value:function(s,o){var p=L.al(s.x,s.y,0,1),C=L.al(s.x+s.width,s.y,0,1),O=L.al(s.x,s.y+s.height,0,1),W=L.al(s.x+s.width,s.y+s.height,0,1),K=L.Ue(),ht=L.Ue(),Bt=L.Ue(),ne=L.Ue();L.fF(K,p,o),L.fF(ht,C,o),L.fF(Bt,O,o),L.fF(ne,W,o);var Se=Math.min(K[0],ht[0],Bt[0],ne[0]),ze=Math.min(K[1],ht[1],Bt[1],ne[1]),We=Math.max(K[0],ht[0],Bt[0],ne[0]),dn=Math.max(K[1],ht[1],Bt[1],ne[1]);return d.fromRect({x:Se,y:ze,width:We-Se,height:dn-ze})}}])}(),Wt="Method not implemented.",Tt="Use document.documentElement instead.",Kt="Cannot append a destroyed element.";function bt(d){return d===void 0?0:d>360||d<-360?d%360:d}var pt=A.Ue();function ut(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(d)&&d.length===3?o?A.d9(d):A.JG(pt,d):(0,gt.Z)(d)?o?A.al(d,v,s):A.t8(pt,d,v,s):o?A.al(d[0],d[1]||v,d[2]||s):A.t8(pt,d[0],d[1]||v,d[2]||s)}var Gt=Math.PI/180;function Vt(d){return d*Gt}var ve=180/Math.PI;function ge(d){return d*ve}var Yt=.9;function Ce(d){return d%=400,d<0&&(d+=400),d*Yt}function qe(d){return d/360}function Qe(d){return 360*d}var Nn=Math.PI/2;function Dn(d,v){var s=v[0],o=v[1],p=v[2],C=v[3],O=s*s,W=o*o,K=p*p,ht=C*C,Bt=O+W+K+ht,ne=s*C-o*p;return ne>.499995*Bt?(d[0]=Nn,d[1]=2*Math.atan2(o,s),d[2]=0):ne<-.499995*Bt?(d[0]=-Nn,d[1]=2*Math.atan2(o,s),d[2]=0):(d[0]=Math.asin(2*(s*p-C*o)),d[1]=Math.atan2(2*(s*C+o*p),1-2*(K+ht)),d[2]=Math.atan2(2*(s*o+p*C),1-2*(W+K))),d}function Rn(d,v){var s,o,p=F.getScaling(A.Ue(),v),C=(0,w.Z)(p,3),O=C[0],W=C[1],K=C[2],ht=Math.asin(-v[2]/O);return ht<Nn?ht>-Nn?(s=Math.atan2(v[6]/W,v[10]/K),o=Math.atan2(v[1]/O,v[0]/O)):(o=0,s=-Math.atan2(v[4]/W,v[5]/W)):(o=0,s=Math.atan2(v[4]/W,v[5]/W)),d[0]=s,d[1]=ht,d[2]=o,d}function Xn(d,v){return v.length===16?Rn(d,v):Dn(d,v)}function tr(d,v,s,o,p){var C=Math.cos(d),O=Math.sin(d);return it.al(o*C,p*O,0,-o*O,p*C,0,v,s,1)}function Mr(d,v,s,o,p,C,O){var W=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,K=2*C,ht=s-v,Bt=o-p,ne=K/ht,Se=K/Bt,ze=(s+v)/ht,We=(o+p)/Bt,dn,gn,pn=O-C,sn=O*C;return W?(dn=-O/pn,gn=-sn/pn):(dn=-(O+C)/pn,gn=-2*sn/pn),d[0]=ne,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=Se,d[6]=0,d[7]=0,d[8]=ze,d[9]=We,d[10]=dn,d[11]=-1,d[12]=0,d[13]=0,d[14]=gn,d[15]=0,d}function yr(d){var v=d[0],s=d[1],o=d[3],p=d[4],C=Math.sqrt(v*v+s*s),O=Math.sqrt(o*o+p*p),W=v*p-s*o;if(W<0&&(v<p?C=-C:O=-O),C){var K=1/C;v*=K,s*=K}if(O){var ht=1/O;o*=ht,p*=ht}var Bt=Math.atan2(s,v),ne=ge(Bt);return[d[6],d[7],C,O,ne]}var vr=F.create(),Cr=F.create(),ur=L.Ue(),Kn=[A.Ue(),A.Ue(),A.Ue()],Ur=A.Ue();function Yr(d,v,s,o,p,C){if(!br(vr,d)||(F.copy(Cr,vr),Cr[3]=0,Cr[7]=0,Cr[11]=0,Cr[15]=1,Math.abs(F.determinant(Cr))<1e-8))return!1;var O=vr[3],W=vr[7],K=vr[11],ht=vr[12],Bt=vr[13],ne=vr[14],Se=vr[15];if(O!==0||W!==0||K!==0){ur[0]=O,ur[1]=W,ur[2]=K,ur[3]=Se;var ze=F.invert(Cr,Cr);if(!ze)return!1;F.transpose(Cr,Cr),L.fF(p,ur,Cr)}else p[0]=p[1]=p[2]=0,p[3]=1;if(v[0]=ht,v[1]=Bt,v[2]=ne,xi(Kn,vr),s[0]=A.kE(Kn[0]),A.Fv(Kn[0],Kn[0]),o[0]=A.AK(Kn[0],Kn[1]),di(Kn[1],Kn[1],Kn[0],1,-o[0]),s[1]=A.kE(Kn[1]),A.Fv(Kn[1],Kn[1]),o[0]/=s[1],o[1]=A.AK(Kn[0],Kn[2]),di(Kn[2],Kn[2],Kn[0],1,-o[1]),o[2]=A.AK(Kn[1],Kn[2]),di(Kn[2],Kn[2],Kn[1],1,-o[2]),s[2]=A.kE(Kn[2]),A.Fv(Kn[2],Kn[2]),o[1]/=s[2],o[2]/=s[2],A.kC(Ur,Kn[1],Kn[2]),A.AK(Kn[0],Ur)<0)for(var We=0;We<3;We++)s[We]*=-1,Kn[We][0]*=-1,Kn[We][1]*=-1,Kn[We][2]*=-1;return C[0]=.5*Math.sqrt(Math.max(1+Kn[0][0]-Kn[1][1]-Kn[2][2],0)),C[1]=.5*Math.sqrt(Math.max(1-Kn[0][0]+Kn[1][1]-Kn[2][2],0)),C[2]=.5*Math.sqrt(Math.max(1-Kn[0][0]-Kn[1][1]+Kn[2][2],0)),C[3]=.5*Math.sqrt(Math.max(1+Kn[0][0]+Kn[1][1]+Kn[2][2],0)),Kn[2][1]>Kn[1][2]&&(C[0]=-C[0]),Kn[0][2]>Kn[2][0]&&(C[1]=-C[1]),Kn[1][0]>Kn[0][1]&&(C[2]=-C[2]),!0}function br(d,v){var s=v[15];if(s===0)return!1;for(var o=1/s,p=0;p<16;p++)d[p]=v[p]*o;return!0}function xi(d,v){d[0][0]=v[0],d[0][1]=v[1],d[0][2]=v[2],d[1][0]=v[4],d[1][1]=v[5],d[1][2]=v[6],d[2][0]=v[8],d[2][1]=v[9],d[2][2]=v[10]}function di(d,v,s,o,p){d[0]=v[0]*o+s[0]*p,d[1]=v[1]*o+s[1]*p,d[2]=v[2]*o+s[2]*p}var Lr=function(d){return d[d.ORBITING=0]="ORBITING",d[d.EXPLORING=1]="EXPLORING",d[d.TRACKING=2]="TRACKING",d}({}),Ci=function(d){return d[d.DEFAULT=0]="DEFAULT",d[d.ROTATIONAL=1]="ROTATIONAL",d[d.TRANSLATIONAL=2]="TRANSLATIONAL",d[d.CINEMATIC=3]="CINEMATIC",d}({}),fi=function(d){return d[d.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",d[d.PERSPECTIVE=1]="PERSPECTIVE",d}({}),Ni={UPDATED:"updated"},Ji=2e-4,Fa=function(){function d(){(0,_.Z)(this,d),this.clipSpaceNearZ=b.NEGATIVE_ONE,this.eventEmitter=new D,this.matrix=F.create(),this.right=A.al(1,0,0),this.up=A.al(0,1,0),this.forward=A.al(0,0,1),this.position=A.al(0,0,1),this.focalPoint=A.al(0,0,0),this.distanceVector=A.al(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=F.create(),this.projectionMatrixInverse=F.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Lr.EXPLORING,this.trackingMode=Ci.DEFAULT,this.projectionMode=fi.PERSPECTIVE,this.frustum=new H,this.orthoMatrix=F.create()}return(0,I.Z)(d,[{key:"isOrtho",value:function(){return this.projectionMode===fi.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(s){this.enableUpdate=s}},{key:"setType",value:function(s,o){return this.type=s,this.type===Lr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Lr.TRACKING&&o!==void 0&&this.setTrackingMode(o),this}},{key:"setProjectionMode",value:function(s){return this.projectionMode=s,this}},{key:"setTrackingMode",value:function(s){if(this.type!==Lr.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=s,this}},{key:"setWorldRotation",value:function(s){return this.rotateWorld=s,this._getAngles(),this}},{key:"getViewTransform",value:function(){return F.invert(F.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(s,o){var p=F.fromTranslation(F.create(),[s,o,0]);this.jitteredProjectionMatrix=F.multiply(F.create(),p,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(s){return this.matrix=s,this._update(),this}},{key:"setProjectionMatrix",value:function(s){this.projectionMatrix=s}},{key:"setFov",value:function(s){return this.setPerspective(this.near,this.far,s,this.aspect),this}},{key:"setAspect",value:function(s){return this.setPerspective(this.near,this.far,this.fov,s),this}},{key:"setNear",value:function(s){return this.projectionMode===fi.PERSPECTIVE?this.setPerspective(s,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,s,this.far),this}},{key:"setFar",value:function(s){return this.projectionMode===fi.PERSPECTIVE?this.setPerspective(this.near,s,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,s),this}},{key:"setViewOffset",value:function(s,o,p,C,O,W){return this.aspect=s/o,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=s,this.view.fullHeight=o,this.view.offsetX=p,this.view.offsetY=C,this.view.width=O,this.view.height=W,this.projectionMode===fi.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===fi.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(s){return this.zoom=s,this.projectionMode===fi.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===fi.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(s,o){var p=this.canvas.viewport2Canvas({x:o[0],y:o[1]}),C=p.x,O=p.y,W=this.roll;this.rotate(0,0,-W),this.setPosition(C,O),this.setFocalPoint(C,O),this.setZoom(s),this.rotate(0,0,W);var K=this.canvas.viewport2Canvas({x:o[0],y:o[1]}),ht=K.x,Bt=K.y,ne=A.al(ht-C,Bt-O,0),Se=A.AK(ne,this.right)/A.kE(this.right),ze=A.AK(ne,this.up)/A.kE(this.up),We=this.getPosition(),dn=(0,w.Z)(We,2),gn=dn[0],pn=dn[1],sn=this.getFocalPoint(),Sn=(0,w.Z)(sn,2),Wn=Sn[0],hn=Sn[1];return this.setPosition(gn-Se,pn-ze),this.setFocalPoint(Wn-Se,hn-ze),this}},{key:"setPerspective",value:function(s,o,p,C){var O;this.projectionMode=fi.PERSPECTIVE,this.fov=p,this.near=s,this.far=o,this.aspect=C;var W=this.near*Math.tan(Vt(.5*this.fov))/this.zoom,K=2*W,ht=this.aspect*K,Bt=-.5*ht;if((O=this.view)!==null&&O!==void 0&&O.enabled){var ne=this.view.fullWidth,Se=this.view.fullHeight;Bt+=this.view.offsetX*ht/ne,W-=this.view.offsetY*K/Se,ht*=this.view.width/ne,K*=this.view.height/Se}return Mr(this.projectionMatrix,Bt,Bt+ht,W-K,W,s,this.far,this.clipSpaceNearZ===b.ZERO),F.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(s,o,p,C,O,W){var K;this.projectionMode=fi.ORTHOGRAPHIC,this.rright=o,this.left=s,this.top=p,this.bottom=C,this.near=O,this.far=W;var ht=(this.rright-this.left)/(2*this.zoom),Bt=(this.top-this.bottom)/(2*this.zoom),ne=(this.rright+this.left)/2,Se=(this.top+this.bottom)/2,ze=ne-ht,We=ne+ht,dn=Se+Bt,gn=Se-Bt;if((K=this.view)!==null&&K!==void 0&&K.enabled){var pn=(this.rright-this.left)/this.view.fullWidth/this.zoom,sn=(this.top-this.bottom)/this.view.fullHeight/this.zoom;ze+=pn*this.view.offsetX,We=ze+pn*this.view.width,dn-=sn*this.view.offsetY,gn=dn-sn*this.view.height}return this.clipSpaceNearZ===b.NEGATIVE_ONE?F.ortho(this.projectionMatrix,ze,We,dn,gn,O,W):F.orthoZO(this.projectionMatrix,ze,We,dn,gn,O,W),F.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],C=ut(s,o,p);return this._setPosition(C),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],C=A.al(0,1,0);if(this.focalPoint=ut(s,o,p),this.trackingMode===Ci.CINEMATIC){var O=A.$X(A.Ue(),this.focalPoint,this.position);s=O[0],o=O[1],p=O[2];var W=A.kE(O),K=ge(Math.asin(o/W)),ht=90+ge(Math.atan2(p,s)),Bt=F.create();F.rotateY(Bt,Bt,Vt(ht)),F.rotateX(Bt,Bt,Vt(K)),C=A.fF(A.Ue(),[0,1,0],Bt)}return F.invert(this.matrix,F.lookAt(F.create(),this.position,this.focalPoint,C)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(s){if(this.distance===s||s<0)return this;this.distance=s,this.distance<Ji&&(this.distance=Ji),this.dollyingStep=this.distance/100;var o=A.Ue();s=this.distance;var p=this.forward,C=this.focalPoint;return o[0]=s*p[0]+C[0],o[1]=s*p[1]+C[1],o[2]=s*p[2]+C[2],this._setPosition(o),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(s){return this.maxDistance=s,this}},{key:"setMinDistance",value:function(s){return this.minDistance=s,this}},{key:"setAzimuth",value:function(s){return this.azimuth=bt(s),this.computeMatrix(),this._getAxes(),this.type===Lr.ORBITING||this.type===Lr.EXPLORING?this._getPosition():this.type===Lr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(s){return this.elevation=bt(s),this.computeMatrix(),this._getAxes(),this.type===Lr.ORBITING||this.type===Lr.EXPLORING?this._getPosition():this.type===Lr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(s){return this.roll=bt(s),this.computeMatrix(),this._getAxes(),this.type===Lr.ORBITING||this.type===Lr.EXPLORING?this._getPosition():this.type===Lr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var s=G.yY(G.Ue(),[0,0,1],Vt(this.roll));F.identity(this.matrix);var o=G.yY(G.Ue(),[1,0,0],Vt((this.rotateWorld&&this.type!==Lr.TRACKING||this.type===Lr.TRACKING?1:-1)*this.elevation)),p=G.yY(G.Ue(),[0,1,0],Vt((this.rotateWorld&&this.type!==Lr.TRACKING||this.type===Lr.TRACKING?1:-1)*this.azimuth)),C=G.Jp(G.Ue(),p,o);C=G.Jp(G.Ue(),C,s);var O=F.fromQuat(F.create(),C);this.type===Lr.ORBITING||this.type===Lr.EXPLORING?(F.translate(this.matrix,this.matrix,this.focalPoint),F.multiply(this.matrix,this.matrix,O),F.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Lr.TRACKING&&(F.translate(this.matrix,this.matrix,this.position),F.multiply(this.matrix,this.matrix,O))}},{key:"_setPosition",value:function(s,o,p){this.position=ut(s,o,p);var C=this.matrix;C[12]=this.position[0],C[13]=this.position[1],C[14]=this.position[2],C[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){A.JG(this.right,ut(L.fF(L.Ue(),[1,0,0,0],this.matrix))),A.JG(this.up,ut(L.fF(L.Ue(),[0,1,0,0],this.matrix))),A.JG(this.forward,ut(L.fF(L.Ue(),[0,0,1,0],this.matrix))),A.Fv(this.right,this.right),A.Fv(this.up,this.up),A.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var s=this.distanceVector[0],o=this.distanceVector[1],p=this.distanceVector[2],C=A.kE(this.distanceVector);if(C===0){this.elevation=0,this.azimuth=0;return}this.type===Lr.TRACKING?(this.elevation=ge(Math.asin(o/C)),this.azimuth=ge(Math.atan2(-s,-p))):this.rotateWorld?(this.elevation=ge(Math.asin(o/C)),this.azimuth=ge(Math.atan2(-s,-p))):(this.elevation=-ge(Math.asin(o/C)),this.azimuth=-ge(Math.atan2(-s,-p)))}},{key:"_getPosition",value:function(){A.JG(this.position,ut(L.fF(L.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){A.kK(this.distanceVector,[0,0,-this.distance],it.xO(it.Ue(),this.matrix)),A.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=A.$X(A.Ue(),this.focalPoint,this.position),this.distance=A.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===fi.ORTHOGRAPHIC){var s=this.position,o=G.yY(G.Ue(),[0,0,1],-this.roll*Math.PI/180);F.fromRotationTranslationScaleOrigin(this.orthoMatrix,o,A.al((this.rright-this.left)/2-s[0],(this.top-this.bottom)/2-s[1],0),A.al(this.zoom,this.zoom,1),s)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var s=this.getViewTransform(),o=F.multiply(F.create(),this.getPerspective(),s);this.getFrustum().extractFromVPMatrix(o),this.eventEmitter.emit(Ni.UPDATED)}}},{key:"rotate",value:function(s,o,p){throw new Error(Wt)}},{key:"pan",value:function(s,o){throw new Error(Wt)}},{key:"dolly",value:function(s){throw new Error(Wt)}},{key:"createLandmark",value:function(s,o){throw new Error(Wt)}},{key:"gotoLandmark",value:function(s,o){throw new Error(Wt)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Wt)}}])}(),La=function(d){return d[d.Standard=0]="Standard",d}({}),_a=function(d){return d[d.ADDED=0]="ADDED",d[d.REMOVED=1]="REMOVED",d[d.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",d}({}),ta=A.Ue(),pi=F.create(),mo=G.Ue();function us(d){if(d.localDirtyFlag){var v=d.localSkew[0]!==0||d.localSkew[1]!==0;if(v){F.fromRotationTranslationScaleOrigin(d.localTransform,d.localRotation,d.localPosition,A.al(1,1,1),d.origin),(d.localSkew[0]!==0||d.localSkew[1]!==0)&&(F.identity(pi),pi[4]=Math.tan(d.localSkew[0]),pi[1]=Math.tan(d.localSkew[1]),F.multiply(d.localTransform,d.localTransform,pi));var s=F.fromRotationTranslationScaleOrigin(pi,G.t8(mo,0,0,0,1),A.t8(ta,1,1,1),d.localScale,d.origin);F.multiply(d.localTransform,d.localTransform,s)}else{var o=d.localTransform,p=d.localPosition,C=d.localRotation,O=d.localScale,W=d.origin,K=p[0]!==0||p[1]!==0||p[2]!==0,ht=C[3]!==1||C[0]!==0||C[1]!==0||C[2]!==0,Bt=O[0]!==1||O[1]!==1||O[2]!==1,ne=W[0]!==0||W[1]!==0||W[2]!==0;!ht&&!Bt&&!ne?K?F.fromTranslation(o,p):F.identity(o):F.fromRotationTranslationScaleOrigin(o,C,p,O,W)}d.localDirtyFlag=!1}}function Bs(d,v){d.dirtyFlag&&(v?F.multiply(d.worldTransform,v.worldTransform,d.localTransform):F.copy(d.worldTransform,d.localTransform),d.dirtyFlag=!1)}var Fs={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Mt(0,0,0,0)},qn=function(d){return d.COORDINATE="<coordinate>",d.COLOR="<color>",d.PAINT="<paint>",d.NUMBER="<number>",d.ANGLE="<angle>",d.OPACITY_VALUE="<opacity-value>",d.SHADOW_BLUR="<shadow-blur>",d.LENGTH="<length>",d.PERCENTAGE="<percentage>",d.LENGTH_PERCENTAGE="<length> | <percentage>",d.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",d.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",d.LIST_OF_POINTS="<list-of-points>",d.PATH="<path>",d.FILTER="<filter>",d.Z_INDEX="<z-index>",d.OFFSET_DISTANCE="<offset-distance>",d.DEFINED_PATH="<defined-path>",d.MARKER="<marker>",d.TRANSFORM="<transform>",d.TRANSFORM_ORIGIN="<transform-origin>",d.TEXT="<text>",d.TEXT_TRANSFORM="<text-transform>",d}({});function Za(d,v,s){d.prototype=v.prototype=s,s.constructor=d}function za(d,v){var s=Object.create(d.prototype);for(var o in v)s[o]=v[o];return s}function ja(){}var xs=.7,Wa=1/xs,Ga="\\s*([+-]?\\d+)\\s*",Da="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ha=/^#([0-9a-f]{3,8})$/,da=new RegExp(`^rgb\\(${Ga},${Ga},${Ga}\\)$`),$s=new RegExp(`^rgb\\(${wa},${wa},${wa}\\)$`),qs=new RegExp(`^rgba\\(${Ga},${Ga},${Ga},${Da}\\)$`),ws=new RegExp(`^rgba\\(${wa},${wa},${wa},${Da}\\)$`),yo=new RegExp(`^hsl\\(${Da},${wa},${wa}\\)$`),_s=new RegExp(`^hsla\\(${Da},${wa},${wa},${Da}\\)$`),wi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Za(ja,$i,{copy(d){return Object.assign(new this.constructor,this,d)},displayable(){return this.rgb().displayable()},hex:Ua,formatHex:Ua,formatHex8:Ms,formatHsl:ol,formatRgb:ea,toString:ea});function Ua(){return this.rgb().formatHex()}function Ms(){return this.rgb().formatHex8()}function ol(){return qa(this).formatHsl()}function ea(){return this.rgb().formatRgb()}function $i(d){var v,s;return d=(d+"").trim().toLowerCase(),(v=ha.exec(d))?(s=v[1].length,v=parseInt(v[1],16),s===6?Ss(v):s===3?new qi(v>>8&15|v>>4&240,v>>4&15|v&240,(v&15)<<4|v&15,1):s===8?Pi(v>>24&255,v>>16&255,v>>8&255,(v&255)/255):s===4?Pi(v>>12&15|v>>8&240,v>>8&15|v>>4&240,v>>4&15|v&240,((v&15)<<4|v&15)/255):null):(v=da.exec(d))?new qi(v[1],v[2],v[3],1):(v=$s.exec(d))?new qi(v[1]*255/100,v[2]*255/100,v[3]*255/100,1):(v=qs.exec(d))?Pi(v[1],v[2],v[3],v[4]):(v=ws.exec(d))?Pi(v[1]*255/100,v[2]*255/100,v[3]*255/100,v[4]):(v=yo.exec(d))?$a(v[1],v[2]/100,v[3]/100,1):(v=_s.exec(d))?$a(v[1],v[2]/100,v[3]/100,v[4]):wi.hasOwnProperty(d)?Ss(wi[d]):d==="transparent"?new qi(NaN,NaN,NaN,0):null}function Ss(d){return new qi(d>>16&255,d>>8&255,d&255,1)}function Pi(d,v,s,o){return o<=0&&(d=v=s=NaN),new qi(d,v,s,o)}function to(d){return d instanceof ja||(d=$i(d)),d?(d=d.rgb(),new qi(d.r,d.g,d.b,d.opacity)):new qi}function Zs(d,v,s,o){return arguments.length===1?to(d):new qi(d,v,s,o==null?1:o)}function qi(d,v,s,o){this.r=+d,this.g=+v,this.b=+s,this.opacity=+o}Za(qi,Zs,za(ja,{brighter(d){return d=d==null?Wa:Math.pow(Wa,d),new qi(this.r*d,this.g*d,this.b*d,this.opacity)},darker(d){return d=d==null?xs:Math.pow(xs,d),new qi(this.r*d,this.g*d,this.b*d,this.opacity)},rgb(){return this},clamp(){return new qi(Ma(this.r),Ma(this.g),Ma(this.b),hs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:As,formatHex:As,formatHex8:Bo,formatRgb:oa,toString:oa}));function As(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function Bo(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function oa(){const d=hs(this.opacity);return`${d===1?"rgb(":"rgba("}${Ma(this.r)}, ${Ma(this.g)}, ${Ma(this.b)}${d===1?")":`, ${d})`}`}function hs(d){return isNaN(d)?1:Math.max(0,Math.min(1,d))}function Ma(d){return Math.max(0,Math.min(255,Math.round(d)||0))}function Ii(d){return d=Ma(d),(d<16?"0":"")+d.toString(16)}function $a(d,v,s,o){return o<=0?d=v=s=NaN:s<=0||s>=1?d=v=NaN:v<=0&&(d=NaN),new Na(d,v,s,o)}function qa(d){if(d instanceof Na)return new Na(d.h,d.s,d.l,d.opacity);if(d instanceof ja||(d=$i(d)),!d)return new Na;if(d instanceof Na)return d;d=d.rgb();var v=d.r/255,s=d.g/255,o=d.b/255,p=Math.min(v,s,o),C=Math.max(v,s,o),O=NaN,W=C-p,K=(C+p)/2;return W?(v===C?O=(s-o)/W+(s<o)*6:s===C?O=(o-v)/W+2:O=(v-s)/W+4,W/=K<.5?C+p:2-C-p,O*=60):W=K>0&&K<1?0:O,new Na(O,W,K,d.opacity)}function ts(d,v,s,o){return arguments.length===1?qa(d):new Na(d,v,s,o==null?1:o)}function Na(d,v,s,o){this.h=+d,this.s=+v,this.l=+s,this.opacity=+o}Za(Na,ts,za(ja,{brighter(d){return d=d==null?Wa:Math.pow(Wa,d),new Na(this.h,this.s,this.l*d,this.opacity)},darker(d){return d=d==null?xs:Math.pow(xs,d),new Na(this.h,this.s,this.l*d,this.opacity)},rgb(){var d=this.h%360+(this.h<0)*360,v=isNaN(d)||isNaN(this.s)?0:this.s,s=this.l,o=s+(s<.5?s:1-s)*v,p=2*s-o;return new qi(eo(d>=240?d-240:d+120,p,o),eo(d,p,o),eo(d<120?d+240:d-120,p,o),this.opacity)},clamp(){return new Na(fa(this.h),Ia(this.s),Ia(this.l),hs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const d=hs(this.opacity);return`${d===1?"hsl(":"hsla("}${fa(this.h)}, ${Ia(this.s)*100}%, ${Ia(this.l)*100}%${d===1?")":`, ${d})`}`}}));function fa(d){return d=(d||0)%360,d<0?d+360:d}function Ia(d){return Math.max(0,Math.min(1,d||0))}function eo(d,v,s){return(d<60?v+(s-v)*d/60:d<180?s:d<240?v+(s-v)*(240-d)/60:v)*255}function Oi(d,v){if(typeof d!="function"||v!=null&&typeof v!="function")throw new TypeError("Expected a function");var s=function(){for(var p=arguments.length,C=new Array(p),O=0;O<p;O++)C[O]=arguments[O];var W=v?v.apply(this,C):C[0],K=s.cache;if(K.has(W))return K.get(W);var ht=d.apply(this,C);return s.cache=K.set(W,ht)||K,ht};return s.cache=new(Oi.Cache||Map),Oi.cacheList.push(s.cache),s}Oi.Cache=Map,Oi.cacheList=[],Oi.clearCache=function(){Oi.cacheList.forEach(function(d){return d.clear()})};var nr=function(d){return d[d.kUnknown=0]="kUnknown",d[d.kNumber=1]="kNumber",d[d.kPercentage=2]="kPercentage",d[d.kEms=3]="kEms",d[d.kPixels=4]="kPixels",d[d.kRems=5]="kRems",d[d.kDegrees=6]="kDegrees",d[d.kRadians=7]="kRadians",d[d.kGradians=8]="kGradians",d[d.kTurns=9]="kTurns",d[d.kMilliseconds=10]="kMilliseconds",d[d.kSeconds=11]="kSeconds",d[d.kInteger=12]="kInteger",d}({}),va=function(d){return d[d.kUNumber=0]="kUNumber",d[d.kUPercent=1]="kUPercent",d[d.kULength=2]="kULength",d[d.kUAngle=3]="kUAngle",d[d.kUTime=4]="kUTime",d[d.kUOther=5]="kUOther",d}({}),bo=function(d){return d[d.kYes=0]="kYes",d[d.kNo=1]="kNo",d}({}),Os=function(d){return d[d.kYes=0]="kYes",d[d.kNo=1]="kNo",d}({}),Eo=[{name:"em",unit_type:nr.kEms},{name:"px",unit_type:nr.kPixels},{name:"deg",unit_type:nr.kDegrees},{name:"rad",unit_type:nr.kRadians},{name:"grad",unit_type:nr.kGradians},{name:"ms",unit_type:nr.kMilliseconds},{name:"s",unit_type:nr.kSeconds},{name:"rem",unit_type:nr.kRems},{name:"turn",unit_type:nr.kTurns}],Sa=function(d){return d[d.kUnknownType=0]="kUnknownType",d[d.kUnparsedType=1]="kUnparsedType",d[d.kKeywordType=2]="kKeywordType",d[d.kUnitType=3]="kUnitType",d[d.kSumType=4]="kSumType",d[d.kProductType=5]="kProductType",d[d.kNegateType=6]="kNegateType",d[d.kInvertType=7]="kInvertType",d[d.kMinType=8]="kMinType",d[d.kMaxType=9]="kMaxType",d[d.kClampType=10]="kClampType",d[d.kTransformType=11]="kTransformType",d[d.kPositionType=12]="kPositionType",d[d.kURLImageType=13]="kURLImageType",d[d.kColorType=14]="kColorType",d[d.kUnsupportedColorType=15]="kUnsupportedColorType",d}({}),Fo=function(v){return Eo.find(function(s){return s.name===v}).unit_type},_o=function(v){return v?v==="number"?nr.kNumber:v==="percent"||v==="%"?nr.kPercentage:Fo(v):nr.kUnknown},zs=function(v){switch(v){case nr.kNumber:case nr.kInteger:return va.kUNumber;case nr.kPercentage:return va.kUPercent;case nr.kPixels:return va.kULength;case nr.kMilliseconds:case nr.kSeconds:return va.kUTime;case nr.kDegrees:case nr.kRadians:case nr.kGradians:case nr.kTurns:return va.kUAngle;default:return va.kUOther}},Ts=function(v){switch(v){case va.kUNumber:return nr.kNumber;case va.kULength:return nr.kPixels;case va.kUPercent:return nr.kPercentage;case va.kUTime:return nr.kSeconds;case va.kUAngle:return nr.kDegrees;default:return nr.kUnknown}},Va=function(v){var s=1;switch(v){case nr.kPixels:case nr.kDegrees:case nr.kSeconds:break;case nr.kMilliseconds:s=.001;break;case nr.kRadians:s=180/Math.PI;break;case nr.kGradians:s=.9;break;case nr.kTurns:s=360;break}return s},ds=function(v){switch(v){case nr.kNumber:case nr.kInteger:return"";case nr.kPercentage:return"%";case nr.kEms:return"em";case nr.kRems:return"rem";case nr.kPixels:return"px";case nr.kDegrees:return"deg";case nr.kRadians:return"rad";case nr.kGradians:return"grad";case nr.kMilliseconds:return"ms";case nr.kSeconds:return"s";case nr.kTurns:return"turn"}return""},es=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"toString",value:function(){return this.buildCSSText(bo.kNo,Os.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Sa.kUnitType&&this.getType()<=Sa.kClampType}}],[{key:"isAngle",value:function(s){return s===nr.kDegrees||s===nr.kRadians||s===nr.kGradians||s===nr.kTurns}},{key:"isLength",value:function(s){return s>=nr.kEms&&s<nr.kDegrees}},{key:"isRelativeUnit",value:function(s){return s===nr.kPercentage||s===nr.kEms||s===nr.kRems}},{key:"isTime",value:function(s){return s===nr.kSeconds||s===nr.kMilliseconds}}])}(),js=function(d){function v(s){var o;return(0,_.Z)(this,v),o=(0,S.Z)(this,v),o.colorSpace=s,o}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"getType",value:function(){return Sa.kColorType}},{key:"to",value:function(o){return this}}])}(es),ns=function(d){return d[d.Constant=0]="Constant",d[d.LinearGradient=1]="LinearGradient",d[d.RadialGradient=2]="RadialGradient",d}({}),rs=function(d){function v(s,o){var p;return(0,_.Z)(this,v),p=(0,S.Z)(this,v),p.type=s,p.value=o,p}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"clone",value:function(){return new v(this.type,this.value)}},{key:"buildCSSText",value:function(o,p,C){return C}},{key:"getType",value:function(){return Sa.kColorType}}])}(es),Ti=function(d){function v(s){var o;return(0,_.Z)(this,v),o=(0,S.Z)(this,v),o.value=s,o}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"clone",value:function(){return new v(this.value)}},{key:"getType",value:function(){return Sa.kKeywordType}},{key:"buildCSSText",value:function(o,p,C){return C+this.value}}])}(es),Zo=function(v){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o="";return Number.isFinite(v)?o="NaN":v>0?o="infinity":o="-infinity",o+=s},Pa=function(v){return Ts(zs(v))},ci=function(d){function v(s){var o,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nr.kNumber;(0,_.Z)(this,v),o=(0,S.Z)(this,v);var C;return typeof p=="string"?C=_o(p):C=p,o.unit=C,o.value=s,o}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"clone",value:function(){return new v(this.value,this.unit)}},{key:"equals",value:function(o){var p=o;return this.value===p.value&&this.unit===p.unit}},{key:"getType",value:function(){return Sa.kUnitType}},{key:"convertTo",value:function(o){if(this.unit===o)return new v(this.value,this.unit);var p=Pa(this.unit);if(p!==Pa(o)||p===nr.kUnknown)return null;var C=Va(this.unit)/Va(o);return new v(this.value*C,o)}},{key:"buildCSSText",value:function(o,p,C){var O;switch(this.unit){case nr.kUnknown:break;case nr.kInteger:O=Number(this.value).toFixed(0);break;case nr.kNumber:case nr.kPercentage:case nr.kEms:case nr.kRems:case nr.kPixels:case nr.kDegrees:case nr.kRadians:case nr.kGradians:case nr.kMilliseconds:case nr.kSeconds:case nr.kTurns:{var W=-999999,K=999999,ht=this.value,Bt=ds(this.unit);if(ht<W||ht>K){var ne=ds(this.unit);!Number.isFinite(ht)||Number.isNaN(ht)?O=Zo(ht,ne):O=ht+(ne||"")}else O="".concat(ht).concat(Bt)}}return C+=O,C}}])}(es),Hi=new ci(0,"px");new ci(1,"px");var Ya=new ci(0,"deg"),Gi=function(d){function v(s,o,p){var C,O=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,W=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return(0,_.Z)(this,v),C=(0,S.Z)(this,v,["rgb"]),C.r=s,C.g=o,C.b=p,C.alpha=O,C.isNone=W,C}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"clone",value:function(){return new v(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(o,p,C){return"".concat(C,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(js),fs=new Ti("unset"),ll=new Ti("initial"),xo=new Ti("inherit"),no={"":fs,unset:fs,initial:ll,inherit:xo},Cs=function(v){return no[v]||(no[v]=new Ti(v)),no[v]},Ha=new Gi(0,0,0,0,!0),Aa=new Gi(0,0,0,0),la=Oi(function(d,v,s,o){return new Gi(d,v,s,o)},function(d,v,s,o){return"rgba(".concat(d,",").concat(v,",").concat(s,",").concat(o,")")}),jr=function(v){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nr.kNumber;return new ci(v,s)};new ci(50,"%");function zo(d){var v=d.type,s=d.value;return v==="hex"?"#".concat(s):v==="literal"?s:v==="rgb"?"rgb(".concat(s.join(","),")"):"rgba(".concat(s.join(","),")")}var Ws=function(){var d={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},v="";function s(hr){throw new Error("".concat(v,": ").concat(hr))}function o(){var hr=p();return v.length>0&&s("Invalid input not EOF"),hr}function p(){return Sn(C)}function C(){return O("linear-gradient",d.linearGradient,K)||O("repeating-linear-gradient",d.repeatingLinearGradient,K)||O("radial-gradient",d.radialGradient,ne)||O("repeating-radial-gradient",d.repeatingRadialGradient,ne)||O("conic-gradient",d.conicGradient,ne)}function O(hr,kr,Pr){return W(kr,function(zi){var Qi=Pr();return Qi&&(zr(d.comma)||s("Missing comma before color stops")),{type:hr,orientation:Qi,colorStops:Sn(Wn)}})}function W(hr,kr){var Pr=zr(hr);if(Pr){zr(d.startCall)||s("Missing (");var zi=kr(Pr);return zr(d.endCall)||s("Missing )"),zi}}function K(){return ht()||Bt()}function ht(){return Ir("directional",d.sideOrCorner,1)}function Bt(){return Ir("angular",d.angleValue,1)}function ne(){var hr,kr=Se(),Pr;return kr&&(hr=[],hr.push(kr),Pr=v,zr(d.comma)&&(kr=Se(),kr?hr.push(kr):v=Pr)),hr}function Se(){var hr=ze()||We();if(hr)hr.at=gn();else{var kr=dn();if(kr){hr=kr;var Pr=gn();Pr&&(hr.at=Pr)}else{var zi=pn();zi&&(hr={type:"default-radial",at:zi})}}return hr}function ze(){var hr=Ir("shape",/^(circle)/i,0);return hr&&(hr.style=ar()||dn()),hr}function We(){var hr=Ir("shape",/^(ellipse)/i,0);return hr&&(hr.style=Un()||dn()),hr}function dn(){return Ir("extent-keyword",d.extentKeywords,1)}function gn(){if(Ir("position",/^at/,0)){var hr=pn();return hr||s("Missing positioning value"),hr}}function pn(){var hr=sn();if(hr.x||hr.y)return{type:"position",value:hr}}function sn(){return{x:Un(),y:Un()}}function Sn(hr){var kr=hr(),Pr=[];if(kr)for(Pr.push(kr);zr(d.comma);)kr=hr(),kr?Pr.push(kr):s("One extra comma");return Pr}function Wn(){var hr=hn();return hr||s("Expected color definition"),hr.length=Un(),hr}function hn(){return un()||_n()||wn()||Ue()}function Ue(){return Ir("literal",d.literalColor,0)}function un(){return Ir("hex",d.hexColor,1)}function wn(){return W(d.rgbColor,function(){return{type:"rgb",value:Sn(kn)}})}function _n(){return W(d.rgbaColor,function(){return{type:"rgba",value:Sn(kn)}})}function kn(){return zr(d.number)[1]}function Un(){return Ir("%",d.percentageValue,1)||Gn()||ar()}function Gn(){return Ir("position-keyword",d.positionKeywords,1)}function ar(){return Ir("px",d.pixelValue,1)||Ir("em",d.emValue,1)}function Ir(hr,kr,Pr){var zi=zr(kr);if(zi)return{type:hr,value:zi[Pr]}}function zr(hr){var kr=/^[\n\r\t\s]+/.exec(v);kr&&qr(kr[0].length);var Pr=hr.exec(v);return Pr&&qr(Pr[0].length),Pr}function qr(hr){v=v.substring(hr)}return function(hr){return v=hr,o()}}();function ro(d,v,s,o){var p=Vt(o.value),C=0,O=0,W=C+v/2,K=O+s/2,ht=Math.abs(v*Math.cos(p))+Math.abs(s*Math.sin(p)),Bt=d[0]+W-Math.cos(p)*ht/2,ne=d[1]+K-Math.sin(p)*ht/2,Se=d[0]+W+Math.cos(p)*ht/2,ze=d[1]+K+Math.sin(p)*ht/2;return{x1:Bt,y1:ne,x2:Se,y2:ze}}function Ns(d,v,s,o,p,C){var O=o.value,W=p.value;o.unit===nr.kPercentage&&(O=o.value/100*v),p.unit===nr.kPercentage&&(W=p.value/100*s);var K=Math.max((0,Q.y)([0,0],[O,W]),(0,Q.y)([0,s],[O,W]),(0,Q.y)([v,s],[O,W]),(0,Q.y)([v,0],[O,W]));return C&&(C instanceof ci?K=C.value:C instanceof Ti&&(C.value==="closest-side"?K=Math.min(O,v-O,W,s-W):C.value==="farthest-side"?K=Math.max(O,v-O,W,s-W):C.value==="closest-corner"&&(K=Math.min((0,Q.y)([0,0],[O,W]),(0,Q.y)([0,s],[O,W]),(0,Q.y)([v,s],[O,W]),(0,Q.y)([v,0],[O,W]))))),{x:O+d[0],y:W+d[1],r:K}}var jo=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,io=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Ps=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Gs=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function ka(d){var v,s=d.length;if(d[s-1].length=(v=d[s-1].length)!==null&&v!==void 0?v:{type:"%",value:"100"},s>1){var o;d[0].length=(o=d[0].length)!==null&&o!==void 0?o:{type:"%",value:"0"}}for(var p=0,C=Number(d[0].length.value),O=1;O<s;O++){var W,K=(W=d[O].length)===null||W===void 0?void 0:W.value;if(!(0,Rt.Z)(K)&&!(0,Rt.Z)(C)){for(var ht=1;ht<O-p;ht++)d[p+ht].length={type:"%",value:"".concat(C+(Number(K)-C)*ht/(O-p))};p=O,C=Number(K)}}}var Us={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},wo=Oi(function(d){var v;return d.type==="angular"?v=Number(d.value):v=Us[d.value]||0,jr(v,"deg")}),ao=Oi(function(d){var v=50,s=50,o="%",p="%";if((d==null?void 0:d.type)==="position"){var C=d.value,O=C.x,W=C.y;(O==null?void 0:O.type)==="position-keyword"&&(O.value==="left"?v=0:O.value==="center"?v=50:O.value==="right"?v=100:O.value==="top"?s=0:O.value==="bottom"&&(s=100)),(W==null?void 0:W.type)==="position-keyword"&&(W.value==="left"?v=0:W.value==="center"?s=50:W.value==="right"?v=100:W.value==="top"?s=0:W.value==="bottom"&&(s=100)),((O==null?void 0:O.type)==="px"||(O==null?void 0:O.type)==="%"||(O==null?void 0:O.type)==="em")&&(o=O==null?void 0:O.type,v=Number(O.value)),((W==null?void 0:W.type)==="px"||(W==null?void 0:W.type)==="%"||(W==null?void 0:W.type)==="em")&&(p=W==null?void 0:W.type,s=Number(W.value))}return{cx:jr(v,o),cy:jr(s,p)}}),so=Oi(function(d){if(d.indexOf("linear")>-1||d.indexOf("radial")>-1){var v=Ws(d);return v.map(function(W){var K=W.type,ht=W.orientation,Bt=W.colorStops;ka(Bt);var ne=Bt.map(function(Sn){return{offset:jr(Number(Sn.length.value),"%"),color:zo(Sn)}});if(K==="linear-gradient")return new rs(ns.LinearGradient,{angle:ht?wo(ht):Ya,steps:ne});if(K==="radial-gradient"&&(ht||(ht=[{type:"shape",value:"circle"}]),ht[0].type==="shape"&&ht[0].value==="circle")){var Se=ao(ht[0].at),ze=Se.cx,We=Se.cy,dn;if(ht[0].style){var gn=ht[0].style,pn=gn.type,sn=gn.value;pn==="extent-keyword"?dn=Cs(sn):dn=jr(sn,pn)}return new rs(ns.RadialGradient,{cx:ze,cy:We,size:dn,steps:ne})}})}var s=d[0];if(d[1]==="("||d[2]==="("){if(s==="l"){var o=jo.exec(d);if(o){var p,C=((p=o[2].match(Gs))===null||p===void 0?void 0:p.map(function(W){return W.split(":")}))||[];return[new rs(ns.LinearGradient,{angle:jr(parseFloat(o[1]),"deg"),steps:C.map(function(W){var K=(0,w.Z)(W,2),ht=K[0],Bt=K[1];return{offset:jr(Number(ht)*100,"%"),color:Bt}})})]}}else if(s==="r"){var O=ga(d);if(O)if((0,Ct.Z)(O))d=O;else return[new rs(ns.RadialGradient,O)]}else if(s==="p")return pa(d)}});function ga(d){var v=io.exec(d);if(v){var s,o=((s=v[4].match(Gs))===null||s===void 0?void 0:s.map(function(p){return p.split(":")}))||[];return{cx:jr(50,"%"),cy:jr(50,"%"),steps:o.map(function(p){var C=(0,w.Z)(p,2),O=C[0],W=C[1];return{offset:jr(Number(O)*100,"%"),color:W}})}}return null}function pa(d){var v=Ps.exec(d);if(v){var s=v[1],o=v[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;case"n":s="no-repeat";break;default:s="no-repeat"}return{image:o,repetition:s}}return null}function Mo(d){return!!d.type&&!!d.value}function Xi(d){return d&&!!d.image}function ks(d){return d&&!(0,Rt.Z)(d.r)&&!(0,Rt.Z)(d.g)&&!(0,Rt.Z)(d.b)}var vs=Oi(function(d){if(Xi(d))return(0,c.Z)({repetition:"repeat"},d);if((0,Rt.Z)(d)&&(d=""),d==="transparent")return Aa;if(d==="currentColor")d="black";else if(d==="none")return Ha;var v=so(d);if(v)return v;var s=$i(d),o=[0,0,0,0];return s!==null&&(o[0]=s.r||0,o[1]=s.g||0,o[2]=s.b||0,o[3]=s.opacity),la.apply(void 0,o)});function Vs(d,v){if(!(!ks(d)||!ks(v)))return[[Number(d.r),Number(d.g),Number(d.b),Number(d.alpha)],[Number(v.r),Number(v.g),Number(v.b),Number(v.alpha)],function(s){var o=s.slice();if(o[3])for(var p=0;p<3;p++)o[p]=Math.round((0,Ht.Z)(o[p],0,255));return o[3]=(0,Ht.Z)(o[3],0,1),"rgba(".concat(o.join(","),")")}]}function Xa(d,v){if((0,Rt.Z)(v))return jr(0,"px");if(v="".concat(v).trim().toLowerCase(),isFinite(Number(v))){if("px".search(d)>=0)return jr(Number(v),"px");if("deg".search(d)>=0)return jr(Number(v),"deg")}var s=[];v=v.replace(d,function(p){return s.push(p),"U".concat(p)});var o="U(".concat(d.source,")");return s.map(function(p){return jr(Number(v.replace(new RegExp("U".concat(p),"g"),"").replace(new RegExp(o,"g"),"*0")),p)})[0]}var Wo=function(v){return Xa(new RegExp("px","g"),v)},Ot=Oi(Wo),X=function(v){return Xa(new RegExp("%","g"),v)};Oi(X);var st=function(v){return(0,gt.Z)(v)||isFinite(Number(v))?jr(Number(v)||0,"px"):Xa(new RegExp("px|%|em|rem","g"),v)},xt=Oi(st),jt=function(v){return Xa(new RegExp("deg|rad|grad|turn","g"),v)},$t=Oi(jt);function ee(d,v,s,o){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,C="",O=d.value||0,W=v.value||0,K=Pa(d.unit),ht=d.convertTo(K),Bt=v.convertTo(K);return ht&&Bt?(O=ht.value,W=Bt.value,C=ds(d.unit)):(ci.isLength(d.unit)||ci.isLength(v.unit))&&(O=Je(d,p,s),W=Je(v,p,s),C="px"),[O,W,function(ne){return o&&(ne=Math.max(ne,0)),ne+C}]}function De(d){var v=0;return d.unit===nr.kDegrees?v=d.value:d.unit===nr.kRadians?v=ge(Number(d.value)):d.unit===nr.kTurns?v=Qe(Number(d.value)):d.value&&(v=d.value),v}function Fe(d,v){var s;return Array.isArray(d)?s=d.map(function(o){return Number(o)}):(0,Ct.Z)(d)?s=d.split(" ").map(function(o){return Number(o)}):(0,gt.Z)(d)&&(s=[d]),v===2?s.length===1?[s[0],s[0]]:[s[0],s[1]]:v===4?s.length===1?[s[0],s[0],s[0],s[0]]:s.length===2?[s[0],s[1],s[0],s[1]]:s.length===3?[s[0],s[1],s[2],s[1]]:[s[0],s[1],s[2],s[3]]:v==="even"&&s.length%2===1?[].concat((0,z.Z)(s),(0,z.Z)(s)):s}function Je(d,v,s){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(d.unit===nr.kPixels)return Number(d.value);if(d.unit===nr.kPercentage&&s){var p=s.nodeName===ft.GROUP?s.getLocalBounds():s.getGeometryBounds();return(o?p.min[v]:0)+d.value/100*p.halfExtents[v]*2}return 0}var cn=function(v){return Xa(/deg|rad|grad|turn|px|%/g,v)},an=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Tn(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(d=d.toLowerCase().trim(),d==="none")return[];for(var v=/\s*([\w-]+)\(([^)]*)\)/g,s=[],o,p=0;o=v.exec(d);){if(o.index!==p)return[];if(p=o.index+o[0].length,an.indexOf(o[1])>-1&&s.push({name:o[1],params:o[2].split(" ").map(function(C){return cn(C)||vs(C)})}),v.lastIndex===d.length)return s}return[]}function Mn(d){return d.toString()}var Ln=function(v){return typeof v=="number"?jr(v):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(v)?jr(Number(v)):jr(0)},jn=Oi(Ln);Oi(function(d){return(0,Ct.Z)(d)?d.split(" ").map(jn):d.map(jn)});function In(d,v){return[d,v,Mn]}function $n(d,v){return function(s,o){return[s,o,function(p){return Mn((0,Ht.Z)(p,d,v))}]}}function sr(d,v){if(d.length===v.length)return[d,v,function(s){return s}]}function rr(d){return d.parsedStyle.d.totalLength===0&&(d.parsedStyle.d.totalLength=ie(d.parsedStyle.d.absolutePath)),d.parsedStyle.d.totalLength}function dr(d){return d.parsedStyle.points.totalLength===0&&(d.parsedStyle.points.totalLength=(0,si.hE)(d.parsedStyle.points.points)),d.parsedStyle.points.totalLength}function gr(d){for(var v=0;v<d.length;v++){var s=d[v-1],o=d[v],p=o[0];if(p==="M"&&s){var C=s[0],O=[o[1],o[2]],W=void 0;C==="L"||C==="M"?W=[s[1],s[2]]:(C==="C"||C==="A"||C==="Q")&&(W=[s[s.length-2],s[s.length-1]]),W&&Or(O,W)&&(d.splice(v,1),v--)}}}function mr(d){for(var v=!1,s=d.length,o=0;o<s;o++){var p=d[o],C=p[0];if(C==="C"||C==="A"||C==="Q"){v=!0;break}}return v}function _r(d){for(var v=[],s=[],o=[],p=0;p<d.length;p++){var C=d[p],O=C[0];O==="M"?(o.length&&(s.push(o),o=[]),o.push([C[1],C[2]])):O==="Z"?o.length&&(v.push(o),o=[]):o.push([C[1],C[2]])}return o.length>0&&s.push(o),{polygons:v,polylines:s}}function Or(d,v){return d[0]===v[0]&&d[1]===v[1]}function Nr(d,v){for(var s=[],o=[],p=[],C=0;C<d.length;C++){var O=d[C],W=O.currentPoint,K=O.params,ht=O.prePoint,Bt=void 0;switch(O.command){case"Q":Bt=(0,si.x4)(ht[0],ht[1],K[1],K[2],K[3],K[4]);break;case"C":Bt=(0,si.l5)(ht[0],ht[1],K[1],K[2],K[3],K[4],K[5],K[6]);break;case"A":var ne=O.arcParams;Bt=(0,si.vp)(ne.cx,ne.cy,ne.rx,ne.ry,ne.xRotation,ne.startAngle,ne.endAngle);break;default:s.push(W[0]),o.push(W[1]);break}Bt&&(O.box=Bt,s.push(Bt.x,Bt.x+Bt.width),o.push(Bt.y,Bt.y+Bt.height)),v&&(O.command==="L"||O.command==="M")&&O.prePoint&&O.nextPoint&&p.push(O)}s=s.filter(function(Wn){return!Number.isNaN(Wn)&&Wn!==1/0&&Wn!==-1/0}),o=o.filter(function(Wn){return!Number.isNaN(Wn)&&Wn!==1/0&&Wn!==-1/0});var Se=(0,Me.Z)(s),ze=(0,Me.Z)(o),We=(0,T.Z)(s),dn=(0,T.Z)(o);if(p.length===0)return{x:Se,y:ze,width:We-Se,height:dn-ze};for(var gn=0;gn<p.length;gn++){var pn=p[gn],sn=pn.currentPoint,Sn=void 0;sn[0]===Se?(Sn=Zr(pn,v),Se-=Sn.xExtra):sn[0]===We&&(Sn=Zr(pn,v),We+=Sn.xExtra),sn[1]===ze?(Sn=Zr(pn,v),ze-=Sn.yExtra):sn[1]===dn&&(Sn=Zr(pn,v),dn+=Sn.yExtra)}return{x:Se,y:ze,width:We-Se,height:dn-ze}}function Zr(d,v){var s=d.prePoint,o=d.currentPoint,p=d.nextPoint,C=Math.pow(o[0]-s[0],2)+Math.pow(o[1]-s[1],2),O=Math.pow(o[0]-p[0],2)+Math.pow(o[1]-p[1],2),W=Math.pow(s[0]-p[0],2)+Math.pow(s[1]-p[1],2),K=Math.acos((C+O-W)/(2*Math.sqrt(C)*Math.sqrt(O)));if(!K||Math.sin(K)===0||(0,at.Z)(K,0))return{xExtra:0,yExtra:0};var ht=Math.abs(Math.atan2(p[1]-o[1],p[0]-o[0])),Bt=Math.abs(Math.atan2(p[0]-o[0],p[1]-o[1]));ht=ht>Math.PI/2?Math.PI-ht:ht,Bt=Bt>Math.PI/2?Math.PI-Bt:Bt;var ne={xExtra:Math.cos(K/2-ht)*(v/2*(1/Math.sin(K/2)))-v/2||0,yExtra:Math.cos(Bt-K/2)*(v/2*(1/Math.sin(K/2)))-v/2||0};return ne}function Wr(d,v){return[v[0]+(v[0]-d[0]),v[1]+(v[1]-d[1])]}var j=function(v,s){var o=v.x*s.x+v.y*s.y,p=Math.sqrt((Math.pow(v.x,2)+Math.pow(v.y,2))*(Math.pow(s.x,2)+Math.pow(s.y,2))),C=v.x*s.y-v.y*s.x<0?-1:1,O=C*Math.acos(o/p);return O},B=function(v,s,o,p,C,O,W,K){s=Math.abs(s),o=Math.abs(o),p=Jt(p,360);var ht=Vt(p);if(v.x===W.x&&v.y===W.y)return{x:v.x,y:v.y,ellipticalArcAngle:0};if(s===0||o===0)return{x:0,y:0,ellipticalArcAngle:0};var Bt=(v.x-W.x)/2,ne=(v.y-W.y)/2,Se={x:Math.cos(ht)*Bt+Math.sin(ht)*ne,y:-Math.sin(ht)*Bt+Math.cos(ht)*ne},ze=Math.pow(Se.x,2)/Math.pow(s,2)+Math.pow(Se.y,2)/Math.pow(o,2);ze>1&&(s*=Math.sqrt(ze),o*=Math.sqrt(ze));var We=Math.pow(s,2)*Math.pow(o,2)-Math.pow(s,2)*Math.pow(Se.y,2)-Math.pow(o,2)*Math.pow(Se.x,2),dn=Math.pow(s,2)*Math.pow(Se.y,2)+Math.pow(o,2)*Math.pow(Se.x,2),gn=We/dn;gn=gn<0?0:gn;var pn=(C!==O?1:-1)*Math.sqrt(gn),sn={x:pn*(s*Se.y/o),y:pn*(-(o*Se.x)/s)},Sn={x:Math.cos(ht)*sn.x-Math.sin(ht)*sn.y+(v.x+W.x)/2,y:Math.sin(ht)*sn.x+Math.cos(ht)*sn.y+(v.y+W.y)/2},Wn={x:(Se.x-sn.x)/s,y:(Se.y-sn.y)/o},hn=j({x:1,y:0},Wn),Ue={x:(-Se.x-sn.x)/s,y:(-Se.y-sn.y)/o},un=j(Wn,Ue);!O&&un>0?un-=2*Math.PI:O&&un<0&&(un+=2*Math.PI),un%=2*Math.PI;var wn=hn+un*K,_n=s*Math.cos(wn),kn=o*Math.sin(wn),Un={x:Math.cos(ht)*_n-Math.sin(ht)*kn+Sn.x,y:Math.sin(ht)*_n+Math.cos(ht)*kn+Sn.y,ellipticalArcStartAngle:hn,ellipticalArcEndAngle:hn+un,ellipticalArcAngle:wn,ellipticalArcCenter:Sn,resultantRx:s,resultantRy:o};return Un};function P(d){for(var v=[],s=null,o=null,p=null,C=0,O=d.length,W=0;W<O;W++){var K=d[W];o=d[W+1];var ht=K[0],Bt={command:ht,prePoint:s,params:K,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(ht){case"M":p=[K[1],K[2]],C=W;break;case"A":var ne=lt(s,K);Bt.arcParams=ne;break}if(ht==="Z")s=p,o=d[C+1];else{var Se=K.length;s=[K[Se-2],K[Se-1]]}o&&o[0]==="Z"&&(o=d[C],v[C]&&(v[C].prePoint=s)),Bt.currentPoint=s,v[C]&&Or(s,v[C].currentPoint)&&(v[C].prePoint=Bt.prePoint);var ze=o?[o[o.length-2],o[o.length-1]]:null;Bt.nextPoint=ze;var We=Bt.prePoint;if(["L","H","V"].includes(ht))Bt.startTangent=[We[0]-s[0],We[1]-s[1]],Bt.endTangent=[s[0]-We[0],s[1]-We[1]];else if(ht==="Q"){var dn=[K[1],K[2]];Bt.startTangent=[We[0]-dn[0],We[1]-dn[1]],Bt.endTangent=[s[0]-dn[0],s[1]-dn[1]]}else if(ht==="T"){var gn=v[W-1],pn=Wr(gn.currentPoint,We);gn.command==="Q"?(Bt.command="Q",Bt.startTangent=[We[0]-pn[0],We[1]-pn[1]],Bt.endTangent=[s[0]-pn[0],s[1]-pn[1]]):(Bt.command="TL",Bt.startTangent=[We[0]-s[0],We[1]-s[1]],Bt.endTangent=[s[0]-We[0],s[1]-We[1]])}else if(ht==="C"){var sn=[K[1],K[2]],Sn=[K[3],K[4]];Bt.startTangent=[We[0]-sn[0],We[1]-sn[1]],Bt.endTangent=[s[0]-Sn[0],s[1]-Sn[1]],Bt.startTangent[0]===0&&Bt.startTangent[1]===0&&(Bt.startTangent=[sn[0]-Sn[0],sn[1]-Sn[1]]),Bt.endTangent[0]===0&&Bt.endTangent[1]===0&&(Bt.endTangent=[Sn[0]-sn[0],Sn[1]-sn[1]])}else if(ht==="S"){var Wn=v[W-1],hn=Wr(Wn.currentPoint,We),Ue=[K[1],K[2]];Wn.command==="C"?(Bt.command="C",Bt.startTangent=[We[0]-hn[0],We[1]-hn[1]],Bt.endTangent=[s[0]-Ue[0],s[1]-Ue[1]]):(Bt.command="SQ",Bt.startTangent=[We[0]-Ue[0],We[1]-Ue[1]],Bt.endTangent=[s[0]-Ue[0],s[1]-Ue[1]])}else if(ht==="A"){var un=k(Bt,0),wn=un.x,_n=un.y,kn=k(Bt,1,!1),Un=kn.x,Gn=kn.y;Bt.startTangent=[wn,_n],Bt.endTangent=[Un,Gn]}v.push(Bt)}return v}function k(d,v){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=d.arcParams,p=o.rx,C=p===void 0?0:p,O=o.ry,W=O===void 0?0:O,K=o.xRotation,ht=o.arcFlag,Bt=o.sweepFlag,ne=B({x:d.prePoint[0],y:d.prePoint[1]},C,W,K,!!ht,!!Bt,{x:d.currentPoint[0],y:d.currentPoint[1]},v),Se=B({x:d.prePoint[0],y:d.prePoint[1]},C,W,K,!!ht,!!Bt,{x:d.currentPoint[0],y:d.currentPoint[1]},s?v+.005:v-.005),ze=Se.x-ne.x,We=Se.y-ne.y,dn=Math.sqrt(ze*ze+We*We);return{x:-ze/dn,y:-We/dn}}function U(d){return Math.sqrt(d[0]*d[0]+d[1]*d[1])}function rt(d,v){return U(d)*U(v)?(d[0]*v[0]+d[1]*v[1])/(U(d)*U(v)):1}function ct(d,v){return(d[0]*v[1]<d[1]*v[0]?-1:1)*Math.acos(rt(d,v))}function lt(d,v){var s=v[1],o=v[2],p=Jt(Vt(v[3]),Math.PI*2),C=v[4],O=v[5],W=d[0],K=d[1],ht=v[6],Bt=v[7],ne=Math.cos(p)*(W-ht)/2+Math.sin(p)*(K-Bt)/2,Se=-1*Math.sin(p)*(W-ht)/2+Math.cos(p)*(K-Bt)/2,ze=ne*ne/(s*s)+Se*Se/(o*o);ze>1&&(s*=Math.sqrt(ze),o*=Math.sqrt(ze));var We=s*s*(Se*Se)+o*o*(ne*ne),dn=We?Math.sqrt((s*s*(o*o)-We)/We):1;C===O&&(dn*=-1),isNaN(dn)&&(dn=0);var gn=o?dn*s*Se/o:0,pn=s?dn*-o*ne/s:0,sn=(W+ht)/2+Math.cos(p)*gn-Math.sin(p)*pn,Sn=(K+Bt)/2+Math.sin(p)*gn+Math.cos(p)*pn,Wn=[(ne-gn)/s,(Se-pn)/o],hn=[(-1*ne-gn)/s,(-1*Se-pn)/o],Ue=ct([1,0],Wn),un=ct(Wn,hn);return rt(Wn,hn)<=-1&&(un=Math.PI),rt(Wn,hn)>=1&&(un=0),O===0&&un>0&&(un-=2*Math.PI),O===1&&un<0&&(un+=2*Math.PI),{cx:sn,cy:Sn,rx:Or(d,[ht,Bt])?0:s,ry:Or(d,[ht,Bt])?0:o,startAngle:Ue,endAngle:Ue+un,xRotation:p,arcFlag:C,sweepFlag:O}}function mt(d,v,s){return d.reduce(function(o,p){var C="";if(p[0]==="M"||p[0]==="L"){var O=vec3.fromValues(p[1],p[2],0);s&&vec3.transformMat4(O,O,s),C="".concat(p[0]).concat(O[0],",").concat(O[1])}else if(p[0]==="Z")C=p[0];else if(p[0]==="C"){var W=vec3.fromValues(p[1],p[2],0),K=vec3.fromValues(p[3],p[4],0),ht=vec3.fromValues(p[5],p[6],0);s&&(vec3.transformMat4(W,W,s),vec3.transformMat4(K,K,s),vec3.transformMat4(ht,ht,s)),C="".concat(p[0]).concat(W[0],",").concat(W[1],",").concat(K[0],",").concat(K[1],",").concat(ht[0],",").concat(ht[1])}else if(p[0]==="A"){var Bt=vec3.fromValues(p[6],p[7],0);s&&vec3.transformMat4(Bt,Bt,s),C="".concat(p[0]).concat(p[1],",").concat(p[2],",").concat(p[3],",").concat(p[4],",").concat(p[5],",").concat(Bt[0],",").concat(Bt[1])}else if(p[0]==="Q"){var ne=vec3.fromValues(p[1],p[2],0),Se=vec3.fromValues(p[3],p[4],0);s&&(vec3.transformMat4(ne,ne,s),vec3.transformMat4(Se,Se,s)),C="".concat(p[0]).concat(p[1],",").concat(p[2],",").concat(p[3],",").concat(p[4],"}")}return o+=C},"")}function Ft(d,v,s,o){return[["M",d,v],["L",s,o]]}function ae(d,v,s,o){var p=(-1+Math.sqrt(2))/3*4,C=d*p,O=v*p,W=s-d,K=s+d,ht=o-v,Bt=o+v;return[["M",W,o],["C",W,o-O,s-C,ht,s,ht],["C",s+C,ht,K,o-O,K,o],["C",K,o+O,s+C,Bt,s,Bt],["C",s-C,Bt,W,o+O,W,o],["Z"]]}function me(d,v){var s=d.map(function(o,p){return[p===0?"M":"L",o[0],o[1]]});return v&&s.push(["Z"]),s}function Oe(d,v,s,o,p){if(p){var C=_slicedToArray(p,4),O=C[0],W=C[1],K=C[2],ht=C[3],Bt=d>0?1:-1,ne=v>0?1:-1,Se=Bt+ne!==0?1:0;return[["M",Bt*O+s,o],["L",d-Bt*W+s,o],W?["A",W,W,0,0,Se,d+s,ne*W+o]:null,["L",d+s,v-ne*K+o],K?["A",K,K,0,0,Se,d+s-Bt*K,v+o]:null,["L",s+Bt*ht,v+o],ht?["A",ht,ht,0,0,Se,s,v+o-ne*ht]:null,["L",s,ne*O+o],O?["A",O,O,0,0,Se,Bt*O+s,o]:null,["Z"]].filter(function(ze){return ze})}return[["M",s,o],["L",s+d,o],["L",s+d,o+v],["L",s,o+v],["Z"]]}function _e(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.getLocalTransform(),s=[];switch(d.nodeName){case ft.LINE:var o=d.parsedStyle,p=o.x1,C=p===void 0?0:p,O=o.y1,W=O===void 0?0:O,K=o.x2,ht=K===void 0?0:K,Bt=o.y2,ne=Bt===void 0?0:Bt;s=Ft(C,W,ht,ne);break;case ft.CIRCLE:{var Se=d.parsedStyle,ze=Se.r,We=ze===void 0?0:ze,dn=Se.cx,gn=dn===void 0?0:dn,pn=Se.cy,sn=pn===void 0?0:pn;s=ae(We,We,gn,sn);break}case ft.ELLIPSE:{var Sn=d.parsedStyle,Wn=Sn.rx,hn=Wn===void 0?0:Wn,Ue=Sn.ry,un=Ue===void 0?0:Ue,wn=Sn.cx,_n=wn===void 0?0:wn,kn=Sn.cy,Un=kn===void 0?0:kn;s=ae(hn,un,_n,Un);break}case ft.POLYLINE:case ft.POLYGON:var Gn=d.parsedStyle.points;s=me(Gn.points,d.nodeName===ft.POLYGON);break;case ft.RECT:var ar=d.parsedStyle,Ir=ar.width,zr=Ir===void 0?0:Ir,qr=ar.height,hr=qr===void 0?0:qr,kr=ar.x,Pr=kr===void 0?0:kr,zi=ar.y,Qi=zi===void 0?0:zi,ls=ar.radius,ac=ls&&ls.some(function(rl){return rl!==0});s=Oe(zr,hr,Pr,Qi,ac&&ls.map(function(rl){return clamp(rl,0,Math.min(Math.abs(zr)/2,Math.abs(hr)/2))}));break;case ft.PATH:var nl=d.parsedStyle.d.absolutePath;s=_toConsumableArray(nl);break}if(s.length)return mt(s,d,v)}function Ye(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,C=d.map(function(O,W){var K=O[0],ht=d[W+1],Bt=W===0&&(v!==0||s!==0),ne=(W===d.length-1||ht&&(ht[0]==="M"||ht[0]==="Z"))&&o!==0&&p!==0,Se=Bt?[v,s]:[0,0],ze=_slicedToArray(Se,2),We=ze[0],dn=ze[1],gn=ne?[o,p]:[0,0],pn=_slicedToArray(gn,2),sn=pn[0],Sn=pn[1];switch(K){case"M":return"M ".concat(O[1]+We,",").concat(O[2]+dn);case"L":return"L ".concat(O[1]+sn,",").concat(O[2]+Sn);case"Q":return"Q ".concat(O[1]," ").concat(O[2],",").concat(O[3]+sn," ").concat(O[4]+Sn);case"C":return"C ".concat(O[1]," ").concat(O[2],",").concat(O[3]," ").concat(O[4],",").concat(O[5]+sn," ").concat(O[6]+Sn);case"A":return"A ".concat(O[1]," ").concat(O[2]," ").concat(O[3]," ").concat(O[4]," ").concat(O[5]," ").concat(O[6]," ").concat(O[7]).concat(ne?" L ".concat(O[6]+o,",").concat(O[7]+p):"");case"Z":return"Z";default:return null}}).filter(function(O){return O!==null}).join(" ");return~C.indexOf("NaN")?"":C}var mn=function(v){if(v===""||Array.isArray(v)&&v.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var s;try{s=le(v)}catch(ze){s=le(""),console.error("[g]: Invalid SVG Path definition: ".concat(v))}gr(s);var o=mr(s),p=_r(s),C=p.polygons,O=p.polylines,W=P(s),K=Nr(W,0),ht=K.x,Bt=K.y,ne=K.width,Se=K.height;return{absolutePath:s,hasArc:o,segments:W,polygons:C,polylines:O,totalLength:0,rect:{x:Number.isFinite(ht)?ht:0,y:Number.isFinite(Bt)?Bt:0,width:Number.isFinite(ne)?ne:0,height:Number.isFinite(Se)?Se:0}}},bn=Oi(mn);function Cn(d){return(0,Ct.Z)(d)?bn(d):mn(d)}function Bn(d,v,s){var o=d.curve,p=v.curve;(!o||o.length===0)&&(o=Xt(d.absolutePath,!1),d.curve=o),(!p||p.length===0)&&(p=Xt(v.absolutePath,!1),v.curve=p);var C=[o,p];o.length!==p.length&&(C=qt(o,p));var O=ke(C[0])!==ke(C[1])?He(C[0]):Ve(C[0]);return[O,On(C[1],O),function(W){return W}]}function Fn(d,v){var s;return(0,Ct.Z)(d)?s=d.split(" ").map(function(o){var p=o.split(","),C=(0,w.Z)(p,2),O=C[0],W=C[1];return[Number(O),Number(W)]}):s=d,{points:s,totalLength:0,segments:[]}}function Qn(d,v){return[d.points,v.points,function(s){return s}]}var Vn=null,ir=/\s*(\w+)\(([^)]*)\)/g;function or(d){return function(v){var s=0;return d.map(function(o){return o===Vn?v[s++]:o})}}function pr(d){return d}var Dr={matrix:["NNNNNN",[Vn,Vn,0,0,Vn,Vn,0,0,0,0,1,0,Vn,Vn,0,1],pr],matrix3d:["NNNNNNNNNNNNNNNN",pr],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",or([Vn,Vn,new ci(1)]),pr],scaleX:["N",or([Vn,new ci(1),new ci(1)]),or([Vn,new ci(1)])],scaleY:["N",or([new ci(1),Vn,new ci(1)]),or([new ci(1),Vn])],scaleZ:["N",or([new ci(1),new ci(1),Vn])],scale3d:["NNN",pr],skew:["Aa",null,pr],skewX:["A",null,or([Vn,Ya])],skewY:["A",null,or([Ya,Vn])],translate:["Tt",or([Vn,Vn,Hi]),pr],translateX:["T",or([Vn,Hi,Hi]),or([Vn,Hi])],translateY:["T",or([Hi,Vn,Hi]),or([Hi,Vn])],translateZ:["L",or([Hi,Hi,Vn])],translate3d:["TTL",pr]};function li(d){for(var v=[],s=d.length,o=0;o<s;o++){var p=d[o],C=p[0],O=p.slice(1);C==="translate"||C==="skew"?O.length===1&&O.push(0):C==="scale"&&O.length===1&&O.push(O[0]);var W=Dr[C];if(!W)return[];var K=O.map(function(ht){return jr(ht)});v.push({t:C,d:K})}return v}function ui(d){if(Array.isArray(d))return li(d);if(d=(d||"none").trim(),d==="none")return[];var v=[],s,o=0;for(ir.lastIndex=0;s=ir.exec(d);){if(s.index!==o)return[];o=s.index+s[0].length;var p=s[1],C=Dr[p];if(!C)return[];var O=s[2].split(","),W=C[0];if(W.length<O.length)return[];for(var K=[],ht=0;ht<W.length;ht++){var Bt=O[ht],ne=W[ht],Se=void 0;if(Bt?Se={A:function(We){return We.trim()==="0"?Ya:$t(We)},N:jn,T:xt,L:Ot}[ne.toUpperCase()](Bt):Se={a:Ya,n:K[0],t:Hi}[ne],Se===void 0)return[];K.push(Se)}if(v.push({t:p,d:K}),ir.lastIndex===d.length)return v}return[]}function Hr(d){if(Array.isArray(d))return li(d);if(d=(d||"none").trim(),d==="none")return[];var v=[],s,o=0;for(ir.lastIndex=0;s=ir.exec(d);){if(s.index!==o)return[];o=s.index+s[0].length;var p=s[1],C=Dr[p];if(!C)return[];var O=s[2].split(","),W=C[0];if(W.length<O.length)return[];for(var K=[],ht=0;ht<W.length;ht++){var Bt=O[ht],ne=W[ht],Se=void 0;if(Bt?Se={A:function(We){return We.trim()==="0"?Ya:jt(We)},N:Ln,T:st,L:Wo}[ne.toUpperCase()](Bt):Se={a:Ya,n:K[0],t:Hi}[ne],Se===void 0)return[];K.push(Se)}if(v.push({t:p,d:K}),ir.lastIndex===d.length)return v}return[]}function wr(d){var v,s,o,p;switch(d.t){case"rotateX":return p=Vt(De(d.d[0])),[1,0,0,0,0,Math.cos(p),Math.sin(p),0,0,-Math.sin(p),Math.cos(p),0,0,0,0,1];case"rotateY":return p=Vt(De(d.d[0])),[Math.cos(p),0,-Math.sin(p),0,0,1,0,0,Math.sin(p),0,Math.cos(p),0,0,0,0,1];case"rotate":case"rotateZ":return p=Vt(De(d.d[0])),[Math.cos(p),Math.sin(p),0,0,-Math.sin(p),Math.cos(p),0,0,0,0,1,0,0,0,0,1];case"rotate3d":v=d.d[0].value,s=d.d[1].value,o=d.d[2].value,p=Vt(De(d.d[3]));var C=v*v+s*s+o*o;if(C===0)v=1,s=0,o=0;else if(C!==1){var O=Math.sqrt(C);v/=O,s/=O,o/=O}var W=Math.sin(p/2),K=W*Math.cos(p/2),ht=W*W;return[1-2*(s*s+o*o)*ht,2*(v*s*ht+o*K),2*(v*o*ht-s*K),0,2*(v*s*ht-o*K),1-2*(v*v+o*o)*ht,2*(s*o*ht+v*K),0,2*(v*o*ht+s*K),2*(s*o*ht-v*K),1-2*(v*v+s*s)*ht,0,0,0,0,1];case"scale":return[d.d[0].value,0,0,0,0,d.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[d.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,d.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,d.d[0].value,0,0,0,0,1];case"scale3d":return[d.d[0].value,0,0,0,0,d.d[1].value,0,0,0,0,d.d[2].value,0,0,0,0,1];case"skew":var Bt=Vt(De(d.d[0])),ne=Vt(De(d.d[1]));return[1,Math.tan(ne),0,0,Math.tan(Bt),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return p=Vt(De(d.d[0])),[1,0,0,0,Math.tan(p),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return p=Vt(De(d.d[0])),[1,Math.tan(p),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return v=Je(d.d[0],0,null)||0,s=Je(d.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,v,s,0,1];case"translateX":return v=Je(d.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,v,0,0,1];case"translateY":return s=Je(d.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,s,0,1];case"translateZ":return o=Je(d.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,o,1];case"translate3d":return v=Je(d.d[0],0,null)||0,s=Je(d.d[1],0,null)||0,o=Je(d.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,v,s,o,1];case"perspective":var Se=Je(d.d[0],0,null)||0,ze=Se?-1/Se:0;return[1,0,0,0,0,1,0,0,0,0,1,ze,0,0,0,1];case"matrix":return[d.d[0].value,d.d[1].value,0,0,d.d[2].value,d.d[3].value,0,0,0,0,1,0,d.d[4].value,d.d[5].value,0,1];case"matrix3d":return d.d.map(function(We){return We.value})}}function Gr(d,v){return[d[0]*v[0]+d[4]*v[1]+d[8]*v[2]+d[12]*v[3],d[1]*v[0]+d[5]*v[1]+d[9]*v[2]+d[13]*v[3],d[2]*v[0]+d[6]*v[1]+d[10]*v[2]+d[14]*v[3],d[3]*v[0]+d[7]*v[1]+d[11]*v[2]+d[15]*v[3],d[0]*v[4]+d[4]*v[5]+d[8]*v[6]+d[12]*v[7],d[1]*v[4]+d[5]*v[5]+d[9]*v[6]+d[13]*v[7],d[2]*v[4]+d[6]*v[5]+d[10]*v[6]+d[14]*v[7],d[3]*v[4]+d[7]*v[5]+d[11]*v[6]+d[15]*v[7],d[0]*v[8]+d[4]*v[9]+d[8]*v[10]+d[12]*v[11],d[1]*v[8]+d[5]*v[9]+d[9]*v[10]+d[13]*v[11],d[2]*v[8]+d[6]*v[9]+d[10]*v[10]+d[14]*v[11],d[3]*v[8]+d[7]*v[9]+d[11]*v[10]+d[15]*v[11],d[0]*v[12]+d[4]*v[13]+d[8]*v[14]+d[12]*v[15],d[1]*v[12]+d[5]*v[13]+d[9]*v[14]+d[13]*v[15],d[2]*v[12]+d[6]*v[13]+d[10]*v[14]+d[14]*v[15],d[3]*v[12]+d[7]*v[13]+d[11]*v[14]+d[15]*v[15]]}function Tr(d){return d.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:d.map(wr).reduce(Gr)}function Xr(d){var v=[0,0,0],s=[1,1,1],o=[0,0,0],p=[0,0,0,1],C=[0,0,0,1];return Yr(Tr(d),v,s,o,p,C),[[v,s,o,C,p]]}var bi=function(){function d(o,p){for(var C=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],O=0;O<4;O++)for(var W=0;W<4;W++)for(var K=0;K<4;K++)C[O][W]+=p[O][K]*o[K][W];return C}function v(o){return o[0][2]===0&&o[0][3]===0&&o[1][2]===0&&o[1][3]===0&&o[2][0]===0&&o[2][1]===0&&o[2][2]===1&&o[2][3]===0&&o[3][2]===0&&o[3][3]===1}function s(o,p,C,O,W){for(var K=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],ht=0;ht<4;ht++)K[ht][3]=W[ht];for(var Bt=0;Bt<3;Bt++)for(var ne=0;ne<3;ne++)K[3][Bt]+=o[ne]*K[ne][Bt];var Se=O[0],ze=O[1],We=O[2],dn=O[3],gn=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];gn[0][0]=1-2*(ze*ze+We*We),gn[0][1]=2*(Se*ze-We*dn),gn[0][2]=2*(Se*We+ze*dn),gn[1][0]=2*(Se*ze+We*dn),gn[1][1]=1-2*(Se*Se+We*We),gn[1][2]=2*(ze*We-Se*dn),gn[2][0]=2*(Se*We-ze*dn),gn[2][1]=2*(ze*We+Se*dn),gn[2][2]=1-2*(Se*Se+ze*ze),K=d(K,gn);var pn=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];C[2]&&(pn[2][1]=C[2],K=d(K,pn)),C[1]&&(pn[2][1]=0,pn[2][0]=C[0],K=d(K,pn)),C[0]&&(pn[2][0]=0,pn[1][0]=C[0],K=d(K,pn));for(var sn=0;sn<3;sn++)for(var Sn=0;Sn<3;Sn++)K[sn][Sn]*=p[sn];return v(K)?[K[0][0],K[0][1],K[1][0],K[1][1],K[3][0],K[3][1]]:K[0].concat(K[1],K[2],K[3])}return s}();function Sr(d){return d.toFixed(6).replace(".000000","")}function oi(d,v){var s,o;return d.decompositionPair!==v&&(d.decompositionPair=v,s=Xr(d)),v.decompositionPair!==d&&(v.decompositionPair=d,o=Xr(v)),s[0]===null||o[0]===null?[[!1],[!0],function(p){return p?v[0].d:d[0].d}]:(s[0].push(0),o[0].push(1),[s,o,function(p){var C=yi(s[0][3],o[0][3],p[5]),O=bi(p[0],p[1],p[2],C,p[4]),W=O.map(Sr).join(",");return W}])}function ii(d,v){for(var s=0,o=0;o<d.length;o++)s+=d[o]*v[o];return s}function yi(d,v,s){var o=ii(d,v);o=(0,Ht.Z)(o,-1,1);var p=[];if(o===1)p=d;else for(var C=Math.acos(o),O=Math.sin(s*C)*1/Math.sqrt(1-o*o),W=0;W<4;W++)p.push(d[W]*(Math.cos(s*C)-o*O)+v[W]*O);return p}function ni(d){return d.replace(/[XY]/,"")}function ai(d){return d.replace(/(X|Y|Z|3d)?$/,"3d")}var Mi=function(v,s){return v==="perspective"&&s==="perspective"||(v==="matrix"||v==="matrix3d")&&(s==="matrix"||s==="matrix3d")};function Oa(d,v,s){var o=!1;if(!d.length||!v.length){d.length||(o=!0,d=v,v=[]);for(var p=function(){var Un=d[C],Gn=Un.t,ar=Un.d,Ir=Gn.substring(0,5)==="scale"?1:0;v.push({t:Gn,d:ar.map(function(zr){return typeof zr=="number"?jr(Ir):jr(Ir,zr.unit)})})},C=0;C<d.length;C++)p()}var O=[],W=[],K=[];if(d.length!==v.length){var ht=oi(d,v);O=[ht[0]],W=[ht[1]],K=[["matrix",[ht[2]]]]}else for(var Bt=0;Bt<d.length;Bt++){var ne=d[Bt].t,Se=v[Bt].t,ze=d[Bt].d,We=v[Bt].d,dn=Dr[ne],gn=Dr[Se],pn=void 0;if(Mi(ne,Se)){var sn=oi([d[Bt]],[v[Bt]]);O.push(sn[0]),W.push(sn[1]),K.push(["matrix",[sn[2]]]);continue}else if(ne===Se)pn=ne;else if(dn[2]&&gn[2]&&ni(ne)===ni(Se))pn=ni(ne),ze=dn[2](ze),We=gn[2](We);else if(dn[1]&&gn[1]&&ai(ne)===ai(Se))pn=ai(ne),ze=dn[1](ze),We=gn[1](We);else{var Sn=oi(d,v);O=[Sn[0]],W=[Sn[1]],K=[["matrix",[Sn[2]]]];break}for(var Wn=[],hn=[],Ue=[],un=0;un<ze.length;un++){var wn=ee(ze[un],We[un],s,!1,un);Wn[un]=wn[0],hn[un]=wn[1],Ue.push(wn[2])}O.push(Wn),W.push(hn),K.push([pn,Ue])}if(o){var _n=O;O=W,W=_n}return[O,W,function(kn){return kn.map(function(Un,Gn){var ar=Un.map(function(Ir,zr){return K[Gn][1][zr](Ir)}).join(",");return K[Gn][0]==="matrix"&&ar.split(",").length===16&&(K[Gn][0]="matrix3d"),K[Gn][0]==="matrix3d"&&ar.split(",").length===6&&(K[Gn][0]="matrix"),"".concat(K[Gn][0],"(").concat(ar,")")}).join(" ")}]}var Fi=Oi(function(d){if((0,Ct.Z)(d)){if(d==="text-anchor")return[jr(0,"px"),jr(0,"px")];var v=d.split(" ");return v.length===1&&(v[0]==="top"||v[0]==="bottom"?(v[1]=v[0],v[0]="center"):v[1]="center"),v.length!==2?null:[xt(gs(v[0])),xt(gs(v[1]))]}return[jr(d[0]||0,"px"),jr(d[1]||0,"px")]});function gs(d){return d==="center"?"50%":d==="left"||d==="top"?"0%":d==="right"||d==="bottom"?"100%":d}var Rs=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:qn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:qn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:qn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:qn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:qn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:qn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:qn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:qn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:qn.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:qn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:qn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:qn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:qn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:qn.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:qn.FILTER},{n:"clipPath",syntax:qn.DEFINED_PATH},{n:"textPath",syntax:qn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:qn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:qn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:qn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:qn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:qn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:qn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:qn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:qn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:qn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:qn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:qn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:qn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:qn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:qn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:qn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:qn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:qn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:qn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:qn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:qn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:qn.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:qn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:qn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:qn.NUMBER,d:function(v){return v===ft.PATH||v===ft.POLYGON||v===ft.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:qn.MARKER},{n:"markerEnd",syntax:qn.MARKER},{n:"markerMid",syntax:qn.MARKER},{n:"markerStartOffset",syntax:qn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:qn.LENGTH,l:!0,int:!0,d:"0"}],ca=new Set(Rs.filter(function(d){return!!d.l}).map(function(d){return d.n})),ma={},Ka=function(){function d(v){var s=this;(0,_.Z)(this,d),this.runtime=v,Rs.forEach(function(o){s.registerMetadata(o)})}return(0,I.Z)(d,[{key:"registerMetadata",value:function(s){[s.n].concat((0,z.Z)(s.a||[])).forEach(function(o){ma[o]=s})}},{key:"getPropertySyntax",value:function(s){return this.runtime.CSSPropertySyntaxFactory[s]}},{key:"processProperties",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(s.attributes,o);var C=s.parsedStyle.clipPath,O=s.parsedStyle.offsetPath;Qa(s,o);var W=!!p.forceUpdateGeometry;if(!W){for(var K in o)if(ca.has(K)){W=!0;break}}var ht=na(s);ht.has("fill")&&o.fill&&(s.parsedStyle.fill=vs(o.fill)),ht.has("stroke")&&o.stroke&&(s.parsedStyle.stroke=vs(o.stroke)),ht.has("shadowColor")&&o.shadowColor&&(s.parsedStyle.shadowColor=vs(o.shadowColor)),ht.has("filter")&&o.filter&&(s.parsedStyle.filter=Tn(o.filter)),ht.has("radius")&&!(0,Rt.Z)(o.radius)&&(s.parsedStyle.radius=Fe(o.radius,4)),ht.has("lineDash")&&!(0,Rt.Z)(o.lineDash)&&(s.parsedStyle.lineDash=Fe(o.lineDash,"even")),ht.has("points")&&o.points&&(s.parsedStyle.points=Fn(o.points)),ht.has("d")&&o.d===""&&(s.parsedStyle.d=(0,c.Z)({},Fs)),ht.has("d")&&o.d&&(s.parsedStyle.d=Cn(o.d)),ht.has("textTransform")&&o.textTransform&&this.runtime.CSSPropertySyntaxFactory[qn.TEXT_TRANSFORM].calculator(null,null,{value:o.textTransform},s,null),ht.has("clipPath")&&!(0,yn.Z)(o.clipPath)&&this.runtime.CSSPropertySyntaxFactory[qn.DEFINED_PATH].calculator("clipPath",C,o.clipPath,s,this.runtime),ht.has("offsetPath")&&o.offsetPath&&this.runtime.CSSPropertySyntaxFactory[qn.DEFINED_PATH].calculator("offsetPath",O,o.offsetPath,s,this.runtime),ht.has("transform")&&o.transform&&(s.parsedStyle.transform=ui(o.transform)),ht.has("transformOrigin")&&o.transformOrigin&&(s.parsedStyle.transformOrigin=Fi(o.transformOrigin)),ht.has("markerStart")&&o.markerStart&&(s.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[qn.MARKER].calculator(null,o.markerStart,o.markerStart,null,null)),ht.has("markerEnd")&&o.markerEnd&&(s.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[qn.MARKER].calculator(null,o.markerEnd,o.markerEnd,null,null)),ht.has("markerMid")&&o.markerMid&&(s.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[qn.MARKER].calculator("",o.markerMid,o.markerMid,null,null)),ht.has("zIndex")&&!(0,Rt.Z)(o.zIndex)&&this.runtime.CSSPropertySyntaxFactory[qn.Z_INDEX].postProcessor(s),ht.has("offsetDistance")&&!(0,Rt.Z)(o.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[qn.OFFSET_DISTANCE].postProcessor(s),ht.has("transform")&&o.transform&&this.runtime.CSSPropertySyntaxFactory[qn.TRANSFORM].postProcessor(s),ht.has("transformOrigin")&&o.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[qn.TRANSFORM_ORIGIN].postProcessor(s),W&&(s.geometry.dirty=!0,s.dirty(!0,!0),p.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(s))}},{key:"updateGeometry",value:function(s){var o=s.nodeName,p=this.runtime.geometryUpdaterFactory[o];if(p){var C=s.geometry;C.contentBounds||(C.contentBounds=new zt),C.renderBounds||(C.renderBounds=new zt);var O=s.parsedStyle,W=p.update(O,s),K=W.cx,ht=K===void 0?0:K,Bt=W.cy,ne=Bt===void 0?0:Bt,Se=W.cz,ze=Se===void 0?0:Se,We=W.hwidth,dn=We===void 0?0:We,gn=W.hheight,pn=gn===void 0?0:gn,sn=W.hdepth,Sn=sn===void 0?0:sn,Wn=[Math.abs(dn),Math.abs(pn),Sn],hn=O.stroke,Ue=O.lineWidth,un=Ue===void 0?1:Ue,wn=O.increasedLineWidthForHitTesting,_n=wn===void 0?0:wn,kn=O.shadowType,Un=kn===void 0?"outer":kn,Gn=O.shadowColor,ar=O.filter,Ir=ar===void 0?[]:ar,zr=O.transformOrigin,qr=[ht,ne,ze];C.contentBounds.update(qr,Wn);var hr=o===ft.POLYLINE||o===ft.POLYGON||o===ft.PATH?Math.SQRT2:.5,kr=hn&&!hn.isNone;if(kr){var Pr=((un||0)+(_n||0))*hr;Wn[0]+=Pr,Wn[1]+=Pr}if(C.renderBounds.update(qr,Wn),Gn&&Un&&Un!=="inner"){var zi=C.renderBounds,Qi=zi.min,ls=zi.max,ac=O.shadowBlur,nl=O.shadowOffsetX,rl=O.shadowOffsetY,Ol=ac||0,qc=nl||0,sc=rl||0,Lh=Qi[0]-Ol+qc,Dh=ls[0]+Ol+qc,Ih=Qi[1]-Ol+sc,Bh=ls[1]+Ol+sc;Qi[0]=Math.min(Qi[0],Lh),ls[0]=Math.max(ls[0],Dh),Qi[1]=Math.min(Qi[1],Ih),ls[1]=Math.max(ls[1],Bh),C.renderBounds.setMinMax(Qi,ls)}Ir.forEach(function(nu){var oc=nu.name,il=nu.params;if(oc==="blur"){var ru=il[0].value;C.renderBounds.update(C.renderBounds.center,A.IH(C.renderBounds.halfExtents,C.renderBounds.halfExtents,[ru,ru,0]))}else if(oc==="drop-shadow"){var al=il[0].value,Tl=il[1].value,Is=il[2].value,fo=C.renderBounds,vo=fo.min,go=fo.max,Zh=vo[0]-Is+al,zh=go[0]+Is+al,jh=vo[1]-Is+Tl,Wh=go[1]+Is+Tl;vo[0]=Math.min(vo[0],Zh),go[0]=Math.max(go[0],zh),vo[1]=Math.min(vo[1],jh),go[1]=Math.max(go[1],Wh),C.renderBounds.setMinMax(vo,go)}}),s.geometry.dirty=!1;var Fh=dn<0,_h=pn<0,tu=(Fh?-1:1)*(zr?Je(zr[0],0,s,!0):0),eu=(_h?-1:1)*(zr?Je(zr[1],1,s,!0):0);(tu||eu)&&s.setOrigin(tu,eu)}}},{key:"updateSizeAttenuation",value:function(s,o){s.style.isSizeAttenuation?(s.style.rawLineWidth||(s.style.rawLineWidth=s.style.lineWidth),s.style.lineWidth=(s.style.rawLineWidth||1)/o,s.nodeName===ft.CIRCLE&&(s.style.rawR||(s.style.rawR=s.style.r),s.style.r=(s.style.rawR||1)/o)):(s.style.rawLineWidth&&(s.style.lineWidth=s.style.rawLineWidth,delete s.style.rawLineWidth),s.nodeName===ft.CIRCLE&&s.style.rawR&&(s.style.r=s.style.rawR,delete s.style.rawR))}}])}();function Qa(d,v){var s=na(d);for(var o in v)s.has(o)&&(d.parsedStyle[o]=v[o])}function na(d){return d.constructor.PARSED_STYLE_LIST}var Ba=function(){function d(){(0,_.Z)(this,d),this.mixer=In}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C){return De(p)}}])}(),Ta=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C,O){return p instanceof Ti&&(p=null),O.sceneGraphService.updateDisplayObjectDependency(s,o,p,C),s==="clipPath"&&C.forEach(function(W){W.childNodes.length===0&&O.sceneGraphService.dirtyToRoot(W)}),p}}])}(),cl=function(){function d(){(0,_.Z)(this,d),this.parser=vs,this.mixer=Vs}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C){return p instanceof Ti?p.value==="none"?Ha:Aa:p}}])}(),So=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p instanceof Ti?[]:p}}])}();function ul(d){var v=d.parsedStyle,s=v.fontSize;return(0,Rt.Z)(s)?null:s}var Ys=function(){function d(){(0,_.Z)(this,d),this.mixer=In}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C,O){if((0,gt.Z)(p))return p;if(ci.isRelativeUnit(p.unit)){if(p.unit===nr.kPercentage)return 0;if(p.unit===nr.kEms){if(C.parentNode){var W=ul(C.parentNode);if(W)return W*=p.value,W}return 0}if(p.unit===nr.kRems){var K;if(C!=null&&(K=C.ownerDocument)!==null&&K!==void 0&&K.documentElement){var ht=ul(C.ownerDocument.documentElement);if(ht)return ht*=p.value,ht}return 0}}else return p.value}}])}(),Go=function(){function d(){(0,_.Z)(this,d),this.mixer=sr}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.map(function(C){return C.value})}}])}(),oo=function(){function d(){(0,_.Z)(this,d),this.mixer=sr}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.map(function(C){return C.value})}}])}(),Ao=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C){var O;p instanceof Ti&&(p=null);var W=(O=p)===null||O===void 0?void 0:O.cloneNode(!0);return W&&(W.style.isMarker=!0),W}}])}(),Oo=function(){function d(){(0,_.Z)(this,d),this.mixer=In}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.value}}])}(),hl=function(){function d(){(0,_.Z)(this,d),this.mixer=$n(0,1)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.value}},{key:"postProcessor",value:function(s){var o=s.parsedStyle,p=o.offsetPath,C=o.offsetDistance;if(p){var O=p.nodeName;if(O===ft.LINE||O===ft.PATH||O===ft.POLYLINE){var W=p.getPoint(C);W&&s.setLocalPosition(W.x,W.y)}}}}])}(),Ls=function(){function d(){(0,_.Z)(this,d),this.mixer=$n(0,1)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.value}}])}(),Ja=function(){function d(){(0,_.Z)(this,d),this.parser=Cn,this.mixer=Bn}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p instanceof Ti&&p.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Mt(0,0,0,0)}:p}}])}(),ps=(0,I.Z)(function d(){(0,_.Z)(this,d),this.mixer=Qn}),$r=function(d){function v(){var s;(0,_.Z)(this,v);for(var o=arguments.length,p=new Array(o),C=0;C<o;C++)p[C]=arguments[C];return s=(0,S.Z)(this,v,[].concat(p)),s.mixer=$n(0,1/0),s}return(0,R.Z)(v,d),(0,I.Z)(v)}(Ys),ra=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C){return p instanceof Ti?p.value==="unset"?"":p.value:"".concat(p)}},{key:"postProcessor",value:function(s){s.nodeValue="".concat(s.parsedStyle.text)||""}}])}(),Ui=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C){var O=C.getAttribute("text");if(O){var W=O;p.value==="capitalize"?W=O.charAt(0).toUpperCase()+O.slice(1):p.value==="lowercase"?W=O.toLowerCase():p.value==="uppercase"&&(W=O.toUpperCase()),C.parsedStyle.text=W}return p.value}}])}(),is=function(v){return Object.fromEntries(Object.entries(v).filter(function(s){var o=_slicedToArray(s,2),p=o[1];return p!==void 0}))},ms=new WeakMap;function dl(d,v,s){if(d){var o=typeof d=="string"?document.getElementById(d):d;ms.has(o)&&ms.get(o).destroy(s),ms.set(o,v)}}var Uo=typeof window!="undefined"&&typeof window.document!="undefined";function Vo(d){return!!d.getAttribute}function lo(d,v){for(var s=0,o=d.length;s<o;){var p=s+o>>>1;Yo(d[p],v)<0?s=p+1:o=p}return s}function Yo(d,v){var s=Number(d.parsedStyle.zIndex||0),o=Number(v.parsedStyle.zIndex||0);if(s===o){var p=d.parentNode;if(p){var C=p.childNodes||[];return C.indexOf(d)-C.indexOf(v)}}return s-o}function co(d){var v=d;do{var s,o=(s=v.parsedStyle)===null||s===void 0?void 0:s.clipPath;if(o)return v;v=v.parentElement}while(v!==null);return null}var _l="px";function _u(d,v,s){Uo&&d.style&&(d.style.width=v+_l,d.style.height=s+_l)}function fc(d,v){if(Uo)return document.defaultView.getComputedStyle(d,null).getPropertyValue(v)}function vc(d){var v=fc(d,"width");return v==="auto"?d.offsetWidth:parseFloat(v)}function fl(d){var v=fc(d,"height");return v==="auto"?d.offsetHeight:parseFloat(v)}var Zu=1,vl={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},To=typeof performance=="object"&&performance.now?performance:Date;function gl(d){return d.nodeName===ft.FRAGMENT?!0:d.getRootNode().nodeName===ft.FRAGMENT}function pl(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",v=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0,o=!1,p=!1,C=!!v&&!v.isNone,O=!!s&&!s.isNone;return d==="visiblepainted"||d==="painted"||d==="auto"?(o=C,p=O):d==="visiblefill"||d==="fill"?o=!0:d==="visiblestroke"||d==="stroke"?p=!0:(d==="visible"||d==="all")&&(o=!0,p=!0),[o,p]}var gc=1,ml=function(){return gc++},as=typeof self=="object"&&self.self===self?self:typeof y.g=="object"&&y.g.global===y.g?y.g:{},pc=Date.now(),yl=function(){return as.performance&&typeof as.performance.now=="function"?as.performance.now():Date.now()-pc},Hs={},ei=Date.now(),zu=function(v){if(typeof v!="function")throw new TypeError("".concat(v," is not a function"));var s=Date.now(),o=s-ei,p=o>16?0:16-o,C=ml();return Hs[C]=v,Object.keys(Hs).length>1||setTimeout(function(){ei=s;var O=Hs;Hs={},Object.keys(O).forEach(function(W){return O[W](yl())})},p),C},mc=function(v){delete Hs[v]},ju=["","webkit","moz","ms","o"],yc=function(v){return typeof v!="string"?zu:v===""?as.requestAnimationFrame:as["".concat(v,"RequestAnimationFrame")]},Wu=function(v){return typeof v!="string"?mc:v===""?as.cancelAnimationFrame:as["".concat(v,"CancelAnimationFrame")]||as["".concat(v,"CancelRequestAnimationFrame")]},Gu=function(v,s){for(var o=0;v[o]!==void 0;){if(s(v[o]))return v[o];o+=1}},bc=Gu(ju,function(d){return!!yc(d)}),Ho=yc(bc),Ec=Wu(bc);as.requestAnimationFrame=Ho,as.cancelAnimationFrame=Ec;var Zl=function(){function d(){(0,_.Z)(this,d),this.callbacks=[]}return(0,I.Z)(d,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(s,o){this.callbacks.push(o)}},{key:"promise",value:function(){for(var s=arguments.length,o=new Array(s),p=0;p<s;p++)o[p]=arguments[p];return Promise.all(this.callbacks.map(function(C){return C.apply(void 0,o)}))}}])}(),Uu=function(){function d(){(0,_.Z)(this,d),this.callbacks=[]}return(0,I.Z)(d,[{key:"tapPromise",value:function(s,o){this.callbacks.push(o)}},{key:"promise",value:function(){var v=(0,_i.Z)((0,Jr.Z)().mark(function o(){var p,C,O,W,K=arguments;return(0,Jr.Z)().wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(!this.callbacks.length){ht.next=6;break}return ht.next=1,(p=this.callbacks)[0].apply(p,K);case 1:C=ht.sent,O=0;case 2:if(!(O<this.callbacks.length-1)){ht.next=5;break}return W=this.callbacks[O],ht.next=3,W(C);case 3:C=ht.sent;case 4:O++,ht.next=2;break;case 5:return ht.abrupt("return",C);case 6:return ht.abrupt("return",null);case 7:case"end":return ht.stop()}},o,this)}));function s(){return v.apply(this,arguments)}return s}()}])}(),Ca=function(){function d(){(0,_.Z)(this,d),this.callbacks=[]}return(0,I.Z)(d,[{key:"tap",value:function(s,o){this.callbacks.push(o)}},{key:"call",value:function(){for(var s=arguments.length,o=new Array(s),p=0;p<s;p++)o[p]=arguments[p];var C=arguments;this.callbacks.forEach(function(O){O.apply(void 0,C)})}}])}(),zl=function(){function d(){(0,_.Z)(this,d),this.callbacks=[]}return(0,I.Z)(d,[{key:"tap",value:function(s,o){this.callbacks.push(o)}},{key:"call",value:function(){for(var s=arguments.length,o=new Array(s),p=0;p<s;p++)o[p]=arguments[p];if(this.callbacks.length){for(var C=arguments,O=this.callbacks[0].apply(void 0,C),W=0;W<this.callbacks.length-1;W++){var K=this.callbacks[W];O=K(O)}return O}return null}}])}(),Vu=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Co=/([\"\'])[^\'\"]+\1/;function xc(d){var v=d.fontSize,s=v===void 0?16:v,o=d.fontFamily,p=o===void 0?"sans-serif":o,C=d.fontStyle,O=C===void 0?"normal":C,W=d.fontVariant,K=W===void 0?"normal":W,ht=d.fontWeight,Bt=ht===void 0?"normal":ht;return{fontSize:s,fontFamily:p,fontStyle:O,fontVariant:K,fontWeight:Bt}}var jl=Oi(function(v){for(var s=xc(v),o=s.fontSize,p=s.fontFamily,C=s.fontStyle,O=s.fontVariant,W=s.fontWeight,K=(0,gt.Z)(o)&&"".concat(o,"px")||"16px",ht=p.split(","),Bt=ht.length-1;Bt>=0;Bt--){var ne=ht[Bt].trim();!Co.test(ne)&&Vu.indexOf(ne)<0&&(ne='"'.concat(ne,'"')),ht[Bt]=ne}return"".concat(C," ").concat(O," ").concat(W," ").concat(K," ").concat(ht.join(","))},function(d){var v=xc(d),s=v.fontSize,o=v.fontFamily,p=v.fontStyle,C=v.fontVariant,O=v.fontWeight;return"".concat(p,"_").concat(C,"_").concat(O,"_").concat(s,"_").concat(o)}),wc=1e-6,bl=function(v){return Math.max(v,wc)};function Mc(d,v,s){return F.identity(d),d[4]=Math.tan(v),d[1]=Math.tan(s),d}var Zi=F.create(),Xo=F.create(),Yu={scale:function(v){F.fromScaling(Zi,[v[0].value,v[1].value,1].map(function(s){return bl(s)}))},scaleX:function(v){F.fromScaling(Zi,[v[0].value,1,1].map(function(s){return bl(s)}))},scaleY:function(v){F.fromScaling(Zi,[1,v[0].value,1].map(function(s){return bl(s)}))},scaleZ:function(v){F.fromScaling(Zi,[1,1,v[0].value].map(function(s){return bl(s)}))},scale3d:function(v){F.fromScaling(Zi,[v[0].value,v[1].value,v[2].value].map(function(s){return bl(s)}))},translate:function(v){F.fromTranslation(Zi,[v[0].value,v[1].value,0])},translateX:function(v){F.fromTranslation(Zi,[v[0].value,0,0])},translateY:function(v){F.fromTranslation(Zi,[0,v[0].value,0])},translateZ:function(v){F.fromTranslation(Zi,[0,0,v[0].value])},translate3d:function(v){F.fromTranslation(Zi,[v[0].value,v[1].value,v[2].value])},rotate:function(v){F.fromZRotation(Zi,Vt(De(v[0])))},rotateX:function(v){F.fromXRotation(Zi,Vt(De(v[0])))},rotateY:function(v){F.fromYRotation(Zi,Vt(De(v[0])))},rotateZ:function(v){F.fromZRotation(Zi,Vt(De(v[0])))},rotate3d:function(v){F.fromRotation(Zi,Vt(De(v[3])),[v[0].value,v[1].value,v[2].value])},skew:function(v){Mc(Zi,Vt(v[0].value),Vt(v[1].value))},skewX:function(v){Mc(Zi,Vt(v[0].value),0)},skewY:function(v){Mc(Zi,0,Vt(v[0].value))},matrix:function(v){F.set(Zi,v[0].value,v[1].value,0,0,v[2].value,v[3].value,0,0,0,0,1,0,v[4].value,v[5].value,0,1)},matrix3d:function(v){F.set.apply(F,[Zi].concat((0,z.Z)(v.map(function(s){return s.value}))))}},Hu=A.al(1,1,1),Sc=A.Ue(),Wl={translate:function(v,s){Jn.sceneGraphService.setLocalScale(v,Hu,!1),Jn.sceneGraphService.setLocalEulerAngles(v,Sc,void 0,void 0,!1),Jn.sceneGraphService.setLocalPosition(v,[s[0].value,s[1].value,0],!1),Jn.sceneGraphService.dirtyLocalTransform(v,v.transformable)}};function Ac(d,v){if(d.length){if(d.length===1&&Wl[d[0].t]){Wl[d[0].t](v,d[0].d);return}for(var s=F.identity(Xo),o=0;o<d.length;o++){var p=d[o],C=p.t,O=p.d,W=Yu[C];W&&(W(O),F.mul(s,s,Zi))}v.setLocalTransform(s)}else v.resetLocalTransform();return v.getLocalTransform()}var Gl=function(){function d(){(0,_.Z)(this,d),this.parser=Hr,this.mixer=Oa}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C){return p instanceof Ti?[]:p}},{key:"postProcessor",value:function(s){Ac(s.parsedStyle.transform,s)}}])}(),Oc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"postProcessor",value:function(s){var o=s.parsedStyle.transformOrigin;o[0].unit===nr.kPixels&&o[1].unit===nr.kPixels?s.setOrigin(o[0].value,o[1].value):s.getGeometryBounds()}}])}(),Tc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,C){return p.value}},{key:"postProcessor",value:function(s){if(s.parentNode){var o=s.parentNode,p=o.renderable,C=o.sortable;p&&o.dirty(),C&&(C.dirty=!0,C.dirtyReason=_a.Z_INDEX_CHANGED)}}}])}(),Xu=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){var p=s.cx,C=p===void 0?0:p,O=s.cy,W=O===void 0?0:O,K=s.r,ht=K===void 0?0:K;return{cx:C,cy:W,hwidth:ht,hheight:ht}}}])}(),Cc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){var p=s.cx,C=p===void 0?0:p,O=s.cy,W=O===void 0?0:O,K=s.rx,ht=K===void 0?0:K,Bt=s.ry,ne=Bt===void 0?0:Bt;return{cx:C,cy:W,hwidth:ht,hheight:ne}}}])}(),Ku=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s){var o=s.x1,p=s.y1,C=s.x2,O=s.y2,W=Math.min(o,C),K=Math.max(o,C),ht=Math.min(p,O),Bt=Math.max(p,O),ne=K-W,Se=Bt-ht,ze=ne/2,We=Se/2;return{cx:W+ze,cy:ht+We,hwidth:ze,hheight:We}}}])}(),Qu=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s){var o=s.d,p=o.rect,C=p.x,O=p.y,W=p.width,K=p.height,ht=W/2,Bt=K/2;return{cx:C+ht,cy:O+Bt,hwidth:ht,hheight:Bt}}}])}(),Nc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s){if(s.points&&(0,lr.Z)(s.points.points)){var o=s.points.points,p=Math.min.apply(Math,(0,z.Z)(o.map(function(Se){return Se[0]}))),C=Math.max.apply(Math,(0,z.Z)(o.map(function(Se){return Se[0]}))),O=Math.min.apply(Math,(0,z.Z)(o.map(function(Se){return Se[1]}))),W=Math.max.apply(Math,(0,z.Z)(o.map(function(Se){return Se[1]}))),K=C-p,ht=W-O,Bt=K/2,ne=ht/2;return{cx:p+Bt,cy:O+ne,hwidth:Bt,hheight:ne}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),Pc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){var p=s.x,C=p===void 0?0:p,O=s.y,W=O===void 0?0:O,K=s.src,ht=s.width,Bt=ht===void 0?0:ht,ne=s.height,Se=ne===void 0?0:ne,ze=Bt,We=Se;return K&&!(0,Ct.Z)(K)&&(ze||(ze=K.width,s.width=ze),We||(We=K.height,s.height=We)),{cx:C+ze/2,cy:W+We/2,hwidth:ze/2,hheight:We/2}}}])}(),Ju=function(){function d(v){(0,_.Z)(this,d),this.globalRuntime=v}return(0,I.Z)(d,[{key:"isReadyToMeasure",value:function(s,o){var p=s.text;return p}},{key:"update",value:function(s,o){var p,C=s.text,O=s.textAlign,W=O===void 0?"start":O,K=s.lineWidth,ht=K===void 0?1:K,Bt=s.textBaseline,ne=Bt===void 0?"alphabetic":Bt,Se=s.dx,ze=Se===void 0?0:Se,We=s.dy,dn=We===void 0?0:We,gn=s.x,pn=gn===void 0?0:gn,sn=s.y,Sn=sn===void 0?0:sn;if(!this.isReadyToMeasure(s,o))return s.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var Wn=(o==null||(p=o.ownerDocument)===null||p===void 0||(p=p.defaultView)===null||p===void 0?void 0:p.getConfig())||{},hn=Wn.offscreenCanvas,Ue=this.globalRuntime.textService.measureText(C,s,hn);s.metrics=Ue;var un=Ue.width,wn=Ue.height,_n=un/2,kn=wn/2,Un=pn+_n;W==="center"||W==="middle"?Un+=ht/2-_n:(W==="right"||W==="end")&&(Un+=ht-_n*2);var Gn=Sn-kn;return ne==="middle"?Gn+=kn:ne==="top"||ne==="hanging"?Gn+=kn*2:ne==="alphabetic"||(ne==="bottom"||ne==="ideographic")&&(Gn+=0),ze&&(Un+=ze),dn&&(Gn+=dn),{cx:Un,cy:Gn,hwidth:_n,hheight:kn}}}])}(),Ul=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),$u=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){var p=s.x,C=p===void 0?0:p,O=s.y,W=O===void 0?0:O,K=s.width,ht=K===void 0?0:K,Bt=s.height,ne=Bt===void 0?0:Bt;return{cx:C+ht/2,cy:W+ne/2,hwidth:ht/2,hheight:ne/2}}}])}();function kc(d){return!!d.type}var El=function(){function d(v){(0,_.Z)(this,d),this.eventPhase=d.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new nt,this.page=new nt,this.canvas=new nt,this.viewport=new nt,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=v}return(0,I.Z)(d,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Wt)}}])}(),Vl=function(d){function v(){var s;(0,_.Z)(this,v);for(var o=arguments.length,p=new Array(o),C=0;C<o;C++)p[C]=arguments[C];return s=(0,S.Z)(this,v,[].concat(p)),s.client=new nt,s.movement=new nt,s.offset=new nt,s.global=new nt,s.screen=new nt,s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(o){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(o)}},{key:"initMouseEvent",value:function(){throw new Error(Wt)}}])}(El),xl=function(d){function v(){var s;(0,_.Z)(this,v);for(var o=arguments.length,p=new Array(o),C=0;C<o;C++)p[C]=arguments[C];return s=(0,S.Z)(this,v,[].concat(p)),s.width=0,s.height=0,s.isPrimary=!1,s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"getCoalescedEvents",value:function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(Vl),Yl=function(d){function v(){return(0,_.Z)(this,v),(0,S.Z)(this,v,arguments)}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(Vl),ya=function(d){function v(s,o){var p;return(0,_.Z)(this,v),p=(0,S.Z)(this,v,[null]),p.type=s,p.detail=o,Object.assign(p,o),p}return(0,R.Z)(v,d),(0,I.Z)(v)}(El),Rc=function(){function d(){(0,_.Z)(this,d),this.emitter=new D}return(0,I.Z)(d,[{key:"on",value:function(s,o,p){return this.addEventListener(s,o,p),this}},{key:"addEventListener",value:function(s,o,p){var C=!1,O=!1;if((0,Zn.Z)(p))C=p;else if(p){var W=p.capture;C=W===void 0?!1:W;var K=p.once;O=K===void 0?!1:K}C&&(s+="capture"),o=(0,Yn.Z)(o)?o:o.handleEvent;var ht=(0,Yn.Z)(o)?void 0:o;return O?this.emitter.once(s,o,ht):this.emitter.on(s,o,ht),this}},{key:"off",value:function(s,o,p){return s?this.removeEventListener(s,o,p):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var s;(s=this.emitter)===null||s===void 0||s.removeAllListeners()}},{key:"removeEventListener",value:function(s,o,p){var C;if(!this.emitter)return this;var O=(0,Zn.Z)(p)?p:p==null?void 0:p.capture;O&&(s+="capture"),o=(0,Yn.Z)(o)?o:(C=o)===null||C===void 0?void 0:C.handleEvent;var W=(0,Yn.Z)(o)?void 0:o;return this.emitter.off(s,o,W),this}},{key:"emit",value:function(s,o){this.dispatchEvent(new ya(s,o))}},{key:"dispatchEventToSelf",value:function(s){s.target||(s.target=this),s.currentTarget=this,this.emitter.emit(s.type,s)}},{key:"dispatchEvent",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=arguments.length>2?arguments[2]:void 0;if(p)return this.dispatchEventToSelf(s),!0;var C;if(this.document)C=this;else if(this.defaultView)C=this.defaultView;else{var O;C=(O=this.ownerDocument)===null||O===void 0?void 0:O.defaultView}if(C){if(s.manager=C.getEventService(),!s.manager)return!1;s.defaultPrevented=!1,s.path?s.path.length=0:s.page=[],o||(s.target=this),s.manager.dispatchEvent(s,s.type,o)}else this.dispatchEventToSelf(s);return!s.defaultPrevented}}])}(),ki=function(d){function v(){var s;(0,_.Z)(this,v);for(var o=arguments.length,p=new Array(o),C=0;C<o;C++)p[C]=arguments[C];return s=(0,S.Z)(this,v,[].concat(p)),s.shadow=!1,s.ownerDocument=null,s.isConnected=!1,s.baseURI="",s.childNodes=[],s.nodeType=0,s.nodeName="",s.nodeValue=null,s.parentNode=null,s.destroyed=!1,s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"textContent",get:function(){var o="";this.nodeName===ft.TEXT&&(o+=this.style.text);var p=(0,Yi.Z)(this.childNodes),C;try{for(p.s();!(C=p.n()).done;){var O=C.value;O.nodeName===ft.TEXT?o+=O.nodeValue:o+=O.textContent}}catch(W){p.e(W)}finally{p.f()}return o},set:function(o){var p=this;this.childNodes.slice().forEach(function(C){p.removeChild(C)}),this.nodeName===ft.TEXT&&(this.style.text="".concat(o))}},{key:"getRootNode",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(o):o.composed&&this.host?this.host.getRootNode(o):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(o){throw new Error(Wt)}},{key:"lookupNamespaceURI",value:function(o){throw new Error(Wt)}},{key:"lookupPrefix",value:function(o){throw new Error(Wt)}},{key:"normalize",value:function(){throw new Error(Wt)}},{key:"isEqualNode",value:function(o){return this===o}},{key:"isSameNode",value:function(o){return this.isEqualNode(o)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(o){if(o===this)return 0;for(var p=o,C=this,O=[p],W=[C];(K=p.parentNode)!==null&&K!==void 0?K:C.parentNode;){var K;p=p.parentNode?(O.push(p.parentNode),p.parentNode):p,C=C.parentNode?(W.push(C.parentNode),C.parentNode):C}if(p!==C)return v.DOCUMENT_POSITION_DISCONNECTED|v.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|v.DOCUMENT_POSITION_PRECEDING;var ht=O.length>W.length?O:W,Bt=ht===O?W:O;if(ht[ht.length-Bt.length]===Bt[0])return ht===O?v.DOCUMENT_POSITION_CONTAINED_BY|v.DOCUMENT_POSITION_FOLLOWING:v.DOCUMENT_POSITION_CONTAINS|v.DOCUMENT_POSITION_PRECEDING;for(var ne=ht.length-Bt.length,Se=Bt.length-1;Se>=0;Se--){var ze=Bt[Se],We=ht[ne+Se];if(We!==ze){var dn=ze.parentNode.childNodes;return dn.indexOf(ze)<dn.indexOf(We)?Bt===O?v.DOCUMENT_POSITION_PRECEDING:v.DOCUMENT_POSITION_FOLLOWING:ht===O?v.DOCUMENT_POSITION_PRECEDING:v.DOCUMENT_POSITION_FOLLOWING}}return v.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(o){return this.contains(o)}},{key:"contains",value:function(o){for(var p=o;p&&this!==p;)p=p.parentNode;return!!p}},{key:"getAncestor",value:function(o){for(var p=this;o>0&&p;)p=p.parentNode,o--;return p}},{key:"forEach",value:function(o){for(var p=[this];p.length>0;){var C=p.pop(),O=o(C);if(O===!1)break;for(var W=C.childNodes.length-1;W>=0;W--)p.push(C.childNodes[W])}}}],[{key:"isNode",value:function(o){return!!o.childNodes}}])}(Rc);ki.DOCUMENT_POSITION_DISCONNECTED=1,ki.DOCUMENT_POSITION_PRECEDING=2,ki.DOCUMENT_POSITION_FOLLOWING=4,ki.DOCUMENT_POSITION_CONTAINS=8,ki.DOCUMENT_POSITION_CONTAINED_BY=16,ki.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var qu=2048,th=function(){function d(v,s){var o=this;(0,_.Z)(this,d),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=F.create(),this.tmpVec3=A.Ue(),this.onPointerDown=function(p){var C=o.createPointerEvent(p);if(o.dispatchEvent(C,"pointerdown"),C.pointerType==="touch")o.dispatchEvent(C,"touchstart");else if(C.pointerType==="mouse"||C.pointerType==="pen"){var O=C.button===2;o.dispatchEvent(C,O?"rightdown":"mousedown")}var W=o.trackingData(p.pointerId);W.pressTargetsByButton[p.button]=C.composedPath(),o.freeEvent(C)},this.onPointerUp=function(p){var C=To.now(),O=o.createPointerEvent(p,void 0,void 0,o.context.config.alwaysTriggerPointerEventOnCanvas?o.rootTarget:void 0);if(o.dispatchEvent(O,"pointerup"),O.pointerType==="touch")o.dispatchEvent(O,"touchend");else if(O.pointerType==="mouse"||O.pointerType==="pen"){var W=O.button===2;o.dispatchEvent(O,W?"rightup":"mouseup")}var K=o.trackingData(p.pointerId),ht=o.findMountedTarget(K.pressTargetsByButton[p.button]),Bt=ht;if(ht&&!O.composedPath().includes(ht)){for(var ne=ht;ne&&!O.composedPath().includes(ne);){if(O.currentTarget=ne,o.notifyTarget(O,"pointerupoutside"),O.pointerType==="touch")o.notifyTarget(O,"touchendoutside");else if(O.pointerType==="mouse"||O.pointerType==="pen"){var Se=O.button===2;o.notifyTarget(O,Se?"rightupoutside":"mouseupoutside")}ki.isNode(ne)&&(ne=ne.parentNode)}delete K.pressTargetsByButton[p.button],Bt=ne}if(Bt){var ze,We=o.clonePointerEvent(O,"click");We.target=Bt,We.path=[],K.clicksByButton[p.button]||(K.clicksByButton[p.button]={clickCount:0,target:We.target,timeStamp:C});var dn=o.context.renderingContext.root.ownerDocument.defaultView,gn=K.clicksByButton[p.button];gn.target===We.target&&C-gn.timeStamp<dn.getConfig().dblClickSpeed?++gn.clickCount:gn.clickCount=1,gn.target=We.target,gn.timeStamp=C,We.detail=gn.clickCount,(ze=O.detail)!==null&&ze!==void 0&&ze.preventClick||(!o.context.config.useNativeClickEvent&&(We.pointerType==="mouse"||We.pointerType==="touch")&&o.dispatchEvent(We,"click"),o.dispatchEvent(We,"pointertap")),o.freeEvent(We)}o.freeEvent(O)},this.onPointerMove=function(p){var C=o.createPointerEvent(p,void 0,void 0,o.context.config.alwaysTriggerPointerEventOnCanvas?o.rootTarget:void 0),O=C.pointerType==="mouse"||C.pointerType==="pen",W=o.trackingData(p.pointerId),K=o.findMountedTarget(W.overTargets);if(W.overTargets&&K!==C.target){var ht=p.type==="mousemove"?"mouseout":"pointerout",Bt=o.createPointerEvent(p,ht,K||void 0);if(o.dispatchEvent(Bt,"pointerout"),O&&o.dispatchEvent(Bt,"mouseout"),!C.composedPath().includes(K)){var ne=o.createPointerEvent(p,"pointerleave",K||void 0);for(ne.eventPhase=ne.AT_TARGET;ne.target&&!C.composedPath().includes(ne.target);)ne.currentTarget=ne.target,o.notifyTarget(ne),O&&o.notifyTarget(ne,"mouseleave"),ki.isNode(ne.target)&&(ne.target=ne.target.parentNode);o.freeEvent(ne)}o.freeEvent(Bt)}if(K!==C.target){var Se=p.type==="mousemove"?"mouseover":"pointerover",ze=o.clonePointerEvent(C,Se);o.dispatchEvent(ze,"pointerover"),O&&o.dispatchEvent(ze,"mouseover");for(var We=K&&ki.isNode(K)&&K.parentNode;We&&We!==(ki.isNode(o.rootTarget)&&o.rootTarget.parentNode)&&We!==C.target;)We=We.parentNode;var dn=!We||We===(ki.isNode(o.rootTarget)&&o.rootTarget.parentNode);if(dn){var gn=o.clonePointerEvent(C,"pointerenter");for(gn.eventPhase=gn.AT_TARGET;gn.target&&gn.target!==K&&gn.target!==(ki.isNode(o.rootTarget)&&o.rootTarget.parentNode);)gn.currentTarget=gn.target,o.notifyTarget(gn),O&&o.notifyTarget(gn,"mouseenter"),ki.isNode(gn.target)&&(gn.target=gn.target.parentNode);o.freeEvent(gn)}o.freeEvent(ze)}o.dispatchEvent(C,"pointermove"),C.pointerType==="touch"&&o.dispatchEvent(C,"touchmove"),O&&(o.dispatchEvent(C,"mousemove"),o.cursor=o.getCursor(C.target)),W.overTargets=C.composedPath(),o.freeEvent(C)},this.onPointerOut=function(p){var C=o.trackingData(p.pointerId);if(C.overTargets){var O=p.pointerType==="mouse"||p.pointerType==="pen",W=o.findMountedTarget(C.overTargets),K=o.createPointerEvent(p,"pointerout",W||void 0);o.dispatchEvent(K),O&&o.dispatchEvent(K,"mouseout");var ht=o.createPointerEvent(p,"pointerleave",W||void 0);for(ht.eventPhase=ht.AT_TARGET;ht.target&&ht.target!==(ki.isNode(o.rootTarget)&&o.rootTarget.parentNode);)ht.currentTarget=ht.target,o.notifyTarget(ht),O&&o.notifyTarget(ht,"mouseleave"),ki.isNode(ht.target)&&(ht.target=ht.target.parentNode);C.overTargets=null,o.freeEvent(K),o.freeEvent(ht)}o.cursor=null},this.onPointerOver=function(p){var C=o.trackingData(p.pointerId),O=o.createPointerEvent(p),W=O.pointerType==="mouse"||O.pointerType==="pen";o.dispatchEvent(O,"pointerover"),W&&o.dispatchEvent(O,"mouseover"),O.pointerType==="mouse"&&(o.cursor=o.getCursor(O.target));var K=o.clonePointerEvent(O,"pointerenter");for(K.eventPhase=K.AT_TARGET;K.target&&K.target!==(ki.isNode(o.rootTarget)&&o.rootTarget.parentNode);)K.currentTarget=K.target,o.notifyTarget(K),W&&o.notifyTarget(K,"mouseenter"),ki.isNode(K.target)&&(K.target=K.target.parentNode);C.overTargets=O.composedPath(),o.freeEvent(O),o.freeEvent(K)},this.onPointerUpOutside=function(p){var C=o.trackingData(p.pointerId),O=o.findMountedTarget(C.pressTargetsByButton[p.button]),W=o.createPointerEvent(p);if(O){for(var K=O;K;)W.currentTarget=K,o.notifyTarget(W,"pointerupoutside"),W.pointerType==="touch"||(W.pointerType==="mouse"||W.pointerType==="pen")&&o.notifyTarget(W,W.button===2?"rightupoutside":"mouseupoutside"),ki.isNode(K)&&(K=K.parentNode);delete C.pressTargetsByButton[p.button]}o.freeEvent(W)},this.onWheel=function(p){var C=o.createWheelEvent(p);o.dispatchEvent(C),o.freeEvent(C)},this.onClick=function(p){if(o.context.config.useNativeClickEvent){var C=o.createPointerEvent(p);o.dispatchEvent(C),o.freeEvent(C)}},this.onPointerCancel=function(p){var C=o.createPointerEvent(p,void 0,void 0,o.context.config.alwaysTriggerPointerEventOnCanvas?o.rootTarget:void 0);o.dispatchEvent(C),o.freeEvent(C)},this.globalRuntime=v,this.context=s}return(0,I.Z)(d,[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var s=this.context.contextService.getBoundingClientRect(),o=1,p=1,C=this.context.contextService.getDomElement();if(C&&s){var O=C.offsetWidth,W=C.offsetHeight;O&&W&&(o=s.width/O,p=s.height/W)}return{scaleX:o,scaleY:p,bbox:s}}},{key:"client2Viewport",value:function(s){var o=this.getScale(),p=o.scaleX,C=o.scaleY,O=o.bbox;return new nt((s.x-((O==null?void 0:O.left)||0))/p,(s.y-((O==null?void 0:O.top)||0))/C)}},{key:"viewport2Client",value:function(s){var o=this.getScale(),p=o.scaleX,C=o.scaleY,O=o.bbox;return new nt((s.x+((O==null?void 0:O.left)||0))*p,(s.y+((O==null?void 0:O.top)||0))*C)}},{key:"viewport2Canvas",value:function(s){var o=s.x,p=s.y,C=this.rootTarget.defaultView,O=C.getCamera(),W=this.context.config,K=W.width,ht=W.height,Bt=O.getPerspectiveInverse(),ne=O.getWorldTransform(),Se=F.multiply(this.tmpMatrix,ne,Bt),ze=A.t8(this.tmpVec3,o/K*2-1,(1-p/ht)*2-1,0);return A.fF(ze,ze,Se),new nt(ze[0],ze[1])}},{key:"canvas2Viewport",value:function(s){var o=this.rootTarget.defaultView,p=o.getCamera(),C=p.getPerspective(),O=p.getViewTransform(),W=F.multiply(this.tmpMatrix,C,O),K=A.t8(this.tmpVec3,s.x,s.y,0);A.fF(this.tmpVec3,this.tmpVec3,W);var ht=this.context.config,Bt=ht.width,ne=ht.height;return new nt((K[0]+1)/2*Bt,(1-(K[1]+1)/2)*ne)}},{key:"setPickHandler",value:function(s){this.pickHandler=s}},{key:"addEventMapping",value:function(s,o){this.mappingTable[s]||(this.mappingTable[s]=[]),this.mappingTable[s].push({fn:o,priority:0}),this.mappingTable[s].sort(function(p,C){return p.priority-C.priority})}},{key:"mapEvent",value:function(s){if(this.rootTarget){var o=this.mappingTable[s.type];if(o)for(var p=0,C=o.length;p<C;p++)o[p].fn(s);else console.warn("[EventService]: Event mapping not defined for ".concat(s.type))}}},{key:"dispatchEvent",value:function(s,o,p){if(!p)s.propagationStopped=!1,s.propagationImmediatelyStopped=!1,this.propagate(s,o);else{s.eventPhase=s.AT_TARGET;var C=this.rootTarget.defaultView||null;s.currentTarget=C,this.notifyListeners(s,o)}}},{key:"propagate",value:function(s,o){if(s.target){var p=s.composedPath();s.eventPhase=s.CAPTURING_PHASE;for(var C=p.length-1;C>=1;C--)if(s.currentTarget=p[C],this.notifyTarget(s,o),s.propagationStopped||s.propagationImmediatelyStopped)return;if(s.eventPhase=s.AT_TARGET,s.currentTarget=s.target,this.notifyTarget(s,o),!(s.propagationStopped||s.propagationImmediatelyStopped)){var O=p.indexOf(s.currentTarget);s.eventPhase=s.BUBBLING_PHASE;for(var W=O+1;W<p.length;W++)if(s.currentTarget=p[W],this.notifyTarget(s,o),s.propagationStopped||s.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(s){var o=[s],p=this.rootTarget.defaultView||null;if(p&&p===s)return o.unshift(p.document),o;for(var C=0;C<qu&&s!==this.rootTarget;C++)ki.isNode(s)&&s.parentNode&&(o.push(s.parentNode),s=s.parentNode);return p&&o.push(p),o}},{key:"hitTest",value:function(s){var o=s.viewportX,p=s.viewportY,C=this.context.config,O=C.width,W=C.height,K=C.disableHitTesting;return o<0||p<0||o>O||p>W?null:!K&&this.pickHandler(s)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(s,o){var p,C=o==null?void 0:o.target;if((p=C)!==null&&p!==void 0&&p.shadowRoot&&(C=o.composedPath()[0]),C){if(C===s)return!0;if(s&&s.contains)return s.contains(C)}return o!=null&&o.composedPath?o.composedPath().indexOf(s)>-1:!1}},{key:"getExistedHTML",value:function(s){if(s.nativeEvent.composedPath)for(var o=0,p=s.nativeEvent.composedPath();o<p.length;o++){var C=p[o],O=this.nativeHTMLMap.get(C);if(O)return O}return null}},{key:"pickTarget",value:function(s){return this.hitTest({clientX:s.clientX,clientY:s.clientY,viewportX:s.viewportX,viewportY:s.viewportY,x:s.canvasX,y:s.canvasY})}},{key:"createPointerEvent",value:function(s,o,p,C){var O=this.allocateEvent(xl);this.copyPointerData(s,O),this.copyMouseData(s,O),this.copyData(s,O),O.nativeEvent=s.nativeEvent,O.originalEvent=s;var W=this.getExistedHTML(O),K=this.context.contextService.getDomElement();return O.target=p!=null?p:W||this.isNativeEventFromCanvas(K,O.nativeEvent)&&this.pickTarget(O)||C,typeof o=="string"&&(O.type=o),O}},{key:"createWheelEvent",value:function(s){var o=this.allocateEvent(Yl);this.copyWheelData(s,o),this.copyMouseData(s,o),this.copyData(s,o),o.nativeEvent=s.nativeEvent,o.originalEvent=s;var p=this.getExistedHTML(o),C=this.context.contextService.getDomElement();return o.target=p||this.isNativeEventFromCanvas(C,o.nativeEvent)&&this.pickTarget(o),o}},{key:"trackingData",value:function(s){return this.mappingState.trackingData[s]||(this.mappingState.trackingData[s]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[s]}},{key:"cloneWheelEvent",value:function(s){var o=this.allocateEvent(Yl);return o.nativeEvent=s.nativeEvent,o.originalEvent=s.originalEvent,this.copyWheelData(s,o),this.copyMouseData(s,o),this.copyData(s,o),o.target=s.target,o.path=s.composedPath().slice(),o.type=s.type,o}},{key:"clonePointerEvent",value:function(s,o){var p=this.allocateEvent(xl);return p.nativeEvent=s.nativeEvent,p.originalEvent=s.originalEvent,this.copyPointerData(s,p),this.copyMouseData(s,p),this.copyData(s,p),p.target=s.target,p.path=s.composedPath().slice(),p.type=o!=null?o:p.type,p}},{key:"copyPointerData",value:function(s,o){o.pointerId=s.pointerId,o.width=s.width,o.height=s.height,o.isPrimary=s.isPrimary,o.pointerType=s.pointerType,o.pressure=s.pressure,o.tangentialPressure=s.tangentialPressure,o.tiltX=s.tiltX,o.tiltY=s.tiltY,o.twist=s.twist}},{key:"copyMouseData",value:function(s,o){o.altKey=s.altKey,o.button=s.button,o.buttons=s.buttons,o.ctrlKey=s.ctrlKey,o.metaKey=s.metaKey,o.shiftKey=s.shiftKey,o.client.copyFrom(s.client),o.movement.copyFrom(s.movement),o.canvas.copyFrom(s.canvas),o.screen.copyFrom(s.screen),o.global.copyFrom(s.global),o.offset.copyFrom(s.offset)}},{key:"copyWheelData",value:function(s,o){o.deltaMode=s.deltaMode,o.deltaX=s.deltaX,o.deltaY=s.deltaY,o.deltaZ=s.deltaZ}},{key:"copyData",value:function(s,o){o.isTrusted=s.isTrusted,o.timeStamp=To.now(),o.type=s.type,o.detail=s.detail,o.view=s.view,o.page.copyFrom(s.page),o.viewport.copyFrom(s.viewport)}},{key:"allocateEvent",value:function(s){this.eventPool.has(s)||this.eventPool.set(s,[]);var o=this.eventPool.get(s).pop()||new s(this);return o.eventPhase=o.NONE,o.currentTarget=null,o.path=[],o.target=null,o}},{key:"freeEvent",value:function(s){if(s.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var o=s.constructor;this.eventPool.has(o)||this.eventPool.set(o,[]),this.eventPool.get(o).push(s)}},{key:"notifyTarget",value:function(s,o){o=o!=null?o:s.type;var p=s.eventPhase===s.CAPTURING_PHASE||s.eventPhase===s.AT_TARGET?"".concat(o,"capture"):o;this.notifyListeners(s,p),s.eventPhase===s.AT_TARGET&&this.notifyListeners(s,o)}},{key:"notifyListeners",value:function(s,o){var p=s.currentTarget.emitter,C=p._events[o];if(C)if("fn"in C)C.once&&p.removeListener(o,C.fn,void 0,!0),C.fn.call(s.currentTarget||C.context,s);else for(var O=0;O<C.length&&!s.propagationImmediatelyStopped;O++)C[O].once&&p.removeListener(o,C[O].fn,void 0,!0),C[O].fn.call(s.currentTarget||C[O].context,s)}},{key:"findMountedTarget",value:function(s){if(!s)return null;for(var o=s[s.length-1],p=s.length-2;p>=0;p--){var C=s[p];if(C===this.rootTarget||ki.isNode(C)&&C.parentNode===o)o=s[p];else break}return o}},{key:"getCursor",value:function(s){for(var o=s;o;){var p=Vo(o)&&o.getAttribute("cursor");if(p)return p;o=ki.isNode(o)&&o.parentNode}}}])}(),Lc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"getOrCreateCanvas",value:function(s,o){if(this.canvas)return this.canvas;if(s||Jn.offscreenCanvas)this.canvas=s||Jn.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,c.Z)({willReadFrequently:!0},o));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,c.Z)({willReadFrequently:!0},o)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(p){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,c.Z)({willReadFrequently:!0},o))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(s,o){return this.context?this.context:(this.getOrCreateCanvas(s,o),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(s){}try{return document.createElement("canvas")}catch(s){}return null}}])}(),Ko=function(d){return d[d.CAMERA_CHANGED=0]="CAMERA_CHANGED",d[d.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",d[d.NONE=2]="NONE",d}({}),eh=function(){function d(v,s){(0,_.Z)(this,d),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new Ca,initAsync:new Zl,dirtycheck:new zl,cull:new zl,beginFrame:new Ca,beforeRender:new Ca,render:new Ca,afterRender:new Ca,endFrame:new Ca,destroy:new Ca,pick:new Uu,pickSync:new zl,pointerDown:new Ca,pointerUp:new Ca,pointerMove:new Ca,pointerOut:new Ca,pointerOver:new Ca,pointerWheel:new Ca,pointerCancel:new Ca,click:new Ca},this.globalRuntime=v,this.context=s}return(0,I.Z)(d,[{key:"init",value:function(s){var o=this,p=(0,c.Z)((0,c.Z)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(C){C.apply(p,o.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,s()):this.hooks.initAsync.promise().then(function(){o.inited=!0,s()}).catch(function(C){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var s=this.context.config.renderer,o=s.getConfig(),p=o.enableDirtyRectangleRendering;return!p||this.context.renderingContext.renderReasons.has(Ko.CAMERA_CHANGED)}},{key:"render",value:function(s,o,p){var C=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var O=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(O.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),O.renderReasons.size&&this.inited){O.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var W=O.renderReasons.size===1&&O.renderReasons.has(Ko.CAMERA_CHANGED),K=!s.disableRenderHooks||!W;K&&this.renderDisplayObject(O.root,s,O),this.hooks.beginFrame.call(o),K&&O.renderListCurrentFrame.forEach(function(ht){C.hooks.beforeRender.call(ht),C.hooks.render.call(ht),C.hooks.afterRender.call(ht)}),this.hooks.endFrame.call(o),O.renderListCurrentFrame=[],O.renderReasons.clear(),p()}}},{key:"renderDisplayObject",value:function(s,o,p){var C=this,O=o.renderer.getConfig(),W=O.enableDirtyCheck,K=O.enableCulling;function ht(dn){var gn=dn.renderable,pn=dn.sortable,sn=W?gn.dirty||p.dirtyRectangleRenderingDisabled?dn:null:dn,Sn=null;sn&&(Sn=K?C.hooks.cull.call(sn,C.context.camera):sn,Sn&&(C.stats.rendered+=1,p.renderListCurrentFrame.push(Sn))),dn.dirty(!1),pn.renderOrder=C.zIndexCounter,C.zIndexCounter+=1,C.stats.total+=1,pn.dirty&&(C.sort(dn,pn),pn.dirty=!1,pn.dirtyChildren=[],pn.dirtyReason=void 0)}for(var Bt=[s];Bt.length>0;){var ne,Se=Bt.pop();ht(Se);for(var ze=((ne=Se.sortable)===null||ne===void 0||(ne=ne.sorted)===null||ne===void 0?void 0:ne.length)>0?Se.sortable.sorted:Se.childNodes,We=ze.length-1;We>=0;We--)Bt.push(ze[We])}}},{key:"sort",value:function(s,o){var p,C;(o==null||(p=o.sorted)===null||p===void 0?void 0:p.length)>0&&o.dirtyReason!==_a.Z_INDEX_CHANGED?o.dirtyChildren.forEach(function(O){var W=o.sorted.indexOf(O);W>-1&&o.sorted.splice(W,1);var K=s.childNodes.indexOf(O);if(K>-1)if(o.sorted.length===0)o.sorted.push(O);else{var ht=lo(o.sorted,O);o.sorted.splice(ht,0,O)}}):o.sorted=s.childNodes.slice().sort(Yo),((C=o.sorted)===null||C===void 0?void 0:C.length)>0&&s.childNodes.filter(function(O){return O.parsedStyle.zIndex}).length===0&&(o.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(Ko.DISPLAY_OBJECT_CHANGED)}}])}(),nh=/\[\s*(.*)=(.*)\s*\]/,rh=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"selectOne",value:function(s,o){var p=this;if(s.startsWith("."))return o.find(function(K){return((K==null?void 0:K.classList)||[]).indexOf(p.getIdOrClassname(s))>-1});if(s.startsWith("#"))return o.find(function(K){return K.id===p.getIdOrClassname(s)});if(s.startsWith("[")){var C=this.getAttribute(s),O=C.name,W=C.value;return O?o.find(function(K){return o!==K&&(O==="name"?K.name===W:p.attributeToString(K,O)===W)}):null}return o.find(function(K){return o!==K&&K.nodeName===s})}},{key:"selectAll",value:function(s,o){var p=this;if(s.startsWith("."))return o.findAll(function(K){return o!==K&&((K==null?void 0:K.classList)||[]).indexOf(p.getIdOrClassname(s))>-1});if(s.startsWith("#"))return o.findAll(function(K){return o!==K&&K.id===p.getIdOrClassname(s)});if(s.startsWith("[")){var C=this.getAttribute(s),O=C.name,W=C.value;return O?o.findAll(function(K){return o!==K&&(O==="name"?K.name===W:p.attributeToString(K,O)===W)}):[]}return o.findAll(function(K){return o!==K&&K.nodeName===s})}},{key:"is",value:function(s,o){if(s.startsWith("."))return o.className===this.getIdOrClassname(s);if(s.startsWith("#"))return o.id===this.getIdOrClassname(s);if(s.startsWith("[")){var p=this.getAttribute(s),C=p.name,O=p.value;return C==="name"?o.name===O:this.attributeToString(o,C)===O}return o.nodeName===s}},{key:"getIdOrClassname",value:function(s){return s.substring(1)}},{key:"getAttribute",value:function(s){var o=s.match(nh),p="",C="";return o&&o.length>2&&(p=o[1].replace(/"/g,""),C=o[2].replace(/"/g,"")),{name:p,value:C}}},{key:"attributeToString",value:function(s,o){if(!s.getAttribute)return"";var p=s.getAttribute(o);return(0,Rt.Z)(p)?"":p.toString?p.toString():""}}])}(),Ki=function(d){return d.ATTR_MODIFIED="DOMAttrModified",d.INSERTED="DOMNodeInserted",d.MOUNTED="DOMNodeInsertedIntoDocument",d.REMOVED="removed",d.UNMOUNTED="DOMNodeRemovedFromDocument",d.REPARENT="reparent",d.DESTROY="destroy",d.BOUNDS_CHANGED="bounds-changed",d.CULLED="culled",d}({}),ss=function(d){function v(s,o,p,C,O,W,K,ht){var Bt;return(0,_.Z)(this,v),Bt=(0,S.Z)(this,v,[null]),Bt.relatedNode=o,Bt.prevValue=p,Bt.newValue=C,Bt.attrName=O,Bt.attrChange=W,Bt.prevParsedValue=K,Bt.newParsedValue=ht,Bt.type=s,Bt}return(0,R.Z)(v,d),(0,I.Z)(v)}(El);ss.ADDITION=2,ss.MODIFICATION=1,ss.REMOVAL=3;var ih=new ss(Ki.REPARENT,null,"","","",0,"",""),ah=kt.Ue(),wl=A.Ue(),sh=A.al(1,1,1),oh=F.create(),lh=kt.Ue(),Xs=A.Ue(),ch=F.create(),Ks=G.Ue(),uh=A.Ue(),hh=G.Ue(),dh=A.Ue(),No=A.Ue(),Qs=A.Ue(),Po=F.create(),Dc=G.Ue(),Ic=G.Ue(),Ml=G.Ue(),Sl={affectChildren:!0},Bc=function(){function d(v){(0,_.Z)(this,d),this.pendingEvents=new Map,this.boundsChangedEvent=new ya(Ki.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=v}return(0,I.Z)(d,[{key:"matches",value:function(s,o){return this.runtime.sceneGraphSelector.is(s,o)}},{key:"querySelector",value:function(s,o){return this.runtime.sceneGraphSelector.selectOne(s,o)}},{key:"querySelectorAll",value:function(s,o){return this.runtime.sceneGraphSelector.selectAll(s,o)}},{key:"attach",value:function(s,o,p){var C,O=!1;s.parentNode&&(O=s.parentNode!==o,this.detach(s));var W=s.nodeName===ft.FRAGMENT,K=gl(o);s.parentNode=o;var ht=W?s.childNodes:[s];(0,gt.Z)(p)?ht.forEach(function(dn){o.childNodes.splice(p,0,dn),dn.parentNode=o}):ht.forEach(function(dn){o.childNodes.push(dn),dn.parentNode=o});var Bt=o,ne=Bt.sortable;if((ne!=null&&(C=ne.sorted)!==null&&C!==void 0&&C.length||ne.dirty||s.parsedStyle.zIndex)&&(ne.dirtyChildren.indexOf(s)===-1&&ne.dirtyChildren.push(s),ne.dirty=!0,ne.dirtyReason=_a.ADDED),!K){if(W)this.dirtifyFragment(s);else{var Se=s.transformable;Se&&this.dirtyWorldTransform(s,Se)}if(O){var ze,We=((ze=o.ownerDocument)===null||ze===void 0||(ze=ze.defaultView)===null||ze===void 0||(ze=ze.getConfig())===null||ze===void 0||(ze=ze.future)===null||ze===void 0?void 0:ze.experimentalCancelEventPropagation)===!0;s.dispatchEvent(ih,We,We)}}}},{key:"detach",value:function(s){var o,p;if(s.parentNode){var C=s.transformable,O=s.parentNode,W=O.sortable;(W!=null&&(o=W.sorted)!==null&&o!==void 0&&o.length||(p=s.style)!==null&&p!==void 0&&p.zIndex)&&(W.dirtyChildren.indexOf(s)===-1&&W.dirtyChildren.push(s),W.dirty=!0,W.dirtyReason=_a.REMOVED);var K=s.parentNode.childNodes.indexOf(s);K>-1&&s.parentNode.childNodes.splice(K,1),C&&this.dirtyWorldTransform(s,C),s.parentNode=null}}},{key:"getLocalPosition",value:function(s){return s.transformable.localPosition}},{key:"getLocalRotation",value:function(s){return s.transformable.localRotation}},{key:"getLocalScale",value:function(s){return s.transformable.localScale}},{key:"getLocalSkew",value:function(s){return s.transformable.localSkew}},{key:"getLocalTransform",value:function(s){var o=s.transformable;return us(o),o.localTransform}},{key:"setLocalPosition",value:function(s,o){var p,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,O=s.transformable;No[0]=o[0],No[1]=o[1],No[2]=(p=o[2])!==null&&p!==void 0?p:0,!A.fS(O.localPosition,No)&&(A.JG(O.localPosition,No),C&&this.dirtyLocalTransform(s,O))}},{key:"translateLocal",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.al(o,p,C));var O=s.transformable;A.fS(o,wl)||(A.VC(o,o,O.localRotation),A.IH(O.localPosition,O.localPosition,o),this.dirtyLocalTransform(s,O))}},{key:"setLocalRotation",value:function(s,o,p,C,O){var W=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof o=="number"&&(o=G.t8(Ks,o,p,C,O));var K=s.transformable;G.JG(K.localRotation,o),W&&this.dirtyLocalTransform(s,K)}},{key:"rotateLocal",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.al(o,p,C));var O=s.transformable;G.Su(Ic,o[0],o[1],o[2]),G.dC(O.localRotation,O.localRotation,Ic),this.dirtyLocalTransform(s,O)}},{key:"setLocalScale",value:function(s,o){var p,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,O=s.transformable;A.t8(Xs,o[0],o[1],(p=o[2])!==null&&p!==void 0?p:O.localScale[2]),!A.fS(Xs,O.localScale)&&(A.JG(O.localScale,Xs),C&&this.dirtyLocalTransform(s,O))}},{key:"scaleLocal",value:function(s,o){var p,C=s.transformable;A.Jp(C.localScale,C.localScale,A.t8(Xs,o[0],o[1],(p=o[2])!==null&&p!==void 0?p:1)),this.dirtyLocalTransform(s,C)}},{key:"setLocalSkew",value:function(s,o,p){var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof o=="number"&&(o=kt.t8(lh,o,p));var O=s.transformable;kt.JG(O.localSkew,o),C&&this.dirtyLocalTransform(s,O)}},{key:"setLocalEulerAngles",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,O=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof o=="number"&&(o=A.al(o,p,C));var W=s.transformable;G.Su(W.localRotation,o[0],o[1],o[2]),O&&this.dirtyLocalTransform(s,W)}},{key:"setLocalTransform",value:function(s,o){var p=F.getTranslation(uh,o),C=F.getRotation(hh,o),O=F.getScaling(dh,o);this.setLocalScale(s,O,!1),this.setLocalPosition(s,p,!1),this.setLocalRotation(s,C,void 0,void 0,void 0,!1),this.dirtyLocalTransform(s,s.transformable)}},{key:"resetLocalTransform",value:function(s){this.setLocalScale(s,sh,!1),this.setLocalPosition(s,wl,!1),this.setLocalEulerAngles(s,wl,void 0,void 0,!1),this.setLocalSkew(s,ah,void 0,!1),this.dirtyLocalTransform(s,s.transformable)}},{key:"getPosition",value:function(s){var o=s.transformable;return F.getTranslation(o.position,this.getWorldTransform(s,o))}},{key:"getRotation",value:function(s){var o=s.transformable;return F.getRotation(o.rotation,this.getWorldTransform(s,o))}},{key:"getScale",value:function(s){var o=s.transformable;return F.getScaling(o.scaling,this.getWorldTransform(s,o))}},{key:"getOrigin",value:function(s){return s.getGeometryBounds(),s.transformable.origin}},{key:"getWorldTransform",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s.transformable;return!o.localDirtyFlag&&!o.dirtyFlag||(s.parentNode&&s.parentNode.transformable&&this.getWorldTransform(s.parentNode),this.internalUpdateTransform(s)),o.worldTransform}},{key:"setPosition",value:function(s,o){var p,C=s.transformable;if(Qs[0]=o[0],Qs[1]=o[1],Qs[2]=(p=o[2])!==null&&p!==void 0?p:0,!A.fS(this.getPosition(s),Qs)){if(A.JG(C.position,Qs),s.parentNode===null||!s.parentNode.transformable)A.JG(C.localPosition,Qs);else{var O=s.parentNode.transformable;F.copy(Po,O.worldTransform),F.invert(Po,Po),A.fF(C.localPosition,Qs,Po)}this.dirtyLocalTransform(s,C)}}},{key:"translate",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.t8(Xs,o,p,C)),!A.fS(o,wl)&&(A.IH(Xs,this.getPosition(s),o),this.setPosition(s,Xs))}},{key:"setRotation",value:function(s,o,p,C,O){var W=s.transformable;if(typeof o=="number"&&(o=G.al(o,p,C,O)),s.parentNode===null||!s.parentNode.transformable)this.setLocalRotation(s,o);else{var K=this.getRotation(s.parentNode);G.JG(Ks,K),G.U_(Ks,Ks),G.Jp(W.localRotation,Ks,o),G.Fv(W.localRotation,W.localRotation),this.dirtyLocalTransform(s,W)}}},{key:"rotate",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.al(o,p,C));var O=s.transformable;if(s.parentNode===null||!s.parentNode.transformable)this.rotateLocal(s,o);else{var W=Ks;G.Su(W,o[0],o[1],o[2]);var K=this.getRotation(s),ht=this.getRotation(s.parentNode);G.JG(Ml,ht),G.U_(Ml,Ml),G.Jp(W,Ml,W),G.Jp(O.localRotation,W,K),G.Fv(O.localRotation,O.localRotation),this.dirtyLocalTransform(s,O)}}},{key:"setOrigin",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=[o,p,C]);var O=s.transformable;if(!(o[0]===O.origin[0]&&o[1]===O.origin[1]&&o[2]===O.origin[2])){var W=O.origin;W[0]=o[0],W[1]=o[1],W[2]=o[2]||0,this.dirtyLocalTransform(s,O)}}},{key:"setEulerAngles",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.al(o,p,C));var O=s.transformable;if(s.parentNode===null||!s.parentNode.transformable)this.setLocalEulerAngles(s,o);else{G.Su(O.localRotation,o[0],o[1],o[2]);var W=this.getRotation(s.parentNode);G.JG(Dc,G.U_(Ks,W)),G.dC(O.localRotation,O.localRotation,Dc),this.dirtyLocalTransform(s,O)}}},{key:"getTransformedGeometryBounds",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=arguments.length>2?arguments[2]:void 0,C=this.getGeometryBounds(s,o);if(!zt.isEmpty(C)){var O=p||new zt;return O.setFromTransformedAABB(C,this.getWorldTransform(s)),O}return null}},{key:"getGeometryBounds",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=s,C=p.geometry;C.dirty&&Jn.styleValueRegistry.updateGeometry(s);var O=o?C.renderBounds:C.contentBounds||null;return O||new zt}},{key:"getBounds",value:function(s){var o=this,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,C=s,O=C.renderable;if(!O.boundsDirty&&!p&&O.bounds)return O.bounds;if(!O.renderBoundsDirty&&p&&O.renderBounds)return O.renderBounds;var W=p?O.renderBounds:O.bounds,K=this.getTransformedGeometryBounds(s,p,W),ht=s.childNodes;if(ht.forEach(function(Se){var ze=o.getBounds(Se,p);ze&&(K?K.add(ze):(K=W||new zt,K.update(ze.center,ze.halfExtents)))}),K||(K=new zt),p){var Bt=co(s);if(Bt){var ne=Bt.parsedStyle.clipPath.getBounds(p);K?ne&&(K=ne.intersection(K)):K.update(ne.center,ne.halfExtents)}}return p?(O.renderBounds=K,O.renderBoundsDirty=!1):(O.bounds=K,O.boundsDirty=!1),K}},{key:"getLocalBounds",value:function(s){if(s.parentNode){var o=oh;s.parentNode.transformable&&(o=F.invert(ch,this.getWorldTransform(s.parentNode)));var p=this.getBounds(s);if(!zt.isEmpty(p)){var C=new zt;return C.setFromTransformedAABB(p,o),C}}return this.getBounds(s)}},{key:"getBoundingClientRect",value:function(s){var o,p,C=this.getGeometryBounds(s);zt.isEmpty(C)||(p=new zt,p.setFromTransformedAABB(C,this.getWorldTransform(s)));var O=(o=s.ownerDocument)===null||o===void 0||(o=o.defaultView)===null||o===void 0?void 0:o.getContextService().getBoundingClientRect();if(p){var W=p.getMin(),K=(0,w.Z)(W,2),ht=K[0],Bt=K[1],ne=p.getMax(),Se=(0,w.Z)(ne,2),ze=Se[0],We=Se[1];return new Mt(ht+((O==null?void 0:O.left)||0),Bt+((O==null?void 0:O.top)||0),ze-ht,We-Bt)}return new Mt((O==null?void 0:O.left)||0,(O==null?void 0:O.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(s){var o,p=(o=s.parentNode)===null||o===void 0?void 0:o.transformable;us(s.transformable),Bs(s.transformable,p)}},{key:"internalUpdateElement",value:function(s,o){var p,C,O,W,K=((p=s.ownerDocument)===null||p===void 0||(p=p.defaultView)===null||p===void 0||(p=p.getConfig())===null||p===void 0||(p=p.future)===null||p===void 0?void 0:p.experimentalAttributeUpdateOptimization)===!0,ht=o[o.length-1],Bt=(ht==null?void 0:ht.transformDirty)||((C=s.transformable)===null||C===void 0?void 0:C.localDirtyFlag);if(s.transformable){var ne;(ne=s.transformable).dirtyFlag||(ne.dirtyFlag=Bt)}if(this.internalUpdateTransform(s),Bt){var Se;(Se=s.dirty)===null||Se===void 0||Se.call(s,!0,!0)}var ze=((O=s.renderable)===null||O===void 0?void 0:O.boundsDirty)||((W=s.renderable)===null||W===void 0?void 0:W.renderBoundsDirty);if((Bt||ze)&&(ht==null?void 0:ht.shapeUpdated)===!1&&K)for(var We=o.length-1;We>=0;){var dn,gn,pn=o[We];if(pn.shapeUpdated)break;(dn=(gn=pn.node).dirty)===null||dn===void 0||dn.call(gn,!0,!0),pn.shapeUpdated=!0,We-=1}return Bt}},{key:"syncHierarchy",value:function(s){for(var o,p,C=[s],O=s.parentNode?[{node:s.parentNode,transformDirty:((o=s.parentNode.transformable)===null||o===void 0?void 0:o.localDirtyFlag)||((p=s.parentNode.transformable)===null||p===void 0?void 0:p.dirtyFlag),shapeUpdated:!1}]:[];C.length>0;){for(var W=C.pop(),K=O[O.length-1];O.length>0&&W.parentNode!==K.node;)K=O.pop();var ht=this.internalUpdateElement(W,O);if(W.childNodes.length>0){for(var Bt=W.childNodes.length-1;Bt>=0;Bt--)C.push(W.childNodes[Bt]);O.push({node:W,transformDirty:ht,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(s,o){gl(s)||o.localDirtyFlag||(o.localDirtyFlag=!0,o.dirtyFlag||this.dirtyWorldTransform(s,o))}},{key:"dirtyWorldTransform",value:function(s,o){this.dirtifyWorldInternal(s,o),this.dirtyToRoot(s,!0)}},{key:"dirtifyWorldInternal",value:function(s,o){var p,C=this,O=((p=s.ownerDocument)===null||p===void 0||(p=p.defaultView)===null||p===void 0||(p=p.getConfig())===null||p===void 0||(p=p.future)===null||p===void 0?void 0:p.experimentalAttributeUpdateOptimization)===!0;o.dirtyFlag||(o.dirtyFlag=!0,s.dirty(!0,!0),O||s.childNodes.forEach(function(W){var K=W.transformable;C.dirtifyWorldInternal(W,K)}))}},{key:"dirtyToRoot",value:function(s){for(var o,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,C=s,O=((o=s.ownerDocument)===null||o===void 0||(o=o.defaultView)===null||o===void 0||(o=o.getConfig())===null||o===void 0||(o=o.future)===null||o===void 0?void 0:o.experimentalAttributeUpdateOptimization)===!0;C;){var W,K;if((W=(K=C).dirty)===null||W===void 0||W.call(K,!0,!0),O)break;C=C.parentNode}p&&s.forEach(function(ht){var Bt;(Bt=ht.dirty)===null||Bt===void 0||Bt.call(ht,!0,!0)}),this.informDependentDisplayObjects(s),this.pendingEvents.set(s,p)}},{key:"dirtifyFragment",value:function(s){var o,p,C=s.transformable;C&&(C.dirtyFlag=!0,C.localDirtyFlag=!0),(o=(p=s).dirty)===null||o===void 0||o.call(p,!0,!0);for(var O=s.childNodes.length,W=0;W<O;W++)this.dirtifyFragment(s.childNodes[W]);s.nodeName===ft.FRAGMENT&&this.pendingEvents.set(s,!1)}},{key:"triggerPendingEvents",value:function(){var s=this,o=new Set,p,C,O=function(K,ht){if(!(!K.isConnected||o.has(K)||K.nodeName===ft.FRAGMENT)){if(s.boundsChangedEvent.detail=ht,s.boundsChangedEvent.target=K,K.isMutationObserved)K.dispatchEvent(s.boundsChangedEvent);else{if(p===void 0){var Bt;p=((Bt=K.ownerDocument.defaultView)===null||Bt===void 0||(Bt=Bt.getConfig())===null||Bt===void 0||(Bt=Bt.future)===null||Bt===void 0?void 0:Bt.experimentalCancelEventPropagation)===!0}K.ownerDocument.defaultView.dispatchEvent(s.boundsChangedEvent,!0,p)}o.add(K)}};this.pendingEvents.forEach(function(W,K){if(K.nodeName!==ft.FRAGMENT){if(C===void 0){var ht;C=((ht=K.ownerDocument)===null||ht===void 0||(ht=ht.defaultView)===null||ht===void 0||(ht=ht.getConfig())===null||ht===void 0||(ht=ht.future)===null||ht===void 0?void 0:ht.experimentalAttributeUpdateOptimization)===!0}Sl.affectChildren=W,C?O(K,Sl):W?K.forEach(function(Bt){O(Bt,Sl)}):O(K,Sl)}}),o.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"updateDisplayObjectDependency",value:function(s,o,p,C){if(o&&o!==p){var O=this.displayObjectDependencyMap.get(o);if(O&&O[s]){var W=O[s].indexOf(C);O[s].splice(W,1)}}if(p){var K=this.displayObjectDependencyMap.get(p);K||(this.displayObjectDependencyMap.set(p,{}),K=this.displayObjectDependencyMap.get(p)),K[s]||(K[s]=[]),K[s].push(C)}}},{key:"informDependentDisplayObjects",value:function(s){var o,p=this,C=this.displayObjectDependencyMap.get(s);if(C){var O=(o=s.ownerDocument)===null||o===void 0||(o=o.defaultView)===null||o===void 0||(o=o.getConfig())===null||o===void 0||(o=o.future)===null||o===void 0?void 0:o.experimentalCancelEventPropagation;Object.keys(C).forEach(function(W){C[W].forEach(function(K){p.dirtyToRoot(K,!0),K.dispatchEvent(new ss(Ki.ATTR_MODIFIED,K,p,p,W,ss.MODIFICATION,p,p),O,O),K.isCustomElement&&K.isConnected&&K.attributeChangedCallback&&K.attributeChangedCallback(W,p,p)})})}}}])}(),Hl=function(){function d(v){if((0,_.Z)(this,d),v<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=v,this.cache=new Map}return(0,I.Z)(d,[{key:"get",value:function(s){if(this.cache.has(s)){var o=this.cache.get(s);return this.cache.delete(s),this.cache.set(s,o),o}}},{key:"put",value:function(s,o){if(this.cache.has(s)&&this.cache.delete(s),this.cache.set(s,o),this.cache.size>this.capacity){var p=this.cache.keys().next().value;this.cache.delete(p)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}])}(),uo={MetricsString:"|\xC9q\xC5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Xl=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,fh=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,Fc=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,_c=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,vh=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,Zc=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,zc=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,jc=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,ld=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,gh=new RegExp("".concat(fh.source,"|").concat(_c.source,"|").concat(Zc.source,"|").concat(jc.source)),ph=new RegExp("".concat(Fc.source,"|").concat(vh.source,"|").concat(zc.source,"|").concat(ld.source)),mh=function(){function d(v){var s=this;(0,_.Z)(this,d),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(o,p){return s.isBreakingSpace(p)?!1:!!(o&&(ph.exec(p)||gh.exec(o)))},this.trimByKinsokuShorui=function(o){var p=(0,z.Z)(o),C=p[p.length-2];if(!C)return o;var O=C[C.length-1];return p[p.length-2]=C.slice(0,-1),p[p.length-1]=O+p[p.length-1],p},this.runtime=v,this.charWidthCache=new Hl(100)}return(0,I.Z)(d,[{key:"measureFont",value:function(s,o){if(this.fontMetricsCache[s])return this.fontMetricsCache[s];var p={ascent:0,descent:0,fontSize:0},C=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(o),O=this.runtime.offscreenCanvasCreator.getOrCreateContext(o,{willReadFrequently:!0});O.font=s;var W=uo.MetricsString+uo.BaselineSymbol,K=Math.ceil(O.measureText(W).width),ht=Math.ceil(O.measureText(uo.BaselineSymbol).width),Bt=uo.HeightMultiplier*ht;ht=ht*uo.BaselineMultiplier|0,C.width=K,C.height=Bt,O.fillStyle="#f00",O.fillRect(0,0,K,Bt),O.font=s,O.textBaseline="alphabetic",O.fillStyle="#000",O.fillText(W,0,ht);var ne=O.getImageData(0,0,K||1,Bt||1).data,Se=ne.length,ze=K*4,We=0,dn=0,gn=!1;for(We=0;We<ht;++We){for(var pn=0;pn<ze;pn+=4)if(ne[dn+pn]!==255){gn=!0;break}if(!gn)dn+=ze;else break}for(p.ascent=ht-We,dn=Se-ze,gn=!1,We=Bt;We>ht;--We){for(var sn=0;sn<ze;sn+=4)if(ne[dn+sn]!==255){gn=!0;break}if(!gn)dn-=ze;else break}return p.descent=We-ht,p.fontSize=p.ascent+p.descent,this.fontMetricsCache[s]=p,p}},{key:"measureText",value:function(s,o,p){var C=o.fontSize,O=C===void 0?16:C,W=o.wordWrap,K=W===void 0?!1:W,ht=o.lineHeight,Bt=o.lineWidth,ne=Bt===void 0?1:Bt,Se=o.textBaseline,ze=Se===void 0?"alphabetic":Se,We=o.textAlign,dn=We===void 0?"start":We,gn=o.letterSpacing,pn=gn===void 0?0:gn,sn=o.textPath;o.textPathSide,o.textPathStartOffset;var Sn=o.leading,Wn=Sn===void 0?0:Sn,hn=jl(o),Ue=this.measureFont(hn,p);Ue.fontSize===0&&(Ue.fontSize=O,Ue.ascent=O);var un=this.runtime.offscreenCanvasCreator.getOrCreateContext(p);un.font=hn,o.isOverflowing=!1;var wn=K?this.wordWrap(s,o,p):s,_n=wn.split(/(?:\r\n|\r|\n)/),kn=new Array(_n.length),Un=0;if(sn){sn.getTotalLength();for(var Gn=0;Gn<_n.length;Gn++)un.measureText(_n[Gn]).width+(_n[Gn].length-1)*pn}else{for(var ar=0;ar<_n.length;ar++){var Ir=un.measureText(_n[ar]).width+(_n[ar].length-1)*pn;kn[ar]=Ir,Un=Math.max(Un,Ir)}var zr=Un+ne,qr=ht||Ue.fontSize+ne,hr=Math.max(qr,Ue.fontSize+ne)+(_n.length-1)*(qr+Wn);qr+=Wn;var kr=0;return ze==="middle"?kr=-hr/2:ze==="bottom"||ze==="alphabetic"||ze==="ideographic"?kr=-hr:(ze==="top"||ze==="hanging")&&(kr=0),{font:hn,width:zr,height:hr,lines:_n,lineWidths:kn,lineHeight:qr,maxLineWidth:Un,fontProperties:Ue,lineMetrics:kn.map(function(Pr,zi){var Qi=0;return dn==="center"||dn==="middle"?Qi-=Pr/2:(dn==="right"||dn==="end")&&(Qi-=Pr),new Mt(Qi-ne/2,kr+zi*qr,Pr+ne,qr)})}}}},{key:"wordWrap",value:function(s,o,p){var C=this,O=Array.from(s);if(O.length===0)return"";var W=this,K=o.wordWrapWidth,ht=K===void 0?0:K,Bt=o.letterSpacing,ne=Bt===void 0?0:Bt,Se=o.maxLines,ze=Se===void 0?1/0:Se,We=o.textOverflow,dn=this.runtime.offscreenCanvasCreator.getOrCreateContext(p),gn=ht+ne,pn="";We==="ellipsis"?pn="...":We&&We!=="clip"&&(pn=We);var sn=[""],Sn=0,Wn=0,hn=-1,Ue=jl(o),un=this.charWidthCache.get(Ue);un||(un=new Hl(500),this.charWidthCache.put(Ue,un));var wn=function(Pr){return C.getFromCache(Pr,ne,un,dn)},_n=wn(pn);function kn(kr,Pr,zi,Qi){for(;wn(kr)<Qi&&Pr<O.length-1&&!W.isNewline(O[Pr+1]);)Pr+=1,kr+=O[Pr];for(;wn(kr)>Qi&&Pr>=zi;)Pr-=1,kr=kr.slice(0,-1);return{lineTxt:kr,txtLastCharIndex:Pr}}function Un(kr,Pr){if(!(_n<=0||_n>gn)){if(!sn[kr]){sn[kr]=pn;return}var zi=kn(sn[kr],Pr,hn+1,gn-_n);sn[kr]=zi.lineTxt+pn}}for(var Gn=0;Gn<O.length;Gn++){var ar=O[Gn],Ir=O[Gn-1],zr=O[Gn+1],qr=wn(ar);if(this.isNewline(ar)){if(Sn+1>=ze){Gn<O.length-1&&Un(Sn,Gn-1),o.isOverflowing=!0;break}hn=Gn-1,Sn+=1,Wn=0,sn[Sn]="";continue}if(qr>gn){Un(Sn,Gn-1),o.isOverflowing=!0;break}if(Wn>0&&Wn+qr>gn){var hr=kn(sn[Sn],Gn-1,hn+1,gn);if(hr.txtLastCharIndex!==Gn-1){if(sn[Sn]=hr.lineTxt,hr.txtLastCharIndex===O.length-1)break;Gn=hr.txtLastCharIndex+1,ar=O[Gn],Ir=O[Gn-1],zr=O[Gn+1],qr=wn(ar)}if(Sn+1>=ze){Un(Sn,Gn-1),o.isOverflowing=!0;break}if(hn=Gn-1,Sn+=1,Wn=0,sn[Sn]="",this.isBreakingSpace(ar))continue;this.canBreakInLastChar(ar)||(sn=this.trimToBreakable(sn),Wn=this.sumTextWidthByCache(sn[Sn]||"",wn)),this.shouldBreakByKinsokuShorui(ar,zr)&&(sn=this.trimByKinsokuShorui(sn),Wn+=wn(Ir||""))}Wn+=qr,sn[Sn]+=ar}return sn.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(s){return typeof s!="string"?!1:uo.BreakingSpaces.indexOf(s.charCodeAt(0))>=0}},{key:"isNewline",value:function(s){return typeof s!="string"?!1:uo.Newlines.indexOf(s.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(s){var o=(0,z.Z)(s),p=o[o.length-2],C=this.findBreakableIndex(p);if(C===-1||!p)return o;var O=p.slice(C,C+1),W=this.isBreakingSpace(O),K=C+1,ht=C+(W?0:1);return o[o.length-1]+=p.slice(K,p.length),o[o.length-2]=p.slice(0,ht),o}},{key:"canBreakInLastChar",value:function(s){return!(s&&Xl.test(s))}},{key:"sumTextWidthByCache",value:function(s,o){return s.split("").reduce(function(p,C){return p+o(C)},0)}},{key:"findBreakableIndex",value:function(s){for(var o=s.length-1;o>=0;o--)if(!Xl.test(s[o]))return o;return-1}},{key:"getFromCache",value:function(s,o,p,C){var O=p.get(s);if(typeof O!="number"){var W=s.length*o,K=C.measureText(s);O=K.width+W,p.put(s,O)}return O}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}])}(),Jn={},yh=function(d){var v=new Pc,s=new Nc;return d={},(0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)(d,ft.FRAGMENT,null),ft.CIRCLE,new Xu),ft.ELLIPSE,new Cc),ft.RECT,v),ft.IMAGE,v),ft.GROUP,new Ul),ft.LINE,new Ku),ft.TEXT,new Ju(Jn)),ft.POLYLINE,s),ft.POLYGON,s),(0,Hn.Z)((0,Hn.Z)((0,Hn.Z)(d,ft.PATH,new Qu),ft.HTML,new $u),ft.MESH,null)}(),Wc=function(d){var v=new cl,s=new Ys;return d={},(0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)(d,qn.PERCENTAGE,null),qn.NUMBER,new Oo),qn.ANGLE,new Ba),qn.DEFINED_PATH,new Ta),qn.PAINT,v),qn.COLOR,v),qn.FILTER,new So),qn.LENGTH,s),qn.LENGTH_PERCENTAGE,s),qn.LENGTH_PERCENTAGE_12,new Go),(0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)((0,Hn.Z)(d,qn.LENGTH_PERCENTAGE_14,new oo),qn.COORDINATE,new Ys),qn.OFFSET_DISTANCE,new hl),qn.OPACITY_VALUE,new Ls),qn.PATH,new Ja),qn.LIST_OF_POINTS,new ps),qn.SHADOW_BLUR,new $r),qn.TEXT,new ra),qn.TEXT_TRANSFORM,new Ui),qn.TRANSFORM,new Gl),(0,Hn.Z)((0,Hn.Z)((0,Hn.Z)(d,qn.TRANSFORM_ORIGIN,new Oc),qn.Z_INDEX,new Tc),qn.MARKER,new Ao)}(),bh=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof y.g!="undefined"?y.g:{}};Jn.CameraContribution=Fa,Jn.AnimationTimeline=null,Jn.EasingFunction=null,Jn.offscreenCanvasCreator=new Lc,Jn.sceneGraphSelector=new rh,Jn.sceneGraphService=new Bc(Jn),Jn.textService=new mh(Jn),Jn.geometryUpdaterFactory=yh,Jn.CSSPropertySyntaxFactory=Wc,Jn.styleValueRegistry=new Ka(Jn),Jn.layoutRegistry=null,Jn.globalThis=bh(),Jn.enableStyleSyntax=!0,Jn.enableSizeAttenuation=!1;var Ds=0;function cd(){Ds=0}var Kl=new ss(Ki.INSERTED,null,"","","",0,"",""),Ql=new ss(Ki.REMOVED,null,"","","",0,"",""),Gc=new ya(Ki.DESTROY),Uc=function(d){function v(){var s;(0,_.Z)(this,v);for(var o=arguments.length,p=new Array(o),C=0;C<o;C++)p[C]=arguments[C];return s=(0,S.Z)(this,v,[].concat(p)),s.entity=Ds++,s.transformable={dirtyFlag:!1,localDirtyFlag:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},s.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},s.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},s.cullable={strategy:La.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},s.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},s.rBushNode={aabb:void 0},s.namespaceURI="g",s.scrollLeft=0,s.scrollTop=0,s.clientTop=0,s.clientLeft=0,s.style={},s.computedStyle={},s.parsedStyle={},s.attributes={},s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"dirty",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.renderable.dirty=o,p&&(this.renderable.boundsDirty=o,this.renderable.renderBoundsDirty=o)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(o){this.setAttribute("class",o)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(o){return o!==""})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var o=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[o+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var o=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[o-1]||null}return null}},{key:"cloneNode",value:function(o){throw new Error(Wt)}},{key:"appendChild",value:function(o,p){var C;if(o.destroyed)throw new Error(Kt);return Jn.sceneGraphService.attach(o,this,p),(C=this.ownerDocument)!==null&&C!==void 0&&C.defaultView&&(!gl(this)&&o.nodeName===ft.FRAGMENT?this.ownerDocument.defaultView.mountFragment(o):this.ownerDocument.defaultView.mountChildren(o)),this.isMutationObserved&&(Kl.relatedNode=this,o.dispatchEvent(Kl)),o}},{key:"insertBefore",value:function(o,p){if(!p)this.appendChild(o);else{o.parentElement&&o.parentElement.removeChild(o);var C=this.childNodes.indexOf(p);C===-1?this.appendChild(o):this.appendChild(o,C)}return o}},{key:"replaceChild",value:function(o,p){var C=this.childNodes.indexOf(p);return this.removeChild(p),this.appendChild(o,C),p}},{key:"removeChild",value:function(o){var p,C,O=((p=this.ownerDocument)===null||p===void 0||(p=p.defaultView)===null||p===void 0||(p=p.getConfig().future)===null||p===void 0?void 0:p.experimentalCancelEventPropagation)===!0;return Ql.relatedNode=this,o.dispatchEvent(Ql,O,O),(C=o.ownerDocument)!==null&&C!==void 0&&C.defaultView&&o.ownerDocument.defaultView.unmountChildren(o),Jn.sceneGraphService.detach(o),o}},{key:"removeChildren",value:function(){for(var o=this.childNodes.length-1;o>=0;o--){var p=this.childNodes[o];this.removeChild(p)}}},{key:"destroyChildren",value:function(){for(var o=this.childNodes.length-1;o>=0;o--){var p=this.childNodes[o];p.childNodes.length>0&&p.destroyChildren(),p.destroy()}}},{key:"matches",value:function(o){return Jn.sceneGraphService.matches(o,this)}},{key:"getElementById",value:function(o){return Jn.sceneGraphService.querySelector("#".concat(o),this)}},{key:"getElementsByName",value:function(o){return Jn.sceneGraphService.querySelectorAll('[name="'.concat(o,'"]'),this)}},{key:"getElementsByClassName",value:function(o){return Jn.sceneGraphService.querySelectorAll(".".concat(o),this)}},{key:"getElementsByTagName",value:function(o){return Jn.sceneGraphService.querySelectorAll(o,this)}},{key:"querySelector",value:function(o){return Jn.sceneGraphService.querySelector(o,this)}},{key:"querySelectorAll",value:function(o){return Jn.sceneGraphService.querySelectorAll(o,this)}},{key:"closest",value:function(o){var p=this;do{if(Jn.sceneGraphService.matches(o,p))return p;p=p.parentElement}while(p!==null);return null}},{key:"find",value:function(o){var p=this,C=null;return this.forEach(function(O){return O!==p&&o(O)?(C=O,!1):!0}),C}},{key:"findAll",value:function(o){var p=this,C=[];return this.forEach(function(O){O!==p&&o(O)&&C.push(O)}),C}},{key:"after",value:function(){var o=this;if(this.parentNode){for(var p=this.parentNode.childNodes.indexOf(this),C=arguments.length,O=new Array(C),W=0;W<C;W++)O[W]=arguments[W];O.forEach(function(K,ht){var Bt;return(Bt=o.parentNode)===null||Bt===void 0?void 0:Bt.appendChild(K,p+ht+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var o,p=this.parentNode.childNodes.indexOf(this),C=arguments.length,O=new Array(C),W=0;W<C;W++)O[W]=arguments[W];var K=O[0],ht=O.slice(1);this.parentNode.appendChild(K,p),(o=K).after.apply(o,(0,z.Z)(ht))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var o=this,p=arguments.length,C=new Array(p),O=0;O<p;O++)C[O]=arguments[O];C.forEach(function(W){return o.appendChild(W)})}},{key:"prepend",value:function(){for(var o=this,p=arguments.length,C=new Array(p),O=0;O<p;O++)C[O]=arguments[O];C.forEach(function(W,K){return o.appendChild(W,K)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var o,p=((o=this.ownerDocument)===null||o===void 0||(o=o.defaultView)===null||o===void 0||(o=o.getConfig().future)===null||o===void 0?void 0:o.experimentalCancelEventPropagation)===!0;this.destroyChildren(),this.dispatchEvent(Gc,p,p),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return Jn.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return Jn.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return Jn.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return Jn.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return Jn.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(o){if(typeof o!="symbol"){var p=this.attributes[o];return p}}},{key:"hasAttribute",value:function(o){return this.getAttributeNames().includes(o)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(o){this.setAttribute(o,null),delete this.attributes[o]}},{key:"setAttribute",value:function(o,p,C,O){this.attributes[o]=p}},{key:"getAttributeNS",value:function(o,p){throw new Error(Wt)}},{key:"getAttributeNode",value:function(o){throw new Error(Wt)}},{key:"getAttributeNodeNS",value:function(o,p){throw new Error(Wt)}},{key:"hasAttributeNS",value:function(o,p){throw new Error(Wt)}},{key:"removeAttributeNS",value:function(o,p){throw new Error(Wt)}},{key:"removeAttributeNode",value:function(o){throw new Error(Wt)}},{key:"setAttributeNS",value:function(o,p,C){throw new Error(Wt)}},{key:"setAttributeNode",value:function(o){throw new Error(Wt)}},{key:"setAttributeNodeNS",value:function(o){throw new Error(Wt)}},{key:"toggleAttribute",value:function(o,p){throw new Error(Wt)}}])}(ki);function Si(d){return!!(d!=null&&d.nodeName)}var Eh=Jn.globalThis.Proxy?Jn.globalThis.Proxy:function(){},os=new ss(Ki.ATTR_MODIFIED,null,null,null,null,ss.MODIFICATION,null,null),Qo=A.Ue(),xh=G.Ue(),Ri=function(d){function v(s){var o;return(0,_.Z)(this,v),o=(0,S.Z)(this,v),o.isCustomElement=!1,o.isMutationObserved=!1,o.activeAnimations=[],o.config=s,o.id=s.id||"",o.name=s.name||"",(s.className||s.class)&&(o.className=s.className||s.class),o.nodeName=s.type||ft.GROUP,s.initialParsedStyle&&Object.assign(o.parsedStyle,s.initialParsedStyle),o.initAttributes(s.style),Jn.enableStyleSyntax&&(o.style=new Eh({setProperty:function(C,O){o.setAttribute(C,O)},getPropertyValue:function(C){return o.getAttribute(C)},removeProperty:function(C){o.removeAttribute(C)},item:function(){return""}},{get:function(C,O){return C[O]!==void 0?C[O]:o.getAttribute(O)},set:function(C,O,W){return o.setAttribute(O,W),!0}})),o}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"destroy",value:function(){mi(v,"destroy",this,3)([]),this.getAnimations().forEach(function(o){o.cancel()})}},{key:"cloneNode",value:function(o,p){var C=(0,c.Z)({},this.attributes);for(var O in C){var W=C[O];Si(W)&&O!=="clipPath"&&O!=="offsetPath"&&O!=="textPath"&&(C[O]=W.cloneNode(o)),p&&(C[O]=p(O,W))}var K=new this.constructor((0,c.Z)((0,c.Z)({},this.config),{},{style:C}));return K.setLocalTransform(this.getLocalTransform()),o&&this.children.forEach(function(ht){if(!ht.style.isMarker){var Bt=ht.cloneNode(o);K.appendChild(Bt)}}),K}},{key:"initAttributes",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p={forceUpdateGeometry:!0};Jn.styleValueRegistry.processProperties(this,o,p),this.dirty()}},{key:"setAttribute",value:function(o,p){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,O=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,yn.Z)(p)||(C||p!==this.attributes[o])&&(this.internalSetAttribute(o,p,{memoize:O}),mi(v,"setAttribute",this,3)([o,p]))}},{key:"internalSetAttribute",value:function(o,p){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},O=this.attributes[o],W=this.parsedStyle[o];Jn.styleValueRegistry.processProperties(this,(0,Hn.Z)({},o,p),C),this.dirty();var K=this.parsedStyle[o];if(this.isConnected)if(os.relatedNode=this,os.prevValue=O,os.newValue=p,os.attrName=o,os.prevParsedValue=W,os.newParsedValue=K,this.isMutationObserved)this.dispatchEvent(os);else{var ht,Bt=((ht=this.ownerDocument.defaultView.getConfig().future)===null||ht===void 0?void 0:ht.experimentalCancelEventPropagation)===!0;os.target=this,this.ownerDocument.defaultView.dispatchEvent(os,!0,Bt)}if(this.isCustomElement&&this.isConnected||!this.isCustomElement){var ne,Se;(ne=(Se=this).attributeChangedCallback)===null||ne===void 0||ne.call(Se,o,O,p,W,K)}}},{key:"getBBox",value:function(){var o=this.getBounds(),p=o.getMin(),C=(0,w.Z)(p,2),O=C[0],W=C[1],K=o.getMax(),ht=(0,w.Z)(K,2),Bt=ht[0],ne=ht[1];return new Mt(O,W,Bt-O,ne-W)}},{key:"setOrigin",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Jn.sceneGraphService.setOrigin(this,ut(o,p,C,!1)),this}},{key:"getOrigin",value:function(){return Jn.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Jn.sceneGraphService.setPosition(this,ut(o,p,C,!1)),this}},{key:"setLocalPosition",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Jn.sceneGraphService.setLocalPosition(this,ut(o,p,C,!1)),this}},{key:"translate",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Jn.sceneGraphService.translate(this,ut(o,p,C,!1)),this}},{key:"translateLocal",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Jn.sceneGraphService.translateLocal(this,ut(o,p,C,!1)),this}},{key:"getPosition",value:function(){return Jn.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return Jn.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(o,p,C){return this.scaleLocal(o,p,C)}},{key:"scaleLocal",value:function(o,p,C){return typeof o=="number"&&(p=p||o,C=C||o,o=ut(o,p,C,!1)),Jn.sceneGraphService.scaleLocal(this,o),this}},{key:"setLocalScale",value:function(o,p,C){return typeof o=="number"&&(p=p||o,C=C||o,o=ut(o,p,C,!1)),Jn.sceneGraphService.setLocalScale(this,o),this}},{key:"getLocalScale",value:function(){return Jn.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return Jn.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var o=Xn(Qo,Jn.sceneGraphService.getWorldTransform(this)),p=(0,w.Z)(o,3),C=p[2];return ge(C)}},{key:"getLocalEulerAngles",value:function(){var o=Xn(Qo,Jn.sceneGraphService.getLocalRotation(this)),p=(0,w.Z)(o,3),C=p[2];return ge(C)}},{key:"setEulerAngles",value:function(o){return Jn.sceneGraphService.setEulerAngles(this,0,0,o),this}},{key:"setLocalEulerAngles",value:function(o){return Jn.sceneGraphService.setLocalEulerAngles(this,0,0,o),this}},{key:"rotateLocal",value:function(o,p,C){return(0,Rt.Z)(p)&&(0,Rt.Z)(C)?Jn.sceneGraphService.rotateLocal(this,0,0,o):Jn.sceneGraphService.rotateLocal(this,o,p,C),this}},{key:"rotate",value:function(o,p,C){return(0,Rt.Z)(p)&&(0,Rt.Z)(C)?Jn.sceneGraphService.rotate(this,0,0,o):Jn.sceneGraphService.rotate(this,o,p,C),this}},{key:"setRotation",value:function(o,p,C,O){return Jn.sceneGraphService.setRotation(this,o,p,C,O),this}},{key:"setLocalRotation",value:function(o,p,C,O){return Jn.sceneGraphService.setLocalRotation(this,o,p,C,O),this}},{key:"setLocalSkew",value:function(o,p){return Jn.sceneGraphService.setLocalSkew(this,o,p),this}},{key:"getRotation",value:function(){return Jn.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return Jn.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return Jn.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return Jn.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return Jn.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(o){return Jn.sceneGraphService.setLocalTransform(this,o),this}},{key:"resetLocalTransform",value:function(){Jn.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(o,p){var C,O=(C=this.ownerDocument)===null||C===void 0?void 0:C.timeline;return O?O.play(this,o,p):null}},{key:"isVisible",value:function(){var o;return((o=this.parsedStyle)===null||o===void 0?void 0:o.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(o){this.style.pointerEvents=o?"auto":"none"}},{key:"isInteractive",value:function(){var o;return((o=this.parsedStyle)===null||o===void 0?void 0:o.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,(0,z.Z)(this.parentNode.children.map(function(o){return Number(o.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,z.Z)(this.parentNode.children.map(function(o){return Number(o.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var o=this,p=arguments.length,C=new Array(p),O=0;O<p;O++)C[O]=arguments[O];var W=C[0],K=C[1];return W?(0,ye.Z)(W)?(Object.keys(W).forEach(function(ht){o.setAttribute(ht,W[ht])}),this):C.length===2?(this.setAttribute(W,K),this):this.attributes[W]:this.attributes}},{key:"getMatrix",value:function(o){var p=o||this.getWorldTransform(),C=F.getTranslation(Qo,p),O=(0,w.Z)(C,2),W=O[0],K=O[1],ht=F.getScaling(Qo,p),Bt=(0,w.Z)(ht,2),ne=Bt[0],Se=Bt[1],ze=F.getRotation(xh,p),We=Xn(Qo,ze),dn=(0,w.Z)(We,3),gn=dn[0],pn=dn[2];return tr(gn||pn,W,K,ne,Se)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(o){var p=yr(o),C=(0,w.Z)(p,5),O=C[0],W=C[1],K=C[2],ht=C[3],Bt=C[4];this.setEulerAngles(Bt).setPosition(O,W).setLocalScale(K,ht)}},{key:"setLocalMatrix",value:function(o){var p=yr(o),C=(0,w.Z)(p,5),O=C[0],W=C[1],K=C[2],ht=C[3],Bt=C[4];this.setLocalEulerAngles(Bt).setLocalPosition(O,W).setLocalScale(K,ht)}},{key:"show",value:function(){this.forEach(function(o){o.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(o){o.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(o){return this.children[o]||null}},{key:"add",value:function(o,p){return this.appendChild(o,p)}},{key:"set",value:function(o,p){this.config[o]=p}},{key:"get",value:function(o){return this.config[o]}},{key:"moveTo",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(o,p,C),this}},{key:"move",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(o,p,C),this}},{key:"setZIndex",value:function(o){return this.style.zIndex=o,this}}])}(Uc);Ri.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var Al=function(d){function v(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,v),(0,S.Z)(this,v,[(0,c.Z)({type:ft.CIRCLE},s)])}return(0,R.Z)(v,d),(0,I.Z)(v)}(Ri);Al.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var wh=["style"],Vc=function(d){function v(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,C=(0,Ei.Z)(o,wh);return(0,_.Z)(this,v),s=(0,S.Z)(this,v,[(0,c.Z)({style:p},C)]),s.isCustomElement=!0,s}return(0,R.Z)(v,d),(0,I.Z)(v)}(Ri);Vc.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Jl=function(d){function v(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,v),(0,S.Z)(this,v,[(0,c.Z)({type:ft.ELLIPSE},s)])}return(0,R.Z)(v,d),(0,I.Z)(v)}(Ri);Jl.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var Mh=function(d){function v(){return(0,_.Z)(this,v),(0,S.Z)(this,v,[{type:ft.FRAGMENT}])}return(0,R.Z)(v,d),(0,I.Z)(v)}(Ri);Mh.PARSED_STYLE_LIST=new Set(["class","className"]);var Jo=function(d){function v(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,v),(0,S.Z)(this,v,[(0,c.Z)({type:ft.GROUP},s)])}return(0,R.Z)(v,d),(0,I.Z)(v)}(Ri);Jo.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Yc=["style"],$l=function(d){function v(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,C=(0,Ei.Z)(o,Yc);return(0,_.Z)(this,v),s=(0,S.Z)(this,v,[(0,c.Z)({type:ft.HTML,style:p},C)]),s.cullable.enable=!1,s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var o=F.invert(F.create(),this.parentNode.getWorldTransform()),p=this.getBounds();if(!zt.isEmpty(p)){var C=new zt;return C.setFromTransformedAABB(p,o),C}}return this.getBounds()}}])}(Ri);$l.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var ql=function(d){function v(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,v),(0,S.Z)(this,v,[(0,c.Z)({type:ft.IMAGE},s)])}return(0,R.Z)(v,d),(0,I.Z)(v)}(Ri);ql.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var Hc=["style"],tc=function(d){function v(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,C=(0,Ei.Z)(o,Hc);(0,_.Z)(this,v),s=(0,S.Z)(this,v,[(0,c.Z)({type:ft.LINE,style:(0,c.Z)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},p)},C)]),s.markerStartAngle=0,s.markerEndAngle=0;var O=s.parsedStyle,W=O.markerStart,K=O.markerEnd;return W&&Si(W)&&(s.markerStartAngle=W.getLocalEulerAngles(),s.appendChild(W)),K&&Si(K)&&(s.markerEndAngle=K.getLocalEulerAngles(),s.appendChild(K)),s.transformMarker(!0),s.transformMarker(!1),s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"attributeChangedCallback",value:function(o,p,C,O,W){o==="x1"||o==="y1"||o==="x2"||o==="y2"||o==="markerStartOffset"||o==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):o==="markerStart"?(O&&Si(O)&&(this.markerStartAngle=0,O.remove()),W&&Si(W)&&(this.markerStartAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!0))):o==="markerEnd"&&(O&&Si(O)&&(this.markerEndAngle=0,O.remove()),W&&Si(W)&&(this.markerEndAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!1)))}},{key:"transformMarker",value:function(o){var p=this.parsedStyle,C=p.markerStart,O=p.markerEnd,W=p.markerStartOffset,K=p.markerEndOffset,ht=p.x1,Bt=p.x2,ne=p.y1,Se=p.y2,ze=o?C:O;if(!(!ze||!Si(ze))){var We=0,dn,gn,pn,sn,Sn,Wn;o?(pn=ht,sn=ne,dn=Bt-ht,gn=Se-ne,Sn=W||0,Wn=this.markerStartAngle):(pn=Bt,sn=Se,dn=ht-Bt,gn=ne-Se,Sn=K||0,Wn=this.markerEndAngle),We=Math.atan2(gn,dn),ze.setLocalEulerAngles(We*180/Math.PI+Wn),ze.setLocalPosition(pn+Math.cos(We)*Sn,sn+Math.sin(We)*Sn)}}},{key:"getPoint",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,C=this.parsedStyle,O=C.x1,W=C.y1,K=C.x2,ht=C.y2,Bt=(0,si.U4)(O,W,K,ht,o),ne=Bt.x,Se=Bt.y,ze=A.fF(A.Ue(),A.al(ne,Se,0),p?this.getWorldTransform():this.getLocalTransform());return new nt(ze[0],ze[1])}},{key:"getPointAtLength",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(o/this.getTotalLength(),p)}},{key:"getTotalLength",value:function(){var o=this.parsedStyle,p=o.x1,C=o.y1,O=o.x2,W=o.y2;return(0,si.Xk)(p,C,O,W)}}])}(Ri);tc.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var Sh=["style"],ec=function(d){function v(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,C=(0,Ei.Z)(o,Sh);(0,_.Z)(this,v),s=(0,S.Z)(this,v,[(0,c.Z)({type:ft.PATH,style:p,initialParsedStyle:{miterLimit:4,d:(0,c.Z)({},Fs)}},C)]),s.markerStartAngle=0,s.markerEndAngle=0,s.markerMidList=[];var O=s.parsedStyle,W=O.markerStart,K=O.markerEnd,ht=O.markerMid;return W&&Si(W)&&(s.markerStartAngle=W.getLocalEulerAngles(),s.appendChild(W)),ht&&Si(ht)&&s.placeMarkerMid(ht),K&&Si(K)&&(s.markerEndAngle=K.getLocalEulerAngles(),s.appendChild(K)),s.transformMarker(!0),s.transformMarker(!1),s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"attributeChangedCallback",value:function(o,p,C,O,W){o==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):o==="markerStartOffset"||o==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):o==="markerStart"?(O&&Si(O)&&(this.markerStartAngle=0,O.remove()),W&&Si(W)&&(this.markerStartAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!0))):o==="markerEnd"?(O&&Si(O)&&(this.markerEndAngle=0,O.remove()),W&&Si(W)&&(this.markerEndAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!1))):o==="markerMid"&&this.placeMarkerMid(W)}},{key:"transformMarker",value:function(o){var p=this.parsedStyle,C=p.markerStart,O=p.markerEnd,W=p.markerStartOffset,K=p.markerEndOffset,ht=o?C:O;if(!(!ht||!Si(ht))){var Bt=0,ne,Se,ze,We,dn,gn;if(o){var pn=this.getStartTangent(),sn=(0,w.Z)(pn,2),Sn=sn[0],Wn=sn[1];ze=Wn[0],We=Wn[1],ne=Sn[0]-Wn[0],Se=Sn[1]-Wn[1],dn=W||0,gn=this.markerStartAngle}else{var hn=this.getEndTangent(),Ue=(0,w.Z)(hn,2),un=Ue[0],wn=Ue[1];ze=wn[0],We=wn[1],ne=un[0]-wn[0],Se=un[1]-wn[1],dn=K||0,gn=this.markerEndAngle}Bt=Math.atan2(Se,ne),ht.setLocalEulerAngles(Bt*180/Math.PI+gn),ht.setLocalPosition(ze+Math.cos(Bt)*dn,We+Math.sin(Bt)*dn)}}},{key:"placeMarkerMid",value:function(o){var p=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(Bt){Bt.remove()}),o&&Si(o))for(var C=1;C<p.length-1;C++){var O=(0,w.Z)(p[C].currentPoint,2),W=O[0],K=O[1],ht=C===1?o:o.cloneNode(!0);this.markerMidList.push(ht),this.appendChild(ht),ht.setLocalPosition(W,K)}}},{key:"getTotalLength",value:function(){return rr(this)}},{key:"getPointAtLength",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,C=this.parsedStyle.d.absolutePath,O=xr(C,o),W=O.x,K=O.y,ht=A.fF(A.Ue(),A.al(W,K,0),p?this.getWorldTransform():this.getLocalTransform());return new nt(ht[0],ht[1])}},{key:"getPoint",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(o*rr(this),p)}},{key:"getStartTangent",value:function(){var o=this.parsedStyle.d.segments,p=[];if(o.length>1){var C=o[0].currentPoint,O=o[1].currentPoint,W=o[1].startTangent;p=[],W?(p.push([C[0]-W[0],C[1]-W[1]]),p.push([C[0],C[1]])):(p.push([O[0],O[1]]),p.push([C[0],C[1]]))}return p}},{key:"getEndTangent",value:function(){var o=this.parsedStyle.d.segments,p=o.length,C=[];if(p>1){var O=o[p-2].currentPoint,W=o[p-1].currentPoint,K=o[p-1].endTangent;C=[],K?(C.push([W[0]-K[0],W[1]-K[1]]),C.push([W[0],W[1]])):(C.push([O[0],O[1]]),C.push([W[0],W[1]]))}return C}}])}(Ri);ec.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var Ah=["style"],$o=function(d){function v(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,C=(0,Ei.Z)(o,Ah);(0,_.Z)(this,v),s=(0,S.Z)(this,v,[(0,c.Z)({type:ft.POLYGON,style:p,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},C)]),s.markerStartAngle=0,s.markerEndAngle=0,s.markerMidList=[];var O=s.parsedStyle,W=O.markerStart,K=O.markerEnd,ht=O.markerMid;return W&&Si(W)&&(s.markerStartAngle=W.getLocalEulerAngles(),s.appendChild(W)),ht&&Si(ht)&&s.placeMarkerMid(ht),K&&Si(K)&&(s.markerEndAngle=K.getLocalEulerAngles(),s.appendChild(K)),s.transformMarker(!0),s.transformMarker(!1),s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"attributeChangedCallback",value:function(o,p,C,O,W){o==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):o==="markerStartOffset"||o==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):o==="markerStart"?(O&&Si(O)&&(this.markerStartAngle=0,O.remove()),W&&Si(W)&&(this.markerStartAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!0))):o==="markerEnd"?(O&&Si(O)&&(this.markerEndAngle=0,O.remove()),W&&Si(W)&&(this.markerEndAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!1))):o==="markerMid"&&this.placeMarkerMid(W)}},{key:"transformMarker",value:function(o){var p=this.parsedStyle,C=p.markerStart,O=p.markerEnd,W=p.markerStartOffset,K=p.markerEndOffset,ht=p.points,Bt=ht||{},ne=Bt.points,Se=o?C:O;if(!(!Se||!Si(Se)||!ne)){var ze=0,We,dn,gn,pn,sn,Sn;if(gn=ne[0][0],pn=ne[0][1],o)We=ne[1][0]-ne[0][0],dn=ne[1][1]-ne[0][1],sn=W||0,Sn=this.markerStartAngle;else{var Wn=ne.length;this.parsedStyle.isClosed?(We=ne[Wn-1][0]-ne[0][0],dn=ne[Wn-1][1]-ne[0][1]):(gn=ne[Wn-1][0],pn=ne[Wn-1][1],We=ne[Wn-2][0]-ne[Wn-1][0],dn=ne[Wn-2][1]-ne[Wn-1][1]),sn=K||0,Sn=this.markerEndAngle}ze=Math.atan2(dn,We),Se.setLocalEulerAngles(ze*180/Math.PI+Sn),Se.setLocalPosition(gn+Math.cos(ze)*sn,pn+Math.sin(ze)*sn)}}},{key:"placeMarkerMid",value:function(o){var p=this.parsedStyle.points,C=p||{},O=C.points;if(this.markerMidList.forEach(function(ne){ne.remove()}),this.markerMidList=[],o&&Si(o)&&O)for(var W=1;W<(this.parsedStyle.isClosed?O.length:O.length-1);W++){var K=O[W][0],ht=O[W][1],Bt=W===1?o:o.cloneNode(!0);this.markerMidList.push(Bt),this.appendChild(Bt),Bt.setLocalPosition(K,ht)}}}])}(Ri);$o.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var Oh=["style"],nc=function(d){function v(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=s.style,p=(0,Ei.Z)(s,Oh);return(0,_.Z)(this,v),(0,S.Z)(this,v,[(0,c.Z)({type:ft.POLYLINE,style:o,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},p)])}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"getTotalLength",value:function(){return dr(this)}},{key:"getPointAtLength",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(o/this.getTotalLength(),p)}},{key:"getPoint",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,C=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var O=[],W=0,K,ht,Bt=this.getTotalLength();C.forEach(function(pn,sn){C[sn+1]&&(K=[0,0],K[0]=W/Bt,ht=(0,si.Xk)(pn[0],pn[1],C[sn+1][0],C[sn+1][1]),W+=ht,K[1]=W/Bt,O.push(K))}),this.parsedStyle.points.segments=O}var ne=0,Se=0;this.parsedStyle.points.segments.forEach(function(pn,sn){o>=pn[0]&&o<=pn[1]&&(ne=(o-pn[0])/(pn[1]-pn[0]),Se=sn)});var ze=(0,si.U4)(C[Se][0],C[Se][1],C[Se+1][0],C[Se+1][1],ne),We=ze.x,dn=ze.y,gn=A.fF(A.Ue(),A.al(We,dn,0),p?this.getWorldTransform():this.getLocalTransform());return new nt(gn[0],gn[1])}},{key:"getStartTangent",value:function(){var o=this.parsedStyle.points.points,p=[];return p.push([o[1][0],o[1][1]]),p.push([o[0][0],o[0][1]]),p}},{key:"getEndTangent",value:function(){var o=this.parsedStyle.points.points,p=o.length-1,C=[];return C.push([o[p-1][0],o[p-1][1]]),C.push([o[p][0],o[p][1]]),C}}])}($o);nc.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)($o.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var rc=function(d){function v(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,v),(0,S.Z)(this,v,[(0,c.Z)({type:ft.RECT},s)])}return(0,R.Z)(v,d),(0,I.Z)(v)}(Ri);rc.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var Th=["style"],ko=function(d){function v(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=s.style,p=(0,Ei.Z)(s,Th);return(0,_.Z)(this,v),(0,S.Z)(this,v,[(0,c.Z)({type:ft.TEXT,style:(0,c.Z)({fill:"black"},o)},p)])}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"getComputedTextLength",value:function(){var o;return this.getGeometryBounds(),((o=this.parsedStyle.metrics)===null||o===void 0?void 0:o.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var o;return this.getGeometryBounds(),((o=this.parsedStyle.metrics)===null||o===void 0?void 0:o.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Ri);ko.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Ri.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var Ch=function(){function d(){(0,_.Z)(this,d),this.registry={},this.define(ft.CIRCLE,Al),this.define(ft.ELLIPSE,Jl),this.define(ft.RECT,rc),this.define(ft.IMAGE,ql),this.define(ft.LINE,tc),this.define(ft.GROUP,Jo),this.define(ft.PATH,ec),this.define(ft.POLYGON,$o),this.define(ft.POLYLINE,nc),this.define(ft.TEXT,ko),this.define(ft.HTML,$l)}return(0,I.Z)(d,[{key:"define",value:function(s,o){this.registry[s]=o}},{key:"get",value:function(s){return this.registry[s]}}])}(),ud={number:function(v){return new ci(v)},percent:function(v){return new ci(v,"%")},px:function(v){return new ci(v,"px")},em:function(v){return new ci(v,"em")},rem:function(v){return new ci(v,"rem")},deg:function(v){return new ci(v,"deg")},grad:function(v){return new ci(v,"grad")},rad:function(v){return new ci(v,"rad")},turn:function(v){return new ci(v,"turn")},s:function(v){return new ci(v,"s")},ms:function(v){return new ci(v,"ms")},registerProperty:function(v){var s=v.name,o=v.inherits,p=v.interpolable,C=v.initialValue,O=v.syntax;Jn.styleValueRegistry.registerMetadata({n:s,inh:o,int:p,d:C,syntax:O})},registerLayout:function(v,s){Jn.layoutRegistry.registerLayout(v,s)}},Xc=function(d){function v(){var s;(0,_.Z)(this,v),s=(0,S.Z)(this,v),s.defaultView=null,s.ownerDocument=null,s.nodeName="document";try{s.timeline=new Jn.AnimationTimeline(s)}catch(p){}var o={};return Rs.forEach(function(p){var C=p.n,O=p.inh,W=p.d;O&&W&&(o[C]=(0,Yn.Z)(W)?W(ft.GROUP):W)}),s.documentElement=new Jo({id:"g-root",style:o}),s.documentElement.ownerDocument=s,s.documentElement.parentNode=s,s.childNodes=[s.documentElement],s}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(o,p){if(o==="svg")return this.documentElement;var C=this.defaultView.customElements.get(o);C||(console.warn("Unsupported tagName: ",o),C=o==="tspan"?ko:Jo);var O=new C(p);return O.ownerDocument=this,O}},{key:"createElementNS",value:function(o,p,C){return this.createElement(p,C)}},{key:"cloneNode",value:function(o){throw new Error(Wt)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(o){}}},{key:"elementsFromBBox",value:function(o,p,C,O){var W=this.defaultView.context.rBushRoot,K=W.search({minX:o,minY:p,maxX:C,maxY:O}),ht=[];return K.forEach(function(Bt){var ne=Bt.displayObject,Se=ne.parsedStyle.pointerEvents,ze=Se===void 0?"auto":Se,We=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(ze);(!We||We&&ne.isVisible())&&!ne.isCulled()&&ne.isInteractive()&&ht.push(ne)}),ht.sort(function(Bt,ne){return ne.sortable.renderOrder-Bt.sortable.renderOrder}),ht}},{key:"elementFromPointSync",value:function(o,p){var C=this.defaultView.canvas2Viewport({x:o,y:p}),O=C.x,W=C.y,K=this.defaultView.getConfig(),ht=K.width,Bt=K.height;if(O<0||W<0||O>ht||W>Bt)return null;var ne=this.defaultView.viewport2Client({x:O,y:W}),Se=ne.x,ze=ne.y,We=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:o,y:p,viewportX:O,viewportY:W,clientX:Se,clientY:ze},picked:[]}),dn=We.picked;return dn&&dn[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var s=(0,_i.Z)((0,Jr.Z)().mark(function p(C,O){var W,K,ht,Bt,ne,Se,ze,We,dn,gn,pn;return(0,Jr.Z)().wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:if(W=this.defaultView.canvas2Viewport({x:C,y:O}),K=W.x,ht=W.y,Bt=this.defaultView.getConfig(),ne=Bt.width,Se=Bt.height,!(K<0||ht<0||K>ne||ht>Se)){sn.next=1;break}return sn.abrupt("return",null);case 1:return ze=this.defaultView.viewport2Client({x:K,y:ht}),We=ze.x,dn=ze.y,sn.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:C,y:O,viewportX:K,viewportY:ht,clientX:We,clientY:dn},picked:[]});case 2:return gn=sn.sent,pn=gn.picked,sn.abrupt("return",pn&&pn[0]||this.documentElement);case 3:case"end":return sn.stop()}},p,this)}));function o(p,C){return s.apply(this,arguments)}return o}()},{key:"elementsFromPointSync",value:function(o,p){var C=this.defaultView.canvas2Viewport({x:o,y:p}),O=C.x,W=C.y,K=this.defaultView.getConfig(),ht=K.width,Bt=K.height;if(O<0||W<0||O>ht||W>Bt)return[];var ne=this.defaultView.viewport2Client({x:O,y:W}),Se=ne.x,ze=ne.y,We=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:o,y:p,viewportX:O,viewportY:W,clientX:Se,clientY:ze},picked:[]}),dn=We.picked;return dn[dn.length-1]!==this.documentElement&&dn.push(this.documentElement),dn}},{key:"elementsFromPoint",value:function(){var s=(0,_i.Z)((0,Jr.Z)().mark(function p(C,O){var W,K,ht,Bt,ne,Se,ze,We,dn,gn,pn;return(0,Jr.Z)().wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:if(W=this.defaultView.canvas2Viewport({x:C,y:O}),K=W.x,ht=W.y,Bt=this.defaultView.getConfig(),ne=Bt.width,Se=Bt.height,!(K<0||ht<0||K>ne||ht>Se)){sn.next=1;break}return sn.abrupt("return",[]);case 1:return ze=this.defaultView.viewport2Client({x:K,y:ht}),We=ze.x,dn=ze.y,sn.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:C,y:O,viewportX:K,viewportY:ht,clientX:We,clientY:dn},picked:[]});case 2:return gn=sn.sent,pn=gn.picked,pn[pn.length-1]!==this.documentElement&&pn.push(this.documentElement),sn.abrupt("return",pn);case 3:case"end":return sn.stop()}},p,this)}));function o(p,C){return s.apply(this,arguments)}return o}()},{key:"appendChild",value:function(o,p){throw new Error(Tt)}},{key:"insertBefore",value:function(o,p){throw new Error(Tt)}},{key:"removeChild",value:function(o,p){throw new Error(Tt)}},{key:"replaceChild",value:function(o,p,C){throw new Error(Tt)}},{key:"append",value:function(){throw new Error(Tt)}},{key:"prepend",value:function(){throw new Error(Tt)}},{key:"getElementById",value:function(o){return this.documentElement.getElementById(o)}},{key:"getElementsByName",value:function(o){return this.documentElement.getElementsByName(o)}},{key:"getElementsByTagName",value:function(o){return this.documentElement.getElementsByTagName(o)}},{key:"getElementsByClassName",value:function(o){return this.documentElement.getElementsByClassName(o)}},{key:"querySelector",value:function(o){return this.documentElement.querySelector(o)}},{key:"querySelectorAll",value:function(o){return this.documentElement.querySelectorAll(o)}},{key:"find",value:function(o){return this.documentElement.find(o)}},{key:"findAll",value:function(o){return this.documentElement.findAll(o)}}])}(ki),Kc=function(){function d(v){(0,_.Z)(this,d),this.strategies=v}return(0,I.Z)(d,[{key:"apply",value:function(s){var o=s.config,p=s.camera,C=s.renderingService,O=s.renderingContext,W=this.strategies;C.hooks.cull.tap(d.tag,function(K){if(K){var ht,Bt=K.cullable;if(W.length===0?Bt.visible=O.unculledEntities.indexOf(K.entity)>-1:Bt.visible=W.every(function(Se){return Se.isVisible(p,K)}),!K.isCulled()&&K.isVisible())return K;var ne=((ht=o.future)===null||ht===void 0?void 0:ht.experimentalCancelEventPropagation)===!0;return K.dispatchEvent(new ya(Ki.CULLED),ne,ne),null}return K}),C.hooks.afterRender.tap(d.tag,function(K){K.cullable.visibilityPlaneMask=-1})}}])}();Kc.tag="Culling";var Qc=function(){function d(){var v=this;(0,_.Z)(this,d),this.autoPreventDefault=!1,this.rootPointerEvent=new xl(null),this.rootWheelEvent=new Yl(null),this.onPointerMove=function(s){var o,p=(o=v.context.renderingContext.root)===null||o===void 0||(o=o.ownerDocument)===null||o===void 0?void 0:o.defaultView;if(!(p.supportsTouchEvents&&s.pointerType==="touch")){var C=v.normalizeToPointerEvent(s,p),O=(0,Yi.Z)(C),W;try{for(O.s();!(W=O.n()).done;){var K=W.value,ht=v.bootstrapEvent(v.rootPointerEvent,K,p,s);v.context.eventService.mapEvent(ht)}}catch(Bt){O.e(Bt)}finally{O.f()}v.setCursor(v.context.eventService.cursor)}},this.onClick=function(s){var o,p=(o=v.context.renderingContext.root)===null||o===void 0||(o=o.ownerDocument)===null||o===void 0?void 0:o.defaultView,C=v.normalizeToPointerEvent(s,p),O=(0,Yi.Z)(C),W;try{for(O.s();!(W=O.n()).done;){var K=W.value,ht=v.bootstrapEvent(v.rootPointerEvent,K,p,s);v.context.eventService.mapEvent(ht)}}catch(Bt){O.e(Bt)}finally{O.f()}v.setCursor(v.context.eventService.cursor)}}return(0,I.Z)(d,[{key:"apply",value:function(s){var o=this;this.context=s;var p=s.renderingService,C=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(O){var W=o.context.renderingService.hooks.pickSync.call({position:O,picked:[],topmost:!0}),K=W.picked;return K[0]||null}),p.hooks.pointerWheel.tap(d.tag,function(O){var W=o.normalizeWheelEvent(O);o.context.eventService.mapEvent(W)}),p.hooks.pointerDown.tap(d.tag,function(O){if(!(C.supportsTouchEvents&&O.pointerType==="touch")){var W=o.normalizeToPointerEvent(O,C);if(o.autoPreventDefault&&W[0].isNormalized){var K=O.cancelable||!("cancelable"in O);K&&O.preventDefault()}var ht=(0,Yi.Z)(W),Bt;try{for(ht.s();!(Bt=ht.n()).done;){var ne=Bt.value,Se=o.bootstrapEvent(o.rootPointerEvent,ne,C,O);o.context.eventService.mapEvent(Se)}}catch(ze){ht.e(ze)}finally{ht.f()}o.setCursor(o.context.eventService.cursor)}}),p.hooks.pointerUp.tap(d.tag,function(O){if(!(C.supportsTouchEvents&&O.pointerType==="touch")){var W=o.context.contextService.getDomElement(),K=o.context.eventService.isNativeEventFromCanvas(W,O),ht=K?"":"outside",Bt=o.normalizeToPointerEvent(O,C),ne=(0,Yi.Z)(Bt),Se;try{for(ne.s();!(Se=ne.n()).done;){var ze=Se.value,We=o.bootstrapEvent(o.rootPointerEvent,ze,C,O);We.type+=ht,o.context.eventService.mapEvent(We)}}catch(dn){ne.e(dn)}finally{ne.f()}o.setCursor(o.context.eventService.cursor)}}),p.hooks.pointerMove.tap(d.tag,this.onPointerMove),p.hooks.pointerOver.tap(d.tag,this.onPointerMove),p.hooks.pointerOut.tap(d.tag,this.onPointerMove),p.hooks.click.tap(d.tag,this.onClick),p.hooks.pointerCancel.tap(d.tag,function(O){var W=o.normalizeToPointerEvent(O,C),K=(0,Yi.Z)(W),ht;try{for(K.s();!(ht=K.n()).done;){var Bt=ht.value,ne=o.bootstrapEvent(o.rootPointerEvent,Bt,C,O);o.context.eventService.mapEvent(ne)}}catch(Se){K.e(Se)}finally{K.f()}o.setCursor(o.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(s,o,p,C){s.view=p,s.originalEvent=null,s.nativeEvent=C,s.pointerId=o.pointerId,s.width=o.width,s.height=o.height,s.isPrimary=o.isPrimary,s.pointerType=o.pointerType,s.pressure=o.pressure,s.tangentialPressure=o.tangentialPressure,s.tiltX=o.tiltX,s.tiltY=o.tiltY,s.twist=o.twist,this.transferMouseData(s,o);var O=this.context.eventService.client2Viewport({x:o.clientX,y:o.clientY}),W=O.x,K=O.y;s.viewport.x=W,s.viewport.y=K;var ht=this.context.eventService.viewport2Canvas(s.viewport),Bt=ht.x,ne=ht.y;return s.canvas.x=Bt,s.canvas.y=ne,s.global.copyFrom(s.canvas),s.offset.copyFrom(s.canvas),s.isTrusted=C.isTrusted,s.type==="pointerleave"&&(s.type="pointerout"),s.type.startsWith("mouse")&&(s.type=s.type.replace("mouse","pointer")),s.type.startsWith("touch")&&(s.type=vl[s.type]||s.type),s}},{key:"normalizeWheelEvent",value:function(s){var o=this.rootWheelEvent;this.transferMouseData(o,s),o.deltaMode=s.deltaMode,o.deltaX=s.deltaX,o.deltaY=s.deltaY,o.deltaZ=s.deltaZ;var p=this.context.eventService.client2Viewport({x:s.clientX,y:s.clientY}),C=p.x,O=p.y;o.viewport.x=C,o.viewport.y=O;var W=this.context.eventService.viewport2Canvas(o.viewport),K=W.x,ht=W.y;return o.canvas.x=K,o.canvas.y=ht,o.global.copyFrom(o.canvas),o.offset.copyFrom(o.canvas),o.nativeEvent=s,o.type=s.type,o}},{key:"transferMouseData",value:function(s,o){s.isTrusted=o.isTrusted,s.srcElement=o.srcElement,s.timeStamp=To.now(),s.type=o.type,s.altKey=o.altKey,s.metaKey=o.metaKey,s.shiftKey=o.shiftKey,s.ctrlKey=o.ctrlKey,s.button=o.button,s.buttons=o.buttons,s.client.x=o.clientX,s.client.y=o.clientY,s.movement.x=o.movementX,s.movement.y=o.movementY,s.page.x=o.pageX,s.page.y=o.pageY,s.screen.x=o.screenX,s.screen.y=o.screenY,s.relatedTarget=null}},{key:"setCursor",value:function(s){this.context.contextService.applyCursorStyle(s||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(s,o){var p=[];if(o.isTouchEvent(s))for(var C=0;C<s.changedTouches.length;C++){var O=s.changedTouches[C];(0,yn.Z)(O.button)&&(O.button=0),(0,yn.Z)(O.buttons)&&(O.buttons=1),(0,yn.Z)(O.isPrimary)&&(O.isPrimary=s.touches.length===1&&s.type==="touchstart"),(0,yn.Z)(O.width)&&(O.width=O.radiusX||1),(0,yn.Z)(O.height)&&(O.height=O.radiusY||1),(0,yn.Z)(O.tiltX)&&(O.tiltX=0),(0,yn.Z)(O.tiltY)&&(O.tiltY=0),(0,yn.Z)(O.pointerType)&&(O.pointerType="touch"),(0,yn.Z)(O.pointerId)&&(O.pointerId=O.identifier||0),(0,yn.Z)(O.pressure)&&(O.pressure=O.force||.5),(0,yn.Z)(O.twist)&&(O.twist=0),(0,yn.Z)(O.tangentialPressure)&&(O.tangentialPressure=0),O.isNormalized=!0,O.type=s.type,p.push(O)}else if(o.isMouseEvent(s)){var W=s;(0,yn.Z)(W.isPrimary)&&(W.isPrimary=!0),(0,yn.Z)(W.width)&&(W.width=1),(0,yn.Z)(W.height)&&(W.height=1),(0,yn.Z)(W.tiltX)&&(W.tiltX=0),(0,yn.Z)(W.tiltY)&&(W.tiltY=0),(0,yn.Z)(W.pointerType)&&(W.pointerType="mouse"),(0,yn.Z)(W.pointerId)&&(W.pointerId=Zu),(0,yn.Z)(W.pressure)&&(W.pressure=.5),(0,yn.Z)(W.twist)&&(W.twist=0),(0,yn.Z)(W.tangentialPressure)&&(W.tangentialPressure=0),W.isNormalized=!0,p.push(W)}else p.push(s);return p}}])}();Qc.tag="Event";var Nh=[ft.CIRCLE,ft.ELLIPSE,ft.IMAGE,ft.RECT,ft.LINE,ft.POLYLINE,ft.POLYGON,ft.TEXT,ft.PATH,ft.HTML],Ph=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"isVisible",value:function(s,o){var p,C=o.cullable;if(!C.enable)return!0;var O=o.getRenderBounds();if(zt.isEmpty(O))return!1;var W=s.getFrustum(),K=(p=o.parentNode)===null||p===void 0||(p=p.cullable)===null||p===void 0?void 0:p.visibilityPlaneMask;return C.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(o,O,K||$.INDETERMINATE,W.planes),C.visible=C.visibilityPlaneMask!==$.OUTSIDE,C.visible}},{key:"computeVisibilityWithPlaneMask",value:function(s,o,p,C){if(p===$.OUTSIDE||p===$.INSIDE)return p;for(var O=$.INSIDE,W=Nh.indexOf(s.nodeName)>-1,K=0,ht=C.length;K<ht;++K){var Bt=1<<K;if(p&Bt&&!(W&&(K===4||K===5))){var ne=C[K],Se=ne.normal,ze=ne.distance;if(A.AK(Se,o.getPositiveFarPoint(C[K]))+ze<0)return $.OUTSIDE;A.AK(Se,o.getNegativeFarPoint(C[K]))+ze<0&&(O|=Bt)}}return O}}])}(),Jc=function(){function d(){(0,_.Z)(this,d),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return(0,I.Z)(d,[{key:"apply",value:function(s){var o=this,p,C,O=s.config,W=s.renderingService,K=s.renderingContext,ht=s.rBushRoot,Bt=K.root.ownerDocument.defaultView;this.rBush=ht;var ne=function(sn){W.dirtify()},Se=function(sn){o.syncTasks.set(sn.target,sn.detail.affectChildren),W.dirtify()},ze=function(sn){var Sn=sn.target;Jn.enableSizeAttenuation&&Jn.styleValueRegistry.updateSizeAttenuation(Sn,Bt.getCamera().getZoom())},We=function(sn){var Sn=sn.target,Wn=Sn.rBushNode;Wn!=null&&Wn.aabb&&o.rBush.remove(Wn.aabb),o.syncTasks.delete(Sn),Jn.sceneGraphService.dirtyToRoot(Sn),W.dirtify()};W.hooks.init.tap(d.tag,function(){Bt.addEventListener(Ki.MOUNTED,ze),Bt.addEventListener(Ki.UNMOUNTED,We),Bt.addEventListener(Ki.ATTR_MODIFIED,ne),Bt.addEventListener(Ki.BOUNDS_CHANGED,Se)}),W.hooks.destroy.tap(d.tag,function(){Bt.removeEventListener(Ki.MOUNTED,ze),Bt.removeEventListener(Ki.UNMOUNTED,We),Bt.removeEventListener(Ki.ATTR_MODIFIED,ne),Bt.removeEventListener(Ki.BOUNDS_CHANGED,Se),o.syncTasks.clear()});var dn=(p=Jn.globalThis.requestIdleCallback)!==null&&p!==void 0?p:Ho.bind(Jn.globalThis),gn=((C=O.future)===null||C===void 0?void 0:C.experimentalRICSyncRTree)===!0;W.hooks.endFrame.tap(d.tag,function(){o.isFirstTimeRendering?(o.isFirstTimeRendering=!1,o.syncing=!0,dn(function(){o.syncRTree(!0),o.isFirstTimeRenderingFinished=!0})):gn&&Jn.globalThis.requestIdleCallback&&Jn.globalThis.cancelIdleCallback?(Jn.globalThis.cancelIdleCallback(o.ricSyncRTreeId),o.ricSyncRTreeId=Jn.globalThis.requestIdleCallback(function(){return o.syncRTree()})):o.syncRTree()})}},{key:"syncNode",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(s.isConnected){var p=s.rBushNode;p.aabb&&this.rBush.remove(p.aabb);var C=s.getRenderBounds();if(C){var O=s.renderable;o&&(O.dirtyRenderBounds||(O.dirtyRenderBounds=new zt),O.dirtyRenderBounds.update(C.center,C.halfExtents));var W=C.getMin(),K=(0,w.Z)(W,2),ht=K[0],Bt=K[1],ne=C.getMax(),Se=(0,w.Z)(ne,2),ze=Se[0],We=Se[1];p.aabb||(p.aabb={}),p.aabb.displayObject=s,p.aabb.minX=ht,p.aabb.minY=Bt,p.aabb.maxX=ze,p.aabb.maxY=We}if(p.aabb&&!isNaN(p.aabb.maxX)&&!isNaN(p.aabb.maxX)&&!isNaN(p.aabb.minX)&&!isNaN(p.aabb.minY))return p.aabb}}},{key:"syncRTree",value:function(){var s=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!o&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var p=[],C=new Set,O=function(K){if(!C.has(K)&&K.renderable){var ht=s.syncNode(K,o);ht&&(p.push(ht),C.add(K))}};this.syncTasks.forEach(function(W,K){W&&K.forEach(O);for(var ht=K;ht;)O(ht),ht=ht.parentElement}),this.rBush.load(p),p.length=0,this.syncing=!1}}}])}();Jc.tag="Prepare";function hd(d){return!!d.document}var ys=function(d){return d.READY="ready",d.BEFORE_RENDER="beforerender",d.RERENDER="rerender",d.AFTER_RENDER="afterrender",d.BEFORE_DESTROY="beforedestroy",d.AFTER_DESTROY="afterdestroy",d.RESIZE="resize",d.DIRTY_RECTANGLE="dirtyrectangle",d.RENDERER_CHANGED="rendererchanged",d}({}),$c=500,kh=.1,Rh=1e3,qo=new ya(Ki.MOUNTED),tl=new ya(Ki.UNMOUNTED),ho=new ya(ys.BEFORE_RENDER),Js=new ya(ys.RERENDER),el=new ya(ys.AFTER_RENDER),ic=function(d){function v(s){var o;(0,_.Z)(this,v),o=(0,S.Z)(this,v),o.Element=Ri,o.inited=!1,o.context={};var p=s.container,C=s.canvas,O=s.renderer,W=s.width,K=s.height,ht=s.background,Bt=s.cursor,ne=s.supportsMutipleCanvasesInOneContainer,Se=s.cleanUpOnDestroy,ze=Se===void 0?!0:Se,We=s.offscreenCanvas,dn=s.devicePixelRatio,gn=s.requestAnimationFrame,pn=s.cancelAnimationFrame,sn=s.createImage,Sn=s.supportsTouchEvents,Wn=s.supportsPointerEvents,hn=s.isTouchEvent,Ue=s.isMouseEvent,un=s.dblClickSpeed,wn=W,_n=K,kn=dn||Uo&&window.devicePixelRatio||1;return kn=kn>=1?Math.ceil(kn):1,C&&(wn=W||vc(C)||C.width/kn,_n=K||fl(C)||C.height/kn),o.customElements=new Ch,o.devicePixelRatio=kn,o.requestAnimationFrame=gn!=null?gn:Ho.bind(Jn.globalThis),o.cancelAnimationFrame=pn!=null?pn:Ec.bind(Jn.globalThis),o.createImage=sn!=null?sn:function(){return new window.Image},o.supportsTouchEvents=Sn!=null?Sn:"ontouchstart"in Jn.globalThis,o.supportsPointerEvents=Wn!=null?Wn:!!Jn.globalThis.PointerEvent,o.isTouchEvent=hn!=null?hn:function(Un){return o.supportsTouchEvents&&Un instanceof Jn.globalThis.TouchEvent},o.isMouseEvent=Ue!=null?Ue:function(Un){return!Jn.globalThis.MouseEvent||Un instanceof Jn.globalThis.MouseEvent&&(!o.supportsPointerEvents||!(Un instanceof Jn.globalThis.PointerEvent))},We&&(Jn.offscreenCanvas=We),o.document=new Xc,o.document.defaultView=o,ne||dl(p,o,ze),o.initRenderingContext((0,c.Z)((0,c.Z)({},s),{},{width:wn,height:_n,background:ht!=null?ht:"transparent",cursor:Bt!=null?Bt:"default",cleanUpOnDestroy:ze,devicePixelRatio:kn,requestAnimationFrame:o.requestAnimationFrame,cancelAnimationFrame:o.cancelAnimationFrame,createImage:o.createImage,supportsTouchEvents:o.supportsTouchEvents,supportsPointerEvents:o.supportsPointerEvents,isTouchEvent:o.isTouchEvent,isMouseEvent:o.isMouseEvent,dblClickSpeed:un!=null?un:200})),o.initDefaultCamera(wn,_n,O.clipSpaceNearZ),o.initRenderer(O,!0),o}return(0,R.Z)(v,d),(0,I.Z)(v,[{key:"initRenderingContext",value:function(o){this.context.config=o,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(o,p,C){var O=this,W=new Jn.CameraContribution;W.clipSpaceNearZ=C,W.setType(Lr.EXPLORING,Ci.DEFAULT).setPosition(o/2,p/2,$c).setFocalPoint(o/2,p/2,0).setOrthographic(o/-2,o/2,p/2,p/-2,kh,Rh),W.canvas=this,W.eventEmitter.on(Ni.UPDATED,function(){O.context.renderingContext.renderReasons.add(Ko.CAMERA_CHANGED),Jn.enableSizeAttenuation&&O.getConfig().renderer.getConfig().enableSizeAttenuation&&O.updateSizeAttenuation()}),this.context.camera=W}},{key:"updateSizeAttenuation",value:function(){var o=this.getCamera().getZoom();this.document.documentElement.forEach(function(p){Jn.styleValueRegistry.updateSizeAttenuation(p,o)})}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var o=this;return this.readyPromise||(this.readyPromise=new Promise(function(p){o.resolveReadyPromise=function(){p(o)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var o,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,C=arguments.length>1?arguments[1]:void 0;Oi.clearCache();var O=((o=this.getConfig().future)===null||o===void 0?void 0:o.experimentalCancelEventPropagation)===!0;C||this.dispatchEvent(new ya(ys.BEFORE_DESTROY),O,O),this.frameId&&this.cancelAnimationFrame(this.frameId);var W=this.getRoot();p&&(this.unmountChildren(W),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),this.context.rBushRoot&&this.context.rBushRoot.clear(),C||this.dispatchEvent(new ya(ys.AFTER_DESTROY),O,O);var K=function(Bt){Bt.currentTarget=null,Bt.manager=null,Bt.target=null,Bt.relatedNode=null};K(qo),K(tl),K(ho),K(Js),K(el),K(os),K(Kl),K(Ql),K(Gc),Jn.textService.clearCache()}},{key:"changeSize",value:function(o,p){this.resize(o,p)}},{key:"resize",value:function(o,p){var C,O=this.context.config;O.width=o,O.height=p,this.getContextService().resize(o,p);var W=this.context.camera,K=W.getProjectionMode();W.setPosition(o/2,p/2,$c).setFocalPoint(o/2,p/2,0),K===fi.ORTHOGRAPHIC?W.setOrthographic(o/-2,o/2,p/2,p/-2,W.getNear(),W.getFar()):W.setAspect(o/p);var ht=((C=O.future)===null||C===void 0?void 0:C.experimentalCancelEventPropagation)===!0;this.dispatchEvent(new ya(ys.RESIZE,{width:o,height:p}),ht,ht)}},{key:"appendChild",value:function(o,p){return this.document.documentElement.appendChild(o,p)}},{key:"insertBefore",value:function(o,p){return this.document.documentElement.insertBefore(o,p)}},{key:"removeChild",value:function(o){return this.document.documentElement.removeChild(o)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(o){var p,C=this;o&&(ho.detail=o,el.detail=o);var O=((p=this.getConfig().future)===null||p===void 0?void 0:p.experimentalCancelEventPropagation)===!0;this.dispatchEvent(ho,O,O);var W=this.getRenderingService();W.render(this.getConfig(),o,function(){C.dispatchEvent(Js,O,O)}),this.dispatchEvent(el,O,O)}},{key:"run",value:function(){var o=this,p=function(O,W){o.render(W),o.frameId=o.requestAnimationFrame(p)};p()}},{key:"initRenderer",value:function(o){var p=this,C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!o)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new Di,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Qc,new Jc,new Kc([new Ph])),this.loadRendererContainerModule(o),this.context.contextService=new this.context.ContextService((0,c.Z)((0,c.Z)({},Jn),this.context)),this.context.renderingService=new eh(Jn,this.context),this.context.eventService=new th(Jn,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(o,C,!0)):this.context.contextService.initAsync().then(function(){p.initRenderingService(o,C)}).catch(function(O){console.error(O)})}},{key:"initRenderingService",value:function(o){var p=this,C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){var W;p.inited=!0;var K=((W=p.getConfig().future)===null||W===void 0?void 0:W.experimentalCancelEventPropagation)===!0;C?O?p.requestAnimationFrame(function(){p.dispatchEvent(new ya(ys.READY),K,K)}):p.dispatchEvent(new ya(ys.READY),K,K):p.dispatchEvent(new ya(ys.RENDERER_CHANGED),K,K),p.readyPromise&&p.resolveReadyPromise(),C||p.getRoot().forEach(function(ht){var Bt,ne;(Bt=(ne=ht).dirty)===null||Bt===void 0||Bt.call(ne,!0,!0)}),p.mountChildren(p.getRoot()),o.getConfig().enableAutoRendering&&p.run()})}},{key:"loadRendererContainerModule",value:function(o){var p=this,C=o.getPlugins();C.forEach(function(O){O.context=p.context,O.init(Jn)})}},{key:"setRenderer",value:function(o){var p=this.getConfig();if(p.renderer!==o){var C=p.renderer;p.renderer=o,this.destroy(!1,!0),(0,z.Z)((C==null?void 0:C.getPlugins())||[]).reverse().forEach(function(O){O.destroy(Jn)}),this.initRenderer(o)}}},{key:"setCursor",value:function(o){var p=this.getConfig();p.cursor=o,this.getContextService().applyCursorStyle(o)}},{key:"unmountChildren",value:function(o){var p=this;if(o.childNodes.forEach(function(W){p.unmountChildren(W)}),this.inited){if(o.isMutationObserved)o.dispatchEvent(tl);else{var C,O=((C=this.getConfig().future)===null||C===void 0?void 0:C.experimentalCancelEventPropagation)===!0;tl.target=o,this.dispatchEvent(tl,!0,O)}o!==this.document.documentElement&&(o.ownerDocument=null),o.isConnected=!1}o.isCustomElement&&o.disconnectedCallback&&o.disconnectedCallback()}},{key:"mountChildren",value:function(o){var p=this,C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gl(o);if(this.inited){if(!o.isConnected&&(o.ownerDocument=this.document,o.isConnected=!0,!C))if(o.isMutationObserved)o.dispatchEvent(qo);else{var O,W=((O=this.getConfig().future)===null||O===void 0?void 0:O.experimentalCancelEventPropagation)===!0;qo.target=o,this.dispatchEvent(qo,!0,W)}}else console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",o.nodeName);o.childNodes.forEach(function(K){p.mountChildren(K,C)}),o.isCustomElement&&o.connectedCallback&&o.connectedCallback()}},{key:"mountFragment",value:function(o){this.mountChildren(o,!1)}},{key:"client2Viewport",value:function(o){return this.getEventService().client2Viewport(o)}},{key:"viewport2Client",value:function(o){return this.getEventService().viewport2Client(o)}},{key:"viewport2Canvas",value:function(o){return this.getEventService().viewport2Canvas(o)}},{key:"canvas2Viewport",value:function(o){return this.getEventService().canvas2Viewport(o)}},{key:"getPointByClient",value:function(o,p){return this.client2Viewport({x:o,y:p})}},{key:"getClientByPoint",value:function(o,p){return this.viewport2Client({x:o,y:p})}}])}(Rc)},52402:function(yt,Et,y){"use strict";y.d(Et,{TE:function(){return z},U4:function(){return re},Xk:function(){return we},Y1:function(){return Xt},_x:function(){return rn},hE:function(){return Re},l5:function(){return Ee},ph:function(){return Pe},vp:function(){return Rt},x4:function(){return St}});var c=y(94480),_=y(5131),I=y(45545);function z(Lt,Zt,Ut,qt){var se=Lt-Ut,te=Zt-qt;return Math.sqrt(se*se+te*te)}function S(Lt,Zt){var Ut=Math.min.apply(Math,(0,c.Z)(Lt)),qt=Math.min.apply(Math,(0,c.Z)(Zt)),se=Math.max.apply(Math,(0,c.Z)(Lt)),te=Math.max.apply(Math,(0,c.Z)(Zt));return{x:Ut,y:qt,width:se-Ut,height:te-qt}}function R(Lt){return(Lt+Math.PI*2)%(Math.PI*2)}function w(Lt,Zt){var Ut=Math.abs(Lt);return Zt>0?Ut:Ut*-1}function N(Lt,Zt,Ut,qt,se,te){var ke=Ut,He=qt;if(ke===0||He===0)return{x:Lt,y:Zt};for(var Ve=se-Lt,ln=te-Zt,On=Math.abs(Ve),yn=Math.abs(ln),lr=ke*ke,Zn=He*He,Yn=Math.PI/4,ye=0,xr=0,Hn=0;Hn<4;Hn++){ye=ke*Math.cos(Yn),xr=He*Math.sin(Yn);var Br=(lr-Zn)*Math.pow(Math.cos(Yn),3)/ke,Ar=(Zn-lr)*Math.pow(Math.sin(Yn),3)/He,ri=ye-Br,mi=xr-Ar,si=On-Br,Jr=yn-Ar,_i=Math.hypot(mi,ri),Yi=Math.hypot(Jr,si),Ei=_i*Math.asin((ri*Jr-mi*si)/(_i*Yi)),ti=Ei/Math.sqrt(lr+Zn-ye*ye-xr*xr);Yn+=ti,Yn=Math.min(Math.PI/2,Math.max(0,Yn))}return{x:Lt+w(ye,Ve),y:Zt+w(xr,ln)}}function D(Lt,Zt,Ut,qt,se,te,ke,He){return-1*Ut*Math.cos(se)*Math.sin(He)-qt*Math.sin(se)*Math.cos(He)}function A(Lt,Zt,Ut,qt,se,te,ke,He){return-1*Ut*Math.sin(se)*Math.sin(He)+qt*Math.cos(se)*Math.cos(He)}function L(Lt,Zt,Ut){return Math.atan(-Zt/Lt*Math.tan(Ut))}function F(Lt,Zt,Ut){return Math.atan(Zt/(Lt*Math.tan(Ut)))}function it(Lt,Zt,Ut,qt,se,te){return Ut*Math.cos(se)*Math.cos(te)-qt*Math.sin(se)*Math.sin(te)+Lt}function G(Lt,Zt,Ut,qt,se,te){return Ut*Math.sin(se)*Math.cos(te)+qt*Math.cos(se)*Math.sin(te)+Zt}function kt(Lt,Zt,Ut,qt){var se=Math.atan2(qt*Lt,Ut*Zt);return(se+Math.PI*2)%(Math.PI*2)}function gt(Lt,Zt,Ut){return{x:Lt*Math.cos(Ut),y:Zt*Math.sin(Ut)}}function Q(Lt,Zt,Ut){var qt=Math.cos(Ut),se=Math.sin(Ut);return[Lt*qt-Zt*se,Lt*se+Zt*qt]}function Rt(Lt,Zt,Ut,qt,se,te,ke){for(var He=L(Ut,qt,se),Ve=1/0,ln=-1/0,On=[te,ke],yn=-Math.PI*2;yn<=Math.PI*2;yn+=Math.PI){var lr=He+yn;te<ke?te<lr&&lr<ke&&On.push(lr):ke<lr&&lr<te&&On.push(lr)}for(var Zn=0;Zn<On.length;Zn++){var Yn=it(Lt,Zt,Ut,qt,se,On[Zn]);Yn<Ve&&(Ve=Yn),Yn>ln&&(ln=Yn)}for(var ye=F(Ut,qt,se),xr=1/0,Hn=-1/0,Br=[te,ke],Ar=-Math.PI*2;Ar<=Math.PI*2;Ar+=Math.PI){var ri=ye+Ar;te<ke?te<ri&&ri<ke&&Br.push(ri):ke<ri&&ri<te&&Br.push(ri)}for(var mi=0;mi<Br.length;mi++){var si=G(Lt,Zt,Ut,qt,se,Br[mi]);si<xr&&(xr=si),si>Hn&&(Hn=si)}return{x:Ve,y:xr,width:ln-Ve,height:Hn-xr}}function Ct(Lt,Zt,Ut,qt,se,te,ke,He,Ve){var ln=Q(He-Lt,Ve-Zt,-se),On=_slicedToArray(ln,2),yn=On[0],lr=On[1],Zn=N(0,0,Ut,qt,yn,lr),Yn=kt(Ut,qt,Zn.x,Zn.y);Yn<te?Zn=gt(Ut,qt,te):Yn>ke&&(Zn=gt(Ut,qt,ke));var ye=Q(Zn.x,Zn.y,se);return{x:ye[0]+Lt,y:ye[1]+Zt}}function Ht(Lt,Zt,Ut,qt,se,te,ke,He){var Ve=(ke-te)*He+te,ln=D(Lt,Zt,Ut,qt,se,te,ke,Ve),On=A(Lt,Zt,Ut,qt,se,te,ke,Ve);return R(Math.atan2(On,ln))}var de=1e-4;function ue(Lt,Zt,Ut,qt,se,te){var ke=-1,He=1/0,Ve=[Ut,qt],ln=20;te&&te>200&&(ln=te/10);for(var On=1/ln,yn=On/10,lr=0;lr<=ln;lr++){var Zn=lr*On,Yn=[se.apply(void 0,(0,c.Z)(Lt.concat([Zn]))),se.apply(void 0,(0,c.Z)(Zt.concat([Zn])))],ye=z(Ve[0],Ve[1],Yn[0],Yn[1]);ye<He&&(ke=Zn,He=ye)}if(ke===0)return{x:Lt[0],y:Zt[0]};if(ke===1){var xr=Lt.length;return{x:Lt[xr-1],y:Zt[xr-1]}}He=1/0;for(var Hn=0;Hn<32&&!(yn<de);Hn++){var Br=ke-yn,Ar=ke+yn,ri=[se.apply(void 0,(0,c.Z)(Lt.concat([Br]))),se.apply(void 0,(0,c.Z)(Zt.concat([Br])))],mi=z(Ve[0],Ve[1],ri[0],ri[1]);if(Br>=0&&mi<He)ke=Br,He=mi;else{var si=[se.apply(void 0,(0,c.Z)(Lt.concat([Ar]))),se.apply(void 0,(0,c.Z)(Zt.concat([Ar])))],Jr=z(Ve[0],Ve[1],si[0],si[1]);Ar<=1&&Jr<He?(ke=Ar,He=Jr):yn*=.5}}return{x:se.apply(void 0,(0,c.Z)(Lt.concat([ke]))),y:se.apply(void 0,(0,c.Z)(Zt.concat([ke])))}}function Te(Lt,Zt){for(var Ut=0,qt=Lt.length,se=0;se<qt;se++){var te=Lt[se],ke=Zt[se],He=Lt[(se+1)%qt],Ve=Zt[(se+1)%qt];Ut+=z(te,ke,He,Ve)}return Ut/2}function be(Lt,Zt,Ut,qt){return S([Lt,Ut],[Zt,qt])}function we(Lt,Zt,Ut,qt){return z(Lt,Zt,Ut,qt)}function re(Lt,Zt,Ut,qt,se){return{x:(1-se)*Lt+se*Ut,y:(1-se)*Zt+se*qt}}function Ge(Lt,Zt,Ut,qt,se,te){var ke=(Ut-Lt)*(se-Lt)+(qt-Zt)*(te-Zt);if(ke<0)return z(Lt,Zt,se,te);var He=(Ut-Lt)*(Ut-Lt)+(qt-Zt)*(qt-Zt);return ke>He?z(Ut,qt,se,te):rn(Lt,Zt,Ut,qt,se,te)}function rn(Lt,Zt,Ut,qt,se,te){var ke=[Ut-Lt,qt-Zt];if(I.I6(ke,[0,0]))return Math.sqrt((se-Lt)*(se-Lt)+(te-Zt)*(te-Zt));var He=[-ke[1],ke[0]];I.Fv(He,He);var Ve=[se-Lt,te-Zt];return Math.abs(I.AK(Ve,He))}function Xe(Lt,Zt,Ut,qt){return Math.atan2(qt-Zt,Ut-Lt)}function En(Lt,Zt,Ut,qt,se){var te=1-se;return te*te*te*Lt+3*Zt*se*te*te+3*Ut*se*se*te+qt*se*se*se}function Pn(Lt,Zt,Ut,qt,se){var te=1-se;return 3*(te*te*(Zt-Lt)+2*te*se*(Ut-Zt)+se*se*(qt-Ut))}function tn(Lt,Zt,Ut,qt){var se=-3*Lt+9*Zt-9*Ut+3*qt,te=6*Lt-12*Zt+6*Ut,ke=3*Zt-3*Lt,He=[],Ve,ln,On;if((0,_.Z)(se,0))(0,_.Z)(te,0)||(Ve=-ke/te,Ve>=0&&Ve<=1&&He.push(Ve));else{var yn=te*te-4*se*ke;(0,_.Z)(yn,0)?He.push(-te/(2*se)):yn>0&&(On=Math.sqrt(yn),Ve=(-te+On)/(2*se),ln=(-te-On)/(2*se),Ve>=0&&Ve<=1&&He.push(Ve),ln>=0&&ln<=1&&He.push(ln))}return He}function xn(Lt,Zt,Ut,qt,se,te,ke,He,Ve){var ln=En(Lt,Ut,se,ke,Ve),On=En(Zt,qt,te,He,Ve),yn=re(Lt,Zt,Ut,qt,Ve),lr=re(Ut,qt,se,te,Ve),Zn=re(se,te,ke,He,Ve),Yn=re(yn.x,yn.y,lr.x,lr.y,Ve),ye=re(lr.x,lr.y,Zn.x,Zn.y,Ve);return[[Lt,Zt,yn.x,yn.y,Yn.x,Yn.y,ln,On],[ln,On,ye.x,ye.y,Zn.x,Zn.y,ke,He]]}function It(Lt,Zt,Ut,qt,se,te,ke,He,Ve){if(Ve===0)return Te([Lt,Ut,se,ke],[Zt,qt,te,He]);var ln=xn(Lt,Zt,Ut,qt,se,te,ke,He,.5),On=[].concat(_toConsumableArray(ln[0]),[Ve-1]),yn=[].concat(_toConsumableArray(ln[1]),[Ve-1]);return It.apply(void 0,_toConsumableArray(On))+It.apply(void 0,_toConsumableArray(yn))}function Ee(Lt,Zt,Ut,qt,se,te,ke,He){for(var Ve=[Lt,ke],ln=[Zt,He],On=tn(Lt,Ut,se,ke),yn=tn(Zt,qt,te,He),lr=0;lr<On.length;lr++)Ve.push(En(Lt,Ut,se,ke,On[lr]));for(var Zn=0;Zn<yn.length;Zn++)ln.push(En(Zt,qt,te,He,yn[Zn]));return S(Ve,ln)}function fn(Lt,Zt,Ut,qt,se,te,ke,He){return It(Lt,Zt,Ut,qt,se,te,ke,He,3)}function on(Lt,Zt,Ut,qt,se,te,ke,He,Ve,ln,On){return ue([Lt,Ut,se,ke],[Zt,qt,te,He],Ve,ln,En,On)}function Pe(Lt,Zt,Ut,qt,se,te,ke,He,Ve,ln,On){var yn=on(Lt,Zt,Ut,qt,se,te,ke,He,Ve,ln,On);return z(yn.x,yn.y,Ve,ln)}function Ze(Lt,Zt,Ut,qt,se,te,ke,He,Ve){return{x:En(Lt,Ut,se,ke,Ve),y:En(Zt,qt,te,He,Ve)}}function Ke(Lt,Zt,Ut,qt,se,te,ke,He,Ve){var ln=Pn(Lt,Ut,se,ke,Ve),On=Pn(Zt,qt,te,He,Ve);return R(Math.atan2(On,ln))}function le(Lt){for(var Zt=0,Ut=[],qt=0;qt<Lt.length-1;qt++){var se=Lt[qt],te=Lt[qt+1],ke=z(se[0],se[1],te[0],te[1]),He={from:se,to:te,length:ke};Ut.push(He),Zt+=ke}return{segments:Ut,totalLength:Zt}}function Ae(Lt){if(Lt.length<2)return 0;for(var Zt=0,Ut=0;Ut<Lt.length-1;Ut++){var qt=Lt[Ut],se=Lt[Ut+1];Zt+=z(qt[0],qt[1],se[0],se[1])}return Zt}function Pt(Lt,Zt){if(Zt>1||Zt<0||Lt.length<2)return null;var Ut=le(Lt),qt=Ut.segments,se=Ut.totalLength;if(se===0)return{x:Lt[0][0],y:Lt[0][1]};for(var te=0,ke=null,He=0;He<qt.length;He++){var Ve=qt[He],ln=Ve.from,On=Ve.to,yn=Ve.length/se;if(Zt>=te&&Zt<=te+yn){var lr=(Zt-te)/yn;ke=re(ln[0],ln[1],On[0],On[1],lr);break}te+=yn}return ke}function wt(Lt,Zt){if(Zt>1||Zt<0||Lt.length<2)return 0;for(var Ut=le(Lt),qt=Ut.segments,se=Ut.totalLength,te=0,ke=0,He=0;He<qt.length;He++){var Ve=qt[He],ln=Ve.from,On=Ve.to,yn=Ve.length/se;if(Zt>=te&&Zt<=te+yn){ke=Math.atan2(On[1]-ln[1],On[0]-ln[0]);break}te+=yn}return ke}function he(Lt,Zt,Ut){for(var qt=1/0,se=0;se<Lt.length-1;se++){var te=Lt[se],ke=Lt[se+1],He=Ge(te[0],te[1],ke[0],ke[1],Zt,Ut);He<qt&&(qt=He)}return qt}function je(Lt){for(var Zt=[],Ut=[],qt=0;qt<Lt.length;qt++){var se=Lt[qt];Zt.push(se[0]),Ut.push(se[1])}return S(Zt,Ut)}function Re(Lt){return Ae(Lt)}function ce(Lt,Zt){return Pt(Lt,Zt)}function Le(Lt,Zt,Ut){return he(Lt,Zt,Ut)}function xe(Lt,Zt){return wt(Lt,Zt)}function _t(Lt){var Zt=Lt.slice(0);return Lt.length&&Zt.push(Lt[0]),Zt}function ie(Lt){return je(Lt)}function Me(Lt){return Ae(_t(Lt))}function T(Lt,Zt){return Pt(_t(Lt),Zt)}function at(Lt,Zt,Ut){return he(_t(Lt),Zt,Ut)}function fe(Lt,Zt){return wt(_t(Lt),Zt)}function Jt(Lt,Zt,Ut,qt){var se=1-qt;return se*se*Lt+2*qt*se*Zt+qt*qt*Ut}function Ie(Lt,Zt,Ut){var qt=Lt+Ut-2*Zt;if((0,_.Z)(qt,0))return[.5];var se=(Lt-Zt)/qt;return se<=1&&se>=0?[se]:[]}function Ne(Lt,Zt,Ut,qt,se,te,ke){var He=Jt(Lt,Ut,se,ke),Ve=Jt(Zt,qt,te,ke),ln=re(Lt,Zt,Ut,qt,ke),On=re(Ut,qt,se,te,ke);return[[Lt,Zt,ln.x,ln.y,He,Ve],[He,Ve,On.x,On.y,se,te]]}function en(Lt,Zt,Ut,qt,se,te,ke){if(ke===0)return(z(Lt,Zt,Ut,qt)+z(Ut,qt,se,te)+z(Lt,Zt,se,te))/2;var He=Ne(Lt,Zt,Ut,qt,se,te,.5),Ve=He[0],ln=He[1];return Ve.push(ke-1),ln.push(ke-1),en.apply(void 0,_toConsumableArray(Ve))+en.apply(void 0,_toConsumableArray(ln))}function St(Lt,Zt,Ut,qt,se,te){var ke=Ie(Lt,Ut,se)[0],He=Ie(Zt,qt,te)[0],Ve=[Lt,se],ln=[Zt,te];return ke!==void 0&&Ve.push(Jt(Lt,Ut,se,ke)),He!==void 0&&ln.push(Jt(Zt,qt,te,He)),S(Ve,ln)}function tt(Lt,Zt,Ut,qt,se,te){return en(Lt,Zt,Ut,qt,se,te,3)}function Nt(Lt,Zt,Ut,qt,se,te,ke,He){return ue([Lt,Ut,se],[Zt,qt,te],ke,He,Jt)}function Xt(Lt,Zt,Ut,qt,se,te,ke,He){var Ve=Nt(Lt,Zt,Ut,qt,se,te,ke,He);return z(Ve.x,Ve.y,ke,He)}},95194:function(yt,Et,y){"use strict";y.d(Et,{S:function(){return L}});var c=y(33885),_=y(67732),I=y(83652),z=y(22214),S=y(42403),R=y(9350),w=y(75044),N=y(3202),D=y(68901);var A=function(){function F(it){(0,_.Z)(this,F),this.dragndropPluginOptions=it}return(0,I.Z)(F,[{key:"apply",value:function(G){var kt=this,gt=G.renderingService,Q=G.renderingContext,Rt=Q.root.ownerDocument,Ct=Rt.defaultView,Ht=function(ue){var Te=ue.target,be=Te===Rt,we=be&&kt.dragndropPluginOptions.isDocumentDraggable?Rt:Te.closest&&Te.closest("[draggable=true]");if(we){var re=!1,Ge=ue.timeStamp,rn=[ue.clientX,ue.clientY],Xe=null,En=[ue.clientX,ue.clientY],Pn=function(){var xn=(0,N.Z)((0,w.Z)().mark(function It(Ee){var fn,on,Pe,Ze,Ke,le;return(0,w.Z)().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(re){Ae.next=2;break}if(fn=Ee.timeStamp-Ge,on=(0,D.y)([Ee.clientX,Ee.clientY],rn),!(fn<=kt.dragndropPluginOptions.dragstartTimeThreshold||on<=kt.dragndropPluginOptions.dragstartDistanceThreshold)){Ae.next=1;break}return Ae.abrupt("return");case 1:Ee.type="dragstart",we.dispatchEvent(Ee),re=!0;case 2:if(Ee.type="drag",Ee.dx=Ee.clientX-En[0],Ee.dy=Ee.clientY-En[1],we.dispatchEvent(Ee),En=[Ee.clientX,Ee.clientY],be){Ae.next=4;break}return Pe=kt.dragndropPluginOptions.overlap==="pointer"?[Ee.canvasX,Ee.canvasY]:Te.getBounds().center,Ae.next=3,Rt.elementsFromPoint(Pe[0],Pe[1]);case 3:Ze=Ae.sent,Ke=Ze[Ze.indexOf(Te)+1],le=(Ke==null?void 0:Ke.closest("[droppable=true]"))||(kt.dragndropPluginOptions.isDocumentDroppable?Rt:null),Xe!==le&&(Xe&&(Ee.type="dragleave",Ee.target=Xe,Xe.dispatchEvent(Ee)),le&&(Ee.type="dragenter",Ee.target=le,le.dispatchEvent(Ee)),Xe=le,Xe&&(Ee.type="dragover",Ee.target=Xe,Xe.dispatchEvent(Ee)));case 4:case"end":return Ae.stop()}},It)}));return function(Ee){return xn.apply(this,arguments)}}();Ct.addEventListener("pointermove",Pn);var tn=function(It){if(re){It.detail={preventClick:!0};var Ee=It.clone();Xe&&(Ee.type="drop",Ee.target=Xe,Xe.dispatchEvent(Ee)),Ee.type="dragend",we.dispatchEvent(Ee),re=!1}Ct.removeEventListener("pointermove",Pn)};Te.addEventListener("pointerup",tn,{once:!0}),Te.addEventListener("pointerupoutside",tn,{once:!0})}};gt.hooks.init.tap(F.tag,function(){Ct.addEventListener("pointerdown",Ht)}),gt.hooks.destroy.tap(F.tag,function(){Ct.removeEventListener("pointerdown",Ht)})}}])}();A.tag="Dragndrop";var L=function(F){function it(){var G,kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,it),G=(0,z.Z)(this,it),G.name="dragndrop",G.options=kt,G}return(0,S.Z)(it,F),(0,I.Z)(it,[{key:"init",value:function(){this.addRenderingPlugin(new A((0,c.Z)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(kt){Object.assign(this.plugins[0].dragndropPluginOptions,kt)}}])}(R.F6)},84245:function(yt,Et,y){"use strict";y.d(Et,{kJ:function(){return Du},RN:function(){return Rv}});var c={};y.r(c),y.d(c,{circle:function(){return gr},diamond:function(){return _r},rect:function(){return Nr},simple:function(){return Wr},triangle:function(){return mr},triangleRect:function(){return Zr},vee:function(){return Or}});var _=y(7225),I=y(18178),z=y(76075),S=y(62099),R=y(93785);const w={duration:500},N={duration:1e3,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",iterations:1,fill:"both"},D={CHANGE:"change"};var A;(function(r){r.NodeAdded="NodeAdded",r.NodeUpdated="NodeUpdated",r.NodeRemoved="NodeRemoved",r.EdgeAdded="EdgeAdded",r.EdgeUpdated="EdgeUpdated",r.EdgeRemoved="EdgeRemoved",r.ComboAdded="ComboAdded",r.ComboUpdated="ComboUpdated",r.ComboRemoved="ComboRemoved"})(A||(A={}));var L;(function(r){r.DRAW="draw",r.COLLAPSE="collapse",r.EXPAND="expand",r.TRANSFORM="transform"})(L||(L={}));var F;(function(r){r.CLICK="canvas:click",r.DBLCLICK="canvas:dblclick",r.POINTER_OVER="canvas:pointerover",r.POINTER_LEAVE="canvas:pointerleave",r.POINTER_ENTER="canvas:pointerenter",r.POINTER_MOVE="canvas:pointermove",r.POINTER_OUT="canvas:pointerout",r.POINTER_DOWN="canvas:pointerdown",r.POINTER_UP="canvas:pointerup",r.CONTEXT_MENU="canvas:contextmenu",r.DRAG_START="canvas:dragstart",r.DRAG="canvas:drag",r.DRAG_END="canvas:dragend",r.DRAG_ENTER="canvas:dragenter",r.DRAG_OVER="canvas:dragover",r.DRAG_LEAVE="canvas:dragleave",r.DROP="canvas:drop",r.WHEEL="canvas:wheel"})(F||(F={}));var it;(function(r){r.CLICK="combo:click",r.DBLCLICK="combo:dblclick",r.POINTER_OVER="combo:pointerover",r.POINTER_LEAVE="combo:pointerleave",r.POINTER_ENTER="combo:pointerenter",r.POINTER_MOVE="combo:pointermove",r.POINTER_OUT="combo:pointerout",r.POINTER_DOWN="combo:pointerdown",r.POINTER_UP="combo:pointerup",r.CONTEXT_MENU="combo:contextmenu",r.DRAG_START="combo:dragstart",r.DRAG="combo:drag",r.DRAG_END="combo:dragend",r.DRAG_ENTER="combo:dragenter",r.DRAG_OVER="combo:dragover",r.DRAG_LEAVE="combo:dragleave",r.DROP="combo:drop"})(it||(it={}));var G;(function(r){r.CLICK="click",r.DBLCLICK="dblclick",r.POINTER_OVER="pointerover",r.POINTER_LEAVE="pointerleave",r.POINTER_ENTER="pointerenter",r.POINTER_MOVE="pointermove",r.POINTER_OUT="pointerout",r.POINTER_DOWN="pointerdown",r.POINTER_UP="pointerup",r.CONTEXT_MENU="contextmenu",r.DRAG_START="dragstart",r.DRAG="drag",r.DRAG_END="dragend",r.DRAG_ENTER="dragenter",r.DRAG_OVER="dragover",r.DRAG_LEAVE="dragleave",r.DROP="drop",r.KEY_DOWN="keydown",r.KEY_UP="keyup",r.WHEEL="wheel",r.PINCH="pinch"})(G||(G={}));var kt;(function(r){r.KEY_DOWN="keydown",r.KEY_UP="keyup"})(kt||(kt={}));var gt;(function(r){r.CLICK="edge:click",r.DBLCLICK="edge:dblclick",r.POINTER_OVER="edge:pointerover",r.POINTER_LEAVE="edge:pointerleave",r.POINTER_ENTER="edge:pointerenter",r.POINTER_MOVE="edge:pointermove",r.POINTER_OUT="edge:pointerout",r.POINTER_DOWN="edge:pointerdown",r.POINTER_UP="edge:pointerup",r.CONTEXT_MENU="edge:contextmenu",r.DRAG_ENTER="edge:dragenter",r.DRAG_OVER="edge:dragover",r.DRAG_LEAVE="edge:dragleave",r.DROP="edge:drop"})(gt||(gt={}));var Q;(function(r){r.BEFORE_CANVAS_INIT="beforecanvasinit",r.AFTER_CANVAS_INIT="aftercanvasinit",r.BEFORE_SIZE_CHANGE="beforesizechange",r.AFTER_SIZE_CHANGE="aftersizechange",r.BEFORE_ELEMENT_CREATE="beforeelementcreate",r.AFTER_ELEMENT_CREATE="afterelementcreate",r.BEFORE_ELEMENT_UPDATE="beforeelementupdate",r.AFTER_ELEMENT_UPDATE="afterelementupdate",r.BEFORE_ELEMENT_DESTROY="beforeelementdestroy",r.AFTER_ELEMENT_DESTROY="afterelementdestroy",r.BEFORE_ELEMENT_TRANSLATE="beforeelementtranslate",r.AFTER_ELEMENT_TRANSLATE="afterelementtranslate",r.BEFORE_DRAW="beforedraw",r.AFTER_DRAW="afterdraw",r.BEFORE_RENDER="beforerender",r.AFTER_RENDER="afterrender",r.BEFORE_ANIMATE="beforeanimate",r.AFTER_ANIMATE="afteranimate",r.BEFORE_LAYOUT="beforelayout",r.AFTER_LAYOUT="afterlayout",r.BEFORE_STAGE_LAYOUT="beforestagelayout",r.AFTER_STAGE_LAYOUT="afterstagelayout",r.BEFORE_TRANSFORM="beforetransform",r.AFTER_TRANSFORM="aftertransform",r.BATCH_START="batchstart",r.BATCH_END="batchend",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.BEFORE_RENDERER_CHANGE="beforerendererchange",r.AFTER_RENDERER_CHANGE="afterrendererchange"})(Q||(Q={}));var Rt;(function(r){r.UNDO="undo",r.REDO="redo",r.CANCEL="cancel",r.ADD="add",r.CLEAR="clear",r.CHANGE="change"})(Rt||(Rt={}));var Ct;(function(r){r.CLICK="node:click",r.DBLCLICK="node:dblclick",r.POINTER_OVER="node:pointerover",r.POINTER_LEAVE="node:pointerleave",r.POINTER_ENTER="node:pointerenter",r.POINTER_MOVE="node:pointermove",r.POINTER_OUT="node:pointerout",r.POINTER_DOWN="node:pointerdown",r.POINTER_UP="node:pointerup",r.CONTEXT_MENU="node:contextmenu",r.DRAG_START="node:dragstart",r.DRAG="node:drag",r.DRAG_END="node:dragend",r.DRAG_ENTER="node:dragenter",r.DRAG_OVER="node:dragover",r.DRAG_LEAVE="node:dragleave",r.DROP="node:drop"})(Ct||(Ct={}));const Ht="combo",de="tree";var ue;(function(r){r.NODE="node",r.EDGE="edge",r.COMBO="combo",r.THEME="theme",r.PALETTE="palette",r.LAYOUT="layout",r.BEHAVIOR="behavior",r.PLUGIN="plugin",r.ANIMATION="animation",r.TRANSFORM="transform",r.SHAPE="shape"})(ue||(ue={}));const Te={animation:{},behavior:{},combo:{},edge:{},layout:{},node:{},palette:{},theme:{},plugin:{},transform:{},shape:{}};function be(r,t){var e;const n=(e=Te[r])===null||e===void 0?void 0:e[t];if(n)return n}function we(r){return EXTENSION_REGISTRY[r]}const re="5.0.50",Ge="G6";function rn(r){return`[${Ge} v${re}] ${r}`}const Xe={mute:!1,debug:r=>{!Xe.mute&&console.debug(rn(r))},info:r=>{!Xe.mute&&console.info(rn(r))},warn:r=>{!Xe.mute&&console.warn(rn(r))},error:r=>{!Xe.mute&&console.error(rn(r))}};function En(r){const{theme:t}=r;if(!t)return{};const e=be(ue.THEME,t);return e||(Xe.warn(`The theme of ${t} is not registered.`),{})}function Pn(r,t){if(Array.isArray(r)&&r.length===0)return null;const e=Array.isArray(r)?r[0]:r,n=Array.isArray(r)?r.slice(1):t||[];return new Proxy(e,{get(i,a){return typeof i[a]=="function"&&!["onframe","onfinish"].includes(a)?(...l)=>{i[a](...l),n.forEach(u=>{var f;return(f=u[a])===null||f===void 0?void 0:f.call(u,...l)})}:a==="finished"?Promise.all([e.finished,...n.map(l=>l.finished)]):Reflect.get(i,a)},set(i,a,l){return["onframe","onfinish"].includes(a)||n.forEach(u=>{u[a]=l}),Reflect.set(i,a,l)}})}function tn(r){const t=r.reduce((n,i)=>(Object.entries(i).forEach(([a,l])=>{n[a]===void 0?n[a]=[l]:n[a].push(l)}),n),{});Object.entries(t).forEach(([n,i])=>{(i.length!==r.length||i.some(a=>(0,z.Z)(a))||i.every(a=>!["sourceNode","targetNode","childrenNode"].includes(n)&&(0,S.Z)(a,i[0])))&&delete t[n]});const e=Object.entries(t).reduce((n,[i,a])=>(a.forEach((l,u)=>{n[u]?n[u][i]=l:n[u]={[i]:l}}),n),[]);return r.length!==0&&e.length===0&&e.push({_:0},{_:0}),e}function xn(r){switch(r){case"opacity":return 1;case"x":case"y":case"z":case"zIndex":return 0;case"visibility":return"visible";case"collapsed":return!1;case"states":return[];default:return}}function It(r,t){const{animation:e}=r;if(e===!1||t===!1)return!1;const n=Object.assign({},w);return(0,R.Z)(e)&&Object.assign(n,e),(0,R.Z)(t)&&Object.assign(n,t),n}function Ee(r){if(typeof r=="string"){const t=be(ue.ANIMATION,r);return t||(Xe.warn(`The animation of ${r} is not registered.`),[])}return r}function fn(r,t,e,n){var i,a;const{animation:l}=r;if(l===!1||n===!1)return[];const u=(i=r==null?void 0:r[t])===null||i===void 0?void 0:i.animation;if(u===!1)return[];const f=u==null?void 0:u[e];if(f===!1)return[];const m=(a=En(r)[t])===null||a===void 0?void 0:a.animation,x=(V=[])=>Ee(V).map(et=>Object.assign(Object.assign(Object.assign(Object.assign({},N),(0,R.Z)(l)&&l),et),(0,R.Z)(n)&&n));if(f)return x(f);if(!m)return[];const Z=m[e];return Z===!1?[]:x(Z)}var on=y(1933);function Pe(r,t,e,n=[]){if(!n&&r===0&&t===0&&e===0)return null;if(Array.isArray(n)){let a=-1;const l=[];for(let u=0;u<n.length;u++){const f=n[u];if(f[0]==="translate"){if(f[1]===r&&f[2]===t)return null;a=u,l.push(["translate",r,t])}else if(f[0]==="translate3d"){if(f[1]===r&&f[2]===t&&f[3]===e)return null;a=u,l.push(["translate3d",r,t,e!=null?e:0])}else l.push(f)}return a===-1&&l.splice(0,0,(0,on.Z)(e)?["translate3d",r,t,e!=null?e:0]:["translate",r,t]),l.length===0?null:l}const i=n?n.replace(/translate(3d)?\([^)]*\)/g,""):"";return e===0?`translate(${r}, ${t})${i}`:`translate3d(${r}, ${t}, ${e})${i}`}var Ze=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const Ke=(r,t,e)=>{if(!e.length)return null;const[n,i]=t,a=m=>{var x;if(m){const Z=r.getShape(m);if(!Z)return null;const V=`get${(0,I.Z)(m)}Style`,et=((x=r==null?void 0:r[V])===null||x===void 0?void 0:x.bind(r))||(Dt=>Dt),dt=(et==null?void 0:et(n))||{},At=(et==null?void 0:et(i))||{};return{shape:Z,fromStyle:dt,toStyle:At}}else return{shape:r,fromStyle:n,toStyle:i}};let l;const u=e.map(m=>{var{fields:x,shape:Z,states:V}=m,et=Ze(m,["fields","shape","states"]);const dt=a(Z);if(!dt)return null;const{shape:At,fromStyle:Dt,toStyle:Qt}=dt,oe=[{},{}];if(x.forEach(Be=>{var vn,nn;Object.assign(oe[0],{[Be]:(vn=Dt[Be])!==null&&vn!==void 0?vn:xn(Be)}),Object.assign(oe[1],{[Be]:(nn=Qt[Be])!==null&&nn!==void 0?nn:xn(Be)})}),oe.some(Be=>Object.keys(Be).some(vn=>["x","y","z"].includes(vn)))){const{x:Be=0,y:vn=0,z:nn,transform:An=""}=At.attributes||{};oe.forEach($e=>{var zn,cr,fr;$e.transform=Pe((zn=$e.x)!==null&&zn!==void 0?zn:Be,(cr=$e.y)!==null&&cr!==void 0?cr:vn,(fr=$e.z)!==null&&fr!==void 0?fr:nn,An)})}const pe=At.animate(tn(oe),et);return Z===void 0&&(l=pe),pe}).filter(Boolean),f=l||(u==null?void 0:u[0]);return f?Pn(f,u.filter(m=>m!==m)):null},le=[{fields:["opacity"]}],Ae=[{fields:["x","y"]}],Pt=[{fields:["x","y"]}],wt=Pt,he=[{fields:["sourceNode","targetNode"]}],je=he,Re=[{fields:["childrenNode","x","y"]}],ce=Re,Le=[{fields:["childrenNode","x","y"]}];var xe=y(71018),_t=y(15610),ie=y(62199),Me=y(37547);function T(r){return"source"in r&&"target"in r}function at(r){return r.length===2}function fe(r){return r.length===3}function Jt(r){return r instanceof Float32Array?!0:Array.isArray(r)&&(r.length===2||r.length===3)?r.every(t=>typeof t=="number"):!1}function Ie(r,t,e){return r>=t&&r<=e}function Ne(r=0){if(Array.isArray(r)){const[t=0,e=t,n=t,i=e]=r;return[t,e,n,i]}return[r,r,r,r]}function en(r=0){const t=Ne(r);return t[0]+t[2]}function St(r=0){const t=Ne(r);return t[1]+t[3]}function tt(r){return r.max[0]-r.min[0]}function Nt(r){return r.max[1]-r.min[1]}function Xt(r){return[tt(r),Nt(r)]}function Lt(r,t){const e=Jt(r)?Zt(r):r.getShape("key").getBounds();return t?Ut(e,t):e}function Zt(r){const[t,e,n=0]=r,i=new _.mN;return i.setMinMax([t,e,n],[t,e,n]),i}function Ut(r,t){const[e,n,i,a]=Ne(t),[l,u,f]=r.min,[m,x,Z]=r.max,V=new _.mN;return V.setMinMax([l-a,u-e,f],[m+n,x+i,Z]),V}function qt(r){if(r.length===0)return new _.mN;if(r.length===1)return r[0];const t=new _.mN;t.setMinMax(r[0].min,r[0].max);for(let e=1;e<r.length;e++){const n=r[e];t.setMinMax([Math.min(t.min[0],n.min[0]),Math.min(t.min[1],n.min[1]),Math.min(t.min[2],n.min[2])],[Math.max(t.max[0],n.max[0]),Math.max(t.max[1],n.max[1]),Math.max(t.max[2],n.max[2])])}return t}function se(r,t){const[e,n]=r.min,[i,a]=r.max,[l,u]=t.min,[f,m]=t.max;return e>=l&&i<=f&&n>=u&&a<=m}function te(r,t){return Ie(r[0],t.min[0],t.max[0])&&Ie(r[1],t.min[1],t.max[1])}function ke(r,t,e=!1){const{min:[n,i],max:[a,l]}=t,u=(r[1]===i||r[1]===l)&&(e||Ie(r[0],n,a)),f=(r[0]===n||r[0]===a)&&(e||Ie(r[1],i,l));return u||f}function He(r,t){return!te(r,t)}function Ve(r,t){const{center:e}=t;return r[0]===e[0]&&r[1]===e[1]}function ln(r,t){const[e,n]=r,[i,a]=t.min,[l,u]=t.max,f=e-i,m=l-e,x=n-a,Z=u-n,V=Math.min(f,m,x,Z);return V===f?"left":V===m?"right":V===x?"top":V===Z?"bottom":"left"}function On(r,t){const e=(0,Me.Z)(r);if(te(r,t))switch(ln(r,t)){case"left":e[0]=t.min[0];break;case"right":e[0]=t.max[0];break;case"top":e[1]=t.min[1];break;case"bottom":e[1]=t.max[1];break}else{const[n,i]=r,[a,l]=t.min,[u,f]=t.max;e[0]=Ie(n,a,u)?n:n<a?a:u,e[1]=Ie(i,l,f)?i:i<l?l:f}return e}function yn(r,t){const{center:e}=r,[n,i]=Xt(r),a=t==="up"||t==="down"?e[0]:t==="right"?e[0]-n/6:e[0]+n/6,l=t==="left"||t==="right"?e[1]:t==="down"?e[1]-i/6:e[1]+i/6;return[a,l]}function lr(r,t){let[e,n]=Xt(r);return[e,n]=t==="up"||t==="down"?[e,n]:[n,e],(Math.pow(n,2)-Math.pow(Math.sqrt(Math.pow(e/2,2)+Math.pow(n,2))-e/2,2))/(2*n)}function Zn(r){const{min:[t,e],max:[n,i]}=r,a=[t,i],l=[n,i],u=[n,e],f=[t,e];return[[a,l],[l,u],[u,f],[f,a]]}var Yn=y(55532);function ye(r){if(r.id!==void 0)return r.id;if(r.source!==void 0&&r.target!==void 0)return`${r.source}-${r.target}`;throw new Error(rn("The datum does not have available id."))}function xr(r){return r.combo}function Hn(r,t){const e={nodes:(r.nodes||[]).map(ye),edges:(r.edges||[]).map(ye),combos:(r.combos||[]).map(ye)};return t?Object.values(e).flat():e}const Br=(r,t,e)=>{var n;switch(e.type){case"degree":{const i=new Map;return(n=r.nodes)===null||n===void 0||n.forEach(a=>{const l=t(ye(a),e.direction).length;i.set(ye(a),l)}),i}case"betweenness":return ri(r,e.directed,e.weightPropertyName);case"closeness":return mi(r,e.directed,e.weightPropertyName);case"eigenvector":return Jr(r,e.directed);case"pagerank":return si(r,e.epsilon,e.linkProb);default:return Ar(r)}},Ar=r=>{var t;const e=new Map;return(t=r.nodes)===null||t===void 0||t.forEach(n=>{e.set(ye(n),0)}),e},ri=(r,t,e)=>{const n=Ar(r),{nodes:i=[]}=r;return i.forEach(a=>{i.forEach(l=>{if(a!==l){const{allPath:u}=(0,Yn.ni)(r,ye(a),ye(l),t,e),f=u.length;u.flat().forEach(m=>{m!==ye(a)&&m!==ye(l)&&n.set(m,n.get(m)+1/f)})}})}),n},mi=(r,t,e)=>{const n=new Map,{nodes:i=[]}=r;return i.forEach(a=>{const l=i.reduce((u,f)=>{if(a!==f){const{length:m}=(0,Yn.ni)(r,ye(a),ye(f),t,e);u+=m}return u},0);n.set(ye(a),1/l)}),n},si=(r,t,e)=>{var n;const i=new Map,a=(0,Yn.EF)(r,t,e);return(n=r.nodes)===null||n===void 0||n.forEach(l=>{i.set(ye(l),a[ye(l)])}),i},Jr=(r,t)=>{const{nodes:e=[]}=r,n=_i(r,t),i=Yi(n,e.length),a=new Map;return e.forEach((l,u)=>{a.set(ye(l),i[u])}),a},_i=(r,t)=>{const{nodes:e=[],edges:n=[]}=r,i=Array(e.length).fill(null).map(()=>Array(e.length).fill(0));return n.forEach(({source:a,target:l})=>{const u=e.findIndex(m=>ye(m)===a),f=e.findIndex(m=>ye(m)===l);t?i[u][f]=1:(i[u][f]=1,i[f][u]=1)}),i},Yi=(r,t,e=100,n=1e-6)=>{let i=Array(t).fill(1),a=1/0;for(let l=0;l<e&&a>n;l++){const u=Array(t).fill(0);for(let m=0;m<t;m++)for(let x=0;x<t;x++)u[m]+=r[m][x]*i[x];const f=Math.sqrt(u.reduce((m,x)=>m+x*x,0));for(let m=0;m<t;m++)u[m]/=f;a=Math.sqrt(u.reduce((m,x,Z)=>m+(x-i[Z])*x,0)),i=u}return i};function Ei(r,t,e,n=S.Z){const i=new Map(r.map(V=>[e(V),V])),a=new Map(t.map(V=>[e(V),V])),l=new Set(i.keys()),u=new Set(a.keys()),f=[],m=[],x=[],Z=[];return u.forEach(V=>{l.has(V)?n(i.get(V),a.get(V))?Z.push(a.get(V)):m.push(a.get(V)):f.push(a.get(V))}),l.forEach(V=>{u.has(V)||x.push(i.get(V))}),{enter:f,exit:x,keep:Z,update:m}}function ti(r,t,e){const n=i=>{e&&!e(i)||(i.style.visibility=t)};r.forEach(i=>{n(i)})}function xa(r,t,e){const n={},i=a=>(a in n||(n[a]=0),`${t}-${a}-${n[a]++}`);return e.map(a=>typeof a=="string"?{type:a,key:i(a)}:typeof a=="function"?a.call(r):a.key?a:Object.assign(Object.assign({},a),{key:i(a.type)}))}class Di{constructor(t){this.extensions=[],this.extensionMap={},this.context=t}setExtensions(t){const e=xa(this.context.graph,this.category,t),{enter:n,update:i,exit:a,keep:l}=Ei(this.extensions,e,u=>u.key);this.createExtensions(n),this.updateExtensions([...i,...l]),this.destroyExtensions(a),this.extensions=e}createExtension(t){const{category:e}=this,{key:n,type:i}=t,a=be(e,i);if(!a)return Xe.warn(`The extension ${i} of ${e} is not registered.`);const l=new a(this.context,t);l.initialized=!0,this.extensionMap[n]=l}createExtensions(t){t.forEach(e=>this.createExtension(e))}updateExtension(t){const{key:e}=t,n=this.extensionMap[e];n&&n.update(t)}updateExtensions(t){t.forEach(e=>this.updateExtension(e))}destroyExtension(t){const e=this.extensionMap[t];e&&(e.initialized&&!e.destroyed&&e.destroy(),delete this.extensionMap[t])}destroyExtensions(t){t.forEach(({key:e})=>this.destroyExtension(e))}destroy(){this.destroyExtensions(this.extensions),this.context={},this.extensions=[],this.extensionMap={}}}class ft{constructor(t,e){this.events=[],this.initialized=!1,this.destroyed=!1,this.context=t,this.options=e}update(t){this.options=Object.assign(this.options,t)}destroy(){this.context={},this.options={},this.destroyed=!0}}class b extends ft{}class E extends b{constructor(t,e){super(t,Object.assign({},E.defaultOptions,e)),this.isOverlapping=(n,i)=>i.some(a=>n.intersects(a)),this.occupiedBounds=[],this.detectLabelCollision=n=>{const i=this.context.viewport,a={show:[],hide:[]};return this.occupiedBounds=[],n.forEach(l=>{const u=l.getShape("label").getRenderBounds();i.isInViewport(u,!0)&&!this.isOverlapping(u,this.occupiedBounds)?(a.show.push(l),this.occupiedBounds.push(Ut(u,this.options.padding))):a.hide.push(l)}),a},this.hideLabelIfExceedViewport=(n,i)=>{const{exit:a}=Ei(n,i,l=>l.id);a==null||a.forEach(this.hideLabel)},this.nodeCentralities=new Map,this.sortNodesByCentrality=(n,i)=>{const{model:a}=this.context,l=a.getData(),u=a.getRelatedEdgesData.bind(a);return n.map(m=>(this.nodeCentralities.has(m.id)||(this.nodeCentralities=Br(l,u,i)),{node:m,centrality:this.nodeCentralities.get(m.id)})).sort((m,x)=>x.centrality-m.centrality).map(m=>m.node)},this.sortLabelElementsInView=n=>{const{sort:i,sortNode:a,sortCombo:l,sortEdge:u}=this.options,{model:f}=this.context;if((0,xe.Z)(i))return n.sort((At,Dt)=>i(f.getElementDataById(At.id),f.getElementDataById(Dt.id)));const{node:m=[],edge:x=[],combo:Z=[]}=(0,_t.Z)(n,At=>At.type),V=(0,xe.Z)(l)?Z.sort((At,Dt)=>l(...f.getComboData([At.id,Dt.id]))):Z,et=(0,xe.Z)(a)?m.sort((At,Dt)=>a(...f.getNodeData([At.id,Dt.id]))):this.sortNodesByCentrality(m,a),dt=(0,xe.Z)(u)?x.sort((At,Dt)=>u(...f.getEdgeData([At.id,Dt.id]))):x;return[...V,...et,...dt]},this.labelElementsInView=[],this.isFirstRender=!0,this.onToggleVisibility=n=>{var i;if(((i=n.data)===null||i===void 0?void 0:i.stage)==="zIndex")return;if(!this.validate(n)){this.hiddenElements.size>0&&(this.hiddenElements.forEach(this.showLabel),this.hiddenElements.clear());return}const a=this.isFirstRender?this.getLabelElements():this.getLabelElementsInView();this.hideLabelIfExceedViewport(this.labelElementsInView,a),this.labelElementsInView=a;const l=this.sortLabelElementsInView(this.labelElementsInView),{show:u,hide:f}=this.detectLabelCollision(l);for(let m=u.length-1;m>=0;m--)this.showLabel(u[m]);f.forEach(this.hideLabel)},this.hiddenElements=new Map,this.hideLabel=n=>{const i=n.getShape("label");i&&ti(i,"hidden"),this.hiddenElements.set(n.id,n)},this.showLabel=n=>{const i=n.getShape("label");i&&ti(i,"visible"),n.toFront(),this.hiddenElements.delete(n.id)},this.onTransform=(0,ie.Z)(this.onToggleVisibility,this.options.throttle,{leading:!0}),this.enableToggle=!0,this.toggle=n=>{this.enableToggle&&this.onToggleVisibility(n)},this.onBeforeRender=()=>{this.enableToggle=!1},this.onAfterRender=n=>{this.onToggleVisibility(n),this.enableToggle=!0},this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents(),this.onToggleVisibility({})}getLabelElements(){const{elementMap:t}=this.context.element,e=[];for(const n in t){const i=t[n];i.isVisible()&&i.getShape("label")&&e.push(i)}return e}getLabelElementsInView(){const t=this.context.viewport;return this.getLabelElements().filter(e=>t.isInViewport(e.getShape("key").getRenderBounds()))}bindEvents(){const{graph:t}=this.context;t.on(Q.BEFORE_RENDER,this.onBeforeRender),t.on(Q.AFTER_RENDER,this.onAfterRender),t.on(Q.AFTER_DRAW,this.toggle),t.on(Q.AFTER_LAYOUT,this.toggle),t.on(Q.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(Q.BEFORE_RENDER,this.onBeforeRender),t.off(Q.AFTER_RENDER,this.onAfterRender),t.off(Q.AFTER_DRAW,this.toggle),t.off(Q.AFTER_LAYOUT,this.toggle),t.off(Q.AFTER_TRANSFORM,this.onTransform)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}E.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var h=y(23343);const g=[0,0,0];function M(r,t){return r.map((e,n)=>e+t[n])}function Y(r,t){return r.map((e,n)=>e-t[n])}function J(r,t){return typeof t=="number"?r.map(e=>e*t):r.map((e,n)=>e*t[n])}function ot(r,t){return typeof t=="number"?r.map(e=>e/t):r.map((e,n)=>e/t[n])}function vt(r,t){return r.reduce((e,n,i)=>e+n*t[i],0)}function zt(r,t){const e=pt(r),n=pt(t);return[e[1]*n[2]-e[2]*n[1],e[2]*n[0]-e[0]*n[2],e[0]*n[1]-e[1]*n[0]]}function q(r,t){return r.map(e=>e*t)}function $(r,t){return Math.sqrt(r.reduce((e,n,i)=>e+Math.pow(n-t[i]||0,2),0))}function H(r,t){return r.reduce((e,n,i)=>e+Math.abs(n-t[i]),0)}function nt(r){const t=r.reduce((e,n)=>e+Math.pow(n,2),0);return r.map(e=>e/Math.sqrt(t))}function Mt(r,t,e=!1){const n=r[0]*t[1]-r[1]*t[0];let i=Math.acos(J(r,t).reduce((a,l)=>a+l,0)/($(r,g)*$(t,g)));return e&&n<0&&(i=2*Math.PI-i),i}function Wt(r,t){return r.every((e,n)=>e===t[n])}function Tt(r,t=!0){return t?[-r[1],r[0]]:[r[1],-r[0]]}function Kt(r,t){return r.map(e=>e%t)}function bt(r){return[r[0],r[1]]}function pt(r){return at(r)?[r[0],r[1],0]:r}function ut(r){const[t,e]=r;return!t&&!e?0:Math.atan2(e,t)}function Gt(r,t){const[e,n]=r;if(t%360===0)return[e,n];const i=t*Math.PI/180,a=Math.cos(i),l=Math.sin(i);return[e*a-n*l,e*l+n*a]}function Vt(r,t){const[e,n]=r,[i,a]=t,l=Y(e,n),u=Y(i,a);return zt(l,u).every(f=>f===0)}function ve(r,t,e=!1){if(Vt(r,t))return;const[n,i]=r,[a,l]=t,u=((n[0]-a[0])*(a[1]-l[1])-(n[1]-a[1])*(a[0]-l[0]))/((n[0]-i[0])*(a[1]-l[1])-(n[1]-i[1])*(a[0]-l[0])),f=l[0]-a[0]?(n[0]-a[0]+u*(i[0]-n[0]))/(l[0]-a[0]):(n[1]-a[1]+u*(i[1]-n[1]))/(l[1]-a[1]);if(!(!e&&(!Ie(u,0,1)||!Ie(f,0,1))))return[n[0]+u*(i[0]-n[0]),n[1]+u*(i[1]-n[1])]}function ge(r){if(Array.isArray(r))return Ie(r[0],0,1)&&Ie(r[1],0,1)?r:[.5,.5];const t=r.split("-"),e=t.includes("left")?0:t.includes("right")?1:.5,n=t.includes("top")?0:t.includes("bottom")?1:.5;return[e,n]}function Yt(r){const{x:t=0,y:e=0,z:n=0}=r.style||{};return[+t,+e,+n]}function Ce(r){const{x:t,y:e,z:n}=r.style||{};return t!==void 0||e!==void 0||n!==void 0}function qe(r,t){const[e,n]=t,{min:i,max:a}=r;return[i[0]+e*(a[0]-i[0]),i[1]+n*(a[1]-i[1])]}function Qe(r,t="center"){const e=ge(t);return qe(r,e)}function Nn(r,t){const e=parseAnchor(t);return qe(r,e)}const Dn=r=>{const[t,e]=r;return{left:Math.min(t[0],e[0]),right:Math.max(t[0],e[0]),top:Math.min(t[1],e[1]),bottom:Math.max(t[1],e[1])}};function Rn(r){var t;return[r.x,r.y,(t=r.z)!==null&&t!==void 0?t:0]}function Xn(r){var t;return{x:r[0],y:r[1],z:(t=r[2])!==null&&t!==void 0?t:0}}function tr(r){return r.sort((t,e)=>t[0]-e[0]||t[1]-e[1])}function Mr(r){const t=new Set;return r.filter(e=>{const n=e.join(",");return t.has(n)?!1:(t.add(n),!0)})}function yr(r,t=0){return r.map(e=>parseFloat(e.toFixed(t)))}function vr(r,t,e,n=!1){if((0,S.Z)(r,t))return r;const i=n?Y(r,t):Y(t,r),a=nt(i),l=[a[0]*e,a[1]*e];return M(bt(r),l)}function Cr(r,t){return r[1]===t[1]}function ur(r,t){return r[0]===t[0]}function Kn(r,t){return Cr(r,t)||ur(r,t)}function Ur(r,t,e){return Vt([r,t],[t,e])}function Yr(r,t){return[2*t[0]-r[0],2*t[1]-r[1]]}function br(r,t,e,n=!0,i=!1){for(let a=0;a<e.length;a++){let l=e[a],u=e[(a+1)%e.length];n&&(l=M(t,l),u=M(t,u));const f=i?Yr(r,t):r,m=ve([t,f],[l,u]);if(m)return{point:m,line:[l,u]}}return{point:t,line:void 0}}function xi(r,t,e,n){const i=r[0],a=r[1];let l=!1;e===void 0&&(e=0),n===void 0&&(n=t.length);const u=n-e;for(let f=0,m=u-1;f<u;m=f++){const x=t[f+e][0],Z=t[f+e][1],V=t[m+e][0],et=t[m+e][1];Z>a!=et>a&&i<(V-x)*(a-Z)/(et-Z)+x&&(l=!l)}return l}function di(r,t,e=!1){const n=Qe(t,"center"),i=[Qe(t,"left-top"),Qe(t,"right-top"),Qe(t,"right-bottom"),Qe(t,"left-bottom")];return br(r,n,i,!1,e).point}function Lr(r,t,e=!1){const n=t.center,i=e?Yr(r,n):r,a=Y(i,t.center),l=Math.atan2(a[1],a[0]);if(isNaN(l))return n;const u=tt(t)/2,f=Nt(t)/2,m=n[0]+u*Math.cos(l),x=n[1]+f*Math.sin(l);return[m,x]}function Ci(r,t){let e=1/0,n=[r[0],t[0]];return r.forEach(i=>{t.forEach(a=>{const l=$(i,a);l<e&&(e=l,n=[i,a])})}),n}function fi(r,t){let e=1/0,n=[[0,0],[0,0]];return t.forEach(i=>{const a=Ni(r,i);a<e&&(e=a,n=i)}),n}function Ni(r,t){const e=Ji(r,t);return $(r,e)}function Ji(r,t){const[e,n]=t[0],[i,a]=t[1],[l,u]=r,f=i-e,m=a-n;if(f===0&&m===0)return[e,n];let x=((l-e)*f+(u-n)*m)/(f*f+m*m);x>1?x=1:x<0&&(x=0);const Z=e+x*f,V=n+x*m;return[Z,V]}function Fa(r){const t=r.reduce((e,n)=>M(e,n),[0,0]);return ot(t,r.length)}function La(r,t=!0){const e=Fa(r);return r.sort(([n,i],[a,l])=>{const u=Math.atan2(i-e[1],n-e[0]),f=Math.atan2(l-e[1],a-e[0]);return t?f-u:u-f})}function _a(r,t){return[r,[r[0],t[1]],t,[t[0],r[1]]]}var ta=y(71879);class pi{constructor(t,e,n){if(this.phase=e,this.pointerByTouch=[],this.initialDistance=null,this.emitter=t,pi.instance)return pi.callbacks[this.phase].push(n),pi.instance;this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.bindEvents(),pi.instance=this,pi.callbacks[this.phase].push(n)}bindEvents(){const{emitter:t}=this;t.on(G.POINTER_DOWN,this.onPointerDown),t.on(G.POINTER_MOVE,this.onPointerMove),t.on(G.POINTER_UP,this.onPointerUp)}updatePointerPosition(t,e,n){const i=this.pointerByTouch.findIndex(a=>a.pointerId===t);i>=0&&(this.pointerByTouch[i]={x:e,y:n,pointerId:t})}onPointerDown(t){const{x:e,y:n}=t.client||{};if(!(e===void 0||n===void 0)&&(this.pointerByTouch.push({x:e,y:n,pointerId:t.pointerId}),t.pointerType==="touch"&&this.pointerByTouch.length===2)){pi.isPinching=!0;const i=this.pointerByTouch[0].x-this.pointerByTouch[1].x,a=this.pointerByTouch[0].y-this.pointerByTouch[1].y;this.initialDistance=Math.sqrt(i*i+a*a),pi.callbacks.pinchstart.forEach(l=>l(t,{scale:0}))}}onPointerMove(t){if(this.pointerByTouch.length!==2||this.initialDistance===null)return;const{x:e,y:n}=t.client||{};if(e===void 0||n===void 0)return;this.updatePointerPosition(t.pointerId,e,n);const i=this.pointerByTouch[0].x-this.pointerByTouch[1].x,a=this.pointerByTouch[0].y-this.pointerByTouch[1].y,u=Math.sqrt(i*i+a*a)/this.initialDistance;pi.callbacks.pinchmove.forEach(f=>f(t,{scale:(u-1)*5}))}onPointerUp(t){var e;pi.callbacks.pinchend.forEach(n=>n(t,{scale:0})),pi.isPinching=!1,this.initialDistance=null,this.pointerByTouch=[],(e=pi.instance)===null||e===void 0||e.tryDestroy()}destroy(){this.emitter.off(G.POINTER_DOWN,this.onPointerDown),this.emitter.off(G.POINTER_MOVE,this.onPointerMove),this.emitter.off(G.POINTER_UP,this.onPointerUp),pi.instance=null}off(t,e){const n=pi.callbacks[t].indexOf(e);n>-1&&pi.callbacks[t].splice(n,1),this.tryDestroy()}tryDestroy(){Object.values(pi.callbacks).every(t=>t.length===0)&&this.destroy()}}pi.isPinching=!1,pi.instance=null,pi.callbacks={pinchstart:[],pinchmove:[],pinchend:[]};const mo=r=>r.map(t=>(0,ta.Z)(t)?t.toLocaleLowerCase():t);class us{constructor(t){this.map=new Map,this.boundHandlePinch=()=>{},this.recordKey=new Set,this.onKeyDown=e=>{e!=null&&e.key&&(this.recordKey.add(e.key),this.trigger(e))},this.onKeyUp=e=>{e!=null&&e.key&&this.recordKey.delete(e.key)},this.onWheel=e=>{this.triggerExtendKey(G.WHEEL,e)},this.onDrag=e=>{this.triggerExtendKey(G.DRAG,e)},this.handlePinch=(e,n)=>{this.triggerExtendKey(G.PINCH,Object.assign(Object.assign({},e),n))},this.onFocus=()=>{this.recordKey.clear()},this.emitter=t,this.bindEvents()}bind(t,e){t.length!==0&&(t.includes(G.PINCH)&&!this.pinchHandler&&(this.boundHandlePinch=this.handlePinch.bind(this),this.pinchHandler=new pi(this.emitter,"pinchmove",this.boundHandlePinch)),this.map.set(t,e))}unbind(t,e){this.map.forEach((n,i)=>{(0,S.Z)(i,t)&&(!e||e===n)&&this.map.delete(i)})}unbindAll(){this.map.clear()}match(t){const e=mo(Array.from(this.recordKey)).sort(),n=mo(t).sort();return(0,S.Z)(e,n)}bindEvents(){var t;const{emitter:e}=this;e.on(G.KEY_DOWN,this.onKeyDown),e.on(G.KEY_UP,this.onKeyUp),e.on(G.WHEEL,this.onWheel),e.on(G.DRAG,this.onDrag),(t=globalThis.addEventListener)===null||t===void 0||t.call(globalThis,"focus",this.onFocus)}trigger(t){this.map.forEach((e,n)=>{this.match(n)&&e(t)})}triggerExtendKey(t,e){this.map.forEach((n,i)=>{i.includes(t)&&(0,S.Z)(Array.from(this.recordKey),i.filter(a=>a!==t))&&n(e)})}destroy(){var t,e;this.unbindAll(),this.emitter.off(G.KEY_DOWN,this.onKeyDown),this.emitter.off(G.KEY_UP,this.onKeyUp),this.emitter.off(G.WHEEL,this.onWheel),this.emitter.off(G.DRAG,this.onDrag),(t=this.pinchHandler)===null||t===void 0||t.off("pinchmove",this.boundHandlePinch),(e=globalThis.removeEventListener)===null||e===void 0||e.call(globalThis,"blur",this.onFocus)}}class Bs extends b{constructor(t,e){super(t,(0,h.Z)({},Bs.defaultOptions,e)),this.shortcut=new us(t.graph),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.clearStates=this.clearStates.bind(this),this.bindEvents()}onPointerDown(t){if(!this.validate(t)||!this.isKeydown()||this.startPoint)return;const{canvas:e,graph:n}=this.context,i=Object.assign({},this.options.style);this.options.style.lineWidth&&(i.lineWidth=+this.options.style.lineWidth/n.getZoom()),this.rectShape=new _.UL({id:"g6-brush-select",style:i}),e.appendChild(this.rectShape),this.startPoint=[t.canvas.x,t.canvas.y]}onPointerMove(t){var e;if(!this.startPoint)return;const{immediately:n,mode:i}=this.options;this.endPoint=Fs(t,this.context.graph),(e=this.rectShape)===null||e===void 0||e.attr({x:Math.min(this.endPoint[0],this.startPoint[0]),y:Math.min(this.endPoint[1],this.startPoint[1]),width:Math.abs(this.endPoint[0]-this.startPoint[0]),height:Math.abs(this.endPoint[1]-this.startPoint[1])}),n&&i==="default"&&this.updateElementsStates(_a(this.startPoint,this.endPoint))}onPointerUp(t){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=Fs(t,this.context.graph),this.updateElementsStates(_a(this.startPoint,this.endPoint)),this.clearBrush()}}clearStates(){this.endPoint||this.clearElementsStates()}clearElementsStates(){const{graph:t}=this.context,e=Object.values(t.getData()).reduce((n,i)=>Object.assign({},n,i.reduce((a,l)=>{var u;const f=(u=l.states||[])===null||u===void 0?void 0:u.filter(m=>m!==this.options.state);return a[ye(l)]=f,a},{})),{});t.setElementState(e,this.options.animation)}updateElementsStates(t){const{graph:e}=this.context,{enableElements:n,state:i,mode:a,onSelect:l}=this.options,u=this.selector(e,t,n);let f={};switch(a){case"union":u.forEach(m=>{f[m]=[...e.getElementState(m),i]});break;case"diff":u.forEach(m=>{const x=e.getElementState(m);f[m]=x.includes(i)?x.filter(Z=>Z!==i):[...x,i]});break;case"intersect":u.forEach(m=>{const x=e.getElementState(m);f[m]=x.includes(i)?[i]:[]});break;case"default":default:u.forEach(m=>{f[m]=[i]});break}(0,xe.Z)(l)&&(f=l(f)),e.setElementState(f,this.options.animation)}selector(t,e,n){if(!n||n.length===0)return[];const i=[],a=t.getData();if(n.forEach(l=>{a[`${l}s`].forEach(u=>{const f=ye(u);t.getElementVisibility(f)!=="hidden"&&xi(t.getElementPosition(f),e)&&i.push(f)})}),n.includes("edge")){const l=a.edges;l==null||l.forEach(u=>{const{source:f,target:m}=u;i.includes(f)&&i.includes(m)&&i.push(ye(u))})}return i}clearBrush(){var t;(t=this.rectShape)===null||t===void 0||t.remove(),this.rectShape=void 0,this.startPoint=void 0,this.endPoint=void 0}isKeydown(){const{trigger:t}=this.options,e=Array.isArray(t)?t:[t];return this.shortcut.match(e.filter(n=>n!=="drag"))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}bindEvents(){const{graph:t}=this.context;t.on(G.POINTER_DOWN,this.onPointerDown),t.on(G.POINTER_MOVE,this.onPointerMove),t.on(G.POINTER_UP,this.onPointerUp),t.on(F.CLICK,this.clearStates)}unbindEvents(){const{graph:t}=this.context;t.off(G.POINTER_DOWN,this.onPointerDown),t.off(G.POINTER_MOVE,this.onPointerMove),t.off(G.POINTER_UP,this.onPointerUp),t.off(F.CLICK,this.clearStates)}update(t){this.unbindEvents(),this.options=(0,h.Z)(this.options,t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}Bs.defaultOptions={animation:!1,enable:!0,enableElements:["node","combo","edge"],immediately:!1,mode:"default",state:"selected",trigger:["shift"],style:{width:0,height:0,lineWidth:1,fill:"#1677FF",stroke:"#1677FF",fillOpacity:.1,zIndex:2,pointerEvents:"none"}};const Fs=(r,t)=>{if((r.targetType==="node"||r.targetType==="combo")&&!(r.nativeEvent.target instanceof HTMLCanvasElement)){const[e,n]=t.getCanvasByClient([r.client.x,r.client.y]);return[e,n]}return[r.canvas.x,r.canvas.y]},qn=.8,Za=["node","edge","combo"];function za(r,t,e,n,i=0){n==="TB"&&t(r,i);const a=e(r);if(a)for(const l of a)za(l,t,e,n,i+1);n==="BT"&&t(r,i)}function ja(r,t,e){const n=[[r,0]];for(;n.length;){const[i,a]=n.shift();t(i,a);const l=e(i);if(l)for(const u of l)n.push([u,a+1])}}function xs(r,t,e,n,i="both"){if(t==="combo"||t==="node")return Wa(r,e,n,i);const a=r.getEdgeData(e);if(!a)return[];const l=Wa(r,a.source,n-1,i),u=Wa(r,a.target,n-1,i);return Array.from(new Set([...l,...u,e]))}function Wa(r,t,e,n="both"){const i=new Set,a=new Set,l=new Set;return ja(t,(u,f)=>{f>e||(l.add(u),r.getRelatedEdgesData(u,n).forEach(m=>{const x=ye(m);!a.has(x)&&f<e&&(l.add(x),a.add(x))}))},u=>r.getRelatedEdgesData(u,n).map(f=>f.source===u?f.target:f.source).filter(f=>i.has(f)?!1:(i.add(f),!0))),Array.from(l)}function Ga(r){return r.states||[]}var Da=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class wa extends b{constructor(t,e){super(t,Object.assign({},wa.defaultOptions,e)),this.onClickSelect=n=>Da(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.updateState(n),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.onClickCanvas=n=>Da(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.clearState(),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.shortcut=new us(t.graph),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Za.forEach(e=>{t.on(`${e}:${G.CLICK}`,this.onClickSelect)}),t.on(F.CLICK,this.onClickCanvas)}get isMultipleSelect(){const{multiple:t,trigger:e}=this.options;return t&&this.shortcut.match(e)}getNeighborIds(t){const{target:e,targetType:n}=t,{graph:i}=this.context,{degree:a}=this.options;return xs(i,n,e.id,typeof a=="function"?a(t):a).filter(l=>l!==e.id)}updateState(t){return Da(this,void 0,void 0,function*(){const{state:e,unselectedState:n,neighborState:i,animation:a}=this.options;if(!e&&!i&&!n)return;const{target:l}=t,{graph:u}=this.context,f=u.getElementData(l.id),m=Ga(f).includes(e)?"unselect":"select",x={},Z=this.isMultipleSelect,V=[l.id],et=this.getNeighborIds(t);if(Z)if(Object.assign(x,this.getDataStates()),m==="select"){const dt=(At,Dt)=>{At.forEach(Qt=>{const oe=new Set(u.getElementState(Qt));oe.add(Dt),oe.delete(n),x[Qt]=Array.from(oe)})};dt(V,e),dt(et,i),n&&Object.keys(x).forEach(At=>{const Dt=x[At];!Dt.includes(e)&&!Dt.includes(i)&&!Dt.includes(n)&&x[At].push(n)})}else{const dt=x[l.id];x[l.id]=dt.filter(At=>At!==e&&At!==i),dt.includes(n)||x[l.id].push(n),et.forEach(At=>{x[At]=x[At].filter(Dt=>Dt!==i),x[At].includes(e)||x[At].push(n)})}else if(m==="select"){Object.assign(x,this.getClearStates(!!n));const dt=(At,Dt)=>{At.forEach(Qt=>{x[Qt]||(x[Qt]=u.getElementState(Qt)),x[Qt].push(Dt)})};dt(V,e),dt(et,i),n&&Object.keys(x).forEach(At=>{!V.includes(At)&&!et.includes(At)&&x[At].push(n)})}else Object.assign(x,this.getClearStates());yield u.setElementState(x,a)})}getDataStates(){const{graph:t}=this.context,{nodes:e,edges:n,combos:i}=t.getData(),a={};return[...e,...n,...i].forEach(l=>{a[ye(l)]=Ga(l)}),a}getClearStates(t=!1){const{graph:e}=this.context,{state:n,unselectedState:i,neighborState:a}=this.options,l=new Set([n,i,a]),{nodes:u,edges:f,combos:m}=e.getData(),x={};return[...u,...f,...m].forEach(Z=>{const V=Ga(Z),et=V.filter(dt=>!l.has(dt));(t||et.length!==V.length)&&(x[ye(Z)]=et)}),x}clearState(){return Da(this,void 0,void 0,function*(){const{graph:t}=this.context;yield t.setElementState(this.getClearStates(),this.options.animation)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Za.forEach(e=>{t.off(`${e}:${G.CLICK}`,this.onClickSelect)}),t.off(F.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}wa.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function ha(r){var t;return!!(!((t=r.style)===null||t===void 0)&&t.collapsed)}var da=y(5759),$s=y(37004),qs=y(45642);function ws(r,t){if(!r.startsWith(t))return!1;const e=r[t.length];return e>="A"&&e<="Z"}function yo(r,t){return`${t}${(0,I.Z)(r)}`}function _s(r,t,e=!0){if(!t||!ws(r,t))return r;const n=r.slice(t.length);return e?(0,qs.Z)(n):n}function wi(r,t){const e=Object.entries(r).reduce((n,[i,a])=>(i==="className"||i==="class"||ws(i,t)&&Object.assign(n,{[_s(i,t)]:a}),n),{});if("opacity"in r){const n=yo("opacity",t),i=r.opacity;if(n in r){const a=r[n];Object.assign(e,{opacity:i*a})}else Object.assign(e,{opacity:i})}return e}function Ua(r,t){const e=t.length;return Object.keys(r).reduce((n,i)=>{if(i.startsWith(t)){const a=i.slice(e);n[a]=r[i]}return n},{})}function Ms(r,t){const e=typeof t=="string"?[t]:t,n={};return Object.keys(r).forEach(i=>{e.find(a=>i.startsWith(a))||(n[i]=r[i])}),n}function ol(r,t,e){return Object.entries(r).reduce((n,[i,a])=>(ws(i,t)?n[yo(_s(i,t,!1),e)]=a:n[i]=a,n),{})}function ea(r=0){if(typeof r=="number")return[r,r,r];const[t,e=t,n=t]=r;return[t,e,n]}var $i=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function Ss(r,t){const{datum:e,graph:n}=t;return typeof r=="function"?r.call(n,e):Object.fromEntries(Object.entries(r).map(([i,a])=>typeof a=="function"?[i,a.call(n,e)]:[i,a]))}function Pi(r,t){const e=(r==null?void 0:r.style)||{},n=(t==null?void 0:t.style)||{};for(const i in e)i in n||(n[i]=e[i]);return Object.assign({},r,t,{style:n})}function to(r){const{x:t,y:e,z:n,class:i,className:a,transform:l,transformOrigin:u,zIndex:f,visibility:m}=r;return $i(r,["x","y","z","class","className","transform","transformOrigin","zIndex","visibility"])}function Zs(r,t){const e=ea(r);let n={};return t.text&&!t.fontSize&&(n={fontSize:Math.min(...e)*.5}),t.src&&(!t.width||!t.height)&&(n={width:e[0]*.5,height:e[1]*.5}),n}function qi(r){if(r)return typeof r=="string"||typeof r=="function"||Array.isArray(r)?{type:"group",field:t=>t.id,color:r,invert:!1}:r}function As(r,t){if(!t)return{};const{type:e,color:n,field:i,invert:a}=t,l=f=>{const m=typeof n=="string"?be("palette",n):n;if(typeof m=="function"){const x={};return f.forEach(([Z,V])=>{x[Z]=m(a?1-V:V)}),x}else if(Array.isArray(m)){const x=a?[...m].reverse():m,Z={};return f.forEach(([V,et])=>{Z[V]=x[et%m.length]}),Z}return{}},u=(f,m)=>{var x;return typeof f=="string"?(x=m.data)===null||x===void 0?void 0:x[f]:f==null?void 0:f(m)};if(e==="group"){const f=(0,_t.Z)(r,V=>{if(!i)return"default";const et=u(i,V);return et?String(et):"default"}),m=Object.keys(f),x=l(m.map((V,et)=>[V,et])),Z={};return Object.entries(f).forEach(([V,et])=>{et.forEach(dt=>{Z[ye(dt)]=x[V]})}),Z}else if(e==="value"){const[f,m]=r.reduce(([Z,V],et)=>{const dt=u(i,et);if(typeof dt!="number")throw new Error(rn(`Palette field ${i} is not a number`));return[Math.min(Z,dt),Math.max(V,dt)]},[1/0,-1/0]),x=m-f;return l(r.map(Z=>[Z.id,(u(i,Z)-f)/x]))}}function Bo(r){const t=typeof r=="string"?be("palette",r):r;if(typeof t!="function")return t}function oa(r,t){let e=2*r;return typeof t=="string"?e=r*Number(t.replace("%",""))/100:typeof t=="number"&&(e=t),isNaN(e)&&(e=2*r),e}function hs(r,t,e=1,n=!1){const i=n?e:1,a=(r.max[0]-r.min[0])*i;return oa(a,t)}function Ma(r,t,e=1){const n=$(r[0],r[1])*e;return oa(n,t)}var Ii=y(42791);class $a extends _.b_{constructor(t){ts(t.style),super(t),this.shapeMap={},this.animateMap={},this.render(this.attributes,this),this.setVisibility(),this.bindEvents()}get parsedAttributes(){return this.attributes}upsert(t,e,n,i,a){var l,u,f,m,x,Z,V,et;const dt=this.shapeMap[t];if(n===!1){dt&&((l=a==null?void 0:a.beforeDestroy)===null||l===void 0||l.call(a,dt),i.removeChild(dt),delete this.shapeMap[t],(u=a==null?void 0:a.afterDestroy)===null||u===void 0||u.call(a,dt));return}const At=typeof e=="string"?be(ue.SHAPE,e):e;if(!At)throw new Error(rn(`Shape ${e} not found`));if(!dt||dt.destroyed||!(dt instanceof At)){dt&&((f=a==null?void 0:a.beforeDestroy)===null||f===void 0||f.call(a,dt),dt==null||dt.destroy(),(m=a==null?void 0:a.afterDestroy)===null||m===void 0||m.call(a,dt)),(x=a==null?void 0:a.beforeCreate)===null||x===void 0||x.call(a);const Dt=new At({className:t,style:n});return i.appendChild(Dt),this.shapeMap[t]=Dt,(Z=a==null?void 0:a.afterCreate)===null||Z===void 0||Z.call(a,Dt),Dt}return(V=a==null?void 0:a.beforeUpdate)===null||V===void 0||V.call(a,dt),Qa(dt,n),(et=a==null?void 0:a.afterUpdate)===null||et===void 0||et.call(a,dt),dt}update(t={}){const e=Object.assign({},this.attributes,t);ts(e),Ka(this,e),this.render(e,this),this.setVisibility()}bindEvents(){}getGraphicStyle(t){return to(t)}get compositeShapes(){return[["badges","badge-"],["ports","port-"]]}animate(t,e){if(t.length===0)return null;const n=[];if(t[0].x!==void 0||t[0].y!==void 0||t[0].z!==void 0){const{x:a=0,y:l=0,z:u=0}=this.attributes;t.forEach(f=>{const{x:m=a,y:x=l,z:Z=u}=f;Object.assign(f,{transform:Z?[["translate3d",m,x,Z]]:[["translate",m,x]]})})}const i=super.animate(t,e);if(i&&(qa(this,i),n.push(i)),Array.isArray(t)&&t.length>0){const a=["transform","transformOrigin","x","y","z","zIndex"];if(Object.keys(t[0]).some(l=>!a.includes(l))){Object.entries(this.shapeMap).forEach(([u,f])=>{const m=`get${(0,I.Z)(u)}Style`,x=this[m];if((0,xe.Z)(x)){const Z=t.map(et=>x.call(this,Object.assign(Object.assign({},this.attributes),et))),V=f.animate(tn(Z),e);V&&(qa(f,V),n.push(V))}});const l=(u,f)=>{if(!(0,Ii.Z)(u)){const m=`get${(0,I.Z)(f)}Style`,x=this[m];if((0,xe.Z)(x)){const Z=t.map(V=>x.call(this,Object.assign(Object.assign({},this.attributes),V)));Object.entries(Z[0]).map(([V])=>{const et=Z.map(At=>At[V]),dt=u[V];if(dt){const At=dt.animate(tn(et),e);At&&(qa(dt,At),n.push(At))}})}}};this.compositeShapes.forEach(([u,f])=>{const m=Ua(this.shapeMap,f);l(m,u)})}}return Pn(n)}getShape(t){return this.shapeMap[t]}setVisibility(){const{visibility:t}=this.attributes;ti(this,t)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function qa(r,t){t==null||t.finished.then(()=>{const e=r.activeAnimations.findIndex(n=>n===t);e>-1&&r.activeAnimations.splice(e,1)})}function ts(r){if(!r)return{};if("x"in r||"y"in r||"z"in r){const{x:t=0,y:e=0,z:n,transform:i}=r,a=Pe(t,e,n,i);a&&(r.transform=a)}return r}var Na=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class fa extends $a{constructor(t){super(Pi({style:fa.defaultStyleProps},t))}isTextStyle(t){return ws(t,"label")}isBackgroundStyle(t){return ws(t,"background")}getTextStyle(t){const e=this.getGraphicStyle(t),{padding:n}=e,i=Na(e,["padding"]);return Ms(i,"background")}getBackgroundStyle(t){if(t.background===!1)return!1;const e=this.getGraphicStyle(t),{wordWrap:n,wordWrapWidth:i,padding:a}=e,l=wi(e,"background"),{min:[u,f],center:[m,x],halfExtents:[Z,V]}=this.shapeMap.text.getGeometryBounds(),[et,dt,At,Dt]=Ne(a),Qt=Z*2+Dt+dt,{width:oe,height:pe}=l;oe&&pe?Object.assign(l,{x:m-Number(oe)/2,y:x-Number(pe)/2}):Object.assign(l,{x:u-Dt,y:f-et,width:n?Math.min(Qt,i+Dt+dt):Qt,height:V*2+et+At});const{radius:Be}=l;if(typeof Be=="string"&&Be.endsWith("%")){const vn=Number(Be.replace("%",""))/100;l.radius=Math.min(+l.width,+l.height)*vn}return l}render(t=this.parsedAttributes,e=this){this.upsert("text",_.xv,this.getTextStyle(t),e),this.upsert("background",_.UL,this.getBackgroundStyle(t),e)}getGeometryBounds(){return(this.getShape("background")||this.getShape("text")).getGeometryBounds()}}fa.defaultStyleProps={padding:0,fontSize:12,fontFamily:"system-ui, sans-serif",wordWrap:!0,maxLines:1,wordWrapWidth:128,textOverflow:"...",textBaseline:"middle",backgroundOpacity:.75,backgroundZIndex:-1,backgroundLineWidth:0};class Ia extends $a{constructor(t){super(Pi({style:Ia.defaultStyleProps},t))}getBadgeStyle(t){return this.getGraphicStyle(t)}render(t=this.parsedAttributes,e=this){this.upsert("label",fa,this.getBadgeStyle(t),e)}getGeometryBounds(){const t=this.getShape("label");return(t.getShape("background")||t.getShape("text")).getGeometryBounds()}}Ia.defaultStyleProps={padding:[2,4,2,4],fontSize:10,wordWrap:!1,backgroundRadius:"50%",backgroundOpacity:1};function eo(r,t=!0){const e=[];return r.forEach((n,i)=>{e.push([i===0?"M":"L",...n])}),t&&e.push(["Z"]),e}const Oi={M:["x","y"],m:["dx","dy"],H:["x"],h:["dx"],V:["y"],v:["dy"],L:["x","y"],l:["dx","dy"],Z:[],z:[],C:["x1","y1","x2","y2","x","y"],c:["dx1","dy1","dx2","dy2","dx","dy"],S:["x2","y2","x","y"],s:["dx2","dy2","dx","dy"],Q:["x1","y1","x","y"],q:["dx1","dy1","dx","dy"],T:["x","y"],t:["dx","dy"],A:["rx","ry","rotation","large-arc","sweep","x","y"],a:["rx","ry","rotation","large-arc","sweep","dx","dy"]};function nr(r){const t=r.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").trim().split(/\s*,|\s+/),e=[];let n="",i={};for(;t.length>0;){let a=t.shift();a in Oi?n=a:t.unshift(a),i={type:n},Oi[n].forEach(f=>{a=t.shift(),i[f]=a}),n==="M"?n="L":n==="m"&&(n="l");const[l,...u]=Object.values(i);e.push([l,...u.map(Number)])}return e}function va(r){const t=[];return(typeof r=="string"?nr(r):r).forEach(n=>{const i=n[0];if(i==="Z"){t.push(t[0]);return}if(i!=="A")for(let a=1;a<n.length;a=a+2)t.push([n[a],n[a+1],0]);else{const a=n.length;t.push([n[a-2],n[a-1],0])}}),t}const bo=r=>{if(r.length<2)return[["M",0,0],["L",0,0]];const t=r[0],e=r[1],n=r[r.length-1],i=r[r.length-2];r.unshift(i,n),r.push(t,e);const a=[["M",n[0],n[1]]];for(let l=1;l<r.length-2;l+=1){const[u,f]=r[l-1],[m,x]=r[l],[Z,V]=r[l+1],[et,dt]=l!==r.length-2?r[l+2]:[Z,V],At=m+(Z-u)/6,Dt=x+(V-f)/6,Qt=Z-(et-m)/6,oe=V-(dt-x)/6;a.push(["C",At,Dt,Qt,oe,Z,V])}return a};function Os(r,t,e,n,i,a,l){const[u,f]=Qe(r,t),m={textAlign:t==="left"?"right":t==="right"?"left":"center",textBaseline:t==="top"?"bottom":t==="bottom"?"top":"middle",transform:[["translate",u+e,f+n]]};if(t==="center"||!i)return m;const x=va(a);if(!x||x.length<=3)return m;const Z=x.map((dt,At)=>{const Dt=dt,Qt=x[(At+1)%x.length];return(0,S.Z)(Dt,Qt)?null:[Dt,Qt]}).filter(Boolean),V=fi([u,f],Z),et=Ji([u,f],V);if(et&&V&&(m.transform=[["translate",et[0]+e,et[1]+n]],l)){const dt=Math.atan((V[0][1]-V[1][1])/(V[0][0]-V[1][0]));m.transform.push(["rotate",dt/Math.PI*180]),m.textAlign="center",(t==="right"||t==="left")&&(dt>0?m.textBaseline=t==="right"?"bottom":"top":m.textBaseline=t==="right"?"top":"bottom")}return m}var Eo=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Sa extends $a{constructor(t){super(Pi({style:Sa.defaultStyleProps},t))}getLabelStyle(t){if(!t.label||!t.d||t.d.length===0)return!1;const e=wi(this.getGraphicStyle(t),"label"),{maxWidth:n,offsetX:i,offsetY:a,autoRotate:l,placement:u,closeToPath:f}=e,m=Eo(e,["maxWidth","offsetX","offsetY","autoRotate","placement","closeToPath"]),x=this.shapeMap.key,Z=x==null?void 0:x.getRenderBounds();return Object.assign(Os(Z,u,i,a,f,t.d,l),{wordWrapWidth:hs(Z,n)},m)}getKeyStyle(t){return this.getGraphicStyle(t)}render(t,e){this.upsert("key",_.y$,this.getKeyStyle(t),e),this.upsert("label",fa,this.getLabelStyle(t),e)}}Sa.defaultStyleProps={label:!0,labelPlacement:"bottom",labelCloseToPath:!0,labelAutoRotate:!0,labelOffsetX:0,labelOffsetY:0};function Fo(r){const t=[],e=n=>{n!=null&&n.children.length&&n.children.forEach(i=>{t.push(i),e(i)})};return e(r),t}function _o(r){const t=[];let e=r.parentNode;for(;e;)t.push(e),e=e.parentNode;return t}class zs extends _.Ee{constructor(t){super(t),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},Va=this,this.isMutationObserved=!0,this.addEventListener(_.Dk.MOUNTED,this.onMounted),this.addEventListener(_.Dk.ATTR_MODIFIED,this.onAttrModified)}handleRadius(){const{radius:t,clipPath:e,width:n=0,height:i=0}=this.attributes;if(t&&n&&i){const[a,l]=this.getBounds().min,u={x:a,y:l,radius:t,width:n,height:i};if(e)Object.assign(this.parsedStyle.clipPath.style,u);else{const f=new _.UL({style:u});this.style.clipPath=f}}else e&&(this.style.clipPath=null)}}const Ts=new WeakMap;let Va=null;const ds=r=>{if(Va&&_o(Va).includes(r)){const t=Ts.get(r);t?t.includes(Va)||t.push(Va):Ts.set(r,[Va])}},es=r=>{const t=Ts.get(r);t&&t.forEach(e=>e.handleRadius())};class js extends $a{constructor(t){super(t)}isImage(){const{src:t}=this.attributes;return!!t}getIconStyle(t=this.attributes){const{width:e=0,height:n=0}=t,i=this.getGraphicStyle(t);return this.isImage()?Object.assign({x:-e/2,y:-n/2},i):Object.assign({textBaseline:"middle",textAlign:"center"},i)}render(t=this.attributes,e=this){this.upsert("icon",this.isImage()?zs:_.xv,this.getIconStyle(t),e)}}class ns extends $a{get context(){return this.config.context}get parsedAttributes(){return this.attributes}onframe(){}animate(t,e){const n=super.animate(t,e);return n&&(n.onframe=()=>this.onframe(),n.finished.then(()=>this.onframe())),n}}var rs=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Ti extends ns{constructor(t){super(Pi({style:Ti.defaultStyleProps},t)),this.type="node"}getSize(t=this.attributes){const{size:e}=t;return ea(e)}getKeyStyle(t){const e=this.getGraphicStyle(t);return Object.assign(Ms(e,["label","halo","icon","badge","port"]))}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=wi(this.getGraphicStyle(t),"label"),{placement:n,maxWidth:i,offsetX:a,offsetY:l}=e,u=rs(e,["placement","maxWidth","offsetX","offsetY"]),f=this.getShape("key").getLocalBounds();return Object.assign(ai(f,n,a,l),{wordWrapWidth:hs(f,i)},u)}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),{fill:n}=e,i=rs(e,["fill"]),a=wi(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign(Object.assign({},i),{stroke:n}),a)}getIconStyle(t){if(t.icon===!1||!t.iconText&&!t.iconSrc)return!1;const e=wi(this.getGraphicStyle(t),"icon");return Object.assign(Zs(t.size,e),e)}getBadgesStyle(t){var e;const n=Ua(this.shapeMap,"badge-"),i={};if(Object.keys(n).forEach(Z=>{i[Z]=!1}),t.badge===!1||!(!((e=t.badges)===null||e===void 0)&&e.length))return i;const{badges:a=[],badgePalette:l,opacity:u=1}=t,f=rs(t,["badges","badgePalette","opacity"]),m=Bo(l),x=wi(this.getGraphicStyle(f),"badge");return a.forEach((Z,V)=>{i[V]=Object.assign(Object.assign({backgroundFill:m?m[V%(m==null?void 0:m.length)]:void 0,opacity:u},x),this.getBadgeStyle(Z))}),i}getBadgeStyle(t){const e=this.getShape("key"),{placement:n="top",offsetX:i,offsetY:a}=t,l=rs(t,["placement","offsetX","offsetY"]),u=ai(e.getLocalBounds(),n,i,a,!0);return Object.assign(Object.assign({},u),l)}getPortsStyle(t){var e;const n=this.getPorts(),i={};if(Object.keys(n).forEach(u=>{i[u]=!1}),t.port===!1||!(!((e=t.ports)===null||e===void 0)&&e.length))return i;const a=wi(this.getGraphicStyle(t),"port"),{ports:l=[]}=t;return l.forEach((u,f)=>{const m=u.key||f,x=Object.assign(Object.assign({},a),u);if(Tr(x))i[m]=!1;else{const[Z,V]=this.getPortXY(t,u);i[m]=Object.assign({transform:[["translate",Z,V]]},x)}}),i}getPortXY(t,e){const{placement:n="left"}=e,i=this.getShape("key");return wr(Zo(this.context,i),n)}getPorts(){return Ua(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return di(t,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t),i=this.getShape("key");this.upsert("halo",i.constructor,n,e)}drawIconShape(t,e){const n=this.getIconStyle(t);this.upsert("icon",js,n,e),ds(this)}drawBadgeShapes(t,e){const n=this.getBadgesStyle(t);Object.keys(n).forEach(i=>{const a=n[i];this.upsert(`badge-${i}`,Ia,a,e)})}drawPortShapes(t,e){const n=this.getPortsStyle(t);Object.keys(n).forEach(i=>{const a=n[i],l=`port-${i}`;this.upsert(l,_.Cd,a,e)})}drawLabelShape(t,e){const n=this.getLabelStyle(t);this.upsert("label",fa,n,e)}_drawKeyShape(t,e){return this.drawKeyShape(t,e)}render(t=this.parsedAttributes,e=this){this._drawKeyShape(t,e),this.getShape("key")&&(this.drawHaloShape(t,e),this.drawIconShape(t,e),this.drawBadgeShapes(t,e),this.drawLabelShape(t,e),this.drawPortShapes(t,e))}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&es(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}Ti.defaultStyleProps={x:0,y:0,size:32,droppable:!0,draggable:!0,port:!0,ports:[],portZIndex:2,portLinkToCenter:!1,badge:!0,badges:[],badgeZIndex:3,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloStrokeOpacity:.25,haloPointerEvents:"none",haloZIndex:-1,icon:!0,iconZIndex:1,label:!0,labelIsBillboard:!0,labelMaxWidth:"200%",labelPlacement:"bottom",labelWordWrap:!1,labelZIndex:0};function Zo(r,t){if(!r)return t.getLocalBounds();const e=r.canvas.getLayer(),n=t.cloneNode();ti(n,"hidden"),e.appendChild(n);const i=n.getLocalBounds();return n.destroy(),i}class Pa extends Ti{constructor(t){super(Pi({style:Pa.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",_.Cd,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{r:Math.min(...this.getSize(t))/2})}getIconStyle(t){const e=super.getIconStyle(t),{r:n}=this.getShape("key").attributes,i=n*2*qn;return e?Object.assign({width:i,height:i},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Lr(t,n,e)}}Pa.defaultStyleProps={size:32};class ci extends Ti{constructor(t){super(t)}get parsedAttributes(){return this.attributes}drawKeyShape(t,e){return this.upsert("key",_.mg,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{points:this.getPoints(t)})}getIntersectPoint(t,e=!1){var n,i;const{points:a}=this.getShape("key").attributes,l=[+(((n=this.attributes)===null||n===void 0?void 0:n.x)||0),+(((i=this.attributes)===null||i===void 0?void 0:i.y)||0)];return br(t,l,a,!0,e).point}}class Hi extends ci{constructor(t){super(t)}getPoints(t){const[e,n]=this.getSize(t);return ca(e,n)}}var Ya=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Gi extends Pa{constructor(t){super(Pi({style:Gi.defaultStyleProps},t))}parseOuterR(){const{size:t}=this.parsedAttributes;return Math.min(...ea(t))/2}parseInnerR(){const{innerR:t}=this.parsedAttributes;return(0,ta.Z)(t)?parseInt(t)/100*this.parseOuterR():t}drawDonutShape(t,e){const{donuts:n}=t;if(!(n!=null&&n.length))return;const i=n.map(Z=>(0,on.Z)(Z)?{value:Z}:Z),a=wi(this.getGraphicStyle(t),"donut"),l=Bo(t.donutPalette);if(!l)return;const u=i.reduce((Z,V)=>{var et;return Z+((et=V.value)!==null&&et!==void 0?et:0)},0),f=this.parseOuterR(),m=this.parseInnerR();let x=0;i.forEach((Z,V)=>{const{value:et=0,color:dt=l[V%l.length]}=Z,At=Ya(Z,["value","color"]),Dt=(u===0?1/i.length:et/u)*360;this.upsert(`round${V}`,_.y$,Object.assign(Object.assign(Object.assign({},a),{d:no(f,m,x,x+Dt),fill:dt}),At),e),x+=Dt})}render(t,e=this){super.render(t,e),this.drawDonutShape(t,e)}}Gi.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const fs=(r,t,e,n)=>[r+Math.sin(n)*e,t-Math.cos(n)*e],ll=(r,t,e,n)=>n<=0||e<=n?[["M",r-e,t],["A",e,e,0,1,1,r+e,t],["A",e,e,0,1,1,r-e,t],["Z"]]:[["M",r-e,t],["A",e,e,0,1,1,r+e,t],["A",e,e,0,1,1,r-e,t],["Z"],["M",r+n,t],["A",n,n,0,1,0,r-n,t],["A",n,n,0,1,0,r+n,t],["Z"]],xo=(r,t,e,n,i,a)=>{const[l,u]=[i/360*2*Math.PI,a/360*2*Math.PI],f=[fs(r,t,n,l),fs(r,t,e,l),fs(r,t,e,u),fs(r,t,n,u)],m=u-l>Math.PI?1:0;return[["M",f[0][0],f[0][1]],["L",f[1][0],f[1][1]],["A",e,e,0,m,1,f[2][0],f[2][1]],["L",f[3][0],f[3][1]],["A",n,n,0,m,0,f[0][0],f[0][1]],["Z"]]},no=(r=0,t=0,e,n)=>{const[i,a]=[0,0];return Math.abs(e-n)%360<1e-6?ll(i,a,r,t):xo(i,a,r,t,e,n)};class Cs extends Ti{constructor(t){super(Pi({style:Cs.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",_.Pj,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,i]=this.getSize(t);return Object.assign(Object.assign({},e),{rx:n/2,ry:i/2})}getIconStyle(t){const e=super.getIconStyle(t),{rx:n,ry:i}=this.getShape("key").attributes,a=Math.min(+n,+i)*2*qn;return e?Object.assign({width:a,height:a},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Lr(t,n,e)}}Cs.defaultStyleProps={size:[45,35]};class Ha extends ci{constructor(t){super(t)}getOuterR(t){return t.outerR||Math.min(...this.getSize(t))/2}getPoints(t){return na(this.getOuterR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getOuterR(t)*qn;return e?Object.assign({width:n,height:n},e):!1}}var Aa=y(30259),la=y(84502),jr=y(49527),zo=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Ws extends Ti{constructor(t){super(Object.assign(Object.assign({},t),{style:Object.assign({},Ws.defaultStyleProps,t.style)})),this.rootPointerEvent=new _.nR(null),this.forwardEvents=e=>{const n=this.context.canvas,i=n.context.renderingContext.root.ownerDocument.defaultView;this.normalizeToPointerEvent(e,i).forEach(l=>{const u=this.bootstrapEvent(this.rootPointerEvent,l,i,e);(0,$s.Z)(n.context.eventService,"mappingTable.pointerupoutside",[]),n.context.eventService.mapEvent(u)})}}get eventService(){return this.context.canvas.context.eventService}get events(){return[G.CLICK,G.POINTER_DOWN,G.POINTER_MOVE,G.POINTER_UP,G.POINTER_OVER,G.POINTER_LEAVE]}getDomElement(){return this.getShape("key").getDomElement()}render(t=this.parsedAttributes,e=this){this.drawKeyShape(t,e),this.drawPortShapes(t,e)}getKeyStyle(t){const e=(0,la.Z)(t,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:n=0,dy:i=0}=e,a=zo(e,["dx","dy"]),[l,u]=this.getSize(t);return Object.assign(Object.assign({x:n,y:i},a),{width:l,height:u})}drawKeyShape(t,e){const n=this.getKeyStyle(t),{x:i,y:a,width:l=0,height:u=0}=n,f=this.upsert("key-container",_.UL,{x:i,y:a,width:l,height:u,opacity:0},e);return this.upsert("key",_.k9,n,f)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof Aa.Th))return;const n=this.getDomElement();this.events.forEach(i=>{n.addEventListener(i,this.forwardEvents)})}attributeChangedCallback(t,e,n){t==="zIndex"&&e!==n&&(this.getDomElement().style.zIndex=n)}destroy(){const t=this.getDomElement();this.events.forEach(e=>{t.removeEventListener(e,this.forwardEvents)}),super.destroy()}normalizeToPointerEvent(t,e){const n=[];if(e.isTouchEvent(t))for(let i=0;i<t.changedTouches.length;i++){const a=t.changedTouches[i];(0,jr.Z)(a.button)&&(a.button=0),(0,jr.Z)(a.buttons)&&(a.buttons=1),(0,jr.Z)(a.isPrimary)&&(a.isPrimary=t.touches.length===1&&t.type==="touchstart"),(0,jr.Z)(a.width)&&(a.width=a.radiusX||1),(0,jr.Z)(a.height)&&(a.height=a.radiusY||1),(0,jr.Z)(a.tiltX)&&(a.tiltX=0),(0,jr.Z)(a.tiltY)&&(a.tiltY=0),(0,jr.Z)(a.pointerType)&&(a.pointerType="touch"),(0,jr.Z)(a.pointerId)&&(a.pointerId=a.identifier||0),(0,jr.Z)(a.pressure)&&(a.pressure=a.force||.5),(0,jr.Z)(a.twist)&&(a.twist=0),(0,jr.Z)(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=t.type,n.push(a)}else if(e.isMouseEvent(t)){const i=t;(0,jr.Z)(i.isPrimary)&&(i.isPrimary=!0),(0,jr.Z)(i.width)&&(i.width=1),(0,jr.Z)(i.height)&&(i.height=1),(0,jr.Z)(i.tiltX)&&(i.tiltX=0),(0,jr.Z)(i.tiltY)&&(i.tiltY=0),(0,jr.Z)(i.pointerType)&&(i.pointerType="mouse"),(0,jr.Z)(i.pointerId)&&(i.pointerId=1),(0,jr.Z)(i.pressure)&&(i.pressure=.5),(0,jr.Z)(i.twist)&&(i.twist=0),(0,jr.Z)(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,n.push(i)}else n.push(t);return n}transferMouseData(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null}bootstrapEvent(t,e,n,i){t.view=n,t.originalEvent=null,t.nativeEvent=i,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);const{x:a,y:l}=this.getViewportXY(e);t.viewport.x=a,t.viewport.y=l;const[u,f]=this.context.canvas.getCanvasByViewport([a,l]);return t.canvas.x=u,t.canvas.y=f,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=i.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t}getViewportXY(t){let e,n;const{offsetX:i,offsetY:a,clientX:l,clientY:u}=t;if(!(0,z.Z)(i)&&!(0,z.Z)(a))e=i,n=a;else{const f=this.eventService.client2Viewport({x:l,y:u});e=f.x,n=f.y}return{x:e,y:n}}onframe(){super.onframe();const{opacity:t}=this.attributes;this.getDomElement().style.opacity=`${t}`}}Ws.defaultStyleProps={size:[160,80],halo:!1,icon:!1,label:!1,pointerEvents:"auto"};var ro=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Ns extends Ti{constructor(t){super(Pi({style:Ns.defaultStyleProps},t))}getKeyStyle(t){const[e,n]=this.getSize(t),i=super.getKeyStyle(t),{fillOpacity:a,opacity:l=a}=i,u=ro(i,["fillOpacity","opacity"]);return Object.assign(Object.assign({opacity:l},u),{width:e,height:n,x:-e/2,y:-n/2})}getBounds(){return this.getShape("key").getBounds()}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getShape("key").attributes,{fill:n,stroke:i}=e,a=ro(e,["fill","stroke"]),l=wi(this.getGraphicStyle(t),"halo"),u=Number(l.lineWidth),[f,m]=M(this.getSize(t),[u,u]),{lineWidth:x}=l,Z={fill:"transparent",lineWidth:x/2,width:f-x/2,height:m-x/2,x:-(f-x/2)/2,y:-(m-x/2)/2};return Object.assign(Object.assign({},l),Z)}getIconStyle(t){const e=super.getIconStyle(t),[n,i]=this.getSize(t);return e?Object.assign({width:n*qn,height:i*qn},e):!1}drawKeyShape(t,e){const n=this.upsert("key",zs,this.getKeyStyle(t),e);return ds(this),n}drawHaloShape(t,e){this.upsert("halo",_.UL,this.getHaloStyle(t),e)}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&es(this)}}Ns.defaultStyleProps={size:32};class jo extends Ti{constructor(t){super(t)}getKeyStyle(t){const[e,n]=this.getSize(t);return Object.assign(Object.assign({},super.getKeyStyle(t)),{width:e,height:n,x:-e/2,y:-n/2})}getIconStyle(t){const e=super.getIconStyle(t),{width:n,height:i}=this.getShape("key").attributes;return e?Object.assign({width:n*qn,height:i*qn},e):!1}drawKeyShape(t,e){return this.upsert("key",_.UL,this.getKeyStyle(t),e)}}class io extends ci{constructor(t){super(t)}getInnerR(t){return t.innerR||this.getOuterR(t)*3/8}getOuterR(t){return Math.min(...this.getSize(t))/2}getPoints(t){return Mi(this.getOuterR(t),this.getInnerR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getInnerR(t)*2*qn;return e?Object.assign({width:n,height:n},e):!1}getPortXY(t,e){const{placement:n="top"}=e,i=this.getShape("key").getLocalBounds(),a=Oa(this.getOuterR(t),this.getInnerR(t));return wr(i,n,a,!1)}}class Ps extends ci{constructor(t){super(Pi({style:Ps.defaultStyleProps},t))}getPoints(t){const{direction:e}=t,[n,i]=this.getSize(t);return Fi(n,i,e)}getPortXY(t,e){const{direction:n}=t,{placement:i="top"}=e,a=this.getShape("key").getLocalBounds(),[l,u]=this.getSize(t),f=gs(l,u,n);return wr(a,i,f,!1)}getIconStyle(t){const{icon:e,iconText:n,iconSrc:i,direction:a}=t;if(e===!1||(0,Ii.Z)(n||i))return!1;const l=wi(this.getGraphicStyle(t),"icon"),u=this.getShape("key").getLocalBounds(),[f,m]=yn(u,a),x=lr(u,a)*2*qn;return Object.assign({x:f,y:m,width:x,height:x},l)}}Ps.defaultStyleProps={size:40,direction:"up"};var Gs=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class ka extends Ti{constructor(t){super(Pi({style:ka.defaultStyleProps},t)),this.type="combo",this.updateComboPosition(this.parsedAttributes)}getKeySize(t){const{collapsed:e,childrenNode:n=[]}=t;return n.length===0?this.getEmptyKeySize(t):e?this.getCollapsedKeySize(t):this.getExpandedKeySize(t)}getEmptyKeySize(t){const{padding:e,collapsedSize:n}=t,[i,a,l,u]=Ne(e);return M(ea(n),[u+a,i+l,0])}getCollapsedKeySize(t){return ea(t.collapsedSize)}getExpandedKeySize(t){const e=this.getContentBBox(t);return[tt(e),Nt(e),0]}getContentBBox(t){const{childrenNode:e=[],padding:n}=t,i=e.map(l=>this.context.element.getElement(l)).filter(Boolean);if(i.length===0){const l=new _.mN,{x:u=0,y:f=0,size:m}=t,[x,Z]=ea(m);return l.setMinMax([u-x/2,f-Z/2,0],[u+x/2,f+Z/2,0]),l}const a=qt(i.map(l=>l.getBounds()));return n?Ut(a,n):a}drawCollapsedMarkerShape(t,e){const n=this.getCollapsedMarkerStyle(t);this.upsert("collapsed-marker",js,n,e),ds(this)}getCollapsedMarkerStyle(t){if(!t.collapsed||!t.collapsedMarker)return!1;const e=wi(this.getGraphicStyle(t),"collapsedMarker"),{type:n}=e,i=Gs(e,["type"]),a=this.getShape("key"),[l,u]=Qe(a.getLocalBounds(),"center"),f=Object.assign(Object.assign({},i),{x:l,y:u});if(n){const m=this.getCollapsedMarkerText(n,t);Object.assign(f,{text:m})}return f}getCollapsedMarkerText(t,e){const{childrenData:n=[]}=e,{model:i}=this.context;return t==="descendant-count"?i.getDescendantsData(this.id).length.toString():t==="child-count"?n.length.toString():t==="node-count"?i.getDescendantsData(this.id).filter(a=>i.getElementType(ye(a))==="node").length.toString():(0,xe.Z)(t)?t(n):""}getComboPosition(t){const{x:e=0,y:n=0,collapsed:i,childrenData:a=[]}=t;if(a.length===0)return[+e,+n,0];if(i){const{model:l}=this.context,u=l.getDescendantsData(this.id).filter(f=>!l.isCombo(ye(f)));if(u.length>0&&u.some(Ce)){const f=u.reduce((m,x)=>M(m,Yt(x)),[0,0,0]);return ot(f,u.length)}return[+e,+n,0]}return this.getContentBBox(t).center}getComboStyle(t){const[e,n]=this.getComboPosition(t);return{x:e,y:n,transform:[["translate",e,n]]}}updateComboPosition(t){const e=this.getComboStyle(t);Object.assign(this.style,e);const{x:n,y:i}=e;this.context.model.syncNodeLikeDatum({id:this.id,style:{x:n,y:i}}),es(this)}render(t,e=this){super.render(t,e),this.drawCollapsedMarkerShape(t,e)}update(t={}){super.update(t),this.updateComboPosition(this.parsedAttributes)}onframe(){super.onframe(),this.attributes.collapsed||this.updateComboPosition(this.parsedAttributes),this.drawKeyShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(this.attributes.collapsed?t:t.map(i=>{var{x:a,y:l,z:u,transform:f}=i,m=Gs(i,["x","y","z","transform"]);return m}),e);return n&&new Proxy(n,{set:(i,a,l)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,l))})}}ka.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class Us extends ka{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",_.Cd,this.getKeyStyle(t),e)}getKeyStyle(t){const{collapsed:e}=t,n=super.getKeyStyle(t),[i]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},n),e&&wi(n,"collapsed")),{r:i/2})}getCollapsedKeySize(t){const[e,n]=ea(t.collapsedSize),i=Math.max(e,n)/2;return[i*2,i*2,0]}getExpandedKeySize(t){const e=this.getContentBBox(t),[n,i]=Xt(e),a=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))/2;return[a*2,a*2,0]}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Lr(t,n,e)}}class wo extends ka{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",_.UL,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,i]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},e),t.collapsed&&wi(e,"collapsed")),{width:n,height:i,x:-n/2,y:-i/2})}}var ao=y(47182);const so={padding:10};function ga(r,t,e,n,i,a){const{padding:l}=Object.assign(so,a),u=Lt(e,l),f=Lt(n,l),m=[r,...i,t];let x=null;const Z=[];for(let V=0,et=m.length;V<et-1;V++){const dt=V+1,At=m[V],Dt=m[dt],Qt=Kn(At,Dt);let oe=null;if(V===0)if(dt===et-1)if(u.intersects(f))oe=Ot(At,Dt,u,f);else if(!Ve(At,u)&&!Ve(Dt,f)){const pe=On(At,u),Be=On(Dt,f);oe=vs(pe,Be,Xi(pe,Be)),oe.points.unshift(pe),oe.points.push(Be)}else Qt||(oe=Wo(At,Dt,u,f));else te(Dt,u)?oe=Ot(At,Dt,u,Lt(Dt,l),x):Qt||(oe=Vs(At,Dt,u));else dt===et-1?te(At,f)?oe=Ot(At,Dt,Lt(At,l),f,x):Qt||(oe=Xa(At,Dt,f,x)):Qt||(oe=vs(At,Dt,x));oe?(Z.push(...oe.points),x=oe.direction):x=Xi(At,Dt),dt<et-1&&Z.push(Dt)}return Z.map(bt)}const pa={N:"S",S:"N",W:"E",E:"W"},Mo={N:-Math.PI/2,S:Math.PI/2,E:0,W:Math.PI};function Xi(r,t){const[e,n]=r,[i,a]=t;return e===i?n>a?"N":"S":n===a?e>i?"W":"E":null}function ks(r,t){return t==="N"||t==="S"?Nt(r):tt(r)}function vs(r,t,e){const n=[r[0],t[1]],i=[t[0],r[1]],a=Xi(r,n),l=Xi(r,i),u=e?pa[e]:null,f=a===e||a!==u&&l!==e?n:i;return{points:[f],direction:Xi(f,t)}}function Vs(r,t,e){if(Ve(r,e)){const n=X(r,t,e);return{points:[n],direction:Xi(n,t)}}else{const n=On(r,e),a=["left","right"].includes(ln(r,e))?[t[0],n[1]]:[n[0],t[1]];return{points:[a],direction:Xi(a,t)}}}function Xa(r,t,e,n){const i=Ve(t,e)?t:On(t,e),a=[[i[0],r[1]],[r[0],i[1]]],l=a.filter(f=>He(f,e)&&!ke(f,e,!0)),u=l.filter(f=>Xi(f,r)!==n);if(u.length>0){const f=u.find(m=>Xi(r,m)===n)||u[0];return{points:[f],direction:Xi(f,t)}}else{const f=(0,ao.Z)(a,l)[0],m=vr(t,f,ks(e,n)/2);return{points:[X(m,r,e),m],direction:Xi(m,t)}}}function Wo(r,t,e,n){let i=Vs(r,t,e);const a=pt(i.points[0]);if(te(a,n)){i=Vs(t,r,n);const l=pt(i.points[0]);if(te(l,e)){const u=vr(r,a,ks(e,Xi(r,a))/2),f=vr(t,l,ks(n,Xi(t,l))/2),m=[(u[0]+f[0])/2,(u[1]+f[1])/2],x=Vs(r,m,e),Z=Xa(m,t,n,x.direction);i.points=[x.points[0],Z.points[0]],i.direction=Z.direction}}return i}function Ot(r,t,e,n,i){const l=qt([e,n]),u=$(t,l.center)>$(r,l.center),[f,m]=u?[t,r]:[r,t],x=Nt(l)+tt(l);let Z;if(i){const dt=[f[0]+x*Math.cos(Mo[i]),f[1]+x*Math.sin(Mo[i])];Z=vr(On(dt,l),dt,.01)}else Z=vr(On(f,l),f,-.01);let V=X(Z,m,l),et=[yr(Z,2),yr(V,2)];if((0,S.Z)(yr(Z),yr(V))){const dt=Mt(Y(Z,f),[1,0,0])+Math.PI/2;V=[m[0]+x*Math.cos(dt),m[1]+x*Math.sin(dt),0],V=yr(vr(On(V,l),m,-.01),2);const At=X(Z,V,l);et=[Z,At,V]}return{points:u?et.reverse():et,direction:Xi(u?Z:V,t)}}function X(r,t,e){let n=[r[0],t[1]];return te(n,e)&&(n=[t[0],r[1]]),n}function st(r,t,e,n,i){let f=typeof t=="number"?t:.5;t==="start"&&(f=0),t==="end"&&(f=.99);const m=Rn(r.getPoint(f)),x=Rn(r.getPoint(f+.01));let Z=t==="start"?"left":t==="end"?"right":"center";if(Cr(m,x)||!e){const[Qt,oe]=jt(r,f,n,i);return{transform:[["translate",Qt,oe]],textAlign:Z}}let V=Math.atan2(x[1]-m[1],x[0]-m[0]);x[0]<m[0]&&(Z=Z==="center"?Z:Z==="left"?"right":"left",n*=-1,V+=Math.PI);const[dt,At]=jt(r,f,n,i,V),Dt=[["translate",dt,At],["rotate",V/Math.PI*180]];return{textAlign:Z,transform:Dt}}function xt(r,t,e,n,i){var a,l;const u=((a=r.badge)===null||a===void 0?void 0:a.getGeometryBounds().halfExtents[0])*2||0,f=((l=r.label)===null||l===void 0?void 0:l.getGeometryBounds().halfExtents[0])*2||0;return st(r.key,e,!0,(f?(f/2+u/2)*(t==="suffix"?1:-1):0)+n,i)}function jt(r,t,e,n,i){const[a,l]=Rn(r.getPoint(t));let u=e,f=n;return i&&(u=e*Math.cos(i)-n*Math.sin(i),f=e*Math.sin(i)+n*Math.cos(i)),[a+u,l+f]}function $t(r,t,e,n){if((0,S.Z)(r,t))return r;const i=Y(t,r),a=[r[0]+e*i[0],r[1]+e*i[1]],l=nt(Tt(i,!1));return a[0]+=n*l[0],a[1]+=n*l[1],a}function ee(r){return(0,on.Z)(r)?[r,-r]:r}function De(r){return(0,on.Z)(r)?[r,1-r]:r}function Fe(r,t,e){return[["M",r[0],r[1]],["Q",e[0],e[1],t[0],t[1]]]}function Je(r,t,e){return[["M",r[0],r[1]],["C",e[0][0],e[0][1],e[1][0],e[1][1],t[0],t[1]]]}function cn(r,t=0,e=!1){const n=r.length-1,i=r[0],a=r[n],l=r.slice(1,n),u=[["M",i[0],i[1]]];return l.forEach((f,m)=>{const x=l[m-1]||i,Z=l[m+1]||a;if(!Ur(x,f,Z)&&t){const[V,et]=an(x,f,Z,t);u.push(["L",V[0],V[1]],["Q",f[0],f[1],et[0],et[1]],["L",et[0],et[1]])}else u.push(["L",f[0],f[1]])}),u.push(["L",a[0],a[1]]),e&&u.push(["Z"]),u}function an(r,t,e,n){const i=H(r,t),a=H(e,t),l=Math.min(n,Math.min(i,a)/2),u=[t[0]-l/i*(t[0]-r[0]),t[1]-l/i*(t[1]-r[1])],f=[t[0]-l/a*(t[0]-e[0]),t[1]-l/a*(t[1]-e[1])];return[u,f]}const Tn=r=>{const t=Math.PI/2,e=Nt(r)/2,n=tt(r)/2,i=Math.atan2(e,n)/2,a=Math.atan2(n,e)/2;return{top:[-t-a,-t+a],"top-right":[-t+a,-i],"right-top":[-t+a,-i],right:[-i,i],"bottom-right":[i,t-a],"right-bottom":[i,t-a],bottom:[t-a,t+a],"bottom-left":[t+a,Math.PI-i],"left-bottom":[t+a,Math.PI-i],left:[Math.PI-i,Math.PI+i],"top-left":[Math.PI+i,-t-a],"left-top":[Math.PI+i,-t-a]}};function Mn(r,t,e,n,i){const a=Lt(r),l=r.getCenter();let u=n&&Xr(n),f=i&&Xr(i);if(!u||!f){const m=Tn(a),x=m[t][0],Z=m[t][1],[V,et]=Xt(a),dt=Math.max(V,et),At=M(l,[dt*Math.cos(x),dt*Math.sin(x),0]),Dt=M(l,[dt*Math.cos(Z),dt*Math.sin(Z),0]);u=ni(r,At),f=ni(r,Dt),e||([u,f]=[f,u])}return[u,f]}function Ln(r,t,e,n,i,a){const l=r.getPorts()[i||a],u=r.getPorts()[a||i];let[f,m]=Mn(r,t,e,l,u);const x=jn(r,f,m,n);return l&&(f=yi(l,x[0])),u&&(m=yi(u,x.at(-1))),Je(f,m,x)}function jn(r,t,e,n){const i=r.getCenter();if((0,S.Z)(t,e)){const a=Y(t,i),l=[n*Math.sign(a[0])||n/2,n*Math.sign(a[1])||-n/2,0];return[M(t,l),M(e,J(l,[1,-1,1]))]}return[vr(i,t,$(i,t)+n),vr(i,e,$(i,e)+n)]}function In(r,t,e,n,i,a,l){const u=Gr(r),f=u[a||l],m=u[l||a];let[x,Z]=Mn(r,e,n,f,m);const V=$n(r,x,Z,i);return f&&(x=yi(f,V[0])),m&&(Z=yi(m,V.at(-1))),cn([x,...V,Z],t)}function $n(r,t,e,n){const i=[],a=Lt(r);if((0,S.Z)(t,e))switch(ln(t,a)){case"left":i.push([t[0]-n,t[1]]),i.push([t[0]-n,t[1]+n]),i.push([t[0],t[1]+n]);break;case"right":i.push([t[0]+n,t[1]]),i.push([t[0]+n,t[1]+n]),i.push([t[0],t[1]+n]);break;case"top":i.push([t[0],t[1]-n]),i.push([t[0]+n,t[1]-n]),i.push([t[0]+n,t[1]]);break;case"bottom":i.push([t[0],t[1]+n]),i.push([t[0]+n,t[1]+n]),i.push([t[0]+n,t[1]]);break}else{const l=ln(t,a),u=ln(e,a);if(l===u){const f=l;let m,x;switch(f){case"left":m=Math.min(t[0],e[0])-n,i.push([m,t[1]]),i.push([m,e[1]]);break;case"right":m=Math.max(t[0],e[0])+n,i.push([m,t[1]]),i.push([m,e[1]]);break;case"top":x=Math.min(t[1],e[1])-n,i.push([t[0],x]),i.push([e[0],x]);break;case"bottom":x=Math.max(t[1],e[1])+n,i.push([t[0],x]),i.push([e[0],x]);break}}else{const f=(V,et)=>({left:[et[0]-n,et[1]],right:[et[0]+n,et[1]],top:[et[0],et[1]-n],bottom:[et[0],et[1]+n]})[V],m=f(l,t),x=f(u,e),Z=X(m,x,a);i.push(m,Z,x)}}return i}function sr(r,t){const e=new Set,n=new Set,i=new Set;return r.forEach(a=>{t(a).forEach(u=>{e.add(u),r.includes(u.source)&&r.includes(u.target)?n.add(u):i.add(u)})}),{edges:Array.from(e),internal:Array.from(n),external:Array.from(i)}}function rr(r,t){const e=[];let n=r;for(;n;){e.push(n);const i=t(ye(n));if(i)n=i;else break}if(e.some(i=>{var a;return(a=i.style)===null||a===void 0?void 0:a.collapsed})){const i=e.reverse().findIndex(ha);return e[i]||e.at(-1)}return r}function dr(r,t){return t||(r<4?10:r===4?12:r*2.5)}const gr=(r,t)=>{const e=Math.max(r,t)/2;return[["M",-r/2,0],["A",e,e,0,1,0,2*e-r/2,0],["A",e,e,0,1,0,-r/2,0],["Z"]]},mr=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",r/2,t/2],["Z"]],_r=(r,t)=>[["M",-r/2,0],["L",0,-t/2],["L",r/2,0],["L",0,t/2],["Z"]],Or=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",4*r/5-r/2,0],["L",r/2,t/2],["Z"]],Nr=(r,t)=>[["M",-r/2,-t/2],["L",r/2,-t/2],["L",r/2,t/2],["L",-r/2,t/2],["Z"]],Zr=(r,t)=>{const e=r/2,n=r/7,i=r-n;return[["M",-e,0],["L",0,-t/2],["L",0,t/2],["Z"],["M",i-e,-t/2],["L",i+n-e,-t/2],["L",i+n-e,t/2],["L",i-e,t/2],["Z"]]},Wr=(r,t)=>[["M",r/2,-t/2],["L",-r/2,0],["L",r/2,0],["L",-r/2,0],["L",r/2,t/2]];var j=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class B extends ns{constructor(t){super(Pi({style:B.defaultStyleProps},t)),this.type="edge"}get sourceNode(){const{sourceNode:t}=this.parsedAttributes;return this.context.element.getElement(t)}get targetNode(){const{targetNode:t}=this.parsedAttributes;return this.context.element.getElement(t)}getKeyStyle(t){const e=this.getGraphicStyle(t),{loop:n}=e,i=j(e,["loop"]),{sourceNode:a,targetNode:l}=this,f={d:n&&ui(a,l)?this.getLoopPath(t):this.getKeyPath(t)};return _.y$.PARSED_STYLE_LIST.forEach(m=>{m in i&&(f[m]=i[m])}),f}getLoopPath(t){const{sourcePort:e,targetPort:n}=t,i=this.sourceNode,a=Lt(i),l=Math.max(tt(a),Nt(a)),{placement:u,clockwise:f,dist:m=l}=wi(this.getGraphicStyle(t),"loop");return Ln(i,u,f,m,e,n)}getEndpoints(t,e=!0,n=[]){const{sourcePort:i,targetPort:a}=t,{sourceNode:l,targetNode:u}=this,[f,m]=bi(l,u,i,a);if(!e){const et=f?Xr(f):l.getCenter(),dt=m?Xr(m):u.getCenter();return[et,dt]}const x=typeof n=="function"?n():n,Z=ii(f||l,x[0]||m||u),V=ii(m||u,x[x.length-1]||f||l);return[Z,V]}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),n=wi(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign({},e),n)}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=wi(this.getGraphicStyle(t),"label"),{placement:n,offsetX:i,offsetY:a,autoRotate:l,maxWidth:u}=e,f=j(e,["placement","offsetX","offsetY","autoRotate","maxWidth"]),m=st(this.shapeMap.key,n,l,i,a),x=this.shapeMap.key.getLocalBounds(),Z=Ma([x.min,x.max],u);return Object.assign({wordWrapWidth:Z},m,f)}getBadgeStyle(t){if(t.badge===!1||!t.badgeText)return!1;const e=wi(t,"badge"),{offsetX:n,offsetY:i,placement:a}=e,l=j(e,["offsetX","offsetY","placement"]);return Object.assign(l,xt(this.shapeMap,a,t.labelPlacement,n,i))}drawArrow(t,e){var n;const i=e==="start",l=t[e==="start"?"startArrow":"endArrow"],u=this.shapeMap.key;if(l){const f=this.getArrowStyle(t,i),[m,x,Z]=i?["markerStart","markerStartOffset","startArrowOffset"]:["markerEnd","markerEndOffset","endArrowOffset"],V=u.parsedStyle[m];if(V)V.attr(f);else{const et=f.src?_.Ee:_.y$,dt=new et({style:f});u.style[m]=dt}u.style[x]=t[Z]||f.width/2+ +f.lineWidth}else{const f=i?"markerStart":"markerEnd";(n=u.style[f])===null||n===void 0||n.destroy(),u.style[f]=null}}getArrowStyle(t,e){const n=this.getShape("key").attributes,i=e?"startArrow":"endArrow",a=wi(this.getGraphicStyle(t),i),{size:l,type:u}=a,f=j(a,["size","type"]),[m,x]=ea(dr(n.lineWidth,l)),V=((0,xe.Z)(u)?u:c[u]||mr)(m,x);return Object.assign((0,la.Z)(n,["stroke","strokeOpacity","fillOpacity"]),{width:m,height:x},Object.assign({},V&&{d:V,fill:u==="simple"?"":n.stroke}),f)}drawLabelShape(t,e){const n=this.getLabelStyle(t);this.upsert("label",fa,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t);this.upsert("halo",_.y$,n,e)}drawBadgeShape(t,e){const n=this.getBadgeStyle(t);this.upsert("badge",Ia,n,e)}drawSourceArrow(t){this.drawArrow(t,"start")}drawTargetArrow(t){this.drawArrow(t,"end")}drawKeyShape(t,e){const n=this.getKeyStyle(t);return this.upsert("key",_.y$,n,e)}render(t=this.parsedAttributes,e=this){this.drawKeyShape(t,e),this.getShape("key")&&(this.drawSourceArrow(t),this.drawTargetArrow(t),this.drawLabelShape(t,e),this.drawHaloShape(t,e),this.drawBadgeShape(t,e))}onframe(){this.drawKeyShape(this.parsedAttributes,this),this.drawSourceArrow(this.parsedAttributes),this.drawTargetArrow(this.parsedAttributes),this.drawHaloShape(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this),this.drawBadgeShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(t,e);return n&&new Proxy(n,{set:(i,a,l)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,l))})}}B.defaultStyleProps={badge:!0,badgeOffsetX:0,badgeOffsetY:0,badgePlacement:"suffix",isBillboard:!0,label:!0,labelAutoRotate:!0,labelIsBillboard:!0,labelMaxWidth:"80%",labelOffsetX:4,labelOffsetY:0,labelPlacement:"center",labelTextBaseline:"middle",labelWordWrap:!1,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloPointerEvents:"none",haloStrokeOpacity:.25,haloZIndex:-1,loop:!0,startArrow:!1,startArrowLineDash:0,startArrowLineJoin:"round",startArrowLineWidth:1,startArrowTransformOrigin:"center",startArrowType:"vee",endArrow:!1,endArrowLineDash:0,endArrowLineJoin:"round",endArrowLineWidth:1,endArrowTransformOrigin:"center",endArrowType:"vee",loopPlacement:"top",loopClockwise:!0};class P extends B{constructor(t){super(Pi({style:P.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t),{controlPoints:i,curvePosition:a,curveOffset:l}=t,u=this.getControlPoints(e,n,De(a),ee(l),i);return Je(e,n,u)}getControlPoints(t,e,n,i,a){return(a==null?void 0:a.length)===2?a:[$t(t,e,n[0],i[0]),$t(t,e,n[1],i[1])]}}P.defaultStyleProps={curvePosition:.5,curveOffset:20};class k extends P{constructor(t){super(Pi({style:k.defaultStyleProps},t))}getControlPoints(t,e,n,i){const a=e[0]-t[0];return[[t[0]+a*n[0]+i[0],t[1]],[e[0]-a*n[1]+i[1],e[1]]]}}k.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class U extends P{constructor(t){super(Pi({style:U.defaultStyleProps},t))}get ref(){return this.context.model.getRootsData()[0]}getEndpoints(t){if(this.sourceNode.id===this.ref.id)return super.getEndpoints(t);const e=Yt(this.ref),n=this.sourceNode.getIntersectPoint(e,!0),i=this.targetNode.getIntersectPoint(e);return[n,i]}toRadialCoordinate(t){const e=Yt(this.ref),n=$(t,e),i=ut(Y(t,e));return[n,i]}getControlPoints(t,e,n,i){const[a,l]=this.toRadialCoordinate(t),[u]=this.toRadialCoordinate(e),f=u-a;return[[t[0]+(f*n[0]+i[0])*Math.cos(l),t[1]+(f*n[0]+i[0])*Math.sin(l)],[e[0]-(f*n[1]-i[0])*Math.cos(l),e[1]-(f*n[1]-i[0])*Math.sin(l)]]}}U.defaultStyleProps={curvePosition:.5,curveOffset:20};class rt extends P{constructor(t){super(Pi({style:rt.defaultStyleProps},t))}getControlPoints(t,e,n,i){const a=e[1]-t[1];return[[t[0],t[1]+a*n[0]+i[0]],[e[0],e[1]-a*n[1]+i[1]]]}}rt.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class ct extends B{constructor(t){super(Pi({style:ct.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t);return[["M",e[0],e[1]],["L",n[0],n[1]]]}}ct.defaultStyleProps={};const lt={enableObstacleAvoidance:!1,offset:10,maxAllowedDirectionChange:Math.PI/2,maximumLoops:3e3,gridSize:5,startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{right:{stepX:1,stepY:0},left:{stepX:-1,stepY:0},bottom:{stepX:0,stepY:1},top:{stepX:0,stepY:-1}},penalties:{0:0,90:0},distFunc:H},mt=r=>`${Math.round(r[0])}|||${Math.round(r[1])}`;function Ft(r,t){const e=n=>Math.round(n/t);return(0,on.Z)(r)?e(r):r.map(e)}function ae(r,t){const e=Math.abs(r-t);return e>Math.PI?2*Math.PI-e:e}function me(r,t){const e=t[0]-r[0],n=t[1]-r[1];return!e&&!n?0:Math.atan2(n,e)}function Oe(r,t,e,n){const i=me(r,t),a=e[mt(r)],u=me(a||n,r);return ae(u,i)}const _e=(r,t)=>{const{offset:e,gridSize:n}=t,i={};return r.forEach(a=>{if(!a||a.destroyed||!a.isVisible())return;const l=Ut(a.getRenderBounds(),e);for(let u=Ft(l.min[0],n);u<=Ft(l.max[0],n);u+=1)for(let f=Ft(l.min[1],n);f<=Ft(l.max[1],n);f+=1)i[`${u}|||${f}`]=!0}),i};function Ye(r,t,e){return Math.min(...t.map(n=>e(r,n)))}function mn(r,t,e){let n=r[0],i=e(r[0],t);for(let a=0;a<r.length;a++){const l=r[a],u=e(l,t);u<i&&(n=l,i=u)}return n}const bn=(r,t,e,n)=>{if(!t)return[r];const{directionMap:i,offset:a}=n,l=Ut(t.getRenderBounds(),a),u=Object.keys(i).reduce((f,m)=>{if(e.includes(m)){const x=i[m],[Z,V]=Xt(l),et=[r[0]+x.stepX*Z,r[1]+x.stepY*V],dt=Zn(l);for(let At=0;At<dt.length;At++){const Dt=ve([r,et],dt[At]);Dt&&ke(Dt,l)&&f.push(Dt)}}return f},[]);return te(r,l)||u.push(r),u.map(f=>Ft(f,n.gridSize))},Cn=(r,t,e,n,i,a,l)=>{const u=[];let f=[a[0]===n[0]?n[0]:r[0]*l,a[1]===n[1]?n[1]:r[1]*l];u.unshift(f);let m=r,x=t[mt(m)];for(;x;){const et=x,dt=m;Oe(et,dt,t,e)&&(f=[et[0]===dt[0]?f[0]:et[0]*l,et[1]===dt[1]?f[1]:et[1]*l],u.unshift(f)),x=t[mt(et)],m=et}const Z=i.map(et=>[et[0]*l,et[1]*l]),V=mn(Z,f,H);return u.unshift(V),u};function Bn(r,t,e,n){const i=bt(r.getCenter()),a=bt(t.getCenter()),l=Object.assign(lt,n),{gridSize:u}=l,f=l.enableObstacleAvoidance?e:[r,t],m=_e(f,l),x=Ft(i,u),Z=Ft(a,u),V=bn(i,r,l.startDirections,l),et=bn(a,t,l.endDirections,l);V.forEach($e=>delete m[mt($e)]),et.forEach($e=>delete m[mt($e)]);const dt={},At={},Dt={},Qt={},oe={},pe=new Fn;for(let $e=0;$e<V.length;$e++){const zn=V[$e],cr=mt(zn);dt[cr]=zn,Qt[cr]=0,oe[cr]=Ye(zn,et,l.distFunc),pe.add({id:cr,value:oe[cr]})}const Be=et.map($e=>mt($e));let vn=l.maximumLoops,nn,An=1/0;for(const[$e,zn]of Object.entries(dt))oe[$e]<=An&&(An=oe[$e],nn=zn);for(;Object.keys(dt).length>0&&vn>0;){const $e=pe.minId(!1);if($e)nn=dt[$e];else break;const zn=mt(nn);if(Be.includes(zn))return Cn(nn,Dt,x,a,V,Z,u);delete dt[zn],pe.remove(zn),At[zn]=!0;for(const cr of Object.values(l.directionMap)){const fr=M(nn,[cr.stepX,cr.stepY]),Vr=mt(fr);if(At[Vr])continue;const Rr=Oe(nn,fr,Dt,x);if(Rr>l.maxAllowedDirectionChange||m[Vr])continue;dt[Vr]||(dt[Vr]=fr);const Fr=l.penalties[Rr],Er=l.distFunc(nn,fr)+(isNaN(Fr)?u:Fr),Qr=Qt[zn]+Er,Ai=Qt[Vr];Ai&&Qr>=Ai||(Dt[Vr]=nn,Qt[Vr]=Qr,oe[Vr]=Qr+Ye(fr,et,l.distFunc),pe.add({id:Vr,value:oe[Vr]}))}vn-=1}return[]}class Fn{constructor(){this.arr=[],this.map={},this.arr=[],this.map={}}_innerAdd(t,e){let n=0,i=e-1;for(;i-n>1;){const a=Math.floor((n+i)/2);if(this.arr[a].value>t.value)i=a;else if(this.arr[a].value<t.value)n=a;else{this.arr.splice(a,0,t),this.map[t.id]=!0;return}}this.arr.splice(i,0,t),this.map[t.id]=!0}add(t){delete this.map[t.id];const e=this.arr.length;if(!e||this.arr[e-1].value<t.value){this.arr.push(t),this.map[t.id]=!0;return}this._innerAdd(t,e)}remove(t){this.map[t]&&delete this.map[t]}_clearAndGetMinId(){let t;for(let e=this.arr.length-1;e>=0;e--)this.map[this.arr[e].id]?t=this.arr[e].id:this.arr.splice(e,1);return t}_findFirstId(){for(;this.arr.length;){const t=this.arr.shift();if(this.map[t.id])return t.id}}minId(t){return t?this._clearAndGetMinId():this._findFirstId()}}class Qn extends B{constructor(t){super(Pi({style:Qn.defaultStyleProps},t))}getControlPoints(t){const{router:e}=t,{sourceNode:n,targetNode:i}=this,[a,l]=this.getEndpoints(t,!1);let u=[];if(!e)u=t.controlPoints;else if(e.type==="shortest-path"){const f=this.context.element.getNodes();u=Bn(n,i,f,e),u.length||(u=ga(a,l,n,i,t.controlPoints,{padding:e.offset}))}else e.type==="orth"&&(u=ga(a,l,n,i,t.controlPoints,e));return u}getPoints(t){const e=this.getControlPoints(t),[n,i]=this.getEndpoints(t,!0,e);return[n,...e,i]}getKeyPath(t){const e=this.getPoints(t);return cn(e,t.radius)}getLoopPath(t){const{sourcePort:e,targetPort:n,radius:i}=t,a=this.sourceNode,l=Lt(a),u=Math.max(tt(l),Nt(l))/4,{placement:f,clockwise:m,dist:x=u}=wi(this.getGraphicStyle(t),"loop");return In(a,i,f,m,x,e,n)}}Qn.defaultStyleProps={radius:0,controlPoints:[],router:!1};class Vn extends B{constructor(t){super(Pi({style:Vn.defaultStyleProps},t))}getKeyPath(t){const{curvePosition:e,curveOffset:n}=t,[i,a]=this.getEndpoints(t),l=t.controlPoint||$t(i,a,e,n);return Fe(i,a,l)}}Vn.defaultStyleProps={curvePosition:.5,curveOffset:30};var ir=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function or(r){return r instanceof Ti&&r.type==="node"}function pr(r){return r instanceof B}function Dr(r){return r instanceof ka}function li(r){return or(r)||pr(r)||Dr(r)}function ui(r,t){return!r||!t?!1:r===t}const Hr={top:[.5,0],right:[1,.5],bottom:[.5,1],left:[0,.5],"left-top":[0,0],"top-left":[0,0],"left-bottom":[0,1],"bottom-left":[0,1],"right-top":[1,0],"top-right":[1,0],"right-bottom":[1,1],"bottom-right":[1,1],default:[.5,.5]};function wr(r,t,e=Hr,n=!0){const i=[.5,.5],a=(0,ta.Z)(t)?(0,da.Z)(e,t.toLocaleLowerCase(),i):t;if(!n&&(0,ta.Z)(t))return a;const[l,u]=a||i;return[r.min[0]+tt(r)*l,r.min[1]+Nt(r)*u]}function Gr(r){if(!r)return{};const t=r.getPorts();return(r.attributes.ports||[]).forEach((n,i)=>{var a;const{key:l,placement:u}=n;Tr(n)&&(t[a=l||i]||(t[a]=Qe(r.getShape("key").getBounds(),u)))}),t}function Tr(r){const{r:t}=r;return!t||Number(t)===0}function Xr(r){return Jt(r)?r:r.getPosition()}function bi(r,t,e,n){const i=Sr(r,t,e,n),a=Sr(t,r,n,e);return[i,a]}function Sr(r,t,e,n){const i=Gr(r);if(e)return i[e];const a=Object.values(i);if(a.length===0)return;const l=a.map(m=>Xr(m)),u=oi(t,n),[f]=Ci(l,u);return a.find(m=>Xr(m)===f)}function oi(r,t){const e=Gr(r);if(t)return[Xr(e[t])];const n=Object.values(e);return n.length>0?n.map(i=>Xr(i)):[r.getCenter()]}function ii(r,t){return Dr(r)||or(r)?ni(r,t):yi(r,t)}function yi(r,t){if(!r||!t)return[0,0,0];if(Jt(r))return r;if(r.attributes.linkToCenter)return r.getPosition();const e=Jt(t)?t:or(t)?t.getCenter():t.getPosition();return Lr(e,r.getBounds())}function ni(r,t){if(!r||!t)return[0,0,0];const e=Jt(t)?t:or(t)?t.getCenter():t.getPosition();return r.getIntersectPoint(e)||r.getCenter()}function ai(r,t="bottom",e=0,n=0,i=!1){const a=t.split("-"),[l,u]=Qe(r,t),[f,m]=i?["bottom","top"]:["top","bottom"],x=a.includes("top")?m:a.includes("bottom")?f:"middle",Z=a.includes("left")?"right":a.includes("right")?"left":"center";return{transform:[["translate",l+e,u+n]],textBaseline:x,textAlign:Z}}function Mi(r,t){return[[0,-r],[t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)],[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[0,t],[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[-t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[-t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)]]}function Oa(r,t){const e={};return e.top=[0,-r],e.left=[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],e["left-bottom"]=[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],e.bottom=[0,t],e["right-bottom"]=[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],e.right=e.default=[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],e}function Fi(r,t,e){const n=t/2,i=r/2,a={up:[[-i,n],[i,n],[0,-n]],left:[[-i,0],[i,n],[i,-n]],right:[[-i,n],[-i,-n],[i,0]],down:[[-i,-n],[i,-n],[0,n]]};return a[e]||a.up}function gs(r,t,e){const n=t/2,i=r/2,a={};return e==="down"?(a.bottom=a.default=[0,n],a.right=[i,-n],a.left=[-i,-n]):e==="left"?(a.top=[i,-n],a.bottom=[i,n],a.left=a.default=[-i,0]):e==="right"?(a.top=[-i,-n],a.bottom=[-i,n],a.right=a.default=[i,0]):(a.left=[-i,n],a.top=a.default=[0,-n],a.right=[i,n]),a}function Rs(r,t){return[[r/2,-t/2],[r/2,t/2],[-r/2,t/2],[-r/2,-t/2]]}function ca(r,t){return[[0,-t/2],[r/2,0],[0,t/2],[-r/2,0]]}function ma(r){return(0,da.Z)(r,["style","visibility"])!=="hidden"}function Ka(r,t){const{zIndex:e,transform:n,transformOrigin:i,visibility:a,cursor:l,clipPath:u,component:f}=t,m=ir(t,["zIndex","transform","transformOrigin","visibility","cursor","clipPath","component"]);Object.assign(r.attributes,m),n&&r.setAttribute("transform",n),(0,on.Z)(e)&&r.setAttribute("zIndex",e),i&&r.setAttribute("transformOrigin",i),a&&r.setAttribute("visibility",a),l&&r.setAttribute("cursor",l),u&&r.setAttribute("clipPath",u),f&&r.setAttribute("component",f)}function Qa(r,t){"update"in r?r.update(t):r.attr(t)}function na(r){return[[0,r],[r*Math.sqrt(3)/2,r/2],[r*Math.sqrt(3)/2,-r/2],[0,-r],[-r*Math.sqrt(3)/2,-r/2],[-r*Math.sqrt(3)/2,r/2]]}function Ba(r){(0,$s.Z)(r,"__to_be_destroyed__",!0)}function Ta(r){return(0,da.Z)(r,"__to_be_destroyed__",!1)}var cl=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class So extends b{constructor(t,e){super(t,Object.assign({},So.defaultOptions,e)),this.onCollapseExpand=n=>cl(this,void 0,void 0,function*(){if(!this.validate(n))return;const{target:i}=n;if(!li(i))return;const a=i.id,{model:l,graph:u}=this.context,f=l.getElementDataById(a);if(!f)return!1;const{onCollapse:m,onExpand:x,animation:Z,align:V}=this.options;ha(f)?(yield u.expandElement(a,{animation:Z,align:V}),x==null||x(a)):(yield u.collapseElement(a,{animation:Z,align:V}),m==null||m(a))}),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`node:${e}`,this.onCollapseExpand),t.on(`combo:${e}`,this.onCollapseExpand)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`node:${e}`,this.onCollapseExpand),t.off(`combo:${e}`,this.onCollapseExpand)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}So.defaultOptions={enable:!0,animation:!0,trigger:G.DBLCLICK,align:!0};var ul=y(63178),Ys=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};const Go="g6-create-edge-assist-edge-id",oo="g6-create-edge-assist-node-id";class Ao extends b{constructor(t,e){super(t,Object.assign({},Ao.defaultOptions,e)),this.drop=n=>Ys(this,void 0,void 0,function*(){const{targetType:i}=n;["combo","node"].includes(i)&&this.source?yield this.handleCreateEdge(n):yield this.cancelEdge()}),this.handleCreateEdge=n=>Ys(this,void 0,void 0,function*(){var i,a,l;if(!this.validate(n))return;const{graph:u,canvas:f,batch:m,element:x}=this.context,{style:Z}=this.options;if(this.source){this.createEdge(n),yield this.cancelEdge();return}m.startBatch(),f.setCursor("crosshair"),this.source=this.getSelectedNodeIDs([n.target.id])[0];const V=u.getElementData(this.source);u.addNodeData([{id:oo,style:{visibility:"hidden",ports:[{key:"port-1",placement:[.5,.5]}],x:(i=V.style)===null||i===void 0?void 0:i.x,y:(a=V.style)===null||a===void 0?void 0:a.y}}]),u.addEdgeData([{id:Go,source:this.source,target:oo,style:Object.assign({pointerEvents:"none"},Z)}]),yield(l=x.draw({animation:!1}))===null||l===void 0?void 0:l.finished}),this.updateAssistEdge=n=>Ys(this,void 0,void 0,function*(){var i;if(!this.source)return;const{model:a,element:l}=this.context;a.translateNodeTo(oo,[n.canvas.x,n.canvas.y]),yield(i=l.draw({animation:!1,silence:!0}))===null||i===void 0?void 0:i.finished}),this.createEdge=n=>{var i,a;const{graph:l}=this.context,{style:u,onFinish:f,onCreate:m}=this.options;if(((i=n.target)===null||i===void 0?void 0:i.id)===void 0||this.source===void 0)return;const Z=(a=this.getSelectedNodeIDs([n.target.id]))===null||a===void 0?void 0:a[0],V=`${this.source}-${Z}-${(0,ul.Z)()}`,et=m({id:V,source:this.source,target:Z,style:u});et&&(l.addEdgeData([et]),f(et))},this.cancelEdge=()=>Ys(this,void 0,void 0,function*(){var n;if(!this.source)return;const{graph:i,element:a,batch:l}=this.context;i.removeNodeData([oo]),this.source=void 0,yield(n=a.draw({animation:!1}))===null||n===void 0?void 0:n.finished,l.endBatch()}),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;this.unbindEvents(),e==="click"?(t.on(Ct.CLICK,this.handleCreateEdge),t.on(it.CLICK,this.handleCreateEdge),t.on(F.CLICK,this.cancelEdge),t.on(gt.CLICK,this.cancelEdge)):(t.on(Ct.DRAG_START,this.handleCreateEdge),t.on(it.DRAG_START,this.handleCreateEdge),t.on(G.POINTER_UP,this.drop)),t.on(G.POINTER_MOVE,this.updateAssistEdge)}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;t.off(Ct.CLICK,this.handleCreateEdge),t.off(it.CLICK,this.handleCreateEdge),t.off(F.CLICK,this.cancelEdge),t.off(gt.CLICK,this.cancelEdge),t.off(Ct.DRAG_START,this.handleCreateEdge),t.off(it.DRAG_START,this.handleCreateEdge),t.off(G.POINTER_UP,this.drop),t.off(G.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}Ao.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:r=>r,onFinish:()=>{}};var Oo=y(78431),hl=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Ls extends b{constructor(t,e){super(t,Object.assign({},Ls.defaultOptions,e)),this.isDragging=!1,this.onDragStart=n=>{this.validate(n)&&(this.isDragging=!0,this.context.canvas.setCursor("grabbing"))},this.onDrag=n=>{var i,a,l,u;if(!this.isDragging||pi.isPinching)return;const f=(a=(i=n.movement)===null||i===void 0?void 0:i.x)!==null&&a!==void 0?a:n.dx,m=(u=(l=n.movement)===null||l===void 0?void 0:l.y)!==null&&u!==void 0?u:n.dy;f|m&&this.translate([f,m],!1)},this.onDragEnd=()=>{var n,i;this.isDragging=!1,this.context.canvas.setCursor(this.defaultCursor),(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},this.invokeOnFinish=(0,Oo.Z)(()=>{var n,i;(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},300),this.shortcut=new us(t.graph),this.bindEvents(),this.defaultCursor=this.context.canvas.getConfig().cursor||"default"}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{trigger:t}=this.options;if((0,R.Z)(t)){const{up:e=[],down:n=[],left:i=[],right:a=[]}=t;this.shortcut.bind(e,l=>this.onTranslate([0,1],l)),this.shortcut.bind(n,l=>this.onTranslate([0,-1],l)),this.shortcut.bind(i,l=>this.onTranslate([1,0],l)),this.shortcut.bind(a,l=>this.onTranslate([-1,0],l))}else{const{graph:e}=this.context;e.on(G.DRAG_START,this.onDragStart),e.on(G.DRAG,this.onDrag),e.on(G.DRAG_END,this.onDragEnd)}}onTranslate(t,e){return hl(this,void 0,void 0,function*(){if(!this.validate(e))return;const{sensitivity:n}=this.options,i=n*-1;yield this.translate(J(t,i),this.options.animation),this.invokeOnFinish()})}translate(t,e){return hl(this,void 0,void 0,function*(){t=this.clampByDirection(t),t=this.clampByRange(t),t=this.clampByRotation(t),yield this.context.graph.translateBy(t,e)})}clampByRotation([t,e]){const n=this.context.graph.getRotation();return Gt([t,e],n)}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:i}=this.context,[a,l]=i.getSize(),[u,f,m,x]=Ne(this.options.range),Z=[l*u,a*f,l*m,a*x],V=Ut(Zt(n.getCanvasCenter()),Z),et=Y(n.getViewportCenter(),[t,e,0]);if(!te(et,V)){const{min:[dt,At],max:[Dt,Qt]}=V;(et[0]<dt&&t>0||et[0]>Dt&&t<0)&&(t=0),(et[1]<At&&e>0||et[1]>Qt&&e<0)&&(e=0)}return[t,e]}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return typeof e=="function"?e(t):!!e}unbindEvents(){this.shortcut.unbindAll();const{graph:t}=this.context;t.off(G.DRAG_START,this.onDragStart),t.off(G.DRAG,this.onDrag),t.off(G.DRAG_END,this.onDragEnd)}destroy(){this.shortcut.destroy(),this.unbindEvents(),this.context.canvas.setCursor(this.defaultCursor),super.destroy()}}Ls.defaultOptions={enable:r=>"targetType"in r?r.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var Ja=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class ps extends b{constructor(t,e){super(t,Object.assign({},ps.defaultOptions,e)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=n=>Ja(this,void 0,void 0,function*(){var i;if(this.options.dropEffect!=="link")return;const{model:a,element:l}=this.context,u=n.target.id;this.target.forEach(f=>{const m=a.getParentData(f,Ht);m&&ye(m)===u&&a.refreshComboData(u),a.setParent(f,u,Ht)}),yield(i=l==null?void 0:l.draw({animation:!0}))===null||i===void 0?void 0:i.finished}),this.setCursor=n=>{if(this.isDragging)return;const{type:i}=n,{canvas:a}=this.context,{cursor:l}=this.options;i===G.POINTER_ENTER?a.setCursor((l==null?void 0:l.grab)||"grab"):a.setCursor((l==null?void 0:l.default)||"default")},this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onDrop=this.onDrop.bind(this),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.addEventListener("blur",this.onDragEnd),n.addEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{t.on(`${i}:${G.DRAG_START}`,this.onDragStart),t.on(`${i}:${G.DRAG}`,this.onDrag),t.on(`${i}:${G.DRAG_END}`,this.onDragEnd),t.on(`${i}:${G.POINTER_ENTER}`,this.setCursor),t.on(`${i}:${G.POINTER_LEAVE}`,this.setCursor)}),["link"].includes(this.options.dropEffect)&&(t.on(it.DROP,this.onDrop),t.on(F.DROP,this.onDrop))}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}getDelta(t){const e=this.context.graph.getZoom();return ot([t.dx,t.dy],e)}onDragStart(t){var e;if(this.enable=this.validate(t),!this.enable)return;const{batch:n,canvas:i,graph:a}=this.context;i.setCursor(((e=this.options.cursor)===null||e===void 0?void 0:e.grabbing)||"grabbing"),this.isDragging=!0,n.startBatch();const l=t.target.id;a.getElementState(l).includes(this.options.state)?this.target=this.getSelectedNodeIDs([l]):this.target=[l],this.hideEdge(),this.context.graph.frontElement(this.target),this.options.shadow&&this.createShadow(this.target)}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.options.shadow?this.moveShadow(e):this.moveElement(this.target,e)}onDragEnd(){var t,e,n;if(!this.enable)return;if(this.enable=!1,this.options.shadow){if(!this.shadow)return;this.shadow.style.visibility="hidden";const{x:l=0,y:u=0}=this.shadow.attributes,[f,m]=Y([+l,+u],this.shadowOrigin);this.moveElement(this.target,[f,m])}this.showEdges(),(e=(t=this.options).onFinish)===null||e===void 0||e.call(t,this.target);const{batch:i,canvas:a}=this.context;i.endBatch(),a.setCursor(((n=this.options.cursor)===null||n===void 0?void 0:n.grab)||"grab"),this.isDragging=!1,this.target=[]}validate(t){if(this.destroyed||Ta(t.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}clampByRotation([t,e]){const n=this.context.graph.getRotation();return Gt([t,e],n)}moveElement(t,e){return Ja(this,void 0,void 0,function*(){const{graph:n,model:i}=this.context,{dropEffect:a}=this.options;a==="move"&&t.forEach(l=>i.refreshComboData(l)),n.translateElementBy(Object.fromEntries(t.map(l=>[l,this.clampByRotation(e)])),!1)})}moveShadow(t){if(!this.shadow)return;const{x:e=0,y:n=0}=this.shadow.attributes,[i,a]=t;this.shadow.attr({x:+e+i,y:+n+a})}createShadow(t){const e=wi(this.options,"shadow"),n=qt(t.map(m=>this.context.element.getElement(m).getBounds())),[i,a]=n.min;this.shadowOrigin=[i,a];const[l,u]=Xt(n),f={width:l,height:u,x:i,y:a};this.shadow?this.shadow.attr(Object.assign(Object.assign(Object.assign({},e),f),{visibility:"visible"})):(this.shadow=new _.UL({style:Object.assign(Object.assign(Object.assign({$layer:"transient"},e),f),{pointerEvents:"none"})}),this.context.canvas.appendChild(this.shadow))}showEdges(){this.options.shadow||this.hiddenEdges.length===0||(this.context.graph.showElement(this.hiddenEdges),this.hiddenEdges=[])}hideEdge(){const{hideEdge:t,shadow:e}=this.options;if(t==="none"||e)return;const{graph:n}=this.context;t==="all"?this.hiddenEdges=n.getEdgeData().map(ye):this.hiddenEdges=Array.from(new Set(this.target.map(i=>n.getRelatedEdgesData(i,t).map(ye)).flat())),n.hideElement(this.hiddenEdges)}unbindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.removeEventListener("blur",this.onDragEnd),n.removeEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{t.off(`${i}:${G.DRAG_START}`,this.onDragStart),t.off(`${i}:${G.DRAG}`,this.onDrag),t.off(`${i}:${G.DRAG_END}`,this.onDragEnd),t.off(`${i}:${G.POINTER_ENTER}`,this.setCursor),t.off(`${i}:${G.POINTER_LEAVE}`,this.setCursor)}),t.off(`combo:${G.DROP}`,this.onDrop),t.off(`canvas:${G.DROP}`,this.onDrop)}destroy(){var t;this.unbindEvents(),(t=this.shadow)===null||t===void 0||t.destroy(),super.destroy()}}ps.defaultOptions={animation:!0,enable:r=>["node","combo"].includes(r.targetType),dropEffect:"move",state:"selected",hideEdge:"none",shadow:!1,shadowZIndex:100,shadowFill:"#F3F9FF",shadowFillOpacity:.5,shadowStroke:"#1890FF",shadowStrokeOpacity:.9,shadowLineDash:[5,5],cursor:{default:"default",grab:"grab",grabbing:"grabbing"}};var $r=y(67469);class ra{constructor(t,e){this.context=t,this.options=e||{}}}var Ui=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},is=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function ms(r){const{type:t}=r;return!!(["comboCombined","comboForce"].includes(t)||t==="antv-dagre"&&r.sortByCombo)}function dl(r){const{type:t}=r;return["compact-box","mindmap","dendrogram","indented"].includes(t)}function Uo(r){return isNumber(r.x)&&isNumber(r.y)}function Vo(r){return!Array.isArray(r)&&(r==null?void 0:r.preLayout)}function lo(r){const{nodes:t,edges:e}=r,n={nodes:[],edges:[],combos:[]};return t.forEach(i=>{const a=i.data._isCombo?n.combos:n.nodes,{x:l,y:u,z:f=0}=i.data;a==null||a.push({id:i.id,style:{x:l,y:u,z:f}})}),e.forEach(i=>{const{id:a,source:l,target:u,data:{points:f=[],controlPoints:m=f.slice(1,f.length-1)}}=i;n.edges.push({id:a,source:l,target:u,style:Object.assign({},m!=null&&m.length?{controlPoints:m.map(Rn)}:{})})}),n}function Yo(r,t){class e extends ra{constructor(i,a){if(super(i,a),this.instance=new r({}),this.id=this.instance.id,"stop"in this.instance&&"tick"in this.instance){const l=this.instance;this.stop=l.stop.bind(l),this.tick=u=>{const f=l.tick(u);return lo(f)}}}execute(i,a){return Ui(this,void 0,void 0,function*(){return lo(yield this.instance.execute(this.graphData2LayoutModel(i),this.transformOptions((0,h.Z)({},this.options,a))))})}transformOptions(i){if(!("onTick"in i))return i;const a=i.onTick;return i.onTick=l=>a(lo(l)),i}graphData2LayoutModel(i){const{nodes:a=[],edges:l=[],combos:u=[]}=i,f=a.map(et=>{const dt=ye(et),{data:At,style:Dt,combo:Qt}=et,oe=is(et,["data","style","combo"]),pe={id:dt,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},At),{data:At}),Qt?{parentId:Qt}:{}),{style:Dt}),oe)};return Dt!=null&&Dt.x&&Object.assign(pe.data,{x:Dt.x}),Dt!=null&&Dt.y&&Object.assign(pe.data,{y:Dt.y}),Dt!=null&&Dt.z&&Object.assign(pe.data,{z:Dt.z}),pe}),m=new Map(f.map(et=>[et.id,et])),x=l.filter(et=>{const{source:dt,target:At}=et;return m.has(dt)&&m.has(At)}).map(et=>{const{source:dt,target:At,data:Dt,style:Qt}=et;return{id:ye(et),source:dt,target:At,data:Object.assign({},Dt),style:Object.assign({},Qt)}}),Z=u.map(et=>({id:ye(et),data:Object.assign({_isCombo:!0},et.data),style:Object.assign({},et.style)})),V=new $r.k({nodes:[...f,...Z],edges:x});return t.model.model.hasTreeStructure(Ht)&&(V.attachTreeStructure(Ht),f.forEach(et=>{const dt=t.model.model.getParent(et.id,Ht);dt&&V.hasNode(dt.id)&&V.setParent(et.id,dt.id,Ht)})),V}}return e}function co(r,t,...e){if(t in r)return r[t](...e);if("instance"in r){const n=r.instance;if(t in n)return n[t](...e)}return null}function _l(r,t){if(t in r)return r[t];if("instance"in r){const e=r.instance;if(t in e)return e[t]}return null}var _u=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class fc extends ps{get forceLayoutInstance(){return this.context.layout.getLayoutInstance().find(t=>["d3-force","d3-force-3d"].includes(t==null?void 0:t.id))}validate(t){return this.context.layout?this.forceLayoutInstance?super.validate(t):(Xe.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(t,e){return _u(this,void 0,void 0,function*(){const n=this.forceLayoutInstance;this.context.graph.getNodeData(t).forEach((i,a)=>{const{x:l=0,y:u=0}=i.style||{};n&&co(n,"setFixedPosition",t[a],[...M([+l,+u],this.clampByRotation(e))])})})}onDragStart(t){if(this.enable=this.validate(t),!this.enable)return;this.target=this.getSelectedNodeIDs([t.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target);const e=this.forceLayoutInstance;e&&_l(e,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(n=>{const{x:i=0,y:a=0}=n.style||{};e&&co(e,"setFixedPosition",ye(n),[+i,+a])})}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.moveElement(this.target,e)}onDragEnd(){const t=this.forceLayoutInstance;t&&_l(t,"simulation").alphaTarget(0),!this.options.fixed&&this.context.graph.getNodeData(this.target).forEach(e=>{t&&co(t,"setFixedPosition",ye(e),[null,null,null])})}}var vc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class fl extends b{constructor(t,e){super(t,Object.assign({},fl.defaultOptions,e)),this.isZoomEvent=n=>!!(n.data&&"scale"in n.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=n=>vc(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context,{state:a,nodeFilter:l,edgeFilter:u,comboFilter:f}=this.options,m=(a?i.getElementDataByState("node",a):i.getNodeData()).filter(l),x=(a?i.getElementDataByState("edge",a):i.getEdgeData()).filter(u),Z=(a?i.getElementDataByState("combo",a):i.getComboData()).filter(f),V=this.isZoomEvent(n)?this.zoom=Math.max(.01,Math.min(n.data.scale,10)):this.zoom,et=[...m,...Z];et.length>0&&et.forEach(dt=>this.fixNodeLike(dt,V)),this.updateRelatedEdges(),x.length>0&&x.forEach(dt=>this.fixEdge(dt,V))}),this.cachedStyles=new Map,this.getOriginalFieldValue=(n,i,a)=>{var l;const u=this.cachedStyles.get(n)||[],f=((l=u.find(m=>m.shape===i))===null||l===void 0?void 0:l.style)||{};return a in f||(f[a]=i.attributes[a],this.cachedStyles.set(n,[...u.filter(m=>m.shape!==i),{shape:i,style:f}])),f[a]},this.scaleEntireElement=(n,i,a)=>{i.setLocalScale(1/a);const l=this.cachedStyles.get(n)||[];l.push({shape:i}),this.cachedStyles.set(n,l)},this.scaleSpecificShapes=(n,i,a)=>{const l=Fo(n);(Array.isArray(a)?a:[a]).forEach(f=>{const{shape:m,fields:x}=f,Z=typeof m=="function"?m(l):n.getShape(m);if(Z){if(!x){this.scaleEntireElement(n.id,Z,i);return}x.forEach(V=>{const et=this.getOriginalFieldValue(n.id,Z,V);(0,on.Z)(et)&&(Z.style[V]=et/i)})}})},this.skipIfExceedViewport=n=>{const{viewport:i}=this.context;return!(i!=null&&i.isInViewport(n.getRenderBounds(),!1,30))},this.fixNodeLike=(n,i)=>{const a=ye(n),{element:l,model:u}=this.context,f=l.getElement(a);if(!f||this.skipIfExceedViewport(f))return;u.getRelatedEdgesData(a).forEach(Z=>this.relatedEdgeToUpdate.add(ye(Z)));const x=this.options[f.type];if(!x){this.scaleEntireElement(a,f,i);return}this.scaleSpecificShapes(f,i,x)},this.fixEdge=(n,i)=>{const a=ye(n),l=this.context.element.getElement(a);if(!l||this.skipIfExceedViewport(l))return;const u=this.options.edge;if(!u){l.style.transformOrigin="center",this.scaleEntireElement(a,l,i);return}this.scaleSpecificShapes(l,i,u)},this.updateRelatedEdges=()=>{const{element:n}=this.context;this.relatedEdgeToUpdate.size>0&&this.relatedEdgeToUpdate.forEach(i=>{const a=n.getElement(i);a==null||a.update({})}),this.relatedEdgeToUpdate.clear()},this.resetTransform=n=>vc(this,void 0,void 0,function*(){var i;!((i=n.data)===null||i===void 0)&&i.firstRender||(this.options.reset?this.restoreCachedStyles():this.fixElementSize({data:{scale:this.zoom}}))}),this.bindEvents()}restoreCachedStyles(){if(this.cachedStyles.size>0){this.cachedStyles.forEach(i=>{i.forEach(({shape:a,style:l})=>{if((0,Ii.Z)(l))a.setLocalScale(1);else{if(this.options.state)return;Object.entries(l).forEach(([u,f])=>a.style[u]=f)}})});const{graph:t,element:e}=this.context,n=Object.keys(Object.fromEntries(this.cachedStyles)).filter(i=>i&&t.getElementType(i)==="node");if(n.length>0){const i=new Set;n.forEach(a=>{t.getRelatedEdgesData(a).forEach(l=>i.add(ye(l)))}),i.forEach(a=>{const l=e==null?void 0:e.getElement(a);l==null||l.update({})})}}}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_DRAW,this.resetTransform),t.on(Q.AFTER_TRANSFORM,this.fixElementSize)}unbindEvents(){const{graph:t}=this.context;t.off(Q.AFTER_DRAW,this.resetTransform),t.off(Q.AFTER_TRANSFORM,this.fixElementSize)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}fl.defaultOptions={enable:r=>r.data.scale<1,nodeFilter:()=>!0,edgeFilter:()=>!0,comboFilter:()=>!0,edge:[{shape:"key",fields:["lineWidth"]},{shape:"halo",fields:["lineWidth"]},{shape:"label"}],reset:!1};var Zu=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class vl extends b{constructor(t,e){super(t,Object.assign({},vl.defaultOptions,e)),this.focus=n=>Zu(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context;yield i.focusElement(n.target.id,this.options.animation)}),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Za.forEach(e=>{t.on(`${e}:${G.CLICK}`,this.focus)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Za.forEach(e=>{t.off(`${e}:${G.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),super.destroy()}}vl.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0};class To extends b{constructor(t,e){super(t,Object.assign({},To.defaultOptions,e)),this.isFrozen=!1,this.toggleFrozen=n=>{this.isFrozen=n.type==="dragstart"},this.hoverElement=n=>{if(!this.validate(n))return;const i=n.type===G.POINTER_ENTER;this.updateElementsState(n,i);const{onHover:a,onHoverEnd:l}=this.options;i?a==null||a(n):l==null||l(n)},this.updateElementsState=(n,i)=>{if(!this.options.state&&!this.options.inactiveState)return;const{graph:a}=this.context,{state:l,animation:u,inactiveState:f}=this.options,m=this.getActiveIds(n),x={};if(l&&Object.assign(x,this.getElementsState(m,l,i)),f){const Z=Hn(a.getData(),!0).filter(V=>!m.includes(V));Object.assign(x,this.getElementsState(Z,f,i))}a.setElementState(x,u)},this.getElementsState=(n,i,a)=>{const{graph:l}=this.context,u={};return n.forEach(f=>{const m=l.getElementState(f);a?u[f]=m.includes(i)?m:[...m,i]:u[f]=m.filter(x=>x!==i)}),u},this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),Za.forEach(n=>{t.on(`${n}:${G.POINTER_ENTER}`,this.hoverElement),t.on(`${n}:${G.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.addEventListener(`${G.DRAG_START}`,this.toggleFrozen),e.addEventListener(`${G.DRAG_END}`,this.toggleFrozen)}getActiveIds(t){const{graph:e}=this.context,{degree:n,direction:i}=this.options,a=t.target.id;return n?xs(e,t.targetType,a,typeof n=="function"?n(t):n,i):[a]}validate(t){if(this.destroyed||this.isFrozen||Ta(t.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;Za.forEach(n=>{t.off(`${n}:${G.POINTER_ENTER}`,this.hoverElement),t.off(`${n}:${G.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.removeEventListener(`${G.DRAG_START}`,this.toggleFrozen),e.removeEventListener(`${G.DRAG_END}`,this.toggleFrozen)}destroy(){this.unbindEvents(),super.destroy()}}To.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class gl extends Bs{onPointerDown(t){if(!super.validate(t)||!super.isKeydown()||this.points)return;const{canvas:e,graph:n}=this.context;this.pathShape=new _.y$({id:"g6-lasso-select",style:this.options.style}),e.appendChild(this.pathShape),this.points=[Fs(t,n)]}onPointerMove(t){var e;if(!this.points)return;const{immediately:n,mode:i}=this.options;this.points.push(Fs(t,this.context.graph)),(e=this.pathShape)===null||e===void 0||e.setAttribute("d",eo(this.points)),n&&i==="default"&&this.points.length>2&&super.updateElementsStates(this.points)}onPointerUp(){if(this.points){if(this.points.length<2){this.clearLasso();return}super.updateElementsStates(this.points),this.clearLasso()}}clearLasso(){var t;(t=this.pathShape)===null||t===void 0||t.remove(),this.pathShape=void 0,this.points=void 0}}class pl extends b{constructor(t,e){super(t,Object.assign({},pl.defaultOptions,e)),this.hiddenShapes=[],this.isVisible=!0,this.setElementsVisibility=(n,i,a)=>{n.filter(Boolean).forEach(l=>{i==="hidden"&&!l.isVisible()?this.hiddenShapes.push(l):i==="visible"&&this.hiddenShapes.includes(l)?this.hiddenShapes.splice(this.hiddenShapes.indexOf(l),1):ti(l,i,a)})},this.filterShapes=(n,i)=>{if((0,xe.Z)(i))return l=>!i(n,l);const a=i==null?void 0:i[n];return l=>l.className?!(a!=null&&a.includes(l.className)):!0},this.hideShapes=n=>{if(!this.validate(n)||!this.isVisible)return;const{element:i}=this.context,{shapes:a={}}=this.options;this.setElementsVisibility(i.getNodes(),"hidden",this.filterShapes("node",a)),this.setElementsVisibility(i.getEdges(),"hidden",this.filterShapes("edge",a)),this.setElementsVisibility(i.getCombos(),"hidden",this.filterShapes("combo",a)),this.isVisible=!1},this.showShapes=(0,Oo.Z)(n=>{if(!this.validate(n)||this.isVisible)return;const{element:i}=this.context;this.setElementsVisibility(i.getNodes(),"visible"),this.setElementsVisibility(i.getEdges(),"visible"),this.setElementsVisibility(i.getCombos(),"visible"),this.isVisible=!0},this.options.debounce),this.bindEvents()}bindEvents(){const{graph:t}=this.context;t.on(Q.BEFORE_TRANSFORM,this.hideShapes),t.on(Q.AFTER_TRANSFORM,this.showShapes)}unbindEvents(){const{graph:t}=this.context;t.off(Q.BEFORE_TRANSFORM,this.hideShapes),t.off(Q.AFTER_TRANSFORM,this.showShapes)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}pl.defaultOptions={enable:!0,debounce:200,shapes:r=>r==="node"};var gc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class ml extends b{constructor(t,e){super(t,Object.assign({},ml.defaultOptions,e)),this.onWheel=n=>gc(this,void 0,void 0,function*(){this.options.preventDefault&&n.preventDefault();const i=n.deltaX,a=n.deltaY;yield this.scroll([-i,-a],n)}),this.shortcut=new us(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){var t,e;const{trigger:n}=this.options;if(this.shortcut.unbindAll(),(0,R.Z)(n)){(t=this.graphDom)===null||t===void 0||t.removeEventListener(G.WHEEL,this.onWheel);const{up:i=[],down:a=[],left:l=[],right:u=[]}=n;this.shortcut.bind(i,f=>this.scroll([0,-10],f)),this.shortcut.bind(a,f=>this.scroll([0,10],f)),this.shortcut.bind(l,f=>this.scroll([-10,0],f)),this.shortcut.bind(u,f=>this.scroll([10,0],f))}else(e=this.graphDom)===null||e===void 0||e.addEventListener(G.WHEEL,this.onWheel,{passive:!1})}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}formatDisplacement(t){const{sensitivity:e}=this.options;return t=J(t,e),t=this.clampByDirection(t),t=this.clampByRange(t),t}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:i}=this.context,[a,l]=i.getSize(),[u,f,m,x]=Ne(this.options.range),Z=[l*u,a*f,l*m,a*x],V=Ut(Zt(n.getCanvasCenter()),Z),et=Y(n.getViewportCenter(),[t,e,0]);if(!te(et,V)){const{min:[dt,At],max:[Dt,Qt]}=V;(et[0]<dt&&t>0||et[0]>Dt&&t<0)&&(t=0),(et[1]<At&&e>0||et[1]>Qt&&e<0)&&(e=0)}return[t,e]}scroll(t,e){return gc(this,void 0,void 0,function*(){if(!this.validate(e))return;const{onFinish:n}=this.options,i=this.context.graph,a=this.formatDisplacement(t);yield i.translateBy(a,!1),n==null||n()})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.graphDom)===null||t===void 0||t.removeEventListener(G.WHEEL,this.onWheel),super.destroy()}}ml.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var as=y(70208),pc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class yl extends b{constructor(t,e){super(t,Object.assign({},yl.defaultOptions,e)),this.zoom=(n,i,a)=>pc(this,void 0,void 0,function*(){if(!this.validate(i))return;const{graph:l}=this.context;let u=this.options.origin;!u&&"viewport"in i&&(u=Rn(i.viewport));const{sensitivity:f,onFinish:m}=this.options,x=1+(0,as.Z)(n,-50,50)*f/100,Z=l.getZoom();yield l.zoomTo(Z*x,a,u),m==null||m()}),this.onReset=()=>pc(this,void 0,void 0,function*(){yield this.context.graph.zoomTo(1,this.options.animation)}),this.preventDefault=n=>{this.options.preventDefault&&n.preventDefault()},this.shortcut=new us(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){const{trigger:t}=this.options;if(this.shortcut.unbindAll(),Array.isArray(t))if(t.includes(G.PINCH))this.shortcut.bind([G.PINCH],e=>{this.zoom(e.scale,e,!1)});else{const e=this.context.canvas.getContainer();e==null||e.addEventListener(G.WHEEL,this.preventDefault),this.shortcut.bind([...t,G.WHEEL],n=>{const{deltaX:i,deltaY:a}=n;this.zoom(-(a!=null?a:i),n,!1)})}if(typeof t=="object"){const{zoomIn:e=[],zoomOut:n=[],reset:i=[]}=t;this.shortcut.bind(e,a=>this.zoom(10,a,this.options.animation)),this.shortcut.bind(n,a=>this.zoom(-10,a,this.options.animation)),this.shortcut.bind(i,this.onReset)}}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.context.canvas.getContainer())===null||t===void 0||t.removeEventListener(G.WHEEL,this.preventDefault),super.destroy()}}yl.defaultOptions={animation:{duration:200},enable:!0,sensitivity:1,trigger:[],preventDefault:!0};var Hs=y(13722),ei=y(80813);const zu=(r,t)=>{if(r!=="next"&&r!=="prev")return t},mc=r=>{r.prev.next=r.next,r.next.prev=r.prev,delete r.next,delete r.prev};class ju{constructor(){const t={};t.prev=t,t.next=t.prev,this.shortcut=t}dequeue(){const t=this.shortcut,e=t.prev;if(e&&e!==t)return mc(e),e}enqueue(t){const e=this.shortcut;t.prev&&t.next&&mc(t),t.next=e.next,e.next.prev=t,e.next=t,t.prev=e}toString(){const t=[],e=this.shortcut;let n=e.prev;for(;n!==e;)t.push(JSON.stringify(n,zu)),n=n==null?void 0:n.prev;return`[${t.join(", ")}]`}}class yc extends ju{}const Wu=()=>1,Gu=(r,t)=>{var e;if(r.getAllNodes().length<=1)return[];const n=Ec(r,t||Wu);return(e=bc(n.graph,n.buckets,n.zeroIdx).map(a=>r.getRelatedEdges(a.v,"out").filter(({target:l})=>l===a.w)))===null||e===void 0?void 0:e.flat()},bc=(r,t,e)=>{let n=[];const i=t[t.length-1],a=t[0];let l;for(;r.getAllNodes().length;){for(;l=a.dequeue();)Ho(r,t,e,l);for(;l=i.dequeue();)Ho(r,t,e,l);if(r.getAllNodes().length){for(let u=t.length-2;u>0;--u)if(l=t[u].dequeue(),l){n=n.concat(Ho(r,t,e,l,!0));break}}}return n},Ho=(r,t,e,n,i)=>{var a,l;const u=[];return r.hasNode(n.v)&&((a=r.getRelatedEdges(n.v,"in"))===null||a===void 0||a.forEach(f=>{const m=f.data.weight,x=r.getNode(f.source);i&&u.push({v:f.source,w:f.target,in:0,out:0}),x.data.out===void 0&&(x.data.out=0),x.data.out-=m,Zl(t,e,Object.assign({v:x.id},x.data))}),(l=r.getRelatedEdges(n.v,"out"))===null||l===void 0||l.forEach(f=>{const m=f.data.weight,x=f.target,Z=r.getNode(x);Z.data.in===void 0&&(Z.data.in=0),Z.data.in-=m,Zl(t,e,Object.assign({v:Z.id},Z.data))}),r.removeNode(n.v)),i?u:void 0},Ec=(r,t)=>{const e=new $r.k;let n=0,i=0;r.getAllNodes().forEach(f=>{e.addNode({id:f.id,data:{v:f.id,in:0,out:0}})}),r.getAllEdges().forEach(f=>{const m=e.getRelatedEdges(f.source,"out").find(Z=>Z.target===f.target),x=(t==null?void 0:t(f))||1;m?e.updateEdgeData(m==null?void 0:m.id,Object.assign(Object.assign({},m.data),{weight:m.data.weight+x})):e.addEdge({id:f.id,source:f.source,target:f.target,data:{weight:x}}),i=Math.max(i,e.getNode(f.source).data.out+=x),n=Math.max(n,e.getNode(f.target).data.in+=x)});const a=[],l=i+n+3;for(let f=0;f<l;f++)a.push(new yc);const u=n+1;return e.getAllNodes().forEach(f=>{Zl(a,u,Object.assign({v:f.id},e.getNode(f.id).data))}),{buckets:a,zeroIdx:u,graph:e}},Zl=(r,t,e)=>{e.out?e.in?r[e.out-e.in+t].enqueue(e):r[r.length-1].enqueue(e):r[0].enqueue(e)},Uu=(r,t)=>{const n=t==="greedy"?Gu(r,(i=>a=>a.data.weight||1)(r)):Ca(r);n==null||n.forEach(i=>{const a=i.data;r.removeEdge(i.id),a.forwardName=i.data.name,a.reversed=!0,r.addEdge({id:i.id,source:i.target,target:i.source,data:Object.assign({},a)})})},Ca=r=>{const t=[],e={},n={},i=a=>{n[a]||(n[a]=!0,e[a]=!0,r.getRelatedEdges(a,"out").forEach(l=>{e[l.target]?t.push(l):i(l.target)}),delete e[a])};return r.getAllNodes().forEach(a=>i(a.id)),t},zl=r=>{r.getAllEdges().forEach(t=>{const e=t.data;if(e.reversed){r.removeEdge(t.id);const n=e.forwardName;delete e.reversed,delete e.forwardName,r.addEdge({id:t.id,source:t.target,target:t.source,data:Object.assign(Object.assign({},e),{forwardName:n})})}})},Vu=(r,t)=>Number(r)-Number(t),Co=(r,t,e,n)=>{let i;do i=`${n}${Math.random()}`;while(r.hasNode(i));return e.dummy=t,r.addNode({id:i,data:e}),i},xc=r=>{const t=new $r.k;return r.getAllNodes().forEach(e=>{t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{const n=t.getRelatedEdges(e.source,"out").find(i=>i.target===e.target);n?t.updateEdgeData(n==null?void 0:n.id,Object.assign(Object.assign({},n.data),{weight:n.data.weight+e.data.weight||0,minlen:Math.max(n.data.minlen,e.data.minlen||1)})):t.addEdge({id:e.id,source:e.source,target:e.target,data:{weight:e.data.weight||0,minlen:e.data.minlen||1}})}),t},jl=r=>{const t=new $r.k;return r.getAllNodes().forEach(e=>{r.getChildren(e.id).length||t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{t.addEdge(e)}),t},wc=(r,t)=>r==null?void 0:r.reduce((e,n,i)=>(e[n]=t[i],e),{}),bl=r=>{const t={};return r.getAllNodes().forEach(e=>{const n={};r.getRelatedEdges(e.id,"out").forEach(i=>{n[i.target]=(n[i.target]||0)+(i.data.weight||0)}),t[e.id]=n}),t},Mc=r=>{const t=r.getAllNodes(),e=t.map(n=>{const i={};return r.getRelatedEdges(n.id,"in").forEach(a=>{i[a.source]=(i[a.source]||0)+a.data.weight}),i});return wc(t.map(n=>n.id),e)},Zi=(r,t)=>{const e=Number(r.x),n=Number(r.y),i=Number(t.x)-e,a=Number(t.y)-n;let l=Number(r.width)/2,u=Number(r.height)/2;if(!i&&!a)return{x:0,y:0};let f,m;return Math.abs(a)*l>Math.abs(i)*u?(a<0&&(u=-u),f=u*i/a,m=u):(i<0&&(l=-l),f=l,m=l*a/i),{x:e+f,y:n+m}},Xo=r=>{const t=[],e=Wl(r)+1;for(let n=0;n<e;n++)t.push([]);r.getAllNodes().forEach(n=>{const i=n.data.rank;i!==void 0&&t[i]&&t[i].push(n.id)});for(let n=0;n<e;n++)t[n]=t[n].sort((i,a)=>Vu(r.getNode(i).data.order,r.getNode(a).data.order));return t},Yu=r=>{const t=r.getAllNodes().filter(n=>n.data.rank!==void 0).map(n=>n.data.rank),e=Math.min(...t);r.getAllNodes().forEach(n=>{n.data.hasOwnProperty("rank")&&e!==1/0&&(n.data.rank-=e)})},Hu=(r,t=0)=>{const e=r.getAllNodes(),n=e.filter(u=>u.data.rank!==void 0).map(u=>u.data.rank),i=Math.min(...n),a=[];e.forEach(u=>{const f=(u.data.rank||0)-i;a[f]||(a[f]=[]),a[f].push(u.id)});let l=0;for(let u=0;u<a.length;u++){const f=a[u];f===void 0?u%t!==0&&(l-=1):l&&(f==null||f.forEach(m=>{const x=r.getNode(m);x&&(x.data.rank=x.data.rank||0,x.data.rank+=l)}))}},Sc=(r,t,e,n)=>{const i={width:0,height:0};return(0,on.Z)(e)&&(0,on.Z)(n)&&(i.rank=e,i.order=n),Co(r,"border",i,t)},Wl=r=>{let t;return r.getAllNodes().forEach(e=>{const n=e.data.rank;n!==void 0&&(t===void 0||n>t)&&(t=n)}),t||(t=0),t},Ac=(r,t)=>{const e={lhs:[],rhs:[]};return r==null||r.forEach(n=>{t(n)?e.lhs.push(n):e.rhs.push(n)}),e},Gl=(r,t)=>r.reduce((e,n)=>{const i=t(e),a=t(n);return i>a?n:e}),Oc=(r,t,e,n,i,a)=>{n.includes(t.id)||(n.push(t.id),e||a.push(t.id),i(t.id).forEach(l=>Oc(r,l,e,n,i,a)),e&&a.push(t.id))},Tc=(r,t,e,n)=>{const i=Array.isArray(t)?t:[t],a=f=>n?r.getSuccessors(f):r.getNeighbors(f),l=[],u=[];return i.forEach(f=>{if(r.hasNode(f.id))Oc(r,f,e==="post",u,a,l);else throw new Error(`Graph does not have node: ${f}`)}),l},Xu=r=>{const t=e=>{const n=r.getChildren(e),i=r.getNode(e);if(n!=null&&n.length&&n.forEach(a=>t(a.id)),i.data.hasOwnProperty("minRank")){i.data.borderLeft=[],i.data.borderRight=[];for(let a=i.data.minRank,l=i.data.maxRank+1;a<l;a+=1)Cc(r,"borderLeft","_bl",e,i,a),Cc(r,"borderRight","_br",e,i,a)}};r.getRoots().forEach(e=>t(e.id))},Cc=(r,t,e,n,i,a)=>{const l={rank:a,borderType:t,width:0,height:0},u=i.data[t][a-1],f=Co(r,"border",l,e);i.data[t][a]=f,r.setParent(f,n),u&&r.addEdge({id:`e${Math.random()}`,source:u,target:f,data:{weight:1}})},Ku=(r,t)=>{const e=t.toLowerCase();(e==="lr"||e==="rl")&&Nc(r)},Qu=(r,t)=>{const e=t.toLowerCase();(e==="bt"||e==="rl")&&Ju(r),(e==="lr"||e==="rl")&&($u(r),Nc(r))},Nc=r=>{r.getAllNodes().forEach(t=>{Pc(t)}),r.getAllEdges().forEach(t=>{Pc(t)})},Pc=r=>{const t=r.data.width;r.data.width=r.data.height,r.data.height=t},Ju=r=>{r.getAllNodes().forEach(t=>{Ul(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>Ul(n)),t.data.hasOwnProperty("y")&&Ul(t.data)})},Ul=r=>{r!=null&&r.y&&(r.y=-r.y)},$u=r=>{r.getAllNodes().forEach(t=>{kc(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>kc(n)),t.data.hasOwnProperty("x")&&kc(t.data)})},kc=r=>{const t=r.x;r.x=r.y,r.y=t},El=r=>{const t=Co(r,"root",{},"_root"),e=xl(r);let n=Math.max(...Object.values(e));Math.abs(n)===1/0&&(n=1);const i=n-1,a=2*i+1;r.getAllEdges().forEach(u=>{u.data.minlen*=a});const l=Yl(r)+1;return r.getRoots().forEach(u=>{Vl(r,t,a,l,i,e,u.id)}),{nestingRoot:t,nodeRankFactor:a}},Vl=(r,t,e,n,i,a,l)=>{const u=r.getChildren(l);if(!(u!=null&&u.length)){l!==t&&r.addEdge({id:`e${Math.random()}`,source:t,target:l,data:{weight:0,minlen:e}});return}const f=Sc(r,"_bt"),m=Sc(r,"_bb"),x=r.getNode(l);r.setParent(f,l),x.data.borderTop=f,r.setParent(m,l),x.data.borderBottom=m,u==null||u.forEach(Z=>{Vl(r,t,e,n,i,a,Z.id);const V=Z.data.borderTop?Z.data.borderTop:Z.id,et=Z.data.borderBottom?Z.data.borderBottom:Z.id,dt=Z.data.borderTop?n:2*n,At=V!==et?1:i-a[l]+1;r.addEdge({id:`e${Math.random()}`,source:f,target:V,data:{minlen:At,weight:dt,nestingEdge:!0}}),r.addEdge({id:`e${Math.random()}`,source:et,target:m,data:{minlen:At,weight:dt,nestingEdge:!0}})}),r.getParent(l)||r.addEdge({id:`e${Math.random()}`,source:t,target:f,data:{weight:0,minlen:i+a[l]}})},xl=r=>{const t={},e=(n,i)=>{const a=r.getChildren(n);a==null||a.forEach(l=>e(l.id,i+1)),t[n]=i};return r.getRoots().forEach(n=>e(n.id,1)),t},Yl=r=>{let t=0;return r.getAllEdges().forEach(e=>{t+=e.data.weight}),t},ya=(r,t)=>{t&&r.removeNode(t),r.getAllEdges().forEach(e=>{e.data.nestingEdge&&r.removeEdge(e.id)})},Rc="edge",ki="edge-label",qu=(r,t)=>{r.getAllEdges().forEach(e=>th(r,e,t))},th=(r,t,e)=>{let n=t.source,i=r.getNode(n).data.rank;const a=t.target,l=r.getNode(a).data.rank,u=t.data.labelRank;if(l===i+1)return;r.removeEdge(t.id);let f,m,x;for(x=0,++i;i<l;++x,++i)t.data.points=[],m={originalEdge:t,width:0,height:0,rank:i},f=Co(r,Rc,m,"_d"),i===u&&(m.width=t.data.width,m.height=t.data.height,m.dummy=ki,m.labelpos=t.data.labelpos),r.addEdge({id:`e${Math.random()}`,source:n,target:f,data:{weight:t.data.weight}}),x===0&&e.push(f),n=f;r.addEdge({id:`e${Math.random()}`,source:n,target:a,data:{weight:t.data.weight}})},Lc=(r,t)=>{t.forEach(e=>{let n=r.getNode(e);const{data:i}=n,a=i.originalEdge;let l;a&&r.addEdge(a);let u=e;for(;n.data.dummy;)l=r.getSuccessors(u)[0],r.removeNode(u),a.data.points.push({x:n.data.x,y:n.data.y}),n.data.dummy===ki&&(a.data.x=n.data.x,a.data.y=n.data.y,a.data.width=n.data.width,a.data.height=n.data.height),u=l.id,n=r.getNode(u)})},Ko=(r,t,e)=>{const n={};let i;e==null||e.forEach(a=>{let l=r.getParent(a),u,f;for(;l;){if(u=r.getParent(l.id),u?(f=n[u.id],n[u.id]=l.id):(f=i,i=l.id),f&&f!==l.id){t.hasNode(f)||t.addNode({id:f,data:{}}),t.hasNode(l.id)||t.addNode({id:l.id,data:{}}),t.hasEdge(`e${f}-${l.id}`)||t.addEdge({id:`e${f}-${l.id}`,source:f,target:l.id,data:{}});return}l=u}})},eh=(r,t,e)=>{const n=nh(r),i=new $r.k({tree:[{id:n,children:[],data:{}}]});return r.getAllNodes().forEach(a=>{const l=r.getParent(a.id);(a.data.rank===t||a.data.minRank<=t&&t<=a.data.maxRank)&&(i.hasNode(a.id)||i.addNode(Object.assign({},a)),l!=null&&l.id&&!i.hasNode(l==null?void 0:l.id)&&i.addNode(Object.assign({},l)),i.setParent(a.id,(l==null?void 0:l.id)||n),r.getRelatedEdges(a.id,e).forEach(u=>{const f=u.source===a.id?u.target:u.source;i.hasNode(f)||i.addNode(Object.assign({},r.getNode(f)));const m=i.getRelatedEdges(f,"out").find(({target:Z})=>Z===a.id),x=m!==void 0?m.data.weight:0;m?i.updateEdgeData(m.id,Object.assign(Object.assign({},m.data),{weight:u.data.weight+x})):i.addEdge({id:u.id,source:f,target:a.id,data:{weight:u.data.weight+x}})}),a.data.hasOwnProperty("minRank")&&i.updateNodeData(a.id,Object.assign(Object.assign({},a.data),{borderLeft:a.data.borderLeft[t],borderRight:a.data.borderRight[t]})))}),i},nh=r=>{let t;for(;r.hasNode(t=`_root${Math.random()}`););return t},rh=(r,t,e)=>{const n=wc(e,e.map((x,Z)=>Z)),a=t.map(x=>{const Z=r.getRelatedEdges(x,"out").map(V=>({pos:n[V.target]||0,weight:V.data.weight}));return Z==null?void 0:Z.sort((V,et)=>V.pos-et.pos)}).flat().filter(x=>x!==void 0);let l=1;for(;l<e.length;)l<<=1;const u=2*l-1;l-=1;const f=Array(u).fill(0,0,u);let m=0;return a==null||a.forEach(x=>{if(x){let Z=x.pos+l;f[Z]+=x.weight;let V=0;for(;Z>0;)Z%2&&(V+=f[Z+1]),Z=Z-1>>1,f[Z]+=x.weight;m+=x.weight*V}}),m},Ki=(r,t)=>{let e=0;for(let n=1;n<(t==null?void 0:t.length);n+=1)e+=rh(r,t[n-1],t[n]);return e},ss=r=>{const t={},e=r.getAllNodes(),n=e.map(m=>{var x;return(x=m.data.rank)!==null&&x!==void 0?x:-1/0}),i=Math.max(...n),a=[];for(let m=0;m<i+1;m++)a.push([]);const l=e.sort((m,x)=>r.getNode(m.id).data.rank-r.getNode(x.id).data.rank),f=l.filter(m=>r.getNode(m.id).data.fixorder!==void 0).sort((m,x)=>r.getNode(m.id).data.fixorder-r.getNode(x.id).data.fixorder);return f==null||f.forEach(m=>{isNaN(r.getNode(m.id).data.rank)||a[r.getNode(m.id).data.rank].push(m.id),t[m.id]=!0}),l==null||l.forEach(m=>r.dfsTree(m.id,x=>{if(t.hasOwnProperty(x.id))return!0;t[x.id]=!0,isNaN(x.data.rank)||a[x.data.rank].push(x.id)})),a},ih=(r,t)=>t.map(e=>{const n=r.getRelatedEdges(e,"in");if(!(n!=null&&n.length))return{v:e};const i={sum:0,weight:0};return n==null||n.forEach(a=>{const l=r.getNode(a.source);i.sum+=a.data.weight*l.data.order,i.weight+=a.data.weight}),{v:e,barycenter:i.sum/i.weight,weight:i.weight}}),ah=(r,t)=>{var e,n,i;const a={};r==null||r.forEach((u,f)=>{a[u.v]={i:f,indegree:0,in:[],out:[],vs:[u.v]};const m=a[u.v];u.barycenter!==void 0&&(m.barycenter=u.barycenter,m.weight=u.weight)}),(e=t.getAllEdges())===null||e===void 0||e.forEach(u=>{const f=a[u.source],m=a[u.target];f!==void 0&&m!==void 0&&(m.indegree++,f.out.push(a[u.target]))});const l=(i=(n=Object.values(a)).filter)===null||i===void 0?void 0:i.call(n,u=>!u.indegree);return wl(l)},wl=r=>{var t,e;const n=[],i=f=>m=>{m.merged||(m.barycenter===void 0||f.barycenter===void 0||m.barycenter>=f.barycenter)&&sh(f,m)},a=f=>m=>{m.in.push(f),--m.indegree===0&&r.push(m)};for(;r!=null&&r.length;){const f=r.pop();n.push(f),(t=f.in.reverse())===null||t===void 0||t.forEach(m=>i(f)(m)),(e=f.out)===null||e===void 0||e.forEach(m=>a(f)(m))}const l=n.filter(f=>!f.merged),u=["vs","i","barycenter","weight"];return l.map(f=>{const m={};return u==null||u.forEach(x=>{f[x]!==void 0&&(m[x]=f[x])}),m})},sh=(r,t)=>{var e;let n=0,i=0;r.weight&&(n+=r.barycenter*r.weight,i+=r.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),r.vs=(e=t.vs)===null||e===void 0?void 0:e.concat(r.vs),r.barycenter=n/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0};var oh=ah;const lh=(r,t,e,n)=>{const i=Ac(r,V=>{const et=V.hasOwnProperty("fixorder")&&!isNaN(V.fixorder);return n?!et&&V.hasOwnProperty("barycenter"):et||V.hasOwnProperty("barycenter")}),a=i.lhs,l=i.rhs.sort((V,et)=>-V.i- -et.i),u=[];let f=0,m=0,x=0;a==null||a.sort(ch(!!t,!!e)),x=Xs(u,l,x),a==null||a.forEach(V=>{var et;x+=(et=V.vs)===null||et===void 0?void 0:et.length,u.push(V.vs),f+=V.barycenter*V.weight,m+=V.weight,x=Xs(u,l,x)});const Z={vs:u.flat()};return m&&(Z.barycenter=f/m,Z.weight=m),Z},Xs=(r,t,e)=>{let n=e,i;for(;t.length&&(i=t[t.length-1]).i<=n;)t.pop(),r==null||r.push(i.vs),n++;return n},ch=(r,t)=>(e,n)=>{if(e.fixorder!==void 0&&n.fixorder!==void 0)return e.fixorder-n.fixorder;if(e.barycenter<n.barycenter)return-1;if(e.barycenter>n.barycenter)return 1;if(t&&e.order!==void 0&&n.order!==void 0){if(e.order<n.order)return-1;if(e.order>n.order)return 1}return r?n.i-e.i:e.i-n.i},Ks=(r,t,e,n,i,a)=>{var l,u,f,m;let x=r.getChildren(t).map(oe=>oe.id);const Z=r.getNode(t),V=Z?Z.data.borderLeft:void 0,et=Z?Z.data.borderRight:void 0,dt={};V&&(x=x==null?void 0:x.filter(oe=>oe!==V&&oe!==et));const At=ih(r,x||[]);At==null||At.forEach(oe=>{var pe;if(!((pe=r.getChildren(oe.v))===null||pe===void 0)&&pe.length){const Be=Ks(r,oe.v,e,n,a);dt[oe.v]=Be,Be.hasOwnProperty("barycenter")&&hh(oe,Be)}});const Dt=oh(At,e);uh(Dt,dt),(l=Dt.filter(oe=>oe.vs.length>0))===null||l===void 0||l.forEach(oe=>{const pe=r.getNode(oe.vs[0]);pe&&(oe.fixorder=pe.data.fixorder,oe.order=pe.data.order)});const Qt=lh(Dt,n,i,a);if(V&&(Qt.vs=[V,Qt.vs,et].flat(),!((u=r.getPredecessors(V))===null||u===void 0)&&u.length)){const oe=r.getNode(((f=r.getPredecessors(V))===null||f===void 0?void 0:f[0].id)||""),pe=r.getNode(((m=r.getPredecessors(et))===null||m===void 0?void 0:m[0].id)||"");Qt.hasOwnProperty("barycenter")||(Qt.barycenter=0,Qt.weight=0),Qt.barycenter=(Qt.barycenter*Qt.weight+oe.data.order+pe.data.order)/(Qt.weight+2),Qt.weight+=2}return Qt},uh=(r,t)=>{r==null||r.forEach(e=>{var n;const i=(n=e.vs)===null||n===void 0?void 0:n.map(a=>t[a]?t[a].vs:a);e.vs=i.flat()})},hh=(r,t)=>{r.barycenter!==void 0?(r.barycenter=(r.barycenter*r.weight+t.barycenter*t.weight)/(r.weight+t.weight),r.weight+=t.weight):(r.barycenter=t.barycenter,r.weight=t.weight)},dh=(r,t)=>{const e=Wl(r),n=[],i=[];for(let x=1;x<e+1;x++)n.push(x);for(let x=e-1;x>-1;x--)i.push(x);const a=No(r,n,"in"),l=No(r,i,"out");let u=ss(r);Po(r,u);let f=Number.POSITIVE_INFINITY,m;for(let x=0,Z=0;Z<4;++x,++Z){Qs(x%2?a:l,x%4>=2,!1,t),u=Xo(r);const V=Ki(r,u);V<f&&(Z=0,m=(0,Me.Z)(u),f=V)}u=ss(r),Po(r,u);for(let x=0,Z=0;Z<4;++x,++Z){Qs(x%2?a:l,x%4>=2,!0,t),u=Xo(r);const V=Ki(r,u);V<f&&(Z=0,m=(0,Me.Z)(u),f=V)}Po(r,m)},No=(r,t,e)=>t.map(n=>eh(r,n,e)),Qs=(r,t,e,n)=>{const i=new $r.k;r==null||r.forEach(a=>{var l;const u=a.getRoots()[0].id,f=Ks(a,u,i,t,e,n);for(let m=0;m<((l=f.vs)===null||l===void 0?void 0:l.length);m++){const x=a.getNode(f.vs[m]);x&&(x.data.order=m)}Ko(a,i,f.vs)})},Po=(r,t)=>{t==null||t.forEach(e=>{e==null||e.forEach((n,i)=>{r.getNode(n).data.order=i})})},Dc=(r,t)=>{const n=r.getAllNodes().filter(l=>{var u;return!(!((u=r.getChildren(l.id))===null||u===void 0)&&u.length)}).map(l=>l.data.rank),i=Math.max(...n),a=[];for(let l=0;l<i+1;l++)a[l]=[];t==null||t.forEach(l=>{const u=r.getNode(l);!u||u.data.dummy||isNaN(u.data.rank)||(u.data.fixorder=a[u.data.rank].length,a[u.data.rank].push(l))})},Ic=r=>{const t={};let e=0;const n=i=>{const a=e;r.getChildren(i).forEach(l=>n(l.id)),t[i]={low:a,lim:e++}};return r.getRoots().forEach(i=>n(i.id)),t},Ml=(r,t,e,n)=>{var i,a;const l=[],u=[],f=Math.min(t[e].low,t[n].low),m=Math.max(t[e].lim,t[n].lim);let x,Z;x=e;do x=(i=r.getParent(x))===null||i===void 0?void 0:i.id,l.push(x);while(x&&(t[x].low>f||m>t[x].lim));for(Z=x,x=n;x&&x!==Z;)u.push(x),x=(a=r.getParent(x))===null||a===void 0?void 0:a.id;return{lca:Z,path:l.concat(u.reverse())}},Sl=(r,t)=>{const e=Ic(r);t.forEach(n=>{var i,a;let l=n,u=r.getNode(l);const f=u.data.originalEdge;if(!f)return;const m=Ml(r,e,f.source,f.target),x=m.path,Z=m.lca;let V=0,et=x[V],dt=!0;for(;l!==f.target;){if(u=r.getNode(l),dt){for(;et!==Z&&((i=r.getNode(et))===null||i===void 0?void 0:i.data.maxRank)<u.data.rank;)V++,et=x[V];et===Z&&(dt=!1)}if(!dt){for(;V<x.length-1&&((a=r.getNode(x[V+1]))===null||a===void 0?void 0:a.data.minRank)<=u.data.rank;)V++;et=x[V]}r.hasNode(et)&&r.setParent(l,et),l=r.getSuccessors(l)[0].id}})},Bc=(r,t)=>{const e={},n=(i,a)=>{let l=0,u=0;const f=i.length,m=a==null?void 0:a[(a==null?void 0:a.length)-1];return a==null||a.forEach((x,Z)=>{var V;const et=uo(r,x),dt=et?r.getNode(et.id).data.order:f;(et||x===m)&&((V=a.slice(u,Z+1))===null||V===void 0||V.forEach(At=>{var Dt;(Dt=r.getPredecessors(At))===null||Dt===void 0||Dt.forEach(Qt=>{var oe;const pe=r.getNode(Qt.id),Be=pe.data.order;(Be<l||dt<Be)&&!(pe.data.dummy&&(!((oe=r.getNode(At))===null||oe===void 0)&&oe.data.dummy))&&Xl(e,Qt.id,At)})}),u=Z+1,l=dt)}),a};return t!=null&&t.length&&t.reduce(n),e},Hl=(r,t)=>{const e={};function n(u,f,m,x,Z){var V,et;let dt;for(let At=f;At<m;At++)dt=u[At],!((V=r.getNode(dt))===null||V===void 0)&&V.data.dummy&&((et=r.getPredecessors(dt))===null||et===void 0||et.forEach(Dt=>{const Qt=r.getNode(Dt.id);Qt.data.dummy&&(Qt.data.order<x||Qt.data.order>Z)&&Xl(e,Dt.id,dt)}))}function i(u){return JSON.stringify(u.slice(1))}function a(u,f){const m=i(u);f.get(m)||(n(...u),f.set(m,!0))}const l=(u,f)=>{let m=-1,x,Z=0;const V=new Map;return f==null||f.forEach((et,dt)=>{var At;if(((At=r.getNode(et))===null||At===void 0?void 0:At.data.dummy)==="border"){const Dt=r.getPredecessors(et)||[];Dt.length&&(x=r.getNode(Dt[0].id).data.order,a([f,Z,dt,m,x],V),Z=dt,m=x)}a([f,Z,f.length,x,u.length],V)}),f};return t!=null&&t.length&&t.reduce(l),e},uo=(r,t)=>{var e,n;if(!((e=r.getNode(t))===null||e===void 0)&&e.data.dummy)return(n=r.getPredecessors(t))===null||n===void 0?void 0:n.find(i=>r.getNode(i.id).data.dummy)},Xl=(r,t,e)=>{let n=t,i=e;if(n>i){const l=n;n=i,i=l}let a=r[n];a||(r[n]=a={}),a[i]=!0},fh=(r,t,e)=>{let n=t,i=e;if(n>i){const a=t;n=i,i=a}return!!r[n]},Fc=(r,t,e,n)=>{const i={},a={},l={};return t==null||t.forEach(u=>{u==null||u.forEach((f,m)=>{i[f]=f,a[f]=f,l[f]=m})}),t==null||t.forEach(u=>{let f=-1;u==null||u.forEach(m=>{let x=n(m).map(Z=>Z.id);if(x.length){x=x.sort((V,et)=>l[V]-l[et]);const Z=(x.length-1)/2;for(let V=Math.floor(Z),et=Math.ceil(Z);V<=et;++V){const dt=x[V];a[m]===m&&f<l[dt]&&!fh(e,m,dt)&&(a[dt]=m,a[m]=i[m]=i[dt],f=l[dt])}}})}),{root:i,align:a}},_c=(r,t,e,n,i,a,l)=>{var u;const f={},m=vh(r,t,e,i,a,l),x=l?"borderLeft":"borderRight",Z=(dt,At)=>{let Dt=m.getAllNodes(),Qt=Dt.pop();const oe={};for(;Qt;)oe[Qt.id]?dt(Qt.id):(oe[Qt.id]=!0,Dt.push(Qt),Dt=Dt.concat(At(Qt.id))),Qt=Dt.pop()},V=dt=>{f[dt]=(m.getRelatedEdges(dt,"in")||[]).reduce((At,Dt)=>Math.max(At,(f[Dt.source]||0)+Dt.data.weight),0)},et=dt=>{const At=(m.getRelatedEdges(dt,"out")||[]).reduce((Qt,oe)=>Math.min(Qt,(f[oe.target]||0)-oe.data.weight),Number.POSITIVE_INFINITY),Dt=r.getNode(dt);At!==Number.POSITIVE_INFINITY&&Dt.data.borderType!==x&&(f[dt]=Math.max(f[dt],At))};return Z(V,m.getPredecessors.bind(m)),Z(et,m.getSuccessors.bind(m)),(u=Object.values(n))===null||u===void 0||u.forEach(dt=>{f[dt]=f[e[dt]]}),f},vh=(r,t,e,n,i,a)=>{const l=new $r.k,u=gh(n,i,a);return t==null||t.forEach(f=>{let m;f==null||f.forEach(x=>{const Z=e[x];if(l.hasNode(Z)||l.addNode({id:Z,data:{}}),m){const V=e[m],et=l.getRelatedEdges(V,"out").find(dt=>dt.target===Z);et?l.updateEdgeData(et.id,Object.assign(Object.assign({},et.data),{weight:Math.max(u(r,x,m),et.data.weight||0)})):l.addEdge({id:`e${Math.random()}`,source:V,target:Z,data:{weight:Math.max(u(r,x,m),0)}})}m=x})}),l},Zc=(r,t)=>Gl(Object.values(t),e=>{var n;let i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return(n=Object.keys(e))===null||n===void 0||n.forEach(l=>{const u=e[l],f=ph(r,l)/2;i=Math.max(u+f,i),a=Math.min(u-f,a)}),i-a});function zc(r,t){const e=Object.values(t),n=Math.min(...e),i=Math.max(...e);["u","d"].forEach(a=>{["l","r"].forEach(l=>{const u=a+l,f=r[u];let m;if(f===t)return;const x=Object.values(f);m=l==="l"?n-Math.min(...x):i-Math.max(...x),m&&(r[u]={},Object.keys(f).forEach(Z=>{r[u][Z]=f[Z]+m}))})})}const jc=(r,t)=>{const e={};return Object.keys(r.ul).forEach(n=>{if(t)e[n]=r[t.toLowerCase()][n];else{const i=Object.values(r).map(a=>a[n]);e[n]=(i[0]+i[1])/2}}),e},ld=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=buildLayerMatrix(r),l=Object.assign(Bc(r,a),Hl(r,a)),u={};let f;["u","d"].forEach(x=>{f=x==="u"?a:Object.values(a).reverse(),["l","r"].forEach(Z=>{Z==="r"&&(f=f.map(At=>Object.values(At).reverse()));const V=(x==="u"?r.getPredecessors:r.getSuccessors).bind(r),et=Fc(r,f,l,V),dt=_c(r,f,et.root,et.align,n,i,Z==="r");Z==="r"&&Object.keys(dt).forEach(At=>{dt[At]=-dt[At]}),u[x+Z]=dt})});const m=Zc(r,u);return zc(u,m),jc(u,e)},gh=(r,t,e)=>(n,i,a)=>{const l=n.getNode(i),u=n.getNode(a);let f=0,m=0;if(f+=l.data.width/2,l.data.hasOwnProperty("labelpos"))switch((l.data.labelpos||"").toLowerCase()){case"l":m=-l.data.width/2;break;case"r":m=l.data.width/2;break}if(m&&(f+=e?m:-m),m=0,f+=(l.data.dummy?t:r)/2,f+=(u.data.dummy?t:r)/2,f+=u.data.width/2,u.data.labelpos)switch((u.data.labelpos||"").toLowerCase()){case"l":m=u.data.width/2;break;case"r":m=-u.data.width/2;break}return m&&(f+=e?m:-m),m=0,f},ph=(r,t)=>r.getNode(t).data.width||0,mh=(r,t)=>{const{ranksep:e=0}=t||{},n=Xo(r);let i=0;n==null||n.forEach(a=>{const l=a.map(f=>r.getNode(f).data.height),u=Math.max(...l,0);a==null||a.forEach(f=>{r.getNode(f).data.y=i+u/2}),i+=u+e})},Jn=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=Xo(r),l=Object.assign(Bc(r,a),Hl(r,a)),u={};let f=[];["u","d"].forEach(x=>{f=x==="u"?a:Object.values(a).reverse(),["l","r"].forEach(Z=>{Z==="r"&&(f=f.map(At=>Object.values(At).reverse()));const V=(x==="u"?r.getPredecessors:r.getSuccessors).bind(r),et=Fc(r,f,l,V),dt=_c(r,f,et.root,et.align,n,i,Z==="r");Z==="r"&&Object.keys(dt).forEach(At=>dt[At]=-dt[At]),u[x+Z]=dt})});const m=Zc(r,u);return m&&zc(u,m),jc(u,e)},yh=(r,t)=>{var e;const n=jl(r);mh(n,t);const i=Jn(n,t);(e=Object.keys(i))===null||e===void 0||e.forEach(a=>{n.getNode(a).data.x=i[a]})},Wc=r=>{const t={},e=n=>{var i;const a=r.getNode(n);if(!a)return 0;if(t[n])return a.data.rank;t[n]=!0;let l;return(i=r.getRelatedEdges(n,"out"))===null||i===void 0||i.forEach(u=>{const f=e(u.target),m=u.data.minlen,x=f-m;x&&(l===void 0||x<l)&&(l=x)}),l||(l=0),a.data.rank=l,l};r.getAllNodes().filter(n=>r.getRelatedEdges(n.id,"in").length===0).forEach(n=>e(n.id))},bh=r=>{const t={};let e;const n=l=>{var u;const f=r.getNode(l);if(!f)return 0;if(t[l])return f.data.rank;t[l]=!0;let m;return(u=r.getRelatedEdges(l,"out"))===null||u===void 0||u.forEach(x=>{const Z=n(x.target),V=x.data.minlen,et=Z-V;et&&(m===void 0||et<m)&&(m=et)}),m||(m=0),(e===void 0||m<e)&&(e=m),f.data.rank=m,m};r.getAllNodes().filter(l=>r.getRelatedEdges(l.id,"in").length===0).forEach(l=>{l&&n(l.id)}),e===void 0&&(e=0);const i={},a=(l,u)=>{var f;const m=r.getNode(l),x=isNaN(m.data.layer)?u:m.data.layer;(m.data.rank===void 0||m.data.rank<x)&&(m.data.rank=x),!i[l]&&(i[l]=!0,(f=r.getRelatedEdges(l,"out"))===null||f===void 0||f.forEach(Z=>{a(Z.target,x+Z.data.minlen)}))};r.getAllNodes().forEach(l=>{const u=l.data;u&&(isNaN(u.layer)?u.rank-=e:a(l.id,u.layer))})},Ds=(r,t)=>r.getNode(t.target).data.rank-r.getNode(t.source).data.rank-t.data.minlen,cd=r=>{const t=new $r.k({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;Kl(t,r)<n;)i=Uc(t,r),a=t.hasNode(i.source)?Ds(r,i):-Ds(r,i),Si(t,r,a);return t},Kl=(r,t)=>{const e=n=>{t.getRelatedEdges(n,"both").forEach(i=>{const a=i.source,l=n===a?i.target:a;!r.hasNode(l)&&!Ds(t,i)&&(r.addNode({id:l,data:{}}),r.addEdge({id:i.id,source:n,target:l,data:{}}),e(l))})};return r.getAllNodes().forEach(n=>e(n.id)),r.getAllNodes().length},Ql=r=>{const t=new $r.k({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;Gc(t,r)<n;)i=Uc(t,r),a=t.hasNode(i.source)?Ds(r,i):-Ds(r,i),Si(t,r,a);return t},Gc=(r,t)=>{const e=n=>{var i;(i=t.getRelatedEdges(n,"both"))===null||i===void 0||i.forEach(a=>{const l=a.source,u=n===l?a.target:l;!r.hasNode(u)&&(t.getNode(u).data.layer!==void 0||!Ds(t,a))&&(r.addNode({id:u,data:{}}),r.addEdge({id:a.id,source:n,target:u,data:{}}),e(u))})};return r.getAllNodes().forEach(n=>e(n.id)),r.getAllNodes().length},Uc=(r,t)=>Gl(t.getAllEdges(),e=>r.hasNode(e.source)!==r.hasNode(e.target)?Ds(t,e):1/0),Si=(r,t,e)=>{r.getAllNodes().forEach(n=>{const i=t.getNode(n.id);i.data.rank||(i.data.rank=0),i.data.rank+=e})},Eh=r=>{const t=xc(r);Wc(t);const e=cd(t);Ri(e),os(e,t);let n,i;for(;n=wh(e);)i=Vc(e,t,n),Jl(e,t,n,i)},os=(r,t)=>{let e=Tc(r,r.getAllNodes(),"post",!1);e=e.slice(0,(e==null?void 0:e.length)-1),e.forEach(n=>{Qo(r,t,n)})},Qo=(r,t,e)=>{const i=r.getNode(e).data.parent,a=r.getRelatedEdges(e,"both").find(l=>l.target===i||l.source===i);a.data.cutvalue=xh(r,t,e)},xh=(r,t,e)=>{const i=r.getNode(e).data.parent;let a=!0,l=t.getRelatedEdges(e,"out").find(f=>f.target===i),u=0;return l||(a=!1,l=t.getRelatedEdges(i,"out").find(f=>f.target===e)),u=l.data.weight,t.getRelatedEdges(e,"both").forEach(f=>{const m=f.source===e,x=m?f.target:f.source;if(x!==i){const Z=m===a,V=f.data.weight;if(u+=Z?V:-V,Jo(r,e,x)){const et=r.getRelatedEdges(e,"both").find(dt=>dt.source===x||dt.target===x).data.cutvalue;u+=Z?-et:et}}}),u},Ri=(r,t=r.getAllNodes()[0].id)=>{Al(r,{},1,t)},Al=(r,t,e,n,i)=>{var a;const l=e;let u=e;const f=r.getNode(n);return t[n]=!0,(a=r.getNeighbors(n))===null||a===void 0||a.forEach(m=>{t[m.id]||(u=Al(r,t,u,m.id,n))}),f.data.low=l,f.data.lim=u++,i?f.data.parent=i:delete f.data.parent,u},wh=r=>r.getAllEdges().find(t=>t.data.cutvalue<0),Vc=(r,t,e)=>{let n=e.source,i=e.target;t.getRelatedEdges(n,"out").find(x=>x.target===i)||(n=e.target,i=e.source);const a=r.getNode(n),l=r.getNode(i);let u=a,f=!1;a.data.lim>l.data.lim&&(u=l,f=!0);const m=t.getAllEdges().filter(x=>f===Yc(r.getNode(x.source),u)&&f!==Yc(r.getNode(x.target),u));return Gl(m,x=>Ds(t,x))},Jl=(r,t,e,n)=>{const i=r.getRelatedEdges(e.source,"both").find(a=>a.source===e.target||a.target===e.target);i&&r.removeEdge(i.id),r.addEdge({id:`e${Math.random()}`,source:n.source,target:n.target,data:{}}),Ri(r),os(r,t),Mh(r,t)},Mh=(r,t)=>{const e=r.getAllNodes().find(i=>!i.data.parent);let n=Tc(r,e,"pre",!1);n=n.slice(1),n.forEach(i=>{const a=r.getNode(i).data.parent;let l=t.getRelatedEdges(i,"out").find(f=>f.target===a),u=!1;!l&&t.hasNode(a)&&(l=t.getRelatedEdges(a,"out").find(f=>f.target===i),u=!0),t.getNode(i).data.rank=(t.hasNode(a)&&t.getNode(a).data.rank||0)+(u?l==null?void 0:l.data.minlen:-(l==null?void 0:l.data.minlen))})},Jo=(r,t,e)=>r.getRelatedEdges(t,"both").find(n=>n.source===e||n.target===e),Yc=(r,t)=>t.data.low<=r.data.lim&&r.data.lim<=t.data.lim,$l=(r,t)=>{switch(t){case"network-simplex":tc(r);break;case"tight-tree":Hc(r);break;case"longest-path":ql(r);break;default:Hc(r)}},ql=Wc,Hc=r=>{bh(r),Ql(r)},tc=r=>{Eh(r)},Sh=(r,t)=>{const{edgeLabelSpace:e,keepNodeOrder:n,prevGraph:i,rankdir:a,ranksep:l}=t;!n&&i&&Ah(r,i);const u=Ch(r);e&&(t.ranksep=ud(u,{rankdir:a,ranksep:l}));let f;try{f=ec(u,t)}catch(m){if(m.message==="Not possible to find intersection inside of the rectangle"){console.error(`The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:
|
|
|
`,m);return}throw m}return $o(r,u),f},ec=(r,t)=>{const{acyclicer:e,ranker:n,rankdir:i="tb",nodeOrder:a,keepNodeOrder:l,align:u,nodesep:f=50,edgesep:m=20,ranksep:x=50}=t;$c(r),Uu(r,e);const{nestingRoot:Z,nodeRankFactor:V}=El(r);$l(jl(r),n),Xc(r),Hu(r,V),ya(r,Z),Yu(r),Kc(r),Qc(r);const et=[];qu(r,et),Sl(r,et),Xu(r),l&&Dc(r,a),dh(r,l),kh(r),Ku(r,i),yh(r,{align:u,nodesep:f,edgesep:m,ranksep:x}),Rh(r),ys(r),Lc(r,et),Jc(r),Qu(r,i);const{width:dt,height:At}=Nh(r);return Ph(r),hd(r),zl(r),{width:dt,height:At}},Ah=(r,t)=>{r.getAllNodes().forEach(e=>{const n=r.getNode(e.id);if(t.hasNode(e.id)){const i=t.getNode(e.id);n.data.fixorder=i.data._order,delete i.data._order}else delete n.data.fixorder})},$o=(r,t)=>{r.getAllNodes().forEach(e=>{var n;const i=r.getNode(e.id);if(i){const a=t.getNode(e.id);i.data.x=a.data.x,i.data.y=a.data.y,i.data._order=a.data.order,i.data._rank=a.data.rank,!((n=t.getChildren(e.id))===null||n===void 0)&&n.length&&(i.data.width=a.data.width,i.data.height=a.data.height)}}),r.getAllEdges().forEach(e=>{const n=r.getEdge(e.id),i=t.getEdge(e.id);n.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(n.data.x=i.data.x,n.data.y=i.data.y)})},Oh=["width","height","layer","fixorder"],nc={width:0,height:0},rc=["minlen","weight","width","height","labeloffset"],Th={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ko=["labelpos"],Ch=r=>{const t=new $r.k({tree:[]});return r.getAllNodes().forEach(e=>{const n=tl(r.getNode(e.id).data),i=Object.assign(Object.assign({},nc),n),a=qo(i,Oh);t.hasNode(e.id)||t.addNode({id:e.id,data:Object.assign({},a)});const l=r.hasTreeStructure("combo")?r.getParent(e.id,"combo"):r.getParent(e.id);(0,z.Z)(l)||(t.hasNode(l.id)||t.addNode(Object.assign({},l)),t.setParent(e.id,l.id))}),r.getAllEdges().forEach(e=>{const n=tl(r.getEdge(e.id).data),i={};ko==null||ko.forEach(a=>{n[a]!==void 0&&(i[a]=n[a])}),t.addEdge({id:e.id,source:e.source,target:e.target,data:Object.assign({},Th,qo(n,rc),i)})}),t},ud=(r,t)=>{const{ranksep:e=0,rankdir:n}=t;return r.getAllNodes().forEach(i=>{isNaN(i.data.layer)||i.data.layer||(i.data.layer=0)}),r.getAllEdges().forEach(i=>{var a;i.data.minlen*=2,((a=i.data.labelpos)===null||a===void 0?void 0:a.toLowerCase())!=="c"&&(n==="TB"||n==="BT"?i.data.width+=i.data.labeloffset:i.data.height+=i.data.labeloffset)}),e/2},Xc=r=>{r.getAllEdges().forEach(t=>{if(t.data.width&&t.data.height){const e=r.getNode(t.source),n=r.getNode(t.target),i={e:t,rank:(n.data.rank-e.data.rank)/2+e.data.rank};Co(r,"edge-proxy",i,"_ep")}})},Kc=r=>{let t=0;return r.getAllNodes().forEach(e=>{var n,i;e.data.borderTop&&(e.data.minRank=(n=r.getNode(e.data.borderTop))===null||n===void 0?void 0:n.data.rank,e.data.maxRank=(i=r.getNode(e.data.borderBottom))===null||i===void 0?void 0:i.data.rank,t=Math.max(t,e.data.maxRank||-1/0))}),t},Qc=r=>{r.getAllNodes().forEach(t=>{t.data.dummy==="edge-proxy"&&(r.getEdge(t.data.e.id).data.labelRank=t.data.rank,r.removeNode(t.id))})},Nh=(r,t)=>{let e,n=0,i,a=0;const{marginx:l=0,marginy:u=0}=t||{},f=m=>{if(!m.data)return;const x=m.data.x,Z=m.data.y,V=m.data.width,et=m.data.height;!isNaN(x)&&!isNaN(V)&&(e===void 0&&(e=x-V/2),e=Math.min(e,x-V/2),n=Math.max(n,x+V/2)),!isNaN(Z)&&!isNaN(et)&&(i===void 0&&(i=Z-et/2),i=Math.min(i,Z-et/2),a=Math.max(a,Z+et/2))};return r.getAllNodes().forEach(m=>{f(m)}),r.getAllEdges().forEach(m=>{m!=null&&m.data.hasOwnProperty("x")&&f(m)}),e-=l,i-=u,r.getAllNodes().forEach(m=>{m.data.x-=e,m.data.y-=i}),r.getAllEdges().forEach(m=>{var x;(x=m.data.points)===null||x===void 0||x.forEach(Z=>{Z.x-=e,Z.y-=i}),m.data.hasOwnProperty("x")&&(m.data.x-=e),m.data.hasOwnProperty("y")&&(m.data.y-=i)}),{width:n-e+l,height:a-i+u}},Ph=r=>{r.getAllEdges().forEach(t=>{const e=r.getNode(t.source),n=r.getNode(t.target);let i,a;t.data.points?(i=t.data.points[0],a=t.data.points[t.data.points.length-1]):(t.data.points=[],i={x:n.data.x,y:n.data.y},a={x:e.data.x,y:e.data.y}),t.data.points.unshift(Zi(e.data,i)),t.data.points.push(Zi(n.data,a))})},Jc=r=>{r.getAllEdges().forEach(t=>{if(t.data.hasOwnProperty("x"))switch((t.data.labelpos==="l"||t.data.labelpos==="r")&&(t.data.width-=t.data.labeloffset),t.data.labelpos){case"l":t.data.x-=t.data.width/2+t.data.labeloffset;break;case"r":t.data.x+=t.data.width/2+t.data.labeloffset;break}})},hd=r=>{r.getAllEdges().forEach(t=>{var e;t.data.reversed&&((e=t.data.points)===null||e===void 0||e.reverse())})},ys=r=>{r.getAllNodes().forEach(t=>{var e,n,i;if(!((e=r.getChildren(t.id))===null||e===void 0)&&e.length){const a=r.getNode(t.id),l=r.getNode(a.data.borderTop),u=r.getNode(a.data.borderBottom),f=r.getNode(a.data.borderLeft[((n=a.data.borderLeft)===null||n===void 0?void 0:n.length)-1]),m=r.getNode(a.data.borderRight[((i=a.data.borderRight)===null||i===void 0?void 0:i.length)-1]);a.data.width=Math.abs((m==null?void 0:m.data.x)-(f==null?void 0:f.data.x))||10,a.data.height=Math.abs((u==null?void 0:u.data.y)-(l==null?void 0:l.data.y))||10,a.data.x=((f==null?void 0:f.data.x)||0)+a.data.width/2,a.data.y=((l==null?void 0:l.data.y)||0)+a.data.height/2}}),r.getAllNodes().forEach(t=>{t.data.dummy==="border"&&r.removeNode(t.id)})},$c=r=>{r.getAllEdges().forEach(t=>{if(t.source===t.target){const e=r.getNode(t.source);e.data.selfEdges||(e.data.selfEdges=[]),e.data.selfEdges.push(t),r.removeEdge(t.id)}})},kh=r=>{const t=Xo(r);t==null||t.forEach(e=>{let n=0;e==null||e.forEach((i,a)=>{var l;const u=r.getNode(i);u.data.order=a+n,(l=u.data.selfEdges)===null||l===void 0||l.forEach(f=>{Co(r,"selfedge",{width:f.data.width,height:f.data.height,rank:u.data.rank,order:a+ ++n,e:f},"_se")}),delete u.data.selfEdges})})},Rh=r=>{r.getAllNodes().forEach(t=>{const e=r.getNode(t.id);if(e.data.dummy==="selfedge"){const n=r.getNode(e.data.e.source),i=n.data.x+n.data.width/2,a=n.data.y,l=e.data.x-i,u=n.data.height/2;r.hasEdge(e.data.e.id)?r.updateEdgeData(e.data.e.id,e.data.e.data):r.addEdge({id:e.data.e.id,source:e.data.e.source,target:e.data.e.target,data:e.data.e.data}),r.removeNode(t.id),e.data.e.data.points=[{x:i+2*l/3,y:a-u},{x:i+5*l/6,y:a-u},{y:a,x:i+l},{x:i+5*l/6,y:a+u},{x:i+2*l/3,y:a+u}],e.data.e.data.x=e.data.x,e.data.e.data.y=e.data.y}})},qo=(r,t)=>{const e={};return t==null||t.forEach(n=>{r[n]!==void 0&&(e[n]=+r[n])}),e},tl=(r={})=>{const t={};return Object.keys(r).forEach(e=>{t[e.toLowerCase()]=r[e]}),t};function ho(r){if(!r)return[0,0,0];if((0,on.Z)(r))return[r,r,r];if(r.length===0)return[0,0,0];const[t,e=t,n=t]=r;return[t,e,n]}function Js(r,t){let e;return(0,xe.Z)(t)?e=t:(0,on.Z)(t)?e=()=>t:e=()=>r,e}function el(r,t,e=!0){return!t&&t!==0?n=>{const{size:i}=n.data||{};return i?Array.isArray(i)?e?Math.max(...i)||r:i:(0,R.Z)(i)&&i.width&&i.height?e?Math.max(i.width,i.height)||r:[i.width,i.height]:i:r}:(0,xe.Z)(t)?t:(0,on.Z)(t)?()=>t:Array.isArray(t)?()=>e?Math.max(...t)||r:t:(0,R.Z)(t)&&t.width&&t.height?()=>e?Math.max(t.width,t.height)||r:[t.width,t.height]:()=>r}const ic=(r,t,e=10)=>{let n;const i=typeof t=="function"?t:()=>t||0;return r?Array.isArray(r)?n=l=>r:(0,xe.Z)(r)?n=r:n=l=>r:n=l=>{var u,f,m;if(!((u=l.data)===null||u===void 0)&&u.bboxSize)return(f=l.data)===null||f===void 0?void 0:f.bboxSize;if(!((m=l.data)===null||m===void 0)&&m.size){const x=l.data.size;return Array.isArray(x)?x:(0,R.Z)(x)?[x.width,x.height]:x}return e},l=>{const u=n(l),f=i(l);return Math.max(...ho(u))+f}},d=r=>{if(r===null)return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof Array){const t=[];return r.forEach(e=>{t.push(e)}),t.map(e=>d(e))}if(typeof r=="object"){const t={};return Object.keys(r).forEach(e=>{t[e]=d(r[e])}),t}return r},v=(r,t)=>{const e=d(r);return e.data=e.data||{},t&&((0,on.Z)(e.data.x)||(e.data.x=Math.random()*t[0]),(0,on.Z)(e.data.y)||(e.data.y=Math.random()*t[1])),e},s={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class o{constructor(t={}){this.options=t,this.id="antv-dagre",this.options=Object.assign(Object.assign({},s),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,e)})}genericDagreLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{nodeSize:a,align:l,rankdir:u="TB",ranksep:f,nodesep:m,ranksepFunc:x,nodesepFunc:Z,edgeLabelSpace:V,ranker:et,nodeOrder:dt,begin:At,controlPoints:Dt,radial:Qt,sortByCombo:oe,preset:pe}=i,Be=new $r.k({tree:[]}),vn=Js(f||50,x),nn=Js(m||50,Z);let An=nn,$e=vn;(u==="LR"||u==="RL")&&(An=vn,$e=nn);const zn=el(10,a,!1),cr=e.getAllNodes(),fr=e.getAllEdges();cr.forEach(er=>{const Kr=ho(zn(er)),hi=$e(er),vi=An(er),Bi=Kr[0]+2*vi,aa=Kr[1]+2*hi,gi=er.data.layer;(0,on.Z)(gi)?Be.addNode({id:er.id,data:{width:Bi,height:aa,layer:gi}}):Be.addNode({id:er.id,data:{width:Bi,height:aa}})}),oe&&(Be.attachTreeStructure("combo"),cr.forEach(er=>{const{parentId:Kr}=er.data;Kr!==void 0&&Be.hasNode(Kr)&&Be.setParent(er.id,Kr,"combo")})),fr.forEach(er=>{Be.addEdge({id:er.id,source:er.source,target:er.target,data:{weight:er.data.weight||1}})});let Vr;pe!=null&&pe.length&&(Vr=new $r.k({nodes:pe})),Sh(Be,{prevGraph:Vr,edgeLabelSpace:V,keepNodeOrder:!!dt,nodeOrder:dt||[],acyclicer:"greedy",ranker:et,rankdir:u,nodesep:m,align:l});const Rr=[0,0];if(At){let er=1/0,Kr=1/0;Be.getAllNodes().forEach(hi=>{er>hi.data.x&&(er=hi.data.x),Kr>hi.data.y&&(Kr=hi.data.y)}),Be.getAllEdges().forEach(hi=>{var vi;(vi=hi.data.points)===null||vi===void 0||vi.forEach(Bi=>{er>Bi.x&&(er=Bi.x),Kr>Bi.y&&(Kr=Bi.y)})}),Rr[0]=At[0]-er,Rr[1]=At[1]-Kr}const Fr=u==="LR"||u==="RL";if(!Qt){const er=new Set,hi=u==="BT"||u==="RL"?(gi,Vi)=>Vi-gi:(gi,Vi)=>gi-Vi;Be.getAllNodes().forEach(gi=>{gi.data.x=gi.data.x+Rr[0],gi.data.y=gi.data.y+Rr[1],er.add(Fr?gi.data.x:gi.data.y)});const vi=Array.from(er).sort(hi),Bi=Fr?(gi,Vi)=>gi.x!==Vi.x:(gi,Vi)=>gi.y!==Vi.y,aa=Fr?(gi,Vi,sa)=>{const ji=Math.max(Vi.y,sa.y),Es=Math.min(Vi.y,sa.y);return gi.filter(po=>po.y<=ji&&po.y>=Es)}:(gi,Vi,sa)=>{const ji=Math.max(Vi.x,sa.x),Es=Math.min(Vi.x,sa.x);return gi.filter(po=>po.x<=ji&&po.x>=Es)};Be.getAllEdges().forEach((gi,Vi)=>{var sa;V&&Dt&&gi.data.type!=="loop"&&(gi.data.controlPoints=p((sa=gi.data.points)===null||sa===void 0?void 0:sa.map(({x:ji,y:Es})=>({x:ji+Rr[0],y:Es+Rr[1]})),Be.getNode(gi.source),Be.getNode(gi.target),vi,Fr,Bi,aa))})}let Er=[];Er=Be.getAllNodes().map(er=>v(er));const Qr=Be.getAllEdges();return t&&(Er.forEach(er=>{e.mergeNodeData(er.id,{x:er.data.x,y:er.data.y})}),Qr.forEach(er=>{e.mergeEdgeData(er.id,{controlPoints:er.data.controlPoints})})),{nodes:Er,edges:Qr}})}}const p=(r,t,e,n,i,a,l)=>{let u=(r==null?void 0:r.slice(1,r.length-1))||[];if(t&&e){let{x:f,y:m}=t.data,{x,y:Z}=e.data;if(i&&(f=t.data.y,m=t.data.x,x=e.data.y,Z=e.data.x),Z!==m&&f!==x){const V=n.indexOf(m),et=n[V+1];if(et){const Dt=u[0],Qt=i?{x:(m+et)/2,y:(Dt==null?void 0:Dt.y)||x}:{x:(Dt==null?void 0:Dt.x)||x,y:(m+et)/2};(!Dt||a(Dt,Qt))&&u.unshift(Qt)}const dt=n.indexOf(Z),At=Math.abs(dt-V);if(At===1)u=l(u,t.data,e.data),u.length||u.push(i?{x:(m+Z)/2,y:f}:{x:f,y:(m+Z)/2});else if(At>1){const Dt=n[dt-1];if(Dt){const Qt=u[u.length-1],oe=i?{x:(Z+Dt)/2,y:(Qt==null?void 0:Qt.y)||x}:{x:(Qt==null?void 0:Qt.x)||f,y:(Z+Dt)/2};(!Qt||a(Qt,oe))&&u.push(oe)}}}}return u},C=(r,t,e)=>{const n=r.getAllNodes(),i=r.getAllEdges();if(!(n!=null&&n.length))return{nodes:[],edges:i};if(n.length===1)return t&&r.mergeNodeData(n[0].id,{x:e[0],y:e[1]}),{nodes:[Object.assign(Object.assign({},n[0]),{data:Object.assign(Object.assign({},n[0].data),{x:e[0],y:e[1]})})],edges:i}},O={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class W{constructor(t={}){this.options=t,this.id="circular",this.options=Object.assign(Object.assign({},O),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,t,e)})}genericCircularLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:l,center:u,divisions:f,startAngle:m=0,endAngle:x=2*Math.PI,angleRatio:Z,ordering:V,clockwise:et,nodeSpacing:dt,nodeSize:At}=i,Dt=e.getAllNodes(),Qt=e.getAllEdges(),[oe,pe,Be]=Bt(a,l,u),vn=Dt==null?void 0:Dt.length;if(!vn||vn===1)return C(e,t,Be);const nn=(x-m)/vn;let{radius:An,startRadius:$e,endRadius:zn}=i;if(dt){const Fr=Js(10,dt),Er=el(10,At);let Qr=-1/0;Dt.forEach(er=>{const Kr=Er(er);Qr<Kr&&(Qr=Kr)});let Ai=0;Dt.forEach((er,Kr)=>{Kr===0?Ai+=Qr||10:Ai+=(Fr(er)||0)+(Qr||10)}),An=Ai/(2*Math.PI)}else!An&&!$e&&!zn?An=Math.min(pe,oe)/2:!$e&&zn?$e=zn:$e&&!zn&&(zn=$e);const cr=nn*Z;let fr=[];V==="topology"?fr=K(e,Dt):V==="topology-directed"?fr=K(e,Dt,!0):V==="degree"?fr=ht(e,Dt):fr=Dt.map(Fr=>v(Fr));const Vr=Math.ceil(vn/f);for(let Fr=0;Fr<vn;++Fr){let Er=An;!Er&&$e!==null&&zn!==null&&(Er=$e+Fr*(zn-$e)/(vn-1)),Er||(Er=10+Fr*100/(vn-1));let Qr=m+Fr%Vr*cr+2*Math.PI/f*Math.floor(Fr/Vr);et||(Qr=x-Fr%Vr*cr-2*Math.PI/f*Math.floor(Fr/Vr)),fr[Fr].data.x=Be[0]+Math.cos(Qr)*Er,fr[Fr].data.y=Be[1]+Math.sin(Qr)*Er}return t&&fr.forEach(Fr=>{e.mergeNodeData(Fr.id,{x:Fr.data.x,y:Fr.data.y})}),{nodes:fr,edges:Qt}})}}const K=(r,t,e=!1)=>{const n=[v(t[0])],i={},a=t.length;i[t[0].id]=!0;let l=0;return t.forEach((u,f)=>{if(f!==0)if((f===a-1||r.getDegree(u.id,"both")!==r.getDegree(t[f+1].id,"both")||r.areNeighbors(n[l].id,u.id))&&!i[u.id])n.push(v(u)),i[u.id]=!0,l++;else{const m=e?r.getSuccessors(n[l].id):r.getNeighbors(n[l].id);let x=!1;for(let V=0;V<m.length;V++){const et=m[V];if(r.getDegree(et.id)===r.getDegree(u.id)&&!i[et.id]){n.push(v(et)),i[et.id]=!0,x=!0;break}}let Z=0;for(;!x&&(i[t[Z].id]||(n.push(v(t[Z])),i[t[Z].id]=!0,x=!0),Z++,Z!==a););}}),n};function ht(r,t){const e=[];return t.forEach((n,i)=>{e.push(v(n))}),e.sort((n,i)=>r.getDegree(n.id,"both")-r.getDegree(i.id,"both")),e}const Bt=(r,t,e)=>{let n=r,i=t,a=e;return!n&&typeof window!="undefined"&&(n=window.innerWidth),!i&&typeof window!="undefined"&&(i=window.innerHeight),a||(a=[n/2,i/2]),[n,i,a]},ne=Array.isArray,Se={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class ze{constructor(t={}){this.options=t,this.id="concentric",this.options=Object.assign(Object.assign({},Se),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,t,e)})}genericConcentricLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:l,height:u,sortBy:f,maxLevelDiff:m,sweep:x,clockwise:Z,equidistant:V,preventOverlap:et,startAngle:dt=3/2*Math.PI,nodeSize:At,nodeSpacing:Dt}=i,Qt=e.getAllNodes(),oe=e.getAllEdges(),pe=!l&&typeof window!="undefined"?window.innerWidth:l,Be=!u&&typeof window!="undefined"?window.innerHeight:u,vn=a||[pe/2,Be/2];if(!(Qt!=null&&Qt.length)||Qt.length===1)return C(e,t,vn);const nn=[];let An,$e=0;ne(At)?An=Math.max(At[0],At[1]):(0,xe.Z)(At)?(An=-1/0,Qt.forEach(er=>{const Kr=Math.max(...ho(At(er)));Kr>An&&(An=Kr)})):An=At,ne(Dt)?$e=Math.max(Dt[0],Dt[1]):(0,on.Z)(Dt)&&($e=Dt),Qt.forEach(er=>{const Kr=v(er);nn.push(Kr);let hi=An;const{data:vi}=Kr;ne(vi.size)?hi=Math.max(vi.size[0],vi.size[1]):(0,on.Z)(vi.size)?hi=vi.size:(0,R.Z)(vi.size)&&(hi=Math.max(vi.size.width,vi.size.height)),An=Math.max(An,hi),(0,xe.Z)(Dt)&&($e=Math.max(Dt(er),$e))});const zn={};nn.forEach((er,Kr)=>{zn[er.id]=Kr});let cr=f;(!(0,ta.Z)(cr)||nn[0].data[cr]===void 0)&&(cr="degree"),cr==="degree"?nn.sort((er,Kr)=>e.getDegree(Kr.id,"both")-e.getDegree(er.id,"both")):nn.sort((er,Kr)=>Kr.data[cr]-er.data[cr]);const fr=nn[0],Vr=(m||(cr==="degree"?e.getDegree(fr.id,"both"):fr.data[cr]))/4,Rr=[{nodes:[]}];let Fr=Rr[0];nn.forEach(er=>{if(Fr.nodes.length>0){const Kr=Math.abs(cr==="degree"?e.getDegree(Fr.nodes[0].id,"both")-e.getDegree(er.id,"both"):Fr.nodes[0].data[cr]-er.data[cr]);Vr&&Kr>=Vr&&(Fr={nodes:[]},Rr.push(Fr))}Fr.nodes.push(er)});let Er=An+$e;if(!et){const er=Rr.length>0&&Rr[0].nodes.length>1,hi=(Math.min(pe,Be)/2-Er)/(Rr.length+(er?1:0));Er=Math.min(Er,hi)}let Qr=0;if(Rr.forEach(er=>{const Kr=x===void 0?2*Math.PI-2*Math.PI/er.nodes.length:x;if(er.dTheta=Kr/Math.max(1,er.nodes.length-1),er.nodes.length>1&&et){const hi=Math.cos(er.dTheta)-Math.cos(0),vi=Math.sin(er.dTheta)-Math.sin(0),Bi=Math.sqrt(Er*Er/(hi*hi+vi*vi));Qr=Math.max(Bi,Qr)}er.r=Qr,Qr+=Er}),V){let er=0,Kr=0;for(let hi=0;hi<Rr.length;hi++){const Bi=(Rr[hi].r||0)-Kr;er=Math.max(er,Bi)}Kr=0,Rr.forEach((hi,vi)=>{vi===0&&(Kr=hi.r||0),hi.r=Kr,Kr+=er})}return Rr.forEach(er=>{const Kr=er.dTheta||0,hi=er.r||0;er.nodes.forEach((vi,Bi)=>{const aa=dt+(Z?1:-1)*Kr*Bi;vi.data.x=vn[0]+hi*Math.cos(aa),vi.data.y=vn[1]+hi*Math.sin(aa)})}),t&&nn.forEach(er=>e.mergeNodeData(er.id,{x:er.data.x,y:er.data.y})),{nodes:nn,edges:oe}})}}var We=y(14301),dn=y(7695);const gn=.81,pn=.1;function sn(r,t,e,n,i=2){const a=t/e,l=r.getAllNodes(),u=l.map((x,Z)=>{const{nodeStrength:V,x:et,y:dt,z:At,size:Dt}=x.data;return{x:et,y:dt,z:At,size:Dt,index:Z,id:x.id,vx:0,vy:0,vz:0,weight:a*V}}),f=(i===2?(0,We.Z)(u,x=>x.x,x=>x.y):(0,dn.Z)(u,x=>x.x,x=>x.y,x=>x.z)).visitAfter(Sn),m=new Map;return u.forEach(x=>{m.set(x.id,x),hn(x,f,i)}),u.map((x,Z)=>{const{id:V,data:et}=l[Z],{mass:dt=1}=et;n[V]={x:x.vx/dt,y:x.vy/dt,z:x.vz/dt}}),n}function Sn(r){let t=0,e=0,n=0,i=0,a=0;const l=r.length;if(l){for(let u=0;u<l;u++){const f=r[u];f&&f.weight&&(t+=f.weight,e+=f.x*f.weight,n+=f.y*f.weight,i+=f.z*f.weight,a+=f.size*f.weight)}r.x=e/t,r.y=n/t,r.z=i/t,r.size=a/t,r.weight=t}else{const u=r;r.x=u.data.x,r.y=u.data.y,r.z=u.data.z,r.size=u.data.size,r.weight=u.data.weight}}const Wn=(r,t,e,n,i,a,l)=>{var u;if(((u=r.data)===null||u===void 0?void 0:u.id)===a.id)return;const f=[e,n,i][l-1],m=a.x-r.x||pn,x=a.y-r.y||pn,Z=a.z-r.z||pn,V=[m,x,Z],et=f-t;let dt=0;for(let Qt=0;Qt<l;Qt++)dt+=V[Qt]*V[Qt];const Dt=Math.sqrt(dt)*dt;if(et*et*gn<dt){const Qt=r.weight/Dt;return a.vx+=m*Qt,a.vy+=x*Qt,a.vz+=Z*Qt,!0}if(r.length)return!1;if(r.data!==a){const Qt=r.data.weight/Dt;a.vx+=m*Qt,a.vy+=x*Qt,a.vz+=Z*Qt}};function hn(r,t,e){t.visit((n,i,a,l,u)=>Wn(n,i,a,l,u,r,e))}const Ue={dimensions:2,maxIteration:500,gravity:10,factor:1,edgeStrength:50,nodeStrength:1e3,coulombDisScale:.005,damping:.9,maxSpeed:200,minMovement:.4,interval:.02,linkDistance:200,clusterNodeStrength:20,preventOverlap:!0,distanceThresholdMode:"mean"};class un{constructor(t={}){this.options=t,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},Ue),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericForceLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericForceLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;(this.judgingDistance>this.lastOptions.minMovement||n<1)&&n<t;n++)this.runOneStep(this.lastCalcGraph,this.lastGraph,n,this.lastVelMap,this.lastOptions),this.updatePosition(this.lastGraph,this.lastCalcGraph,this.lastVelMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericForceLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),a=e.getAllNodes(),l=e.getAllEdges(),u=this.formatOptions(i,e),{dimensions:f,width:m,height:x,nodeSize:Z,getMass:V,nodeStrength:et,edgeStrength:dt,linkDistance:At}=u,Dt=a.map(($e,zn)=>Object.assign(Object.assign({},$e),{data:Object.assign(Object.assign({},$e.data),{x:(0,on.Z)($e.data.x)?$e.data.x:Math.random()*m,y:(0,on.Z)($e.data.y)?$e.data.y:Math.random()*x,z:(0,on.Z)($e.data.z)?$e.data.z:Math.random()*Math.sqrt(m*x),size:Z($e)||30,mass:V($e),nodeStrength:et($e)})})),Qt=l.map($e=>Object.assign(Object.assign({},$e),{data:Object.assign(Object.assign({},$e.data),{edgeStrength:dt($e),linkDistance:At($e,e.getNode($e.source),e.getNode($e.target))})}));if(!(a!=null&&a.length))return this.lastResult={nodes:[],edges:l},{nodes:[],edges:l};const oe={};a.forEach(($e,zn)=>{oe[$e.id]={x:0,y:0,z:0}});const pe=new $r.k({nodes:Dt,edges:Qt});this.formatCentripetal(u,pe);const{maxIteration:Be,minMovement:vn,onTick:nn}=u;if(this.lastLayoutNodes=Dt,this.lastLayoutEdges=Qt,this.lastAssign=t,this.lastGraph=e,this.lastCalcGraph=pe,this.lastOptions=u,this.lastVelMap=oe,typeof window=="undefined")return;let An=0;return new Promise($e=>{this.timeInterval=window.setInterval(()=>{(!a||!this.running)&&$e({nodes:Gn(e,Dt),edges:l}),this.runOneStep(pe,e,An,oe,u),this.updatePosition(e,pe,oe,u),t&&Dt.forEach(zn=>e.mergeNodeData(zn.id,{x:zn.data.x,y:zn.data.y,z:f===3?zn.data.z:void 0})),nn==null||nn({nodes:Gn(e,Dt),edges:l}),An++,(An>=Be||this.judgingDistance<vn)&&(window.clearInterval(this.timeInterval),$e({nodes:Gn(e,Dt),edges:l}))},0),this.running=!0})})}formatOptions(t,e){const n=Object.assign({},t),{width:i,height:a,getMass:l}=t;n.width=!i&&typeof window!="undefined"?window.innerWidth:i,n.height=!a&&typeof window!="undefined"?window.innerHeight:a,t.center||(n.center=[n.width/2,n.height/2]),l||(n.getMass=f=>{let m=1;(0,on.Z)(f==null?void 0:f.data.mass)&&(m=f==null?void 0:f.data.mass);const x=e.getDegree(f.id,"both");return!x||x<5?m:x*5*m}),n.nodeSize=ic(t.nodeSize,t.nodeSpacing);const u=t.linkDistance?Js(1,t.linkDistance):f=>1+n.nodeSize(e.getNode(f.source))+n.nodeSize(e.getNode(f.target));return n.linkDistance=u,n.nodeStrength=Js(1,t.nodeStrength),n.edgeStrength=Js(1,t.edgeStrength),n}formatCentripetal(t,e){const{dimensions:n,centripetalOptions:i,center:a,clusterNodeStrength:l,leafCluster:u,clustering:f,nodeClusterBy:m}=t,x=e.getAllNodes(),Z=i||{leaf:2,single:2,others:1,center:Qt=>({x:a[0],y:a[1],z:n===3?a[2]:void 0})};typeof l!="function"&&(t.clusterNodeStrength=Qt=>l);let V,et;if(u&&m&&(V=wn(e,m),et=Array.from(new Set(x==null?void 0:x.map(Qt=>Qt.data[m])))||[],t.centripetalOptions=Object.assign(Z,{single:100,leaf:Qt=>{const{siblingLeaves:oe,sameTypeLeaves:pe}=V[Qt.id]||{};return(pe==null?void 0:pe.length)===(oe==null?void 0:oe.length)||(et==null?void 0:et.length)===1?1:t.clusterNodeStrength(Qt)},others:1,center:Qt=>{const oe=e.getDegree(Qt.id,"both");if(!oe)return{x:100,y:100,z:0};let pe;if(oe===1){const{sameTypeLeaves:Be=[]}=V[Qt.id]||{};Be.length===1?pe=void 0:Be.length>1&&(pe=Un(Be))}else pe=void 0;return{x:pe==null?void 0:pe.x,y:pe==null?void 0:pe.y,z:pe==null?void 0:pe.z}}})),f&&m){V||(V=wn(e,m)),et||(et=Array.from(new Set(x.map(oe=>oe.data[m])))),et=et.filter(oe=>oe!==void 0);const Qt={};et.forEach(oe=>{const pe=x.filter(Be=>Be.data[m]===oe).map(Be=>e.getNode(Be.id));Qt[oe]=Un(pe)}),t.centripetalOptions=Object.assign(Z,{single:oe=>t.clusterNodeStrength(oe),leaf:oe=>t.clusterNodeStrength(oe),others:oe=>t.clusterNodeStrength(oe),center:oe=>{const pe=Qt[oe.data[m]];return{x:pe==null?void 0:pe.x,y:pe==null?void 0:pe.y,z:pe==null?void 0:pe.z}}})}const{leaf:dt,single:At,others:Dt}=t.centripetalOptions||{};dt&&typeof dt!="function"&&(t.centripetalOptions.leaf=()=>dt),At&&typeof At!="function"&&(t.centripetalOptions.single=()=>At),Dt&&typeof Dt!="function"&&(t.centripetalOptions.others=()=>Dt)}runOneStep(t,e,n,i,a){const l={},u=t.getAllNodes(),f=t.getAllEdges();if(!(u!=null&&u.length))return;const{monitor:m}=a;if(this.calRepulsive(t,l,a),f&&this.calAttractive(t,l,a),this.calGravity(t,e,l,a),this.updateVelocity(t,l,i,a),m){const x=this.calTotalEnergy(l,u);m({energy:x,nodes:e.getAllNodes(),edges:e.getAllEdges(),iterations:n})}}calTotalEnergy(t,e){if(!(e!=null&&e.length))return 0;let n=0;return e.forEach((i,a)=>{const l=t[i.id].x,u=t[i.id].y,f=this.options.dimensions===3?t[i.id].z:0,m=l*l+u*u+f*f,{mass:x=1}=i.data;n+=x*m*.5}),n}calRepulsive(t,e,n){const{dimensions:i,factor:a,coulombDisScale:l}=n;sn(t,a,l*l,e,i)}calAttractive(t,e,n){const{dimensions:i,nodeSize:a}=n;t.getAllEdges().forEach((l,u)=>{const{source:f,target:m}=l,x=t.getNode(f),Z=t.getNode(m);if(!x||!Z)return;let V=Z.data.x-x.data.x,et=Z.data.y-x.data.y,dt=i===3?Z.data.z-x.data.z:0;!V&&!et&&(V=Math.random()*.01,et=Math.random()*.01,i===3&&!dt&&(dt=Math.random()*.01));const At=Math.sqrt(V*V+et*et+dt*dt);if(At<a(x)+a(Z))return;const Dt=V/At,Qt=et/At,oe=dt/At,{linkDistance:pe=200,edgeStrength:Be=200}=l.data||{},nn=(pe-At)*Be,An=x.data.mass||1,$e=Z.data.mass||1,zn=1/An,cr=1/$e,fr=Dt*nn,Vr=Qt*nn,Rr=oe*nn;e[f].x-=fr*zn,e[f].y-=Vr*zn,e[f].z-=Rr*zn,e[m].x+=fr*cr,e[m].y+=Vr*cr,e[m].z+=Rr*cr})}calGravity(t,e,n,i){const{getCenter:a}=i,l=t.getAllNodes(),u=e.getAllNodes(),f=e.getAllEdges(),{width:m,height:x,center:Z,gravity:V,centripetalOptions:et}=i;l&&l.forEach(dt=>{const{id:At,data:Dt}=dt,{mass:Qt,x:oe,y:pe,z:Be}=Dt,vn=e.getNode(At);let nn=0,An=0,$e=0,zn=V;const cr=t.getDegree(At,"in"),fr=t.getDegree(At,"out"),Vr=t.getDegree(At,"both"),Rr=a==null?void 0:a(vn,Vr);if(Rr){const[Fr,Er,Qr]=Rr;nn=oe-Fr,An=pe-Er,zn=Qr}else nn=oe-Z[0],An=pe-Z[1],$e=Be-Z[2];if(zn&&(n[At].x-=zn*nn/Qt,n[At].y-=zn*An/Qt,n[At].z-=zn*$e/Qt),et){const{leaf:Fr,single:Er,others:Qr,center:Ai}=et,{x:er,y:Kr,z:hi,centerStrength:vi}=(Ai==null?void 0:Ai(vn,u,f,m,x))||{x:0,y:0,z:0,centerStrength:0};if(!(0,on.Z)(er)||!(0,on.Z)(Kr))return;const Bi=(oe-er)/Qt,aa=(pe-Kr)/Qt,gi=(Be-hi)/Qt;if(vi&&(n[At].x-=vi*Bi,n[At].y-=vi*aa,n[At].z-=vi*gi),Vr===0){const sa=Er(vn);if(!sa)return;n[At].x-=sa*Bi,n[At].y-=sa*aa,n[At].z-=sa*gi;return}if(cr===0||fr===0){const sa=Fr(vn,u,f);if(!sa)return;n[At].x-=sa*Bi,n[At].y-=sa*aa,n[At].z-=sa*gi;return}const Vi=Qr(vn);if(!Vi)return;n[At].x-=Vi*Bi,n[At].y-=Vi*aa,n[At].z-=Vi*gi}})}updateVelocity(t,e,n,i){const{damping:a,maxSpeed:l,interval:u,dimensions:f}=i,m=t.getAllNodes();m!=null&&m.length&&m.forEach(x=>{const{id:Z}=x;let V=(n[Z].x+e[Z].x*u)*a||.01,et=(n[Z].y+e[Z].y*u)*a||.01,dt=f===3?(n[Z].z+e[Z].z*u)*a||.01:0;const At=Math.sqrt(V*V+et*et+dt*dt);if(At>l){const Dt=l/At;V=Dt*V,et=Dt*et,dt=Dt*dt}n[Z]={x:V,y:et,z:dt}})}updatePosition(t,e,n,i){const{distanceThresholdMode:a,interval:l,dimensions:u}=i,f=e.getAllNodes();if(!(f!=null&&f.length)){this.judgingDistance=0;return}let m=0;a==="max"?this.judgingDistance=-1/0:a==="min"&&(this.judgingDistance=1/0),f.forEach(x=>{const{id:Z}=x,V=t.getNode(Z);if((0,on.Z)(V.data.fx)&&(0,on.Z)(V.data.fy)){e.mergeNodeData(Z,{x:V.data.fx,y:V.data.fy,z:u===3?V.data.fz:void 0});return}const et=n[Z].x*l,dt=n[Z].y*l,At=u===3?n[Z].z*l:0;e.mergeNodeData(Z,{x:x.data.x+et,y:x.data.y+dt,z:x.data.z+At});const Dt=Math.sqrt(et*et+dt*dt+At*At);switch(a){case"max":this.judgingDistance<Dt&&(this.judgingDistance=Dt);break;case"min":this.judgingDistance>Dt&&(this.judgingDistance=Dt);break;default:m=m+Dt;break}}),(!a||a==="mean")&&(this.judgingDistance=m/f.length)}}const wn=(r,t)=>{const e=r.getAllNodes();if(!(e!=null&&e.length))return{};const n={};return e.forEach((i,a)=>{r.getDegree(i.id,"both")===1&&(n[i.id]=_n(r,"leaf",i,t))}),n},_n=(r,t,e,n)=>{const i=r.getDegree(e.id,"in"),a=r.getDegree(e.id,"out");let l=e,u=[];i===0?(l=r.getSuccessors(e.id)[0],u=r.getNeighbors(l.id)):a===0&&(l=r.getPredecessors(e.id)[0],u=r.getNeighbors(l.id)),u=u.filter(m=>r.getDegree(m.id,"in")===0||r.getDegree(m.id,"out")===0);const f=kn(r,t,n,e,u);return{coreNode:l,siblingLeaves:u,sameTypeLeaves:f}},kn=(r,t,e,n,i)=>{const a=n.data[e]||"";let l=(i==null?void 0:i.filter(u=>u.data[e]===a))||[];return t==="leaf"&&(l=l.filter(u=>r.getDegree(u.id,"in")===0||r.getDegree(u.id,"out")===0)),l},Un=r=>{const t={x:0,y:0};r.forEach(n=>{const{x:i,y:a}=n.data;t.x+=i||0,t.y+=a||0});const e=r.length||1;return{x:t.x/e,y:t.y/e}},Gn=(r,t)=>t.map(e=>{const{id:n,data:i}=e,a=r.getNode(n);return Object.assign(Object.assign({},a),{data:Object.assign(Object.assign({},a.data),{x:i.x,y:i.y,z:i.z})})});var ar=y(43793);const Ir=r=>{const t=[],e=r.length;for(let n=0;n<e;n+=1){t[n]=[];for(let i=0;i<e;i+=1)n===i?t[n][i]=0:r[n][i]===0||!r[n][i]?t[n][i]=1/0:t[n][i]=r[n][i]}for(let n=0;n<e;n+=1)for(let i=0;i<e;i+=1)for(let a=0;a<e;a+=1)t[i][a]>t[i][n]+t[n][a]&&(t[i][a]=t[i][n]+t[n][a]);return t},zr=(r,t)=>{const{nodes:e,edges:n}=r,i=[],a={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((l,u)=>{a[l.id]=u;const f=[];i.push(f)}),n==null||n.forEach(l=>{const{source:u,target:f}=l,m=a[u],x=a[f];m===void 0||x===void 0||(i[m][x]=1,t||(i[x][m]=1))}),i},qr=(r,t)=>{const e=[];return r.forEach(n=>{const i=[];n.forEach(a=>{i.push(a*t)}),e.push(i)}),e},hr=r=>{let t=1/0,e=1/0,n=-1/0,i=-1/0;return r.forEach(a=>{let l=a.data.size;ne(l)?l.length===1&&(l=[l[0],l[0]]):(0,on.Z)(l)?l=[l,l]:(l===void 0||isNaN(l))&&(l=[30,30]);const u=[l[0]/2,l[1]/2],f=a.data.x-u[0],m=a.data.x+u[0],x=a.data.y-u[1],Z=a.data.y+u[1];t>f&&(t=f),e>x&&(e=x),n<m&&(n=m),i<Z&&(i=Z)}),{minX:t,minY:e,maxX:n,maxY:i}},kr=(r,t)=>Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)),Pr=(r,t,e,n="TB",i,a={})=>{if(!(t!=null&&t.length))return;const{stopBranchFn:l,stopAllFn:u}=a;for(let f=0;f<t.length;f++){const m=t[f];if(r.hasNode(m.id)&&!(l!=null&&l(m))){if(u!=null&&u(m))return;n==="TB"&&e(m),Pr(r,r.getChildren(m.id,i),e,n,i,a),n!=="TB"&&e(m)}}},zi={center:[0,0],linkDistance:50};class Qi{constructor(t={}){this.options=t,this.id="mds",this.options=Object.assign(Object.assign({},zi),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,t,e)})}genericMDSLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a=[0,0],linkDistance:l=50}=i,u=e.getAllNodes(),f=e.getAllEdges();if(!(u!=null&&u.length)||u.length===1)return C(e,t,a);const m=zr({nodes:u,edges:f},!1),x=Ir(m);ls(x);const Z=qr(x,l),V=ac(Z),et=[];return V.forEach((At,Dt)=>{const Qt=v(u[Dt]);Qt.data.x=At[0]+a[0],Qt.data.y=At[1]+a[1],et.push(Qt)}),t&&et.forEach(At=>e.mergeNodeData(At.id,{x:At.data.x,y:At.data.y})),{nodes:et,edges:f}})}}const ls=r=>{let t=-999999;r.forEach(e=>{e.forEach(n=>{n!==1/0&&t<n&&(t=n)})}),r.forEach((e,n)=>{e.forEach((i,a)=>{i===1/0&&(r[n][a]=t)})})},ac=r=>{const e=ar.y3.mul(ar.y3.pow(r,2),-.5),n=e.mean("row"),i=e.mean("column"),a=e.mean();e.add(a).subRowVector(n).subColumnVector(i);const l=new ar.Sc(e),u=ar.y3.sqrt(l.diagonalMatrix).diagonal();return l.leftSingularVectors.toJSON().map(f=>ar.y3.mul([f],[u]).toJSON()[0].splice(0,2))};function nl(r){return!!r.tick&&!!r.stop}const rl={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},Ol={center:[0,0],comboPadding:10,treeKey:"combo"};class qc{constructor(t={}){this.options=t,this.id="comboCombined",this.options=Object.assign(Object.assign({},Ol),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,t,e)})}genericComboCombinedLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=this.initVals(Object.assign(Object.assign({},this.options),n)),{center:a,treeKey:l,outerLayout:u}=i,f=e.getAllNodes().filter($e=>!$e.data._isCombo),m=e.getAllNodes().filter($e=>$e.data._isCombo),x=e.getAllEdges(),Z=f==null?void 0:f.length;if(!Z||Z===1)return C(e,t,a);const V=[],et=new Map;f.forEach($e=>{et.set($e.id,$e)});const dt=new Map;m.forEach($e=>{dt.set($e.id,$e)});const At=new Map,Dt=this.getInnerGraphs(e,l,et,dt,x,i,At);yield Promise.all(Dt);const Qt=new Map,oe=[],pe=new Map;let Be=!0;e.getRoots(l).forEach($e=>{const zn=At.get($e.id),cr=dt.get($e.id)||et.get($e.id),fr={id:$e.id,data:Object.assign(Object.assign({},$e.data),{x:zn.data.x||cr.data.x,y:zn.data.y||cr.data.y,fx:zn.data.fx||cr.data.fx,fy:zn.data.fy||cr.data.fy,mass:zn.data.mass||cr.data.mass,size:zn.data.size})};oe.push(fr),Qt.set($e.id,!0),!isNaN(fr.data.x)&&fr.data.x!==0&&!isNaN(fr.data.y)&&fr.data.y!==0?Be=!1:(fr.data.x=Math.random()*100,fr.data.y=Math.random()*100),Pr(e,[$e],Vr=>{Vr.id!==$e.id&&pe.set(Vr.id,$e.id)},"TB",l)});const vn=[];x.forEach($e=>{const zn=pe.get($e.source)||$e.source,cr=pe.get($e.target)||$e.target;zn!==cr&&Qt.has(zn)&&Qt.has(cr)&&vn.push({id:$e.id,source:zn,target:cr,data:{}})});let nn;if(oe!=null&&oe.length){if(oe.length===1)oe[0].data.x=a[0],oe[0].data.y=a[1];else{const $e=new $r.k({nodes:oe,edges:vn}),zn=u||new un;Be&&rl[zn.id]&&(yield(oe.length<100?new Qi:new ze).assign($e));const cr=Object.assign({center:a,kg:5,preventOverlap:!0,animate:!1},zn.id==="force"?{gravity:1,factor:4,linkDistance:(fr,Vr,Rr)=>{const Fr=Math.max(...Vr.data.size)||32,Er=Math.max(...Rr.data.size)||32;return Fr/2+Er/2+200}}:{});nn=yield sc(zn,$e,cr)}At.forEach($e=>{var zn;const cr=nn.nodes.find(Rr=>Rr.id===$e.id);if(cr){const{x:Rr,y:Fr}=cr.data;$e.data.visited=!0,$e.data.x=Rr,$e.data.y=Fr,V.push({id:$e.id,data:{x:Rr,y:Fr}})}const{x:fr,y:Vr}=$e.data;(zn=$e.data.nodes)===null||zn===void 0||zn.forEach(Rr=>{V.push({id:Rr.id,data:{x:Rr.data.x+fr,y:Rr.data.y+Vr}})})}),At.forEach(({data:$e})=>{const{x:zn,y:cr,visited:fr,nodes:Vr}=$e;Vr==null||Vr.forEach(Rr=>{if(!fr){const Fr=V.find(Er=>Er.id===Rr.id);Fr.data.x+=zn||0,Fr.data.y+=cr||0}})})}return t&&V.forEach($e=>{e.mergeNodeData($e.id,{x:$e.data.x,y:$e.data.y})}),{nodes:V,edges:x}})}initVals(t){const e=Object.assign({},t),{nodeSize:n,spacing:i,comboPadding:a}=t;let l,u;if((0,on.Z)(i)?u=()=>i:(0,xe.Z)(i)?u=i:u=()=>0,e.spacing=u,!n)l=m=>{const x=u(m);return m.size?ne(m.size)?((m.size[0]>m.size[1]?m.size[0]:m.size[1])+x)/2:(0,R.Z)(m.size)?((m.size.width>m.size.height?m.size.width:m.size.height)+x)/2:(m.size+x)/2:32+x/2};else if((0,xe.Z)(n))l=m=>{const x=n(m),Z=u(m);return ne(m.size)?((m.size[0]>m.size[1]?m.size[0]:m.size[1])+Z)/2:((x||32)+Z)/2};else if(ne(n)){const x=(n[0]>n[1]?n[0]:n[1])/2;l=Z=>x+u(Z)/2}else{const m=n/2;l=x=>m+u(x)/2}e.nodeSize=l;let f;return(0,on.Z)(a)?f=()=>a:ne(a)?f=()=>Math.max.apply(null,a):(0,xe.Z)(a)?f=a:f=()=>0,e.comboPadding=f,e}getInnerGraphs(t,e,n,i,a,l,u){const{nodeSize:f,comboPadding:m,spacing:x,innerLayout:Z}=l,V=Z||new ze({}),et={center:[0,0],preventOverlap:!0,nodeSpacing:x},dt=[],At=Dt=>{let Qt=(m==null?void 0:m(Dt))||10;return ne(Qt)&&(Qt=Math.max(...Qt)),{size:Qt?[Qt*2,Qt*2]:[30,30],padding:Qt}};return t.getRoots(e).forEach(Dt=>{u.set(Dt.id,{id:Dt.id,data:{nodes:[],size:At(Dt).size}});let Qt=Promise.resolve();Pr(t,[Dt],oe=>{var pe;if(!oe.data._isCombo)return;const{size:Be,padding:vn}=At(oe);if(!(!((pe=t.getChildren(oe.id,e))===null||pe===void 0)&&pe.length))u.set(oe.id,{id:oe.id,data:Object.assign(Object.assign({},oe.data),{size:Be})});else{const nn=u.get(oe.id);u.set(oe.id,{id:oe.id,data:Object.assign({nodes:[]},nn==null?void 0:nn.data)});const An=new Map,$e=t.getChildren(oe.id,e).map(fr=>{if(fr.data._isCombo)return u.has(fr.id)||u.set(fr.id,{id:fr.id,data:Object.assign({},fr.data)}),An.set(fr.id,!0),u.get(fr.id);const Vr=n.get(fr.id)||i.get(fr.id);return An.set(fr.id,!0),{id:fr.id,data:Object.assign(Object.assign({},Vr.data),fr.data)}}),zn={nodes:$e,edges:a.filter(fr=>An.has(fr.source)&&An.has(fr.target))};let cr=1/0;$e.forEach(fr=>{var Vr;let{size:Rr}=fr.data;Rr||(Rr=((Vr=u.get(fr.id))===null||Vr===void 0?void 0:Vr.data.size)||(f==null?void 0:f(fr))||[30,30]),(0,on.Z)(Rr)&&(Rr=[Rr,Rr]);const[Fr,Er]=Rr;cr>Fr&&(cr=Fr),cr>Er&&(cr=Er),fr.data.size=Rr}),Qt=Qt.then(()=>(0,ei.mG)(this,void 0,void 0,function*(){const fr=new $r.k(zn);yield sc(V,fr,et,!0);const{minX:Vr,minY:Rr,maxX:Fr,maxY:Er}=hr($e),Qr={x:(Fr+Vr)/2,y:(Er+Rr)/2};zn.nodes.forEach(er=>{er.data.x-=Qr.x,er.data.y-=Qr.y});const Ai=[Math.max(Fr-Vr,cr)+vn*2,Math.max(Er-Rr,cr)+vn*2];u.get(oe.id).data.size=Ai,u.get(oe.id).data.nodes=$e}))}return!0},"BT",e),dt.push(Qt)}),dt}}function sc(r,t,e,n){var i;return(0,ei.mG)(this,void 0,void 0,function*(){return nl(r)?(r.execute(t,e),r.stop(),r.tick((i=e.iterations)!==null&&i!==void 0?i:300)):n?yield r.assign(t,e):yield r.execute(t,e)})}var Lh=y(31136),Dh=y(84365),Ih=y(32575),Bh=y(33039),Fh=y(54774),_h=y(34123),tu=y(97468),eu=y(74515);class nu{constructor(t){this.id="d3-force",this.config={inputNodeAttrs:["x","y","vx","vy","fx","fy"],outputNodeAttrs:["x","y","vx","vy"],simulationAttrs:["alpha","alphaMin","alphaDecay","alphaTarget","velocityDecay","randomSource"]},this.forceMap={link:Lh.Z,manyBody:Dh.Z,center:Ih.Z,collide:Bh.Z,radial:Fh.Z,x:_h.Z,y:tu.Z},this.options={link:{id:e=>e.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},(0,h.Z)(this.options,t),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericLayout(!0,t,e)})}stop(){this.simulation.stop()}tick(t){return this.simulation.tick(t),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(t,e){const n=this.context.nodes.find(i=>i.id===t);n&&e.forEach((i,a)=>{if(typeof i=="number"||i===null){const l=["fx","fy","fz"][a];n[l]=i}})}getOptions(t){var e,n;const i=(0,h.Z)({},this.options,t);return i.collide&&((e=i.collide)===null||e===void 0?void 0:e.radius)===void 0&&(i.collide=i.collide||{},i.collide.radius=(n=i.nodeSize)!==null&&n!==void 0?n:10),i.iterations===void 0&&(i.link&&i.link.iterations===void 0&&(i.iterations=i.link.iterations),i.collide&&i.collide.iterations===void 0&&(i.iterations=i.collide.iterations)),this.context.options=i,i}genericLayout(t,e,n){var i;return(0,ei.mG)(this,void 0,void 0,function*(){const a=this.getOptions(n),l=e.getAllNodes().map(({id:x,data:Z})=>Object.assign(Object.assign({id:x},Z),(0,la.Z)(Z.data,this.config.inputNodeAttrs))),u=e.getAllEdges().map(x=>Object.assign({},x));Object.assign(this.context,{assign:t,nodes:l,edges:u,graph:e});const f=new Promise(x=>{this.resolver=x}),m=this.setSimulation(a);return m.nodes(l),(i=m.force("link"))===null||i===void 0||i.links(u),f})}getResult(){const{assign:t,nodes:e,edges:n,graph:i}=this.context,a=e.map(u=>({id:u.id,data:Object.assign(Object.assign({},u.data),(0,la.Z)(u,this.config.outputNodeAttrs))})),l=n.map(({id:u,source:f,target:m,data:x})=>({id:u,source:typeof f=="object"?f.id:f,target:typeof m=="object"?m.id:m,data:x}));return t&&a.forEach(u=>i.mergeNodeData(u.id,u.data)),{nodes:a,edges:l}}initSimulation(){return(0,eu.Z)()}setSimulation(t){const e=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=e.on("tick",()=>{var n;return(n=t.onTick)===null||n===void 0?void 0:n.call(t,this.getResult())}).on("end",()=>{var n;return(n=this.resolver)===null||n===void 0?void 0:n.call(this,this.getResult())})),oc(e,this.config.simulationAttrs.map(n=>[n,t[n]])),Object.entries(this.forceMap).forEach(([n,i])=>{const a=n;if(t[n]){let l=e.force(a);l||(l=i(),e.force(a,l)),oc(l,Object.entries(t[a]))}else e.force(a,null)}),e}}const oc=(r,t)=>t.reduce((e,[n,i])=>!e[n]||i===void 0?e:e[n].call(r,i),r);var il=y(92546),ru=y.n(il);class al{constructor(t){this.id="dagre",this.options={},Object.assign(this.options,al.defaultOptions,t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,Object.assign(Object.assign({},this.options),e))})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,Object.assign(Object.assign({},this.options),e))})}genericDagreLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const{nodeSize:i}=n,a=new il.graphlib.Graph;a.setGraph(n),a.setDefaultEdgeLabel(()=>({}));const l=e.getAllNodes(),u=e.getAllEdges();[...l,...u].some(({id:m})=>(0,on.Z)(m))&&console.error("Dagre layout only support string id, it will convert number to string."),e.getAllNodes().forEach(m=>{const{id:x}=m,Z=Object.assign({},m.data);if(i!==void 0){const[V,et]=ho((0,xe.Z)(i)?i(m):i);Object.assign(Z,{width:V,height:et})}a.setNode(x.toString(),Z)}),e.getAllEdges().forEach(({id:m,source:x,target:Z})=>{a.setEdge(x.toString(),Z.toString(),{id:m})}),ru().layout(a);const f={nodes:[],edges:[]};return a.nodes().forEach(m=>{const x=a.node(m);f.nodes.push({id:m,data:x}),t&&e.mergeNodeData(m,x)}),a.edges().forEach(m=>{const x=a.edge(m),{id:Z}=x,V=(0,ei._T)(x,["id"]),{v:et,w:dt}=m;f.edges.push({id:Z,source:et,target:dt,data:V}),t&&e.mergeEdgeData(Z,V)}),f})}}al.defaultOptions={};class Tl{constructor(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}distanceTo(t){const e=this.rx-t.rx,n=this.ry-t.ry;return Math.hypot(e,n)}setPos(t,e){this.rx=t,this.ry=e}resetForce(){this.fx=0,this.fy=0}addForce(t){const e=t.rx-this.rx,n=t.ry-this.ry;let i=Math.hypot(e,n);i=i<1e-4?1e-4:i;const a=this.g*(this.degree+1)*(t.degree+1)/i;this.fx+=a*e/i,this.fy+=a*n/i}in(t){return t.contains(this.rx,this.ry)}add(t){const e=this.mass+t.mass,n=(this.rx*this.mass+t.rx*t.mass)/e,i=(this.ry*this.mass+t.ry*t.mass)/e,a=this.degree+t.degree,l={rx:n,ry:i,mass:e,degree:a};return new Tl(l)}}class Is{constructor(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}getLength(){return this.length}contains(t,e){const n=this.length/2;return t<=this.xmid+n&&t>=this.xmid-n&&e<=this.ymid+n&&e>=this.ymid-n}NW(){const t=this.xmid-this.length/4,e=this.ymid+this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Is(i)}NE(){const t=this.xmid+this.length/4,e=this.ymid+this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Is(i)}SW(){const t=this.xmid-this.length/4,e=this.ymid-this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Is(i)}SE(){const t=this.xmid+this.length/4,e=this.ymid-this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Is(i)}}class fo{constructor(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,t!=null&&(this.quad=t)}insert(t){if(this.body==null){this.body=t;return}this._isExternal()?(this.quad&&(this.NW=new fo(this.quad.NW()),this.NE=new fo(this.quad.NE()),this.SW=new fo(this.quad.SW()),this.SE=new fo(this.quad.SE())),this._putBody(this.body),this._putBody(t),this.body=this.body.add(t)):(this.body=this.body.add(t),this._putBody(t))}_putBody(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))}_isExternal(){return this.NW==null&&this.NE==null&&this.SW==null&&this.SE==null}updateForce(t){if(!(this.body==null||t===this.body))if(this._isExternal())t.addForce(this.body);else{const e=this.quad?this.quad.getLength():0,n=this.body.distanceTo(t);e/n<this.theta?t.addForce(this.body):(this.NW&&this.NW.updateForce(t),this.NE&&this.NE.updateForce(t),this.SW&&this.SW.updateForce(t),this.SE&&this.SE.updateForce(t))}}}const vo={center:[0,0],width:300,height:300,kr:5,kg:1,mode:"normal",preventOverlap:!1,dissuadeHubs:!1,maxIteration:0,ks:.1,ksmax:10,tao:.1};class go{constructor(t={}){this.options=t,this.id="forceAtlas2",this.options=Object.assign(Object.assign({},vo),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericForceAtlas2Layout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericForceAtlas2Layout(!0,t,e)})}genericForceAtlas2Layout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=e.getAllEdges(),a=e.getAllNodes(),l=this.formatOptions(n,a.length),{width:u,height:f,prune:m,maxIteration:x,nodeSize:Z,center:V}=l;if(!(a!=null&&a.length)||a.length===1)return C(e,t,V);const et=a.map(Qt=>v(Qt,[u,f])),dt=i.filter(Qt=>{const{source:oe,target:pe}=Qt;return oe!==pe}),At=new $r.k({nodes:et,edges:dt}),Dt=this.getSizes(At,Z);if(this.run(At,e,x,Dt,t,l),m){for(let oe=0;oe<dt.length;oe+=1){const{source:pe,target:Be}=dt[oe],vn=At.getDegree(pe),nn=At.getDegree(pe);if(vn<=1){const An=At.getNode(Be);At.mergeNodeData(pe,{x:An.data.x,y:An.data.y})}else if(nn<=1){const An=At.getNode(pe);At.mergeNodeData(Be,{x:An.data.x,y:An.data.y})}}const Qt=Object.assign(Object.assign({},l),{prune:!1,barnesHut:!1});this.run(At,e,100,Dt,t,Qt)}return{nodes:et,edges:i}})}getSizes(t,e){const n=t.getAllNodes(),i={};for(let a=0;a<n.length;a+=1){const l=n[a];i[l.id]=ic(e,void 0)(l)}return i}formatOptions(t={},e){const n=Object.assign(Object.assign({},this.options),t),{center:i,width:a,height:l,barnesHut:u,prune:f,maxIteration:m,kr:x,kg:Z}=n;return n.width=!a&&typeof window!="undefined"?window.innerWidth:a,n.height=!l&&typeof window!="undefined"?window.innerHeight:l,n.center=i||[n.width/2,n.height/2],u===void 0&&e>250&&(n.barnesHut=!0),f===void 0&&e>100&&(n.prune=!0),m===0&&!f?(n.maxIteration=250,e<=200&&e>100?n.maxIteration=1e3:e>200&&(n.maxIteration=1200)):m===0&&f&&(n.maxIteration=100,e<=200&&e>100?n.maxIteration=500:e>200&&(n.maxIteration=950)),x||(n.kr=50,e>100&&e<=500?n.kr=20:e>500&&(n.kr=1)),Z||(n.kg=20,e>100&&e<=500?n.kg=10:e>500&&(n.kg=1)),n}run(t,e,n,i,a,l){const{kr:u,barnesHut:f,onTick:m}=l,x=t.getAllNodes();let Z=0,V=n;const et={},dt={},At={};for(let Dt=0;Dt<x.length;Dt+=1){const{data:Qt,id:oe}=x[Dt];if(et[oe]=[0,0],f){const pe={id:Dt,rx:Qt.x,ry:Qt.y,mass:1,g:u,degree:t.getDegree(oe)};At[oe]=new Tl(pe)}}for(;V>0;)Z=this.oneStep(t,{iter:V,preventOverlapIters:50,krPrime:100,sg:Z,forces:et,preForces:dt,bodies:At,sizes:i},l),V--,m==null||m({nodes:x,edges:e.getAllEdges()});return t}oneStep(t,e,n){const{iter:i,preventOverlapIters:a,krPrime:l,sg:u,preForces:f,bodies:m,sizes:x}=e;let{forces:Z}=e;const{preventOverlap:V,barnesHut:et}=n,dt=t.getAllNodes();for(let At=0;At<dt.length;At+=1){const{id:Dt}=dt[At];f[Dt]=[...Z[Dt]],Z[Dt]=[0,0]}return Z=this.getAttrForces(t,i,a,x,Z,n),et&&(V&&i>a||!V)?Z=this.getOptRepGraForces(t,Z,m,n):Z=this.getRepGraForces(t,i,a,Z,l,x,n),this.updatePos(t,Z,f,u,n)}getAttrForces(t,e,n,i,a,l){const{preventOverlap:u,dissuadeHubs:f,mode:m,prune:x}=l,Z=t.getAllEdges();for(let V=0;V<Z.length;V+=1){const{source:et,target:dt}=Z[V],At=t.getNode(et),Dt=t.getNode(dt),Qt=t.getDegree(et),oe=t.getDegree(dt);if(x&&(Qt<=1||oe<=1))continue;const pe=[Dt.data.x-At.data.x,Dt.data.y-At.data.y];let Be=Math.hypot(pe[0],pe[1]);Be=Be<1e-4?1e-4:Be,pe[0]=pe[0]/Be,pe[1]=pe[1]/Be,u&&e<n&&(Be=Be-i[et]-i[dt]);let vn=Be,nn=vn;m==="linlog"&&(vn=Math.log(1+Be),nn=vn),f&&(vn=Be/Qt,nn=Be/oe),u&&e<n&&Be<=0?(vn=0,nn=0):u&&e<n&&Be>0&&(vn=Be,nn=Be),a[et][0]+=vn*pe[0],a[dt][0]-=nn*pe[0],a[et][1]+=vn*pe[1],a[dt][1]-=nn*pe[1]}return a}getOptRepGraForces(t,e,n,i){const{kg:a,center:l,prune:u}=i,f=t.getAllNodes(),m=f.length;let x=9e10,Z=-9e10,V=9e10,et=-9e10;for(let oe=0;oe<m;oe+=1){const{id:pe,data:Be}=f[oe];u&&t.getDegree(pe)<=1||(n[pe].setPos(Be.x,Be.y),Be.x>=Z&&(Z=Be.x),Be.x<=x&&(x=Be.x),Be.y>=et&&(et=Be.y),Be.y<=V&&(V=Be.y))}const dt=Math.max(Z-x,et-V),At={xmid:(Z+x)/2,ymid:(et+V)/2,length:dt,massCenter:l,mass:m},Dt=new Is(At),Qt=new fo(Dt);for(let oe=0;oe<m;oe+=1){const{id:pe}=f[oe];u&&t.getDegree(pe)<=1||n[pe].in(Dt)&&Qt.insert(n[pe])}for(let oe=0;oe<m;oe+=1){const{id:pe,data:Be}=f[oe],vn=t.getDegree(pe);if(u&&vn<=1)continue;n[pe].resetForce(),Qt.updateForce(n[pe]),e[pe][0]-=n[pe].fx,e[pe][1]-=n[pe].fy;const nn=[Be.x-l[0],Be.y-l[1]];let An=Math.hypot(nn[0],nn[1]);An=An<1e-4?1e-4:An,nn[0]=nn[0]/An,nn[1]=nn[1]/An;const $e=a*(vn+1);e[pe][0]-=$e*nn[0],e[pe][1]-=$e*nn[1]}return e}getRepGraForces(t,e,n,i,a,l,u){const{preventOverlap:f,kr:m,kg:x,center:Z,prune:V}=u,et=t.getAllNodes(),dt=et.length;for(let At=0;At<dt;At+=1){const Dt=et[At],Qt=t.getDegree(Dt.id);for(let vn=At+1;vn<dt;vn+=1){const nn=et[vn],An=t.getDegree(nn.id);if(V&&(Qt<=1||An<=1))continue;const $e=[nn.data.x-Dt.data.x,nn.data.y-Dt.data.y];let zn=Math.hypot($e[0],$e[1]);zn=zn<1e-4?1e-4:zn,$e[0]=$e[0]/zn,$e[1]=$e[1]/zn,f&&e<n&&(zn=zn-l[Dt.id]-l[nn.id]);let cr=m*(Qt+1)*(An+1)/zn;f&&e<n&&zn<0?cr=a*(Qt+1)*(An+1):f&&e<n&&zn===0?cr=0:f&&e<n&&zn>0&&(cr=m*(Qt+1)*(An+1)/zn),i[Dt.id][0]-=cr*$e[0],i[nn.id][0]+=cr*$e[0],i[Dt.id][1]-=cr*$e[1],i[nn.id][1]+=cr*$e[1]}const oe=[Dt.data.x-Z[0],Dt.data.y-Z[1]],pe=Math.hypot(oe[0],oe[1]);oe[0]=oe[0]/pe,oe[1]=oe[1]/pe;const Be=x*(Qt+1);i[Dt.id][0]-=Be*oe[0],i[Dt.id][1]-=Be*oe[1]}return i}updatePos(t,e,n,i,a){const{ks:l,tao:u,prune:f,ksmax:m}=a,x=t.getAllNodes(),Z=x.length,V=[],et=[];let dt=0,At=0,Dt=i;for(let oe=0;oe<Z;oe+=1){const{id:pe}=x[oe],Be=t.getDegree(pe);if(f&&Be<=1)continue;const vn=[e[pe][0]-n[pe][0],e[pe][1]-n[pe][1]],nn=Math.hypot(vn[0],vn[1]),An=[e[pe][0]+n[pe][0],e[pe][1]+n[pe][1]],$e=Math.hypot(An[0],An[1]);V[oe]=nn,et[oe]=$e/2,dt+=(Be+1)*V[oe],At+=(Be+1)*et[oe]}const Qt=Dt;Dt=u*At/dt,Qt!==0&&(Dt=Dt>1.5*Qt?1.5*Qt:Dt);for(let oe=0;oe<Z;oe+=1){const{id:pe,data:Be}=x[oe],vn=t.getDegree(pe);if(f&&vn<=1||(0,on.Z)(Be.fx)&&(0,on.Z)(Be.fy))continue;let nn=l*Dt/(1+Dt*Math.sqrt(V[oe])),An=Math.hypot(e[pe][0],e[pe][1]);An=An<1e-4?1e-4:An;const $e=m/An;nn=nn>$e?$e:nn;const zn=nn*e[pe][0],cr=nn*e[pe][1];t.mergeNodeData(pe,{x:Be.x+zn,y:Be.y+cr})}return Dt}}const Zh={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},zh=800;class jh{constructor(t={}){this.options=t,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},Zh),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;n<t;n++)this.runOneStep(this.lastGraph,this.lastClusterMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericFruchtermanLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){if(this.running)return;const i=this.formatOptions(n),{dimensions:a,width:l,height:u,center:f,clustering:m,nodeClusterBy:x,maxIteration:Z,onTick:V}=i,et=e.getAllNodes(),dt=e.getAllEdges();if(!(et!=null&&et.length)){const pe={nodes:[],edges:dt};return this.lastResult=pe,pe}if(et.length===1){t&&e.mergeNodeData(et[0].id,{x:f[0],y:f[1],z:a===3?f[2]:void 0});const pe={nodes:[Object.assign(Object.assign({},et[0]),{data:Object.assign(Object.assign({},et[0].data),{x:f[0],y:f[1],z:a===3?f[2]:void 0})})],edges:dt};return this.lastResult=pe,pe}const At=et.map(pe=>v(pe,[l,u])),Dt=new $r.k({nodes:At,edges:dt}),Qt={};if(m&&At.forEach(pe=>{const Be=pe.data[x];Qt[Be]||(Qt[Be]={name:Be,cx:0,cy:0,count:0})}),this.lastLayoutNodes=At,this.lastLayoutEdges=dt,this.lastAssign=t,this.lastGraph=Dt,this.lastOptions=i,this.lastClusterMap=Qt,typeof window=="undefined")return;let oe=0;return new Promise(pe=>{this.timeInterval=window.setInterval(()=>{if(!this.running){pe({nodes:At,edges:dt});return}this.runOneStep(Dt,Qt,i),t&&At.forEach(({id:Be,data:vn})=>e.mergeNodeData(Be,{x:vn.x,y:vn.y,z:a===3?vn.z:void 0})),V==null||V({nodes:At,edges:dt}),oe++,oe>=Z&&(window.clearInterval(this.timeInterval),pe({nodes:At,edges:dt}))},0),this.running=!0})})}formatOptions(t={}){const e=Object.assign(Object.assign({},this.options),t),{clustering:n,nodeClusterBy:i}=e,{center:a,width:l,height:u}=e;return e.width=!l&&typeof window!="undefined"?window.innerWidth:l,e.height=!u&&typeof window!="undefined"?window.innerHeight:u,e.center=a||[e.width/2,e.height/2],e.clustering=n&&!!i,e}runOneStep(t,e,n){const{dimensions:i,height:a,width:l,gravity:u,center:f,speed:m,clustering:x,nodeClusterBy:Z,clusterGravity:V}=n,et=a*l,dt=Math.sqrt(et)/10,At=t.getAllNodes(),Dt=et/(At.length+1),Qt=Math.sqrt(Dt),oe={};if(this.applyCalculate(t,oe,Qt,Dt),x){for(const Be in e)e[Be].cx=0,e[Be].cy=0,e[Be].count=0;At.forEach(Be=>{const{data:vn}=Be,nn=e[vn[Z]];(0,on.Z)(vn.x)&&(nn.cx+=vn.x),(0,on.Z)(vn.y)&&(nn.cy+=vn.y),nn.count++});for(const Be in e)e[Be].cx/=e[Be].count,e[Be].cy/=e[Be].count;const pe=V||u;At.forEach((Be,vn)=>{const{id:nn,data:An}=Be;if(!(0,on.Z)(An.x)||!(0,on.Z)(An.y))return;const $e=e[An[Z]],zn=Math.sqrt((An.x-$e.cx)*(An.x-$e.cx)+(An.y-$e.cy)*(An.y-$e.cy)),cr=Qt*pe;oe[nn].x-=cr*(An.x-$e.cx)/zn,oe[nn].y-=cr*(An.y-$e.cy)/zn})}At.forEach((pe,Be)=>{const{id:vn,data:nn}=pe;if(!(0,on.Z)(nn.x)||!(0,on.Z)(nn.y))return;const An=.01*Qt*u;oe[vn].x-=An*(nn.x-f[0]),oe[vn].y-=An*(nn.y-f[1]),i===3&&(oe[vn].z-=An*(nn.z-f[2]))}),At.forEach((pe,Be)=>{const{id:vn,data:nn}=pe;if((0,on.Z)(nn.fx)&&(0,on.Z)(nn.fy)){nn.x=nn.fx,nn.y=nn.fy,i===3&&(nn.z=nn.fz);return}if(!(0,on.Z)(nn.x)||!(0,on.Z)(nn.y))return;const An=Math.sqrt(oe[vn].x*oe[vn].x+oe[vn].y*oe[vn].y+(i===3?oe[vn].z*oe[vn].z:0));if(An>0){const $e=Math.min(dt*(m/zh),An);t.mergeNodeData(vn,{x:nn.x+oe[vn].x/An*$e,y:nn.y+oe[vn].y/An*$e,z:i===3?nn.z+oe[vn].z/An*$e:void 0})}})}applyCalculate(t,e,n,i){this.calRepulsive(t,e,i),this.calAttractive(t,e,n)}calRepulsive(t,e,n){const i=t.getAllNodes();i.forEach(({data:a,id:l},u)=>{e[l]={x:0,y:0,z:0},i.forEach(({data:f,id:m},x)=>{if(u<=x||!(0,on.Z)(a.x)||!(0,on.Z)(f.x)||!(0,on.Z)(a.y)||!(0,on.Z)(f.y))return;let Z=a.x-f.x,V=a.y-f.y,et=this.options.dimensions===3?a.z-f.z:0,dt=Z*Z+V*V+et*et;dt===0&&(dt=1,Z=.01,V=.01,et=.01);const At=n/dt,Dt=Z*At,Qt=V*At,oe=et*At;e[l].x+=Dt,e[l].y+=Qt,e[m].x-=Dt,e[m].y-=Qt,this.options.dimensions===3&&(e[l].z+=oe,e[m].z-=oe)})})}calAttractive(t,e,n){t.getAllEdges().forEach(a=>{const{source:l,target:u}=a;if(!l||!u||l===u)return;const{data:f}=t.getNode(l),{data:m}=t.getNode(u);if(!(0,on.Z)(m.x)||!(0,on.Z)(f.x)||!(0,on.Z)(m.y)||!(0,on.Z)(f.y))return;const x=m.x-f.x,Z=m.y-f.y,V=this.options.dimensions===3?m.z-f.z:0,et=Math.sqrt(x*x+Z*Z+V*V)/n,dt=x*et,At=Z*et,Dt=V*et;e[l].x+=dt,e[l].y+=At,e[u].x-=dt,e[u].y-=At,this.options.dimensions===3&&(e[l].z+=Dt,e[u].z-=Dt)})}}const Wh={begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30,width:300,height:300};class cf{constructor(t={}){this.options=t,this.id="grid",this.options=Object.assign(Object.assign({},Wh),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,t,e)})}genericGridLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{begin:a=[0,0],condense:l,preventOverlapPadding:u,preventOverlap:f,rows:m,cols:x,nodeSpacing:Z,nodeSize:V,width:et,height:dt,position:At}=i;let{sortBy:Dt}=i;const Qt=e.getAllNodes(),oe=e.getAllEdges(),pe=Qt==null?void 0:Qt.length;if(!pe||pe===1)return C(e,t,a);const Be=Qt.map(Er=>v(Er));Dt!=="id"&&(!(0,ta.Z)(Dt)||Be[0].data[Dt]===void 0)&&(Dt="degree"),Dt==="degree"?Be.sort((Er,Qr)=>e.getDegree(Qr.id,"both")-e.getDegree(Er.id,"both")):Dt==="id"?Be.sort((Er,Qr)=>(0,on.Z)(Qr.id)&&(0,on.Z)(Er.id)?Qr.id-Er.id:`${Er.id}`.localeCompare(`${Qr.id}`)):Be.sort((Er,Qr)=>Qr.data[Dt]-Er.data[Dt]);const vn=!et&&typeof window!="undefined"?window.innerWidth:et,nn=!dt&&typeof window!="undefined"?window.innerHeight:dt,An=pe,$e={rows:m,cols:x};if(m!=null&&x!=null)$e.rows=m,$e.cols=x;else if(m!=null&&x==null)$e.rows=m,$e.cols=Math.ceil(An/$e.rows);else if(m==null&&x!=null)$e.cols=x,$e.rows=Math.ceil(An/$e.cols);else{const Er=Math.sqrt(An*nn/vn);$e.rows=Math.round(Er),$e.cols=Math.round(vn/nn*Er)}if($e.rows=Math.max($e.rows,1),$e.cols=Math.max($e.cols,1),$e.cols*$e.rows>An){const Er=iu($e),Qr=au($e);(Er-1)*Qr>=An?iu($e,Er-1):(Qr-1)*Er>=An&&au($e,Qr-1)}else for(;$e.cols*$e.rows<An;){const Er=iu($e),Qr=au($e);(Qr+1)*Er>=An?au($e,Qr+1):iu($e,Er+1)}let zn=l?0:vn/$e.cols,cr=l?0:nn/$e.rows;if(f||Z){const Er=Js(10,Z),Qr=el(30,V,!1);Be.forEach(Ai=>{(!Ai.data.x||!Ai.data.y)&&(Ai.data.x=0,Ai.data.y=0);const er=e.getNode(Ai.id),[Kr,hi]=ho(Qr(er)||30),vi=Er!==void 0?Er(Ai):u,Bi=Kr+vi,aa=hi+vi;zn=Math.max(zn,Bi),cr=Math.max(cr,aa)})}const fr={},Vr={row:0,col:0},Rr={};for(let Er=0;Er<Be.length;Er++){const Qr=Be[Er];let Ai;if(At&&(Ai=At(e.getNode(Qr.id))),Ai&&(Ai.row!==void 0||Ai.col!==void 0)){const er={row:Ai.row,col:Ai.col};if(er.col===void 0)for(er.col=0;Gh(fr,er);)er.col++;else if(er.row===void 0)for(er.row=0;Gh(fr,er);)er.row++;Rr[Qr.id]=er,dd(fr,er)}uf(Qr,a,zn,cr,Rr,$e,Vr,fr)}const Fr={nodes:Be,edges:oe};return t&&Be.forEach(Er=>{e.mergeNodeData(Er.id,{x:Er.data.x,y:Er.data.y})}),Fr})}}const iu=(r,t)=>{let e;const n=r.rows||5,i=r.cols||5;return t==null?e=Math.min(n,i):Math.min(n,i)===r.rows?r.rows=t:r.cols=t,e},au=(r,t)=>{let e;const n=r.rows||5,i=r.cols||5;return t==null?e=Math.max(n,i):Math.max(n,i)===r.rows?r.rows=t:r.cols=t,e},Gh=(r,t)=>r[`c-${t.row}-${t.col}`]||!1,dd=(r,t)=>r[`c-${t.row}-${t.col}`]=!0,fd=(r,t)=>{const e=r.cols||5;t.col++,t.col>=e&&(t.col=0,t.row++)},uf=(r,t,e,n,i,a,l,u)=>{let f,m;const x=i[r.id];if(x)f=x.col*e+e/2+t[0],m=x.row*n+n/2+t[1];else{for(;Gh(u,l);)fd(a,l);f=l.col*e+e/2+t[0],m=l.row*n+n/2+t[1],dd(u,l),fd(a,l)}r.data.x=f,r.data.y=m},hf=(r,t,e)=>{try{const n=ar.y3.mul(ar.y3.pow(t,2),-.5),i=n.mean("row"),a=n.mean("column"),l=n.mean();n.add(l).subRowVector(i).subColumnVector(a);const u=new ar.Sc(n),f=ar.y3.sqrt(u.diagonalMatrix).diagonal();return u.leftSingularVectors.toJSON().map(m=>ar.y3.mul([m],[f]).toJSON()[0].splice(0,r))}catch(n){const i=[];for(let a=0;a<t.length;a++){const l=Math.random()*e,u=Math.random()*e;i.push([l,u])}return i}},df=800,ff={iterations:10,height:10,width:10,speed:100,gravity:10,k:5},vf=(r,t)=>{const e=Object.assign(Object.assign({},ff),t),{positions:n,iterations:i,width:a,k:l,speed:u=100,strictRadial:f,focusIdx:m,radii:x=[],nodeSizeFunc:Z}=e,V=r.getAllNodes(),et=[],dt=a/10;for(let At=0;At<i;At++)n.forEach((Dt,Qt)=>{et[Qt]={x:0,y:0}}),gf(V,n,et,l,x,Z),pf(n,et,u,f,m,dt,a,x);return n},gf=(r,t,e,n,i,a)=>{t.forEach((l,u)=>{e[u]={x:0,y:0},t.forEach((f,m)=>{if(u===m||i[u]!==i[m])return;let x=l.x-f.x,Z=l.y-f.y,V=Math.sqrt(x*x+Z*Z);if(V===0){V=1;const et=u>m?1:-1;x=.01*et,Z=.01*et}if(V<a(r[u])/2+a(r[m])/2){const et=n*n/V;e[u].x+=x/V*et,e[u].y+=Z/V*et}})})},pf=(r,t,e,n,i,a,l,u)=>{const f=a||l/10;return n&&t.forEach((m,x)=>{const Z=r[x].x-r[i].x,V=r[x].y-r[i].y,et=Math.sqrt(Z*Z+V*V);let dt=V/et,At=-Z/et;const Dt=Math.sqrt(m.x*m.x+m.y*m.y);let Qt=Math.acos((dt*m.x+At*m.y)/Dt);Qt>Math.PI/2&&(Qt-=Math.PI/2,dt*=-1,At*=-1);const oe=Math.cos(Qt)*Dt;m.x=dt*oe,m.y=At*oe}),r.forEach((m,x)=>{if(x===i)return;const Z=Math.sqrt(t[x].x*t[x].x+t[x].y*t[x].y);if(Z>0&&x!==i){const V=Math.min(f*(e/df),Z);if(m.x+=t[x].x/Z*V,m.y+=t[x].y/Z*V,n){let et=m.x-r[i].x,dt=m.y-r[i].y;const At=Math.sqrt(et*et+dt*dt);et=et/At*u[x],dt=dt/At*u[x],m.x=r[i].x+et,m.y=r[i].y+dt}}}),r},mf={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class yf{constructor(t={}){this.options=t,this.id="radial",this.options=Object.assign(Object.assign({},mf),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,t,e)})}genericRadialLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:l,center:u,focusNode:f,unitRadius:m,nodeSize:x,nodeSpacing:Z,strictRadial:V,preventOverlap:et,maxPreventOverlapIteration:dt,sortBy:At,linkDistance:Dt=50,sortStrength:Qt=10,maxIteration:oe=1e3}=i,pe=e.getAllNodes(),Be=e.getAllEdges(),vn=!a&&typeof window!="undefined"?window.innerWidth:a,nn=!l&&typeof window!="undefined"?window.innerHeight:l,An=u||[vn/2,nn/2];if(!(pe!=null&&pe.length)||pe.length===1)return C(e,t,An);let $e=pe[0];if((0,ta.Z)(f)){for(let ji=0;ji<pe.length;ji++)if(pe[ji].id===f){$e=pe[ji];break}}else $e=f||pe[0];const zn=xf(pe,$e.id),cr=zr({nodes:pe,edges:Be},!1),fr=Ir(cr),Vr=Mf(fr,zn);wf(fr,zn,Vr+1);const Rr=fr[zn];let Fr=vn-An[0]>An[0]?An[0]:vn-An[0],Er=nn-An[1]>An[1]?An[1]:nn-An[1];Fr===0&&(Fr=vn/2),Er===0&&(Er=nn/2);const Qr=Math.min(Fr,Er),Ai=Math.max(...Rr),er=[],Kr=m||Qr/Ai;Rr.forEach((ji,Es)=>{er[Es]=ji*Kr});const hi=bf(pe,fr,Dt,er,Kr,At,Qt),vi=Ef(hi),Bi=hf(Dt,hi,Dt);let aa=Bi.map(([ji,Es])=>({x:(isNaN(ji)?Math.random()*Dt:ji)-Bi[zn][0],y:(isNaN(Es)?Math.random()*Dt:Es)-Bi[zn][1]}));this.run(oe,aa,vi,hi,er,zn);let gi;if(et){gi=ic(x,Z);const ji={nodes:pe,nodeSizeFunc:gi,positions:aa,radii:er,height:nn,width:vn,strictRadial:!!V,focusIdx:zn,iterations:dt||200,k:aa.length/4.5};aa=vf(e,ji)}const Vi=[];return aa.forEach((ji,Es)=>{const po=v(pe[Es]);po.data.x=ji.x+An[0],po.data.y=ji.y+An[1],Vi.push(po)}),t&&Vi.forEach(ji=>e.mergeNodeData(ji.id,{x:ji.data.x,y:ji.data.y})),{nodes:Vi,edges:Be}})}run(t,e,n,i,a,l){for(let u=0;u<=t;u++){const f=u/t;this.oneIteration(f,e,a,i,n,l)}}oneIteration(t,e,n,i,a,l){const u=1-t;e.forEach((f,m)=>{const x=kr(f,{x:0,y:0}),Z=x===0?0:1/x;if(m===l)return;let V=0,et=0,dt=0;e.forEach((Dt,Qt)=>{if(m===Qt)return;const oe=kr(f,Dt),pe=oe===0?0:1/oe,Be=i[Qt][m];dt+=a[m][Qt],V+=a[m][Qt]*(Dt.x+Be*(f.x-Dt.x)*pe),et+=a[m][Qt]*(Dt.y+Be*(f.y-Dt.y)*pe)});const At=n[m]===0?0:1/n[m];dt*=u,dt+=t*At*At,V*=u,V+=t*At*f.x*Z,f.x=V/dt,et*=u,et+=t*At*f.y*Z,f.y=et/dt})}}const bf=(r,t,e,n,i,a,l)=>{if(!r)return[];const u=[];if(t){const f={};t.forEach((m,x)=>{const Z=[];m.forEach((V,et)=>{var dt,At;if(x===et)Z.push(0);else if(n[x]===n[et])if(a==="data")Z.push(V*(Math.abs(x-et)*l)/(n[x]/i));else if(a){let Dt,Qt;if(f[r[x].id])Dt=f[r[x].id];else{const oe=(a==="id"?r[x].id:(dt=r[x].data)===null||dt===void 0?void 0:dt[a])||0;(0,ta.Z)(oe)?Dt=oe.charCodeAt(0):Dt=oe,f[r[x].id]=Dt}if(f[r[et].id])Qt=f[r[et].id];else{const oe=(a==="id"?r[et].id:(At=r[et].data)===null||At===void 0?void 0:At[a])||0;(0,ta.Z)(oe)?Qt=oe.charCodeAt(0):Qt=oe,f[r[et].id]=Qt}Z.push(V*(Math.abs(Dt-Qt)*l)/(n[x]/i))}else Z.push(V*e/(n[x]/i));else{const Dt=(e+i)/2;Z.push(V*Dt)}}),u.push(Z)})}return u},Ef=r=>{const t=r.length,e=r[0].length,n=[];for(let i=0;i<t;i++){const a=[];for(let l=0;l<e;l++)r[i][l]!==0?a.push(1/(r[i][l]*r[i][l])):a.push(0);n.push(a)}return n},xf=(r,t)=>{let e=-1;return r.forEach((n,i)=>{n.id===t&&(e=i)}),Math.max(e,0)},wf=(r,t,e)=>{const n=r.length;for(let i=0;i<n;i++)if(r[t][i]===1/0){r[t][i]=e,r[i][t]=e;for(let a=0;a<n;a++)r[i][a]!==1/0&&r[t][a]===1/0&&(r[t][a]=e+r[i][a],r[a][t]=e+r[i][a])}for(let i=0;i<n;i++)if(i!==t){for(let a=0;a<n;a++)if(r[i][a]===1/0){let l=Math.abs(r[t][i]-r[t][a]);l=l===0?1:l,r[i][a]=l}}},Mf=(r,t)=>{let e=0;for(let n=0;n<r[t].length;n++)r[t][n]!==1/0&&(e=r[t][n]>e?r[t][n]:e);return e},Sf={center:[0,0],width:300,height:300};class Af{constructor(t={}){this.options=t,this.id="random",this.options=Object.assign(Object.assign({},Sf),t)}execute(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,t,e)})}assign(t,e){return(0,ei.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,t,e)})}genericRandomLayout(t,e,n){return(0,ei.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:l,height:u}=i,f=e.getAllNodes(),m=.9,x=!l&&typeof window!="undefined"?window.innerWidth:l,Z=!u&&typeof window!="undefined"?window.innerHeight:u,V=a||[x/2,Z/2],et=[];return f&&f.forEach(At=>{et.push({id:At.id,data:{x:(Math.random()-.5)*m*x+V[0],y:(Math.random()-.5)*m*Z+V[1]}})}),t&&et.forEach(At=>e.mergeNodeData(At.id,{x:At.data.x,y:At.data.y})),{nodes:et,edges:e.getAllEdges()}})}}var vd=y(40455),Of=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class su extends ra{constructor(){super(...arguments),this.id="fishbone"}getRoot(){const t=this.context.model.getRootsData();if(!((0,Ii.Z)(t)||t.length>2))return t[0]}formatSize(t){const e=typeof t=="function"?t:()=>t;return n=>ea(e(n))}doLayout(t,e){const{hGap:n,getRibSep:i,vGap:a,nodeSize:l,height:u}=e,{model:f}=this.context,m=this.formatSize(l);let x=m(t)[0]+i(t);const Z=(pe,Be=0)=>{var vn;return Be+=n*((pe.children||[]).length+1),(vn=pe.children)===null||vn===void 0||vn.forEach(nn=>{var An;(An=f.getNodeLikeDatum(nn).children)===null||An===void 0||An.forEach(zn=>{const cr=f.getNodeLikeDatum(zn);Be=Z(cr,Be)})}),Be},V=pe=>{if(pe.depth===1)return x;const Be=f.getParentData(pe.id,"tree");if(Cl(pe)){const vn=f.getParentData(Be.id,"tree"),nn=At(pe)-At(vn);return V(Be)+nn*n/a}else{const vn=(Be.children||[]).indexOf(pe.id),nn=f.getNodeData((Be.children||[]).slice(vn));return et(Be)-nn.reduce((An,$e)=>An+Z($e),0)-m(Be)[0]/2}},et=(0,vd.Z)(pe=>{if(Uh(pe))return m(pe)[0]/2;const Be=f.getParentData(pe.id,"tree");if(Cl(pe))return V(pe)+Z(pe)+m(pe)[0]/2;{const vn=At(pe)-At(Be),nn=n/a;return V(pe)+vn*nn}},pe=>pe.id),dt=pe=>At(f.getParentData(pe,"tree")),At=(0,vd.Z)(pe=>{if(Uh(pe))return u/2;if(Cl(pe)){const Be=f.getParentData(pe.id,"tree"),vn=Be.children.indexOf(pe.id);if(vn===0)return dt(Be.id)+a;const nn=f.getNodeLikeDatum(Be.children[vn-1]);if((0,Ii.Z)(nn.children))return At(nn)+a;const An=f.getDescendantsData(nn.id);return Math.max(...An.map($e=>Cl($e)?dt($e.id):At($e)))+a}else{if((0,Ii.Z)(pe.children))return dt(pe.id)+a;const Be=f.getNodeLikeDatum(pe.children.slice(-1)[0]);if((0,Ii.Z)(Be.children))return At(Be)+a;const vn=f.getDescendantsData(pe.id).slice(-1)[0];return(Cl(vn)?dt(vn.id):At(vn))+a}},pe=>pe.id);let Dt=0;const Qt={nodes:[],edges:[]},oe=pe=>{var Be;(Be=pe.children)===null||Be===void 0||Be.forEach(zn=>oe(f.getNodeLikeDatum(zn)));const vn=At(pe),nn=et(pe);if(Qt.nodes.push({id:pe.id,x:nn,y:vn}),Uh(pe))return;const An=f.getRelatedEdgesData(pe.id,"in")[0],$e=[V(pe),Cl(pe)?vn:dt(pe.id)];Qt.edges.push({id:ye(An),controlPoints:[$e],relatedNodeId:pe.id}),Dt=Math.max(Dt,nn+i(pe)),pe.depth===1&&(x=Dt)};return oe(t),Qt}placeAlterative(t,e){const n=(e.children||[]).filter((u,f)=>f%2!==0);if(n.length===0)return t;const{model:i}=this.context,a=t.nodes.find(u=>u.id===e.id).y,l=u=>{const f=i.getAncestorsData(u,"tree");if((0,Ii.Z)(f))return!1;const m=f.length===1?u:f[f.length-2].id;return n.includes(m)};t.nodes.forEach(u=>{l(u.id)&&(u.y=2*a-u.y)}),t.edges.forEach(u=>{l(u.relatedNodeId)&&(u.controlPoints=u.controlPoints.map(f=>[f[0],2*a-f[1]]))})}rightToLeft(t,e){return t.nodes.forEach(n=>n.x=e.width-n.x),t.edges.forEach(n=>{n.controlPoints=n.controlPoints.map(i=>[e.width-i[0],i[1]])}),t}execute(t,e){return Of(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign({},su.defaultOptions),this.options),e),{direction:i,nodeSize:a}=n,l=this.getRoot();if(!l)return t;const u=this.formatSize(a);n.vGap||(n.vGap=Math.max(...(t.nodes||[]).map(V=>u(V)[1]))),n.hGap||(n.hGap=Math.max(...(t.nodes||[]).map(V=>u(V)[0])));let f=this.doLayout(l,n);this.placeAlterative(f,l),i==="RL"&&(f=this.rightToLeft(f,n));const{model:m}=this.context,x=[],Z=[];return f.nodes.forEach(V=>{const{id:et,x:dt,y:At}=V,Dt=m.getNodeLikeDatum(et);x.push(gd(Dt,{x:dt,y:At}))}),f.edges.forEach(V=>{const{id:et,controlPoints:dt}=V,At=m.getEdgeDatum(et);Z.push(gd(At,{controlPoints:dt}))}),{nodes:x,edges:Z}})}}su.defaultOptions={direction:"RL",getRibSep:()=>60};const gd=(r,t)=>Object.assign(Object.assign({},r),{style:Object.assign(Object.assign({},r.style||{}),t)}),Uh=r=>r.depth===0,Cl=r=>(r.depth||(r.depth=0))%2===0;var Tf=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class ou extends ra{constructor(){super(...arguments),this.id="snake"}formatSize(t,e){const n=typeof e=="function"?e:()=>e;return t.reduce((i,a)=>{const[l,u]=ea(n(a))||[0,0];return[Math.max(i[0],l),Math.max(i[1],u)]},[0,0])}validate(t){const{nodes:e=[],edges:n=[]}=t,i={},a={},l={};e.forEach(V=>{i[V.id]=0,a[V.id]=0,l[V.id]=[]}),n.forEach(V=>{i[V.target]++,a[V.source]++,l[V.source].push(V.target)});const u=new Set,f=V=>{u.has(V)||(u.add(V),l[V].forEach(f))};if(f(e[0].id),u.size!==e.length)return!1;const m=e.filter(V=>i[V.id]===0),x=e.filter(V=>a[V.id]===0);return!(m.length!==1||x.length!==1||e.filter(V=>i[V.id]===1&&a[V.id]===1).length!==e.length-2)}execute(t,e){return Tf(this,void 0,void 0,function*(){var n;if(!this.validate(t))return t;const{nodeSize:i,padding:a,sortBy:l,cols:u,colGap:f,rowGap:m,clockwise:x,width:Z,height:V}=Object.assign({},ou.defaultOptions,this.options,e),[et,dt,At,Dt]=Ne(a),Qt=this.formatSize(t.nodes||[],i),oe=Math.ceil((t.nodes||[]).length/u);let pe=f||(Z-Dt-dt-u*Qt[0])/(u-1),Be=m||(V-et-At-oe*Qt[1])/(oe-1);return(Be===1/0||Be<0)&&(Be=0),(pe===1/0||pe<0)&&(pe=0),{nodes:((l?(n=t.nodes)===null||n===void 0?void 0:n.sort(l):Cf(t))||[]).map((An,$e)=>{const zn=Math.floor($e/u),cr=$e%u,fr=x?zn%2===0?cr:u-1-cr:zn%2===0?u-1-cr:cr,Vr=Dt+fr*(Qt[0]+pe)+Qt[0]/2,Rr=et+zn*(Qt[1]+Be)+Qt[1]/2;return{id:An.id,style:{x:Vr,y:Rr}}})}})}}ou.defaultOptions={padding:0,cols:5,clockwise:!0};function Cf(r){const{nodes:t=[],edges:e=[]}=r,n={},i={};t.forEach(u=>{n[u.id]=0,i[u.id]=[]}),e.forEach(u=>{n[u.target]++,i[u.source].push(u.target)});const a=[],l=[];for(t.forEach(u=>{n[u.id]===0&&a.push(u.id)});a.length>0;){const u=a.shift(),f=t.find(m=>m.id===u);l.push(f),i[u].forEach(m=>{n[m]--,n[m]===0&&a.push(m)})}return l}const Nf=["rgb(158, 1, 66)","rgb(213, 62, 79)","rgb(244, 109, 67)","rgb(253, 174, 97)","rgb(254, 224, 139)","rgb(255, 255, 191)","rgb(230, 245, 152)","rgb(171, 221, 164)","rgb(102, 194, 165)","rgb(50, 136, 189)","rgb(94, 79, 162)"],Pf=["rgb(78, 121, 167)","rgb(242, 142, 44)","rgb(225, 87, 89)","rgb(118, 183, 178)","rgb(89, 161, 79)","rgb(237, 201, 73)","rgb(175, 122, 161)","rgb(255, 157, 167)","rgb(156, 117, 95)","rgb(186, 176, 171)"],kf=["rgb(255, 245, 235)","rgb(254, 230, 206)","rgb(253, 208, 162)","rgb(253, 174, 107)","rgb(253, 141, 60)","rgb(241, 105, 19)","rgb(217, 72, 1)","rgb(166, 54, 3)","rgb(127, 39, 4)"],Rf=["rgb(247, 252, 245)","rgb(229, 245, 224)","rgb(199, 233, 192)","rgb(161, 217, 155)","rgb(116, 196, 118)","rgb(65, 171, 93)","rgb(35, 139, 69)","rgb(0, 109, 44)","rgb(0, 68, 27)"],Lf=["rgb(247, 251, 255)","rgb(222, 235, 247)","rgb(198, 219, 239)","rgb(158, 202, 225)","rgb(107, 174, 214)","rgb(66, 146, 198)","rgb(33, 113, 181)","rgb(8, 81, 156)","rgb(8, 48, 107)"];var pd=y(92387);class ba extends ft{}function Nl(r,t=!0,e){const n=document.createElement("div");return n.setAttribute("class",`g6-${r}`),Object.assign(n.style,{position:"absolute",display:"block"}),t&&Object.assign(n.style,{position:"unset",gridArea:"1 / 1 / 2 / 2",inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),e&&Object.assign(n.style,e),n}function Vh(r,t="div",e={},n="",i=document.body){const a=document.getElementById(r);a&&a.remove();const l=document.createElement(t);return l.innerHTML=n,l.id=r,Object.assign(l.style,e),i.appendChild(l),l}var Df=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class lu extends ba{constructor(t,e){super(t,Object.assign({},lu.defaultOptions,e)),this.$element=Nl("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return Df(this,void 0,void 0,function*(){e.update.call(this,t),Object.assign(this.$element.style,(0,pd.Z)(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}lu.defaultOptions={transition:"background 0.5s",backgroundSize:"cover",zIndex:"-1"};var Pl=y(80574),If=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class cu extends ba{constructor(t,e){super(t,(0,h.Z)({},cu.defaultOptions,e)),this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:n,bubbleSetOptions:i}=this.parseOptions();(0,S.Z)(this.bubbleSetOptions,i)||this.init(),this.bubbleSetOptions=Object.assign({},i);const a=Object.assign(Object.assign({},n),{d:this.getPath()});this.shape?this.shape.update(a):(this.shape=new Sa({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=n=>{if(!this.shape)return;const i=ye(n.data);[...this.options.members,...this.options.avoidMembers].includes(i)&&this.shape.update(Object.assign(Object.assign({},this.parseOptions().style),{d:this.getPath(i)}))},this.getPath=n=>{const{graph:i}=this.context,a=this.options.members,l=[...this.members.keys()],u=this.options.avoidMembers,f=[...this.avoidMembers.keys()];if(!n&&(0,S.Z)(a,l)&&(0,S.Z)(u,f))return this.path;const{enter:m=[],exit:x=[]}=Ei(l,a,Dt=>Dt),{enter:Z=[],exit:V=[]}=Ei(f,u,Dt=>Dt);n&&(x.push(n),m.push(n));const et=(Dt,Qt,oe)=>{Dt.forEach(pe=>{const Be=oe?this.members:this.avoidMembers,vn=oe?"pushMember":"pushNonMember",nn=oe?"removeMember":"removeNonMember";if(Qt){let An;i.getElementType(pe)==="edge"?([An]=Ff(i,pe),this.bubbleSets.pushEdge(An)):([An]=Bf(i,pe),this.bubbleSets[vn](An)),Be.set(pe,An)}else{const An=Be.get(pe);An&&(i.getElementType(pe)==="edge"?this.bubbleSets.removeEdge(An):this.bubbleSets[nn](An),Be.delete(pe))}})};et(x,!1,!0),et(m,!0,!0),et(V,!1,!1),et(Z,!0,!1);const At=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=bo(At.points.map(Rn)),this.path},this.bindEvents(),this.bubbleSets=new Pl.CF(this.options)}bindEvents(){this.context.graph.on(Q.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(Q.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new Pl.CF(this.options),this.members=new Map,this.avoidMembers=new Map}parseOptions(){const t=this.options,{type:e,key:n,members:i,avoidMembers:a}=t,l=If(t,["type","key","members","avoidMembers"]),u=Object.keys(l).reduce((f,m)=>(m in Pl.vC?f.bubbleSetOptions[m]=l[m]:f.style[m]=l[m],f),{style:{},bubbleSetOptions:{}});return Object.assign({type:e,key:n,members:i,avoidMembers:a},u)}addMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.avoidMembers.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n))),this.options.members=[...new Set([...this.options.members,...e])],this.drawBubbleSets()}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),this.drawBubbleSets()}updateMember(t){this.options.members=(0,xe.Z)(t)?t(this.options.members):t,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.members.includes(n))&&(this.options.members=this.options.members.filter(n=>!e.includes(n))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...e])],this.drawBubbleSets()}removeAvoidMember(t){const e=Array.isArray(t)?t:[t];this.options.avoidMembers.some(n=>e.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n)),this.drawBubbleSets())}updateAvoidMember(t){this.options.avoidMembers=Array.isArray(t)?t:[t],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(Q.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(Q.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape.destroy(),super.destroy()}}cu.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},Pl.vC);const Bf=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getElementRenderBounds(n);return new Pl.Ae(i.min[0],i.min[1],tt(i),Nt(i))}),Ff=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getEdgeData(n),a=r.getElementPosition(i.source),l=r.getElementPosition(i.target);return Pl.x1.from({x1:a[0],y1:a[1],x2:l[0],y2:l[1]})});class Xv extends null{constructor(t,e){super(t,e),this.setOptions=n=>{const i={cameraType:"setType",near:"setNear",far:"setFar",fov:"setFov",aspect:"setAspect",projectionMode:"setProjectionMode",distance:"setDistance",minDistance:"setMinDistance",maxDistance:"setMaxDistance",roll:"setRoll",elevation:"setElevation",azimuth:"setAzimuth"},a=(l,u)=>{switch(l){case"projectionMode":return u==="perspective"?1:0;case"cameraType":return{orbiting:0,exploring:1,tracking:2}[u];case"aspect":return typeof u=="number"?u:this.getCanvasAspect();default:return u}};Object.entries(i).forEach(([l,u])=>{const f=n[l];if(f!==void 0){const m=a(l,f);this.context.canvas.getCamera()[u](m)}})},this.bindEvents()}update(t){this.setOptions(t),super.update(t)}bindEvents(){this.context.graph.once(GraphEvent.BEFORE_DRAW,()=>this.setOptions(this.options))}getCanvasAspect(){const[t,e]=this.context.viewport.getCanvasSize();return t/e}}function _f(r){return`
|
|
|
<ul class="g6-contextmenu-ul">
|
|
|
${r.map(t=>`<li class="g6-contextmenu-li" value="${t.value}">${t.name}</li>`).join("")}
|
|
|
</ul>
|
|
|
`}const Zf=`
|
|
|
.g6-contextmenu {
|
|
|
font-size: 12px;
|
|
|
background-color: rgba(255, 255, 255, 0.96);
|
|
|
border-radius: 4px;
|
|
|
overflow: hidden;
|
|
|
box-shadow: rgba(0, 0, 0, 0.12) 0px 6px 12px 0px;
|
|
|
transition: visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s;
|
|
|
}
|
|
|
|
|
|
.g6-contextmenu-ul {
|
|
|
max-width: 256px;
|
|
|
min-width: 96px;
|
|
|
list-style: none;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.g6-contextmenu-li {
|
|
|
padding: 8px 12px;
|
|
|
cursor: pointer;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.g6-contextmenu-li:hover {
|
|
|
background-color: #f5f5f5;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
`;var md=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class uu extends ba{constructor(t,e){super(t,Object.assign({},uu.defaultOptions,e)),this.targetElement=null,this.onTriggerEvent=n=>{var i;(i=n.preventDefault)===null||i===void 0||i.call(n),this.show(n)},this.onMenuItemClick=n=>{const{onClick:i,trigger:a}=this.options;if(n.target instanceof HTMLElement&&n.target.className.includes("g6-contextmenu-li")){const l=n.target.getAttribute("value");i==null||i(l,n.target,this.targetElement),this.hide()}a!=="click"&&this.hide()},this.initElement(),this.update(e)}initElement(){this.$element=Nl("contextmenu",!1,{zIndex:"99"});const{className:t}=this.options;t&&this.$element.classList.add(t),this.context.canvas.getContainer().appendChild(this.$element),Vh("g6-contextmenu-css","style",{},Zf,document.head)}show(t){return md(this,void 0,void 0,function*(){const{enable:e,offset:n}=this.options;if(typeof e=="function"&&!e(t)||!e){this.hide();return}const i=yield this.getDOMContent(t);i instanceof HTMLElement?(this.$element.innerHTML="",this.$element.appendChild(i)):this.$element.innerHTML=i;const a=this.context.graph.getCanvas().getContainer().getBoundingClientRect();this.$element.style.left=`${t.client.x-a.left+n[0]}px`,this.$element.style.top=`${t.client.y-a.top+n[1]}px`,this.$element.style.display="block",this.targetElement=t.target})}hide(){this.$element.style.display="none",this.targetElement=null}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.$element.remove()}getDOMContent(t){return md(this,void 0,void 0,function*(){const{getContent:e,getItems:n}=this.options;return n?_f(yield n(t)):yield e(t)})}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`canvas:${e}`,this.onTriggerEvent),t.on(`node:${e}`,this.onTriggerEvent),t.on(`edge:${e}`,this.onTriggerEvent),t.on(`combo:${e}`,this.onTriggerEvent),document.addEventListener("click",this.onMenuItemClick)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`canvas:${e}`,this.onTriggerEvent),t.off(`node:${e}`,this.onTriggerEvent),t.off(`edge:${e}`,this.onTriggerEvent),t.off(`combo:${e}`,this.onTriggerEvent),document.removeEventListener("click",this.onMenuItemClick)}}uu.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'<div class="g6-contextmenu-loading">Loading...</div>',getContent:()=>"It is a empty context menu.",enable:()=>!0};class hu extends ba{constructor(t,e){super(t,Object.assign({},hu.defaultOptions,e)),this.edgeBundles={},this.edgePoints={},this.onBundle=()=>{const{model:n,element:i}=this.context,a=n.getEdgeData();this.divideEdges(this.options.divisions);const{cycles:l,iterRate:u,divRate:f}=this.options;let{lambda:m,divisions:x,iterations:Z}=this.options;for(let V=0;V<l;V++){for(let et=0;et<Z;et++){const dt={};a.forEach(At=>{var Dt;if(At.source===At.target)return;const Qt=ye(At);dt[Qt]=this.getEdgeForces(At,x,m);for(let oe=0;oe<x+1;oe++)(Dt=this.edgePoints)[Qt]||(Dt[Qt]=[]),this.edgePoints[Qt][oe]=M(this.edgePoints[Qt][oe],dt[Qt][oe])})}m/=2,x*=f,Z*=u,this.divideEdges(x)}a.forEach(V=>{const et=ye(V),dt=i.getElement(et);dt==null||dt.update({d:cn(this.edgePoints[et])})})},this.bindEvents()}get nodeMap(){const t=this.context.model.getNodeData();return Object.fromEntries(t.map(e=>[ye(e),bt(Yt(e))]))}divideEdges(t){this.context.model.getEdgeData().forEach(n=>{var i;const a=ye(n);(i=this.edgePoints)[a]||(i[a]=[]);const l=this.nodeMap[n.source],u=this.nodeMap[n.target];if(t===1)this.edgePoints[a].push(l),this.edgePoints[a].push(ot(M(l,u),2)),this.edgePoints[a].push(u);else{const m=(this.edgePoints[a].length===0?$(l,u):Uf(this.edgePoints[a]))/(t+1);let x=m;const Z=[l];for(let V=1;V<this.edgePoints[a].length;V++){const et=this.edgePoints[a][V-1],dt=this.edgePoints[a][V];let At=$(dt,et);for(;At>x;){const Dt=x/At,Qt=M(et,J(Y(dt,et),Dt));Z.push(Qt),At-=x,x=m}x-=At}Z.push(u),this.edgePoints[a]=Z}})}getVectorPosition(t){const e=this.nodeMap[t.source],n=this.nodeMap[t.target],[i,a]=Y(n,e),l=$(e,n);return{source:e,target:n,vx:i,vy:a,length:l}}measureEdgeCompatibility(t,e){const n=this.getVectorPosition(t),i=this.getVectorPosition(e),a=zf(n,i),l=jf(n,i),u=Wf(n,i),f=Gf(n,i);return a*l*u*f}getEdgeBundles(){const t={},e=this.options.bundleThreshold,n=this.context.model.getEdgeData();return n.forEach((i,a)=>{n.forEach((l,u)=>{var f,m;if(u<=a)return;this.measureEdgeCompatibility(i,l)>=e&&(t[f=ye(i)]||(t[f]=[]),t[ye(i)].push(l),t[m=ye(l)]||(t[m]=[]),t[ye(l)].push(i))})}),t}getSpringForce(t,e){const{pre:n,cur:i,next:a}=t;return J(Y(M(n,a),J(i,2)),e)}getElectrostaticForce(t,e){(0,Ii.Z)(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const n=this.edgeBundles[ye(e)];let i=[0,0];return n==null||n.forEach(a=>{const l=this.edgePoints[ye(a)][t],u=this.edgePoints[ye(e)][t],f=Y(l,u),m=$(l,u);i=M(i,J(f,1/m))}),i}getEdgeForces(t,e,n){const i=this.nodeMap[t.source],a=this.nodeMap[t.target],l=this.options.K/($(i,a)*(e+1)),u=[[0,0]],f=ye(t);for(let m=1;m<e;m++){const x=this.getSpringForce({pre:this.edgePoints[f][m-1],cur:this.edgePoints[f][m],next:this.edgePoints[f][m+1]||[0,0]},l),Z=this.getElectrostaticForce(m,t);u.push(J(M(x,Z),n))}return u.push([0,0]),u}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_RENDER,this.onBundle)}unbindEvents(){const{graph:t}=this.context;t.off(Q.AFTER_RENDER,this.onBundle)}destroy(){this.unbindEvents(),super.destroy()}}hu.defaultOptions={K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:2/3,bundleThreshold:.6};const zf=(r,t)=>Math.abs(vt([r.vx,r.vy],[t.vx,t.vy])/(r.length*t.length)),jf=(r,t)=>{const e=(r.length+t.length)/2;return 2/(e/Math.min(r.length,t.length)+Math.max(r.length,t.length)/e)},Wf=(r,t)=>{const e=(r.length+t.length)/2,n=ot(M(r.source,r.target),2),i=ot(M(t.source,t.target),2);return e/(e+$(n,i))},yd=(r,t)=>{if(t.source[0]===t.target[0])return[t.source[0],r[1]];if(t.source[1]===t.target[1])return[r[0],t.source[1]];const e=(t.source[1]-t.target[1])/(t.source[0]-t.target[0]),n=(e*e*t.source[0]+e*(r[1]-t.source[1])+r[0])/(e*e+1),i=e*(n-t.source[0])+t.source[1];return[n,i]},bd=(r,t)=>{const e=yd(t.source,r),n=yd(t.target,r),i=ot(M(e,n),2),a=ot(M(r.source,r.target),2);return $(e,n)===0?0:Math.max(0,1-2*$(a,i)/$(e,n))},Gf=(r,t)=>Math.min(bd(r,t),bd(t,r)),Uf=r=>{let t=0;for(let e=1;e<r.length;e++)t+=$(r[e],r[e-1]);return t},Vf={fill:"#fff",fillOpacity:1,lineWidth:1,stroke:"#000",strokeOpacity:.8,zIndex:-1/0},Ed=.05;class du extends ba{constructor(t,e){super(t,Object.assign({},du.defaultOptions,e)),this.shapes=new Map,this.r=this.options.r,this.onEdgeFilter=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Rn(n.canvas);this.renderLens(i),this.renderFocusElements()},this.renderLens=n=>{const i=Object.assign({},Vf,this.options.style);this.isLensOn||(this.lens=new Pa({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Xn(n),{size:this.r*2}),this.lens.update(i)},this.getFilterData=()=>{const{filter:n}=this.options,{model:i}=this.context,a=i.getData();if(!n)return a;const{nodes:l,edges:u,combos:f}=a;return{nodes:l.filter(m=>n(ye(m),"node")),edges:u.filter(m=>n(ye(m),"edge")),combos:f.filter(m=>n(ye(m),"combo"))}},this.getFocusElements=n=>{const{nodes:i,edges:a}=this.getFilterData(),l=i.filter(m=>$(Yt(m),n)<this.r),u=l.map(m=>ye(m)),f=a.filter(m=>{const{source:x,target:Z}=m,V=u.includes(x),et=u.includes(Z);switch(this.options.nodeType){case"both":return V&&et;case"either":return V!==et;case"source":return V&&!et;case"target":return!V&&et;default:return!1}});return{nodes:l,edges:f}},this.renderFocusElements=()=>{const{element:n,graph:i}=this.context;if(!this.isLensOn)return;const a=this.lens.getCenter(),{nodes:l,edges:u}=this.getFocusElements(a),f=new Set,m=x=>{const Z=ye(x);f.add(Z);const V=n.getElement(Z);if(!V)return;const et=this.shapes.get(Z)||V.cloneNode();et.setPosition(V.getPosition()),et.id=V.id,this.shapes.has(Z)?Object.entries(V.attributes).forEach(([Dt,Qt])=>{et.style[Dt]!==Qt&&(et.style[Dt]=Qt)}):(this.canvas.appendChild(et),this.shapes.set(Z,et));const dt=i.getElementType(Z),At=this.getElementStyle(dt,x);et.update(At)};l.forEach(m),u.forEach(m),this.shapes.forEach((x,Z)=>{f.has(Z)||(x.destroy(),this.shapes.delete(Z))})},this.scaleRByWheel=n=>{var i;this.options.preventDefault&&n.preventDefault();const{clientX:a,clientY:l,deltaX:u,deltaY:f}=n,{graph:m,canvas:x}=this.context,Z=m.getCanvasByClient([a,l]),V=(i=this.lens)===null||i===void 0?void 0:i.getCenter();if(!this.isLensOn||$(Z,V)>this.r)return;const{maxR:et,minR:dt}=this.options,At=u+f>0?1/(1-Ed):1-Ed,Dt=Math.min(...x.getSize())/2;this.r=Math.max(dt||0,Math.min(et||Dt,this.r*At)),this.renderLens(V),this.renderFocusElements()},this.isLensDragging=!1,this.onDragStart=n=>{var i;const a=Rn(n.canvas),l=(i=this.lens)===null||i===void 0?void 0:i.getCenter();!this.isLensOn||$(a,l)>this.r||(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Rn(n.canvas);this.renderLens(i),this.renderFocusElements()},this.onDragEnd=()=>{this.isLensDragging=!1},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}getElementStyle(t,e){const n=t==="node"?this.options.nodeStyle:this.options.edgeStyle;return typeof n=="function"?n(e):n}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(n)&&a.addEventListener(G.CLICK,this.onEdgeFilter),n==="pointermove"?a.addEventListener(G.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.addEventListener(G.DRAG_START,this.onDragStart),a.addEventListener(G.DRAG,this.onDrag),a.addEventListener(G.DRAG_END,this.onDragEnd)),i==="wheel"&&((t=this.graphDom)===null||t===void 0||t.addEventListener(G.WHEEL,this.scaleRByWheel,{passive:!1}))}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(n)&&a.removeEventListener(G.CLICK,this.onEdgeFilter),n==="pointermove"?a.removeEventListener(G.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.removeEventListener(G.DRAG_START,this.onDragStart),a.removeEventListener(G.DRAG,this.onDrag),a.removeEventListener(G.DRAG_END,this.onDragEnd)),i==="wheel"&&((t=this.graphDom)===null||t===void 0||t.removeEventListener(G.WHEEL,this.scaleRByWheel))}update(t){var e;this.unbindEvents(),super.update(t),this.r=(e=t.r)!==null&&e!==void 0?e:this.r,this.bindEvents()}destroy(){this.unbindEvents(),this.isLensOn&&this.lens.destroy(),this.shapes.forEach((t,e)=>{t.destroy(),this.shapes.delete(e)}),super.destroy()}}du.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const Yf={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},xd=.05,wd=.1;class fu extends ba{constructor(t,e){super(t,Object.assign({},fu.defaultOptions,e)),this.r=this.options.r,this.d=this.options.d,this.onCreateFisheye=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Rn(n.canvas);this.onMagnify(i)},this.onMagnify=n=>{n.some(isNaN)||(this.renderLens(n),this.renderFocusElements())},this.renderLens=n=>{const i=Object.assign({},Yf,this.options.style);this.isLensOn||(this.lens=new Pa({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Xn(n),{size:this.r*2,label:this.options.showDPercent,labelText:this.getDPercent()}),this.lens.update(i)},this.getDPercent=()=>{const{minD:n,maxD:i}=this.options;return`${Math.round((this.d-n)/(i-n)*100)}%`},this.prevMagnifiedStyleMap=new Map,this.prevOriginStyleMap=new Map,this.renderFocusElements=()=>{if(!this.isLensOn)return;const{graph:n}=this.context,i=this.lens.getCenter(),a=(this.d+1)*this.r,l=new Map,u=new Map;n.getNodeData().forEach(m=>{const x=Yt(m),Z=$(x,i);if(Z>this.r)return;const V=a*Z/(this.d*Z+this.r),[et,dt]=x,[At,Dt]=i,Qt=(et-At)/Z,oe=(dt-Dt)/Z,pe=[At+V*Qt,Dt+V*oe],Be=ye(m),vn=this.getNodeStyle(m),nn=(0,la.Z)(n.getElementRenderStyle(Be),Object.keys(vn));l.set(Be,Object.assign(Object.assign({},Xn(pe)),vn)),u.set(Be,Object.assign(Object.assign({},Xn(x)),nn))}),this.updateStyle(l,u)},this.getNodeStyle=n=>{const{nodeStyle:i}=this.options;return typeof i=="function"?i(n):i},this.updateStyle=(n,i)=>{const{graph:a,element:l}=this.context,{enter:u,exit:f,keep:m}=Ei(Array.from(this.prevMagnifiedStyleMap.keys()),Array.from(n.keys()),V=>V),x=new Set,Z=(V,et)=>{const dt=l.getElement(V);dt==null||dt.update(et),a.getRelatedEdgesData(V).forEach(At=>{x.add(ye(At))})};[...u,...m].forEach(V=>{Z(V,n.get(V))}),f.forEach(V=>{Z(V,this.prevOriginStyleMap.get(V)),this.prevOriginStyleMap.delete(V)}),x.forEach(V=>{const et=l.getElement(V);et==null||et.update({})}),this.prevMagnifiedStyleMap=n,i.forEach((V,et)=>{this.prevOriginStyleMap.has(et)||this.prevOriginStyleMap.set(et,V)})},this.isWheelValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const{clientX:i,clientY:a}=n,l=this.context.graph.getCanvasByClient([i,a]),u=this.lens.getCenter();return!($(l,u)>this.r)},this.scaleR=n=>{const{maxR:i,minR:a}=this.options,l=n?1/(1-xd):1-xd,u=Math.min(...this.context.canvas.getSize())/2;this.r=Math.max(a||0,Math.min(i||u,this.r*l))},this.scaleD=n=>{const{maxD:i,minD:a}=this.options,l=n?this.d+wd:this.d-wd;this.d=Math.max(a,Math.min(i,l))},this.scaleRByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleR(i+a>0);const l=this.lens.getCenter();this.onMagnify(l)},this.scaleDByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleD(i+a>0);const l=this.lens.getCenter();this.onMagnify(l)},this.isDragValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const i=Rn(n.canvas),a=this.lens.getCenter();return!($(i,a)>this.r)},this.isLensDragging=!1,this.onDragStart=n=>{this.isDragValid(n)&&(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Rn(n.canvas);this.onMagnify(i)},this.onDragEnd=()=>{this.isLensDragging=!1},this.scaleRByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleR(i-a>0);const l=this.lens.getCenter();this.onMagnify(l)},this.scaleDByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleD(i-a>0);const l=this.lens.getCenter();this.onMagnify(l)},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,l=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&l.addEventListener(G.CLICK,this.onCreateFisheye),n==="pointermove"&&l.addEventListener(G.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){l.addEventListener(G.DRAG_START,this.onDragStart),l.addEventListener(G.DRAG_END,this.onDragEnd);const u=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;l.addEventListener(G.DRAG,u)}if(i==="wheel"||a==="wheel"){const u=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.addEventListener(G.WHEEL,u,{passive:!1})}}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,l=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&l.removeEventListener(G.CLICK,this.onCreateFisheye),n==="pointermove"&&l.removeEventListener(G.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){l.removeEventListener(G.DRAG_START,this.onDragStart),l.removeEventListener(G.DRAG_END,this.onDragEnd);const u=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;l.removeEventListener(G.DRAG,u)}if(i==="wheel"||a==="wheel"){const u=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.removeEventListener(G.WHEEL,u)}}update(t){var e,n;this.unbindEvents(),super.update(t),this.r=(e=t.r)!==null&&e!==void 0?e:this.r,this.d=(n=t.d)!==null&&n!==void 0?n:this.d,this.bindEvents()}destroy(){var t;this.unbindEvents(),this.isLensOn&&((t=this.lens)===null||t===void 0||t.destroy()),this.prevMagnifiedStyleMap.clear(),this.prevOriginStyleMap.clear(),super.destroy()}}fu.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class vu extends ba{constructor(t,e){super(t,Object.assign({},vu.defaultOptions,e)),this.$el=this.context.canvas.getContainer(),this.graphSize=[0,0],this.onFullscreenChange=()=>{var n,i,a,l;const u=!!document.fullscreenElement;this.options.autoFit&&this.setGraphSize(u),u?(i=(n=this.options).onEnter)===null||i===void 0||i.call(n):(l=(a=this.options).onExit)===null||l===void 0||l.call(a)},this.shortcut=new us(t.graph),this.bindEvents(),this.style=document.createElement("style"),document.head.appendChild(this.style),this.style.innerHTML=`
|
|
|
:not(:root):fullscreen::backdrop {
|
|
|
background: transparent;
|
|
|
}
|
|
|
`}bindEvents(){this.unbindEvents(),this.shortcut.unbindAll();const{request:t=[],exit:e=[]}=this.options.trigger;this.shortcut.bind(t,this.request),this.shortcut.bind(e,this.exit),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(i=>{document.addEventListener(i,this.onFullscreenChange,!1)})}unbindEvents(){this.shortcut.unbindAll(),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(e=>{document.removeEventListener(e,this.onFullscreenChange,!1)})}setGraphSize(t=!0){var e,n;let i,a;t?(i=((e=globalThis.screen)===null||e===void 0?void 0:e.width)||0,a=((n=globalThis.screen)===null||n===void 0?void 0:n.height)||0,this.graphSize=this.context.graph.getSize()):[i,a]=this.graphSize,this.context.graph.setSize(i,a),this.context.graph.render()}request(){document.fullscreenElement||!Hf()||this.$el.requestFullscreen().catch(t=>{Xe.warn(`Error attempting to enable full-screen: ${t.message} (${t.name})`)})}exit(){document.fullscreenElement&&document.exitFullscreen()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.exit(),this.style.remove(),super.destroy()}}vu.defaultOptions={trigger:{},autoFit:!0};function Hf(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}var Yh=y(50264);class gu extends ba{constructor(t,e){super(t,Object.assign({},gu.defaultOptions,e)),this.$element=Nl("grid-line",!0),this.offset=[0,0],this.currentScale=1,this.followZoom=i=>{const{data:{scale:a,origin:l}}=i;if(!a||l===void 0&&this.context.viewport===void 0)return;const u=this.currentScale;this.currentScale=a;const f=a/u,m=J(l||this.context.graph.getCanvasCenter(),1-f),x=this.baseSize*a,Z=J(this.offset,f),V=Kt(Z,x),et=M(V,m);this.$element.style.backgroundSize=`${x}px ${x}px`,this.$element.style.backgroundPosition=`${et[0]}px ${et[1]}px`,this.offset=Kt(et,x)},this.followTranslate=i=>{if(!this.options.follow)return;const{data:{translate:a}}=i;a&&this.updateOffset(a)},this.onTransform=i=>{const a=this.parseFollow(this.options.follow);a.zoom&&this.followZoom(i),a.translate&&this.followTranslate(i)},this.context.canvas.getContainer().prepend(this.$element),this.baseSize=this.options.size,this.updateStyle(),this.bindEvents()}update(t){super.update(t),t.size!==void 0&&(this.baseSize=t.size),this.updateStyle()}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_TRANSFORM,this.onTransform)}updateStyle(){const{stroke:t,lineWidth:e,border:n,borderLineWidth:i,borderStroke:a,borderStyle:l}=this.options,u=this.baseSize*this.currentScale;Object.assign(this.$element.style,{border:n?`${i}px ${l} ${a}`:"none",backgroundImage:`linear-gradient(${t} ${e}px, transparent ${e}px), linear-gradient(90deg, ${t} ${e}px, transparent ${e}px)`,backgroundSize:`${u}px ${u}px`,backgroundRepeat:"repeat"})}updateOffset(t){const e=this.baseSize*this.currentScale;this.offset=Kt(M(this.offset,t),e),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}parseFollow(t){var e,n;return(0,Yh.Z)(t)?{translate:t,zoom:t}:{translate:(e=t==null?void 0:t.translate)!==null&&e!==void 0?e:!1,zoom:(n=t==null?void 0:t.zoom)!==null&&n!==void 0?n:!1}}destroy(){this.context.graph.off(Q.AFTER_TRANSFORM,this.onTransform),this.$element.remove(),super.destroy()}}gu.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};var Hh=y(49336);function Xh(r){const t={Added:new Map,Updated:new Map,Removed:new Map};return r.forEach(e=>{const{type:n,value:i}=e,a=ye(i);if(n==="NodeAdded"||n==="EdgeAdded"||n==="ComboAdded")t.Added.set(a,e);else if(n==="NodeUpdated"||n==="EdgeUpdated"||n==="ComboUpdated")if(t.Added.has(a))t.Added.set(a,{type:n.replace("Updated","Added"),value:i});else if(t.Updated.has(a)){const{original:l}=t.Updated.get(a);t.Updated.set(a,{type:n,value:i,original:l})}else t.Removed.has(a)||t.Updated.set(a,e);else(n==="NodeRemoved"||n==="EdgeRemoved"||n==="ComboRemoved")&&(t.Added.has(a)?t.Added.delete(a):(t.Updated.has(a)&&t.Updated.delete(a),t.Removed.set(a,e)))}),[...Array.from(t.Added.values()),...Array.from(t.Updated.values()),...Array.from(t.Removed.values())]}function Md(r){const{NodeAdded:t=[],NodeUpdated:e=[],NodeRemoved:n=[],EdgeAdded:i=[],EdgeUpdated:a=[],EdgeRemoved:l=[],ComboAdded:u=[],ComboUpdated:f=[],ComboRemoved:m=[]}=(0,_t.Z)(r,x=>x.type);return{add:{nodes:t,edges:i,combos:u},update:{nodes:e,edges:a,combos:f},remove:{nodes:n,edges:l,combos:m}}}function Sd(r,t){for(const e in r)(0,R.Z)(r[e])&&!Array.isArray(r[e])&&r[e]!==null?(t[e]||(t[e]={}),Sd(r[e],t[e])):t[e]===void 0&&(t[e]=xn(e))}function Xf(r,t=!1,e){const n={animation:t,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:i,update:a,remove:l}=Md(Xh(r));return["nodes","edges","combos"].forEach(u=>{a[u]&&a[u].forEach(f=>{var m,x;const Z=Object.assign({},f.value);let V=Object.assign({},f.original);if(e){const et=e.graph.getElementType(ye(f.original)),dt=et==="edge"?"stroke":"fill",At=e.element.getElementComputedStyle(et,f.original);V=Object.assign(Object.assign({},f.original),{style:Object.assign({[dt]:At[dt]},f.original.style)})}Sd(Z,V),(m=n.current.update)[u]||(m[u]=[]),n.current.update[u].push(Z),(x=n.original.update)[u]||(x[u]=[]),n.original.update[u].push(V)}),i[u]&&i[u].forEach(f=>{var m,x;const Z=Object.assign({},f.value);(m=n.current.add)[u]||(m[u]=[]),n.current.add[u].push(Z),(x=n.original.remove)[u]||(x[u]=[]),n.original.remove[u].push(Z)}),l[u]&&l[u].forEach(f=>{var m,x;const Z=Object.assign({},f.value);(m=n.current.remove)[u]||(m[u]=[]),n.current.remove[u].push(Z),(x=n.original.add)[u]||(x[u]=[]),n.original.add[u].push(Z)})}),n}class pu extends ba{constructor(t,e){super(t,Object.assign({},pu.defaultOptions,e)),this.batchChanges=null,this.batchAnimation=!1,this.undoStack=[],this.redoStack=[],this.freezed=!1,this.executeCommand=(i,a=!0)=>{var l,u,f;this.freezed=!0,(u=(l=this.options).executeCommand)===null||u===void 0||u.call(l,i);const m=a?i.original:i.current;this.context.graph.addData(m.add),this.context.graph.updateData(m.update),this.context.graph.removeData(Hn(m.remove,!1)),(f=this.context.element)===null||f===void 0||f.draw({silence:!0,animation:i.animation}),this.freezed=!1},this.addCommand=i=>{var a;if(!this.freezed){if(i.type===Q.AFTER_DRAW){const{dataChanges:l=[],animation:u=!0}=i.data;if(!((a=this.context.batch)===null||a===void 0)&&a.isBatching){if(!this.batchChanges)return;this.batchChanges.push(l),this.batchAnimation&&(this.batchAnimation=u);return}this.batchChanges=[l],this.batchAnimation=u}this.undoStackPush(Xf(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(Rt.ADD,this.undoStack[this.undoStack.length-1])}},this.initBatchCommand=i=>{const{initiate:a}=i.data;this.batchAnimation=!1,a?this.batchChanges=[]:this.undoStack.pop()||(this.batchChanges=null)},this.emitter=new Hh.Z;const{graph:n}=this.context;n.on(Q.AFTER_DRAW,this.addCommand),n.on(Q.BATCH_START,this.initBatchCommand),n.on(Q.BATCH_END,this.addCommand)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(){var t,e,n,i;const a=this.undoStack.pop();if(a){if(this.executeCommand(a),((e=(t=this.options).beforeAddCommand)===null||e===void 0?void 0:e.call(t,a,!1))===!1)return;this.redoStack.push(a),(i=(n=this.options).afterAddCommand)===null||i===void 0||i.call(n,a,!1),this.notify(Rt.UNDO,a)}return this}redo(){const t=this.redoStack.pop();return t&&(this.executeCommand(t,!1),this.undoStackPush(t),this.notify(Rt.REDO,t)),this}undoAndCancel(){const t=this.undoStack.pop();return t&&(this.executeCommand(t,!1),this.redoStack=[],this.notify(Rt.CANCEL,t)),this}undoStackPush(t){var e,n,i,a;const{stackSize:l}=this.options;l!==0&&this.undoStack.length>=l&&this.undoStack.shift(),((n=(e=this.options).beforeAddCommand)===null||n===void 0?void 0:n.call(e,t,!0))!==!1&&(this.undoStack.push(t),(a=(i=this.options).afterAddCommand)===null||a===void 0||a.call(i,t,!0))}clear(){this.undoStack=[],this.redoStack=[],this.batchChanges=null,this.batchAnimation=!1,this.notify(Rt.CLEAR,null)}notify(t,e){this.emitter.emit(t,{cmd:e}),this.emitter.emit(Rt.CHANGE,{cmd:e})}on(t,e){this.emitter.on(t,e)}destroy(){const{graph:t}=this.context;t.off(Q.AFTER_DRAW,this.addCommand),t.off(Q.BATCH_START,this.initBatchCommand),t.off(Q.BATCH_END,this.addCommand),this.emitter.off(),super.destroy(),this.undoStack=[],this.redoStack=[]}}pu.defaultOptions={stackSize:0};const Kh={toXy(r,t){if(!t)return[...r];const e=t[0].slice(1),n=t[1].slice(1);return r.map(i=>[i[e],i[n]])},fromXy(r,t){if(!t)return[...r];const e=t[0].slice(1),n=t[1].slice(1);return r.map(([i,a])=>({[e]:i,[n]:a}))}};class Kf{constructor(t,e){this._cells=[],this._cellSize=e,this._reverseCellSize=1/e;for(const n of t){const i=this.coordToCellNum(n[0]),a=this.coordToCellNum(n[1]);this._cells[i]||(this._cells[i]=[]),this._cells[i][a]||(this._cells[i][a]=[]),this._cells[i][a].push(n)}}cellPoints(t,e){var n;return((n=this._cells[t])===null||n===void 0?void 0:n[e])||[]}rangePoints(t){const e=this.coordToCellNum(t[0]),n=this.coordToCellNum(t[1]),i=this.coordToCellNum(t[2]),a=this.coordToCellNum(t[3]),l=[];for(let u=e;u<=i;u++)for(let f=n;f<=a;f++){const m=this.cellPoints(u,f);for(const x of m)l.push(x)}return l}removePoint(t){const e=this.coordToCellNum(t[0]),n=this.coordToCellNum(t[1]),i=this._cells[e][n],a=i.findIndex(([l,u])=>l===t[0]&&u===t[1]);return a>-1&&i.splice(a,1),i}trunc(t){return Math.trunc(t)}coordToCellNum(t){return this.trunc(t*this._reverseCellSize)}extendBbox(t,e){return[t[0]-e*this._cellSize,t[1]-e*this._cellSize,t[2]+e*this._cellSize,t[3]+e*this._cellSize]}}function Qf(r,t){return new Kf(r,t)}const Ad=+(Math.pow(2,27)+1);function mu(r,t,e){const n=r*t,i=Ad*r,a=i-r,l=i-a,u=r-l,f=Ad*t,m=f-t,x=f-m,Z=t-x,dt=n-l*x-u*x-l*Z,At=u*Z-dt;return e?(e[0]=At,e[1]=n,e):[At,n]}function Jf(r,t,e){const n=r+t,i=n-r,a=n-i,l=t-i,u=r-a;return e?(e[0]=u+l,e[1]=n,e):[u+l,n]}function $f(r,t){const e=r.length;if(e===1){const u=mu(r[0],t);return u[0]?u:[u[1]]}const n=new Array(2*e),i=[.1,.1],a=[.1,.1];let l=0;mu(r[0],t,i),i[0]&&(n[l++]=i[0]);for(let u=1;u<e;++u){mu(r[u],t,a);const f=i[1];Jf(f,a[0],i),i[0]&&(n[l++]=i[0]);const m=a[1],x=i[1],Z=m+x,V=Z-m,et=x-V;i[1]=Z,et&&(n[l++]=et)}return i[1]&&(n[l++]=i[1]),l===0&&(n[l++]=0),n.length=l,n}function qf(r,t){const e=r+t,n=e-r,i=e-n,a=t-n,u=r-i+a;return u?[u,e]:[e]}function t0(r,t){const e=r.length|0,n=t.length|0;if(e===1&&n===1)return qf(r[0],-t[0]);const i=e+n,a=new Array(i);let l=0,u=0,f=0;const m=Math.abs;let x=r[u],Z=m(x),V=-t[f],et=m(V),dt,At;Z<et?(At=x,u+=1,u<e&&(x=r[u],Z=m(x))):(At=V,f+=1,f<n&&(V=-t[f],et=m(V))),u<e&&Z<et||f>=n?(dt=x,u+=1,u<e&&(x=r[u],Z=m(x))):(dt=V,f+=1,f<n&&(V=-t[f],et=m(V)));let Dt=dt+At,Qt=Dt-dt,oe=At-Qt,pe=oe,Be=Dt,vn,nn,An,$e,zn;for(;u<e&&f<n;)Z<et?(dt=x,u+=1,u<e&&(x=r[u],Z=m(x))):(dt=V,f+=1,f<n&&(V=-t[f],et=m(V))),At=pe,Dt=dt+At,Qt=Dt-dt,oe=At-Qt,oe&&(a[l++]=oe),vn=Be+Dt,nn=vn-Be,An=vn-nn,$e=Dt-nn,zn=Be-An,pe=zn+$e,Be=vn;for(;u<e;)dt=x,At=pe,Dt=dt+At,Qt=Dt-dt,oe=At-Qt,oe&&(a[l++]=oe),vn=Be+Dt,nn=vn-Be,An=vn-nn,$e=Dt-nn,zn=Be-An,pe=zn+$e,Be=vn,u+=1,u<e&&(x=r[u]);for(;f<n;)dt=V,At=pe,Dt=dt+At,Qt=Dt-dt,oe=At-Qt,oe&&(a[l++]=oe),vn=Be+Dt,nn=vn-Be,An=vn-nn,$e=Dt-nn,zn=Be-An,pe=zn+$e,Be=vn,f+=1,f<n&&(V=-t[f]);return pe&&(a[l++]=pe),Be&&(a[l++]=Be),l||(a[l++]=0),a.length=l,a}function e0(r,t){const e=r+t,n=e-r,i=e-n,a=t-n,u=r-i+a;return u?[u,e]:[e]}function n0(r,t){const e=r.length|0,n=t.length|0;if(e===1&&n===1)return e0(r[0],t[0]);const i=e+n,a=new Array(i);let l=0,u=0,f=0;const m=Math.abs;let x=r[u],Z=m(x),V=t[f],et=m(V),dt,At;Z<et?(At=x,u+=1,u<e&&(x=r[u],Z=m(x))):(At=V,f+=1,f<n&&(V=t[f],et=m(V))),u<e&&Z<et||f>=n?(dt=x,u+=1,u<e&&(x=r[u],Z=m(x))):(dt=V,f+=1,f<n&&(V=t[f],et=m(V)));let Dt=dt+At,Qt=Dt-dt,oe=At-Qt,pe=oe,Be=Dt,vn,nn,An,$e,zn;for(;u<e&&f<n;)Z<et?(dt=x,u+=1,u<e&&(x=r[u],Z=m(x))):(dt=V,f+=1,f<n&&(V=t[f],et=m(V))),At=pe,Dt=dt+At,Qt=Dt-dt,oe=At-Qt,oe&&(a[l++]=oe),vn=Be+Dt,nn=vn-Be,An=vn-nn,$e=Dt-nn,zn=Be-An,pe=zn+$e,Be=vn;for(;u<e;)dt=x,At=pe,Dt=dt+At,Qt=Dt-dt,oe=At-Qt,oe&&(a[l++]=oe),vn=Be+Dt,nn=vn-Be,An=vn-nn,$e=Dt-nn,zn=Be-An,pe=zn+$e,Be=vn,u+=1,u<e&&(x=r[u]);for(;f<n;)dt=V,At=pe,Dt=dt+At,Qt=Dt-dt,oe=At-Qt,oe&&(a[l++]=oe),vn=Be+Dt,nn=vn-Be,An=vn-nn,$e=Dt-nn,zn=Be-An,pe=zn+$e,Be=vn,f+=1,f<n&&(V=t[f]);return pe&&(a[l++]=pe),Be&&(a[l++]=Be),l||(a[l++]=0),a.length=l,a}const Od=5,yu=11102230246251565e-32,r0=(3+16*yu)*yu,i0=(7+56*yu)*yu;function a0(r,t,e,n){return function(a,l,u){const f=r(r(t(l[1],u[0]),t(-u[1],l[0])),r(t(a[1],l[0]),t(-l[1],a[0]))),m=r(t(a[1],u[0]),t(-u[1],a[0])),x=n(f,m);return x[x.length-1]}}function s0(r,t,e,n){return function(a,l,u,f){const m=r(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),l[2]),r(e(r(t(l[1],f[0]),t(-f[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),f[2]))),r(e(r(t(l[1],f[0]),t(-f[1],l[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),f[2])))),x=r(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),f[2]))),r(e(r(t(l[1],u[0]),t(-u[1],l[0])),a[2]),r(e(r(t(a[1],u[0]),t(-u[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),u[2])))),Z=n(m,x);return Z[Z.length-1]}}function o0(r,t,e,n){return function(a,l,u,f,m){const x=r(r(r(e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),u[2]),r(e(r(t(u[1],m[0]),t(-m[1],u[0])),-f[2]),e(r(t(u[1],f[0]),t(-f[1],u[0])),m[2]))),l[3]),r(e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),l[2]),r(e(r(t(l[1],m[0]),t(-m[1],l[0])),-f[2]),e(r(t(l[1],f[0]),t(-f[1],l[0])),m[2]))),-u[3]),e(r(e(r(t(u[1],m[0]),t(-m[1],u[0])),l[2]),r(e(r(t(l[1],m[0]),t(-m[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),m[2]))),f[3]))),r(e(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),l[2]),r(e(r(t(l[1],f[0]),t(-f[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),f[2]))),-m[3]),r(e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),l[2]),r(e(r(t(l[1],m[0]),t(-m[1],l[0])),-f[2]),e(r(t(l[1],f[0]),t(-f[1],l[0])),m[2]))),a[3]),e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-f[2]),e(r(t(a[1],f[0]),t(-f[1],a[0])),m[2]))),-l[3])))),r(r(e(r(e(r(t(l[1],m[0]),t(-m[1],l[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),m[2]))),f[3]),r(e(r(e(r(t(l[1],f[0]),t(-f[1],l[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),f[2]))),-m[3]),e(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),l[2]),r(e(r(t(l[1],f[0]),t(-f[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),f[2]))),a[3]))),r(e(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),f[2]))),-l[3]),r(e(r(e(r(t(l[1],f[0]),t(-f[1],l[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),f[2]))),u[3]),e(r(e(r(t(l[1],u[0]),t(-u[1],l[0])),a[2]),r(e(r(t(a[1],u[0]),t(-u[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),u[2]))),-f[3]))))),Z=r(r(r(e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),u[2]),r(e(r(t(u[1],m[0]),t(-m[1],u[0])),-f[2]),e(r(t(u[1],f[0]),t(-f[1],u[0])),m[2]))),a[3]),e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-f[2]),e(r(t(a[1],f[0]),t(-f[1],a[0])),m[2]))),-u[3])),r(e(r(e(r(t(u[1],m[0]),t(-m[1],u[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),m[2]))),f[3]),e(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),f[2]))),-m[3]))),r(r(e(r(e(r(t(u[1],m[0]),t(-m[1],u[0])),l[2]),r(e(r(t(l[1],m[0]),t(-m[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),m[2]))),a[3]),e(r(e(r(t(u[1],m[0]),t(-m[1],u[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),m[2]))),-l[3])),r(e(r(e(r(t(l[1],m[0]),t(-m[1],l[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),m[2]))),u[3]),e(r(e(r(t(l[1],u[0]),t(-u[1],l[0])),a[2]),r(e(r(t(a[1],u[0]),t(-u[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),u[2]))),-m[3])))),V=n(x,Z);return V[V.length-1]}}function bu(r){return(r===3?a0:r===4?s0:o0)(n0,mu,$f,t0)}const l0=bu(3),c0=bu(4),sl=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,n){const i=(t[1]-n[1])*(e[0]-n[0]),a=(t[0]-n[0])*(e[1]-n[1]),l=i-a;let u;if(i>0){if(a<=0)return l;u=i+a}else if(i<0){if(a>=0)return l;u=-(i+a)}else return l;const f=r0*u;return l>=f||l<=-f?l:l0(t,e,n)},function(t,e,n,i){const a=t[0]-i[0],l=e[0]-i[0],u=n[0]-i[0],f=t[1]-i[1],m=e[1]-i[1],x=n[1]-i[1],Z=t[2]-i[2],V=e[2]-i[2],et=n[2]-i[2],dt=l*x,At=u*m,Dt=u*f,Qt=a*x,oe=a*m,pe=l*f,Be=Z*(dt-At)+V*(Dt-Qt)+et*(oe-pe),vn=(Math.abs(dt)+Math.abs(At))*Math.abs(Z)+(Math.abs(Dt)+Math.abs(Qt))*Math.abs(V)+(Math.abs(oe)+Math.abs(pe))*Math.abs(et),nn=i0*vn;return Be>nn||-Be>nn?Be:c0(t,e,n,i)}];function u0(r){let t=sl[r.length];return t||(t=sl[r.length]=bu(r.length)),t.apply(void 0,...r)}function h0(r,t,e,n,i,a,l){return function(...f){switch(f.length){case 0:case 1:return 0;case 2:return n(f[0],f[1]);case 3:return i(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return l(f[0],f[1],f[2],f[3],f[4])}return r(f)}}function d0(){for(;sl.length<=Od;)sl.push(bu(sl.length));const r=h0(void 0,u0,...sl);for(let t=0;t<=Od;++t)r[t]=sl[t];return r}var lc=d0();const Td=lc[3];function f0(r){const t=r.length;if(t<3){const u=new Array(t);for(let f=0;f<t;++f)u[f]=f;return t===2&&r[0][0]===r[1][0]&&r[0][1]===r[1][1]?[0]:u}const e=new Array(t);for(let u=0;u<t;++u)e[u]=u;e.sort((u,f)=>{const m=r[u][0]-r[f][0];return m||r[u][1]-r[f][1]});const n=[e[0],e[1]],i=[e[0],e[1]];for(let u=2;u<t;++u){const f=e[u],m=r[f];let x=n.length;for(;x>1&&Td(r[n[x-2]],r[n[x-1]],m)<=0;)x-=1,n.pop();for(n.push(f),x=i.length;x>1&&Td(r[i[x-2]],r[i[x-1]],m)>=0;)x-=1,i.pop();i.push(f)}const a=new Array(i.length+n.length-2);let l=0;for(let u=0,f=n.length;u<f;++u)a[l++]=n[u];for(let u=i.length-2;u>0;--u)a[l++]=i[u];return a}function v0(r,t,e,n){for(let i=0;i<2;++i){const a=r[i],l=t[i],[u,f]=[Math.min(a,l),Math.max(a,l)],m=e[i],x=n[i],[Z,V]=[Math.min(m,x),Math.max(m,x)];if(V<u||f<Z)return!1}return!0}function g0(r,t,e,n){const i=lc(r,e,n),a=lc(t,e,n);if(i>0&&a>0||i<0&&a<0)return!1;const l=lc(e,r,t),u=lc(n,r,t);return l>0&&u>0||l<0&&u<0?!1:i===0&&a===0&&l===0&&u===0?v0(r,t,e,n):!0}function p0(r){const t=[r[0]];let e=r[0];for(let n=1;n<r.length;n++){const i=r[n];(e[0]!==i[0]||e[1]!==i[1])&&t.push(i),e=i}return t}function m0(r){return r.sort(function(t,e){return t[0]-e[0]||t[1]-e[1]})}function Qh(r,t){return Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2)}function Cd(r,t,e){const n=[t[0]-r[0],t[1]-r[1]],i=[e[0]-r[0],e[1]-r[1]],a=Qh(r,t),l=Qh(r,e);return(n[0]*i[0]+n[1]*i[1])/Math.sqrt(a*l)}function Nd(r,t){for(let e=0;e<t.length-1;e++){const n=[t[e],t[e+1]];if(!(r[0][0]===n[0][0]&&r[0][1]===n[0][1]||r[0][0]===n[1][0]&&r[0][1]===n[1][1])&&g0(r[0],r[1],n[0],n[1]))return!0}return!1}function y0(r){let t=1/0,e=1/0,n=-1/0,i=-1/0;for(let a=r.length-1;a>=0;a--)r[a][0]<t&&(t=r[a][0]),r[a][1]<e&&(e=r[a][1]),r[a][0]>n&&(n=r[a][0]),r[a][1]>i&&(i=r[a][1]);return[n-t,i-e]}function b0(r){return[Math.min(r[0][0],r[1][0]),Math.min(r[0][1],r[1][1]),Math.max(r[0][0],r[1][0]),Math.max(r[0][1],r[1][1])]}function E0(r,t,e){let n=null,i=kd,a=kd,l,u;for(let f=0;f<t.length;f++)l=Cd(r[0],r[1],t[f]),u=Cd(r[1],r[0],t[f]),l>i&&u>a&&!Nd([r[0],t[f]],e)&&!Nd([r[1],t[f]],e)&&(i=l,a=u,n=t[f]);return n}function Pd(r,t,e,n,i){let a=!1;for(let l=0;l<r.length-1;l++){const u=[r[l],r[l+1]],f=u[0][0]+","+u[0][1]+","+u[1][0]+","+u[1][1];if(Qh(u[0],u[1])<t||i.has(f))continue;let m=0,x=b0(u),Z,V,et;do x=n.extendBbox(x,m),Z=x[2]-x[0],V=x[3]-x[1],et=E0(u,n.rangePoints(x),r),m++;while(et===null&&(e[0]>Z||e[1]>V));Z>=e[0]&&V>=e[1]&&i.add(f),et!==null&&(r.splice(l+1,0,et),n.removePoint(et),a=!0)}return a?Pd(r,t,e,n,i):r}function x0(r,t,e){const n=t||20,i=p0(m0(Kh.toXy(r,e)));if(i.length<4){const Z=i.concat([i[0]]);return e?Kh.fromXy(Z,e):Z}const a=y0(i),l=[a[0]*Rd,a[1]*Rd],u=f0(i).reverse().map(Z=>i[Z]);u.push(u[0]);const f=i.filter(function(Z){return u.indexOf(Z)<0}),m=Math.ceil(1/(i.length/(a[0]*a[1]))),x=Pd(u,Math.pow(n,2),l,Qf(f,m),new Set);return e?Kh.fromXy(x,e):x}const kd=Math.cos(90/(180/Math.PI)),Rd=.6;function w0(r,t,e){if(r.length===1)return M0(r[0],t,e);if(r.length===2)return Ld(r,t,e);if(r.length===3){const[n,i,a]=La(r);if(Ur(n,i,a))return Ld([n,a],t,e)}switch(e){case"smooth":return A0(r,t);case"sharp":return O0(r,t);case"rounded":default:return S0(r,t)}}const M0=(r,t,e)=>{if(e==="sharp")return[["M",r[0]-t,r[1]-t],["L",r[0]+t,r[1]-t],["L",r[0]+t,r[1]+t],["L",r[0]-t,r[1]+t],["Z"]];const n=[t,t,0,0,0];return[["M",r[0],r[1]-t],["A",...n,r[0],r[1]+t],["A",...n,r[0],r[1]-t]]},Ld=(r,t,e)=>{const n=[t,t,0,0,0],i=e==="sharp"?M(r[0],q(nt(Y(r[0],r[1])),t)):r[0],a=e==="sharp"?M(r[1],q(nt(Y(r[1],r[0])),t)):r[1],l=q(nt(Tt(Y(i,a),!1)),t),u=q(l,-1),f=M(i,l),m=M(a,l),x=M(a,u),Z=M(i,u);return e==="sharp"?[["M",f[0],f[1]],["L",m[0],m[1]],["L",x[0],x[1]],["L",Z[0],Z[1]],["Z"]]:[["M",f[0],f[1]],["L",m[0],m[1]],["A",...n,x[0],x[1]],["L",Z[0],Z[1]],["A",...n,f[0],f[1]]]},S0=(r,t)=>{const e=La(r).map((u,f)=>{const m=(f-2+r.length)%r.length,x=(f-1+r.length)%r.length,Z=(f+1)%r.length,V=r[m],et=r[x],dt=r[Z],At=Y(V,et),Dt=Y(et,u),Qt=Y(u,dt),oe=(An,$e)=>Mt(An,$e,!0)<Math.PI,pe=oe(At,Dt),Be=oe(Dt,Qt),vn=An=>q(nt(Tt(An,!1)),t),nn=vn(Dt);return[{p:bt(pe?M(et,vn(At)):M(et,nn)),concave:pe&&et},{p:bt(Be?M(u,vn(Qt)):M(u,nn)),concave:Be&&u}]}),n=[t,t,0,0,0],i=e.findIndex((u,f)=>!e[(f-1+e.length)%e.length][0].concave&&!e[(f-1+e.length)%e.length][1].concave&&!u[0].concave&&!u[0].concave&&!u[1].concave),a=e.slice(i).concat(e.slice(0,i));let l=[];return a.flatMap((u,f)=>{const m=[],x=a[e.length-1];return f===0&&m.push(["M",...x[1].p]),u[0].concave?l.push(u[0].p,u[1].p):m.push(["A",...n,...u[0].p]),u[1].concave?l.unshift(u[1].p):m.push(["L",...u[1].p]),l.length===3&&(m.pop(),m.push(["C",...l.flat()]),l=[]),m})},A0=(r,t)=>{const e=La(r).map((n,i)=>{const a=r[(i+1)%r.length];return{p:n,v:nt(Y(a,n))}});return e.forEach((n,i)=>{const a=i>0?i-1:r.length-1,l=e[a].v,u=nt(M(l,q(n.v,Mt(l,n.v,!0)<Math.PI?1:-1)));n.p=M(n.p,q(u,t))}),bo(e.map(n=>n.p))},O0=(r,t)=>{const n=r.map((a,l)=>{const u=r[l===0?r.length-1:l-1],f=pt(q(nt(Tt(Y(u,a),!1)),t));return[M(u,f),M(a,f)]}).flat();return n.map((a,l)=>{if(l%2===0)return null;const u=[n[(l-1)%n.length],n[l%n.length]],f=[n[(l+1)%n.length],n[(l+2)%n.length]];return ve(u,f,!0)}).filter(Boolean).map((a,l)=>[l===0?"M":"L",a[0],a[1]]).concat([["Z"]])};var T0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Eu extends ba{constructor(t,e){super(t,Object.assign({},Eu.defaultOptions,e)),this.hullMemberIds=[],this.drawHull=()=>{if(!this.shape)this.shape=new Sa({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const n=!(0,S.Z)(this.optionsCache,this.options);this.shape.update(this.getHullStyle(n))}this.optionsCache=Object.assign({},this.options)},this.updateHullPath=n=>{this.shape&&this.options.members.includes(ye(n.data))&&this.shape.update({d:this.getHullPath(!0)})},this.getHullPath=(n=!1)=>{const{graph:i}=this.context,a=this.getMember();if(a.length===0)return"";const l=a.map(m=>i.getNodeData(m)),u=x0(l.map(Yt),this.options.concavity).slice(1).reverse(),f=u.flatMap(m=>l.filter(x=>(0,S.Z)(Yt(x),m)).map(ye));return(0,S.Z)(f,this.hullMemberIds)&&!n?this.path:(this.hullMemberIds=f,this.path=w0(u,this.getPadding(),this.options.corner),this.path)},this.bindEvents()}bindEvents(){this.context.graph.on(Q.AFTER_RENDER,this.drawHull),this.context.graph.on(Q.AFTER_ELEMENT_UPDATE,this.updateHullPath)}unbindEvents(){this.context.graph.off(Q.AFTER_RENDER,this.drawHull),this.context.graph.off(Q.AFTER_ELEMENT_UPDATE,this.updateHullPath)}getHullStyle(t){const e=this.options,{members:n,padding:i,corner:a}=e,l=T0(e,["members","padding","corner"]);return Object.assign(Object.assign({},l),{d:this.getHullPath(t)})}getPadding(){const{graph:t}=this.context;return this.hullMemberIds.reduce((n,i)=>{const{halfExtents:a}=t.getElementRenderBounds(i),l=Math.max(a[0],a[1]);return Math.max(n,l)},0)+this.options.padding}addMember(t){const e=Array.isArray(t)?t:[t];this.options.members=[...new Set([...this.options.members,...e])],this.shape.update({d:this.getHullPath()})}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),e.some(n=>this.hullMemberIds.includes(n))&&this.shape.update({d:this.getHullPath()})}updateMember(t){this.options.members=(0,xe.Z)(t)?t(this.options.members):t,this.shape.update(this.getHullStyle(!0))}getMember(){return this.options.members}destroy(){this.unbindEvents(),this.shape.destroy(),this.hullMemberIds=[],super.destroy()}}Eu.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};var C0=y(65244);function xu(r){const{width:t,height:e,renderer:n}=r,i=N0(r),a=new _.Xz({width:t,height:e,container:i,renderer:n||new Aa.Th});return[i,a]}function N0(r){var t;const{container:e,className:n,graphCanvas:i}=r;if(e)return typeof e=="string"?document.getElementById(e):e;const a=Nl(n,!1),{width:l,height:u,containerStyle:f}=r,[m,x]=P0(r);return Object.assign(a.style,Object.assign({position:"absolute",left:m+"px",top:x+"px",width:l+"px",height:u+"px"},f)),(t=i.getContainer())===null||t===void 0||t.appendChild(a),a}function P0(r){const{width:t,height:e,placement:n,graphCanvas:i}=r,[a,l]=i.getSize(),[u,f]=ge(n);return[u*(a-t),f*(l-e)]}var k0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class wu extends ba{constructor(t,e){super(t,Object.assign({},wu.defaultOptions,e)),this.typePrefix="__data__",this.draw=!1,this.fieldMap={node:new Map,edge:new Map,combo:new Map},this.selectedItems=[],this.bindEvents=()=>{const{graph:n}=this.context;n.on(Q.AFTER_DRAW,this.createElement)},this.changeState=(n,i)=>{const{graph:a}=this.context,{typePrefix:l}=this,u=(0,da.Z)(n,[l,"id"]),f=(0,da.Z)(n,[l,"style","labelText"]),[m]=u.split("__"),x=this.fieldMap[m].get(f)||[];a.setElementState(Object.fromEntries(x==null?void 0:x.map(Z=>[Z,i])))},this.click=n=>{if(this.options.trigger==="hover")return;const i=(0,da.Z)(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?(this.selectedItems=this.selectedItems.filter(a=>a!==i),this.changeState(n,[])):(this.selectedItems.push(i),this.changeState(n,"selected"))},this.mouseleave=n=>{this.options.trigger!=="click"&&(this.selectedItems=[],this.changeState(n,[]))},this.mouseenter=n=>{if(this.options.trigger==="click")return;const i=(0,da.Z)(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?this.selectedItems=this.selectedItems.filter(a=>a!==i):(this.selectedItems.push(i),this.changeState(n,"active"))},this.setFieldMap=(n,i,a)=>{if(!n)return;const l=this.fieldMap[a];if(l)if(!l.has(n))l.set(n,[i]);else{const u=l.get(n);u&&(u.push(i),l.set(n,u))}},this.getEvents=()=>({mouseenter:this.mouseenter,mouseleave:this.mouseleave,click:this.click}),this.getMarkerData=(n,i)=>{if(!n)return[];const{model:a,element:l}=this.context,{nodes:u,edges:f,combos:m}=a.getData(),x={},Z=Dt=>(0,xe.Z)(n)?n(Dt):n,V={node:"circle",edge:"line",combo:"rect"},et={circle:"circle",ellipse:"circle",image:"bowtie",rect:"square",star:"cross",triangle:"triangle",diamond:"diamond",cubic:"dot",line:"hyphen",polyline:"hyphen",quadratic:"hv","cubic-horizontal":"hyphen","cubic-vertical":"line"},dt=(Dt,Qt)=>l==null?void 0:l.getElementComputedStyle(Dt,Qt),At=(Dt,Qt)=>{Dt.forEach(oe=>{const{id:pe}=oe,Be=(0,da.Z)(oe,["data",Z(oe)]),vn=(l==null?void 0:l.getElementType(Qt,oe))||"circle",nn=dt(Qt,oe),An=(Qt==="edge"?nn==null?void 0:nn.stroke:nn==null?void 0:nn.fill)||"#1783ff";pe&&Be&&Be.replace(/\s+/g,"")&&(this.setFieldMap(Be,pe,Qt),x[Be]||(x[Be]={id:`${Qt}__${pe}`,label:Be,marker:et[vn]||V[Qt],elementType:Qt,lineWidth:1,stroke:An,fill:An}))})};switch(i){case"node":At(u,"node");break;case"edge":At(f,"edge");break;case"combo":At(m,"combo");break;default:return[]}return Object.values(x)},this.createElement=()=>{if(this.draw){this.updateElement();return}const n=this.options,{width:i,height:a,nodeField:l,edgeField:u,comboField:f,trigger:m,position:x,container:Z,containerStyle:V,className:et}=n,dt=k0(n,["width","height","nodeField","edgeField","comboField","trigger","position","container","containerStyle","className"]),At=this.getMarkerData(l,"node"),Dt=this.getMarkerData(u,"edge"),Qt=this.getMarkerData(f,"combo"),oe=[...At,...Qt,...Dt],pe=Object.assign({width:i,height:a,data:oe,itemMarkerLineWidth:({lineWidth:nn})=>nn,itemMarker:({marker:nn})=>nn,itemMarkerStroke:({stroke:nn})=>nn,itemMarkerFill:({fill:nn})=>nn,gridCol:At.length},dt,this.getEvents()),Be=new C0.W({className:"legend",style:pe});this.category=Be,this.upsertCanvas().appendChild(Be),this.draw=!0},this.bindEvents()}update(t){super.update(t),this.clear(),this.createElement()}clear(){var t,e;(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.container)===null||e===void 0||e.remove(),this.canvas=void 0,this.container=void 0,this.draw=!1}updateElement(){this.category&&this.category.update({itemMarkerOpacity:({id:t})=>!this.selectedItems.length||this.selectedItems.includes(t)?1:.5,itemLabelOpacity:({id:t})=>!this.selectedItems.length||this.selectedItems.includes(t)?1:.5})}upsertCanvas(){if(this.canvas)return this.canvas;const t=this.context.canvas,[e,n]=t.getSize(),{width:i=e,height:a=n,position:l,container:u,containerStyle:f,className:m}=this.options,[x,Z]=xu({width:i,height:a,graphCanvas:t,container:u,containerStyle:f,placement:l,className:"legend"});return this.container=x,m&&x.classList.add(m),this.canvas=Z,this.canvas}destroy(){this.clear(),this.context.graph.off(Q.AFTER_DRAW,this.createElement),super.destroy()}}wu.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16,width:240,height:160};class Mu extends ba{constructor(t,e){super(t,Object.assign({},Mu.defaultOptions,e)),this.onDraw=n=>{var i;!((i=n==null?void 0:n.data)===null||i===void 0)&&i.render||this.onRender()},this.landmarkMap=new Map,this.mask=null,this.isMaskDragging=!1,this.onMaskDragStart=n=>{this.mask&&(this.isMaskDragging=!0,this.mask.setPointerCapture(n.pointerId),this.mask.addEventListener("pointermove",this.onMaskDrag),this.mask.addEventListener("pointerup",this.onMaskDragEnd),this.mask.addEventListener("pointercancel",this.onMaskDragEnd))},this.onMaskDrag=n=>{if(!this.mask||!this.isMaskDragging)return;const{size:[i,a]}=this.options,{movementX:l,movementY:u}=n,{left:f,top:m,width:x,height:Z}=this.mask.style,[,,V,et]=this.maskBBox;let dt=parseInt(f)+l,At=parseInt(m)+u,Dt=parseInt(x),Qt=parseInt(Z);dt<0&&(dt=0),At<0&&(At=0),dt+Dt>i&&(dt=Lo(i-Dt,0)),At+Qt>a&&(At=Lo(a-Qt,0)),Dt<V&&(l>0?(dt=Lo(dt-l,0),Dt=Ro(Dt+l,i)):l<0&&(Dt=Ro(Dt-l,i))),Qt<et&&(u>0?(At=Lo(At-u,0),Qt=Ro(Qt+u,a)):u<0&&(Qt=Ro(Qt-u,a))),Object.assign(this.mask.style,{left:dt+"px",top:At+"px",width:Dt+"px",height:Qt+"px"});const oe=parseInt(f)-dt,pe=parseInt(m)-At;if(oe===0&&pe===0)return;const Be=this.context.canvas.getCamera().getZoom(),vn=this.canvas.getCamera().getZoom(),nn=Be/vn;this.context.graph.translateBy([oe*nn,pe*nn],!1)},this.onMaskDragEnd=n=>{this.mask&&(this.isMaskDragging=!1,this.mask.releasePointerCapture(n.pointerId),this.mask.removeEventListener("pointermove",this.onMaskDrag),this.mask.removeEventListener("pointerup",this.onMaskDragEnd),this.mask.removeEventListener("pointercancel",this.onMaskDragEnd))},this.onTransform=(0,ie.Z)(()=>{this.isMaskDragging||(this.updateMask(),this.setCamera())},32,{leading:!0}),this.setOnRender(),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),"delay"in t&&this.setOnRender(),this.bindEvents()}setOnRender(){this.onRender=(0,Oo.Z)(()=>{this.renderMinimap(),this.renderMask()},this.options.delay)}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_DRAW,this.onDraw),t.on(Q.AFTER_RENDER,this.onRender),t.on(Q.AFTER_ANIMATE,this.onRender),t.on(Q.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(Q.AFTER_DRAW,this.onDraw),t.off(Q.AFTER_RENDER,this.onRender),t.off(Q.AFTER_ANIMATE,this.onRender),t.off(Q.AFTER_TRANSFORM,this.onTransform)}renderMinimap(){const t=this.getElements(),e=this.initCanvas();this.setShapes(e,t)}getElements(){const{filter:t}=this.options,{model:e,element:n}=this.context,i=e.getData(),a={nodes:i.nodes.filter(m=>n==null?void 0:n.getElement(ye(m))),edges:i.edges.filter(m=>{const x=n==null?void 0:n.getElement(ye(m));return x&&ma(x)}),combos:i.combos.filter(m=>n==null?void 0:n.getElement(ye(m)))};if(!t)return a;const{nodes:l,edges:u,combos:f}=a;return{nodes:l.filter(m=>t(ye(m),"node")),edges:u.filter(m=>t(ye(m),"edge")),combos:f.filter(m=>t(ye(m),"combo"))}}setShapes(t,e){const{nodes:n,edges:i,combos:a}=e,{shape:l}=this.options,{element:u}=this.context,f=(m,x)=>{const Z=ye(m),V=u==null?void 0:u.getElement(Z);if(!V)return;const et=V.getShape("key");let dt;if(typeof l=="string"){const At=l;dt=V.getShape(At).cloneNode()}else{const At=l(Z,x,V);At===V?dt=At.cloneNode(!0):dt=At}dt.setPosition(et.getPosition()),V.style.zIndex&&(dt.style.zIndex=V.style.zIndex),dt.id=V.id,t.appendChild(dt)};t.removeChildren(),i.forEach(m=>f(m,"edge")),a.forEach(m=>f(m,"combo")),n.forEach(m=>f(m,"node"))}initCanvas(){const{renderer:t,size:[e,n]}=this.options;if(this.canvas){const{width:i,height:a}=this.canvas.getConfig();(e!==i||n!==a)&&this.canvas.resize(e,n),t&&this.canvas.setRenderer(t)}else{const{className:i,position:a,container:l,containerStyle:u}=this.options,[f,m]=xu({renderer:t,width:e,height:n,placement:a,className:"minimap",container:l,containerStyle:u,graphCanvas:this.context.canvas});i&&f.classList.add(i),this.container=f,this.canvas=m}return this.setCamera(),this.canvas}createLandmark(t,e,n){const i=`${t.join(",")}-${e.join(",")}-${n}`;if(this.landmarkMap.has(i))return this.landmarkMap.get(i);const l=this.canvas.getCamera().createLandmark(i,{position:t,focalPoint:e,zoom:n});return this.landmarkMap.set(i,l),l}setCamera(){var t;const{canvas:e}=this.context,n=(t=this.canvas)===null||t===void 0?void 0:t.getCamera();if(!n)return;const{size:[i,a],padding:l}=this.options,[u,f,m,x]=Ne(l),{min:Z,max:V,center:et}=e.getBounds("elements"),dt=V[0]-Z[0],At=V[1]-Z[1],Dt=i-x-f,Qt=a-u-m,oe=Dt/dt,pe=Qt/At,Be=Math.min(oe,pe),vn=this.createLandmark(et,et,Be);n.gotoLandmark(vn,0)}get maskBBox(){const{canvas:t}=this.context,e=t.getSize(),n=t.getCanvasByViewport([0,0]),i=t.getCanvasByViewport(e),a=this.canvas.canvas2Viewport(Xn(n)),l=this.canvas.canvas2Viewport(Xn(i)),u=l.x-a.x,f=l.y-a.y;return[a.x,a.y,u,f]}calculateMaskBBox(){const{size:[t,e]}=this.options;let[n,i,a,l]=this.maskBBox;return n<0&&(a=Ro(a+n,t),n=0),i<0&&(l=Ro(l+i,e),i=0),n+a>t&&(a=Lo(t-n,0)),i+l>e&&(l=Lo(e-i,0)),[Ro(n,t),Ro(i,e),Lo(a,0),Lo(l,0)]}renderMask(){const{maskStyle:t}=this.options;this.mask||(this.mask=document.createElement("div"),this.mask.addEventListener("pointerdown",this.onMaskDragStart),this.mask.draggable=!0,this.mask.addEventListener("dragstart",e=>e.preventDefault&&e.preventDefault())),this.container.appendChild(this.mask),Object.assign(this.mask.style,Object.assign(Object.assign({},t),{cursor:"move",position:"absolute",pointerEvents:"auto"})),this.updateMask()}updateMask(){if(!this.mask)return;const[t,e,n,i]=this.calculateMaskBBox();Object.assign(this.mask.style,{top:e+"px",left:t+"px",width:n+"px",height:i+"px"})}destroy(){var t,e,n;this.unbindEvents(),(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.mask)===null||e===void 0||e.remove(),(n=this.container)===null||n===void 0||n.remove(),super.destroy()}}Mu.defaultOptions={size:[240,160],shape:"key",padding:10,position:"right-bottom",maskStyle:{border:"1px solid #ddd",background:"rgba(0, 0, 0, 0.1)"},containerStyle:{border:"1px solid #ddd",background:"#fff"},delay:128};const Ro=(r,t)=>Math.min(r,t),Lo=(r,t)=>Math.max(r,t);var Jh=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};const $h={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class Su extends ba{constructor(t,e){super(t,Object.assign({},Su.defaultOptions,e)),this.initSnapline=()=>{const n=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=n.appendChild(new _.x1({style:Object.assign(Object.assign({},$h),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=n.appendChild(new _.x1({style:Object.assign(Object.assign({},$h),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(n,i,a)=>Jh(this,void 0,void 0,function*(){const{verticalX:l,horizontalY:u}=a,{tolerance:f}=this.options,{min:[m,x],max:[Z,V],center:[et,dt]}=i;let At=0,Dt=0;l!==null&&(Ra(Z,l)<f&&(At=l-Z),Ra(m,l)<f&&(At=l-m),Ra(et,l)<f&&(At=l-et),At!==0&&(this.isVerticalSticking=!0)),u!==null&&(Ra(V,u)<f&&(Dt=u-V),Ra(x,u)<f&&(Dt=u-x),Ra(dt,u)<f&&(Dt=u-dt),Dt!==0&&(this.isHorizontalSticking=!0)),(At!==0||Dt!==0)&&(yield this.context.graph.translateElementBy({[n]:[At,Dt]},!1))}),this.enableSnap=n=>{const{target:i}=n,a=.5;if(this.isHorizontalSticking||this.isVerticalSticking){const[l,u]=this.getDelta(n);if(this.isHorizontalSticking&&this.isVerticalSticking&&Math.abs(l)<=a&&Math.abs(u)<=a)return this.context.graph.translateElementBy({[i.id]:[-l,-u]},!1),!1;if(this.isHorizontalSticking&&Math.abs(u)<=a)return this.context.graph.translateElementBy({[i.id]:[0,-u]},!1),!1;if(this.isVerticalSticking&&Math.abs(l)<=a)return this.context.graph.translateElementBy({[i.id]:[-l,0]},!1),!1;this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!1,setTimeout(()=>{this.enableStick=!0},200)}return this.enableStick},this.calcSnaplineMetadata=(n,i)=>{const{tolerance:a,shape:l}=this.options,{min:[u,f],max:[m,x],center:[Z,V]}=i;let et=null,dt=null,At=null,Dt=null,Qt=null,oe=null;return this.getNodes().some(pe=>{if((0,S.Z)(n.id,pe.id))return!1;const Be=Dd(pe,l).getRenderBounds(),{min:[vn,nn],max:[An,$e],center:[zn,cr]}=Be;return et===null&&(Ra(zn,Z)<a?et=zn:Ra(vn,u)<a||Ra(vn,m)<a?et=vn:(Ra(An,m)<a||Ra(An,u)<a)&&(et=An),et!==null&&(dt=Math.min(nn,f),At=Math.max($e,x))),Dt===null&&(Ra(cr,V)<a?Dt=cr:Ra(nn,f)<a||Ra(nn,x)<a?Dt=nn:(Ra($e,x)<a||Ra($e,f)<a)&&(Dt=$e),Dt!==null&&(Qt=Math.min(vn,u),oe=Math.max(An,m))),et!==null&&Dt!==null}),{verticalX:et,verticalMinY:dt,verticalMaxY:At,horizontalY:Dt,horizontalMinX:Qt,horizontalMaxX:oe}},this.onDragStart=()=>{this.initSnapline()},this.onDrag=n=>Jh(this,void 0,void 0,function*(){const{target:i}=n;if(this.options.autoSnap&&!this.enableSnap(n))return;const a=Dd(i,this.options.shape).getRenderBounds(),l=this.calcSnaplineMetadata(i,a);this.hideSnapline(),(l.verticalX!==null||l.horizontalY!==null)&&this.updateSnapline(l),this.options.autoSnap&&(yield this.autoSnapToLine(i.id,a,l))}),this.onDragEnd=()=>{this.hideSnapline()},this.bindEvents()}getNodes(){var t;const{filter:e}=this.options,i=(((t=this.context.element)===null||t===void 0?void 0:t.getNodes())||[]).filter(a=>{var l;return ma(a)&&((l=this.context.viewport)===null||l===void 0?void 0:l.isInViewport(a.getRenderBounds()))});return e?i.filter(a=>e(a)):i}hideSnapline(){this.horizontalLine.style.visibility="hidden",this.verticalLine.style.visibility="hidden"}getLineWidth(t){const{lineWidth:e}=this.options[`${t}LineStyle`];return+(e||$h.lineWidth||1)/this.context.graph.getZoom()}updateSnapline(t){const{verticalX:e,verticalMinY:n,verticalMaxY:i,horizontalY:a,horizontalMinX:l,horizontalMaxX:u}=t,[f,m]=this.context.canvas.getSize(),{offset:x}=this.options;a!==null?Object.assign(this.horizontalLine.style,{x1:x===1/0?0:l-x,y1:a,x2:x===1/0?f:u+x,y2:a,visibility:"visible",lineWidth:this.getLineWidth("horizontal")}):this.horizontalLine.style.visibility="hidden",e!==null?Object.assign(this.verticalLine.style,{x1:e,y1:x===1/0?0:n-x,x2:e,y2:x===1/0?m:i+x,visibility:"visible",lineWidth:this.getLineWidth("vertical")}):this.verticalLine.style.visibility="hidden"}getDelta(t){const e=this.context.graph.getZoom();return ot([t.dx,t.dy],e)}bindEvents(){return Jh(this,void 0,void 0,function*(){const{graph:t}=this.context;t.on(Ct.DRAG_START,this.onDragStart),t.on(Ct.DRAG,this.onDrag),t.on(Ct.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:t}=this.context;t.off(Ct.DRAG_START,this.onDragStart),t.off(Ct.DRAG,this.onDrag),t.off(Ct.DRAG_END,this.onDragEnd)}destroyElements(){var t,e;(t=this.horizontalLine)===null||t===void 0||t.destroy(),(e=this.verticalLine)===null||e===void 0||e.destroy()}destroy(){this.destroyElements(),this.unbindEvents(),super.destroy()}}Su.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const Ra=(r,t)=>Math.abs(r-t),Dd=(r,t)=>typeof t=="function"?t(r):r.getShape(t);var R0=y(91498),L0=y(39934),D0=y(21790),I0=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},B0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const F0=["timestamp","time","date","datetime"];class Au extends ba{get padding(){return Ne(this.options.padding)}constructor(t,e){super(t,Object.assign({},Au.defaultOptions,e)),this.backup(),this.upsertTimebar()}play(){var t;(t=this.timebar)===null||t===void 0||t.play()}pause(){var t;(t=this.timebar)===null||t===void 0||t.pause()}forward(){var t;(t=this.timebar)===null||t===void 0||t.forward()}backward(){var t;(t=this.timebar)===null||t===void 0||t.backward()}reset(){var t;(t=this.timebar)===null||t===void 0||t.reset()}update(t){super.update(t),this.backup(),this.upsertTimebar()}backup(){this.originalData=Id(this.context.graph.getData())}upsertTimebar(){const{canvas:t}=this.context,e=this.options,{onChange:n,timebarType:i,data:a,x:l,y:u,width:f,height:m,mode:x}=e,Z=B0(e,["onChange","timebarType","data","x","y","width","height","mode"]),V=t.getSize(),[et]=this.padding;this.upsertCanvas().ready.then(()=>{var dt;const At=Object.assign(Object.assign({x:V[0]/2-f/2,y:et,onChange:Dt=>{const Qt=((0,L0.Z)(Dt)?Dt:[Dt,Dt]).map(oe=>(0,D0.Z)(oe)?oe.getTime():oe);this.options.mode==="modify"?this.filterElements(Qt):this.hiddenElements(Qt),n==null||n(Qt)}},Z),{data:a.map(Dt=>(0,on.Z)(Dt)?{time:Dt,value:0}:Dt),width:f,height:m,type:i});this.timebar?this.timebar.update(At):(this.timebar=new R0.s({style:At}),(dt=this.canvas)===null||dt===void 0||dt.appendChild(this.timebar))})}upsertCanvas(){if(this.canvas)return this.canvas;const{className:t,height:e,position:n}=this.options,i=this.context.canvas,[a]=i.getSize(),[l,,u]=this.padding,[f,m]=xu({width:a,height:e+l+u,graphCanvas:i,className:"timebar",placement:n});return this.container=f,t&&f.classList.add(t),this.canvas=m,this.canvas}filterElements(t){return I0(this,void 0,void 0,function*(){var e;if(!this.originalData)return;const{elementTypes:n,getTime:i}=this.options,{graph:a,element:l}=this.context,u=Id(this.originalData);n.forEach(m=>{const x=`${m}s`;u[x]=(this.originalData[x]||[]).filter(Z=>{const V=i(Z);return!!Bd(V,t)})});const f=[...u.nodes,...u.combos].map(m=>ye(m));u.edges=u.edges.filter(m=>{const x=m.source,Z=m.target;return f.includes(x)&&f.includes(Z)}),a.setData(u),yield(e=l.draw({animation:!1,silence:!0}))===null||e===void 0?void 0:e.finished})}hiddenElements(t){const{graph:e}=this.context,{elementTypes:n,getTime:i}=this.options,a=[],l=[];n.forEach(u=>{var f;const m=`${u}s`;(((f=this.originalData)===null||f===void 0?void 0:f[m])||[]).forEach(Z=>{const V=ye(Z),et=i(Z);Bd(et,t)?l.push(V):a.push(V)})}),e.hideElement(a,!1),e.showElement(l,!1)}destroy(){var t,e,n;const{graph:i}=this.context;this.originalData&&i.setData(Object.assign({},this.originalData)),(t=this.timebar)===null||t===void 0||t.destroy(),(e=this.canvas)===null||e===void 0||e.destroy(),(n=this.container)===null||n===void 0||n.remove(),this.originalData=void 0,this.container=void 0,this.timebar=void 0,this.canvas=void 0,super.destroy()}}Au.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:r=>_0(r,F0,void 0),loop:!1};const Id=r=>{const{nodes:t=[],edges:e=[],combos:n=[]}=r;return{nodes:[...t],edges:[...e],combos:[...n]}},Bd=(r,t)=>{if((0,on.Z)(t))return r===t;const[e,n]=t;return r>=e&&r<=n},_0=(r,t,e)=>{var n;for(let i=0;i<t.length;i++){const a=t[i],l=(n=r.data)===null||n===void 0?void 0:n[a];if(l)return l}return e};var Z0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const Fd={fill:"#1D2129",wordWrap:!0,maxLines:1,textOverflow:"ellipsis",textBaseline:"top",textAlign:"start",x:0},z0=Object.assign(Object.assign({},Fd),{fillOpacity:.9,fontSize:16,fontWeight:"bold"}),j0=Object.assign(Object.assign({},Fd),{fillOpacity:.65,fontSize:12,fontWeight:"normal"}),W0={align:"left",spacing:8,size:44,padding:[16,24,0,24]},qh="title",_d="subtitle";class G0 extends ba{get padding(){return Ne(this.options.padding)}constructor(t,e){const n=Object.assign({},W0,e);super(t,n),this.onRender=()=>{const i=this.updateCanvas();this.renderTitle(i)},this.bindEvents()}bindEvents(){const{graph:t}=this.context;t.on(Q.AFTER_RENDER,this.onRender),t.on(Q.AFTER_ANIMATE,this.onRender)}unbindEvents(){const{graph:t}=this.context;t.off(Q.AFTER_RENDER,this.onRender),t.off(Q.AFTER_ANIMATE,this.onRender)}destroy(){var t,e;this.unbindEvents(),(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.container)===null||e===void 0||e.remove(),super.destroy()}updateCanvas(){const{size:t,className:e,align:n}=this.options,[i]=this.context.canvas.getSize(),[a=0,,l=0]=this.padding,u=t+a+l;if(this.canvas){const{width:f,height:m}=this.canvas.getConfig();(i!==f||u!==m)&&this.canvas.resize(i,u)}else{const f={left:"left-top",center:"top",right:"right-top"},[m,x]=xu({width:i,height:u,placement:f[n]||f.left,className:"title-canvas",graphCanvas:this.context.canvas});e&&m.classList.add(e),this.container=m,this.canvas=x}return this.canvas}renderTitle(t){const e=new U0({options:this.options,ctx:this.context});t.removeChildren(),e.getTitle().forEach(n=>{n&&t.appendChild(n)})}}class U0{get padding(){return Ne(this.options.padding)}constructor(t){const{options:e,ctx:n}=t;this.options=e,this.context=n}getTitle(){const t=this.options,e=qh,n=t[e],i=_d,a=t[i],{spacing:l=44,padding:u,align:f}=t,m=Z0(t,[typeof e=="symbol"?e:e+"",typeof i=="symbol"?i:i+"","spacing","padding","align"]),x=n,Z=a,V=wi(m,qh),et=wi(m,_d),[dt]=this.context.graph.getSize(),[At=0,Dt=0,,Qt=0]=this.padding,oe=dt,pe=oe-Qt-Dt;let Be=null,vn=Qt,nn="left";switch(f){case"left":vn=Qt,nn="left";break;case"center":vn=oe/2,nn="center";break;case"right":vn=oe-Dt,nn="right";break;default:vn=Qt,nn="left"}const An=new fa({className:qh,style:Object.assign(Object.assign(Object.assign(Object.assign({},z0),{wordWrapWidth:pe-5,x:vn,y:At,textAlign:nn}),V),{text:x})}),$e=An.getBBox();return Z&&(Be=new fa({className:"subTitle",style:Object.assign(Object.assign(Object.assign(Object.assign({},j0),{wordWrapWidth:pe-5,x:vn,y:$e.height+l+At,textAlign:nn}),et),{text:Z})})),[An,Be]}}function V0(r){const t={top:"unset",right:"unset",bottom:"unset",left:"unset"};return r.split("-").forEach(n=>{t[n]="8px"}),t.flexDirection=r.startsWith("top")||r.startsWith("bottom")?"row":"column",t}const Y0=`
|
|
|
.g6-toolbar {
|
|
|
position: absolute;
|
|
|
z-index: 100;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border-radius: 4px;
|
|
|
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
|
|
|
opacity: 0.65;
|
|
|
}
|
|
|
.g6-toolbar .g6-toolbar-item {
|
|
|
display: inline-block;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
padding: 4px;
|
|
|
cursor: pointer;
|
|
|
box-sizing: content-box;
|
|
|
}
|
|
|
|
|
|
.g6-toolbar .g6-toolbar-item:hover {
|
|
|
background-color: #f0f0f0;
|
|
|
}
|
|
|
|
|
|
.g6-toolbar .g6-toolbar-item svg {
|
|
|
display: inline-block;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
`,H0=`
|
|
|
<svg>
|
|
|
<symbol id="zoom-in" viewBox="64 64 896 896">
|
|
|
<path d="M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="zoom-out" viewBox="64 64 896 896">
|
|
|
<path d="M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="edit" viewBox="64 64 896 896">
|
|
|
<path d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="delete" viewBox="64 64 896 896">
|
|
|
<path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="redo" viewBox="64 64 896 896">
|
|
|
<path d="M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="undo" viewBox="64 64 896 896">
|
|
|
<path d="M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="export" viewBox="64 64 896 896">
|
|
|
<path d="M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="auto-fit" viewBox="64 64 896 896">
|
|
|
<path d="M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"></path>
|
|
|
<path d="M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="reset" viewBox="64 64 896 896">
|
|
|
<path d="M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"></path>
|
|
|
</symbol>
|
|
|
<symbol id="exit-fullscreen" viewBox="0 0 1024 1024">
|
|
|
<path d="M418.13333333 361.43786666c0 0.2048-0.13653333 0.4096-0.13653334 0.68266667C417.99679999 362.32533333 418.13333333 362.53013333 418.13333333 362.73493333 418.13333333 371.54133333 414.44693333 379.392 408.78079999 385.39946666 408.43946666 385.7408 408.30293333 386.21866666 408.02986666 386.49173333c-1.09226667 1.09226667-2.59413333 1.77493333-3.82293333 2.73066667C398.40426666 393.65973333 391.64586666 396.8 383.93173333 396.8 383.72693333 396.8 383.59039999 396.73173333 383.38559999 396.73173333S382.97599999 396.8 382.77119999 396.8L112.29866666 396.8C92.50133333 396.8 76.79999999 381.50826666 76.79999999 362.66666666 76.66346666 343.89333333 92.63786666 328.53333333 112.16213333 328.53333333l189.44 0L87.44959999 114.51733333C73.59146666 100.59093333 73.25013333 78.5408 86.63039999 65.29706666c13.17546667-13.44853333 35.36213333-12.97066667 49.152 0.88746667l214.08426667 214.08426667L349.86666666 90.89706666C349.79839999 71.23626666 365.22666666 55.46666666 383.99999999 55.46666666 402.77333333 55.33013333 418.13333333 71.30453333 418.13333333 90.8288L418.13333333 361.43786666zM928.90453333 328.53333333l-189.44 0 214.15253333-214.08426667c13.85813333-13.9264 14.19946667-35.90826667 0.88746667-49.22026666-13.17546667-13.44853333-35.36213333-12.97066667-49.152 0.88746666l-214.08426667 214.08426667L691.26826666 90.89706666C691.26826666 71.23626666 675.83999999 55.46666666 657.06666666 55.46666666 638.29333333 55.33013333 622.93333333 71.30453333 622.93333333 90.8288l0 270.60906666c0 0.2048 0.13653333 0.4096 0.13653333 0.68266667C623.06986666 362.32533333 622.93333333 362.53013333 622.93333333 362.73493333 622.93333333 371.54133333 626.61973333 379.392 632.28586666 385.39946666c0.34133333 0.34133333 0.47786667 0.8192 0.8192 1.09226667 1.09226667 1.09226667 2.59413333 1.77493333 3.8912 2.73066667C642.66239999 393.65973333 649.42079999 396.8 657.13493333 396.8c0.2048 0 0.34133333-0.06826667 0.54613333-0.06826667S658.09066666 396.8 658.29546666 396.8l270.5408 0C948.56533333 396.8 964.26666666 381.50826666 964.26666666 362.66666666 964.40319999 343.89333333 948.42879999 328.53333333 928.90453333 328.53333333zM418.13333333 635.73333333c0-8.8064-3.6864-16.5888-9.35253334-22.66453333C408.43946666 612.72746666 408.30293333 612.2496 408.02986666 611.90826666 406.86933333 610.88426666 405.43573333 610.2016 404.20693333 609.24586666 398.47253333 604.80853333 391.64586666 601.6 383.93173333 601.6 383.72693333 601.6 383.59039999 601.73653333 383.38559999 601.73653333S382.97599999 601.6 382.77119999 601.6L112.29866666 601.6C92.50133333 601.6 76.79999999 616.96 76.79999999 635.73333333 76.66346666 654.50666666 92.63786666 669.86666666 112.16213333 669.86666666l189.44 0-214.15253334 214.15253334c-13.85813333 13.85813333-14.19946667 35.84-0.88746666 49.22026666 13.17546667 13.44853333 35.36213333 12.9024 49.152-0.95573333l214.08426666-214.08426667 0 189.37173334c0 19.59253333 15.42826667 35.49866667 34.2016 35.36213333C402.77333333 943.2064 418.13333333 927.232 418.13333333 907.5712L418.13333333 637.09866666c0-0.27306667-0.13653333-0.47786667-0.13653334-0.68266666C417.99679999 636.14293333 418.13333333 635.93813333 418.13333333 635.73333333zM739.46453333 669.86666666l189.44 0c19.456 0 35.49866667-15.36 35.36213333-34.13333333C964.26666666 616.96 948.56533333 601.6 928.76799999 601.6L658.29546666 601.6C658.09066666 601.6 657.88586666 601.73653333 657.68106666 601.73653333S657.33973333 601.6 657.13493333 601.6C649.42079999 601.6 642.59413333 604.80853333 636.85973333 609.24586666 635.63093333 610.2016 634.19733333 610.88426666 633.03679999 611.90826666 632.76373333 612.2496 632.62719999 612.72746666 632.28586666 613.0688 626.61973333 619.14453333 622.93333333 626.92693333 622.93333333 635.73333333c0 0.2048 0.13653333 0.4096 0.13653333 0.68266667C623.06986666 636.6208 622.93333333 636.8256 622.93333333 637.09866666l0 270.5408C622.93333333 927.232 638.29333333 943.2064 657.06666666 942.93333333c18.77333333 0.13653333 34.2016-15.70133333 34.2016-35.36213333l0-189.37173334 214.08426667 214.08426667c13.78986667 13.85813333 35.90826667 14.40426667 49.152 0.95573333 13.312-13.312 12.97066667-35.36213333-0.88746667-49.22026666L739.46453333 669.86666666z" ></path></symbol>
|
|
|
<symbol id="request-fullscreen" viewBox="0 0 1024 1024">
|
|
|
<path d="M69.818182 87.598545v273.128728a34.909091 34.909091 0 0 0 69.818182 0V163.653818l221.928727 222.021818a33.512727 33.512727 0 0 0 47.383273-47.383272L186.926545 116.363636h197.073455a34.909091 34.909091 0 0 0 0-69.818181H110.871273C85.364364 46.545455 69.818182 59.671273 69.818182 87.598545zM938.542545 46.545455H665.413818a34.909091 34.909091 0 0 0 0 69.818181h197.073455L640.465455 338.292364a33.512727 33.512727 0 0 0 47.383272 47.383272l221.928728-222.021818v197.073455a34.909091 34.909091 0 0 0 69.818181 0V87.598545c0-27.927273-15.453091-41.053091-40.96-41.05309z m-827.671272 907.636363h273.128727a34.909091 34.909091 0 0 0 0-69.818182H186.926545l222.021819-221.928727a33.512727 33.512727 0 0 0-47.383273-47.383273L139.636364 837.073455V640a34.909091 34.909091 0 0 0-69.818182 0v273.128727c0 27.927273 15.546182 41.053091 41.053091 41.053091z m868.724363-41.053091V640a34.909091 34.909091 0 0 0-69.818181 0v197.073455L687.941818 615.051636a33.512727 33.512727 0 0 0-47.383273 47.383273L862.487273 884.363636H665.413818a34.909091 34.909091 0 0 0 0 69.818182h273.128727c25.6 0 41.053091-13.125818 41.053091-41.053091z" ></path></symbol>
|
|
|
</svg>
|
|
|
`;var Zd=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Ou extends ba{constructor(t,e){super(t,Object.assign({},Ou.defaultOptions,e)),this.$element=Nl("toolbar",!1),this.onToolbarItemClick=i=>{const{onClick:a}=this.options;if(i.target instanceof Element&&i.target.className.includes("g6-toolbar-item")){const l=i.target.getAttribute("value");a==null||a(l,i.target)}};const n=this.context.canvas.getContainer();this.$element.style.display="flex",n.appendChild(this.$element),Vh("g6-toolbar-css","style",{},Y0,document.head),Vh("g6-toolbar-svgicon","div",{display:"none"},H0),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return Zd(this,void 0,void 0,function*(){e.update.call(this,t);const{className:n,position:i,style:a}=this.options;this.$element.className=`g6-toolbar ${n||""}`,Object.assign(this.$element.style,a,V0(i)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return Zd(this,void 0,void 0,function*(){return(yield this.options.getItems()).map(e=>{var n;return`
|
|
|
<div class="g6-toolbar-item" value="${e.value}" title="${(n=e.title)!==null&&n!==void 0?n:""}">
|
|
|
<svg aria-hidden="true" focusable="false">
|
|
|
<use xlink:href="#${e.id}"></use>
|
|
|
</svg>
|
|
|
</div>`}).join("")})}}Ou.defaultOptions={position:"top-left"};var X0=y(75242),zd=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Tu extends ba{constructor(t,e){super(t,Object.assign({},Tu.defaultOptions,e)),this.currentTarget=null,this.tooltipElement=null,this.container=null,this.isEnable=(n,i)=>{const{enable:a}=this.options;return typeof a=="function"?a(n,i):a},this.onClick=n=>{const{target:{id:i}}=n;this.currentTarget===i?this.hide(n):this.show(n)},this.onPointerMove=n=>{const{target:i}=n;!this.currentTarget||i.id===this.currentTarget||this.show(n)},this.onPointerLeave=n=>{this.hide(n)},this.onCanvasMove=n=>{this.hide(n)},this.onPointerOver=n=>{this.show(n)},this.showById=n=>zd(this,void 0,void 0,function*(){const i={target:{id:n}};yield this.show(i)}),this.getElementData=(n,i)=>{const{model:a}=this.context;switch(i){case"node":return a.getNodeData([n]);case"edge":return a.getEdgeData([n]);case"combo":return a.getComboData([n]);default:return[]}},this.show=n=>zd(this,void 0,void 0,function*(){var i,a;const{client:l,target:{id:u}}=n;if(Ta(n.target))return;const f=this.context.graph.getElementType(u),{getContent:m,title:x}=this.options,Z=this.getElementData(u,f);if(!this.tooltipElement||!this.isEnable(n,Z))return;let V={};if(m){if(V.content=yield m(n,Z),!V.content)return}else{const At=this.context.graph.getElementRenderStyle(u),Dt=f==="node"?At.fill:At.stroke;V={title:x||f,data:Z.map(Qt=>({name:"ID",value:Qt.id||`${Qt.source} -> ${Qt.target}`,color:Dt}))}}this.currentTarget=u;let et,dt;if(l)et=l.x,dt=l.y;else{const At=(0,da.Z)(Z,"0.style",{x:0,y:0});et=At.x,dt=At.y}(a=(i=this.options).onOpenChange)===null||a===void 0||a.call(i,!0),this.tooltipElement.update(Object.assign(Object.assign(Object.assign({},this.tooltipStyleProps),{x:et,y:dt,style:{".tooltip":{visibility:"visible"}}}),V))}),this.hide=n=>{var i,a,l,u,f;if(!n){(a=(i=this.options).onOpenChange)===null||a===void 0||a.call(i,!1),(l=this.tooltipElement)===null||l===void 0||l.hide(),this.currentTarget=null;return}if(!this.tooltipElement||!this.currentTarget)return;const{client:{x:m,y:x}}=n;(f=(u=this.options).onOpenChange)===null||f===void 0||f.call(u,!1),this.tooltipElement.hide(m,x),this.currentTarget=null},this.initTooltip=()=>{var n;const i=new X0.u({className:"tooltip",style:this.tooltipStyleProps});return(n=this.container)===null||n===void 0||n.appendChild(i.HTMLTooltipElement),i},this.render(),this.bindEvents()}getEvents(){return this.options.trigger==="click"?{"node:click":this.onClick,"edge:click":this.onClick,"combo:click":this.onClick,"canvas:click":this.onPointerLeave,contextmenu:this.onPointerLeave,drag:this.onPointerLeave}:{"node:pointerover":this.onPointerOver,"node:pointermove":this.onPointerMove,"canvas:pointermove":this.onCanvasMove,"edge:pointerover":this.onPointerOver,"edge:pointermove":this.onPointerMove,"combo:pointerover":this.onPointerOver,"combo:pointermove":this.onPointerMove,contextmenu:this.onPointerLeave,"node:drag":this.onPointerLeave}}update(t){var e;this.unbindEvents(),super.update(t),this.tooltipElement&&((e=this.container)===null||e===void 0||e.removeChild(this.tooltipElement.HTMLTooltipElement)),this.tooltipElement=this.initTooltip(),this.bindEvents()}render(){const{canvas:t}=this.context,e=t.getContainer();e&&(this.container=e,this.tooltipElement=this.initTooltip())}unbindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.off(n,e[n])})}bindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.on(n,e[n])})}get tooltipStyleProps(){const{canvas:t}=this.context,{center:e}=t.getBounds(),n=t.getContainer(),{top:i,left:a}=n.getBoundingClientRect(),{style:l,position:u,enterable:f,container:m={x:-a,y:-i},title:x,offset:Z}=this.options,[V,et]=e,[dt,At]=t.getSize();return{x:V,y:et,container:m,title:x,bounding:{x:0,y:0,width:dt,height:At},position:u,enterable:f,offset:Z,style:l}}destroy(){var t;this.unbindEvents(),this.tooltipElement&&((t=this.container)===null||t===void 0||t.removeChild(this.tooltipElement.HTMLTooltipElement)),super.destroy()}}Tu.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var jd=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};let kl;function Wd(r,t){return kl||(kl=document.createElement("canvas")),kl.width=r,kl.height=t,kl.getContext("2d").clearRect(0,0,r,t),kl}function K0(r,t,e,n){return jd(this,void 0,void 0,function*(){const i=Wd(r,t),a=i.getContext("2d"),{rotate:l,opacity:u,textFill:f,textFontSize:m,textFontFamily:x,textFontVariant:Z,textFontWeight:V,textAlign:et,textBaseline:dt}=n;return a.textAlign=et,a.textBaseline=dt,a.translate(r/2,t/2),a.font=`${m}px ${x} ${Z} ${V}`,l&&a.rotate(l),u&&(a.globalAlpha=u),f&&(a.fillStyle=f,a.fillText(`${e}`,0,0)),i.toDataURL()})}function Q0(r,t,e,n){return jd(this,void 0,void 0,function*(){const i=Wd(r,t),a=i.getContext("2d"),{rotate:l,opacity:u}=n;l&&a.rotate(l),u&&(a.globalAlpha=u);const f=new Image;return f.crossOrigin="anonymous",f.src=e,new Promise(m=>{f.onload=function(){const x=r>f.width?(r-f.width)/2:0,Z=t>f.height?(t-f.height)/2:0;a.drawImage(f,0,0,f.width,f.height,x,Z,r-x*2,t-Z*2),m(i.toDataURL())}})})}var J0=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},$0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Cu extends ba{constructor(t,e){super(t,Object.assign({},Cu.defaultOptions,e)),this.$element=Nl("watermark"),this.context.canvas.getContainer().appendChild(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return J0(this,void 0,void 0,function*(){e.update.call(this,t);const n=this.options,{width:i,height:a,text:l,imageURL:u}=n,f=$0(n,["width","height","text","imageURL"]);Object.keys(f).forEach(x=>{x.startsWith("background")&&(this.$element.style[x]=t[x])});const m=u?yield Q0(i,a,u,f):yield K0(i,a,l,f);this.$element.style.backgroundImage=`url(${m})`})}destroy(){super.destroy(),this.$element.remove()}}Cu.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};const q0=["#7E92B5","#F4664A","#FFBE3A"],tv={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},ev={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function Gd(r){const{bgColor:t,textColor:e,nodeColor:n,nodeColorDisabled:i,nodeStroke:a,nodeHaloStrokeOpacityActive:l=.15,nodeHaloStrokeOpacitySelected:u=.25,nodeOpacityDisabled:f=.06,nodeIconOpacityInactive:m=.85,nodeOpacityInactive:x=.25,nodeBadgePalette:Z=q0,nodePaletteOptions:V=tv,edgeColor:et,edgeColorDisabled:dt,edgePaletteOptions:At=ev,comboColor:Dt,comboColorDisabled:Qt,comboStroke:oe,comboStrokeDisabled:pe,edgeColorInactive:Be}=r;return{background:t,node:{palette:V,style:{donutOpacity:1,badgeBackgroundOpacity:1,badgeFill:"#fff",badgeFontSize:8,badgePadding:[0,4],badgePalette:Z,fill:n,fillOpacity:1,halo:!1,iconFill:"#fff",iconOpacity:1,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelFill:e,labelFillOpacity:.85,labelLineHeight:16,labelPadding:[0,2],labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelOffsetY:2,lineWidth:0,portFill:n,portLineWidth:1,portStroke:a,portStrokeOpacity:.65,size:32,stroke:a,strokeOpacity:1,zIndex:2},state:{selected:{halo:!0,haloLineWidth:24,haloStrokeOpacity:u,labelFontSize:12,labelFontWeight:"bold",lineWidth:4,stroke:a},active:{halo:!0,haloLineWidth:12,haloStrokeOpacity:l},highlight:{labelFontWeight:"bold",lineWidth:4,stroke:a,strokeOpacity:.85},inactive:{badgeBackgroundOpacity:x,donutOpacity:x,fillOpacity:x,iconOpacity:m,labelFill:e,labelFillOpacity:x,strokeOpacity:x},disabled:{badgeBackgroundOpacity:.25,donutOpacity:f,fill:i,fillOpacity:f,iconFill:i,iconOpacity:.25,labelFill:e,labelFillOpacity:.25,strokeOpacity:f}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"node-expand",collapse:"node-collapse",update:[{fields:["x","y","fill","stroke"]}],translate:[{fields:["x","y"]}]}},edge:{palette:At,style:{badgeBackgroundFill:et,badgeFill:"#fff",badgeFontSize:8,badgeOffsetX:10,badgeBackgroundOpacity:1,fillOpacity:1,halo:!1,haloLineWidth:12,haloStrokeOpacity:1,increasedLineWidthForHitTesting:2,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[4,4,4,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelPlacement:"center",labelTextBaseline:"middle",lineWidth:1,stroke:et,strokeOpacity:1,zIndex:1},state:{selected:{halo:!0,haloStrokeOpacity:.25,labelFontSize:14,labelFontWeight:"bold",lineWidth:3},active:{halo:!0,haloStrokeOpacity:.15},highlight:{labelFontWeight:"bold",lineWidth:3},inactive:{stroke:Be,fillOpacity:.08,labelOpacity:.25,strokeOpacity:.08,badgeBackgroundOpacity:.25},disabled:{stroke:dt,fillOpacity:.45,strokeOpacity:.45,labelOpacity:.25,badgeBackgroundOpacity:.45}},animation:{enter:"fade",exit:"fade",expand:"path-in",collapse:"path-out",show:"fade",hide:"fade",update:[{fields:["sourceNode","targetNode"]},{fields:["stroke"],shape:"key"}],translate:[{fields:["sourceNode","targetNode"]}]}},combo:{style:{collapsedMarkerFill:t,collapsedMarkerFontSize:12,collapsedMarkerFillOpacity:1,collapsedSize:32,collapsedFillOpacity:1,fill:Dt,halo:!1,haloLineWidth:12,haloStroke:oe,haloStrokeOpacity:.25,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[2,4,2,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,lineDash:0,lineWidth:1,fillOpacity:.04,strokeOpacity:1,padding:10,stroke:oe},state:{selected:{halo:!0,labelFontSize:14,labelFontWeight:700,lineWidth:4},active:{halo:!0},highlight:{labelFontWeight:700,lineWidth:4},inactive:{fillOpacity:.65,labelOpacity:.25,strokeOpacity:.65},disabled:{fill:Qt,fillOpacity:.25,labelOpacity:.25,stroke:pe,strokeOpacity:.25}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"combo-expand",collapse:"combo-collapse",update:[{fields:["x","y"]},{fields:["fill","stroke","lineWidth"],shape:"key"}],translate:[{fields:["x","y"]}]}}}}const nv=Gd({bgColor:"#000000",comboColor:"#fdfdfd",comboColorDisabled:"#d0e4ff",comboStroke:"#99add1",comboStrokeDisabled:"#969696",edgeColor:"#637088",edgeColorDisabled:"#637088",edgeColorInactive:"#D0E4FF",edgePaletteOptions:{type:"group",color:["#637088","#0F55A6","#008383","#9C5D38","#8B53A6","#4E40A6","#8F6608","#3E801D","#A65383","#175E75","#0F8248"]},nodeColor:"#1783ff",nodeColorDisabled:"#D0E4FF",nodeHaloStrokeOpacityActive:.25,nodeHaloStrokeOpacitySelected:.45,nodeIconOpacityInactive:.45,nodeOpacityDisabled:.25,nodeOpacityInactive:.45,nodeStroke:"#d0e4ff",textColor:"#ffffff"}),rv=Gd({bgColor:"#ffffff",comboColor:"#99ADD1",comboColorDisabled:"#f0f0f0",comboStroke:"#99add1",comboStrokeDisabled:"#d9d9d9",edgeColor:"#99add1",edgeColorDisabled:"#d9d9d9",edgeColorInactive:"#1B324F",nodeColor:"#1783ff",nodeColorDisabled:"#1B324F",nodeHaloStrokeOpacityActive:.15,nodeHaloStrokeOpacitySelected:.25,nodeIconOpacityInactive:.85,nodeOpacityDisabled:.06,nodeOpacityInactive:.25,nodeStroke:"#000000",textColor:"#000000"});class Do extends ft{beforeDraw(t,e){return t}afterLayout(t,e){}}class iv extends Do{beforeDraw(t){const{model:e}=this.context,n=t.add.combos,i=a=>{const l=[];return a.forEach((u,f)=>{const x=e.getAncestorsData(f,"combo").map(Z=>ye(Z)).reverse();l.push([f,u,x.length])}),new Map(l.sort(([,,u],[,,f])=>f-u).map(([u,f])=>[u,f]))};return t.add.combos=i(n),t.update.combos=i(t.update.combos),t}}function cs(r,t,e,n,i){const a=ye(n),l=`${e}s`,u=i?n:r.add[l].get(a)||r.update[l].get(a)||r.remove[l].get(a)||n;Object.entries(r).forEach(([f,m])=>{t===f?m[l].set(a,u):m[l].delete(a)})}function Nu(r,t){return Object.keys(r).every(e=>r[e]===t[e])}class av extends Do{beforeDraw(t,e){if(e.stage==="visibility"||!this.context.model.model.hasTreeStructure(Ht))return t;const{model:n}=this.context,{add:i,update:a}=t,l=[...t.update.combos.entries(),...t.add.combos.entries()];for(;l.length;){const[u,f]=l.pop();if(ha(f)){const m=n.getDescendantsData(u),x=m.map(ye),{internal:Z,external:V}=sr(x,et=>n.getRelatedEdgesData(et));m.forEach(et=>{const dt=ye(et),At=l.findIndex(([Qt])=>Qt===dt);At!==-1&&l.splice(At,1);const Dt=n.getElementType(dt);cs(t,"remove",Dt,et)}),Z.forEach(et=>cs(t,"remove","edge",et)),V.forEach(et=>{var dt;const At=ye(et);((dt=this.context.element)===null||dt===void 0?void 0:dt.getElement(At))?a.edges.set(At,et):i.edges.set(At,et)})}else{const m=n.getChildrenData(u),x=m.map(ye),{edges:Z}=sr(x,V=>n.getRelatedEdgesData(V));[...m,...Z].forEach(V=>{var et;const dt=ye(V),At=n.getElementType(dt);((et=this.context.element)===null||et===void 0?void 0:et.getElement(dt))?cs(t,"update",At,V):cs(t,"add",At,V),At==="combo"&&l.push([dt,V])})}}return t}}const Ud=(r,t,e,n)=>{const i=`${e}s`,a=ye(n);!r.add[i].has(a)&&!r.update[i].has(a)&&r[t][i].set(ye(n),n)};class sv extends Do{getElement(t){return this.context.element.getElement(t)}handleExpand(t,e){if(Ud(e,"add","node",t),ha(t))return;const n=ye(t);Ud(e,"add","node",t),this.context.model.getRelatedEdgesData(n).forEach(l=>{cs(e,"add","edge",l)}),this.context.model.getChildrenData(n).forEach(l=>{this.handleExpand(l,e)})}beforeDraw(t){const{graph:e,model:n}=this.context;if(!n.model.hasTreeStructure(de))return t;const{add:{nodes:i,edges:a},update:{nodes:l}}=t,u=new Map,f=new Map;i.forEach((x,Z)=>{ha(x)&&u.set(Z,x)}),a.forEach(x=>{if(e.getElementType(x.source)!=="node")return;const Z=e.getNodeData(x.source);ha(Z)&&u.set(x.source,Z)}),l.forEach((x,Z)=>{const V=this.getElement(Z);if(!V)return;const et=V.attributes.collapsed;ha(x)?et||u.set(Z,x):et&&f.set(Z,x)});const m=new Set;return u.forEach((x,Z)=>{n.getDescendantsData(Z).forEach(et=>{const dt=ye(et);if(m.has(dt))return;cs(t,"remove","node",et),n.getRelatedEdgesData(dt).forEach(Dt=>{cs(t,"remove","edge",Dt)}),m.add(dt)})}),f.forEach((x,Z)=>{if(n.getAncestorsData(Z,de).some(ha)){cs(t,"remove","node",x);return}this.handleExpand(x,t)}),t}}const td=new WeakMap;function $v(r,t,e){td.has(r)||td.set(r,{});const n=td.get(r);if(!n[t])return n[t]=e,!0;const i=n[t];return Vd(i,e)?!1:(n[t]=e,!0)}const Vd=(r,t,e=2)=>{if(typeof r!="object"||typeof t!="object")return r===t;const n=Object.keys(r),i=Object.keys(t);if(n.length!==i.length)return!1;for(const a of n){const l=r[a],u=t[a];if(e>1&&typeof l=="object"&&typeof u=="object"){if(!Vd(l,u,e-1))return!1}else if(l!==u)return!1}return!0};function ov(r,t,e){Te[r][t]&&Xe.warn(`The extension ${t} of ${r} has been registered before, and will be overridden.`),Object.assign(Te[r],{[t]:e})}var lv=y(95194),cv=y(85580),Yd=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},Hd=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const Xd=["main"],Kd=["background","main","label","transient"];function uv(r){return r.main}class Qd{getConfig(){return this.config}getLayer(t="main"){return this.extends.layers[t]||uv(this.getLayers())}getLayers(){return this.extends.layers}getRenderer(t){return this.extends.renderers[t]}getCamera(t="main"){return this.getLayer(t).getCamera()}getRoot(t="main"){return this.getLayer(t).getRoot()}getContextService(t="main"){return this.getLayer(t).getContextService()}setCursor(t){this.config.cursor=t,this.getLayer().setCursor(t)}get document(){return this.getLayer().document}get context(){return this.getLayer().context}constructor(t){this.config={enableMultiLayer:!0},Object.assign(this.config,t);const e=this.config,{renderer:n,background:i,cursor:a,enableMultiLayer:l}=e,u=Hd(e,["renderer","background","cursor","enableMultiLayer"]),f=l?Kd:Xd,m=Jd(n,f),x=Object.fromEntries(f.map(Z=>{const V=new _.Xz(Object.assign(Object.assign({},u),{supportsMutipleCanvasesInOneContainer:l,renderer:m[Z],background:l?Z==="background"?i:void 0:i}));return[Z,V]}));$d(x),this.extends={config:this.config,renderer:n,renderers:m,layers:x}}get ready(){return Promise.all(Object.entries(this.getLayers()).map(([,t])=>t.ready))}resize(t,e){Object.assign(this.extends.config,{width:t,height:e}),Object.values(this.getLayers()).forEach(n=>{const i=n.getCamera(),a=i.getPosition(),l=i.getFocalPoint();n.resize(t,e),i.setPosition(a),i.setFocalPoint(l)})}getBounds(t){return qt(Object.values(this.getLayers()).map(e=>t?e.getRoot().childNodes.find(i=>i.classList.includes(t)):e.getRoot()).filter(e=>(e==null?void 0:e.childNodes.length)>0).map(e=>e.getBounds()))}getContainer(){const t=this.extends.config.container;return typeof t=="string"?document.getElementById(t):t}getSize(){return[this.extends.config.width||0,this.extends.config.height||0]}appendChild(t,e){var n;const i=((n=t.style)===null||n===void 0?void 0:n.$layer)||"main";return this.getLayer(i).appendChild(t,e)}setRenderer(t){if(t===this.extends.renderer)return;const e=Jd(t,this.config.enableMultiLayer?Kd:Xd);this.extends.renderers=e,Object.entries(e).forEach(([n,i])=>this.getLayer(n).setRenderer(i)),$d(this.getLayers())}getCanvasByViewport(t){return Rn(this.getLayer().viewport2Canvas(Xn(t)))}getViewportByCanvas(t){return Rn(this.getLayer().canvas2Viewport(Xn(t)))}getViewportByClient(t){return Rn(this.getLayer().client2Viewport(Xn(t)))}getClientByViewport(t){return Rn(this.getLayer().viewport2Client(Xn(t)))}getClientByCanvas(t){return this.getClientByViewport(this.getViewportByCanvas(t))}getCanvasByClient(t){const e=this.getLayer(),n=e.client2Viewport(Xn(t));return Rn(e.viewport2Canvas(n))}toDataURL(){return Yd(this,arguments,void 0,function*(t={}){const e=globalThis.devicePixelRatio||1,{mode:n="viewport"}=t,i=Hd(t,["mode"]);let[a,l,u,f]=[0,0,0,0];if(n==="viewport")[u,f]=this.getSize();else if(n==="overall"){const Qt=this.getBounds(),oe=Xt(Qt);[a,l]=Qt.min,[u,f]=oe}const m=(0,cv.L)('<div id="virtual-image"></div>'),x=new _.Xz({width:u,height:f,renderer:new Aa.Th,devicePixelRatio:e,container:m,background:this.extends.config.background});yield x.ready,x.appendChild(this.getLayer("background").getRoot().cloneNode(!0)),x.appendChild(this.getRoot().cloneNode(!0));const Z=this.getLayer("label").getRoot().cloneNode(!0),V=x.viewport2Canvas({x:0,y:0}),et=this.getCanvasByViewport([0,0]);Z.translate([et[0]-V.x,et[1]-V.y]),Z.scale(1/this.getCamera().getZoom()),x.appendChild(Z),x.appendChild(this.getLayer("transient").getRoot().cloneNode(!0));const dt=this.getCamera(),At=x.getCamera();if(n==="viewport")At.setZoom(dt.getZoom()),At.setPosition(dt.getPosition()),At.setFocalPoint(dt.getFocalPoint());else if(n==="overall"){const[Qt,oe,pe]=At.getPosition(),[Be,vn,nn]=At.getFocalPoint();At.setPosition([Qt+a,oe+l,pe]),At.setFocalPoint([Be+a,vn+l,nn])}const Dt=x.getContextService();return new Promise(Qt=>{x.addEventListener(_.$6.RERENDER,()=>Yd(this,void 0,void 0,function*(){yield new Promise(pe=>setTimeout(pe,300));const oe=yield Dt.toDataURL(i);Qt(oe)}))})})}destroy(){Object.values(this.getLayers()).forEach(t=>{t.getCamera().cancelLandmarkAnimation(),t.destroy()})}}function Jd(r,t){return Object.fromEntries(t.map(e=>{const n=(r==null?void 0:r(e))||new Aa.Th;return n instanceof Aa.Th&&n.setConfig({enableDirtyRectangleRendering:!1}),e==="main"?n.registerPlugin(new lv.S({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):n.unregisterPlugin(n.getPlugin("dom-interaction")),[e,n]}))}function $d(r){Object.entries(r).forEach(([t,e])=>{const n=e.getContextService().getDomElement();n!=null&&n.style&&(n.style.gridArea="1 / 1 / 2 / 2",n.style.outline="none",n.tabIndex=1,t!=="main"&&(n.style.pointerEvents="none")),n!=null&&n.parentElement&&(n.parentElement.style.display="grid",n.parentElement.style.isolation="isolate")})}const Rl=r=>r?parseInt(r):0;function hv(r){const t=getComputedStyle(r),e=r.clientWidth||Rl(t.width),n=r.clientHeight||Rl(t.height),i=Rl(t.paddingLeft)+Rl(t.paddingRight),a=Rl(t.paddingTop)+Rl(t.paddingBottom);return[e-i,n-a]}function qd(r){if(!r)return[0,0];let t=640,e=480;const[n,i]=hv(r);t=n||t,e=i||e;const a=1,l=1;return[Math.max((0,on.Z)(t)?t:a,a),Math.max((0,on.Z)(e)?e:l,l)]}class Pu{constructor(t){this.type=t}}class ia extends Pu{constructor(t,e){super(t),this.data=e}}class bs extends Pu{constructor(t,e,n,i){super(t),this.animationType=e,this.animation=n,this.data=i}}class Ll extends Pu{constructor(t,e,n){super(t),this.elementType=e,this.data=n}}class ku extends Pu{constructor(t,e){super(t),this.data=e}}function ua(r,t){r.emit(t.type,t)}function dv(r){if(!r)return null;if(r instanceof _.BB)return{type:"canvas",element:r};let t=r;for(;t;){if(or(t))return{type:"node",element:t};if(pr(t))return{type:"edge",element:t};if(Dr(t))return{type:"combo",element:t};t=t.parentElement}return null}function tf(r){var t;return((t=r==null?void 0:r.style)===null||t===void 0?void 0:t.zIndex)||0}const Dl="cachedStyle",Ru=r=>`__${r}__`;function fv(r,t){const e=Array.isArray(t)?t:[t];(0,da.Z)(r,Dl)||(0,$s.Z)(r,Dl,{}),e.forEach(n=>{(0,$s.Z)((0,da.Z)(r,Dl),Ru(n),r.attributes[n])})}function ef(r,t){return(0,da.Z)(r,[Dl,Ru(t)])}function vv(r,t){return Ru(t)in((0,da.Z)(r,Dl)||{})}function qv(r,t,e){set(r,[Dl,Ru(t)],e)}class gv{constructor(t){this.tasks=[],this.animations=new Set,this.context=t}getTasks(){const t=[...this.tasks];return this.tasks=[],t}add(t,e){this.tasks.push([t,e])}animate(t,e,n){var i,a,l;(i=e==null?void 0:e.before)===null||i===void 0||i.call(e);const u=this.getTasks().map(([m,x])=>{var Z,V,et;const{element:dt,elementType:At,stage:Dt}=m,Qt=fn(this.context.options,At,Dt,t);(Z=x==null?void 0:x.before)===null||Z===void 0||Z.call(x);const oe=Qt.length?Ke(dt,this.inferStyle(m,n),Qt):null;return oe?((V=x==null?void 0:x.beforeAnimate)===null||V===void 0||V.call(x,oe),oe.finished.then(()=>{var pe,Be;(pe=x==null?void 0:x.afterAnimate)===null||pe===void 0||pe.call(x,oe),(Be=x==null?void 0:x.after)===null||Be===void 0||Be.call(x),this.animations.delete(oe)})):(et=x==null?void 0:x.after)===null||et===void 0||et.call(x),oe}).filter(Boolean);u.forEach(m=>this.animations.add(m));const f=Pn(u);return f?((a=e==null?void 0:e.beforeAnimate)===null||a===void 0||a.call(e,f),f.finished.then(()=>{var m,x;(m=e==null?void 0:e.afterAnimate)===null||m===void 0||m.call(e,f),(x=e==null?void 0:e.after)===null||x===void 0||x.call(e),this.release()})):(l=e==null?void 0:e.after)===null||l===void 0||l.call(e),f}inferStyle(t,e){var n,i;const{element:a,elementType:l,stage:u,originalStyle:f,updatedStyle:m={}}=t;t.modifiedStyle||(t.modifiedStyle=Object.assign(Object.assign({},f),m));const{modifiedStyle:x}=t,Z={},V={};if(u==="enter")Object.assign(Z,{opacity:0});else if(u==="exit")Object.assign(V,{opacity:0});else if(u==="show")Object.assign(Z,{opacity:0}),Object.assign(V,{opacity:(n=ef(a,"opacity"))!==null&&n!==void 0?n:xn("opacity")});else if(u==="hide")Object.assign(Z,{opacity:(i=ef(a,"opacity"))!==null&&i!==void 0?i:xn("opacity")}),Object.assign(V,{opacity:0});else if(u==="collapse"){const{collapse:et}=e||{},{target:dt,descendants:At,position:Dt}=et;if(l==="node"){if(At.includes(a.id)){const[Qt,oe,pe]=Dt;Object.assign(V,{x:Qt,y:oe,z:pe})}}else if(l==="combo"){if(a.id===dt||At.includes(a.id)){const[Qt,oe]=Dt;Object.assign(V,{x:Qt,y:oe,childrenNode:f.childrenNode})}}else l==="edge"&&Object.assign(V,{sourceNode:x.sourceNode,targetNode:x.targetNode})}else if(u==="expand"){const{expand:et}=e||{},{target:dt,descendants:At,position:Dt}=et;if(l==="node"){if(a.id===dt||At.includes(a.id)){const[Qt,oe,pe]=Dt;Object.assign(Z,{x:Qt,y:oe,z:pe})}}else if(l==="combo"){if(a.id===dt||At.includes(a.id)){const[Qt,oe,pe]=Dt;Object.assign(Z,{x:Qt,y:oe,z:pe,childrenNode:x.childrenNode})}}else l==="edge"&&Object.assign(Z,{sourceNode:x.sourceNode,targetNode:x.targetNode})}return[Object.keys(Z).length>0?Object.assign({},f,Z):f,Object.keys(V).length>0?Object.assign({},x,V):x]}stop(){this.animations.forEach(t=>t.cancel())}clear(){this.tasks=[]}release(){var t,e;const{canvas:n}=this.context,i=(e=(t=n.document)===null||t===void 0?void 0:t.timeline)===null||e===void 0?void 0:e.animationsWithPromises;i&&(n.document.timeline.animationsWithPromises=i.filter(a=>a.playState!=="finished"))}destroy(){this.stop(),this.animations.clear(),this.tasks=[]}}class pv{constructor(t){this.batchCount=0,this.context=t}emit(t){const{graph:e}=this.context;e.emit(t.type,t)}startBatch(t=!0){this.batchCount++,this.batchCount===1&&this.emit(new ia(Q.BATCH_START,{initiate:t}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new ia(Q.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class mv extends Di{constructor(t){super(t),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=e=>{const{target:n}=e,i=dv(n);if(!i)return;const{graph:a,canvas:l}=this.context,{type:u,element:f}=i;if("destroyed"in f&&(Ta(f)||f.destroyed))return;const{type:m,detail:x,button:Z}=e,V=Object.assign(Object.assign({},e),{target:f,targetType:u,originalTarget:n});m===G.POINTER_MOVE&&(this.currentTarget!==f&&(this.currentTarget&&a.emit(`${this.currentTargetType}:${G.POINTER_LEAVE}`,Object.assign(Object.assign({},V),{type:G.POINTER_LEAVE,target:this.currentTarget,targetType:this.currentTargetType})),f&&(Object.assign(V,{type:G.POINTER_ENTER}),a.emit(`${u}:${G.POINTER_ENTER}`,V))),this.currentTarget=f,this.currentTargetType=u),m===G.CLICK&&Z===2||(a.emit(`${u}:${m}`,V),a.emit(m,V)),m===G.CLICK&&x===2&&(Object.assign(V,{type:G.DBLCLICK}),a.emit(`${u}:${G.DBLCLICK}`,V),a.emit(G.DBLCLICK,V)),m===G.POINTER_DOWN&&Z===2&&(Object.assign(V,{type:G.CONTEXT_MENU,preventDefault:()=>{var et;(et=l.getContainer())===null||et===void 0||et.addEventListener(G.CONTEXT_MENU,dt=>dt.preventDefault(),{once:!0})}}),a.emit(`${u}:${G.CONTEXT_MENU}`,V),a.emit(G.CONTEXT_MENU,V))},this.forwardContainerEvents=e=>{this.context.graph.emit(e.type,e)},this.forwardEvents(),this.setBehaviors(this.context.options.behaviors||[])}setBehaviors(t){this.setExtensions(t)}forwardEvents(){const t=this.context.canvas.getContainer();t&&[kt.KEY_DOWN,kt.KEY_UP].forEach(n=>{t.addEventListener(n,this.forwardContainerEvents)});const e=this.context.canvas.document;e&&[G.CLICK,G.DBLCLICK,G.POINTER_OVER,G.POINTER_LEAVE,G.POINTER_ENTER,G.POINTER_MOVE,G.POINTER_OUT,G.POINTER_DOWN,G.POINTER_UP,G.CONTEXT_MENU,G.DRAG_START,G.DRAG,G.DRAG_END,G.DRAG_ENTER,G.DRAG_OVER,G.DRAG_LEAVE,G.DROP,G.WHEEL].forEach(n=>{e.addEventListener(n,this.forwardCanvasEvents)})}destroy(){const t=this.context.canvas.getContainer();t&&[kt.KEY_DOWN,kt.KEY_UP].forEach(e=>{t.removeEventListener(e,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}var yv=y(35300),cc=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function Io(r,t){const{data:e,style:n}=r,i=cc(r,["data","style"]),{data:a,style:l}=t,u=cc(t,["data","style"]),f=Object.assign(Object.assign({},i),u);return(e||a)&&Object.assign(f,{data:Object.assign(Object.assign({},e),a)}),(n||l)&&Object.assign(f,{style:Object.assign(Object.assign({},n),l)}),f}function ed(r){const{data:t,style:e}=r,i=cc(r,["data","style"]);return t&&(i.data=Object.assign({},t)),e&&(i.style=Object.assign({},e)),i}function tg(r){return!get(r,["nodes","length"])&&!get(r,["edges","length"])&&!get(r,["combos","length"])}function Il(r={},t={}){const{states:e=[],data:n={},style:i={},children:a=[]}=r,l=cc(r,["states","data","style","children"]),{states:u=[],data:f={},style:m={},children:x=[]}=t,Z=cc(t,["states","data","style","children"]),V=(dt,At)=>dt.length!==At.length?!1:dt.every((Dt,Qt)=>Dt===At[Qt]),et=(dt,At)=>{const Dt=Object.keys(dt),Qt=Object.keys(At);return Dt.length!==Qt.length?!1:Dt.every(oe=>dt[oe]===At[oe])};return!(!et(l,Z)||!V(a,x)||!V(e,u)||!et(n,f)||!et(i,m))}var bv=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function nd(r){const{id:t=ye(r),style:e,data:n}=r,i=bv(r,["id","style","data"]),a=Object.assign(Object.assign({},r),{style:Object.assign({},e),data:Object.assign({},n)});return T(r)?Object.assign({id:t,data:a},i):{id:t,data:a}}function Ea(r){return r.data}function Ev(r){if(r.hasTreeStructure(de))return;r.attachTreeStructure(de);const t=r.getAllEdges();for(const e of t){const{source:n,target:i}=e;r.setParent(i,n,de)}}class xv{constructor(){this.latestRemovedComboIds=new Set,this.comboIds=new Set,this.changes=[],this.batchCount=0,this.isTraceless=!1,this.enableUpdateNodeLikeHierarchy=!0,this.model=new $r.k}pushChange(t){if(this.isTraceless)return;const{type:e}=t;if(e===A.NodeUpdated||e===A.EdgeUpdated||e===A.ComboUpdated){const{value:n,original:i}=t;this.changes.push({value:ed(n),original:ed(i),type:e})}else this.changes.push({value:ed(t.value),type:e})}getChanges(){return this.changes}clearChanges(){this.changes=[]}batch(t){this.batchCount++,this.model.batch(t),this.batchCount--}isBatching(){return this.batchCount>0}silence(t){this.isTraceless=!0,t(),this.isTraceless=!1}isCombo(t){return this.comboIds.has(t)||this.latestRemovedComboIds.has(t)}getData(){return{nodes:this.getNodeData(),edges:this.getEdgeData(),combos:this.getComboData()}}getNodeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Ea(n);return this.isCombo(ye(i))||(t===void 0||t.includes(ye(i)))&&e.push(i),e},[])}getEdgeDatum(t){return Ea(this.model.getEdge(t))}getEdgeData(t){return this.model.getAllEdges().reduce((e,n)=>{const i=Ea(n);return(t===void 0||t.includes(ye(i)))&&e.push(i),e},[])}getComboData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Ea(n);return this.isCombo(ye(i))&&(t===void 0||t.includes(ye(i)))&&e.push(i),e},[])}getRootsData(t=de){return this.model.getRoots(t).map(Ea)}getAncestorsData(t,e){const{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getAncestors(t,e).map(Ea)}getDescendantsData(t){const e=this.getElementDataById(t),n=[];return za(e,i=>{i!==e&&n.push(i)},i=>this.getChildrenData(ye(i)),"TB"),n}getParentData(t,e){const{model:n}=this;if(!e){Xe.warn("The hierarchy structure key is not specified");return}if(!n.hasNode(t)||!n.hasTreeStructure(e))return;const i=n.getParent(t,e);return i?Ea(i):void 0}getChildrenData(t){const e=this.getElementType(t)==="node"?de:Ht,{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getChildren(t,e).map(Ea)}getElementsDataByType(t){return t==="node"?this.getNodeData():t==="edge"?this.getEdgeData():t==="combo"?this.getComboData():[]}getElementDataById(t){return this.getElementType(t)==="edge"?this.getEdgeDatum(t):this.getNodeLikeDatum(t)}getNodeLikeDatum(t){const e=this.model.getNode(t);return Ea(e)}getNodeLikeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Ea(n);return t?t.includes(ye(i))&&e.push(i):e.push(i),e},[])}getElementDataByState(t,e){return this.getElementsDataByType(t).filter(i=>{var a;return(a=i.states)===null||a===void 0?void 0:a.includes(e)})}getElementState(t){var e;return((e=this.getElementDataById(t))===null||e===void 0?void 0:e.states)||[]}hasNode(t){return this.model.hasNode(t)&&!this.isCombo(t)}hasEdge(t){return this.model.hasEdge(t)}hasCombo(t){return this.model.hasNode(t)&&this.isCombo(t)}getRelatedEdgesData(t,e="both"){return this.model.getRelatedEdges(t,e).map(Ea)}getNeighborNodesData(t){return this.model.getNeighbors(t).map(Ea)}setData(t){const{nodes:e=[],edges:n=[],combos:i=[]}=t,{nodes:a,edges:l,combos:u}=this.getData(),f=Ei(a,e,Z=>ye(Z),Il),m=Ei(l,n,Z=>ye(Z),Il),x=Ei(u,i,Z=>ye(Z),Il);this.batch(()=>{const Z={nodes:f.enter,edges:m.enter,combos:x.enter};this.addData(Z),this.computeZIndex(Z,"add",!0);const V={nodes:f.update,edges:m.update,combos:x.update};this.updateData(V),this.computeZIndex(V,"update",!0);const et={nodes:f.exit.map(ye),edges:m.exit.map(ye),combos:x.exit.map(ye)};this.removeData(et)})}addData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.addComboData(i),this.addNodeData(e),this.addEdgeData(n)}),this.computeZIndex(t,"add")}addNodeData(t=[]){t.length&&(this.model.addNodes(t.map(e=>(this.pushChange({value:e,type:A.NodeAdded}),nd(e)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({nodes:t},"add"))}addEdgeData(t=[]){t.length&&(this.model.addEdges(t.map(e=>(this.pushChange({value:e,type:A.EdgeAdded}),nd(e)))),this.computeZIndex({edges:t},"add"))}addComboData(t=[]){if(!t.length)return;const{model:e}=this;e.hasTreeStructure(Ht)||e.attachTreeStructure(Ht),e.addNodes(t.map(n=>(this.comboIds.add(ye(n)),this.pushChange({value:n,type:A.ComboAdded}),nd(n)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({combos:t},"add")}addChildrenData(t,e){const n=this.getNodeLikeDatum(t),i=e.map(ye);this.addNodeData(e),this.updateNodeData([{id:t,children:[...n.children||[],...i]}]),this.addEdgeData(i.map(a=>({source:t,target:a})))}computeZIndex(t,e,n=!1){!n&&this.isBatching()||this.batch(()=>{const{nodes:i=[],edges:a=[],combos:l=[]}=t;l.forEach(u=>{var f,m,x;const Z=ye(u);if(e==="add"&&(0,on.Z)((f=u.style)===null||f===void 0?void 0:f.zIndex)||e==="update"&&!("combo"in u))return;const V=this.getParentData(Z,Ht),et=V?((x=(m=V.style)===null||m===void 0?void 0:m.zIndex)!==null&&x!==void 0?x:0)+1:0;this.preventUpdateNodeLikeHierarchy(()=>{this.updateComboData([{id:Z,style:{zIndex:et}}])})}),i.forEach(u=>{var f,m,x;const Z=ye(u);if(e==="add"&&(0,on.Z)((f=u.style)===null||f===void 0?void 0:f.zIndex)||e==="update"&&!("combo"in u)&&!("children"in u))return;let V=0;const et=this.getParentData(Z,Ht);if(et)V=(((m=et.style)===null||m===void 0?void 0:m.zIndex)||0)+1;else{const dt=this.getParentData(Z,de);dt&&(V=((x=dt==null?void 0:dt.style)===null||x===void 0?void 0:x.zIndex)||0)}this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:Z,style:{zIndex:V}}])})}),a.forEach(u=>{var f,m,x,Z,V;if((0,on.Z)((f=u.style)===null||f===void 0?void 0:f.zIndex))return;let{id:et,source:dt,target:At}=u;if(!et)et=ye(u);else{const oe=this.getEdgeDatum(et);dt=oe.source,At=oe.target}if(!dt||!At)return;const Dt=((x=(m=this.getNodeLikeDatum(dt))===null||m===void 0?void 0:m.style)===null||x===void 0?void 0:x.zIndex)||0,Qt=((V=(Z=this.getNodeLikeDatum(At))===null||Z===void 0?void 0:Z.style)===null||V===void 0?void 0:V.zIndex)||0;this.updateEdgeData([{id:ye(u),style:{zIndex:Math.max(Dt,Qt)-1}}])})})}getFrontZIndex(t){var e;const n=this.getElementType(t),i=this.getElementDataById(t),a=this.getData();if(Object.assign(a,{[`${n}s`]:a[`${n}s`].filter(l=>ye(l)!==t)}),n==="combo"&&!ha(i)){const l=new Set(this.getAncestorsData(t,Ht).map(ye));a.nodes=a.nodes.filter(u=>!l.has(ye(u))),a.combos=a.combos.filter(u=>!l.has(ye(u))),a.edges=a.edges.filter(({source:u,target:f})=>!l.has(u)&&!l.has(f))}return Math.max(((e=i.style)===null||e===void 0?void 0:e.zIndex)||0,0,...Object.values(a).flat().map(l=>{var u;return(((u=l==null?void 0:l.style)===null||u===void 0?void 0:u.zIndex)||0)+1}))}updateNodeLikeHierarchy(t){if(!this.enableUpdateNodeLikeHierarchy)return;const{model:e}=this;t.forEach(n=>{const i=ye(n),a=xr(n);a!==void 0&&(e.hasTreeStructure(Ht)||e.attachTreeStructure(Ht),a===null&&this.refreshComboData(i),this.setParent(i,xr(n),Ht));const l=n.children||[];if(l.length){e.hasTreeStructure(de)||e.attachTreeStructure(de);const u=l.filter(f=>e.hasNode(f));u.forEach(f=>this.setParent(f,i,de)),u.length!==l.length&&this.updateNodeData([{id:i,children:u}])}})}preventUpdateNodeLikeHierarchy(t){this.enableUpdateNodeLikeHierarchy=!1,t(),this.enableUpdateNodeLikeHierarchy=!0}updateData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.updateNodeData(e),this.updateComboData(i),this.updateEdgeData(n)}),this.computeZIndex(t,"update")}updateNodeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{const n=[];t.forEach(i=>{const a=ye(i),l=Ea(e.getNode(a));if(Il(l,i))return;const u=Io(l,i);this.pushChange({value:u,original:l,type:A.NodeUpdated}),e.mergeNodeData(a,u),n.push(u)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({nodes:t},"update")}refreshData(){const{nodes:t,edges:e,combos:n}=this.getData();t.forEach(i=>{this.pushChange({value:i,original:i,type:A.NodeUpdated})}),e.forEach(i=>{this.pushChange({value:i,original:i,type:A.EdgeUpdated})}),n.forEach(i=>{this.pushChange({value:i,original:i,type:A.ComboUpdated})})}syncNodeLikeDatum(t){const{model:e}=this,n=ye(t);if(!e.hasNode(n))return;const i=Ea(e.getNode(n)),a=Io(i,t);e.mergeNodeData(n,a)}syncEdgeDatum(t){const{model:e}=this,n=ye(t);if(!e.hasEdge(n))return;const i=Ea(e.getEdge(n)),a=Io(i,t);e.mergeEdgeData(n,a)}updateEdgeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{t.forEach(n=>{const i=ye(n),a=Ea(e.getEdge(i));if(Il(a,n))return;n.source&&a.source!==n.source&&e.updateEdgeSource(i,n.source),n.target&&a.target!==n.target&&e.updateEdgeTarget(i,n.target);const l=Io(a,n);this.pushChange({value:l,original:a,type:A.EdgeUpdated}),e.mergeEdgeData(i,l)})}),this.computeZIndex({edges:t},"update")}updateComboData(t=[]){if(!t.length)return;const{model:e}=this;e.batch(()=>{const n=[];t.forEach(i=>{const a=ye(i),l=Ea(e.getNode(a));if(Il(l,i))return;const u=Io(l,i);this.pushChange({value:u,original:l,type:A.ComboUpdated}),e.mergeNodeData(a,u),n.push(u)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({combos:t},"update")}setParent(t,e,n,i=!0){if(t===e)return;const a=this.getNodeLikeDatum(t),l=xr(a);if(l!==e&&n===Ht){const u={id:t,combo:e};this.isCombo(t)?this.syncNodeLikeDatum(u):this.syncNodeLikeDatum(u)}this.model.setParent(t,e,n),i&&n===Ht&&(0,yv.Z)([l,e]).forEach(u=>{u!==void 0&&this.refreshComboData(u)})}refreshComboData(t){const e=this.getComboData([t])[0],n=this.getAncestorsData(t,Ht);e&&this.pushChange({value:e,original:e,type:A.ComboUpdated}),n.forEach(i=>{this.pushChange({value:i,original:i,type:A.ComboUpdated})})}getElementPosition(t){const e=this.getElementDataById(t);return Yt(e)}translateNodeLikeBy(t,e){this.isCombo(t)?this.translateComboBy(t,e):this.translateNodeBy(t,e)}translateNodeLikeTo(t,e){this.isCombo(t)?this.translateComboTo(t,e):this.translateNodeTo(t,e)}translateNodeBy(t,e){const n=this.getElementPosition(t),i=M(n,[...e,0].slice(0,3));this.translateNodeTo(t,i)}translateNodeTo(t,e){const[n=0,i=0,a=0]=e;this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:t,style:{x:n,y:i,z:a}}])})}translateComboBy(t,e){const[n=0,i=0,a=0]=e;if([n,i,a].some(isNaN)||[n,i,a].every(f=>f===0))return;const l=this.getComboData([t])[0];if(!l)return;const u=new Set;za(l,f=>{const m=ye(f);if(u.has(m))return;u.add(m);const[x,Z,V]=Yt(f),et=Io(f,{style:{x:x+n,y:Z+i,z:V+a}});this.pushChange({value:et,original:f,type:this.isCombo(m)?A.ComboUpdated:A.NodeUpdated}),this.model.mergeNodeData(m,et)},f=>this.getChildrenData(ye(f)),"BT")}translateComboTo(t,e){var n;if(e.some(isNaN))return;const[i=0,a=0,l=0]=e,u=(n=this.getComboData([t]))===null||n===void 0?void 0:n[0];if(!u)return;const[f,m,x]=Yt(u),Z=i-f,V=a-m,et=l-x;za(u,dt=>{const At=ye(dt),[Dt,Qt,oe]=Yt(dt),pe=Io(dt,{style:{x:Dt+Z,y:Qt+V,z:oe+et}});this.pushChange({value:pe,original:dt,type:this.isCombo(At)?A.ComboUpdated:A.NodeUpdated}),this.model.mergeNodeData(At,pe)},dt=>this.getChildrenData(ye(dt)),"BT")}removeData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.removeEdgeData(n),this.removeNodeData(e),this.removeComboData(i),this.latestRemovedComboIds=new Set(i)})}removeNodeData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.removeEdgeData(this.getRelatedEdgesData(e).map(ye)),this.pushChange({value:this.getNodeData([e])[0],type:A.NodeRemoved}),this.removeNodeLikeHierarchy(e)}),this.model.removeNodes(t)})}removeEdgeData(t=[]){t.length&&(t.forEach(e=>this.pushChange({value:this.getEdgeData([e])[0],type:A.EdgeRemoved})),this.model.removeEdges(t))}removeComboData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.pushChange({value:this.getComboData([e])[0],type:A.ComboRemoved}),this.removeNodeLikeHierarchy(e),this.comboIds.delete(e)}),this.model.removeNodes(t)})}removeNodeLikeHierarchy(t){if(this.model.hasTreeStructure(Ht)){const e=xr(this.getNodeLikeDatum(t));this.setParent(t,void 0,Ht,!1),this.model.getChildren(t,Ht).forEach(n=>{const i=Ea(n),a=ye(i);this.setParent(ye(i),e,Ht,!1);const l=Io(i,{id:ye(i),combo:e});this.pushChange({value:l,original:i,type:this.isCombo(a)?A.ComboUpdated:A.NodeUpdated}),this.model.mergeNodeData(ye(i),l)}),(0,z.Z)(e)||this.refreshComboData(e)}}getElementType(t){if(this.model.hasNode(t))return this.isCombo(t)?"combo":"node";if(this.model.hasEdge(t))return"edge";throw new Error(rn(`Unknown element type of id: ${t}`))}destroy(){const{model:t}=this,e=t.getAllNodes(),n=t.getAllEdges();t.removeEdges(n.map(i=>i.id)),t.removeNodes(e.map(i=>i.id)),this.context={}}}var uc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class wv{constructor(t){this.elementMap={},this.shapeTypeMap={},this.paletteStyle={},this.defaultStyle={},this.stateStyle={},this.visibilityCache=new WeakMap,this.context=t}init(){this.initContainer()}initContainer(){if(!this.container||this.container.destroyed){const{canvas:t}=this.context;this.container=t.appendChild(new _.ZA({className:"elements"}))}}emit(t,e){e.silence||ua(this.context.graph,t)}forEachElementData(t){Za.forEach(e=>{const n=this.context.model.getElementsDataByType(e);t(e,n)})}getElementType(t,e){var n;const{options:i,graph:a}=this.context,l=((n=i[t])===null||n===void 0?void 0:n.type)||e.type;return l?typeof l=="string"?l:l.call(a,e):t==="edge"?"line":"circle"}getTheme(t){return En(this.context.options)[t]||{}}getThemeStyle(t){return this.getTheme(t).style||{}}getThemeStateStyle(t,e){const{state:n={}}=this.getTheme(t);return Object.assign({},...e.map(i=>n[i]||{}))}computePaletteStyle(){const{options:t}=this.context;this.paletteStyle={},this.forEachElementData((e,n)=>{var i,a;const l=Object.assign({},qi((i=this.getTheme(e))===null||i===void 0?void 0:i.palette),qi((a=t[e])===null||a===void 0?void 0:a.palette));l!=null&&l.field&&Object.assign(this.paletteStyle,As(n,l))})}getPaletteStyle(t,e){const n=this.paletteStyle[e];return n?t==="edge"?{stroke:n}:{fill:n}:{}}computeElementDefaultStyle(t,e){var n;const{options:i}=this.context,a=((n=i[t])===null||n===void 0?void 0:n.style)||{};"transform"in a&&Array.isArray(a.transform)&&(a.transform=[...a.transform]),this.defaultStyle[ye(e.datum)]=Ss(a,e)}computeElementsDefaultStyle(t){const{graph:e}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let l=0;l<a;l++){const u=i[l];(t===void 0||t.includes(ye(u)))&&this.computeElementDefaultStyle(n,{datum:u,graph:e})}})}getDefaultStyle(t){return this.defaultStyle[t]||{}}getElementState(t){try{const{model:e}=this.context;return e.getElementState(t)}catch(e){return[]}}getElementStateStyle(t,e,n){var i,a;const{options:l}=this.context,u=((a=(i=l[t])===null||i===void 0?void 0:i.state)===null||a===void 0?void 0:a[e])||{};return Ss(u,n)}computeElementStatesStyle(t,e,n){this.stateStyle[ye(n.datum)]=Object.assign({},...e.map(i=>this.getElementStateStyle(t,i,n)))}computeElementsStatesStyle(t){const{graph:e}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let l=0;l<a;l++){const u=i[l];if(t===void 0||t.includes(ye(u))){const f=this.getElementState(ye(u));this.computeElementStatesStyle(n,f,{datum:u,graph:e})}}})}getStateStyle(t){return this.stateStyle[t]||{}}computeStyle(t,e){t&&["translate","zIndex"].includes(t)||(this.computePaletteStyle(),this.computeElementsDefaultStyle(e),this.computeElementsStatesStyle(e))}getElement(t){return this.elementMap[t]}getNodes(){return this.context.model.getNodeData().map(({id:t})=>this.elementMap[t])}getEdges(){return this.context.model.getEdgeData().map(t=>this.elementMap[ye(t)])}getCombos(){return this.context.model.getComboData().map(({id:t})=>this.elementMap[t])}getElementComputedStyle(t,e){const n=ye(e),i=this.getThemeStyle(t),a=this.getPaletteStyle(t,n),l=e.style||{},u=this.getDefaultStyle(n),f=this.getThemeStateStyle(t,this.getElementState(n)),m=this.getStateStyle(n),x=Object.assign({},i,a,l,u,f,m);if(t==="combo"){const Z=this.context.model.getChildrenData(n),et=!!x.collapsed?[]:Z.map(ye).filter(dt=>this.getElement(dt));Object.assign(x,{childrenNode:et,childrenData:Z})}return x}getDrawData(t){this.init();const e=this.computeChangesAndDrawData(t);if(!e)return null;const{type:n="draw",stage:i=n}=t;return this.markDestroyElement(e.drawData),this.computeStyle(i),{type:n,stage:i,data:e}}draw(t={animation:!0}){const e=this.getDrawData(t);if(!e)return;const{data:{drawData:{add:n,update:i,remove:a}}}=e;return this.destroyElements(a,t),this.createElements(n,t),this.updateElements(i,t),this.setAnimationTask(t,e)}preLayoutDraw(){return uc(this,arguments,void 0,function*(t={animation:!0}){var e,n;const i=this.getDrawData(t);if(!i)return;const{data:{drawData:a}}=i;yield(n=(e=this.context.layout)===null||e===void 0?void 0:e.preLayout)===null||n===void 0?void 0:n.call(e,a);const{add:l,update:u,remove:f}=a;return this.destroyElements(f,t),this.createElements(l,t),this.updateElements(u,t),this.setAnimationTask(t,i)})}setAnimationTask(t,e){const{animation:n,silence:i}=t,{data:{dataChanges:a,drawData:l},stage:u,type:f}=e;return this.context.animation.animate(n,i?{}:{before:()=>this.emit(new ia(Q.BEFORE_DRAW,{dataChanges:a,animation:n,stage:u,render:f==="render"}),t),beforeAnimate:m=>this.emit(new bs(Q.BEFORE_ANIMATE,L.DRAW,m,l),t),afterAnimate:m=>this.emit(new bs(Q.AFTER_ANIMATE,L.DRAW,m,l),t),after:()=>this.emit(new ia(Q.AFTER_DRAW,{dataChanges:a,animation:n,stage:u,render:f==="render",firstRender:this.context.graph.rendered===!1}),t)})}computeChangesAndDrawData(t){const{model:e}=this.context,n=e.getChanges(),i=Xh(n);if(i.length===0)return null;const{NodeAdded:a=[],NodeUpdated:l=[],NodeRemoved:u=[],EdgeAdded:f=[],EdgeUpdated:m=[],EdgeRemoved:x=[],ComboAdded:Z=[],ComboUpdated:V=[],ComboRemoved:et=[]}=(0,_t.Z)(i,Qt=>Qt.type),dt=Qt=>new Map(Qt.map(oe=>{const pe=oe.value;return[ye(pe),pe]})),At={add:{nodes:dt(a),edges:dt(f),combos:dt(Z)},update:{nodes:dt(l),edges:dt(m),combos:dt(V)},remove:{nodes:dt(u),edges:dt(x),combos:dt(et)}},Dt=this.transformData(At,t);return e.clearChanges(),{dataChanges:n,drawData:Dt}}transformData(t,e){const n=this.context.transform.getTransformInstance();return Object.values(n).reduce((i,a)=>a.beforeDraw(i,e),t)}createElement(t,e,n){var i;const a=ye(e);if(this.getElement(a))return;const u=this.getElementType(t,e),f=this.getElementComputedStyle(t,e),m=be(t,u);if(!m)return Xe.warn(`The element ${u} of ${t} is not registered.`);this.emit(new Ll(Q.BEFORE_ELEMENT_CREATE,t,e),n);const x=this.container.appendChild(new m({id:a,context:this.context,style:f}));this.shapeTypeMap[a]=u,this.elementMap[a]=x;const{stage:Z="enter"}=n;(i=this.context.animation)===null||i===void 0||i.add({element:x,elementType:t,stage:Z,originalStyle:Object.assign({},x.attributes),updatedStyle:f},{after:()=>{var V;this.emit(new Ll(Q.AFTER_ELEMENT_CREATE,t,e),n),(V=x.onCreate)===null||V===void 0||V.call(x)}})}createElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["node",n],["combo",a],["edge",i]].forEach(([u,f])=>{f.forEach(m=>this.createElement(u,m,e))})}getUpdateStageStyle(t,e,n){const{stage:i="update"}=n;if(i==="translate")if(t==="node"||t==="combo"){const{style:{x:a=0,y:l=0,z:u=0}={}}=e;return{x:a,y:l,z:u}}else return{};return this.getElementComputedStyle(t,e)}updateElement(t,e,n){var i;const a=ye(e),{stage:l="update"}=n,u=this.getElement(a);if(!u)return()=>null;this.emit(new Ll(Q.BEFORE_ELEMENT_UPDATE,t,e),n);const f=this.getElementType(t,e),m=this.getUpdateStageStyle(t,e,n);this.shapeTypeMap[a]!==f&&(u.destroy(),delete this.shapeTypeMap[a],delete this.elementMap[a],this.createElement(t,e,{animation:!1,silence:!0}));const x=l!=="visibility"?l:m.visibility==="hidden"?"hide":"show";x==="hide"&&delete m.visibility,(i=this.context.animation)===null||i===void 0||i.add({element:u,elementType:t,stage:x,originalStyle:Object.assign({},u.attributes),updatedStyle:m},{before:()=>{const Z=this.elementMap[a];l!=="collapse"&&Qa(Z,m),l==="visibility"&&(vv(Z,"opacity")||fv(Z,"opacity"),this.visibilityCache.set(Z,x==="show"?"visible":"hidden"),x==="show"&&ti(Z,"visible"))},after:()=>{var Z;const V=this.elementMap[a];l==="collapse"&&Qa(V,m),x==="hide"&&ti(V,this.visibilityCache.get(V)),this.emit(new Ll(Q.AFTER_ELEMENT_UPDATE,t,e),n),(Z=V.onUpdate)===null||Z===void 0||Z.call(V)}})}updateElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["node",n],["combo",a],["edge",i]].forEach(([u,f])=>{f.forEach(m=>this.updateElement(u,m,e))})}markDestroyElement(t){Object.values(t.remove).forEach(e=>{e.forEach(n=>{const i=ye(n),a=this.getElement(i);a&&Ba(a)})})}destroyElement(t,e,n){var i;const{stage:a="exit"}=n,l=ye(e),u=this.elementMap[l];if(!u)return()=>null;this.emit(new Ll(Q.BEFORE_ELEMENT_DESTROY,t,e),n),(i=this.context.animation)===null||i===void 0||i.add({element:u,elementType:t,stage:a,originalStyle:Object.assign({},u.attributes),updatedStyle:{}},{after:()=>{var f;this.clearElement(l),u.destroy(),(f=u.onDestroy)===null||f===void 0||f.call(u),this.emit(new Ll(Q.AFTER_ELEMENT_DESTROY,t,e),n)}})}destroyElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["combo",a],["edge",i],["node",n]].forEach(([u,f])=>{f.forEach(m=>this.destroyElement(u,m,e))})}clearElement(t){delete this.paletteStyle[t],delete this.defaultStyle[t],delete this.stateStyle[t],delete this.elementMap[t],delete this.shapeTypeMap[t]}alignLayoutResultToElement(t,e){var n,i;const a=(n=t.nodes)===null||n===void 0?void 0:n.find(l=>ye(l)===e);if(a){const l=Yt(this.context.model.getNodeLikeDatum(e)),u=Yt(a),f=Y(l,u);(i=t.nodes)===null||i===void 0||i.forEach(m=>{var x,Z,V;!((x=m.style)===null||x===void 0)&&x.x&&(m.style.x+=f[0]),!((Z=m.style)===null||Z===void 0)&&Z.y&&(m.style.y+=f[1]),!((V=m.style)===null||V===void 0)&&V.z&&(m.style.z+=f[2]||0)})}}collapseNode(t,e){return uc(this,void 0,void 0,function*(){var n;const{animation:i}=e,{model:a}=this.context,l=this.computeChangesAndDrawData({stage:"collapse",animation:i});if(!l)return;const{drawData:u}=l,{add:f,remove:m,update:x}=u;this.markDestroyElement(u);const Z={animation:i,stage:"collapse",data:u};this.destroyElements(m,Z),this.createElements(f,Z),this.updateElements(x,Z),yield(n=this.context.animation.animate(i,{beforeAnimate:V=>this.emit(new bs(Q.BEFORE_ANIMATE,L.COLLAPSE,V,u),Z),afterAnimate:V=>this.emit(new bs(Q.AFTER_ANIMATE,L.COLLAPSE,V,u),Z)},{collapse:{target:t,descendants:Array.from(m.nodes).map(([,V])=>ye(V)),position:Yt(x.nodes.get(t))}}))===null||n===void 0?void 0:n.finished})}expandNode(t,e){return uc(this,void 0,void 0,function*(){var n;const{model:i,layout:a}=this.context,{animation:l,align:u}=e,f=Yt(i.getNodeData([t])[0]),m=this.computeChangesAndDrawData({stage:"expand",animation:l});if(this.createElements(m.drawData.add,{animation:!1,stage:"expand",target:t}),this.context.animation.clear(),this.computeStyle("expand"),!m)return;const{drawData:x}=m,{update:Z,add:V}=x,et={animation:l,stage:"expand",data:x};V.edges.forEach(dt=>Z.edges.set(ye(dt),dt)),V.nodes.forEach(dt=>Z.nodes.set(ye(dt),dt)),this.updateElements(Z,et),yield(n=this.context.animation.animate(l,{beforeAnimate:dt=>this.emit(new bs(Q.BEFORE_ANIMATE,L.EXPAND,dt,x),et),afterAnimate:dt=>this.emit(new bs(Q.AFTER_ANIMATE,L.EXPAND,dt,x),et)},{expand:{target:t,descendants:Array.from(V.nodes).map(([,dt])=>ye(dt)),position:f}}))===null||n===void 0?void 0:n.finished})}collapseCombo(t,e){return uc(this,void 0,void 0,function*(){var n;const{model:i,element:a}=this.context;if(i.getAncestorsData(t,Ht).some(At=>ha(At)))return;const l=a.getElement(t),u=l.getComboPosition(Object.assign(Object.assign({},l.attributes),{collapsed:!0})),f=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!f)return;const{dataChanges:m,drawData:x}=f;this.markDestroyElement(x);const{update:Z,remove:V}=x,et={animation:e,stage:"collapse",data:x};this.destroyElements(V,et),this.updateElements(Z,et);const dt=At=>Array.from(At).map(([,Dt])=>ye(Dt));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new ia(Q.BEFORE_DRAW,{dataChanges:m,animation:e}),et),beforeAnimate:At=>this.emit(new bs(Q.BEFORE_ANIMATE,L.COLLAPSE,At,x),et),afterAnimate:At=>this.emit(new bs(Q.AFTER_ANIMATE,L.COLLAPSE,At,x),et),after:()=>this.emit(new ia(Q.AFTER_DRAW,{dataChanges:m,animation:e}),et)},{collapse:{target:t,descendants:[...dt(V.nodes),...dt(V.combos)],position:u}}))===null||n===void 0?void 0:n.finished})}expandCombo(t,e){return uc(this,void 0,void 0,function*(){var n;const{model:i}=this.context,a=Yt(i.getComboData([t])[0]);this.computeStyle("expand");const l=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!l)return;const{dataChanges:u,drawData:f}=l,{add:m,update:x}=f,Z={animation:e,stage:"expand",data:f,target:t};this.createElements(m,Z),this.updateElements(x,Z);const V=et=>Array.from(et).map(([,dt])=>ye(dt));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new ia(Q.BEFORE_DRAW,{dataChanges:u,animation:e}),Z),beforeAnimate:et=>this.emit(new bs(Q.BEFORE_ANIMATE,L.EXPAND,et,f),Z),afterAnimate:et=>this.emit(new bs(Q.AFTER_ANIMATE,L.EXPAND,et,f),Z),after:()=>this.emit(new ia(Q.AFTER_DRAW,{dataChanges:u,animation:e}),Z)},{expand:{target:t,descendants:[...V(m.nodes),...V(m.combos)],position:a}}))===null||n===void 0?void 0:n.finished})}clear(){this.container.destroy(),this.initContainer(),this.elementMap={},this.shapeTypeMap={},this.defaultStyle={},this.stateStyle={},this.paletteStyle={}}destroy(){this.clear(),this.container.destroy(),this.context={}}}var nf=y(96262);class Mv extends Hh.Z{constructor(t,e,n){super(),this.graph=t,this.layout=e,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=nf.Ud(new Worker(new URL(y.p+y.u(345),y.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var t;return(0,ei.mG)(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const e=this.layout.options,{onTick:n}=e,i=(0,ei._T)(e,["onTick"]),a={};Object.keys(i).forEach(m=>{(0,xe.Z)(i[m])||(a[m]=i[m])});const l={layout:{id:this.layout.id,options:a,iterations:(t=this.options)===null||t===void 0?void 0:t.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},u=new Float32Array([0]),[f]=yield this.proxy.calculateLayout(l,[u]);return f})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[nf.Yy]()}isRunning(){return this.running}}var Bl=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},Sv=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Av{get presetOptions(){return{animation:!!It(this.context.options,!0)}}get options(){const{options:t}=this.context;return t.layout}constructor(t){this.instances=[],this.context=t}getLayoutInstance(){return this.instances}preLayout(t){return Bl(this,void 0,void 0,function*(){var e,n,i,a;const{graph:l,model:u}=this.context,{add:f}=t;ua(l,new ia(Q.BEFORE_LAYOUT,{type:"pre"}));const m=yield(e=this.context.layout)===null||e===void 0?void 0:e.simulate();(n=m==null?void 0:m.nodes)===null||n===void 0||n.forEach(x=>{const Z=ye(x),V=f.nodes.get(Z);u.syncNodeLikeDatum(x),V&&Object.assign(V.style,x.style)}),(i=m==null?void 0:m.edges)===null||i===void 0||i.forEach(x=>{const Z=ye(x),V=f.edges.get(Z);u.syncEdgeDatum(x),V&&Object.assign(V.style,x.style)}),(a=m==null?void 0:m.combos)===null||a===void 0||a.forEach(x=>{const Z=ye(x),V=f.combos.get(Z);u.syncNodeLikeDatum(x),V&&Object.assign(V.style,x.style)}),ua(l,new ia(Q.AFTER_LAYOUT,{type:"pre"})),this.transformDataAfterLayout("pre",t)})}postLayout(){return Bl(this,arguments,void 0,function*(t=this.options){if(!t)return;const e=Array.isArray(t)?t:[t],{graph:n}=this.context;ua(n,new ia(Q.BEFORE_LAYOUT,{type:"post"}));for(let i=0;i<e.length;i++){const a=e[i],l=this.getLayoutData(a),u=Object.assign(Object.assign({},this.presetOptions),a);ua(n,new ia(Q.BEFORE_STAGE_LAYOUT,{options:u,index:i}));const f=yield this.stepLayout(l,u,i);ua(n,new ia(Q.AFTER_STAGE_LAYOUT,{options:u,index:i})),a.animation||this.updateElementPosition(f,!1)}ua(n,new ia(Q.AFTER_LAYOUT,{type:"post"})),this.transformDataAfterLayout("post")})}transformDataAfterLayout(t,e){const n=this.context.transform.getTransformInstance();Object.values(n).forEach(i=>i.afterLayout(t,e))}simulate(){return Bl(this,void 0,void 0,function*(){if(!this.options)return{};const t=Array.isArray(this.options)?this.options:[this.options];let e={};for(let n=0;n<t.length;n++){const i=t[n],a=this.getLayoutData(i);e=yield this.stepLayout(a,Object.assign(Object.assign(Object.assign({},this.presetOptions),i),{animation:!1}),n)}return e})}stepLayout(t,e,n){return Bl(this,void 0,void 0,function*(){return dl(e)?yield this.treeLayout(t,e,n):yield this.graphLayout(t,e,n)})}graphLayout(t,e,n){return Bl(this,void 0,void 0,function*(){const{animation:i,enableWorker:a,iterations:l=300}=e,u=this.initGraphLayout(e);if(!u)return{};if(this.instances[n]=u,this.instance=u,a){const m=u;return this.supervisor=new Mv(m.graphData2LayoutModel(t),m.instance,{iterations:l}),lo(yield this.supervisor.execute())}if(nl(u))return i?yield u.execute(t,{onTick:m=>{this.updateElementPosition(m,!1)}}):(u.execute(t),u.stop(),u.tick(l));const f=yield u.execute(t);if(i){const m=this.updateElementPosition(f,i);yield m==null?void 0:m.finished}return f})}treeLayout(t,e,n){return Bl(this,void 0,void 0,function*(){const{type:i,animation:a}=e,l=be("layout",i);if(!l)return{};const{nodes:u=[],edges:f=[]}=t,m=new $r.k({nodes:u.map(dt=>({id:ye(dt),data:dt.data||{}})),edges:f.map(dt=>({id:ye(dt),source:dt.source,target:dt.target,data:dt.data||{}}))});Ev(m);const x={nodes:[],edges:[]},Z={nodes:[],edges:[]};m.getRoots(de).forEach(dt=>{za(dt,pe=>{pe.children=m.getSuccessors(pe.id)},pe=>m.getSuccessors(pe.id),"TB");const At=l(dt,e),{x:Dt,y:Qt,z:oe=0}=At;za(At,pe=>{const{id:Be,x:vn,y:nn,z:An=0}=pe;x.nodes.push({id:Be,style:{x:Dt,y:Qt,z:oe}}),Z.nodes.push({id:Be,style:{x:vn,y:nn,z:An}})},pe=>pe.children,"TB")});const et=this.inferTreeLayoutOffset(Z);if(rf(Z,et),a){rf(x,et),this.updateElementPosition(x,!1);const dt=this.updateElementPosition(Z,a);yield dt==null?void 0:dt.finished}return Z})}inferTreeLayoutOffset(t){var e;let[n,i]=[1/0,-1/0],[a,l]=[1/0,-1/0];(e=t.nodes)===null||e===void 0||e.forEach(At=>{const{x:Dt=0,y:Qt=0}=At.style||{};n=Math.min(n,Dt),i=Math.max(i,Dt),a=Math.min(a,Qt),l=Math.max(l,Qt)});const{canvas:u}=this.context,f=u.getSize(),[m,x]=u.getCanvasByViewport([0,0]),[Z,V]=u.getCanvasByViewport(f);if(n>=m&&i<=Z&&a>=x&&l<=V)return[0,0];const et=(m+Z)/2,dt=(x+V)/2;return[et-(n+i)/2,dt-(a+l)/2]}stopLayout(){this.instance&&nl(this.instance)&&(this.instance.stop(),this.instance=void 0),this.supervisor&&(this.supervisor.stop(),this.supervisor=void 0),this.animationResult&&(this.animationResult.finish(),this.animationResult=void 0)}getLayoutData(t){const{nodeFilter:e=()=>!0,comboFilter:n=()=>!0,preLayout:i=!1,isLayoutInvisibleNodes:a=!1}=t,{nodes:l,edges:u,combos:f}=this.context.model.getData(),{element:m,model:x}=this.context,Z=Qt=>m.getElement(Qt),V=i?Qt=>{var oe;return!a&&(((oe=Qt.style)===null||oe===void 0?void 0:oe.visibility)==="hidden"||x.getAncestorsData(Qt.id,de).some(ha)||x.getAncestorsData(Qt.id,Ht).some(ha))?!1:e(Qt)}:Qt=>{const oe=ye(Qt),pe=Z(oe);return!pe||Ta(pe)?!1:e(Qt)},et=l.filter(V),dt=f.filter(n),At=new Map(et.map(Qt=>[ye(Qt),Qt]));dt.forEach(Qt=>At.set(ye(Qt),Qt));const Dt=u.filter(({source:Qt,target:oe})=>At.has(Qt)&&At.has(oe));return{nodes:et,edges:Dt,combos:dt}}initGraphLayout(t){var e;const{element:n,viewport:i}=this.context,{type:a,enableWorker:l,animation:u,iterations:f}=t,m=Sv(t,["type","enableWorker","animation","iterations"]),[x,Z]=i.getCanvasSize(),V=[x/2,Z/2],et=(e=t==null?void 0:t.nodeSize)!==null&&e!==void 0?e:oe=>{const pe=n==null?void 0:n.getElement(oe.id);return pe?pe.attributes.size:n==null?void 0:n.getElementComputedStyle("node",oe).size},dt=be("layout",a);if(!dt)return Xe.warn(`The layout of ${a} is not registered.`);const At=Object.getPrototypeOf(dt.prototype)===ra.prototype?dt:Yo(dt,this.context),Dt=new At(this.context),Qt={nodeSize:et,width:x,height:Z,center:V};switch(Dt.id){case"d3-force":case"d3-force-3d":Object.assign(Qt,{center:{x:x/2,y:Z/2,z:0}});break;default:break}return(0,h.Z)(Dt.options,Qt,m),Dt}updateElementPosition(t,e){const{model:n,element:i}=this.context;return i?(n.updateData(t),i.draw({animation:e,silence:!0})):null}destroy(){var t;this.stopLayout(),this.context={},(t=this.supervisor)===null||t===void 0||t.kill(),this.supervisor=void 0,this.instance=void 0,this.instances=[],this.animationResult=void 0}}const rf=(r,t)=>{var e;const[n,i]=t;(e=r.nodes)===null||e===void 0||e.forEach(a=>{if(a.style){const{x:l=0,y:u=0}=a.style;a.style.x=l+n,a.style.y=u+i}else a.style={x:n,y:i}})};function Ov(r){return[Tv].reduce((e,n)=>n(e),r)}function Tv(r){return!r.layout||Array.isArray(r.layout)||"preLayout"in r.layout||["antv-dagre","combo-combined","compact-box","circular","concentric","dagre","fishbone","grid","indented","mds","radial","random","snake","dendrogram","mindmap"].includes(r.layout.type)&&(r.layout.preLayout=!0),r}class Cv extends Di{constructor(t){super(t),this.category="plugin",this.setPlugins(this.context.options.plugins||[])}setPlugins(t){this.setExtensions(t)}getPluginInstance(t){const e=this.extensionMap[t];if(e)return e;Xe.warn(`Cannot find the plugin ${t}, will try to find it by type.`);const n=this.extensions.find(i=>i.type===t);if(n)return this.extensionMap[n.key]}}const Lu=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class Nv extends Di{constructor(t){super(t),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(t){this.setExtensions([...Lu.slice(0,Lu.length-1),...t,Lu[Lu.length-1]])}getTransformInstance(t){return t?this.extensionMap[t]:this.extensionMap}}var hc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Pv{get padding(){return Ne(this.context.options.padding)}get paddingOffset(){const[t,e,n,i]=this.padding,[a,l,u]=[(i-e)/2,(t-n)/2,0];return[a,l,u]}constructor(t){this.landmarkCounter=0,this.context=t;const[e,n]=this.paddingOffset,{zoom:i,rotation:a,x:l=e,y:u=n}=t.options;this.transform({mode:"absolute",scale:i,translate:[l,u],rotate:a},!1)}get camera(){const{canvas:t}=this.context;return new Proxy(t.getCamera(),{get:(e,n)=>{const a=Object.entries(t.getLayers()).filter(([u])=>!["main"].includes(u)).map(([,u])=>u.getCamera()),l=e[n];if(typeof l=="function")return(...u)=>{const f=l.apply(e,u);return a.forEach(m=>{m[n].apply(m,u)}),f}}})}createLandmark(t){return this.camera.createLandmark(`landmark-${this.landmarkCounter++}`,t)}getAnimation(t){const e=It(this.context.options,t);return e?(0,la.Z)(Object.assign({},e),["easing","duration"]):!1}getCanvasSize(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e,n]}getCanvasCenter(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e/2,n/2,0]}getViewportCenter(){const[t,e]=this.camera.getPosition();return[t,e,0]}getGraphCenter(){return this.context.graph.getViewportByCanvas(this.getCanvasCenter())}getZoom(){return this.camera.getZoom()}getRotation(){return this.camera.getRoll()}getTranslateOptions(t){const{camera:e}=this,{mode:n,translate:i=[]}=t,a=this.getZoom(),l=e.getPosition(),u=e.getFocalPoint(),[f,m]=this.getCanvasCenter(),[x=0,Z=0,V=0]=i,et=ot([-x,-Z,-V],a);return n==="relative"?{position:M(l,et),focalPoint:M(u,et)}:{position:M([f,m,l[2]],et),focalPoint:M([f,m,u[2]],et)}}getRotateOptions(t){const{mode:e,rotate:n=0}=t;return{roll:e==="relative"?this.camera.getRoll()+n:n}}getZoomOptions(t){const{zoomRange:e}=this.context.options,n=this.camera.getZoom(),{mode:i,scale:a=1}=t;return(0,as.Z)(i==="relative"?n*a:a,...e)}transform(t,e){return hc(this,void 0,void 0,function*(){const{graph:n}=this.context,{translate:i,rotate:a,scale:l,origin:u}=t;this.cancelAnimation();const f=this.getAnimation(e);if(ua(n,new ku(Q.BEFORE_TRANSFORM,t)),!a&&l&&!i&&u&&!f){this.camera.setZoomByViewportPoint(this.getZoomOptions(t),u),ua(n,new ku(Q.AFTER_TRANSFORM,t));return}const m={};if(i&&Object.assign(m,this.getTranslateOptions(t)),(0,on.Z)(a)&&Object.assign(m,this.getRotateOptions(t)),(0,on.Z)(l)&&Object.assign(m,{zoom:this.getZoomOptions(t)}),f)return ua(n,new bs(Q.BEFORE_ANIMATE,L.TRANSFORM,null,t)),new Promise(x=>{this.transformResolver=x,this.camera.gotoLandmark(this.createLandmark(m),Object.assign(Object.assign({},f),{onfinish:()=>{ua(n,new bs(Q.AFTER_ANIMATE,L.TRANSFORM,null,t)),ua(n,new ku(Q.AFTER_TRANSFORM,t)),this.transformResolver=void 0,x()}}))});this.camera.gotoLandmark(this.createLandmark(m),{duration:0}),ua(n,new ku(Q.AFTER_TRANSFORM,t))})}fitView(t,e){return hc(this,void 0,void 0,function*(){const[n,i,a,l]=this.padding,{when:u="always",direction:f="both"}=t||{},[m,x]=this.context.canvas.getSize(),Z=m-l-i,V=x-n-a,et=this.context.canvas.getBounds(),dt=this.getBBoxInViewport(et),[At,Dt]=Xt(dt),Qt=f==="x"&&At>=Z||f==="y"&&Dt>=V||f==="both"&&At>=Z&&Dt>=V;if(u==="overflow"&&!Qt)return yield this.fitCenter({animation:e});const oe=Z/At,pe=V/Dt,Be=f==="x"?oe:f==="y"?pe:Math.min(oe,pe),vn=this.getAnimation(e);Number.isFinite(Be)&&(yield this.transform({mode:"relative",scale:Be,translate:M(Y(this.getCanvasCenter(),this.getBBoxInViewport(et).center),ot(this.paddingOffset,Be))},vn))})}fitCenter(t){return hc(this,void 0,void 0,function*(){const e=this.context.canvas.getBounds();yield this.focus(e,t)})}focusElements(t){return hc(this,arguments,void 0,function*(e,n={}){const{element:i}=this.context;if(!i)return;const a=u=>n.shapes?u.getShape(n.shapes).getRenderBounds():u.getRenderBounds(),l=qt(e.map(u=>a(i.getElement(u))));yield this.focus(l,n)})}focus(t,e){return hc(this,void 0,void 0,function*(){const n=this.context.graph.getViewportByCanvas(t.center),i=e.position||this.getCanvasCenter(),a=Y(i,n);yield this.transform({mode:"relative",translate:M(a,this.paddingOffset)},e.animation)})}getBBoxInViewport(t){const{min:e,max:n}=t,{graph:i}=this.context,[a,l]=i.getViewportByCanvas(e),[u,f]=i.getViewportByCanvas(n),m=new _.mN;return m.setMinMax([a,l,0],[u,f,0]),m}isInViewport(t,e=!1,n=0){const{graph:i}=this.context,a=this.getCanvasSize(),[l,u]=i.getCanvasByViewport([0,0]),[f,m]=i.getCanvasByViewport(a);let x=new _.mN;return x.setMinMax([l,u,0],[f,m,0]),n&&(x=Ut(x,n)),Jt(t)?te(t,x):e?se(t,x):x.intersects(t)}cancelAnimation(){var t,e;!((t=this.camera.landmarks)===null||t===void 0)&&t.length&&this.camera.cancelLandmarkAnimation(),(e=this.transformResolver)===null||e===void 0||e.call(this)}}var Li=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Du extends Hh.Z{constructor(t){var e;super(),this.options={},this.rendered=!1,this.destroyed=!1,this.context={model:new xv},this.isCollapsingExpanding=!1,this.onResize=(0,Oo.Z)(()=>{this.resize()},300),this._setOptions(Object.assign({},Du.defaultOptions,t),!0),this.context.graph=this,this.options.autoResize&&((e=globalThis.addEventListener)===null||e===void 0||e.call(globalThis,"resize",this.onResize))}getOptions(){return this.options}setOptions(t){this._setOptions(t,!1)}_setOptions(t,e){if(this.updateCanvas(t),Object.assign(this.options,Ov(t)),e){const{data:V}=t;V&&this.addData(V);return}const{behaviors:n,combo:i,data:a,edge:l,layout:u,node:f,plugins:m,theme:x,transforms:Z}=t;n&&this.setBehaviors(n),a&&this.setData(a),f&&this.setNode(f),l&&this.setEdge(l),i&&this.setCombo(i),u&&this.setLayout(u),x&&this.setTheme(x),m&&this.setPlugins(m),Z&&this.setTransforms(Z)}getSize(){return this.context.canvas?this.context.canvas.getSize():[this.options.width||0,this.options.height||0]}setSize(t,e){t&&(this.options.width=t),e&&(this.options.height=e),this.resize(t,e)}setZoomRange(t){this.options.zoomRange=t}getZoomRange(){return this.options.zoomRange}setNode(t){this.options.node=t,this.context.model.refreshData()}setEdge(t){this.options.edge=t,this.context.model.refreshData()}setCombo(t){this.options.combo=t,this.context.model.refreshData()}getTheme(){return this.options.theme}setTheme(t){this.options.theme=(0,xe.Z)(t)?t(this.getTheme()):t}setLayout(t){this.options.layout=(0,xe.Z)(t)?t(this.getLayout()):t}getLayout(){return this.options.layout}setBehaviors(t){var e;this.options.behaviors=(0,xe.Z)(t)?t(this.getBehaviors()):t,(e=this.context.behavior)===null||e===void 0||e.setBehaviors(this.options.behaviors)}updateBehavior(t){this.setBehaviors(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getBehaviors(){return this.options.behaviors||[]}setPlugins(t){var e;this.options.plugins=(0,xe.Z)(t)?t(this.getPlugins()):t,(e=this.context.plugin)===null||e===void 0||e.setPlugins(this.options.plugins)}updatePlugin(t){this.setPlugins(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getPlugins(){return this.options.plugins||[]}getPluginInstance(t){return this.context.plugin.getPluginInstance(t)}setTransforms(t){var e;this.options.transforms=(0,xe.Z)(t)?t(this.getTransforms()):t,(e=this.context.transform)===null||e===void 0||e.setTransforms(this.options.transforms)}updateTransform(t){this.setTransforms(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n)),this.context.model.refreshData()}getTransforms(){return this.options.transforms||[]}getData(){return this.context.model.getData()}hasNode(t){return this.context.model.hasNode(t)}hasEdge(t){return this.context.model.hasEdge(t)}hasCombo(t){return this.context.model.hasCombo(t)}getElementData(t){return Array.isArray(t)?t.map(e=>this.context.model.getElementDataById(e)):this.context.model.getElementDataById(t)}getNodeData(t){return t===void 0?this.context.model.getNodeData():Array.isArray(t)?this.context.model.getNodeData(t):this.context.model.getNodeLikeDatum(t)}getEdgeData(t){return t===void 0?this.context.model.getEdgeData():Array.isArray(t)?this.context.model.getEdgeData(t):this.context.model.getEdgeDatum(t)}getComboData(t){return t===void 0?this.context.model.getComboData():Array.isArray(t)?this.context.model.getComboData(t):this.context.model.getNodeLikeDatum(t)}setData(t){this.context.model.setData((0,xe.Z)(t)?t(this.getData()):t)}addData(t){this.context.model.addData((0,xe.Z)(t)?t(this.getData()):t)}addNodeData(t){this.context.model.addNodeData((0,xe.Z)(t)?t(this.getNodeData()):t)}addEdgeData(t){this.context.model.addEdgeData((0,xe.Z)(t)?t(this.getEdgeData()):t)}addComboData(t){this.context.model.addComboData((0,xe.Z)(t)?t(this.getComboData()):t)}addChildrenData(t,e){this.context.model.addChildrenData(t,e)}updateData(t){this.context.model.updateData((0,xe.Z)(t)?t(this.getData()):t)}updateNodeData(t){this.context.model.updateNodeData((0,xe.Z)(t)?t(this.getNodeData()):t)}updateEdgeData(t){this.context.model.updateEdgeData((0,xe.Z)(t)?t(this.getEdgeData()):t)}updateComboData(t){this.context.model.updateComboData((0,xe.Z)(t)?t(this.getComboData()):t)}removeData(t){this.context.model.removeData((0,xe.Z)(t)?t(this.getData()):t)}removeNodeData(t){this.context.model.removeNodeData((0,xe.Z)(t)?t(this.getNodeData()):t)}removeEdgeData(t){this.context.model.removeEdgeData((0,xe.Z)(t)?t(this.getEdgeData()):t)}removeComboData(t){this.context.model.removeComboData((0,xe.Z)(t)?t(this.getComboData()):t)}getElementType(t){return this.context.model.getElementType(t)}getRelatedEdgesData(t,e="both"){return this.context.model.getRelatedEdgesData(t,e)}getNeighborNodesData(t){return this.context.model.getNeighborNodesData(t)}getAncestorsData(t,e){return this.context.model.getAncestorsData(t,e)}getParentData(t,e){return this.context.model.getParentData(t,e)}getChildrenData(t){return this.context.model.getChildrenData(t)}getDescendantsData(t){return this.context.model.getDescendantsData(t)}getElementDataByState(t,e){return this.context.model.getElementDataByState(t,e)}initCanvas(){return Li(this,void 0,void 0,function*(){var t;if(this.context.canvas)return yield this.context.canvas.ready;const{container:e="container",width:n,height:i,renderer:a,cursor:l,background:u,canvas:f,devicePixelRatio:m=(t=globalThis.devicePixelRatio)!==null&&t!==void 0?t:1}=this.options;if(e instanceof Qd)this.context.canvas=e,l&&e.setCursor(l),a&&e.setRenderer(a),yield e.ready;else{const x=(0,ta.Z)(e)?document.getElementById(e):e,Z=qd(x);this.emit(Q.BEFORE_CANVAS_INIT,{container:x,width:n,height:i});const V=Object.assign(Object.assign({},f),{container:x,width:n||Z[0],height:i||Z[1],background:u,renderer:a,cursor:l,devicePixelRatio:m}),et=new Qd(V);this.context.canvas=et,yield et.ready,this.emit(Q.AFTER_CANVAS_INIT,{canvas:et})}})}updateCanvas(t){var e,n;const{renderer:i,cursor:a,height:l,width:u}=t,f=this.context.canvas;f&&(i&&(this.emit(Q.BEFORE_RENDERER_CHANGE,{renderer:this.options.renderer}),f.setRenderer(i),this.emit(Q.AFTER_RENDERER_CHANGE,{renderer:i})),a&&f.setCursor(a),((0,on.Z)(u)||(0,on.Z)(l))&&this.setSize((e=u!=null?u:this.options.width)!==null&&e!==void 0?e:0,(n=l!=null?l:this.options.height)!==null&&n!==void 0?n:0))}initRuntime(){this.context.options=this.options,this.context.batch||(this.context.batch=new pv(this.context)),this.context.plugin||(this.context.plugin=new Cv(this.context)),this.context.viewport||(this.context.viewport=new Pv(this.context)),this.context.transform||(this.context.transform=new Nv(this.context)),this.context.element||(this.context.element=new wv(this.context)),this.context.animation||(this.context.animation=new gv(this.context)),this.context.layout||(this.context.layout=new Av(this.context)),this.context.behavior||(this.context.behavior=new mv(this.context))}prepare(){return Li(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed){console.error(rn("The graph instance has been destroyed"));return}yield this.initCanvas(),this.initRuntime()})}render(){return Li(this,void 0,void 0,function*(){if(yield this.prepare(),ua(this,new ia(Q.BEFORE_RENDER)),this.options.layout)if(!this.rendered&&Vo(this.options.layout)){const t=yield this.context.element.preLayoutDraw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.autoFit()])}else{const t=this.context.element.draw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.context.layout.postLayout()]),yield this.autoFit()}else{const t=this.context.element.draw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.autoFit()])}this.rendered=!0,ua(this,new ia(Q.AFTER_RENDER))})}draw(){return Li(this,void 0,void 0,function*(){var t;yield this.prepare(),yield(t=this.context.element.draw())===null||t===void 0?void 0:t.finished})}layout(t){return Li(this,void 0,void 0,function*(){yield this.context.layout.postLayout(t)})}stopLayout(){this.context.layout.stopLayout()}clear(){return Li(this,void 0,void 0,function*(){const{model:t,element:e}=this.context;t.setData({}),t.clearChanges(),e==null||e.clear()})}destroy(){var t;ua(this,new ia(Q.BEFORE_DESTROY));const{layout:e,animation:n,element:i,model:a,canvas:l,behavior:u,plugin:f}=this.context;f==null||f.destroy(),u==null||u.destroy(),e==null||e.destroy(),n==null||n.destroy(),i==null||i.destroy(),a.destroy(),l==null||l.destroy(),this.options={},this.context={},this.off(),(t=globalThis.removeEventListener)===null||t===void 0||t.call(globalThis,"resize",this.onResize),this.destroyed=!0,ua(this,new ia(Q.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(t,e){var n;const i=qd((n=this.context.canvas)===null||n===void 0?void 0:n.getContainer()),a=[t||i[0],e||i[1]];if(!this.context.canvas)return;const l=this.context.canvas.getSize();(0,S.Z)(a,l)||(ua(this,new ia(Q.BEFORE_SIZE_CHANGE,{size:a})),this.context.canvas.resize(...a),ua(this,new ia(Q.AFTER_SIZE_CHANGE,{size:a})))}fitView(t,e){return Li(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.fitView(t,e)})}fitCenter(t){return Li(this,void 0,void 0,function*(){var e;yield(e=this.context.viewport)===null||e===void 0?void 0:e.fitCenter({animation:t})})}autoFit(){return Li(this,void 0,void 0,function*(){const{autoFit:t}=this.context.options;if(t)if((0,ta.Z)(t))t==="view"?yield this.fitView():t==="center"&&(yield this.fitCenter());else{const{type:e,animation:n}=t;e==="view"?yield this.fitView(t.options,n):e==="center"&&(yield this.fitCenter(n))}})}focusElement(t,e){return Li(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.focusElements(Array.isArray(t)?t:[t],{animation:e})})}zoomBy(t,e,n){return Li(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:t,origin:n},e)})}zoomTo(t,e,n){return Li(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",scale:t,origin:n},e)})}getZoom(){return this.context.viewport.getZoom()}rotateBy(t,e,n){return Li(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:t,origin:n},e)})}rotateTo(t,e,n){return Li(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",rotate:t,origin:n},e)})}getRotation(){return this.context.viewport.getRotation()}translateBy(t,e){return Li(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:t},e)})}translateTo(t,e){return Li(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",translate:t},e)})}getPosition(){return Y([0,0],this.getCanvasByViewport([0,0]))}translateElementBy(t,e){return Li(this,arguments,void 0,function*(n,i,a=!0){var l,u;const[f,m]=(0,R.Z)(n)?[n,(l=i)!==null&&l!==void 0?l:!0]:[{[n]:i},a];Object.entries(f).forEach(([x,Z])=>this.context.model.translateNodeLikeBy(x,Z)),yield(u=this.context.element.draw({animation:m,stage:"translate"}))===null||u===void 0?void 0:u.finished})}translateElementTo(t,e){return Li(this,arguments,void 0,function*(n,i,a=!0){var l,u;const[f,m]=(0,R.Z)(n)?[n,(l=i)!==null&&l!==void 0?l:!0]:[{[n]:i},a];Object.entries(f).forEach(([x,Z])=>this.context.model.translateNodeLikeTo(x,Z)),yield(u=this.context.element.draw({animation:m,stage:"translate"}))===null||u===void 0?void 0:u.finished})}getElementPosition(t){return this.context.model.getElementPosition(t)}getElementRenderStyle(t){return(0,pd.Z)(this.context.element.getElement(t).attributes,["context"])}setElementVisibility(t,e){return Li(this,arguments,void 0,function*(n,i,a=!0){var l,u;const[f,m]=(0,R.Z)(n)?[n,(l=i)!==null&&l!==void 0?l:!0]:[{[n]:i},a],x={nodes:[],edges:[],combos:[]};Object.entries(f).forEach(([et,dt])=>{const At=this.getElementType(et);x[`${At}s`].push({id:et,style:{visibility:dt}})});const{model:Z,element:V}=this.context;Z.preventUpdateNodeLikeHierarchy(()=>{Z.updateData(x)}),yield(u=V.draw({animation:m,stage:"visibility"}))===null||u===void 0?void 0:u.finished})}showElement(t,e){return Li(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"visible"])),e)})}hideElement(t,e){return Li(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"hidden"])),e)})}getElementVisibility(t){var e,n;const i=this.context.element.getElement(t);return(n=(e=i==null?void 0:i.style)===null||e===void 0?void 0:e.visibility)!==null&&n!==void 0?n:"visible"}setElementZIndex(t,e){return Li(this,void 0,void 0,function*(){var n;const i={nodes:[],edges:[],combos:[]},a=(0,R.Z)(t)?t:{[t]:e};Object.entries(a).forEach(([f,m])=>{const x=this.getElementType(f);i[`${x}s`].push({id:f,style:{zIndex:m}})});const{model:l,element:u}=this.context;l.preventUpdateNodeLikeHierarchy(()=>l.updateData(i)),yield(n=u.draw({animation:!1,stage:"zIndex"}))===null||n===void 0?void 0:n.finished})}frontElement(t){return Li(this,void 0,void 0,function*(){const e=Array.isArray(t)?t:[t],{model:n}=this.context,i={};e.map(a=>{const l=n.getFrontZIndex(a);if(n.getElementType(a)==="combo"){const f=n.getAncestorsData(a,Ht).at(-1)||this.getComboData(a),m=[f,...n.getDescendantsData(ye(f))],x=l-tf(f);m.forEach(V=>{i[ye(V)]=this.getElementZIndex(ye(V))+x});const{internal:Z}=sr(m.map(ye),V=>n.getRelatedEdgesData(V));Z.forEach(V=>{const et=ye(V);i[et]=this.getElementZIndex(et)+x})}else i[a]=l}),yield this.setElementZIndex(i)})}getElementZIndex(t){return tf(this.context.model.getElementDataById(t))}setElementState(t,e){return Li(this,arguments,void 0,function*(n,i,a=!0){var l,u;const[f,m]=(0,R.Z)(n)?[n,(l=i)!==null&&l!==void 0?l:!0]:[{[n]:i},a],x=V=>V?Array.isArray(V)?V:[V]:[],Z={nodes:[],edges:[],combos:[]};Object.entries(f).forEach(([V,et])=>{const dt=this.getElementType(V);Z[`${dt}s`].push({id:V,states:x(et)})}),this.updateData(Z),yield(u=this.context.element.draw({animation:m,stage:"state"}))===null||u===void 0?void 0:u.finished})}getElementState(t){return this.context.model.getElementState(t)}getElementRenderBounds(t){return this.context.element.getElement(t).getRenderBounds()}collapseElement(t){return Li(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(ha(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;typeof n=="boolean"&&(n={animation:n,align:!0});const l=i.getElementType(e);yield this.frontElement(e),this.isCollapsingExpanding=!0,i.updateData(l==="node"?{nodes:[{id:e,style:{collapsed:!0}}]}:{combos:[{id:e,style:{collapsed:!0}}]}),l==="node"?yield a.collapseNode(e,n):l==="combo"&&(yield a.collapseCombo(e,!!n.animation)),this.isCollapsingExpanding=!1})}expandElement(t){return Li(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(!ha(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;typeof n=="boolean"&&(n={animation:n,align:!0});const l=i.getElementType(e);this.isCollapsingExpanding=!0,i.updateData(l==="node"?{nodes:[{id:e,style:{collapsed:!1}}]}:{combos:[{id:e,style:{collapsed:!1}}]}),l==="node"?yield a.expandNode(e,n):l==="combo"&&(yield a.expandCombo(e,!!n.animation)),this.isCollapsingExpanding=!1})}setElementCollapsibility(t,e){const n=this.getElementType(t);n==="node"?this.updateNodeData([{id:t,style:{collapsed:e}}]):n==="combo"&&this.updateComboData([{id:t,style:{collapsed:e}}])}toDataURL(){return Li(this,arguments,void 0,function*(t={}){return this.context.canvas.toDataURL(t)})}getCanvasByViewport(t){return this.context.canvas.getCanvasByViewport(t)}getViewportByCanvas(t){return this.context.canvas.getViewportByCanvas(t)}getClientByCanvas(t){return this.context.canvas.getClientByCanvas(t)}getCanvasByClient(t){return this.context.canvas.getCanvasByClient(t)}getViewportCenter(){return this.context.viewport.getViewportCenter()}getCanvasCenter(){return this.context.viewport.getCanvasCenter()}on(t,e,n){return super.on(t,e,n)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}}Du.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};var kv=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function Rv(r,t){const{getNodeData:e=(u,f)=>{if(u.depth=f,!u.children)return u;const{children:m}=u,x=kv(u,["children"]);return Object.assign(Object.assign({},x),{children:m.map(Z=>Z.id)})},getEdgeData:n=(u,f)=>({source:u.id,target:f.id}),getChildren:i=u=>u.children||[]}=t||{},a=[],l=[];return za(r,(u,f)=>{a.push(e(u,f));const m=i(u);for(const x of m)l.push(n(u,x))},u=>i(u),"TB"),{nodes:a,edges:l}}class Lv extends Do{beforeDraw(t){const{add:e,update:n}=t,{model:i}=this.context;return[...e.edges.entries(),...n.edges.entries()].forEach(([,a])=>{af(i,a)}),t}}const af=(r,t)=>{const{source:e,target:n}=t,i=r.getElementDataById(e),a=r.getElementDataById(n),l=rr(i,Z=>r.getParentData(Z,Ht)),u=rr(a,Z=>r.getParentData(Z,Ht)),f=ye(l),m=ye(u),x={sourceNode:f,targetNode:m};return t.style?Object.assign(t.style,x):t.style=x,t},Dv=(r,t,e)=>{const[n,i]=t,[a,l]=e;if(i===n)return a;const u=(r-n)/(i-n);return a+u*(l-a)},Iv=(r,t,e)=>{const[n,i]=t,[a,l]=e,u=Math.log(r-n+1)/Math.log(i-n+1);return a+u*(l-a)},Bv=(r,t,e,n=2)=>{const[i,a]=t,[l,u]=e,f=Math.pow((r-i)/(a-i),n);return l+f*(u-l)},Fv=(r,t,e)=>{const[n,i]=t,[a,l]=e,u=Math.sqrt((r-n)/(i-n));return a+u*(l-a)};class Iu extends Do{constructor(t,e){super(t,(0,h.Z)({},Iu.defaultOptions,e)),this.assignSizeByCentrality=(n,i,a,l,u,f)=>{const m=[i,a],x=[l[0],u[0]],Z=[l[1],u[1]],V=[l[2],u[2]],et=(dt,At)=>{if(typeof f=="function")return f(dt,m,At);switch(f){case"linear":return Dv(dt,m,At);case"log":return Iv(dt,m,At);case"pow":return Bv(dt,m,At,2);case"sqrt":return Fv(dt,m,At);default:return At[0]}};return[et(n,x),et(n,Z),et(n,V)]}}beforeDraw(t){const{model:e}=this.context,n=e.getNodeData(),i=ea(this.options.maxSize),a=ea(this.options.minSize),l=this.getCentralities(this.options.centrality),u=l.size>0?Math.max(...l.values()):0,f=l.size>0?Math.min(...l.values()):0;return n.forEach(m=>{var x;const Z=this.assignSizeByCentrality(l.get(ye(m))||0,f,u,a,i,this.options.scale),V=(x=this.context.element)===null||x===void 0?void 0:x.getElement(ye(m)),et={size:Z};this.assignLabelStyle(et,Z,m,V),(!V||!Nu(et,V.attributes))&&cs(t,V?"update":"add","node",(0,h.Z)(m,{style:et}),!0)}),t}assignLabelStyle(t,e,n,i){var a;const l=i?i.config.style:(a=this.context.element)===null||a===void 0?void 0:a.getElementComputedStyle("node",n);if(Object.assign(t,(0,la.Z)(l,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const u=this.getLabelSizeByNodeSize(e,1/0,Number(t.labelFontSize));Object.assign(t,{labelFontSize:u,labelLineHeight:u+en(t.labelPadding)})}return t}getLabelSizeByNodeSize(t,e,n){const i=Math.min(...t)/2,[a,l]=Array.isArray(this.options.mapLabelSize)?this.options.mapLabelSize:[n,e];return Math.min(l,Math.max(i,a))}getCentralities(t){const{model:e}=this.context,n=e.getData();if(typeof t=="function")return t(n);const i=e.getRelatedEdgesData.bind(e);return Br(n,i,t)}}Iu.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class Bu extends Do{constructor(t,e){super(t,Object.assign({},Bu.defaultOptions,e))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var t;const e=Yt(this.ref),{graph:n,model:i}=this.context;(t=i.getData().nodes)===null||t===void 0||t.forEach(l=>{var u;if(ye(l)===ye(this.ref))return;const f=ut(Y(Yt(l),e)),m=Math.abs(f)>Math.PI/2,x=!l.children||l.children.length===0,Z=ye(l),V=(u=this.context.element)===null||u===void 0?void 0:u.getElement(Z);if(!V||!V.isVisible())return;const et=ea(n.getElementRenderStyle(Z).size)[0]/2,dt=(x?1:-1)*(et+this.options.offset),At=[["translate",dt*Math.cos(f),dt*Math.sin(f)],["rotate",m?(0,_.BV)(f)+180:(0,_.BV)(f)]];i.updateNodeData([{id:ye(l),style:{labelTextAlign:m===x?"right":"left",labelTextBaseline:"middle",labelTransform:At}}])}),n.draw()}}Bu.defaultOptions={offset:5};const _v="quadratic",sf=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class Fu extends Do{constructor(t,e){super(t,Object.assign({},Fu.defaultOptions,e)),this.cacheMergeStyle=new Map,this.getAffectedParallelEdges=n=>{const{add:{edges:i},update:{nodes:a,edges:l,combos:u},remove:{edges:f}}=n,{model:m}=this.context,x=new Map,Z=(dt,At)=>{m.getRelatedEdgesData(At).forEach(Qt=>!x.has(ye(Qt))&&x.set(ye(Qt),Qt))};a.forEach(Z),u.forEach(Z);const V=dt=>{const At=new Set(n.remove.edges.keys()),Dt=m.getEdgeData().filter(Qt=>!At.has(ye(Qt))).map(Qt=>af(m,Qt));Zv(dt,Dt,!0).forEach(Qt=>{const oe=ye(Qt);x.has(oe)||x.set(oe,Qt)})};if(f.size&&f.forEach(V),i.size&&i.forEach(V),l.size){const dt=Md(Xh(m.getChanges())).update.edges;l.forEach(At=>{var Dt;V(At);const Qt=(Dt=dt.find(oe=>ye(oe.value)===ye(At)))===null||Dt===void 0?void 0:Dt.original;Qt&&!rd(At,Qt)&&V(Qt)})}(0,Ii.Z)(this.options.edges)||x.forEach((dt,At)=>!this.options.edges.includes(At)&&x.delete(At));const et=m.getEdgeData().map(ye);return new Map([...x].sort((dt,At)=>et.indexOf(dt[0])-et.indexOf(At[0])))},this.applyBundlingStyle=(n,i,a)=>{const{edgeMap:l,reverses:u}=of(i);l.forEach(f=>{f.forEach((m,x,Z)=>{var V;const et=Z.length,dt=m.style||{};if(m.source===m.target){const Qt=sf.length;dt.loopPlacement=sf[x%Qt],dt.loopDist=Math.floor(x/Qt)*a+50}else if(et===1)dt.curveOffset=0;else{const Qt=(x%2===0?1:-1)*(u[`${m.source}|${m.target}|${x}`]?-1:1);dt.curveOffset=et%2===1?Qt*Math.ceil(x/2)*a*2:Qt*(Math.floor(x/2)*a*2+a)}const At=Object.assign(m,{type:_v,style:dt}),Dt=(V=this.context.element)===null||V===void 0?void 0:V.getElement(ye(m));(!Dt||!Nu(At.style,Dt.attributes))&&cs(n,Dt?"update":"add","edge",At,!0)})})},this.resetEdgeStyle=n=>{const i=n.style||{},a=this.cacheMergeStyle.get(ye(n))||{};return Object.keys(a).forEach(l=>{(0,S.Z)(i[l],a[l])&&(n[l]?i[l]=n[l]:delete i[l])}),Object.assign(n,{style:i})},this.applyMergingStyle=(n,i)=>{const{edgeMap:a,reverses:l}=of(i);a.forEach(u=>{var f;if(u.length===1){const x=u[0],Z=(f=this.context.element)===null||f===void 0?void 0:f.getElement(ye(x)),V=this.resetEdgeStyle(x);(!Z||!Nu(V,Z.attributes))&&cs(n,Z?"update":"add","edge",V);return}const m=u.map(({source:x,target:Z,style:V={}},et)=>{const{startArrow:dt,endArrow:At}=V,Dt={},[Qt,oe]=l[`${x}|${Z}|${et}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return(0,Yh.Z)(dt)&&(Dt[Qt]=dt),(0,Yh.Z)(At)&&(Dt[oe]=At),Dt}).reduce((x,Z)=>Object.assign(Object.assign({},x),Z),{});u.forEach((x,Z,V)=>{var et;if(Z!==0){cs(n,"remove","edge",x);return}const dt=Object.assign({},(0,xe.Z)(this.options.style)?this.options.style(V):this.options.style,{childrenData:V});this.cacheMergeStyle.set(ye(x),dt);const At=Object.assign(Object.assign({},x),{type:"line",style:Object.assign(Object.assign(Object.assign({},x.style),m),dt)}),Dt=(et=this.context.element)===null||et===void 0?void 0:et.getElement(ye(x));(!Dt||!Nu(At.style,Dt.attributes))&&cs(n,Dt?"update":"add","edge",At,!0)})})}}beforeDraw(t){const e=this.getAffectedParallelEdges(t);return e.size===0||(this.options.mode==="bundle"?this.applyBundlingStyle(t,e,this.options.distance):this.applyMergingStyle(t,e)),t}}Fu.defaultOptions={mode:"bundle",distance:15};const of=r=>{const t=new Map,e=new Set,n={},i=new Map;for(const[a,l]of r){if(e.has(a))continue;const{source:u,target:f}=l,m=`${u}-${f}`;t.has(m)||(t.set(m,[]),i.set(m,new Set));const x=t.get(m),Z=i.get(m);x&&Z&&!Z.has(a)&&(x.push(l),Z.add(a),e.add(a));for(const[V,et]of r)if(!(e.has(V)||V===a)&&rd(l,et)){const dt=t.get(m),At=i.get(m);dt&&At&&!At.has(V)&&(dt.push(et),At.add(V),u===et.target&&f===et.source&&(n[`${et.source}|${et.target}|${dt.length-1}`]=!0),e.add(V))}}return{edgeMap:t,reverses:n}},Zv=(r,t,e)=>t.filter(n=>(e||ye(n)!==ye(r))&&rd(n,r)),rd=(r,t)=>{const{sourceNode:e,targetNode:n}=r.style||{},{sourceNode:i,targetNode:a}=t.style||{};return e===i&&n===a||e===a&&n===i};class zv extends Do{beforeDraw(t,e){const{stage:n}=e;if(n==="visibility")return t;const{model:i}=this.context,{update:{nodes:a,edges:l,combos:u}}=t,f=(m,x)=>{i.getRelatedEdgesData(x).forEach(V=>!l.has(ye(V))&&l.set(ye(V),V))};return a.forEach(f),u.forEach(f),t}}const jv={animation:{"combo-collapse":Re,"combo-expand":ce,"node-collapse":Pt,"node-expand":wt,"path-in":he,"path-out":je,fade:le,translate:Ae},behavior:{"brush-select":Bs,"click-select":wa,"collapse-expand":So,"create-edge":Ao,"drag-canvas":Ls,"drag-element-force":fc,"drag-element":ps,"fix-element-size":fl,"focus-element":vl,"hover-activate":To,"lasso-select":gl,"auto-adapt-label":E,"optimize-viewport-transform":pl,"scroll-canvas":ml,"zoom-canvas":yl},combo:{circle:Us,rect:wo},edge:{cubic:P,line:ct,polyline:Qn,quadratic:Vn,"cubic-horizontal":k,"cubic-radial":U,"cubic-vertical":rt},layout:{"antv-dagre":o,"combo-combined":qc,"compact-box":Hs.compactBox,"d3-force":nu,"force-atlas2":go,circular:W,concentric:ze,dagre:al,dendrogram:Hs.dendrogram,fishbone:su,force:un,fruchterman:jh,grid:cf,indented:Hs.indented,mds:Qi,mindmap:Hs.mindmap,radial:yf,random:Af,snake:ou},node:{circle:Pa,diamond:Hi,ellipse:Cs,hexagon:Ha,html:Ws,image:Ns,rect:jo,star:io,donut:Gi,triangle:Ps},palette:{spectral:Nf,tableau:Pf,oranges:kf,greens:Rf,blues:Lf},theme:{dark:nv,light:rv},plugin:{"bubble-sets":cu,"edge-bundling":hu,"edge-filter-lens":du,"grid-line":gu,background:lu,contextmenu:uu,fisheye:fu,fullscreen:vu,history:pu,hull:Eu,legend:wu,minimap:Mu,snapline:Su,timebar:Au,title:G0,toolbar:Ou,tooltip:Tu,watermark:Cu},transform:{"arrange-draw-order":iv,"collapse-expand-combo":av,"collapse-expand-node":sv,"get-edge-actual-ends":Lv,"map-node-size":Iu,"place-radial-labels":Bu,"process-parallel-edges":Fu,"update-related-edges":zv},shape:{circle:_.Cd,ellipse:_.Pj,group:_.ZA,html:_.k9,image:zs,line:_.x1,path:_.y$,polygon:_.mg,polyline:_.aH,rect:_.UL,text:_.xv,label:fa,badge:Ia}};function Wv(){Object.entries(jv).forEach(([r,t])=>{Object.entries(t).forEach(([e,n])=>{ov(r,e,n)})})}Wv();const eg={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"}},7225:function(yt,Et,y){"use strict";y.d(Et,{mN:function(){return c.mN},Xz:function(){return c.Xz},$6:function(){return c.$6},Cd:function(){return c.Cd},b_:function(){return c.b_},Aw:function(){return c.Aw},s$:function(){return c.s$},BB:function(){return c.BB},Dk:function(){return c.Dk},Pj:function(){return c.Pj},nR:function(){return c.nR},ZA:function(){return c.ZA},k9:function(){return c.k9},Ee:function(){return c.Ee},x1:function(){return c.x1},y$:function(){return c.y$},mg:function(){return c.mg},aH:function(){return c.aH},UL:function(){return c.UL},xv:function(){return c.xv},BV:function(){return c.BV},GZ:function(){return c.GZ}});var c=y(9350),_=y(67732),I=y(83652),z=y(22214),S=y(42403),R=y(71879),w=y(1933),N=y(94569),D=y(60187),A=y(92421);var L=function(bt){function pt(){var ut;(0,_.Z)(this,pt);for(var Gt=arguments.length,Vt=new Array(Gt),ve=0;ve<Gt;ve++)Vt[ve]=arguments[ve];return ut=(0,z.Z)(this,pt,[].concat(Vt)),ut.landmarks=[],ut}return(0,S.Z)(pt,bt),(0,I.Z)(pt,[{key:"rotate",value:function(Gt,Vt,ve){if(this.relElevation=(0,c._O)(Vt),this.relAzimuth=(0,c._O)(Gt),this.relRoll=(0,c._O)(ve),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===c.iM.EXPLORING){var ge=N.yY(N.Ue(),[1,0,0],(0,c.Vl)((this.rotateWorld?1:-1)*this.relElevation)),Yt=N.yY(N.Ue(),[0,1,0],(0,c.Vl)((this.rotateWorld?1:-1)*this.relAzimuth)),Ce=N.yY(N.Ue(),[0,0,1],(0,c.Vl)(this.relRoll)),qe=N.Jp(N.Ue(),Yt,ge);qe=N.Jp(N.Ue(),qe,Ce);var Qe=D.fromQuat(D.create(),qe);D.translate(this.matrix,this.matrix,[0,0,-this.distance]),D.multiply(this.matrix,this.matrix,Qe),D.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===c.iM.ORBITING||this.type===c.iM.EXPLORING?this._getPosition():this.type===c.iM.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(Gt,Vt){var ve=(0,c.O4)(Gt,Vt,0),ge=A.d9(this.position);return A.IH(ge,ge,A.bA(A.Ue(),this.right,ve[0])),A.IH(ge,ge,A.bA(A.Ue(),this.up,ve[1])),this._setPosition(ge),this.triggerUpdate(),this}},{key:"dolly",value:function(Gt){var Vt=this.forward,ve=A.d9(this.position),ge=Gt*this.dollyingStep,Yt=this.distance+Gt*this.dollyingStep;return ge=Math.max(Math.min(Yt,this.maxDistance),this.minDistance)-this.distance,ve[0]+=ge*Vt[0],ve[1]+=ge*Vt[1],ve[2]+=ge*Vt[2],this._setPosition(ve),this.type===c.iM.ORBITING||this.type===c.iM.EXPLORING?this._getDistance():this.type===c.iM.TRACKING&&A.IH(this.focalPoint,ve,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(Gt){var Vt,ve,ge,Yt,Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qe=Ce.position,Qe=qe===void 0?this.position:qe,Nn=Ce.focalPoint,Dn=Nn===void 0?this.focalPoint:Nn,Rn=Ce.roll,Xn=Ce.zoom,tr=new c.GZ.CameraContribution;tr.setType(this.type,void 0),tr.setPosition(Qe[0],(Vt=Qe[1])!==null&&Vt!==void 0?Vt:this.position[1],(ve=Qe[2])!==null&&ve!==void 0?ve:this.position[2]),tr.setFocalPoint(Dn[0],(ge=Dn[1])!==null&&ge!==void 0?ge:this.focalPoint[1],(Yt=Dn[2])!==null&&Yt!==void 0?Yt:this.focalPoint[2]),tr.setRoll(Rn!=null?Rn:this.roll),tr.setZoom(Xn!=null?Xn:this.zoom);var Mr={name:Gt,matrix:D.clone(tr.getWorldTransform()),right:A.d9(tr.right),up:A.d9(tr.up),forward:A.d9(tr.forward),position:A.d9(tr.getPosition()),focalPoint:A.d9(tr.getFocalPoint()),distanceVector:A.d9(tr.getDistanceVector()),distance:tr.getDistance(),dollyingStep:tr.getDollyingStep(),azimuth:tr.getAzimuth(),elevation:tr.getElevation(),roll:tr.getRoll(),relAzimuth:tr.relAzimuth,relElevation:tr.relElevation,relRoll:tr.relRoll,zoom:tr.getZoom()};return this.landmarks.push(Mr),Mr}},{key:"gotoLandmark",value:function(Gt){var Vt=this,ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ge=(0,R.Z)(Gt)?this.landmarks.find(function(Lr){return Lr.name===Gt}):Gt;if(ge){var Yt=(0,w.Z)(ve)?{duration:ve}:ve,Ce=Yt.easing,qe=Ce===void 0?"linear":Ce,Qe=Yt.duration,Nn=Qe===void 0?100:Qe,Dn=Yt.easingFunction,Rn=Dn===void 0?void 0:Dn,Xn=Yt.onfinish,tr=Xn===void 0?void 0:Xn,Mr=Yt.onframe,yr=Mr===void 0?void 0:Mr,vr=.01;this.cancelLandmarkAnimation();var Cr=ge.position,ur=ge.focalPoint,Kn=ge.zoom,Ur=ge.roll,Yr=Rn||c.GZ.EasingFunction(qe),br,xi=function(){Vt.setFocalPoint(ur),Vt.setPosition(Cr),Vt.setRoll(Ur),Vt.setZoom(Kn),Vt.computeMatrix(),Vt.triggerUpdate(),tr==null||tr()};if(Nn===0)return xi();var di=function(Ci){br===void 0&&(br=Ci);var fi=Ci-br;if(fi>=Nn){xi();return}var Ni=Yr(fi/Nn),Ji=A.Ue(),Fa=A.Ue(),La=1,_a=0;A.t7(Ji,Vt.focalPoint,ur,Ni),A.t7(Fa,Vt.position,Cr,Ni),_a=Vt.roll*(1-Ni)+Ur*Ni,La=Vt.zoom*(1-Ni)+Kn*Ni,Vt.setFocalPoint(Ji),Vt.setPosition(Fa),Vt.setRoll(_a),Vt.setZoom(La);var ta=A.TK(Ji,ur)+A.TK(Fa,Cr);if(ta<=vr&&Kn===void 0&&Ur===void 0)return xi();Vt.computeMatrix(),Vt.triggerUpdate(),fi<Nn&&(yr==null||yr(Ni),Vt.landmarkAnimationID=Vt.canvas.requestAnimationFrame(di))};this.canvas.requestAnimationFrame(di)}}}])}(c.V1);c.GZ.CameraContribution=L;var F=null,it=0,G=new WeakMap,kt=null,gt=null,Q,Rt;function Ct(bt,pt){return Q=new F(bt,pt)}function Ht(bt){return Rt||(Rt=F.copy(Q),Rt.oldValue=bt,Rt)}function de(){Q=Rt=void 0}function ue(bt){return bt===Rt||bt===Q}function Te(bt,pt){return bt===pt?bt:Rt&&ue(bt)?Rt:null}function be(bt){bt.nodes.forEach(function(pt){var ut=G.get(pt);ut&&ut.forEach(function(Gt){Gt.observer===bt&&Gt.removeTransientObservers()})})}function we(bt,pt){for(var ut=bt;ut;ut=ut.parentNode){var Gt=G.get(ut);if(Gt)for(var Vt=0;Vt<Gt.length;Vt++){var ve=Gt[Vt],ge=ve.options;if(!(ut!==bt&&!ge.subtree)){var Yt=pt(ge);Yt&&ve.enqueue(Yt)}}}}var re=!1,Ge=null;function rn(bt){Ge.push(bt),re||(re=!0,typeof runtime.globalThis!="undefined"?runtime.globalThis.setTimeout(Xe):Xe())}function Xe(){re=!1;var bt=Ge;Ge=[],bt.sort(function(ut,Gt){return ut.uid-Gt.uid});var pt=!1;bt.forEach(function(ut){var Gt=ut.takeRecords();be(ut),Gt.length&&(ut.callback(Gt,ut),pt=!0)}),pt&&Xe()}var En=y(94480),Pn=y(42978),tn=y(70208),xn=y(76075);var It=function(bt){function pt(ut,Gt,Vt,ve){var ge;return(0,_.Z)(this,pt),ge=(0,z.Z)(this,pt,[ut]),ge.currentTime=Vt,ge.timelineTime=ve,ge.target=Gt,ge.type="finish",ge.bubbles=!1,ge.currentTarget=Gt,ge.defaultPrevented=!1,ge.eventPhase=ge.AT_TARGET,ge.timeStamp=Date.now(),ge.currentTime=Vt,ge.timelineTime=ve,ge}return(0,S.Z)(pt,bt),(0,I.Z)(pt)}(c.xA),Ee=0,fn=function(){function bt(pt,ut){var Gt;(0,_.Z)(this,bt),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=pt,pt.animation=this,this.timeline=ut,this.id="".concat(Ee++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((Gt=this.effect)===null||Gt===void 0?void 0:Gt.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return(0,I.Z)(bt,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var ut=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(Gt,Vt){ut.resolveReadyPromise=function(){Gt(ut)},ut.rejectReadyPromise=function(){Vt(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var ut=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(Gt,Vt){ut.resolveFinishedPromise=function(){Gt(ut)},ut.rejectFinishedPromise=function(){Vt(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(ut){if(ut=Number(ut),!isNaN(ut)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var Gt;this._startTime=Number((Gt=this.timeline)===null||Gt===void 0?void 0:Gt.currentTime)-ut/this.playbackRate}this.currentTimePending=!1,this._currentTime!==ut&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(ut,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(ut){if(ut!==null){if(this.updatePromises(),ut=Number(ut),isNaN(ut)||this._paused||this._idle)return;this._startTime=ut,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(ut){if(ut!==this._playbackRate){this.updatePromises();var Gt=this.currentTime;this._playbackRate=ut,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),Gt!==null&&(this.currentTime=Gt),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var ut;if((ut=this.effect.target)!==null&&ut!==void 0&&ut.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var Gt=this.oldPlayState,Vt=this.pending?"pending":this.playState;return this.readyPromise&&Vt!==Gt&&(Vt==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):Gt==="pending"?this.resolveReadyPromise():Vt==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&Vt!==Gt&&(Vt==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):Vt==="finished"?this.resolveFinishedPromise():Gt==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=Vt,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var ut=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var Gt=new It(null,this,this.currentTime,null);setTimeout(function(){ut.oncancel(Gt)})}}},{key:"reverse",value:function(){this.updatePromises();var ut=this.currentTime;this.playbackRate*=-1,this.play(),ut!==null&&(this.currentTime=ut),this.updatePromises()}},{key:"updatePlaybackRate",value:function(ut){this.playbackRate=ut}},{key:"targetAnimations",value:function(){var ut,Gt=(ut=this.effect)===null||ut===void 0?void 0:ut.target;return Gt.getAnimations()}},{key:"markTarget",value:function(){var ut=this.targetAnimations();ut.indexOf(this)===-1&&ut.push(this)}},{key:"unmarkTarget",value:function(){var ut=this.targetAnimations(),Gt=ut.indexOf(this);Gt!==-1&&ut.splice(Gt,1)}},{key:"tick",value:function(ut,Gt){!this._idle&&!this._paused&&(this._startTime===null?Gt&&(this.startTime=ut-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((ut-this._startTime)*this.playbackRate)),Gt&&(this.currentTimePending=!1,this.fireEvents(ut))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(c.jf)}},{key:"addEventListener",value:function(ut,Gt,Vt){throw new Error(c.jf)}},{key:"removeEventListener",value:function(ut,Gt,Vt){throw new Error(c.jf)}},{key:"dispatchEvent",value:function(ut){throw new Error(c.jf)}},{key:"commitStyles",value:function(){throw new Error(c.jf)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var ut;this._inEffect=!!((ut=this.effect)!==null&&ut!==void 0&&ut.update(-1))}else{var Gt;this._inEffect=!!((Gt=this.effect)!==null&&Gt!==void 0&&Gt.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(ut,Gt){ut!==this._currentTime&&(this._currentTime=ut,this._isFinished&&!Gt&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(ut){var Gt=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var Vt=new It(null,this,this.currentTime,ut);setTimeout(function(){Gt.onfinish&&Gt.onfinish(Vt)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var ve=new It(null,this,this.currentTime,ut);this.onframe(ve)}this._finishedFlag=!1}}}])}(),on=4,Pe=.001,Ze=1e-7,Ke=10,le=11,Ae=1/(le-1),Pt=typeof Float32Array=="function",wt=function(pt,ut){return 1-3*ut+3*pt},he=function(pt,ut){return 3*ut-6*pt},je=function(pt){return 3*pt},Re=function(pt,ut,Gt){return((wt(ut,Gt)*pt+he(ut,Gt))*pt+je(ut))*pt},ce=function(pt,ut,Gt){return 3*wt(ut,Gt)*pt*pt+2*he(ut,Gt)*pt+je(ut)},Le=function(pt,ut,Gt,Vt,ve){var ge,Yt,Ce=0;do Yt=ut+(Gt-ut)/2,ge=Re(Yt,Vt,ve)-pt,ge>0?Gt=Yt:ut=Yt;while(Math.abs(ge)>Ze&&++Ce<Ke);return Yt},xe=function(pt,ut,Gt,Vt){for(var ve=0;ve<on;++ve){var ge=ce(ut,Gt,Vt);if(ge===0)return ut;var Yt=Re(ut,Gt,Vt)-pt;ut-=Yt/ge}return ut},_t=function(pt,ut,Gt,Vt){if(!(pt>=0&&pt<=1&&Gt>=0&&Gt<=1))throw new Error("bezier x values must be in [0, 1] range");if(pt===ut&&Gt===Vt)return function(Ce){return Ce};for(var ve=Pt?new Float32Array(le):new Array(le),ge=0;ge<le;++ge)ve[ge]=Re(ge*Ae,pt,Gt);var Yt=function(qe){for(var Qe=0,Nn=1,Dn=le-1;Nn!==Dn&&ve[Nn]<=qe;++Nn)Qe+=Ae;--Nn;var Rn=(qe-ve[Nn])/(ve[Nn+1]-ve[Nn]),Xn=Qe+Rn*Ae,tr=ce(Xn,pt,Gt);return tr>=Pe?xe(qe,Xn,pt,Gt):tr===0?Xn:Le(qe,Qe,Qe+Ae,pt,Gt)};return function(Ce){return Ce===0||Ce===1?Ce:Re(Yt(Ce),ut,Vt)}},ie=function(pt){return pt=pt.replace(/([A-Z])/g,function(ut){return"-".concat(ut.toLowerCase())}),pt.charAt(0)==="-"?pt.substring(1):pt},Me=function(pt){return Math.pow(pt,2)},T=function(pt){return Math.pow(pt,3)},at=function(pt){return Math.pow(pt,4)},fe=function(pt){return Math.pow(pt,5)},Jt=function(pt){return Math.pow(pt,6)},Ie=function(pt){return 1-Math.cos(pt*Math.PI/2)},Ne=function(pt){return 1-Math.sqrt(1-pt*pt)},en=function(pt){return pt*pt*(3*pt-2)},St=function(pt){for(var ut,Gt=4;pt<((ut=Math.pow(2,--Gt))-1)/11;);return 1/Math.pow(4,3-Gt)-7.5625*Math.pow((ut*3-2)/22-pt,2)},tt=function(pt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Gt=(0,Pn.Z)(ut,2),Vt=Gt[0],ve=Vt===void 0?1:Vt,ge=Gt[1],Yt=ge===void 0?.5:ge,Ce=(0,tn.Z)(Number(ve),1,10),qe=(0,tn.Z)(Number(Yt),.1,2);return pt===0||pt===1?pt:-Ce*Math.pow(2,10*(pt-1))*Math.sin((pt-1-qe/(Math.PI*2)*Math.asin(1/Ce))*(Math.PI*2)/qe)},Nt=function(pt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Gt=arguments.length>2?arguments[2]:void 0,Vt=(0,Pn.Z)(ut,4),ve=Vt[0],ge=ve===void 0?1:ve,Yt=Vt[1],Ce=Yt===void 0?100:Yt,qe=Vt[2],Qe=qe===void 0?10:qe,Nn=Vt[3],Dn=Nn===void 0?0:Nn;ge=(0,tn.Z)(ge,.1,1e3),Ce=(0,tn.Z)(Ce,.1,1e3),Qe=(0,tn.Z)(Qe,.1,1e3),Dn=(0,tn.Z)(Dn,.1,1e3);var Rn=Math.sqrt(Ce/ge),Xn=Qe/(2*Math.sqrt(Ce*ge)),tr=Xn<1?Rn*Math.sqrt(1-Xn*Xn):0,Mr=1,yr=Xn<1?(Xn*Rn+-Dn)/tr:-Dn+Rn,vr=Gt?Gt*pt/1e3:pt;return Xn<1?vr=Math.exp(-vr*Xn*Rn)*(Mr*Math.cos(tr*vr)+yr*Math.sin(tr*vr)):vr=(Mr+yr*vr)*Math.exp(-vr*Rn),pt===0||pt===1?pt:1-vr},Xt=function(pt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Gt=ut,Vt=(0,Pn.Z)(Gt,2),ve=Vt[0],ge=ve===void 0?10:ve,Yt=Vt[1],Ce=Yt==="start"?Math.ceil:Math.floor;return Ce((0,tn.Z)(pt,0,1)*ge)/ge},Lt=function(pt){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Gt=(0,Pn.Z)(ut,4),Vt=Gt[0],ve=Gt[1],ge=Gt[2],Yt=Gt[3];return _t(Vt,ve,ge,Yt)(pt)},Zt=_t(.42,0,1,1),Ut=function(pt){return function(ut){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Vt=arguments.length>2?arguments[2]:void 0;return 1-pt(1-ut,Gt,Vt)}},qt=function(pt){return function(ut){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Vt=arguments.length>2?arguments[2]:void 0;return ut<.5?pt(ut*2,Gt,Vt)/2:1-pt(ut*-2+2,Gt,Vt)/2}},se=function(pt){return function(ut){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Vt=arguments.length>2?arguments[2]:void 0;return ut<.5?(1-pt(1-ut*2,Gt,Vt))/2:(pt(ut*2-1,Gt,Vt)+1)/2}},te={steps:Xt,"step-start":function(pt){return Xt(pt,[1,"start"])},"step-end":function(pt){return Xt(pt,[1,"end"])},linear:function(pt){return pt},"cubic-bezier":Lt,ease:function(pt){return Lt(pt,[.25,.1,.25,1])},in:Zt,out:Ut(Zt),"in-out":qt(Zt),"out-in":se(Zt),"in-quad":Me,"out-quad":Ut(Me),"in-out-quad":qt(Me),"out-in-quad":se(Me),"in-cubic":T,"out-cubic":Ut(T),"in-out-cubic":qt(T),"out-in-cubic":se(T),"in-quart":at,"out-quart":Ut(at),"in-out-quart":qt(at),"out-in-quart":se(at),"in-quint":fe,"out-quint":Ut(fe),"in-out-quint":qt(fe),"out-in-quint":se(fe),"in-expo":Jt,"out-expo":Ut(Jt),"in-out-expo":qt(Jt),"out-in-expo":se(Jt),"in-sine":Ie,"out-sine":Ut(Ie),"in-out-sine":qt(Ie),"out-in-sine":se(Ie),"in-circ":Ne,"out-circ":Ut(Ne),"in-out-circ":qt(Ne),"out-in-circ":se(Ne),"in-back":en,"out-back":Ut(en),"in-out-back":qt(en),"out-in-back":se(en),"in-bounce":St,"out-bounce":Ut(St),"in-out-bounce":qt(St),"out-in-bounce":se(St),"in-elastic":tt,"out-elastic":Ut(tt),"in-out-elastic":qt(tt),"out-in-elastic":se(tt),spring:Nt,"spring-in":Nt,"spring-out":Ut(Nt),"spring-in-out":qt(Nt),"spring-out-in":se(Nt)},ke=function(pt){return ie(pt).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},He=function(pt){return te[ke(pt)]||te.linear},Ve=function(pt){return pt},ln=1,On=.5,yn=0;function lr(bt,pt){return function(ut){if(ut>=1)return 1;var Gt=1/bt;return ut+=pt*Gt,ut-ut%Gt}}var Zn="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Yn=new RegExp("cubic-bezier\\(".concat(Zn,",").concat(Zn,",").concat(Zn,",").concat(Zn,"\\)")),ye=/steps\(\s*(\d+)\s*\)/,xr=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Hn(bt){var pt=Yn.exec(bt);if(pt)return _t.apply(void 0,(0,En.Z)(pt.slice(1).map(Number)));var ut=ye.exec(bt);if(ut)return lr(Number(ut[1]),yn);var Gt=xr.exec(bt);return Gt?lr(Number(Gt[1]),{start:ln,middle:On,end:yn}[Gt[2]]):He(bt)}function Br(bt){return Math.abs(Ar(bt)/(bt.playbackRate||1))}function Ar(bt){var pt;return bt.duration===0||bt.iterations===0?0:(bt.duration==="auto"?0:Number(bt.duration))*((pt=bt.iterations)!==null&&pt!==void 0?pt:1)}var ri=0,mi=1,si=2,Jr=3;function _i(bt,pt,ut){if(pt===null)return ri;var Gt=ut.endTime;return pt<Math.min(ut.delay,Gt)?mi:pt>=Math.min(ut.delay+bt+ut.endDelay,Gt)?si:Jr}function Yi(bt,pt,ut,Gt,Vt){switch(Gt){case mi:return pt==="backwards"||pt==="both"?0:null;case Jr:return ut-Vt;case si:return pt==="forwards"||pt==="both"?bt:null;case ri:return null}}function Ei(bt,pt,ut,Gt,Vt){var ve=Vt;return bt===0?pt!==mi&&(ve+=ut):ve+=Gt/bt,ve}function ti(bt,pt,ut,Gt,Vt,ve){var ge=bt===1/0?pt%1:bt%1;return ge===0&&ut===si&&Gt!==0&&(Vt!==0||ve===0)&&(ge=1),ge}function xa(bt,pt,ut,Gt){return bt===si&&pt===1/0?1/0:ut===1?Math.floor(Gt)-1:Math.floor(Gt)}function Di(bt,pt,ut){var Gt=bt;if(bt!=="normal"&&bt!=="reverse"){var Vt=pt;bt==="alternate-reverse"&&(Vt+=1),Gt="normal",Vt!==1/0&&Vt%2!==0&&(Gt="reverse")}return Gt==="normal"?ut:1-ut}function ft(bt,pt,ut){var Gt=_i(bt,pt,ut),Vt=Yi(bt,ut.fill,pt,Gt,ut.delay);if(Vt===null)return null;var ve=ut.duration==="auto"?0:ut.duration,ge=Ei(ve,Gt,ut.iterations,Vt,ut.iterationStart),Yt=ti(ge,ut.iterationStart,Gt,ut.iterations,Vt,ve),Ce=xa(Gt,ut.iterations,Yt,ge),qe=Di(ut.direction,Ce,Yt);return ut.currentIteration=Ce,ut.progress=qe,ut.easingFunction(qe)}function b(bt,pt,ut){var Gt=h(bt,pt),Vt=g(Gt,ut);return function(ve,ge){if(ge!==null)Vt.filter(function(Ce){return ge>=Ce.applyFrom&&ge<Ce.applyTo}).forEach(function(Ce){var qe=ge-Ce.startOffset,Qe=Ce.endOffset-Ce.startOffset,Nn=Qe===0?0:qe/Qe;ve.setAttribute(Ce.property,Ce.interpolation(Nn),!1,!1)});else for(var Yt in Gt)E(Yt)&&ve.setAttribute(Yt,null)}}function E(bt){return bt!=="offset"&&bt!=="easing"&&bt!=="composite"&&bt!=="computedOffset"}function h(bt,pt){for(var ut={},Gt=0;Gt<bt.length;Gt++)for(var Vt in bt[Gt])if(E(Vt)){var ve={offset:bt[Gt].offset,computedOffset:bt[Gt].computedOffset,easing:bt[Gt].easing,easingFunction:Hn(bt[Gt].easing)||pt.easingFunction,value:bt[Gt][Vt]};ut[Vt]=ut[Vt]||[],ut[Vt].push(ve)}return ut}function g(bt,pt){var ut=[];for(var Gt in bt)for(var Vt=bt[Gt],ve=0;ve<Vt.length-1;ve++){var ge=ve,Yt=ve+1,Ce=Vt[ge].computedOffset,qe=Vt[Yt].computedOffset,Qe=Ce,Nn=qe;ve===0&&(Qe=-1/0,qe===0&&(Yt=ge)),ve===Vt.length-2&&(Nn=1/0,Ce===1&&(ge=Yt)),ut.push({applyFrom:Qe,applyTo:Nn,startOffset:Vt[ge].computedOffset,endOffset:Vt[Yt].computedOffset,easingFunction:Vt[ge].easingFunction,property:Gt,interpolation:Y(Gt,Vt[ge].value,Vt[Yt].value,pt)})}return ut.sort(function(Dn,Rn){return Dn.startOffset-Rn.startOffset}),ut}var M=function(pt,ut,Gt){return function(Vt){var ve=J(pt,ut,Vt);return(0,w.Z)(ve)?ve:Gt(ve)}};function Y(bt,pt,ut,Gt){var Vt=c.N1[bt];if(Vt&&Vt.syntax&&Vt.int){var ve=c.GZ.styleValueRegistry.getPropertySyntax(Vt.syntax);if(ve){var ge=ve.parser,Yt=ge?ge(pt,Gt):pt,Ce=ge?ge(ut,Gt):ut,qe=ve.mixer(Yt,Ce,Gt);if(qe){var Qe=M.apply(void 0,(0,En.Z)(qe));return function(Nn){return Nn===0?pt:Nn===1?ut:Qe(Nn)}}}}return M(!1,!0,function(Nn){return Nn?ut:pt})}function J(bt,pt,ut){if(typeof bt=="number"&&typeof pt=="number")return bt*(1-ut)+pt*ut;if(typeof bt=="boolean"&&typeof pt=="boolean"||typeof bt=="string"&&typeof pt=="string")return ut<.5?bt:pt;if(Array.isArray(bt)&&Array.isArray(pt)){for(var Gt=bt.length,Vt=pt.length,ve=Math.max(Gt,Vt),ge=[],Yt=0;Yt<ve;Yt++)ge.push(J(bt[Yt<Gt?Yt:Gt-1],pt[Yt<Vt?Yt:Vt-1],ut));return ge}throw new Error("Mismatched interpolation arguments ".concat(bt,":").concat(pt))}var ot=function(){function bt(){(0,_.Z)(this,bt),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Ve,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return(0,I.Z)(bt,[{key:"easing",get:function(){return this._easing},set:function(ut){this.easingFunction=Hn(ut),this._easing=ut}}])}();function vt(bt){var pt=[];for(var ut in bt)if(!(ut in["easing","offset","composite"])){var Gt=bt[ut];Array.isArray(Gt)||(Gt=[Gt]);for(var Vt=Gt.length,ve=0;ve<Vt;ve++){if(!pt[ve]){var ge={};"offset"in bt&&(ge.offset=Number(bt.offset)),"easing"in bt&&(ge.easing=bt.easing),"composite"in bt&&(ge.composite=bt.composite),pt[ve]=ge}Gt[ve]!==void 0&&Gt[ve]!==null&&(pt[ve][ut]=Gt[ve])}}return pt.sort(function(Yt,Ce){return(Yt.computedOffset||0)-(Ce.computedOffset||0)}),pt}function zt(bt,pt){if(bt===null)return[];Array.isArray(bt)||(bt=vt(bt));for(var ut=bt.map(function(Ce){var qe={};pt!=null&&pt.composite&&(qe.composite="auto");for(var Qe in Ce){var Nn=Ce[Qe];if(Qe==="offset"){if(Nn!==null){if(Nn=Number(Nn),!isFinite(Nn))throw new Error("Keyframe offsets must be numbers.");if(Nn<0||Nn>1)throw new Error("Keyframe offsets must be between 0 and 1.");qe.computedOffset=Nn}}else if(Qe==="composite"&&["replace","add","accumulate","auto"].indexOf(Nn)===-1)throw new Error("".concat(Nn," compositing is not supported"));qe[Qe]=Nn}return qe.offset===void 0&&(qe.offset=null),qe.easing===void 0&&(qe.easing=(pt==null?void 0:pt.easing)||"linear"),qe.composite===void 0&&(qe.composite="auto"),qe}),Gt=!0,Vt=-1/0,ve=0;ve<ut.length;ve++){var ge=ut[ve].offset;if((0,xn.Z)(ge))Gt=!1;else{if(ge<Vt)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");Vt=ge}}ut=ut.filter(function(Ce){return Number(Ce.offset)>=0&&Number(Ce.offset)<=1});function Yt(){var Ce,qe=ut,Qe=qe.length;if(ut[Qe-1].computedOffset=Number((Ce=ut[Qe-1].offset)!==null&&Ce!==void 0?Ce:1),Qe>1){var Nn;ut[0].computedOffset=Number((Nn=ut[0].offset)!==null&&Nn!==void 0?Nn:0)}for(var Dn=0,Rn=Number(ut[0].computedOffset),Xn=1;Xn<Qe;Xn++){var tr=ut[Xn].computedOffset;if(!(0,xn.Z)(tr)&&!(0,xn.Z)(Rn)){for(var Mr=1;Mr<Xn-Dn;Mr++)ut[Dn+Mr].computedOffset=Rn+(Number(tr)-Rn)*Mr/(Xn-Dn);Dn=Xn,Rn=Number(tr)}}}return Gt||Yt(),ut}var q="backwards|forwards|both|none".split("|"),$="reverse|alternate|alternate-reverse".split("|");function H(bt,pt){var ut=new ot;return pt&&(ut.fill="both",ut.duration="auto"),typeof bt=="number"&&!isNaN(bt)?ut.duration=bt:bt!==void 0&&Object.keys(bt).forEach(function(Gt){if(bt[Gt]!==void 0&&bt[Gt]!==null&&bt[Gt]!=="auto"){if((typeof ut[Gt]=="number"||Gt==="duration")&&(typeof bt[Gt]!="number"||isNaN(bt[Gt]))||Gt==="fill"&&q.indexOf(bt[Gt])===-1||Gt==="direction"&&$.indexOf(bt[Gt])===-1)return;ut[Gt]=bt[Gt]}}),ut}function nt(bt,pt){return bt=Mt(bt!=null?bt:{duration:"auto"}),H(bt,pt)}function Mt(bt){return typeof bt=="number"&&(isNaN(bt)?bt={duration:"auto"}:bt={duration:bt}),bt}var Wt=function(){function bt(pt,ut,Gt){var Vt=this;(0,_.Z)(this,bt),this.composite="replace",this.iterationComposite="replace",this.target=pt,this.timing=nt(Gt,!1),this.timing.effect=this,this.timing.activeDuration=Br(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=zt(ut,this.timing),this.interpolations=b(this.normalizedKeyframes,this.timing,this.target);var ve=c.GZ.globalThis.Proxy;this.computedTiming=ve?new ve(this.timing,{get:function(Yt,Ce){return Ce==="duration"?Yt.duration==="auto"?0:Yt.duration:Ce==="fill"?Yt.fill==="auto"?"none":Yt.fill:Ce==="localTime"?Vt.animation&&Vt.animation.currentTime||null:Ce==="currentIteration"?!Vt.animation||Vt.animation.playState!=="running"?null:Yt.currentIteration||0:Ce==="progress"?!Vt.animation||Vt.animation.playState!=="running"?null:Yt.progress||0:Yt[Ce]},set:function(){return!0}}):this.timing}return(0,I.Z)(bt,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(ut){return ut===null?!1:(this.timeFraction=ft(this.timing.activeDuration,ut,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(ut){this.normalizedKeyframes=zt(ut)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(ut){var Gt=this;Object.keys(ut||{}).forEach(function(Vt){Gt.timing[Vt]=ut[Vt]})}}])}();function Tt(bt,pt){return Number(bt.id)-Number(pt.id)}var Kt=function(){function bt(pt){var ut=this;(0,_.Z)(this,bt),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(Gt){ut.currentTime=Gt,ut.discardAnimations(),ut.animations.length===0?ut.timelineTicking=!1:ut.requestAnimationFrame(ut.webAnimationsNextTick)},this.processRafCallbacks=function(Gt){var Vt=ut.rafCallbacks;ut.rafCallbacks=[],Gt<Number(ut.currentTime)&&(Gt=Number(ut.currentTime)),ut.animations.sort(Tt),ut.animations=ut.tick(Gt,!0,ut.animations)[0],Vt.forEach(function(ve){ve[1](Gt)}),ut.applyPendingEffects()},this.document=pt}return(0,I.Z)(bt,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(ut,Gt,Vt){var ve=new Wt(ut,Gt,Vt),ge=new fn(ve,this);return this.animations.push(ge),this.restartWebAnimationsNextTick(),ge.updatePromises(),ge.play(),ge.updatePromises(),ge}},{key:"applyDirtiedAnimation",value:function(ut){var Gt=this;if(!this.inTick){ut.markTarget();var Vt=ut.targetAnimations();Vt.sort(Tt);var ve=this.tick(Number(this.currentTime),!1,Vt.slice())[1];ve.forEach(function(ge){var Yt=Gt.animations.indexOf(ge);Yt!==-1&&Gt.animations.splice(Yt,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(ut){ut==null||ut.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(ut){return ut.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(ut){return ut.playState!=="finished"&&ut.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(ut){var Gt=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([Gt,ut]),Gt}},{key:"requestAnimationFrame",value:function(ut){var Gt=this;return this.rAF(function(Vt){Gt.updateAnimationsPromises(),ut(Vt),Gt.updateAnimationsPromises()})}},{key:"tick",value:function(ut,Gt,Vt){var ve=this,ge,Yt;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=ut,this.ticking=!1;var Ce=[],qe=[],Qe=[],Nn=[];return Vt.forEach(function(Dn){Dn.tick(ut,Gt),Dn._inEffect?(qe.push(Dn.effect),Dn.markTarget()):(Ce.push(Dn.effect),Dn.unmarkTarget()),Dn._needsTick&&(ve.ticking=!0);var Rn=Dn._inEffect||Dn._needsTick;Dn._inTimeline=Rn,Rn?Qe.push(Dn):Nn.push(Dn)}),(ge=this.pendingEffects).push.apply(ge,Ce),(Yt=this.pendingEffects).push.apply(Yt,qe),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[Qe,Nn]}}])}();c.GZ.EasingFunction=Hn,c.GZ.AnimationTimeline=Kt;},67469:function(yt,Et,y){"use strict";y.d(Et,{k:function(){return z}});var c=y(49336),_=y(54648),I=y(7663);class z extends c.Z{constructor(w){super();Wi(this,"nodeMap",new Map);Wi(this,"edgeMap",new Map);Wi(this,"inEdgesMap",new Map);Wi(this,"outEdgesMap",new Map);Wi(this,"bothEdgesMap",new Map);Wi(this,"treeIndices",new Map);Wi(this,"changes",[]);Wi(this,"batchCount",0);Wi(this,"onChanged",()=>{});Wi(this,"batch",w=>{this.batchCount+=1,w(),this.batchCount-=1,this.batchCount||this.commit()});w&&(w.nodes&&this.addNodes(w.nodes),w.edges&&this.addEdges(w.edges),w.tree&&this.addTree(w.tree),w.onChanged&&(this.onChanged=w.onChanged))}commit(){const w=this.changes;this.changes=[];const N={graph:this,changes:w};this.emit("changed",N),this.onChanged(N)}reduceChanges(w){let N=[];return w.forEach(D=>{switch(D.type){case"NodeRemoved":{let A=!1;N=N.filter(L=>{if(L.type==="NodeAdded"){const F=L.value.id===D.value.id;return F&&(A=!0),!F}else{if(L.type==="NodeDataUpdated")return L.id!==D.value.id;if(L.type==="TreeStructureChanged")return L.nodeId!==D.value.id}return!0}),A||N.push(D);break}case"EdgeRemoved":{let A=!1;N=N.filter(L=>{if(L.type==="EdgeAdded"){const F=L.value.id===D.value.id;return F&&(A=!0),!F}else if(L.type==="EdgeDataUpdated"||L.type==="EdgeUpdated")return L.id!==D.value.id;return!0}),A||N.push(D);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{const A=N.findIndex(F=>F.type===D.type&&F.id===D.id&&(D.propertyName===void 0||F.propertyName===D.propertyName)),L=N[A];L?D.propertyName!==void 0?L.newValue=D.newValue:(N.splice(A,1),N.push(D)):N.push(D);break}case"TreeStructureDetached":{N=N.filter(A=>A.type==="TreeStructureAttached"||A.type==="TreeStructureChanged"?A.treeKey!==D.treeKey:!0),N.push(D);break}case"TreeStructureChanged":{const A=N.find(L=>L.type==="TreeStructureChanged"&&L.treeKey===D.treeKey&&L.nodeId===D.nodeId);A?A.newParentId=D.newParentId:N.push(D);break}default:N.push(D);break}}),N}checkNodeExistence(w){this.getNode(w)}hasNode(w){return this.nodeMap.has(w)}areNeighbors(w,N){return this.getNeighbors(N).some(D=>D.id===w)}getNode(w){const N=this.nodeMap.get(w);if(!N)throw new Error("Node not found for id: "+w);return N}getRelatedEdges(w,N){if(this.checkNodeExistence(w),N==="in"){const D=this.inEdgesMap.get(w);return Array.from(D)}else if(N==="out"){const D=this.outEdgesMap.get(w);return Array.from(D)}else{const D=this.bothEdgesMap.get(w);return Array.from(D)}}getDegree(w,N){return this.getRelatedEdges(w,N).length}getSuccessors(w){const D=this.getRelatedEdges(w,"out").map(A=>this.getNode(A.target));return Array.from(new Set(D))}getPredecessors(w){const D=this.getRelatedEdges(w,"in").map(A=>this.getNode(A.source));return Array.from(new Set(D))}getNeighbors(w){const N=this.getPredecessors(w),D=this.getSuccessors(w);return Array.from(new Set([...N,...D]))}doAddNode(w){if(this.hasNode(w.id))throw new Error("Node already exists: "+w.id);this.nodeMap.set(w.id,w),this.inEdgesMap.set(w.id,new Set),this.outEdgesMap.set(w.id,new Set),this.bothEdgesMap.set(w.id,new Set),this.treeIndices.forEach(N=>{N.childrenMap.set(w.id,new Set)}),this.changes.push({type:"NodeAdded",value:w})}addNodes(w){this.batch(()=>{for(const N of w)this.doAddNode(N)})}addNode(w){this.addNodes([w])}doRemoveNode(w){const N=this.getNode(w),D=this.bothEdgesMap.get(w);D==null||D.forEach(A=>this.doRemoveEdge(A.id)),this.nodeMap.delete(w),this.treeIndices.forEach(A=>{var F,it;(F=A.childrenMap.get(w))==null||F.forEach(G=>{A.parentMap.delete(G.id)});const L=A.parentMap.get(w);L&&((it=A.childrenMap.get(L.id))==null||it.delete(N)),A.parentMap.delete(w),A.childrenMap.delete(w)}),this.bothEdgesMap.delete(w),this.inEdgesMap.delete(w),this.outEdgesMap.delete(w),this.changes.push({type:"NodeRemoved",value:N})}removeNodes(w){this.batch(()=>{w.forEach(N=>this.doRemoveNode(N))})}removeNode(w){this.removeNodes([w])}updateNodeDataProperty(w,N,D){const A=this.getNode(w);this.batch(()=>{const L=A.data[N],F=D;A.data[N]=F,this.changes.push({type:"NodeDataUpdated",id:w,propertyName:N,oldValue:L,newValue:F})})}mergeNodeData(w,N){this.batch(()=>{Object.entries(N).forEach(([D,A])=>{this.updateNodeDataProperty(w,D,A)})})}updateNodeData(...w){const N=w[0],D=this.getNode(N);if(typeof w[1]=="string"){this.updateNodeDataProperty(N,w[1],w[2]);return}let A;if(typeof w[1]=="function"){const L=w[1];A=L(D.data)}else typeof w[1]=="object"&&(A=w[1]);this.batch(()=>{const L=D.data,F=A;D.data=A,this.changes.push({type:"NodeDataUpdated",id:N,oldValue:L,newValue:F})})}checkEdgeExistence(w){if(!this.hasEdge(w))throw new Error("Edge not found for id: "+w)}hasEdge(w){return this.edgeMap.has(w)}getEdge(w){return this.checkEdgeExistence(w),this.edgeMap.get(w)}getEdgeDetail(w){const N=this.getEdge(w);return{edge:N,source:this.getNode(N.source),target:this.getNode(N.target)}}doAddEdge(w){if(this.hasEdge(w.id))throw new Error("Edge already exists: "+w.id);this.checkNodeExistence(w.source),this.checkNodeExistence(w.target),this.edgeMap.set(w.id,w);const N=this.inEdgesMap.get(w.target),D=this.outEdgesMap.get(w.source),A=this.bothEdgesMap.get(w.source),L=this.bothEdgesMap.get(w.target);N.add(w),D.add(w),A.add(w),L.add(w),this.changes.push({type:"EdgeAdded",value:w})}addEdges(w){this.batch(()=>{for(const N of w)this.doAddEdge(N)})}addEdge(w){this.addEdges([w])}doRemoveEdge(w){const N=this.getEdge(w),D=this.outEdgesMap.get(N.source),A=this.inEdgesMap.get(N.target),L=this.bothEdgesMap.get(N.source),F=this.bothEdgesMap.get(N.target);D.delete(N),A.delete(N),L.delete(N),F.delete(N),this.edgeMap.delete(w),this.changes.push({type:"EdgeRemoved",value:N})}removeEdges(w){this.batch(()=>{w.forEach(N=>this.doRemoveEdge(N))})}removeEdge(w){this.removeEdges([w])}updateEdgeSource(w,N){const D=this.getEdge(w);this.checkNodeExistence(N);const A=D.source,L=N;this.outEdgesMap.get(A).delete(D),this.bothEdgesMap.get(A).delete(D),this.outEdgesMap.get(L).add(D),this.bothEdgesMap.get(L).add(D),D.source=N,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:w,propertyName:"source",oldValue:A,newValue:L})})}updateEdgeTarget(w,N){const D=this.getEdge(w);this.checkNodeExistence(N);const A=D.target,L=N;this.inEdgesMap.get(A).delete(D),this.bothEdgesMap.get(A).delete(D),this.inEdgesMap.get(L).add(D),this.bothEdgesMap.get(L).add(D),D.target=N,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:w,propertyName:"target",oldValue:A,newValue:L})})}updateEdgeDataProperty(w,N,D){const A=this.getEdge(w);this.batch(()=>{const L=A.data[N],F=D;A.data[N]=F,this.changes.push({type:"EdgeDataUpdated",id:w,propertyName:N,oldValue:L,newValue:F})})}updateEdgeData(...w){const N=w[0],D=this.getEdge(N);if(typeof w[1]=="string"){this.updateEdgeDataProperty(N,w[1],w[2]);return}let A;if(typeof w[1]=="function"){const L=w[1];A=L(D.data)}else typeof w[1]=="object"&&(A=w[1]);this.batch(()=>{const L=D.data,F=A;D.data=A,this.changes.push({type:"EdgeDataUpdated",id:N,oldValue:L,newValue:F})})}mergeEdgeData(w,N){this.batch(()=>{Object.entries(N).forEach(([D,A])=>{this.updateEdgeDataProperty(w,D,A)})})}checkTreeExistence(w){if(!this.hasTreeStructure(w))throw new Error("Tree structure not found for treeKey: "+w)}hasTreeStructure(w){return this.treeIndices.has(w)}attachTreeStructure(w){this.treeIndices.has(w)||(this.treeIndices.set(w,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:w})}))}detachTreeStructure(w){this.checkTreeExistence(w),this.treeIndices.delete(w),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:w})})}addTree(w,N){this.batch(()=>{this.attachTreeStructure(N);const D=[],A=Array.isArray(w)?w:[w];for(;A.length;){const L=A.shift();D.push(L),L.children&&A.push(...L.children)}this.addNodes(D),D.forEach(L=>{var F;(F=L.children)==null||F.forEach(it=>{this.setParent(it.id,L.id,N)})})})}getRoots(w){return this.checkTreeExistence(w),this.getAllNodes().filter(N=>!this.getParent(N.id,w))}getChildren(w,N){this.checkNodeExistence(w),this.checkTreeExistence(N);const A=this.treeIndices.get(N).childrenMap.get(w);return Array.from(A||[])}getParent(w,N){return this.checkNodeExistence(w),this.checkTreeExistence(N),this.treeIndices.get(N).parentMap.get(w)||null}getAncestors(w,N){const D=[];let A=this.getNode(w),L;for(;L=this.getParent(A.id,N);)D.push(L),A=L;return D}setParent(w,N,D){var kt,gt;this.checkTreeExistence(D);const A=this.treeIndices.get(D);if(!A)return;const L=this.getNode(w),F=A.parentMap.get(w);if((F==null?void 0:F.id)===N)return;if(N==null){F&&((kt=A.childrenMap.get(F.id))==null||kt.delete(L)),A.parentMap.delete(w);return}const it=this.getNode(N);A.parentMap.set(w,it),F&&((gt=A.childrenMap.get(F.id))==null||gt.delete(L));let G=A.childrenMap.get(it.id);G||(G=new Set,A.childrenMap.set(it.id,G)),G.add(L),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:D,nodeId:w,oldParentId:F==null?void 0:F.id,newParentId:it.id})})}dfsTree(w,N,D){const A=L=>this.getChildren(L,D);return(0,I.I)(this.getNode(w),new Set,N,A)}bfsTree(w,N,D){const A=L=>this.getChildren(L,D);return(0,I.O)([this.getNode(w)],new Set,N,A)}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(w,N,D="out"){const A={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[D];return(0,I.O)([this.getNode(w)],new Set,N,A)}dfs(w,N,D="out"){const A={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[D];return(0,I.I)(this.getNode(w),new Set,N,A)}clone(){const w=this.getAllNodes().map(A=>ad(Fl({},A),{data:Fl({},A.data)})),N=this.getAllEdges().map(A=>ad(Fl({},A),{data:Fl({},A.data)})),D=new z({nodes:w,edges:N});return this.treeIndices.forEach(({parentMap:A,childrenMap:L},F)=>{const it=new Map;A.forEach((kt,gt)=>{it.set(gt,D.getNode(kt.id))});const G=new Map;L.forEach((kt,gt)=>{G.set(gt,new Set(Array.from(kt).map(Q=>D.getNode(Q.id))))}),D.treeIndices.set(F,{parentMap:it,childrenMap:G})}),D}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(w){return new _.t(Fl({graph:this},w))}}},54648:function(yt,Et,y){"use strict";y.d(Et,{t:function(){return I}});var c=y(7663);const _=()=>!0;class I{constructor(S){Wi(this,"graph");Wi(this,"nodeFilter");Wi(this,"edgeFilter");Wi(this,"cacheEnabled");Wi(this,"inEdgesMap",new Map);Wi(this,"outEdgesMap",new Map);Wi(this,"bothEdgesMap",new Map);Wi(this,"allNodesMap",new Map);Wi(this,"allEdgesMap",new Map);Wi(this,"clearCache",()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()});Wi(this,"refreshCache",()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(S=>S.id))});Wi(this,"updateCache",S=>{const R=new Set;S.forEach(w=>{const N=this.bothEdgesMap.get(w);if(N&&N.forEach(D=>R.add(D.id)),!this.hasNode(w))this.inEdgesMap.delete(w),this.outEdgesMap.delete(w),this.bothEdgesMap.delete(w),this.allNodesMap.delete(w);else{const D=this.graph.getRelatedEdges(w,"in").filter(this.edgeFilter),A=this.graph.getRelatedEdges(w,"out").filter(this.edgeFilter),L=Array.from(new Set([...D,...A]));L.forEach(F=>R.add(F.id)),this.inEdgesMap.set(w,D),this.outEdgesMap.set(w,A),this.bothEdgesMap.set(w,L),this.allNodesMap.set(w,this.graph.getNode(w))}}),R.forEach(w=>{this.hasEdge(w)?this.allEdgesMap.set(w,this.graph.getEdge(w)):this.allEdgesMap.delete(w)})});Wi(this,"handleGraphChanged",S=>{const R=new Set;S.changes.forEach(w=>{switch(w.type){case"NodeAdded":R.add(w.value.id);break;case"NodeDataUpdated":R.add(w.id);break;case"EdgeAdded":R.add(w.value.source),R.add(w.value.target);break;case"EdgeUpdated":(w.propertyName==="source"||w.propertyName==="target")&&(R.add(w.oldValue),R.add(w.newValue));break;case"EdgeDataUpdated":if(S.graph.hasEdge(w.id)){const N=S.graph.getEdge(w.id);R.add(N.source),R.add(N.target)}break;case"EdgeRemoved":R.add(w.value.source),R.add(w.value.target);break;case"NodeRemoved":R.add(w.value.id);break;default:break}}),this.updateCache(R)});this.graph=S.graph;const R=S.nodeFilter||_,w=S.edgeFilter||_;this.nodeFilter=R,this.edgeFilter=N=>{const{source:D,target:A}=this.graph.getEdgeDetail(N.id);return!R(D)||!R(A)?!1:w(N,D,A)},S.cache==="auto"?(this.cacheEnabled=!0,this.startAutoCache()):S.cache==="manual"?this.cacheEnabled=!0:this.cacheEnabled=!1}startAutoCache(){this.refreshCache(),this.graph.on("changed",this.handleGraphChanged)}stopAutoCache(){this.graph.off("changed",this.handleGraphChanged)}checkNodeExistence(S){this.getNode(S)}hasNode(S){if(!this.graph.hasNode(S))return!1;const R=this.graph.getNode(S);return this.nodeFilter(R)}areNeighbors(S,R){return this.checkNodeExistence(S),this.getNeighbors(R).some(w=>w.id===S)}getNode(S){const R=this.graph.getNode(S);if(!this.nodeFilter(R))throw new Error("Node not found for id: "+S);return R}getRelatedEdges(S,R){return this.checkNodeExistence(S),this.cacheEnabled?R==="in"?this.inEdgesMap.get(S):R==="out"?this.outEdgesMap.get(S):this.bothEdgesMap.get(S):this.graph.getRelatedEdges(S,R).filter(this.edgeFilter)}getDegree(S,R){return this.getRelatedEdges(S,R).length}getSuccessors(S){const w=this.getRelatedEdges(S,"out").map(N=>this.getNode(N.target));return Array.from(new Set(w))}getPredecessors(S){const w=this.getRelatedEdges(S,"in").map(N=>this.getNode(N.source));return Array.from(new Set(w))}getNeighbors(S){const R=this.getPredecessors(S),w=this.getSuccessors(S);return Array.from(new Set([...R,...w]))}hasEdge(S){if(!this.graph.hasEdge(S))return!1;const R=this.graph.getEdge(S);return this.edgeFilter(R)}getEdge(S){const R=this.graph.getEdge(S);if(!this.edgeFilter(R))throw new Error("Edge not found for id: "+S);return R}getEdgeDetail(S){const R=this.getEdge(S);return{edge:R,source:this.getNode(R.source),target:this.getNode(R.target)}}hasTreeStructure(S){return this.graph.hasTreeStructure(S)}getRoots(S){return this.graph.getRoots(S).filter(this.nodeFilter)}getChildren(S,R){return this.checkNodeExistence(S),this.graph.getChildren(S,R).filter(this.nodeFilter)}getParent(S,R){this.checkNodeExistence(S);const w=this.graph.getParent(S,R);return!w||!this.nodeFilter(w)?null:w}getAllNodes(){return this.cacheEnabled?Array.from(this.allNodesMap.values()):this.graph.getAllNodes().filter(this.nodeFilter)}getAllEdges(){return this.cacheEnabled?Array.from(this.allEdgesMap.values()):this.graph.getAllEdges().filter(this.edgeFilter)}bfs(S,R,w="out"){const N={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[w];(0,c.O)([this.getNode(S)],new Set,R,N)}dfs(S,R,w="out"){const N={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[w];(0,c.I)(this.getNode(S),new Set,R,N)}}},7663:function(yt,Et,y){"use strict";y.d(Et,{I:function(){return _},O:function(){return c}});function c(I,z,S,R){for(;I.length;){const w=I.shift();if(S(w))return!0;z.add(w.id),R(w.id).forEach(D=>{z.has(D.id)||(z.add(D.id),I.push(D))})}return!1}function _(I,z,S,R){if(S(I))return!0;z.add(I.id);for(const N of R(I.id))if(!z.has(N.id)&&_(N,z,S,R))return!0;return!1}},13722:function(yt){(function(y,c){yt.exports=c()})(typeof self!="undefined"?self:this,function(){return function(Et){var y={};function c(_){if(y[_])return y[_].exports;var I=y[_]={i:_,l:!1,exports:{}};return Et[_].call(I.exports,I,I.exports,c),I.l=!0,I.exports}return c.m=Et,c.c=y,c.d=function(_,I,z){c.o(_,I)||Object.defineProperty(_,I,{configurable:!1,enumerable:!0,get:z})},c.n=function(_){var I=_&&_.__esModule?function(){return _.default}:function(){return _};return c.d(I,"a",I),I},c.o=function(_,I){return Object.prototype.hasOwnProperty.call(_,I)},c.p="",c(c.s=5)}([function(Et,y){function c(_,I,z,S){return S===void 0&&(S="height"),z==="center"?(_[S]+I[S])/2:_.height}Et.exports={assign:Object.assign,getHeight:c}},function(Et,y,c){var _=c(3),I=function(){function z(R,w){w===void 0&&(w={});var N=this;N.options=w,N.rootNode=_(R,w)}var S=z.prototype;return S.execute=function(){throw new Error("please override this method")},z}();Et.exports=I},function(Et,y,c){var _=c(4),I=["LR","RL","TB","BT","H","V"],z=["LR","RL","H"],S=function(D){return z.indexOf(D)>-1},R=I[0];Et.exports=function(N,D,A){var L=D.direction||R;if(D.isHorizontal=S(L),L&&I.indexOf(L)===-1)throw new TypeError("Invalid direction: "+L);if(L===I[0])A(N,D);else if(L===I[1])A(N,D),N.right2left();else if(L===I[2])A(N,D);else if(L===I[3])A(N,D),N.bottom2top();else if(L===I[4]||L===I[5]){var F=_(N,D),it=F.left,G=F.right;A(it,D),A(G,D),D.isHorizontal?it.right2left():it.bottom2top(),G.translate(it.x-G.x,it.y-G.y),N.x=it.x,N.y=G.y;var kt=N.getBoundingBox();D.isHorizontal?kt.top<0&&N.translate(0,-kt.top):kt.left<0&&N.translate(-kt.left,0)}var gt=D.fixedRoot;return gt===void 0&&(gt=!0),gt&&N.translate(-(N.x+N.width/2+N.hgap),-(N.y+N.height/2+N.vgap)),w(N,D),N};function w(N,D){if(D.radial){var A=D.isHorizontal?["x","y"]:["y","x"],L=A[0],F=A[1],it={x:1/0,y:1/0},G={x:-1/0,y:-1/0},kt=0;N.DFTraverse(function(Rt){kt++;var Ct=Rt.x,Ht=Rt.y;it.x=Math.min(it.x,Ct),it.y=Math.min(it.y,Ht),G.x=Math.max(G.x,Ct),G.y=Math.max(G.y,Ht)});var gt=G[F]-it[F];if(gt===0)return;var Q=Math.PI*2/kt;N.DFTraverse(function(Rt){var Ct=(Rt[F]-it[F])/gt*(Math.PI*2-Q)+Q,Ht=Rt[L]-N[L];Rt.x=Math.cos(Ct)*Ht,Rt.y=Math.sin(Ct)*Ht})}}},function(Et,y,c){var _=c(0),I=18,z=I*2,S=I,R={getId:function(A){return A.id||A.name},getPreH:function(A){return A.preH||0},getPreV:function(A){return A.preV||0},getHGap:function(A){return A.hgap||S},getVGap:function(A){return A.vgap||S},getChildren:function(A){return A.children},getHeight:function(A){return A.height||z},getWidth:function(A){var L=A.label||" ";return A.width||L.split("").length*I}};function w(D,A){var L=this;if(L.vgap=L.hgap=0,D instanceof w)return D;L.data=D;var F=A.getHGap(D),it=A.getVGap(D);return L.preH=A.getPreH(D),L.preV=A.getPreV(D),L.width=A.getWidth(D),L.height=A.getHeight(D),L.width+=L.preH,L.height+=L.preV,L.id=A.getId(D),L.x=L.y=0,L.depth=0,L.children||(L.children=[]),L.addGap(F,it),L}_.assign(w.prototype,{isRoot:function(){return this.depth===0},isLeaf:function(){return this.children.length===0},addGap:function(A,L){var F=this;F.hgap+=A,F.vgap+=L,F.width+=2*A,F.height+=2*L},eachNode:function(A){for(var L=this,F=[L],it;it=F.shift();)A(it),F=it.children.concat(F)},DFTraverse:function(A){this.eachNode(A)},BFTraverse:function(A){for(var L=this,F=[L],it;it=F.shift();)A(it),F=F.concat(it.children)},getBoundingBox:function(){var A={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(function(L){A.left=Math.min(A.left,L.x),A.top=Math.min(A.top,L.y),A.width=Math.max(A.width,L.x+L.width),A.height=Math.max(A.height,L.y+L.height)}),A},translate:function(A,L){A===void 0&&(A=0),L===void 0&&(L=0),this.eachNode(function(F){F.x+=A,F.y+=L,F.x+=F.preH,F.y+=F.preV})},right2left:function(){var A=this,L=A.getBoundingBox();A.eachNode(function(F){F.x=F.x-(F.x-L.left)*2-F.width}),A.translate(L.width,0)},bottom2top:function(){var A=this,L=A.getBoundingBox();A.eachNode(function(F){F.y=F.y-(F.y-L.top)*2-F.height}),A.translate(0,L.height)}});function N(D,A,L){A===void 0&&(A={}),A=_.assign({},R,A);var F=new w(D,A),it=[F],G;if(!L&&!D.collapsed){for(;G=it.shift();)if(!G.data.collapsed){var kt=A.getChildren(G.data),gt=kt?kt.length:0;if(G.children=new Array(gt),kt&>)for(var Q=0;Q<gt;Q++){var Rt=new w(kt[Q],A);G.children[Q]=Rt,it.push(Rt),Rt.parent=G,Rt.depth=G.depth+1}}}return F}Et.exports=N},function(Et,y,c){var _=c(3);Et.exports=function(I,z){for(var S=_(I.data,z,!0),R=_(I.data,z,!0),w=I.children.length,N=Math.round(w/2),D=z.getSide||function(it,G){return G<N?"right":"left"},A=0;A<w;A++){var L=I.children[A],F=D(L,A);F==="right"?R.children.push(L):S.children.push(L)}return S.eachNode(function(it){it.isRoot()||(it.side="left")}),R.eachNode(function(it){it.isRoot()||(it.side="right")}),{left:S,right:R}}},function(Et,y,c){var _={compactBox:c(6),dendrogram:c(8),indented:c(10),mindmap:c(12)};Et.exports=_},function(Et,y,c){function _(L,F){L.prototype=Object.create(F.prototype),L.prototype.constructor=L,I(L,F)}function I(L,F){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(it,G){return it.__proto__=G,it},I(L,F)}var z=c(1),S=c(7),R=c(2),w=c(0),N=function(L){function F(){return L.apply(this,arguments)||this}_(F,L);var it=F.prototype;return it.execute=function(){var kt=this;return R(kt.rootNode,kt.options,S)},F}(z),D={};function A(L,F){return F=w.assign({},D,F),new N(L,F).execute()}Et.exports=A},function(Et,y){function c(w,N,D,A){A===void 0&&(A=[]);var L=this;L.w=w||0,L.h=N||0,L.y=D||0,L.x=0,L.c=A||[],L.cs=A.length,L.prelim=0,L.mod=0,L.shift=0,L.change=0,L.tl=null,L.tr=null,L.el=null,L.er=null,L.msel=0,L.mser=0}c.fromNode=function(w,N){if(!w)return null;var D=[];return w.children.forEach(function(A){D.push(c.fromNode(A,N))}),N?new c(w.height,w.width,w.x,D):new c(w.width,w.height,w.y,D)};function _(w,N,D){D?w.y+=N:w.x+=N,w.children.forEach(function(A){_(A,N,D)})}function I(w,N){var D=N?w.y:w.x;return w.children.forEach(function(A){D=Math.min(I(A,N),D)}),D}function z(w,N){var D=I(w,N);_(w,-D,N)}function S(w,N,D){D?N.y=w.x:N.x=w.x,w.c.forEach(function(A,L){S(A,N.children[L],D)})}function R(w,N,D){D===void 0&&(D=0),N?(w.x=D,D+=w.width):(w.y=D,D+=w.height),w.children.forEach(function(A){R(A,N,D)})}Et.exports=function(w,N){N===void 0&&(N={});var D=N.isHorizontal;function A(we){if(we.cs===0){L(we);return}A(we.c[0]);for(var re=Te(gt(we.c[0].el),0,null),Ge=1;Ge<we.cs;++Ge){A(we.c[Ge]);var rn=gt(we.c[Ge].er);F(we,Ge,re),re=Te(rn,Ge,re)}Ct(we),L(we)}function L(we){we.cs===0?(we.el=we,we.er=we,we.msel=we.mser=0):(we.el=we.c[0].el,we.msel=we.c[0].msel,we.er=we.c[we.cs-1].er,we.mser=we.c[we.cs-1].mser)}function F(we,re,Ge){for(var rn=we.c[re-1],Xe=rn.mod,En=we.c[re],Pn=En.mod;rn!==null&&En!==null;){gt(rn)>Ge.low&&(Ge=Ge.nxt);var tn=Xe+rn.prelim+rn.w-(Pn+En.prelim);tn>0&&(Pn+=tn,it(we,re,Ge.index,tn));var xn=gt(rn),It=gt(En);xn<=It&&(rn=kt(rn),rn!==null&&(Xe+=rn.mod)),xn>=It&&(En=G(En),En!==null&&(Pn+=En.mod))}!rn&&En?Q(we,re,En,Pn):rn&&!En&&Rt(we,re,rn,Xe)}function it(we,re,Ge,rn){we.c[re].mod+=rn,we.c[re].msel+=rn,we.c[re].mser+=rn,de(we,re,Ge,rn)}function G(we){return we.cs===0?we.tl:we.c[0]}function kt(we){return we.cs===0?we.tr:we.c[we.cs-1]}function gt(we){return we.y+we.h}function Q(we,re,Ge,rn){var Xe=we.c[0].el;Xe.tl=Ge;var En=rn-Ge.mod-we.c[0].msel;Xe.mod+=En,Xe.prelim-=En,we.c[0].el=we.c[re].el,we.c[0].msel=we.c[re].msel}function Rt(we,re,Ge,rn){var Xe=we.c[re].er;Xe.tr=Ge;var En=rn-Ge.mod-we.c[re].mser;Xe.mod+=En,Xe.prelim-=En,we.c[re].er=we.c[re-1].er,we.c[re].mser=we.c[re-1].mser}function Ct(we){we.prelim=(we.c[0].prelim+we.c[0].mod+we.c[we.cs-1].mod+we.c[we.cs-1].prelim+we.c[we.cs-1].w)/2-we.w/2}function Ht(we,re){re+=we.mod,we.x=we.prelim+re,ue(we);for(var Ge=0;Ge<we.cs;Ge++)Ht(we.c[Ge],re)}function de(we,re,Ge,rn){if(Ge!==re-1){var Xe=re-Ge;we.c[Ge+1].shift+=rn/Xe,we.c[re].shift-=rn/Xe,we.c[re].change-=rn-rn/Xe}}function ue(we){for(var re=0,Ge=0,rn=0;rn<we.cs;rn++)re+=we.c[rn].shift,Ge+=re+we.c[rn].change,we.c[rn].mod+=Ge}function Te(we,re,Ge){for(;Ge!==null&&we>=Ge.low;)Ge=Ge.nxt;return{low:we,index:re,nxt:Ge}}R(w,D);var be=c.fromNode(w,D);return A(be),Ht(be,0),S(be,w,D),z(w,D),w}},function(Et,y,c){function _(L,F){L.prototype=Object.create(F.prototype),L.prototype.constructor=L,I(L,F)}function I(L,F){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(it,G){return it.__proto__=G,it},I(L,F)}var z=c(1),S=c(9),R=c(2),w=c(0),N=function(L){function F(){return L.apply(this,arguments)||this}_(F,L);var it=F.prototype;return it.execute=function(){var kt=this;return kt.rootNode.width=0,R(kt.rootNode,kt.options,S)},F}(z),D={};function A(L,F){return F=w.assign({},D,F),new N(L,F).execute()}Et.exports=A},function(Et,y,c){var _=c(0);function I(R,w){R===void 0&&(R=0),w===void 0&&(w=[]);var N=this;N.x=N.y=0,N.leftChild=N.rightChild=null,N.height=0,N.children=w}var z={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function S(R,w,N){N?(w.x=R.x,w.y=R.y):(w.x=R.y,w.y=R.x),R.children.forEach(function(D,A){S(D,w.children[A],N)})}Et.exports=function(R,w){w===void 0&&(w={}),w=_.assign({},z,w);var N=0;function D(G){if(!G)return null;G.width=0,G.depth&&G.depth>N&&(N=G.depth);var kt=G.children,gt=kt.length,Q=new I(G.height,[]);return kt.forEach(function(Rt,Ct){var Ht=D(Rt);Q.children.push(Ht),Ct===0&&(Q.leftChild=Ht),Ct===gt-1&&(Q.rightChild=Ht)}),Q.originNode=G,Q.isLeaf=G.isLeaf(),Q}function A(G){if(G.isLeaf||G.children.length===0)G.drawingDepth=N;else{var kt=G.children.map(function(Q){return A(Q)}),gt=Math.min.apply(null,kt);G.drawingDepth=gt-1}return G.drawingDepth}var L;function F(G){G.x=G.drawingDepth*w.rankSep,G.isLeaf?(G.y=0,L&&(G.y=L.y+L.height+w.nodeSep,G.originNode.parent!==L.originNode.parent&&(G.y+=w.subTreeSep)),L=G):(G.children.forEach(function(kt){F(kt)}),G.y=(G.leftChild.y+G.rightChild.y)/2)}var it=D(R);return A(it),F(it),S(it,R,w.isHorizontal),R}},function(Et,y,c){function _(it,G){it.prototype=Object.create(G.prototype),it.prototype.constructor=it,I(it,G)}function I(it,G){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(kt,gt){return kt.__proto__=gt,kt},I(it,G)}var z=c(1),S=c(11),R=c(4),w=c(0),N=["LR","RL","H"],D=N[0],A=function(it){function G(){return it.apply(this,arguments)||this}_(G,it);var kt=G.prototype;return kt.execute=function(){var Q=this,Rt=Q.options,Ct=Q.rootNode;Rt.isHorizontal=!0;var Ht=Rt.indent,de=Ht===void 0?20:Ht,ue=Rt.dropCap,Te=ue===void 0?!0:ue,be=Rt.direction,we=be===void 0?D:be,re=Rt.align;if(we&&N.indexOf(we)===-1)throw new TypeError("Invalid direction: "+we);if(we===N[0])S(Ct,de,Te,re);else if(we===N[1])S(Ct,de,Te,re),Ct.right2left();else if(we===N[2]){var Ge=R(Ct,Rt),rn=Ge.left,Xe=Ge.right;S(rn,de,Te,re),rn.right2left(),S(Xe,de,Te,re);var En=rn.getBoundingBox();Xe.translate(En.width,0),Ct.x=Xe.x-Ct.width/2}return Ct},G}(z),L={};function F(it,G){return G=w.assign({},L,G),new A(it,G).execute()}Et.exports=F},function(Et,y,c){var _=c(0);function I(z,S,R,w,N){var D=(typeof R=="function"?R(z):R)*z.depth;if(!w)try{if(z.id===z.parent.children[0].id){z.x+=D,z.y=S?S.y:0;return}}catch(F){}if(z.x+=D,S){if(z.y=S.y+_.getHeight(S,z,N),S.parent&&z.parent.id!==S.parent.id){var A=S.parent,L=A.y+_.getHeight(A,z,N);z.y=L>z.y?L:z.y}}else z.y=0}Et.exports=function(z,S,R,w){var N=null;z.eachNode(function(D){I(D,N,S,R,w),N=D})}},function(Et,y,c){function _(L,F){L.prototype=Object.create(F.prototype),L.prototype.constructor=L,I(L,F)}function I(L,F){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(it,G){return it.__proto__=G,it},I(L,F)}var z=c(1),S=c(13),R=c(2),w=c(0),N=function(L){function F(){return L.apply(this,arguments)||this}_(F,L);var it=F.prototype;return it.execute=function(){var kt=this;return R(kt.rootNode,kt.options,S)},F}(z),D={};function A(L,F){return F=w.assign({},D,F),new N(L,F).execute()}Et.exports=A},function(Et,y,c){var _=c(0);function I(R,w){var N=0;return R.children.length?R.children.forEach(function(D){N+=I(D,w)}):N=R.height,R._subTreeSep=w.getSubTreeSep(R.data),R.totalHeight=Math.max(R.height,N)+2*R._subTreeSep,R.totalHeight}function z(R){var w=R.children,N=w.length;if(N){w.forEach(function(G){z(G)});var D=w[0],A=w[N-1],L=A.y-D.y+A.height,F=0;if(w.forEach(function(G){F+=G.totalHeight}),L>R.height)R.y=D.y+L/2-R.height/2;else if(w.length!==1||R.height>F){var it=R.y+(R.height-L)/2-D.y;w.forEach(function(G){G.translate(0,it)})}else R.y=(D.y+D.height/2+A.y+A.height/2)/2-R.height/2}}var S={getSubTreeSep:function(){return 0}};Et.exports=function(R,w){w===void 0&&(w={}),w=_.assign({},S,w),R.parent={x:0,width:0,height:0,y:0},R.BFTraverse(function(N){N.x=N.parent.x+N.parent.width}),R.parent=null,I(R,w),R.startY=0,R.y=R.totalHeight/2-R.height/2,R.eachNode(function(N){var D=N.children,A=D.length;if(A){var L=D[0];if(L.startY=N.startY+N._subTreeSep,A===1)L.y=N.y+N.height/2-L.height/2;else{L.y=L.startY+L.totalHeight/2-L.height/2;for(var F=1;F<A;F++){var it=D[F];it.startY=D[F-1].startY+D[F-1].totalHeight,it.y=it.startY+it.totalHeight/2-it.height/2}}}}),z(R)}}])})},85580:function(yt,Et,y){"use strict";y.d(Et,{L:function(){return c}});function c(_){var I=document.createElement("div");I.innerHTML=_;var z=I.childNodes[0];return z&&I.contains(z)&&I.removeChild(z),z}},70208:function(yt,Et){"use strict";var y=function(c,_,I){return c<_?_:c>I?I:c};Et.Z=y},37547:function(yt,Et,y){"use strict";var c=y(39934),_=function(I){if(typeof I!="object"||I===null)return I;var z;if((0,c.Z)(I)){z=[];for(var S=0,R=I.length;S<R;S++)typeof I[S]=="object"&&I[S]!=null?z[S]=_(I[S]):z[S]=I[S]}else{z={};for(var w in I)typeof I[w]=="object"&&I[w]!=null?z[w]=_(I[w]):z[w]=I[w]}return z};Et.Z=_},78431:function(yt,Et){"use strict";function y(c,_,I){var z;return function(){var S=this,R=arguments,w=function(){z=null,I||c.apply(S,R)},N=I&&!z;clearTimeout(z),z=setTimeout(w,_),N&&c.apply(S,R)}}Et.Z=y},23343:function(yt,Et,y){"use strict";var c=y(39934),_=y(63467),I=5;function z(w,N){if(Object.hasOwn)return Object.hasOwn(w,N);if(w==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(w),N)}function S(w,N,D,A){D=D||0,A=A||I;for(var L in N)if(z(N,L)){var F=N[L];F!==null&&(0,_.Z)(F)?((0,_.Z)(w[L])||(w[L]={}),D<A?S(w[L],F,D+1,A):w[L]=N[L]):(0,c.Z)(F)?(w[L]=[],w[L]=w[L].concat(F)):F!==void 0&&(w[L]=F)}}var R=function(w){for(var N=[],D=1;D<arguments.length;D++)N[D-1]=arguments[D];for(var A=0;A<N.length;A+=1)S(w,N[A]);return w};Et.Z=R},47182:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return w}});var c=y(68599),_=function(N,D){if(!(0,c.Z)(N))return N;for(var A=[],L=0;L<N.length;L++){var F=N[L];D(F,L)&&A.push(F)}return A},I=_,z=function(N,D){return(0,c.Z)(N)?N.indexOf(D)>-1:!1},S=z,R=function(N,D){return D===void 0&&(D=[]),I(N,function(A){return!S(D,A)})},w=R},56039:function(yt,Et,y){"use strict";var c=y(39934),_=y(93785);function I(z,S){if(z){var R;if((0,c.Z)(z))for(var w=0,N=z.length;w<N&&(R=S(z[w],w),R!==!1);w++);else if((0,_.Z)(z)){for(var D in z)if(z.hasOwnProperty(D)&&(R=S(z[D],D),R===!1))break}}}Et.Z=I},5759:function(yt,Et,y){"use strict";var c=y(71879);Et.Z=function(_,I,z){for(var S=0,R=(0,c.Z)(I)?I.split("."):I;_&&S<R.length;)_=_[R[S++]];return _===void 0||S<R.length?z:_}},15610:function(yt,Et,y){"use strict";var c=y(39934),_=y(71018),I=Object.prototype.hasOwnProperty;function z(S,R){if(!R||!(0,c.Z)(S))return{};for(var w={},N=(0,_.Z)(R)?R:function(F){return F[R]},D,A=0;A<S.length;A++){var L=S[A];D=N(L),I.call(w,D)?w[D].push(L):w[D]=[L]}return w}Et.Z=z},68599:function(yt,Et){"use strict";var y=function(c){return c!==null&&typeof c!="function"&&isFinite(c.length)};Et.Z=y},39934:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return Array.isArray(_)}},50264:function(yt,Et,y){"use strict";var c=y(97868),_=function(I){return(0,c.Z)(I,"Boolean")};Et.Z=_},21790:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return _ instanceof Date}},42791:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return L}});var c=y(76075),_=y(68599),I={}.toString,z=function(F){return I.call(F).replace(/^\[object /,"").replace(/]$/,"")},S=z,R=Object.prototype,w=function(F){var it=F&&F.constructor,G=typeof it=="function"&&it.prototype||R;return F===G},N=w,D=Object.prototype.hasOwnProperty;function A(F){if((0,c.Z)(F))return!0;if((0,_.Z)(F))return!F.length;var it=S(F);if(it==="Map"||it==="Set")return!F.size;if(N(F))return!Object.keys(F).length;for(var G in F)if(D.call(F,G))return!1;return!0}var L=A},62099:function(yt,Et,y){"use strict";var c=y(60574),_=y(68599),I=y(71879),z=function(S,R){if(S===R)return!0;if(!S||!R||(0,I.Z)(S)||(0,I.Z)(R))return!1;if((0,_.Z)(S)||(0,_.Z)(R)){if(S.length!==R.length)return!1;for(var w=!0,N=0;N<S.length&&(w=z(S[N],R[N]),!!w);N++);return w}if((0,c.Z)(S)||(0,c.Z)(R)){var D=Object.keys(S),A=Object.keys(R);if(D.length!==A.length)return!1;for(var w=!0,N=0;N<D.length&&(w=z(S[D[N]],R[D[N]]),!!w);N++);return w}return!1};Et.Z=z},71018:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return typeof _=="function"}},76075:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return _==null}},5131:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=1e-5;function _(I,z,S){return S===void 0&&(S=c),I===z||Math.abs(I-z)<S}},1933:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return typeof _=="number"}},60574:function(yt,Et){"use strict";var y=function(c){return typeof c=="object"&&c!==null};Et.Z=y},93785:function(yt,Et){"use strict";Et.Z=function(y){var c=typeof y;return y!==null&&c==="object"||c==="function"}},63467:function(yt,Et,y){"use strict";var c=y(60574),_=y(97868),I=function(z){if(!(0,c.Z)(z)||!(0,_.Z)(z,"Object"))return!1;if(Object.getPrototypeOf(z)===null)return!0;for(var S=z;Object.getPrototypeOf(S)!==null;)S=Object.getPrototypeOf(S);return Object.getPrototypeOf(z)===S};Et.Z=I},71879:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return typeof _=="string"}},97868:function(yt,Et){"use strict";var y={}.toString,c=function(_,I){return y.call(_)==="[object "+I+"]"};Et.Z=c},49527:function(yt,Et){"use strict";var y=function(c){return c===void 0};Et.Z=y},45642:function(yt,Et,y){"use strict";var c=y(96862),_=function(I){var z=(0,c.Z)(I);return z.charAt(0).toLowerCase()+z.substring(1)};Et.Z=_},82639:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){if(!Array.isArray(_))return-1/0;var I=_.length;if(!I)return-1/0;for(var z=_[0],S=1;S<I;S++)z=Math.max(z,_[S]);return z}},40455:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return I}});function c(z){var S,R,w,N=z||1;function D(L,F){++S>N&&(w=R,A(1),++S),R[L]=F}function A(L){S=0,R=Object.create(null),L||(w=Object.create(null))}return A(),{clear:A,has:function(L){return R[L]!==void 0||w[L]!==void 0},get:function(L){var F=R[L];if(F!==void 0)return F;if((F=w[L])!==void 0)return D(L,F),F},set:function(L,F){R[L]!==void 0?R[L]=F:D(L,F)}}}var _=new Map;function I(z,S,R){R===void 0&&(R=128);var w=function(){for(var N=[],D=0;D<arguments.length;D++)N[D]=arguments[D];var A=S?S.apply(this,N):N[0];_.has(z)||_.set(z,c(R));var L=_.get(z);if(L.has(A))return L.get(A);var F=z.apply(this,N);return L.set(A,F),F};return w}},2078:function(yt,Et,y){"use strict";var c=y(39934);Et.Z=function(_){if((0,c.Z)(_))return _.reduce(function(I,z){return Math.min(I,z)},_[0])}},92387:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return R}});var c=y(56039),_=y(39934),I=y(63467),z=function(w,N,D){if(!(0,_.Z)(w)&&!(0,I.Z)(w))return w;var A=D;return(0,c.Z)(w,function(L,F){A=N(A,L,F)}),A},S=z,R=function(w,N){return S(w,function(D,A,L){return N.includes(L)||(D[L]=A),D},{})}},84502:function(yt,Et,y){"use strict";var c=y(56039),_=y(63467),I=Object.prototype.hasOwnProperty;Et.Z=function(z,S){if(z===null||!(0,_.Z)(z))return{};var R={};return(0,c.Z)(S,function(w){I.call(z,w)&&(R[w]=z[w])}),R}},37004:function(yt,Et,y){"use strict";var c=y(93785),_=y(71879),I=y(1933);Et.Z=function(z,S,R){var w=z,N=(0,_.Z)(S)?S.split("."):S;return N.forEach(function(D,A){A<N.length-1?((0,c.Z)(w[D])||(w[D]=(0,I.Z)(N[A+1])?[]:{}),w=w[D]):w[D]=R}),z}},62199:function(yt,Et){"use strict";Et.Z=function(y,c,_){var I,z,S,R,w=0;_||(_={});var N=function(){w=_.leading===!1?0:Date.now(),I=null,R=y.apply(z,S),I||(z=S=null)},D=function(){var A=Date.now();!w&&_.leading===!1&&(w=A);var L=c-(A-w);return z=this,S=arguments,L<=0||L>c?(I&&(clearTimeout(I),I=null),w=A,R=y.apply(z,S),I||(z=S=null)):!I&&_.trailing!==!1&&(I=setTimeout(N,L)),R};return D.cancel=function(){clearTimeout(I),w=0,I=z=S=null},D}},96862:function(yt,Et,y){"use strict";var c=y(76075);Et.Z=function(_){return(0,c.Z)(_)?"":_.toString()}},35300:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_,I){I===void 0&&(I=new Map);var z=[];if(Array.isArray(_))for(var S=0,R=_.length;S<R;S++){var w=_[S];I.has(w)||(z.push(w),I.set(w,!0))}return z}},63178:function(yt,Et){"use strict";var y={};Et.Z=function(c){return c=c||"g",y[c]?y[c]+=1:y[c]=1,c+y[c]}},18178:function(yt,Et,y){"use strict";var c=y(96862),_=function(I){var z=(0,c.Z)(I);return z.charAt(0).toUpperCase()+z.substring(1)};Et.Z=_},66045:function(yt,Et,y){"use strict";y.d(Et,{W:function(){return _}});function c(I,z,S){var R=I*Math.cos(S)-z*Math.sin(S),w=I*Math.sin(S)+z*Math.cos(S);return{x:R,y:w}}function _(I,z,S,R,w,N,D,A,L,F){var it=I,G=z,kt=S,gt=R,Q=A,Rt=L,Ct=Math.PI*120/180,Ht=Math.PI/180*(+w||0),de=[],ue,Te,be,we,re;if(F)Te=F[0],be=F[1],we=F[2],re=F[3];else{ue=c(it,G,-Ht),it=ue.x,G=ue.y,ue=c(Q,Rt,-Ht),Q=ue.x,Rt=ue.y;var Ge=(it-Q)/2,rn=(G-Rt)/2,Xe=Ge*Ge/(kt*kt)+rn*rn/(gt*gt);Xe>1&&(Xe=Math.sqrt(Xe),kt*=Xe,gt*=Xe);var En=kt*kt,Pn=gt*gt,tn=(N===D?-1:1)*Math.sqrt(Math.abs((En*Pn-En*rn*rn-Pn*Ge*Ge)/(En*rn*rn+Pn*Ge*Ge)));we=tn*kt*rn/gt+(it+Q)/2,re=tn*-gt*Ge/kt+(G+Rt)/2,Te=Math.asin(((G-re)/gt*Math.pow(10,9)>>0)/Math.pow(10,9)),be=Math.asin(((Rt-re)/gt*Math.pow(10,9)>>0)/Math.pow(10,9)),Te=it<we?Math.PI-Te:Te,be=Q<we?Math.PI-be:be,Te<0&&(Te=Math.PI*2+Te),be<0&&(be=Math.PI*2+be),D&&Te>be&&(Te-=Math.PI*2),!D&&be>Te&&(be-=Math.PI*2)}var xn=be-Te;if(Math.abs(xn)>Ct){var It=be,Ee=Q,fn=Rt;be=Te+Ct*(D&&be>Te?1:-1),Q=we+kt*Math.cos(be),Rt=re+gt*Math.sin(be),de=_(Q,Rt,kt,gt,w,0,D,Ee,fn,[be,It,we,re])}xn=be-Te;var on=Math.cos(Te),Pe=Math.sin(Te),Ze=Math.cos(be),Ke=Math.sin(be),le=Math.tan(xn/4),Ae=4/3*kt*le,Pt=4/3*gt*le,wt=[it,G],he=[it+Ae*Pe,G-Pt*on],je=[Q+Ae*Ke,Rt-Pt*Ze],Re=[Q,Rt];if(he[0]=2*wt[0]-he[0],he[1]=2*wt[1]-he[1],F)return he.concat(je,Re,de);de=he.concat(je,Re,de);for(var ce=[],Le=0,xe=de.length;Le<xe;Le+=1)ce[Le]=Le%2?c(de[Le-1],de[Le],Ht).y:c(de[Le],de[Le+1],Ht).x;return ce}},68901:function(yt,Et,y){"use strict";y.d(Et,{y:function(){return c}});function c(_,I){return Math.sqrt((_[0]-I[0])*(_[0]-I[0])+(_[1]-I[1])*(_[1]-I[1]))}},22057:function(yt,Et,y){"use strict";var c=y(59301),_=y(42441),I=y(48961),z=y.n(I),S=Object.defineProperty,R=Object.defineProperties,w=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,L=(Q,Rt,Ct)=>Rt in Q?S(Q,Rt,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):Q[Rt]=Ct,F=(Q,Rt)=>{for(var Ct in Rt||(Rt={}))D.call(Rt,Ct)&&L(Q,Ct,Rt[Ct]);if(N)for(var Ct of N(Rt))A.call(Rt,Ct)&&L(Q,Ct,Rt[Ct]);return Q},it=(Q,Rt)=>R(Q,w(Rt));function G(Q,Rt,Ct=1/3,Ht){let de=Q*Math.PI*2,ue=Rt*Math.PI*2;return{u:{min:-Math.PI,max:Math.PI*3,step:Math.PI/32},v:{min:0,max:Math.PI*2,step:Math.PI/20},x:function(Te,be){return Te<de?Math.cos(de)*(1+Math.cos(be)*Ct):Te>ue?Math.cos(ue)*(1+Math.cos(be)*Ct):Math.cos(Te)*(1+Math.cos(be)*Ct)},y:function(Te,be){return Te<de?Math.sin(de)*(1+Math.cos(be)*Ct):Te>ue?Math.sin(ue)*(1+Math.cos(be)*Ct):Math.sin(Te)*(1+Math.cos(be)*Ct)},z:function(Te,be){return Te<-Math.PI*.5?Math.sin(Te):Te>Math.PI*2.5?Math.sin(Te)*Ht*.1:Math.sin(be)>0?1*Ht*.1:-1}}}function kt({pieData:Q=[],internalDiameterRatio:Rt=1/3}){var Ct,Ht,de,ue;const Te=[],be=Q==null?void 0:Q.reduce((Xe,En)=>(Xe||0)+((En==null?void 0:En.value)||0),0);let we=0,re=0;const Ge=[];for(let Xe=0;Xe<(Q==null?void 0:Q.length);Xe++){re=we+(be==0?1:((Ct=Q==null?void 0:Q[Xe])==null?void 0:Ct.value)||0);const En={itemStyle:((Ht=Q==null?void 0:Q[Xe])==null?void 0:Ht.itemStyle)||{},name:((de=Q==null?void 0:Q[Xe])==null?void 0:de.name)||`name${Xe}`,type:"surface",parametric:!0,parametricEquation:G(we/(be||(Q==null?void 0:Q.length)),re/(be||(Q==null?void 0:Q.length)),Rt,((ue=Q==null?void 0:Q[Xe])==null?void 0:ue.value)||(be==0?25:0)),wireframe:{show:!1},pieData:Q==null?void 0:Q[Xe]};Ge.push(En.name),Te.push(En),we=re}return Te.push({name:"pie2d",type:"pie",showEmptyCircle:!0,label:{show:!0,formatter:Xe=>`${Xe.value}
|
|
|
|
|
|
${Xe.name}`},startAngle:-35,radius:["49%","50%"],center:["50%","40%"],data:[...Q||[]].reverse(),itemStyle:{opacity:0}}),{legend:{left:"50%",top:"center",textStyle:{fontSize:12},data:Ge},xAxis3D:{},yAxis3D:{},zAxis3D:{},grid3D:{viewControl:{alpha:45,rotateSensitivity:0,zoomSensitivity:0,panSensitivity:0,autoRotate:!1},left:"center",top:"-10%",show:!1,boxHeight:25},series:Te}}const gt=({dataSource:Q=[{name:"\u638C\u63E1\u738780%~100%",value:0,itemStyle:{color:"rgb(223,209,38)"}},{name:"\u638C\u63D0\u738760%~79%",value:0,itemStyle:{color:"rgb(6,234,230)"}},{name:"\u638C\u63A8\u738759%\u4EE5\u4E0B",value:0,itemStyle:{color:"rgb(6,110,247)"}}],className:Rt="",style:Ct={},legend:Ht={},internalDiameterRatio:de=1/3})=>{const[ue,Te]=(0,c.useState)([]),be=(0,c.useCallback)(Ge=>{const rn=Ge.selected||{},Xe=Q.map(En=>En.name).filter(En=>rn[En]===!1);Te(Xe)},[Q]),we=(0,c.useMemo)(()=>Q.filter(Ge=>!ue.includes(Ge.name)),[Q,ue]),re=(0,c.useMemo)(()=>{const Ge=kt({pieData:we,internalDiameterRatio:de}),rn=Q.map(En=>En.name),Xe=Q.reduce((En,Pn)=>(En[Pn.name]=!ue.includes(Pn.name),En),{});return Ge.legend=it(F(F({},Ge.legend),Ht),{data:rn,selected:Xe}),Ge},[we,Ht,de,Q,ue]);return c.createElement(_.Z,{onEvents:{legendselectchanged:be},className:`w-full h-full ${Rt}`,option:re,style:F({height:"100%"},Ct)})};Et.Z=gt},3522:function(yt,Et,y){"use strict";var c,_=Object.defineProperty,I=ft=>{throw TypeError(ft)},z=Math.pow,S=(ft,b,E)=>b in ft?_(ft,b,{enumerable:!0,configurable:!0,writable:!0,value:E}):ft[b]=E,R=(ft,b,E)=>S(ft,typeof b!="symbol"?b+"":b,E),w=(ft,b,E)=>b.has(ft)||I("Cannot "+E),N=(ft,b,E)=>(w(ft,b,"read from private field"),E?E.call(ft):b.get(ft)),D=(ft,b,E)=>b.has(ft)?I("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(ft):b.set(ft,E),A=(ft,b,E,h)=>(w(ft,b,"write to private field"),h?h.call(ft,E):b.set(ft,E),E),L=(ft,b,E)=>(w(ft,b,"access private method"),E),F,it,G;c={value:!0};var kt=y(34634),gt=y(34402);const Q=" ".repeat(2),Rt=" ".repeat(4);function Ct(){return Ht(this)}function Ht(ft,b={}){const{maxRows:E=15,maxColumns:h=10,maxNumSize:g=8,padMinus:M="auto"}=b;return`${ft.constructor.name} {
|
|
|
${Q}[
|
|
|
${Rt}${de(ft,E,h,g,M)}
|
|
|
${Q}]
|
|
|
${Q}rows: ${ft.rows}
|
|
|
${Q}columns: ${ft.columns}
|
|
|
}`}function de(ft,b,E,h,g){const{rows:M,columns:Y}=ft,J=Math.min(M,b),ot=Math.min(Y,E),vt=[];if(g==="auto"){g=!1;t:for(let zt=0;zt<J;zt++)for(let q=0;q<ot;q++)if(ft.get(zt,q)<0){g=!0;break t}}for(let zt=0;zt<J;zt++){let q=[];for(let $=0;$<ot;$++)q.push(ue(ft.get(zt,$),h,g));vt.push(`${q.join(" ")}`)}return ot!==Y&&(vt[vt.length-1]+=` ... ${Y-E} more columns`),J!==M&&vt.push(`... ${M-b} more rows`),vt.join(`
|
|
|
${Rt}`)}function ue(ft,b,E){return(ft>=0&&E?` ${Te(ft,b-1)}`:Te(ft,b)).padEnd(b)}function Te(ft,b){let E=ft.toString();if(E.length<=b)return E;let h=ft.toFixed(b);if(h.length>b&&(h=ft.toFixed(Math.max(0,b-(h.length-b)))),h.length<=b&&!h.startsWith("0.000")&&!h.startsWith("-0.000"))return h;let g=ft.toExponential(b);return g.length>b&&(g=ft.toExponential(Math.max(0,b-(g.length-b)))),g.slice(0)}function be(ft,b){ft.prototype.add=function(h){return typeof h=="number"?this.addS(h):this.addM(h)},ft.prototype.addS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)+h);return this},ft.prototype.addM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)+h.get(g,M));return this},ft.add=function(h,g){return new b(h).add(g)},ft.prototype.sub=function(h){return typeof h=="number"?this.subS(h):this.subM(h)},ft.prototype.subS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)-h);return this},ft.prototype.subM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)-h.get(g,M));return this},ft.sub=function(h,g){return new b(h).sub(g)},ft.prototype.subtract=ft.prototype.sub,ft.prototype.subtractS=ft.prototype.subS,ft.prototype.subtractM=ft.prototype.subM,ft.subtract=ft.sub,ft.prototype.mul=function(h){return typeof h=="number"?this.mulS(h):this.mulM(h)},ft.prototype.mulS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)*h);return this},ft.prototype.mulM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)*h.get(g,M));return this},ft.mul=function(h,g){return new b(h).mul(g)},ft.prototype.multiply=ft.prototype.mul,ft.prototype.multiplyS=ft.prototype.mulS,ft.prototype.multiplyM=ft.prototype.mulM,ft.multiply=ft.mul,ft.prototype.div=function(h){return typeof h=="number"?this.divS(h):this.divM(h)},ft.prototype.divS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)/h);return this},ft.prototype.divM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)/h.get(g,M));return this},ft.div=function(h,g){return new b(h).div(g)},ft.prototype.divide=ft.prototype.div,ft.prototype.divideS=ft.prototype.divS,ft.prototype.divideM=ft.prototype.divM,ft.divide=ft.div,ft.prototype.mod=function(h){return typeof h=="number"?this.modS(h):this.modM(h)},ft.prototype.modS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)%h);return this},ft.prototype.modM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)%h.get(g,M));return this},ft.mod=function(h,g){return new b(h).mod(g)},ft.prototype.modulus=ft.prototype.mod,ft.prototype.modulusS=ft.prototype.modS,ft.prototype.modulusM=ft.prototype.modM,ft.modulus=ft.mod,ft.prototype.and=function(h){return typeof h=="number"?this.andS(h):this.andM(h)},ft.prototype.andS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)&h);return this},ft.prototype.andM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)&h.get(g,M));return this},ft.and=function(h,g){return new b(h).and(g)},ft.prototype.or=function(h){return typeof h=="number"?this.orS(h):this.orM(h)},ft.prototype.orS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)|h);return this},ft.prototype.orM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)|h.get(g,M));return this},ft.or=function(h,g){return new b(h).or(g)},ft.prototype.xor=function(h){return typeof h=="number"?this.xorS(h):this.xorM(h)},ft.prototype.xorS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)^h);return this},ft.prototype.xorM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)^h.get(g,M));return this},ft.xor=function(h,g){return new b(h).xor(g)},ft.prototype.leftShift=function(h){return typeof h=="number"?this.leftShiftS(h):this.leftShiftM(h)},ft.prototype.leftShiftS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)<<h);return this},ft.prototype.leftShiftM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)<<h.get(g,M));return this},ft.leftShift=function(h,g){return new b(h).leftShift(g)},ft.prototype.signPropagatingRightShift=function(h){return typeof h=="number"?this.signPropagatingRightShiftS(h):this.signPropagatingRightShiftM(h)},ft.prototype.signPropagatingRightShiftS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)>>h);return this},ft.prototype.signPropagatingRightShiftM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)>>h.get(g,M));return this},ft.signPropagatingRightShift=function(h,g){return new b(h).signPropagatingRightShift(g)},ft.prototype.rightShift=function(h){return typeof h=="number"?this.rightShiftS(h):this.rightShiftM(h)},ft.prototype.rightShiftS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)>>>h);return this},ft.prototype.rightShiftM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,this.get(g,M)>>>h.get(g,M));return this},ft.rightShift=function(h,g){return new b(h).rightShift(g)},ft.prototype.zeroFillRightShift=ft.prototype.rightShift,ft.prototype.zeroFillRightShiftS=ft.prototype.rightShiftS,ft.prototype.zeroFillRightShiftM=ft.prototype.rightShiftM,ft.zeroFillRightShift=ft.rightShift,ft.prototype.not=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,~this.get(h,g));return this},ft.not=function(h){return new b(h).not()},ft.prototype.abs=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.abs(this.get(h,g)));return this},ft.abs=function(h){return new b(h).abs()},ft.prototype.acos=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.acos(this.get(h,g)));return this},ft.acos=function(h){return new b(h).acos()},ft.prototype.acosh=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.acosh(this.get(h,g)));return this},ft.acosh=function(h){return new b(h).acosh()},ft.prototype.asin=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.asin(this.get(h,g)));return this},ft.asin=function(h){return new b(h).asin()},ft.prototype.asinh=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.asinh(this.get(h,g)));return this},ft.asinh=function(h){return new b(h).asinh()},ft.prototype.atan=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.atan(this.get(h,g)));return this},ft.atan=function(h){return new b(h).atan()},ft.prototype.atanh=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.atanh(this.get(h,g)));return this},ft.atanh=function(h){return new b(h).atanh()},ft.prototype.cbrt=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.cbrt(this.get(h,g)));return this},ft.cbrt=function(h){return new b(h).cbrt()},ft.prototype.ceil=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.ceil(this.get(h,g)));return this},ft.ceil=function(h){return new b(h).ceil()},ft.prototype.clz32=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.clz32(this.get(h,g)));return this},ft.clz32=function(h){return new b(h).clz32()},ft.prototype.cos=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.cos(this.get(h,g)));return this},ft.cos=function(h){return new b(h).cos()},ft.prototype.cosh=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.cosh(this.get(h,g)));return this},ft.cosh=function(h){return new b(h).cosh()},ft.prototype.exp=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.exp(this.get(h,g)));return this},ft.exp=function(h){return new b(h).exp()},ft.prototype.expm1=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.expm1(this.get(h,g)));return this},ft.expm1=function(h){return new b(h).expm1()},ft.prototype.floor=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.floor(this.get(h,g)));return this},ft.floor=function(h){return new b(h).floor()},ft.prototype.fround=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.fround(this.get(h,g)));return this},ft.fround=function(h){return new b(h).fround()},ft.prototype.log=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.log(this.get(h,g)));return this},ft.log=function(h){return new b(h).log()},ft.prototype.log1p=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.log1p(this.get(h,g)));return this},ft.log1p=function(h){return new b(h).log1p()},ft.prototype.log10=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.log10(this.get(h,g)));return this},ft.log10=function(h){return new b(h).log10()},ft.prototype.log2=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.log2(this.get(h,g)));return this},ft.log2=function(h){return new b(h).log2()},ft.prototype.round=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.round(this.get(h,g)));return this},ft.round=function(h){return new b(h).round()},ft.prototype.sign=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.sign(this.get(h,g)));return this},ft.sign=function(h){return new b(h).sign()},ft.prototype.sin=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.sin(this.get(h,g)));return this},ft.sin=function(h){return new b(h).sin()},ft.prototype.sinh=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.sinh(this.get(h,g)));return this},ft.sinh=function(h){return new b(h).sinh()},ft.prototype.sqrt=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.sqrt(this.get(h,g)));return this},ft.sqrt=function(h){return new b(h).sqrt()},ft.prototype.tan=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.tan(this.get(h,g)));return this},ft.tan=function(h){return new b(h).tan()},ft.prototype.tanh=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.tanh(this.get(h,g)));return this},ft.tanh=function(h){return new b(h).tanh()},ft.prototype.trunc=function(){for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.set(h,g,Math.trunc(this.get(h,g)));return this},ft.trunc=function(h){return new b(h).trunc()},ft.pow=function(h,g){return new b(h).pow(g)},ft.prototype.pow=function(h){return typeof h=="number"?this.powS(h):this.powM(h)},ft.prototype.powS=function(h){for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,z(this.get(g,M),h));return this},ft.prototype.powM=function(h){if(h=b.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let g=0;g<this.rows;g++)for(let M=0;M<this.columns;M++)this.set(g,M,z(this.get(g,M),h.get(g,M)));return this}}function we(ft,b,E){let h=E?ft.rows:ft.rows-1;if(b<0||b>h)throw new RangeError("Row index out of range")}function re(ft,b,E){let h=E?ft.columns:ft.columns-1;if(b<0||b>h)throw new RangeError("Column index out of range")}function Ge(ft,b){if(b.to1DArray&&(b=b.to1DArray()),b.length!==ft.columns)throw new RangeError("vector size must be the same as the number of columns");return b}function rn(ft,b){if(b.to1DArray&&(b=b.to1DArray()),b.length!==ft.rows)throw new RangeError("vector size must be the same as the number of rows");return b}function Xe(ft,b){if(!kt.isAnyArray(b))throw new TypeError("row indices must be an array");for(let E=0;E<b.length;E++)if(b[E]<0||b[E]>=ft.rows)throw new RangeError("row indices are out of range")}function En(ft,b){if(!kt.isAnyArray(b))throw new TypeError("column indices must be an array");for(let E=0;E<b.length;E++)if(b[E]<0||b[E]>=ft.columns)throw new RangeError("column indices are out of range")}function Pn(ft,b,E,h,g){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(xn("startRow",b),xn("endRow",E),xn("startColumn",h),xn("endColumn",g),b>E||h>g||b<0||b>=ft.rows||E<0||E>=ft.rows||h<0||h>=ft.columns||g<0||g>=ft.columns)throw new RangeError("Submatrix indices are out of range")}function tn(ft,b=0){let E=[];for(let h=0;h<ft;h++)E.push(b);return E}function xn(ft,b){if(typeof b!="number")throw new TypeError(`${ft} must be a number`)}function It(ft){if(ft.isEmpty())throw new Error("Empty matrix has no elements to index")}function Ee(ft){let b=tn(ft.rows);for(let E=0;E<ft.rows;++E)for(let h=0;h<ft.columns;++h)b[E]+=ft.get(E,h);return b}function fn(ft){let b=tn(ft.columns);for(let E=0;E<ft.rows;++E)for(let h=0;h<ft.columns;++h)b[h]+=ft.get(E,h);return b}function on(ft){let b=0;for(let E=0;E<ft.rows;E++)for(let h=0;h<ft.columns;h++)b+=ft.get(E,h);return b}function Pe(ft){let b=tn(ft.rows,1);for(let E=0;E<ft.rows;++E)for(let h=0;h<ft.columns;++h)b[E]*=ft.get(E,h);return b}function Ze(ft){let b=tn(ft.columns,1);for(let E=0;E<ft.rows;++E)for(let h=0;h<ft.columns;++h)b[h]*=ft.get(E,h);return b}function Ke(ft){let b=1;for(let E=0;E<ft.rows;E++)for(let h=0;h<ft.columns;h++)b*=ft.get(E,h);return b}function le(ft,b,E){const h=ft.rows,g=ft.columns,M=[];for(let Y=0;Y<h;Y++){let J=0,ot=0,vt=0;for(let zt=0;zt<g;zt++)vt=ft.get(Y,zt)-E[Y],J+=vt,ot+=vt*vt;b?M.push((ot-J*J/g)/(g-1)):M.push((ot-J*J/g)/g)}return M}function Ae(ft,b,E){const h=ft.rows,g=ft.columns,M=[];for(let Y=0;Y<g;Y++){let J=0,ot=0,vt=0;for(let zt=0;zt<h;zt++)vt=ft.get(zt,Y)-E[Y],J+=vt,ot+=vt*vt;b?M.push((ot-J*J/h)/(h-1)):M.push((ot-J*J/h)/h)}return M}function Pt(ft,b,E){const h=ft.rows,g=ft.columns,M=h*g;let Y=0,J=0,ot=0;for(let vt=0;vt<h;vt++)for(let zt=0;zt<g;zt++)ot=ft.get(vt,zt)-E,Y+=ot,J+=ot*ot;return b?(J-Y*Y/M)/(M-1):(J-Y*Y/M)/M}function wt(ft,b){for(let E=0;E<ft.rows;E++)for(let h=0;h<ft.columns;h++)ft.set(E,h,ft.get(E,h)-b[E])}function he(ft,b){for(let E=0;E<ft.rows;E++)for(let h=0;h<ft.columns;h++)ft.set(E,h,ft.get(E,h)-b[h])}function je(ft,b){for(let E=0;E<ft.rows;E++)for(let h=0;h<ft.columns;h++)ft.set(E,h,ft.get(E,h)-b)}function Re(ft){const b=[];for(let E=0;E<ft.rows;E++){let h=0;for(let g=0;g<ft.columns;g++)h+=z(ft.get(E,g),2)/(ft.columns-1);b.push(Math.sqrt(h))}return b}function ce(ft,b){for(let E=0;E<ft.rows;E++)for(let h=0;h<ft.columns;h++)ft.set(E,h,ft.get(E,h)/b[E])}function Le(ft){const b=[];for(let E=0;E<ft.columns;E++){let h=0;for(let g=0;g<ft.rows;g++)h+=z(ft.get(g,E),2)/(ft.rows-1);b.push(Math.sqrt(h))}return b}function xe(ft,b){for(let E=0;E<ft.rows;E++)for(let h=0;h<ft.columns;h++)ft.set(E,h,ft.get(E,h)/b[h])}function _t(ft){const b=ft.size-1;let E=0;for(let h=0;h<ft.columns;h++)for(let g=0;g<ft.rows;g++)E+=z(ft.get(g,h),2)/b;return Math.sqrt(E)}function ie(ft,b){for(let E=0;E<ft.rows;E++)for(let h=0;h<ft.columns;h++)ft.set(E,h,ft.get(E,h)/b)}class Me{static from1DArray(b,E,h){if(b*E!==h.length)throw new RangeError("data length does not match given dimensions");let M=new Jt(b,E);for(let Y=0;Y<b;Y++)for(let J=0;J<E;J++)M.set(Y,J,h[Y*E+J]);return M}static rowVector(b){let E=new Jt(1,b.length);for(let h=0;h<b.length;h++)E.set(0,h,b[h]);return E}static columnVector(b){let E=new Jt(b.length,1);for(let h=0;h<b.length;h++)E.set(h,0,b[h]);return E}static zeros(b,E){return new Jt(b,E)}static ones(b,E){return new Jt(b,E).fill(1)}static rand(b,E,h={}){if(typeof h!="object")throw new TypeError("options must be an object");const{random:g=Math.random}=h;let M=new Jt(b,E);for(let Y=0;Y<b;Y++)for(let J=0;J<E;J++)M.set(Y,J,g());return M}static randInt(b,E,h={}){if(typeof h!="object")throw new TypeError("options must be an object");const{min:g=0,max:M=1e3,random:Y=Math.random}=h;if(!Number.isInteger(g))throw new TypeError("min must be an integer");if(!Number.isInteger(M))throw new TypeError("max must be an integer");if(g>=M)throw new RangeError("min must be smaller than max");let J=M-g,ot=new Jt(b,E);for(let vt=0;vt<b;vt++)for(let zt=0;zt<E;zt++){let q=g+Math.round(Y()*J);ot.set(vt,zt,q)}return ot}static eye(b,E,h){E===void 0&&(E=b),h===void 0&&(h=1);let g=Math.min(b,E),M=this.zeros(b,E);for(let Y=0;Y<g;Y++)M.set(Y,Y,h);return M}static diag(b,E,h){let g=b.length;E===void 0&&(E=g),h===void 0&&(h=E);let M=Math.min(g,E,h),Y=this.zeros(E,h);for(let J=0;J<M;J++)Y.set(J,J,b[J]);return Y}static min(b,E){b=this.checkMatrix(b),E=this.checkMatrix(E);let h=b.rows,g=b.columns,M=new Jt(h,g);for(let Y=0;Y<h;Y++)for(let J=0;J<g;J++)M.set(Y,J,Math.min(b.get(Y,J),E.get(Y,J)));return M}static max(b,E){b=this.checkMatrix(b),E=this.checkMatrix(E);let h=b.rows,g=b.columns,M=new this(h,g);for(let Y=0;Y<h;Y++)for(let J=0;J<g;J++)M.set(Y,J,Math.max(b.get(Y,J),E.get(Y,J)));return M}static checkMatrix(b){return Me.isMatrix(b)?b:new Jt(b)}static isMatrix(b){return b!=null&&b.klass==="Matrix"}get size(){return this.rows*this.columns}apply(b){if(typeof b!="function")throw new TypeError("callback must be a function");for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)b.call(this,E,h);return this}to1DArray(){let b=[];for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)b.push(this.get(E,h));return b}to2DArray(){let b=[];for(let E=0;E<this.rows;E++){b.push([]);for(let h=0;h<this.columns;h++)b[E].push(this.get(E,h))}return b}toJSON(){return this.to2DArray()}isRowVector(){return this.rows===1}isColumnVector(){return this.columns===1}isVector(){return this.rows===1||this.columns===1}isSquare(){return this.rows===this.columns}isEmpty(){return this.rows===0||this.columns===0}isSymmetric(){if(this.isSquare()){for(let b=0;b<this.rows;b++)for(let E=0;E<=b;E++)if(this.get(b,E)!==this.get(E,b))return!1;return!0}return!1}isDistance(){if(!this.isSymmetric())return!1;for(let b=0;b<this.rows;b++)if(this.get(b,b)!==0)return!1;return!0}isEchelonForm(){let b=0,E=0,h=-1,g=!0,M=!1;for(;b<this.rows&&g;){for(E=0,M=!1;E<this.columns&&M===!1;)this.get(b,E)===0?E++:this.get(b,E)===1&&E>h?(M=!0,h=E):(g=!1,M=!0);b++}return g}isReducedEchelonForm(){let b=0,E=0,h=-1,g=!0,M=!1;for(;b<this.rows&&g;){for(E=0,M=!1;E<this.columns&&M===!1;)this.get(b,E)===0?E++:this.get(b,E)===1&&E>h?(M=!0,h=E):(g=!1,M=!0);for(let Y=E+1;Y<this.rows;Y++)this.get(b,Y)!==0&&(g=!1);b++}return g}echelonForm(){let b=this.clone(),E=0,h=0;for(;E<b.rows&&h<b.columns;){let g=E;for(let M=E;M<b.rows;M++)b.get(M,h)>b.get(g,h)&&(g=M);if(b.get(g,h)===0)h++;else{b.swapRows(E,g);let M=b.get(E,h);for(let Y=h;Y<b.columns;Y++)b.set(E,Y,b.get(E,Y)/M);for(let Y=E+1;Y<b.rows;Y++){let J=b.get(Y,h)/b.get(E,h);b.set(Y,h,0);for(let ot=h+1;ot<b.columns;ot++)b.set(Y,ot,b.get(Y,ot)-b.get(E,ot)*J)}E++,h++}}return b}reducedEchelonForm(){let b=this.echelonForm(),E=b.columns,h=b.rows,g=h-1;for(;g>=0;)if(b.maxRow(g)===0)g--;else{let M=0,Y=!1;for(;M<h&&Y===!1;)b.get(g,M)===1?Y=!0:M++;for(let J=0;J<g;J++){let ot=b.get(J,M);for(let vt=M;vt<E;vt++){let zt=b.get(J,vt)-ot*b.get(g,vt);b.set(J,vt,zt)}}g--}return b}set(){throw new Error("set method is unimplemented")}get(){throw new Error("get method is unimplemented")}repeat(b={}){if(typeof b!="object")throw new TypeError("options must be an object");const{rows:E=1,columns:h=1}=b;if(!Number.isInteger(E)||E<=0)throw new TypeError("rows must be a positive integer");if(!Number.isInteger(h)||h<=0)throw new TypeError("columns must be a positive integer");let g=new Jt(this.rows*E,this.columns*h);for(let M=0;M<E;M++)for(let Y=0;Y<h;Y++)g.setSubMatrix(this,this.rows*M,this.columns*Y);return g}fill(b){for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,b);return this}neg(){return this.mulS(-1)}getRow(b){we(this,b);let E=[];for(let h=0;h<this.columns;h++)E.push(this.get(b,h));return E}getRowVector(b){return Jt.rowVector(this.getRow(b))}setRow(b,E){we(this,b),E=Ge(this,E);for(let h=0;h<this.columns;h++)this.set(b,h,E[h]);return this}swapRows(b,E){we(this,b),we(this,E);for(let h=0;h<this.columns;h++){let g=this.get(b,h);this.set(b,h,this.get(E,h)),this.set(E,h,g)}return this}getColumn(b){re(this,b);let E=[];for(let h=0;h<this.rows;h++)E.push(this.get(h,b));return E}getColumnVector(b){return Jt.columnVector(this.getColumn(b))}setColumn(b,E){re(this,b),E=rn(this,E);for(let h=0;h<this.rows;h++)this.set(h,b,E[h]);return this}swapColumns(b,E){re(this,b),re(this,E);for(let h=0;h<this.rows;h++){let g=this.get(h,b);this.set(h,b,this.get(h,E)),this.set(h,E,g)}return this}addRowVector(b){b=Ge(this,b);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)+b[h]);return this}subRowVector(b){b=Ge(this,b);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)-b[h]);return this}mulRowVector(b){b=Ge(this,b);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)*b[h]);return this}divRowVector(b){b=Ge(this,b);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)/b[h]);return this}addColumnVector(b){b=rn(this,b);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)+b[E]);return this}subColumnVector(b){b=rn(this,b);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)-b[E]);return this}mulColumnVector(b){b=rn(this,b);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)*b[E]);return this}divColumnVector(b){b=rn(this,b);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)/b[E]);return this}mulRow(b,E){we(this,b);for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)*E);return this}mulColumn(b,E){re(this,b);for(let h=0;h<this.rows;h++)this.set(h,b,this.get(h,b)*E);return this}max(b){if(this.isEmpty())return NaN;switch(b){case"row":{const E=new Array(this.rows).fill(Number.NEGATIVE_INFINITY);for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.get(h,g)>E[h]&&(E[h]=this.get(h,g));return E}case"column":{const E=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.get(h,g)>E[g]&&(E[g]=this.get(h,g));return E}case void 0:{let E=this.get(0,0);for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.get(h,g)>E&&(E=this.get(h,g));return E}default:throw new Error(`invalid option: ${b}`)}}maxIndex(){It(this);let b=this.get(0,0),E=[0,0];for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.get(h,g)>b&&(b=this.get(h,g),E[0]=h,E[1]=g);return E}min(b){if(this.isEmpty())return NaN;switch(b){case"row":{const E=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.get(h,g)<E[h]&&(E[h]=this.get(h,g));return E}case"column":{const E=new Array(this.columns).fill(Number.POSITIVE_INFINITY);for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.get(h,g)<E[g]&&(E[g]=this.get(h,g));return E}case void 0:{let E=this.get(0,0);for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.get(h,g)<E&&(E=this.get(h,g));return E}default:throw new Error(`invalid option: ${b}`)}}minIndex(){It(this);let b=this.get(0,0),E=[0,0];for(let h=0;h<this.rows;h++)for(let g=0;g<this.columns;g++)this.get(h,g)<b&&(b=this.get(h,g),E[0]=h,E[1]=g);return E}maxRow(b){if(we(this,b),this.isEmpty())return NaN;let E=this.get(b,0);for(let h=1;h<this.columns;h++)this.get(b,h)>E&&(E=this.get(b,h));return E}maxRowIndex(b){we(this,b),It(this);let E=this.get(b,0),h=[b,0];for(let g=1;g<this.columns;g++)this.get(b,g)>E&&(E=this.get(b,g),h[1]=g);return h}minRow(b){if(we(this,b),this.isEmpty())return NaN;let E=this.get(b,0);for(let h=1;h<this.columns;h++)this.get(b,h)<E&&(E=this.get(b,h));return E}minRowIndex(b){we(this,b),It(this);let E=this.get(b,0),h=[b,0];for(let g=1;g<this.columns;g++)this.get(b,g)<E&&(E=this.get(b,g),h[1]=g);return h}maxColumn(b){if(re(this,b),this.isEmpty())return NaN;let E=this.get(0,b);for(let h=1;h<this.rows;h++)this.get(h,b)>E&&(E=this.get(h,b));return E}maxColumnIndex(b){re(this,b),It(this);let E=this.get(0,b),h=[0,b];for(let g=1;g<this.rows;g++)this.get(g,b)>E&&(E=this.get(g,b),h[0]=g);return h}minColumn(b){if(re(this,b),this.isEmpty())return NaN;let E=this.get(0,b);for(let h=1;h<this.rows;h++)this.get(h,b)<E&&(E=this.get(h,b));return E}minColumnIndex(b){re(this,b),It(this);let E=this.get(0,b),h=[0,b];for(let g=1;g<this.rows;g++)this.get(g,b)<E&&(E=this.get(g,b),h[0]=g);return h}diag(){let b=Math.min(this.rows,this.columns),E=[];for(let h=0;h<b;h++)E.push(this.get(h,h));return E}norm(b="frobenius"){switch(b){case"max":return this.max();case"frobenius":return Math.sqrt(this.dot(this));default:throw new RangeError(`unknown norm type: ${b}`)}}cumulativeSum(){let b=0;for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)b+=this.get(E,h),this.set(E,h,b);return this}dot(b){Me.isMatrix(b)&&(b=b.to1DArray());let E=this.to1DArray();if(E.length!==b.length)throw new RangeError("vectors do not have the same size");let h=0;for(let g=0;g<E.length;g++)h+=E[g]*b[g];return h}mmul(b){b=Jt.checkMatrix(b);let E=this.rows,h=this.columns,g=b.columns,M=new Jt(E,g),Y=new Float64Array(h);for(let J=0;J<g;J++){for(let ot=0;ot<h;ot++)Y[ot]=b.get(ot,J);for(let ot=0;ot<E;ot++){let vt=0;for(let zt=0;zt<h;zt++)vt+=this.get(ot,zt)*Y[zt];M.set(ot,J,vt)}}return M}mpow(b){if(!this.isSquare())throw new RangeError("Matrix must be square");if(!Number.isInteger(b)||b<0)throw new RangeError("Exponent must be a non-negative integer");let E=Jt.eye(this.rows),h=this;for(let g=b;g>=1;g/=2)g&1&&(E=E.mmul(h)),h=h.mmul(h);return E}strassen2x2(b){b=Jt.checkMatrix(b);let E=new Jt(2,2);const h=this.get(0,0),g=b.get(0,0),M=this.get(0,1),Y=b.get(0,1),J=this.get(1,0),ot=b.get(1,0),vt=this.get(1,1),zt=b.get(1,1),q=(h+vt)*(g+zt),$=(J+vt)*g,H=h*(Y-zt),nt=vt*(ot-g),Mt=(h+M)*zt,Wt=(J-h)*(g+Y),Tt=(M-vt)*(ot+zt),Kt=q+nt-Mt+Tt,bt=H+Mt,pt=$+nt,ut=q-$+H+Wt;return E.set(0,0,Kt),E.set(0,1,bt),E.set(1,0,pt),E.set(1,1,ut),E}strassen3x3(b){b=Jt.checkMatrix(b);let E=new Jt(3,3);const h=this.get(0,0),g=this.get(0,1),M=this.get(0,2),Y=this.get(1,0),J=this.get(1,1),ot=this.get(1,2),vt=this.get(2,0),zt=this.get(2,1),q=this.get(2,2),$=b.get(0,0),H=b.get(0,1),nt=b.get(0,2),Mt=b.get(1,0),Wt=b.get(1,1),Tt=b.get(1,2),Kt=b.get(2,0),bt=b.get(2,1),pt=b.get(2,2),ut=(h+g+M-Y-J-zt-q)*Wt,Gt=(h-Y)*(-H+Wt),Vt=J*(-$+H+Mt-Wt-Tt-Kt+pt),ve=(-h+Y+J)*($-H+Wt),ge=(Y+J)*(-$+H),Yt=h*$,Ce=(-h+vt+zt)*($-nt+Tt),qe=(-h+vt)*(nt-Tt),Qe=(vt+zt)*(-$+nt),Nn=(h+g+M-J-ot-vt-zt)*Tt,Dn=zt*(-$+nt+Mt-Wt-Tt-Kt+bt),Rn=(-M+zt+q)*(Wt+Kt-bt),Xn=(M-q)*(Wt-bt),tr=M*Kt,Mr=(zt+q)*(-Kt+bt),yr=(-M+J+ot)*(Tt+Kt-pt),vr=(M-ot)*(Tt-pt),Cr=(J+ot)*(-Kt+pt),ur=g*Mt,Kn=ot*bt,Ur=Y*nt,Yr=vt*H,br=q*pt,xi=Yt+tr+ur,di=ut+ve+ge+Yt+Rn+tr+Mr,Lr=Yt+Ce+Qe+Nn+tr+yr+Cr,Ci=Gt+Vt+ve+Yt+tr+yr+vr,fi=Gt+ve+ge+Yt+Kn,Ni=tr+yr+vr+Cr+Ur,Ji=Yt+Ce+qe+Dn+Rn+Xn+tr,Fa=Rn+Xn+tr+Mr+Yr,La=Yt+Ce+qe+Qe+br;return E.set(0,0,xi),E.set(0,1,di),E.set(0,2,Lr),E.set(1,0,Ci),E.set(1,1,fi),E.set(1,2,Ni),E.set(2,0,Ji),E.set(2,1,Fa),E.set(2,2,La),E}mmulStrassen(b){b=Jt.checkMatrix(b);let E=this.clone(),h=E.rows,g=E.columns,M=b.rows,Y=b.columns;g!==M&&console.warn(`Multiplying ${h} x ${g} and ${M} x ${Y} matrix: dimensions do not match.`);function J(q,$,H){let nt=q.rows,Mt=q.columns;if(nt===$&&Mt===H)return q;{let Wt=Me.zeros($,H);return Wt=Wt.setSubMatrix(q,0,0),Wt}}let ot=Math.max(h,M),vt=Math.max(g,Y);E=J(E,ot,vt),b=J(b,ot,vt);function zt(q,$,H,nt){if(H<=512||nt<=512)return q.mmul($);H%2===1&&nt%2===1?(q=J(q,H+1,nt+1),$=J($,H+1,nt+1)):H%2===1?(q=J(q,H+1,nt),$=J($,H+1,nt)):nt%2===1&&(q=J(q,H,nt+1),$=J($,H,nt+1));let Mt=parseInt(q.rows/2,10),Wt=parseInt(q.columns/2,10),Tt=q.subMatrix(0,Mt-1,0,Wt-1),Kt=$.subMatrix(0,Mt-1,0,Wt-1),bt=q.subMatrix(0,Mt-1,Wt,q.columns-1),pt=$.subMatrix(0,Mt-1,Wt,$.columns-1),ut=q.subMatrix(Mt,q.rows-1,0,Wt-1),Gt=$.subMatrix(Mt,$.rows-1,0,Wt-1),Vt=q.subMatrix(Mt,q.rows-1,Wt,q.columns-1),ve=$.subMatrix(Mt,$.rows-1,Wt,$.columns-1),ge=zt(Me.add(Tt,Vt),Me.add(Kt,ve),Mt,Wt),Yt=zt(Me.add(ut,Vt),Kt,Mt,Wt),Ce=zt(Tt,Me.sub(pt,ve),Mt,Wt),qe=zt(Vt,Me.sub(Gt,Kt),Mt,Wt),Qe=zt(Me.add(Tt,bt),ve,Mt,Wt),Nn=zt(Me.sub(ut,Tt),Me.add(Kt,pt),Mt,Wt),Dn=zt(Me.sub(bt,Vt),Me.add(Gt,ve),Mt,Wt),Rn=Me.add(ge,qe);Rn.sub(Qe),Rn.add(Dn);let Xn=Me.add(Ce,Qe),tr=Me.add(Yt,qe),Mr=Me.sub(ge,Yt);Mr.add(Ce),Mr.add(Nn);let yr=Me.zeros(2*Rn.rows,2*Rn.columns);return yr=yr.setSubMatrix(Rn,0,0),yr=yr.setSubMatrix(Xn,Rn.rows,0),yr=yr.setSubMatrix(tr,0,Rn.columns),yr=yr.setSubMatrix(Mr,Rn.rows,Rn.columns),yr.subMatrix(0,H-1,0,nt-1)}return zt(E,b,ot,vt)}scaleRows(b={}){if(typeof b!="object")throw new TypeError("options must be an object");const{min:E=0,max:h=1}=b;if(!Number.isFinite(E))throw new TypeError("min must be a number");if(!Number.isFinite(h))throw new TypeError("max must be a number");if(E>=h)throw new RangeError("min must be smaller than max");let g=new Jt(this.rows,this.columns);for(let M=0;M<this.rows;M++){const Y=this.getRow(M);Y.length>0&>(Y,{min:E,max:h,output:Y}),g.setRow(M,Y)}return g}scaleColumns(b={}){if(typeof b!="object")throw new TypeError("options must be an object");const{min:E=0,max:h=1}=b;if(!Number.isFinite(E))throw new TypeError("min must be a number");if(!Number.isFinite(h))throw new TypeError("max must be a number");if(E>=h)throw new RangeError("min must be smaller than max");let g=new Jt(this.rows,this.columns);for(let M=0;M<this.columns;M++){const Y=this.getColumn(M);Y.length&>(Y,{min:E,max:h,output:Y}),g.setColumn(M,Y)}return g}flipRows(){const b=Math.ceil(this.columns/2);for(let E=0;E<this.rows;E++)for(let h=0;h<b;h++){let g=this.get(E,h),M=this.get(E,this.columns-1-h);this.set(E,h,M),this.set(E,this.columns-1-h,g)}return this}flipColumns(){const b=Math.ceil(this.rows/2);for(let E=0;E<this.columns;E++)for(let h=0;h<b;h++){let g=this.get(h,E),M=this.get(this.rows-1-h,E);this.set(h,E,M),this.set(this.rows-1-h,E,g)}return this}kroneckerProduct(b){b=Jt.checkMatrix(b);let E=this.rows,h=this.columns,g=b.rows,M=b.columns,Y=new Jt(E*g,h*M);for(let J=0;J<E;J++)for(let ot=0;ot<h;ot++)for(let vt=0;vt<g;vt++)for(let zt=0;zt<M;zt++)Y.set(g*J+vt,M*ot+zt,this.get(J,ot)*b.get(vt,zt));return Y}kroneckerSum(b){if(b=Jt.checkMatrix(b),!this.isSquare()||!b.isSquare())throw new Error("Kronecker Sum needs two Square Matrices");let E=this.rows,h=b.rows,g=this.kroneckerProduct(Jt.eye(h,h)),M=Jt.eye(E,E).kroneckerProduct(b);return g.add(M)}transpose(){let b=new Jt(this.columns,this.rows);for(let E=0;E<this.rows;E++)for(let h=0;h<this.columns;h++)b.set(h,E,this.get(E,h));return b}sortRows(b=T){for(let E=0;E<this.rows;E++)this.setRow(E,this.getRow(E).sort(b));return this}sortColumns(b=T){for(let E=0;E<this.columns;E++)this.setColumn(E,this.getColumn(E).sort(b));return this}subMatrix(b,E,h,g){Pn(this,b,E,h,g);let M=new Jt(E-b+1,g-h+1);for(let Y=b;Y<=E;Y++)for(let J=h;J<=g;J++)M.set(Y-b,J-h,this.get(Y,J));return M}subMatrixRow(b,E,h){if(E===void 0&&(E=0),h===void 0&&(h=this.columns-1),E>h||E<0||E>=this.columns||h<0||h>=this.columns)throw new RangeError("Argument out of range");let g=new Jt(b.length,h-E+1);for(let M=0;M<b.length;M++)for(let Y=E;Y<=h;Y++){if(b[M]<0||b[M]>=this.rows)throw new RangeError(`Row index out of range: ${b[M]}`);g.set(M,Y-E,this.get(b[M],Y))}return g}subMatrixColumn(b,E,h){if(E===void 0&&(E=0),h===void 0&&(h=this.rows-1),E>h||E<0||E>=this.rows||h<0||h>=this.rows)throw new RangeError("Argument out of range");let g=new Jt(h-E+1,b.length);for(let M=0;M<b.length;M++)for(let Y=E;Y<=h;Y++){if(b[M]<0||b[M]>=this.columns)throw new RangeError(`Column index out of range: ${b[M]}`);g.set(Y-E,M,this.get(Y,b[M]))}return g}setSubMatrix(b,E,h){if(b=Jt.checkMatrix(b),b.isEmpty())return this;let g=E+b.rows-1,M=h+b.columns-1;Pn(this,E,g,h,M);for(let Y=0;Y<b.rows;Y++)for(let J=0;J<b.columns;J++)this.set(E+Y,h+J,b.get(Y,J));return this}selection(b,E){Xe(this,b),En(this,E);let h=new Jt(b.length,E.length);for(let g=0;g<b.length;g++){let M=b[g];for(let Y=0;Y<E.length;Y++){let J=E[Y];h.set(g,Y,this.get(M,J))}}return h}trace(){let b=Math.min(this.rows,this.columns),E=0;for(let h=0;h<b;h++)E+=this.get(h,h);return E}clone(){return this.constructor.copy(this,new Jt(this.rows,this.columns))}static copy(b,E){for(const[h,g,M]of b.entries())E.set(h,g,M);return E}sum(b){switch(b){case"row":return Ee(this);case"column":return fn(this);case void 0:return on(this);default:throw new Error(`invalid option: ${b}`)}}product(b){switch(b){case"row":return Pe(this);case"column":return Ze(this);case void 0:return Ke(this);default:throw new Error(`invalid option: ${b}`)}}mean(b){const E=this.sum(b);switch(b){case"row":{for(let h=0;h<this.rows;h++)E[h]/=this.columns;return E}case"column":{for(let h=0;h<this.columns;h++)E[h]/=this.rows;return E}case void 0:return E/this.size;default:throw new Error(`invalid option: ${b}`)}}variance(b,E={}){if(typeof b=="object"&&(E=b,b=void 0),typeof E!="object")throw new TypeError("options must be an object");const{unbiased:h=!0,mean:g=this.mean(b)}=E;if(typeof h!="boolean")throw new TypeError("unbiased must be a boolean");switch(b){case"row":{if(!kt.isAnyArray(g))throw new TypeError("mean must be an array");return le(this,h,g)}case"column":{if(!kt.isAnyArray(g))throw new TypeError("mean must be an array");return Ae(this,h,g)}case void 0:{if(typeof g!="number")throw new TypeError("mean must be a number");return Pt(this,h,g)}default:throw new Error(`invalid option: ${b}`)}}standardDeviation(b,E){typeof b=="object"&&(E=b,b=void 0);const h=this.variance(b,E);if(b===void 0)return Math.sqrt(h);for(let g=0;g<h.length;g++)h[g]=Math.sqrt(h[g]);return h}center(b,E={}){if(typeof b=="object"&&(E=b,b=void 0),typeof E!="object")throw new TypeError("options must be an object");const{center:h=this.mean(b)}=E;switch(b){case"row":{if(!kt.isAnyArray(h))throw new TypeError("center must be an array");return wt(this,h),this}case"column":{if(!kt.isAnyArray(h))throw new TypeError("center must be an array");return he(this,h),this}case void 0:{if(typeof h!="number")throw new TypeError("center must be a number");return je(this,h),this}default:throw new Error(`invalid option: ${b}`)}}scale(b,E={}){if(typeof b=="object"&&(E=b,b=void 0),typeof E!="object")throw new TypeError("options must be an object");let h=E.scale;switch(b){case"row":{if(h===void 0)h=Re(this);else if(!kt.isAnyArray(h))throw new TypeError("scale must be an array");return ce(this,h),this}case"column":{if(h===void 0)h=Le(this);else if(!kt.isAnyArray(h))throw new TypeError("scale must be an array");return xe(this,h),this}case void 0:{if(h===void 0)h=_t(this);else if(typeof h!="number")throw new TypeError("scale must be a number");return ie(this,h),this}default:throw new Error(`invalid option: ${b}`)}}toString(b){return Ht(this,b)}[Symbol.iterator](){return this.entries()}*entries(){for(let b=0;b<this.rows;b++)for(let E=0;E<this.columns;E++)yield[b,E,this.get(b,E)]}*values(){for(let b=0;b<this.rows;b++)for(let E=0;E<this.columns;E++)yield this.get(b,E)}}Me.prototype.klass="Matrix",typeof Symbol!="undefined"&&(Me.prototype[Symbol.for("nodejs.util.inspect.custom")]=Ct);function T(ft,b){return ft-b}function at(ft){return ft.every(b=>typeof b=="number")}Me.random=Me.rand,Me.randomInt=Me.randInt,Me.diagonal=Me.diag,Me.prototype.diagonal=Me.prototype.diag,Me.identity=Me.eye,Me.prototype.negate=Me.prototype.neg,Me.prototype.tensorProduct=Me.prototype.kroneckerProduct;const fe=class sd extends Me{constructor(b,E){if(super(),D(this,F),R(this,"data"),sd.isMatrix(b))L(this,F,it).call(this,b.rows,b.columns),sd.copy(b,this);else if(Number.isInteger(b)&&b>=0)L(this,F,it).call(this,b,E);else if(kt.isAnyArray(b)){const h=b;if(b=h.length,E=b?h[0].length:0,typeof E!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let g=0;g<b;g++){if(h[g].length!==E)throw new RangeError("Inconsistent array dimensions");if(!at(h[g]))throw new TypeError("Input data contains non-numeric values");this.data.push(Float64Array.from(h[g]))}this.rows=b,this.columns=E}else throw new TypeError("First argument must be a positive number or an array")}set(b,E,h){return this.data[b][E]=h,this}get(b,E){return this.data[b][E]}removeRow(b){return we(this,b),this.data.splice(b,1),this.rows-=1,this}addRow(b,E){return E===void 0&&(E=b,b=this.rows),we(this,b,!0),E=Float64Array.from(Ge(this,E)),this.data.splice(b,0,E),this.rows+=1,this}removeColumn(b){re(this,b);for(let E=0;E<this.rows;E++){const h=new Float64Array(this.columns-1);for(let g=0;g<b;g++)h[g]=this.data[E][g];for(let g=b+1;g<this.columns;g++)h[g-1]=this.data[E][g];this.data[E]=h}return this.columns-=1,this}addColumn(b,E){typeof E=="undefined"&&(E=b,b=this.columns),re(this,b,!0),E=rn(this,E);for(let h=0;h<this.rows;h++){const g=new Float64Array(this.columns+1);let M=0;for(;M<b;M++)g[M]=this.data[h][M];for(g[M++]=E[h];M<this.columns+1;M++)g[M]=this.data[h][M-1];this.data[h]=g}return this.columns+=1,this}};F=new WeakSet,it=function(ft,b){if(this.data=[],Number.isInteger(b)&&b>=0)for(let E=0;E<ft;E++)this.data.push(new Float64Array(b));else throw new TypeError("nColumns must be a positive integer");this.rows=ft,this.columns=b};let Jt=fe;be(Me,Jt);const Ie=class od extends Me{constructor(b){if(super(),D(this,G),Jt.isMatrix(b)){if(!b.isSymmetric())throw new TypeError("not symmetric data");A(this,G,Jt.copy(b,new Jt(b.rows,b.rows)))}else if(Number.isInteger(b)&&b>=0)A(this,G,new Jt(b,b));else if(A(this,G,new Jt(b)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return N(this,G).size}get rows(){return N(this,G).rows}get columns(){return N(this,G).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(b){return Jt.isMatrix(b)&&b.klassType==="SymmetricMatrix"}static zeros(b){return new this(b)}static ones(b){return new this(b).fill(1)}clone(){const b=new od(this.diagonalSize);for(const[E,h,g]of this.upperRightEntries())b.set(E,h,g);return b}toMatrix(){return new Jt(this)}get(b,E){return N(this,G).get(b,E)}set(b,E,h){return N(this,G).set(b,E,h),N(this,G).set(E,b,h),this}removeCross(b){return N(this,G).removeRow(b),N(this,G).removeColumn(b),this}addCross(b,E){E===void 0&&(E=b,b=this.diagonalSize);const h=E.slice();return h.splice(b,1),N(this,G).addRow(b,h),N(this,G).addColumn(b,E),this}applyMask(b){if(b.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const E=[];for(const[h,g]of b.entries())g||E.push(h);E.reverse();for(const h of E)this.removeCross(h);return this}toCompact(){const{diagonalSize:b}=this,E=new Array(b*(b+1)/2);for(let h=0,g=0,M=0;M<E.length;M++)E[M]=this.get(g,h),++h>=b&&(h=++g);return E}static fromCompact(b){const E=b.length,h=(Math.sqrt(8*E+1)-1)/2;if(!Number.isInteger(h))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(b)}`);const g=new od(h);for(let M=0,Y=0,J=0;J<E;J++)g.set(M,Y,b[J]),++M>=h&&(M=++Y);return g}*upperRightEntries(){for(let b=0,E=0;b<this.diagonalSize;void 0){const h=this.get(b,E);yield[b,E,h],++E>=this.diagonalSize&&(E=++b)}}*upperRightValues(){for(let b=0,E=0;b<this.diagonalSize;void 0)yield this.get(b,E),++E>=this.diagonalSize&&(E=++b)}};G=new WeakMap;let Ne=Ie;Ne.prototype.klassType="SymmetricMatrix";class en extends Ne{static isDistanceMatrix(b){return Ne.isSymmetricMatrix(b)&&b.klassSubType==="DistanceMatrix"}constructor(b){if(super(b),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(b,E,h){return b===E&&(h=0),super.set(b,E,h)}addCross(b,E){return E===void 0&&(E=b,b=this.diagonalSize),E=E.slice(),E[b]=0,super.addCross(b,E)}toSymmetricMatrix(){return new Ne(this)}clone(){const b=new en(this.diagonalSize);for(const[E,h,g]of this.upperRightEntries())E!==h&&b.set(E,h,g);return b}toCompact(){const{diagonalSize:b}=this,E=(b-1)*b/2,h=new Array(E);for(let g=1,M=0,Y=0;Y<h.length;Y++)h[Y]=this.get(M,g),++g>=b&&(g=++M+1);return h}static fromCompact(b){const E=b.length;if(E===0)return new this(0);const h=(Math.sqrt(8*E+1)+1)/2;if(!Number.isInteger(h))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(b)}`);const g=new this(h);for(let M=1,Y=0,J=0;J<E;J++)g.set(M,Y,b[J]),++M>=h&&(M=++Y+1);return g}}en.prototype.klassSubType="DistanceMatrix";class St extends Me{constructor(b,E,h){super(),this.matrix=b,this.rows=E,this.columns=h}}class tt extends St{constructor(b,E){re(b,E),super(b,b.rows,1),this.column=E}set(b,E,h){return this.matrix.set(b,this.column,h),this}get(b){return this.matrix.get(b,this.column)}}class Nt extends St{constructor(b,E){En(b,E),super(b,b.rows,E.length),this.columnIndices=E}set(b,E,h){return this.matrix.set(b,this.columnIndices[E],h),this}get(b,E){return this.matrix.get(b,this.columnIndices[E])}}class Xt extends St{constructor(b){super(b,b.rows,b.columns)}set(b,E,h){return this.matrix.set(b,this.columns-E-1,h),this}get(b,E){return this.matrix.get(b,this.columns-E-1)}}class Lt extends St{constructor(b){super(b,b.rows,b.columns)}set(b,E,h){return this.matrix.set(this.rows-b-1,E,h),this}get(b,E){return this.matrix.get(this.rows-b-1,E)}}class Zt extends St{constructor(b,E){we(b,E),super(b,1,b.columns),this.row=E}set(b,E,h){return this.matrix.set(this.row,E,h),this}get(b,E){return this.matrix.get(this.row,E)}}class Ut extends St{constructor(b,E){Xe(b,E),super(b,E.length,b.columns),this.rowIndices=E}set(b,E,h){return this.matrix.set(this.rowIndices[b],E,h),this}get(b,E){return this.matrix.get(this.rowIndices[b],E)}}class qt extends St{constructor(b,E,h){Xe(b,E),En(b,h),super(b,E.length,h.length),this.rowIndices=E,this.columnIndices=h}set(b,E,h){return this.matrix.set(this.rowIndices[b],this.columnIndices[E],h),this}get(b,E){return this.matrix.get(this.rowIndices[b],this.columnIndices[E])}}class se extends St{constructor(b,E,h,g,M){Pn(b,E,h,g,M),super(b,h-E+1,M-g+1),this.startRow=E,this.startColumn=g}set(b,E,h){return this.matrix.set(this.startRow+b,this.startColumn+E,h),this}get(b,E){return this.matrix.get(this.startRow+b,this.startColumn+E)}}class te extends St{constructor(b){super(b,b.columns,b.rows)}set(b,E,h){return this.matrix.set(E,b,h),this}get(b,E){return this.matrix.get(E,b)}}class ke extends Me{constructor(b,E={}){const{rows:h=1}=E;if(b.length%h!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=h,this.columns=b.length/h,this.data=b}set(b,E,h){let g=this._calculateIndex(b,E);return this.data[g]=h,this}get(b,E){let h=this._calculateIndex(b,E);return this.data[h]}_calculateIndex(b,E){return b*this.columns+E}}class He extends Me{constructor(b){super(),this.data=b,this.rows=b.length,this.columns=b[0].length}set(b,E,h){return this.data[b][E]=h,this}get(b,E){return this.data[b][E]}}function Ve(ft,b){if(kt.isAnyArray(ft))return ft[0]&&kt.isAnyArray(ft[0])?new He(ft):new ke(ft,b);throw new Error("the argument is not an array")}class ln{constructor(b){b=He.checkMatrix(b);let E=b.clone(),h=E.rows,g=E.columns,M=new Float64Array(h),Y=1,J,ot,vt,zt,q,$,H,nt,Mt;for(J=0;J<h;J++)M[J]=J;for(nt=new Float64Array(h),ot=0;ot<g;ot++){for(J=0;J<h;J++)nt[J]=E.get(J,ot);for(J=0;J<h;J++){for(Mt=Math.min(J,ot),q=0,vt=0;vt<Mt;vt++)q+=E.get(J,vt)*nt[vt];nt[J]-=q,E.set(J,ot,nt[J])}for(zt=ot,J=ot+1;J<h;J++)Math.abs(nt[J])>Math.abs(nt[zt])&&(zt=J);if(zt!==ot){for(vt=0;vt<g;vt++)$=E.get(zt,vt),E.set(zt,vt,E.get(ot,vt)),E.set(ot,vt,$);H=M[zt],M[zt]=M[ot],M[ot]=H,Y=-Y}if(ot<h&&E.get(ot,ot)!==0)for(J=ot+1;J<h;J++)E.set(J,ot,E.get(J,ot)/E.get(ot,ot))}this.LU=E,this.pivotVector=M,this.pivotSign=Y}isSingular(){let b=this.LU,E=b.columns;for(let h=0;h<E;h++)if(b.get(h,h)===0)return!0;return!1}solve(b){b=Jt.checkMatrix(b);let E=this.LU;if(E.rows!==b.rows)throw new Error("Invalid matrix dimensions");if(this.isSingular())throw new Error("LU matrix is singular");let g=b.columns,M=b.subMatrixRow(this.pivotVector,0,g-1),Y=E.columns,J,ot,vt;for(vt=0;vt<Y;vt++)for(J=vt+1;J<Y;J++)for(ot=0;ot<g;ot++)M.set(J,ot,M.get(J,ot)-M.get(vt,ot)*E.get(J,vt));for(vt=Y-1;vt>=0;vt--){for(ot=0;ot<g;ot++)M.set(vt,ot,M.get(vt,ot)/E.get(vt,vt));for(J=0;J<vt;J++)for(ot=0;ot<g;ot++)M.set(J,ot,M.get(J,ot)-M.get(vt,ot)*E.get(J,vt))}return M}get determinant(){let b=this.LU;if(!b.isSquare())throw new Error("Matrix must be square");let E=this.pivotSign,h=b.columns;for(let g=0;g<h;g++)E*=b.get(g,g);return E}get lowerTriangularMatrix(){let b=this.LU,E=b.rows,h=b.columns,g=new Jt(E,h);for(let M=0;M<E;M++)for(let Y=0;Y<h;Y++)M>Y?g.set(M,Y,b.get(M,Y)):M===Y?g.set(M,Y,1):g.set(M,Y,0);return g}get upperTriangularMatrix(){let b=this.LU,E=b.rows,h=b.columns,g=new Jt(E,h);for(let M=0;M<E;M++)for(let Y=0;Y<h;Y++)M<=Y?g.set(M,Y,b.get(M,Y)):g.set(M,Y,0);return g}get pivotPermutationVector(){return Array.from(this.pivotVector)}}function On(ft,b){let E=0;return Math.abs(ft)>Math.abs(b)?(E=b/ft,Math.abs(ft)*Math.sqrt(1+E*E)):b!==0?(E=ft/b,Math.abs(b)*Math.sqrt(1+E*E)):0}class yn{constructor(b){b=He.checkMatrix(b);let E=b.clone(),h=b.rows,g=b.columns,M=new Float64Array(g),Y,J,ot,vt;for(ot=0;ot<g;ot++){let zt=0;for(Y=ot;Y<h;Y++)zt=On(zt,E.get(Y,ot));if(zt!==0){for(E.get(ot,ot)<0&&(zt=-zt),Y=ot;Y<h;Y++)E.set(Y,ot,E.get(Y,ot)/zt);for(E.set(ot,ot,E.get(ot,ot)+1),J=ot+1;J<g;J++){for(vt=0,Y=ot;Y<h;Y++)vt+=E.get(Y,ot)*E.get(Y,J);for(vt=-vt/E.get(ot,ot),Y=ot;Y<h;Y++)E.set(Y,J,E.get(Y,J)+vt*E.get(Y,ot))}}M[ot]=-zt}this.QR=E,this.Rdiag=M}solve(b){b=Jt.checkMatrix(b);let E=this.QR,h=E.rows;if(b.rows!==h)throw new Error("Matrix row dimensions must agree");if(!this.isFullRank())throw new Error("Matrix is rank deficient");let g=b.columns,M=b.clone(),Y=E.columns,J,ot,vt,zt;for(vt=0;vt<Y;vt++)for(ot=0;ot<g;ot++){for(zt=0,J=vt;J<h;J++)zt+=E.get(J,vt)*M.get(J,ot);for(zt=-zt/E.get(vt,vt),J=vt;J<h;J++)M.set(J,ot,M.get(J,ot)+zt*E.get(J,vt))}for(vt=Y-1;vt>=0;vt--){for(ot=0;ot<g;ot++)M.set(vt,ot,M.get(vt,ot)/this.Rdiag[vt]);for(J=0;J<vt;J++)for(ot=0;ot<g;ot++)M.set(J,ot,M.get(J,ot)-M.get(vt,ot)*E.get(J,vt))}return M.subMatrix(0,Y-1,0,g-1)}isFullRank(){let b=this.QR.columns;for(let E=0;E<b;E++)if(this.Rdiag[E]===0)return!1;return!0}get upperTriangularMatrix(){let b=this.QR,E=b.columns,h=new Jt(E,E),g,M;for(g=0;g<E;g++)for(M=0;M<E;M++)g<M?h.set(g,M,b.get(g,M)):g===M?h.set(g,M,this.Rdiag[g]):h.set(g,M,0);return h}get orthogonalMatrix(){let b=this.QR,E=b.rows,h=b.columns,g=new Jt(E,h),M,Y,J,ot;for(J=h-1;J>=0;J--){for(M=0;M<E;M++)g.set(M,J,0);for(g.set(J,J,1),Y=J;Y<h;Y++)if(b.get(J,J)!==0){for(ot=0,M=J;M<E;M++)ot+=b.get(M,J)*g.get(M,Y);for(ot=-ot/b.get(J,J),M=J;M<E;M++)g.set(M,Y,g.get(M,Y)+ot*b.get(M,J))}}return g}}class lr{constructor(b,E={}){if(b=He.checkMatrix(b),b.isEmpty())throw new Error("Matrix must be non-empty");let h=b.rows,g=b.columns;const{computeLeftSingularVectors:M=!0,computeRightSingularVectors:Y=!0,autoTranspose:J=!1}=E;let ot=!!M,vt=!!Y,zt=!1,q;if(h<g)if(!J)q=b.clone(),console.warn("Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose");else{q=b.transpose(),h=q.rows,g=q.columns,zt=!0;let Yt=ot;ot=vt,vt=Yt}else q=b.clone();let $=Math.min(h,g),H=Math.min(h+1,g),nt=new Float64Array(H),Mt=new Jt(h,$),Wt=new Jt(g,g),Tt=new Float64Array(g),Kt=new Float64Array(h),bt=new Float64Array(H);for(let Yt=0;Yt<H;Yt++)bt[Yt]=Yt;let pt=Math.min(h-1,g),ut=Math.max(0,Math.min(g-2,h)),Gt=Math.max(pt,ut);for(let Yt=0;Yt<Gt;Yt++){if(Yt<pt){nt[Yt]=0;for(let Ce=Yt;Ce<h;Ce++)nt[Yt]=On(nt[Yt],q.get(Ce,Yt));if(nt[Yt]!==0){q.get(Yt,Yt)<0&&(nt[Yt]=-nt[Yt]);for(let Ce=Yt;Ce<h;Ce++)q.set(Ce,Yt,q.get(Ce,Yt)/nt[Yt]);q.set(Yt,Yt,q.get(Yt,Yt)+1)}nt[Yt]=-nt[Yt]}for(let Ce=Yt+1;Ce<g;Ce++){if(Yt<pt&&nt[Yt]!==0){let qe=0;for(let Qe=Yt;Qe<h;Qe++)qe+=q.get(Qe,Yt)*q.get(Qe,Ce);qe=-qe/q.get(Yt,Yt);for(let Qe=Yt;Qe<h;Qe++)q.set(Qe,Ce,q.get(Qe,Ce)+qe*q.get(Qe,Yt))}Tt[Ce]=q.get(Yt,Ce)}if(ot&&Yt<pt)for(let Ce=Yt;Ce<h;Ce++)Mt.set(Ce,Yt,q.get(Ce,Yt));if(Yt<ut){Tt[Yt]=0;for(let Ce=Yt+1;Ce<g;Ce++)Tt[Yt]=On(Tt[Yt],Tt[Ce]);if(Tt[Yt]!==0){Tt[Yt+1]<0&&(Tt[Yt]=0-Tt[Yt]);for(let Ce=Yt+1;Ce<g;Ce++)Tt[Ce]/=Tt[Yt];Tt[Yt+1]+=1}if(Tt[Yt]=-Tt[Yt],Yt+1<h&&Tt[Yt]!==0){for(let Ce=Yt+1;Ce<h;Ce++)Kt[Ce]=0;for(let Ce=Yt+1;Ce<h;Ce++)for(let qe=Yt+1;qe<g;qe++)Kt[Ce]+=Tt[qe]*q.get(Ce,qe);for(let Ce=Yt+1;Ce<g;Ce++){let qe=-Tt[Ce]/Tt[Yt+1];for(let Qe=Yt+1;Qe<h;Qe++)q.set(Qe,Ce,q.get(Qe,Ce)+qe*Kt[Qe])}}if(vt)for(let Ce=Yt+1;Ce<g;Ce++)Wt.set(Ce,Yt,Tt[Ce])}}let Vt=Math.min(g,h+1);if(pt<g&&(nt[pt]=q.get(pt,pt)),h<Vt&&(nt[Vt-1]=0),ut+1<Vt&&(Tt[ut]=q.get(ut,Vt-1)),Tt[Vt-1]=0,ot){for(let Yt=pt;Yt<$;Yt++){for(let Ce=0;Ce<h;Ce++)Mt.set(Ce,Yt,0);Mt.set(Yt,Yt,1)}for(let Yt=pt-1;Yt>=0;Yt--)if(nt[Yt]!==0){for(let Ce=Yt+1;Ce<$;Ce++){let qe=0;for(let Qe=Yt;Qe<h;Qe++)qe+=Mt.get(Qe,Yt)*Mt.get(Qe,Ce);qe=-qe/Mt.get(Yt,Yt);for(let Qe=Yt;Qe<h;Qe++)Mt.set(Qe,Ce,Mt.get(Qe,Ce)+qe*Mt.get(Qe,Yt))}for(let Ce=Yt;Ce<h;Ce++)Mt.set(Ce,Yt,-Mt.get(Ce,Yt));Mt.set(Yt,Yt,1+Mt.get(Yt,Yt));for(let Ce=0;Ce<Yt-1;Ce++)Mt.set(Ce,Yt,0)}else{for(let Ce=0;Ce<h;Ce++)Mt.set(Ce,Yt,0);Mt.set(Yt,Yt,1)}}if(vt)for(let Yt=g-1;Yt>=0;Yt--){if(Yt<ut&&Tt[Yt]!==0)for(let Ce=Yt+1;Ce<g;Ce++){let qe=0;for(let Qe=Yt+1;Qe<g;Qe++)qe+=Wt.get(Qe,Yt)*Wt.get(Qe,Ce);qe=-qe/Wt.get(Yt+1,Yt);for(let Qe=Yt+1;Qe<g;Qe++)Wt.set(Qe,Ce,Wt.get(Qe,Ce)+qe*Wt.get(Qe,Yt))}for(let Ce=0;Ce<g;Ce++)Wt.set(Ce,Yt,0);Wt.set(Yt,Yt,1)}let ve=Vt-1,ge=Number.EPSILON;for(;Vt>0;){let Yt,Ce;for(Yt=Vt-2;Yt>=-1&&Yt!==-1;Yt--){const qe=Number.MIN_VALUE+ge*Math.abs(nt[Yt]+Math.abs(nt[Yt+1]));if(Math.abs(Tt[Yt])<=qe||Number.isNaN(Tt[Yt])){Tt[Yt]=0;break}}if(Yt===Vt-2)Ce=4;else{let qe;for(qe=Vt-1;qe>=Yt&&qe!==Yt;qe--){let Qe=(qe!==Vt?Math.abs(Tt[qe]):0)+(qe!==Yt+1?Math.abs(Tt[qe-1]):0);if(Math.abs(nt[qe])<=ge*Qe){nt[qe]=0;break}}qe===Yt?Ce=3:qe===Vt-1?Ce=1:(Ce=2,Yt=qe)}switch(Yt++,Ce){case 1:{let qe=Tt[Vt-2];Tt[Vt-2]=0;for(let Qe=Vt-2;Qe>=Yt;Qe--){let Nn=On(nt[Qe],qe),Dn=nt[Qe]/Nn,Rn=qe/Nn;if(nt[Qe]=Nn,Qe!==Yt&&(qe=-Rn*Tt[Qe-1],Tt[Qe-1]=Dn*Tt[Qe-1]),vt)for(let Xn=0;Xn<g;Xn++)Nn=Dn*Wt.get(Xn,Qe)+Rn*Wt.get(Xn,Vt-1),Wt.set(Xn,Vt-1,-Rn*Wt.get(Xn,Qe)+Dn*Wt.get(Xn,Vt-1)),Wt.set(Xn,Qe,Nn)}break}case 2:{let qe=Tt[Yt-1];Tt[Yt-1]=0;for(let Qe=Yt;Qe<Vt;Qe++){let Nn=On(nt[Qe],qe),Dn=nt[Qe]/Nn,Rn=qe/Nn;if(nt[Qe]=Nn,qe=-Rn*Tt[Qe],Tt[Qe]=Dn*Tt[Qe],ot)for(let Xn=0;Xn<h;Xn++)Nn=Dn*Mt.get(Xn,Qe)+Rn*Mt.get(Xn,Yt-1),Mt.set(Xn,Yt-1,-Rn*Mt.get(Xn,Qe)+Dn*Mt.get(Xn,Yt-1)),Mt.set(Xn,Qe,Nn)}break}case 3:{const qe=Math.max(Math.abs(nt[Vt-1]),Math.abs(nt[Vt-2]),Math.abs(Tt[Vt-2]),Math.abs(nt[Yt]),Math.abs(Tt[Yt])),Qe=nt[Vt-1]/qe,Nn=nt[Vt-2]/qe,Dn=Tt[Vt-2]/qe,Rn=nt[Yt]/qe,Xn=Tt[Yt]/qe,tr=((Nn+Qe)*(Nn-Qe)+Dn*Dn)/2,Mr=Qe*Dn*(Qe*Dn);let yr=0;(tr!==0||Mr!==0)&&(tr<0?yr=0-Math.sqrt(tr*tr+Mr):yr=Math.sqrt(tr*tr+Mr),yr=Mr/(tr+yr));let vr=(Rn+Qe)*(Rn-Qe)+yr,Cr=Rn*Xn;for(let ur=Yt;ur<Vt-1;ur++){let Kn=On(vr,Cr);Kn===0&&(Kn=Number.MIN_VALUE);let Ur=vr/Kn,Yr=Cr/Kn;if(ur!==Yt&&(Tt[ur-1]=Kn),vr=Ur*nt[ur]+Yr*Tt[ur],Tt[ur]=Ur*Tt[ur]-Yr*nt[ur],Cr=Yr*nt[ur+1],nt[ur+1]=Ur*nt[ur+1],vt)for(let br=0;br<g;br++)Kn=Ur*Wt.get(br,ur)+Yr*Wt.get(br,ur+1),Wt.set(br,ur+1,-Yr*Wt.get(br,ur)+Ur*Wt.get(br,ur+1)),Wt.set(br,ur,Kn);if(Kn=On(vr,Cr),Kn===0&&(Kn=Number.MIN_VALUE),Ur=vr/Kn,Yr=Cr/Kn,nt[ur]=Kn,vr=Ur*Tt[ur]+Yr*nt[ur+1],nt[ur+1]=-Yr*Tt[ur]+Ur*nt[ur+1],Cr=Yr*Tt[ur+1],Tt[ur+1]=Ur*Tt[ur+1],ot&&ur<h-1)for(let br=0;br<h;br++)Kn=Ur*Mt.get(br,ur)+Yr*Mt.get(br,ur+1),Mt.set(br,ur+1,-Yr*Mt.get(br,ur)+Ur*Mt.get(br,ur+1)),Mt.set(br,ur,Kn)}Tt[Vt-2]=vr;break}case 4:{if(nt[Yt]<=0&&(nt[Yt]=nt[Yt]<0?-nt[Yt]:0,vt))for(let qe=0;qe<=ve;qe++)Wt.set(qe,Yt,-Wt.get(qe,Yt));for(;Yt<ve&&!(nt[Yt]>=nt[Yt+1]);){let qe=nt[Yt];if(nt[Yt]=nt[Yt+1],nt[Yt+1]=qe,vt&&Yt<g-1)for(let Qe=0;Qe<g;Qe++)qe=Wt.get(Qe,Yt+1),Wt.set(Qe,Yt+1,Wt.get(Qe,Yt)),Wt.set(Qe,Yt,qe);if(ot&&Yt<h-1)for(let Qe=0;Qe<h;Qe++)qe=Mt.get(Qe,Yt+1),Mt.set(Qe,Yt+1,Mt.get(Qe,Yt)),Mt.set(Qe,Yt,qe);Yt++}Vt--;break}}}if(zt){let Yt=Wt;Wt=Mt,Mt=Yt}this.m=h,this.n=g,this.s=nt,this.U=Mt,this.V=Wt}solve(b){let E=b,h=this.threshold,g=this.s.length,M=Jt.zeros(g,g);for(let $=0;$<g;$++)Math.abs(this.s[$])<=h?M.set($,$,0):M.set($,$,1/this.s[$]);let Y=this.U,J=this.rightSingularVectors,ot=J.mmul(M),vt=J.rows,zt=Y.rows,q=Jt.zeros(vt,zt);for(let $=0;$<vt;$++)for(let H=0;H<zt;H++){let nt=0;for(let Mt=0;Mt<g;Mt++)nt+=ot.get($,Mt)*Y.get(H,Mt);q.set($,H,nt)}return q.mmul(E)}solveForDiagonal(b){return this.solve(Jt.diag(b))}inverse(){let b=this.V,E=this.threshold,h=b.rows,g=b.columns,M=new Jt(h,this.s.length);for(let zt=0;zt<h;zt++)for(let q=0;q<g;q++)Math.abs(this.s[q])>E&&M.set(zt,q,b.get(zt,q)/this.s[q]);let Y=this.U,J=Y.rows,ot=Y.columns,vt=new Jt(h,J);for(let zt=0;zt<h;zt++)for(let q=0;q<J;q++){let $=0;for(let H=0;H<ot;H++)$+=M.get(zt,H)*Y.get(q,H);vt.set(zt,q,$)}return vt}get condition(){return this.s[0]/this.s[Math.min(this.m,this.n)-1]}get norm2(){return this.s[0]}get rank(){let b=Math.max(this.m,this.n)*this.s[0]*Number.EPSILON,E=0,h=this.s;for(let g=0,M=h.length;g<M;g++)h[g]>b&&E++;return E}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return Jt.diag(this.s)}}function Zn(ft,b=!1){return ft=He.checkMatrix(ft),b?new lr(ft).inverse():Yn(ft,Jt.eye(ft.rows))}function Yn(ft,b,E=!1){return ft=He.checkMatrix(ft),b=He.checkMatrix(b),E?new lr(ft).solve(b):ft.isSquare()?new ln(ft).solve(b):new yn(ft).solve(b)}function ye(ft){if(ft=Jt.checkMatrix(ft),ft.isSquare()){if(ft.columns===0)return 1;let b,E,h,g;if(ft.columns===2)return b=ft.get(0,0),E=ft.get(0,1),h=ft.get(1,0),g=ft.get(1,1),b*g-E*h;if(ft.columns===3){let M,Y,J;return M=new qt(ft,[1,2],[1,2]),Y=new qt(ft,[1,2],[0,2]),J=new qt(ft,[1,2],[0,1]),b=ft.get(0,0),E=ft.get(0,1),h=ft.get(0,2),b*ye(M)-E*ye(Y)+h*ye(J)}else return new ln(ft).determinant}else throw Error("determinant can only be calculated for a square matrix")}function xr(ft,b){let E=[];for(let h=0;h<ft;h++)h!==b&&E.push(h);return E}function Hn(ft,b,E,h=1e-9,g=1e-9){if(ft>g)return new Array(b.rows+1).fill(0);{let M=b.addRow(E,[0]);for(let Y=0;Y<M.rows;Y++)Math.abs(M.get(Y,0))<h&&M.set(Y,0,0);return M.to1DArray()}}function Br(ft,b={}){const{thresholdValue:E=1e-9,thresholdError:h=1e-9}=b;ft=Jt.checkMatrix(ft);let g=ft.rows,M=new Jt(g,g);for(let Y=0;Y<g;Y++){let J=Jt.columnVector(ft.getRow(Y)),ot=ft.subMatrixRow(xr(g,Y)).transpose(),zt=new lr(ot).solve(J),q=Jt.sub(J,ot.mmul(zt)).abs().max();M.setRow(Y,Hn(q,zt,Y,E,h))}return M}function Ar(ft,b=Number.EPSILON){if(ft=Jt.checkMatrix(ft),ft.isEmpty())return ft.transpose();let E=new lr(ft,{autoTranspose:!0}),h=E.leftSingularVectors,g=E.rightSingularVectors,M=E.diagonal;for(let Y=0;Y<M.length;Y++)Math.abs(M[Y])>b?M[Y]=1/M[Y]:M[Y]=0;return g.mmul(Jt.diag(M).mmul(h.transpose()))}function ri(ft,b=ft,E={}){ft=new Jt(ft);let h=!1;if(typeof b=="object"&&!Jt.isMatrix(b)&&!kt.isAnyArray(b)?(E=b,b=ft,h=!0):b=new Jt(b),ft.rows!==b.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:g=!0}=E;g&&(ft=ft.center("column"),h||(b=b.center("column")));const M=ft.transpose().mmul(b);for(let Y=0;Y<M.rows;Y++)for(let J=0;J<M.columns;J++)M.set(Y,J,M.get(Y,J)*(1/(ft.rows-1)));return M}function mi(ft,b=ft,E={}){ft=new Jt(ft);let h=!1;if(typeof b=="object"&&!Jt.isMatrix(b)&&!kt.isAnyArray(b)?(E=b,b=ft,h=!0):b=new Jt(b),ft.rows!==b.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:g=!0,scale:M=!0}=E;g&&(ft.center("column"),h||b.center("column")),M&&(ft.scale("column"),h||b.scale("column"));const Y=ft.standardDeviation("column",{unbiased:!0}),J=h?Y:b.standardDeviation("column",{unbiased:!0}),ot=ft.transpose().mmul(b);for(let vt=0;vt<ot.rows;vt++)for(let zt=0;zt<ot.columns;zt++)ot.set(vt,zt,ot.get(vt,zt)*(1/(Y[vt]*J[zt]))*(1/(ft.rows-1)));return ot}class si{constructor(b,E={}){const{assumeSymmetric:h=!1}=E;if(b=He.checkMatrix(b),!b.isSquare())throw new Error("Matrix is not a square matrix");if(b.isEmpty())throw new Error("Matrix must be non-empty");let g=b.columns,M=new Jt(g,g),Y=new Float64Array(g),J=new Float64Array(g),ot=b,vt,zt,q=!1;if(h?q=!0:q=b.isSymmetric(),q){for(vt=0;vt<g;vt++)for(zt=0;zt<g;zt++)M.set(vt,zt,ot.get(vt,zt));Jr(g,J,Y,M),_i(g,J,Y,M)}else{let $=new Jt(g,g),H=new Float64Array(g);for(zt=0;zt<g;zt++)for(vt=0;vt<g;vt++)$.set(vt,zt,ot.get(vt,zt));Yi(g,$,H,M),Ei(g,J,Y,M,$)}this.n=g,this.e=J,this.d=Y,this.V=M}get realEigenvalues(){return Array.from(this.d)}get imaginaryEigenvalues(){return Array.from(this.e)}get eigenvectorMatrix(){return this.V}get diagonalMatrix(){let b=this.n,E=this.e,h=this.d,g=new Jt(b,b),M,Y;for(M=0;M<b;M++){for(Y=0;Y<b;Y++)g.set(M,Y,0);g.set(M,M,h[M]),E[M]>0?g.set(M,M+1,E[M]):E[M]<0&&g.set(M,M-1,E[M])}return g}}function Jr(ft,b,E,h){let g,M,Y,J,ot,vt,zt,q;for(ot=0;ot<ft;ot++)E[ot]=h.get(ft-1,ot);for(J=ft-1;J>0;J--){for(q=0,Y=0,vt=0;vt<J;vt++)q=q+Math.abs(E[vt]);if(q===0)for(b[J]=E[J-1],ot=0;ot<J;ot++)E[ot]=h.get(J-1,ot),h.set(J,ot,0),h.set(ot,J,0);else{for(vt=0;vt<J;vt++)E[vt]/=q,Y+=E[vt]*E[vt];for(g=E[J-1],M=Math.sqrt(Y),g>0&&(M=-M),b[J]=q*M,Y=Y-g*M,E[J-1]=g-M,ot=0;ot<J;ot++)b[ot]=0;for(ot=0;ot<J;ot++){for(g=E[ot],h.set(ot,J,g),M=b[ot]+h.get(ot,ot)*g,vt=ot+1;vt<=J-1;vt++)M+=h.get(vt,ot)*E[vt],b[vt]+=h.get(vt,ot)*g;b[ot]=M}for(g=0,ot=0;ot<J;ot++)b[ot]/=Y,g+=b[ot]*E[ot];for(zt=g/(Y+Y),ot=0;ot<J;ot++)b[ot]-=zt*E[ot];for(ot=0;ot<J;ot++){for(g=E[ot],M=b[ot],vt=ot;vt<=J-1;vt++)h.set(vt,ot,h.get(vt,ot)-(g*b[vt]+M*E[vt]));E[ot]=h.get(J-1,ot),h.set(J,ot,0)}}E[J]=Y}for(J=0;J<ft-1;J++){if(h.set(ft-1,J,h.get(J,J)),h.set(J,J,1),Y=E[J+1],Y!==0){for(vt=0;vt<=J;vt++)E[vt]=h.get(vt,J+1)/Y;for(ot=0;ot<=J;ot++){for(M=0,vt=0;vt<=J;vt++)M+=h.get(vt,J+1)*h.get(vt,ot);for(vt=0;vt<=J;vt++)h.set(vt,ot,h.get(vt,ot)-M*E[vt])}}for(vt=0;vt<=J;vt++)h.set(vt,J+1,0)}for(ot=0;ot<ft;ot++)E[ot]=h.get(ft-1,ot),h.set(ft-1,ot,0);h.set(ft-1,ft-1,1),b[0]=0}function _i(ft,b,E,h){let g,M,Y,J,ot,vt,zt,q,$,H,nt,Mt,Wt,Tt,Kt,bt;for(Y=1;Y<ft;Y++)b[Y-1]=b[Y];b[ft-1]=0;let pt=0,ut=0,Gt=Number.EPSILON;for(vt=0;vt<ft;vt++){for(ut=Math.max(ut,Math.abs(E[vt])+Math.abs(b[vt])),zt=vt;zt<ft&&!(Math.abs(b[zt])<=Gt*ut);)zt++;if(zt>vt)do{for(g=E[vt],q=(E[vt+1]-g)/(2*b[vt]),$=On(q,1),q<0&&($=-$),E[vt]=b[vt]/(q+$),E[vt+1]=b[vt]*(q+$),H=E[vt+1],M=g-E[vt],Y=vt+2;Y<ft;Y++)E[Y]-=M;for(pt=pt+M,q=E[zt],nt=1,Mt=nt,Wt=nt,Tt=b[vt+1],Kt=0,bt=0,Y=zt-1;Y>=vt;Y--)for(Wt=Mt,Mt=nt,bt=Kt,g=nt*b[Y],M=nt*q,$=On(q,b[Y]),b[Y+1]=Kt*$,Kt=b[Y]/$,nt=q/$,q=nt*E[Y]-Kt*g,E[Y+1]=M+Kt*(nt*g+Kt*E[Y]),ot=0;ot<ft;ot++)M=h.get(ot,Y+1),h.set(ot,Y+1,Kt*h.get(ot,Y)+nt*M),h.set(ot,Y,nt*h.get(ot,Y)-Kt*M);q=-Kt*bt*Wt*Tt*b[vt]/H,b[vt]=Kt*q,E[vt]=nt*q}while(Math.abs(b[vt])>Gt*ut);E[vt]=E[vt]+pt,b[vt]=0}for(Y=0;Y<ft-1;Y++){for(ot=Y,q=E[Y],J=Y+1;J<ft;J++)E[J]<q&&(ot=J,q=E[J]);if(ot!==Y)for(E[ot]=E[Y],E[Y]=q,J=0;J<ft;J++)q=h.get(J,Y),h.set(J,Y,h.get(J,ot)),h.set(J,ot,q)}}function Yi(ft,b,E,h){let g=0,M=ft-1,Y,J,ot,vt,zt,q,$;for(q=g+1;q<=M-1;q++){for($=0,vt=q;vt<=M;vt++)$=$+Math.abs(b.get(vt,q-1));if($!==0){for(ot=0,vt=M;vt>=q;vt--)E[vt]=b.get(vt,q-1)/$,ot+=E[vt]*E[vt];for(J=Math.sqrt(ot),E[q]>0&&(J=-J),ot=ot-E[q]*J,E[q]=E[q]-J,zt=q;zt<ft;zt++){for(Y=0,vt=M;vt>=q;vt--)Y+=E[vt]*b.get(vt,zt);for(Y=Y/ot,vt=q;vt<=M;vt++)b.set(vt,zt,b.get(vt,zt)-Y*E[vt])}for(vt=0;vt<=M;vt++){for(Y=0,zt=M;zt>=q;zt--)Y+=E[zt]*b.get(vt,zt);for(Y=Y/ot,zt=q;zt<=M;zt++)b.set(vt,zt,b.get(vt,zt)-Y*E[zt])}E[q]=$*E[q],b.set(q,q-1,$*J)}}for(vt=0;vt<ft;vt++)for(zt=0;zt<ft;zt++)h.set(vt,zt,vt===zt?1:0);for(q=M-1;q>=g+1;q--)if(b.get(q,q-1)!==0){for(vt=q+1;vt<=M;vt++)E[vt]=b.get(vt,q-1);for(zt=q;zt<=M;zt++){for(J=0,vt=q;vt<=M;vt++)J+=E[vt]*h.get(vt,zt);for(J=J/E[q]/b.get(q,q-1),vt=q;vt<=M;vt++)h.set(vt,zt,h.get(vt,zt)+J*E[vt])}}}function Ei(ft,b,E,h,g){let M=ft-1,Y=0,J=ft-1,ot=Number.EPSILON,vt=0,zt=0,q=0,$=0,H=0,nt=0,Mt=0,Wt=0,Tt,Kt,bt,pt,ut,Gt,Vt,ve,ge,Yt,Ce,qe,Qe,Nn,Dn;for(Tt=0;Tt<ft;Tt++)for((Tt<Y||Tt>J)&&(E[Tt]=g.get(Tt,Tt),b[Tt]=0),Kt=Math.max(Tt-1,0);Kt<ft;Kt++)zt=zt+Math.abs(g.get(Tt,Kt));for(;M>=Y;){for(pt=M;pt>Y&&(nt=Math.abs(g.get(pt-1,pt-1))+Math.abs(g.get(pt,pt)),nt===0&&(nt=zt),!(Math.abs(g.get(pt,pt-1))<ot*nt));)pt--;if(pt===M)g.set(M,M,g.get(M,M)+vt),E[M]=g.get(M,M),b[M]=0,M--,Wt=0;else if(pt===M-1){if(Vt=g.get(M,M-1)*g.get(M-1,M),q=(g.get(M-1,M-1)-g.get(M,M))/2,$=q*q+Vt,Mt=Math.sqrt(Math.abs($)),g.set(M,M,g.get(M,M)+vt),g.set(M-1,M-1,g.get(M-1,M-1)+vt),ve=g.get(M,M),$>=0){for(Mt=q>=0?q+Mt:q-Mt,E[M-1]=ve+Mt,E[M]=E[M-1],Mt!==0&&(E[M]=ve-Vt/Mt),b[M-1]=0,b[M]=0,ve=g.get(M,M-1),nt=Math.abs(ve)+Math.abs(Mt),q=ve/nt,$=Mt/nt,H=Math.sqrt(q*q+$*$),q=q/H,$=$/H,Kt=M-1;Kt<ft;Kt++)Mt=g.get(M-1,Kt),g.set(M-1,Kt,$*Mt+q*g.get(M,Kt)),g.set(M,Kt,$*g.get(M,Kt)-q*Mt);for(Tt=0;Tt<=M;Tt++)Mt=g.get(Tt,M-1),g.set(Tt,M-1,$*Mt+q*g.get(Tt,M)),g.set(Tt,M,$*g.get(Tt,M)-q*Mt);for(Tt=Y;Tt<=J;Tt++)Mt=h.get(Tt,M-1),h.set(Tt,M-1,$*Mt+q*h.get(Tt,M)),h.set(Tt,M,$*h.get(Tt,M)-q*Mt)}else E[M-1]=ve+q,E[M]=ve+q,b[M-1]=Mt,b[M]=-Mt;M=M-2,Wt=0}else{if(ve=g.get(M,M),ge=0,Vt=0,pt<M&&(ge=g.get(M-1,M-1),Vt=g.get(M,M-1)*g.get(M-1,M)),Wt===10){for(vt+=ve,Tt=Y;Tt<=M;Tt++)g.set(Tt,Tt,g.get(Tt,Tt)-ve);nt=Math.abs(g.get(M,M-1))+Math.abs(g.get(M-1,M-2)),ve=ge=.75*nt,Vt=-.4375*nt*nt}if(Wt===30&&(nt=(ge-ve)/2,nt=nt*nt+Vt,nt>0)){for(nt=Math.sqrt(nt),ge<ve&&(nt=-nt),nt=ve-Vt/((ge-ve)/2+nt),Tt=Y;Tt<=M;Tt++)g.set(Tt,Tt,g.get(Tt,Tt)-nt);vt+=nt,ve=ge=Vt=.964}for(Wt=Wt+1,ut=M-2;ut>=pt&&(Mt=g.get(ut,ut),H=ve-Mt,nt=ge-Mt,q=(H*nt-Vt)/g.get(ut+1,ut)+g.get(ut,ut+1),$=g.get(ut+1,ut+1)-Mt-H-nt,H=g.get(ut+2,ut+1),nt=Math.abs(q)+Math.abs($)+Math.abs(H),q=q/nt,$=$/nt,H=H/nt,!(ut===pt||Math.abs(g.get(ut,ut-1))*(Math.abs($)+Math.abs(H))<ot*(Math.abs(q)*(Math.abs(g.get(ut-1,ut-1))+Math.abs(Mt)+Math.abs(g.get(ut+1,ut+1))))));)ut--;for(Tt=ut+2;Tt<=M;Tt++)g.set(Tt,Tt-2,0),Tt>ut+2&&g.set(Tt,Tt-3,0);for(bt=ut;bt<=M-1&&(Nn=bt!==M-1,bt!==ut&&(q=g.get(bt,bt-1),$=g.get(bt+1,bt-1),H=Nn?g.get(bt+2,bt-1):0,ve=Math.abs(q)+Math.abs($)+Math.abs(H),ve!==0&&(q=q/ve,$=$/ve,H=H/ve)),ve!==0);bt++)if(nt=Math.sqrt(q*q+$*$+H*H),q<0&&(nt=-nt),nt!==0){for(bt!==ut?g.set(bt,bt-1,-nt*ve):pt!==ut&&g.set(bt,bt-1,-g.get(bt,bt-1)),q=q+nt,ve=q/nt,ge=$/nt,Mt=H/nt,$=$/q,H=H/q,Kt=bt;Kt<ft;Kt++)q=g.get(bt,Kt)+$*g.get(bt+1,Kt),Nn&&(q=q+H*g.get(bt+2,Kt),g.set(bt+2,Kt,g.get(bt+2,Kt)-q*Mt)),g.set(bt,Kt,g.get(bt,Kt)-q*ve),g.set(bt+1,Kt,g.get(bt+1,Kt)-q*ge);for(Tt=0;Tt<=Math.min(M,bt+3);Tt++)q=ve*g.get(Tt,bt)+ge*g.get(Tt,bt+1),Nn&&(q=q+Mt*g.get(Tt,bt+2),g.set(Tt,bt+2,g.get(Tt,bt+2)-q*H)),g.set(Tt,bt,g.get(Tt,bt)-q),g.set(Tt,bt+1,g.get(Tt,bt+1)-q*$);for(Tt=Y;Tt<=J;Tt++)q=ve*h.get(Tt,bt)+ge*h.get(Tt,bt+1),Nn&&(q=q+Mt*h.get(Tt,bt+2),h.set(Tt,bt+2,h.get(Tt,bt+2)-q*H)),h.set(Tt,bt,h.get(Tt,bt)-q),h.set(Tt,bt+1,h.get(Tt,bt+1)-q*$)}}}if(zt!==0){for(M=ft-1;M>=0;M--)if(q=E[M],$=b[M],$===0)for(pt=M,g.set(M,M,1),Tt=M-1;Tt>=0;Tt--){for(Vt=g.get(Tt,Tt)-q,H=0,Kt=pt;Kt<=M;Kt++)H=H+g.get(Tt,Kt)*g.get(Kt,M);if(b[Tt]<0)Mt=Vt,nt=H;else if(pt=Tt,b[Tt]===0?g.set(Tt,M,Vt!==0?-H/Vt:-H/(ot*zt)):(ve=g.get(Tt,Tt+1),ge=g.get(Tt+1,Tt),$=(E[Tt]-q)*(E[Tt]-q)+b[Tt]*b[Tt],Gt=(ve*nt-Mt*H)/$,g.set(Tt,M,Gt),g.set(Tt+1,M,Math.abs(ve)>Math.abs(Mt)?(-H-Vt*Gt)/ve:(-nt-ge*Gt)/Mt)),Gt=Math.abs(g.get(Tt,M)),ot*Gt*Gt>1)for(Kt=Tt;Kt<=M;Kt++)g.set(Kt,M,g.get(Kt,M)/Gt)}else if($<0)for(pt=M-1,Math.abs(g.get(M,M-1))>Math.abs(g.get(M-1,M))?(g.set(M-1,M-1,$/g.get(M,M-1)),g.set(M-1,M,-(g.get(M,M)-q)/g.get(M,M-1))):(Dn=ti(0,-g.get(M-1,M),g.get(M-1,M-1)-q,$),g.set(M-1,M-1,Dn[0]),g.set(M-1,M,Dn[1])),g.set(M,M-1,0),g.set(M,M,1),Tt=M-2;Tt>=0;Tt--){for(Yt=0,Ce=0,Kt=pt;Kt<=M;Kt++)Yt=Yt+g.get(Tt,Kt)*g.get(Kt,M-1),Ce=Ce+g.get(Tt,Kt)*g.get(Kt,M);if(Vt=g.get(Tt,Tt)-q,b[Tt]<0)Mt=Vt,H=Yt,nt=Ce;else if(pt=Tt,b[Tt]===0?(Dn=ti(-Yt,-Ce,Vt,$),g.set(Tt,M-1,Dn[0]),g.set(Tt,M,Dn[1])):(ve=g.get(Tt,Tt+1),ge=g.get(Tt+1,Tt),qe=(E[Tt]-q)*(E[Tt]-q)+b[Tt]*b[Tt]-$*$,Qe=(E[Tt]-q)*2*$,qe===0&&Qe===0&&(qe=ot*zt*(Math.abs(Vt)+Math.abs($)+Math.abs(ve)+Math.abs(ge)+Math.abs(Mt))),Dn=ti(ve*H-Mt*Yt+$*Ce,ve*nt-Mt*Ce-$*Yt,qe,Qe),g.set(Tt,M-1,Dn[0]),g.set(Tt,M,Dn[1]),Math.abs(ve)>Math.abs(Mt)+Math.abs($)?(g.set(Tt+1,M-1,(-Yt-Vt*g.get(Tt,M-1)+$*g.get(Tt,M))/ve),g.set(Tt+1,M,(-Ce-Vt*g.get(Tt,M)-$*g.get(Tt,M-1))/ve)):(Dn=ti(-H-ge*g.get(Tt,M-1),-nt-ge*g.get(Tt,M),Mt,$),g.set(Tt+1,M-1,Dn[0]),g.set(Tt+1,M,Dn[1]))),Gt=Math.max(Math.abs(g.get(Tt,M-1)),Math.abs(g.get(Tt,M))),ot*Gt*Gt>1)for(Kt=Tt;Kt<=M;Kt++)g.set(Kt,M-1,g.get(Kt,M-1)/Gt),g.set(Kt,M,g.get(Kt,M)/Gt)}for(Tt=0;Tt<ft;Tt++)if(Tt<Y||Tt>J)for(Kt=Tt;Kt<ft;Kt++)h.set(Tt,Kt,g.get(Tt,Kt));for(Kt=ft-1;Kt>=Y;Kt--)for(Tt=Y;Tt<=J;Tt++){for(Mt=0,bt=Y;bt<=Math.min(Kt,J);bt++)Mt=Mt+h.get(Tt,bt)*g.get(bt,Kt);h.set(Tt,Kt,Mt)}}}function ti(ft,b,E,h){let g,M;return Math.abs(E)>Math.abs(h)?(g=h/E,M=E+g*h,[(ft+g*b)/M,(b-g*ft)/M]):(g=E/h,M=h+g*E,[(g*ft+b)/M,(g*b-ft)/M])}class xa{constructor(b){if(b=He.checkMatrix(b),!b.isSymmetric())throw new Error("Matrix is not symmetric");let E=b,h=E.rows,g=new Jt(h,h),M=!0,Y,J,ot;for(J=0;J<h;J++){let vt=0;for(ot=0;ot<J;ot++){let zt=0;for(Y=0;Y<ot;Y++)zt+=g.get(ot,Y)*g.get(J,Y);zt=(E.get(J,ot)-zt)/g.get(ot,ot),g.set(J,ot,zt),vt=vt+zt*zt}for(vt=E.get(J,J)-vt,M&&(M=vt>0),g.set(J,J,Math.sqrt(Math.max(vt,0))),ot=J+1;ot<h;ot++)g.set(J,ot,0)}this.L=g,this.positiveDefinite=M}isPositiveDefinite(){return this.positiveDefinite}solve(b){b=He.checkMatrix(b);let E=this.L,h=E.rows;if(b.rows!==h)throw new Error("Matrix dimensions do not match");if(this.isPositiveDefinite()===!1)throw new Error("Matrix is not positive definite");let g=b.columns,M=b.clone(),Y,J,ot;for(ot=0;ot<h;ot++)for(J=0;J<g;J++){for(Y=0;Y<ot;Y++)M.set(ot,J,M.get(ot,J)-M.get(Y,J)*E.get(ot,Y));M.set(ot,J,M.get(ot,J)/E.get(ot,ot))}for(ot=h-1;ot>=0;ot--)for(J=0;J<g;J++){for(Y=ot+1;Y<h;Y++)M.set(ot,J,M.get(ot,J)-M.get(Y,J)*E.get(Y,ot));M.set(ot,J,M.get(ot,J)/E.get(ot,ot))}return M}get lowerTriangularMatrix(){return this.L}}class Di{constructor(b,E={}){b=He.checkMatrix(b);let{Y:h}=E;const{scaleScores:g=!1,maxIterations:M=1e3,terminationCriteria:Y=1e-10}=E;let J;if(h){if(kt.isAnyArray(h)&&typeof h[0]=="number"?h=Jt.columnVector(h):h=He.checkMatrix(h),h.rows!==b.rows)throw new Error("Y should have the same number of rows as X");J=h.getColumnVector(0)}else J=b.getColumnVector(0);let ot=1,vt,zt,q,$;for(let H=0;H<M&&ot>Y;H++)q=b.transpose().mmul(J).div(J.transpose().mmul(J).get(0,0)),q=q.div(q.norm()),vt=b.mmul(q).div(q.transpose().mmul(q).get(0,0)),H>0&&(ot=vt.clone().sub($).pow(2).sum()),$=vt.clone(),h?(zt=h.transpose().mmul(vt).div(vt.transpose().mmul(vt).get(0,0)),zt=zt.div(zt.norm()),J=h.mmul(zt).div(zt.transpose().mmul(zt).get(0,0))):J=vt;if(h){let H=b.transpose().mmul(vt).div(vt.transpose().mmul(vt).get(0,0));H=H.div(H.norm());let nt=b.clone().sub(vt.clone().mmul(H.transpose())),Mt=J.transpose().mmul(vt).div(vt.transpose().mmul(vt).get(0,0)),Wt=h.clone().sub(vt.clone().mulS(Mt.get(0,0)).mmul(zt.transpose()));this.t=vt,this.p=H.transpose(),this.w=q.transpose(),this.q=zt,this.u=J,this.s=vt.transpose().mmul(vt),this.xResidual=nt,this.yResidual=Wt,this.betas=Mt}else this.w=q.transpose(),this.s=vt.transpose().mmul(vt).sqrt(),g?this.t=vt.clone().div(this.s.get(0,0)):this.t=vt,this.xResidual=b.sub(vt.mmul(q.transpose()))}}Et.XA=Me,Et.a_=xa,Et.yQ=xa,Et.Hs=en,Et.Ec=si,Et.dx=si,Et.LU=ln,Et.Rm=ln,Et.y3=Jt,Et.qK=Nt,Et.pb=tt,Et.j=Xt,Et.sO=Lt,Et.BZ=Ut,Et.EK=Zt,Et.Db=qt,Et.Fx=se,Et.tU=te,Et.Ym=Di,Et.rs=Di,Et.QR=yn,Et.TB=yn,Et.oH=lr,Et.Sc=lr,Et.BN=Ne,Et.it=ke,Et.$r=He,Et.QM=mi,Et.AV=ri,c=Jt,Et.GH=ye,Et.SO=Zn,Et.uZ=Br,Et.yU=Ar,Et.F1=Yn,Et.re=Ve},80574:function(yt,Et,y){"use strict";y.d(Et,{Ae:function(){return Q},CF:function(){return Jt},vC:function(){return Me},x1:function(){return R}});function c(St,tt,Nt,Xt,Lt,Zt){const Ut=St,qt=tt,se=Nt-Ut,te=Xt-qt;let ke=Lt-Ut,He=Zt-qt,Ve=ke*se+He*te,ln=0;Ve<=0?ln=0:(ke=se-ke,He=te-He,Ve=ke*se+He*te,Ve<=0?ln=0:ln=Ve*Ve/(se*se+te*te));const On=ke*ke+He*He-ln;return On<0?0:On}function _(St,tt,Nt,Xt){return(St-Nt)*(St-Nt)+(tt-Xt)*(tt-Xt)}function I(St,tt,Nt,Xt,Lt){return _(St,tt,Nt,Xt)<Lt*Lt}function z(St){if(!Number.isFinite(St))return Nt=>Nt;if(St===0)return Math.round;const tt=Math.pow(10,St);return Nt=>Math.round(Nt*tt)/tt}function S(St){const tt=Math.min(St.x1,St.x2),Nt=Math.max(St.x1,St.x2),Xt=Math.min(St.y1,St.y2),Lt=Math.max(St.y1,St.y2);return{x:tt,y:Xt,x2:Nt,y2:Lt,width:Nt-tt,height:Lt-Xt}}class R{constructor(tt,Nt,Xt,Lt){this.x1=tt,this.y1=Nt,this.x2=Xt,this.y2=Lt}equals(tt){return this.x1===tt.x1&&this.y1===tt.y1&&this.x2===tt.x2&&this.y2===tt.y2}draw(tt){tt.moveTo(this.x1,this.y1),tt.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(tt){return new R(tt.x1,tt.y1,tt.x2,tt.y2)}cuts(tt,Nt){if(this.y1===this.y2||Nt<this.y1&&Nt<=this.y2||Nt>this.y1&&Nt>=this.y2||tt>this.x1&&tt>=this.x2)return!1;if(tt<this.x1&&tt<=this.x2)return!0;const Xt=this.x1+(Nt-this.y1)*(this.x2-this.x1)/(this.y2-this.y1);return tt<=Xt}distSquare(tt,Nt){return c(this.x1,this.y1,this.x2,this.y2,tt,Nt)}ptClose(tt,Nt,Xt){if(this.x1<this.x2){if(tt<this.x1-Xt||tt>this.x2+Xt)return!1}else if(tt<this.x2-Xt||tt>this.x1+Xt)return!1;if(this.y1<this.y2){if(Nt<this.y1-Xt||Nt>this.y2+Xt)return!1}else if(Nt<this.y2-Xt||Nt>this.y1+Xt)return!1;return!0}}var w;(function(St){St[St.POINT=1]="POINT",St[St.PARALLEL=2]="PARALLEL",St[St.COINCIDENT=3]="COINCIDENT",St[St.NONE=4]="NONE"})(w||(w={}));class N{constructor(tt,Nt=0,Xt=0){this.state=tt,this.x=Nt,this.y=Xt}}function D(St,tt){const Nt=(tt.x2-tt.x1)*(St.y1-tt.y1)-(tt.y2-tt.y1)*(St.x1-tt.x1),Xt=(St.x2-St.x1)*(St.y1-tt.y1)-(St.y2-St.y1)*(St.x1-tt.x1),Lt=(tt.y2-tt.y1)*(St.x2-St.x1)-(tt.x2-tt.x1)*(St.y2-St.y1);if(Lt){const Zt=Nt/Lt,Ut=Xt/Lt;return 0<=Zt&&Zt<=1&&0<=Ut&&Ut<=1?new N(w.POINT,St.x1+Zt*(St.x2-St.x1),St.y1+Zt*(St.y2-St.y1)):new N(w.NONE)}return new N(Nt===0||Xt===0?w.COINCIDENT:w.PARALLEL)}function A(St,tt){const Nt=(tt.x2-tt.x1)*(St.y1-tt.y1)-(tt.y2-tt.y1)*(St.x1-tt.x1),Xt=(St.x2-St.x1)*(St.y1-tt.y1)-(St.y2-St.y1)*(St.x1-tt.x1),Lt=(tt.y2-tt.y1)*(St.x2-St.x1)-(tt.x2-tt.x1)*(St.y2-St.y1);if(Lt){const Zt=Nt/Lt,Ut=Xt/Lt;if(0<=Zt&&Zt<=1&&0<=Ut&&Ut<=1)return Zt}return Number.POSITIVE_INFINITY}function L(St,tt){function Nt(Lt,Zt,Ut,qt){let se=A(tt,new R(Lt,Zt,Ut,qt));return se=Math.abs(se-.5),se>=0&&se<=1?1:0}let Xt=Nt(St.x,St.y,St.x2,St.y);return Xt+=Nt(St.x,St.y,St.x,St.y2),Xt>1||(Xt+=Nt(St.x,St.y2,St.x2,St.y2),Xt>1)?!0:(Xt+=Nt(St.x2,St.y,St.x2,St.y2),Xt>0)}var F;(function(St){St[St.LEFT=0]="LEFT",St[St.TOP=1]="TOP",St[St.RIGHT=2]="RIGHT",St[St.BOTTOM=3]="BOTTOM"})(F||(F={}));function it(St,tt,Nt){const Xt=new Set;return St.width<=0?(Xt.add(F.LEFT),Xt.add(F.RIGHT)):tt<St.x?Xt.add(F.LEFT):tt>St.x+St.width&&Xt.add(F.RIGHT),St.height<=0?(Xt.add(F.TOP),Xt.add(F.BOTTOM)):Nt<St.y?Xt.add(F.TOP):Nt>St.y+St.height&&Xt.add(F.BOTTOM),Xt}function G(St,tt){let Nt=tt.x1,Xt=tt.y1;const Lt=tt.x2,Zt=tt.y2,Ut=Array.from(it(St,Lt,Zt));if(Ut.length===0)return!0;let qt=it(St,Nt,Xt);for(;qt.size!==0;){for(const se of Ut)if(qt.has(se))return!1;if(qt.has(F.RIGHT)||qt.has(F.LEFT)){let se=St.x;qt.has(F.RIGHT)&&(se+=St.width),Xt=Xt+(se-Nt)*(Zt-Xt)/(Lt-Nt),Nt=se}else{let se=St.y;qt.has(F.BOTTOM)&&(se+=St.height),Nt=Nt+(se-Xt)*(Lt-Nt)/(Zt-Xt),Xt=se}qt=it(St,Nt,Xt)}return!0}function kt(St,tt){let Nt=Number.POSITIVE_INFINITY,Xt=0;function Lt(Zt,Ut,qt,se){let te=A(tt,new R(Zt,Ut,qt,se));te=Math.abs(te-.5),te>=0&&te<=1&&(Xt++,te<Nt&&(Nt=te))}return Lt(St.x,St.y,St.x2,St.y),Lt(St.x,St.y,St.x,St.y2),Xt>1||(Lt(St.x,St.y2,St.x2,St.y2),Xt>1)?Nt:(Lt(St.x2,St.y,St.x2,St.y2),Xt===0?-1:Nt)}function gt(St,tt){let Nt=0;const Xt=D(St,new R(tt.x,tt.y,tt.x2,tt.y));Nt+=Xt.state===w.POINT?1:0;const Lt=D(St,new R(tt.x,tt.y,tt.x,tt.y2));Nt+=Lt.state===w.POINT?1:0;const Zt=D(St,new R(tt.x,tt.y2,tt.x2,tt.y2));Nt+=Zt.state===w.POINT?1:0;const Ut=D(St,new R(tt.x2,tt.y,tt.x2,tt.y2));return Nt+=Ut.state===w.POINT?1:0,{top:Xt,left:Lt,bottom:Zt,right:Ut,count:Nt}}class Q{constructor(tt,Nt,Xt,Lt){this.x=tt,this.y=Nt,this.width=Xt,this.height=Lt}get x2(){return this.x+this.width}get y2(){return this.y+this.height}get cx(){return this.x+this.width/2}get cy(){return this.y+this.height/2}get radius(){return Math.max(this.width,this.height)/2}static from(tt){return new Q(tt.x,tt.y,tt.width,tt.height)}equals(tt){return this.x===tt.x&&this.y===tt.y&&this.width===tt.width&&this.height===tt.height}clone(){return new Q(this.x,this.y,this.width,this.height)}add(tt){const Nt=Math.min(this.x,tt.x),Xt=Math.min(this.y,tt.y),Lt=Math.max(this.x2,tt.x+tt.width),Zt=Math.max(this.y2,tt.y+tt.height);this.x=Nt,this.y=Xt,this.width=Lt-Nt,this.height=Zt-Xt}addPoint(tt){const Nt=Math.min(this.x,tt.x),Xt=Math.min(this.y,tt.y),Lt=Math.max(this.x2,tt.x),Zt=Math.max(this.y2,tt.y);this.x=Nt,this.y=Xt,this.width=Lt-Nt,this.height=Zt-Xt}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(tt){tt.rect(this.x,this.y,this.width,this.height)}containsPt(tt,Nt){return tt>=this.x&&tt<=this.x2&&Nt>=this.y&&Nt<=this.y2}get area(){return this.width*this.height}intersects(tt){return this.area<=0||tt.width<=0||tt.height<=0?!1:tt.x+tt.width>this.x&&tt.y+tt.height>this.y&&tt.x<this.x2&&tt.y<this.y2}distSquare(tt,Nt){if(this.containsPt(tt,Nt))return 0;const Xt=it(this,tt,Nt);return Xt.has(F.TOP)?Xt.has(F.LEFT)?_(tt,Nt,this.x,this.y):Xt.has(F.RIGHT)?_(tt,Nt,this.x2,this.y):(this.y-Nt)*(this.y-Nt):Xt.has(F.BOTTOM)?Xt.has(F.LEFT)?_(tt,Nt,this.x,this.y2):Xt.has(F.RIGHT)?_(tt,Nt,this.x2,this.y2):(Nt-this.y2)*(Nt-this.y2):Xt.has(F.LEFT)?(this.x-tt)*(this.x-tt):Xt.has(F.RIGHT)?(tt-this.x2)*(tt-this.x2):0}}function Rt(St){if(St.length===0)return null;const tt=St[0],Nt=new Q(tt.x,tt.y,0,0);for(const Xt of St)Nt.addPoint(Xt);return Nt}class Ct{constructor(tt,Nt,Xt){this.cx=tt,this.cy=Nt,this.radius=Xt}get x(){return this.cx-this.radius}get x2(){return this.cx+this.radius}get width(){return this.radius*2}get y(){return this.cy-this.radius}get y2(){return this.cy+this.radius}get height(){return this.radius*2}static from(tt){return new Ct(tt.cx,tt.cy,tt.radius)}containsPt(tt,Nt){return _(this.cx,this.cy,tt,Nt)<this.radius*this.radius}distSquare(tt,Nt){const Xt=_(this.cx,this.cy,tt,Nt);if(Xt<this.radius*this.radius)return 0;const Lt=Math.sqrt(Xt)-this.radius;return Lt*Lt}draw(tt){tt.ellipse(this.cx,this.cy,this.radius,this.radius,0,0,Math.PI*2)}}class Ht{constructor(tt,Nt=0,Xt=0,Lt=0,Zt=0,Ut=10,qt=10,se=new Float32Array(Math.max(0,Ut*qt)).fill(0)){this.pixelGroup=tt,this.i=Nt,this.j=Xt,this.pixelX=Lt,this.pixelY=Zt,this.width=Ut,this.height=qt,this.area=se}createSub(tt,Nt){return new Ht(this.pixelGroup,tt.x,tt.y,Nt.x,Nt.y,tt.width,tt.height)}static fromPixelRegion(tt,Nt){return new Ht(Nt,0,0,tt.x,tt.y,Math.ceil(tt.width/Nt),Math.ceil(tt.height/Nt))}copy(tt,Nt){return new Ht(this.pixelGroup,this.scaleX(Nt.x),this.scaleY(Nt.y),Nt.x,Nt.y,tt.width,tt.height,tt.area)}boundX(tt){return tt<this.i?this.i:tt>=this.width?this.width-1:tt}boundY(tt){return tt<this.j?this.j:tt>=this.height?this.height-1:tt}scaleX(tt){return this.boundX(Math.floor((tt-this.pixelX)/this.pixelGroup))}scaleY(tt){return this.boundY(Math.floor((tt-this.pixelY)/this.pixelGroup))}scale(tt){const Nt=this.scaleX(tt.x),Xt=this.scaleY(tt.y),Lt=this.boundX(Math.ceil((tt.x+tt.width-this.pixelX)/this.pixelGroup)),Zt=this.boundY(Math.ceil((tt.y+tt.height-this.pixelY)/this.pixelGroup)),Ut=Lt-Nt,qt=Zt-Xt;return new Q(Nt,Xt,Ut,qt)}invertScaleX(tt){return Math.round(tt*this.pixelGroup+this.pixelX)}invertScaleY(tt){return Math.round(tt*this.pixelGroup+this.pixelY)}addPadding(tt,Nt){const Xt=Math.ceil(Nt/this.pixelGroup),Lt=this.boundX(tt.x-Xt),Zt=this.boundY(tt.y-Xt),Ut=this.boundX(tt.x2+Xt),qt=this.boundY(tt.y2+Xt),se=Ut-Lt,te=qt-Zt;return new Q(Lt,Zt,se,te)}get(tt,Nt){return tt<0||Nt<0||tt>=this.width||Nt>=this.height?Number.NaN:this.area[tt+Nt*this.width]}inc(tt,Nt,Xt){tt<0||Nt<0||tt>=this.width||Nt>=this.height||(this.area[tt+Nt*this.width]+=Xt)}set(tt,Nt,Xt){tt<0||Nt<0||tt>=this.width||Nt>=this.height||(this.area[tt+Nt*this.width]=Xt)}incArea(tt,Nt){if(tt.width<=0||tt.height<=0||Nt===0)return;const Xt=this.width,Lt=tt.width,Zt=Math.max(0,tt.i),Ut=Math.max(0,tt.j),qt=Math.min(tt.i+tt.width,Xt),se=Math.min(tt.j+tt.height,this.height);if(!(se<=0||qt<=0||Zt>=Xt||se>=this.height))for(let te=Ut;te<se;te++){const ke=(te-tt.j)*Lt,He=te*Xt;for(let Ve=Zt;Ve<qt;Ve++){const ln=tt.area[Ve-tt.i+ke];ln!==0&&(this.area[Ve+He]+=Nt*ln)}}}fill(tt){this.area.fill(tt)}fillArea(tt,Nt){const Xt=tt.x+tt.y*this.width;for(let Lt=0;Lt<tt.height;Lt++){const Zt=Xt+Lt*this.width;this.area.fill(Nt,Zt,Zt+tt.width)}}fillHorizontalLine(tt,Nt,Xt,Lt){const Zt=tt+Nt*this.width;this.area.fill(Lt,Zt,Zt+Xt)}fillVerticalLine(tt,Nt,Xt,Lt){const Zt=tt+Nt*this.width;for(let Ut=0;Ut<Xt;Ut++)this.area[Zt+Ut*this.width]=Lt}clear(){this.area.fill(0)}toString(){let tt="";for(let Nt=0;Nt<this.height;Nt++){const Xt=Nt*this.width;for(let Lt=0;Lt<this.width;Lt++){const Zt=this.area[Xt+Lt];tt+=Zt.toFixed(1).padStart(6),tt+=" "}tt+=`
|
|
|
`}return tt}draw(tt,Nt=!0){if(this.width<=0||this.height<=0)return;tt.save(),Nt&&tt.translate(this.pixelX,this.pixelY);const Xt=this.area.reduce((Ut,qt)=>Math.min(Ut,qt),Number.POSITIVE_INFINITY),Lt=this.area.reduce((Ut,qt)=>Math.max(Ut,qt),Number.NEGATIVE_INFINITY),Zt=Ut=>(Ut-Xt)/(Lt-Xt);tt.scale(this.pixelGroup,this.pixelGroup);for(let Ut=0;Ut<this.width;Ut++)for(let qt=0;qt<this.height;qt++){const se=this.area[Ut+qt*this.width];tt.fillStyle=`rgba(0, 0, 0, ${Zt(se)})`,tt.fillRect(Ut,qt,1,1)}tt.restore()}drawThreshold(tt,Nt,Xt=!0){if(!(this.width<=0||this.height<=0)){tt.save(),Xt&&tt.translate(this.pixelX,this.pixelY),tt.scale(this.pixelGroup,this.pixelGroup);for(let Lt=0;Lt<this.width;Lt++)for(let Zt=0;Zt<this.height;Zt++){const Ut=this.area[Lt+Zt*this.width];tt.fillStyle=Ut>Nt?"black":"white",tt.fillRect(Lt,Zt,1,1)}tt.restore()}}}function de(St,tt){const Nt=Xt=>({x:Xt.x-tt,y:Xt.y-tt,width:Xt.width+2*tt,height:Xt.height+2*tt});return Array.isArray(St)?St.map(Nt):Nt(St)}function ue(St,tt,Nt){return Te(Object.assign(S(St),{distSquare:(Xt,Lt)=>c(St.x1,St.y1,St.x2,St.y2,Xt,Lt)}),tt,Nt)}function Te(St,tt,Nt){const Xt=de(St,Nt),Lt=tt.scale(Xt),Zt=tt.createSub(Lt,Xt);return be(Zt,tt,Nt,(Ut,qt)=>St.distSquare(Ut,qt)),Zt}function be(St,tt,Nt,Xt){const Lt=Nt*Nt;for(let Zt=0;Zt<St.height;Zt++)for(let Ut=0;Ut<St.width;Ut++){const qt=tt.invertScaleX(St.i+Ut),se=tt.invertScaleY(St.j+Zt),te=Xt(qt,se);if(te===0){St.set(Ut,Zt,Lt);continue}if(te<Lt){const ke=Nt-Math.sqrt(te);St.set(Ut,Zt,ke*ke)}}return St}function we(St,tt,Nt){const Xt=tt.scale(St),Lt=tt.addPadding(Xt,Nt),Zt=tt.createSub(Lt,{x:St.x-Nt,y:St.y-Nt}),Ut=Xt.x-Lt.x,qt=Xt.y-Lt.y,se=Lt.x2-Xt.x2,te=Lt.y2-Xt.y2,ke=Lt.width-Ut-se,He=Lt.height-qt-te,Ve=Nt*Nt;Zt.fillArea({x:Ut,y:qt,width:ke+1,height:He+1},Ve);const ln=[0],On=Math.max(qt,Ut,se,te);{const Yn=tt.invertScaleX(Xt.x+Xt.width/2);for(let ye=1;ye<On;ye++){const xr=tt.invertScaleY(Xt.y-ye),Hn=St.distSquare(Yn,xr);if(Hn<Ve){const Br=Nt-Math.sqrt(Hn);ln.push(Br*Br)}else break}}const yn=[],lr=Math.max(Ut,se),Zn=Math.max(qt,se);for(let Yn=1;Yn<lr;Yn++){const ye=tt.invertScaleX(Xt.x-Yn),xr=[];for(let Hn=1;Hn<Zn;Hn++){const Br=tt.invertScaleY(Xt.y-Hn),Ar=St.distSquare(ye,Br);if(Ar<Ve){const ri=Nt-Math.sqrt(Ar);xr.push(ri*ri)}else xr.push(0)}yn.push(xr)}for(let Yn=1;Yn<Math.min(qt,ln.length);Yn++){const ye=ln[Yn];Zt.fillHorizontalLine(Ut,qt-Yn,ke+1,ye)}for(let Yn=1;Yn<Math.min(te,ln.length);Yn++){const ye=ln[Yn];Zt.fillHorizontalLine(Ut,qt+He+Yn,ke+1,ye)}for(let Yn=1;Yn<Math.min(Ut,ln.length);Yn++){const ye=ln[Yn];Zt.fillVerticalLine(Ut-Yn,qt,He+1,ye)}for(let Yn=1;Yn<Math.min(te,ln.length);Yn++){const ye=ln[Yn];Zt.fillVerticalLine(Ut+ke+Yn,qt,He+1,ye)}for(let Yn=1;Yn<Ut;Yn++){const ye=yn[Yn-1],xr=Ut-Yn;for(let Hn=1;Hn<qt;Hn++)Zt.set(xr,qt-Hn,ye[Hn-1]);for(let Hn=1;Hn<te;Hn++)Zt.set(xr,qt+He+Hn,ye[Hn-1])}for(let Yn=1;Yn<se;Yn++){const ye=yn[Yn-1],xr=Ut+ke+Yn;for(let Hn=1;Hn<qt;Hn++)Zt.set(xr,qt-Hn,ye[Hn-1]);for(let Hn=1;Hn<te;Hn++)Zt.set(xr,qt+He+Hn,ye[Hn-1])}return Zt}function re(St,tt,Nt,Xt){return{x:St,y:tt,width:Nt,height:Xt}}function Ge(St,tt,Nt){return{cx:St,cy:tt,radius:Nt}}function rn(St,tt,Nt,Xt){return{x1:St,y1:tt,x2:Nt,y2:Xt}}function Xe(St,tt){return{x:St,y:tt}}function En(St,tt,Nt,Xt){if(St.length===0)return[];const Lt=Ee(St);return Lt.map((Zt,Ut)=>{const qt=Lt.slice(0,Ut);return Pn(tt,Zt,qt,Nt,Xt)}).flat()}function Pn(St,tt,Nt,Xt,Lt){const Zt=Xe(tt.cx,tt.cy),Ut=It(Zt,Nt,St);if(Ut==null)return[];const qt=new R(Zt.x,Zt.y,Ut.cx,Ut.cy),se=tn(qt,St,Xt,Lt);return xn(se,St)}function tn(St,tt,Nt,Xt){const Lt=[],Zt=[];Zt.push(St);let Ut=!0;for(let qt=0;qt<Nt&&Ut;qt++)for(Ut=!1;!Ut&&Zt.length>0;){const se=Zt.pop(),te=Pe(tt,se),ke=te?gt(se,te):null;if(!te||!ke||ke.count!==2){Ut||Lt.push(se);continue}let He=Xt,Ve=Ke(te,He,ke,!0),ln=on(Ve,Zt)||on(Ve,Lt),On=fn(Ve,tt);for(;!ln&&On&&He>=1;)He/=1.5,Ve=Ke(te,He,ke,!0),ln=on(Ve,Zt)||on(Ve,Lt),On=fn(Ve,tt);if(Ve&&!ln&&!On&&(Zt.push(new R(se.x1,se.y1,Ve.x,Ve.y)),Zt.push(new R(Ve.x,Ve.y,se.x2,se.y2)),Ut=!0),Ut)continue;He=Xt,Ve=Ke(te,He,ke,!1);let yn=on(Ve,Zt)||on(Ve,Lt);for(On=fn(Ve,tt);!yn&&On&&He>=1;)He/=1.5,Ve=Ke(te,He,ke,!1),yn=on(Ve,Zt)||on(Ve,Lt),On=fn(Ve,tt);Ve&&!yn&&(Zt.push(new R(se.x1,se.y1,Ve.x,Ve.y)),Zt.push(new R(Ve.x,Ve.y,se.x2,se.y2)),Ut=!0),Ut||Lt.push(se)}for(;Zt.length>0;)Lt.push(Zt.pop());return Lt}function xn(St,tt){const Nt=[];for(;St.length>0;){const Xt=St.pop();if(St.length===0){Nt.push(Xt);break}const Lt=St.pop(),Zt=new R(Xt.x1,Xt.y1,Lt.x2,Lt.y2);Pe(tt,Zt)?(Nt.push(Xt),St.push(Lt)):St.push(Zt)}return Nt}function It(St,tt,Nt){let Xt=Number.POSITIVE_INFINITY;return tt.reduce((Lt,Zt)=>{const Ut=_(St.x,St.y,Zt.cx,Zt.cy);if(Ut>Xt)return Lt;const qt=new R(St.x,St.y,Zt.cx,Zt.cy),se=Ze(Nt,qt);return Ut*(se+1)*(se+1)<Xt&&(Lt=Zt,Xt=Ut*(se+1)*(se+1)),Lt},null)}function Ee(St){if(St.length<2)return St;let tt=0,Nt=0;return St.forEach(Xt=>{tt+=Xt.cx,Nt+=Xt.cy}),tt/=St.length,Nt/=St.length,St.map(Xt=>{const Lt=tt-Xt.cx,Zt=Nt-Xt.cy,Ut=Lt*Lt+Zt*Zt;return[Xt,Ut]}).sort((Xt,Lt)=>Xt[1]-Lt[1]).map(Xt=>Xt[0])}function fn(St,tt){return tt.some(Nt=>Nt.containsPt(St.x,St.y))}function on(St,tt){return tt.some(Nt=>!!(I(Nt.x1,Nt.y1,St.x,St.y,.001)||I(Nt.x2,Nt.y2,St.x,St.y,.001)))}function Pe(St,tt){let Nt=Number.POSITIVE_INFINITY,Xt=null;for(const Lt of St){if(!G(Lt,tt))continue;const Zt=kt(Lt,tt);Zt>=0&&Zt<Nt&&(Xt=Lt,Nt=Zt)}return Xt}function Ze(St,tt){return St.reduce((Nt,Xt)=>G(Xt,tt)&&L(Xt,tt)?Nt+1:Nt,0)}function Ke(St,tt,Nt,Xt){const Lt=Nt.top,Zt=Nt.left,Ut=Nt.bottom,qt=Nt.right;if(Xt){if(Zt.state===w.POINT){if(Lt.state===w.POINT)return Xe(St.x-tt,St.y-tt);if(Ut.state===w.POINT)return Xe(St.x-tt,St.y2+tt);const Ve=St.width*St.height;return St.width*((Zt.y-St.y+(qt.y-St.y))*.5)<Ve*.5?Zt.y>qt.y?Xe(St.x-tt,St.y-tt):Xe(St.x2+tt,St.y-tt):Zt.y<qt.y?Xe(St.x-tt,St.y2+tt):Xe(St.x2+tt,St.y2+tt)}if(qt.state===w.POINT){if(Lt.state===w.POINT)return Xe(St.x2+tt,St.y-tt);if(Ut.state===w.POINT)return Xe(St.x2+tt,St.y2+tt)}const ke=St.height*St.width;return St.height*((Lt.x-St.x+(qt.x-St.x))*.5)<ke*.5?Lt.x>Ut.x?Xe(St.x-tt,St.y-tt):Xe(St.x-tt,St.y2+tt):Lt.x<Ut.x?Xe(St.x2+tt,St.y-tt):Xe(St.x2+tt,St.y2+tt)}if(Zt.state===w.POINT){if(Lt.state===w.POINT)return Xe(St.x2+tt,St.y2+tt);if(Ut.state===w.POINT)return Xe(St.x2+tt,St.y-tt);const ke=St.height*St.width;return St.width*((Zt.y-St.y+(qt.y-St.y))*.5)<ke*.5?Zt.y>qt.y?Xe(St.x2+tt,St.y2+tt):Xe(St.x-tt,St.y2+tt):Zt.y<qt.y?Xe(St.x2+tt,St.y-tt):Xe(St.x-tt,St.y-tt)}if(qt.state===w.POINT){if(Lt.state===w.POINT)return Xe(St.x-tt,St.y2+tt);if(Ut.state===w.POINT)return Xe(St.x-tt,St.y-tt)}const se=St.height*St.width;return St.height*((Lt.x-St.x+(qt.x-St.x))*.5)<se*.5?Lt.x>Ut.x?Xe(St.x2+tt,St.y2+tt):Xe(St.x2+tt,St.y-tt):Lt.x<Ut.x?Xe(St.x-tt,St.y2+tt):Xe(St.x-tt,St.y-tt)}function le(St,tt,Nt,Xt){if(!(St.closed?Nt<St.length:Nt<St.length-1))return!1;const Zt=St.get(tt),Ut=St.get(Nt+1);for(let qt=tt+1;qt<=Nt;qt++){const se=St.get(qt);if(c(Zt.x,Zt.y,Ut.x,Ut.y,se.x,se.y)>Xt)return!1}return!0}function Ae(St=0){return tt=>{if(St<0||tt.length<3)return tt;const Nt=[];let Xt=0;const Lt=St*St;for(;Xt<tt.length;){let Zt=Xt+1;for(;le(tt,Xt,Zt,Lt);)Zt++;Nt.push(tt.get(Xt)),Xt=Zt}return new je(Nt)}}function Pt(St,tt){switch(St){case-2:return(((-tt+3)*tt-3)*tt+1)/6;case-1:return((3*tt-6)*tt*tt+4)/6;case 0:return(((-3*tt+3)*tt+3)*tt+1)/6;case 1:return tt*tt*tt/6;default:throw new Error("unknown error")}}function wt(St=6){function Zt(Ut,qt,se){let te=0,ke=0;for(let He=-2;He<=1;He++){const Ve=Ut.get(qt+He),ln=Pt(He,se);te+=ln*Ve.x,ke+=ln*Ve.y}return{x:te,y:ke}}return Ut=>{if(Ut.length<3)return Ut;const qt=[],se=Ut.closed,te=Ut.length+3-1+(se?0:2);qt.push(Zt(Ut,2-(se?0:2),0));for(let ke=2-(se?0:2);ke<te;ke++)for(let He=1;He<=St;He++)qt.push(Zt(Ut,ke,He/St));return new je(qt)}}function he(St=8){return tt=>{let Nt=St,Xt=tt.length;if(Nt>1)for(Xt=Math.floor(tt.length/Nt);Xt<3&&Nt>1;)Nt-=1,Xt=Math.floor(tt.length/Nt);const Lt=[];for(let Zt=0,Ut=0;Ut<Xt;Ut++,Zt+=Nt)Lt.push(tt.get(Zt));return new je(Lt)}}class je{constructor(tt=[],Nt=!0){this.points=tt,this.closed=Nt}get(tt){const Nt=tt,Xt=this.points.length;return tt<0?this.closed?this.get(tt+Xt):this.points[0]:tt>=Xt?this.closed?this.get(tt-Xt):this.points[Xt-1]:this.points[Nt]}get length(){return this.points.length}toString(tt=1/0){const Nt=this.points;if(Nt.length===0)return"";const Xt=typeof tt=="function"?tt:z(tt);let Lt="M";for(const Zt of Nt)Lt+=`${Xt(Zt.x)},${Xt(Zt.y)} L`;return Lt=Lt.slice(0,-1),this.closed&&(Lt+=" Z"),Lt}draw(tt){const Nt=this.points;if(Nt.length!==0){tt.beginPath(),tt.moveTo(Nt[0].x,Nt[0].y);for(const Xt of Nt)tt.lineTo(Xt.x,Xt.y);this.closed&&tt.closePath()}}sample(tt){return he(tt)(this)}simplify(tt){return Ae(tt)(this)}bSplines(tt){return wt(tt)(this)}apply(tt){return tt(this)}containsElements(tt){const Nt=Rt(this.points);return Nt?tt.every(Xt=>Nt.containsPt(Xt.cx,Xt.cy)&&this.withinArea(Xt.cx,Xt.cy)):!1}withinArea(tt,Nt){if(this.length===0)return!1;let Xt=0;const Lt=this.points[0],Zt=new R(Lt.x,Lt.y,Lt.x,Lt.y);for(let Ut=1;Ut<this.points.length;Ut++){const qt=this.points[Ut];Zt.x1=Zt.x2,Zt.y1=Zt.y2,Zt.x2=qt.x,Zt.y2=qt.y,Zt.cuts(tt,Nt)&&Xt++}return Zt.x1=Zt.x2,Zt.y1=Zt.y2,Zt.x2=Lt.x,Zt.y2=Lt.y,Zt.cuts(tt,Nt)&&Xt++,Xt%2===1}}class Re{constructor(tt=0){this.count=0,this.arr=[],this.set=new Set,this.arr.length=tt}add(tt){this.set.add(`${tt.x}x${tt.y}`),this.arr[this.count++]=tt}contains(tt){return this.set.has(`${tt.x}x${tt.y}`)}isFirst(tt){if(this.count===0)return!1;const Nt=this.arr[0];return Nt!=null&&Nt.x===tt.x&&Nt.y===tt.y}path(){return new je(this.arr.slice(0,this.count))}clear(){this.set.clear(),this.count=0}get(tt){return this.arr[tt]}get length(){return this.count}}const ce=0,Le=1,xe=2,_t=3;function ie(St,tt){const Nt=(Math.floor(St.width)+Math.floor(St.height))*2,Xt=new Re(Nt);function Lt(se,te,ke,He){const Ve=St.get(se,te);return Number.isNaN(Ve)?Number.NaN:Ve>tt?ke+He:ke}function Zt(se,te){let ke=ce;return ke=Lt(se,te,ke,1),ke=Lt(se+1,te,ke,2),ke=Lt(se,te+1,ke,4),ke=Lt(se+1,te+1,ke,8),Number.isNaN(ke)?-1:ke}let Ut=Le;function qt(se,te){let ke=se,He=te,Ve=St.invertScaleX(ke),ln=St.invertScaleY(He);for(let On=0;On<St.width*St.height;On++){const yn={x:Ve,y:ln};if(Xt.contains(yn)){if(Xt.isFirst(yn))return!0}else Xt.add(yn);const lr=Zt(ke,He);switch(lr){case-1:return!0;case 0:case 3:case 2:case 7:Ut=xe;break;case 12:case 14:case 4:Ut=_t;break;case 6:Ut=Ut===ce?_t:xe;break;case 1:case 13:case 5:Ut=ce;break;case 9:Ut=Ut===xe?ce:Le;break;case 10:case 8:case 11:Ut=Le;break;default:return console.warn("Marching squares invalid state: "+lr),!0}switch(Ut){case ce:He--,ln-=St.pixelGroup;break;case Le:He++,ln+=St.pixelGroup;break;case _t:ke--,Ve-=St.pixelGroup;break;case xe:ke++,Ve+=St.pixelGroup;break;default:return console.warn("Marching squares invalid state: "+lr),!0}}return!0}for(let se=0;se<St.width;se++)for(let te=0;te<St.height;te++){if(St.get(se,te)<=tt)continue;const ke=Zt(se,te);if(!(ke<0||ke===15)&&qt(se,te))return Xt.path()}return null}const Me={maxRoutingIterations:100,maxMarchingIterations:20,pixelGroup:4,edgeR0:10,edgeR1:20,nodeR0:15,nodeR1:50,morphBuffer:10,threshold:1,memberInfluenceFactor:1,edgeInfluenceFactor:1,nonMemberInfluenceFactor:-.8,virtualEdges:!0};function T(St){return St!=null&&typeof St.radius=="number"}function at(St,tt){if(T(St)!==T(tt))return!1;if(T(St)){const Xt=tt;return St.cx===Xt.cx&&St.cy===Xt.cy&&St.radius===Xt.radius}const Nt=tt;return St.x===Nt.x&&St.y===Nt.y&&St.width===Nt.width&&St.height===Nt.height}var fe;(function(St){St[St.MEMBERS=0]="MEMBERS",St[St.NON_MEMBERS=1]="NON_MEMBERS",St[St.EDGES=2]="EDGES"})(fe||(fe={}));class Jt{constructor(tt={}){this.dirty=new Set,this.members=[],this.nonMembers=[],this.virtualEdges=[],this.edges=[],this.activeRegion=new Q(0,0,0,0),this.potentialArea=new Ht(1,0,0,0,0,0,0),this.o=Object.assign({},Me,tt)}pushMember(...tt){if(tt.length!==0){this.dirty.add(fe.MEMBERS);for(const Nt of tt)this.members.push({raw:Nt,obj:T(Nt)?Ct.from(Nt):Q.from(Nt),area:null})}}removeMember(tt){const Nt=this.members.findIndex(Xt=>at(Xt.raw,tt));return Nt<0?!1:(this.members.splice(Nt,1),this.dirty.add(fe.MEMBERS),!0)}removeNonMember(tt){const Nt=this.nonMembers.findIndex(Xt=>at(Xt.raw,tt));return Nt<0?!1:(this.nonMembers.splice(Nt,1),this.dirty.add(fe.NON_MEMBERS),!0)}removeEdge(tt){const Nt=this.edges.findIndex(Xt=>Xt.obj.equals(tt));return Nt<0?!1:(this.edges.splice(Nt,1),this.dirty.add(fe.NON_MEMBERS),!0)}pushNonMember(...tt){if(tt.length!==0){this.dirty.add(fe.NON_MEMBERS);for(const Nt of tt)this.nonMembers.push({raw:Nt,obj:T(Nt)?Ct.from(Nt):Q.from(Nt),area:null})}}pushEdge(...tt){if(tt.length!==0){this.dirty.add(fe.EDGES);for(const Nt of tt)this.edges.push({raw:Nt,obj:R.from(Nt),area:null})}}update(){const tt=this.dirty.has(fe.MEMBERS),Nt=this.dirty.has(fe.NON_MEMBERS);let Xt=this.dirty.has(fe.EDGES);this.dirty.clear();const Lt=this.members.map(te=>te.obj);if(this.o.virtualEdges&&(tt||Nt)){const te=this.nonMembers.map(Ve=>Ve.obj),ke=En(Lt,te,this.o.maxRoutingIterations,this.o.morphBuffer),He=new Map(this.virtualEdges.map(Ve=>[Ve.obj.toString(),Ve.area]));this.virtualEdges=ke.map(Ve=>{var ln;return{raw:Ve,obj:Ve,area:(ln=He.get(Ve.toString()))!==null&&ln!==void 0?ln:null}}),Xt=!0}let Zt=!1;if(tt||Xt){const te=this.virtualEdges.concat(this.edges).map(ln=>ln.obj),ke=Ne(Lt,te),He=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,Ve=Q.from(de(ke,He));Ve.equals(this.activeRegion)||(Zt=!0,this.activeRegion=Ve)}if(Zt){const te=Math.ceil(this.activeRegion.width/this.o.pixelGroup),ke=Math.ceil(this.activeRegion.height/this.o.pixelGroup);this.activeRegion.x!==this.potentialArea.pixelX||this.activeRegion.y!==this.potentialArea.pixelY?(this.potentialArea=Ht.fromPixelRegion(this.activeRegion,this.o.pixelGroup),this.members.forEach(He=>He.area=null),this.nonMembers.forEach(He=>He.area=null),this.edges.forEach(He=>He.area=null),this.virtualEdges.forEach(He=>He.area=null)):(te!==this.potentialArea.width||ke!==this.potentialArea.height)&&(this.potentialArea=Ht.fromPixelRegion(this.activeRegion,this.o.pixelGroup))}const Ut=new Map,qt=te=>{if(te.area){const ke=`${te.obj.width}x${te.obj.height}x${te.obj instanceof Q?"R":"C"}`;Ut.set(ke,te.area)}},se=te=>{if(te.area)return;const ke=`${te.obj.width}x${te.obj.height}x${te.obj instanceof Q?"R":"C"}`;if(Ut.has(ke)){const Ve=Ut.get(ke);te.area=this.potentialArea.copy(Ve,{x:te.obj.x-this.o.nodeR1,y:te.obj.y-this.o.nodeR1});return}const He=te.obj instanceof Q?we(te.obj,this.potentialArea,this.o.nodeR1):Te(te.obj,this.potentialArea,this.o.nodeR1);te.area=He,Ut.set(ke,He)};this.members.forEach(qt),this.nonMembers.forEach(qt),this.members.forEach(se),this.nonMembers.forEach(te=>{this.activeRegion.intersects(te.obj)?se(te):te.area=null}),this.edges.forEach(te=>{te.area||(te.area=ue(te.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(te=>{te.area||(te.area=ue(te.obj,this.potentialArea,this.o.edgeR1))})}drawMembers(tt){for(const Nt of this.members)Nt.obj.draw(tt)}drawNonMembers(tt){for(const Nt of this.nonMembers)Nt.obj.draw(tt)}drawEdges(tt){for(const Nt of this.edges)Nt.obj.draw(tt)}drawPotentialArea(tt,Nt=!0){this.potentialArea.draw(tt,Nt)}compute(){if(this.members.length===0)return new je([]);this.dirty.size>0&&this.update();const{o:tt,potentialArea:Nt}=this,Xt=this.members.map(qt=>qt.area),Lt=this.virtualEdges.concat(this.edges).map(qt=>qt.area),Zt=this.nonMembers.filter(qt=>qt.area!=null).map(qt=>qt.area),Ut=this.members.map(qt=>qt.obj);return Ie(Nt,Xt,Lt,Zt,qt=>qt.containsElements(Ut),tt)}}function Ie(St,tt,Nt,Xt,Lt,Zt={}){const Ut=Object.assign({},Me,Zt);let qt=Ut.threshold,se=Ut.memberInfluenceFactor,te=Ut.edgeInfluenceFactor,ke=Ut.nonMemberInfluenceFactor;const He=(Ut.nodeR0-Ut.nodeR1)*(Ut.nodeR0-Ut.nodeR1),Ve=(Ut.edgeR0-Ut.edgeR1)*(Ut.edgeR0-Ut.edgeR1);for(let ln=0;ln<Ut.maxMarchingIterations;ln++){if(St.clear(),se!==0){const yn=se/He;for(const lr of tt)St.incArea(lr,yn)}if(te!==0){const yn=te/Ve;for(const lr of Nt)St.incArea(lr,yn)}if(ke!==0){const yn=ke/He;for(const lr of Xt)St.incArea(lr,yn)}const On=ie(St,qt);if(On&&Lt(On))return On;if(qt*=.95,ln<=Ut.maxMarchingIterations*.5)se*=1.2,te*=1.2;else if(ke!==0&&Xt.length>0)ke*=.8;else break}return new je([])}function Ne(St,tt){if(St.length===0)return new Q(0,0,0,0);const Nt=Q.from(St[0]);for(const Xt of St)Nt.add(Xt);for(const Xt of tt)Nt.add(S(Xt));return Nt}function en(St,tt=[],Nt=[],Xt={}){if(St.length===0)return new je([]);const Lt=new Jt(Xt);return Lt.pushMember(...St),Lt.pushNonMember(...tt),Lt.pushEdge(...Nt),Lt.compute()}},45411:function(yt){"use strict";yt.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},75196:function(yt,Et,y){var c=y(45411),_=y(81683),I=Object.hasOwnProperty,z=Object.create(null);for(var S in c)I.call(c,S)&&(z[c[S]]=S);var R=yt.exports={to:{},get:{}};R.get=function(D){var A=D.substring(0,3).toLowerCase(),L,F;switch(A){case"hsl":L=R.get.hsl(D),F="hsl";break;case"hwb":L=R.get.hwb(D),F="hwb";break;default:L=R.get.rgb(D),F="rgb";break}return L?{model:F,value:L}:null},R.get.rgb=function(D){if(!D)return null;var A=/^#([a-f0-9]{3,4})$/i,L=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,F=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,it=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,G=/^(\w+)$/,kt=[0,0,0,1],gt,Q,Rt;if(gt=D.match(L)){for(Rt=gt[2],gt=gt[1],Q=0;Q<3;Q++){var Ct=Q*2;kt[Q]=parseInt(gt.slice(Ct,Ct+2),16)}Rt&&(kt[3]=parseInt(Rt,16)/255)}else if(gt=D.match(A)){for(gt=gt[1],Rt=gt[3],Q=0;Q<3;Q++)kt[Q]=parseInt(gt[Q]+gt[Q],16);Rt&&(kt[3]=parseInt(Rt+Rt,16)/255)}else if(gt=D.match(F)){for(Q=0;Q<3;Q++)kt[Q]=parseInt(gt[Q+1],0);gt[4]&&(gt[5]?kt[3]=parseFloat(gt[4])*.01:kt[3]=parseFloat(gt[4]))}else if(gt=D.match(it)){for(Q=0;Q<3;Q++)kt[Q]=Math.round(parseFloat(gt[Q+1])*2.55);gt[4]&&(gt[5]?kt[3]=parseFloat(gt[4])*.01:kt[3]=parseFloat(gt[4]))}else return(gt=D.match(G))?gt[1]==="transparent"?[0,0,0,0]:I.call(c,gt[1])?(kt=c[gt[1]],kt[3]=1,kt):null:null;for(Q=0;Q<3;Q++)kt[Q]=w(kt[Q],0,255);return kt[3]=w(kt[3],0,1),kt},R.get.hsl=function(D){if(!D)return null;var A=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,L=D.match(A);if(L){var F=parseFloat(L[4]),it=(parseFloat(L[1])%360+360)%360,G=w(parseFloat(L[2]),0,100),kt=w(parseFloat(L[3]),0,100),gt=w(isNaN(F)?1:F,0,1);return[it,G,kt,gt]}return null},R.get.hwb=function(D){if(!D)return null;var A=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,L=D.match(A);if(L){var F=parseFloat(L[4]),it=(parseFloat(L[1])%360+360)%360,G=w(parseFloat(L[2]),0,100),kt=w(parseFloat(L[3]),0,100),gt=w(isNaN(F)?1:F,0,1);return[it,G,kt,gt]}return null},R.to.hex=function(){var D=_(arguments);return"#"+N(D[0])+N(D[1])+N(D[2])+(D[3]<1?N(Math.round(D[3]*255)):"")},R.to.rgb=function(){var D=_(arguments);return D.length<4||D[3]===1?"rgb("+Math.round(D[0])+", "+Math.round(D[1])+", "+Math.round(D[2])+")":"rgba("+Math.round(D[0])+", "+Math.round(D[1])+", "+Math.round(D[2])+", "+D[3]+")"},R.to.rgb.percent=function(){var D=_(arguments),A=Math.round(D[0]/255*100),L=Math.round(D[1]/255*100),F=Math.round(D[2]/255*100);return D.length<4||D[3]===1?"rgb("+A+"%, "+L+"%, "+F+"%)":"rgba("+A+"%, "+L+"%, "+F+"%, "+D[3]+")"},R.to.hsl=function(){var D=_(arguments);return D.length<4||D[3]===1?"hsl("+D[0]+", "+D[1]+"%, "+D[2]+"%)":"hsla("+D[0]+", "+D[1]+"%, "+D[2]+"%, "+D[3]+")"},R.to.hwb=function(){var D=_(arguments),A="";return D.length>=4&&D[3]!==1&&(A=", "+D[3]),"hwb("+D[0]+", "+D[1]+"%, "+D[2]+"%"+A+")"},R.to.keyword=function(D){return z[D.slice(0,3)]};function w(D,A,L){return Math.min(Math.max(A,D),L)}function N(D){var A=Math.round(D).toString(16).toUpperCase();return A.length<2?"0"+A:A}},92546:function(yt,Et,y){yt.exports={graphlib:y(76626),layout:y(47194),debug:y(11303),util:{time:y(53063).time,notime:y(53063).notime},version:y(11897)}},81255:function(yt,Et,y){"use strict";var c=y(72361),_=y(39240);yt.exports={run:I,undo:S};function I(R){var w=R.graph().acyclicer==="greedy"?_(R,N(R)):z(R);c.forEach(w,function(D){var A=R.edge(D);R.removeEdge(D),A.forwardName=D.name,A.reversed=!0,R.setEdge(D.w,D.v,A,c.uniqueId("rev"))});function N(D){return function(A){return D.edge(A).weight}}}function z(R){var w=[],N={},D={};function A(L){c.has(D,L)||(D[L]=!0,N[L]=!0,c.forEach(R.outEdges(L),function(F){c.has(N,F.w)?w.push(F):A(F.w)}),delete N[L])}return c.forEach(R.nodes(),A),w}function S(R){c.forEach(R.edges(),function(w){var N=R.edge(w);if(N.reversed){R.removeEdge(w);var D=N.forwardName;delete N.reversed,delete N.forwardName,R.setEdge(w.w,w.v,N,D)}})}},60765:function(yt,Et,y){var c=y(72361),_=y(53063);yt.exports=I;function I(S){function R(w){var N=S.children(w),D=S.node(w);if(N.length&&c.forEach(N,R),c.has(D,"minRank")){D.borderLeft=[],D.borderRight=[];for(var A=D.minRank,L=D.maxRank+1;A<L;++A)z(S,"borderLeft","_bl",w,D,A),z(S,"borderRight","_br",w,D,A)}}c.forEach(S.children(),R)}function z(S,R,w,N,D,A){var L={width:0,height:0,rank:A,borderType:R},F=D[R][A-1],it=_.addDummyNode(S,"border",L,w);D[R][A]=it,S.setParent(it,N),F&&S.setEdge(F,it,{weight:1})}},13257:function(yt,Et,y){"use strict";var c=y(72361);yt.exports={adjust:_,undo:I};function _(A){var L=A.graph().rankdir.toLowerCase();(L==="lr"||L==="rl")&&z(A)}function I(A){var L=A.graph().rankdir.toLowerCase();(L==="bt"||L==="rl")&&R(A),(L==="lr"||L==="rl")&&(N(A),z(A))}function z(A){c.forEach(A.nodes(),function(L){S(A.node(L))}),c.forEach(A.edges(),function(L){S(A.edge(L))})}function S(A){var L=A.width;A.width=A.height,A.height=L}function R(A){c.forEach(A.nodes(),function(L){w(A.node(L))}),c.forEach(A.edges(),function(L){var F=A.edge(L);c.forEach(F.points,w),c.has(F,"y")&&w(F)})}function w(A){A.y=-A.y}function N(A){c.forEach(A.nodes(),function(L){D(A.node(L))}),c.forEach(A.edges(),function(L){var F=A.edge(L);c.forEach(F.points,D),c.has(F,"x")&&D(F)})}function D(A){var L=A.x;A.x=A.y,A.y=L}},21135:function(yt){yt.exports=Et;function Et(){var _={};_._next=_._prev=_,this._sentinel=_}Et.prototype.dequeue=function(){var _=this._sentinel,I=_._prev;if(I!==_)return y(I),I},Et.prototype.enqueue=function(_){var I=this._sentinel;_._prev&&_._next&&y(_),_._next=I._next,I._next._prev=_,I._next=_,_._prev=I},Et.prototype.toString=function(){for(var _=[],I=this._sentinel,z=I._prev;z!==I;)_.push(JSON.stringify(z,c)),z=z._prev;return"["+_.join(", ")+"]"};function y(_){_._prev._next=_._next,_._next._prev=_._prev,delete _._next,delete _._prev}function c(_,I){if(_!=="_next"&&_!=="_prev")return I}},11303:function(yt,Et,y){var c=y(72361),_=y(53063),I=y(76626).Graph;yt.exports={debugOrdering:z};function z(S){var R=_.buildLayerMatrix(S),w=new I({compound:!0,multigraph:!0}).setGraph({});return c.forEach(S.nodes(),function(N){w.setNode(N,{label:N}),w.setParent(N,"layer"+S.node(N).rank)}),c.forEach(S.edges(),function(N){w.setEdge(N.v,N.w,{},N.name)}),c.forEach(R,function(N,D){var A="layer"+D;w.setNode(A,{rank:"same"}),c.reduce(N,function(L,F){return w.setEdge(L,F,{style:"invis"}),F})}),w}},76626:function(yt,Et,y){var c;try{c=y(51470)}catch(_){}c||(c=window.graphlib),yt.exports=c},39240:function(yt,Et,y){var c=y(72361),_=y(76626).Graph,I=y(21135);yt.exports=S;var z=c.constant(1);function S(A,L){if(A.nodeCount()<=1)return[];var F=N(A,L||z),it=R(F.graph,F.buckets,F.zeroIdx);return c.flatten(c.map(it,function(G){return A.outEdges(G.v,G.w)}),!0)}function R(A,L,F){for(var it=[],G=L[L.length-1],kt=L[0],gt;A.nodeCount();){for(;gt=kt.dequeue();)w(A,L,F,gt);for(;gt=G.dequeue();)w(A,L,F,gt);if(A.nodeCount()){for(var Q=L.length-2;Q>0;--Q)if(gt=L[Q].dequeue(),gt){it=it.concat(w(A,L,F,gt,!0));break}}}return it}function w(A,L,F,it,G){var kt=G?[]:void 0;return c.forEach(A.inEdges(it.v),function(gt){var Q=A.edge(gt),Rt=A.node(gt.v);G&&kt.push({v:gt.v,w:gt.w}),Rt.out-=Q,D(L,F,Rt)}),c.forEach(A.outEdges(it.v),function(gt){var Q=A.edge(gt),Rt=gt.w,Ct=A.node(Rt);Ct.in-=Q,D(L,F,Ct)}),A.removeNode(it.v),kt}function N(A,L){var F=new _,it=0,G=0;c.forEach(A.nodes(),function(Q){F.setNode(Q,{v:Q,in:0,out:0})}),c.forEach(A.edges(),function(Q){var Rt=F.edge(Q.v,Q.w)||0,Ct=L(Q),Ht=Rt+Ct;F.setEdge(Q.v,Q.w,Ht),G=Math.max(G,F.node(Q.v).out+=Ct),it=Math.max(it,F.node(Q.w).in+=Ct)});var kt=c.range(G+it+3).map(function(){return new I}),gt=it+1;return c.forEach(F.nodes(),function(Q){D(kt,gt,F.node(Q))}),{graph:F,buckets:kt,zeroIdx:gt}}function D(A,L,F){F.out?F.in?A[F.out-F.in+L].enqueue(F):A[A.length-1].enqueue(F):A[0].enqueue(F)}},47194:function(yt,Et,y){"use strict";var c=y(72361),_=y(81255),I=y(27163),z=y(64505),S=y(53063).normalizeRanks,R=y(71970),w=y(53063).removeEmptyRanks,N=y(31733),D=y(60765),A=y(13257),L=y(62852),F=y(93021),it=y(53063),G=y(76626).Graph;yt.exports=kt;function kt(le,Ae){var Pt=Ae&&Ae.debugTiming?it.time:it.notime;Pt("layout",function(){var wt=Pt(" buildLayoutGraph",function(){return re(le)});Pt(" runLayout",function(){gt(wt,Pt)}),Pt(" updateInputGraph",function(){Q(le,wt)})})}function gt(le,Ae){Ae(" makeSpaceForEdgeLabels",function(){Ge(le)}),Ae(" removeSelfEdges",function(){fn(le)}),Ae(" acyclic",function(){_.run(le)}),Ae(" nestingGraph.run",function(){N.run(le)}),Ae(" rank",function(){z(it.asNonCompoundGraph(le))}),Ae(" injectEdgeLabelProxies",function(){rn(le)}),Ae(" removeEmptyRanks",function(){w(le)}),Ae(" nestingGraph.cleanup",function(){N.cleanup(le)}),Ae(" normalizeRanks",function(){S(le)}),Ae(" assignRankMinMax",function(){Xe(le)}),Ae(" removeEdgeLabelProxies",function(){En(le)}),Ae(" normalize.run",function(){I.run(le)}),Ae(" parentDummyChains",function(){R(le)}),Ae(" addBorderSegments",function(){D(le)}),Ae(" order",function(){L(le)}),Ae(" insertSelfEdges",function(){on(le)}),Ae(" adjustCoordinateSystem",function(){A.adjust(le)}),Ae(" position",function(){F(le)}),Ae(" positionSelfEdges",function(){Pe(le)}),Ae(" removeBorderNodes",function(){Ee(le)}),Ae(" normalize.undo",function(){I.undo(le)}),Ae(" fixupEdgeLabelCoords",function(){xn(le)}),Ae(" undoCoordinateSystem",function(){A.undo(le)}),Ae(" translateGraph",function(){Pn(le)}),Ae(" assignNodeIntersects",function(){tn(le)}),Ae(" reversePoints",function(){It(le)}),Ae(" acyclic.undo",function(){_.undo(le)})}function Q(le,Ae){c.forEach(le.nodes(),function(Pt){var wt=le.node(Pt),he=Ae.node(Pt);wt&&(wt.x=he.x,wt.y=he.y,Ae.children(Pt).length&&(wt.width=he.width,wt.height=he.height))}),c.forEach(le.edges(),function(Pt){var wt=le.edge(Pt),he=Ae.edge(Pt);wt.points=he.points,c.has(he,"x")&&(wt.x=he.x,wt.y=he.y)}),le.graph().width=Ae.graph().width,le.graph().height=Ae.graph().height}var Rt=["nodesep","edgesep","ranksep","marginx","marginy"],Ct={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ht=["acyclicer","ranker","rankdir","align"],de=["width","height"],ue={width:0,height:0},Te=["minlen","weight","width","height","labeloffset"],be={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},we=["labelpos"];function re(le){var Ae=new G({multigraph:!0,compound:!0}),Pt=Ke(le.graph());return Ae.setGraph(c.merge({},Ct,Ze(Pt,Rt),c.pick(Pt,Ht))),c.forEach(le.nodes(),function(wt){var he=Ke(le.node(wt));Ae.setNode(wt,c.defaults(Ze(he,de),ue)),Ae.setParent(wt,le.parent(wt))}),c.forEach(le.edges(),function(wt){var he=Ke(le.edge(wt));Ae.setEdge(wt,c.merge({},be,Ze(he,Te),c.pick(he,we)))}),Ae}function Ge(le){var Ae=le.graph();Ae.ranksep/=2,c.forEach(le.edges(),function(Pt){var wt=le.edge(Pt);wt.minlen*=2,wt.labelpos.toLowerCase()!=="c"&&(Ae.rankdir==="TB"||Ae.rankdir==="BT"?wt.width+=wt.labeloffset:wt.height+=wt.labeloffset)})}function rn(le){c.forEach(le.edges(),function(Ae){var Pt=le.edge(Ae);if(Pt.width&&Pt.height){var wt=le.node(Ae.v),he=le.node(Ae.w),je={rank:(he.rank-wt.rank)/2+wt.rank,e:Ae};it.addDummyNode(le,"edge-proxy",je,"_ep")}})}function Xe(le){var Ae=0;c.forEach(le.nodes(),function(Pt){var wt=le.node(Pt);wt.borderTop&&(wt.minRank=le.node(wt.borderTop).rank,wt.maxRank=le.node(wt.borderBottom).rank,Ae=c.max(Ae,wt.maxRank))}),le.graph().maxRank=Ae}function En(le){c.forEach(le.nodes(),function(Ae){var Pt=le.node(Ae);Pt.dummy==="edge-proxy"&&(le.edge(Pt.e).labelRank=Pt.rank,le.removeNode(Ae))})}function Pn(le){var Ae=Number.POSITIVE_INFINITY,Pt=0,wt=Number.POSITIVE_INFINITY,he=0,je=le.graph(),Re=je.marginx||0,ce=je.marginy||0;function Le(xe){var _t=xe.x,ie=xe.y,Me=xe.width,T=xe.height;Ae=Math.min(Ae,_t-Me/2),Pt=Math.max(Pt,_t+Me/2),wt=Math.min(wt,ie-T/2),he=Math.max(he,ie+T/2)}c.forEach(le.nodes(),function(xe){Le(le.node(xe))}),c.forEach(le.edges(),function(xe){var _t=le.edge(xe);c.has(_t,"x")&&Le(_t)}),Ae-=Re,wt-=ce,c.forEach(le.nodes(),function(xe){var _t=le.node(xe);_t.x-=Ae,_t.y-=wt}),c.forEach(le.edges(),function(xe){var _t=le.edge(xe);c.forEach(_t.points,function(ie){ie.x-=Ae,ie.y-=wt}),c.has(_t,"x")&&(_t.x-=Ae),c.has(_t,"y")&&(_t.y-=wt)}),je.width=Pt-Ae+Re,je.height=he-wt+ce}function tn(le){c.forEach(le.edges(),function(Ae){var Pt=le.edge(Ae),wt=le.node(Ae.v),he=le.node(Ae.w),je,Re;Pt.points?(je=Pt.points[0],Re=Pt.points[Pt.points.length-1]):(Pt.points=[],je=he,Re=wt),Pt.points.unshift(it.intersectRect(wt,je)),Pt.points.push(it.intersectRect(he,Re))})}function xn(le){c.forEach(le.edges(),function(Ae){var Pt=le.edge(Ae);if(c.has(Pt,"x"))switch((Pt.labelpos==="l"||Pt.labelpos==="r")&&(Pt.width-=Pt.labeloffset),Pt.labelpos){case"l":Pt.x-=Pt.width/2+Pt.labeloffset;break;case"r":Pt.x+=Pt.width/2+Pt.labeloffset;break}})}function It(le){c.forEach(le.edges(),function(Ae){var Pt=le.edge(Ae);Pt.reversed&&Pt.points.reverse()})}function Ee(le){c.forEach(le.nodes(),function(Ae){if(le.children(Ae).length){var Pt=le.node(Ae),wt=le.node(Pt.borderTop),he=le.node(Pt.borderBottom),je=le.node(c.last(Pt.borderLeft)),Re=le.node(c.last(Pt.borderRight));Pt.width=Math.abs(Re.x-je.x),Pt.height=Math.abs(he.y-wt.y),Pt.x=je.x+Pt.width/2,Pt.y=wt.y+Pt.height/2}}),c.forEach(le.nodes(),function(Ae){le.node(Ae).dummy==="border"&&le.removeNode(Ae)})}function fn(le){c.forEach(le.edges(),function(Ae){if(Ae.v===Ae.w){var Pt=le.node(Ae.v);Pt.selfEdges||(Pt.selfEdges=[]),Pt.selfEdges.push({e:Ae,label:le.edge(Ae)}),le.removeEdge(Ae)}})}function on(le){var Ae=it.buildLayerMatrix(le);c.forEach(Ae,function(Pt){var wt=0;c.forEach(Pt,function(he,je){var Re=le.node(he);Re.order=je+wt,c.forEach(Re.selfEdges,function(ce){it.addDummyNode(le,"selfedge",{width:ce.label.width,height:ce.label.height,rank:Re.rank,order:je+ ++wt,e:ce.e,label:ce.label},"_se")}),delete Re.selfEdges})})}function Pe(le){c.forEach(le.nodes(),function(Ae){var Pt=le.node(Ae);if(Pt.dummy==="selfedge"){var wt=le.node(Pt.e.v),he=wt.x+wt.width/2,je=wt.y,Re=Pt.x-he,ce=wt.height/2;le.setEdge(Pt.e,Pt.label),le.removeNode(Ae),Pt.label.points=[{x:he+2*Re/3,y:je-ce},{x:he+5*Re/6,y:je-ce},{x:he+Re,y:je},{x:he+5*Re/6,y:je+ce},{x:he+2*Re/3,y:je+ce}],Pt.label.x=Pt.x,Pt.label.y=Pt.y}})}function Ze(le,Ae){return c.mapValues(c.pick(le,Ae),Number)}function Ke(le){var Ae={};return c.forEach(le,function(Pt,wt){Ae[wt.toLowerCase()]=Pt}),Ae}},72361:function(yt,Et,y){var c;try{c={cloneDeep:y(20250),constant:y(13503),defaults:y(28548),each:y(76934),filter:y(64725),find:y(79785),flatten:y(40151),forEach:y(99204),forIn:y(23190),has:y(99946),isUndefined:y(16513),last:y(10611),map:y(9924),mapValues:y(70642),max:y(95987),merge:y(28440),min:y(73376),minBy:y(83296),now:y(5795),pick:y(89409),range:y(60859),reduce:y(16473),sortBy:y(351),uniqueId:y(95708),values:y(81229),zipObject:y(65441)}}catch(_){}c||(c=window._),yt.exports=c},31733:function(yt,Et,y){var c=y(72361),_=y(53063);yt.exports={run:I,cleanup:w};function I(N){var D=_.addDummyNode(N,"root",{},"_root"),A=S(N),L=c.max(c.values(A))-1,F=2*L+1;N.graph().nestingRoot=D,c.forEach(N.edges(),function(G){N.edge(G).minlen*=F});var it=R(N)+1;c.forEach(N.children(),function(G){z(N,D,F,it,L,A,G)}),N.graph().nodeRankFactor=F}function z(N,D,A,L,F,it,G){var kt=N.children(G);if(!kt.length){G!==D&&N.setEdge(D,G,{weight:0,minlen:A});return}var gt=_.addBorderNode(N,"_bt"),Q=_.addBorderNode(N,"_bb"),Rt=N.node(G);N.setParent(gt,G),Rt.borderTop=gt,N.setParent(Q,G),Rt.borderBottom=Q,c.forEach(kt,function(Ct){z(N,D,A,L,F,it,Ct);var Ht=N.node(Ct),de=Ht.borderTop?Ht.borderTop:Ct,ue=Ht.borderBottom?Ht.borderBottom:Ct,Te=Ht.borderTop?L:2*L,be=de!==ue?1:F-it[G]+1;N.setEdge(gt,de,{weight:Te,minlen:be,nestingEdge:!0}),N.setEdge(ue,Q,{weight:Te,minlen:be,nestingEdge:!0})}),N.parent(G)||N.setEdge(D,gt,{weight:0,minlen:F+it[G]})}function S(N){var D={};function A(L,F){var it=N.children(L);it&&it.length&&c.forEach(it,function(G){A(G,F+1)}),D[L]=F}return c.forEach(N.children(),function(L){A(L,1)}),D}function R(N){return c.reduce(N.edges(),function(D,A){return D+N.edge(A).weight},0)}function w(N){var D=N.graph();N.removeNode(D.nestingRoot),delete D.nestingRoot,c.forEach(N.edges(),function(A){var L=N.edge(A);L.nestingEdge&&N.removeEdge(A)})}},27163:function(yt,Et,y){"use strict";var c=y(72361),_=y(53063);yt.exports={run:I,undo:S};function I(R){R.graph().dummyChains=[],c.forEach(R.edges(),function(w){z(R,w)})}function z(R,w){var N=w.v,D=R.node(N).rank,A=w.w,L=R.node(A).rank,F=w.name,it=R.edge(w),G=it.labelRank;if(L!==D+1){R.removeEdge(w);var kt,gt,Q;for(Q=0,++D;D<L;++Q,++D)it.points=[],gt={width:0,height:0,edgeLabel:it,edgeObj:w,rank:D},kt=_.addDummyNode(R,"edge",gt,"_d"),D===G&&(gt.width=it.width,gt.height=it.height,gt.dummy="edge-label",gt.labelpos=it.labelpos),R.setEdge(N,kt,{weight:it.weight},F),Q===0&&R.graph().dummyChains.push(kt),N=kt;R.setEdge(N,A,{weight:it.weight},F)}}function S(R){c.forEach(R.graph().dummyChains,function(w){var N=R.node(w),D=N.edgeLabel,A;for(R.setEdge(N.edgeObj,D);N.dummy;)A=R.successors(w)[0],R.removeNode(w),D.points.push({x:N.x,y:N.y}),N.dummy==="edge-label"&&(D.x=N.x,D.y=N.y,D.width=N.width,D.height=N.height),w=A,N=R.node(w)})}},52205:function(yt,Et,y){var c=y(72361);yt.exports=_;function _(I,z,S){var R={},w;c.forEach(S,function(N){for(var D=I.parent(N),A,L;D;){if(A=I.parent(D),A?(L=R[A],R[A]=D):(L=w,w=D),L&&L!==D){z.setEdge(L,D);return}D=A}})}},99506:function(yt,Et,y){var c=y(72361);yt.exports=_;function _(I,z){return c.map(z,function(S){var R=I.inEdges(S);if(R.length){var w=c.reduce(R,function(N,D){var A=I.edge(D),L=I.node(D.v);return{sum:N.sum+A.weight*L.order,weight:N.weight+A.weight}},{sum:0,weight:0});return{v:S,barycenter:w.sum/w.weight,weight:w.weight}}else return{v:S}})}},59105:function(yt,Et,y){var c=y(72361),_=y(76626).Graph;yt.exports=I;function I(S,R,w){var N=z(S),D=new _({compound:!0}).setGraph({root:N}).setDefaultNodeLabel(function(A){return S.node(A)});return c.forEach(S.nodes(),function(A){var L=S.node(A),F=S.parent(A);(L.rank===R||L.minRank<=R&&R<=L.maxRank)&&(D.setNode(A),D.setParent(A,F||N),c.forEach(S[w](A),function(it){var G=it.v===A?it.w:it.v,kt=D.edge(G,A),gt=c.isUndefined(kt)?0:kt.weight;D.setEdge(G,A,{weight:S.edge(it).weight+gt})}),c.has(L,"minRank")&&D.setNode(A,{borderLeft:L.borderLeft[R],borderRight:L.borderRight[R]}))}),D}function z(S){for(var R;S.hasNode(R=c.uniqueId("_root")););return R}},45456:function(yt,Et,y){"use strict";var c=y(72361);yt.exports=_;function _(z,S){for(var R=0,w=1;w<S.length;++w)R+=I(z,S[w-1],S[w]);return R}function I(z,S,R){for(var w=c.zipObject(R,c.map(R,function(it,G){return G})),N=c.flatten(c.map(S,function(it){return c.sortBy(c.map(z.outEdges(it),function(G){return{pos:w[G.w],weight:z.edge(G).weight}}),"pos")}),!0),D=1;D<R.length;)D<<=1;var A=2*D-1;D-=1;var L=c.map(new Array(A),function(){return 0}),F=0;return c.forEach(N.forEach(function(it){var G=it.pos+D;L[G]+=it.weight;for(var kt=0;G>0;)G%2&&(kt+=L[G+1]),G=G-1>>1,L[G]+=it.weight;F+=it.weight*kt})),F}},62852:function(yt,Et,y){"use strict";var c=y(72361),_=y(18043),I=y(45456),z=y(86490),S=y(59105),R=y(52205),w=y(76626).Graph,N=y(53063);yt.exports=D;function D(it){var G=N.maxRank(it),kt=A(it,c.range(1,G+1),"inEdges"),gt=A(it,c.range(G-1,-1,-1),"outEdges"),Q=_(it);F(it,Q);for(var Rt=Number.POSITIVE_INFINITY,Ct,Ht=0,de=0;de<4;++Ht,++de){L(Ht%2?kt:gt,Ht%4>=2),Q=N.buildLayerMatrix(it);var ue=I(it,Q);ue<Rt&&(de=0,Ct=c.cloneDeep(Q),Rt=ue)}F(it,Ct)}function A(it,G,kt){return c.map(G,function(gt){return S(it,gt,kt)})}function L(it,G){var kt=new w;c.forEach(it,function(gt){var Q=gt.graph().root,Rt=z(gt,Q,kt,G);c.forEach(Rt.vs,function(Ct,Ht){gt.node(Ct).order=Ht}),R(gt,kt,Rt.vs)})}function F(it,G){c.forEach(G,function(kt){c.forEach(kt,function(gt,Q){it.node(gt).order=Q})})}},18043:function(yt,Et,y){"use strict";var c=y(72361);yt.exports=_;function _(I){var z={},S=c.filter(I.nodes(),function(A){return!I.children(A).length}),R=c.max(c.map(S,function(A){return I.node(A).rank})),w=c.map(c.range(R+1),function(){return[]});function N(A){if(!c.has(z,A)){z[A]=!0;var L=I.node(A);w[L.rank].push(A),c.forEach(I.successors(A),N)}}var D=c.sortBy(S,function(A){return I.node(A).rank});return c.forEach(D,N),w}},45926:function(yt,Et,y){"use strict";var c=y(72361);yt.exports=_;function _(S,R){var w={};c.forEach(S,function(D,A){var L=w[D.v]={indegree:0,in:[],out:[],vs:[D.v],i:A};c.isUndefined(D.barycenter)||(L.barycenter=D.barycenter,L.weight=D.weight)}),c.forEach(R.edges(),function(D){var A=w[D.v],L=w[D.w];!c.isUndefined(A)&&!c.isUndefined(L)&&(L.indegree++,A.out.push(w[D.w]))});var N=c.filter(w,function(D){return!D.indegree});return I(N)}function I(S){var R=[];function w(A){return function(L){L.merged||(c.isUndefined(L.barycenter)||c.isUndefined(A.barycenter)||L.barycenter>=A.barycenter)&&z(A,L)}}function N(A){return function(L){L.in.push(A),--L.indegree===0&&S.push(L)}}for(;S.length;){var D=S.pop();R.push(D),c.forEach(D.in.reverse(),w(D)),c.forEach(D.out,N(D))}return c.map(c.filter(R,function(A){return!A.merged}),function(A){return c.pick(A,["vs","i","barycenter","weight"])})}function z(S,R){var w=0,N=0;S.weight&&(w+=S.barycenter*S.weight,N+=S.weight),R.weight&&(w+=R.barycenter*R.weight,N+=R.weight),S.vs=R.vs.concat(S.vs),S.barycenter=w/N,S.weight=N,S.i=Math.min(R.i,S.i),R.merged=!0}},86490:function(yt,Et,y){var c=y(72361),_=y(99506),I=y(45926),z=y(1349);yt.exports=S;function S(N,D,A,L){var F=N.children(D),it=N.node(D),G=it?it.borderLeft:void 0,kt=it?it.borderRight:void 0,gt={};G&&(F=c.filter(F,function(ue){return ue!==G&&ue!==kt}));var Q=_(N,F);c.forEach(Q,function(ue){if(N.children(ue.v).length){var Te=S(N,ue.v,A,L);gt[ue.v]=Te,c.has(Te,"barycenter")&&w(ue,Te)}});var Rt=I(Q,A);R(Rt,gt);var Ct=z(Rt,L);if(G&&(Ct.vs=c.flatten([G,Ct.vs,kt],!0),N.predecessors(G).length)){var Ht=N.node(N.predecessors(G)[0]),de=N.node(N.predecessors(kt)[0]);c.has(Ct,"barycenter")||(Ct.barycenter=0,Ct.weight=0),Ct.barycenter=(Ct.barycenter*Ct.weight+Ht.order+de.order)/(Ct.weight+2),Ct.weight+=2}return Ct}function R(N,D){c.forEach(N,function(A){A.vs=c.flatten(A.vs.map(function(L){return D[L]?D[L].vs:L}),!0)})}function w(N,D){c.isUndefined(N.barycenter)?(N.barycenter=D.barycenter,N.weight=D.weight):(N.barycenter=(N.barycenter*N.weight+D.barycenter*D.weight)/(N.weight+D.weight),N.weight+=D.weight)}},1349:function(yt,Et,y){var c=y(72361),_=y(53063);yt.exports=I;function I(R,w){var N=_.partition(R,function(gt){return c.has(gt,"barycenter")}),D=N.lhs,A=c.sortBy(N.rhs,function(gt){return-gt.i}),L=[],F=0,it=0,G=0;D.sort(S(!!w)),G=z(L,A,G),c.forEach(D,function(gt){G+=gt.vs.length,L.push(gt.vs),F+=gt.barycenter*gt.weight,it+=gt.weight,G=z(L,A,G)});var kt={vs:c.flatten(L,!0)};return it&&(kt.barycenter=F/it,kt.weight=it),kt}function z(R,w,N){for(var D;w.length&&(D=c.last(w)).i<=N;)w.pop(),R.push(D.vs),N++;return N}function S(R){return function(w,N){return w.barycenter<N.barycenter?-1:w.barycenter>N.barycenter?1:R?N.i-w.i:w.i-N.i}}},71970:function(yt,Et,y){var c=y(72361);yt.exports=_;function _(S){var R=z(S);c.forEach(S.graph().dummyChains,function(w){for(var N=S.node(w),D=N.edgeObj,A=I(S,R,D.v,D.w),L=A.path,F=A.lca,it=0,G=L[it],kt=!0;w!==D.w;){if(N=S.node(w),kt){for(;(G=L[it])!==F&&S.node(G).maxRank<N.rank;)it++;G===F&&(kt=!1)}if(!kt){for(;it<L.length-1&&S.node(G=L[it+1]).minRank<=N.rank;)it++;G=L[it]}S.setParent(w,G),w=S.successors(w)[0]}})}function I(S,R,w,N){var D=[],A=[],L=Math.min(R[w].low,R[N].low),F=Math.max(R[w].lim,R[N].lim),it,G;it=w;do it=S.parent(it),D.push(it);while(it&&(R[it].low>L||F>R[it].lim));for(G=it,it=N;(it=S.parent(it))!==G;)A.push(it);return{path:D.concat(A.reverse()),lca:G}}function z(S){var R={},w=0;function N(D){var A=w;c.forEach(S.children(D),N),R[D]={low:A,lim:w++}}return c.forEach(S.children(),N),R}},92080:function(yt,Et,y){"use strict";var c=y(72361),_=y(76626).Graph,I=y(53063);yt.exports={positionX:kt,findType1Conflicts:z,findType2Conflicts:S,addConflict:w,hasConflict:N,verticalAlignment:D,horizontalCompaction:A,alignCoordinates:it,findSmallestWidthAlignment:F,balance:G};function z(Rt,Ct){var Ht={};function de(ue,Te){var be=0,we=0,re=ue.length,Ge=c.last(Te);return c.forEach(Te,function(rn,Xe){var En=R(Rt,rn),Pn=En?Rt.node(En).order:re;(En||rn===Ge)&&(c.forEach(Te.slice(we,Xe+1),function(tn){c.forEach(Rt.predecessors(tn),function(xn){var It=Rt.node(xn),Ee=It.order;(Ee<be||Pn<Ee)&&!(It.dummy&&Rt.node(tn).dummy)&&w(Ht,xn,tn)})}),we=Xe+1,be=Pn)}),Te}return c.reduce(Ct,de),Ht}function S(Rt,Ct){var Ht={};function de(Te,be,we,re,Ge){var rn;c.forEach(c.range(be,we),function(Xe){rn=Te[Xe],Rt.node(rn).dummy&&c.forEach(Rt.predecessors(rn),function(En){var Pn=Rt.node(En);Pn.dummy&&(Pn.order<re||Pn.order>Ge)&&w(Ht,En,rn)})})}function ue(Te,be){var we=-1,re,Ge=0;return c.forEach(be,function(rn,Xe){if(Rt.node(rn).dummy==="border"){var En=Rt.predecessors(rn);En.length&&(re=Rt.node(En[0]).order,de(be,Ge,Xe,we,re),Ge=Xe,we=re)}de(be,Ge,be.length,re,Te.length)}),be}return c.reduce(Ct,ue),Ht}function R(Rt,Ct){if(Rt.node(Ct).dummy)return c.find(Rt.predecessors(Ct),function(Ht){return Rt.node(Ht).dummy})}function w(Rt,Ct,Ht){if(Ct>Ht){var de=Ct;Ct=Ht,Ht=de}var ue=Rt[Ct];ue||(Rt[Ct]=ue={}),ue[Ht]=!0}function N(Rt,Ct,Ht){if(Ct>Ht){var de=Ct;Ct=Ht,Ht=de}return c.has(Rt[Ct],Ht)}function D(Rt,Ct,Ht,de){var ue={},Te={},be={};return c.forEach(Ct,function(we){c.forEach(we,function(re,Ge){ue[re]=re,Te[re]=re,be[re]=Ge})}),c.forEach(Ct,function(we){var re=-1;c.forEach(we,function(Ge){var rn=de(Ge);if(rn.length){rn=c.sortBy(rn,function(xn){return be[xn]});for(var Xe=(rn.length-1)/2,En=Math.floor(Xe),Pn=Math.ceil(Xe);En<=Pn;++En){var tn=rn[En];Te[Ge]===Ge&&re<be[tn]&&!N(Ht,Ge,tn)&&(Te[tn]=Ge,Te[Ge]=ue[Ge]=ue[tn],re=be[tn])}}})}),{root:ue,align:Te}}function A(Rt,Ct,Ht,de,ue){var Te={},be=L(Rt,Ct,Ht,ue),we=ue?"borderLeft":"borderRight";function re(Xe,En){for(var Pn=be.nodes(),tn=Pn.pop(),xn={};tn;)xn[tn]?Xe(tn):(xn[tn]=!0,Pn.push(tn),Pn=Pn.concat(En(tn))),tn=Pn.pop()}function Ge(Xe){Te[Xe]=be.inEdges(Xe).reduce(function(En,Pn){return Math.max(En,Te[Pn.v]+be.edge(Pn))},0)}function rn(Xe){var En=be.outEdges(Xe).reduce(function(tn,xn){return Math.min(tn,Te[xn.w]-be.edge(xn))},Number.POSITIVE_INFINITY),Pn=Rt.node(Xe);En!==Number.POSITIVE_INFINITY&&Pn.borderType!==we&&(Te[Xe]=Math.max(Te[Xe],En))}return re(Ge,be.predecessors.bind(be)),re(rn,be.successors.bind(be)),c.forEach(de,function(Xe){Te[Xe]=Te[Ht[Xe]]}),Te}function L(Rt,Ct,Ht,de){var ue=new _,Te=Rt.graph(),be=gt(Te.nodesep,Te.edgesep,de);return c.forEach(Ct,function(we){var re;c.forEach(we,function(Ge){var rn=Ht[Ge];if(ue.setNode(rn),re){var Xe=Ht[re],En=ue.edge(Xe,rn);ue.setEdge(Xe,rn,Math.max(be(Rt,Ge,re),En||0))}re=Ge})}),ue}function F(Rt,Ct){return c.minBy(c.values(Ct),function(Ht){var de=Number.NEGATIVE_INFINITY,ue=Number.POSITIVE_INFINITY;return c.forIn(Ht,function(Te,be){var we=Q(Rt,be)/2;de=Math.max(Te+we,de),ue=Math.min(Te-we,ue)}),de-ue})}function it(Rt,Ct){var Ht=c.values(Ct),de=c.min(Ht),ue=c.max(Ht);c.forEach(["u","d"],function(Te){c.forEach(["l","r"],function(be){var we=Te+be,re=Rt[we],Ge;if(re!==Ct){var rn=c.values(re);Ge=be==="l"?de-c.min(rn):ue-c.max(rn),Ge&&(Rt[we]=c.mapValues(re,function(Xe){return Xe+Ge}))}})})}function G(Rt,Ct){return c.mapValues(Rt.ul,function(Ht,de){if(Ct)return Rt[Ct.toLowerCase()][de];var ue=c.sortBy(c.map(Rt,de));return(ue[1]+ue[2])/2})}function kt(Rt){var Ct=I.buildLayerMatrix(Rt),Ht=c.merge(z(Rt,Ct),S(Rt,Ct)),de={},ue;c.forEach(["u","d"],function(be){ue=be==="u"?Ct:c.values(Ct).reverse(),c.forEach(["l","r"],function(we){we==="r"&&(ue=c.map(ue,function(Xe){return c.values(Xe).reverse()}));var re=(be==="u"?Rt.predecessors:Rt.successors).bind(Rt),Ge=D(Rt,ue,Ht,re),rn=A(Rt,ue,Ge.root,Ge.align,we==="r");we==="r"&&(rn=c.mapValues(rn,function(Xe){return-Xe})),de[be+we]=rn})});var Te=F(Rt,de);return it(de,Te),G(de,Rt.graph().align)}function gt(Rt,Ct,Ht){return function(de,ue,Te){var be=de.node(ue),we=de.node(Te),re=0,Ge;if(re+=be.width/2,c.has(be,"labelpos"))switch(be.labelpos.toLowerCase()){case"l":Ge=-be.width/2;break;case"r":Ge=be.width/2;break}if(Ge&&(re+=Ht?Ge:-Ge),Ge=0,re+=(be.dummy?Ct:Rt)/2,re+=(we.dummy?Ct:Rt)/2,re+=we.width/2,c.has(we,"labelpos"))switch(we.labelpos.toLowerCase()){case"l":Ge=we.width/2;break;case"r":Ge=-we.width/2;break}return Ge&&(re+=Ht?Ge:-Ge),Ge=0,re}}function Q(Rt,Ct){return Rt.node(Ct).width}},93021:function(yt,Et,y){"use strict";var c=y(72361),_=y(53063),I=y(92080).positionX;yt.exports=z;function z(R){R=_.asNonCompoundGraph(R),S(R),c.forEach(I(R),function(w,N){R.node(N).x=w})}function S(R){var w=_.buildLayerMatrix(R),N=R.graph().ranksep,D=0;c.forEach(w,function(A){var L=c.max(c.map(A,function(F){return R.node(F).height}));c.forEach(A,function(F){R.node(F).y=D+L/2}),D+=L+N})}},61031:function(yt,Et,y){"use strict";var c=y(72361),_=y(76626).Graph,I=y(2416).slack;yt.exports=z;function z(N){var D=new _({directed:!1}),A=N.nodes()[0],L=N.nodeCount();D.setNode(A,{});for(var F,it;S(D,N)<L;)F=R(D,N),it=D.hasNode(F.v)?I(N,F):-I(N,F),w(D,N,it);return D}function S(N,D){function A(L){c.forEach(D.nodeEdges(L),function(F){var it=F.v,G=L===it?F.w:it;!N.hasNode(G)&&!I(D,F)&&(N.setNode(G,{}),N.setEdge(L,G,{}),A(G))})}return c.forEach(N.nodes(),A),N.nodeCount()}function R(N,D){return c.minBy(D.edges(),function(A){if(N.hasNode(A.v)!==N.hasNode(A.w))return I(D,A)})}function w(N,D,A){c.forEach(N.nodes(),function(L){D.node(L).rank+=A})}},64505:function(yt,Et,y){"use strict";var c=y(2416),_=c.longestPath,I=y(61031),z=y(77076);yt.exports=S;function S(D){switch(D.graph().ranker){case"network-simplex":N(D);break;case"tight-tree":w(D);break;case"longest-path":R(D);break;default:N(D)}}var R=_;function w(D){_(D),I(D)}function N(D){z(D)}},77076:function(yt,Et,y){"use strict";var c=y(72361),_=y(61031),I=y(2416).slack,z=y(2416).longestPath,S=y(76626).alg.preorder,R=y(76626).alg.postorder,w=y(53063).simplify;yt.exports=N,N.initLowLimValues=F,N.initCutValues=D,N.calcCutValue=L,N.leaveEdge=G,N.enterEdge=kt,N.exchangeEdges=gt;function N(Ht){Ht=w(Ht),z(Ht);var de=_(Ht);F(de),D(de,Ht);for(var ue,Te;ue=G(de);)Te=kt(de,Ht,ue),gt(de,Ht,ue,Te)}function D(Ht,de){var ue=R(Ht,Ht.nodes());ue=ue.slice(0,ue.length-1),c.forEach(ue,function(Te){A(Ht,de,Te)})}function A(Ht,de,ue){var Te=Ht.node(ue),be=Te.parent;Ht.edge(ue,be).cutvalue=L(Ht,de,ue)}function L(Ht,de,ue){var Te=Ht.node(ue),be=Te.parent,we=!0,re=de.edge(ue,be),Ge=0;return re||(we=!1,re=de.edge(be,ue)),Ge=re.weight,c.forEach(de.nodeEdges(ue),function(rn){var Xe=rn.v===ue,En=Xe?rn.w:rn.v;if(En!==be){var Pn=Xe===we,tn=de.edge(rn).weight;if(Ge+=Pn?tn:-tn,Rt(Ht,ue,En)){var xn=Ht.edge(ue,En).cutvalue;Ge+=Pn?-xn:xn}}}),Ge}function F(Ht,de){arguments.length<2&&(de=Ht.nodes()[0]),it(Ht,{},1,de)}function it(Ht,de,ue,Te,be){var we=ue,re=Ht.node(Te);return de[Te]=!0,c.forEach(Ht.neighbors(Te),function(Ge){c.has(de,Ge)||(ue=it(Ht,de,ue,Ge,Te))}),re.low=we,re.lim=ue++,be?re.parent=be:delete re.parent,ue}function G(Ht){return c.find(Ht.edges(),function(de){return Ht.edge(de).cutvalue<0})}function kt(Ht,de,ue){var Te=ue.v,be=ue.w;de.hasEdge(Te,be)||(Te=ue.w,be=ue.v);var we=Ht.node(Te),re=Ht.node(be),Ge=we,rn=!1;we.lim>re.lim&&(Ge=re,rn=!0);var Xe=c.filter(de.edges(),function(En){return rn===Ct(Ht,Ht.node(En.v),Ge)&&rn!==Ct(Ht,Ht.node(En.w),Ge)});return c.minBy(Xe,function(En){return I(de,En)})}function gt(Ht,de,ue,Te){var be=ue.v,we=ue.w;Ht.removeEdge(be,we),Ht.setEdge(Te.v,Te.w,{}),F(Ht),D(Ht,de),Q(Ht,de)}function Q(Ht,de){var ue=c.find(Ht.nodes(),function(be){return!de.node(be).parent}),Te=S(Ht,ue);Te=Te.slice(1),c.forEach(Te,function(be){var we=Ht.node(be).parent,re=de.edge(be,we),Ge=!1;re||(re=de.edge(we,be),Ge=!0),de.node(be).rank=de.node(we).rank+(Ge?re.minlen:-re.minlen)})}function Rt(Ht,de,ue){return Ht.hasEdge(de,ue)}function Ct(Ht,de,ue){return ue.low<=de.lim&&de.lim<=ue.lim}},2416:function(yt,Et,y){"use strict";var c=y(72361);yt.exports={longestPath:_,slack:I};function _(z){var S={};function R(w){var N=z.node(w);if(c.has(S,w))return N.rank;S[w]=!0;var D=c.min(c.map(z.outEdges(w),function(A){return R(A.w)-z.edge(A).minlen}));return(D===Number.POSITIVE_INFINITY||D===void 0||D===null)&&(D=0),N.rank=D}c.forEach(z.sources(),R)}function I(z,S){return z.node(S.w).rank-z.node(S.v).rank-z.edge(S).minlen}},53063:function(yt,Et,y){"use strict";var c=y(72361),_=y(76626).Graph;yt.exports={addDummyNode:I,simplify:z,asNonCompoundGraph:S,successorWeights:R,predecessorWeights:w,intersectRect:N,buildLayerMatrix:D,normalizeRanks:A,removeEmptyRanks:L,addBorderNode:F,maxRank:it,partition:G,time:kt,notime:gt};function I(Q,Rt,Ct,Ht){var de;do de=c.uniqueId(Ht);while(Q.hasNode(de));return Ct.dummy=Rt,Q.setNode(de,Ct),de}function z(Q){var Rt=new _().setGraph(Q.graph());return c.forEach(Q.nodes(),function(Ct){Rt.setNode(Ct,Q.node(Ct))}),c.forEach(Q.edges(),function(Ct){var Ht=Rt.edge(Ct.v,Ct.w)||{weight:0,minlen:1},de=Q.edge(Ct);Rt.setEdge(Ct.v,Ct.w,{weight:Ht.weight+de.weight,minlen:Math.max(Ht.minlen,de.minlen)})}),Rt}function S(Q){var Rt=new _({multigraph:Q.isMultigraph()}).setGraph(Q.graph());return c.forEach(Q.nodes(),function(Ct){Q.children(Ct).length||Rt.setNode(Ct,Q.node(Ct))}),c.forEach(Q.edges(),function(Ct){Rt.setEdge(Ct,Q.edge(Ct))}),Rt}function R(Q){var Rt=c.map(Q.nodes(),function(Ct){var Ht={};return c.forEach(Q.outEdges(Ct),function(de){Ht[de.w]=(Ht[de.w]||0)+Q.edge(de).weight}),Ht});return c.zipObject(Q.nodes(),Rt)}function w(Q){var Rt=c.map(Q.nodes(),function(Ct){var Ht={};return c.forEach(Q.inEdges(Ct),function(de){Ht[de.v]=(Ht[de.v]||0)+Q.edge(de).weight}),Ht});return c.zipObject(Q.nodes(),Rt)}function N(Q,Rt){var Ct=Q.x,Ht=Q.y,de=Rt.x-Ct,ue=Rt.y-Ht,Te=Q.width/2,be=Q.height/2;if(!de&&!ue)throw new Error("Not possible to find intersection inside of the rectangle");var we,re;return Math.abs(ue)*Te>Math.abs(de)*be?(ue<0&&(be=-be),we=be*de/ue,re=be):(de<0&&(Te=-Te),we=Te,re=Te*ue/de),{x:Ct+we,y:Ht+re}}function D(Q){var Rt=c.map(c.range(it(Q)+1),function(){return[]});return c.forEach(Q.nodes(),function(Ct){var Ht=Q.node(Ct),de=Ht.rank;c.isUndefined(de)||(Rt[de][Ht.order]=Ct)}),Rt}function A(Q){var Rt=c.min(c.map(Q.nodes(),function(Ct){return Q.node(Ct).rank}));c.forEach(Q.nodes(),function(Ct){var Ht=Q.node(Ct);c.has(Ht,"rank")&&(Ht.rank-=Rt)})}function L(Q){var Rt=c.min(c.map(Q.nodes(),function(ue){return Q.node(ue).rank})),Ct=[];c.forEach(Q.nodes(),function(ue){var Te=Q.node(ue).rank-Rt;Ct[Te]||(Ct[Te]=[]),Ct[Te].push(ue)});var Ht=0,de=Q.graph().nodeRankFactor;c.forEach(Ct,function(ue,Te){c.isUndefined(ue)&&Te%de!==0?--Ht:Ht&&c.forEach(ue,function(be){Q.node(be).rank+=Ht})})}function F(Q,Rt,Ct,Ht){var de={width:0,height:0};return arguments.length>=4&&(de.rank=Ct,de.order=Ht),I(Q,"border",de,Rt)}function it(Q){return c.max(c.map(Q.nodes(),function(Rt){var Ct=Q.node(Rt).rank;if(!c.isUndefined(Ct))return Ct}))}function G(Q,Rt){var Ct={lhs:[],rhs:[]};return c.forEach(Q,function(Ht){Rt(Ht)?Ct.lhs.push(Ht):Ct.rhs.push(Ht)}),Ct}function kt(Q,Rt){var Ct=c.now();try{return Rt()}finally{console.log(Q+" time: "+(c.now()-Ct)+"ms")}}function gt(Q,Rt){return Rt()}},11897:function(yt){yt.exports="0.8.5"},37271:function(yt){"use strict";var Et=Object.prototype.hasOwnProperty,y="~";function c(){}Object.create&&(c.prototype=Object.create(null),new c().__proto__||(y=!1));function _(R,w,N){this.fn=R,this.context=w,this.once=N||!1}function I(R,w,N,D,A){if(typeof N!="function")throw new TypeError("The listener must be a function");var L=new _(N,D||R,A),F=y?y+w:w;return R._events[F]?R._events[F].fn?R._events[F]=[R._events[F],L]:R._events[F].push(L):(R._events[F]=L,R._eventsCount++),R}function z(R,w){--R._eventsCount===0?R._events=new c:delete R._events[w]}function S(){this._events=new c,this._eventsCount=0}S.prototype.eventNames=function(){var w=[],N,D;if(this._eventsCount===0)return w;for(D in N=this._events)Et.call(N,D)&&w.push(y?D.slice(1):D);return Object.getOwnPropertySymbols?w.concat(Object.getOwnPropertySymbols(N)):w},S.prototype.listeners=function(w){var N=y?y+w:w,D=this._events[N];if(!D)return[];if(D.fn)return[D.fn];for(var A=0,L=D.length,F=new Array(L);A<L;A++)F[A]=D[A].fn;return F},S.prototype.listenerCount=function(w){var N=y?y+w:w,D=this._events[N];return D?D.fn?1:D.length:0},S.prototype.emit=function(w,N,D,A,L,F){var it=y?y+w:w;if(!this._events[it])return!1;var G=this._events[it],kt=arguments.length,gt,Q;if(G.fn){switch(G.once&&this.removeListener(w,G.fn,void 0,!0),kt){case 1:return G.fn.call(G.context),!0;case 2:return G.fn.call(G.context,N),!0;case 3:return G.fn.call(G.context,N,D),!0;case 4:return G.fn.call(G.context,N,D,A),!0;case 5:return G.fn.call(G.context,N,D,A,L),!0;case 6:return G.fn.call(G.context,N,D,A,L,F),!0}for(Q=1,gt=new Array(kt-1);Q<kt;Q++)gt[Q-1]=arguments[Q];G.fn.apply(G.context,gt)}else{var Rt=G.length,Ct;for(Q=0;Q<Rt;Q++)switch(G[Q].once&&this.removeListener(w,G[Q].fn,void 0,!0),kt){case 1:G[Q].fn.call(G[Q].context);break;case 2:G[Q].fn.call(G[Q].context,N);break;case 3:G[Q].fn.call(G[Q].context,N,D);break;case 4:G[Q].fn.call(G[Q].context,N,D,A);break;default:if(!gt)for(Ct=1,gt=new Array(kt-1);Ct<kt;Ct++)gt[Ct-1]=arguments[Ct];G[Q].fn.apply(G[Q].context,gt)}}return!0},S.prototype.on=function(w,N,D){return I(this,w,N,D,!1)},S.prototype.once=function(w,N,D){return I(this,w,N,D,!0)},S.prototype.removeListener=function(w,N,D,A){var L=y?y+w:w;if(!this._events[L])return this;if(!N)return z(this,L),this;var F=this._events[L];if(F.fn)F.fn===N&&(!A||F.once)&&(!D||F.context===D)&&z(this,L);else{for(var it=0,G=[],kt=F.length;it<kt;it++)(F[it].fn!==N||A&&!F[it].once||D&&F[it].context!==D)&&G.push(F[it]);G.length?this._events[L]=G.length===1?G[0]:G:z(this,L)}return this},S.prototype.removeAllListeners=function(w){var N;return w?(N=y?y+w:w,this._events[N]&&z(this,N)):(this._events=new c,this._eventsCount=0),this},S.prototype.off=S.prototype.removeListener,S.prototype.addListener=S.prototype.on,S.prefixed=y,S.EventEmitter=S,yt.exports=S},85551:function(yt,Et,y){"use strict";y.d(Et,{Ib:function(){return c},WT:function(){return _},yy:function(){return z}});var c=1e-6,_=typeof Float32Array!="undefined"?Float32Array:Array,I=Math.random,z="zyx";function S(F){return F>=0?Math.round(F):F%.5===0?Math.floor(F):Math.round(F)}function R(F){_=F}var w=Math.PI/180,N=180/Math.PI;function D(F){return F*w}function A(F){return F*N}function L(F,it){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:c;return Math.abs(F-it)<=G*Math.max(1,Math.abs(F),Math.abs(it))}},79111:function(yt,Et,y){"use strict";y.d(Et,{Ue:function(){return _},al:function(){return R},xO:function(){return I}});var c=y(85551);function _(){var It=new c.WT(9);return c.WT!=Float32Array&&(It[1]=0,It[2]=0,It[3]=0,It[5]=0,It[6]=0,It[7]=0),It[0]=1,It[4]=1,It[8]=1,It}function I(It,Ee){return It[0]=Ee[0],It[1]=Ee[1],It[2]=Ee[2],It[3]=Ee[4],It[4]=Ee[5],It[5]=Ee[6],It[6]=Ee[8],It[7]=Ee[9],It[8]=Ee[10],It}function z(It){var Ee=new glMatrix.ARRAY_TYPE(9);return Ee[0]=It[0],Ee[1]=It[1],Ee[2]=It[2],Ee[3]=It[3],Ee[4]=It[4],Ee[5]=It[5],Ee[6]=It[6],Ee[7]=It[7],Ee[8]=It[8],Ee}function S(It,Ee){return It[0]=Ee[0],It[1]=Ee[1],It[2]=Ee[2],It[3]=Ee[3],It[4]=Ee[4],It[5]=Ee[5],It[6]=Ee[6],It[7]=Ee[7],It[8]=Ee[8],It}function R(It,Ee,fn,on,Pe,Ze,Ke,le,Ae){var Pt=new c.WT(9);return Pt[0]=It,Pt[1]=Ee,Pt[2]=fn,Pt[3]=on,Pt[4]=Pe,Pt[5]=Ze,Pt[6]=Ke,Pt[7]=le,Pt[8]=Ae,Pt}function w(It,Ee,fn,on,Pe,Ze,Ke,le,Ae,Pt){return It[0]=Ee,It[1]=fn,It[2]=on,It[3]=Pe,It[4]=Ze,It[5]=Ke,It[6]=le,It[7]=Ae,It[8]=Pt,It}function N(It){return It[0]=1,It[1]=0,It[2]=0,It[3]=0,It[4]=1,It[5]=0,It[6]=0,It[7]=0,It[8]=1,It}function D(It,Ee){if(It===Ee){var fn=Ee[1],on=Ee[2],Pe=Ee[5];It[1]=Ee[3],It[2]=Ee[6],It[3]=fn,It[5]=Ee[7],It[6]=on,It[7]=Pe}else It[0]=Ee[0],It[1]=Ee[3],It[2]=Ee[6],It[3]=Ee[1],It[4]=Ee[4],It[5]=Ee[7],It[6]=Ee[2],It[7]=Ee[5],It[8]=Ee[8];return It}function A(It,Ee){var fn=Ee[0],on=Ee[1],Pe=Ee[2],Ze=Ee[3],Ke=Ee[4],le=Ee[5],Ae=Ee[6],Pt=Ee[7],wt=Ee[8],he=wt*Ke-le*Pt,je=-wt*Ze+le*Ae,Re=Pt*Ze-Ke*Ae,ce=fn*he+on*je+Pe*Re;return ce?(ce=1/ce,It[0]=he*ce,It[1]=(-wt*on+Pe*Pt)*ce,It[2]=(le*on-Pe*Ke)*ce,It[3]=je*ce,It[4]=(wt*fn-Pe*Ae)*ce,It[5]=(-le*fn+Pe*Ze)*ce,It[6]=Re*ce,It[7]=(-Pt*fn+on*Ae)*ce,It[8]=(Ke*fn-on*Ze)*ce,It):null}function L(It,Ee){var fn=Ee[0],on=Ee[1],Pe=Ee[2],Ze=Ee[3],Ke=Ee[4],le=Ee[5],Ae=Ee[6],Pt=Ee[7],wt=Ee[8];return It[0]=Ke*wt-le*Pt,It[1]=Pe*Pt-on*wt,It[2]=on*le-Pe*Ke,It[3]=le*Ae-Ze*wt,It[4]=fn*wt-Pe*Ae,It[5]=Pe*Ze-fn*le,It[6]=Ze*Pt-Ke*Ae,It[7]=on*Ae-fn*Pt,It[8]=fn*Ke-on*Ze,It}function F(It){var Ee=It[0],fn=It[1],on=It[2],Pe=It[3],Ze=It[4],Ke=It[5],le=It[6],Ae=It[7],Pt=It[8];return Ee*(Pt*Ze-Ke*Ae)+fn*(-Pt*Pe+Ke*le)+on*(Ae*Pe-Ze*le)}function it(It,Ee,fn){var on=Ee[0],Pe=Ee[1],Ze=Ee[2],Ke=Ee[3],le=Ee[4],Ae=Ee[5],Pt=Ee[6],wt=Ee[7],he=Ee[8],je=fn[0],Re=fn[1],ce=fn[2],Le=fn[3],xe=fn[4],_t=fn[5],ie=fn[6],Me=fn[7],T=fn[8];return It[0]=je*on+Re*Ke+ce*Pt,It[1]=je*Pe+Re*le+ce*wt,It[2]=je*Ze+Re*Ae+ce*he,It[3]=Le*on+xe*Ke+_t*Pt,It[4]=Le*Pe+xe*le+_t*wt,It[5]=Le*Ze+xe*Ae+_t*he,It[6]=ie*on+Me*Ke+T*Pt,It[7]=ie*Pe+Me*le+T*wt,It[8]=ie*Ze+Me*Ae+T*he,It}function G(It,Ee,fn){var on=Ee[0],Pe=Ee[1],Ze=Ee[2],Ke=Ee[3],le=Ee[4],Ae=Ee[5],Pt=Ee[6],wt=Ee[7],he=Ee[8],je=fn[0],Re=fn[1];return It[0]=on,It[1]=Pe,It[2]=Ze,It[3]=Ke,It[4]=le,It[5]=Ae,It[6]=je*on+Re*Ke+Pt,It[7]=je*Pe+Re*le+wt,It[8]=je*Ze+Re*Ae+he,It}function kt(It,Ee,fn){var on=Ee[0],Pe=Ee[1],Ze=Ee[2],Ke=Ee[3],le=Ee[4],Ae=Ee[5],Pt=Ee[6],wt=Ee[7],he=Ee[8],je=Math.sin(fn),Re=Math.cos(fn);return It[0]=Re*on+je*Ke,It[1]=Re*Pe+je*le,It[2]=Re*Ze+je*Ae,It[3]=Re*Ke-je*on,It[4]=Re*le-je*Pe,It[5]=Re*Ae-je*Ze,It[6]=Pt,It[7]=wt,It[8]=he,It}function gt(It,Ee,fn){var on=fn[0],Pe=fn[1];return It[0]=on*Ee[0],It[1]=on*Ee[1],It[2]=on*Ee[2],It[3]=Pe*Ee[3],It[4]=Pe*Ee[4],It[5]=Pe*Ee[5],It[6]=Ee[6],It[7]=Ee[7],It[8]=Ee[8],It}function Q(It,Ee){return It[0]=1,It[1]=0,It[2]=0,It[3]=0,It[4]=1,It[5]=0,It[6]=Ee[0],It[7]=Ee[1],It[8]=1,It}function Rt(It,Ee){var fn=Math.sin(Ee),on=Math.cos(Ee);return It[0]=on,It[1]=fn,It[2]=0,It[3]=-fn,It[4]=on,It[5]=0,It[6]=0,It[7]=0,It[8]=1,It}function Ct(It,Ee){return It[0]=Ee[0],It[1]=0,It[2]=0,It[3]=0,It[4]=Ee[1],It[5]=0,It[6]=0,It[7]=0,It[8]=1,It}function Ht(It,Ee){return It[0]=Ee[0],It[1]=Ee[1],It[2]=0,It[3]=Ee[2],It[4]=Ee[3],It[5]=0,It[6]=Ee[4],It[7]=Ee[5],It[8]=1,It}function de(It,Ee){var fn=Ee[0],on=Ee[1],Pe=Ee[2],Ze=Ee[3],Ke=fn+fn,le=on+on,Ae=Pe+Pe,Pt=fn*Ke,wt=on*Ke,he=on*le,je=Pe*Ke,Re=Pe*le,ce=Pe*Ae,Le=Ze*Ke,xe=Ze*le,_t=Ze*Ae;return It[0]=1-he-ce,It[3]=wt-_t,It[6]=je+xe,It[1]=wt+_t,It[4]=1-Pt-ce,It[7]=Re-Le,It[2]=je-xe,It[5]=Re+Le,It[8]=1-Pt-he,It}function ue(It,Ee){var fn=Ee[0],on=Ee[1],Pe=Ee[2],Ze=Ee[3],Ke=Ee[4],le=Ee[5],Ae=Ee[6],Pt=Ee[7],wt=Ee[8],he=Ee[9],je=Ee[10],Re=Ee[11],ce=Ee[12],Le=Ee[13],xe=Ee[14],_t=Ee[15],ie=fn*le-on*Ke,Me=fn*Ae-Pe*Ke,T=fn*Pt-Ze*Ke,at=on*Ae-Pe*le,fe=on*Pt-Ze*le,Jt=Pe*Pt-Ze*Ae,Ie=wt*Le-he*ce,Ne=wt*xe-je*ce,en=wt*_t-Re*ce,St=he*xe-je*Le,tt=he*_t-Re*Le,Nt=je*_t-Re*xe,Xt=ie*Nt-Me*tt+T*St+at*en-fe*Ne+Jt*Ie;return Xt?(Xt=1/Xt,It[0]=(le*Nt-Ae*tt+Pt*St)*Xt,It[1]=(Ae*en-Ke*Nt-Pt*Ne)*Xt,It[2]=(Ke*tt-le*en+Pt*Ie)*Xt,It[3]=(Pe*tt-on*Nt-Ze*St)*Xt,It[4]=(fn*Nt-Pe*en+Ze*Ne)*Xt,It[5]=(on*en-fn*tt-Ze*Ie)*Xt,It[6]=(Le*Jt-xe*fe+_t*at)*Xt,It[7]=(xe*T-ce*Jt-_t*Me)*Xt,It[8]=(ce*fe-Le*T+_t*ie)*Xt,It):null}function Te(It,Ee,fn){return It[0]=2/Ee,It[1]=0,It[2]=0,It[3]=0,It[4]=-2/fn,It[5]=0,It[6]=-1,It[7]=1,It[8]=1,It}function be(It){return"mat3("+It[0]+", "+It[1]+", "+It[2]+", "+It[3]+", "+It[4]+", "+It[5]+", "+It[6]+", "+It[7]+", "+It[8]+")"}function we(It){return Math.sqrt(It[0]*It[0]+It[1]*It[1]+It[2]*It[2]+It[3]*It[3]+It[4]*It[4]+It[5]*It[5]+It[6]*It[6]+It[7]*It[7]+It[8]*It[8])}function re(It,Ee,fn){return It[0]=Ee[0]+fn[0],It[1]=Ee[1]+fn[1],It[2]=Ee[2]+fn[2],It[3]=Ee[3]+fn[3],It[4]=Ee[4]+fn[4],It[5]=Ee[5]+fn[5],It[6]=Ee[6]+fn[6],It[7]=Ee[7]+fn[7],It[8]=Ee[8]+fn[8],It}function Ge(It,Ee,fn){return It[0]=Ee[0]-fn[0],It[1]=Ee[1]-fn[1],It[2]=Ee[2]-fn[2],It[3]=Ee[3]-fn[3],It[4]=Ee[4]-fn[4],It[5]=Ee[5]-fn[5],It[6]=Ee[6]-fn[6],It[7]=Ee[7]-fn[7],It[8]=Ee[8]-fn[8],It}function rn(It,Ee,fn){return It[0]=Ee[0]*fn,It[1]=Ee[1]*fn,It[2]=Ee[2]*fn,It[3]=Ee[3]*fn,It[4]=Ee[4]*fn,It[5]=Ee[5]*fn,It[6]=Ee[6]*fn,It[7]=Ee[7]*fn,It[8]=Ee[8]*fn,It}function Xe(It,Ee,fn,on){return It[0]=Ee[0]+fn[0]*on,It[1]=Ee[1]+fn[1]*on,It[2]=Ee[2]+fn[2]*on,It[3]=Ee[3]+fn[3]*on,It[4]=Ee[4]+fn[4]*on,It[5]=Ee[5]+fn[5]*on,It[6]=Ee[6]+fn[6]*on,It[7]=Ee[7]+fn[7]*on,It[8]=Ee[8]+fn[8]*on,It}function En(It,Ee){return It[0]===Ee[0]&&It[1]===Ee[1]&&It[2]===Ee[2]&&It[3]===Ee[3]&&It[4]===Ee[4]&&It[5]===Ee[5]&&It[6]===Ee[6]&&It[7]===Ee[7]&&It[8]===Ee[8]}function Pn(It,Ee){var fn=It[0],on=It[1],Pe=It[2],Ze=It[3],Ke=It[4],le=It[5],Ae=It[6],Pt=It[7],wt=It[8],he=Ee[0],je=Ee[1],Re=Ee[2],ce=Ee[3],Le=Ee[4],xe=Ee[5],_t=Ee[6],ie=Ee[7],Me=Ee[8];return Math.abs(fn-he)<=glMatrix.EPSILON*Math.max(1,Math.abs(fn),Math.abs(he))&&Math.abs(on-je)<=glMatrix.EPSILON*Math.max(1,Math.abs(on),Math.abs(je))&&Math.abs(Pe-Re)<=glMatrix.EPSILON*Math.max(1,Math.abs(Pe),Math.abs(Re))&&Math.abs(Ze-ce)<=glMatrix.EPSILON*Math.max(1,Math.abs(Ze),Math.abs(ce))&&Math.abs(Ke-Le)<=glMatrix.EPSILON*Math.max(1,Math.abs(Ke),Math.abs(Le))&&Math.abs(le-xe)<=glMatrix.EPSILON*Math.max(1,Math.abs(le),Math.abs(xe))&&Math.abs(Ae-_t)<=glMatrix.EPSILON*Math.max(1,Math.abs(Ae),Math.abs(_t))&&Math.abs(Pt-ie)<=glMatrix.EPSILON*Math.max(1,Math.abs(Pt),Math.abs(ie))&&Math.abs(wt-Me)<=glMatrix.EPSILON*Math.max(1,Math.abs(wt),Math.abs(Me))}var tn=null,xn=null},60187:function(yt,Et,y){"use strict";y.r(Et),y.d(Et,{add:function(){return je},adjoint:function(){return A},clone:function(){return I},copy:function(){return z},create:function(){return _},decompose:function(){return En},determinant:function(){return L},equals:function(){return _t},exactEquals:function(){return xe},frob:function(){return he},fromQuat:function(){return xn},fromQuat2:function(){return re},fromRotation:function(){return de},fromRotationTranslation:function(){return we},fromRotationTranslationScale:function(){return Pn},fromRotationTranslationScaleOrigin:function(){return tn},fromScaling:function(){return Ht},fromTranslation:function(){return Ct},fromValues:function(){return S},fromXRotation:function(){return ue},fromYRotation:function(){return Te},fromZRotation:function(){return be},frustum:function(){return It},getRotation:function(){return Xe},getScaling:function(){return rn},getTranslation:function(){return Ge},identity:function(){return w},invert:function(){return D},lookAt:function(){return Ae},mul:function(){return ie},multiply:function(){return F},multiplyScalar:function(){return ce},multiplyScalarAndAdd:function(){return Le},ortho:function(){return Ke},orthoNO:function(){return Ze},orthoZO:function(){return le},perspective:function(){return fn},perspectiveFromFieldOfView:function(){return Pe},perspectiveNO:function(){return Ee},perspectiveZO:function(){return on},rotate:function(){return kt},rotateX:function(){return gt},rotateY:function(){return Q},rotateZ:function(){return Rt},scale:function(){return G},set:function(){return R},str:function(){return wt},sub:function(){return Me},subtract:function(){return Re},targetTo:function(){return Pt},translate:function(){return it},transpose:function(){return N}});var c=y(85551);function _(){var T=new c.WT(16);return c.WT!=Float32Array&&(T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[11]=0,T[12]=0,T[13]=0,T[14]=0),T[0]=1,T[5]=1,T[10]=1,T[15]=1,T}function I(T){var at=new c.WT(16);return at[0]=T[0],at[1]=T[1],at[2]=T[2],at[3]=T[3],at[4]=T[4],at[5]=T[5],at[6]=T[6],at[7]=T[7],at[8]=T[8],at[9]=T[9],at[10]=T[10],at[11]=T[11],at[12]=T[12],at[13]=T[13],at[14]=T[14],at[15]=T[15],at}function z(T,at){return T[0]=at[0],T[1]=at[1],T[2]=at[2],T[3]=at[3],T[4]=at[4],T[5]=at[5],T[6]=at[6],T[7]=at[7],T[8]=at[8],T[9]=at[9],T[10]=at[10],T[11]=at[11],T[12]=at[12],T[13]=at[13],T[14]=at[14],T[15]=at[15],T}function S(T,at,fe,Jt,Ie,Ne,en,St,tt,Nt,Xt,Lt,Zt,Ut,qt,se){var te=new c.WT(16);return te[0]=T,te[1]=at,te[2]=fe,te[3]=Jt,te[4]=Ie,te[5]=Ne,te[6]=en,te[7]=St,te[8]=tt,te[9]=Nt,te[10]=Xt,te[11]=Lt,te[12]=Zt,te[13]=Ut,te[14]=qt,te[15]=se,te}function R(T,at,fe,Jt,Ie,Ne,en,St,tt,Nt,Xt,Lt,Zt,Ut,qt,se,te){return T[0]=at,T[1]=fe,T[2]=Jt,T[3]=Ie,T[4]=Ne,T[5]=en,T[6]=St,T[7]=tt,T[8]=Nt,T[9]=Xt,T[10]=Lt,T[11]=Zt,T[12]=Ut,T[13]=qt,T[14]=se,T[15]=te,T}function w(T){return T[0]=1,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=1,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[10]=1,T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T}function N(T,at){if(T===at){var fe=at[1],Jt=at[2],Ie=at[3],Ne=at[6],en=at[7],St=at[11];T[1]=at[4],T[2]=at[8],T[3]=at[12],T[4]=fe,T[6]=at[9],T[7]=at[13],T[8]=Jt,T[9]=Ne,T[11]=at[14],T[12]=Ie,T[13]=en,T[14]=St}else T[0]=at[0],T[1]=at[4],T[2]=at[8],T[3]=at[12],T[4]=at[1],T[5]=at[5],T[6]=at[9],T[7]=at[13],T[8]=at[2],T[9]=at[6],T[10]=at[10],T[11]=at[14],T[12]=at[3],T[13]=at[7],T[14]=at[11],T[15]=at[15];return T}function D(T,at){var fe=at[0],Jt=at[1],Ie=at[2],Ne=at[3],en=at[4],St=at[5],tt=at[6],Nt=at[7],Xt=at[8],Lt=at[9],Zt=at[10],Ut=at[11],qt=at[12],se=at[13],te=at[14],ke=at[15],He=fe*St-Jt*en,Ve=fe*tt-Ie*en,ln=fe*Nt-Ne*en,On=Jt*tt-Ie*St,yn=Jt*Nt-Ne*St,lr=Ie*Nt-Ne*tt,Zn=Xt*se-Lt*qt,Yn=Xt*te-Zt*qt,ye=Xt*ke-Ut*qt,xr=Lt*te-Zt*se,Hn=Lt*ke-Ut*se,Br=Zt*ke-Ut*te,Ar=He*Br-Ve*Hn+ln*xr+On*ye-yn*Yn+lr*Zn;return Ar?(Ar=1/Ar,T[0]=(St*Br-tt*Hn+Nt*xr)*Ar,T[1]=(Ie*Hn-Jt*Br-Ne*xr)*Ar,T[2]=(se*lr-te*yn+ke*On)*Ar,T[3]=(Zt*yn-Lt*lr-Ut*On)*Ar,T[4]=(tt*ye-en*Br-Nt*Yn)*Ar,T[5]=(fe*Br-Ie*ye+Ne*Yn)*Ar,T[6]=(te*ln-qt*lr-ke*Ve)*Ar,T[7]=(Xt*lr-Zt*ln+Ut*Ve)*Ar,T[8]=(en*Hn-St*ye+Nt*Zn)*Ar,T[9]=(Jt*ye-fe*Hn-Ne*Zn)*Ar,T[10]=(qt*yn-se*ln+ke*He)*Ar,T[11]=(Lt*ln-Xt*yn-Ut*He)*Ar,T[12]=(St*Yn-en*xr-tt*Zn)*Ar,T[13]=(fe*xr-Jt*Yn+Ie*Zn)*Ar,T[14]=(se*Ve-qt*On-te*He)*Ar,T[15]=(Xt*On-Lt*Ve+Zt*He)*Ar,T):null}function A(T,at){var fe=at[0],Jt=at[1],Ie=at[2],Ne=at[3],en=at[4],St=at[5],tt=at[6],Nt=at[7],Xt=at[8],Lt=at[9],Zt=at[10],Ut=at[11],qt=at[12],se=at[13],te=at[14],ke=at[15],He=fe*St-Jt*en,Ve=fe*tt-Ie*en,ln=fe*Nt-Ne*en,On=Jt*tt-Ie*St,yn=Jt*Nt-Ne*St,lr=Ie*Nt-Ne*tt,Zn=Xt*se-Lt*qt,Yn=Xt*te-Zt*qt,ye=Xt*ke-Ut*qt,xr=Lt*te-Zt*se,Hn=Lt*ke-Ut*se,Br=Zt*ke-Ut*te;return T[0]=St*Br-tt*Hn+Nt*xr,T[1]=Ie*Hn-Jt*Br-Ne*xr,T[2]=se*lr-te*yn+ke*On,T[3]=Zt*yn-Lt*lr-Ut*On,T[4]=tt*ye-en*Br-Nt*Yn,T[5]=fe*Br-Ie*ye+Ne*Yn,T[6]=te*ln-qt*lr-ke*Ve,T[7]=Xt*lr-Zt*ln+Ut*Ve,T[8]=en*Hn-St*ye+Nt*Zn,T[9]=Jt*ye-fe*Hn-Ne*Zn,T[10]=qt*yn-se*ln+ke*He,T[11]=Lt*ln-Xt*yn-Ut*He,T[12]=St*Yn-en*xr-tt*Zn,T[13]=fe*xr-Jt*Yn+Ie*Zn,T[14]=se*Ve-qt*On-te*He,T[15]=Xt*On-Lt*Ve+Zt*He,T}function L(T){var at=T[0],fe=T[1],Jt=T[2],Ie=T[3],Ne=T[4],en=T[5],St=T[6],tt=T[7],Nt=T[8],Xt=T[9],Lt=T[10],Zt=T[11],Ut=T[12],qt=T[13],se=T[14],te=T[15],ke=at*en-fe*Ne,He=at*St-Jt*Ne,Ve=fe*St-Jt*en,ln=Nt*qt-Xt*Ut,On=Nt*se-Lt*Ut,yn=Xt*se-Lt*qt,lr=at*yn-fe*On+Jt*ln,Zn=Ne*yn-en*On+St*ln,Yn=Nt*Ve-Xt*He+Lt*ke,ye=Ut*Ve-qt*He+se*ke;return tt*lr-Ie*Zn+te*Yn-Zt*ye}function F(T,at,fe){var Jt=at[0],Ie=at[1],Ne=at[2],en=at[3],St=at[4],tt=at[5],Nt=at[6],Xt=at[7],Lt=at[8],Zt=at[9],Ut=at[10],qt=at[11],se=at[12],te=at[13],ke=at[14],He=at[15],Ve=fe[0],ln=fe[1],On=fe[2],yn=fe[3];return T[0]=Ve*Jt+ln*St+On*Lt+yn*se,T[1]=Ve*Ie+ln*tt+On*Zt+yn*te,T[2]=Ve*Ne+ln*Nt+On*Ut+yn*ke,T[3]=Ve*en+ln*Xt+On*qt+yn*He,Ve=fe[4],ln=fe[5],On=fe[6],yn=fe[7],T[4]=Ve*Jt+ln*St+On*Lt+yn*se,T[5]=Ve*Ie+ln*tt+On*Zt+yn*te,T[6]=Ve*Ne+ln*Nt+On*Ut+yn*ke,T[7]=Ve*en+ln*Xt+On*qt+yn*He,Ve=fe[8],ln=fe[9],On=fe[10],yn=fe[11],T[8]=Ve*Jt+ln*St+On*Lt+yn*se,T[9]=Ve*Ie+ln*tt+On*Zt+yn*te,T[10]=Ve*Ne+ln*Nt+On*Ut+yn*ke,T[11]=Ve*en+ln*Xt+On*qt+yn*He,Ve=fe[12],ln=fe[13],On=fe[14],yn=fe[15],T[12]=Ve*Jt+ln*St+On*Lt+yn*se,T[13]=Ve*Ie+ln*tt+On*Zt+yn*te,T[14]=Ve*Ne+ln*Nt+On*Ut+yn*ke,T[15]=Ve*en+ln*Xt+On*qt+yn*He,T}function it(T,at,fe){var Jt=fe[0],Ie=fe[1],Ne=fe[2],en,St,tt,Nt,Xt,Lt,Zt,Ut,qt,se,te,ke;return at===T?(T[12]=at[0]*Jt+at[4]*Ie+at[8]*Ne+at[12],T[13]=at[1]*Jt+at[5]*Ie+at[9]*Ne+at[13],T[14]=at[2]*Jt+at[6]*Ie+at[10]*Ne+at[14],T[15]=at[3]*Jt+at[7]*Ie+at[11]*Ne+at[15]):(en=at[0],St=at[1],tt=at[2],Nt=at[3],Xt=at[4],Lt=at[5],Zt=at[6],Ut=at[7],qt=at[8],se=at[9],te=at[10],ke=at[11],T[0]=en,T[1]=St,T[2]=tt,T[3]=Nt,T[4]=Xt,T[5]=Lt,T[6]=Zt,T[7]=Ut,T[8]=qt,T[9]=se,T[10]=te,T[11]=ke,T[12]=en*Jt+Xt*Ie+qt*Ne+at[12],T[13]=St*Jt+Lt*Ie+se*Ne+at[13],T[14]=tt*Jt+Zt*Ie+te*Ne+at[14],T[15]=Nt*Jt+Ut*Ie+ke*Ne+at[15]),T}function G(T,at,fe){var Jt=fe[0],Ie=fe[1],Ne=fe[2];return T[0]=at[0]*Jt,T[1]=at[1]*Jt,T[2]=at[2]*Jt,T[3]=at[3]*Jt,T[4]=at[4]*Ie,T[5]=at[5]*Ie,T[6]=at[6]*Ie,T[7]=at[7]*Ie,T[8]=at[8]*Ne,T[9]=at[9]*Ne,T[10]=at[10]*Ne,T[11]=at[11]*Ne,T[12]=at[12],T[13]=at[13],T[14]=at[14],T[15]=at[15],T}function kt(T,at,fe,Jt){var Ie=Jt[0],Ne=Jt[1],en=Jt[2],St=Math.sqrt(Ie*Ie+Ne*Ne+en*en),tt,Nt,Xt,Lt,Zt,Ut,qt,se,te,ke,He,Ve,ln,On,yn,lr,Zn,Yn,ye,xr,Hn,Br,Ar,ri;return St<c.Ib?null:(St=1/St,Ie*=St,Ne*=St,en*=St,tt=Math.sin(fe),Nt=Math.cos(fe),Xt=1-Nt,Lt=at[0],Zt=at[1],Ut=at[2],qt=at[3],se=at[4],te=at[5],ke=at[6],He=at[7],Ve=at[8],ln=at[9],On=at[10],yn=at[11],lr=Ie*Ie*Xt+Nt,Zn=Ne*Ie*Xt+en*tt,Yn=en*Ie*Xt-Ne*tt,ye=Ie*Ne*Xt-en*tt,xr=Ne*Ne*Xt+Nt,Hn=en*Ne*Xt+Ie*tt,Br=Ie*en*Xt+Ne*tt,Ar=Ne*en*Xt-Ie*tt,ri=en*en*Xt+Nt,T[0]=Lt*lr+se*Zn+Ve*Yn,T[1]=Zt*lr+te*Zn+ln*Yn,T[2]=Ut*lr+ke*Zn+On*Yn,T[3]=qt*lr+He*Zn+yn*Yn,T[4]=Lt*ye+se*xr+Ve*Hn,T[5]=Zt*ye+te*xr+ln*Hn,T[6]=Ut*ye+ke*xr+On*Hn,T[7]=qt*ye+He*xr+yn*Hn,T[8]=Lt*Br+se*Ar+Ve*ri,T[9]=Zt*Br+te*Ar+ln*ri,T[10]=Ut*Br+ke*Ar+On*ri,T[11]=qt*Br+He*Ar+yn*ri,at!==T&&(T[12]=at[12],T[13]=at[13],T[14]=at[14],T[15]=at[15]),T)}function gt(T,at,fe){var Jt=Math.sin(fe),Ie=Math.cos(fe),Ne=at[4],en=at[5],St=at[6],tt=at[7],Nt=at[8],Xt=at[9],Lt=at[10],Zt=at[11];return at!==T&&(T[0]=at[0],T[1]=at[1],T[2]=at[2],T[3]=at[3],T[12]=at[12],T[13]=at[13],T[14]=at[14],T[15]=at[15]),T[4]=Ne*Ie+Nt*Jt,T[5]=en*Ie+Xt*Jt,T[6]=St*Ie+Lt*Jt,T[7]=tt*Ie+Zt*Jt,T[8]=Nt*Ie-Ne*Jt,T[9]=Xt*Ie-en*Jt,T[10]=Lt*Ie-St*Jt,T[11]=Zt*Ie-tt*Jt,T}function Q(T,at,fe){var Jt=Math.sin(fe),Ie=Math.cos(fe),Ne=at[0],en=at[1],St=at[2],tt=at[3],Nt=at[8],Xt=at[9],Lt=at[10],Zt=at[11];return at!==T&&(T[4]=at[4],T[5]=at[5],T[6]=at[6],T[7]=at[7],T[12]=at[12],T[13]=at[13],T[14]=at[14],T[15]=at[15]),T[0]=Ne*Ie-Nt*Jt,T[1]=en*Ie-Xt*Jt,T[2]=St*Ie-Lt*Jt,T[3]=tt*Ie-Zt*Jt,T[8]=Ne*Jt+Nt*Ie,T[9]=en*Jt+Xt*Ie,T[10]=St*Jt+Lt*Ie,T[11]=tt*Jt+Zt*Ie,T}function Rt(T,at,fe){var Jt=Math.sin(fe),Ie=Math.cos(fe),Ne=at[0],en=at[1],St=at[2],tt=at[3],Nt=at[4],Xt=at[5],Lt=at[6],Zt=at[7];return at!==T&&(T[8]=at[8],T[9]=at[9],T[10]=at[10],T[11]=at[11],T[12]=at[12],T[13]=at[13],T[14]=at[14],T[15]=at[15]),T[0]=Ne*Ie+Nt*Jt,T[1]=en*Ie+Xt*Jt,T[2]=St*Ie+Lt*Jt,T[3]=tt*Ie+Zt*Jt,T[4]=Nt*Ie-Ne*Jt,T[5]=Xt*Ie-en*Jt,T[6]=Lt*Ie-St*Jt,T[7]=Zt*Ie-tt*Jt,T}function Ct(T,at){return T[0]=1,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=1,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[10]=1,T[11]=0,T[12]=at[0],T[13]=at[1],T[14]=at[2],T[15]=1,T}function Ht(T,at){return T[0]=at[0],T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=at[1],T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[10]=at[2],T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T}function de(T,at,fe){var Jt=fe[0],Ie=fe[1],Ne=fe[2],en=Math.sqrt(Jt*Jt+Ie*Ie+Ne*Ne),St,tt,Nt;return en<c.Ib?null:(en=1/en,Jt*=en,Ie*=en,Ne*=en,St=Math.sin(at),tt=Math.cos(at),Nt=1-tt,T[0]=Jt*Jt*Nt+tt,T[1]=Ie*Jt*Nt+Ne*St,T[2]=Ne*Jt*Nt-Ie*St,T[3]=0,T[4]=Jt*Ie*Nt-Ne*St,T[5]=Ie*Ie*Nt+tt,T[6]=Ne*Ie*Nt+Jt*St,T[7]=0,T[8]=Jt*Ne*Nt+Ie*St,T[9]=Ie*Ne*Nt-Jt*St,T[10]=Ne*Ne*Nt+tt,T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T)}function ue(T,at){var fe=Math.sin(at),Jt=Math.cos(at);return T[0]=1,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=Jt,T[6]=fe,T[7]=0,T[8]=0,T[9]=-fe,T[10]=Jt,T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T}function Te(T,at){var fe=Math.sin(at),Jt=Math.cos(at);return T[0]=Jt,T[1]=0,T[2]=-fe,T[3]=0,T[4]=0,T[5]=1,T[6]=0,T[7]=0,T[8]=fe,T[9]=0,T[10]=Jt,T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T}function be(T,at){var fe=Math.sin(at),Jt=Math.cos(at);return T[0]=Jt,T[1]=fe,T[2]=0,T[3]=0,T[4]=-fe,T[5]=Jt,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[10]=1,T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T}function we(T,at,fe){var Jt=at[0],Ie=at[1],Ne=at[2],en=at[3],St=Jt+Jt,tt=Ie+Ie,Nt=Ne+Ne,Xt=Jt*St,Lt=Jt*tt,Zt=Jt*Nt,Ut=Ie*tt,qt=Ie*Nt,se=Ne*Nt,te=en*St,ke=en*tt,He=en*Nt;return T[0]=1-(Ut+se),T[1]=Lt+He,T[2]=Zt-ke,T[3]=0,T[4]=Lt-He,T[5]=1-(Xt+se),T[6]=qt+te,T[7]=0,T[8]=Zt+ke,T[9]=qt-te,T[10]=1-(Xt+Ut),T[11]=0,T[12]=fe[0],T[13]=fe[1],T[14]=fe[2],T[15]=1,T}function re(T,at){var fe=new c.WT(3),Jt=-at[0],Ie=-at[1],Ne=-at[2],en=at[3],St=at[4],tt=at[5],Nt=at[6],Xt=at[7],Lt=Jt*Jt+Ie*Ie+Ne*Ne+en*en;return Lt>0?(fe[0]=(St*en+Xt*Jt+tt*Ne-Nt*Ie)*2/Lt,fe[1]=(tt*en+Xt*Ie+Nt*Jt-St*Ne)*2/Lt,fe[2]=(Nt*en+Xt*Ne+St*Ie-tt*Jt)*2/Lt):(fe[0]=(St*en+Xt*Jt+tt*Ne-Nt*Ie)*2,fe[1]=(tt*en+Xt*Ie+Nt*Jt-St*Ne)*2,fe[2]=(Nt*en+Xt*Ne+St*Ie-tt*Jt)*2),we(T,at,fe),T}function Ge(T,at){return T[0]=at[12],T[1]=at[13],T[2]=at[14],T}function rn(T,at){var fe=at[0],Jt=at[1],Ie=at[2],Ne=at[4],en=at[5],St=at[6],tt=at[8],Nt=at[9],Xt=at[10];return T[0]=Math.sqrt(fe*fe+Jt*Jt+Ie*Ie),T[1]=Math.sqrt(Ne*Ne+en*en+St*St),T[2]=Math.sqrt(tt*tt+Nt*Nt+Xt*Xt),T}function Xe(T,at){var fe=new c.WT(3);rn(fe,at);var Jt=1/fe[0],Ie=1/fe[1],Ne=1/fe[2],en=at[0]*Jt,St=at[1]*Ie,tt=at[2]*Ne,Nt=at[4]*Jt,Xt=at[5]*Ie,Lt=at[6]*Ne,Zt=at[8]*Jt,Ut=at[9]*Ie,qt=at[10]*Ne,se=en+Xt+qt,te=0;return se>0?(te=Math.sqrt(se+1)*2,T[3]=.25*te,T[0]=(Lt-Ut)/te,T[1]=(Zt-tt)/te,T[2]=(St-Nt)/te):en>Xt&&en>qt?(te=Math.sqrt(1+en-Xt-qt)*2,T[3]=(Lt-Ut)/te,T[0]=.25*te,T[1]=(St+Nt)/te,T[2]=(Zt+tt)/te):Xt>qt?(te=Math.sqrt(1+Xt-en-qt)*2,T[3]=(Zt-tt)/te,T[0]=(St+Nt)/te,T[1]=.25*te,T[2]=(Lt+Ut)/te):(te=Math.sqrt(1+qt-en-Xt)*2,T[3]=(St-Nt)/te,T[0]=(Zt+tt)/te,T[1]=(Lt+Ut)/te,T[2]=.25*te),T}function En(T,at,fe,Jt){at[0]=Jt[12],at[1]=Jt[13],at[2]=Jt[14];var Ie=Jt[0],Ne=Jt[1],en=Jt[2],St=Jt[4],tt=Jt[5],Nt=Jt[6],Xt=Jt[8],Lt=Jt[9],Zt=Jt[10];fe[0]=Math.sqrt(Ie*Ie+Ne*Ne+en*en),fe[1]=Math.sqrt(St*St+tt*tt+Nt*Nt),fe[2]=Math.sqrt(Xt*Xt+Lt*Lt+Zt*Zt);var Ut=1/fe[0],qt=1/fe[1],se=1/fe[2],te=Ie*Ut,ke=Ne*qt,He=en*se,Ve=St*Ut,ln=tt*qt,On=Nt*se,yn=Xt*Ut,lr=Lt*qt,Zn=Zt*se,Yn=te+ln+Zn,ye=0;return Yn>0?(ye=Math.sqrt(Yn+1)*2,T[3]=.25*ye,T[0]=(On-lr)/ye,T[1]=(yn-He)/ye,T[2]=(ke-Ve)/ye):te>ln&&te>Zn?(ye=Math.sqrt(1+te-ln-Zn)*2,T[3]=(On-lr)/ye,T[0]=.25*ye,T[1]=(ke+Ve)/ye,T[2]=(yn+He)/ye):ln>Zn?(ye=Math.sqrt(1+ln-te-Zn)*2,T[3]=(yn-He)/ye,T[0]=(ke+Ve)/ye,T[1]=.25*ye,T[2]=(On+lr)/ye):(ye=Math.sqrt(1+Zn-te-ln)*2,T[3]=(ke-Ve)/ye,T[0]=(yn+He)/ye,T[1]=(On+lr)/ye,T[2]=.25*ye),T}function Pn(T,at,fe,Jt){var Ie=at[0],Ne=at[1],en=at[2],St=at[3],tt=Ie+Ie,Nt=Ne+Ne,Xt=en+en,Lt=Ie*tt,Zt=Ie*Nt,Ut=Ie*Xt,qt=Ne*Nt,se=Ne*Xt,te=en*Xt,ke=St*tt,He=St*Nt,Ve=St*Xt,ln=Jt[0],On=Jt[1],yn=Jt[2];return T[0]=(1-(qt+te))*ln,T[1]=(Zt+Ve)*ln,T[2]=(Ut-He)*ln,T[3]=0,T[4]=(Zt-Ve)*On,T[5]=(1-(Lt+te))*On,T[6]=(se+ke)*On,T[7]=0,T[8]=(Ut+He)*yn,T[9]=(se-ke)*yn,T[10]=(1-(Lt+qt))*yn,T[11]=0,T[12]=fe[0],T[13]=fe[1],T[14]=fe[2],T[15]=1,T}function tn(T,at,fe,Jt,Ie){var Ne=at[0],en=at[1],St=at[2],tt=at[3],Nt=Ne+Ne,Xt=en+en,Lt=St+St,Zt=Ne*Nt,Ut=Ne*Xt,qt=Ne*Lt,se=en*Xt,te=en*Lt,ke=St*Lt,He=tt*Nt,Ve=tt*Xt,ln=tt*Lt,On=Jt[0],yn=Jt[1],lr=Jt[2],Zn=Ie[0],Yn=Ie[1],ye=Ie[2],xr=(1-(se+ke))*On,Hn=(Ut+ln)*On,Br=(qt-Ve)*On,Ar=(Ut-ln)*yn,ri=(1-(Zt+ke))*yn,mi=(te+He)*yn,si=(qt+Ve)*lr,Jr=(te-He)*lr,_i=(1-(Zt+se))*lr;return T[0]=xr,T[1]=Hn,T[2]=Br,T[3]=0,T[4]=Ar,T[5]=ri,T[6]=mi,T[7]=0,T[8]=si,T[9]=Jr,T[10]=_i,T[11]=0,T[12]=fe[0]+Zn-(xr*Zn+Ar*Yn+si*ye),T[13]=fe[1]+Yn-(Hn*Zn+ri*Yn+Jr*ye),T[14]=fe[2]+ye-(Br*Zn+mi*Yn+_i*ye),T[15]=1,T}function xn(T,at){var fe=at[0],Jt=at[1],Ie=at[2],Ne=at[3],en=fe+fe,St=Jt+Jt,tt=Ie+Ie,Nt=fe*en,Xt=Jt*en,Lt=Jt*St,Zt=Ie*en,Ut=Ie*St,qt=Ie*tt,se=Ne*en,te=Ne*St,ke=Ne*tt;return T[0]=1-Lt-qt,T[1]=Xt+ke,T[2]=Zt-te,T[3]=0,T[4]=Xt-ke,T[5]=1-Nt-qt,T[6]=Ut+se,T[7]=0,T[8]=Zt+te,T[9]=Ut-se,T[10]=1-Nt-Lt,T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T}function It(T,at,fe,Jt,Ie,Ne,en){var St=1/(fe-at),tt=1/(Ie-Jt),Nt=1/(Ne-en);return T[0]=Ne*2*St,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=Ne*2*tt,T[6]=0,T[7]=0,T[8]=(fe+at)*St,T[9]=(Ie+Jt)*tt,T[10]=(en+Ne)*Nt,T[11]=-1,T[12]=0,T[13]=0,T[14]=en*Ne*2*Nt,T[15]=0,T}function Ee(T,at,fe,Jt,Ie){var Ne=1/Math.tan(at/2);if(T[0]=Ne/fe,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=Ne,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[11]=-1,T[12]=0,T[13]=0,T[15]=0,Ie!=null&&Ie!==1/0){var en=1/(Jt-Ie);T[10]=(Ie+Jt)*en,T[14]=2*Ie*Jt*en}else T[10]=-1,T[14]=-2*Jt;return T}var fn=Ee;function on(T,at,fe,Jt,Ie){var Ne=1/Math.tan(at/2);if(T[0]=Ne/fe,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=Ne,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[11]=-1,T[12]=0,T[13]=0,T[15]=0,Ie!=null&&Ie!==1/0){var en=1/(Jt-Ie);T[10]=Ie*en,T[14]=Ie*Jt*en}else T[10]=-1,T[14]=-Jt;return T}function Pe(T,at,fe,Jt){var Ie=Math.tan(at.upDegrees*Math.PI/180),Ne=Math.tan(at.downDegrees*Math.PI/180),en=Math.tan(at.leftDegrees*Math.PI/180),St=Math.tan(at.rightDegrees*Math.PI/180),tt=2/(en+St),Nt=2/(Ie+Ne);return T[0]=tt,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=Nt,T[6]=0,T[7]=0,T[8]=-((en-St)*tt*.5),T[9]=(Ie-Ne)*Nt*.5,T[10]=Jt/(fe-Jt),T[11]=-1,T[12]=0,T[13]=0,T[14]=Jt*fe/(fe-Jt),T[15]=0,T}function Ze(T,at,fe,Jt,Ie,Ne,en){var St=1/(at-fe),tt=1/(Jt-Ie),Nt=1/(Ne-en);return T[0]=-2*St,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=-2*tt,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[10]=2*Nt,T[11]=0,T[12]=(at+fe)*St,T[13]=(Ie+Jt)*tt,T[14]=(en+Ne)*Nt,T[15]=1,T}var Ke=Ze;function le(T,at,fe,Jt,Ie,Ne,en){var St=1/(at-fe),tt=1/(Jt-Ie),Nt=1/(Ne-en);return T[0]=-2*St,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=-2*tt,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[10]=Nt,T[11]=0,T[12]=(at+fe)*St,T[13]=(Ie+Jt)*tt,T[14]=Ne*Nt,T[15]=1,T}function Ae(T,at,fe,Jt){var Ie,Ne,en,St,tt,Nt,Xt,Lt,Zt,Ut,qt=at[0],se=at[1],te=at[2],ke=Jt[0],He=Jt[1],Ve=Jt[2],ln=fe[0],On=fe[1],yn=fe[2];return Math.abs(qt-ln)<c.Ib&&Math.abs(se-On)<c.Ib&&Math.abs(te-yn)<c.Ib?w(T):(Xt=qt-ln,Lt=se-On,Zt=te-yn,Ut=1/Math.sqrt(Xt*Xt+Lt*Lt+Zt*Zt),Xt*=Ut,Lt*=Ut,Zt*=Ut,Ie=He*Zt-Ve*Lt,Ne=Ve*Xt-ke*Zt,en=ke*Lt-He*Xt,Ut=Math.sqrt(Ie*Ie+Ne*Ne+en*en),Ut?(Ut=1/Ut,Ie*=Ut,Ne*=Ut,en*=Ut):(Ie=0,Ne=0,en=0),St=Lt*en-Zt*Ne,tt=Zt*Ie-Xt*en,Nt=Xt*Ne-Lt*Ie,Ut=Math.sqrt(St*St+tt*tt+Nt*Nt),Ut?(Ut=1/Ut,St*=Ut,tt*=Ut,Nt*=Ut):(St=0,tt=0,Nt=0),T[0]=Ie,T[1]=St,T[2]=Xt,T[3]=0,T[4]=Ne,T[5]=tt,T[6]=Lt,T[7]=0,T[8]=en,T[9]=Nt,T[10]=Zt,T[11]=0,T[12]=-(Ie*qt+Ne*se+en*te),T[13]=-(St*qt+tt*se+Nt*te),T[14]=-(Xt*qt+Lt*se+Zt*te),T[15]=1,T)}function Pt(T,at,fe,Jt){var Ie=at[0],Ne=at[1],en=at[2],St=Jt[0],tt=Jt[1],Nt=Jt[2],Xt=Ie-fe[0],Lt=Ne-fe[1],Zt=en-fe[2],Ut=Xt*Xt+Lt*Lt+Zt*Zt;Ut>0&&(Ut=1/Math.sqrt(Ut),Xt*=Ut,Lt*=Ut,Zt*=Ut);var qt=tt*Zt-Nt*Lt,se=Nt*Xt-St*Zt,te=St*Lt-tt*Xt;return Ut=qt*qt+se*se+te*te,Ut>0&&(Ut=1/Math.sqrt(Ut),qt*=Ut,se*=Ut,te*=Ut),T[0]=qt,T[1]=se,T[2]=te,T[3]=0,T[4]=Lt*te-Zt*se,T[5]=Zt*qt-Xt*te,T[6]=Xt*se-Lt*qt,T[7]=0,T[8]=Xt,T[9]=Lt,T[10]=Zt,T[11]=0,T[12]=Ie,T[13]=Ne,T[14]=en,T[15]=1,T}function wt(T){return"mat4("+T[0]+", "+T[1]+", "+T[2]+", "+T[3]+", "+T[4]+", "+T[5]+", "+T[6]+", "+T[7]+", "+T[8]+", "+T[9]+", "+T[10]+", "+T[11]+", "+T[12]+", "+T[13]+", "+T[14]+", "+T[15]+")"}function he(T){return Math.sqrt(T[0]*T[0]+T[1]*T[1]+T[2]*T[2]+T[3]*T[3]+T[4]*T[4]+T[5]*T[5]+T[6]*T[6]+T[7]*T[7]+T[8]*T[8]+T[9]*T[9]+T[10]*T[10]+T[11]*T[11]+T[12]*T[12]+T[13]*T[13]+T[14]*T[14]+T[15]*T[15])}function je(T,at,fe){return T[0]=at[0]+fe[0],T[1]=at[1]+fe[1],T[2]=at[2]+fe[2],T[3]=at[3]+fe[3],T[4]=at[4]+fe[4],T[5]=at[5]+fe[5],T[6]=at[6]+fe[6],T[7]=at[7]+fe[7],T[8]=at[8]+fe[8],T[9]=at[9]+fe[9],T[10]=at[10]+fe[10],T[11]=at[11]+fe[11],T[12]=at[12]+fe[12],T[13]=at[13]+fe[13],T[14]=at[14]+fe[14],T[15]=at[15]+fe[15],T}function Re(T,at,fe){return T[0]=at[0]-fe[0],T[1]=at[1]-fe[1],T[2]=at[2]-fe[2],T[3]=at[3]-fe[3],T[4]=at[4]-fe[4],T[5]=at[5]-fe[5],T[6]=at[6]-fe[6],T[7]=at[7]-fe[7],T[8]=at[8]-fe[8],T[9]=at[9]-fe[9],T[10]=at[10]-fe[10],T[11]=at[11]-fe[11],T[12]=at[12]-fe[12],T[13]=at[13]-fe[13],T[14]=at[14]-fe[14],T[15]=at[15]-fe[15],T}function ce(T,at,fe){return T[0]=at[0]*fe,T[1]=at[1]*fe,T[2]=at[2]*fe,T[3]=at[3]*fe,T[4]=at[4]*fe,T[5]=at[5]*fe,T[6]=at[6]*fe,T[7]=at[7]*fe,T[8]=at[8]*fe,T[9]=at[9]*fe,T[10]=at[10]*fe,T[11]=at[11]*fe,T[12]=at[12]*fe,T[13]=at[13]*fe,T[14]=at[14]*fe,T[15]=at[15]*fe,T}function Le(T,at,fe,Jt){return T[0]=at[0]+fe[0]*Jt,T[1]=at[1]+fe[1]*Jt,T[2]=at[2]+fe[2]*Jt,T[3]=at[3]+fe[3]*Jt,T[4]=at[4]+fe[4]*Jt,T[5]=at[5]+fe[5]*Jt,T[6]=at[6]+fe[6]*Jt,T[7]=at[7]+fe[7]*Jt,T[8]=at[8]+fe[8]*Jt,T[9]=at[9]+fe[9]*Jt,T[10]=at[10]+fe[10]*Jt,T[11]=at[11]+fe[11]*Jt,T[12]=at[12]+fe[12]*Jt,T[13]=at[13]+fe[13]*Jt,T[14]=at[14]+fe[14]*Jt,T[15]=at[15]+fe[15]*Jt,T}function xe(T,at){return T[0]===at[0]&&T[1]===at[1]&&T[2]===at[2]&&T[3]===at[3]&&T[4]===at[4]&&T[5]===at[5]&&T[6]===at[6]&&T[7]===at[7]&&T[8]===at[8]&&T[9]===at[9]&&T[10]===at[10]&&T[11]===at[11]&&T[12]===at[12]&&T[13]===at[13]&&T[14]===at[14]&&T[15]===at[15]}function _t(T,at){var fe=T[0],Jt=T[1],Ie=T[2],Ne=T[3],en=T[4],St=T[5],tt=T[6],Nt=T[7],Xt=T[8],Lt=T[9],Zt=T[10],Ut=T[11],qt=T[12],se=T[13],te=T[14],ke=T[15],He=at[0],Ve=at[1],ln=at[2],On=at[3],yn=at[4],lr=at[5],Zn=at[6],Yn=at[7],ye=at[8],xr=at[9],Hn=at[10],Br=at[11],Ar=at[12],ri=at[13],mi=at[14],si=at[15];return Math.abs(fe-He)<=c.Ib*Math.max(1,Math.abs(fe),Math.abs(He))&&Math.abs(Jt-Ve)<=c.Ib*Math.max(1,Math.abs(Jt),Math.abs(Ve))&&Math.abs(Ie-ln)<=c.Ib*Math.max(1,Math.abs(Ie),Math.abs(ln))&&Math.abs(Ne-On)<=c.Ib*Math.max(1,Math.abs(Ne),Math.abs(On))&&Math.abs(en-yn)<=c.Ib*Math.max(1,Math.abs(en),Math.abs(yn))&&Math.abs(St-lr)<=c.Ib*Math.max(1,Math.abs(St),Math.abs(lr))&&Math.abs(tt-Zn)<=c.Ib*Math.max(1,Math.abs(tt),Math.abs(Zn))&&Math.abs(Nt-Yn)<=c.Ib*Math.max(1,Math.abs(Nt),Math.abs(Yn))&&Math.abs(Xt-ye)<=c.Ib*Math.max(1,Math.abs(Xt),Math.abs(ye))&&Math.abs(Lt-xr)<=c.Ib*Math.max(1,Math.abs(Lt),Math.abs(xr))&&Math.abs(Zt-Hn)<=c.Ib*Math.max(1,Math.abs(Zt),Math.abs(Hn))&&Math.abs(Ut-Br)<=c.Ib*Math.max(1,Math.abs(Ut),Math.abs(Br))&&Math.abs(qt-Ar)<=c.Ib*Math.max(1,Math.abs(qt),Math.abs(Ar))&&Math.abs(se-ri)<=c.Ib*Math.max(1,Math.abs(se),Math.abs(ri))&&Math.abs(te-mi)<=c.Ib*Math.max(1,Math.abs(te),Math.abs(mi))&&Math.abs(ke-si)<=c.Ib*Math.max(1,Math.abs(ke),Math.abs(si))}var ie=F,Me=Re},94569:function(yt,Et,y){"use strict";y.d(Et,{Fv:function(){return Pe},JG:function(){return Ge},Jp:function(){return A},Su:function(){return Te},U_:function(){return Ht},Ue:function(){return S},al:function(){return re},dC:function(){return En},t8:function(){return rn},yY:function(){return w}});var c=y(85551),_=y(79111),I=y(92421),z=y(20263);function S(){var wt=new c.WT(4);return c.WT!=Float32Array&&(wt[0]=0,wt[1]=0,wt[2]=0),wt[3]=1,wt}function R(wt){return wt[0]=0,wt[1]=0,wt[2]=0,wt[3]=1,wt}function w(wt,he,je){je=je*.5;var Re=Math.sin(je);return wt[0]=Re*he[0],wt[1]=Re*he[1],wt[2]=Re*he[2],wt[3]=Math.cos(je),wt}function N(wt,he){var je=Math.acos(he[3])*2,Re=Math.sin(je/2);return Re>glMatrix.EPSILON?(wt[0]=he[0]/Re,wt[1]=he[1]/Re,wt[2]=he[2]/Re):(wt[0]=1,wt[1]=0,wt[2]=0),je}function D(wt,he){var je=tn(wt,he);return Math.acos(2*je*je-1)}function A(wt,he,je){var Re=he[0],ce=he[1],Le=he[2],xe=he[3],_t=je[0],ie=je[1],Me=je[2],T=je[3];return wt[0]=Re*T+xe*_t+ce*Me-Le*ie,wt[1]=ce*T+xe*ie+Le*_t-Re*Me,wt[2]=Le*T+xe*Me+Re*ie-ce*_t,wt[3]=xe*T-Re*_t-ce*ie-Le*Me,wt}function L(wt,he,je){je*=.5;var Re=he[0],ce=he[1],Le=he[2],xe=he[3],_t=Math.sin(je),ie=Math.cos(je);return wt[0]=Re*ie+xe*_t,wt[1]=ce*ie+Le*_t,wt[2]=Le*ie-ce*_t,wt[3]=xe*ie-Re*_t,wt}function F(wt,he,je){je*=.5;var Re=he[0],ce=he[1],Le=he[2],xe=he[3],_t=Math.sin(je),ie=Math.cos(je);return wt[0]=Re*ie-Le*_t,wt[1]=ce*ie+xe*_t,wt[2]=Le*ie+Re*_t,wt[3]=xe*ie-ce*_t,wt}function it(wt,he,je){je*=.5;var Re=he[0],ce=he[1],Le=he[2],xe=he[3],_t=Math.sin(je),ie=Math.cos(je);return wt[0]=Re*ie+ce*_t,wt[1]=ce*ie-Re*_t,wt[2]=Le*ie+xe*_t,wt[3]=xe*ie-Le*_t,wt}function G(wt,he){var je=he[0],Re=he[1],ce=he[2];return wt[0]=je,wt[1]=Re,wt[2]=ce,wt[3]=Math.sqrt(Math.abs(1-je*je-Re*Re-ce*ce)),wt}function kt(wt,he){var je=he[0],Re=he[1],ce=he[2],Le=he[3],xe=Math.sqrt(je*je+Re*Re+ce*ce),_t=Math.exp(Le),ie=xe>0?_t*Math.sin(xe)/xe:0;return wt[0]=je*ie,wt[1]=Re*ie,wt[2]=ce*ie,wt[3]=_t*Math.cos(xe),wt}function gt(wt,he){var je=he[0],Re=he[1],ce=he[2],Le=he[3],xe=Math.sqrt(je*je+Re*Re+ce*ce),_t=xe>0?Math.atan2(xe,Le)/xe:0;return wt[0]=je*_t,wt[1]=Re*_t,wt[2]=ce*_t,wt[3]=.5*Math.log(je*je+Re*Re+ce*ce+Le*Le),wt}function Q(wt,he,je){return gt(wt,he),Pn(wt,wt,je),kt(wt,wt),wt}function Rt(wt,he,je,Re){var ce=he[0],Le=he[1],xe=he[2],_t=he[3],ie=je[0],Me=je[1],T=je[2],at=je[3],fe,Jt,Ie,Ne,en;return Jt=ce*ie+Le*Me+xe*T+_t*at,Jt<0&&(Jt=-Jt,ie=-ie,Me=-Me,T=-T,at=-at),1-Jt>c.Ib?(fe=Math.acos(Jt),Ie=Math.sin(fe),Ne=Math.sin((1-Re)*fe)/Ie,en=Math.sin(Re*fe)/Ie):(Ne=1-Re,en=Re),wt[0]=Ne*ce+en*ie,wt[1]=Ne*Le+en*Me,wt[2]=Ne*xe+en*T,wt[3]=Ne*_t+en*at,wt}function Ct(wt){var he=glMatrix.RANDOM(),je=glMatrix.RANDOM(),Re=glMatrix.RANDOM(),ce=Math.sqrt(1-he),Le=Math.sqrt(he);return wt[0]=ce*Math.sin(2*Math.PI*je),wt[1]=ce*Math.cos(2*Math.PI*je),wt[2]=Le*Math.sin(2*Math.PI*Re),wt[3]=Le*Math.cos(2*Math.PI*Re),wt}function Ht(wt,he){var je=he[0],Re=he[1],ce=he[2],Le=he[3],xe=je*je+Re*Re+ce*ce+Le*Le,_t=xe?1/xe:0;return wt[0]=-je*_t,wt[1]=-Re*_t,wt[2]=-ce*_t,wt[3]=Le*_t,wt}function de(wt,he){return wt[0]=-he[0],wt[1]=-he[1],wt[2]=-he[2],wt[3]=he[3],wt}function ue(wt,he){var je=he[0]+he[4]+he[8],Re;if(je>0)Re=Math.sqrt(je+1),wt[3]=.5*Re,Re=.5/Re,wt[0]=(he[5]-he[7])*Re,wt[1]=(he[6]-he[2])*Re,wt[2]=(he[1]-he[3])*Re;else{var ce=0;he[4]>he[0]&&(ce=1),he[8]>he[ce*3+ce]&&(ce=2);var Le=(ce+1)%3,xe=(ce+2)%3;Re=Math.sqrt(he[ce*3+ce]-he[Le*3+Le]-he[xe*3+xe]+1),wt[ce]=.5*Re,Re=.5/Re,wt[3]=(he[Le*3+xe]-he[xe*3+Le])*Re,wt[Le]=(he[Le*3+ce]+he[ce*3+Le])*Re,wt[xe]=(he[xe*3+ce]+he[ce*3+xe])*Re}return wt}function Te(wt,he,je,Re){var ce=arguments.length>4&&arguments[4]!==void 0?arguments[4]:c.yy,Le=Math.PI/360;he*=Le,Re*=Le,je*=Le;var xe=Math.sin(he),_t=Math.cos(he),ie=Math.sin(je),Me=Math.cos(je),T=Math.sin(Re),at=Math.cos(Re);switch(ce){case"xyz":wt[0]=xe*Me*at+_t*ie*T,wt[1]=_t*ie*at-xe*Me*T,wt[2]=_t*Me*T+xe*ie*at,wt[3]=_t*Me*at-xe*ie*T;break;case"xzy":wt[0]=xe*Me*at-_t*ie*T,wt[1]=_t*ie*at-xe*Me*T,wt[2]=_t*Me*T+xe*ie*at,wt[3]=_t*Me*at+xe*ie*T;break;case"yxz":wt[0]=xe*Me*at+_t*ie*T,wt[1]=_t*ie*at-xe*Me*T,wt[2]=_t*Me*T-xe*ie*at,wt[3]=_t*Me*at+xe*ie*T;break;case"yzx":wt[0]=xe*Me*at+_t*ie*T,wt[1]=_t*ie*at+xe*Me*T,wt[2]=_t*Me*T-xe*ie*at,wt[3]=_t*Me*at-xe*ie*T;break;case"zxy":wt[0]=xe*Me*at-_t*ie*T,wt[1]=_t*ie*at+xe*Me*T,wt[2]=_t*Me*T+xe*ie*at,wt[3]=_t*Me*at-xe*ie*T;break;case"zyx":wt[0]=xe*Me*at-_t*ie*T,wt[1]=_t*ie*at+xe*Me*T,wt[2]=_t*Me*T-xe*ie*at,wt[3]=_t*Me*at+xe*ie*T;break;default:throw new Error("Unknown angle order "+ce)}return wt}function be(wt){return"quat("+wt[0]+", "+wt[1]+", "+wt[2]+", "+wt[3]+")"}var we=z.d9,re=z.al,Ge=z.JG,rn=z.t8,Xe=z.IH,En=A,Pn=z.bA,tn=z.AK,xn=z.t7,It=z.kE,Ee=null,fn=z.we,on=null,Pe=z.Fv,Ze=z.I6;function Ke(wt,he){return Math.abs(vec4.dot(wt,he))>=1-glMatrix.EPSILON}var le=function(){var wt=I.Ue(),he=I.al(1,0,0),je=I.al(0,1,0);return function(Re,ce,Le){var xe=I.AK(ce,Le);return xe<-.999999?(I.kC(wt,he,ce),I.Zh(wt)<1e-6&&I.kC(wt,je,ce),I.Fv(wt,wt),w(Re,wt,Math.PI),Re):xe>.999999?(Re[0]=0,Re[1]=0,Re[2]=0,Re[3]=1,Re):(I.kC(wt,ce,Le),Re[0]=wt[0],Re[1]=wt[1],Re[2]=wt[2],Re[3]=1+xe,Pe(Re,Re))}}(),Ae=function(){var wt=S(),he=S();return function(je,Re,ce,Le,xe,_t){return Rt(wt,Re,xe,_t),Rt(he,ce,Le,_t),Rt(je,wt,he,2*_t*(1-_t)),je}}(),Pt=function(){var wt=_.Ue();return function(he,je,Re,ce){return wt[0]=Re[0],wt[3]=Re[1],wt[6]=Re[2],wt[1]=ce[0],wt[4]=ce[1],wt[7]=ce[2],wt[2]=-je[0],wt[5]=-je[1],wt[8]=-je[2],Pe(he,ue(he,wt))}}()},45545:function(yt,Et,y){"use strict";y.d(Et,{AK:function(){return we},Fv:function(){return be},I6:function(){return Pe},JG:function(){return S},Ue:function(){return _},t8:function(){return R}});var c=y(85551);function _(){var ce=new c.WT(2);return c.WT!=Float32Array&&(ce[0]=0,ce[1]=0),ce}function I(ce){var Le=new glMatrix.ARRAY_TYPE(2);return Le[0]=ce[0],Le[1]=ce[1],Le}function z(ce,Le){var xe=new glMatrix.ARRAY_TYPE(2);return xe[0]=ce,xe[1]=Le,xe}function S(ce,Le){return ce[0]=Le[0],ce[1]=Le[1],ce}function R(ce,Le,xe){return ce[0]=Le,ce[1]=xe,ce}function w(ce,Le,xe){return ce[0]=Le[0]+xe[0],ce[1]=Le[1]+xe[1],ce}function N(ce,Le,xe){return ce[0]=Le[0]-xe[0],ce[1]=Le[1]-xe[1],ce}function D(ce,Le,xe){return ce[0]=Le[0]*xe[0],ce[1]=Le[1]*xe[1],ce}function A(ce,Le,xe){return ce[0]=Le[0]/xe[0],ce[1]=Le[1]/xe[1],ce}function L(ce,Le){return ce[0]=Math.ceil(Le[0]),ce[1]=Math.ceil(Le[1]),ce}function F(ce,Le){return ce[0]=Math.floor(Le[0]),ce[1]=Math.floor(Le[1]),ce}function it(ce,Le,xe){return ce[0]=Math.min(Le[0],xe[0]),ce[1]=Math.min(Le[1],xe[1]),ce}function G(ce,Le,xe){return ce[0]=Math.max(Le[0],xe[0]),ce[1]=Math.max(Le[1],xe[1]),ce}function kt(ce,Le){return ce[0]=glMatrix.round(Le[0]),ce[1]=glMatrix.round(Le[1]),ce}function gt(ce,Le,xe){return ce[0]=Le[0]*xe,ce[1]=Le[1]*xe,ce}function Q(ce,Le,xe,_t){return ce[0]=Le[0]+xe[0]*_t,ce[1]=Le[1]+xe[1]*_t,ce}function Rt(ce,Le){var xe=Le[0]-ce[0],_t=Le[1]-ce[1];return Math.sqrt(xe*xe+_t*_t)}function Ct(ce,Le){var xe=Le[0]-ce[0],_t=Le[1]-ce[1];return xe*xe+_t*_t}function Ht(ce){var Le=ce[0],xe=ce[1];return Math.sqrt(Le*Le+xe*xe)}function de(ce){var Le=ce[0],xe=ce[1];return Le*Le+xe*xe}function ue(ce,Le){return ce[0]=-Le[0],ce[1]=-Le[1],ce}function Te(ce,Le){return ce[0]=1/Le[0],ce[1]=1/Le[1],ce}function be(ce,Le){var xe=Le[0],_t=Le[1],ie=xe*xe+_t*_t;return ie>0&&(ie=1/Math.sqrt(ie)),ce[0]=Le[0]*ie,ce[1]=Le[1]*ie,ce}function we(ce,Le){return ce[0]*Le[0]+ce[1]*Le[1]}function re(ce,Le,xe){var _t=Le[0]*xe[1]-Le[1]*xe[0];return ce[0]=ce[1]=0,ce[2]=_t,ce}function Ge(ce,Le,xe,_t){var ie=Le[0],Me=Le[1];return ce[0]=ie+_t*(xe[0]-ie),ce[1]=Me+_t*(xe[1]-Me),ce}function rn(ce,Le){Le=Le===void 0?1:Le;var xe=glMatrix.RANDOM()*2*Math.PI;return ce[0]=Math.cos(xe)*Le,ce[1]=Math.sin(xe)*Le,ce}function Xe(ce,Le,xe){var _t=Le[0],ie=Le[1];return ce[0]=xe[0]*_t+xe[2]*ie,ce[1]=xe[1]*_t+xe[3]*ie,ce}function En(ce,Le,xe){var _t=Le[0],ie=Le[1];return ce[0]=xe[0]*_t+xe[2]*ie+xe[4],ce[1]=xe[1]*_t+xe[3]*ie+xe[5],ce}function Pn(ce,Le,xe){var _t=Le[0],ie=Le[1];return ce[0]=xe[0]*_t+xe[3]*ie+xe[6],ce[1]=xe[1]*_t+xe[4]*ie+xe[7],ce}function tn(ce,Le,xe){var _t=Le[0],ie=Le[1];return ce[0]=xe[0]*_t+xe[4]*ie+xe[12],ce[1]=xe[1]*_t+xe[5]*ie+xe[13],ce}function xn(ce,Le,xe,_t){var ie=Le[0]-xe[0],Me=Le[1]-xe[1],T=Math.sin(_t),at=Math.cos(_t);return ce[0]=ie*at-Me*T+xe[0],ce[1]=ie*T+Me*at+xe[1],ce}function It(ce,Le){var xe=ce[0],_t=ce[1],ie=Le[0],Me=Le[1];return Math.abs(Math.atan2(_t*ie-xe*Me,xe*ie+_t*Me))}function Ee(ce,Le){var xe=ce[0],_t=ce[1],ie=Le[0],Me=Le[1];return Math.atan2(xe*Me-_t*ie,xe*ie+_t*Me)}function fn(ce){return ce[0]=0,ce[1]=0,ce}function on(ce){return"vec2("+ce[0]+", "+ce[1]+")"}function Pe(ce,Le){return ce[0]===Le[0]&&ce[1]===Le[1]}function Ze(ce,Le){var xe=ce[0],_t=ce[1],ie=Le[0],Me=Le[1];return Math.abs(xe-ie)<=glMatrix.EPSILON*Math.max(1,Math.abs(xe),Math.abs(ie))&&Math.abs(_t-Me)<=glMatrix.EPSILON*Math.max(1,Math.abs(_t),Math.abs(Me))}var Ke=null,le=null,Ae=null,Pt=null,wt=null,he=null,je=null,Re=function(){var ce=_();return function(Le,xe,_t,ie,Me,T){var at,fe;for(xe||(xe=2),_t||(_t=0),ie?fe=Math.min(ie*xe+_t,Le.length):fe=Le.length,at=_t;at<fe;at+=xe)ce[0]=Le[at],ce[1]=Le[at+1],Me(ce,ce,T),Le[at]=ce[0],Le[at+1]=ce[1];return Le}}()},92421:function(yt,Et,y){"use strict";y.d(Et,{$X:function(){return D},AK:function(){return we},Fp:function(){return kt},Fv:function(){return be},IH:function(){return N},JG:function(){return R},Jp:function(){return A},TK:function(){return je},Ue:function(){return _},VC:function(){return It},VV:function(){return G},Zh:function(){return ce},al:function(){return S},bA:function(){return Q},d9:function(){return I},fF:function(){return tn},fS:function(){return Ae},kC:function(){return re},kE:function(){return z},kK:function(){return xn},lu:function(){return Pt},t7:function(){return Ge},t8:function(){return w}});var c=y(85551);function _(){var _t=new c.WT(3);return c.WT!=Float32Array&&(_t[0]=0,_t[1]=0,_t[2]=0),_t}function I(_t){var ie=new c.WT(3);return ie[0]=_t[0],ie[1]=_t[1],ie[2]=_t[2],ie}function z(_t){var ie=_t[0],Me=_t[1],T=_t[2];return Math.sqrt(ie*ie+Me*Me+T*T)}function S(_t,ie,Me){var T=new c.WT(3);return T[0]=_t,T[1]=ie,T[2]=Me,T}function R(_t,ie){return _t[0]=ie[0],_t[1]=ie[1],_t[2]=ie[2],_t}function w(_t,ie,Me,T){return _t[0]=ie,_t[1]=Me,_t[2]=T,_t}function N(_t,ie,Me){return _t[0]=ie[0]+Me[0],_t[1]=ie[1]+Me[1],_t[2]=ie[2]+Me[2],_t}function D(_t,ie,Me){return _t[0]=ie[0]-Me[0],_t[1]=ie[1]-Me[1],_t[2]=ie[2]-Me[2],_t}function A(_t,ie,Me){return _t[0]=ie[0]*Me[0],_t[1]=ie[1]*Me[1],_t[2]=ie[2]*Me[2],_t}function L(_t,ie,Me){return _t[0]=ie[0]/Me[0],_t[1]=ie[1]/Me[1],_t[2]=ie[2]/Me[2],_t}function F(_t,ie){return _t[0]=Math.ceil(ie[0]),_t[1]=Math.ceil(ie[1]),_t[2]=Math.ceil(ie[2]),_t}function it(_t,ie){return _t[0]=Math.floor(ie[0]),_t[1]=Math.floor(ie[1]),_t[2]=Math.floor(ie[2]),_t}function G(_t,ie,Me){return _t[0]=Math.min(ie[0],Me[0]),_t[1]=Math.min(ie[1],Me[1]),_t[2]=Math.min(ie[2],Me[2]),_t}function kt(_t,ie,Me){return _t[0]=Math.max(ie[0],Me[0]),_t[1]=Math.max(ie[1],Me[1]),_t[2]=Math.max(ie[2],Me[2]),_t}function gt(_t,ie){return _t[0]=glMatrix.round(ie[0]),_t[1]=glMatrix.round(ie[1]),_t[2]=glMatrix.round(ie[2]),_t}function Q(_t,ie,Me){return _t[0]=ie[0]*Me,_t[1]=ie[1]*Me,_t[2]=ie[2]*Me,_t}function Rt(_t,ie,Me,T){return _t[0]=ie[0]+Me[0]*T,_t[1]=ie[1]+Me[1]*T,_t[2]=ie[2]+Me[2]*T,_t}function Ct(_t,ie){var Me=ie[0]-_t[0],T=ie[1]-_t[1],at=ie[2]-_t[2];return Math.sqrt(Me*Me+T*T+at*at)}function Ht(_t,ie){var Me=ie[0]-_t[0],T=ie[1]-_t[1],at=ie[2]-_t[2];return Me*Me+T*T+at*at}function de(_t){var ie=_t[0],Me=_t[1],T=_t[2];return ie*ie+Me*Me+T*T}function ue(_t,ie){return _t[0]=-ie[0],_t[1]=-ie[1],_t[2]=-ie[2],_t}function Te(_t,ie){return _t[0]=1/ie[0],_t[1]=1/ie[1],_t[2]=1/ie[2],_t}function be(_t,ie){var Me=ie[0],T=ie[1],at=ie[2],fe=Me*Me+T*T+at*at;return fe>0&&(fe=1/Math.sqrt(fe)),_t[0]=ie[0]*fe,_t[1]=ie[1]*fe,_t[2]=ie[2]*fe,_t}function we(_t,ie){return _t[0]*ie[0]+_t[1]*ie[1]+_t[2]*ie[2]}function re(_t,ie,Me){var T=ie[0],at=ie[1],fe=ie[2],Jt=Me[0],Ie=Me[1],Ne=Me[2];return _t[0]=at*Ne-fe*Ie,_t[1]=fe*Jt-T*Ne,_t[2]=T*Ie-at*Jt,_t}function Ge(_t,ie,Me,T){var at=ie[0],fe=ie[1],Jt=ie[2];return _t[0]=at+T*(Me[0]-at),_t[1]=fe+T*(Me[1]-fe),_t[2]=Jt+T*(Me[2]-Jt),_t}function rn(_t,ie,Me,T){var at=Math.acos(Math.min(Math.max(we(ie,Me),-1),1)),fe=Math.sin(at),Jt=Math.sin((1-T)*at)/fe,Ie=Math.sin(T*at)/fe;return _t[0]=Jt*ie[0]+Ie*Me[0],_t[1]=Jt*ie[1]+Ie*Me[1],_t[2]=Jt*ie[2]+Ie*Me[2],_t}function Xe(_t,ie,Me,T,at,fe){var Jt=fe*fe,Ie=Jt*(2*fe-3)+1,Ne=Jt*(fe-2)+fe,en=Jt*(fe-1),St=Jt*(3-2*fe);return _t[0]=ie[0]*Ie+Me[0]*Ne+T[0]*en+at[0]*St,_t[1]=ie[1]*Ie+Me[1]*Ne+T[1]*en+at[1]*St,_t[2]=ie[2]*Ie+Me[2]*Ne+T[2]*en+at[2]*St,_t}function En(_t,ie,Me,T,at,fe){var Jt=1-fe,Ie=Jt*Jt,Ne=fe*fe,en=Ie*Jt,St=3*fe*Ie,tt=3*Ne*Jt,Nt=Ne*fe;return _t[0]=ie[0]*en+Me[0]*St+T[0]*tt+at[0]*Nt,_t[1]=ie[1]*en+Me[1]*St+T[1]*tt+at[1]*Nt,_t[2]=ie[2]*en+Me[2]*St+T[2]*tt+at[2]*Nt,_t}function Pn(_t,ie){ie=ie===void 0?1:ie;var Me=glMatrix.RANDOM()*2*Math.PI,T=glMatrix.RANDOM()*2-1,at=Math.sqrt(1-T*T)*ie;return _t[0]=Math.cos(Me)*at,_t[1]=Math.sin(Me)*at,_t[2]=T*ie,_t}function tn(_t,ie,Me){var T=ie[0],at=ie[1],fe=ie[2],Jt=Me[3]*T+Me[7]*at+Me[11]*fe+Me[15];return Jt=Jt||1,_t[0]=(Me[0]*T+Me[4]*at+Me[8]*fe+Me[12])/Jt,_t[1]=(Me[1]*T+Me[5]*at+Me[9]*fe+Me[13])/Jt,_t[2]=(Me[2]*T+Me[6]*at+Me[10]*fe+Me[14])/Jt,_t}function xn(_t,ie,Me){var T=ie[0],at=ie[1],fe=ie[2];return _t[0]=T*Me[0]+at*Me[3]+fe*Me[6],_t[1]=T*Me[1]+at*Me[4]+fe*Me[7],_t[2]=T*Me[2]+at*Me[5]+fe*Me[8],_t}function It(_t,ie,Me){var T=Me[0],at=Me[1],fe=Me[2],Jt=Me[3],Ie=ie[0],Ne=ie[1],en=ie[2],St=at*en-fe*Ne,tt=fe*Ie-T*en,Nt=T*Ne-at*Ie;return St=St+St,tt=tt+tt,Nt=Nt+Nt,_t[0]=Ie+Jt*St+at*Nt-fe*tt,_t[1]=Ne+Jt*tt+fe*St-T*Nt,_t[2]=en+Jt*Nt+T*tt-at*St,_t}function Ee(_t,ie,Me,T){var at=[],fe=[];return at[0]=ie[0]-Me[0],at[1]=ie[1]-Me[1],at[2]=ie[2]-Me[2],fe[0]=at[0],fe[1]=at[1]*Math.cos(T)-at[2]*Math.sin(T),fe[2]=at[1]*Math.sin(T)+at[2]*Math.cos(T),_t[0]=fe[0]+Me[0],_t[1]=fe[1]+Me[1],_t[2]=fe[2]+Me[2],_t}function fn(_t,ie,Me,T){var at=[],fe=[];return at[0]=ie[0]-Me[0],at[1]=ie[1]-Me[1],at[2]=ie[2]-Me[2],fe[0]=at[2]*Math.sin(T)+at[0]*Math.cos(T),fe[1]=at[1],fe[2]=at[2]*Math.cos(T)-at[0]*Math.sin(T),_t[0]=fe[0]+Me[0],_t[1]=fe[1]+Me[1],_t[2]=fe[2]+Me[2],_t}function on(_t,ie,Me,T){var at=[],fe=[];return at[0]=ie[0]-Me[0],at[1]=ie[1]-Me[1],at[2]=ie[2]-Me[2],fe[0]=at[0]*Math.cos(T)-at[1]*Math.sin(T),fe[1]=at[0]*Math.sin(T)+at[1]*Math.cos(T),fe[2]=at[2],_t[0]=fe[0]+Me[0],_t[1]=fe[1]+Me[1],_t[2]=fe[2]+Me[2],_t}function Pe(_t,ie){var Me=_t[0],T=_t[1],at=_t[2],fe=ie[0],Jt=ie[1],Ie=ie[2],Ne=Math.sqrt((Me*Me+T*T+at*at)*(fe*fe+Jt*Jt+Ie*Ie)),en=Ne&&we(_t,ie)/Ne;return Math.acos(Math.min(Math.max(en,-1),1))}function Ze(_t){return _t[0]=0,_t[1]=0,_t[2]=0,_t}function Ke(_t){return"vec3("+_t[0]+", "+_t[1]+", "+_t[2]+")"}function le(_t,ie){return _t[0]===ie[0]&&_t[1]===ie[1]&&_t[2]===ie[2]}function Ae(_t,ie){var Me=_t[0],T=_t[1],at=_t[2],fe=ie[0],Jt=ie[1],Ie=ie[2];return Math.abs(Me-fe)<=c.Ib*Math.max(1,Math.abs(Me),Math.abs(fe))&&Math.abs(T-Jt)<=c.Ib*Math.max(1,Math.abs(T),Math.abs(Jt))&&Math.abs(at-Ie)<=c.Ib*Math.max(1,Math.abs(at),Math.abs(Ie))}var Pt=D,wt=null,he=null,je=Ct,Re=null,ce=z,Le=null,xe=function(){var _t=_();return function(ie,Me,T,at,fe,Jt){var Ie,Ne;for(Me||(Me=3),T||(T=0),at?Ne=Math.min(at*Me+T,ie.length):Ne=ie.length,Ie=T;Ie<Ne;Ie+=Me)_t[0]=ie[Ie],_t[1]=ie[Ie+1],_t[2]=ie[Ie+2],fe(_t,_t,Jt),ie[Ie]=_t[0],ie[Ie+1]=_t[1],ie[Ie+2]=_t[2];return ie}}()},20263:function(yt,Et,y){"use strict";y.d(Et,{AK:function(){return we},Fv:function(){return be},I6:function(){return xn},IH:function(){return w},JG:function(){return S},Ue:function(){return _},al:function(){return z},bA:function(){return gt},d9:function(){return I},fF:function(){return Xe},kE:function(){return Ht},t7:function(){return Ge},t8:function(){return R},we:function(){return de}});var c=y(85551);function _(){var Pt=new c.WT(4);return c.WT!=Float32Array&&(Pt[0]=0,Pt[1]=0,Pt[2]=0,Pt[3]=0),Pt}function I(Pt){var wt=new c.WT(4);return wt[0]=Pt[0],wt[1]=Pt[1],wt[2]=Pt[2],wt[3]=Pt[3],wt}function z(Pt,wt,he,je){var Re=new c.WT(4);return Re[0]=Pt,Re[1]=wt,Re[2]=he,Re[3]=je,Re}function S(Pt,wt){return Pt[0]=wt[0],Pt[1]=wt[1],Pt[2]=wt[2],Pt[3]=wt[3],Pt}function R(Pt,wt,he,je,Re){return Pt[0]=wt,Pt[1]=he,Pt[2]=je,Pt[3]=Re,Pt}function w(Pt,wt,he){return Pt[0]=wt[0]+he[0],Pt[1]=wt[1]+he[1],Pt[2]=wt[2]+he[2],Pt[3]=wt[3]+he[3],Pt}function N(Pt,wt,he){return Pt[0]=wt[0]-he[0],Pt[1]=wt[1]-he[1],Pt[2]=wt[2]-he[2],Pt[3]=wt[3]-he[3],Pt}function D(Pt,wt,he){return Pt[0]=wt[0]*he[0],Pt[1]=wt[1]*he[1],Pt[2]=wt[2]*he[2],Pt[3]=wt[3]*he[3],Pt}function A(Pt,wt,he){return Pt[0]=wt[0]/he[0],Pt[1]=wt[1]/he[1],Pt[2]=wt[2]/he[2],Pt[3]=wt[3]/he[3],Pt}function L(Pt,wt){return Pt[0]=Math.ceil(wt[0]),Pt[1]=Math.ceil(wt[1]),Pt[2]=Math.ceil(wt[2]),Pt[3]=Math.ceil(wt[3]),Pt}function F(Pt,wt){return Pt[0]=Math.floor(wt[0]),Pt[1]=Math.floor(wt[1]),Pt[2]=Math.floor(wt[2]),Pt[3]=Math.floor(wt[3]),Pt}function it(Pt,wt,he){return Pt[0]=Math.min(wt[0],he[0]),Pt[1]=Math.min(wt[1],he[1]),Pt[2]=Math.min(wt[2],he[2]),Pt[3]=Math.min(wt[3],he[3]),Pt}function G(Pt,wt,he){return Pt[0]=Math.max(wt[0],he[0]),Pt[1]=Math.max(wt[1],he[1]),Pt[2]=Math.max(wt[2],he[2]),Pt[3]=Math.max(wt[3],he[3]),Pt}function kt(Pt,wt){return Pt[0]=glMatrix.round(wt[0]),Pt[1]=glMatrix.round(wt[1]),Pt[2]=glMatrix.round(wt[2]),Pt[3]=glMatrix.round(wt[3]),Pt}function gt(Pt,wt,he){return Pt[0]=wt[0]*he,Pt[1]=wt[1]*he,Pt[2]=wt[2]*he,Pt[3]=wt[3]*he,Pt}function Q(Pt,wt,he,je){return Pt[0]=wt[0]+he[0]*je,Pt[1]=wt[1]+he[1]*je,Pt[2]=wt[2]+he[2]*je,Pt[3]=wt[3]+he[3]*je,Pt}function Rt(Pt,wt){var he=wt[0]-Pt[0],je=wt[1]-Pt[1],Re=wt[2]-Pt[2],ce=wt[3]-Pt[3];return Math.sqrt(he*he+je*je+Re*Re+ce*ce)}function Ct(Pt,wt){var he=wt[0]-Pt[0],je=wt[1]-Pt[1],Re=wt[2]-Pt[2],ce=wt[3]-Pt[3];return he*he+je*je+Re*Re+ce*ce}function Ht(Pt){var wt=Pt[0],he=Pt[1],je=Pt[2],Re=Pt[3];return Math.sqrt(wt*wt+he*he+je*je+Re*Re)}function de(Pt){var wt=Pt[0],he=Pt[1],je=Pt[2],Re=Pt[3];return wt*wt+he*he+je*je+Re*Re}function ue(Pt,wt){return Pt[0]=-wt[0],Pt[1]=-wt[1],Pt[2]=-wt[2],Pt[3]=-wt[3],Pt}function Te(Pt,wt){return Pt[0]=1/wt[0],Pt[1]=1/wt[1],Pt[2]=1/wt[2],Pt[3]=1/wt[3],Pt}function be(Pt,wt){var he=wt[0],je=wt[1],Re=wt[2],ce=wt[3],Le=he*he+je*je+Re*Re+ce*ce;return Le>0&&(Le=1/Math.sqrt(Le)),Pt[0]=he*Le,Pt[1]=je*Le,Pt[2]=Re*Le,Pt[3]=ce*Le,Pt}function we(Pt,wt){return Pt[0]*wt[0]+Pt[1]*wt[1]+Pt[2]*wt[2]+Pt[3]*wt[3]}function re(Pt,wt,he,je){var Re=he[0]*je[1]-he[1]*je[0],ce=he[0]*je[2]-he[2]*je[0],Le=he[0]*je[3]-he[3]*je[0],xe=he[1]*je[2]-he[2]*je[1],_t=he[1]*je[3]-he[3]*je[1],ie=he[2]*je[3]-he[3]*je[2],Me=wt[0],T=wt[1],at=wt[2],fe=wt[3];return Pt[0]=T*ie-at*_t+fe*xe,Pt[1]=-(Me*ie)+at*Le-fe*ce,Pt[2]=Me*_t-T*Le+fe*Re,Pt[3]=-(Me*xe)+T*ce-at*Re,Pt}function Ge(Pt,wt,he,je){var Re=wt[0],ce=wt[1],Le=wt[2],xe=wt[3];return Pt[0]=Re+je*(he[0]-Re),Pt[1]=ce+je*(he[1]-ce),Pt[2]=Le+je*(he[2]-Le),Pt[3]=xe+je*(he[3]-xe),Pt}function rn(Pt,wt){wt=wt===void 0?1:wt;var he,je,Re,ce,Le,xe,_t;_t=glMatrix.RANDOM(),he=_t*2-1,je=(4*glMatrix.RANDOM()-2)*Math.sqrt(_t*-_t+_t),Le=he*he+je*je,_t=glMatrix.RANDOM(),Re=_t*2-1,ce=(4*glMatrix.RANDOM()-2)*Math.sqrt(_t*-_t+_t),xe=Re*Re+ce*ce;var ie=Math.sqrt((1-Le)/xe);return Pt[0]=wt*he,Pt[1]=wt*je,Pt[2]=wt*Re*ie,Pt[3]=wt*ce*ie,Pt}function Xe(Pt,wt,he){var je=wt[0],Re=wt[1],ce=wt[2],Le=wt[3];return Pt[0]=he[0]*je+he[4]*Re+he[8]*ce+he[12]*Le,Pt[1]=he[1]*je+he[5]*Re+he[9]*ce+he[13]*Le,Pt[2]=he[2]*je+he[6]*Re+he[10]*ce+he[14]*Le,Pt[3]=he[3]*je+he[7]*Re+he[11]*ce+he[15]*Le,Pt}function En(Pt,wt,he){var je=he[0],Re=he[1],ce=he[2],Le=he[3],xe=wt[0],_t=wt[1],ie=wt[2],Me=Re*ie-ce*_t,T=ce*xe-je*ie,at=je*_t-Re*xe;return Me=Me+Me,T=T+T,at=at+at,Pt[0]=xe+Le*Me+Re*at-ce*T,Pt[1]=_t+Le*T+ce*Me-je*at,Pt[2]=ie+Le*at+je*T-Re*Me,Pt[3]=wt[3],Pt}function Pn(Pt){return Pt[0]=0,Pt[1]=0,Pt[2]=0,Pt[3]=0,Pt}function tn(Pt){return"vec4("+Pt[0]+", "+Pt[1]+", "+Pt[2]+", "+Pt[3]+")"}function xn(Pt,wt){return Pt[0]===wt[0]&&Pt[1]===wt[1]&&Pt[2]===wt[2]&&Pt[3]===wt[3]}function It(Pt,wt){var he=Pt[0],je=Pt[1],Re=Pt[2],ce=Pt[3],Le=wt[0],xe=wt[1],_t=wt[2],ie=wt[3];return Math.abs(he-Le)<=glMatrix.EPSILON*Math.max(1,Math.abs(he),Math.abs(Le))&&Math.abs(je-xe)<=glMatrix.EPSILON*Math.max(1,Math.abs(je),Math.abs(xe))&&Math.abs(Re-_t)<=glMatrix.EPSILON*Math.max(1,Math.abs(Re),Math.abs(_t))&&Math.abs(ce-ie)<=glMatrix.EPSILON*Math.max(1,Math.abs(ce),Math.abs(ie))}var Ee=null,fn=null,on=null,Pe=null,Ze=null,Ke=null,le=null,Ae=function(){var Pt=_();return function(wt,he,je,Re,ce,Le){var xe,_t;for(he||(he=4),je||(je=0),Re?_t=Math.min(Re*he+je,wt.length):_t=wt.length,xe=je;xe<_t;xe+=he)Pt[0]=wt[xe],Pt[1]=wt[xe+1],Pt[2]=wt[xe+2],Pt[3]=wt[xe+3],ce(Pt,Pt,Le),wt[xe]=Pt[0],wt[xe+1]=Pt[1],wt[xe+2]=Pt[2],wt[xe+3]=Pt[3];return wt}}()},51470:function(yt,Et,y){var c=y(89224);yt.exports={Graph:c.Graph,json:y(17401),alg:y(54613),version:c.version}},91606:function(yt,Et,y){var c=y(95329);yt.exports=_;function _(I){var z={},S=[],R;function w(N){c.has(z,N)||(z[N]=!0,R.push(N),c.each(I.successors(N),w),c.each(I.predecessors(N),w))}return c.each(I.nodes(),function(N){R=[],w(N),R.length&&S.push(R)}),S}},21482:function(yt,Et,y){var c=y(95329);yt.exports=_;function _(z,S,R){c.isArray(S)||(S=[S]);var w=(z.isDirected()?z.successors:z.neighbors).bind(z),N=[],D={};return c.each(S,function(A){if(!z.hasNode(A))throw new Error("Graph does not have node: "+A);I(z,A,R==="post",D,w,N)}),N}function I(z,S,R,w,N,D){c.has(w,S)||(w[S]=!0,R||D.push(S),c.each(N(S),function(A){I(z,A,R,w,N,D)}),R&&D.push(S))}},40845:function(yt,Et,y){var c=y(13746),_=y(95329);yt.exports=I;function I(z,S,R){return _.transform(z.nodes(),function(w,N){w[N]=c(z,N,S,R)},{})}},13746:function(yt,Et,y){var c=y(95329),_=y(36614);yt.exports=z;var I=c.constant(1);function z(R,w,N,D){return S(R,String(w),N||I,D||function(A){return R.outEdges(A)})}function S(R,w,N,D){var A={},L=new _,F,it,G=function(kt){var gt=kt.v!==F?kt.v:kt.w,Q=A[gt],Rt=N(kt),Ct=it.distance+Rt;if(Rt<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+kt+" Weight: "+Rt);Ct<Q.distance&&(Q.distance=Ct,Q.predecessor=F,L.decrease(gt,Ct))};for(R.nodes().forEach(function(kt){var gt=kt===w?0:Number.POSITIVE_INFINITY;A[kt]={distance:gt},L.add(kt,gt)});L.size()>0&&(F=L.removeMin(),it=A[F],it.distance!==Number.POSITIVE_INFINITY);)D(F).forEach(G);return A}},59324:function(yt,Et,y){var c=y(95329),_=y(94558);yt.exports=I;function I(z){return c.filter(_(z),function(S){return S.length>1||S.length===1&&z.hasEdge(S[0],S[0])})}},22893:function(yt,Et,y){var c=y(95329);yt.exports=I;var _=c.constant(1);function I(S,R,w){return z(S,R||_,w||function(N){return S.outEdges(N)})}function z(S,R,w){var N={},D=S.nodes();return D.forEach(function(A){N[A]={},N[A][A]={distance:0},D.forEach(function(L){A!==L&&(N[A][L]={distance:Number.POSITIVE_INFINITY})}),w(A).forEach(function(L){var F=L.v===A?L.w:L.v,it=R(L);N[A][F]={distance:it,predecessor:A}})}),D.forEach(function(A){var L=N[A];D.forEach(function(F){var it=N[F];D.forEach(function(G){var kt=it[A],gt=L[G],Q=it[G],Rt=kt.distance+gt.distance;Rt<Q.distance&&(Q.distance=Rt,Q.predecessor=gt.predecessor)})})}),N}},54613:function(yt,Et,y){yt.exports={components:y(91606),dijkstra:y(13746),dijkstraAll:y(40845),findCycles:y(59324),floydWarshall:y(22893),isAcyclic:y(588),postorder:y(98049),preorder:y(67158),prim:y(66058),tarjan:y(94558),topsort:y(7793)}},588:function(yt,Et,y){var c=y(7793);yt.exports=_;function _(I){try{c(I)}catch(z){if(z instanceof c.CycleException)return!1;throw z}return!0}},98049:function(yt,Et,y){var c=y(21482);yt.exports=_;function _(I,z){return c(I,z,"post")}},67158:function(yt,Et,y){var c=y(21482);yt.exports=_;function _(I,z){return c(I,z,"pre")}},66058:function(yt,Et,y){var c=y(95329),_=y(6349),I=y(36614);yt.exports=z;function z(S,R){var w=new _,N={},D=new I,A;function L(it){var G=it.v===A?it.w:it.v,kt=D.priority(G);if(kt!==void 0){var gt=R(it);gt<kt&&(N[G]=A,D.decrease(G,gt))}}if(S.nodeCount()===0)return w;c.each(S.nodes(),function(it){D.add(it,Number.POSITIVE_INFINITY),w.setNode(it)}),D.decrease(S.nodes()[0],0);for(var F=!1;D.size()>0;){if(A=D.removeMin(),c.has(N,A))w.setEdge(A,N[A]);else{if(F)throw new Error("Input graph is not connected: "+S);F=!0}S.nodeEdges(A).forEach(L)}return w}},94558:function(yt,Et,y){var c=y(95329);yt.exports=_;function _(I){var z=0,S=[],R={},w=[];function N(D){var A=R[D]={onStack:!0,lowlink:z,index:z++};if(S.push(D),I.successors(D).forEach(function(it){c.has(R,it)?R[it].onStack&&(A.lowlink=Math.min(A.lowlink,R[it].index)):(N(it),A.lowlink=Math.min(A.lowlink,R[it].lowlink))}),A.lowlink===A.index){var L=[],F;do F=S.pop(),R[F].onStack=!1,L.push(F);while(D!==F);w.push(L)}}return I.nodes().forEach(function(D){c.has(R,D)||N(D)}),w}},7793:function(yt,Et,y){var c=y(95329);yt.exports=_,_.CycleException=I;function _(z){var S={},R={},w=[];function N(D){if(c.has(R,D))throw new I;c.has(S,D)||(R[D]=!0,S[D]=!0,c.each(z.predecessors(D),N),delete R[D],w.push(D))}if(c.each(z.sinks(),N),c.size(S)!==z.nodeCount())throw new I;return w}function I(){}I.prototype=new Error},36614:function(yt,Et,y){var c=y(95329);yt.exports=_;function _(){this._arr=[],this._keyIndices={}}_.prototype.size=function(){return this._arr.length},_.prototype.keys=function(){return this._arr.map(function(I){return I.key})},_.prototype.has=function(I){return c.has(this._keyIndices,I)},_.prototype.priority=function(I){var z=this._keyIndices[I];if(z!==void 0)return this._arr[z].priority},_.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},_.prototype.add=function(I,z){var S=this._keyIndices;if(I=String(I),!c.has(S,I)){var R=this._arr,w=R.length;return S[I]=w,R.push({key:I,priority:z}),this._decrease(w),!0}return!1},_.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var I=this._arr.pop();return delete this._keyIndices[I.key],this._heapify(0),I.key},_.prototype.decrease=function(I,z){var S=this._keyIndices[I];if(z>this._arr[S].priority)throw new Error("New priority is greater than current priority. Key: "+I+" Old: "+this._arr[S].priority+" New: "+z);this._arr[S].priority=z,this._decrease(S)},_.prototype._heapify=function(I){var z=this._arr,S=2*I,R=S+1,w=I;S<z.length&&(w=z[S].priority<z[w].priority?S:w,R<z.length&&(w=z[R].priority<z[w].priority?R:w),w!==I&&(this._swap(I,w),this._heapify(w)))},_.prototype._decrease=function(I){for(var z=this._arr,S=z[I].priority,R;I!==0&&(R=I>>1,!(z[R].priority<S));)this._swap(I,R),I=R},_.prototype._swap=function(I,z){var S=this._arr,R=this._keyIndices,w=S[I],N=S[z];S[I]=N,S[z]=w,R[N.key]=I,R[w.key]=z}},6349:function(yt,Et,y){"use strict";var c=y(95329);yt.exports=S;var _="\0",I="\0",z="";function S(L){this._isDirected=c.has(L,"directed")?L.directed:!0,this._isMultigraph=c.has(L,"multigraph")?L.multigraph:!1,this._isCompound=c.has(L,"compound")?L.compound:!1,this._label=void 0,this._defaultNodeLabelFn=c.constant(void 0),this._defaultEdgeLabelFn=c.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[I]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}S.prototype._nodeCount=0,S.prototype._edgeCount=0,S.prototype.isDirected=function(){return this._isDirected},S.prototype.isMultigraph=function(){return this._isMultigraph},S.prototype.isCompound=function(){return this._isCompound},S.prototype.setGraph=function(L){return this._label=L,this},S.prototype.graph=function(){return this._label},S.prototype.setDefaultNodeLabel=function(L){return c.isFunction(L)||(L=c.constant(L)),this._defaultNodeLabelFn=L,this},S.prototype.nodeCount=function(){return this._nodeCount},S.prototype.nodes=function(){return c.keys(this._nodes)},S.prototype.sources=function(){var L=this;return c.filter(this.nodes(),function(F){return c.isEmpty(L._in[F])})},S.prototype.sinks=function(){var L=this;return c.filter(this.nodes(),function(F){return c.isEmpty(L._out[F])})},S.prototype.setNodes=function(L,F){var it=arguments,G=this;return c.each(L,function(kt){it.length>1?G.setNode(kt,F):G.setNode(kt)}),this},S.prototype.setNode=function(L,F){return c.has(this._nodes,L)?(arguments.length>1&&(this._nodes[L]=F),this):(this._nodes[L]=arguments.length>1?F:this._defaultNodeLabelFn(L),this._isCompound&&(this._parent[L]=I,this._children[L]={},this._children[I][L]=!0),this._in[L]={},this._preds[L]={},this._out[L]={},this._sucs[L]={},++this._nodeCount,this)},S.prototype.node=function(L){return this._nodes[L]},S.prototype.hasNode=function(L){return c.has(this._nodes,L)},S.prototype.removeNode=function(L){var F=this;if(c.has(this._nodes,L)){var it=function(G){F.removeEdge(F._edgeObjs[G])};delete this._nodes[L],this._isCompound&&(this._removeFromParentsChildList(L),delete this._parent[L],c.each(this.children(L),function(G){F.setParent(G)}),delete this._children[L]),c.each(c.keys(this._in[L]),it),delete this._in[L],delete this._preds[L],c.each(c.keys(this._out[L]),it),delete this._out[L],delete this._sucs[L],--this._nodeCount}return this},S.prototype.setParent=function(L,F){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(c.isUndefined(F))F=I;else{F+="";for(var it=F;!c.isUndefined(it);it=this.parent(it))if(it===L)throw new Error("Setting "+F+" as parent of "+L+" would create a cycle");this.setNode(F)}return this.setNode(L),this._removeFromParentsChildList(L),this._parent[L]=F,this._children[F][L]=!0,this},S.prototype._removeFromParentsChildList=function(L){delete this._children[this._parent[L]][L]},S.prototype.parent=function(L){if(this._isCompound){var F=this._parent[L];if(F!==I)return F}},S.prototype.children=function(L){if(c.isUndefined(L)&&(L=I),this._isCompound){var F=this._children[L];if(F)return c.keys(F)}else{if(L===I)return this.nodes();if(this.hasNode(L))return[]}},S.prototype.predecessors=function(L){var F=this._preds[L];if(F)return c.keys(F)},S.prototype.successors=function(L){var F=this._sucs[L];if(F)return c.keys(F)},S.prototype.neighbors=function(L){var F=this.predecessors(L);if(F)return c.union(F,this.successors(L))},S.prototype.isLeaf=function(L){var F;return this.isDirected()?F=this.successors(L):F=this.neighbors(L),F.length===0},S.prototype.filterNodes=function(L){var F=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});F.setGraph(this.graph());var it=this;c.each(this._nodes,function(gt,Q){L(Q)&&F.setNode(Q,gt)}),c.each(this._edgeObjs,function(gt){F.hasNode(gt.v)&&F.hasNode(gt.w)&&F.setEdge(gt,it.edge(gt))});var G={};function kt(gt){var Q=it.parent(gt);return Q===void 0||F.hasNode(Q)?(G[gt]=Q,Q):Q in G?G[Q]:kt(Q)}return this._isCompound&&c.each(F.nodes(),function(gt){F.setParent(gt,kt(gt))}),F},S.prototype.setDefaultEdgeLabel=function(L){return c.isFunction(L)||(L=c.constant(L)),this._defaultEdgeLabelFn=L,this},S.prototype.edgeCount=function(){return this._edgeCount},S.prototype.edges=function(){return c.values(this._edgeObjs)},S.prototype.setPath=function(L,F){var it=this,G=arguments;return c.reduce(L,function(kt,gt){return G.length>1?it.setEdge(kt,gt,F):it.setEdge(kt,gt),gt}),this},S.prototype.setEdge=function(){var L,F,it,G,kt=!1,gt=arguments[0];typeof gt=="object"&>!==null&&"v"in gt?(L=gt.v,F=gt.w,it=gt.name,arguments.length===2&&(G=arguments[1],kt=!0)):(L=gt,F=arguments[1],it=arguments[3],arguments.length>2&&(G=arguments[2],kt=!0)),L=""+L,F=""+F,c.isUndefined(it)||(it=""+it);var Q=N(this._isDirected,L,F,it);if(c.has(this._edgeLabels,Q))return kt&&(this._edgeLabels[Q]=G),this;if(!c.isUndefined(it)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(L),this.setNode(F),this._edgeLabels[Q]=kt?G:this._defaultEdgeLabelFn(L,F,it);var Rt=D(this._isDirected,L,F,it);return L=Rt.v,F=Rt.w,Object.freeze(Rt),this._edgeObjs[Q]=Rt,R(this._preds[F],L),R(this._sucs[L],F),this._in[F][Q]=Rt,this._out[L][Q]=Rt,this._edgeCount++,this},S.prototype.edge=function(L,F,it){var G=arguments.length===1?A(this._isDirected,arguments[0]):N(this._isDirected,L,F,it);return this._edgeLabels[G]},S.prototype.hasEdge=function(L,F,it){var G=arguments.length===1?A(this._isDirected,arguments[0]):N(this._isDirected,L,F,it);return c.has(this._edgeLabels,G)},S.prototype.removeEdge=function(L,F,it){var G=arguments.length===1?A(this._isDirected,arguments[0]):N(this._isDirected,L,F,it),kt=this._edgeObjs[G];return kt&&(L=kt.v,F=kt.w,delete this._edgeLabels[G],delete this._edgeObjs[G],w(this._preds[F],L),w(this._sucs[L],F),delete this._in[F][G],delete this._out[L][G],this._edgeCount--),this},S.prototype.inEdges=function(L,F){var it=this._in[L];if(it){var G=c.values(it);return F?c.filter(G,function(kt){return kt.v===F}):G}},S.prototype.outEdges=function(L,F){var it=this._out[L];if(it){var G=c.values(it);return F?c.filter(G,function(kt){return kt.w===F}):G}},S.prototype.nodeEdges=function(L,F){var it=this.inEdges(L,F);if(it)return it.concat(this.outEdges(L,F))};function R(L,F){L[F]?L[F]++:L[F]=1}function w(L,F){--L[F]||delete L[F]}function N(L,F,it,G){var kt=""+F,gt=""+it;if(!L&&kt>gt){var Q=kt;kt=gt,gt=Q}return kt+z+gt+z+(c.isUndefined(G)?_:G)}function D(L,F,it,G){var kt=""+F,gt=""+it;if(!L&&kt>gt){var Q=kt;kt=gt,gt=Q}var Rt={v:kt,w:gt};return G&&(Rt.name=G),Rt}function A(L,F){return N(L,F.v,F.w,F.name)}},89224:function(yt,Et,y){yt.exports={Graph:y(6349),version:y(16544)}},17401:function(yt,Et,y){var c=y(95329),_=y(6349);yt.exports={write:I,read:R};function I(w){var N={options:{directed:w.isDirected(),multigraph:w.isMultigraph(),compound:w.isCompound()},nodes:z(w),edges:S(w)};return c.isUndefined(w.graph())||(N.value=c.clone(w.graph())),N}function z(w){return c.map(w.nodes(),function(N){var D=w.node(N),A=w.parent(N),L={v:N};return c.isUndefined(D)||(L.value=D),c.isUndefined(A)||(L.parent=A),L})}function S(w){return c.map(w.edges(),function(N){var D=w.edge(N),A={v:N.v,w:N.w};return c.isUndefined(N.name)||(A.name=N.name),c.isUndefined(D)||(A.value=D),A})}function R(w){var N=new _(w.options).setGraph(w.value);return c.each(w.nodes,function(D){N.setNode(D.v,D.value),D.parent&&N.setParent(D.v,D.parent)}),c.each(w.edges,function(D){N.setEdge({v:D.v,w:D.w,name:D.name},D.value)}),N}},95329:function(yt,Et,y){var c;try{c={clone:y(76833),constant:y(13503),each:y(76934),filter:y(64725),has:y(99946),isArray:y(80744),isEmpty:y(61627),isFunction:y(9363),isUndefined:y(16513),keys:y(55451),map:y(9924),reduce:y(16473),size:y(40617),transform:y(91116),union:y(44065),values:y(81229)}}catch(_){}c||(c=window._),yt.exports=c},16544:function(yt){yt.exports="2.1.8"},34634:function(yt,Et,y){"use strict";y.r(Et),y.d(Et,{isAnyArray:function(){return _}});const c=Object.prototype.toString;function _(I){const z=c.call(I);return z.endsWith("Array]")&&!z.includes("Big")}},55973:function(yt){yt.exports=function(y){return!y||typeof y=="string"?!1:y instanceof Array||Array.isArray(y)||y.length>=0&&(y.splice instanceof Function||Object.getOwnPropertyDescriptor(y,y.length-1)&&y.constructor.name!=="String")}},15584:function(yt,Et,y){var c=y(73893),_=y(33152),I=c(_,"DataView");yt.exports=I},97288:function(yt,Et,y){var c=y(73893),_=y(33152),I=c(_,"Promise");yt.exports=I},23599:function(yt,Et,y){var c=y(73893),_=y(33152),I=c(_,"Set");yt.exports=I},98924:function(yt,Et,y){var c=y(52166),_=y(34776),I=y(40393);function z(S){var R=-1,w=S==null?0:S.length;for(this.__data__=new c;++R<w;)this.add(S[R])}z.prototype.add=z.prototype.push=_,z.prototype.has=I,yt.exports=z},26873:function(yt,Et,y){var c=y(73893),_=y(33152),I=c(_,"WeakMap");yt.exports=I},74809:function(yt){function Et(y,c){for(var _=-1,I=y==null?0:y.length;++_<I&&c(y[_],_,y)!==!1;);return y}yt.exports=Et},86952:function(yt){function Et(y,c){for(var _=-1,I=y==null?0:y.length,z=0,S=[];++_<I;){var R=y[_];c(R,_,y)&&(S[z++]=R)}return S}yt.exports=Et},84271:function(yt,Et,y){var c=y(17424);function _(I,z){var S=I==null?0:I.length;return!!S&&c(I,z,0)>-1}yt.exports=_},94874:function(yt){function Et(y,c,_){for(var I=-1,z=y==null?0:y.length;++I<z;)if(_(c,y[I]))return!0;return!1}yt.exports=Et},75010:function(yt){function Et(y,c){for(var _=-1,I=y==null?0:y.length,z=Array(I);++_<I;)z[_]=c(y[_],_,y);return z}yt.exports=Et},57095:function(yt){function Et(y,c){for(var _=-1,I=c.length,z=y.length;++_<I;)y[z+_]=c[_];return y}yt.exports=Et},99861:function(yt){function Et(y,c,_,I){var z=-1,S=y==null?0:y.length;for(I&&S&&(_=y[++z]);++z<S;)_=c(_,y[z],z,y);return _}yt.exports=Et},64045:function(yt){function Et(y,c){for(var _=-1,I=y==null?0:y.length;++_<I;)if(c(y[_],_,y))return!0;return!1}yt.exports=Et},26539:function(yt,Et,y){var c=y(22310),_=c("length");yt.exports=_},91937:function(yt,Et,y){var c=y(95378),_=y(55451);function I(z,S){return z&&c(S,_(S),z)}yt.exports=I},26680:function(yt,Et,y){var c=y(95378),_=y(56730);function I(z,S){return z&&c(S,_(S),z)}yt.exports=I},99045:function(yt,Et,y){var c=y(91866),_=y(74809),I=y(60348),z=y(91937),S=y(26680),R=y(32315),w=y(47760),N=y(15168),D=y(71678),A=y(12076),L=y(22675),F=y(66139),it=y(79264),G=y(97541),kt=y(4084),gt=y(80744),Q=y(57835),Rt=y(41626),Ct=y(20816),Ht=y(65226),de=y(55451),ue=y(56730),Te=1,be=2,we=4,re="[object Arguments]",Ge="[object Array]",rn="[object Boolean]",Xe="[object Date]",En="[object Error]",Pn="[object Function]",tn="[object GeneratorFunction]",xn="[object Map]",It="[object Number]",Ee="[object Object]",fn="[object RegExp]",on="[object Set]",Pe="[object String]",Ze="[object Symbol]",Ke="[object WeakMap]",le="[object ArrayBuffer]",Ae="[object DataView]",Pt="[object Float32Array]",wt="[object Float64Array]",he="[object Int8Array]",je="[object Int16Array]",Re="[object Int32Array]",ce="[object Uint8Array]",Le="[object Uint8ClampedArray]",xe="[object Uint16Array]",_t="[object Uint32Array]",ie={};ie[re]=ie[Ge]=ie[le]=ie[Ae]=ie[rn]=ie[Xe]=ie[Pt]=ie[wt]=ie[he]=ie[je]=ie[Re]=ie[xn]=ie[It]=ie[Ee]=ie[fn]=ie[on]=ie[Pe]=ie[Ze]=ie[ce]=ie[Le]=ie[xe]=ie[_t]=!0,ie[En]=ie[Pn]=ie[Ke]=!1;function Me(T,at,fe,Jt,Ie,Ne){var en,St=at&Te,tt=at&be,Nt=at&we;if(fe&&(en=Ie?fe(T,Jt,Ie,Ne):fe(T)),en!==void 0)return en;if(!Ct(T))return T;var Xt=gt(T);if(Xt){if(en=it(T),!St)return w(T,en)}else{var Lt=F(T),Zt=Lt==Pn||Lt==tn;if(Q(T))return R(T,St);if(Lt==Ee||Lt==re||Zt&&!Ie){if(en=tt||Zt?{}:kt(T),!St)return tt?D(T,S(en,T)):N(T,z(en,T))}else{if(!ie[Lt])return Ie?T:{};en=G(T,Lt,St)}}Ne||(Ne=new c);var Ut=Ne.get(T);if(Ut)return Ut;Ne.set(T,en),Ht(T)?T.forEach(function(te){en.add(Me(te,at,fe,te,T,Ne))}):Rt(T)&&T.forEach(function(te,ke){en.set(ke,Me(te,at,fe,ke,T,Ne))});var qt=Nt?tt?L:A:tt?ue:de,se=Xt?void 0:qt(T);return _(se||T,function(te,ke){se&&(ke=te,te=T[ke]),I(en,ke,Me(te,at,fe,ke,T,Ne))}),en}yt.exports=Me},44107:function(yt,Et,y){var c=y(85605),_=y(49164),I=_(c);yt.exports=I},2659:function(yt,Et,y){var c=y(45029);function _(I,z,S){for(var R=-1,w=I.length;++R<w;){var N=I[R],D=z(N);if(D!=null&&(A===void 0?D===D&&!c(D):S(D,A)))var A=D,L=N}return L}yt.exports=_},32872:function(yt,Et,y){var c=y(44107);function _(I,z){var S=[];return c(I,function(R,w,N){z(R,w,N)&&S.push(R)}),S}yt.exports=_},51533:function(yt){function Et(y,c,_,I){for(var z=y.length,S=_+(I?1:-1);I?S--:++S<z;)if(c(y[S],S,y))return S;return-1}yt.exports=Et},9256:function(yt,Et,y){var c=y(57095),_=y(88133);function I(z,S,R,w,N){var D=-1,A=z.length;for(R||(R=_),N||(N=[]);++D<A;){var L=z[D];S>0&&R(L)?S>1?I(L,S-1,R,w,N):c(N,L):w||(N[N.length]=L)}return N}yt.exports=I},85605:function(yt,Et,y){var c=y(14018),_=y(55451);function I(z,S){return z&&c(z,S,_)}yt.exports=I},65968:function(yt,Et,y){var c=y(1186),_=y(9171);function I(z,S){S=c(S,z);for(var R=0,w=S.length;z!=null&&R<w;)z=z[_(S[R++])];return R&&R==w?z:void 0}yt.exports=I},75635:function(yt,Et,y){var c=y(57095),_=y(80744);function I(z,S,R){var w=S(z);return _(z)?w:c(w,R(z))}yt.exports=I},40302:function(yt){function Et(y,c){return y>c}yt.exports=Et},3251:function(yt){var Et=Object.prototype,y=Et.hasOwnProperty;function c(_,I){return _!=null&&y.call(_,I)}yt.exports=c},62348:function(yt){function Et(y,c){return y!=null&&c in Object(y)}yt.exports=Et},17424:function(yt,Et,y){var c=y(51533),_=y(8373),I=y(49237);function z(S,R,w){return R===R?I(S,R,w):c(S,_,w)}yt.exports=z},77295:function(yt,Et,y){var c=y(84412),_=y(93913);function I(z,S,R,w,N){return z===S?!0:z==null||S==null||!_(z)&&!_(S)?z!==z&&S!==S:c(z,S,R,w,I,N)}yt.exports=I},84412:function(yt,Et,y){var c=y(91866),_=y(50401),I=y(57710),z=y(4983),S=y(66139),R=y(80744),w=y(57835),N=y(18397),D=1,A="[object Arguments]",L="[object Array]",F="[object Object]",it=Object.prototype,G=it.hasOwnProperty;function kt(gt,Q,Rt,Ct,Ht,de){var ue=R(gt),Te=R(Q),be=ue?L:S(gt),we=Te?L:S(Q);be=be==A?F:be,we=we==A?F:we;var re=be==F,Ge=we==F,rn=be==we;if(rn&&w(gt)){if(!w(Q))return!1;ue=!0,re=!1}if(rn&&!re)return de||(de=new c),ue||N(gt)?_(gt,Q,Rt,Ct,Ht,de):I(gt,Q,be,Rt,Ct,Ht,de);if(!(Rt&D)){var Xe=re&&G.call(gt,"__wrapped__"),En=Ge&&G.call(Q,"__wrapped__");if(Xe||En){var Pn=Xe?gt.value():gt,tn=En?Q.value():Q;return de||(de=new c),Ht(Pn,tn,Rt,Ct,de)}}return rn?(de||(de=new c),z(gt,Q,Rt,Ct,Ht,de)):!1}yt.exports=kt},55005:function(yt,Et,y){var c=y(66139),_=y(93913),I="[object Map]";function z(S){return _(S)&&c(S)==I}yt.exports=z},51524:function(yt,Et,y){var c=y(91866),_=y(77295),I=1,z=2;function S(R,w,N,D){var A=N.length,L=A,F=!D;if(R==null)return!L;for(R=Object(R);A--;){var it=N[A];if(F&&it[2]?it[1]!==R[it[0]]:!(it[0]in R))return!1}for(;++A<L;){it=N[A];var G=it[0],kt=R[G],gt=it[1];if(F&&it[2]){if(kt===void 0&&!(G in R))return!1}else{var Q=new c;if(D)var Rt=D(kt,gt,G,R,w,Q);if(!(Rt===void 0?_(gt,kt,I|z,D,Q):Rt))return!1}}return!0}yt.exports=S},8373:function(yt){function Et(y){return y!==y}yt.exports=Et},38652:function(yt,Et,y){var c=y(66139),_=y(93913),I="[object Set]";function z(S){return _(S)&&c(S)==I}yt.exports=z},95979:function(yt,Et,y){var c=y(17632),_=y(38933),I=y(46962),z=y(80744),S=y(35769);function R(w){return typeof w=="function"?w:w==null?I:typeof w=="object"?z(w)?_(w[0],w[1]):c(w):S(w)}yt.exports=R},6019:function(yt,Et,y){var c=y(7975),_=y(23730),I=Object.prototype,z=I.hasOwnProperty;function S(R){if(!c(R))return _(R);var w=[];for(var N in Object(R))z.call(R,N)&&N!="constructor"&&w.push(N);return w}yt.exports=S},93757:function(yt){function Et(y,c){return y<c}yt.exports=Et},65487:function(yt,Et,y){var c=y(44107),_=y(24665);function I(z,S){var R=-1,w=_(z)?Array(z.length):[];return c(z,function(N,D,A){w[++R]=S(N,D,A)}),w}yt.exports=I},17632:function(yt,Et,y){var c=y(51524),_=y(10261),I=y(24122);function z(S){var R=_(S);return R.length==1&&R[0][2]?I(R[0][0],R[0][1]):function(w){return w===S||c(w,S,R)}}yt.exports=z},38933:function(yt,Et,y){var c=y(77295),_=y(44231),I=y(37879),z=y(86773),S=y(88411),R=y(24122),w=y(9171),N=1,D=2;function A(L,F){return z(L)&&S(F)?R(w(L),F):function(it){var G=_(it,L);return G===void 0&&G===F?I(it,L):c(F,G,N|D)}}yt.exports=A},58506:function(yt,Et,y){var c=y(75010),_=y(65968),I=y(95979),z=y(65487),S=y(33065),R=y(38342),w=y(11249),N=y(46962),D=y(80744);function A(L,F,it){F.length?F=c(F,function(gt){return D(gt)?function(Q){return _(Q,gt.length===1?gt[0]:gt)}:gt}):F=[N];var G=-1;F=c(F,R(I));var kt=z(L,function(gt,Q,Rt){var Ct=c(F,function(Ht){return Ht(gt)});return{criteria:Ct,index:++G,value:gt}});return S(kt,function(gt,Q){return w(gt,Q,it)})}yt.exports=A},88832:function(yt,Et,y){var c=y(10867),_=y(37879);function I(z,S){return c(z,S,function(R,w){return _(z,w)})}yt.exports=I},10867:function(yt,Et,y){var c=y(65968),_=y(36897),I=y(1186);function z(S,R,w){for(var N=-1,D=R.length,A={};++N<D;){var L=R[N],F=c(S,L);w(F,L)&&_(A,I(L,S),F)}return A}yt.exports=z},22310:function(yt){function Et(y){return function(c){return c==null?void 0:c[y]}}yt.exports=Et},96916:function(yt,Et,y){var c=y(65968);function _(I){return function(z){return c(z,I)}}yt.exports=_},36121:function(yt){var Et=Math.ceil,y=Math.max;function c(_,I,z,S){for(var R=-1,w=y(Et((I-_)/(z||1)),0),N=Array(w);w--;)N[S?w:++R]=_,_+=z;return N}yt.exports=c},30739:function(yt){function Et(y,c,_,I,z){return z(y,function(S,R,w){_=I?(I=!1,S):c(_,S,R,w)}),_}yt.exports=Et},36897:function(yt,Et,y){var c=y(60348),_=y(1186),I=y(70213),z=y(20816),S=y(9171);function R(w,N,D,A){if(!z(w))return w;N=_(N,w);for(var L=-1,F=N.length,it=F-1,G=w;G!=null&&++L<F;){var kt=S(N[L]),gt=D;if(kt==="__proto__"||kt==="constructor"||kt==="prototype")return w;if(L!=it){var Q=G[kt];gt=A?A(Q,kt,G):void 0,gt===void 0&&(gt=z(Q)?Q:I(N[L+1])?[]:{})}c(G,kt,gt),G=G[kt]}return w}yt.exports=R},33065:function(yt){function Et(y,c){var _=y.length;for(y.sort(c);_--;)y[_]=y[_].value;return y}yt.exports=Et},50230:function(yt,Et,y){var c=y(91869),_=y(75010),I=y(80744),z=y(45029),S=1/0,R=c?c.prototype:void 0,w=R?R.toString:void 0;function N(D){if(typeof D=="string")return D;if(I(D))return _(D,N)+"";if(z(D))return w?w.call(D):"";var A=D+"";return A=="0"&&1/D==-S?"-0":A}yt.exports=N},13927:function(yt,Et,y){var c=y(15333),_=/^\s+/;function I(z){return z&&z.slice(0,c(z)+1).replace(_,"")}yt.exports=I},29098:function(yt,Et,y){var c=y(98924),_=y(84271),I=y(94874),z=y(1931),S=y(47506),R=y(79679),w=200;function N(D,A,L){var F=-1,it=_,G=D.length,kt=!0,gt=[],Q=gt;if(L)kt=!1,it=I;else if(G>=w){var Rt=A?null:S(D);if(Rt)return R(Rt);kt=!1,it=z,Q=new c}else Q=A?[]:gt;t:for(;++F<G;){var Ct=D[F],Ht=A?A(Ct):Ct;if(Ct=L||Ct!==0?Ct:0,kt&&Ht===Ht){for(var de=Q.length;de--;)if(Q[de]===Ht)continue t;A&&Q.push(Ht),gt.push(Ct)}else it(Q,Ht,L)||(Q!==gt&&Q.push(Ht),gt.push(Ct))}return gt}yt.exports=N},20720:function(yt,Et,y){var c=y(75010);function _(I,z){return c(z,function(S){return I[S]})}yt.exports=_},94484:function(yt){function Et(y,c,_){for(var I=-1,z=y.length,S=c.length,R={};++I<z;){var w=I<S?c[I]:void 0;_(R,y[I],w)}return R}yt.exports=Et},1931:function(yt){function Et(y,c){return y.has(c)}yt.exports=Et},11756:function(yt,Et,y){var c=y(46962);function _(I){return typeof I=="function"?I:c}yt.exports=_},1186:function(yt,Et,y){var c=y(80744),_=y(86773),I=y(40493),z=y(44140);function S(R,w){return c(R)?R:_(R,w)?[R]:I(z(R))}yt.exports=S},27984:function(yt,Et,y){var c=y(20188);function _(I,z){var S=z?c(I.buffer):I.buffer;return new I.constructor(S,I.byteOffset,I.byteLength)}yt.exports=_},78583:function(yt){var Et=/\w*$/;function y(c){var _=new c.constructor(c.source,Et.exec(c));return _.lastIndex=c.lastIndex,_}yt.exports=y},28757:function(yt,Et,y){var c=y(91869),_=c?c.prototype:void 0,I=_?_.valueOf:void 0;function z(S){return I?Object(I.call(S)):{}}yt.exports=z},83018:function(yt,Et,y){var c=y(45029);function _(I,z){if(I!==z){var S=I!==void 0,R=I===null,w=I===I,N=c(I),D=z!==void 0,A=z===null,L=z===z,F=c(z);if(!A&&!F&&!N&&I>z||N&&D&&L&&!A&&!F||R&&D&&L||!S&&L||!w)return 1;if(!R&&!N&&!F&&I<z||F&&S&&w&&!R&&!N||A&&S&&w||!D&&w||!L)return-1}return 0}yt.exports=_},11249:function(yt,Et,y){var c=y(83018);function _(I,z,S){for(var R=-1,w=I.criteria,N=z.criteria,D=w.length,A=S.length;++R<D;){var L=c(w[R],N[R]);if(L){if(R>=A)return L;var F=S[R];return L*(F=="desc"?-1:1)}}return I.index-z.index}yt.exports=_},15168:function(yt,Et,y){var c=y(95378),_=y(58966);function I(z,S){return c(z,_(z),S)}yt.exports=I},71678:function(yt,Et,y){var c=y(95378),_=y(66817);function I(z,S){return c(z,_(z),S)}yt.exports=I},49164:function(yt,Et,y){var c=y(24665);function _(I,z){return function(S,R){if(S==null)return S;if(!c(S))return I(S,R);for(var w=S.length,N=z?w:-1,D=Object(S);(z?N--:++N<w)&&R(D[N],N,D)!==!1;);return S}}yt.exports=_},19554:function(yt,Et,y){var c=y(95979),_=y(24665),I=y(55451);function z(S){return function(R,w,N){var D=Object(R);if(!_(R)){var A=c(w,3);R=I(R),w=function(F){return A(D[F],F,D)}}var L=S(R,w,N);return L>-1?D[A?R[L]:L]:void 0}}yt.exports=z},76106:function(yt,Et,y){var c=y(36121),_=y(8138),I=y(97341);function z(S){return function(R,w,N){return N&&typeof N!="number"&&_(R,w,N)&&(w=N=void 0),R=I(R),w===void 0?(w=R,R=0):w=I(w),N=N===void 0?R<w?1:-1:I(N),c(R,w,N,S)}}yt.exports=z},47506:function(yt,Et,y){var c=y(23599),_=y(8242),I=y(79679),z=1/0,S=c&&1/I(new c([,-0]))[1]==z?function(R){return new c(R)}:_;yt.exports=S},50401:function(yt,Et,y){var c=y(98924),_=y(64045),I=y(1931),z=1,S=2;function R(w,N,D,A,L,F){var it=D&z,G=w.length,kt=N.length;if(G!=kt&&!(it&&kt>G))return!1;var gt=F.get(w),Q=F.get(N);if(gt&&Q)return gt==N&&Q==w;var Rt=-1,Ct=!0,Ht=D&S?new c:void 0;for(F.set(w,N),F.set(N,w);++Rt<G;){var de=w[Rt],ue=N[Rt];if(A)var Te=it?A(ue,de,Rt,N,w,F):A(de,ue,Rt,w,N,F);if(Te!==void 0){if(Te)continue;Ct=!1;break}if(Ht){if(!_(N,function(be,we){if(!I(Ht,we)&&(de===be||L(de,be,D,A,F)))return Ht.push(we)})){Ct=!1;break}}else if(!(de===ue||L(de,ue,D,A,F))){Ct=!1;break}}return F.delete(w),F.delete(N),Ct}yt.exports=R},57710:function(yt,Et,y){var c=y(91869),_=y(77945),I=y(43607),z=y(50401),S=y(83383),R=y(79679),w=1,N=2,D="[object Boolean]",A="[object Date]",L="[object Error]",F="[object Map]",it="[object Number]",G="[object RegExp]",kt="[object Set]",gt="[object String]",Q="[object Symbol]",Rt="[object ArrayBuffer]",Ct="[object DataView]",Ht=c?c.prototype:void 0,de=Ht?Ht.valueOf:void 0;function ue(Te,be,we,re,Ge,rn,Xe){switch(we){case Ct:if(Te.byteLength!=be.byteLength||Te.byteOffset!=be.byteOffset)return!1;Te=Te.buffer,be=be.buffer;case Rt:return!(Te.byteLength!=be.byteLength||!rn(new _(Te),new _(be)));case D:case A:case it:return I(+Te,+be);case L:return Te.name==be.name&&Te.message==be.message;case G:case gt:return Te==be+"";case F:var En=S;case kt:var Pn=re&w;if(En||(En=R),Te.size!=be.size&&!Pn)return!1;var tn=Xe.get(Te);if(tn)return tn==be;re|=N,Xe.set(Te,be);var xn=z(En(Te),En(be),re,Ge,rn,Xe);return Xe.delete(Te),xn;case Q:if(de)return de.call(Te)==de.call(be)}return!1}yt.exports=ue},4983:function(yt,Et,y){var c=y(12076),_=1,I=Object.prototype,z=I.hasOwnProperty;function S(R,w,N,D,A,L){var F=N&_,it=c(R),G=it.length,kt=c(w),gt=kt.length;if(G!=gt&&!F)return!1;for(var Q=G;Q--;){var Rt=it[Q];if(!(F?Rt in w:z.call(w,Rt)))return!1}var Ct=L.get(R),Ht=L.get(w);if(Ct&&Ht)return Ct==w&&Ht==R;var de=!0;L.set(R,w),L.set(w,R);for(var ue=F;++Q<G;){Rt=it[Q];var Te=R[Rt],be=w[Rt];if(D)var we=F?D(be,Te,Rt,w,R,L):D(Te,be,Rt,R,w,L);if(!(we===void 0?Te===be||A(Te,be,N,D,L):we)){de=!1;break}ue||(ue=Rt=="constructor")}if(de&&!ue){var re=R.constructor,Ge=w.constructor;re!=Ge&&"constructor"in R&&"constructor"in w&&!(typeof re=="function"&&re instanceof re&&typeof Ge=="function"&&Ge instanceof Ge)&&(de=!1)}return L.delete(R),L.delete(w),de}yt.exports=S},522:function(yt,Et,y){var c=y(40151),_=y(19652),I=y(71152);function z(S){return I(_(S,void 0,c),S+"")}yt.exports=z},12076:function(yt,Et,y){var c=y(75635),_=y(58966),I=y(55451);function z(S){return c(S,I,_)}yt.exports=z},22675:function(yt,Et,y){var c=y(75635),_=y(66817),I=y(56730);function z(S){return c(S,I,_)}yt.exports=z},10261:function(yt,Et,y){var c=y(88411),_=y(55451);function I(z){for(var S=_(z),R=S.length;R--;){var w=S[R],N=z[w];S[R]=[w,N,c(N)]}return S}yt.exports=I},58966:function(yt,Et,y){var c=y(86952),_=y(4134),I=Object.prototype,z=I.propertyIsEnumerable,S=Object.getOwnPropertySymbols,R=S?function(w){return w==null?[]:(w=Object(w),c(S(w),function(N){return z.call(w,N)}))}:_;yt.exports=R},66817:function(yt,Et,y){var c=y(57095),_=y(49217),I=y(58966),z=y(4134),S=Object.getOwnPropertySymbols,R=S?function(w){for(var N=[];w;)c(N,I(w)),w=_(w);return N}:z;yt.exports=R},66139:function(yt,Et,y){var c=y(15584),_=y(40164),I=y(97288),z=y(23599),S=y(26873),R=y(86756),w=y(63256),N="[object Map]",D="[object Object]",A="[object Promise]",L="[object Set]",F="[object WeakMap]",it="[object DataView]",G=w(c),kt=w(_),gt=w(I),Q=w(z),Rt=w(S),Ct=R;(c&&Ct(new c(new ArrayBuffer(1)))!=it||_&&Ct(new _)!=N||I&&Ct(I.resolve())!=A||z&&Ct(new z)!=L||S&&Ct(new S)!=F)&&(Ct=function(Ht){var de=R(Ht),ue=de==D?Ht.constructor:void 0,Te=ue?w(ue):"";if(Te)switch(Te){case G:return it;case kt:return N;case gt:return A;case Q:return L;case Rt:return F}return de}),yt.exports=Ct},63100:function(yt,Et,y){var c=y(1186),_=y(13053),I=y(80744),z=y(70213),S=y(11156),R=y(9171);function w(N,D,A){D=c(D,N);for(var L=-1,F=D.length,it=!1;++L<F;){var G=R(D[L]);if(!(it=N!=null&&A(N,G)))break;N=N[G]}return it||++L!=F?it:(F=N==null?0:N.length,!!F&&S(F)&&z(G,F)&&(I(N)||_(N)))}yt.exports=w},55015:function(yt){var Et="\\ud800-\\udfff",y="\\u0300-\\u036f",c="\\ufe20-\\ufe2f",_="\\u20d0-\\u20ff",I=y+c+_,z="\\ufe0e\\ufe0f",S="\\u200d",R=RegExp("["+S+Et+I+z+"]");function w(N){return R.test(N)}yt.exports=w},79264:function(yt){var Et=Object.prototype,y=Et.hasOwnProperty;function c(_){var I=_.length,z=new _.constructor(I);return I&&typeof _[0]=="string"&&y.call(_,"index")&&(z.index=_.index,z.input=_.input),z}yt.exports=c},97541:function(yt,Et,y){var c=y(20188),_=y(27984),I=y(78583),z=y(28757),S=y(78358),R="[object Boolean]",w="[object Date]",N="[object Map]",D="[object Number]",A="[object RegExp]",L="[object Set]",F="[object String]",it="[object Symbol]",G="[object ArrayBuffer]",kt="[object DataView]",gt="[object Float32Array]",Q="[object Float64Array]",Rt="[object Int8Array]",Ct="[object Int16Array]",Ht="[object Int32Array]",de="[object Uint8Array]",ue="[object Uint8ClampedArray]",Te="[object Uint16Array]",be="[object Uint32Array]";function we(re,Ge,rn){var Xe=re.constructor;switch(Ge){case G:return c(re);case R:case w:return new Xe(+re);case kt:return _(re,rn);case gt:case Q:case Rt:case Ct:case Ht:case de:case ue:case Te:case be:return S(re,rn);case N:return new Xe;case D:case F:return new Xe(re);case A:return I(re);case L:return new Xe;case it:return z(re)}}yt.exports=we},88133:function(yt,Et,y){var c=y(91869),_=y(13053),I=y(80744),z=c?c.isConcatSpreadable:void 0;function S(R){return I(R)||_(R)||!!(z&&R&&R[z])}yt.exports=S},86773:function(yt,Et,y){var c=y(80744),_=y(45029),I=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/;function S(R,w){if(c(R))return!1;var N=typeof R;return N=="number"||N=="symbol"||N=="boolean"||R==null||_(R)?!0:z.test(R)||!I.test(R)||w!=null&&R in Object(w)}yt.exports=S},88411:function(yt,Et,y){var c=y(20816);function _(I){return I===I&&!c(I)}yt.exports=_},83383:function(yt){function Et(y){var c=-1,_=Array(y.size);return y.forEach(function(I,z){_[++c]=[z,I]}),_}yt.exports=Et},24122:function(yt){function Et(y,c){return function(_){return _==null?!1:_[y]===c&&(c!==void 0||y in Object(_))}}yt.exports=Et},26332:function(yt,Et,y){var c=y(52858),_=500;function I(z){var S=c(z,function(w){return R.size===_&&R.clear(),w}),R=S.cache;return S}yt.exports=I},23730:function(yt,Et,y){var c=y(31030),_=c(Object.keys,Object);yt.exports=_},34776:function(yt){var Et="__lodash_hash_undefined__";function y(c){return this.__data__.set(c,Et),this}yt.exports=y},40393:function(yt){function Et(y){return this.__data__.has(y)}yt.exports=Et},79679:function(yt){function Et(y){var c=-1,_=Array(y.size);return y.forEach(function(I){_[++c]=I}),_}yt.exports=Et},49237:function(yt){function Et(y,c,_){for(var I=_-1,z=y.length;++I<z;)if(y[I]===c)return I;return-1}yt.exports=Et},29405:function(yt,Et,y){var c=y(26539),_=y(55015),I=y(60844);function z(S){return _(S)?I(S):c(S)}yt.exports=z},40493:function(yt,Et,y){var c=y(26332),_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,I=/\\(\\)?/g,z=c(function(S){var R=[];return S.charCodeAt(0)===46&&R.push(""),S.replace(_,function(w,N,D,A){R.push(D?A.replace(I,"$1"):N||w)}),R});yt.exports=z},9171:function(yt,Et,y){var c=y(45029),_=1/0;function I(z){if(typeof z=="string"||c(z))return z;var S=z+"";return S=="0"&&1/z==-_?"-0":S}yt.exports=I},15333:function(yt){var Et=/\s/;function y(c){for(var _=c.length;_--&&Et.test(c.charAt(_)););return _}yt.exports=y},60844:function(yt){var Et="\\ud800-\\udfff",y="\\u0300-\\u036f",c="\\ufe20-\\ufe2f",_="\\u20d0-\\u20ff",I=y+c+_,z="\\ufe0e\\ufe0f",S="["+Et+"]",R="["+I+"]",w="\\ud83c[\\udffb-\\udfff]",N="(?:"+R+"|"+w+")",D="[^"+Et+"]",A="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",F="\\u200d",it=N+"?",G="["+z+"]?",kt="(?:"+F+"(?:"+[D,A,L].join("|")+")"+G+it+")*",gt=G+it+kt,Q="(?:"+[D+R+"?",R,A,L,S].join("|")+")",Rt=RegExp(w+"(?="+w+")|"+Q+gt,"g");function Ct(Ht){for(var de=Rt.lastIndex=0;Rt.test(Ht);)++de;return de}yt.exports=Ct},76833:function(yt,Et,y){var c=y(99045),_=4;function I(z){return c(z,_)}yt.exports=I},20250:function(yt,Et,y){var c=y(99045),_=1,I=4;function z(S){return c(S,_|I)}yt.exports=z},28548:function(yt,Et,y){var c=y(92918),_=y(43607),I=y(8138),z=y(56730),S=Object.prototype,R=S.hasOwnProperty,w=c(function(N,D){N=Object(N);var A=-1,L=D.length,F=L>2?D[2]:void 0;for(F&&I(D[0],D[1],F)&&(L=1);++A<L;)for(var it=D[A],G=z(it),kt=-1,gt=G.length;++kt<gt;){var Q=G[kt],Rt=N[Q];(Rt===void 0||_(Rt,S[Q])&&!R.call(N,Q))&&(N[Q]=it[Q])}return N});yt.exports=w},76934:function(yt,Et,y){yt.exports=y(99204)},64725:function(yt,Et,y){var c=y(86952),_=y(32872),I=y(95979),z=y(80744);function S(R,w){var N=z(R)?c:_;return N(R,I(w,3))}yt.exports=S},79785:function(yt,Et,y){var c=y(19554),_=y(9991),I=c(_);yt.exports=I},9991:function(yt,Et,y){var c=y(51533),_=y(95979),I=y(12824),z=Math.max;function S(R,w,N){var D=R==null?0:R.length;if(!D)return-1;var A=N==null?0:I(N);return A<0&&(A=z(D+A,0)),c(R,_(w,3),A)}yt.exports=S},40151:function(yt,Et,y){var c=y(9256);function _(I){var z=I==null?0:I.length;return z?c(I,1):[]}yt.exports=_},99204:function(yt,Et,y){var c=y(74809),_=y(44107),I=y(11756),z=y(80744);function S(R,w){var N=z(R)?c:_;return N(R,I(w))}yt.exports=S},23190:function(yt,Et,y){var c=y(14018),_=y(11756),I=y(56730);function z(S,R){return S==null?S:c(S,_(R),I)}yt.exports=z},44231:function(yt,Et,y){var c=y(65968);function _(I,z,S){var R=I==null?void 0:c(I,z);return R===void 0?S:R}yt.exports=_},99946:function(yt,Et,y){var c=y(3251),_=y(63100);function I(z,S){return z!=null&&_(z,S,c)}yt.exports=I},37879:function(yt,Et,y){var c=y(62348),_=y(63100);function I(z,S){return z!=null&&_(z,S,c)}yt.exports=I},61627:function(yt,Et,y){var c=y(6019),_=y(66139),I=y(13053),z=y(80744),S=y(24665),R=y(57835),w=y(7975),N=y(18397),D="[object Map]",A="[object Set]",L=Object.prototype,F=L.hasOwnProperty;function it(G){if(G==null)return!0;if(S(G)&&(z(G)||typeof G=="string"||typeof G.splice=="function"||R(G)||N(G)||I(G)))return!G.length;var kt=_(G);if(kt==D||kt==A)return!G.size;if(w(G))return!c(G).length;for(var gt in G)if(F.call(G,gt))return!1;return!0}yt.exports=it},41626:function(yt,Et,y){var c=y(55005),_=y(38342),I=y(52495),z=I&&I.isMap,S=z?_(z):c;yt.exports=S},65226:function(yt,Et,y){var c=y(38652),_=y(38342),I=y(52495),z=I&&I.isSet,S=z?_(z):c;yt.exports=S},7941:function(yt,Et,y){var c=y(86756),_=y(80744),I=y(93913),z="[object String]";function S(R){return typeof R=="string"||!_(R)&&I(R)&&c(R)==z}yt.exports=S},45029:function(yt,Et,y){var c=y(86756),_=y(93913),I="[object Symbol]";function z(S){return typeof S=="symbol"||_(S)&&c(S)==I}yt.exports=z},16513:function(yt){function Et(y){return y===void 0}yt.exports=Et},55451:function(yt,Et,y){var c=y(63333),_=y(6019),I=y(24665);function z(S){return I(S)?c(S):_(S)}yt.exports=z},10611:function(yt){function Et(y){var c=y==null?0:y.length;return c?y[c-1]:void 0}yt.exports=Et},9924:function(yt,Et,y){var c=y(75010),_=y(95979),I=y(65487),z=y(80744);function S(R,w){var N=z(R)?c:I;return N(R,_(w,3))}yt.exports=S},70642:function(yt,Et,y){var c=y(42813),_=y(85605),I=y(95979);function z(S,R){var w={};return R=I(R,3),_(S,function(N,D,A){c(w,D,R(N,D,A))}),w}yt.exports=z},95987:function(yt,Et,y){var c=y(2659),_=y(40302),I=y(46962);function z(S){return S&&S.length?c(S,I,_):void 0}yt.exports=z},52858:function(yt,Et,y){var c=y(52166),_="Expected a function";function I(z,S){if(typeof z!="function"||S!=null&&typeof S!="function")throw new TypeError(_);var R=function(){var w=arguments,N=S?S.apply(this,w):w[0],D=R.cache;if(D.has(N))return D.get(N);var A=z.apply(this,w);return R.cache=D.set(N,A)||D,A};return R.cache=new(I.Cache||c),R}I.Cache=c,yt.exports=I},73376:function(yt,Et,y){var c=y(2659),_=y(93757),I=y(46962);function z(S){return S&&S.length?c(S,I,_):void 0}yt.exports=z},83296:function(yt,Et,y){var c=y(2659),_=y(95979),I=y(93757);function z(S,R){return S&&S.length?c(S,_(R,2),I):void 0}yt.exports=z},8242:function(yt){function Et(){}yt.exports=Et},5795:function(yt,Et,y){var c=y(33152),_=function(){return c.Date.now()};yt.exports=_},89409:function(yt,Et,y){var c=y(88832),_=y(522),I=_(function(z,S){return z==null?{}:c(z,S)});yt.exports=I},35769:function(yt,Et,y){var c=y(22310),_=y(96916),I=y(86773),z=y(9171);function S(R){return I(R)?c(z(R)):_(R)}yt.exports=S},60859:function(yt,Et,y){var c=y(76106),_=c();yt.exports=_},16473:function(yt,Et,y){var c=y(99861),_=y(44107),I=y(95979),z=y(30739),S=y(80744);function R(w,N,D){var A=S(w)?c:z,L=arguments.length<3;return A(w,I(N,4),D,L,_)}yt.exports=R},40617:function(yt,Et,y){var c=y(6019),_=y(66139),I=y(24665),z=y(7941),S=y(29405),R="[object Map]",w="[object Set]";function N(D){if(D==null)return 0;if(I(D))return z(D)?S(D):D.length;var A=_(D);return A==R||A==w?D.size:c(D).length}yt.exports=N},351:function(yt,Et,y){var c=y(9256),_=y(58506),I=y(92918),z=y(8138),S=I(function(R,w){if(R==null)return[];var N=w.length;return N>1&&z(R,w[0],w[1])?w=[]:N>2&&z(w[0],w[1],w[2])&&(w=[w[0]]),_(R,c(w,1),[])});yt.exports=S},4134:function(yt){function Et(){return[]}yt.exports=Et},97341:function(yt,Et,y){var c=y(59406),_=1/0,I=17976931348623157e292;function z(S){if(!S)return S===0?S:0;if(S=c(S),S===_||S===-_){var R=S<0?-1:1;return R*I}return S===S?S:0}yt.exports=z},12824:function(yt,Et,y){var c=y(97341);function _(I){var z=c(I),S=z%1;return z===z?S?z-S:z:0}yt.exports=_},59406:function(yt,Et,y){var c=y(13927),_=y(20816),I=y(45029),z=NaN,S=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,w=/^0o[0-7]+$/i,N=parseInt;function D(A){if(typeof A=="number")return A;if(I(A))return z;if(_(A)){var L=typeof A.valueOf=="function"?A.valueOf():A;A=_(L)?L+"":L}if(typeof A!="string")return A===0?A:+A;A=c(A);var F=R.test(A);return F||w.test(A)?N(A.slice(2),F?2:8):S.test(A)?z:+A}yt.exports=D},44140:function(yt,Et,y){var c=y(50230);function _(I){return I==null?"":c(I)}yt.exports=_},91116:function(yt,Et,y){var c=y(74809),_=y(35024),I=y(85605),z=y(95979),S=y(49217),R=y(80744),w=y(57835),N=y(9363),D=y(20816),A=y(18397);function L(F,it,G){var kt=R(F),gt=kt||w(F)||A(F);if(it=z(it,4),G==null){var Q=F&&F.constructor;gt?G=kt?new Q:[]:D(F)?G=N(Q)?_(S(F)):{}:G={}}return(gt?c:I)(F,function(Rt,Ct,Ht){return it(G,Rt,Ct,Ht)}),G}yt.exports=L},44065:function(yt,Et,y){var c=y(9256),_=y(92918),I=y(29098),z=y(41590),S=_(function(R){return I(c(R,1,z,!0))});yt.exports=S},95708:function(yt,Et,y){var c=y(44140),_=0;function I(z){var S=++_;return c(z)+S}yt.exports=I},81229:function(yt,Et,y){var c=y(20720),_=y(55451);function I(z){return z==null?[]:c(z,_(z))}yt.exports=I},65441:function(yt,Et,y){var c=y(60348),_=y(94484);function I(z,S){return _(z||[],S||[],c)}yt.exports=I},34402:function(yt,Et,y){"use strict";y.r(Et),y.d(Et,{default:function(){return z}});var c=y(34634);function _(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,c.isAnyArray)(S))throw new TypeError("input must be an array");if(S.length===0)throw new TypeError("input must not be empty");var w=R.fromIndex,N=w===void 0?0:w,D=R.toIndex,A=D===void 0?S.length:D;if(N<0||N>=S.length||!Number.isInteger(N))throw new Error("fromIndex must be a positive integer smaller than length");if(A<=N||A>S.length||!Number.isInteger(A))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var L=S[N],F=N+1;F<A;F++)S[F]>L&&(L=S[F]);return L}function I(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,c.isAnyArray)(S))throw new TypeError("input must be an array");if(S.length===0)throw new TypeError("input must not be empty");var w=R.fromIndex,N=w===void 0?0:w,D=R.toIndex,A=D===void 0?S.length:D;if(N<0||N>=S.length||!Number.isInteger(N))throw new Error("fromIndex must be a positive integer smaller than length");if(A<=N||A>S.length||!Number.isInteger(A))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var L=S[N],F=N+1;F<A;F++)S[F]<L&&(L=S[F]);return L}function z(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,c.isAnyArray)(S)){if(S.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var w;if(R.output!==void 0){if(!(0,c.isAnyArray)(R.output))throw new TypeError("output option must be an array if specified");w=R.output}else w=new Array(S.length);var N=I(S),D=_(S);if(N===D)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var A=R.min,L=A===void 0?R.autoMinMax?N:0:A,F=R.max,it=F===void 0?R.autoMinMax?D:1:F;if(L>=it)throw new RangeError("min option must be smaller than max option");for(var G=(it-L)/(D-N),kt=0;kt<S.length;kt++)w[kt]=(S[kt]-N)*G+L;return w}},81683:function(yt,Et,y){"use strict";var c=y(55973),_=Array.prototype.concat,I=Array.prototype.slice,z=yt.exports=function(R){for(var w=[],N=0,D=R.length;N<D;N++){var A=R[N];c(A)?w=_.call(w,I.call(A)):w.push(A)}return w};z.wrap=function(S){return function(){return S(z(arguments))}}},99755:function(yt){"use strict";yt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABSCAYAAADKMvPcAAAAAXNSR0IArs4c6QAAFkdJREFUeF7NXXlsHNd5/2Z3Z3e5S3J5LClREklJlGxZtmzJUVo0boEICdI2BYICrQQ0PaJaV2JZSOO6NtC/+EfbFC36T902QBpFllxbDYXayFH1MArXQRugKIIojmQ7kSlKpMX7Wh6z3B3uvuJ7b76ZNzNvDl6ulqZI7szOfO/3ft/93lgDz+vP2ZuFHsh37YSOhkZIJ7zHN+NvHQAMMKEOrD4O8+YirCw0wNj9E9qJ2lqv389YoqP8/Z3bkoXmgpZPt+q6loa0Rtcxwy4YcBDl87/wXRMqwOr3K/OVCbN8/1zb0ZL3PPvGjDHtCvzX/r3Q1WQAfpmA9xP/bu4LRdOtrxzogN8MUuxOZXyxmimP/L52bCXqjv1sIN0De3b1mvkWTU9rhomSkrRRUqshs+8pDdk5E+UE0HUdCpDjv9+oTc3+XsMTQ7KsHFAE8zL898ECNGenoQQlG1BZyKghxjsuBEQ4gQOJoqGA+F3Ed0yAH+oj989rx8aDrvg37H/aHzGbesu6ppVMw5ZXkECgYWOi5EMEoNIFhKQosZA6ZwGKsnbpObhZG536QsPRYZKVA/rX7D/62iHfMgYlwG8EFL8/CoaK2dahCAUOaJf1832YmD+pPTXoBfVvjbe7e1OtndNgAH1zAkgMVWIYqGhRbBWQyoCinEU9Bz1QgHZoYO/lpn9yTjvK76D1s+/mdkPLI8NQgmGYBsFQ0+IozfRmqr0koCkU32aoLgDtgSL/OVKdXP585hPvE6hfK7+1e3uyvR1lxYnnspqmzVBOLElU+lUJGT8YBqb7mA2oJS+yEwHt04tQWl1c+O3Ckdsc0L9g1/tqUG8ZhGkOqGCnV3U2D1BSIT4cDigOC1VeAItAclB1AeoNY2TsxfxnRr86/73Wnlxx7xgYXE78KdQdJ9/kSMpSqsG0QPINxwMsHhc+yAU6gYqyFnUEU3x3QzP75dy+H2maxrQ/Zf/y+ATM6ggoqbsDZzy7uK6zLDDJopJzEmovwMTvJkixm0sjg9sbO/YsQjXJzZKJ7HQmnkMp/pNefoYhe2UnEyi3Gcxcbke5iUIbKgA9oBdhyJj52Ysdv7io/XH1n568q89qpO7k3dcFUpwP2aP2Dk14UbSo3EZZgCJrESqUC0EkMPFvLmsMp8PJZoEpyBcAWEwzQHKi2vdBkQNaSlTvPd98dFr7QzbwsfdhzGancEVb+FIA6iiWmP2cqUNBF8Di3wgBykUenUwSv1QMQPGcWMzEs2I4Lx6hmKj2OejRC3BIL0K+3lA53fbETe08e+XJ2zChOer+UYAZ7BBIpdC+oq0iNuE4bVZScLRmMEMcURx2WrYVQzuUiwBFtd9RbxaAnmXffPI2zHJARTi/Ra8AZvqGaNkvglJWTwrj7EtFORfu+Gg8ER49dODSZ63zUHMKus7tPKp8MZmtfLnt4ze1U+zykTswldhSQF3CKpwF2TVuEGXl9IOgtpkK5ln3JGcdaDdD1dy6rsvrSzEp6NwxHdALsCvbtvJs0+Fb2in2jSN3YH7rAF0jM4P1Iyjk8Yc29rREsjPMZkrX9U2OlTVZgKLK70w0rjzX/nO3tDPs0uEPYIaHI5uu8hFg0mHOnjgqF8Nh8AmJ64RCwiMxsX5VlxmPNp57er3oAHqyeunwPX2LALW9sNvHuhSb/xEEqCLgDok1bQgiHQyCHpFyEpghpkMAKmJRm6FPs4tPDMFcatMZGoOdwmHETP/W7NHX64TCWOl2cP8PgPoH5aiMZPCVhtM/MPdpfvZuPNZ0201ZVqFV7jtglCxUXmLoaXb58UGY0jeVoQp2knBC5Cib6XcI8cCMUOO4GuHRBnFVf3SiBrTy948PpkubA2iEV3XNbxwn5MuEFIC5HFCECQm1m/4owg+hM608W+J1hxz05SSGnmWXDt2GmXQchgbPf1hIExwj+jU9Ss39IZK3IqSyHsEaEcfpuWNjOYrI8XKj5eUzTSvPtR++pZ2sXDp0L60GlG4nV6194YSPRWr1sAdqMVMmKP1uvxfDAZFDQxm9KqlSUQJCKb93FmzT4JQEXSJZWqEE9BS78tgdmMx4GSoEFV+5atLMpFMzddBW8d6NSieCb+YDj8Cy/9ASANShqtVqtUYjBQUhtKqC5Fc+ki1T1eq5ZOO0vlqr8o+jCPxeIbJYotCp3jP5x/GfPMCyUWkwNdZW1WqanKVRO8TH0FOVbzx2Jz3vApTAxHy10dTrVX3bzR9q50KtXjCS8Y583Pir7pVqtdNQNgbd3hULJ9jbQRvWZiZ+9p2OU4vx7rK+sz7509eK5SzrdcqFpiCaHNiTyp9hLz/6AUxnZYaSwRWNs6zxz9pX3lufKPE/9bmpi00TubmHsKWBMyf+VYRdJgCqGsaAbSxf/07rF34U/y7rO7Of9SfeHj54hPfZrEK2wEjKlGxAKy8/ei8tAKXGHFXPsZKyHVrqZWi+dU07IVRqi16fW764YxYqXVjzVBW5KezCOiSykxp6zbXG2y+1f3Zhi8Tilz07+2bh/uLSPixwi2agmGoBqJUpEaDn2DcPDsFsgxdQwU5smGEronk1CdkZHUxTh5Tdyw8eBNa0Q17cSCFsGbacX4aFFS03Xy+13odFbToAUMrPHVWzZGON9Tqk5nS9oaxDWYtjO72S2bYU7U0O7SaAmauz5WWAWm0xs5hibaPl5ST2sdyASoE9AXqaXXlkGCZzKoYKQIsWqKLNKyzHWl7q2BHnWW5r2J3MmIBikwwdgmjmWdV93SlI+yRcgwfAU0WHwIQx04BhE/tYom29LkBlGyqaZYKt6AQIToV1i6gYuYfoCC0E5W1hC0xZ5bmqe6pHvLhr9capj4/FXvqiOyknPkbFSkw2gMFBFKCibMK+yyqvYOhZdunAXZjJywyVvTyt6PDBSYZEEjAss/AyRhh37KmLvjr110lgb0zqzqOFnvDWM3dQwkl5c233PaOCeOds4RQRUEs+q12NMlNPA69Gk8pzea1p5bkuEdgfGE27AcVLC1sl0ita3ZExswwrbdyeBZbcQvghgU+evGLWNEMX6kVmAK/AT7WZqY5Dian4M6MnGYc0Iv1VG6u0eFtyuyZUOUsrqzWN1F9ur7vDJgnQp9nFhz+EuUZvkw6FxC8EMw/J+XYwRq5p/Zvu6XFd1a8sXGydqRu9Fa2acHW1AsAh1UZWZrWM0VrO3r3WfaK8Fsse99zjkwONE4uwp8LMtB0jW006NDPYqHMx9Ay7/NA9mGpSqTyC2W5ma0/pf/ROv6bV4wqxnvOemnppR1mvd4ng2Un5VL0gco1c1Yu5d69pWwMmjePXh95oma6ZfRTY22ETb9JZxREnsPcD6qziKEAnFIxvaWc+ksB+Vq88JBZ+kdKrXB/ZzxxsSzXW/7H1Nz+SwP4Hw08cQbMke3nOUAKUbOg5dmn/ECw0j/F1TcJKcNtkiqUmPdBhfk37/DvrYd1aPnO8NNBWYqU9TmgSkCmRh+chUwG2FfI/7teO8RrDVr0u3L6eGUnXHyNPT/dRAnpy5dL+0Ywf0KJZEC1S6IIE1Ef/TPuNsa0SGO3omaVvHRirreRwqU3YciC+AMJapYe2qwFS83/S8infssfNlPXZ8bf3TFQW25zQSVxdLBpDlS/CTi0rvPwp9sq+cZgtiJV3FkNNEYZgUI9rdzB4zkCqnKhoq5lMGjJKadXvuk6tAOCHK/gTKrgknC1ABeZWzYYJbVEXAXQIoLYzcOqQyNJmlqqa9VQFJcikQ+SI5VLR41dhoVKBMmOsnNTSU5XFLAX3aI7IwtNyIV5gJkDPspf77kOpxQbUFCovqtEivaOlhRQ+BS8aCFpr5J8BVGgeg2ImgmtTEUwpuPd/QrRNeNJh2S6eFqNZ0gt2aBdYC42gLFlrCizQVoqgXmRJ7uBeyOGKQ9MWQ8+uvNx3P1NqwQFRcYQSf8rnaTUcBc+hgAYKLjkYa5YpsEdVotXIOBDlgiCr6EtJh2CHtfJZFxmcCPW8r7UlyrQskk+4FdBz+SyHROZIhJRC5Q/kCtBJDP0Se3XvMEy3IkvwAuQKKHB1gmchdHQ13BlQGPA8sLfA44EzpnuujQcSMJ5ekCvp4HVRAtMrXQCYvvTTfR7JJuf0fKGavVRIoOQsdChAJzH0NLuyZwzm2mSG4lCICQSs/XdgoytYeCq94bXksVC2RHGncqGvxUyZdwQbTbA3i49nksKZS3VPOxW267TutU2coXoAoGI7jXiR0DKwtIxPrdVulQ42WfJARLuDcmf/ZpjgdjNl7k4G74XRuo+iGCImWAG7JzXGMcjAyrqHQvPVd1am1JnGXP7RW9oX2dXdIzDZ7rWh1NYX+bEOmWRiKccS1Xolqh7q97Led4SXB0hkdFYGU6vVodGsmbqLoQpm0oAICmJoBjJG3VytZALiD/fkZn1zzd+xZKINUsm0zmpVUyuvmrmalsgQ0fiHJefoA/Q8e7X3LpSKY6YIm9BWyNUmtJwNK3DvP5ufn45wlOs+/Mm3+lPLB4oPr6RqWTIDYWuPZPuey2Qm/739t0bWffOID2KMfOzda33lhGgiykUbjDZ8gJ4qv9o7niwV5UxJ7MsQhZF2lqlez1z4yVYJTNf91MLl9qXK8m5h/MMMhuOEeMG7C25cW8eWxrWM5/jIQMP0kn5Qlo3CNwJ0V7pp5VlU+bPscs+kudzBvbwVsNgxFhSgg2XLr2aefnctAqznXGzSLULSyuWDthYKZefhCuRge6q1frHzs1ufy/f3J278zi8csdszcl9e13m1ybahz7Cr3aPmXKcLUBP4PhwM7Luhtf5Lev2d9WxsXQuwJ5cGtk+VzZ28++rZcyQ7A6zR2gE1FKDM0j/9u85j2OLfsteF29ebx7XkfpF6ikyJmx1ebdL5Uhyboc8YV7tHU25AaRcG3ykGRWhmueW76buDX9+i3vyFmevNtVpl7z3NSPL9R1Y86kZIsJMCarE5rAA7k9kqtMIHz2mf2JJ6aP/QUHYpObpvtFrJYLZEsnkBtRl6mv3DrmlzYZsd2OtihxuygNJOBBXrfllIsbxVeCYzt8Y8hJwkD0cqepXNmGVtAsraoDltN8IowfCGKbaztOqQCCiuHkY7ljVTLM/7SmGveNJiXFzRdVaqGjC5Wk4MG6JRh9mSC1BsI+eEytsM/SIb2DlulrbzXN7OlNy7xbBIItJPquOj0PGECxoe9WfQblNnUbBTxMK+hQ7WDJIERe5hRQMRf6JdRRX0QRri4AJlk/pJqOY8lzesbZBeledxaM6xoc+yqzs+NJe6BKAiEnRUy9l2jbkzDYZDGbmk2iuuJ72z7KTcoPOnn/7A3snlnU23GGCvr84QHPxTqimah4KZos4gXtzLc4YKQG2GPr18dces7gZUfEB8UZ7sgBmiVpEg+0GlYgMVRew4NGDDAA2HPwyA5LPy+cBNhyFJAoEjsnNMjZGC4ifP5a2Jp5+kOTag6OWxOEKZ0tnlV7om9ZUdVDqTAxZyA2IdiOMUYu3YIIJGFSKsJW1i5t13tw2uRHZKiZ1Jp8mnk5xJc2oIqrKiwmSFpJ6OdE7iKnt5KWwa2D5llnZyo+uqlbsFo4WtfjE879hChdhYhV1zv+VWRfeVFBIoNGPjBRJhbny23Jpl0g5SeRvQL7PXto2ay7vCAI3aoMrnLKCH7jf8UevrreMWvYhljhsMmsAQR6mYZOUkKR2YLIFjIILDpqXXtpXSXkCl20WorD2M2MwMYq7/ni6VVUUVLtkCrhtgP51rh43Va0aEpaValeyUnGrT4uudM5mF7mETH48h1coDZ8vDOes8j4HwEzPCMXBBPfeMd82IEC4EUNtfB4ZW8pQ6YJL9VtrQC2ygY9w0ehBQ53ETqghNbT1jq3qcHRjC8tthCf2ptIeRE2QBrQDLNVGhYEoCWcyUV/QrAT3LvlucM2Z6qUlnczSOqtureaMcUMhxgk8JpId9bpKEJxdxVT3UbnoZGsOGnmevt88ZC7sH6XlNyv3TG2Bn3NhUGpi4W5hN3AQ1l8nnU0i6N82goyviVHmNvScOPb/wevtc0gLUWp/pvr7fq0baNrrAGsD0WysFoFGOz2awW0IZlvh2U3ZIXtUQRsgpMEup51dKA20TKWMPFkeo3ucA6g8uYj9ZJnT7odqzBjIzhvmxiBPIbN+1I22nzQrrFzdrAwH9Evtea8koYSs5EtD4+9AjVFKxdTpUK1zqGWav1abJvnYsx+hFWgbSY0P5pgWPyv8Be6Nl0jD6/IAGsTO+g1HFCrZt9NhMRy39Jsbt99VX9W5RVEIbGR4FEUFWeSkOlQrMdhz6InuzMGJM7iNA8aOqOYql6pGhjF/VQ+2xy2b6LaHDvGCNsFU9EMwwWxl0zLKhUj3UBvQCu968YMztxwIvX0ooEcB2FJsZHknqGw/MGOYjTkIQGB7JtlJ2jWHvSy0Qbz30Bfbtpglj6aFBqTjiunecHD0uMwOD7CA1lxmiUHXPff3WLqpu4NhEd5hGghLA8nnid+6UpHqozdAXpr7dNJFzAJUXanEB44Qqa3zMhd9fSmC5QA+z12GrSiRWhzJTBZwKZH88agPqdUrPTA40LufhYVR550GscZ8sE8UAtc2MdkBrY6baKMSVTRW8e4H2MzWw2vQ8+7f8lFE64AU0cntKXDW3WK6yTi41i83M4PaLzyYHslM+oFJrWTNUzlDKlKwWiK3y/eyt7JAx9ShVm2ing7ASIZ418rkh7rqmn3PrCI8CJtGR1LpmqEf3jssbEpGdk8/zT4DNUMspFSFdfr73yXc13Lo8ahw6fNuc1cSGAff6O2XUt0Z2ulVSYRfjslNx33is9NpFFYiyw/CC6bb63nooLmdsyqbnX9h2aJDvLD658NqB0fpynnbbBoTO4u24YEog+Rgk38DHpgBHpPDosqVT1VOd26jY5o0JvDrkBV3+21pwIS0WSzYnBvtbj8xzQH93/Ep+Lrv68BSs8Kduh2pMnPTNuoBbucKACok1Q6KM+OwM89xes+aeJifMcdMC/8LFtrjIYlcmV+rv/tgHeBd77/vxyUvbp9OrO90LDaRZ8zw5Uc1iqxQch3UbUHM//GGPenMzi1oYjkNUHZftqHukCCQPmaxtibu0bLUwXHmv/5jYK+V6mMDx2YHCXHWuZzFZS+NtnI6fNIsK+op+tqeCGQcwF/toiYV4k/+rUHNnimV++sOzULO1zoOcLjp/RgFfWNGebZ6Z+d+RkWsnnP9DhO/pDOikfry4p3VxFfIsUUuximmdE3MfkktY/2ph5Vis/UtGHdJstZbjk2mB7fWvYu2qsGGJVKKerIGhJeurfPVy5P+fYZ1ISh9r1JN10FLV1qbC3Nd3HHUtbPYxdOO32/gVfvX29cxKcmm3gcvEPY8col44bi3Pa5mpo3s//eFWb+pd64hiPD9krZfc+Pm4DPvXhl7vmanXinJHhq+q1nVIm9m7bzzy6ZmN32nzr/BAAorDRNPzg8HHDxqwmhGlQwFmkTXMX96/tXs7NwLzAwsoDur4rX9tMzKre2jFMIYpzT3dN1/S9lt7NjYy9K357AMNKP6/koaG3zpCgHYmM7W/3PXUja2BYnOu+kADikO8MPb9DnM5qWUSZS2Xblr96q6ffyBtJ03H/wHu5An4eGwyKAAAAABJRU5ErkJggg=="},92691:function(yt){"use strict";yt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABUCAYAAAB9czKDAAAAAXNSR0IArs4c6QAAD9VJREFUeF7tXWtsHFcVPrO7s4/Zlx9rx27IuiUkTeqEqk8VQYQqVYgfBYlSWS0tFQikAEKV2n8gEP7Bjz6iSK1KRalQW0RbCBIqlUBFqOIHCUIlTR8kbY1jx02J7cRO7F17Z707uzvo3MfszO7szJ19WdHuJI7t7J07957vnsc995wzErR46bouLbz7YjIg+aL+YCyglbb8LXbZ4dvDALAFAPjd/mr8CUAoKOuqulGRwaddVtWNfV/4zkYrA5aavfmTfx6N+IZ2p6PD10YBJAk0DfAP4Bd+6+Ald7Bv566rT5Zl/FkG0AuV7KWza2N/mjkvTU9XvA6tKQBmTj6X2jF+S1qTSpKmZgA0FTRQAUGwUL/DQDSerIlQbETtBU0GAoCsgCwrAHISCvk1bfT9K2ekqamyFxA8A3Dm77+Ije69ea+Wz0qaugqahl8q+aIA4OWB8tiUU6fmNisZvUxLrG1zoNC7zADISgrwq5RfV1MH7/lQ7Om0lWcAzp/944EASCE1swSaugQq4YAMaLWrn4+CExXHLYhLc4QhZGm43h37tFsEjcYry2y9IAcgJyRBVpIgJ8dBSY5DZmlufuLQD9ZEQfAEwEfHH48nxib3qpnzgF8GAETu14gfpxHUThjZmdxfT6bmwaADMNOxcV/s+USuuy8U0orpAOQEzgFyKg1ywL85cuM3ZzoCwNzJ59KBYGgkk5ljAKxS+W+IHjZpQlDRIYhIcufV7eVJrpxg6cydbZEfCAegGEqmIRDfWdl52/3viI7JEwfMv/fr6yv5tRgCoGWWQNVQ/FBK+wO+YiAQUIuaLIVCIdHnAxQAgDfHn/HC3/nPNj156L2mQ96xtx64WYrGKxQK4K8UQmVJD/O5oyKmAIyDktoH48PZ09Kehx1mUJ2UJwBmT/3yhlLuUoQDQBQvV0igrB164M/z4pS/elueevW+awKFrXHO/UQMoS4gAOyGnCzN7rnj4azIDD0B8MG/nzpQ2lgKqcgBxAKiqx9ZMCLH1m/92u/nRB56tbeZOfa9nRUtO6apKH4zKIQAFOQCCkBC8s8N3vnIusg8vQFw4skDpcJyiChhFeW/Rswxwn6RkcwtX372rMhDr/Y2Z197dJem50e1DNIAxTBZhSAnU6Ak0wCKPD9x6EdClpAnAGbfOjqZXVsIawiAhg9HY0ABRRkHX3Q0e9OXnpy92okrMv65v/0srRc2R1AP0o0oIQRZiMgBoMnzE3d3BIDHJvNri2GDA4j8TxL7NxIfy97wxZ/3BACL/3gsrWZyI7gQURR3HYBM5jyAmiG+HwpAGpTkjo39h6b/K7KCrvY2828emfCXMil11Q6ANICmdJ4DCOshAMQGToMS3rGx/64+AF0TQQgAcoDCAeghDlh888iE1pADuqQDKAeg8kclnAa55zhATamr1Bzvug6gfqDeBYByQD0ACprj3bKCDADQDE32FgdsHwDHH5vM56gZ2gcAOYB6hC0b0j4HdN7IrXIAmuNLxCVDPQLjgC7pzm3E+hxA0OUAaIwD+gB0ftFbnmAFgB7JGi7pPgd0Hg17DkBvaLLDVlBfBNmIoBoOQG8odMoZ1wegHoDMEjtEpu7oDivho5P53EKNGUq9ob20E7aIIDwTwJgoYAB0lgP6ANRbQTQwgRzIsIP5DoqgPgAGAHk1Rc4DajgAvQJa53RAH4A6DthOEUQDlHpUB2wnB5CYIHTDmo4ke04JbycA6IQi0QAMAIyH6W0AaFglj4rorA5YXwijB5AcRPQBoEqYW0EsLGUbAMDzgLGN/Xf9uCcO5RfffGYC8ldSxC1PlHA3OSC3ENZW0QVr5oBeA+DIBOTVKgA8LqgbHFDCnXAdAKgDdvUQB9gDoKArotP7gNI6uiKsHEDC8XpKBG0rABeoL4iHJpKwlHGQ470TF4S+IC6CIEODlI0Y2VSHd8IWDsCQSBYVHI6NqaFwdFkNxn1xiAMkyF9yZR0CtfWYphsefGrZGlc8Fql+xv43w9okYgr7rBqEzH9KlqN19/FO14DGzA6U6ttcYY0GSgXL/anBuL6Cn11agUpR1SV/YEd548qgcTbeLQA+Pn50Ul2v4QDmhCIeURKiOE6cUiQ5iKf8NDgjaZzR5XSo0mrSUpMHNpiGi7lwuOJRBPOwRAxQ6xYAs8ePTpY4AGwfwBPVSEwMIX6SxIvyHCo3UtpnhjVJpLrbvIPV6A6SC4HpWEhwND0xP4J8qTSzjYfpd1IEWTiAAMDsX5IvmwQgxGe5s2xQjqRkeWSEUURyylw4SqgPNqCmuI9wgUoDk9ETQBI0WJLK9gFAKM0SljFXBBOX6f81uuw/MZOkEV+YcnTtOie0sEGyJomQ3spG4QK+dVQsG5RxQ7U6AM2TIOcBXecAg1Y4VJZD6wIAmT/NaaCX7eo3wYTqBGSoyHK5DJCNyrES3lbQykaCSUj268Vy0Sdr/phWyYdoyQQRtrJfJgxq0wB5Ki0dMO262v/2AGDkBrusdiMP2Jkz7EhBICVlAWSIKvLZ3VN/qLGVrHdh8ZAPXvrGDT4tH+bJ48Yi56DzRdM8PtWH8j67zwG0RgTXA25q07s65IKC12RIwrAyMDM69eym27NmXvnWvkouF63mMJtWahtHTObEwewmACRHjIdlu1HDURu43UzSoNl5axJ8keFSJJZYiUnh3EZY9/n8IUlSg5LPvyXl8kUpoBf9uq+UrGxkY8Rby0zEWhnnvBhqlUJ9awtHcabmJQu6pwM4BzQmYrOrvtqjFQB66E0LY9AqJVTv8DIJxERE0xBtdQ6ASReIj8dZpDLfm3Xi3eeADgNAWJsrdWrmGiUBFNxncAC4LkQbHSu2sM0SL6PD9JQY8WutgupdtnqEQ0DWAStXQDgAOpMjxvcBZCeIZWpU+wIdlGytb7EMS4RkoiPBORBK/U6bb5QMO71av4isWDdpJ/C5E1+Q8RlmaIcAOHviqQOwuUoStXmSnpipV5WrvNiLwHyNJoYlxPUBFz2WBcsULatbZJTPqdsb2C+O1gCiC4TGhqbRPzY/IFiyxlOi9rm3nhgrr2XkcvFyRa8UdRVZvoUL17H4RVvjv3l/0H7ceYBIMKBjpJplZGSceCf/Lv7U2paNxiwFgpIUS0iR2A5JzUiru6YezYs8xRMAIh3223ijQB8Ab/Rqe+s+AG0nqbcO+wB4o1fbW/cBaDtJvXXoGYBzb70wlhz+9EgwFPZpuRzocqXh8Z+3odi0LuL/BV27cW/h2kXrDYJBgGIRSsXs5sBn7xauHOYJgMVTL08kd92cMmrkGO5YJ7eih01ZO72UgiT1MDrnHk2FXDfOv31x+I4H/ycyBGEAZv/128TI+Gf2UOKjz4VWS+Eu99Y2MiJDdZm/py48kJ2vrUZnF+SsAq+q01ALRPQLp5dPT05NER52uoQAQB/72swbB8v6lsyrRJEjObL9N69+syfRwyRtRtgWQM3eEGOYdFzN7MidCEkr6VJ/FSRToFW0zZHbplzrhwoBsHjypbQcHR6hsZAsMBfPQ0m9aPthuRPQvKTcW/OniLc0jcvl4KVV3xUZExdB3GOLEXLqeVeXhCsAs395OjRw7bWTWvaiVAUAD6X5YYzpeLEtMtzKOe0guHMf7k8Q42VWypgDkEpDQBnUojd/9T+SJDU0VFwBWHz/lX0AehTjYHg0sCF+LIu/3vtJptaGYz8ricTIYceXRj9ucr3u5uozHZ/OvbYsRhQdc6Gythr5/AMfNxJfjgAsnnwuJUd3TpDCRKReNK8SaFr9doPloRptdUu7qTOmCBs0sxDfrKpEunWsQV3DQdwrynKG5cSn9MzS0kfXfOWwreeyIQC6fsy/8kH0YGlrxc8BoCdO/EzcLvyDzoYopDaII3fh4K4ZCK1rIzCaAMAKr5P+wqopeDZAK+liAadyKLQ1fPu9Z+ywbgjApXde3iP55QQSv1702MkVk3XRBrHjvJ7NhG988GMhfgtj8iwCjVLGKYBUGpRUGvTs+oXYnd9ergXBFoC1d14YKIVHdhOxQ8QPFT28VnSdYGc0QGuCxEkSm7h5+S++8jlMDfQP10HmBSsocszN6O1edA97w4bBBWnQ46OVuVPLp289fNiyFOoAQJv/0unXD5aLazKpCMWKk5LzVv6OmJpJbB/h66lZt+qbXAj1atdd3FlAM5mlkKKFnHyafyNx6D5LGlcdAMTmDyZGSIFuYvlgSa4Gb8ggstW0Xltkc7FTZPeVaFhfTRK/ntTeeNK4n59jE12QpmGLamZ+4NADRl1pCwCzs0+HBjRm8xuih5ZjMcSOWdywNya1Y1cpNkUX4ruGO4rJn/qxiI2utndzTBMgCOP1ewMLAItv/24/QFnR8A0ZmAdGwq+pz8cq92ksjmHtiM3LwboW6cCZCHU2vllsi3RfF0DmZOm4d1jVG3gcjRYRC99PpaGoly8Pfu7+BezFAGD5xG9G/UNDu8w2P40ss5qvjmvQ1vfS2J5xFybuE3W1llh8UdVr6Px6lebWenWctgobxTRXyFjic2yXrsClGenGh3IEgDPHpoMjk7dPljYu+KjJycJOzFEPpGfBVWhHN04IYpkwWdHgxT31FogYEPatqmOuG715RyygvzyDY4TEMDeFiQsqodBW/PZ7zxAAVt47dj1IEKuufpb9zXZTEoAq++IZLSKVo2SW9N/tujr+9JxpZvgw8++Ck5aKJUnSKwmtXIqbE1kgieIoTfRBOZv/mALw4V9voXKfeztR7qPokUGqyOsHD7/WE68mEaStp2bLz3/3uoqqDhnyw7Q3qMQTBQLApXdfvSl/ZYGJH/ZaDnKHAnJo4PL++18kCqN/eafA8vM/vM6vbQ1ZXnjEnHX+wR0UgMUTz0xom+baB3T187yvYDixEvAN0LeGJpP0m/ex9MYdzFUmqVtSRS4kSmpmGI0ZHipv+IlSadgqRj8hAODu99wbP91b2Lgc47WQCQPwiF8eEs6jkquHcFclUd1NCbEtoe3k2SkhcdlnaLg8JnPTN46wjauSgkB8cHXw6z+hOoCCMO079/ransLmSoy6HXjjJGAKKs2ArKaferYI2gaV1UnQtm4FrCCRZ1FXCE1pJUQneQr4MzPnMbE9FL0y8NCRc9ifZSNGXs782vcnttTscNVu5q9s5d9rSe9g5omM2K2Ni6nY3oXQuDezV8P1mSSdlYOAx7aM+LIMvkj84vCDTxgRE7be0E+OPTK0CbmdoBWMkBsS/075wrodMCW+1R40Ge0tuQJ2uzXXKbUW3+9xdbe+pPhLratBCz5/IC/FlAtDU49bkgwbngdMT0/77tlzMRkJa1FtS7e8ppy+WzFM/haKNFWUv2+x4A9I+HORpZCStzaG+e8h9trI6gskeTs3RuCfN/c2SNHeWTvHt0BW30PpNpZg0F/WpNKWpqqZaw7/yvZE7P8Vipiu8V4ihQAAAABJRU5ErkJggg=="},46016:function(yt){"use strict";yt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAAAXNSR0IArs4c6QAAIABJREFUeF7tfXuwJFd53+/0Y3p65r53V8vu6slDKAghg4SE3kgCSwjjOCSlKuwKxIaUE7tC4nJRJtiFbxWOE5yKqxLsuMDBGMlAkHAcwBAS7AjbvFYsK7FiV4+VWImVFkm7e++dVz/Oo7/U1z09t6enZ6Z3JcgfydRu3ZmefpzzO7/v933nO48R+P+vWggcJfLC57FvEGCXA/i2Az828C2AKEHfBn545UV4TAhBfENR664/gZOOETV3DbASGCwqwqLvoZ0YNKSBIxzYQsKBDUoIyrKhJEHZAbSyEDVdbIaEzQtX0Mkr9mIU+b5j1GxbeJlN2J0YrCY2ElJIDIAk/Ze9yMCCA+EQQtPA/TdcIDb/rwFLRN5WhJfoBLsswk4Q2lqDwIXnsnLpkX4mrYfvAZicDAaCT3FESg4hDIQGSNjoJ4QNO8EzF52D588G6MPHaS3SuNh2sCfWIKWRCAuGy8fvidIGToHlolkCFv/3GnBAiJ5/Bf73TxRYIrIj4Fylcb6KcA5x4RhIg0TzewM2I1I2EhMBNkAMFtnpcQzBTi3NmAxQB4BkYAUsh48LWImBxYALCzqx8SxCnHjlefjRPJAfPE77jMErAaxECobBlBpGJUiMgpGERCRIlAJx40sbZBkI14GADdu14DRtuK0mvv8TAfZ5ooWGwiVWgr1Gwo6BxLZTBjA7UyZYNkykQQ6lhU6iFNEMUMXMzVg7ehkNoQWEw2gCgsEUTspcSySwLAcWg50I2CnoCZS28ITcgyeuFEIV73XgBO1EgsuExopUMIpgtIBOFEygkOgYxthIkgSJVClb0/9FKbA9WC0bTtNFo+3h9I8VWCJa6ir8vSTGPrApZSCmYNoEE+oM4CEDUhNjs2dmjABlc1egIhKRznwDA5qaI7NTQzTclMmWcCFS8zQZsA0LduLAshM4FrPOwpOnNY76Gg3LxattYHcOaGygKYGOE5hIwuRgMlOZoTmYatjQsQRZAsITEG4TdqsBz3cR/liAZf0MFF4jNc4zGsayoTXBEJsVYIhSMBPbQRKwWRESBi9MRTUrvGRGDNGUw2P8mQ+JTFdHJGZQNSBcF/xGRALCNrBcF4IS2JYLyxOwVZKBLACL9ZmZnfqeBCZMYLSEJgM9ICSxRGIlSLS1raWCWSvRtRrouAmCTY0FinEus5fBbdgpsI2VNuIXFVgiEp0YL1UGl7KFEqAVGzEDSjDMCtvJGMqsTEHM3qeaVQa0yFJV+DB6OwQ6Za+A0Gob9MSC5TpAEsOymb0WLKsBhslpZBLBoHIhWDMTEtB9CcOAMjuTITtTYgr0mg6ef8cV2BBCjKKBj/4t7bEMLuglGfhNC5bfgrvURvSiAXuCqOVHuBoJlhlQTdCkoROCDhUMV4CZmrKPgcwdQEGrcvCmATqUh4y2mfaOXmXgmUF8QqrDFizHBVLGssMj2Hl0kUYgFpJBkAGaWgq/mBkSGzvbeOZtV4pgXOGzT587RJec3MIOI6ClBDUaqdW4q8DGiwJsENA+beG1UsLmOJMIipmaAEbKzPRTL5qBm4I6BkoBpSo2ngmgIw0sPIBBZmfHrOb3+d/UQtgZ2SD+OwLPwcYS8Myd1wpWp6mvP/8OXddNYIUB1IBALgDfhbu0gKdfELBs+psSlwngpcxOxYBqaGJQKW3F2YBWmTczccxnD5lZg6U5jWc1GgObsrnwnNzDG3ZCDYgG4cl3XieenwXqVw/QctfC63shZF9BhTESvpaBXW7i0FkDy6B2Fa5OFHZHGZiK2cqAxir9zGY1Yug80y1WdMS6wpsz0du6DC8/hyWj5cD2mnB8G0//g9eKJ6eB+z8fp1d3etjTDRBHYRrKJZTAai9B/NPX41tnBex9RM4VEa6RCmsJQeagyiFLWU8LzmmmFk5l2RCduZJRxfBpllBu3ZJO58A6LlyOR1sOnr/jMny/3LFYJ7Ku+j7e1FEw3QHiWEPHBGoQ7MU2tn7pDeLIGQPLoL62jxsVYYEsSKmhpMyYmrBzOhMdnWH2JTUYk4cz1eGZ1lCgJLFXt2E1Xbg+B/pNNDwHp2+9GAeK4H7pIF1gHLyqFyDaCCCjYeTXdOD4Dh5+z7XizJwXm38vwvWxwiqDGkZQJoE0zNQM0GQYvoxZ0LxQqa7pvhiAVpA2syiV9vlFw4HdsmEza9tNuJ4Lr+ni+JsuEYf4NMbgS9/DG0MNdzNAPJCQLAN8bctD8s+uwXe4EWozNtXUEFdJjd2JhZhBTRKoFNRkGE6Vvf2c2LMuoMXzpknDGGCF+HZCrwtNXnaS6VfMWA+WTXCWm3AcN2Vtw7Pw6O2Xisf/1yO0N5K4vBtBdmLE7F/SDgLBbrVw4p9fk+lybWA3+nSZSXCRIkipIBnUKElDqyRRhfgv160z8OJ1HFve6xoDas4zpoFaBWjeYMw824JgcInBdeB4rLmcuTI4pAUuijT8QQgVKigpYBIB0UxgbZ7GgfU7hawN7GBAe3oGV5GGlGz6CWTMmsp96cxRbfehK5xObVAKCL8YZl/W6SqtnSYNbgLLZ+YCTtuB02jC4U4D96Olhu5oaGlgDMevMaxGC6f+5U3iaN6Ycxl74gS1nGW80cSAsRAHMjV/xaDGQ0dVLvDM0KiKZVMALVa6CPSE2XNkXhX7Fs2+gr4TDrKEsmtn4AqC7TRg2RYsNvuYe2gGJg5AnF3zBRz7Ihx47ytEXBvYjZBuiCWWJCGWCkpLqDhJdSWNUXPhn2XOdbX0x8HS1OxLwFcyuVSB/BwGl8MwDv6TLAcMxfnjYXaLv1tZxMavXC8eLbTjbI3dDOnCQOEyoxAzW+MgTadpk4VVo+zTNIa+mIDWarhizSpCuWlmP4/tNneJLQh7mK5k82ddZbAXbVi2xMH33rHN1pkae/gwNdbOxa2cb45DSC0QG5mFVZwBmrCskieeyuQqsy+BMNPsy+CVPtfV0XKjTwW98AU7tfyja8FqO7DdFp59303iWLkYUzX2mU16LWnsjQWiiGO1JJUAkwxBrdPFnMWyMwW+CrB5GlkFVhWgdUAtnsMAew7sBVeZi7bcB+68Mx1+G3tVAstDKeEmbuawClYKrIolDCeEixFAbW8/rYtZPl7h2MrPmArWHOdVF9D55ynOnAuvCXvVAf3aLVmHoBawT27R6yDxkjhBrGPEQ7YmHAWMJKBG8F9mWRVLp5r98EGVma5CLYr3nJCnGefVcWDTmMwObdFR9oLnNnwnPParN7WOzwWWw6ukiZs5+A0lYm0goyRja3pxWUurWFbQzLEK1NThOmZfRyPr6m25cfN7s8mbZDSgOYzpXLiJshZ92E1PNHZ4oPdc53y9zNoJKXh6ky6PFPZqBlUg7kloBpVkjeT0DCc0pskFKkzoZAWVzuacOo1TbnS+JmH9tEGxwWOWjYuRwOLMlUkUpXEbD//Yymo1XWvR042dbXhtzzn6C68TTxVZOwYs5wOePInbeCS1ZxArk/ayTBQP2VqMw6v642X2lj6XzXYsbq0b5NfR0jrnVOmGDYvNfMnBsffdJp5f/zKda2zsiwNFyrgJg8u3Tru8Duy1lnAWPXhtH9EvXeV+cyqwx0/RPqlweWQQSQ6vBtA9Zuv2+H6t8aZKyTgDllZ6+5LgTdXIOedNM3sGlP8v+Nj6jVuyYJ/zrt5X1BVBAqsbuQnHrxlzgaYLu+kIe7WNxkoTzRU4f1scyhlj7A9O0VWxxGpoEIVRxladpEPWLwzQCm0+I/2ry8Ap0ccEOUuWlIdPyz70+TfjwTt52sfw9R/+hs4bDHB+SEr3wtTXpKxt2LBaTVgrlnBX2vCabfPUe65oPp5fNwKWE9jnP4uf7hvEWqYJbMnj64aHdqc4rDFyTEvVzZCMounU8dKV5/DBgoycKZMZVA72PUfbCTmH1+8Q3WK5PnqA3F4PV3f62mxpMjzizN/zdY0E1oIn3KUW3F0LjnrPNeIbE8A+eZL2DDR+SsWIujrtEGieWjMWt9Z1TjVDsZLVjuozK603xr45TK5yTmXg2fyb7OGBE+9/s/hhEdT8/Ue+SZds9vWO0wHpiFlrg7iMzNrFFuwlT6ROTCjnW796s+jzdSPGPvEsXRZIcHowlhGkNtDRcCJC2WzHnE6hJNMko46HHoFcx+zrnFOy//FLhjRnc/Zgtdvo/8Z1ODJt0twf7KeLN3p6d7dPkuUgGoZgzFoOu1Y84bY8eEu+88REovvICboxSuCqAeRAQIZx5rQqh1WqmDtF3+YF+HW1tgr4s5aP3LOTshcWXaUsHFq/mWcpTb7uPkB7eqG+9NQA8ZYk1QtgpMk6SgyssGEtN4TDTuycVef0L18pHhoxloich57Gm8MY8UCnYZZmp8WzO6qEv1ihOsBP3GN4oI7J12VyOZSbKjNDQFhXFywlfMf9/vtuE4MqUD/+CC1aA31dL4DeGiA+HZEMojQXm+QYsBysNISz2ERjxYP69VuzsCuVAp5oqwivDw3iIIIMYmhtMpF+Mcy+qpK1gXjBZp9Blt0m6+dzz4klAL77+PrN4lQVqOv3kXPpMm7ajE2jE1DcjRFvBJROl8qlIGWtgfBbsHc0RWNt0XEH9+Fr6+siSYE9coIuCDReyRebADHPvONoYF6YVRlv1gGizjkVrVH5vNJ5U88Zao5ru1ajqSzPcp9bf8v0CRn3HFTXBEqs9RVJHuLu9iE3NaUykHZzh9EOy4Hvwt7ZEs6Kj+aq7xz8lRuGU+UPPkWvijlFGCGOAdmL07Gs0cVjplyKAUffzfPQVYI4OaIyGoousmg2WEVGjnNPpXfjbmh2B9ZDjj09z+399q14eJqzuufb8asiy37ZICK5lTIVqqMytqZxbKlADOxSU7hrbTTW2s4T/+oG8cOUsYeeoisijZWORjyIoHSUjmdNDBDO09tZujYvSz8k1BgydZzTVJkptTjnALgbutR25SWbOFSVQ+VL/vwI7QkG5vUDlUYAcktCbsWkBqyt0WhC9Fg5XRc26+xyG+45i+b4r93Q/EEK7LeO09VygHasU43VoRkydlqWanjbeR6/jo5WnTMTrCnRR3bNkKGFVuIjaSfAhrXaBCVN96H1m0VUpav3HKYFE5qb+hq0EVDcZ1AlKXZYDGye6SoTzHMyB7bURGN11fnRB24Qj6XA3v8MXRv04HVCyFhDKTO9G1sn8Vw1gDcVrHkSUqEJU5lcApRlwLZUCuqyD8Bzj6wPA/gysPcQ2eY7+o1dEs1AUtwJILcGUBthQVcLFxXLwMD6Puwdjmgse8npD97uHU6B/cZjdGNgYA0iyAFPx+SIoNwVreia1mHWbBC2S3o2jmmMpSPzcQsRQMZUlxdeWOFj67cvb1QxlY996kG6Ko7NOf2hrvZ60Kfktq5OlTmVWcRyC/ZOXzRWm9T94O2N72WMPUY3dSKIrQhShhmw02LVCZ3NZaHiyXU08myBH4GaWn/moIr34srySOqCD7tF7pPrbxXPTgP17u9Er9TkXBxpkhtd1lRIdlaprupqXS36hCKwOxedwW/eKg6mwP7NY3TjIILoh5CsrzwZoXhhhTWOlXGe1o4wr2v2tXU0K8a2tm5fOIoAYJ79N2/1x5LQxcJ/+iHaLSNzdaRInuxB9mPIriLdDdM1XvnqnTHTKpOBLIilFuw1T7gvWaTBB9/ceCAD9nG6dhDAZWBZCnS2SGziVcmuOmDNOefMgC+GUGz2k6XKQXXs5PS/u307lVeu0KcO0WpicO1gYKgjKd7ieDWA7qlMV4sdgZGlVtTFGcayuxeEe47vdNffIrIZ3X99mK7iBbcMbJczWnp7xKBSR3PnO4NZVYyvY/ZV52wDv/1gVZ7eMoyJ0zwpZ6xsd+NDP4PHp8Wqf/ZtWhKeub4fQHQlxd0QaqMPyaAO8k5AoSVmES0HdseCcHe3ks0P5c7rr4/S6wY9LHYiKJ6dnAP749TI0b3nNc7Q2KHypOskS/NbMKguwVp0k60P/aw3WoldZuoXD1BrS+DGQBu7F5LkCKAzgOKeVTDsBExjaBXRRsA2hXvOonPyd94iHk0Z+9WH6bIowo6tLNzSgxJj6+ptHbDqnLNd+DwUqTb5YsPnoHpN6n74rY1HpjH1E/dR013UNw6McAd9Upsx4l4I3SHSHK/Gua7WkMKcxQwsa+yOpnD3rpkT628adhD+7mG6eCPGPl6o0C8wtq72na3ZV8pMmV4lb191DWfyhQNrqeX2fvct07uqPBrQTlKm+v2QZFdCDiTUKVUAtU5YWTqHgW21tL3Ldxurrfjov3/rwrMpY79yhPYMJC7hLhzPJ9AmnZ81MbujjjTMBKuW2W9392Zq8vBBzNQcVO9+PMKZpUm3C3AHIH4QN4ShWQgiUhsy9SdpWDWLqeUyVGmt5ShrueXau3zR2LPmHOROSAosa452cc1AIhpEmRQkJWDPJiKoYvxsB5Z/O11HR6Cl4/uwGkOmem/BI+uF5ZhFcHlY/zPfxXWBMqvM1BzUvibT68JoGxTF40SqQ6I8IvEc11pb0M7OpmjsPtT8u1HaMAX3IXrjRgwe01GDsJArqGj+OqFYWUtnevtCC0wwpPj84Zf8h5nKoLYt6rYONR6dxlQG9VP71dURWbvyFCCbf87U/owcwMiBlcxwvIwK7YZrr3rC2eEr84f/qLWfTx+NeX3+IbqyG8CPePmigWE5mFrJGSY9dk0BiAnpHC2Izbz9XLMfVm4MVNfd+vDPbu/DUiUBd+2XV6rE2ttTFG+FUL2h+Xf6maMqJlYq61s6uP0xe8f6apGwdvpwz9lhn/6Dt3mPjAH7pQfp4k6APaHkhG7arR2fAzv1AVl16gOan51N16nqNY2xfRhlFUOq1Pz9ZPN37/COzto149Pfpdf0pbkw1CQ3A8iBgtqMSc0DtXoW+LZMZbXN5MoxEO2GsHe14exc9B//j39fPDcG7F88QCuRxk/1AkiODOJhyHU2Zl/lwMaODW860+wLDM2ZmE+SsJru6d+/DU/MAvVP748vVYn98mDIVE4BnuZeVUgmZ2o9v5GBuE2fgv4roMly5AtrzReN2G7uv7dq1cxnv0PX9TTQD6H7JQdWR8xnRwR5AXOzH5+sNcv7cpKDp6s3mrBalJz6vZ/zfjAL1LsPyssjaV0YaciNXjoKIDtyNqjp8yutcrvc6Smlc2wH1toC66sjP3ln47s5CcamGH3xAF3yrMGudJl4BJPLwUz9m6u3bO/bLX6mLC2C2m64z/zeHeLpKi3lY+yo7n5AXRFLax+D2pUkN3ps/lA5U+v1/8ssZcy3h3jyNmB99Rxh7fLh7myJ4x+70x9N+BgD9i8P0epGH6/psh5pGGbtpNMZb9kq0LMHDws3FKwq91TW5fK98nH7lg8s2O6xf3uHODkL1LsewBukNOcwqCd7lAb/DGoQUdJV6Ty0sdi8zNKxEYhRVregAqW3DOxKW6Q9Lu00789lYExj8xb/zP14QyeGtRlmOQOeYTeuj9tVm+vJp4A65pwmy50e4TEq1lTfQ9JuuUc//GbRmQZqGvwf1NeGUqymieoIahaos5cobTspVeFginVmfV1aEM6uRbt399u97xfLNzHx+E/up/MiiQu5B5bLQRmI6YBus3T7nG0trRs55KAuLrl6ReGR9bdVbx3CFbnnMDXCUF8XK7GYg5qGVBK6E1HCI6tFplY746KOuigDWlVfzsFyNLDmwVlZ8h+56+3i9Exg19fJOvc2XDMIQJsKWsU1Yr0xVc+95pkDyhXIx+kXPETKdh/5SGn9VLHwnFBpLOvrewPhc/CfM5VBTceqNJIc1PpmP6mlxWfmIDeJ59IK65wWqc/+4/bBsjVVrpq5az9dtCGxLxg6sXxOaLXeqtHQSB7bVRUkPTYs1TQHlvamiHcCcrdOxHj83oplPvm9eUS139fXSSkaOai8IntLw3QLoFbLzrinH5V7hiMuyiHHrk1HWGsLcNZW/MfvfvvkNieVwN53HzkPC1wzCKFPM2sLnYWJqKSOc5oCaH6v1PNzoN3kPQLdZz7yD6d7fr7mowdouUm4NlDG7gxIcTJli7upkvQgzsapmKmTLM2bZRvYOktCy43D2sps3bng6Ht+3j1YeznSpw/QzkGIV58OIHlxR5RGB+wzt5PNeUD3wkKx7Qm87KRMHDzxR7+wsjnNSfHxT+6nHQbmmtgA00ANSwmVsSil0GuaN4mkyidwJJCzdYetH73rXUtj2pqXfYKxHAve8yCu3RqgkWbWYyjeNDHKV40M9TR7aLFHcqbd2iGoPJTiuPGOVTw6bSJFXtiPf532km2ukAmSTkQqHfuXUOlwypCpZVC3wanv7adFQXyc2er5wtrn293PvtN7eBoJJoD9wmE6vx/hVZ0AERd8QyodaXe4xuvMkiWVmjx0UGz6nPZbqqGn3Nif/IZ8lXLsl4cSelOSDEMoBnWLzT9Cwmm/Me8/mhVTALRitslUiyvIV04fZitHAqttiAt3+w/McqwTy5E+/xBu3QpgbfBoQpoJglaRGg4DF6SgnJGao6M5yAwod035Tlbb/eF/njHeP9RT1yNcpYzZGcRQmyoL/Dd60IOE9FYvi1q2vX+un9vNOqJDHedUhfTwVgsNYS+3YS86+OG972o9M0uyxoD90hG6YBDg1d0E0amBjgeBo4JIJbzGqczVOjFpuYw5S5d9N45dHP3YjPiUC80jqdrRb5CRaHY1FHdRexF4zF9vJRlTTYGpk2Y/2befcL6lOcBVVsYkqCsBExrL5va5Q7ilF2lnIJ240+FurTIBb3oAGL65Jlij0KtO6w+fknt9Nv2FZnJqx895x6Zl+/OC/fG36VyLzOt4T9meIh5G0cxUHvfnGJUzVKOBv+JkuJFHmh/oV4di254jL0suAcsLpAdPtr73tfXqafXFRhkx9s++F5xrK//yQYJoo6tlRzoqiDMJ0Ik+YVt+30BdzMAamW4NOrY/YTGQGT1gWHIek+JllL7nHvvDUg+lzBBu4Lv2y8uUsF8aaKhekIZQsqehTwXQ3O+vBnW6c5oWN6fPnmH6/JU/jAIWFxzRpM6RL7x7V2+WBEww9r89SNf3Y90+HaTDwSok0hzj+Z6b2E08wIsfPvBXtFtLdRHvhRLobC5+8SFleeDP6XooG1Z72T36Rz8jZoZS64epcUGkr9ZKrHVjqL4ilTupzZAMmz6DOopRx5jKZj+JUiWoM8As1icPrdo+rNVl/7F77xRTJ9WVwU4Ze9f3qN1U5o1bimJeHTKQxPsTkMUbKCI5+Tt3NJ/IL/zNL9EFcaz3hknWDx9Lw1XIQzou1YTVEMLZueacXjsXx4qb0uT3/cQDtAKFN4TSNJipuZ5udKH7uZ4moHC45LK4aq7cETgTHS26uuJ7BpX/L7d5dMA/9pmfz0YG6r5SYD/3IF3akzivG+h0XmiXeM9xwCNh77ac75b3O/mtL0avUMbexTNH8unjuVmVycB7ZfP09GVXOEseGqtt3onNec5J8OS7rxepWf2Xb9AFwsLlIZmkH6U9Kd3hnlQ3m0eVZ/zDsbRfBsO8hEmVk50HDidYWAK4d7W45B//wjvEiXnXVDL2Mwfp1n6grdMxGFilLErcWFjLK073/beIw1U3/e2v0vm9gT63H2bglhPIeYVYClou7GVLOIuLcBYaaCy4wvVtOLZjb8RKhRDWPt4WJTf9Uxz0RzCZnqqkr91kWwzHh0YqtX14sMzkyUAsH73armFu/k0PYsU3x/7inYsztzudBrj4+Ndp0fXMDZshxZ0IEY+185wCX/DUb+coLy+fdvEHPk+7exoXdSKV6u34pgnZVekCYILV8GAt8XRyF47nw/Et3uxOpNs5x4p49w6dh1J97klFSPqF7FRxAK92V3SOlpaBzkFdajlYWnI5CVRbUycY+18fopd1A/3yToB4qwMZs8PnuUi8K9r97v3TxuvzG/36F2lnINXLeT7pYDjvafSQwpIdnk7e5p3XhLAXmrB93jN7uEFuyF3mGAmzNCQyW5EaBv3uMOOfITRvHm5V+JTr7fhw4CRVGFTbEdaOBdJLCy12VOma2LN9iT/9Ll0RhXotdVoDqIBlIBHW2pLT+cCbxJFpN07X8n8N58dS793oAjytPC5NfywCwcxl7eIIoZnuKix4Q/J0w3IepVCCkkiCWE9ZVsZ6UhXMO9sQqlyf3Enx2NWqqzvN1cWjs9KVdYEWn9ivbhjEaJwcIO4p4m1KqCWE015wnvytW8VEt40z9lEXL1NCn9cZACdZlwdQveEUyPJUnbIGckV4xzXHy1KFvFmgSRxix5R1TbONFuowNGdjdvJ2lXMTL5t6+XjO0uUmkee2jn/5F6dPp68LaH6e+MS36c2nBtps9BEHw2igxVq46Bz51zdkcScH7X/yAPZ4hPOFZXZHESgwWUjEE3Z5dQmPgrImTluyUyxYcfpjjsk2oGfvnOpWvshSr2FtNqLjT/2P975itC9h3fvMOk98/Bvqp5/Plt7IPv/ODwB2MqvLzrMLFDu27a00LbMLFmz+6RJtwYQx8cQ53Y94rJ5DI9JsxkVQyabQsYWjNBp8vJx9ygAd51B5JWGJiKN6VMWtVZUsx6gcQuVD1m3fiXzLfeq//6LYejGALN9D/PF+uuVkR5tTARRHBPyjDCwFTRfOkg+3acO2LWEREYUKFAOal9zHhgFGwh48BZVAPKnCst2YBJ7+9DuQJoDvvLe/00oW9mqpmtzpYO3k3K5OcseUm/38XtMI6CmamzuoWTq64CUhifbTX3k3Nuf9qM8LAVz8p2/Kq7b6wt8aAsskshsQS65weFtl3m2SBASvreWENy/8YEA5OaMMpYtAeDUQ/+yJsd0Td78dz5YLzFLyrrt6a+R5e7rStJV2wPFpzvDpyelx3ZzVry+DkAf5ZAleRIw2WZ2m7z3342LoBGM/sp8u2urqCza3stXNXNl0+6MGBPuXdDNaTsRoIElYWyndzSe/UcOFJOU+17PxXB0L1Ju/AAABOklEQVRv+i++fNTbPL13bUDOjlibNkcFzGKTUOrA8vtOG10d0+rhGAabNx/nv1niRKS7FrsNu++76nTwVPtUnYzUC2HoBLAcNvl/pa7aCIWzKUnlXp1bnH9GZFTRgvmxydugvorjH33ynYv8+ysTs7/rFPKKj5J7sTVYi22nHQnRTqCbscw6DXlPTsf8MzRDuSgMBjn8o1LD13DGDDUoiVqu3ZNCdpaWljp1GrpOOc/mnLRwv/9N8jcH8uW9rrXEixyYRflruHty+tG23cCR4aa17G/MS1KfTWFYMu68F030+wtd13KsSNjkCIeMcITk300DqAHjpD/mQEaJRDWarXCXRPiJf4L4bBv4bMo675qxEYT3/+XWahA1d1LLc2VfIkoodnUS+w0/jjex9bFfHv+BsXk3/3/5+/8DKIf6sstcS3AAAAAASUVORK5CYII="},37426:function(yt){"use strict";yt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAEKNJREFUeF7tnAuQFdWZx/+nH/c1M84MyAzOIBpjBYRgNujWqMFE86AUNYpbRGMqmlTMEtmEGC2yZrfUcTdhw6KbJyYQNUIFycbEVMgTDBoRMwQzBAyia5AFBKI4w7zuq1/nbJ1+3Nu3b9/b3ffeGZDNqbIGb58+ffp3/v2d7/vO6SaIWD71ezYpl0OLoCJhyIgzBtFsQrMasv+Ut+o64FvH82PFdvg1qh10rqxa/7D/lPbHOV+ErgGaQDHa1YKBxz9CfKtHRFS1Ognb2CeeZglqYLouoCUK4EYMQM1teBRQbaANAiomcWDbx8hQWCa11AsFfNGPmChNwmwiQHZLuC6lcmlV63HQE2HDDNNGlAETxrC37w6SqwVmmHNCAb95C+vWCaZOmNlooHmKKgoiYXD7J8mBMPBqqRMInDFGbtyEd4sxkKrAgyCFsfMRTEAU1ZaBqdJXQsHObMee8bLngcC57VZVzA6cp6oBDzMhBpmQeo/7zOiV7kmn2Ne/mIzUouCgcwKBL3qStcoU53o7J4sYeuyDZH/QBU7m4z2PsFkwkCz00b5JXcTB/sVkYDz6Hgx8K5uCHKZ7L35KAP8umwURSe/srYs42r+Y/PWEAP/4JtaRB870XtzQMPTE1W9xhXPg1KVwO46IE7zedxs5cvIA1wADpxZwt8k8uYDb/rPwN+A1PQCBNnzhJtYhaUWT4ijhVAGueUwKp2gQvL77RJmUvwGvScgVTwqtcK9beEoq3L5JI3aCFc5cJsUZulMOuEtRJxb4E6yDxcrdwvECzhhLAJgKoBmADCDwKaz1odeqtC0DrNZ2AegAMgCOEULG3O0E3sxCP+AaIMiNdQt5zgZAB4BuTQMbHIRycEjRaK6uGy9llohHZ5hXop2TALraidx1eiwmy5A4dABHCCGUNxQNuDufIWPolw0MfBhjnQCmvXJAzaz8njY0eDxdg8KainD482EXQ8sG3mclqqKcKvYj7a7FBexfJLmJ6VqGLPt022kXz42fBuA4IVYGMrAjBYV7E1ANBG6bkVmvHFCzd60YOh5NUu7aJw9wp1eLb5ZbPnBhvB3Aq4SQ4XDAiWXDS5hTDP3yHxoT2jPGztY0tC/pzRytTdm8d42H7UArqDyCwt0yWH1fbGp7e0wnhLx0sgCfc+h1GLff90aNGToXbH6nzUA9ZsT7hNUL/K7PNLfOnYVWALtCAVdthZd0pLEKn/uHl5SxFd8cjpCD9kC2QTfCbjca+I1XSKnrFyROB/DiSQO8b6cyuvJ7w6OV7bcPYA/kYNgV2jA9uMqlXoUv+pCUXHRNYgqAvdGBF7cYNNKGzzWBb9CqAA8/lRbNSSXA1doqh3/igLtnTbGhk2ZdwP3tdRG2bruF83taYgveJzR1dcXiMYD8dRDqM8+PZH/+rJTLZLLmKEgFN7AI/sQA96wp8hWfBnopkYBXnhDLIU9qayI3XSWmLnpXvKm9yYxcy4qmwfjDXiW7/ql05tA+anihTzxwvTw9ezID54q+5MJm+cOXJ5tmdiMly8HxhjMK+w6p+Wf20PTGzUa+ODKW2kXFFQRVsfs88HGPanQbbgN3W5SGA9+rjH51zUhJ3iGc1S5V9Y1XxJLz57U2d7YjFu58/1oZDfq2PyqZB/9bH7PSIlZ2RJQc6NUjzZqBz3+CdcCl8IInIGJoS+MCn7l9ezH61TXHIgJ3wY7x8D2F1XfKU6Z1xuqC7dxjVgP93PKBNwaGkoYDvajyiQTO1zQTJwp4qefhTIhoSsHQcoTqIB9+b3P8ip5E6tzp4JnHyOWNIai/2a5kN242snmVMUnmCTSvWZlo4MDQlo81LLSPoHAf4DZsrnAaAzE0QnSSE5YsnJS8vgfNGQ2sLQWhGnmeoeT//eUo1DsezA2LMmOCCsb/IpOFxP+WmJWJAu6sijQY+NZdytgDj45U8MPL/emisjkFrm5CaCxrwqZyylT6LR8SUtdfGk9e25sfuepSErtqjpCY/TaZp0wL5cgwjCd3qfkntlDlnpuEJsbAvrjWGBE0MFHLMEECE02VTzRwj1sYoxg5LY5D7s63n2PnrvvLteT9qeUdxTz305fhfAu4Hjrw8QdeVLehp8glc4n8lVvibV/bqKR/3geNGiBnT4HwnllxKZlQSf9+pu/eD13QGbtgJhHv+Wi85ck/KdkHN9LMiQO+jnVALHcLS5CG2TvIT6iwRXn7rcDWXcroisdGI06ajrpz5oTpNieGnCJxHWTpIqHp2p5Y8s1h0J0HoW7fqxpHjjOqKMD0DpDzz4qLl8yA3N0B6eXDUJd9Oz+SZoyWA+feScblqYyXSXEBD9r6W+uO1nqBc+xFk9JEqAyi5fMCk5Pk7GlEXH+7mY8OLKt+pYxt2JTNy4kEFbQsEzXG5GSSTqwNt4HXCjPMnvLtt9Wq8JQJkXsnlsJLbbhOFCEmJ8jmf0tMln1jzNIx+NL3laHf76GaoOWYnExQc9IseCnWjFka/NizqGco6wp85q9jHZrLpBTaDto+bJsQp37ZgLl+ePY2oC/QpFhw/YoFHOATpSETQnU+cfJ/pwjTQX7wBbHtbd2lk6W3HU3TsOBu4029mjkpizYnCngQbNdecS4sX9j2AX6MK7wUeGW4XlAObOv3oh3nwPkA6IQI738nif37J8y1xYrlJ33IfPPHuYwg5ZjATQlLUq5ugLuElv02cyolqz4TATwkbI/AS2/UNSD8QBE4D6OjF8ekmCq3/XAO21I5IbKSF5be0JZceBF8R/LP+1X1jjV0RNUYkxio5YNnTXPC2yy4hBOq8CDQQSbEx7Y4TTrAl68dK9NPNPwuO64T0nVWSlxypdD8251MeWo3M3pmE+nG95HkOZ0xkadnXzsO/amdirLu6Zzyzu4E+ex1QurxZ2h6xytprWi/be/E7sjE2HAa4BZ6YEadYC3gGF2+dqAO4ClQPUuQskL8ZTc1N3/gwniTDBD+XuePn0Pm4U2KWrLLRAEEkbGr302kf7pOaEmlZHMu+NM+Nfef6/Xh0WMZcy/JxCuc4syoEAvK9ObRfWx6/cAtS8HNSVwmZMU/Jttm+eRRshrYtt2quuJnLKfqYJ+9Mh5///lITGkrD/uHMtD+5eu5wUNH0yX58QlTeCN8cF+7rgHblwJbdyhjKzeMRbThNmhT2ZYvvvafJ0+a1lk9NfuNjUg/96pi/OgLcb6SXrFkNBhLv5Y99vrBDHUmztIU7ThMmpetYs1Cs7nEX1J83xy1VqlCF6f685/B1OjAS2FzD2Xp9ammq3tQ1Rvh5mXhcmVoZCSPH97Telp3m/3qeoVe7z2k5pat0I5bGUPuimdcOfFxAB6aXh0VGWNzt+xQ0is3GJEUbtlsS9kc+Ia7k5M72v2X0ZzuDWdBr703P8z//9ufTzTPmVb9aeADdM0Xs0eLAZA7vP9/AtwBzW/Xgc1dwM1fTnaGiSgXfHlkeHAkTn/xr4k2P/vt1c5da/Jv7noprbmzhtWW2+qKNOsQbuhToyrcBM6L7ZFQM7pMkmceSPLdt4HlvnXK2PP/C/0X94bLsXzl4fzAs3uo6lZ5lPXNSGuagb1vQIVqwAtwvdexYXNTwhcbeDp22zfMzTaBZf0WNbdzP9Mf+HTc+jJGQLnv0fzgc/1pVaZJWlj9ibC+GRn4NatZalDEFEGAqBowk/KFPrrWtiv1u6yK54cdt2Py1t3K2MpHy224L3BzvrSX1OzFBp6oeu7+Nr6dLLD0vQx132HoH/+gf+TpbcABXlyMSLHSybN6qjYS8PnrWNNoDjMkAaRaAop3slbXsZ+7hbuVsRUPhYw0U06W0EpSOTmT392fOD1EUhB8lefV11TjvXPCLTZ/6bv5wf4XqWoBzzDTRSzxVhoEvLeXCZunYZbB4P/qQMhwPyho6r/TBv5YAHDHj3SZEyv3TQQmgzxye6J1xrTqXoojjOFhGFMCXEJel3s1N9x9fIBJCcMK98cR+HseZl06xRllz2gQ6KDjnsehUcCnnk7Ezy2Ip7omQyTQyvZNSrLMeNfMRKUGuD0aXbPq8zpm9zRgNA9j7a/zmT2vMU0Gs/PjfsD5Gf4q5x5LKJNy5a9YfOg1zGaCz66lal/ziQibV3/BV+HVU7SFRQfX6o654GAkCJVg5sG9zyUx/N8XMuvy10GkOAMUCCIYX+dU9TwTaYLKZo48y+QET9mOE/CLH2LnUuaKMCOC9LXpFdY+OfBtf1TS//F4+MDHDdyy4YpAbdgxiRC+YOw3e3KY/He+pskHhNvKnJEncSSgiXEWVxSoImOCDsbrSibsHJNZggqSlbItt+HVFR64P3zeetauZXFOSYcjAA+y2d7jT90KZEaQX7IqG+kDX+Y6pivvzZXKQZsKNxQTYkHldmYw2KlSIOhxEzbhoM31Te+WCe+kWRk4P2K/XMXTI7vLVHBZL5OyUzGbiOYrb2WuRzVPpSJoVzt+de6/Crh8OugNywePKVoy1NtrBYXrOYJksrC85pgHU+GV9l1VoO6oH8hDYnHKvRILNivsT6m8AlTZU/lOb3tHZ2eMEULK34C45CF2lsFQ9GeDlN2A4zPPAH56C9D3ZzVz7w/C703xha7nCfgnUJKAA7/4pFqkiZQoDqonCydK1ioPB23FG1mYwLmHYh/zX3LzB37zDa2p6y5LTAZwgBAyWKJwnhnMxTDDrewwqo1iryt5PEvnAbfNA55+QUn/16PptCJXV3pxLdPJGjpK5wvKxa8qVY6CXKRtxQvN1jU5bAs0//8sOHhFTbJUYX3TMiGla5zlwD/50damKy4W22VZHiWE7DMH2+kQfxP44ocwk/EQrl7VekYgyKY7fbjzcuDWHmA4A2P/UVU5PBDTRkejvQms2EZb1xQft5B7Ie5SuW2JFj2alpjbu8lDlr3tFNvkk3BnB5Gnd8bj7daWaZ6ZPEgI4a+DF4Ff+gibouaL37YKA6mmOj4nuX+aewbA1d4zvdRPrqxU60ihjRArTJXacnYYFKJV+x9holefNp137Ute9DVVcMFqJgsEswW9mIwPghkUxvuaGc/k6buFwlWHR/DemzWvW83OBX3x0yYT6vu1Pt+57ZyEIzuWIeh9UoMQ4jv5O8DfLhloq3ovDTQzYeaFege0UfdS1g4DPU/Bnv415amloKfQNCnzHmTtGnCO3w0yHbooIc8/URz42WGPOQxlecO0y3sZtW1XZ8P2u6y/BoggIaXR8gCKGhjIryIHwwD21iEXrWLnMYKUF7jIcGzHEhyu9GjUcrG32jnc1L68B7MYgeQ1Y+f9HV7oXxxd5eSCb7GZTHR/GcDCQsbx65RvFfDcc2v5PGZTHq96TGp3J1480EuCA1fPzZILVrNWZuDckt/5OzwEVBBwXNMRudFKb9RVf8Ha07MQlUNUKW20ygneQ4xAEIA2qpQvUhgGhpU15NVahONMmmcwA13exyZo4go6HmbiCvKGwrQRxiPyhRPkCPg0rEvIXXsp/ufxjxCjZuD8xL9fxaYaOrrrukGP21fWoQAfvFA/CEQDjzvXrJYjcuroFLk5DH+p1UMxTbUbCjcvqorpoBX2ati9qlnZQaA8o13tOmGejCDlhznu8KEy3rxrEg739lrfrqq1lIW/vYwJP/kOWomOJqr555TN3xOlySHmqlueNOL5NxSSd4GTgsdHC6zP796nUuB5FSoULs9AJQHZGQqG61G1e3D+Dy50RqLE9NSOAAAAAElFTkSuQmCC"},19150:function(yt){"use strict";yt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABGCAYAAAA3mEEuAAAAAXNSR0IArs4c6QAAEaRJREFUeF7dnHuQHMV5wL+v57Fv3UvHoUMCvYUNBpMirsiOsMSpXEiOcABLgAAXkkicwoQ4xFUJdipWGYfghMTP2I4jYqPEIUiAFQEWyIV0Fc4KihzAkiPkQgJ0Euhxx2n3HvuYR3+pnt3Zm92d3Z2ZnQ0i84dutTvzdff36+/7ur/uHoSQL9q7WYZz+7oBzE6QIApIMpiEoRSjA4DikCT+H9ZlyxZ/mcQBmQ6mmQVFTsPa584hIoVVlJuccBQEAESEsH1FHyjKhQCGFHqlnYoKXXhJYD2wJhWAxYbx9l3j7So6FBC0ba0EkZF5wLGjXRWFdoHwY1UavY0bBk+3o40tg7AsYeeKBW2D4EdRQTXkpwxMHsf1T48GLarec62D+PeBPuB8dtgVq5DnR1HNKtKqLI4EBj+MGwbzzYry83tLIGjvchnScDkAhhsT2umG7GDfChAJ03jLnmN+FN3s3tZAPPWJCwD1Oc0KCfR7K4qqV2BYMoWcyxcdxKt/EJZEaBHEwGJAngqk6HYrq1q+rTJhEWGorxAdxo27RsJqe4sgVlwJCHJYlQlFQW6VCUPx1XKZchZv3X0irLYHBmGNlnZc+xuhVMQ5UQtbaWHLsxusYxrvDC9OBAch5g7K6IdDASGEtENh7ZBp11WiDN4xeDSs9r83IISCZKUAnAqA3ASTK8CkOHCThdUwS06YIKpHcu9rEKbI4RgjEIuN4OpdBafSafNmBosOdICSnwXAYy0BCRNA2RWV8ly27PctCBPy0EPHcEXjiVAxZzXQD0AX+oLRDuU7IVRXxqAM3vV+c03IcqB1/xrXbTe9KpfEjL3gc8YeNoxGE8v3HQjhjnqM15pZghsgenJgPpi8qym8sGfiXuYcPkDQtrUqnBuZAUoMoVeewjVPZ6vb1P5greNpXLfn7abKdLmBfroqAuOFy4A1WM8I2woauSNnHT2AsABMjfSDgT3WOopdV6QMzOh90+kh2gtCFJyM/qo6MPuBQtuWLwSok15vBwSvMhuAsBbH3tw3C8DoLXeiarkc0/jZ6XlIm0GwHK574bAfxVffS9tW9QLkL6743quy/BTs1725gLDWZSbSfUDUB3LVUNytzh0zD+O67TlRzfaBsBqGabyhtdkn/cuqGaDmF5XnBWFkT+sB8gPYAcIaes/fNxN0fRZIpZSPF7CcjuNnB621jfaCkHAUb9pz3E/HrLGIrZ9IQFS/NPQJmj3hCwrWoAxs2nsMtq7sBo79gKbqarUNk4zsJP7eC2fCB1HdC5g8jp/+2estgdi2sgN0c2FFsGtFYPWzfqygMlgXQLY2FERrquPFGqyHPIAgIrHYIyi7px1GRxkc+ovFDXUiqzos+0ZrCyhDX+uB7PFeX7rXswCZU/VzHJ4V5avU4s2+ZDcAQURxABCLPckA1Th/HhEwhvcCvLwFQM/U1iuoJbi10Fa+DcKzFuqAIKJZANCvT6WN9JkDWeP0QS2XHXHfzxMFEAmhvGZUxZmoi60Wa1bQTPeYVGvcdWUU5VSXWdny+Mx5UqznciV5ydIYZDMIQw8BjL4coMd61mjABKMLCCLqBoB5E28PTRze9ZmMmc5STiOERLEyTvMQ35e+Bvt38YGJ++tcwszA+mf6ymvc82Bh+tE45PU65VSlClM9V0qzV/5dp5rsVmDHnQDZ0DdfBARg66AKBBGJ2H6ZNnZU+8U//Xa5tqGBiE8z8KN8J7QiiOK/XkFYHahzLltw0096YfQQwu77fXRxj7e25OJqQfQBwOxX/u1Tp3In9xt2FQSIZLnrT1fMt0W0G0SDpLn4qXvpVxIzr7w5BTtuKwVxj0pudltLEITwWhDzdH2q48A3F7zjLDunELpF7DIIB6QEJMCyoKrL6ZJaswZhCTF3V9YEhDp3tTL3uq/3wNADAMf2NlNv4999jYqaFVULYtHkuWORg4987GzoIErOPQiEypDiPTY42yAYMbkLF971Uh/s/xbAkR3NtFP/91AhuFvEYm1yWPnF9z9SsT3Ej0UwLe7aW+NxMbLyHpRr44IdE6oifbW266gvdBDBMbo8WWsRLYAo+ie3EZNQXV6uhFCrzmJPjyq58jDZTtZbz5dHSHVA1HFLzq9bsginFYS1J6qMpN0gSsHZtoSiQmOYnDWXpWZ/VInGZzOMdzPKjvF89iQffWPIkLPD1uqdlYrMFVFEOxKUzzQ5W/F/ASJUK3AKazMIVrICAaAQ7WL9v/kn8RkLr42qidnOYyYVzdOmTuqFEz/Pnxl6MMuNvGUdFpSKDy4aaRcIL6t0QQGVZbcIouyGLK9U6ZpsCEyPYf/H/yjWeen6lBLv9LxNRs+mefrQ1snMf33bsouowsgViAcAtp4Cu6aWh6d1SLULhA1GQBBWgHIM+1dv6UhevCzwthht+MXciWfunpgy8+QKo10gQh8ZNUgEKiFahD1ackKYe/OOLrXrA5Gglms/p505pJ14cn2azDzVWEeDUVL1T74tot2WYFcwbBDCCgSIAkXY/Ou+l0ouWtlgrNkYjz7yuqn0Liqft5g8uit3ZvcfTpCJZRiNwoaboXgG0S5rqNfksEAwRYxoEhaEhBzDzsXrohdc+0BnUEvQDv1Y006+YiZXPVyhz5HB+zPjh58pkJqnbK4qbjgKq+cHm4JohwV4SY2HAiIh5g5xZBpHpsQwkeK48NbBHkhcFGibvn54h0kvPqTBkuuZuvyLFW5NT79lntj2yTEyGAk3xRVWMapqFojeUxCNIIcGQo5jUiu6pFlXb4r2Lv2zYKdKR18j7ak/0DVukHrZDUxd9oWaYe74f3x1fPTIY4WsUSBuYkUAP29BNHMNLYNQCC1rEC5Jj6EUMVnfmq0dyTkfDRagf7LJmDr9OimqyWHuJ5k68MUaENqJfYW3d941kTOQVKZxO3g3a6s163fLNbXDHYnC/MhtBYSVeS25paTMUaIIYxGVzd9wYCYo7vmmhso6vJNr+x42gSPpoIPStQTUtT+s3BFhNTBLpx/52FiWaZyMAongbbuoZjBqQPhRVjPh9u9BJoCtg0hAUiPUohGW5CZLphbIfXc8L1b4/F3ZDMATt+haPksgGcVc00XLmXrdX7rOwE88OpA2Jk8ZHCXuHNI2K7QCxKEWsq/1Cgo62vIMwmVhyJq8JRIgc5OJkZJckKXUvKVq7/VbmscHsVQZnzndnAPfNbVXHjet2CAh4dUbZeWqjXWD/fgzG8bHTr6q84LGs8p0rHhPQQSxBN/ziDogmFKMDymKMIkpUmretZGZq7/T+HTp8H7QX/gqKWv+BmHmpQDZDGjbPq0VrQFJvfR3Jbcg7VTyxHOfnxw7ulfjqHOOGvfqntpiEUGtwNmgVi1CgLDiQzTCEgVFkrs+qPauf2JG3Z753z8kePVHBJyRvmQNKtfcx+DwdlP7+Td14AZB/xWorvn7aOWrZ2qlTTx+y0R24jU9WxAgiu7JS5z4fw1CpghLRlQmaYaUSHXJvZv2ubomXSxNDj7ILYVzgygWIfXWnYr21MaCln6Hq1KEcO2jMaWjv+mOjvEffXw8nztnmlw2s6i/NyDCDPQtWURp6CqTyZKRCEuwlCRxJneufTyl9C6ssyvwKOnP/bFJ2XFuBeVF16H22rOm5ZKW3a+oS66vmx4vD0pGjvL0U7dPEudmtjDBs8i412Fs2SKGQlgqFRUStTWoIOoPRsMtWI3DVztAdCy7L6Z+6LbaYaddlew7pD15jwbGKNdMnUATI6QrMfmp7zebj1kSpl7eqpsHvpvLl0BwZJx7nE+EAqI6JhBl4O69x+AHK3rAlPoBeNPOVEOlJRAaoYgRRYvoZAkmWxYR61mkJG/+53hDP58+yief2JQnrltD1ei6x2JK5yUe1ip00B6/I5tJv2UIizD5pHmuNLHzFSNasQgXEPi54mFGa1v+RS/2gmbOAvT4ghghL6G+iXc9PyZkWH6ZiNzXrBuMmkSwlpkqSVpKiscliZkozxz4chQW/07DXJP+5l5j/GdfKkQW3ygnl3/B00xc5KHyQ3+dz1POzHHTNLlhBgrWQUDUiwlEGRuE3dPLB1U06gNqcmZcyMXor/De4jHnlkCIWbUYvgqriMkxGeM9cnLdY1FQOhoG3snBBwuRq+5UvQRoPTsKhe0b85Q9ZeSJm5wbVqCuC6K8nDftCFiqtJ0mCAghxg2GC4gykH/4fQWMty4Echzdqp6Bi7Mj90yfHQkMQswjBIjeiMqYJktMYXIUYxLr+5CSWP0dFZRGLtOZI24Qz3QdtJ/eo2kjBw0ibubINHOazk3VMEWaY6qU/CtLcIEgfvMNwsscoQGIMpBvrYoATvUDl7rL5zuEWgr0Lnx++TDiZm7fGwiEc2ZtFAypOzKDiTgRRSYhkyR14YCsXvMlBZTA60MitwT6nq8YheEhC4KwBnvEJAK168w6LBD1rMDZZzyAcLgsFc6OFSe8CXPK7e1nvkFYPUzMrDWyArawikREtYJ2lMUlFDCQSWr3AglXPqQoHWKnv88rcwr0PX9uFM4cMUUuxbYG0nTudEtWBtYork00unxZhNd5gg8QzeoXKEYUQUynwQWIJFdZXLgoJkkxlIogSGJAEsOrbpeUD98mebIOcbjkl1u59uoTJmCOa4bJiZtmnhmcuFKMDdV5pjpW4Gy8ZxBeIRRHODXB2ovC690T0CKKIMR2Sm0qwiQyLauIRxQrXlguSpEtEKo4rC7FES9ZypQ51zDoXYSgdCLEO6x8E+hp0keOgHLyJa6/8Z+kFbLWuoRmSJzQ4JZb0gyeswL0dJAur0eEAcLLsma1Bs8LEKUDLPbikOWeJEJJUyQBI6oqDLVpGOJNyMgIldJrjHWTsCaWy0i6poOCjItsLCErQhAwmM5FfokMpIrY4AGCp2DtxxLKjv98sAgnCHvNWhYhVGWMuGUZqCosyotWgcQZMBnFtFtjZP2tuIQiJCSNMwJTJ2EJeVayCK1oCTkFyV4Q8mMNDUF4GR3V8yXnjUVYI4DSBgIBQY9hwoYR4YyRwjokFZFkpnGTRSQF0RBuSuz8UEEFzcpyWJeEROJ9qjKjgqmTygyeN5FEcLYgGEikFFfl/EJoCiKoYzcwjfe2dpjfWbQdIxZOnTsZ++UjV1uHr+2r6YmhEgirsaUtNUwvWkZMJtRIYTEpgihmmZKCUUZYMDjWTKdlVgKhkwAApkZiwpYzC0QtWEKZszi+teH5C2DobwGOPOtvXbkeKIPO4L2DJ4NyrH7OBnEJgN6z7+E5FYKbnqFzgLDPQdiWgRJhXI5gQUAxOIr/g7AQYRVVF4mD4yajPORB9HoyNAuAsIRItSWIZz3GBruYzivWRy4Y+HIXPHs/wKn94YDIq2/ifcU8URiXDUK8E2n+G0NfGzn90tfLr1r2A8K2Cmvvqx6zVvBQJ0RhETKhOMErPguLsE7zlo705kulkbAKYQ0ChuWKxObjHEQDuiOncvpv2tKRnPVbMXj0Bmui2PKF4h1UXQf9vAisWZk2CPF3ia5PRV/9x4+c1rPvWlNvLyCqz87Ze2DFAZNYLA7CVVmfozFAnaM4nC0AOSsmer/o5YJJpAqAxUxsKPNpBbb86BU3Ri4e+Ksu2L8F4OV/baYPb7+TchY/F947X0WhZYUQkeijH9D1NB/e+8DYmYM/LgQB4TwlVPwcQ+tgvF7cKV6EUtleoWPR88W3zv5qAQjgiqxnYqXTpB+8MQWjxwCevTscl2SAAWP0P7h5sHz61hu9xndV9kwiobO51oFmfcqYfPe4TpQrJ6bcRKGmT8uosyxkDVt1x31h1LyuDBXUVK+kJi8UuS60gvPQ98JxSWJkN0P+NX5m91TYTagNnOItkwA9ACA2E9d/KUp1TfQpCbLjDdYivMya/C9yuSpEvHtjdBjg2G6A4dKrH1rVnLCEXOoN/NOdE62Kcu3QYQqlbWuTkDk3BxTTW9rVC5sgFQxbrkhbZ3rfwc3by1OfINVq9EzTnRNBCqSn18ThbL4TkEeBuAJiyGr5pyDSWnwmSJmKYgLpOkRiU5BMZnBd+wDYrftf5H4s7DrfhR4AAAAASUVORK5CYII="},55303:function(yt){"use strict";yt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAFIpJREFUeF7VnHt0HNV9x3/33pnZl6SVJXltyw9kGyMjBztgNwk05diFHmJIk7QElYQmYBxIUx9oCOSc0D8a9eQP2rTp6Ukf5NGWJqchB7vlD5pwTpwmuAnBGGJjbPzCdg0SRpK1eqz2OXNn7u25Mzs7M7szOyN5ZZT5w5K1d+7M/dzffO/v97u/WQS/wccAH2rLlUudhJAOpKO4zoHJTKkgrE1vS70/uw8NGotteGix3VDY/QzxIfydfL5LQtIyGkNxmcq+p2CNGIYOl9b3wKUDaEgP6/dKff4bA3wrf1DOQk+PXjQyTEGShVkGoEGorBZIAyYxnI116eMn0ZB2pcAGXWfRA+/lQ0mlUsmoxOiSgSDBt2bTAdbtalGbEASEA7DpnpIxfrh3qPRegV+UwDnnaC38ZVpTS8s4xm1uOAI2pQKpv5T4wXbOt86REJnFenz8XPfDs1ca/KICvp0PSW+D1k01I2MgXXHDM0HXrDtcShqlxpkge9IULJclWRs/1f74FEKIXwn4iwJ4Hx+Ka1DOANBuThH2WKlbQgQRU7Pnat117c0nxD5kYIxTjvilvhOl7IEdC7vAvmfAhWysh690aMAyBrAOc/i1BbARaNRF0tuPA7XGtw6226oRR4wTyKIp+dK5DQ+rC2HxVxz4XXwv+QW80g0AGQw85gZh/e6F7RUC96TU46i2bPBaGnpoOrH2hGFCphO8e/zY8s8WWwn+igG/mn8zVoK3MkChh8tCNlyHB1IjcFO75+CR1C+S9ZMavOA2ShYBXIxRMn5szRdmWqHzCw78av5QRwWkjAE4HWgpAVJSWyjnBdv7tJjT2ESyHCnyXx8UXVE1DS59Zv2fZIcQYvO1+gUBLqLBb4HaDVDJIMDxpjcXsAh6hCAkuAnTbceV9NF0+08RF2OscgNJeKJ9Fb50GH0+8M6CxtxS4AN8SMlBKQOg9TAgJJIV1A3U6/5VrdR3WC5LDJGksAU5kufjuoa4MuKEc86mlkN87MDaXZVIYxXnRW3YrJ1IIuXV4jIds85Aj62+gyi6HSF09w/taz6NGSRZ0xbgSkax7DrYnngAAAhFOd7RMXYyM1gI4zlv4MKtWwV/3sVM/5kkwy7U8LnPQD3WHajbdZ5MmHWH6XbESW0IvHwMiBGpmAQYe63vvlzQAjtn4EKfvwfaUgraMgN4UAQSzr+ZlMzR6mwbdl/U1u1WW3fDtXzcUMyhwhJo7NTKzzZEsHMCvpI/3g2grmKApHCiTVo0te5mYXs0Tfcukk1sIsz7qcmRNRZLSnz6CzAQBFiVSuTi8c33TNs0IgNfwR+9CgB6Lgu0fdcBemoOpum6HxTcNMqMT7jjvfUoklUHvCGl0ETOahejAHGITb628e63hcxEAt7Hv9ipAlnfGtheOA1hTpgL2CSStHtunk2cXz4m2LLrJtsDyTEgrMgTJ9cPDkcC3ssf7eEAwsLnfzTxt2uPapj7V3tC6tXa9f9armSeXkndPQQ+KWGLcf0ahVHxeP+nT0cCfhe/i/wS1vQjgMS8iAfcnAdJRD31Xt8n79J0wRXWHaTp/nLlOJjeSfVbqD335roO4kTtbMfnD64eLEcCLjrayr8tj8L5dRwMz4ZApAlo4pGYj78cpN0uCLZfZl7QJ9/i0Vs/qOIajgftO3G+1l3XV5huu8aKOONxLI19vP/uMTsdEBm4uEHhe/fBI8s1CitAJtHObSIlNSsJ0+0GKWmE4GuJbqqtWCQ99xEuWYizd08NfGbUfRuh0ATkeiu+Hf5BeUMdWYVirDPYwiN4FE00uzacMIuqQWjm/oUsbPYgqvrvPAfR0gc1BnXGhZl88eSmwbGmwKuAlwFAFwiPpkXhfyTpaVEjMe5hmoP99DQ8WToCJTu+b+jfaxQ+K4JzRrNF0vyMawCK4r5EKHDOuVgU1wJAYqQwrb6dm9YuieoOsdZoavOnwdlKcCZc07znxKzEoU9ToPVt7V48Q4g2I104gTd0ZOQ1bW2xLC3BY7n9cIh6nmzvOtCg3dF0W2g0wiSrsdx4u7G0u8zZisjAOecietw0Q4vwxK9+Mfm9068E1HCkAFKNA+dSHdxqEy7RKnQn3cKJ/be6fux+VfF5sENU+yTEZ/pQ11rp7zbe2rkstUT+aPZpOE+zrgs2Sl5UjwRznUnAJ+QcGz+8zUrRXn/6h71zBb4OANIfefY/xl7PjdQqlbhaDzIAuGjnOxELCDyCwXe1daADv7N76QjkyGB2H1B7799l1bYD1Bw4AMFYZ1i5tOzC+Yn6zeb+0z/sRS4LF30ZQRrOORfP+qZnh89O7/nZf+bd42gEDgCpRrJmu4jARTte8bFyz/lJgIbJdu5sLgHBvf0fin2t/+auB7I/hhfosNWJy430XSRdbTg2vffxT6793ETQbo9t4c7kyWAw8F80OeciR3LV7p8+N/r8Oyc8inbZwIU8mCBdGdwq2AboCwQ8gWV05qOPLP+X0hH4q9yhhnxNkGUjQKqRTI59esWbU0NoqOm2mltS7P6aARdiv2L5t/72HRSjnoKYKwrcNmB7gppYuN00qqUf3rkn8ys6Qh7LvlB7TILCdgKkDJiNvbFq93TUjWMBXK9JitVzM+C9FGD5mqeeGKmXxdYBt3uuWnqQrIhmcwAumkeBfnDnnqVH6Zj0Z9n9ZpzqjTktQIyxYjuD0cPrP5+LsDx4mjiSUo2a5SsB3GOh1n94TVLmAVyc0iIrdwMX3bqtG2FplhXZ2JmNuz3r11ygOxbueD8GCdbwy7ZwC66zcHJVttxBty6L34sA9W5hqqrvLMC1dA+8HIGCn8XbwB/L7q/1oCMyk1QSY60o9rGAkxXufH7rgAuKdR6J44enYHWM4xWdK7EYuIG9buUFqrKp/Ky1TqQAWNWC13d04TRucwIlF7VT46OsHJM5lJ0q4yjg3XNz1CUpEpenukh+7ODqL821m8Dp9gMeJ3DxVb/QnnMeaOHuKzh6XqVtexumZafMOfjHm29L375yY3szQ3ynWNS+dPD53OuVd4xd/b8Ve6jvgx0pWQ4sqygBZY++/OPpn2cvUDf4udASwEd5wfiUcuTsOXR7pLrBG1/amyi00bh7iyxoXCZwjXgizRYCr142larJSFKV0Y5118j/dvPHMxGeepihReOZkTeK96++ocNMz4Ycpwrj6t2/3DtTMXQu7Bwxy5uKCv3ELXt6MqlUHiF0Iexa2y88FR9VyQrEWRdmaOLkpnurznvwmX7A5yUp/hbuBZ5KpSAhyeiBjZuTX7zuw0vCBjSfz4WVb9//3axqGNwNvZXAB07sVRgu9gKgbntVxWo48J1nn4+NVEr9iDOP5SgSeffwwJ2N6dm5S4oDPCnJiEsy6iYS2n3dDYkvbNi2UMD57/38+5NUV5kNvcxkDlCKZOXNLHw7f0GaunhxOS1rGY6wJ+EWBlxMEjGgHwBcaTbL8SRENhI5eubgTYM1uzA7nx/wFIiFUlh33OBYicXx7ms3xx96301NcuTzsW3rHAqUf+zAD6byOmY5VuCVqqULaYli5X7AhzjHz5z6zjKUUJYxA/msITJgVQ+UlK2//rZM5XQ/R9gvAVp1PpGmaKtOH962zYzgLxu4sPBERxp1KnF817oNiUcGbgyukp0/bxP4H7y4b6aMwcgLKy8K6DovzwO4yPlvOPdUDyHGCsSaLCBUBsz8gW9/4QVpIjNxDTb84i5bWazwilO19Mkb/uiMyMPMH7i5YMoomZbRkhjDaXkJ/tg16+KPrLeAf/fc65Xj+Xe5hDEiCHke011rrpcHOpfWasS/f+ENejz/LgPZ9VRSDQzO+eeuukG0JRSAD770TK6CuZEvzLI8xaxi5OcMfPPw0zM6La/ktZcBmm+VBQG/7tgPlgDIIsPqc3hjWcS52jW15PSBHTv0ywJuWrcko1gsjpfGEbl19UD8y9d+0Hx9JEcpLwLllHqzguJWlibTyD3MHC3BDPXmcOxR9FbbCuD3HNw3W6EVY1LX2KyuMk3DrMyqPn3I0/Prj+zpeZ1O4Icn/4eE14k7dxcEXFxuy9G9KxmG5d5Le63bMKiR6Vx6+sDaHWaFbUuApxOYtCud+NbVa2vAT85MGCNawXTdMBIT6wziA50Zkpad7OGxXJaPa4W6bBwFqgH8dqYPp2VZvJ/J7zny3GxFV43JwqwFXMKsXNDNhTPsqEWao07yyvflrIZ9yWANF9K05di+Po7kLic7YydbrSoBhcO5w9sGa7mZ1gLP9Ma//P6bTQv/1/PH1BOFUW7KiawA0XXzp6FTdP/qLdK16Z6azPz7W0eNs+ok0ygAkWQuSIvtJiJJfNeaTdJAypKU+w79Vz5HVaOsCR2fYdOGIVI1bO7Am204ez9rZuFinKK49dljAxs4gjZnAi3tRpyPHNvyh5fcxtAy4CmeJLes36B8ZcEWzVYBfzH4YagrpbB2bYIt3O5ILKBTXdMbOdKr3ooMksSyrw3c+Xb9xVoGXEjKTT3LY1+9Ybu5aJYo5TVddhsNpUjosvtGcpTCDC3V8vCyLPxr6+iVk+biKiz8/iPPzU6XCsyycJVNGwVeKei8PofvR9SRlADgLilxL3kGkydObhoMjTRF8DOsVjZipkuIQ+H1zXe96ZdLXzDg3zh5qPyWkWOMYiSKBwxKkRJTgAFG9/b2K1s6e2teypMXjtD/y2eZUZUTXZY4qNYe9q61W+XrOzOSreGleuCGzu0wv5mONwXuU6xk20hU4OLaAyf2tskUX7VkS/eZA2iH7zdYtBT4B3ozytfe97tm4DNBS+ySpjHk9lLMUciwQUkRd/4kS0v8YrHIZRksy3Zt8vWlOklSlk0LF4tm64E3ltnV7UtGsnB7ssVC2myXqKXAt3RnlK9vtYC3+vAAF8FPoSopl2PhATWPllnUtsnmBDxs3C0Gnla+vnXnggGveSmBwINfNTq4c5e5xfbYqEvDm0iJ7XEYDBYhcMCkPd2J+9vSyjdvWnjgRV1j+bzGcpLKRHjvaPgcgIdZd1XWDLJYgEMKRFgvIs30FQAu6gMfOPKT2RzRjKII7XWN5agN3PFqgh5py8InpcdE4NPUsi1BsdeR9xS4ezB2HuWKAj/xk9lSqchmtLIhgFOxXWda+FyBe4MbbzDubAKL8S4u4CKXknYsfH2yXf7nD9+xYPnw+1/5UUHVNSMIuFkhEHC8/IkHe0wLHxahvbcixVN5VVfYaWgwcXJbuB8etljan89p0Wyw8CpwK3mVJOk4kf5p2x2dS5NWsNLK4+jMhPE3bx0q5nRHUmwLj7IDYQIvCUnxBj4e9D716osKuNjp6Uk72cKkkiBrEt3yHX3rYjLCIo2CMIjUrAwi66zrlgUKH3xzeilKgiyyinCqNCGyirX5Eb9JEnChoww4n+Uq++n429pUKW+IXIq5aLo0fL7AfYVlMVu42PFJSp1oSZzhdHoJTsYSpB2w1NGmEFniJEaSGLBhklfMxJWOzIy3LMO6VBe6b+UA+fu3XjWmNLUWymtV8AZnXOTDxU8dY6NSKbE8BaNkFNi0Vjaojq3Q3tD5fIB7M9Ze3XaeTBkMjS4eSbGAOzs+3XEgCSVBYnKMtMsKQVjCiThCSDdwLWNoArc2GnpiMTRetL4PwMwSVg+NakCqwHXGuMoMljMoE/pd0jVWKGhs1nQJrQ1lE3hIvdvLt3klxaviQd80tMiAi0IU9yZEexyRNimNOxUgmEg4QSRs7fhgxJD4KSSluqsTA5CotQEiDpE5wa4cisFlrsuM67zCixWDM0NnJYMyW07Uos4ryvyAu0N38+I+2m0trBQWkYZbxT+iHoWnrV17RYnjdkXBkqTglGRgLMlYRhgJ6OI9E1kTwGNgYAt0rArfqcqxElZCj1RVBZ3LnMqM00qZU2ZwAVtIib2JjA2Zm3v2c7Rwy7qDZMQ2ARk4MmhPNv/mgR3Rvw8lzFG4DC/FAi6qsey6lFiM4TjuQLJi4A7chhimSMEYyZggoeTmMLEFXRzMtHjnwNySFRWsKaCmf10BAVtjBhewxU9RJiFAm3IS8bAl5XHbSwl5jZBTg/Z0db9pb41FvExoMxt4YH14UA9W2ZtVY2gGQULPUymIGQwzIqE4kVAikQBGNKRUYTMsIfGqBTPrDa0XrMS/jV+nUzH/hpnCK1AGEdiIv6hM59hQTNg16w4dotXg5dseXPpqaZL8hQm82Yu4FCQdymoMzp3cNNjy76q1gQe+AdEcuPP6iZAWAV9EnpxoKAlJENWwTJWQWNCSyWStcDNGnJdqjWqwQmIyF79romjTNQvlqmRgRVg1mKDFPUUr/7HuXkz+yZ0PLXs6exq+kT0SALxavGPIkxvO0pF9gwvzVdg2cOsdn7PHp/e8+KNINdKews5aUaeMxOs/TtlyChLErp61JsAEYMqK41ZwjQq/kbt/io9LZQCsON7LXCC7DeWPr9oce+K6W5b86fCL8GJp1HeRFFVSFOjwiU2DUxEfmnk1q2ko53w9Bej4xPP7Ro+Mnwv9ovPmlbT2vYhFta5m3JXQi4t3M5NJKEEJxBNhWa71NpC9Dy/CdRSTOcfVnzPUfGKiLJSivy7Sjv731k/1jFGdDA5Xa8PrvBJJIllcyr5rvwI4L5IRT3IDF8/UwLSm8a++9LOpfReONi3pbQDuMDZ/q31eqyN3Km3tP5m5j6QzA0zTEFYULn6638FyxmK1reVMQnzvGztXkb++/tbOVakl8uD5/XC+5H2ThEh4lpRiFw9v+/3wOouIQMOaebwEzrkYkXgTOT5cmKqcmZnRJqaLRnV9C+vL//OYeIu5/l1PVyleDECv+9xTqFf9j65hJCkKr2/rd9GueAL3JTrlq9u6YiWg8PjoIThUyppSYhAwMFMme9rSE632QKIAasiucc5F4sl+114MNzADF+UC71WbUVqC/blheDJ7HPJMrwBIeWIk83ded0fucr5Z83LH0xRm9YsOFg3wfQDov8f3x0fYZAJUSSrrREK6JiGZSFQHwiQwFGroZUwoJxLlpTJVtP6CXbl6ubBacf7/A7kxJfsyNujOAAAAAElFTkSuQmCC"},22214:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return z}});var c=y(58289),_=y(75538),I=y(85458);function z(S,R,w){return R=(0,c.Z)(R),(0,I.Z)(S,(0,_.Z)()?Reflect.construct(R,w||[],(0,c.Z)(S).constructor):R.apply(S,w))}},19251:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=y(3208);function _(I,z){var S=typeof Symbol!="undefined"&&I[Symbol.iterator]||I["@@iterator"];if(!S){if(Array.isArray(I)||(S=(0,c.Z)(I))||z&&I&&typeof I.length=="number"){S&&(I=S);var R=0,w=function(){};return{s:w,n:function(){return R>=I.length?{done:!0}:{done:!1,value:I[R++]}},e:function(F){throw F},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N,D=!0,A=!1;return{s:function(){S=S.call(I)},n:function(){var F=S.next();return D=F.done,F},e:function(F){A=!0,N=F},f:function(){try{D||S.return==null||S.return()}finally{if(A)throw N}}}}},43793:function(yt,Et,y){"use strict";y.d(Et,{Sc:function(){return we},y3:function(){return A}});var c=y(3522);const _=c.XA,I=c.a_,z=c.yQ,S=c.Hs,R=c.Ec,w=c.dx,N=c.LU,D=c.Rm,A=c.y3,L=c.qK,F=c.pb,it=c.j,G=c.sO,kt=c.BZ,gt=c.EK,Q=c.Db,Rt=c.Fx,Ct=c.tU,Ht=c.Ym,de=c.rs,ue=c.QR,Te=c.TB,be=c.oH,we=c.Sc,re=c.BN,Ge=c.it,rn=c.$r,Xe=c.QM,En=c.AV;var Pn=(c.y3,c.y3);const tn=c.GH,xn=c.SO,It=c.uZ,Ee=c.yU,fn=c.F1,on=c.re},96262:function(yt,Et,y){"use strict";y.d(Et,{Ud:function(){return G},Yy:function(){return I}});const c=Symbol("Comlink.proxy"),_=Symbol("Comlink.endpoint"),I=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.finalizer"),S=Symbol("Comlink.thrown"),R=tn=>typeof tn=="object"&&tn!==null||typeof tn=="function",w={canHandle:tn=>R(tn)&&tn[c],serialize(tn){const{port1:xn,port2:It}=new MessageChannel;return L(tn,xn),[It,[It]]},deserialize(tn){return tn.start(),G(tn)}},N={canHandle:tn=>R(tn)&&S in tn,serialize({value:tn}){let xn;return tn instanceof Error?xn={isError:!0,value:{message:tn.message,name:tn.name,stack:tn.stack}}:xn={isError:!1,value:tn},[xn,[]]},deserialize(tn){throw tn.isError?Object.assign(new Error(tn.value.message),tn.value):tn.value}},D=new Map([["proxy",w],["throw",N]]);function A(tn,xn){for(const It of tn)if(xn===It||It==="*"||It instanceof RegExp&&It.test(xn))return!0;return!1}function L(tn,xn=globalThis,It=["*"]){xn.addEventListener("message",function Ee(fn){if(!fn||!fn.data)return;if(!A(It,fn.origin)){console.warn(`Invalid origin '${fn.origin}' for comlink proxy`);return}const{id:on,type:Pe,path:Ze}=Object.assign({path:[]},fn.data),Ke=(fn.data.argumentList||[]).map(Xe);let le;try{const Ae=Ze.slice(0,-1).reduce((wt,he)=>wt[he],tn),Pt=Ze.reduce((wt,he)=>wt[he],tn);switch(Pe){case"GET":le=Pt;break;case"SET":Ae[Ze.slice(-1)[0]]=Xe(fn.data.value),le=!0;break;case"APPLY":le=Pt.apply(Ae,Ke);break;case"CONSTRUCT":{const wt=new Pt(...Ke);le=re(wt)}break;case"ENDPOINT":{const{port1:wt,port2:he}=new MessageChannel;L(tn,he),le=we(wt,[wt])}break;case"RELEASE":le=void 0;break;default:return}}catch(Ae){le={value:Ae,[S]:0}}Promise.resolve(le).catch(Ae=>({value:Ae,[S]:0})).then(Ae=>{const[Pt,wt]=rn(Ae);xn.postMessage(Object.assign(Object.assign({},Pt),{id:on}),wt),Pe==="RELEASE"&&(xn.removeEventListener("message",Ee),it(xn),z in tn&&typeof tn[z]=="function"&&tn[z]())}).catch(Ae=>{const[Pt,wt]=rn({value:new TypeError("Unserializable return value"),[S]:0});xn.postMessage(Object.assign(Object.assign({},Pt),{id:on}),wt)})}),xn.start&&xn.start()}function F(tn){return tn.constructor.name==="MessagePort"}function it(tn){F(tn)&&tn.close()}function G(tn,xn){const It=new Map;return tn.addEventListener("message",function(fn){const{data:on}=fn;if(!on||!on.id)return;const Pe=It.get(on.id);if(Pe)try{Pe(on)}finally{It.delete(on.id)}}),de(tn,It,[],xn)}function kt(tn){if(tn)throw new Error("Proxy has been released and is not useable")}function gt(tn){return En(tn,new Map,{type:"RELEASE"}).then(()=>{it(tn)})}const Q=new WeakMap,Rt="FinalizationRegistry"in globalThis&&new FinalizationRegistry(tn=>{const xn=(Q.get(tn)||0)-1;Q.set(tn,xn),xn===0&>(tn)});function Ct(tn,xn){const It=(Q.get(xn)||0)+1;Q.set(xn,It),Rt&&Rt.register(tn,xn,tn)}function Ht(tn){Rt&&Rt.unregister(tn)}function de(tn,xn,It=[],Ee=function(){}){let fn=!1;const on=new Proxy(Ee,{get(Pe,Ze){if(kt(fn),Ze===I)return()=>{Ht(on),gt(tn),xn.clear(),fn=!0};if(Ze==="then"){if(It.length===0)return{then:()=>on};const Ke=En(tn,xn,{type:"GET",path:It.map(le=>le.toString())}).then(Xe);return Ke.then.bind(Ke)}return de(tn,xn,[...It,Ze])},set(Pe,Ze,Ke){kt(fn);const[le,Ae]=rn(Ke);return En(tn,xn,{type:"SET",path:[...It,Ze].map(Pt=>Pt.toString()),value:le},Ae).then(Xe)},apply(Pe,Ze,Ke){kt(fn);const le=It[It.length-1];if(le===_)return En(tn,xn,{type:"ENDPOINT"}).then(Xe);if(le==="bind")return de(tn,xn,It.slice(0,-1));const[Ae,Pt]=Te(Ke);return En(tn,xn,{type:"APPLY",path:It.map(wt=>wt.toString()),argumentList:Ae},Pt).then(Xe)},construct(Pe,Ze){kt(fn);const[Ke,le]=Te(Ze);return En(tn,xn,{type:"CONSTRUCT",path:It.map(Ae=>Ae.toString()),argumentList:Ke},le).then(Xe)}});return Ct(on,tn),on}function ue(tn){return Array.prototype.concat.apply([],tn)}function Te(tn){const xn=tn.map(rn);return[xn.map(It=>It[0]),ue(xn.map(It=>It[1]))]}const be=new WeakMap;function we(tn,xn){return be.set(tn,xn),tn}function re(tn){return Object.assign(tn,{[c]:!0})}function Ge(tn,xn=globalThis,It="*"){return{postMessage:(Ee,fn)=>tn.postMessage(Ee,It,fn),addEventListener:xn.addEventListener.bind(xn),removeEventListener:xn.removeEventListener.bind(xn)}}function rn(tn){for(const[xn,It]of D)if(It.canHandle(tn)){const[Ee,fn]=It.serialize(tn);return[{type:"HANDLER",name:xn,value:Ee},fn]}return[{type:"RAW",value:tn},be.get(tn)||[]]}function Xe(tn){switch(tn.type){case"HANDLER":return D.get(tn.name).deserialize(tn.value);case"RAW":return tn.value}}function En(tn,xn,It,Ee){return new Promise(fn=>{const on=Pn();xn.set(on,fn),tn.start&&tn.start(),tn.postMessage(Object.assign({id:on},It),Ee)})}function Pn(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}},32575:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_,I){var z,S=1;_==null&&(_=0),I==null&&(I=0);function R(){var w,N=z.length,D,A=0,L=0;for(w=0;w<N;++w)D=z[w],A+=D.x,L+=D.y;for(A=(A/N-_)*S,L=(L/N-I)*S,w=0;w<N;++w)D=z[w],D.x-=A,D.y-=L}return R.initialize=function(w){z=w},R.x=function(w){return arguments.length?(_=+w,R):_},R.y=function(w){return arguments.length?(I=+w,R):I},R.strength=function(w){return arguments.length?(S=+w,R):S},R}},33039:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return R}});var c=y(14301),_=y(91592),I=y(12068);function z(w){return w.x+w.vx}function S(w){return w.y+w.vy}function R(w){var N,D,A,L=1,F=1;typeof w!="function"&&(w=(0,_.Z)(w==null?1:+w));function it(){for(var gt,Q=N.length,Rt,Ct,Ht,de,ue,Te,be=0;be<F;++be)for(Rt=(0,c.Z)(N,z,S).visitAfter(G),gt=0;gt<Q;++gt)Ct=N[gt],ue=D[Ct.index],Te=ue*ue,Ht=Ct.x+Ct.vx,de=Ct.y+Ct.vy,Rt.visit(we);function we(re,Ge,rn,Xe,En){var Pn=re.data,tn=re.r,xn=ue+tn;if(Pn){if(Pn.index>Ct.index){var It=Ht-Pn.x-Pn.vx,Ee=de-Pn.y-Pn.vy,fn=It*It+Ee*Ee;fn<xn*xn&&(It===0&&(It=(0,I.Z)(A),fn+=It*It),Ee===0&&(Ee=(0,I.Z)(A),fn+=Ee*Ee),fn=(xn-(fn=Math.sqrt(fn)))/fn*L,Ct.vx+=(It*=fn)*(xn=(tn*=tn)/(Te+tn)),Ct.vy+=(Ee*=fn)*xn,Pn.vx-=It*(xn=1-xn),Pn.vy-=Ee*xn)}return}return Ge>Ht+xn||Xe<Ht-xn||rn>de+xn||En<de-xn}}function G(gt){if(gt.data)return gt.r=D[gt.data.index];for(var Q=gt.r=0;Q<4;++Q)gt[Q]&>[Q].r>gt.r&&(gt.r=gt[Q].r)}function kt(){if(N){var gt,Q=N.length,Rt;for(D=new Array(Q),gt=0;gt<Q;++gt)Rt=N[gt],D[Rt.index]=+w(Rt,gt,N)}}return it.initialize=function(gt,Q){N=gt,A=Q,kt()},it.iterations=function(gt){return arguments.length?(F=+gt,it):F},it.strength=function(gt){return arguments.length?(L=+gt,it):L},it.radius=function(gt){return arguments.length?(w=typeof gt=="function"?gt:(0,_.Z)(+gt),kt(),it):w},it}},91592:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return function(){return _}}},12068:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return(_()-.5)*1e-6}},42398:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return z}});const c=1664525,_=1013904223,I=4294967296;function z(){let S=1;return()=>(S=(c*S+_)%I)/I}},31136:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return S}});var c=y(91592),_=y(12068);function I(R){return R.index}function z(R,w){var N=R.get(w);if(!N)throw new Error("node not found: "+w);return N}function S(R){var w=I,N=Q,D,A=(0,c.Z)(30),L,F,it,G,kt,gt=1;R==null&&(R=[]);function Q(ue){return 1/Math.min(it[ue.source.index],it[ue.target.index])}function Rt(ue){for(var Te=0,be=R.length;Te<gt;++Te)for(var we=0,re,Ge,rn,Xe,En,Pn,tn;we<be;++we)re=R[we],Ge=re.source,rn=re.target,Xe=rn.x+rn.vx-Ge.x-Ge.vx||(0,_.Z)(kt),En=rn.y+rn.vy-Ge.y-Ge.vy||(0,_.Z)(kt),Pn=Math.sqrt(Xe*Xe+En*En),Pn=(Pn-L[we])/Pn*ue*D[we],Xe*=Pn,En*=Pn,rn.vx-=Xe*(tn=G[we]),rn.vy-=En*tn,Ge.vx+=Xe*(tn=1-tn),Ge.vy+=En*tn}function Ct(){if(F){var ue,Te=F.length,be=R.length,we=new Map(F.map((Ge,rn)=>[w(Ge,rn,F),Ge])),re;for(ue=0,it=new Array(Te);ue<be;++ue)re=R[ue],re.index=ue,typeof re.source!="object"&&(re.source=z(we,re.source)),typeof re.target!="object"&&(re.target=z(we,re.target)),it[re.source.index]=(it[re.source.index]||0)+1,it[re.target.index]=(it[re.target.index]||0)+1;for(ue=0,G=new Array(be);ue<be;++ue)re=R[ue],G[ue]=it[re.source.index]/(it[re.source.index]+it[re.target.index]);D=new Array(be),Ht(),L=new Array(be),de()}}function Ht(){if(F)for(var ue=0,Te=R.length;ue<Te;++ue)D[ue]=+N(R[ue],ue,R)}function de(){if(F)for(var ue=0,Te=R.length;ue<Te;++ue)L[ue]=+A(R[ue],ue,R)}return Rt.initialize=function(ue,Te){F=ue,kt=Te,Ct()},Rt.links=function(ue){return arguments.length?(R=ue,Ct(),Rt):R},Rt.id=function(ue){return arguments.length?(w=ue,Rt):w},Rt.iterations=function(ue){return arguments.length?(gt=+ue,Rt):gt},Rt.strength=function(ue){return arguments.length?(N=typeof ue=="function"?ue:(0,c.Z)(+ue),Ht(),Rt):N},Rt.distance=function(ue){return arguments.length?(A=typeof ue=="function"?ue:(0,c.Z)(+ue),de(),Rt):A},Rt}},84365:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return S}});var c=y(14301),_=y(91592),I=y(12068),z=y(74515);function S(){var R,w,N,D,A=(0,_.Z)(-30),L,F=1,it=1/0,G=.81;function kt(Ct){var Ht,de=R.length,ue=(0,c.Z)(R,z.x,z.y).visitAfter(Q);for(D=Ct,Ht=0;Ht<de;++Ht)w=R[Ht],ue.visit(Rt)}function gt(){if(R){var Ct,Ht=R.length,de;for(L=new Array(Ht),Ct=0;Ct<Ht;++Ct)de=R[Ct],L[de.index]=+A(de,Ct,R)}}function Q(Ct){var Ht=0,de,ue,Te=0,be,we,re;if(Ct.length){for(be=we=re=0;re<4;++re)(de=Ct[re])&&(ue=Math.abs(de.value))&&(Ht+=de.value,Te+=ue,be+=ue*de.x,we+=ue*de.y);Ct.x=be/Te,Ct.y=we/Te}else{de=Ct,de.x=de.data.x,de.y=de.data.y;do Ht+=L[de.data.index];while(de=de.next)}Ct.value=Ht}function Rt(Ct,Ht,de,ue){if(!Ct.value)return!0;var Te=Ct.x-w.x,be=Ct.y-w.y,we=ue-Ht,re=Te*Te+be*be;if(we*we/G<re)return re<it&&(Te===0&&(Te=(0,I.Z)(N),re+=Te*Te),be===0&&(be=(0,I.Z)(N),re+=be*be),re<F&&(re=Math.sqrt(F*re)),w.vx+=Te*Ct.value*D/re,w.vy+=be*Ct.value*D/re),!0;if(Ct.length||re>=it)return;(Ct.data!==w||Ct.next)&&(Te===0&&(Te=(0,I.Z)(N),re+=Te*Te),be===0&&(be=(0,I.Z)(N),re+=be*be),re<F&&(re=Math.sqrt(F*re)));do Ct.data!==w&&(we=L[Ct.data.index]*D/re,w.vx+=Te*we,w.vy+=be*we);while(Ct=Ct.next)}return kt.initialize=function(Ct,Ht){R=Ct,N=Ht,gt()},kt.strength=function(Ct){return arguments.length?(A=typeof Ct=="function"?Ct:(0,_.Z)(+Ct),gt(),kt):A},kt.distanceMin=function(Ct){return arguments.length?(F=Ct*Ct,kt):Math.sqrt(F)},kt.distanceMax=function(Ct){return arguments.length?(it=Ct*Ct,kt):Math.sqrt(it)},kt.theta=function(Ct){return arguments.length?(G=Ct*Ct,kt):Math.sqrt(G)},kt}},54774:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=y(91592);function _(I,z,S){var R,w=(0,c.Z)(.1),N,D;typeof I!="function"&&(I=(0,c.Z)(+I)),z==null&&(z=0),S==null&&(S=0);function A(F){for(var it=0,G=R.length;it<G;++it){var kt=R[it],gt=kt.x-z||1e-6,Q=kt.y-S||1e-6,Rt=Math.sqrt(gt*gt+Q*Q),Ct=(D[it]-Rt)*N[it]*F/Rt;kt.vx+=gt*Ct,kt.vy+=Q*Ct}}function L(){if(R){var F,it=R.length;for(N=new Array(it),D=new Array(it),F=0;F<it;++F)D[F]=+I(R[F],F,R),N[F]=isNaN(D[F])?0:+w(R[F],F,R)}}return A.initialize=function(F){R=F,L()},A.strength=function(F){return arguments.length?(w=typeof F=="function"?F:(0,c.Z)(+F),L(),A):w},A.radius=function(F){return arguments.length?(I=typeof F=="function"?F:(0,c.Z)(+F),L(),A):I},A.x=function(F){return arguments.length?(z=+F,A):z},A.y=function(F){return arguments.length?(S=+F,A):S},A}},74515:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return N},x:function(){return z},y:function(){return S}});var c=y(64703),_=y(83833),I=y(42398);function z(D){return D.x}function S(D){return D.y}var R=10,w=Math.PI*(3-Math.sqrt(5));function N(D){var A,L=1,F=.001,it=1-Math.pow(F,1/300),G=0,kt=.6,gt=new Map,Q=(0,_.HT)(Ht),Rt=(0,c.Z)("tick","end"),Ct=(0,I.Z)();D==null&&(D=[]);function Ht(){de(),Rt.call("tick",A),L<F&&(Q.stop(),Rt.call("end",A))}function de(be){var we,re=D.length,Ge;be===void 0&&(be=1);for(var rn=0;rn<be;++rn)for(L+=(G-L)*it,gt.forEach(function(Xe){Xe(L)}),we=0;we<re;++we)Ge=D[we],Ge.fx==null?Ge.x+=Ge.vx*=kt:(Ge.x=Ge.fx,Ge.vx=0),Ge.fy==null?Ge.y+=Ge.vy*=kt:(Ge.y=Ge.fy,Ge.vy=0);return A}function ue(){for(var be=0,we=D.length,re;be<we;++be){if(re=D[be],re.index=be,re.fx!=null&&(re.x=re.fx),re.fy!=null&&(re.y=re.fy),isNaN(re.x)||isNaN(re.y)){var Ge=R*Math.sqrt(.5+be),rn=be*w;re.x=Ge*Math.cos(rn),re.y=Ge*Math.sin(rn)}(isNaN(re.vx)||isNaN(re.vy))&&(re.vx=re.vy=0)}}function Te(be){return be.initialize&&be.initialize(D,Ct),be}return ue(),A={tick:de,restart:function(){return Q.restart(Ht),A},stop:function(){return Q.stop(),A},nodes:function(be){return arguments.length?(D=be,ue(),gt.forEach(Te),A):D},alpha:function(be){return arguments.length?(L=+be,A):L},alphaMin:function(be){return arguments.length?(F=+be,A):F},alphaDecay:function(be){return arguments.length?(it=+be,A):+it},alphaTarget:function(be){return arguments.length?(G=+be,A):G},velocityDecay:function(be){return arguments.length?(kt=1-be,A):1-kt},randomSource:function(be){return arguments.length?(Ct=be,gt.forEach(Te),A):Ct},force:function(be,we){return arguments.length>1?(we==null?gt.delete(be):gt.set(be,Te(we)),A):gt.get(be)},find:function(be,we,re){var Ge=0,rn=D.length,Xe,En,Pn,tn,xn;for(re==null?re=1/0:re*=re,Ge=0;Ge<rn;++Ge)tn=D[Ge],Xe=be-tn.x,En=we-tn.y,Pn=Xe*Xe+En*En,Pn<re&&(xn=tn,re=Pn);return xn},on:function(be,we){return arguments.length>1?(Rt.on(be,we),A):Rt.on(be)}}}},34123:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=y(91592);function _(I){var z=(0,c.Z)(.1),S,R,w;typeof I!="function"&&(I=(0,c.Z)(I==null?0:+I));function N(A){for(var L=0,F=S.length,it;L<F;++L)it=S[L],it.vx+=(w[L]-it.x)*R[L]*A}function D(){if(S){var A,L=S.length;for(R=new Array(L),w=new Array(L),A=0;A<L;++A)R[A]=isNaN(w[A]=+I(S[A],A,S))?0:+z(S[A],A,S)}}return N.initialize=function(A){S=A,D()},N.strength=function(A){return arguments.length?(z=typeof A=="function"?A:(0,c.Z)(+A),D(),N):z},N.x=function(A){return arguments.length?(I=typeof A=="function"?A:(0,c.Z)(+A),D(),N):I},N}},97468:function(yt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=y(91592);function _(I){var z=(0,c.Z)(.1),S,R,w;typeof I!="function"&&(I=(0,c.Z)(I==null?0:+I));function N(A){for(var L=0,F=S.length,it;L<F;++L)it=S[L],it.vy+=(w[L]-it.y)*R[L]*A}function D(){if(S){var A,L=S.length;for(R=new Array(L),w=new Array(L),A=0;A<L;++A)R[A]=isNaN(w[A]=+I(S[A],A,S))?0:+z(S[A],A,S)}}return N.initialize=function(A){S=A,D()},N.strength=function(A){return arguments.length?(z=typeof A=="function"?A:(0,c.Z)(+A),D(),N):z},N.y=function(A){return arguments.length?(I=typeof A=="function"?A:(0,c.Z)(+A),D(),N):I},N}},80813:function(yt,Et,y){"use strict";y.d(Et,{CR:function(){return Q},Jh:function(){return it},Q_:function(){return En},XA:function(){return gt},ZT:function(){return _},_T:function(){return z},ev:function(){return Ht},mG:function(){return F},pi:function(){return I},pr:function(){return Ct}});var c=function(Pe,Ze){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ke,le){Ke.__proto__=le}||function(Ke,le){for(var Ae in le)Object.prototype.hasOwnProperty.call(le,Ae)&&(Ke[Ae]=le[Ae])},c(Pe,Ze)};function _(Pe,Ze){if(typeof Ze!="function"&&Ze!==null)throw new TypeError("Class extends value "+String(Ze)+" is not a constructor or null");c(Pe,Ze);function Ke(){this.constructor=Pe}Pe.prototype=Ze===null?Object.create(Ze):(Ke.prototype=Ze.prototype,new Ke)}var I=function(){return I=Object.assign||function(Ze){for(var Ke,le=1,Ae=arguments.length;le<Ae;le++){Ke=arguments[le];for(var Pt in Ke)Object.prototype.hasOwnProperty.call(Ke,Pt)&&(Ze[Pt]=Ke[Pt])}return Ze},I.apply(this,arguments)};function z(Pe,Ze){var Ke={};for(var le in Pe)Object.prototype.hasOwnProperty.call(Pe,le)&&Ze.indexOf(le)<0&&(Ke[le]=Pe[le]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,le=Object.getOwnPropertySymbols(Pe);Ae<le.length;Ae++)Ze.indexOf(le[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Pe,le[Ae])&&(Ke[le[Ae]]=Pe[le[Ae]]);return Ke}function S(Pe,Ze,Ke,le){var Ae=arguments.length,Pt=Ae<3?Ze:le===null?le=Object.getOwnPropertyDescriptor(Ze,Ke):le,wt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Pt=Reflect.decorate(Pe,Ze,Ke,le);else for(var he=Pe.length-1;he>=0;he--)(wt=Pe[he])&&(Pt=(Ae<3?wt(Pt):Ae>3?wt(Ze,Ke,Pt):wt(Ze,Ke))||Pt);return Ae>3&&Pt&&Object.defineProperty(Ze,Ke,Pt),Pt}function R(Pe,Ze){return function(Ke,le){Ze(Ke,le,Pe)}}function w(Pe,Ze,Ke,le,Ae,Pt){function wt(at){if(at!==void 0&&typeof at!="function")throw new TypeError("Function expected");return at}for(var he=le.kind,je=he==="getter"?"get":he==="setter"?"set":"value",Re=!Ze&&Pe?le.static?Pe:Pe.prototype:null,ce=Ze||(Re?Object.getOwnPropertyDescriptor(Re,le.name):{}),Le,xe=!1,_t=Ke.length-1;_t>=0;_t--){var ie={};for(var Me in le)ie[Me]=Me==="access"?{}:le[Me];for(var Me in le.access)ie.access[Me]=le.access[Me];ie.addInitializer=function(at){if(xe)throw new TypeError("Cannot add initializers after decoration has completed");Pt.push(wt(at||null))};var T=(0,Ke[_t])(he==="accessor"?{get:ce.get,set:ce.set}:ce[je],ie);if(he==="accessor"){if(T===void 0)continue;if(T===null||typeof T!="object")throw new TypeError("Object expected");(Le=wt(T.get))&&(ce.get=Le),(Le=wt(T.set))&&(ce.set=Le),(Le=wt(T.init))&&Ae.unshift(Le)}else(Le=wt(T))&&(he==="field"?Ae.unshift(Le):ce[je]=Le)}Re&&Object.defineProperty(Re,le.name,ce),xe=!0}function N(Pe,Ze,Ke){for(var le=arguments.length>2,Ae=0;Ae<Ze.length;Ae++)Ke=le?Ze[Ae].call(Pe,Ke):Ze[Ae].call(Pe);return le?Ke:void 0}function D(Pe){return typeof Pe=="symbol"?Pe:"".concat(Pe)}function A(Pe,Ze,Ke){return typeof Ze=="symbol"&&(Ze=Ze.description?"[".concat(Ze.description,"]"):""),Object.defineProperty(Pe,"name",{configurable:!0,value:Ke?"".concat(Ke," ",Ze):Ze})}function L(Pe,Ze){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(Pe,Ze)}function F(Pe,Ze,Ke,le){function Ae(Pt){return Pt instanceof Ke?Pt:new Ke(function(wt){wt(Pt)})}return new(Ke||(Ke=Promise))(function(Pt,wt){function he(ce){try{Re(le.next(ce))}catch(Le){wt(Le)}}function je(ce){try{Re(le.throw(ce))}catch(Le){wt(Le)}}function Re(ce){ce.done?Pt(ce.value):Ae(ce.value).then(he,je)}Re((le=le.apply(Pe,Ze||[])).next())})}function it(Pe,Ze){var Ke={label:0,sent:function(){if(Pt[0]&1)throw Pt[1];return Pt[1]},trys:[],ops:[]},le,Ae,Pt,wt=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return wt.next=he(0),wt.throw=he(1),wt.return=he(2),typeof Symbol=="function"&&(wt[Symbol.iterator]=function(){return this}),wt;function he(Re){return function(ce){return je([Re,ce])}}function je(Re){if(le)throw new TypeError("Generator is already executing.");for(;wt&&(wt=0,Re[0]&&(Ke=0)),Ke;)try{if(le=1,Ae&&(Pt=Re[0]&2?Ae.return:Re[0]?Ae.throw||((Pt=Ae.return)&&Pt.call(Ae),0):Ae.next)&&!(Pt=Pt.call(Ae,Re[1])).done)return Pt;switch(Ae=0,Pt&&(Re=[Re[0]&2,Pt.value]),Re[0]){case 0:case 1:Pt=Re;break;case 4:return Ke.label++,{value:Re[1],done:!1};case 5:Ke.label++,Ae=Re[1],Re=[0];continue;case 7:Re=Ke.ops.pop(),Ke.trys.pop();continue;default:if(Pt=Ke.trys,!(Pt=Pt.length>0&&Pt[Pt.length-1])&&(Re[0]===6||Re[0]===2)){Ke=0;continue}if(Re[0]===3&&(!Pt||Re[1]>Pt[0]&&Re[1]<Pt[3])){Ke.label=Re[1];break}if(Re[0]===6&&Ke.label<Pt[1]){Ke.label=Pt[1],Pt=Re;break}if(Pt&&Ke.label<Pt[2]){Ke.label=Pt[2],Ke.ops.push(Re);break}Pt[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Re=Ze.call(Pe,Ke)}catch(ce){Re=[6,ce],Ae=0}finally{le=Pt=0}if(Re[0]&5)throw Re[1];return{value:Re[0]?Re[1]:void 0,done:!0}}}var G=Object.create?function(Pe,Ze,Ke,le){le===void 0&&(le=Ke);var Ae=Object.getOwnPropertyDescriptor(Ze,Ke);(!Ae||("get"in Ae?!Ze.__esModule:Ae.writable||Ae.configurable))&&(Ae={enumerable:!0,get:function(){return Ze[Ke]}}),Object.defineProperty(Pe,le,Ae)}:function(Pe,Ze,Ke,le){le===void 0&&(le=Ke),Pe[le]=Ze[Ke]};function kt(Pe,Ze){for(var Ke in Pe)Ke!=="default"&&!Object.prototype.hasOwnProperty.call(Ze,Ke)&&G(Ze,Pe,Ke)}function gt(Pe){var Ze=typeof Symbol=="function"&&Symbol.iterator,Ke=Ze&&Pe[Ze],le=0;if(Ke)return Ke.call(Pe);if(Pe&&typeof Pe.length=="number")return{next:function(){return Pe&&le>=Pe.length&&(Pe=void 0),{value:Pe&&Pe[le++],done:!Pe}}};throw new TypeError(Ze?"Object is not iterable.":"Symbol.iterator is not defined.")}function Q(Pe,Ze){var Ke=typeof Symbol=="function"&&Pe[Symbol.iterator];if(!Ke)return Pe;var le=Ke.call(Pe),Ae,Pt=[],wt;try{for(;(Ze===void 0||Ze-- >0)&&!(Ae=le.next()).done;)Pt.push(Ae.value)}catch(he){wt={error:he}}finally{try{Ae&&!Ae.done&&(Ke=le.return)&&Ke.call(le)}finally{if(wt)throw wt.error}}return Pt}function Rt(){for(var Pe=[],Ze=0;Ze<arguments.length;Ze++)Pe=Pe.concat(Q(arguments[Ze]));return Pe}function Ct(){for(var Pe=0,Ze=0,Ke=arguments.length;Ze<Ke;Ze++)Pe+=arguments[Ze].length;for(var le=Array(Pe),Ae=0,Ze=0;Ze<Ke;Ze++)for(var Pt=arguments[Ze],wt=0,he=Pt.length;wt<he;wt++,Ae++)le[Ae]=Pt[wt];return le}function Ht(Pe,Ze,Ke){if(Ke||arguments.length===2)for(var le=0,Ae=Ze.length,Pt;le<Ae;le++)(Pt||!(le in Ze))&&(Pt||(Pt=Array.prototype.slice.call(Ze,0,le)),Pt[le]=Ze[le]);return Pe.concat(Pt||Array.prototype.slice.call(Ze))}function de(Pe){return this instanceof de?(this.v=Pe,this):new de(Pe)}function ue(Pe,Ze,Ke){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var le=Ke.apply(Pe,Ze||[]),Ae,Pt=[];return Ae=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),he("next"),he("throw"),he("return",wt),Ae[Symbol.asyncIterator]=function(){return this},Ae;function wt(_t){return function(ie){return Promise.resolve(ie).then(_t,Le)}}function he(_t,ie){le[_t]&&(Ae[_t]=function(Me){return new Promise(function(T,at){Pt.push([_t,Me,T,at])>1||je(_t,Me)})},ie&&(Ae[_t]=ie(Ae[_t])))}function je(_t,ie){try{Re(le[_t](ie))}catch(Me){xe(Pt[0][3],Me)}}function Re(_t){_t.value instanceof de?Promise.resolve(_t.value.v).then(ce,Le):xe(Pt[0][2],_t)}function ce(_t){je("next",_t)}function Le(_t){je("throw",_t)}function xe(_t,ie){_t(ie),Pt.shift(),Pt.length&&je(Pt[0][0],Pt[0][1])}}function Te(Pe){var Ze,Ke;return Ze={},le("next"),le("throw",function(Ae){throw Ae}),le("return"),Ze[Symbol.iterator]=function(){return this},Ze;function le(Ae,Pt){Ze[Ae]=Pe[Ae]?function(wt){return(Ke=!Ke)?{value:de(Pe[Ae](wt)),done:!1}:Pt?Pt(wt):wt}:Pt}}function be(Pe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Ze=Pe[Symbol.asyncIterator],Ke;return Ze?Ze.call(Pe):(Pe=typeof gt=="function"?gt(Pe):Pe[Symbol.iterator](),Ke={},le("next"),le("throw"),le("return"),Ke[Symbol.asyncIterator]=function(){return this},Ke);function le(Pt){Ke[Pt]=Pe[Pt]&&function(wt){return new Promise(function(he,je){wt=Pe[Pt](wt),Ae(he,je,wt.done,wt.value)})}}function Ae(Pt,wt,he,je){Promise.resolve(je).then(function(Re){Pt({value:Re,done:he})},wt)}}function we(Pe,Ze){return Object.defineProperty?Object.defineProperty(Pe,"raw",{value:Ze}):Pe.raw=Ze,Pe}var re=Object.create?function(Pe,Ze){Object.defineProperty(Pe,"default",{enumerable:!0,value:Ze})}:function(Pe,Ze){Pe.default=Ze},Ge=function(Pe){return Ge=Object.getOwnPropertyNames||function(Ze){var Ke=[];for(var le in Ze)Object.prototype.hasOwnProperty.call(Ze,le)&&(Ke[Ke.length]=le);return Ke},Ge(Pe)};function rn(Pe){if(Pe&&Pe.__esModule)return Pe;var Ze={};if(Pe!=null)for(var Ke=Ge(Pe),le=0;le<Ke.length;le++)Ke[le]!=="default"&&G(Ze,Pe,Ke[le]);return re(Ze,Pe),Ze}function Xe(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function En(Pe,Ze,Ke,le){if(Ke==="a"&&!le)throw new TypeError("Private accessor was defined without a getter");if(typeof Ze=="function"?Pe!==Ze||!le:!Ze.has(Pe))throw new TypeError("Cannot read private member from an object whose class did not declare it");return Ke==="m"?le:Ke==="a"?le.call(Pe):le?le.value:Ze.get(Pe)}function Pn(Pe,Ze,Ke,le,Ae){if(le==="m")throw new TypeError("Private method is not writable");if(le==="a"&&!Ae)throw new TypeError("Private accessor was defined without a setter");if(typeof Ze=="function"?Pe!==Ze||!Ae:!Ze.has(Pe))throw new TypeError("Cannot write private member to an object whose class did not declare it");return le==="a"?Ae.call(Pe,Ke):Ae?Ae.value=Ke:Ze.set(Pe,Ke),Ke}function tn(Pe,Ze){if(Ze===null||typeof Ze!="object"&&typeof Ze!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof Pe=="function"?Ze===Pe:Pe.has(Ze)}function xn(Pe,Ze,Ke){if(Ze!=null){if(typeof Ze!="object"&&typeof Ze!="function")throw new TypeError("Object expected.");var le,Ae;if(Ke){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");le=Ze[Symbol.asyncDispose]}if(le===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");le=Ze[Symbol.dispose],Ke&&(Ae=le)}if(typeof le!="function")throw new TypeError("Object not disposable.");Ae&&(le=function(){try{Ae.call(this)}catch(Pt){return Promise.reject(Pt)}}),Pe.stack.push({value:Ze,dispose:le,async:Ke})}else Ke&&Pe.stack.push({async:!0});return Ze}var It=typeof SuppressedError=="function"?SuppressedError:function(Pe,Ze,Ke){var le=new Error(Ke);return le.name="SuppressedError",le.error=Pe,le.suppressed=Ze,le};function Ee(Pe){function Ze(Pt){Pe.error=Pe.hasError?new It(Pt,Pe.error,"An error was suppressed during disposal."):Pt,Pe.hasError=!0}var Ke,le=0;function Ae(){for(;Ke=Pe.stack.pop();)try{if(!Ke.async&&le===1)return le=0,Pe.stack.push(Ke),Promise.resolve().then(Ae);if(Ke.dispose){var Pt=Ke.dispose.call(Ke.value);if(Ke.async)return le|=2,Promise.resolve(Pt).then(Ae,function(wt){return Ze(wt),Ae()})}else le|=1}catch(wt){Ze(wt)}if(le===1)return Pe.hasError?Promise.reject(Pe.error):Promise.resolve();if(Pe.hasError)throw Pe.error}return Ae()}function fn(Pe,Ze){return typeof Pe=="string"&&/^\.\.?\//.test(Pe)?Pe.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(Ke,le,Ae,Pt,wt){return le?Ze?".jsx":".js":Ae&&(!Pt||!wt)?Ke:Ae+Pt+"."+wt.toLowerCase()+"js"}):Pe}var on={__extends:_,__assign:I,__rest:z,__decorate:S,__param:R,__esDecorate:w,__runInitializers:N,__propKey:D,__setFunctionName:A,__metadata:L,__awaiter:F,__generator:it,__createBinding:G,__exportStar:kt,__values:gt,__read:Q,__spread:Rt,__spreadArrays:Ct,__spreadArray:Ht,__await:de,__asyncGenerator:ue,__asyncDelegator:Te,__asyncValues:be,__makeTemplateObject:we,__importStar:rn,__importDefault:Xe,__classPrivateFieldGet:En,__classPrivateFieldSet:Pn,__classPrivateFieldIn:tn,__addDisposableResource:xn,__disposeResources:Ee,__rewriteRelativeImportExtension:fn}}}]);
|
|
|
}()); |