@vitest/browser 0.25.3 → 0.25.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,7 @@ b`.split(/\n/).length!=3?function(e){for(var i=0,l=[],s=e.length;i<=s;){var c=e.
27
27
  `)>-1?l.value=e.prevInput="":e.prevInput=c,e.composing&&(e.composing.range.clear(),e.composing.range=i.markText(e.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Te.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Te.prototype.onKeyPress=function(){p&&g>=9&&(this.hasSelection=null),this.fastPoll()},Te.prototype.onContextMenu=function(e){var i=this,l=i.cm,s=l.display,c=i.textarea;i.contextMenuPending&&i.contextMenuPending();var d=xi(l,e),v=s.scroller.scrollTop;if(!d||M)return;var y=l.options.resetSelectionOnContextMenu;y&&l.doc.sel.contains(d)==-1&&$e(l,Ve)(l.doc,Vr(d),P);var w=c.style.cssText,_=i.wrapper.style.cssText,N=i.wrapper.offsetParent.getBoundingClientRect();i.wrapper.style.cssText="position: static",c.style.cssText=`position: absolute; width: 30px; height: 30px;
28
28
  top: `+(e.clientY-N.top-5)+"px; left: "+(e.clientX-N.left-5)+`px;
29
29
  z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`;
30
- outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var O;m&&(O=c.ownerDocument.defaultView.scrollY),s.input.focus(),m&&c.ownerDocument.defaultView.scrollTo(null,O),s.input.reset(),l.somethingSelected()||(c.value=i.prevInput=" "),i.contextMenuPending=q,s.selForContextMenu=l.doc.sel,clearTimeout(s.detectingSelectAll);function B(){if(c.selectionStart!=null){var rt=l.somethingSelected(),ct="\u200B"+(rt?c.value:"");c.value="\u21DA",c.value=ct,i.prevInput=rt?"":"\u200B",c.selectionStart=1,c.selectionEnd=ct.length,s.selForContextMenu=l.doc.sel}}function q(){if(i.contextMenuPending==q&&(i.contextMenuPending=!1,i.wrapper.style.cssText=_,c.style.cssText=w,p&&g<9&&s.scrollbars.setScrollTop(s.scroller.scrollTop=v),c.selectionStart!=null)){(!p||p&&g<9)&&B();var rt=0,ct=function(){s.selForContextMenu==l.doc.sel&&c.selectionStart==0&&c.selectionEnd>0&&i.prevInput=="\u200B"?$e(l,Rd)(l):rt++<10?s.detectingSelectAll=setTimeout(ct,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(ct,200)}}if(p&&g>=9&&B(),vt){vr(e);var X=function(){je(window,"mouseup",X),setTimeout(q,20)};bt(window,"mouseup",X)}else setTimeout(q,50)},Te.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Te.prototype.setUneditable=function(){},Te.prototype.needsContentAttribute=!1;function Kw(e,i){if(i=i?tt(i):{},i.value=e.value,!i.tabindex&&e.tabIndex&&(i.tabindex=e.tabIndex),!i.placeholder&&e.placeholder&&(i.placeholder=e.placeholder),i.autofocus==null){var l=wt(e.ownerDocument);i.autofocus=l==e||e.getAttribute("autofocus")!=null&&l==document.body}function s(){e.value=y.getValue()}var c;if(e.form&&(bt(e.form,"submit",s),!i.leaveSubmitMethodAlone)){var d=e.form;c=d.submit;try{var v=d.submit=function(){s(),d.submit=c,d.submit(),d.submit=v}}catch{}}i.finishInit=function(w){w.save=s,w.getTextArea=function(){return e},w.toTextArea=function(){w.toTextArea=isNaN,s(),e.parentNode.removeChild(w.getWrapperElement()),e.style.display="",e.form&&(je(e.form,"submit",s),!i.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=c))}},e.style.display="none";var y=we(function(w){return e.parentNode.insertBefore(w,e.nextSibling)},i);return y}function Xw(e){e.off=je,e.on=bt,e.wheelEventPixels=nw,e.Doc=sn,e.splitLines=es,e.countColumn=V,e.findColumn=nt,e.isWordChar=Ot,e.Pass=Lt,e.signal=ve,e.Line=no,e.changeEnd=Kr,e.scrollbarModel=hd,e.Pos=R,e.cmpPos=K,e.modes=Fn,e.mimeModes=Hr,e.resolveMode=yn,e.getMode=mr,e.modeExtensions=Br,e.extendMode=_l,e.copyState=yr,e.startState=ns,e.innerMode=Wr,e.commands=Cs,e.keyMap=kr,e.keyName=Jd,e.isModifierKey=Yd,e.lookupKey=vo,e.normalizeKeyMap=kw,e.StringStream=ke,e.SharedTextMarker=_s,e.TextMarker=Yr,e.LineWidget=xs,e.e_preventDefault=Ge,e.e_stopPropagation=yi,e.e_stop=vr,e.addClass=Et,e.contains=et,e.rmClass=ft,e.keyNames=Zr}qw(we),Uw(we);var Yw="iter insert remove copy getEditor constructor".split(" ");for(var Jl in sn.prototype)sn.prototype.hasOwnProperty(Jl)&&Ct(Yw,Jl)<0&&(we.prototype[Jl]=function(e){return function(){return e.apply(this.doc,arguments)}}(sn.prototype[Jl]));return Ze(sn),we.inputStyles={textarea:Te,contenteditable:ae},we.defineMode=function(e){!we.defaults.mode&&e!="null"&&(we.defaults.mode=e),xl.apply(this,arguments)},we.defineMIME=to,we.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),we.defineMIME("text/plain","null"),we.defineExtension=function(e,i){we.prototype[e]=i},we.defineDocExtension=function(e,i){sn.prototype[e]=i},we.fromTextArea=Kw,Xw(we),we.version="5.65.9",we})}(Lu)),Lu.exports}var qst=Yo(),Hst={exports:{}};(function(t,n){(function(r){r(Yo())})(function(r){r.defineMode("javascript",function(o,a){var u=o.indentUnit,f=a.statementIndent,h=a.jsonld,p=a.json||h,g=a.trackScope!==!1,m=a.typescript,b=a.wordCharacters||/[\w$\xa1-\uffff]/,x=function(){function T(Ne){return{type:Ne,style:"keyword"}}var $=T("keyword a"),R=T("keyword b"),K=T("keyword c"),It=T("keyword d"),Vt=T("operator"),ee={type:"atom",style:"atom"};return{if:T("if"),while:$,with:$,else:R,do:R,try:R,finally:R,return:It,break:It,continue:It,new:T("new"),delete:K,void:K,throw:K,debugger:T("debugger"),var:T("var"),const:T("var"),let:T("var"),function:T("function"),catch:T("catch"),for:T("for"),switch:T("switch"),case:T("case"),default:T("default"),in:Vt,typeof:Vt,instanceof:Vt,true:ee,false:ee,null:ee,undefined:ee,NaN:ee,Infinity:ee,this:T("this"),class:T("class"),super:T("atom"),yield:K,export:T("export"),import:T("import"),extends:K,await:K}}(),S=/[+\-*&%=<>!?|~^@]/,M=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function A(T){for(var $=!1,R,K=!1;(R=T.next())!=null;){if(!$){if(R=="/"&&!K)return;R=="["?K=!0:K&&R=="]"&&(K=!1)}$=!$&&R=="\\"}}var L,C;function E(T,$,R){return L=T,C=R,$}function z(T,$){var R=T.next();if(R=='"'||R=="'")return $.tokenize=D(R),$.tokenize(T,$);if(R=="."&&T.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(R=="."&&T.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(R))return E(R);if(R=="="&&T.eat(">"))return E("=>","operator");if(R=="0"&&T.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(R))return T.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(R=="/")return T.eat("*")?($.tokenize=G,G(T,$)):T.eat("/")?(T.skipToEnd(),E("comment","comment")):Qn(T,$,1)?(A(T),T.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(T.eat("="),E("operator","operator",T.current()));if(R=="`")return $.tokenize=j,j(T,$);if(R=="#"&&T.peek()=="!")return T.skipToEnd(),E("meta","meta");if(R=="#"&&T.eatWhile(b))return E("variable","property");if(R=="<"&&T.match("!--")||R=="-"&&T.match("->")&&!/\S/.test(T.string.slice(0,T.start)))return T.skipToEnd(),E("comment","comment");if(S.test(R))return(R!=">"||!$.lexical||$.lexical.type!=">")&&(T.eat("=")?(R=="!"||R=="=")&&T.eat("="):/[<>*+\-|&?]/.test(R)&&(T.eat(R),R==">"&&T.eat(R))),R=="?"&&T.eat(".")?E("."):E("operator","operator",T.current());if(b.test(R)){T.eatWhile(b);var K=T.current();if($.lastType!="."){if(x.propertyIsEnumerable(K)){var It=x[K];return E(It.type,It.style,K)}if(K=="async"&&T.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",K)}return E("variable","variable",K)}}function D(T){return function($,R){var K=!1,It;if(h&&$.peek()=="@"&&$.match(M))return R.tokenize=z,E("jsonld-keyword","meta");for(;(It=$.next())!=null&&!(It==T&&!K);)K=!K&&It=="\\";return K||(R.tokenize=z),E("string","string")}}function G(T,$){for(var R=!1,K;K=T.next();){if(K=="/"&&R){$.tokenize=z;break}R=K=="*"}return E("comment","comment")}function j(T,$){for(var R=!1,K;(K=T.next())!=null;){if(!R&&(K=="`"||K=="$"&&T.eat("{"))){$.tokenize=z;break}R=!R&&K=="\\"}return E("quasi","string-2",T.current())}var it="([{}])";function Q(T,$){$.fatArrowAt&&($.fatArrowAt=null);var R=T.string.indexOf("=>",T.start);if(!(R<0)){if(m){var K=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(T.string.slice(T.start,R));K&&(R=K.index)}for(var It=0,Vt=!1,ee=R-1;ee>=0;--ee){var Ne=T.string.charAt(ee),En=it.indexOf(Ne);if(En>=0&&En<3){if(!It){++ee;break}if(--It==0){Ne=="("&&(Vt=!0);break}}else if(En>=3&&En<6)++It;else if(b.test(Ne))Vt=!0;else if(/["'\/`]/.test(Ne))for(;;--ee){if(ee==0)return;var Ft=T.string.charAt(ee-1);if(Ft==Ne&&T.string.charAt(ee-2)!="\\"){ee--;break}}else if(Vt&&!It){++ee;break}}Vt&&!It&&($.fatArrowAt=ee)}}var dt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function vt(T,$,R,K,It,Vt){this.indented=T,this.column=$,this.type=R,this.prev=It,this.info=Vt,K!=null&&(this.align=K)}function kt(T,$){if(!g)return!1;for(var R=T.localVars;R;R=R.next)if(R.name==$)return!0;for(var K=T.context;K;K=K.prev)for(var R=K.vars;R;R=R.next)if(R.name==$)return!0}function ft(T,$,R,K,It){var Vt=T.cc;for(U.state=T,U.stream=It,U.marked=null,U.cc=Vt,U.style=$,T.lexical.hasOwnProperty("align")||(T.lexical.align=!0);;){var ee=Vt.length?Vt.pop():p?Lt:Ct;if(ee(R,K)){for(;Vt.length&&Vt[Vt.length-1].lex;)Vt.pop()();return U.marked?U.marked:R=="variable"&&kt(T,K)?"variable-2":$}}}var U={state:null,column:null,marked:null,cc:null};function I(){for(var T=arguments.length-1;T>=0;T--)U.cc.push(arguments[T])}function k(){return I.apply(null,arguments),!0}function H(T,$){for(var R=$;R;R=R.next)if(R.name==T)return!0;return!1}function W(T){var $=U.state;if(U.marked="def",!!g){if($.context){if($.lexical.info=="var"&&$.context&&$.context.block){var R=et(T,$.context);if(R!=null){$.context=R;return}}else if(!H(T,$.localVars)){$.localVars=new qt(T,$.localVars);return}}a.globalVars&&!H(T,$.globalVars)&&($.globalVars=new qt(T,$.globalVars))}}function et(T,$){if($)if($.block){var R=et(T,$.prev);return R?R==$.prev?$:new Et(R,$.vars,!0):null}else return H(T,$.vars)?$:new Et($.prev,new qt(T,$.vars),!1);else return null}function wt(T){return T=="public"||T=="private"||T=="protected"||T=="abstract"||T=="readonly"}function Et(T,$,R){this.prev=T,this.vars=$,this.block=R}function qt(T,$){this.name=T,this.next=$}var Bt=new qt("this",new qt("arguments",null));function Gt(){U.state.context=new Et(U.state.context,U.state.localVars,!1),U.state.localVars=Bt}function ne(){U.state.context=new Et(U.state.context,U.state.localVars,!0),U.state.localVars=null}Gt.lex=ne.lex=!0;function J(){U.state.localVars=U.state.context.vars,U.state.context=U.state.context.prev}J.lex=!0;function tt(T,$){var R=function(){var K=U.state,It=K.indented;if(K.lexical.type=="stat")It=K.lexical.indented;else for(var Vt=K.lexical;Vt&&Vt.type==")"&&Vt.align;Vt=Vt.prev)It=Vt.indented;K.lexical=new vt(It,U.stream.column(),T,null,K.lexical,$)};return R.lex=!0,R}function V(){var T=U.state;T.lexical.prev&&(T.lexical.type==")"&&(T.indented=T.lexical.indented),T.lexical=T.lexical.prev)}V.lex=!0;function st(T){function $(R){return R==T?k():T==";"||R=="}"||R==")"||R=="]"?I():k($)}return $}function Ct(T,$){return T=="var"?k(tt("vardef",$),vr,st(";"),V):T=="keyword a"?k(tt("form"),F,Ct,V):T=="keyword b"?k(tt("form"),Ct,V):T=="keyword d"?U.stream.match(/^\s*$/,!1)?k():k(tt("stat"),nt,st(";"),V):T=="debugger"?k(st(";")):T=="{"?k(tt("}"),ne,Ln,V,J):T==";"?k():T=="if"?(U.state.lexical.info=="else"&&U.state.cc[U.state.cc.length-1]==V&&U.state.cc.pop()(),k(tt("form"),F,Ct,V,Qi)):T=="function"?k(Zn):T=="for"?k(tt("form"),ne,bl,Ct,J,V):T=="class"||m&&$=="interface"?(U.marked="keyword",k(tt("form",T=="class"?T:$),xl,V)):T=="variable"?m&&$=="declare"?(U.marked="keyword",k(Ct)):m&&($=="module"||$=="enum"||$=="type")&&U.stream.match(/^\s*\w/,!1)?(U.marked="keyword",$=="enum"?k(eo):$=="type"?k(wl,st("operator"),bt,st(";")):k(tt("form"),rn,st("{"),tt("}"),Ln,V,V)):m&&$=="namespace"?(U.marked="keyword",k(tt("form"),Lt,Ct,V)):m&&$=="abstract"?(U.marked="keyword",k(Ct)):k(tt("stat"),zt):T=="switch"?k(tt("form"),F,st("{"),tt("}","switch"),ne,Ln,V,V,J):T=="case"?k(Lt,st(":")):T=="default"?k(st(":")):T=="catch"?k(tt("form"),Gt,de,Ct,V,J):T=="export"?k(tt("stat"),Br,V):T=="import"?k(tt("stat"),yr,V):T=="async"?k(Ct):$=="@"?k(Lt,Ct):I(tt("stat"),Lt,st(";"),V)}function de(T){if(T=="(")return k(Fn,st(")"))}function Lt(T,$){return Y(T,$,!1)}function P(T,$){return Y(T,$,!0)}function F(T){return T!="("?I():k(tt(")"),nt,st(")"),V)}function Y(T,$,R){if(U.state.fatArrowAt==U.stream.start){var K=R?at:xt;if(T=="(")return k(Gt,tt(")"),Xt(Fn,")"),V,st("=>"),K,J);if(T=="variable")return I(Gt,rn,st("=>"),K,J)}var It=R?pt:ot;return dt.hasOwnProperty(T)?k(It):T=="function"?k(Zn,It):T=="class"||m&&$=="interface"?(U.marked="keyword",k(tt("form"),Hr,V)):T=="keyword c"||T=="async"?k(R?P:Lt):T=="("?k(tt(")"),nt,st(")"),V,It):T=="operator"||T=="spread"?k(R?P:Lt):T=="["?k(tt("]"),br,V,It):T=="{"?mn(te,"}",null,It):T=="quasi"?I(lt,It):T=="new"?k($t(R)):k()}function nt(T){return T.match(/[;\}\)\],]/)?I():I(Lt)}function ot(T,$){return T==","?k(nt):pt(T,$,!1)}function pt(T,$,R){var K=R==!1?ot:pt,It=R==!1?Lt:P;if(T=="=>")return k(Gt,R?at:xt,J);if(T=="operator")return/\+\+|--/.test($)||m&&$=="!"?k(K):m&&$=="<"&&U.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(tt(">"),Xt(bt,">"),V,K):$=="?"?k(Lt,st(":"),It):k(It);if(T=="quasi")return I(lt,K);if(T!=";"){if(T=="(")return mn(P,")","call",K);if(T==".")return k(jt,K);if(T=="[")return k(tt("]"),nt,st("]"),V,K);if(m&&$=="as")return U.marked="keyword",k(bt,K);if(T=="regexp")return U.state.lastType=U.marked="operator",U.stream.backUp(U.stream.pos-U.stream.start-1),k(It)}}function lt(T,$){return T!="quasi"?I():$.slice($.length-2)!="${"?k(lt):k(nt,gt)}function gt(T){if(T=="}")return U.marked="string-2",U.state.tokenize=j,k(lt)}function xt(T){return Q(U.stream,U.state),I(T=="{"?Ct:Lt)}function at(T){return Q(U.stream,U.state),I(T=="{"?Ct:P)}function $t(T){return function($){return $=="."?k(T?Ot:Nt):$=="variable"&&m?k(Ge,T?pt:ot):I(T?P:Lt)}}function Nt(T,$){if($=="target")return U.marked="keyword",k(ot)}function Ot(T,$){if($=="target")return U.marked="keyword",k(pt)}function zt(T){return T==":"?k(V,Ct):I(ot,st(";"),V)}function jt(T){if(T=="variable")return U.marked="property",k()}function te(T,$){if(T=="async")return U.marked="property",k(te);if(T=="variable"||U.style=="keyword"){if(U.marked="property",$=="get"||$=="set")return k(Qt);var R;return m&&U.state.fatArrowAt==U.stream.start&&(R=U.stream.match(/^\s*:\s*/,!1))&&(U.state.fatArrowAt=U.stream.pos+R[0].length),k(se)}else{if(T=="number"||T=="string")return U.marked=h?"property":U.style+" property",k(se);if(T=="jsonld-keyword")return k(se);if(m&&wt($))return U.marked="keyword",k(te);if(T=="[")return k(Lt,qe,st("]"),se);if(T=="spread")return k(P,se);if($=="*")return U.marked="keyword",k(te);if(T==":")return I(se)}}function Qt(T){return T!="variable"?I(se):(U.marked="property",k(Zn))}function se(T){if(T==":")return k(P);if(T=="(")return I(Zn)}function Xt(T,$,R){function K(It,Vt){if(R?R.indexOf(It)>-1:It==","){var ee=U.state.lexical;return ee.info=="call"&&(ee.pos=(ee.pos||0)+1),k(function(Ne,En){return Ne==$||En==$?I():I(T)},K)}return It==$||Vt==$?k():R&&R.indexOf(";")>-1?I(T):k(st($))}return function(It,Vt){return It==$||Vt==$?k():I(T,K)}}function mn(T,$,R){for(var K=3;K<arguments.length;K++)U.cc.push(arguments[K]);return k(tt($,R),Xt(T,$),V)}function Ln(T){return T=="}"?k():I(Ct,Ln)}function qe(T,$){if(m){if(T==":")return k(bt);if($=="?")return k(qe)}}function Ji(T,$){if(m&&(T==":"||$=="in"))return k(bt)}function be(T){if(m&&T==":")return U.stream.match(/^\s*\w+\s+is\b/,!1)?k(Lt,nn,bt):k(bt)}function nn(T,$){if($=="is")return U.marked="keyword",k()}function bt(T,$){if($=="keyof"||$=="typeof"||$=="infer"||$=="readonly")return U.marked="keyword",k($=="typeof"?P:bt);if(T=="variable"||$=="void")return U.marked="type",k(Ze);if($=="|"||$=="&")return k(bt);if(T=="string"||T=="number"||T=="atom")return k(Ze);if(T=="[")return k(tt("]"),Xt(bt,"]",","),V,Ze);if(T=="{")return k(tt("}"),je,V,Ze);if(T=="(")return k(Xt(Ye,")"),Jo,Ze);if(T=="<")return k(Xt(bt,">"),bt);if(T=="quasi")return I(Se,Ze)}function Jo(T){if(T=="=>")return k(bt)}function je(T){return T.match(/[\}\)\]]/)?k():T==","||T==";"?k(je):I(ve,je)}function ve(T,$){if(T=="variable"||U.style=="keyword")return U.marked="property",k(ve);if($=="?"||T=="number"||T=="string")return k(ve);if(T==":")return k(bt);if(T=="[")return k(st("variable"),Ji,st("]"),ve);if(T=="(")return I(Jn,ve);if(!T.match(/[;\}\)\],]/))return k()}function Se(T,$){return T!="quasi"?I():$.slice($.length-2)!="${"?k(Se):k(bt,yl)}function yl(T){if(T=="}")return U.marked="string-2",U.state.tokenize=j,k(Se)}function Ye(T,$){return T=="variable"&&U.stream.match(/^\s*[?:]/,!1)||$=="?"?k(Ye):T==":"?k(bt):T=="spread"?k(Ye):I(bt)}function Ze(T,$){if($=="<")return k(tt(">"),Xt(bt,">"),V,Ze);if($=="|"||T=="."||$=="&")return k(bt);if(T=="[")return k(bt,st("]"),Ze);if($=="extends"||$=="implements")return U.marked="keyword",k(bt);if($=="?")return k(bt,st(":"),bt)}function Ge(T,$){if($=="<")return k(tt(">"),Xt(bt,">"),V,Ze)}function yi(){return I(bt,Qo)}function Qo(T,$){if($=="=")return k(bt)}function vr(T,$){return $=="enum"?(U.marked="keyword",k(eo)):I(rn,qe,$n,xc)}function rn(T,$){if(m&&wt($))return U.marked="keyword",k(rn);if(T=="variable")return W($),k();if(T=="spread")return k(rn);if(T=="[")return mn(wc,"]");if(T=="{")return mn(ts,"}")}function ts(T,$){return T=="variable"&&!U.stream.match(/^\s*:/,!1)?(W($),k($n)):(T=="variable"&&(U.marked="property"),T=="spread"?k(rn):T=="}"?I():T=="["?k(Lt,st("]"),st(":"),ts):k(st(":"),rn,$n))}function wc(){return I(rn,$n)}function $n(T,$){if($=="=")return k(P)}function xc(T){if(T==",")return k(vr)}function Qi(T,$){if(T=="keyword b"&&$=="else")return k(tt("form","else"),Ct,V)}function bl(T,$){if($=="await")return k(bl);if(T=="(")return k(tt(")"),es,V)}function es(T){return T=="var"?k(vr,qr):T=="variable"?k(qr):I(qr)}function qr(T,$){return T==")"?k():T==";"?k(qr):$=="in"||$=="of"?(U.marked="keyword",k(Lt,qr)):I(Lt,qr)}function Zn(T,$){if($=="*")return U.marked="keyword",k(Zn);if(T=="variable")return W($),k(Zn);if(T=="(")return k(Gt,tt(")"),Xt(Fn,")"),V,be,Ct,J);if(m&&$=="<")return k(tt(">"),Xt(yi,">"),V,Zn)}function Jn(T,$){if($=="*")return U.marked="keyword",k(Jn);if(T=="variable")return W($),k(Jn);if(T=="(")return k(Gt,tt(")"),Xt(Fn,")"),V,be,J);if(m&&$=="<")return k(tt(">"),Xt(yi,">"),V,Jn)}function wl(T,$){if(T=="keyword"||T=="variable")return U.marked="type",k(wl);if($=="<")return k(tt(">"),Xt(yi,">"),V)}function Fn(T,$){return $=="@"&&k(Lt,Fn),T=="spread"?k(Fn):m&&wt($)?(U.marked="keyword",k(Fn)):m&&T=="this"?k(qe,$n):I(rn,qe,$n)}function Hr(T,$){return T=="variable"?xl(T,$):to(T,$)}function xl(T,$){if(T=="variable")return W($),k(to)}function to(T,$){if($=="<")return k(tt(">"),Xt(yi,">"),V,to);if($=="extends"||$=="implements"||m&&T==",")return $=="implements"&&(U.marked="keyword"),k(m?bt:Lt,to);if(T=="{")return k(tt("}"),yn,V)}function yn(T,$){if(T=="async"||T=="variable"&&($=="static"||$=="get"||$=="set"||m&&wt($))&&U.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return U.marked="keyword",k(yn);if(T=="variable"||U.style=="keyword")return U.marked="property",k(mr,yn);if(T=="number"||T=="string")return k(mr,yn);if(T=="[")return k(Lt,qe,st("]"),mr,yn);if($=="*")return U.marked="keyword",k(yn);if(m&&T=="(")return I(Jn,yn);if(T==";"||T==",")return k(yn);if(T=="}")return k();if($=="@")return k(Lt,yn)}function mr(T,$){if($=="!"||$=="?")return k(mr);if(T==":")return k(bt,$n);if($=="=")return k(P);var R=U.state.lexical.prev,K=R&&R.info=="interface";return I(K?Jn:Zn)}function Br(T,$){return $=="*"?(U.marked="keyword",k(At,st(";"))):$=="default"?(U.marked="keyword",k(Lt,st(";"))):T=="{"?k(Xt(_l,"}"),At,st(";")):I(Ct)}function _l(T,$){if($=="as")return U.marked="keyword",k(st("variable"));if(T=="variable")return I(P,_l)}function yr(T){return T=="string"?k():T=="("?I(Lt):T=="."?I(ot):I(Wr,ns,At)}function Wr(T,$){return T=="{"?mn(Wr,"}"):(T=="variable"&&W($),$=="*"&&(U.marked="keyword"),k(ke))}function ns(T){if(T==",")return k(Wr,ns)}function ke(T,$){if($=="as")return U.marked="keyword",k(Wr)}function At(T,$){if($=="from")return U.marked="keyword",k(Lt)}function br(T){return T=="]"?k():I(Xt(P,"]"))}function eo(){return I(tt("form"),rn,st("{"),tt("}"),Xt(Dn,"}"),V,V)}function Dn(){return I(rn,$n)}function re(T,$){return T.lastType=="operator"||T.lastType==","||S.test($.charAt(0))||/[,.]/.test($.charAt(0))}function Qn(T,$,R){return $.tokenize==z&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test($.lastType)||$.lastType=="quasi"&&/\{\s*$/.test(T.string.slice(0,T.pos-(R||0)))}return{startState:function(T){var $={tokenize:z,lastType:"sof",cc:[],lexical:new vt((T||0)-u,0,"block",!1),localVars:a.localVars,context:a.localVars&&new Et(null,null,!1),indented:T||0};return a.globalVars&&typeof a.globalVars=="object"&&($.globalVars=a.globalVars),$},token:function(T,$){if(T.sol()&&($.lexical.hasOwnProperty("align")||($.lexical.align=!1),$.indented=T.indentation(),Q(T,$)),$.tokenize!=G&&T.eatSpace())return null;var R=$.tokenize(T,$);return L=="comment"?R:($.lastType=L=="operator"&&(C=="++"||C=="--")?"incdec":L,ft($,R,L,C,T))},indent:function(T,$){if(T.tokenize==G||T.tokenize==j)return r.Pass;if(T.tokenize!=z)return 0;var R=$&&$.charAt(0),K=T.lexical,It;if(!/^\s*else\b/.test($))for(var Vt=T.cc.length-1;Vt>=0;--Vt){var ee=T.cc[Vt];if(ee==V)K=K.prev;else if(ee!=Qi&&ee!=J)break}for(;(K.type=="stat"||K.type=="form")&&(R=="}"||(It=T.cc[T.cc.length-1])&&(It==ot||It==pt)&&!/^[,\.=+\-*:?[\(]/.test($));)K=K.prev;f&&K.type==")"&&K.prev.type=="stat"&&(K=K.prev);var Ne=K.type,En=R==Ne;return Ne=="vardef"?K.indented+(T.lastType=="operator"||T.lastType==","?K.info.length+1:0):Ne=="form"&&R=="{"?K.indented:Ne=="form"?K.indented+u:Ne=="stat"?K.indented+(re(T,$)?f||u:0):K.info=="switch"&&!En&&a.doubleIndentSwitch!=!1?K.indented+(/^(?:case|default)\b/.test($)?u:2*u):K.align?K.column+(En?0:1):K.indented+(En?0:u)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:p?null:"/*",blockCommentEnd:p?null:"*/",blockCommentContinue:p?null:" * ",lineComment:p?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:p?"json":"javascript",jsonldMode:h,jsonMode:p,expressionAllowed:Qn,skipExpression:function(T){ft(T,"atom","atom","true",new r.StringStream("",2,null))}}}),r.registerHelper("wordChars","javascript",/[\w$]/),r.defineMIME("text/javascript","javascript"),r.defineMIME("text/ecmascript","javascript"),r.defineMIME("application/javascript","javascript"),r.defineMIME("application/x-javascript","javascript"),r.defineMIME("application/ecmascript","javascript"),r.defineMIME("application/json",{name:"javascript",json:!0}),r.defineMIME("application/x-json",{name:"javascript",json:!0}),r.defineMIME("application/manifest+json",{name:"javascript",json:!0}),r.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),r.defineMIME("text/typescript",{name:"javascript",typescript:!0}),r.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var av={exports:{}},cv;function ly(){return cv||(cv=1,function(t,n){(function(r){r(Yo())})(function(r){var o={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},a={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};r.defineMode("xml",function(u,f){var h=u.indentUnit,p={},g=f.htmlMode?o:a;for(var m in g)p[m]=g[m];for(var m in f)p[m]=f[m];var b,x;function S(k,H){function W(Et){return H.tokenize=Et,Et(k,H)}var et=k.next();if(et=="<")return k.eat("!")?k.eat("[")?k.match("CDATA[")?W(L("atom","]]>")):null:k.match("--")?W(L("comment","-->")):k.match("DOCTYPE",!0,!0)?(k.eatWhile(/[\w\._\-]/),W(C(1))):null:k.eat("?")?(k.eatWhile(/[\w\._\-]/),H.tokenize=L("meta","?>"),"meta"):(b=k.eat("/")?"closeTag":"openTag",H.tokenize=M,"tag bracket");if(et=="&"){var wt;return k.eat("#")?k.eat("x")?wt=k.eatWhile(/[a-fA-F\d]/)&&k.eat(";"):wt=k.eatWhile(/[\d]/)&&k.eat(";"):wt=k.eatWhile(/[\w\.\-:]/)&&k.eat(";"),wt?"atom":"error"}else return k.eatWhile(/[^&<]/),null}S.isInText=!0;function M(k,H){var W=k.next();if(W==">"||W=="/"&&k.eat(">"))return H.tokenize=S,b=W==">"?"endTag":"selfcloseTag","tag bracket";if(W=="=")return b="equals",null;if(W=="<"){H.tokenize=S,H.state=j,H.tagName=H.tagStart=null;var et=H.tokenize(k,H);return et?et+" tag error":"tag error"}else return/[\'\"]/.test(W)?(H.tokenize=A(W),H.stringStartCol=k.column(),H.tokenize(k,H)):(k.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function A(k){var H=function(W,et){for(;!W.eol();)if(W.next()==k){et.tokenize=M;break}return"string"};return H.isInAttribute=!0,H}function L(k,H){return function(W,et){for(;!W.eol();){if(W.match(H)){et.tokenize=S;break}W.next()}return k}}function C(k){return function(H,W){for(var et;(et=H.next())!=null;){if(et=="<")return W.tokenize=C(k+1),W.tokenize(H,W);if(et==">")if(k==1){W.tokenize=S;break}else return W.tokenize=C(k-1),W.tokenize(H,W)}return"meta"}}function E(k){return k&&k.toLowerCase()}function z(k,H,W){this.prev=k.context,this.tagName=H||"",this.indent=k.indented,this.startOfLine=W,(p.doNotIndent.hasOwnProperty(H)||k.context&&k.context.noIndent)&&(this.noIndent=!0)}function D(k){k.context&&(k.context=k.context.prev)}function G(k,H){for(var W;;){if(!k.context||(W=k.context.tagName,!p.contextGrabbers.hasOwnProperty(E(W))||!p.contextGrabbers[E(W)].hasOwnProperty(E(H))))return;D(k)}}function j(k,H,W){return k=="openTag"?(W.tagStart=H.column(),it):k=="closeTag"?Q:j}function it(k,H,W){return k=="word"?(W.tagName=H.current(),x="tag",kt):p.allowMissingTagName&&k=="endTag"?(x="tag bracket",kt(k,H,W)):(x="error",it)}function Q(k,H,W){if(k=="word"){var et=H.current();return W.context&&W.context.tagName!=et&&p.implicitlyClosed.hasOwnProperty(E(W.context.tagName))&&D(W),W.context&&W.context.tagName==et||p.matchClosing===!1?(x="tag",dt):(x="tag error",vt)}else return p.allowMissingTagName&&k=="endTag"?(x="tag bracket",dt(k,H,W)):(x="error",vt)}function dt(k,H,W){return k!="endTag"?(x="error",dt):(D(W),j)}function vt(k,H,W){return x="error",dt(k,H,W)}function kt(k,H,W){if(k=="word")return x="attribute",ft;if(k=="endTag"||k=="selfcloseTag"){var et=W.tagName,wt=W.tagStart;return W.tagName=W.tagStart=null,k=="selfcloseTag"||p.autoSelfClosers.hasOwnProperty(E(et))?G(W,et):(G(W,et),W.context=new z(W,et,wt==W.indented)),j}return x="error",kt}function ft(k,H,W){return k=="equals"?U:(p.allowMissing||(x="error"),kt(k,H,W))}function U(k,H,W){return k=="string"?I:k=="word"&&p.allowUnquoted?(x="string",kt):(x="error",kt(k,H,W))}function I(k,H,W){return k=="string"?I:kt(k,H,W)}return{startState:function(k){var H={tokenize:S,state:j,indented:k||0,tagName:null,tagStart:null,context:null};return k!=null&&(H.baseIndent=k),H},token:function(k,H){if(!H.tagName&&k.sol()&&(H.indented=k.indentation()),k.eatSpace())return null;b=null;var W=H.tokenize(k,H);return(W||b)&&W!="comment"&&(x=null,H.state=H.state(b||W,k,H),x&&(W=x=="error"?W+" error":x)),W},indent:function(k,H,W){var et=k.context;if(k.tokenize.isInAttribute)return k.tagStart==k.indented?k.stringStartCol+1:k.indented+h;if(et&&et.noIndent)return r.Pass;if(k.tokenize!=M&&k.tokenize!=S)return W?W.match(/^(\s*)/)[0].length:0;if(k.tagName)return p.multilineTagIndentPastTag!==!1?k.tagStart+k.tagName.length+2:k.tagStart+h*(p.multilineTagIndentFactor||1);if(p.alignCDATA&&/<!\[CDATA\[/.test(H))return 0;var wt=H&&/^<(\/)?([\w_:\.-]*)/.exec(H);if(wt&&wt[1])for(;et;)if(et.tagName==wt[2]){et=et.prev;break}else if(p.implicitlyClosed.hasOwnProperty(E(et.tagName)))et=et.prev;else break;else if(wt)for(;et;){var Et=p.contextGrabbers[E(et.tagName)];if(Et&&Et.hasOwnProperty(E(wt[2])))et=et.prev;else break}for(;et&&et.prev&&!et.startOfLine;)et=et.prev;return et?et.indent+h:k.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:p.htmlMode?"html":"xml",helperType:p.htmlMode?"html":"xml",skipAttribute:function(k){k.state==U&&(k.state=kt)},xmlCurrentTag:function(k){return k.tagName?{name:k.tagName,close:k.type=="closeTag"}:null},xmlCurrentContext:function(k){for(var H=[],W=k.context;W;W=W.prev)H.push(W.tagName);return H.reverse()}}}),r.defineMIME("text/xml","xml"),r.defineMIME("application/xml","xml"),r.mimeModes.hasOwnProperty("text/html")||r.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),av.exports}ly();(function(t,n){(function(r){r(Yo(),ly(),Hst.exports)})(function(r){function o(u,f,h,p){this.state=u,this.mode=f,this.depth=h,this.prev=p}function a(u){return new o(r.copyState(u.mode,u.state),u.mode,u.depth,u.prev&&a(u.prev))}r.defineMode("jsx",function(u,f){var h=r.getMode(u,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),p=r.getMode(u,f&&f.base||"javascript");function g(S){var M=S.tagName;S.tagName=null;var A=h.indent(S,"","");return S.tagName=M,A}function m(S,M){return M.context.mode==h?b(S,M,M.context):x(S,M,M.context)}function b(S,M,A){if(A.depth==2)return S.match(/^.*?\*\//)?A.depth=1:S.skipToEnd(),"comment";if(S.peek()=="{"){h.skipAttribute(A.state);var L=g(A.state),C=A.state.context;if(C&&S.match(/^[^>]*>\s*$/,!1)){for(;C.prev&&!C.startOfLine;)C=C.prev;C.startOfLine?L-=u.indentUnit:A.prev.state.lexical&&(L=A.prev.state.lexical.indented)}else A.depth==1&&(L+=u.indentUnit);return M.context=new o(r.startState(p,L),p,0,M.context),null}if(A.depth==1){if(S.peek()=="<")return h.skipAttribute(A.state),M.context=new o(r.startState(h,g(A.state)),h,0,M.context),null;if(S.match("//"))return S.skipToEnd(),"comment";if(S.match("/*"))return A.depth=2,m(S,M)}var E=h.token(S,A.state),z=S.current(),D;return/\btag\b/.test(E)?/>$/.test(z)?A.state.context?A.depth=0:M.context=M.context.prev:/^</.test(z)&&(A.depth=1):!E&&(D=z.indexOf("{"))>-1&&S.backUp(z.length-D),E}function x(S,M,A){if(S.peek()=="<"&&p.expressionAllowed(S,A.state))return M.context=new o(r.startState(h,p.indent(A.state,"","")),h,0,M.context),p.skipExpression(A.state),null;var L=p.token(S,A.state);if(!L&&A.depth!=null){var C=S.current();C=="{"?A.depth++:C=="}"&&--A.depth==0&&(M.context=M.context.prev)}return L}return{startState:function(){return{context:new o(r.startState(p),p)}},copyState:function(S){return{context:a(S.context)}},token:m,indent:function(S,M,A){return S.context.mode.indent(S.context.state,M,A)},innerMode:function(S){return S.context}}},"xml","javascript"),r.defineMIME("text/jsx","jsx"),r.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(t,n){(function(r){r(Yo())})(function(r){r.defineOption("placeholder","",function(g,m,b){var x=b&&b!=r.Init;if(m&&!x)g.on("blur",f),g.on("change",h),g.on("swapDoc",h),r.on(g.getInputField(),"compositionupdate",g.state.placeholderCompose=function(){u(g)}),h(g);else if(!m&&x){g.off("blur",f),g.off("change",h),g.off("swapDoc",h),r.off(g.getInputField(),"compositionupdate",g.state.placeholderCompose),o(g);var S=g.getWrapperElement();S.className=S.className.replace(" CodeMirror-empty","")}m&&!g.hasFocus()&&f(g)});function o(g){g.state.placeholder&&(g.state.placeholder.parentNode.removeChild(g.state.placeholder),g.state.placeholder=null)}function a(g){o(g);var m=g.state.placeholder=document.createElement("pre");m.style.cssText="height: 0; overflow: visible",m.style.direction=g.getOption("direction"),m.className="CodeMirror-placeholder CodeMirror-line-like";var b=g.getOption("placeholder");typeof b=="string"&&(b=document.createTextNode(b)),m.appendChild(b),g.display.lineSpace.insertBefore(m,g.display.lineSpace.firstChild)}function u(g){setTimeout(function(){var m=!1;if(g.lineCount()==1){var b=g.getInputField();m=b.nodeName=="TEXTAREA"?!g.getLine(0).length:!/[^\u200b]/.test(b.querySelector(".CodeMirror-line").textContent)}m?a(g):o(g)},20)}function f(g){p(g)&&a(g)}function h(g){var m=g.getWrapperElement(),b=p(g);m.className=m.className.replace(" CodeMirror-empty","")+(b?" CodeMirror-empty":""),b?a(g):o(g)}function p(g){return g.lineCount()===1&&g.getLine(0)===""}})})();(function(t,n){(function(r){r(Yo())})(function(r){function o(f,h,p){this.orientation=h,this.scroll=p,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=f+"-"+h,this.inner=this.node.appendChild(document.createElement("div"));var g=this;r.on(this.inner,"mousedown",function(b){if(b.which!=1)return;r.e_preventDefault(b);var x=g.orientation=="horizontal"?"pageX":"pageY",S=b[x],M=g.pos;function A(){r.off(document,"mousemove",L),r.off(document,"mouseup",A)}function L(C){if(C.which!=1)return A();g.moveTo(M+(C[x]-S)*(g.total/g.size))}r.on(document,"mousemove",L),r.on(document,"mouseup",A)}),r.on(this.node,"click",function(b){r.e_preventDefault(b);var x=g.inner.getBoundingClientRect(),S;g.orientation=="horizontal"?S=b.clientX<x.left?-1:b.clientX>x.right?1:0:S=b.clientY<x.top?-1:b.clientY>x.bottom?1:0,g.moveTo(g.pos+S*g.screen)});function m(b){var x=r.wheelEventPixels(b)[g.orientation=="horizontal"?"x":"y"],S=g.pos;g.moveTo(g.pos+x),g.pos!=S&&r.e_preventDefault(b)}r.on(this.node,"mousewheel",m),r.on(this.node,"DOMMouseScroll",m)}o.prototype.setPos=function(f,h){return f<0&&(f=0),f>this.total-this.screen&&(f=this.total-this.screen),!h&&f==this.pos?!1:(this.pos=f,this.inner.style[this.orientation=="horizontal"?"left":"top"]=f*(this.size/this.total)+"px",!0)},o.prototype.moveTo=function(f){this.setPos(f)&&this.scroll(f,this.orientation)};var a=10;o.prototype.update=function(f,h,p){var g=this.screen!=h||this.total!=f||this.size!=p;g&&(this.screen=h,this.total=f,this.size=p);var m=this.screen*(this.size/this.total);m<a&&(this.size-=a-m,m=a),this.inner.style[this.orientation=="horizontal"?"width":"height"]=m+"px",this.setPos(this.pos,g)};function u(f,h,p){this.addClass=f,this.horiz=new o(f,"horizontal",p),h(this.horiz.node),this.vert=new o(f,"vertical",p),h(this.vert.node),this.width=null}u.prototype.update=function(f){if(this.width==null){var h=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;h&&(this.width=parseInt(h.height))}var p=this.width||0,g=f.scrollWidth>f.clientWidth+1,m=f.scrollHeight>f.clientHeight+1;return this.vert.node.style.display=m?"block":"none",this.horiz.node.style.display=g?"block":"none",m&&(this.vert.update(f.scrollHeight,f.clientHeight,f.viewHeight-(g?p:0)),this.vert.node.style.bottom=g?p+"px":"0"),g&&(this.horiz.update(f.scrollWidth,f.clientWidth,f.viewWidth-(m?p:0)-f.barLeft),this.horiz.node.style.right=m?p+"px":"0",this.horiz.node.style.left=f.barLeft+"px"),{right:m?p:0,bottom:g?p:0}},u.prototype.setScrollTop=function(f){this.vert.setPos(f)},u.prototype.setScrollLeft=function(f){this.horiz.setPos(f)},u.prototype.clear=function(){var f=this.horiz.node.parentNode;f.removeChild(this.horiz.node),f.removeChild(this.vert.node)},r.scrollbarModel.simple=function(f,h){return new u("CodeMirror-simplescroll",f,h)},r.scrollbarModel.overlay=function(f,h){return new u("CodeMirror-overlayscroll",f,h)}})})();function Bst(t,n,r={}){const o=qst.fromTextArea(t.value,{theme:"vars",...r,scrollbarStyle:"simple"});let a=!1;return o.on("change",()=>{if(a){a=!1;return}n.value=o.getValue()}),Fe(n,u=>{if(u!==o.getValue()){a=!0;const f=o.listSelections();o.replaceRange(u,o.posFromIndex(0),o.posFromIndex(1/0)),o.setSelections(f)}},{immediate:!0}),Nf(o)}const Wst={relative:"","font-mono":"","text-sm":"",class:"codemirror-scrolls"},ay=oe({__name:"CodeMirror",props:{modelValue:null,mode:null,readOnly:{type:Boolean}},emits:["update:modelValue","save"],setup(t,{expose:n,emit:r}){const o=t,a=Q1(),u={js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},f=Kt(),h=QC(o,"modelValue",r,{passive:!0}),p=ll();return n({cm:p}),ul(async()=>{p.value=Bst(f,h,{...o,...a,mode:u[o.mode||""]||o.mode,readOnly:o.readOnly?"nocursor":void 0,extraKeys:{"Cmd-S":function(g){r("save",g.getValue())},"Ctrl-S":function(g){r("save",g.getValue())}}}),p.value.setSize("100%","100%"),p.value.clearHistory(),setTimeout(()=>p.value.refresh(),100)}),(g,m)=>(ht(),Mt("div",Wst,[ut("textarea",{ref_key:"el",ref:f},null,512)]))}}),Ust=oe({__name:"ViewEditor",props:{file:null},emits:["draft"],setup(t,{emit:n}){const r=t,o=Kt(""),a=ll(void 0),u=Kt(!1);Fe(()=>r.file,async()=>{var C;if(!r.file||!((C=r.file)!=null&&C.filepath)){o.value="",a.value=o.value,u.value=!1;return}o.value=await We.rpc.readFile(r.file.filepath),a.value=o.value,u.value=!1},{immediate:!0});const f=St(()=>{var C,E;return((E=(C=r.file)==null?void 0:C.filepath)==null?void 0:E.split(/\./g).pop())||"js"}),h=Kt(),p=St(()=>{var C;return(C=h.value)==null?void 0:C.cm}),g=St(()=>{var C;return((C=r.file)==null?void 0:C.tasks.filter(E=>{var z;return((z=E.result)==null?void 0:z.state)==="fail"}))||[]}),m=[],b=[],x=[],S=Kt(!1),M=()=>{x.forEach(([C,E,z])=>{C.removeEventListener("click",E),z()}),x.length=0};GC(h,()=>{var C;(C=p.value)==null||C.refresh()});function A(){u.value=a.value!==p.value.getValue()}Fe(u,C=>{n("draft",C)},{immediate:!0}),Fe([p,g],([C])=>{if(!C){M();return}setTimeout(()=>{M(),m.forEach(E=>E.clear()),b.forEach(E=>{var z;return(z=p.value)==null?void 0:z.removeLineClass(E,"wrap")}),m.length=0,b.length=0,C.on("changes",A),g.value.forEach(E=>{var G;const z=(G=E.result)==null?void 0:G.error,D=((z==null?void 0:z.stacks)||[]).filter(j=>{var it;return j.file&&j.file===((it=r.file)==null?void 0:it.filepath)});if(D.length){const j=D[0].sourcePos||D[0],it=document.createElement("div");it.className="op80 flex gap-x-2 items-center";const Q=document.createElement("pre");Q.className="c-red-600 dark:c-red-400",Q.textContent=`${" ".repeat(j.column)}^ ${z==null?void 0:z.nameStr}: ${z==null?void 0:z.message}`,it.appendChild(Q);const dt=document.createElement("span");dt.className="i-carbon-launch c-red-600 dark:c-red-400 hover:cursor-pointer min-w-1em min-h-1em",dt.tabIndex=0,dt.ariaLabel="Open in Editor",p0(dt,{content:"Open in Editor",placement:"bottom"},!1);const vt=async()=>{await oy(D[0].file,j.line,j.column)};it.appendChild(dt),x.push([dt,vt,()=>Jf(dt)]),b.push(p.value.addLineClass(j.line-1,"wrap","bg-red-500/10")),m.push(p.value.addLineWidget(j.line-1,it))}}),S.value||C.clearHistory()},100)},{flush:"post"});async function L(C){S.value=!0,await We.rpc.writeFile(r.file.filepath,C),a.value=C,u.value=!1}return(C,E)=>{const z=ay;return ht(),ce(z,hi({ref_key:"editor",ref:h,modelValue:o.value,"onUpdate:modelValue":E[0]||(E[0]=D=>o.value=D),"h-full":""},{lineNumbers:!0},{mode:Z(f),"data-testid":"code-mirror",onSave:L}),null,16,["modelValue","mode"])}}}),jst=oe({__name:"Modal",props:{modelValue:{type:Boolean,default:!1},direction:{default:"bottom"}},emits:["update:modelValue"],setup(t){const n=t,r=St(()=>{switch(n.direction){case"bottom":return"bottom-0 left-0 right-0 border-t";case"top":return"top-0 left-0 right-0 border-b";case"left":return"bottom-0 left-0 top-0 border-r";case"right":return"bottom-0 top-0 right-0 border-l";default:return""}}),o=St(()=>{switch(n.direction){case"bottom":return"translateY(100%)";case"top":return"translateY(-100%)";case"left":return"translateX(-100%)";case"right":return"translateX(100%)";default:return""}});return(a,u)=>(ht(),Mt("div",{class:ge(["fixed inset-0 z-40",t.modelValue?"":"pointer-events-none"])},[ut("div",{class:ge(["bg-base inset-0 absolute transition-opacity duration-500 ease-out",t.modelValue?"opacity-50":"opacity-0"]),onClick:u[0]||(u[0]=f=>a.$emit("update:modelValue",!1))},null,2),ut("div",{class:ge(["bg-base border-base absolute transition-all duration-200 ease-out scrolls",[Z(r)]]),style:kn(t.modelValue?{}:{transform:Z(o)})},[Kn(a.$slots,"default")],6)],2))}}),Gst=["aria-label","opacity","disabled","hover"],Zo=oe({__name:"IconButton",props:{icon:null,title:null,disabled:{type:Boolean}},setup(t){return(n,r)=>(ht(),Mt("button",{"aria-label":t.title,role:"button",opacity:t.disabled?10:70,rounded:"",disabled:t.disabled,hover:t.disabled?"":"bg-active op100",class:"w-1.4em h-1.4em flex"},[Kn(n.$slots,"default",{},()=>[ut("div",{class:ge(t.icon),ma:""},null,2)])],8,Gst))}}),Vst={"w-350":"","max-w-screen":"","h-full":"",flex:"","flex-col":""},Kst={"p-4":"",relative:""},Xst=ut("p",null,"Module Info",-1),Yst={op50:"","font-mono":"","text-sm":""},Zst={key:0,"p-5":""},Jst={grid:"~ cols-2 rows-[min-content_auto]","overflow-hidden":"","flex-auto":""},Qst=ut("div",{p:"x3 y-1","bg-overlay":"",border:"base b t r"}," Source ",-1),tlt=ut("div",{p:"x3 y-1","bg-overlay":"",border:"base b t"}," Transformed ",-1),elt={key:0},nlt={p:"x3 y-1","bg-overlay":"",border:"base b t"},rlt=oe({__name:"ModuleTransformResultView",props:{id:null},emits:["close"],setup(t,{emit:n}){const r=t,o=yC(()=>We.rpc.getTransformResult(r.id)),a=St(()=>{var p;return((p=r.id)==null?void 0:p.split(/\./g).pop())||"js"}),u=St(()=>{var p,g;return((g=(p=o.value)==null?void 0:p.source)==null?void 0:g.trim())||""}),f=St(()=>{var p,g;return((g=(p=o.value)==null?void 0:p.code)==null?void 0:g.replace(/\/\/# sourceMappingURL=.*\n/,"").trim())||""}),h=St(()=>{var p,g,m,b,x;return{mappings:(m=(g=(p=o.value)==null?void 0:p.map)==null?void 0:g.mappings)!=null?m:"",version:(x=(b=o.value)==null?void 0:b.map)==null?void 0:x.version}});return wC("Escape",()=>{n("close")}),(p,g)=>{const m=Zo,b=ay;return ht(),Mt("div",Vst,[ut("div",Kst,[Xst,ut("p",Yst,Jt(t.id),1),Rt(m,{icon:"i-carbon-close",absolute:"","top-5px":"","right-5px":"","text-2xl":"",onClick:g[0]||(g[0]=x=>n("close"))})]),Z(o)?(ht(),Mt(ue,{key:1},[ut("div",Jst,[Qst,tlt,Rt(b,hi({"h-full":"","model-value":Z(u),"read-only":""},{lineNumbers:!0},{mode:Z(a)}),null,16,["model-value","mode"]),Rt(b,hi({"h-full":"","model-value":Z(f),"read-only":""},{lineNumbers:!0},{mode:Z(a)}),null,16,["model-value","mode"])]),Z(h).mappings!==""?(ht(),Mt("div",elt,[ut("div",nlt," Source map (v"+Jt(Z(h).version)+") ",1),Rt(b,hi({"model-value":Z(h).mappings,"read-only":""},{lineNumbers:!0},{mode:Z(a)}),null,16,["model-value","mode"])])):ye("",!0)],64)):(ht(),Mt("div",Zst," No transform result found for this module. "))])}}});var af="http://www.w3.org/1999/xhtml";const uv={svg:"http://www.w3.org/2000/svg",xhtml:af,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function mc(t){var n=t+="",r=n.indexOf(":");return r>=0&&(n=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),uv.hasOwnProperty(n)?{space:uv[n],local:t}:t}function ilt(t){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===af&&n.documentElement.namespaceURI===af?n.createElement(t):n.createElementNS(r,t)}}function olt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function cy(t){var n=mc(t);return(n.local?olt:ilt)(n)}function slt(){}function oh(t){return t==null?slt:function(){return this.querySelector(t)}}function llt(t){typeof t!="function"&&(t=oh(t));for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a)for(var u=n[a],f=u.length,h=o[a]=new Array(f),p,g,m=0;m<f;++m)(p=u[m])&&(g=t.call(p,p.__data__,m,u))&&("__data__"in p&&(g.__data__=p.__data__),h[m]=g);return new On(o,this._parents)}function alt(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function clt(){return[]}function uy(t){return t==null?clt:function(){return this.querySelectorAll(t)}}function ult(t){return function(){return alt(t.apply(this,arguments))}}function flt(t){typeof t=="function"?t=ult(t):t=uy(t);for(var n=this._groups,r=n.length,o=[],a=[],u=0;u<r;++u)for(var f=n[u],h=f.length,p,g=0;g<h;++g)(p=f[g])&&(o.push(t.call(p,p.__data__,g,f)),a.push(p));return new On(o,a)}function fy(t){return function(){return this.matches(t)}}function hy(t){return function(n){return n.matches(t)}}var hlt=Array.prototype.find;function dlt(t){return function(){return hlt.call(this.children,t)}}function plt(){return this.firstElementChild}function glt(t){return this.select(t==null?plt:dlt(typeof t=="function"?t:hy(t)))}var vlt=Array.prototype.filter;function mlt(){return Array.from(this.children)}function ylt(t){return function(){return vlt.call(this.children,t)}}function blt(t){return this.selectAll(t==null?mlt:ylt(typeof t=="function"?t:hy(t)))}function wlt(t){typeof t!="function"&&(t=fy(t));for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a)for(var u=n[a],f=u.length,h=o[a]=[],p,g=0;g<f;++g)(p=u[g])&&t.call(p,p.__data__,g,u)&&h.push(p);return new On(o,this._parents)}function dy(t){return new Array(t.length)}function xlt(){return new On(this._enter||this._groups.map(dy),this._parents)}function Fa(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}Fa.prototype={constructor:Fa,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function _lt(t){return function(){return t}}function Slt(t,n,r,o,a,u){for(var f=0,h,p=n.length,g=u.length;f<g;++f)(h=n[f])?(h.__data__=u[f],o[f]=h):r[f]=new Fa(t,u[f]);for(;f<p;++f)(h=n[f])&&(a[f]=h)}function klt(t,n,r,o,a,u,f){var h,p,g=new Map,m=n.length,b=u.length,x=new Array(m),S;for(h=0;h<m;++h)(p=n[h])&&(x[h]=S=f.call(p,p.__data__,h,n)+"",g.has(S)?a[h]=p:g.set(S,p));for(h=0;h<b;++h)S=f.call(t,u[h],h,u)+"",(p=g.get(S))?(o[h]=p,p.__data__=u[h],g.delete(S)):r[h]=new Fa(t,u[h]);for(h=0;h<m;++h)(p=n[h])&&g.get(x[h])===p&&(a[h]=p)}function Clt(t){return t.__data__}function Tlt(t,n){if(!arguments.length)return Array.from(this,Clt);var r=n?klt:Slt,o=this._parents,a=this._groups;typeof t!="function"&&(t=_lt(t));for(var u=a.length,f=new Array(u),h=new Array(u),p=new Array(u),g=0;g<u;++g){var m=o[g],b=a[g],x=b.length,S=Llt(t.call(m,m&&m.__data__,g,o)),M=S.length,A=h[g]=new Array(M),L=f[g]=new Array(M),C=p[g]=new Array(x);r(m,b,A,L,C,S,n);for(var E=0,z=0,D,G;E<M;++E)if(D=A[E]){for(E>=z&&(z=E+1);!(G=L[z])&&++z<M;);D._next=G||null}}return f=new On(f,o),f._enter=h,f._exit=p,f}function Llt(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Elt(){return new On(this._exit||this._groups.map(dy),this._parents)}function Alt(t,n,r){var o=this.enter(),a=this,u=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),n!=null&&(a=n(a),a&&(a=a.selection())),r==null?u.remove():r(u),o&&a?o.merge(a).order():a}function Mlt(t){for(var n=t.selection?t.selection():t,r=this._groups,o=n._groups,a=r.length,u=o.length,f=Math.min(a,u),h=new Array(a),p=0;p<f;++p)for(var g=r[p],m=o[p],b=g.length,x=h[p]=new Array(b),S,M=0;M<b;++M)(S=g[M]||m[M])&&(x[M]=S);for(;p<a;++p)h[p]=r[p];return new On(h,this._parents)}function Nlt(){for(var t=this._groups,n=-1,r=t.length;++n<r;)for(var o=t[n],a=o.length-1,u=o[a],f;--a>=0;)(f=o[a])&&(u&&f.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(f,u),u=f);return this}function Plt(t){t||(t=Olt);function n(b,x){return b&&x?t(b.__data__,x.__data__):!b-!x}for(var r=this._groups,o=r.length,a=new Array(o),u=0;u<o;++u){for(var f=r[u],h=f.length,p=a[u]=new Array(h),g,m=0;m<h;++m)(g=f[m])&&(p[m]=g);p.sort(n)}return new On(a,this._parents).order()}function Olt(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function $lt(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Dlt(){return Array.from(this)}function Rlt(){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],a=0,u=o.length;a<u;++a){var f=o[a];if(f)return f}return null}function zlt(){let t=0;for(const n of this)++t;return t}function Ilt(){return!this.node()}function Flt(t){for(var n=this._groups,r=0,o=n.length;r<o;++r)for(var a=n[r],u=0,f=a.length,h;u<f;++u)(h=a[u])&&t.call(h,h.__data__,u,a);return this}function qlt(t){return function(){this.removeAttribute(t)}}function Hlt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Blt(t,n){return function(){this.setAttribute(t,n)}}function Wlt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ult(t,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function jlt(t,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Glt(t,n){var r=mc(t);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((n==null?r.local?Hlt:qlt:typeof n=="function"?r.local?jlt:Ult:r.local?Wlt:Blt)(r,n))}function py(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Vlt(t){return function(){this.style.removeProperty(t)}}function Klt(t,n,r){return function(){this.style.setProperty(t,n,r)}}function Xlt(t,n,r){return function(){var o=n.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,r)}}function Ylt(t,n,r){return arguments.length>1?this.each((n==null?Vlt:typeof n=="function"?Xlt:Klt)(t,n,r==null?"":r)):Uo(this.node(),t)}function Uo(t,n){return t.style.getPropertyValue(n)||py(t).getComputedStyle(t,null).getPropertyValue(n)}function Zlt(t){return function(){delete this[t]}}function Jlt(t,n){return function(){this[t]=n}}function Qlt(t,n){return function(){var r=n.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function tat(t,n){return arguments.length>1?this.each((n==null?Zlt:typeof n=="function"?Qlt:Jlt)(t,n)):this.node()[t]}function gy(t){return t.trim().split(/^|\s+/)}function sh(t){return t.classList||new vy(t)}function vy(t){this._node=t,this._names=gy(t.getAttribute("class")||"")}vy.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function my(t,n){for(var r=sh(t),o=-1,a=n.length;++o<a;)r.add(n[o])}function yy(t,n){for(var r=sh(t),o=-1,a=n.length;++o<a;)r.remove(n[o])}function eat(t){return function(){my(this,t)}}function nat(t){return function(){yy(this,t)}}function rat(t,n){return function(){(n.apply(this,arguments)?my:yy)(this,t)}}function iat(t,n){var r=gy(t+"");if(arguments.length<2){for(var o=sh(this.node()),a=-1,u=r.length;++a<u;)if(!o.contains(r[a]))return!1;return!0}return this.each((typeof n=="function"?rat:n?eat:nat)(r,n))}function oat(){this.textContent=""}function sat(t){return function(){this.textContent=t}}function lat(t){return function(){var n=t.apply(this,arguments);this.textContent=n==null?"":n}}function aat(t){return arguments.length?this.each(t==null?oat:(typeof t=="function"?lat:sat)(t)):this.node().textContent}function cat(){this.innerHTML=""}function uat(t){return function(){this.innerHTML=t}}function fat(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n==null?"":n}}function hat(t){return arguments.length?this.each(t==null?cat:(typeof t=="function"?fat:uat)(t)):this.node().innerHTML}function dat(){this.nextSibling&&this.parentNode.appendChild(this)}function pat(){return this.each(dat)}function gat(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vat(){return this.each(gat)}function mat(t){var n=typeof t=="function"?t:cy(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function yat(){return null}function bat(t,n){var r=typeof t=="function"?t:cy(t),o=n==null?yat:typeof n=="function"?n:oh(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function wat(){var t=this.parentNode;t&&t.removeChild(this)}function xat(){return this.each(wat)}function _at(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Sat(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function kat(t){return this.select(t?Sat:_at)}function Cat(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Tat(t){return function(n){t.call(this,n,this.__data__)}}function Lat(t){return t.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");return o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),{type:n,name:r}})}function Eat(t){return function(){var n=this.__on;if(!!n){for(var r=0,o=-1,a=n.length,u;r<a;++r)u=n[r],(!t.type||u.type===t.type)&&u.name===t.name?this.removeEventListener(u.type,u.listener,u.options):n[++o]=u;++o?n.length=o:delete this.__on}}}function Aat(t,n,r){return function(){var o=this.__on,a,u=Tat(n);if(o){for(var f=0,h=o.length;f<h;++f)if((a=o[f]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=u,a.options=r),a.value=n;return}}this.addEventListener(t.type,u,r),a={type:t.type,name:t.name,value:n,listener:u,options:r},o?o.push(a):this.__on=[a]}}function Mat(t,n,r){var o=Lat(t+""),a,u=o.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var p=0,g=h.length,m;p<g;++p)for(a=0,m=h[p];a<u;++a)if((f=o[a]).type===m.type&&f.name===m.name)return m.value}return}for(h=n?Aat:Eat,a=0;a<u;++a)this.each(h(o[a],n,r));return this}function by(t,n,r){var o=py(t),a=o.CustomEvent;typeof a=="function"?a=new a(n,r):(a=o.document.createEvent("Event"),r?(a.initEvent(n,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(n,!1,!1)),t.dispatchEvent(a)}function Nat(t,n){return function(){return by(this,t,n)}}function Pat(t,n){return function(){return by(this,t,n.apply(this,arguments))}}function Oat(t,n){return this.each((typeof n=="function"?Pat:Nat)(t,n))}function*$at(){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],a=0,u=o.length,f;a<u;++a)(f=o[a])&&(yield f)}var wy=[null];function On(t,n){this._groups=t,this._parents=n}function pl(){return new On([[document.documentElement]],wy)}function Dat(){return this}On.prototype=pl.prototype={constructor:On,select:llt,selectAll:flt,selectChild:glt,selectChildren:blt,filter:wlt,data:Tlt,enter:xlt,exit:Elt,join:Alt,merge:Mlt,selection:Dat,order:Nlt,sort:Plt,call:$lt,nodes:Dlt,node:Rlt,size:zlt,empty:Ilt,each:Flt,attr:Glt,style:Ylt,property:tat,classed:iat,text:aat,html:hat,raise:pat,lower:vat,append:mat,insert:bat,remove:xat,clone:kat,datum:Cat,on:Mat,dispatch:Oat,[Symbol.iterator]:$at};function _n(t){return typeof t=="string"?new On([[document.querySelector(t)]],[document.documentElement]):new On([[t]],wy)}function Rat(t){let n;for(;n=t.sourceEvent;)t=n;return t}function Ar(t,n){if(t=Rat(t),n===void 0&&(n=t.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(n.getScreenCTM().inverse()),[o.x,o.y]}if(n.getBoundingClientRect){var a=n.getBoundingClientRect();return[t.clientX-a.left-n.clientLeft,t.clientY-a.top-n.clientTop]}}return[t.pageX,t.pageY]}var zat={value:()=>{}};function gl(){for(var t=0,n=arguments.length,r={},o;t<n;++t){if(!(o=arguments[t]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new wa(r)}function wa(t){this._=t}function Iat(t,n){return t.trim().split(/^|\s+/).map(function(r){var o="",a=r.indexOf(".");if(a>=0&&(o=r.slice(a+1),r=r.slice(0,a)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}wa.prototype=gl.prototype={constructor:wa,on:function(t,n){var r=this._,o=Iat(t+"",r),a,u=-1,f=o.length;if(arguments.length<2){for(;++u<f;)if((a=(t=o[u]).type)&&(a=Fat(r[a],t.name)))return a;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++u<f;)if(a=(t=o[u]).type)r[a]=fv(r[a],t.name,n);else if(n==null)for(a in r)r[a]=fv(r[a],t.name,null);return this},copy:function(){var t={},n=this._;for(var r in n)t[r]=n[r].slice();return new wa(t)},call:function(t,n){if((a=arguments.length-2)>0)for(var r=new Array(a),o=0,a,u;o<a;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],o=0,a=u.length;o<a;++o)u[o].value.apply(n,r)},apply:function(t,n,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],a=0,u=o.length;a<u;++a)o[a].value.apply(n,r)}};function Fat(t,n){for(var r=0,o=t.length,a;r<o;++r)if((a=t[r]).name===n)return a.value}function fv(t,n,r){for(var o=0,a=t.length;o<a;++o)if(t[o].name===n){t[o]=zat,t=t.slice(0,o).concat(t.slice(o+1));break}return r!=null&&t.push({name:n,value:r}),t}const qat={passive:!1},nl={capture:!0,passive:!1};function Eu(t){t.stopImmediatePropagation()}function Po(t){t.preventDefault(),t.stopImmediatePropagation()}function xy(t){var n=t.document.documentElement,r=_n(t).on("dragstart.drag",Po,nl);"onselectstart"in n?r.on("selectstart.drag",Po,nl):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function _y(t,n){var r=t.document.documentElement,o=_n(t).on("dragstart.drag",null);n&&(o.on("click.drag",Po,nl),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const oa=t=>()=>t;function cf(t,{sourceEvent:n,subject:r,target:o,identifier:a,active:u,x:f,y:h,dx:p,dy:g,dispatch:m}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:m}})}cf.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Hat(t){return!t.ctrlKey&&!t.button}function Bat(){return this.parentNode}function Wat(t,n){return n==null?{x:t.x,y:t.y}:n}function Uat(){return navigator.maxTouchPoints||"ontouchstart"in this}function jat(){var t=Hat,n=Bat,r=Wat,o=Uat,a={},u=gl("start","drag","end"),f=0,h,p,g,m,b=0;function x(D){D.on("mousedown.drag",S).filter(o).on("touchstart.drag",L).on("touchmove.drag",C,qat).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function S(D,G){if(!(m||!t.call(this,D,G))){var j=z(this,n.call(this,D,G),D,G,"mouse");!j||(_n(D.view).on("mousemove.drag",M,nl).on("mouseup.drag",A,nl),xy(D.view),Eu(D),g=!1,h=D.clientX,p=D.clientY,j("start",D))}}function M(D){if(Po(D),!g){var G=D.clientX-h,j=D.clientY-p;g=G*G+j*j>b}a.mouse("drag",D)}function A(D){_n(D.view).on("mousemove.drag mouseup.drag",null),_y(D.view,g),Po(D),a.mouse("end",D)}function L(D,G){if(!!t.call(this,D,G)){var j=D.changedTouches,it=n.call(this,D,G),Q=j.length,dt,vt;for(dt=0;dt<Q;++dt)(vt=z(this,it,D,G,j[dt].identifier,j[dt]))&&(Eu(D),vt("start",D,j[dt]))}}function C(D){var G=D.changedTouches,j=G.length,it,Q;for(it=0;it<j;++it)(Q=a[G[it].identifier])&&(Po(D),Q("drag",D,G[it]))}function E(D){var G=D.changedTouches,j=G.length,it,Q;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),it=0;it<j;++it)(Q=a[G[it].identifier])&&(Eu(D),Q("end",D,G[it]))}function z(D,G,j,it,Q,dt){var vt=u.copy(),kt=Ar(dt||j,G),ft,U,I;if((I=r.call(D,new cf("beforestart",{sourceEvent:j,target:x,identifier:Q,active:f,x:kt[0],y:kt[1],dx:0,dy:0,dispatch:vt}),it))!=null)return ft=I.x-kt[0]||0,U=I.y-kt[1]||0,function k(H,W,et){var wt=kt,Et;switch(H){case"start":a[Q]=k,Et=f++;break;case"end":delete a[Q],--f;case"drag":kt=Ar(et||W,G),Et=f;break}vt.call(H,D,new cf(H,{sourceEvent:W,subject:I,target:x,identifier:Q,active:Et,x:kt[0]+ft,y:kt[1]+U,dx:kt[0]-wt[0],dy:kt[1]-wt[1],dispatch:vt}),it)}}return x.filter=function(D){return arguments.length?(t=typeof D=="function"?D:oa(!!D),x):t},x.container=function(D){return arguments.length?(n=typeof D=="function"?D:oa(D),x):n},x.subject=function(D){return arguments.length?(r=typeof D=="function"?D:oa(D),x):r},x.touchable=function(D){return arguments.length?(o=typeof D=="function"?D:oa(!!D),x):o},x.on=function(){var D=u.on.apply(u,arguments);return D===u?x:D},x.clickDistance=function(D){return arguments.length?(b=(D=+D)*D,x):Math.sqrt(b)},x}function lh(t,n,r){t.prototype=n.prototype=r,r.constructor=t}function Sy(t,n){var r=Object.create(t.prototype);for(var o in n)r[o]=n[o];return r}function vl(){}var rl=.7,qa=1/rl,Oo="\\s*([+-]?\\d+)\\s*",il="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ur="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gat=/^#([0-9a-f]{3,8})$/,Vat=new RegExp(`^rgb\\(${Oo},${Oo},${Oo}\\)$`),Kat=new RegExp(`^rgb\\(${ur},${ur},${ur}\\)$`),Xat=new RegExp(`^rgba\\(${Oo},${Oo},${Oo},${il}\\)$`),Yat=new RegExp(`^rgba\\(${ur},${ur},${ur},${il}\\)$`),Zat=new RegExp(`^hsl\\(${il},${ur},${ur}\\)$`),Jat=new RegExp(`^hsla\\(${il},${ur},${ur},${il}\\)$`),hv={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};lh(vl,ol,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:dv,formatHex:dv,formatHex8:Qat,formatHsl:tct,formatRgb:pv,toString:pv});function dv(){return this.rgb().formatHex()}function Qat(){return this.rgb().formatHex8()}function tct(){return ky(this).formatHsl()}function pv(){return this.rgb().formatRgb()}function ol(t){var n,r;return t=(t+"").trim().toLowerCase(),(n=Gat.exec(t))?(r=n[1].length,n=parseInt(n[1],16),r===6?gv(n):r===3?new Sn(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?sa(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?sa(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Vat.exec(t))?new Sn(n[1],n[2],n[3],1):(n=Kat.exec(t))?new Sn(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Xat.exec(t))?sa(n[1],n[2],n[3],n[4]):(n=Yat.exec(t))?sa(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Zat.exec(t))?yv(n[1],n[2]/100,n[3]/100,1):(n=Jat.exec(t))?yv(n[1],n[2]/100,n[3]/100,n[4]):hv.hasOwnProperty(t)?gv(hv[t]):t==="transparent"?new Sn(NaN,NaN,NaN,0):null}function gv(t){return new Sn(t>>16&255,t>>8&255,t&255,1)}function sa(t,n,r,o){return o<=0&&(t=n=r=NaN),new Sn(t,n,r,o)}function ect(t){return t instanceof vl||(t=ol(t)),t?(t=t.rgb(),new Sn(t.r,t.g,t.b,t.opacity)):new Sn}function uf(t,n,r,o){return arguments.length===1?ect(t):new Sn(t,n,r,o==null?1:o)}function Sn(t,n,r,o){this.r=+t,this.g=+n,this.b=+r,this.opacity=+o}lh(Sn,uf,Sy(vl,{brighter(t){return t=t==null?qa:Math.pow(qa,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?rl:Math.pow(rl,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Sn(ji(this.r),ji(this.g),ji(this.b),Ha(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:vv,formatHex:vv,formatHex8:nct,formatRgb:mv,toString:mv}));function vv(){return`#${Hi(this.r)}${Hi(this.g)}${Hi(this.b)}`}function nct(){return`#${Hi(this.r)}${Hi(this.g)}${Hi(this.b)}${Hi((isNaN(this.opacity)?1:this.opacity)*255)}`}function mv(){const t=Ha(this.opacity);return`${t===1?"rgb(":"rgba("}${ji(this.r)}, ${ji(this.g)}, ${ji(this.b)}${t===1?")":`, ${t})`}`}function Ha(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ji(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Hi(t){return t=ji(t),(t<16?"0":"")+t.toString(16)}function yv(t,n,r,o){return o<=0?t=n=r=NaN:r<=0||r>=1?t=n=NaN:n<=0&&(t=NaN),new Gn(t,n,r,o)}function ky(t){if(t instanceof Gn)return new Gn(t.h,t.s,t.l,t.opacity);if(t instanceof vl||(t=ol(t)),!t)return new Gn;if(t instanceof Gn)return t;t=t.rgb();var n=t.r/255,r=t.g/255,o=t.b/255,a=Math.min(n,r,o),u=Math.max(n,r,o),f=NaN,h=u-a,p=(u+a)/2;return h?(n===u?f=(r-o)/h+(r<o)*6:r===u?f=(o-n)/h+2:f=(n-r)/h+4,h/=p<.5?u+a:2-u-a,f*=60):h=p>0&&p<1?0:f,new Gn(f,h,p,t.opacity)}function rct(t,n,r,o){return arguments.length===1?ky(t):new Gn(t,n,r,o==null?1:o)}function Gn(t,n,r,o){this.h=+t,this.s=+n,this.l=+r,this.opacity=+o}lh(Gn,rct,Sy(vl,{brighter(t){return t=t==null?qa:Math.pow(qa,t),new Gn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?rl:Math.pow(rl,t),new Gn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*n,a=2*r-o;return new Sn(Au(t>=240?t-240:t+120,a,o),Au(t,a,o),Au(t<120?t+240:t-120,a,o),this.opacity)},clamp(){return new Gn(bv(this.h),la(this.s),la(this.l),Ha(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 t=Ha(this.opacity);return`${t===1?"hsl(":"hsla("}${bv(this.h)}, ${la(this.s)*100}%, ${la(this.l)*100}%${t===1?")":`, ${t})`}`}}));function bv(t){return t=(t||0)%360,t<0?t+360:t}function la(t){return Math.max(0,Math.min(1,t||0))}function Au(t,n,r){return(t<60?n+(r-n)*t/60:t<180?r:t<240?n+(r-n)*(240-t)/60:n)*255}const Cy=t=>()=>t;function ict(t,n){return function(r){return t+r*n}}function oct(t,n,r){return t=Math.pow(t,r),n=Math.pow(n,r)-t,r=1/r,function(o){return Math.pow(t+o*n,r)}}function sct(t){return(t=+t)==1?Ty:function(n,r){return r-n?oct(n,r,t):Cy(isNaN(n)?r:n)}}function Ty(t,n){var r=n-t;return r?ict(t,r):Cy(isNaN(t)?n:t)}const wv=function t(n){var r=sct(n);function o(a,u){var f=r((a=uf(a)).r,(u=uf(u)).r),h=r(a.g,u.g),p=r(a.b,u.b),g=Ty(a.opacity,u.opacity);return function(m){return a.r=f(m),a.g=h(m),a.b=p(m),a.opacity=g(m),a+""}}return o.gamma=t,o}(1);function oi(t,n){return t=+t,n=+n,function(r){return t*(1-r)+n*r}}var ff=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mu=new RegExp(ff.source,"g");function lct(t){return function(){return t}}function act(t){return function(n){return t(n)+""}}function cct(t,n){var r=ff.lastIndex=Mu.lastIndex=0,o,a,u,f=-1,h=[],p=[];for(t=t+"",n=n+"";(o=ff.exec(t))&&(a=Mu.exec(n));)(u=a.index)>r&&(u=n.slice(r,u),h[f]?h[f]+=u:h[++f]=u),(o=o[0])===(a=a[0])?h[f]?h[f]+=a:h[++f]=a:(h[++f]=null,p.push({i:f,x:oi(o,a)})),r=Mu.lastIndex;return r<n.length&&(u=n.slice(r),h[f]?h[f]+=u:h[++f]=u),h.length<2?p[0]?act(p[0].x):lct(n):(n=p.length,function(g){for(var m=0,b;m<n;++m)h[(b=p[m]).i]=b.x(g);return h.join("")})}var xv=180/Math.PI,hf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ly(t,n,r,o,a,u){var f,h,p;return(f=Math.sqrt(t*t+n*n))&&(t/=f,n/=f),(p=t*r+n*o)&&(r-=t*p,o-=n*p),(h=Math.sqrt(r*r+o*o))&&(r/=h,o/=h,p/=h),t*o<n*r&&(t=-t,n=-n,p=-p,f=-f),{translateX:a,translateY:u,rotate:Math.atan2(n,t)*xv,skewX:Math.atan(p)*xv,scaleX:f,scaleY:h}}var aa;function uct(t){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?hf:Ly(n.a,n.b,n.c,n.d,n.e,n.f)}function fct(t){return t==null||(aa||(aa=document.createElementNS("http://www.w3.org/2000/svg","g")),aa.setAttribute("transform",t),!(t=aa.transform.baseVal.consolidate()))?hf:(t=t.matrix,Ly(t.a,t.b,t.c,t.d,t.e,t.f))}function Ey(t,n,r,o){function a(g){return g.length?g.pop()+" ":""}function u(g,m,b,x,S,M){if(g!==b||m!==x){var A=S.push("translate(",null,n,null,r);M.push({i:A-4,x:oi(g,b)},{i:A-2,x:oi(m,x)})}else(b||x)&&S.push("translate("+b+n+x+r)}function f(g,m,b,x){g!==m?(g-m>180?m+=360:m-g>180&&(g+=360),x.push({i:b.push(a(b)+"rotate(",null,o)-2,x:oi(g,m)})):m&&b.push(a(b)+"rotate("+m+o)}function h(g,m,b,x){g!==m?x.push({i:b.push(a(b)+"skewX(",null,o)-2,x:oi(g,m)}):m&&b.push(a(b)+"skewX("+m+o)}function p(g,m,b,x,S,M){if(g!==b||m!==x){var A=S.push(a(S)+"scale(",null,",",null,")");M.push({i:A-4,x:oi(g,b)},{i:A-2,x:oi(m,x)})}else(b!==1||x!==1)&&S.push(a(S)+"scale("+b+","+x+")")}return function(g,m){var b=[],x=[];return g=t(g),m=t(m),u(g.translateX,g.translateY,m.translateX,m.translateY,b,x),f(g.rotate,m.rotate,b,x),h(g.skewX,m.skewX,b,x),p(g.scaleX,g.scaleY,m.scaleX,m.scaleY,b,x),g=m=null,function(S){for(var M=-1,A=x.length,L;++M<A;)b[(L=x[M]).i]=L.x(S);return b.join("")}}}var hct=Ey(uct,"px, ","px)","deg)"),dct=Ey(fct,", ",")",")"),pct=1e-12;function _v(t){return((t=Math.exp(t))+1/t)/2}function gct(t){return((t=Math.exp(t))-1/t)/2}function vct(t){return((t=Math.exp(2*t))-1)/(t+1)}const mct=function t(n,r,o){function a(u,f){var h=u[0],p=u[1],g=u[2],m=f[0],b=f[1],x=f[2],S=m-h,M=b-p,A=S*S+M*M,L,C;if(A<pct)C=Math.log(x/g)/n,L=function(it){return[h+it*S,p+it*M,g*Math.exp(n*it*C)]};else{var E=Math.sqrt(A),z=(x*x-g*g+o*A)/(2*g*r*E),D=(x*x-g*g-o*A)/(2*x*r*E),G=Math.log(Math.sqrt(z*z+1)-z),j=Math.log(Math.sqrt(D*D+1)-D);C=(j-G)/n,L=function(it){var Q=it*C,dt=_v(G),vt=g/(r*E)*(dt*vct(n*Q+G)-gct(G));return[h+vt*S,p+vt*M,g*dt/_v(n*Q+G)]}}return L.duration=C*1e3*n/Math.SQRT2,L}return a.rho=function(u){var f=Math.max(.001,+u),h=f*f,p=h*h;return t(f,h,p)},a}(Math.SQRT2,2,4);var jo=0,Rs=0,Os=0,Ay=1e3,Ba,zs,Wa=0,Xi=0,yc=0,sl=typeof performance=="object"&&performance.now?performance:Date,My=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ah(){return Xi||(My(yct),Xi=sl.now()+yc)}function yct(){Xi=0}function Ua(){this._call=this._time=this._next=null}Ua.prototype=ch.prototype={constructor:Ua,restart:function(t,n,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?ah():+r)+(n==null?0:+n),!this._next&&zs!==this&&(zs?zs._next=this:Ba=this,zs=this),this._call=t,this._time=r,df()},stop:function(){this._call&&(this._call=null,this._time=1/0,df())}};function ch(t,n,r){var o=new Ua;return o.restart(t,n,r),o}function bct(){ah(),++jo;for(var t=Ba,n;t;)(n=Xi-t._time)>=0&&t._call.call(void 0,n),t=t._next;--jo}function Sv(){Xi=(Wa=sl.now())+yc,jo=Rs=0;try{bct()}finally{jo=0,xct(),Xi=0}}function wct(){var t=sl.now(),n=t-Wa;n>Ay&&(yc-=n,Wa=t)}function xct(){for(var t,n=Ba,r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(r=n._next,n._next=null,n=t?t._next=r:Ba=r);zs=t,df(o)}function df(t){if(!jo){Rs&&(Rs=clearTimeout(Rs));var n=t-Xi;n>24?(t<1/0&&(Rs=setTimeout(Sv,t-sl.now()-yc)),Os&&(Os=clearInterval(Os))):(Os||(Wa=sl.now(),Os=setInterval(wct,Ay)),jo=1,My(Sv))}}function kv(t,n,r){var o=new Ua;return n=n==null?0:+n,o.restart(a=>{o.stop(),t(a+n)},n,r),o}var _ct=gl("start","end","cancel","interrupt"),Sct=[],Ny=0,Cv=1,pf=2,xa=3,Tv=4,gf=5,_a=6;function bc(t,n,r,o,a,u){var f=t.__transition;if(!f)t.__transition={};else if(r in f)return;kct(t,r,{name:n,index:o,group:a,on:_ct,tween:Sct,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:Ny})}function uh(t,n){var r=Yn(t,n);if(r.state>Ny)throw new Error("too late; already scheduled");return r}function pr(t,n){var r=Yn(t,n);if(r.state>xa)throw new Error("too late; already running");return r}function Yn(t,n){var r=t.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function kct(t,n,r){var o=t.__transition,a;o[n]=r,r.timer=ch(u,0,r.time);function u(g){r.state=Cv,r.timer.restart(f,r.delay,r.time),r.delay<=g&&f(g-r.delay)}function f(g){var m,b,x,S;if(r.state!==Cv)return p();for(m in o)if(S=o[m],S.name===r.name){if(S.state===xa)return kv(f);S.state===Tv?(S.state=_a,S.timer.stop(),S.on.call("interrupt",t,t.__data__,S.index,S.group),delete o[m]):+m<n&&(S.state=_a,S.timer.stop(),S.on.call("cancel",t,t.__data__,S.index,S.group),delete o[m])}if(kv(function(){r.state===xa&&(r.state=Tv,r.timer.restart(h,r.delay,r.time),h(g))}),r.state=pf,r.on.call("start",t,t.__data__,r.index,r.group),r.state===pf){for(r.state=xa,a=new Array(x=r.tween.length),m=0,b=-1;m<x;++m)(S=r.tween[m].value.call(t,t.__data__,r.index,r.group))&&(a[++b]=S);a.length=b+1}}function h(g){for(var m=g<r.duration?r.ease.call(null,g/r.duration):(r.timer.restart(p),r.state=gf,1),b=-1,x=a.length;++b<x;)a[b].call(t,m);r.state===gf&&(r.on.call("end",t,t.__data__,r.index,r.group),p())}function p(){r.state=_a,r.timer.stop(),delete o[n];for(var g in o)return;delete t.__transition}}function Sa(t,n){var r=t.__transition,o,a,u=!0,f;if(!!r){n=n==null?null:n+"";for(f in r){if((o=r[f]).name!==n){u=!1;continue}a=o.state>pf&&o.state<gf,o.state=_a,o.timer.stop(),o.on.call(a?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete r[f]}u&&delete t.__transition}}function Cct(t){return this.each(function(){Sa(this,t)})}function Tct(t,n){var r,o;return function(){var a=pr(this,t),u=a.tween;if(u!==r){o=r=u;for(var f=0,h=o.length;f<h;++f)if(o[f].name===n){o=o.slice(),o.splice(f,1);break}}a.tween=o}}function Lct(t,n,r){var o,a;if(typeof r!="function")throw new Error;return function(){var u=pr(this,t),f=u.tween;if(f!==o){a=(o=f).slice();for(var h={name:n,value:r},p=0,g=a.length;p<g;++p)if(a[p].name===n){a[p]=h;break}p===g&&a.push(h)}u.tween=a}}function Ect(t,n){var r=this._id;if(t+="",arguments.length<2){for(var o=Yn(this.node(),r).tween,a=0,u=o.length,f;a<u;++a)if((f=o[a]).name===t)return f.value;return null}return this.each((n==null?Tct:Lct)(r,t,n))}function fh(t,n,r){var o=t._id;return t.each(function(){var a=pr(this,o);(a.value||(a.value={}))[n]=r.apply(this,arguments)}),function(a){return Yn(a,o).value[n]}}function Py(t,n){var r;return(typeof n=="number"?oi:n instanceof ol?wv:(r=ol(n))?(n=r,wv):cct)(t,n)}function Act(t){return function(){this.removeAttribute(t)}}function Mct(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Nct(t,n,r){var o,a=r+"",u;return function(){var f=this.getAttribute(t);return f===a?null:f===o?u:u=n(o=f,r)}}function Pct(t,n,r){var o,a=r+"",u;return function(){var f=this.getAttributeNS(t.space,t.local);return f===a?null:f===o?u:u=n(o=f,r)}}function Oct(t,n,r){var o,a,u;return function(){var f,h=r(this),p;return h==null?void this.removeAttribute(t):(f=this.getAttribute(t),p=h+"",f===p?null:f===o&&p===a?u:(a=p,u=n(o=f,h)))}}function $ct(t,n,r){var o,a,u;return function(){var f,h=r(this),p;return h==null?void this.removeAttributeNS(t.space,t.local):(f=this.getAttributeNS(t.space,t.local),p=h+"",f===p?null:f===o&&p===a?u:(a=p,u=n(o=f,h)))}}function Dct(t,n){var r=mc(t),o=r==="transform"?dct:Py;return this.attrTween(t,typeof n=="function"?(r.local?$ct:Oct)(r,o,fh(this,"attr."+t,n)):n==null?(r.local?Mct:Act)(r):(r.local?Pct:Nct)(r,o,n))}function Rct(t,n){return function(r){this.setAttribute(t,n.call(this,r))}}function zct(t,n){return function(r){this.setAttributeNS(t.space,t.local,n.call(this,r))}}function Ict(t,n){var r,o;function a(){var u=n.apply(this,arguments);return u!==o&&(r=(o=u)&&zct(t,u)),r}return a._value=n,a}function Fct(t,n){var r,o;function a(){var u=n.apply(this,arguments);return u!==o&&(r=(o=u)&&Rct(t,u)),r}return a._value=n,a}function qct(t,n){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var o=mc(t);return this.tween(r,(o.local?Ict:Fct)(o,n))}function Hct(t,n){return function(){uh(this,t).delay=+n.apply(this,arguments)}}function Bct(t,n){return n=+n,function(){uh(this,t).delay=n}}function Wct(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Hct:Bct)(n,t)):Yn(this.node(),n).delay}function Uct(t,n){return function(){pr(this,t).duration=+n.apply(this,arguments)}}function jct(t,n){return n=+n,function(){pr(this,t).duration=n}}function Gct(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Uct:jct)(n,t)):Yn(this.node(),n).duration}function Vct(t,n){if(typeof n!="function")throw new Error;return function(){pr(this,t).ease=n}}function Kct(t){var n=this._id;return arguments.length?this.each(Vct(n,t)):Yn(this.node(),n).ease}function Xct(t,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;pr(this,t).ease=r}}function Yct(t){if(typeof t!="function")throw new Error;return this.each(Xct(this._id,t))}function Zct(t){typeof t!="function"&&(t=fy(t));for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a)for(var u=n[a],f=u.length,h=o[a]=[],p,g=0;g<f;++g)(p=u[g])&&t.call(p,p.__data__,g,u)&&h.push(p);return new zr(o,this._parents,this._name,this._id)}function Jct(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,r=t._groups,o=n.length,a=r.length,u=Math.min(o,a),f=new Array(o),h=0;h<u;++h)for(var p=n[h],g=r[h],m=p.length,b=f[h]=new Array(m),x,S=0;S<m;++S)(x=p[S]||g[S])&&(b[S]=x);for(;h<o;++h)f[h]=n[h];return new zr(f,this._parents,this._name,this._id)}function Qct(t){return(t+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function tut(t,n,r){var o,a,u=Qct(n)?uh:pr;return function(){var f=u(this,t),h=f.on;h!==o&&(a=(o=h).copy()).on(n,r),f.on=a}}function eut(t,n){var r=this._id;return arguments.length<2?Yn(this.node(),r).on.on(t):this.each(tut(r,t,n))}function nut(t){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==t)return;n&&n.removeChild(this)}}function rut(){return this.on("end.remove",nut(this._id))}function iut(t){var n=this._name,r=this._id;typeof t!="function"&&(t=oh(t));for(var o=this._groups,a=o.length,u=new Array(a),f=0;f<a;++f)for(var h=o[f],p=h.length,g=u[f]=new Array(p),m,b,x=0;x<p;++x)(m=h[x])&&(b=t.call(m,m.__data__,x,h))&&("__data__"in m&&(b.__data__=m.__data__),g[x]=b,bc(g[x],n,r,x,g,Yn(m,r)));return new zr(u,this._parents,n,r)}function out(t){var n=this._name,r=this._id;typeof t!="function"&&(t=uy(t));for(var o=this._groups,a=o.length,u=[],f=[],h=0;h<a;++h)for(var p=o[h],g=p.length,m,b=0;b<g;++b)if(m=p[b]){for(var x=t.call(m,m.__data__,b,p),S,M=Yn(m,r),A=0,L=x.length;A<L;++A)(S=x[A])&&bc(S,n,r,A,x,M);u.push(x),f.push(m)}return new zr(u,f,n,r)}var sut=pl.prototype.constructor;function lut(){return new sut(this._groups,this._parents)}function aut(t,n){var r,o,a;return function(){var u=Uo(this,t),f=(this.style.removeProperty(t),Uo(this,t));return u===f?null:u===r&&f===o?a:a=n(r=u,o=f)}}function Oy(t){return function(){this.style.removeProperty(t)}}function cut(t,n,r){var o,a=r+"",u;return function(){var f=Uo(this,t);return f===a?null:f===o?u:u=n(o=f,r)}}function uut(t,n,r){var o,a,u;return function(){var f=Uo(this,t),h=r(this),p=h+"";return h==null&&(p=h=(this.style.removeProperty(t),Uo(this,t))),f===p?null:f===o&&p===a?u:(a=p,u=n(o=f,h))}}function fut(t,n){var r,o,a,u="style."+n,f="end."+u,h;return function(){var p=pr(this,t),g=p.on,m=p.value[u]==null?h||(h=Oy(n)):void 0;(g!==r||a!==m)&&(o=(r=g).copy()).on(f,a=m),p.on=o}}function hut(t,n,r){var o=(t+="")=="transform"?hct:Py;return n==null?this.styleTween(t,aut(t,o)).on("end.style."+t,Oy(t)):typeof n=="function"?this.styleTween(t,uut(t,o,fh(this,"style."+t,n))).each(fut(this._id,t)):this.styleTween(t,cut(t,o,n),r).on("end.style."+t,null)}function dut(t,n,r){return function(o){this.style.setProperty(t,n.call(this,o),r)}}function put(t,n,r){var o,a;function u(){var f=n.apply(this,arguments);return f!==a&&(o=(a=f)&&dut(t,f,r)),o}return u._value=n,u}function gut(t,n,r){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(n==null)return this.tween(o,null);if(typeof n!="function")throw new Error;return this.tween(o,put(t,n,r==null?"":r))}function vut(t){return function(){this.textContent=t}}function mut(t){return function(){var n=t(this);this.textContent=n==null?"":n}}function yut(t){return this.tween("text",typeof t=="function"?mut(fh(this,"text",t)):vut(t==null?"":t+""))}function but(t){return function(n){this.textContent=t.call(this,n)}}function wut(t){var n,r;function o(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&but(a)),n}return o._value=t,o}function xut(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,wut(t))}function _ut(){for(var t=this._name,n=this._id,r=$y(),o=this._groups,a=o.length,u=0;u<a;++u)for(var f=o[u],h=f.length,p,g=0;g<h;++g)if(p=f[g]){var m=Yn(p,n);bc(p,t,r,g,f,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new zr(o,this._parents,t,r)}function Sut(){var t,n,r=this,o=r._id,a=r.size();return new Promise(function(u,f){var h={value:f},p={value:function(){--a===0&&u()}};r.each(function(){var g=pr(this,o),m=g.on;m!==t&&(n=(t=m).copy(),n._.cancel.push(h),n._.interrupt.push(h),n._.end.push(p)),g.on=n}),a===0&&u()})}var kut=0;function zr(t,n,r,o){this._groups=t,this._parents=n,this._name=r,this._id=o}function $y(){return++kut}var Lr=pl.prototype;zr.prototype={constructor:zr,select:iut,selectAll:out,selectChild:Lr.selectChild,selectChildren:Lr.selectChildren,filter:Zct,merge:Jct,selection:lut,transition:_ut,call:Lr.call,nodes:Lr.nodes,node:Lr.node,size:Lr.size,empty:Lr.empty,each:Lr.each,on:eut,attr:Dct,attrTween:qct,style:hut,styleTween:gut,text:yut,textTween:xut,remove:rut,tween:Ect,delay:Wct,duration:Gct,ease:Kct,easeVarying:Yct,end:Sut,[Symbol.iterator]:Lr[Symbol.iterator]};function Cut(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Tut={time:null,delay:0,duration:250,ease:Cut};function Lut(t,n){for(var r;!(r=t.__transition)||!(r=r[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return r}function Eut(t){var n,r;t instanceof zr?(n=t._id,t=t._name):(n=$y(),(r=Tut).time=ah(),t=t==null?null:t+"");for(var o=this._groups,a=o.length,u=0;u<a;++u)for(var f=o[u],h=f.length,p,g=0;g<h;++g)(p=f[g])&&bc(p,t,n,g,f,r||Lut(p,n));return new zr(o,this._parents,t,n)}pl.prototype.interrupt=Cct;pl.prototype.transition=Eut;const ca=t=>()=>t;function Aut(t,{sourceEvent:n,target:r,transform:o,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:a}})}function Pr(t,n,r){this.k=t,this.x=n,this.y=r}Pr.prototype={constructor:Pr,scale:function(t){return t===1?this:new Pr(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new Pr(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var hh=new Pr(1,0,0);Pr.prototype;function Nu(t){t.stopImmediatePropagation()}function $s(t){t.preventDefault(),t.stopImmediatePropagation()}function Mut(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Nut(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Lv(){return this.__zoom||hh}function Put(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Out(){return navigator.maxTouchPoints||"ontouchstart"in this}function $ut(t,n,r){var o=t.invertX(n[0][0])-r[0][0],a=t.invertX(n[1][0])-r[1][0],u=t.invertY(n[0][1])-r[0][1],f=t.invertY(n[1][1])-r[1][1];return t.translate(a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a),f>u?(u+f)/2:Math.min(0,u)||Math.max(0,f))}function Dut(){var t=Mut,n=Nut,r=$ut,o=Put,a=Out,u=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,p=mct,g=gl("start","zoom","end"),m,b,x,S=500,M=150,A=0,L=10;function C(I){I.property("__zoom",Lv).on("wheel.zoom",Q,{passive:!1}).on("mousedown.zoom",dt).on("dblclick.zoom",vt).filter(a).on("touchstart.zoom",kt).on("touchmove.zoom",ft).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(I,k,H,W){var et=I.selection?I.selection():I;et.property("__zoom",Lv),I!==et?G(I,k,H,W):et.interrupt().each(function(){j(this,arguments).event(W).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},C.scaleBy=function(I,k,H,W){C.scaleTo(I,function(){var et=this.__zoom.k,wt=typeof k=="function"?k.apply(this,arguments):k;return et*wt},H,W)},C.scaleTo=function(I,k,H,W){C.transform(I,function(){var et=n.apply(this,arguments),wt=this.__zoom,Et=H==null?D(et):typeof H=="function"?H.apply(this,arguments):H,qt=wt.invert(Et),Bt=typeof k=="function"?k.apply(this,arguments):k;return r(z(E(wt,Bt),Et,qt),et,f)},H,W)},C.translateBy=function(I,k,H,W){C.transform(I,function(){return r(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof H=="function"?H.apply(this,arguments):H),n.apply(this,arguments),f)},null,W)},C.translateTo=function(I,k,H,W,et){C.transform(I,function(){var wt=n.apply(this,arguments),Et=this.__zoom,qt=W==null?D(wt):typeof W=="function"?W.apply(this,arguments):W;return r(hh.translate(qt[0],qt[1]).scale(Et.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof H=="function"?-H.apply(this,arguments):-H),wt,f)},W,et)};function E(I,k){return k=Math.max(u[0],Math.min(u[1],k)),k===I.k?I:new Pr(k,I.x,I.y)}function z(I,k,H){var W=k[0]-H[0]*I.k,et=k[1]-H[1]*I.k;return W===I.x&&et===I.y?I:new Pr(I.k,W,et)}function D(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function G(I,k,H,W){I.on("start.zoom",function(){j(this,arguments).event(W).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(W).end()}).tween("zoom",function(){var et=this,wt=arguments,Et=j(et,wt).event(W),qt=n.apply(et,wt),Bt=H==null?D(qt):typeof H=="function"?H.apply(et,wt):H,Gt=Math.max(qt[1][0]-qt[0][0],qt[1][1]-qt[0][1]),ne=et.__zoom,J=typeof k=="function"?k.apply(et,wt):k,tt=p(ne.invert(Bt).concat(Gt/ne.k),J.invert(Bt).concat(Gt/J.k));return function(V){if(V===1)V=J;else{var st=tt(V),Ct=Gt/st[2];V=new Pr(Ct,Bt[0]-st[0]*Ct,Bt[1]-st[1]*Ct)}Et.zoom(null,V)}})}function j(I,k,H){return!H&&I.__zooming||new it(I,k)}function it(I,k){this.that=I,this.args=k,this.active=0,this.sourceEvent=null,this.extent=n.apply(I,k),this.taps=0}it.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,k){return this.mouse&&I!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var k=_n(this.that).datum();g.call(I,this.that,new Aut(I,{sourceEvent:this.sourceEvent,target:C,type:I,transform:this.that.__zoom,dispatch:g}),k)}};function Q(I,...k){if(!t.apply(this,arguments))return;var H=j(this,k).event(I),W=this.__zoom,et=Math.max(u[0],Math.min(u[1],W.k*Math.pow(2,o.apply(this,arguments)))),wt=Ar(I);if(H.wheel)(H.mouse[0][0]!==wt[0]||H.mouse[0][1]!==wt[1])&&(H.mouse[1]=W.invert(H.mouse[0]=wt)),clearTimeout(H.wheel);else{if(W.k===et)return;H.mouse=[wt,W.invert(wt)],Sa(this),H.start()}$s(I),H.wheel=setTimeout(Et,M),H.zoom("mouse",r(z(E(W,et),H.mouse[0],H.mouse[1]),H.extent,f));function Et(){H.wheel=null,H.end()}}function dt(I,...k){if(x||!t.apply(this,arguments))return;var H=I.currentTarget,W=j(this,k,!0).event(I),et=_n(I.view).on("mousemove.zoom",Bt,!0).on("mouseup.zoom",Gt,!0),wt=Ar(I,H),Et=I.clientX,qt=I.clientY;xy(I.view),Nu(I),W.mouse=[wt,this.__zoom.invert(wt)],Sa(this),W.start();function Bt(ne){if($s(ne),!W.moved){var J=ne.clientX-Et,tt=ne.clientY-qt;W.moved=J*J+tt*tt>A}W.event(ne).zoom("mouse",r(z(W.that.__zoom,W.mouse[0]=Ar(ne,H),W.mouse[1]),W.extent,f))}function Gt(ne){et.on("mousemove.zoom mouseup.zoom",null),_y(ne.view,W.moved),$s(ne),W.event(ne).end()}}function vt(I,...k){if(!!t.apply(this,arguments)){var H=this.__zoom,W=Ar(I.changedTouches?I.changedTouches[0]:I,this),et=H.invert(W),wt=H.k*(I.shiftKey?.5:2),Et=r(z(E(H,wt),W,et),n.apply(this,k),f);$s(I),h>0?_n(this).transition().duration(h).call(G,Et,W,I):_n(this).call(C.transform,Et,W,I)}}function kt(I,...k){if(!!t.apply(this,arguments)){var H=I.touches,W=H.length,et=j(this,k,I.changedTouches.length===W).event(I),wt,Et,qt,Bt;for(Nu(I),Et=0;Et<W;++Et)qt=H[Et],Bt=Ar(qt,this),Bt=[Bt,this.__zoom.invert(Bt),qt.identifier],et.touch0?!et.touch1&&et.touch0[2]!==Bt[2]&&(et.touch1=Bt,et.taps=0):(et.touch0=Bt,wt=!0,et.taps=1+!!m);m&&(m=clearTimeout(m)),wt&&(et.taps<2&&(b=Bt[0],m=setTimeout(function(){m=null},S)),Sa(this),et.start())}}function ft(I,...k){if(!!this.__zooming){var H=j(this,k).event(I),W=I.changedTouches,et=W.length,wt,Et,qt,Bt;for($s(I),wt=0;wt<et;++wt)Et=W[wt],qt=Ar(Et,this),H.touch0&&H.touch0[2]===Et.identifier?H.touch0[0]=qt:H.touch1&&H.touch1[2]===Et.identifier&&(H.touch1[0]=qt);if(Et=H.that.__zoom,H.touch1){var Gt=H.touch0[0],ne=H.touch0[1],J=H.touch1[0],tt=H.touch1[1],V=(V=J[0]-Gt[0])*V+(V=J[1]-Gt[1])*V,st=(st=tt[0]-ne[0])*st+(st=tt[1]-ne[1])*st;Et=E(Et,Math.sqrt(V/st)),qt=[(Gt[0]+J[0])/2,(Gt[1]+J[1])/2],Bt=[(ne[0]+tt[0])/2,(ne[1]+tt[1])/2]}else if(H.touch0)qt=H.touch0[0],Bt=H.touch0[1];else return;H.zoom("touch",r(z(Et,qt,Bt),H.extent,f))}}function U(I,...k){if(!!this.__zooming){var H=j(this,k).event(I),W=I.changedTouches,et=W.length,wt,Et;for(Nu(I),x&&clearTimeout(x),x=setTimeout(function(){x=null},S),wt=0;wt<et;++wt)Et=W[wt],H.touch0&&H.touch0[2]===Et.identifier?delete H.touch0:H.touch1&&H.touch1[2]===Et.identifier&&delete H.touch1;if(H.touch1&&!H.touch0&&(H.touch0=H.touch1,delete H.touch1),H.touch0)H.touch0[1]=this.__zoom.invert(H.touch0[0]);else if(H.end(),H.taps===2&&(Et=Ar(Et,this),Math.hypot(b[0]-Et[0],b[1]-Et[1])<L)){var qt=_n(this).on("dblclick.zoom");qt&&qt.apply(this,arguments)}}}return C.wheelDelta=function(I){return arguments.length?(o=typeof I=="function"?I:ca(+I),C):o},C.filter=function(I){return arguments.length?(t=typeof I=="function"?I:ca(!!I),C):t},C.touchable=function(I){return arguments.length?(a=typeof I=="function"?I:ca(!!I),C):a},C.extent=function(I){return arguments.length?(n=typeof I=="function"?I:ca([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),C):n},C.scaleExtent=function(I){return arguments.length?(u[0]=+I[0],u[1]=+I[1],C):[u[0],u[1]]},C.translateExtent=function(I){return arguments.length?(f[0][0]=+I[0][0],f[1][0]=+I[1][0],f[0][1]=+I[0][1],f[1][1]=+I[1][1],C):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},C.constrain=function(I){return arguments.length?(r=I,C):r},C.duration=function(I){return arguments.length?(h=+I,C):h},C.interpolate=function(I){return arguments.length?(p=I,C):p},C.on=function(){var I=g.on.apply(g,arguments);return I===g?C:I},C.clickDistance=function(I){return arguments.length?(A=(I=+I)*I,C):Math.sqrt(A)},C.tapDistance=function(I){return arguments.length?(L=+I,C):L},C}class hn{constructor(n,r){this.x=n,this.y=r}static of([n,r]){return new hn(n,r)}add(n){return new hn(this.x+n.x,this.y+n.y)}subtract(n){return new hn(this.x-n.x,this.y-n.y)}multiply(n){return new hn(this.x*n,this.y*n)}divide(n){return new hn(this.x/n,this.y/n)}dot(n){return this.x*n.x+this.y*n.y}cross(n){return this.x*n.y-n.x*this.y}hadamard(n){return new hn(this.x*n.x,this.y*n.y)}length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}normalize(){const n=this.length();return new hn(this.x/n,this.y/n)}rotateByRadians(n){const r=Math.cos(n),o=Math.sin(n);return new hn(this.x*r-this.y*o,this.x*o+this.y*r)}rotateByDegrees(n){return this.rotateByRadians(n*Math.PI/180)}}function Rut(t){const n=+this._x.call(null,t),r=+this._y.call(null,t);return Dy(this.cover(n,r),n,r,t)}function Dy(t,n,r,o){if(isNaN(n)||isNaN(r))return t;var a,u=t._root,f={data:o},h=t._x0,p=t._y0,g=t._x1,m=t._y1,b,x,S,M,A,L,C,E;if(!u)return t._root=f,t;for(;u.length;)if((A=n>=(b=(h+g)/2))?h=b:g=b,(L=r>=(x=(p+m)/2))?p=x:m=x,a=u,!(u=u[C=L<<1|A]))return a[C]=f,t;if(S=+t._x.call(null,u.data),M=+t._y.call(null,u.data),n===S&&r===M)return f.next=u,a?a[C]=f:t._root=f,t;do a=a?a[C]=new Array(4):t._root=new Array(4),(A=n>=(b=(h+g)/2))?h=b:g=b,(L=r>=(x=(p+m)/2))?p=x:m=x;while((C=L<<1|A)===(E=(M>=x)<<1|S>=b));return a[E]=u,a[C]=f,t}function zut(t){var n,r,o=t.length,a,u,f=new Array(o),h=new Array(o),p=1/0,g=1/0,m=-1/0,b=-1/0;for(r=0;r<o;++r)isNaN(a=+this._x.call(null,n=t[r]))||isNaN(u=+this._y.call(null,n))||(f[r]=a,h[r]=u,a<p&&(p=a),a>m&&(m=a),u<g&&(g=u),u>b&&(b=u));if(p>m||g>b)return this;for(this.cover(p,g).cover(m,b),r=0;r<o;++r)Dy(this,f[r],h[r],t[r]);return this}function Iut(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var r=this._x0,o=this._y0,a=this._x1,u=this._y1;if(isNaN(r))a=(r=Math.floor(t))+1,u=(o=Math.floor(n))+1;else{for(var f=a-r||1,h=this._root,p,g;r>t||t>=a||o>n||n>=u;)switch(g=(n<o)<<1|t<r,p=new Array(4),p[g]=h,h=p,f*=2,g){case 0:a=r+f,u=o+f;break;case 1:r=a-f,u=o+f;break;case 2:a=r+f,o=u-f;break;case 3:r=a-f,o=u-f;break}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=o,this._x1=a,this._y1=u,this}function Fut(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t}function qut(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function dn(t,n,r,o,a){this.node=t,this.x0=n,this.y0=r,this.x1=o,this.y1=a}function Hut(t,n,r){var o,a=this._x0,u=this._y0,f,h,p,g,m=this._x1,b=this._y1,x=[],S=this._root,M,A;for(S&&x.push(new dn(S,a,u,m,b)),r==null?r=1/0:(a=t-r,u=n-r,m=t+r,b=n+r,r*=r);M=x.pop();)if(!(!(S=M.node)||(f=M.x0)>m||(h=M.y0)>b||(p=M.x1)<a||(g=M.y1)<u))if(S.length){var L=(f+p)/2,C=(h+g)/2;x.push(new dn(S[3],L,C,p,g),new dn(S[2],f,C,L,g),new dn(S[1],L,h,p,C),new dn(S[0],f,h,L,C)),(A=(n>=C)<<1|t>=L)&&(M=x[x.length-1],x[x.length-1]=x[x.length-1-A],x[x.length-1-A]=M)}else{var E=t-+this._x.call(null,S.data),z=n-+this._y.call(null,S.data),D=E*E+z*z;if(D<r){var G=Math.sqrt(r=D);a=t-G,u=n-G,m=t+G,b=n+G,o=S.data}}return o}function But(t){if(isNaN(m=+this._x.call(null,t))||isNaN(b=+this._y.call(null,t)))return this;var n,r=this._root,o,a,u,f=this._x0,h=this._y0,p=this._x1,g=this._y1,m,b,x,S,M,A,L,C;if(!r)return this;if(r.length)for(;;){if((M=m>=(x=(f+p)/2))?f=x:p=x,(A=b>=(S=(h+g)/2))?h=S:g=S,n=r,!(r=r[L=A<<1|M]))return this;if(!r.length)break;(n[L+1&3]||n[L+2&3]||n[L+3&3])&&(o=n,C=L)}for(;r.data!==t;)if(a=r,!(r=r.next))return this;return(u=r.next)&&delete r.next,a?(u?a.next=u:delete a.next,this):n?(u?n[L]=u:delete n[L],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[C]=r:this._root=r),this):(this._root=u,this)}function Wut(t){for(var n=0,r=t.length;n<r;++n)this.remove(t[n]);return this}function Uut(){return this._root}function jut(){var t=0;return this.visit(function(n){if(!n.length)do++t;while(n=n.next)}),t}function Gut(t){var n=[],r,o=this._root,a,u,f,h,p;for(o&&n.push(new dn(o,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!t(o=r.node,u=r.x0,f=r.y0,h=r.x1,p=r.y1)&&o.length){var g=(u+h)/2,m=(f+p)/2;(a=o[3])&&n.push(new dn(a,g,m,h,p)),(a=o[2])&&n.push(new dn(a,u,m,g,p)),(a=o[1])&&n.push(new dn(a,g,f,h,m)),(a=o[0])&&n.push(new dn(a,u,f,g,m))}return this}function Vut(t){var n=[],r=[],o;for(this._root&&n.push(new dn(this._root,this._x0,this._y0,this._x1,this._y1));o=n.pop();){var a=o.node;if(a.length){var u,f=o.x0,h=o.y0,p=o.x1,g=o.y1,m=(f+p)/2,b=(h+g)/2;(u=a[0])&&n.push(new dn(u,f,h,m,b)),(u=a[1])&&n.push(new dn(u,m,h,p,b)),(u=a[2])&&n.push(new dn(u,f,b,m,g)),(u=a[3])&&n.push(new dn(u,m,b,p,g))}r.push(o)}for(;o=r.pop();)t(o.node,o.x0,o.y0,o.x1,o.y1);return this}function Kut(t){return t[0]}function Xut(t){return arguments.length?(this._x=t,this):this._x}function Yut(t){return t[1]}function Zut(t){return arguments.length?(this._y=t,this):this._y}function dh(t,n,r){var o=new ph(n==null?Kut:n,r==null?Yut:r,NaN,NaN,NaN,NaN);return t==null?o:o.addAll(t)}function ph(t,n,r,o,a,u){this._x=t,this._y=n,this._x0=r,this._y0=o,this._x1=a,this._y1=u,this._root=void 0}function Ev(t){for(var n={data:t.data},r=n;t=t.next;)r=r.next={data:t.data};return n}var vn=dh.prototype=ph.prototype;vn.copy=function(){var t=new ph(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,o;if(!n)return t;if(!n.length)return t._root=Ev(n),t;for(r=[{source:n,target:t._root=new Array(4)}];n=r.pop();)for(var a=0;a<4;++a)(o=n.source[a])&&(o.length?r.push({source:o,target:n.target[a]=new Array(4)}):n.target[a]=Ev(o));return t};vn.add=Rut;vn.addAll=zut;vn.cover=Iut;vn.data=Fut;vn.extent=qut;vn.find=Hut;vn.remove=But;vn.removeAll=Wut;vn.root=Uut;vn.size=jut;vn.visit=Gut;vn.visitAfter=Vut;vn.x=Xut;vn.y=Zut;function gn(t){return function(){return t}}function li(t){return(t()-.5)*1e-6}function Jut(t){return t.x+t.vx}function Qut(t){return t.y+t.vy}function tft(t){var n,r,o,a=1,u=1;typeof t!="function"&&(t=gn(t==null?1:+t));function f(){for(var g,m=n.length,b,x,S,M,A,L,C=0;C<u;++C)for(b=dh(n,Jut,Qut).visitAfter(h),g=0;g<m;++g)x=n[g],A=r[x.index],L=A*A,S=x.x+x.vx,M=x.y+x.vy,b.visit(E);function E(z,D,G,j,it){var Q=z.data,dt=z.r,vt=A+dt;if(Q){if(Q.index>x.index){var kt=S-Q.x-Q.vx,ft=M-Q.y-Q.vy,U=kt*kt+ft*ft;U<vt*vt&&(kt===0&&(kt=li(o),U+=kt*kt),ft===0&&(ft=li(o),U+=ft*ft),U=(vt-(U=Math.sqrt(U)))/U*a,x.vx+=(kt*=U)*(vt=(dt*=dt)/(L+dt)),x.vy+=(ft*=U)*vt,Q.vx-=kt*(vt=1-vt),Q.vy-=ft*vt)}return}return D>S+vt||j<S-vt||G>M+vt||it<M-vt}}function h(g){if(g.data)return g.r=r[g.data.index];for(var m=g.r=0;m<4;++m)g[m]&&g[m].r>g.r&&(g.r=g[m].r)}function p(){if(!!n){var g,m=n.length,b;for(r=new Array(m),g=0;g<m;++g)b=n[g],r[b.index]=+t(b,g,n)}}return f.initialize=function(g,m){n=g,o=m,p()},f.iterations=function(g){return arguments.length?(u=+g,f):u},f.strength=function(g){return arguments.length?(a=+g,f):a},f.radius=function(g){return arguments.length?(t=typeof g=="function"?g:gn(+g),p(),f):t},f}function eft(t){return t.index}function Av(t,n){var r=t.get(n);if(!r)throw new Error("node not found: "+n);return r}function nft(t){var n=eft,r=b,o,a=gn(30),u,f,h,p,g,m=1;t==null&&(t=[]);function b(L){return 1/Math.min(h[L.source.index],h[L.target.index])}function x(L){for(var C=0,E=t.length;C<m;++C)for(var z=0,D,G,j,it,Q,dt,vt;z<E;++z)D=t[z],G=D.source,j=D.target,it=j.x+j.vx-G.x-G.vx||li(g),Q=j.y+j.vy-G.y-G.vy||li(g),dt=Math.sqrt(it*it+Q*Q),dt=(dt-u[z])/dt*L*o[z],it*=dt,Q*=dt,j.vx-=it*(vt=p[z]),j.vy-=Q*vt,G.vx+=it*(vt=1-vt),G.vy+=Q*vt}function S(){if(!!f){var L,C=f.length,E=t.length,z=new Map(f.map((G,j)=>[n(G,j,f),G])),D;for(L=0,h=new Array(C);L<E;++L)D=t[L],D.index=L,typeof D.source!="object"&&(D.source=Av(z,D.source)),typeof D.target!="object"&&(D.target=Av(z,D.target)),h[D.source.index]=(h[D.source.index]||0)+1,h[D.target.index]=(h[D.target.index]||0)+1;for(L=0,p=new Array(E);L<E;++L)D=t[L],p[L]=h[D.source.index]/(h[D.source.index]+h[D.target.index]);o=new Array(E),M(),u=new Array(E),A()}}function M(){if(!!f)for(var L=0,C=t.length;L<C;++L)o[L]=+r(t[L],L,t)}function A(){if(!!f)for(var L=0,C=t.length;L<C;++L)u[L]=+a(t[L],L,t)}return x.initialize=function(L,C){f=L,g=C,S()},x.links=function(L){return arguments.length?(t=L,S(),x):t},x.id=function(L){return arguments.length?(n=L,x):n},x.iterations=function(L){return arguments.length?(m=+L,x):m},x.strength=function(L){return arguments.length?(r=typeof L=="function"?L:gn(+L),M(),x):r},x.distance=function(L){return arguments.length?(a=typeof L=="function"?L:gn(+L),A(),x):a},x}const rft=1664525,ift=1013904223,Mv=4294967296;function oft(){let t=1;return()=>(t=(rft*t+ift)%Mv)/Mv}function sft(t){return t.x}function lft(t){return t.y}var aft=10,cft=Math.PI*(3-Math.sqrt(5));function uft(t){var n,r=1,o=.001,a=1-Math.pow(o,1/300),u=0,f=.6,h=new Map,p=ch(b),g=gl("tick","end"),m=oft();t==null&&(t=[]);function b(){x(),g.call("tick",n),r<o&&(p.stop(),g.call("end",n))}function x(A){var L,C=t.length,E;A===void 0&&(A=1);for(var z=0;z<A;++z)for(r+=(u-r)*a,h.forEach(function(D){D(r)}),L=0;L<C;++L)E=t[L],E.fx==null?E.x+=E.vx*=f:(E.x=E.fx,E.vx=0),E.fy==null?E.y+=E.vy*=f:(E.y=E.fy,E.vy=0);return n}function S(){for(var A=0,L=t.length,C;A<L;++A){if(C=t[A],C.index=A,C.fx!=null&&(C.x=C.fx),C.fy!=null&&(C.y=C.fy),isNaN(C.x)||isNaN(C.y)){var E=aft*Math.sqrt(.5+A),z=A*cft;C.x=E*Math.cos(z),C.y=E*Math.sin(z)}(isNaN(C.vx)||isNaN(C.vy))&&(C.vx=C.vy=0)}}function M(A){return A.initialize&&A.initialize(t,m),A}return S(),n={tick:x,restart:function(){return p.restart(b),n},stop:function(){return p.stop(),n},nodes:function(A){return arguments.length?(t=A,S(),h.forEach(M),n):t},alpha:function(A){return arguments.length?(r=+A,n):r},alphaMin:function(A){return arguments.length?(o=+A,n):o},alphaDecay:function(A){return arguments.length?(a=+A,n):+a},alphaTarget:function(A){return arguments.length?(u=+A,n):u},velocityDecay:function(A){return arguments.length?(f=1-A,n):1-f},randomSource:function(A){return arguments.length?(m=A,h.forEach(M),n):m},force:function(A,L){return arguments.length>1?(L==null?h.delete(A):h.set(A,M(L)),n):h.get(A)},find:function(A,L,C){var E=0,z=t.length,D,G,j,it,Q;for(C==null?C=1/0:C*=C,E=0;E<z;++E)it=t[E],D=A-it.x,G=L-it.y,j=D*D+G*G,j<C&&(Q=it,C=j);return Q},on:function(A,L){return arguments.length>1?(g.on(A,L),n):g.on(A)}}}function fft(){var t,n,r,o,a=gn(-30),u,f=1,h=1/0,p=.81;function g(S){var M,A=t.length,L=dh(t,sft,lft).visitAfter(b);for(o=S,M=0;M<A;++M)n=t[M],L.visit(x)}function m(){if(!!t){var S,M=t.length,A;for(u=new Array(M),S=0;S<M;++S)A=t[S],u[A.index]=+a(A,S,t)}}function b(S){var M=0,A,L,C=0,E,z,D;if(S.length){for(E=z=D=0;D<4;++D)(A=S[D])&&(L=Math.abs(A.value))&&(M+=A.value,C+=L,E+=L*A.x,z+=L*A.y);S.x=E/C,S.y=z/C}else{A=S,A.x=A.data.x,A.y=A.data.y;do M+=u[A.data.index];while(A=A.next)}S.value=M}function x(S,M,A,L){if(!S.value)return!0;var C=S.x-n.x,E=S.y-n.y,z=L-M,D=C*C+E*E;if(z*z/p<D)return D<h&&(C===0&&(C=li(r),D+=C*C),E===0&&(E=li(r),D+=E*E),D<f&&(D=Math.sqrt(f*D)),n.vx+=C*S.value*o/D,n.vy+=E*S.value*o/D),!0;if(S.length||D>=h)return;(S.data!==n||S.next)&&(C===0&&(C=li(r),D+=C*C),E===0&&(E=li(r),D+=E*E),D<f&&(D=Math.sqrt(f*D)));do S.data!==n&&(z=u[S.data.index]*o/D,n.vx+=C*z,n.vy+=E*z);while(S=S.next)}return g.initialize=function(S,M){t=S,r=M,m()},g.strength=function(S){return arguments.length?(a=typeof S=="function"?S:gn(+S),m(),g):a},g.distanceMin=function(S){return arguments.length?(f=S*S,g):Math.sqrt(f)},g.distanceMax=function(S){return arguments.length?(h=S*S,g):Math.sqrt(h)},g.theta=function(S){return arguments.length?(p=S*S,g):Math.sqrt(p)},g}function hft(t){var n=gn(.1),r,o,a;typeof t!="function"&&(t=gn(t==null?0:+t));function u(h){for(var p=0,g=r.length,m;p<g;++p)m=r[p],m.vx+=(a[p]-m.x)*o[p]*h}function f(){if(!!r){var h,p=r.length;for(o=new Array(p),a=new Array(p),h=0;h<p;++h)o[h]=isNaN(a[h]=+t(r[h],h,r))?0:+n(r[h],h,r)}}return u.initialize=function(h){r=h,f()},u.strength=function(h){return arguments.length?(n=typeof h=="function"?h:gn(+h),f(),u):n},u.x=function(h){return arguments.length?(t=typeof h=="function"?h:gn(+h),f(),u):t},u}function dft(t){var n=gn(.1),r,o,a;typeof t!="function"&&(t=gn(t==null?0:+t));function u(h){for(var p=0,g=r.length,m;p<g;++p)m=r[p],m.vy+=(a[p]-m.y)*o[p]*h}function f(){if(!!r){var h,p=r.length;for(o=new Array(p),a=new Array(p),h=0;h<p;++h)o[h]=isNaN(a[h]=+t(r[h],h,r))?0:+n(r[h],h,r)}}return u.initialize=function(h){r=h,f()},u.strength=function(h){return arguments.length?(n=typeof h=="function"?h:gn(+h),f(),u):n},u.y=function(h){return arguments.length?(t=typeof h=="function"?h:gn(+h),f(),u):t},u}var pft=Object.defineProperty,gft=(t,n,r)=>n in t?pft(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,Me=(t,n,r)=>(gft(t,typeof n!="symbol"?n+"":n,r),r);function vft(){return{drag:{end:0,start:.1},filter:{link:1,type:.1,unlinked:{include:.1,exclude:.1}},focus:{acquire:()=>.1,release:()=>.1},initialize:1,labels:{links:{hide:0,show:0},nodes:{hide:0,show:0}},resize:.5}}function mft(){return{centering:{enabled:!0,strength:.1},charge:{enabled:!0,strength:-1},collision:{enabled:!0,strength:1,radiusMultiplier:2},link:{enabled:!0,strength:1,length:128}}}function yft(){return{includeUnlinked:!0,linkFilter:()=>!0,nodeTypeFilter:void 0,showLinkLabels:!0,showNodeLabels:!0}}function Ry(t){t.preventDefault(),t.stopPropagation()}function zy(t){return typeof t=="number"}function gi(t,n){return zy(t.nodeRadius)?t.nodeRadius:t.nodeRadius(n)}function bft(t){return`${t.source.id}-${t.target.id}`}function Iy(t){return`link-arrow-${t}`.replace(/[()]/g,"~")}function wft(t){return`url(#${Iy(t.color)})`}function xft(t){return{size:t,padding:(n,r)=>gi(r,n)+2*t,ref:[t/2,t/2],path:[[0,0],[0,t],[t,t/2]],viewBox:[0,0,t,t].join(",")}}const Fy={Arrow:t=>xft(t)},_ft=(t,n,r)=>[n/2,r/2],Sft=(t,n,r)=>[Nv(0,n),Nv(0,r)];function Nv(t,n){return Math.random()*(n-t)+t}const vf={Centered:_ft,Randomized:Sft};var Go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qy={},mf=Go&&Go.__assign||function(){return mf=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},mf.apply(this,arguments)},kft=Go&&Go.__read||function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),a,u=[],f;try{for(;(n===void 0||n-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(h){f={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(f)throw f.error}}return u},Cft=Go&&Go.__spreadArray||function(t,n,r){if(r||arguments.length===2)for(var o=0,a=n.length,u;o<a;o++)(u||!(o in n))&&(u||(u=Array.prototype.slice.call(n,0,o)),u[o]=n[o]);return t.concat(u||Array.prototype.slice.call(n))};Object.defineProperty(qy,"__esModule",{value:!0});var Pv=function(t){if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){var n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},ai=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(function(r,o){if(Array.isArray(o))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(o).forEach(function(a){["__proto__","constructor","prototype"].includes(a)||(Array.isArray(r[a])&&Array.isArray(o[a])?r[a]=ai.options.mergeArrays?Array.from(new Set(r[a].concat(o[a]))):o[a]:Pv(r[a])&&Pv(o[a])?r[a]=ai(r[a],o[a]):r[a]=o[a])}),r},{})},Hy={mergeArrays:!0};ai.options=Hy;ai.withOptions=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];ai.options=mf({mergeArrays:!0},t);var o=ai.apply(void 0,Cft([],kft(n),!1));return ai.options=Hy,o};var Tft=qy.default=ai;function Lft(){return{autoResize:!1,callbacks:{},initial:yft(),nodeRadius:16,marker:Fy.Arrow(4),modifiers:{},positionInitializer:vf.Centered,simulation:{alphas:vft(),forces:mft()},zoom:{initial:1,min:.1,max:2}}}function Eft(t={}){return Tft.withOptions({mergeArrays:!1},Lft(),t)}function Aft(t,n){let r;return()=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>t(),n)}}function Mft({applyZoom:t,container:n,onDoubleClick:r,onPointerMoved:o,onPointerUp:a,offset:[u,f],scale:h,zoom:p}){const g=n.classed("graph",!0).append("svg").attr("height","100%").attr("width","100%").call(p).on("contextmenu",m=>Ry(m)).on("dblclick",m=>r==null?void 0:r(m)).on("dblclick.zoom",null).on("pointermove",m=>o==null?void 0:o(m)).on("pointerup",m=>a==null?void 0:a(m)).style("cursor","grab");return t&&g.call(p.transform,hh.translate(u,f).scale(h)),g.append("g")}function Nft({canvas:t,scale:n,xOffset:r,yOffset:o}){t==null||t.attr("transform",`translate(${r},${o})scale(${n})`)}function Pft({config:t,onDragStart:n,onDragEnd:r}){var o,a;const u=jat().filter(f=>f.type==="mousedown"?f.button===0:f.type==="touchstart"?f.touches.length===1:!1).on("start",(f,h)=>{f.active===0&&n(f,h),_n(f.sourceEvent.target).classed("grabbed",!0),h.fx=h.x,h.fy=h.y}).on("drag",(f,h)=>{h.fx=f.x,h.fy=f.y}).on("end",(f,h)=>{f.active===0&&r(f,h),_n(f.sourceEvent.target).classed("grabbed",!1),h.fx=void 0,h.fy=void 0});return(a=(o=t.modifiers).drag)==null||a.call(o,u),u}function Oft({graph:t,filter:n,focusedNode:r,includeUnlinked:o,linkFilter:a}){const u=t.links.filter(p=>n.includes(p.source.type)&&n.includes(p.target.type)&&a(p)),f=p=>u.find(g=>g.source.id===p.id||g.target.id===p.id)!==void 0,h=t.nodes.filter(p=>n.includes(p.type)&&(o||f(p)));return r===void 0||!n.includes(r.type)?{nodes:h,links:u}:$ft({nodes:h,links:u},r)}function $ft(t,n){const r=[...Dft(t,n),...Rft(t,n)],o=r.flatMap(a=>[a.source,a.target]);return{nodes:[...new Set([...o,n])],links:[...new Set(r)]}}function Dft(t,n){return By(t,n,(r,o)=>r.target.id===o.id)}function Rft(t,n){return By(t,n,(r,o)=>r.source.id===o.id)}function By(t,n,r){const o=new Set(t.links),a=new Set([n]),u=[];for(;o.size>0;){const f=[...o].filter(h=>[...a].some(p=>r(h,p)));if(f.length===0)return u;f.forEach(h=>{a.add(h.source),a.add(h.target),u.push(h),o.delete(h)})}return u}function yf(t){var n;return(n=t.x)!=null?n:0}function bf(t){var n;return(n=t.y)!=null?n:0}function gh({source:t,target:n}){const r=new hn(yf(t),bf(t)),o=new hn(yf(n),bf(n)),a=o.subtract(r),u=a.length(),f=a.normalize(),h=f.multiply(-1);return{s:r,t:o,dist:u,norm:f,endNorm:h}}function Wy({center:t,node:n}){const r=new hn(yf(n),bf(n));let o=t;return r.x===o.x&&r.y===o.y&&(o=o.add(new hn(0,1))),{n:r,c:o}}function Uy({config:t,source:n,target:r}){const{s:o,t:a,norm:u}=gh({config:t,source:n,target:r}),f=o.add(u.multiply(gi(t,n)-1)),h=a.subtract(u.multiply(t.marker.padding(r,t)));return{start:f,end:h}}function zft(t){const{start:n,end:r}=Uy(t);return`M${n.x},${n.y}
30
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var O;m&&(O=c.ownerDocument.defaultView.scrollY),s.input.focus(),m&&c.ownerDocument.defaultView.scrollTo(null,O),s.input.reset(),l.somethingSelected()||(c.value=i.prevInput=" "),i.contextMenuPending=q,s.selForContextMenu=l.doc.sel,clearTimeout(s.detectingSelectAll);function B(){if(c.selectionStart!=null){var rt=l.somethingSelected(),ct="\u200B"+(rt?c.value:"");c.value="\u21DA",c.value=ct,i.prevInput=rt?"":"\u200B",c.selectionStart=1,c.selectionEnd=ct.length,s.selForContextMenu=l.doc.sel}}function q(){if(i.contextMenuPending==q&&(i.contextMenuPending=!1,i.wrapper.style.cssText=_,c.style.cssText=w,p&&g<9&&s.scrollbars.setScrollTop(s.scroller.scrollTop=v),c.selectionStart!=null)){(!p||p&&g<9)&&B();var rt=0,ct=function(){s.selForContextMenu==l.doc.sel&&c.selectionStart==0&&c.selectionEnd>0&&i.prevInput=="\u200B"?$e(l,Rd)(l):rt++<10?s.detectingSelectAll=setTimeout(ct,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(ct,200)}}if(p&&g>=9&&B(),vt){vr(e);var X=function(){je(window,"mouseup",X),setTimeout(q,20)};bt(window,"mouseup",X)}else setTimeout(q,50)},Te.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Te.prototype.setUneditable=function(){},Te.prototype.needsContentAttribute=!1;function Kw(e,i){if(i=i?tt(i):{},i.value=e.value,!i.tabindex&&e.tabIndex&&(i.tabindex=e.tabIndex),!i.placeholder&&e.placeholder&&(i.placeholder=e.placeholder),i.autofocus==null){var l=wt(e.ownerDocument);i.autofocus=l==e||e.getAttribute("autofocus")!=null&&l==document.body}function s(){e.value=y.getValue()}var c;if(e.form&&(bt(e.form,"submit",s),!i.leaveSubmitMethodAlone)){var d=e.form;c=d.submit;try{var v=d.submit=function(){s(),d.submit=c,d.submit(),d.submit=v}}catch{}}i.finishInit=function(w){w.save=s,w.getTextArea=function(){return e},w.toTextArea=function(){w.toTextArea=isNaN,s(),e.parentNode.removeChild(w.getWrapperElement()),e.style.display="",e.form&&(je(e.form,"submit",s),!i.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=c))}},e.style.display="none";var y=we(function(w){return e.parentNode.insertBefore(w,e.nextSibling)},i);return y}function Xw(e){e.off=je,e.on=bt,e.wheelEventPixels=nw,e.Doc=sn,e.splitLines=es,e.countColumn=V,e.findColumn=nt,e.isWordChar=Ot,e.Pass=Lt,e.signal=ve,e.Line=no,e.changeEnd=Kr,e.scrollbarModel=hd,e.Pos=R,e.cmpPos=K,e.modes=Fn,e.mimeModes=Hr,e.resolveMode=yn,e.getMode=mr,e.modeExtensions=Br,e.extendMode=_l,e.copyState=yr,e.startState=ns,e.innerMode=Wr,e.commands=Cs,e.keyMap=kr,e.keyName=Jd,e.isModifierKey=Yd,e.lookupKey=vo,e.normalizeKeyMap=kw,e.StringStream=ke,e.SharedTextMarker=_s,e.TextMarker=Yr,e.LineWidget=xs,e.e_preventDefault=Ge,e.e_stopPropagation=yi,e.e_stop=vr,e.addClass=Et,e.contains=et,e.rmClass=ft,e.keyNames=Zr}qw(we),Uw(we);var Yw="iter insert remove copy getEditor constructor".split(" ");for(var Jl in sn.prototype)sn.prototype.hasOwnProperty(Jl)&&Ct(Yw,Jl)<0&&(we.prototype[Jl]=function(e){return function(){return e.apply(this.doc,arguments)}}(sn.prototype[Jl]));return Ze(sn),we.inputStyles={textarea:Te,contenteditable:ae},we.defineMode=function(e){!we.defaults.mode&&e!="null"&&(we.defaults.mode=e),xl.apply(this,arguments)},we.defineMIME=to,we.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),we.defineMIME("text/plain","null"),we.defineExtension=function(e,i){we.prototype[e]=i},we.defineDocExtension=function(e,i){sn.prototype[e]=i},we.fromTextArea=Kw,Xw(we),we.version="5.65.9",we})}(Lu)),Lu.exports}var qst=Yo(),Hst={exports:{}};(function(t,n){(function(r){r(Yo())})(function(r){r.defineMode("javascript",function(o,a){var u=o.indentUnit,f=a.statementIndent,h=a.jsonld,p=a.json||h,g=a.trackScope!==!1,m=a.typescript,b=a.wordCharacters||/[\w$\xa1-\uffff]/,x=function(){function T(Ne){return{type:Ne,style:"keyword"}}var $=T("keyword a"),R=T("keyword b"),K=T("keyword c"),It=T("keyword d"),Vt=T("operator"),ee={type:"atom",style:"atom"};return{if:T("if"),while:$,with:$,else:R,do:R,try:R,finally:R,return:It,break:It,continue:It,new:T("new"),delete:K,void:K,throw:K,debugger:T("debugger"),var:T("var"),const:T("var"),let:T("var"),function:T("function"),catch:T("catch"),for:T("for"),switch:T("switch"),case:T("case"),default:T("default"),in:Vt,typeof:Vt,instanceof:Vt,true:ee,false:ee,null:ee,undefined:ee,NaN:ee,Infinity:ee,this:T("this"),class:T("class"),super:T("atom"),yield:K,export:T("export"),import:T("import"),extends:K,await:K}}(),S=/[+\-*&%=<>!?|~^@]/,M=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function A(T){for(var $=!1,R,K=!1;(R=T.next())!=null;){if(!$){if(R=="/"&&!K)return;R=="["?K=!0:K&&R=="]"&&(K=!1)}$=!$&&R=="\\"}}var L,C;function E(T,$,R){return L=T,C=R,$}function z(T,$){var R=T.next();if(R=='"'||R=="'")return $.tokenize=D(R),$.tokenize(T,$);if(R=="."&&T.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(R=="."&&T.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(R))return E(R);if(R=="="&&T.eat(">"))return E("=>","operator");if(R=="0"&&T.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(R))return T.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(R=="/")return T.eat("*")?($.tokenize=G,G(T,$)):T.eat("/")?(T.skipToEnd(),E("comment","comment")):Qn(T,$,1)?(A(T),T.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(T.eat("="),E("operator","operator",T.current()));if(R=="`")return $.tokenize=j,j(T,$);if(R=="#"&&T.peek()=="!")return T.skipToEnd(),E("meta","meta");if(R=="#"&&T.eatWhile(b))return E("variable","property");if(R=="<"&&T.match("!--")||R=="-"&&T.match("->")&&!/\S/.test(T.string.slice(0,T.start)))return T.skipToEnd(),E("comment","comment");if(S.test(R))return(R!=">"||!$.lexical||$.lexical.type!=">")&&(T.eat("=")?(R=="!"||R=="=")&&T.eat("="):/[<>*+\-|&?]/.test(R)&&(T.eat(R),R==">"&&T.eat(R))),R=="?"&&T.eat(".")?E("."):E("operator","operator",T.current());if(b.test(R)){T.eatWhile(b);var K=T.current();if($.lastType!="."){if(x.propertyIsEnumerable(K)){var It=x[K];return E(It.type,It.style,K)}if(K=="async"&&T.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",K)}return E("variable","variable",K)}}function D(T){return function($,R){var K=!1,It;if(h&&$.peek()=="@"&&$.match(M))return R.tokenize=z,E("jsonld-keyword","meta");for(;(It=$.next())!=null&&!(It==T&&!K);)K=!K&&It=="\\";return K||(R.tokenize=z),E("string","string")}}function G(T,$){for(var R=!1,K;K=T.next();){if(K=="/"&&R){$.tokenize=z;break}R=K=="*"}return E("comment","comment")}function j(T,$){for(var R=!1,K;(K=T.next())!=null;){if(!R&&(K=="`"||K=="$"&&T.eat("{"))){$.tokenize=z;break}R=!R&&K=="\\"}return E("quasi","string-2",T.current())}var it="([{}])";function Q(T,$){$.fatArrowAt&&($.fatArrowAt=null);var R=T.string.indexOf("=>",T.start);if(!(R<0)){if(m){var K=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(T.string.slice(T.start,R));K&&(R=K.index)}for(var It=0,Vt=!1,ee=R-1;ee>=0;--ee){var Ne=T.string.charAt(ee),En=it.indexOf(Ne);if(En>=0&&En<3){if(!It){++ee;break}if(--It==0){Ne=="("&&(Vt=!0);break}}else if(En>=3&&En<6)++It;else if(b.test(Ne))Vt=!0;else if(/["'\/`]/.test(Ne))for(;;--ee){if(ee==0)return;var Ft=T.string.charAt(ee-1);if(Ft==Ne&&T.string.charAt(ee-2)!="\\"){ee--;break}}else if(Vt&&!It){++ee;break}}Vt&&!It&&($.fatArrowAt=ee)}}var dt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function vt(T,$,R,K,It,Vt){this.indented=T,this.column=$,this.type=R,this.prev=It,this.info=Vt,K!=null&&(this.align=K)}function kt(T,$){if(!g)return!1;for(var R=T.localVars;R;R=R.next)if(R.name==$)return!0;for(var K=T.context;K;K=K.prev)for(var R=K.vars;R;R=R.next)if(R.name==$)return!0}function ft(T,$,R,K,It){var Vt=T.cc;for(U.state=T,U.stream=It,U.marked=null,U.cc=Vt,U.style=$,T.lexical.hasOwnProperty("align")||(T.lexical.align=!0);;){var ee=Vt.length?Vt.pop():p?Lt:Ct;if(ee(R,K)){for(;Vt.length&&Vt[Vt.length-1].lex;)Vt.pop()();return U.marked?U.marked:R=="variable"&&kt(T,K)?"variable-2":$}}}var U={state:null,column:null,marked:null,cc:null};function I(){for(var T=arguments.length-1;T>=0;T--)U.cc.push(arguments[T])}function k(){return I.apply(null,arguments),!0}function H(T,$){for(var R=$;R;R=R.next)if(R.name==T)return!0;return!1}function W(T){var $=U.state;if(U.marked="def",!!g){if($.context){if($.lexical.info=="var"&&$.context&&$.context.block){var R=et(T,$.context);if(R!=null){$.context=R;return}}else if(!H(T,$.localVars)){$.localVars=new qt(T,$.localVars);return}}a.globalVars&&!H(T,$.globalVars)&&($.globalVars=new qt(T,$.globalVars))}}function et(T,$){if($)if($.block){var R=et(T,$.prev);return R?R==$.prev?$:new Et(R,$.vars,!0):null}else return H(T,$.vars)?$:new Et($.prev,new qt(T,$.vars),!1);else return null}function wt(T){return T=="public"||T=="private"||T=="protected"||T=="abstract"||T=="readonly"}function Et(T,$,R){this.prev=T,this.vars=$,this.block=R}function qt(T,$){this.name=T,this.next=$}var Bt=new qt("this",new qt("arguments",null));function Gt(){U.state.context=new Et(U.state.context,U.state.localVars,!1),U.state.localVars=Bt}function ne(){U.state.context=new Et(U.state.context,U.state.localVars,!0),U.state.localVars=null}Gt.lex=ne.lex=!0;function J(){U.state.localVars=U.state.context.vars,U.state.context=U.state.context.prev}J.lex=!0;function tt(T,$){var R=function(){var K=U.state,It=K.indented;if(K.lexical.type=="stat")It=K.lexical.indented;else for(var Vt=K.lexical;Vt&&Vt.type==")"&&Vt.align;Vt=Vt.prev)It=Vt.indented;K.lexical=new vt(It,U.stream.column(),T,null,K.lexical,$)};return R.lex=!0,R}function V(){var T=U.state;T.lexical.prev&&(T.lexical.type==")"&&(T.indented=T.lexical.indented),T.lexical=T.lexical.prev)}V.lex=!0;function st(T){function $(R){return R==T?k():T==";"||R=="}"||R==")"||R=="]"?I():k($)}return $}function Ct(T,$){return T=="var"?k(tt("vardef",$),vr,st(";"),V):T=="keyword a"?k(tt("form"),F,Ct,V):T=="keyword b"?k(tt("form"),Ct,V):T=="keyword d"?U.stream.match(/^\s*$/,!1)?k():k(tt("stat"),nt,st(";"),V):T=="debugger"?k(st(";")):T=="{"?k(tt("}"),ne,Ln,V,J):T==";"?k():T=="if"?(U.state.lexical.info=="else"&&U.state.cc[U.state.cc.length-1]==V&&U.state.cc.pop()(),k(tt("form"),F,Ct,V,Qi)):T=="function"?k(Zn):T=="for"?k(tt("form"),ne,bl,Ct,J,V):T=="class"||m&&$=="interface"?(U.marked="keyword",k(tt("form",T=="class"?T:$),xl,V)):T=="variable"?m&&$=="declare"?(U.marked="keyword",k(Ct)):m&&($=="module"||$=="enum"||$=="type")&&U.stream.match(/^\s*\w/,!1)?(U.marked="keyword",$=="enum"?k(eo):$=="type"?k(wl,st("operator"),bt,st(";")):k(tt("form"),rn,st("{"),tt("}"),Ln,V,V)):m&&$=="namespace"?(U.marked="keyword",k(tt("form"),Lt,Ct,V)):m&&$=="abstract"?(U.marked="keyword",k(Ct)):k(tt("stat"),zt):T=="switch"?k(tt("form"),F,st("{"),tt("}","switch"),ne,Ln,V,V,J):T=="case"?k(Lt,st(":")):T=="default"?k(st(":")):T=="catch"?k(tt("form"),Gt,de,Ct,V,J):T=="export"?k(tt("stat"),Br,V):T=="import"?k(tt("stat"),yr,V):T=="async"?k(Ct):$=="@"?k(Lt,Ct):I(tt("stat"),Lt,st(";"),V)}function de(T){if(T=="(")return k(Fn,st(")"))}function Lt(T,$){return Y(T,$,!1)}function P(T,$){return Y(T,$,!0)}function F(T){return T!="("?I():k(tt(")"),nt,st(")"),V)}function Y(T,$,R){if(U.state.fatArrowAt==U.stream.start){var K=R?at:xt;if(T=="(")return k(Gt,tt(")"),Xt(Fn,")"),V,st("=>"),K,J);if(T=="variable")return I(Gt,rn,st("=>"),K,J)}var It=R?pt:ot;return dt.hasOwnProperty(T)?k(It):T=="function"?k(Zn,It):T=="class"||m&&$=="interface"?(U.marked="keyword",k(tt("form"),Hr,V)):T=="keyword c"||T=="async"?k(R?P:Lt):T=="("?k(tt(")"),nt,st(")"),V,It):T=="operator"||T=="spread"?k(R?P:Lt):T=="["?k(tt("]"),br,V,It):T=="{"?mn(te,"}",null,It):T=="quasi"?I(lt,It):T=="new"?k($t(R)):k()}function nt(T){return T.match(/[;\}\)\],]/)?I():I(Lt)}function ot(T,$){return T==","?k(nt):pt(T,$,!1)}function pt(T,$,R){var K=R==!1?ot:pt,It=R==!1?Lt:P;if(T=="=>")return k(Gt,R?at:xt,J);if(T=="operator")return/\+\+|--/.test($)||m&&$=="!"?k(K):m&&$=="<"&&U.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(tt(">"),Xt(bt,">"),V,K):$=="?"?k(Lt,st(":"),It):k(It);if(T=="quasi")return I(lt,K);if(T!=";"){if(T=="(")return mn(P,")","call",K);if(T==".")return k(jt,K);if(T=="[")return k(tt("]"),nt,st("]"),V,K);if(m&&$=="as")return U.marked="keyword",k(bt,K);if(T=="regexp")return U.state.lastType=U.marked="operator",U.stream.backUp(U.stream.pos-U.stream.start-1),k(It)}}function lt(T,$){return T!="quasi"?I():$.slice($.length-2)!="${"?k(lt):k(nt,gt)}function gt(T){if(T=="}")return U.marked="string-2",U.state.tokenize=j,k(lt)}function xt(T){return Q(U.stream,U.state),I(T=="{"?Ct:Lt)}function at(T){return Q(U.stream,U.state),I(T=="{"?Ct:P)}function $t(T){return function($){return $=="."?k(T?Ot:Nt):$=="variable"&&m?k(Ge,T?pt:ot):I(T?P:Lt)}}function Nt(T,$){if($=="target")return U.marked="keyword",k(ot)}function Ot(T,$){if($=="target")return U.marked="keyword",k(pt)}function zt(T){return T==":"?k(V,Ct):I(ot,st(";"),V)}function jt(T){if(T=="variable")return U.marked="property",k()}function te(T,$){if(T=="async")return U.marked="property",k(te);if(T=="variable"||U.style=="keyword"){if(U.marked="property",$=="get"||$=="set")return k(Qt);var R;return m&&U.state.fatArrowAt==U.stream.start&&(R=U.stream.match(/^\s*:\s*/,!1))&&(U.state.fatArrowAt=U.stream.pos+R[0].length),k(se)}else{if(T=="number"||T=="string")return U.marked=h?"property":U.style+" property",k(se);if(T=="jsonld-keyword")return k(se);if(m&&wt($))return U.marked="keyword",k(te);if(T=="[")return k(Lt,qe,st("]"),se);if(T=="spread")return k(P,se);if($=="*")return U.marked="keyword",k(te);if(T==":")return I(se)}}function Qt(T){return T!="variable"?I(se):(U.marked="property",k(Zn))}function se(T){if(T==":")return k(P);if(T=="(")return I(Zn)}function Xt(T,$,R){function K(It,Vt){if(R?R.indexOf(It)>-1:It==","){var ee=U.state.lexical;return ee.info=="call"&&(ee.pos=(ee.pos||0)+1),k(function(Ne,En){return Ne==$||En==$?I():I(T)},K)}return It==$||Vt==$?k():R&&R.indexOf(";")>-1?I(T):k(st($))}return function(It,Vt){return It==$||Vt==$?k():I(T,K)}}function mn(T,$,R){for(var K=3;K<arguments.length;K++)U.cc.push(arguments[K]);return k(tt($,R),Xt(T,$),V)}function Ln(T){return T=="}"?k():I(Ct,Ln)}function qe(T,$){if(m){if(T==":")return k(bt);if($=="?")return k(qe)}}function Ji(T,$){if(m&&(T==":"||$=="in"))return k(bt)}function be(T){if(m&&T==":")return U.stream.match(/^\s*\w+\s+is\b/,!1)?k(Lt,nn,bt):k(bt)}function nn(T,$){if($=="is")return U.marked="keyword",k()}function bt(T,$){if($=="keyof"||$=="typeof"||$=="infer"||$=="readonly")return U.marked="keyword",k($=="typeof"?P:bt);if(T=="variable"||$=="void")return U.marked="type",k(Ze);if($=="|"||$=="&")return k(bt);if(T=="string"||T=="number"||T=="atom")return k(Ze);if(T=="[")return k(tt("]"),Xt(bt,"]",","),V,Ze);if(T=="{")return k(tt("}"),je,V,Ze);if(T=="(")return k(Xt(Ye,")"),Jo,Ze);if(T=="<")return k(Xt(bt,">"),bt);if(T=="quasi")return I(Se,Ze)}function Jo(T){if(T=="=>")return k(bt)}function je(T){return T.match(/[\}\)\]]/)?k():T==","||T==";"?k(je):I(ve,je)}function ve(T,$){if(T=="variable"||U.style=="keyword")return U.marked="property",k(ve);if($=="?"||T=="number"||T=="string")return k(ve);if(T==":")return k(bt);if(T=="[")return k(st("variable"),Ji,st("]"),ve);if(T=="(")return I(Jn,ve);if(!T.match(/[;\}\)\],]/))return k()}function Se(T,$){return T!="quasi"?I():$.slice($.length-2)!="${"?k(Se):k(bt,yl)}function yl(T){if(T=="}")return U.marked="string-2",U.state.tokenize=j,k(Se)}function Ye(T,$){return T=="variable"&&U.stream.match(/^\s*[?:]/,!1)||$=="?"?k(Ye):T==":"?k(bt):T=="spread"?k(Ye):I(bt)}function Ze(T,$){if($=="<")return k(tt(">"),Xt(bt,">"),V,Ze);if($=="|"||T=="."||$=="&")return k(bt);if(T=="[")return k(bt,st("]"),Ze);if($=="extends"||$=="implements")return U.marked="keyword",k(bt);if($=="?")return k(bt,st(":"),bt)}function Ge(T,$){if($=="<")return k(tt(">"),Xt(bt,">"),V,Ze)}function yi(){return I(bt,Qo)}function Qo(T,$){if($=="=")return k(bt)}function vr(T,$){return $=="enum"?(U.marked="keyword",k(eo)):I(rn,qe,$n,xc)}function rn(T,$){if(m&&wt($))return U.marked="keyword",k(rn);if(T=="variable")return W($),k();if(T=="spread")return k(rn);if(T=="[")return mn(wc,"]");if(T=="{")return mn(ts,"}")}function ts(T,$){return T=="variable"&&!U.stream.match(/^\s*:/,!1)?(W($),k($n)):(T=="variable"&&(U.marked="property"),T=="spread"?k(rn):T=="}"?I():T=="["?k(Lt,st("]"),st(":"),ts):k(st(":"),rn,$n))}function wc(){return I(rn,$n)}function $n(T,$){if($=="=")return k(P)}function xc(T){if(T==",")return k(vr)}function Qi(T,$){if(T=="keyword b"&&$=="else")return k(tt("form","else"),Ct,V)}function bl(T,$){if($=="await")return k(bl);if(T=="(")return k(tt(")"),es,V)}function es(T){return T=="var"?k(vr,qr):T=="variable"?k(qr):I(qr)}function qr(T,$){return T==")"?k():T==";"?k(qr):$=="in"||$=="of"?(U.marked="keyword",k(Lt,qr)):I(Lt,qr)}function Zn(T,$){if($=="*")return U.marked="keyword",k(Zn);if(T=="variable")return W($),k(Zn);if(T=="(")return k(Gt,tt(")"),Xt(Fn,")"),V,be,Ct,J);if(m&&$=="<")return k(tt(">"),Xt(yi,">"),V,Zn)}function Jn(T,$){if($=="*")return U.marked="keyword",k(Jn);if(T=="variable")return W($),k(Jn);if(T=="(")return k(Gt,tt(")"),Xt(Fn,")"),V,be,J);if(m&&$=="<")return k(tt(">"),Xt(yi,">"),V,Jn)}function wl(T,$){if(T=="keyword"||T=="variable")return U.marked="type",k(wl);if($=="<")return k(tt(">"),Xt(yi,">"),V)}function Fn(T,$){return $=="@"&&k(Lt,Fn),T=="spread"?k(Fn):m&&wt($)?(U.marked="keyword",k(Fn)):m&&T=="this"?k(qe,$n):I(rn,qe,$n)}function Hr(T,$){return T=="variable"?xl(T,$):to(T,$)}function xl(T,$){if(T=="variable")return W($),k(to)}function to(T,$){if($=="<")return k(tt(">"),Xt(yi,">"),V,to);if($=="extends"||$=="implements"||m&&T==",")return $=="implements"&&(U.marked="keyword"),k(m?bt:Lt,to);if(T=="{")return k(tt("}"),yn,V)}function yn(T,$){if(T=="async"||T=="variable"&&($=="static"||$=="get"||$=="set"||m&&wt($))&&U.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return U.marked="keyword",k(yn);if(T=="variable"||U.style=="keyword")return U.marked="property",k(mr,yn);if(T=="number"||T=="string")return k(mr,yn);if(T=="[")return k(Lt,qe,st("]"),mr,yn);if($=="*")return U.marked="keyword",k(yn);if(m&&T=="(")return I(Jn,yn);if(T==";"||T==",")return k(yn);if(T=="}")return k();if($=="@")return k(Lt,yn)}function mr(T,$){if($=="!"||$=="?")return k(mr);if(T==":")return k(bt,$n);if($=="=")return k(P);var R=U.state.lexical.prev,K=R&&R.info=="interface";return I(K?Jn:Zn)}function Br(T,$){return $=="*"?(U.marked="keyword",k(At,st(";"))):$=="default"?(U.marked="keyword",k(Lt,st(";"))):T=="{"?k(Xt(_l,"}"),At,st(";")):I(Ct)}function _l(T,$){if($=="as")return U.marked="keyword",k(st("variable"));if(T=="variable")return I(P,_l)}function yr(T){return T=="string"?k():T=="("?I(Lt):T=="."?I(ot):I(Wr,ns,At)}function Wr(T,$){return T=="{"?mn(Wr,"}"):(T=="variable"&&W($),$=="*"&&(U.marked="keyword"),k(ke))}function ns(T){if(T==",")return k(Wr,ns)}function ke(T,$){if($=="as")return U.marked="keyword",k(Wr)}function At(T,$){if($=="from")return U.marked="keyword",k(Lt)}function br(T){return T=="]"?k():I(Xt(P,"]"))}function eo(){return I(tt("form"),rn,st("{"),tt("}"),Xt(Dn,"}"),V,V)}function Dn(){return I(rn,$n)}function re(T,$){return T.lastType=="operator"||T.lastType==","||S.test($.charAt(0))||/[,.]/.test($.charAt(0))}function Qn(T,$,R){return $.tokenize==z&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test($.lastType)||$.lastType=="quasi"&&/\{\s*$/.test(T.string.slice(0,T.pos-(R||0)))}return{startState:function(T){var $={tokenize:z,lastType:"sof",cc:[],lexical:new vt((T||0)-u,0,"block",!1),localVars:a.localVars,context:a.localVars&&new Et(null,null,!1),indented:T||0};return a.globalVars&&typeof a.globalVars=="object"&&($.globalVars=a.globalVars),$},token:function(T,$){if(T.sol()&&($.lexical.hasOwnProperty("align")||($.lexical.align=!1),$.indented=T.indentation(),Q(T,$)),$.tokenize!=G&&T.eatSpace())return null;var R=$.tokenize(T,$);return L=="comment"?R:($.lastType=L=="operator"&&(C=="++"||C=="--")?"incdec":L,ft($,R,L,C,T))},indent:function(T,$){if(T.tokenize==G||T.tokenize==j)return r.Pass;if(T.tokenize!=z)return 0;var R=$&&$.charAt(0),K=T.lexical,It;if(!/^\s*else\b/.test($))for(var Vt=T.cc.length-1;Vt>=0;--Vt){var ee=T.cc[Vt];if(ee==V)K=K.prev;else if(ee!=Qi&&ee!=J)break}for(;(K.type=="stat"||K.type=="form")&&(R=="}"||(It=T.cc[T.cc.length-1])&&(It==ot||It==pt)&&!/^[,\.=+\-*:?[\(]/.test($));)K=K.prev;f&&K.type==")"&&K.prev.type=="stat"&&(K=K.prev);var Ne=K.type,En=R==Ne;return Ne=="vardef"?K.indented+(T.lastType=="operator"||T.lastType==","?K.info.length+1:0):Ne=="form"&&R=="{"?K.indented:Ne=="form"?K.indented+u:Ne=="stat"?K.indented+(re(T,$)?f||u:0):K.info=="switch"&&!En&&a.doubleIndentSwitch!=!1?K.indented+(/^(?:case|default)\b/.test($)?u:2*u):K.align?K.column+(En?0:1):K.indented+(En?0:u)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:p?null:"/*",blockCommentEnd:p?null:"*/",blockCommentContinue:p?null:" * ",lineComment:p?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:p?"json":"javascript",jsonldMode:h,jsonMode:p,expressionAllowed:Qn,skipExpression:function(T){ft(T,"atom","atom","true",new r.StringStream("",2,null))}}}),r.registerHelper("wordChars","javascript",/[\w$]/),r.defineMIME("text/javascript","javascript"),r.defineMIME("text/ecmascript","javascript"),r.defineMIME("application/javascript","javascript"),r.defineMIME("application/x-javascript","javascript"),r.defineMIME("application/ecmascript","javascript"),r.defineMIME("application/json",{name:"javascript",json:!0}),r.defineMIME("application/x-json",{name:"javascript",json:!0}),r.defineMIME("application/manifest+json",{name:"javascript",json:!0}),r.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),r.defineMIME("text/typescript",{name:"javascript",typescript:!0}),r.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var av={exports:{}},cv;function ly(){return cv||(cv=1,function(t,n){(function(r){r(Yo())})(function(r){var o={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},a={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};r.defineMode("xml",function(u,f){var h=u.indentUnit,p={},g=f.htmlMode?o:a;for(var m in g)p[m]=g[m];for(var m in f)p[m]=f[m];var b,x;function S(k,H){function W(Et){return H.tokenize=Et,Et(k,H)}var et=k.next();if(et=="<")return k.eat("!")?k.eat("[")?k.match("CDATA[")?W(L("atom","]]>")):null:k.match("--")?W(L("comment","-->")):k.match("DOCTYPE",!0,!0)?(k.eatWhile(/[\w\._\-]/),W(C(1))):null:k.eat("?")?(k.eatWhile(/[\w\._\-]/),H.tokenize=L("meta","?>"),"meta"):(b=k.eat("/")?"closeTag":"openTag",H.tokenize=M,"tag bracket");if(et=="&"){var wt;return k.eat("#")?k.eat("x")?wt=k.eatWhile(/[a-fA-F\d]/)&&k.eat(";"):wt=k.eatWhile(/[\d]/)&&k.eat(";"):wt=k.eatWhile(/[\w\.\-:]/)&&k.eat(";"),wt?"atom":"error"}else return k.eatWhile(/[^&<]/),null}S.isInText=!0;function M(k,H){var W=k.next();if(W==">"||W=="/"&&k.eat(">"))return H.tokenize=S,b=W==">"?"endTag":"selfcloseTag","tag bracket";if(W=="=")return b="equals",null;if(W=="<"){H.tokenize=S,H.state=j,H.tagName=H.tagStart=null;var et=H.tokenize(k,H);return et?et+" tag error":"tag error"}else return/[\'\"]/.test(W)?(H.tokenize=A(W),H.stringStartCol=k.column(),H.tokenize(k,H)):(k.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function A(k){var H=function(W,et){for(;!W.eol();)if(W.next()==k){et.tokenize=M;break}return"string"};return H.isInAttribute=!0,H}function L(k,H){return function(W,et){for(;!W.eol();){if(W.match(H)){et.tokenize=S;break}W.next()}return k}}function C(k){return function(H,W){for(var et;(et=H.next())!=null;){if(et=="<")return W.tokenize=C(k+1),W.tokenize(H,W);if(et==">")if(k==1){W.tokenize=S;break}else return W.tokenize=C(k-1),W.tokenize(H,W)}return"meta"}}function E(k){return k&&k.toLowerCase()}function z(k,H,W){this.prev=k.context,this.tagName=H||"",this.indent=k.indented,this.startOfLine=W,(p.doNotIndent.hasOwnProperty(H)||k.context&&k.context.noIndent)&&(this.noIndent=!0)}function D(k){k.context&&(k.context=k.context.prev)}function G(k,H){for(var W;;){if(!k.context||(W=k.context.tagName,!p.contextGrabbers.hasOwnProperty(E(W))||!p.contextGrabbers[E(W)].hasOwnProperty(E(H))))return;D(k)}}function j(k,H,W){return k=="openTag"?(W.tagStart=H.column(),it):k=="closeTag"?Q:j}function it(k,H,W){return k=="word"?(W.tagName=H.current(),x="tag",kt):p.allowMissingTagName&&k=="endTag"?(x="tag bracket",kt(k,H,W)):(x="error",it)}function Q(k,H,W){if(k=="word"){var et=H.current();return W.context&&W.context.tagName!=et&&p.implicitlyClosed.hasOwnProperty(E(W.context.tagName))&&D(W),W.context&&W.context.tagName==et||p.matchClosing===!1?(x="tag",dt):(x="tag error",vt)}else return p.allowMissingTagName&&k=="endTag"?(x="tag bracket",dt(k,H,W)):(x="error",vt)}function dt(k,H,W){return k!="endTag"?(x="error",dt):(D(W),j)}function vt(k,H,W){return x="error",dt(k,H,W)}function kt(k,H,W){if(k=="word")return x="attribute",ft;if(k=="endTag"||k=="selfcloseTag"){var et=W.tagName,wt=W.tagStart;return W.tagName=W.tagStart=null,k=="selfcloseTag"||p.autoSelfClosers.hasOwnProperty(E(et))?G(W,et):(G(W,et),W.context=new z(W,et,wt==W.indented)),j}return x="error",kt}function ft(k,H,W){return k=="equals"?U:(p.allowMissing||(x="error"),kt(k,H,W))}function U(k,H,W){return k=="string"?I:k=="word"&&p.allowUnquoted?(x="string",kt):(x="error",kt(k,H,W))}function I(k,H,W){return k=="string"?I:kt(k,H,W)}return{startState:function(k){var H={tokenize:S,state:j,indented:k||0,tagName:null,tagStart:null,context:null};return k!=null&&(H.baseIndent=k),H},token:function(k,H){if(!H.tagName&&k.sol()&&(H.indented=k.indentation()),k.eatSpace())return null;b=null;var W=H.tokenize(k,H);return(W||b)&&W!="comment"&&(x=null,H.state=H.state(b||W,k,H),x&&(W=x=="error"?W+" error":x)),W},indent:function(k,H,W){var et=k.context;if(k.tokenize.isInAttribute)return k.tagStart==k.indented?k.stringStartCol+1:k.indented+h;if(et&&et.noIndent)return r.Pass;if(k.tokenize!=M&&k.tokenize!=S)return W?W.match(/^(\s*)/)[0].length:0;if(k.tagName)return p.multilineTagIndentPastTag!==!1?k.tagStart+k.tagName.length+2:k.tagStart+h*(p.multilineTagIndentFactor||1);if(p.alignCDATA&&/<!\[CDATA\[/.test(H))return 0;var wt=H&&/^<(\/)?([\w_:\.-]*)/.exec(H);if(wt&&wt[1])for(;et;)if(et.tagName==wt[2]){et=et.prev;break}else if(p.implicitlyClosed.hasOwnProperty(E(et.tagName)))et=et.prev;else break;else if(wt)for(;et;){var Et=p.contextGrabbers[E(et.tagName)];if(Et&&Et.hasOwnProperty(E(wt[2])))et=et.prev;else break}for(;et&&et.prev&&!et.startOfLine;)et=et.prev;return et?et.indent+h:k.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:p.htmlMode?"html":"xml",helperType:p.htmlMode?"html":"xml",skipAttribute:function(k){k.state==U&&(k.state=kt)},xmlCurrentTag:function(k){return k.tagName?{name:k.tagName,close:k.type=="closeTag"}:null},xmlCurrentContext:function(k){for(var H=[],W=k.context;W;W=W.prev)H.push(W.tagName);return H.reverse()}}}),r.defineMIME("text/xml","xml"),r.defineMIME("application/xml","xml"),r.mimeModes.hasOwnProperty("text/html")||r.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),av.exports}ly();(function(t,n){(function(r){r(Yo(),ly(),Hst.exports)})(function(r){function o(u,f,h,p){this.state=u,this.mode=f,this.depth=h,this.prev=p}function a(u){return new o(r.copyState(u.mode,u.state),u.mode,u.depth,u.prev&&a(u.prev))}r.defineMode("jsx",function(u,f){var h=r.getMode(u,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),p=r.getMode(u,f&&f.base||"javascript");function g(S){var M=S.tagName;S.tagName=null;var A=h.indent(S,"","");return S.tagName=M,A}function m(S,M){return M.context.mode==h?b(S,M,M.context):x(S,M,M.context)}function b(S,M,A){if(A.depth==2)return S.match(/^.*?\*\//)?A.depth=1:S.skipToEnd(),"comment";if(S.peek()=="{"){h.skipAttribute(A.state);var L=g(A.state),C=A.state.context;if(C&&S.match(/^[^>]*>\s*$/,!1)){for(;C.prev&&!C.startOfLine;)C=C.prev;C.startOfLine?L-=u.indentUnit:A.prev.state.lexical&&(L=A.prev.state.lexical.indented)}else A.depth==1&&(L+=u.indentUnit);return M.context=new o(r.startState(p,L),p,0,M.context),null}if(A.depth==1){if(S.peek()=="<")return h.skipAttribute(A.state),M.context=new o(r.startState(h,g(A.state)),h,0,M.context),null;if(S.match("//"))return S.skipToEnd(),"comment";if(S.match("/*"))return A.depth=2,m(S,M)}var E=h.token(S,A.state),z=S.current(),D;return/\btag\b/.test(E)?/>$/.test(z)?A.state.context?A.depth=0:M.context=M.context.prev:/^</.test(z)&&(A.depth=1):!E&&(D=z.indexOf("{"))>-1&&S.backUp(z.length-D),E}function x(S,M,A){if(S.peek()=="<"&&p.expressionAllowed(S,A.state))return M.context=new o(r.startState(h,p.indent(A.state,"","")),h,0,M.context),p.skipExpression(A.state),null;var L=p.token(S,A.state);if(!L&&A.depth!=null){var C=S.current();C=="{"?A.depth++:C=="}"&&--A.depth==0&&(M.context=M.context.prev)}return L}return{startState:function(){return{context:new o(r.startState(p),p)}},copyState:function(S){return{context:a(S.context)}},token:m,indent:function(S,M,A){return S.context.mode.indent(S.context.state,M,A)},innerMode:function(S){return S.context}}},"xml","javascript"),r.defineMIME("text/jsx","jsx"),r.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(t,n){(function(r){r(Yo())})(function(r){r.defineOption("placeholder","",function(g,m,b){var x=b&&b!=r.Init;if(m&&!x)g.on("blur",f),g.on("change",h),g.on("swapDoc",h),r.on(g.getInputField(),"compositionupdate",g.state.placeholderCompose=function(){u(g)}),h(g);else if(!m&&x){g.off("blur",f),g.off("change",h),g.off("swapDoc",h),r.off(g.getInputField(),"compositionupdate",g.state.placeholderCompose),o(g);var S=g.getWrapperElement();S.className=S.className.replace(" CodeMirror-empty","")}m&&!g.hasFocus()&&f(g)});function o(g){g.state.placeholder&&(g.state.placeholder.parentNode.removeChild(g.state.placeholder),g.state.placeholder=null)}function a(g){o(g);var m=g.state.placeholder=document.createElement("pre");m.style.cssText="height: 0; overflow: visible",m.style.direction=g.getOption("direction"),m.className="CodeMirror-placeholder CodeMirror-line-like";var b=g.getOption("placeholder");typeof b=="string"&&(b=document.createTextNode(b)),m.appendChild(b),g.display.lineSpace.insertBefore(m,g.display.lineSpace.firstChild)}function u(g){setTimeout(function(){var m=!1;if(g.lineCount()==1){var b=g.getInputField();m=b.nodeName=="TEXTAREA"?!g.getLine(0).length:!/[^\u200b]/.test(b.querySelector(".CodeMirror-line").textContent)}m?a(g):o(g)},20)}function f(g){p(g)&&a(g)}function h(g){var m=g.getWrapperElement(),b=p(g);m.className=m.className.replace(" CodeMirror-empty","")+(b?" CodeMirror-empty":""),b?a(g):o(g)}function p(g){return g.lineCount()===1&&g.getLine(0)===""}})})();(function(t,n){(function(r){r(Yo())})(function(r){function o(f,h,p){this.orientation=h,this.scroll=p,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=f+"-"+h,this.inner=this.node.appendChild(document.createElement("div"));var g=this;r.on(this.inner,"mousedown",function(b){if(b.which!=1)return;r.e_preventDefault(b);var x=g.orientation=="horizontal"?"pageX":"pageY",S=b[x],M=g.pos;function A(){r.off(document,"mousemove",L),r.off(document,"mouseup",A)}function L(C){if(C.which!=1)return A();g.moveTo(M+(C[x]-S)*(g.total/g.size))}r.on(document,"mousemove",L),r.on(document,"mouseup",A)}),r.on(this.node,"click",function(b){r.e_preventDefault(b);var x=g.inner.getBoundingClientRect(),S;g.orientation=="horizontal"?S=b.clientX<x.left?-1:b.clientX>x.right?1:0:S=b.clientY<x.top?-1:b.clientY>x.bottom?1:0,g.moveTo(g.pos+S*g.screen)});function m(b){var x=r.wheelEventPixels(b)[g.orientation=="horizontal"?"x":"y"],S=g.pos;g.moveTo(g.pos+x),g.pos!=S&&r.e_preventDefault(b)}r.on(this.node,"mousewheel",m),r.on(this.node,"DOMMouseScroll",m)}o.prototype.setPos=function(f,h){return f<0&&(f=0),f>this.total-this.screen&&(f=this.total-this.screen),!h&&f==this.pos?!1:(this.pos=f,this.inner.style[this.orientation=="horizontal"?"left":"top"]=f*(this.size/this.total)+"px",!0)},o.prototype.moveTo=function(f){this.setPos(f)&&this.scroll(f,this.orientation)};var a=10;o.prototype.update=function(f,h,p){var g=this.screen!=h||this.total!=f||this.size!=p;g&&(this.screen=h,this.total=f,this.size=p);var m=this.screen*(this.size/this.total);m<a&&(this.size-=a-m,m=a),this.inner.style[this.orientation=="horizontal"?"width":"height"]=m+"px",this.setPos(this.pos,g)};function u(f,h,p){this.addClass=f,this.horiz=new o(f,"horizontal",p),h(this.horiz.node),this.vert=new o(f,"vertical",p),h(this.vert.node),this.width=null}u.prototype.update=function(f){if(this.width==null){var h=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;h&&(this.width=parseInt(h.height))}var p=this.width||0,g=f.scrollWidth>f.clientWidth+1,m=f.scrollHeight>f.clientHeight+1;return this.vert.node.style.display=m?"block":"none",this.horiz.node.style.display=g?"block":"none",m&&(this.vert.update(f.scrollHeight,f.clientHeight,f.viewHeight-(g?p:0)),this.vert.node.style.bottom=g?p+"px":"0"),g&&(this.horiz.update(f.scrollWidth,f.clientWidth,f.viewWidth-(m?p:0)-f.barLeft),this.horiz.node.style.right=m?p+"px":"0",this.horiz.node.style.left=f.barLeft+"px"),{right:m?p:0,bottom:g?p:0}},u.prototype.setScrollTop=function(f){this.vert.setPos(f)},u.prototype.setScrollLeft=function(f){this.horiz.setPos(f)},u.prototype.clear=function(){var f=this.horiz.node.parentNode;f.removeChild(this.horiz.node),f.removeChild(this.vert.node)},r.scrollbarModel.simple=function(f,h){return new u("CodeMirror-simplescroll",f,h)},r.scrollbarModel.overlay=function(f,h){return new u("CodeMirror-overlayscroll",f,h)}})})();function Bst(t,n,r={}){const o=qst.fromTextArea(t.value,{theme:"vars",...r,scrollbarStyle:"simple"});let a=!1;return o.on("change",()=>{if(a){a=!1;return}n.value=o.getValue()}),Fe(n,u=>{if(u!==o.getValue()){a=!0;const f=o.listSelections();o.replaceRange(u,o.posFromIndex(0),o.posFromIndex(1/0)),o.setSelections(f)}},{immediate:!0}),Nf(o)}const Wst={relative:"","font-mono":"","text-sm":"",class:"codemirror-scrolls"},ay=oe({__name:"CodeMirror",props:{modelValue:null,mode:null,readOnly:{type:Boolean}},emits:["update:modelValue","save"],setup(t,{expose:n,emit:r}){const o=t,a=Q1(),u={js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},f=Kt(),h=QC(o,"modelValue",r,{passive:!0}),p=ll();return n({cm:p}),ul(async()=>{p.value=Bst(f,h,{...o,...a,mode:u[o.mode||""]||o.mode,readOnly:o.readOnly?!0:void 0,extraKeys:{"Cmd-S":function(g){r("save",g.getValue())},"Ctrl-S":function(g){r("save",g.getValue())}}}),p.value.setSize("100%","100%"),p.value.clearHistory(),setTimeout(()=>p.value.refresh(),100)}),(g,m)=>(ht(),Mt("div",Wst,[ut("textarea",{ref_key:"el",ref:f},null,512)]))}}),Ust=oe({__name:"ViewEditor",props:{file:null},emits:["draft"],setup(t,{emit:n}){const r=t,o=Kt(""),a=ll(void 0),u=Kt(!1);Fe(()=>r.file,async()=>{var C;if(!r.file||!((C=r.file)!=null&&C.filepath)){o.value="",a.value=o.value,u.value=!1;return}o.value=await We.rpc.readFile(r.file.filepath),a.value=o.value,u.value=!1},{immediate:!0});const f=St(()=>{var C,E;return((E=(C=r.file)==null?void 0:C.filepath)==null?void 0:E.split(/\./g).pop())||"js"}),h=Kt(),p=St(()=>{var C;return(C=h.value)==null?void 0:C.cm}),g=St(()=>{var C;return((C=r.file)==null?void 0:C.tasks.filter(E=>{var z;return((z=E.result)==null?void 0:z.state)==="fail"}))||[]}),m=[],b=[],x=[],S=Kt(!1),M=()=>{x.forEach(([C,E,z])=>{C.removeEventListener("click",E),z()}),x.length=0};GC(h,()=>{var C;(C=p.value)==null||C.refresh()});function A(){u.value=a.value!==p.value.getValue()}Fe(u,C=>{n("draft",C)},{immediate:!0}),Fe([p,g],([C])=>{if(!C){M();return}setTimeout(()=>{M(),m.forEach(E=>E.clear()),b.forEach(E=>{var z;return(z=p.value)==null?void 0:z.removeLineClass(E,"wrap")}),m.length=0,b.length=0,C.on("changes",A),g.value.forEach(E=>{var G;const z=(G=E.result)==null?void 0:G.error,D=((z==null?void 0:z.stacks)||[]).filter(j=>{var it;return j.file&&j.file===((it=r.file)==null?void 0:it.filepath)});if(D.length){const j=D[0].sourcePos||D[0],it=document.createElement("div");it.className="op80 flex gap-x-2 items-center";const Q=document.createElement("pre");Q.className="c-red-600 dark:c-red-400",Q.textContent=`${" ".repeat(j.column)}^ ${z==null?void 0:z.nameStr}: ${z==null?void 0:z.message}`,it.appendChild(Q);const dt=document.createElement("span");dt.className="i-carbon-launch c-red-600 dark:c-red-400 hover:cursor-pointer min-w-1em min-h-1em",dt.tabIndex=0,dt.ariaLabel="Open in Editor",p0(dt,{content:"Open in Editor",placement:"bottom"},!1);const vt=async()=>{await oy(D[0].file,j.line,j.column)};it.appendChild(dt),x.push([dt,vt,()=>Jf(dt)]),b.push(p.value.addLineClass(j.line-1,"wrap","bg-red-500/10")),m.push(p.value.addLineWidget(j.line-1,it))}}),S.value||C.clearHistory()},100)},{flush:"post"});async function L(C){S.value=!0,await We.rpc.writeFile(r.file.filepath,C),a.value=C,u.value=!1}return(C,E)=>{const z=ay;return ht(),ce(z,hi({ref_key:"editor",ref:h,modelValue:o.value,"onUpdate:modelValue":E[0]||(E[0]=D=>o.value=D),"h-full":""},{lineNumbers:!0},{mode:Z(f),"data-testid":"code-mirror",onSave:L}),null,16,["modelValue","mode"])}}}),jst=oe({__name:"Modal",props:{modelValue:{type:Boolean,default:!1},direction:{default:"bottom"}},emits:["update:modelValue"],setup(t){const n=t,r=St(()=>{switch(n.direction){case"bottom":return"bottom-0 left-0 right-0 border-t";case"top":return"top-0 left-0 right-0 border-b";case"left":return"bottom-0 left-0 top-0 border-r";case"right":return"bottom-0 top-0 right-0 border-l";default:return""}}),o=St(()=>{switch(n.direction){case"bottom":return"translateY(100%)";case"top":return"translateY(-100%)";case"left":return"translateX(-100%)";case"right":return"translateX(100%)";default:return""}});return(a,u)=>(ht(),Mt("div",{class:ge(["fixed inset-0 z-40",t.modelValue?"":"pointer-events-none"])},[ut("div",{class:ge(["bg-base inset-0 absolute transition-opacity duration-500 ease-out",t.modelValue?"opacity-50":"opacity-0"]),onClick:u[0]||(u[0]=f=>a.$emit("update:modelValue",!1))},null,2),ut("div",{class:ge(["bg-base border-base absolute transition-all duration-200 ease-out scrolls",[Z(r)]]),style:kn(t.modelValue?{}:{transform:Z(o)})},[Kn(a.$slots,"default")],6)],2))}}),Gst=["aria-label","opacity","disabled","hover"],Zo=oe({__name:"IconButton",props:{icon:null,title:null,disabled:{type:Boolean}},setup(t){return(n,r)=>(ht(),Mt("button",{"aria-label":t.title,role:"button",opacity:t.disabled?10:70,rounded:"",disabled:t.disabled,hover:t.disabled?"":"bg-active op100",class:"w-1.4em h-1.4em flex"},[Kn(n.$slots,"default",{},()=>[ut("div",{class:ge(t.icon),ma:""},null,2)])],8,Gst))}}),Vst={"w-350":"","max-w-screen":"","h-full":"",flex:"","flex-col":""},Kst={"p-4":"",relative:""},Xst=ut("p",null,"Module Info",-1),Yst={op50:"","font-mono":"","text-sm":""},Zst={key:0,"p-5":""},Jst={grid:"~ cols-2 rows-[min-content_auto]","overflow-hidden":"","flex-auto":""},Qst=ut("div",{p:"x3 y-1","bg-overlay":"",border:"base b t r"}," Source ",-1),tlt=ut("div",{p:"x3 y-1","bg-overlay":"",border:"base b t"}," Transformed ",-1),elt={key:0},nlt={p:"x3 y-1","bg-overlay":"",border:"base b t"},rlt=oe({__name:"ModuleTransformResultView",props:{id:null},emits:["close"],setup(t,{emit:n}){const r=t,o=yC(()=>We.rpc.getTransformResult(r.id)),a=St(()=>{var p;return((p=r.id)==null?void 0:p.split(/\./g).pop())||"js"}),u=St(()=>{var p,g;return((g=(p=o.value)==null?void 0:p.source)==null?void 0:g.trim())||""}),f=St(()=>{var p,g;return((g=(p=o.value)==null?void 0:p.code)==null?void 0:g.replace(/\/\/# sourceMappingURL=.*\n/,"").trim())||""}),h=St(()=>{var p,g,m,b,x;return{mappings:(m=(g=(p=o.value)==null?void 0:p.map)==null?void 0:g.mappings)!=null?m:"",version:(x=(b=o.value)==null?void 0:b.map)==null?void 0:x.version}});return wC("Escape",()=>{n("close")}),(p,g)=>{const m=Zo,b=ay;return ht(),Mt("div",Vst,[ut("div",Kst,[Xst,ut("p",Yst,Jt(t.id),1),Rt(m,{icon:"i-carbon-close",absolute:"","top-5px":"","right-5px":"","text-2xl":"",onClick:g[0]||(g[0]=x=>n("close"))})]),Z(o)?(ht(),Mt(ue,{key:1},[ut("div",Jst,[Qst,tlt,Rt(b,hi({"h-full":"","model-value":Z(u),"read-only":""},{lineNumbers:!0},{mode:Z(a)}),null,16,["model-value","mode"]),Rt(b,hi({"h-full":"","model-value":Z(f),"read-only":""},{lineNumbers:!0},{mode:Z(a)}),null,16,["model-value","mode"])]),Z(h).mappings!==""?(ht(),Mt("div",elt,[ut("div",nlt," Source map (v"+Jt(Z(h).version)+") ",1),Rt(b,hi({"model-value":Z(h).mappings,"read-only":""},{lineNumbers:!0},{mode:Z(a)}),null,16,["model-value","mode"])])):ye("",!0)],64)):(ht(),Mt("div",Zst," No transform result found for this module. "))])}}});var af="http://www.w3.org/1999/xhtml";const uv={svg:"http://www.w3.org/2000/svg",xhtml:af,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function mc(t){var n=t+="",r=n.indexOf(":");return r>=0&&(n=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),uv.hasOwnProperty(n)?{space:uv[n],local:t}:t}function ilt(t){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===af&&n.documentElement.namespaceURI===af?n.createElement(t):n.createElementNS(r,t)}}function olt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function cy(t){var n=mc(t);return(n.local?olt:ilt)(n)}function slt(){}function oh(t){return t==null?slt:function(){return this.querySelector(t)}}function llt(t){typeof t!="function"&&(t=oh(t));for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a)for(var u=n[a],f=u.length,h=o[a]=new Array(f),p,g,m=0;m<f;++m)(p=u[m])&&(g=t.call(p,p.__data__,m,u))&&("__data__"in p&&(g.__data__=p.__data__),h[m]=g);return new On(o,this._parents)}function alt(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function clt(){return[]}function uy(t){return t==null?clt:function(){return this.querySelectorAll(t)}}function ult(t){return function(){return alt(t.apply(this,arguments))}}function flt(t){typeof t=="function"?t=ult(t):t=uy(t);for(var n=this._groups,r=n.length,o=[],a=[],u=0;u<r;++u)for(var f=n[u],h=f.length,p,g=0;g<h;++g)(p=f[g])&&(o.push(t.call(p,p.__data__,g,f)),a.push(p));return new On(o,a)}function fy(t){return function(){return this.matches(t)}}function hy(t){return function(n){return n.matches(t)}}var hlt=Array.prototype.find;function dlt(t){return function(){return hlt.call(this.children,t)}}function plt(){return this.firstElementChild}function glt(t){return this.select(t==null?plt:dlt(typeof t=="function"?t:hy(t)))}var vlt=Array.prototype.filter;function mlt(){return Array.from(this.children)}function ylt(t){return function(){return vlt.call(this.children,t)}}function blt(t){return this.selectAll(t==null?mlt:ylt(typeof t=="function"?t:hy(t)))}function wlt(t){typeof t!="function"&&(t=fy(t));for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a)for(var u=n[a],f=u.length,h=o[a]=[],p,g=0;g<f;++g)(p=u[g])&&t.call(p,p.__data__,g,u)&&h.push(p);return new On(o,this._parents)}function dy(t){return new Array(t.length)}function xlt(){return new On(this._enter||this._groups.map(dy),this._parents)}function Fa(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}Fa.prototype={constructor:Fa,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function _lt(t){return function(){return t}}function Slt(t,n,r,o,a,u){for(var f=0,h,p=n.length,g=u.length;f<g;++f)(h=n[f])?(h.__data__=u[f],o[f]=h):r[f]=new Fa(t,u[f]);for(;f<p;++f)(h=n[f])&&(a[f]=h)}function klt(t,n,r,o,a,u,f){var h,p,g=new Map,m=n.length,b=u.length,x=new Array(m),S;for(h=0;h<m;++h)(p=n[h])&&(x[h]=S=f.call(p,p.__data__,h,n)+"",g.has(S)?a[h]=p:g.set(S,p));for(h=0;h<b;++h)S=f.call(t,u[h],h,u)+"",(p=g.get(S))?(o[h]=p,p.__data__=u[h],g.delete(S)):r[h]=new Fa(t,u[h]);for(h=0;h<m;++h)(p=n[h])&&g.get(x[h])===p&&(a[h]=p)}function Clt(t){return t.__data__}function Tlt(t,n){if(!arguments.length)return Array.from(this,Clt);var r=n?klt:Slt,o=this._parents,a=this._groups;typeof t!="function"&&(t=_lt(t));for(var u=a.length,f=new Array(u),h=new Array(u),p=new Array(u),g=0;g<u;++g){var m=o[g],b=a[g],x=b.length,S=Llt(t.call(m,m&&m.__data__,g,o)),M=S.length,A=h[g]=new Array(M),L=f[g]=new Array(M),C=p[g]=new Array(x);r(m,b,A,L,C,S,n);for(var E=0,z=0,D,G;E<M;++E)if(D=A[E]){for(E>=z&&(z=E+1);!(G=L[z])&&++z<M;);D._next=G||null}}return f=new On(f,o),f._enter=h,f._exit=p,f}function Llt(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Elt(){return new On(this._exit||this._groups.map(dy),this._parents)}function Alt(t,n,r){var o=this.enter(),a=this,u=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),n!=null&&(a=n(a),a&&(a=a.selection())),r==null?u.remove():r(u),o&&a?o.merge(a).order():a}function Mlt(t){for(var n=t.selection?t.selection():t,r=this._groups,o=n._groups,a=r.length,u=o.length,f=Math.min(a,u),h=new Array(a),p=0;p<f;++p)for(var g=r[p],m=o[p],b=g.length,x=h[p]=new Array(b),S,M=0;M<b;++M)(S=g[M]||m[M])&&(x[M]=S);for(;p<a;++p)h[p]=r[p];return new On(h,this._parents)}function Nlt(){for(var t=this._groups,n=-1,r=t.length;++n<r;)for(var o=t[n],a=o.length-1,u=o[a],f;--a>=0;)(f=o[a])&&(u&&f.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(f,u),u=f);return this}function Plt(t){t||(t=Olt);function n(b,x){return b&&x?t(b.__data__,x.__data__):!b-!x}for(var r=this._groups,o=r.length,a=new Array(o),u=0;u<o;++u){for(var f=r[u],h=f.length,p=a[u]=new Array(h),g,m=0;m<h;++m)(g=f[m])&&(p[m]=g);p.sort(n)}return new On(a,this._parents).order()}function Olt(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function $lt(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Dlt(){return Array.from(this)}function Rlt(){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],a=0,u=o.length;a<u;++a){var f=o[a];if(f)return f}return null}function zlt(){let t=0;for(const n of this)++t;return t}function Ilt(){return!this.node()}function Flt(t){for(var n=this._groups,r=0,o=n.length;r<o;++r)for(var a=n[r],u=0,f=a.length,h;u<f;++u)(h=a[u])&&t.call(h,h.__data__,u,a);return this}function qlt(t){return function(){this.removeAttribute(t)}}function Hlt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Blt(t,n){return function(){this.setAttribute(t,n)}}function Wlt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ult(t,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function jlt(t,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Glt(t,n){var r=mc(t);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((n==null?r.local?Hlt:qlt:typeof n=="function"?r.local?jlt:Ult:r.local?Wlt:Blt)(r,n))}function py(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Vlt(t){return function(){this.style.removeProperty(t)}}function Klt(t,n,r){return function(){this.style.setProperty(t,n,r)}}function Xlt(t,n,r){return function(){var o=n.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,r)}}function Ylt(t,n,r){return arguments.length>1?this.each((n==null?Vlt:typeof n=="function"?Xlt:Klt)(t,n,r==null?"":r)):Uo(this.node(),t)}function Uo(t,n){return t.style.getPropertyValue(n)||py(t).getComputedStyle(t,null).getPropertyValue(n)}function Zlt(t){return function(){delete this[t]}}function Jlt(t,n){return function(){this[t]=n}}function Qlt(t,n){return function(){var r=n.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function tat(t,n){return arguments.length>1?this.each((n==null?Zlt:typeof n=="function"?Qlt:Jlt)(t,n)):this.node()[t]}function gy(t){return t.trim().split(/^|\s+/)}function sh(t){return t.classList||new vy(t)}function vy(t){this._node=t,this._names=gy(t.getAttribute("class")||"")}vy.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function my(t,n){for(var r=sh(t),o=-1,a=n.length;++o<a;)r.add(n[o])}function yy(t,n){for(var r=sh(t),o=-1,a=n.length;++o<a;)r.remove(n[o])}function eat(t){return function(){my(this,t)}}function nat(t){return function(){yy(this,t)}}function rat(t,n){return function(){(n.apply(this,arguments)?my:yy)(this,t)}}function iat(t,n){var r=gy(t+"");if(arguments.length<2){for(var o=sh(this.node()),a=-1,u=r.length;++a<u;)if(!o.contains(r[a]))return!1;return!0}return this.each((typeof n=="function"?rat:n?eat:nat)(r,n))}function oat(){this.textContent=""}function sat(t){return function(){this.textContent=t}}function lat(t){return function(){var n=t.apply(this,arguments);this.textContent=n==null?"":n}}function aat(t){return arguments.length?this.each(t==null?oat:(typeof t=="function"?lat:sat)(t)):this.node().textContent}function cat(){this.innerHTML=""}function uat(t){return function(){this.innerHTML=t}}function fat(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n==null?"":n}}function hat(t){return arguments.length?this.each(t==null?cat:(typeof t=="function"?fat:uat)(t)):this.node().innerHTML}function dat(){this.nextSibling&&this.parentNode.appendChild(this)}function pat(){return this.each(dat)}function gat(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vat(){return this.each(gat)}function mat(t){var n=typeof t=="function"?t:cy(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function yat(){return null}function bat(t,n){var r=typeof t=="function"?t:cy(t),o=n==null?yat:typeof n=="function"?n:oh(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function wat(){var t=this.parentNode;t&&t.removeChild(this)}function xat(){return this.each(wat)}function _at(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Sat(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function kat(t){return this.select(t?Sat:_at)}function Cat(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Tat(t){return function(n){t.call(this,n,this.__data__)}}function Lat(t){return t.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");return o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),{type:n,name:r}})}function Eat(t){return function(){var n=this.__on;if(!!n){for(var r=0,o=-1,a=n.length,u;r<a;++r)u=n[r],(!t.type||u.type===t.type)&&u.name===t.name?this.removeEventListener(u.type,u.listener,u.options):n[++o]=u;++o?n.length=o:delete this.__on}}}function Aat(t,n,r){return function(){var o=this.__on,a,u=Tat(n);if(o){for(var f=0,h=o.length;f<h;++f)if((a=o[f]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=u,a.options=r),a.value=n;return}}this.addEventListener(t.type,u,r),a={type:t.type,name:t.name,value:n,listener:u,options:r},o?o.push(a):this.__on=[a]}}function Mat(t,n,r){var o=Lat(t+""),a,u=o.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var p=0,g=h.length,m;p<g;++p)for(a=0,m=h[p];a<u;++a)if((f=o[a]).type===m.type&&f.name===m.name)return m.value}return}for(h=n?Aat:Eat,a=0;a<u;++a)this.each(h(o[a],n,r));return this}function by(t,n,r){var o=py(t),a=o.CustomEvent;typeof a=="function"?a=new a(n,r):(a=o.document.createEvent("Event"),r?(a.initEvent(n,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(n,!1,!1)),t.dispatchEvent(a)}function Nat(t,n){return function(){return by(this,t,n)}}function Pat(t,n){return function(){return by(this,t,n.apply(this,arguments))}}function Oat(t,n){return this.each((typeof n=="function"?Pat:Nat)(t,n))}function*$at(){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],a=0,u=o.length,f;a<u;++a)(f=o[a])&&(yield f)}var wy=[null];function On(t,n){this._groups=t,this._parents=n}function pl(){return new On([[document.documentElement]],wy)}function Dat(){return this}On.prototype=pl.prototype={constructor:On,select:llt,selectAll:flt,selectChild:glt,selectChildren:blt,filter:wlt,data:Tlt,enter:xlt,exit:Elt,join:Alt,merge:Mlt,selection:Dat,order:Nlt,sort:Plt,call:$lt,nodes:Dlt,node:Rlt,size:zlt,empty:Ilt,each:Flt,attr:Glt,style:Ylt,property:tat,classed:iat,text:aat,html:hat,raise:pat,lower:vat,append:mat,insert:bat,remove:xat,clone:kat,datum:Cat,on:Mat,dispatch:Oat,[Symbol.iterator]:$at};function _n(t){return typeof t=="string"?new On([[document.querySelector(t)]],[document.documentElement]):new On([[t]],wy)}function Rat(t){let n;for(;n=t.sourceEvent;)t=n;return t}function Ar(t,n){if(t=Rat(t),n===void 0&&(n=t.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(n.getScreenCTM().inverse()),[o.x,o.y]}if(n.getBoundingClientRect){var a=n.getBoundingClientRect();return[t.clientX-a.left-n.clientLeft,t.clientY-a.top-n.clientTop]}}return[t.pageX,t.pageY]}var zat={value:()=>{}};function gl(){for(var t=0,n=arguments.length,r={},o;t<n;++t){if(!(o=arguments[t]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new wa(r)}function wa(t){this._=t}function Iat(t,n){return t.trim().split(/^|\s+/).map(function(r){var o="",a=r.indexOf(".");if(a>=0&&(o=r.slice(a+1),r=r.slice(0,a)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}wa.prototype=gl.prototype={constructor:wa,on:function(t,n){var r=this._,o=Iat(t+"",r),a,u=-1,f=o.length;if(arguments.length<2){for(;++u<f;)if((a=(t=o[u]).type)&&(a=Fat(r[a],t.name)))return a;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++u<f;)if(a=(t=o[u]).type)r[a]=fv(r[a],t.name,n);else if(n==null)for(a in r)r[a]=fv(r[a],t.name,null);return this},copy:function(){var t={},n=this._;for(var r in n)t[r]=n[r].slice();return new wa(t)},call:function(t,n){if((a=arguments.length-2)>0)for(var r=new Array(a),o=0,a,u;o<a;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],o=0,a=u.length;o<a;++o)u[o].value.apply(n,r)},apply:function(t,n,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],a=0,u=o.length;a<u;++a)o[a].value.apply(n,r)}};function Fat(t,n){for(var r=0,o=t.length,a;r<o;++r)if((a=t[r]).name===n)return a.value}function fv(t,n,r){for(var o=0,a=t.length;o<a;++o)if(t[o].name===n){t[o]=zat,t=t.slice(0,o).concat(t.slice(o+1));break}return r!=null&&t.push({name:n,value:r}),t}const qat={passive:!1},nl={capture:!0,passive:!1};function Eu(t){t.stopImmediatePropagation()}function Po(t){t.preventDefault(),t.stopImmediatePropagation()}function xy(t){var n=t.document.documentElement,r=_n(t).on("dragstart.drag",Po,nl);"onselectstart"in n?r.on("selectstart.drag",Po,nl):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function _y(t,n){var r=t.document.documentElement,o=_n(t).on("dragstart.drag",null);n&&(o.on("click.drag",Po,nl),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const oa=t=>()=>t;function cf(t,{sourceEvent:n,subject:r,target:o,identifier:a,active:u,x:f,y:h,dx:p,dy:g,dispatch:m}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:m}})}cf.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Hat(t){return!t.ctrlKey&&!t.button}function Bat(){return this.parentNode}function Wat(t,n){return n==null?{x:t.x,y:t.y}:n}function Uat(){return navigator.maxTouchPoints||"ontouchstart"in this}function jat(){var t=Hat,n=Bat,r=Wat,o=Uat,a={},u=gl("start","drag","end"),f=0,h,p,g,m,b=0;function x(D){D.on("mousedown.drag",S).filter(o).on("touchstart.drag",L).on("touchmove.drag",C,qat).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function S(D,G){if(!(m||!t.call(this,D,G))){var j=z(this,n.call(this,D,G),D,G,"mouse");!j||(_n(D.view).on("mousemove.drag",M,nl).on("mouseup.drag",A,nl),xy(D.view),Eu(D),g=!1,h=D.clientX,p=D.clientY,j("start",D))}}function M(D){if(Po(D),!g){var G=D.clientX-h,j=D.clientY-p;g=G*G+j*j>b}a.mouse("drag",D)}function A(D){_n(D.view).on("mousemove.drag mouseup.drag",null),_y(D.view,g),Po(D),a.mouse("end",D)}function L(D,G){if(!!t.call(this,D,G)){var j=D.changedTouches,it=n.call(this,D,G),Q=j.length,dt,vt;for(dt=0;dt<Q;++dt)(vt=z(this,it,D,G,j[dt].identifier,j[dt]))&&(Eu(D),vt("start",D,j[dt]))}}function C(D){var G=D.changedTouches,j=G.length,it,Q;for(it=0;it<j;++it)(Q=a[G[it].identifier])&&(Po(D),Q("drag",D,G[it]))}function E(D){var G=D.changedTouches,j=G.length,it,Q;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),it=0;it<j;++it)(Q=a[G[it].identifier])&&(Eu(D),Q("end",D,G[it]))}function z(D,G,j,it,Q,dt){var vt=u.copy(),kt=Ar(dt||j,G),ft,U,I;if((I=r.call(D,new cf("beforestart",{sourceEvent:j,target:x,identifier:Q,active:f,x:kt[0],y:kt[1],dx:0,dy:0,dispatch:vt}),it))!=null)return ft=I.x-kt[0]||0,U=I.y-kt[1]||0,function k(H,W,et){var wt=kt,Et;switch(H){case"start":a[Q]=k,Et=f++;break;case"end":delete a[Q],--f;case"drag":kt=Ar(et||W,G),Et=f;break}vt.call(H,D,new cf(H,{sourceEvent:W,subject:I,target:x,identifier:Q,active:Et,x:kt[0]+ft,y:kt[1]+U,dx:kt[0]-wt[0],dy:kt[1]-wt[1],dispatch:vt}),it)}}return x.filter=function(D){return arguments.length?(t=typeof D=="function"?D:oa(!!D),x):t},x.container=function(D){return arguments.length?(n=typeof D=="function"?D:oa(D),x):n},x.subject=function(D){return arguments.length?(r=typeof D=="function"?D:oa(D),x):r},x.touchable=function(D){return arguments.length?(o=typeof D=="function"?D:oa(!!D),x):o},x.on=function(){var D=u.on.apply(u,arguments);return D===u?x:D},x.clickDistance=function(D){return arguments.length?(b=(D=+D)*D,x):Math.sqrt(b)},x}function lh(t,n,r){t.prototype=n.prototype=r,r.constructor=t}function Sy(t,n){var r=Object.create(t.prototype);for(var o in n)r[o]=n[o];return r}function vl(){}var rl=.7,qa=1/rl,Oo="\\s*([+-]?\\d+)\\s*",il="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ur="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gat=/^#([0-9a-f]{3,8})$/,Vat=new RegExp(`^rgb\\(${Oo},${Oo},${Oo}\\)$`),Kat=new RegExp(`^rgb\\(${ur},${ur},${ur}\\)$`),Xat=new RegExp(`^rgba\\(${Oo},${Oo},${Oo},${il}\\)$`),Yat=new RegExp(`^rgba\\(${ur},${ur},${ur},${il}\\)$`),Zat=new RegExp(`^hsl\\(${il},${ur},${ur}\\)$`),Jat=new RegExp(`^hsla\\(${il},${ur},${ur},${il}\\)$`),hv={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};lh(vl,ol,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:dv,formatHex:dv,formatHex8:Qat,formatHsl:tct,formatRgb:pv,toString:pv});function dv(){return this.rgb().formatHex()}function Qat(){return this.rgb().formatHex8()}function tct(){return ky(this).formatHsl()}function pv(){return this.rgb().formatRgb()}function ol(t){var n,r;return t=(t+"").trim().toLowerCase(),(n=Gat.exec(t))?(r=n[1].length,n=parseInt(n[1],16),r===6?gv(n):r===3?new Sn(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?sa(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?sa(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Vat.exec(t))?new Sn(n[1],n[2],n[3],1):(n=Kat.exec(t))?new Sn(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Xat.exec(t))?sa(n[1],n[2],n[3],n[4]):(n=Yat.exec(t))?sa(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Zat.exec(t))?yv(n[1],n[2]/100,n[3]/100,1):(n=Jat.exec(t))?yv(n[1],n[2]/100,n[3]/100,n[4]):hv.hasOwnProperty(t)?gv(hv[t]):t==="transparent"?new Sn(NaN,NaN,NaN,0):null}function gv(t){return new Sn(t>>16&255,t>>8&255,t&255,1)}function sa(t,n,r,o){return o<=0&&(t=n=r=NaN),new Sn(t,n,r,o)}function ect(t){return t instanceof vl||(t=ol(t)),t?(t=t.rgb(),new Sn(t.r,t.g,t.b,t.opacity)):new Sn}function uf(t,n,r,o){return arguments.length===1?ect(t):new Sn(t,n,r,o==null?1:o)}function Sn(t,n,r,o){this.r=+t,this.g=+n,this.b=+r,this.opacity=+o}lh(Sn,uf,Sy(vl,{brighter(t){return t=t==null?qa:Math.pow(qa,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?rl:Math.pow(rl,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Sn(ji(this.r),ji(this.g),ji(this.b),Ha(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:vv,formatHex:vv,formatHex8:nct,formatRgb:mv,toString:mv}));function vv(){return`#${Hi(this.r)}${Hi(this.g)}${Hi(this.b)}`}function nct(){return`#${Hi(this.r)}${Hi(this.g)}${Hi(this.b)}${Hi((isNaN(this.opacity)?1:this.opacity)*255)}`}function mv(){const t=Ha(this.opacity);return`${t===1?"rgb(":"rgba("}${ji(this.r)}, ${ji(this.g)}, ${ji(this.b)}${t===1?")":`, ${t})`}`}function Ha(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ji(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Hi(t){return t=ji(t),(t<16?"0":"")+t.toString(16)}function yv(t,n,r,o){return o<=0?t=n=r=NaN:r<=0||r>=1?t=n=NaN:n<=0&&(t=NaN),new Gn(t,n,r,o)}function ky(t){if(t instanceof Gn)return new Gn(t.h,t.s,t.l,t.opacity);if(t instanceof vl||(t=ol(t)),!t)return new Gn;if(t instanceof Gn)return t;t=t.rgb();var n=t.r/255,r=t.g/255,o=t.b/255,a=Math.min(n,r,o),u=Math.max(n,r,o),f=NaN,h=u-a,p=(u+a)/2;return h?(n===u?f=(r-o)/h+(r<o)*6:r===u?f=(o-n)/h+2:f=(n-r)/h+4,h/=p<.5?u+a:2-u-a,f*=60):h=p>0&&p<1?0:f,new Gn(f,h,p,t.opacity)}function rct(t,n,r,o){return arguments.length===1?ky(t):new Gn(t,n,r,o==null?1:o)}function Gn(t,n,r,o){this.h=+t,this.s=+n,this.l=+r,this.opacity=+o}lh(Gn,rct,Sy(vl,{brighter(t){return t=t==null?qa:Math.pow(qa,t),new Gn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?rl:Math.pow(rl,t),new Gn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*n,a=2*r-o;return new Sn(Au(t>=240?t-240:t+120,a,o),Au(t,a,o),Au(t<120?t+240:t-120,a,o),this.opacity)},clamp(){return new Gn(bv(this.h),la(this.s),la(this.l),Ha(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 t=Ha(this.opacity);return`${t===1?"hsl(":"hsla("}${bv(this.h)}, ${la(this.s)*100}%, ${la(this.l)*100}%${t===1?")":`, ${t})`}`}}));function bv(t){return t=(t||0)%360,t<0?t+360:t}function la(t){return Math.max(0,Math.min(1,t||0))}function Au(t,n,r){return(t<60?n+(r-n)*t/60:t<180?r:t<240?n+(r-n)*(240-t)/60:n)*255}const Cy=t=>()=>t;function ict(t,n){return function(r){return t+r*n}}function oct(t,n,r){return t=Math.pow(t,r),n=Math.pow(n,r)-t,r=1/r,function(o){return Math.pow(t+o*n,r)}}function sct(t){return(t=+t)==1?Ty:function(n,r){return r-n?oct(n,r,t):Cy(isNaN(n)?r:n)}}function Ty(t,n){var r=n-t;return r?ict(t,r):Cy(isNaN(t)?n:t)}const wv=function t(n){var r=sct(n);function o(a,u){var f=r((a=uf(a)).r,(u=uf(u)).r),h=r(a.g,u.g),p=r(a.b,u.b),g=Ty(a.opacity,u.opacity);return function(m){return a.r=f(m),a.g=h(m),a.b=p(m),a.opacity=g(m),a+""}}return o.gamma=t,o}(1);function oi(t,n){return t=+t,n=+n,function(r){return t*(1-r)+n*r}}var ff=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mu=new RegExp(ff.source,"g");function lct(t){return function(){return t}}function act(t){return function(n){return t(n)+""}}function cct(t,n){var r=ff.lastIndex=Mu.lastIndex=0,o,a,u,f=-1,h=[],p=[];for(t=t+"",n=n+"";(o=ff.exec(t))&&(a=Mu.exec(n));)(u=a.index)>r&&(u=n.slice(r,u),h[f]?h[f]+=u:h[++f]=u),(o=o[0])===(a=a[0])?h[f]?h[f]+=a:h[++f]=a:(h[++f]=null,p.push({i:f,x:oi(o,a)})),r=Mu.lastIndex;return r<n.length&&(u=n.slice(r),h[f]?h[f]+=u:h[++f]=u),h.length<2?p[0]?act(p[0].x):lct(n):(n=p.length,function(g){for(var m=0,b;m<n;++m)h[(b=p[m]).i]=b.x(g);return h.join("")})}var xv=180/Math.PI,hf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ly(t,n,r,o,a,u){var f,h,p;return(f=Math.sqrt(t*t+n*n))&&(t/=f,n/=f),(p=t*r+n*o)&&(r-=t*p,o-=n*p),(h=Math.sqrt(r*r+o*o))&&(r/=h,o/=h,p/=h),t*o<n*r&&(t=-t,n=-n,p=-p,f=-f),{translateX:a,translateY:u,rotate:Math.atan2(n,t)*xv,skewX:Math.atan(p)*xv,scaleX:f,scaleY:h}}var aa;function uct(t){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?hf:Ly(n.a,n.b,n.c,n.d,n.e,n.f)}function fct(t){return t==null||(aa||(aa=document.createElementNS("http://www.w3.org/2000/svg","g")),aa.setAttribute("transform",t),!(t=aa.transform.baseVal.consolidate()))?hf:(t=t.matrix,Ly(t.a,t.b,t.c,t.d,t.e,t.f))}function Ey(t,n,r,o){function a(g){return g.length?g.pop()+" ":""}function u(g,m,b,x,S,M){if(g!==b||m!==x){var A=S.push("translate(",null,n,null,r);M.push({i:A-4,x:oi(g,b)},{i:A-2,x:oi(m,x)})}else(b||x)&&S.push("translate("+b+n+x+r)}function f(g,m,b,x){g!==m?(g-m>180?m+=360:m-g>180&&(g+=360),x.push({i:b.push(a(b)+"rotate(",null,o)-2,x:oi(g,m)})):m&&b.push(a(b)+"rotate("+m+o)}function h(g,m,b,x){g!==m?x.push({i:b.push(a(b)+"skewX(",null,o)-2,x:oi(g,m)}):m&&b.push(a(b)+"skewX("+m+o)}function p(g,m,b,x,S,M){if(g!==b||m!==x){var A=S.push(a(S)+"scale(",null,",",null,")");M.push({i:A-4,x:oi(g,b)},{i:A-2,x:oi(m,x)})}else(b!==1||x!==1)&&S.push(a(S)+"scale("+b+","+x+")")}return function(g,m){var b=[],x=[];return g=t(g),m=t(m),u(g.translateX,g.translateY,m.translateX,m.translateY,b,x),f(g.rotate,m.rotate,b,x),h(g.skewX,m.skewX,b,x),p(g.scaleX,g.scaleY,m.scaleX,m.scaleY,b,x),g=m=null,function(S){for(var M=-1,A=x.length,L;++M<A;)b[(L=x[M]).i]=L.x(S);return b.join("")}}}var hct=Ey(uct,"px, ","px)","deg)"),dct=Ey(fct,", ",")",")"),pct=1e-12;function _v(t){return((t=Math.exp(t))+1/t)/2}function gct(t){return((t=Math.exp(t))-1/t)/2}function vct(t){return((t=Math.exp(2*t))-1)/(t+1)}const mct=function t(n,r,o){function a(u,f){var h=u[0],p=u[1],g=u[2],m=f[0],b=f[1],x=f[2],S=m-h,M=b-p,A=S*S+M*M,L,C;if(A<pct)C=Math.log(x/g)/n,L=function(it){return[h+it*S,p+it*M,g*Math.exp(n*it*C)]};else{var E=Math.sqrt(A),z=(x*x-g*g+o*A)/(2*g*r*E),D=(x*x-g*g-o*A)/(2*x*r*E),G=Math.log(Math.sqrt(z*z+1)-z),j=Math.log(Math.sqrt(D*D+1)-D);C=(j-G)/n,L=function(it){var Q=it*C,dt=_v(G),vt=g/(r*E)*(dt*vct(n*Q+G)-gct(G));return[h+vt*S,p+vt*M,g*dt/_v(n*Q+G)]}}return L.duration=C*1e3*n/Math.SQRT2,L}return a.rho=function(u){var f=Math.max(.001,+u),h=f*f,p=h*h;return t(f,h,p)},a}(Math.SQRT2,2,4);var jo=0,Rs=0,Os=0,Ay=1e3,Ba,zs,Wa=0,Xi=0,yc=0,sl=typeof performance=="object"&&performance.now?performance:Date,My=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ah(){return Xi||(My(yct),Xi=sl.now()+yc)}function yct(){Xi=0}function Ua(){this._call=this._time=this._next=null}Ua.prototype=ch.prototype={constructor:Ua,restart:function(t,n,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?ah():+r)+(n==null?0:+n),!this._next&&zs!==this&&(zs?zs._next=this:Ba=this,zs=this),this._call=t,this._time=r,df()},stop:function(){this._call&&(this._call=null,this._time=1/0,df())}};function ch(t,n,r){var o=new Ua;return o.restart(t,n,r),o}function bct(){ah(),++jo;for(var t=Ba,n;t;)(n=Xi-t._time)>=0&&t._call.call(void 0,n),t=t._next;--jo}function Sv(){Xi=(Wa=sl.now())+yc,jo=Rs=0;try{bct()}finally{jo=0,xct(),Xi=0}}function wct(){var t=sl.now(),n=t-Wa;n>Ay&&(yc-=n,Wa=t)}function xct(){for(var t,n=Ba,r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(r=n._next,n._next=null,n=t?t._next=r:Ba=r);zs=t,df(o)}function df(t){if(!jo){Rs&&(Rs=clearTimeout(Rs));var n=t-Xi;n>24?(t<1/0&&(Rs=setTimeout(Sv,t-sl.now()-yc)),Os&&(Os=clearInterval(Os))):(Os||(Wa=sl.now(),Os=setInterval(wct,Ay)),jo=1,My(Sv))}}function kv(t,n,r){var o=new Ua;return n=n==null?0:+n,o.restart(a=>{o.stop(),t(a+n)},n,r),o}var _ct=gl("start","end","cancel","interrupt"),Sct=[],Ny=0,Cv=1,pf=2,xa=3,Tv=4,gf=5,_a=6;function bc(t,n,r,o,a,u){var f=t.__transition;if(!f)t.__transition={};else if(r in f)return;kct(t,r,{name:n,index:o,group:a,on:_ct,tween:Sct,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:Ny})}function uh(t,n){var r=Yn(t,n);if(r.state>Ny)throw new Error("too late; already scheduled");return r}function pr(t,n){var r=Yn(t,n);if(r.state>xa)throw new Error("too late; already running");return r}function Yn(t,n){var r=t.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function kct(t,n,r){var o=t.__transition,a;o[n]=r,r.timer=ch(u,0,r.time);function u(g){r.state=Cv,r.timer.restart(f,r.delay,r.time),r.delay<=g&&f(g-r.delay)}function f(g){var m,b,x,S;if(r.state!==Cv)return p();for(m in o)if(S=o[m],S.name===r.name){if(S.state===xa)return kv(f);S.state===Tv?(S.state=_a,S.timer.stop(),S.on.call("interrupt",t,t.__data__,S.index,S.group),delete o[m]):+m<n&&(S.state=_a,S.timer.stop(),S.on.call("cancel",t,t.__data__,S.index,S.group),delete o[m])}if(kv(function(){r.state===xa&&(r.state=Tv,r.timer.restart(h,r.delay,r.time),h(g))}),r.state=pf,r.on.call("start",t,t.__data__,r.index,r.group),r.state===pf){for(r.state=xa,a=new Array(x=r.tween.length),m=0,b=-1;m<x;++m)(S=r.tween[m].value.call(t,t.__data__,r.index,r.group))&&(a[++b]=S);a.length=b+1}}function h(g){for(var m=g<r.duration?r.ease.call(null,g/r.duration):(r.timer.restart(p),r.state=gf,1),b=-1,x=a.length;++b<x;)a[b].call(t,m);r.state===gf&&(r.on.call("end",t,t.__data__,r.index,r.group),p())}function p(){r.state=_a,r.timer.stop(),delete o[n];for(var g in o)return;delete t.__transition}}function Sa(t,n){var r=t.__transition,o,a,u=!0,f;if(!!r){n=n==null?null:n+"";for(f in r){if((o=r[f]).name!==n){u=!1;continue}a=o.state>pf&&o.state<gf,o.state=_a,o.timer.stop(),o.on.call(a?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete r[f]}u&&delete t.__transition}}function Cct(t){return this.each(function(){Sa(this,t)})}function Tct(t,n){var r,o;return function(){var a=pr(this,t),u=a.tween;if(u!==r){o=r=u;for(var f=0,h=o.length;f<h;++f)if(o[f].name===n){o=o.slice(),o.splice(f,1);break}}a.tween=o}}function Lct(t,n,r){var o,a;if(typeof r!="function")throw new Error;return function(){var u=pr(this,t),f=u.tween;if(f!==o){a=(o=f).slice();for(var h={name:n,value:r},p=0,g=a.length;p<g;++p)if(a[p].name===n){a[p]=h;break}p===g&&a.push(h)}u.tween=a}}function Ect(t,n){var r=this._id;if(t+="",arguments.length<2){for(var o=Yn(this.node(),r).tween,a=0,u=o.length,f;a<u;++a)if((f=o[a]).name===t)return f.value;return null}return this.each((n==null?Tct:Lct)(r,t,n))}function fh(t,n,r){var o=t._id;return t.each(function(){var a=pr(this,o);(a.value||(a.value={}))[n]=r.apply(this,arguments)}),function(a){return Yn(a,o).value[n]}}function Py(t,n){var r;return(typeof n=="number"?oi:n instanceof ol?wv:(r=ol(n))?(n=r,wv):cct)(t,n)}function Act(t){return function(){this.removeAttribute(t)}}function Mct(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Nct(t,n,r){var o,a=r+"",u;return function(){var f=this.getAttribute(t);return f===a?null:f===o?u:u=n(o=f,r)}}function Pct(t,n,r){var o,a=r+"",u;return function(){var f=this.getAttributeNS(t.space,t.local);return f===a?null:f===o?u:u=n(o=f,r)}}function Oct(t,n,r){var o,a,u;return function(){var f,h=r(this),p;return h==null?void this.removeAttribute(t):(f=this.getAttribute(t),p=h+"",f===p?null:f===o&&p===a?u:(a=p,u=n(o=f,h)))}}function $ct(t,n,r){var o,a,u;return function(){var f,h=r(this),p;return h==null?void this.removeAttributeNS(t.space,t.local):(f=this.getAttributeNS(t.space,t.local),p=h+"",f===p?null:f===o&&p===a?u:(a=p,u=n(o=f,h)))}}function Dct(t,n){var r=mc(t),o=r==="transform"?dct:Py;return this.attrTween(t,typeof n=="function"?(r.local?$ct:Oct)(r,o,fh(this,"attr."+t,n)):n==null?(r.local?Mct:Act)(r):(r.local?Pct:Nct)(r,o,n))}function Rct(t,n){return function(r){this.setAttribute(t,n.call(this,r))}}function zct(t,n){return function(r){this.setAttributeNS(t.space,t.local,n.call(this,r))}}function Ict(t,n){var r,o;function a(){var u=n.apply(this,arguments);return u!==o&&(r=(o=u)&&zct(t,u)),r}return a._value=n,a}function Fct(t,n){var r,o;function a(){var u=n.apply(this,arguments);return u!==o&&(r=(o=u)&&Rct(t,u)),r}return a._value=n,a}function qct(t,n){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var o=mc(t);return this.tween(r,(o.local?Ict:Fct)(o,n))}function Hct(t,n){return function(){uh(this,t).delay=+n.apply(this,arguments)}}function Bct(t,n){return n=+n,function(){uh(this,t).delay=n}}function Wct(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Hct:Bct)(n,t)):Yn(this.node(),n).delay}function Uct(t,n){return function(){pr(this,t).duration=+n.apply(this,arguments)}}function jct(t,n){return n=+n,function(){pr(this,t).duration=n}}function Gct(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Uct:jct)(n,t)):Yn(this.node(),n).duration}function Vct(t,n){if(typeof n!="function")throw new Error;return function(){pr(this,t).ease=n}}function Kct(t){var n=this._id;return arguments.length?this.each(Vct(n,t)):Yn(this.node(),n).ease}function Xct(t,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;pr(this,t).ease=r}}function Yct(t){if(typeof t!="function")throw new Error;return this.each(Xct(this._id,t))}function Zct(t){typeof t!="function"&&(t=fy(t));for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a)for(var u=n[a],f=u.length,h=o[a]=[],p,g=0;g<f;++g)(p=u[g])&&t.call(p,p.__data__,g,u)&&h.push(p);return new zr(o,this._parents,this._name,this._id)}function Jct(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,r=t._groups,o=n.length,a=r.length,u=Math.min(o,a),f=new Array(o),h=0;h<u;++h)for(var p=n[h],g=r[h],m=p.length,b=f[h]=new Array(m),x,S=0;S<m;++S)(x=p[S]||g[S])&&(b[S]=x);for(;h<o;++h)f[h]=n[h];return new zr(f,this._parents,this._name,this._id)}function Qct(t){return(t+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function tut(t,n,r){var o,a,u=Qct(n)?uh:pr;return function(){var f=u(this,t),h=f.on;h!==o&&(a=(o=h).copy()).on(n,r),f.on=a}}function eut(t,n){var r=this._id;return arguments.length<2?Yn(this.node(),r).on.on(t):this.each(tut(r,t,n))}function nut(t){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==t)return;n&&n.removeChild(this)}}function rut(){return this.on("end.remove",nut(this._id))}function iut(t){var n=this._name,r=this._id;typeof t!="function"&&(t=oh(t));for(var o=this._groups,a=o.length,u=new Array(a),f=0;f<a;++f)for(var h=o[f],p=h.length,g=u[f]=new Array(p),m,b,x=0;x<p;++x)(m=h[x])&&(b=t.call(m,m.__data__,x,h))&&("__data__"in m&&(b.__data__=m.__data__),g[x]=b,bc(g[x],n,r,x,g,Yn(m,r)));return new zr(u,this._parents,n,r)}function out(t){var n=this._name,r=this._id;typeof t!="function"&&(t=uy(t));for(var o=this._groups,a=o.length,u=[],f=[],h=0;h<a;++h)for(var p=o[h],g=p.length,m,b=0;b<g;++b)if(m=p[b]){for(var x=t.call(m,m.__data__,b,p),S,M=Yn(m,r),A=0,L=x.length;A<L;++A)(S=x[A])&&bc(S,n,r,A,x,M);u.push(x),f.push(m)}return new zr(u,f,n,r)}var sut=pl.prototype.constructor;function lut(){return new sut(this._groups,this._parents)}function aut(t,n){var r,o,a;return function(){var u=Uo(this,t),f=(this.style.removeProperty(t),Uo(this,t));return u===f?null:u===r&&f===o?a:a=n(r=u,o=f)}}function Oy(t){return function(){this.style.removeProperty(t)}}function cut(t,n,r){var o,a=r+"",u;return function(){var f=Uo(this,t);return f===a?null:f===o?u:u=n(o=f,r)}}function uut(t,n,r){var o,a,u;return function(){var f=Uo(this,t),h=r(this),p=h+"";return h==null&&(p=h=(this.style.removeProperty(t),Uo(this,t))),f===p?null:f===o&&p===a?u:(a=p,u=n(o=f,h))}}function fut(t,n){var r,o,a,u="style."+n,f="end."+u,h;return function(){var p=pr(this,t),g=p.on,m=p.value[u]==null?h||(h=Oy(n)):void 0;(g!==r||a!==m)&&(o=(r=g).copy()).on(f,a=m),p.on=o}}function hut(t,n,r){var o=(t+="")=="transform"?hct:Py;return n==null?this.styleTween(t,aut(t,o)).on("end.style."+t,Oy(t)):typeof n=="function"?this.styleTween(t,uut(t,o,fh(this,"style."+t,n))).each(fut(this._id,t)):this.styleTween(t,cut(t,o,n),r).on("end.style."+t,null)}function dut(t,n,r){return function(o){this.style.setProperty(t,n.call(this,o),r)}}function put(t,n,r){var o,a;function u(){var f=n.apply(this,arguments);return f!==a&&(o=(a=f)&&dut(t,f,r)),o}return u._value=n,u}function gut(t,n,r){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(n==null)return this.tween(o,null);if(typeof n!="function")throw new Error;return this.tween(o,put(t,n,r==null?"":r))}function vut(t){return function(){this.textContent=t}}function mut(t){return function(){var n=t(this);this.textContent=n==null?"":n}}function yut(t){return this.tween("text",typeof t=="function"?mut(fh(this,"text",t)):vut(t==null?"":t+""))}function but(t){return function(n){this.textContent=t.call(this,n)}}function wut(t){var n,r;function o(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&but(a)),n}return o._value=t,o}function xut(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,wut(t))}function _ut(){for(var t=this._name,n=this._id,r=$y(),o=this._groups,a=o.length,u=0;u<a;++u)for(var f=o[u],h=f.length,p,g=0;g<h;++g)if(p=f[g]){var m=Yn(p,n);bc(p,t,r,g,f,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new zr(o,this._parents,t,r)}function Sut(){var t,n,r=this,o=r._id,a=r.size();return new Promise(function(u,f){var h={value:f},p={value:function(){--a===0&&u()}};r.each(function(){var g=pr(this,o),m=g.on;m!==t&&(n=(t=m).copy(),n._.cancel.push(h),n._.interrupt.push(h),n._.end.push(p)),g.on=n}),a===0&&u()})}var kut=0;function zr(t,n,r,o){this._groups=t,this._parents=n,this._name=r,this._id=o}function $y(){return++kut}var Lr=pl.prototype;zr.prototype={constructor:zr,select:iut,selectAll:out,selectChild:Lr.selectChild,selectChildren:Lr.selectChildren,filter:Zct,merge:Jct,selection:lut,transition:_ut,call:Lr.call,nodes:Lr.nodes,node:Lr.node,size:Lr.size,empty:Lr.empty,each:Lr.each,on:eut,attr:Dct,attrTween:qct,style:hut,styleTween:gut,text:yut,textTween:xut,remove:rut,tween:Ect,delay:Wct,duration:Gct,ease:Kct,easeVarying:Yct,end:Sut,[Symbol.iterator]:Lr[Symbol.iterator]};function Cut(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Tut={time:null,delay:0,duration:250,ease:Cut};function Lut(t,n){for(var r;!(r=t.__transition)||!(r=r[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return r}function Eut(t){var n,r;t instanceof zr?(n=t._id,t=t._name):(n=$y(),(r=Tut).time=ah(),t=t==null?null:t+"");for(var o=this._groups,a=o.length,u=0;u<a;++u)for(var f=o[u],h=f.length,p,g=0;g<h;++g)(p=f[g])&&bc(p,t,n,g,f,r||Lut(p,n));return new zr(o,this._parents,t,n)}pl.prototype.interrupt=Cct;pl.prototype.transition=Eut;const ca=t=>()=>t;function Aut(t,{sourceEvent:n,target:r,transform:o,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:a}})}function Pr(t,n,r){this.k=t,this.x=n,this.y=r}Pr.prototype={constructor:Pr,scale:function(t){return t===1?this:new Pr(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new Pr(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var hh=new Pr(1,0,0);Pr.prototype;function Nu(t){t.stopImmediatePropagation()}function $s(t){t.preventDefault(),t.stopImmediatePropagation()}function Mut(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Nut(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Lv(){return this.__zoom||hh}function Put(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Out(){return navigator.maxTouchPoints||"ontouchstart"in this}function $ut(t,n,r){var o=t.invertX(n[0][0])-r[0][0],a=t.invertX(n[1][0])-r[1][0],u=t.invertY(n[0][1])-r[0][1],f=t.invertY(n[1][1])-r[1][1];return t.translate(a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a),f>u?(u+f)/2:Math.min(0,u)||Math.max(0,f))}function Dut(){var t=Mut,n=Nut,r=$ut,o=Put,a=Out,u=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,p=mct,g=gl("start","zoom","end"),m,b,x,S=500,M=150,A=0,L=10;function C(I){I.property("__zoom",Lv).on("wheel.zoom",Q,{passive:!1}).on("mousedown.zoom",dt).on("dblclick.zoom",vt).filter(a).on("touchstart.zoom",kt).on("touchmove.zoom",ft).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(I,k,H,W){var et=I.selection?I.selection():I;et.property("__zoom",Lv),I!==et?G(I,k,H,W):et.interrupt().each(function(){j(this,arguments).event(W).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},C.scaleBy=function(I,k,H,W){C.scaleTo(I,function(){var et=this.__zoom.k,wt=typeof k=="function"?k.apply(this,arguments):k;return et*wt},H,W)},C.scaleTo=function(I,k,H,W){C.transform(I,function(){var et=n.apply(this,arguments),wt=this.__zoom,Et=H==null?D(et):typeof H=="function"?H.apply(this,arguments):H,qt=wt.invert(Et),Bt=typeof k=="function"?k.apply(this,arguments):k;return r(z(E(wt,Bt),Et,qt),et,f)},H,W)},C.translateBy=function(I,k,H,W){C.transform(I,function(){return r(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof H=="function"?H.apply(this,arguments):H),n.apply(this,arguments),f)},null,W)},C.translateTo=function(I,k,H,W,et){C.transform(I,function(){var wt=n.apply(this,arguments),Et=this.__zoom,qt=W==null?D(wt):typeof W=="function"?W.apply(this,arguments):W;return r(hh.translate(qt[0],qt[1]).scale(Et.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof H=="function"?-H.apply(this,arguments):-H),wt,f)},W,et)};function E(I,k){return k=Math.max(u[0],Math.min(u[1],k)),k===I.k?I:new Pr(k,I.x,I.y)}function z(I,k,H){var W=k[0]-H[0]*I.k,et=k[1]-H[1]*I.k;return W===I.x&&et===I.y?I:new Pr(I.k,W,et)}function D(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function G(I,k,H,W){I.on("start.zoom",function(){j(this,arguments).event(W).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(W).end()}).tween("zoom",function(){var et=this,wt=arguments,Et=j(et,wt).event(W),qt=n.apply(et,wt),Bt=H==null?D(qt):typeof H=="function"?H.apply(et,wt):H,Gt=Math.max(qt[1][0]-qt[0][0],qt[1][1]-qt[0][1]),ne=et.__zoom,J=typeof k=="function"?k.apply(et,wt):k,tt=p(ne.invert(Bt).concat(Gt/ne.k),J.invert(Bt).concat(Gt/J.k));return function(V){if(V===1)V=J;else{var st=tt(V),Ct=Gt/st[2];V=new Pr(Ct,Bt[0]-st[0]*Ct,Bt[1]-st[1]*Ct)}Et.zoom(null,V)}})}function j(I,k,H){return!H&&I.__zooming||new it(I,k)}function it(I,k){this.that=I,this.args=k,this.active=0,this.sourceEvent=null,this.extent=n.apply(I,k),this.taps=0}it.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,k){return this.mouse&&I!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var k=_n(this.that).datum();g.call(I,this.that,new Aut(I,{sourceEvent:this.sourceEvent,target:C,type:I,transform:this.that.__zoom,dispatch:g}),k)}};function Q(I,...k){if(!t.apply(this,arguments))return;var H=j(this,k).event(I),W=this.__zoom,et=Math.max(u[0],Math.min(u[1],W.k*Math.pow(2,o.apply(this,arguments)))),wt=Ar(I);if(H.wheel)(H.mouse[0][0]!==wt[0]||H.mouse[0][1]!==wt[1])&&(H.mouse[1]=W.invert(H.mouse[0]=wt)),clearTimeout(H.wheel);else{if(W.k===et)return;H.mouse=[wt,W.invert(wt)],Sa(this),H.start()}$s(I),H.wheel=setTimeout(Et,M),H.zoom("mouse",r(z(E(W,et),H.mouse[0],H.mouse[1]),H.extent,f));function Et(){H.wheel=null,H.end()}}function dt(I,...k){if(x||!t.apply(this,arguments))return;var H=I.currentTarget,W=j(this,k,!0).event(I),et=_n(I.view).on("mousemove.zoom",Bt,!0).on("mouseup.zoom",Gt,!0),wt=Ar(I,H),Et=I.clientX,qt=I.clientY;xy(I.view),Nu(I),W.mouse=[wt,this.__zoom.invert(wt)],Sa(this),W.start();function Bt(ne){if($s(ne),!W.moved){var J=ne.clientX-Et,tt=ne.clientY-qt;W.moved=J*J+tt*tt>A}W.event(ne).zoom("mouse",r(z(W.that.__zoom,W.mouse[0]=Ar(ne,H),W.mouse[1]),W.extent,f))}function Gt(ne){et.on("mousemove.zoom mouseup.zoom",null),_y(ne.view,W.moved),$s(ne),W.event(ne).end()}}function vt(I,...k){if(!!t.apply(this,arguments)){var H=this.__zoom,W=Ar(I.changedTouches?I.changedTouches[0]:I,this),et=H.invert(W),wt=H.k*(I.shiftKey?.5:2),Et=r(z(E(H,wt),W,et),n.apply(this,k),f);$s(I),h>0?_n(this).transition().duration(h).call(G,Et,W,I):_n(this).call(C.transform,Et,W,I)}}function kt(I,...k){if(!!t.apply(this,arguments)){var H=I.touches,W=H.length,et=j(this,k,I.changedTouches.length===W).event(I),wt,Et,qt,Bt;for(Nu(I),Et=0;Et<W;++Et)qt=H[Et],Bt=Ar(qt,this),Bt=[Bt,this.__zoom.invert(Bt),qt.identifier],et.touch0?!et.touch1&&et.touch0[2]!==Bt[2]&&(et.touch1=Bt,et.taps=0):(et.touch0=Bt,wt=!0,et.taps=1+!!m);m&&(m=clearTimeout(m)),wt&&(et.taps<2&&(b=Bt[0],m=setTimeout(function(){m=null},S)),Sa(this),et.start())}}function ft(I,...k){if(!!this.__zooming){var H=j(this,k).event(I),W=I.changedTouches,et=W.length,wt,Et,qt,Bt;for($s(I),wt=0;wt<et;++wt)Et=W[wt],qt=Ar(Et,this),H.touch0&&H.touch0[2]===Et.identifier?H.touch0[0]=qt:H.touch1&&H.touch1[2]===Et.identifier&&(H.touch1[0]=qt);if(Et=H.that.__zoom,H.touch1){var Gt=H.touch0[0],ne=H.touch0[1],J=H.touch1[0],tt=H.touch1[1],V=(V=J[0]-Gt[0])*V+(V=J[1]-Gt[1])*V,st=(st=tt[0]-ne[0])*st+(st=tt[1]-ne[1])*st;Et=E(Et,Math.sqrt(V/st)),qt=[(Gt[0]+J[0])/2,(Gt[1]+J[1])/2],Bt=[(ne[0]+tt[0])/2,(ne[1]+tt[1])/2]}else if(H.touch0)qt=H.touch0[0],Bt=H.touch0[1];else return;H.zoom("touch",r(z(Et,qt,Bt),H.extent,f))}}function U(I,...k){if(!!this.__zooming){var H=j(this,k).event(I),W=I.changedTouches,et=W.length,wt,Et;for(Nu(I),x&&clearTimeout(x),x=setTimeout(function(){x=null},S),wt=0;wt<et;++wt)Et=W[wt],H.touch0&&H.touch0[2]===Et.identifier?delete H.touch0:H.touch1&&H.touch1[2]===Et.identifier&&delete H.touch1;if(H.touch1&&!H.touch0&&(H.touch0=H.touch1,delete H.touch1),H.touch0)H.touch0[1]=this.__zoom.invert(H.touch0[0]);else if(H.end(),H.taps===2&&(Et=Ar(Et,this),Math.hypot(b[0]-Et[0],b[1]-Et[1])<L)){var qt=_n(this).on("dblclick.zoom");qt&&qt.apply(this,arguments)}}}return C.wheelDelta=function(I){return arguments.length?(o=typeof I=="function"?I:ca(+I),C):o},C.filter=function(I){return arguments.length?(t=typeof I=="function"?I:ca(!!I),C):t},C.touchable=function(I){return arguments.length?(a=typeof I=="function"?I:ca(!!I),C):a},C.extent=function(I){return arguments.length?(n=typeof I=="function"?I:ca([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),C):n},C.scaleExtent=function(I){return arguments.length?(u[0]=+I[0],u[1]=+I[1],C):[u[0],u[1]]},C.translateExtent=function(I){return arguments.length?(f[0][0]=+I[0][0],f[1][0]=+I[1][0],f[0][1]=+I[0][1],f[1][1]=+I[1][1],C):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},C.constrain=function(I){return arguments.length?(r=I,C):r},C.duration=function(I){return arguments.length?(h=+I,C):h},C.interpolate=function(I){return arguments.length?(p=I,C):p},C.on=function(){var I=g.on.apply(g,arguments);return I===g?C:I},C.clickDistance=function(I){return arguments.length?(A=(I=+I)*I,C):Math.sqrt(A)},C.tapDistance=function(I){return arguments.length?(L=+I,C):L},C}class hn{constructor(n,r){this.x=n,this.y=r}static of([n,r]){return new hn(n,r)}add(n){return new hn(this.x+n.x,this.y+n.y)}subtract(n){return new hn(this.x-n.x,this.y-n.y)}multiply(n){return new hn(this.x*n,this.y*n)}divide(n){return new hn(this.x/n,this.y/n)}dot(n){return this.x*n.x+this.y*n.y}cross(n){return this.x*n.y-n.x*this.y}hadamard(n){return new hn(this.x*n.x,this.y*n.y)}length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}normalize(){const n=this.length();return new hn(this.x/n,this.y/n)}rotateByRadians(n){const r=Math.cos(n),o=Math.sin(n);return new hn(this.x*r-this.y*o,this.x*o+this.y*r)}rotateByDegrees(n){return this.rotateByRadians(n*Math.PI/180)}}function Rut(t){const n=+this._x.call(null,t),r=+this._y.call(null,t);return Dy(this.cover(n,r),n,r,t)}function Dy(t,n,r,o){if(isNaN(n)||isNaN(r))return t;var a,u=t._root,f={data:o},h=t._x0,p=t._y0,g=t._x1,m=t._y1,b,x,S,M,A,L,C,E;if(!u)return t._root=f,t;for(;u.length;)if((A=n>=(b=(h+g)/2))?h=b:g=b,(L=r>=(x=(p+m)/2))?p=x:m=x,a=u,!(u=u[C=L<<1|A]))return a[C]=f,t;if(S=+t._x.call(null,u.data),M=+t._y.call(null,u.data),n===S&&r===M)return f.next=u,a?a[C]=f:t._root=f,t;do a=a?a[C]=new Array(4):t._root=new Array(4),(A=n>=(b=(h+g)/2))?h=b:g=b,(L=r>=(x=(p+m)/2))?p=x:m=x;while((C=L<<1|A)===(E=(M>=x)<<1|S>=b));return a[E]=u,a[C]=f,t}function zut(t){var n,r,o=t.length,a,u,f=new Array(o),h=new Array(o),p=1/0,g=1/0,m=-1/0,b=-1/0;for(r=0;r<o;++r)isNaN(a=+this._x.call(null,n=t[r]))||isNaN(u=+this._y.call(null,n))||(f[r]=a,h[r]=u,a<p&&(p=a),a>m&&(m=a),u<g&&(g=u),u>b&&(b=u));if(p>m||g>b)return this;for(this.cover(p,g).cover(m,b),r=0;r<o;++r)Dy(this,f[r],h[r],t[r]);return this}function Iut(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var r=this._x0,o=this._y0,a=this._x1,u=this._y1;if(isNaN(r))a=(r=Math.floor(t))+1,u=(o=Math.floor(n))+1;else{for(var f=a-r||1,h=this._root,p,g;r>t||t>=a||o>n||n>=u;)switch(g=(n<o)<<1|t<r,p=new Array(4),p[g]=h,h=p,f*=2,g){case 0:a=r+f,u=o+f;break;case 1:r=a-f,u=o+f;break;case 2:a=r+f,o=u-f;break;case 3:r=a-f,o=u-f;break}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=o,this._x1=a,this._y1=u,this}function Fut(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t}function qut(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function dn(t,n,r,o,a){this.node=t,this.x0=n,this.y0=r,this.x1=o,this.y1=a}function Hut(t,n,r){var o,a=this._x0,u=this._y0,f,h,p,g,m=this._x1,b=this._y1,x=[],S=this._root,M,A;for(S&&x.push(new dn(S,a,u,m,b)),r==null?r=1/0:(a=t-r,u=n-r,m=t+r,b=n+r,r*=r);M=x.pop();)if(!(!(S=M.node)||(f=M.x0)>m||(h=M.y0)>b||(p=M.x1)<a||(g=M.y1)<u))if(S.length){var L=(f+p)/2,C=(h+g)/2;x.push(new dn(S[3],L,C,p,g),new dn(S[2],f,C,L,g),new dn(S[1],L,h,p,C),new dn(S[0],f,h,L,C)),(A=(n>=C)<<1|t>=L)&&(M=x[x.length-1],x[x.length-1]=x[x.length-1-A],x[x.length-1-A]=M)}else{var E=t-+this._x.call(null,S.data),z=n-+this._y.call(null,S.data),D=E*E+z*z;if(D<r){var G=Math.sqrt(r=D);a=t-G,u=n-G,m=t+G,b=n+G,o=S.data}}return o}function But(t){if(isNaN(m=+this._x.call(null,t))||isNaN(b=+this._y.call(null,t)))return this;var n,r=this._root,o,a,u,f=this._x0,h=this._y0,p=this._x1,g=this._y1,m,b,x,S,M,A,L,C;if(!r)return this;if(r.length)for(;;){if((M=m>=(x=(f+p)/2))?f=x:p=x,(A=b>=(S=(h+g)/2))?h=S:g=S,n=r,!(r=r[L=A<<1|M]))return this;if(!r.length)break;(n[L+1&3]||n[L+2&3]||n[L+3&3])&&(o=n,C=L)}for(;r.data!==t;)if(a=r,!(r=r.next))return this;return(u=r.next)&&delete r.next,a?(u?a.next=u:delete a.next,this):n?(u?n[L]=u:delete n[L],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[C]=r:this._root=r),this):(this._root=u,this)}function Wut(t){for(var n=0,r=t.length;n<r;++n)this.remove(t[n]);return this}function Uut(){return this._root}function jut(){var t=0;return this.visit(function(n){if(!n.length)do++t;while(n=n.next)}),t}function Gut(t){var n=[],r,o=this._root,a,u,f,h,p;for(o&&n.push(new dn(o,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!t(o=r.node,u=r.x0,f=r.y0,h=r.x1,p=r.y1)&&o.length){var g=(u+h)/2,m=(f+p)/2;(a=o[3])&&n.push(new dn(a,g,m,h,p)),(a=o[2])&&n.push(new dn(a,u,m,g,p)),(a=o[1])&&n.push(new dn(a,g,f,h,m)),(a=o[0])&&n.push(new dn(a,u,f,g,m))}return this}function Vut(t){var n=[],r=[],o;for(this._root&&n.push(new dn(this._root,this._x0,this._y0,this._x1,this._y1));o=n.pop();){var a=o.node;if(a.length){var u,f=o.x0,h=o.y0,p=o.x1,g=o.y1,m=(f+p)/2,b=(h+g)/2;(u=a[0])&&n.push(new dn(u,f,h,m,b)),(u=a[1])&&n.push(new dn(u,m,h,p,b)),(u=a[2])&&n.push(new dn(u,f,b,m,g)),(u=a[3])&&n.push(new dn(u,m,b,p,g))}r.push(o)}for(;o=r.pop();)t(o.node,o.x0,o.y0,o.x1,o.y1);return this}function Kut(t){return t[0]}function Xut(t){return arguments.length?(this._x=t,this):this._x}function Yut(t){return t[1]}function Zut(t){return arguments.length?(this._y=t,this):this._y}function dh(t,n,r){var o=new ph(n==null?Kut:n,r==null?Yut:r,NaN,NaN,NaN,NaN);return t==null?o:o.addAll(t)}function ph(t,n,r,o,a,u){this._x=t,this._y=n,this._x0=r,this._y0=o,this._x1=a,this._y1=u,this._root=void 0}function Ev(t){for(var n={data:t.data},r=n;t=t.next;)r=r.next={data:t.data};return n}var vn=dh.prototype=ph.prototype;vn.copy=function(){var t=new ph(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,o;if(!n)return t;if(!n.length)return t._root=Ev(n),t;for(r=[{source:n,target:t._root=new Array(4)}];n=r.pop();)for(var a=0;a<4;++a)(o=n.source[a])&&(o.length?r.push({source:o,target:n.target[a]=new Array(4)}):n.target[a]=Ev(o));return t};vn.add=Rut;vn.addAll=zut;vn.cover=Iut;vn.data=Fut;vn.extent=qut;vn.find=Hut;vn.remove=But;vn.removeAll=Wut;vn.root=Uut;vn.size=jut;vn.visit=Gut;vn.visitAfter=Vut;vn.x=Xut;vn.y=Zut;function gn(t){return function(){return t}}function li(t){return(t()-.5)*1e-6}function Jut(t){return t.x+t.vx}function Qut(t){return t.y+t.vy}function tft(t){var n,r,o,a=1,u=1;typeof t!="function"&&(t=gn(t==null?1:+t));function f(){for(var g,m=n.length,b,x,S,M,A,L,C=0;C<u;++C)for(b=dh(n,Jut,Qut).visitAfter(h),g=0;g<m;++g)x=n[g],A=r[x.index],L=A*A,S=x.x+x.vx,M=x.y+x.vy,b.visit(E);function E(z,D,G,j,it){var Q=z.data,dt=z.r,vt=A+dt;if(Q){if(Q.index>x.index){var kt=S-Q.x-Q.vx,ft=M-Q.y-Q.vy,U=kt*kt+ft*ft;U<vt*vt&&(kt===0&&(kt=li(o),U+=kt*kt),ft===0&&(ft=li(o),U+=ft*ft),U=(vt-(U=Math.sqrt(U)))/U*a,x.vx+=(kt*=U)*(vt=(dt*=dt)/(L+dt)),x.vy+=(ft*=U)*vt,Q.vx-=kt*(vt=1-vt),Q.vy-=ft*vt)}return}return D>S+vt||j<S-vt||G>M+vt||it<M-vt}}function h(g){if(g.data)return g.r=r[g.data.index];for(var m=g.r=0;m<4;++m)g[m]&&g[m].r>g.r&&(g.r=g[m].r)}function p(){if(!!n){var g,m=n.length,b;for(r=new Array(m),g=0;g<m;++g)b=n[g],r[b.index]=+t(b,g,n)}}return f.initialize=function(g,m){n=g,o=m,p()},f.iterations=function(g){return arguments.length?(u=+g,f):u},f.strength=function(g){return arguments.length?(a=+g,f):a},f.radius=function(g){return arguments.length?(t=typeof g=="function"?g:gn(+g),p(),f):t},f}function eft(t){return t.index}function Av(t,n){var r=t.get(n);if(!r)throw new Error("node not found: "+n);return r}function nft(t){var n=eft,r=b,o,a=gn(30),u,f,h,p,g,m=1;t==null&&(t=[]);function b(L){return 1/Math.min(h[L.source.index],h[L.target.index])}function x(L){for(var C=0,E=t.length;C<m;++C)for(var z=0,D,G,j,it,Q,dt,vt;z<E;++z)D=t[z],G=D.source,j=D.target,it=j.x+j.vx-G.x-G.vx||li(g),Q=j.y+j.vy-G.y-G.vy||li(g),dt=Math.sqrt(it*it+Q*Q),dt=(dt-u[z])/dt*L*o[z],it*=dt,Q*=dt,j.vx-=it*(vt=p[z]),j.vy-=Q*vt,G.vx+=it*(vt=1-vt),G.vy+=Q*vt}function S(){if(!!f){var L,C=f.length,E=t.length,z=new Map(f.map((G,j)=>[n(G,j,f),G])),D;for(L=0,h=new Array(C);L<E;++L)D=t[L],D.index=L,typeof D.source!="object"&&(D.source=Av(z,D.source)),typeof D.target!="object"&&(D.target=Av(z,D.target)),h[D.source.index]=(h[D.source.index]||0)+1,h[D.target.index]=(h[D.target.index]||0)+1;for(L=0,p=new Array(E);L<E;++L)D=t[L],p[L]=h[D.source.index]/(h[D.source.index]+h[D.target.index]);o=new Array(E),M(),u=new Array(E),A()}}function M(){if(!!f)for(var L=0,C=t.length;L<C;++L)o[L]=+r(t[L],L,t)}function A(){if(!!f)for(var L=0,C=t.length;L<C;++L)u[L]=+a(t[L],L,t)}return x.initialize=function(L,C){f=L,g=C,S()},x.links=function(L){return arguments.length?(t=L,S(),x):t},x.id=function(L){return arguments.length?(n=L,x):n},x.iterations=function(L){return arguments.length?(m=+L,x):m},x.strength=function(L){return arguments.length?(r=typeof L=="function"?L:gn(+L),M(),x):r},x.distance=function(L){return arguments.length?(a=typeof L=="function"?L:gn(+L),A(),x):a},x}const rft=1664525,ift=1013904223,Mv=4294967296;function oft(){let t=1;return()=>(t=(rft*t+ift)%Mv)/Mv}function sft(t){return t.x}function lft(t){return t.y}var aft=10,cft=Math.PI*(3-Math.sqrt(5));function uft(t){var n,r=1,o=.001,a=1-Math.pow(o,1/300),u=0,f=.6,h=new Map,p=ch(b),g=gl("tick","end"),m=oft();t==null&&(t=[]);function b(){x(),g.call("tick",n),r<o&&(p.stop(),g.call("end",n))}function x(A){var L,C=t.length,E;A===void 0&&(A=1);for(var z=0;z<A;++z)for(r+=(u-r)*a,h.forEach(function(D){D(r)}),L=0;L<C;++L)E=t[L],E.fx==null?E.x+=E.vx*=f:(E.x=E.fx,E.vx=0),E.fy==null?E.y+=E.vy*=f:(E.y=E.fy,E.vy=0);return n}function S(){for(var A=0,L=t.length,C;A<L;++A){if(C=t[A],C.index=A,C.fx!=null&&(C.x=C.fx),C.fy!=null&&(C.y=C.fy),isNaN(C.x)||isNaN(C.y)){var E=aft*Math.sqrt(.5+A),z=A*cft;C.x=E*Math.cos(z),C.y=E*Math.sin(z)}(isNaN(C.vx)||isNaN(C.vy))&&(C.vx=C.vy=0)}}function M(A){return A.initialize&&A.initialize(t,m),A}return S(),n={tick:x,restart:function(){return p.restart(b),n},stop:function(){return p.stop(),n},nodes:function(A){return arguments.length?(t=A,S(),h.forEach(M),n):t},alpha:function(A){return arguments.length?(r=+A,n):r},alphaMin:function(A){return arguments.length?(o=+A,n):o},alphaDecay:function(A){return arguments.length?(a=+A,n):+a},alphaTarget:function(A){return arguments.length?(u=+A,n):u},velocityDecay:function(A){return arguments.length?(f=1-A,n):1-f},randomSource:function(A){return arguments.length?(m=A,h.forEach(M),n):m},force:function(A,L){return arguments.length>1?(L==null?h.delete(A):h.set(A,M(L)),n):h.get(A)},find:function(A,L,C){var E=0,z=t.length,D,G,j,it,Q;for(C==null?C=1/0:C*=C,E=0;E<z;++E)it=t[E],D=A-it.x,G=L-it.y,j=D*D+G*G,j<C&&(Q=it,C=j);return Q},on:function(A,L){return arguments.length>1?(g.on(A,L),n):g.on(A)}}}function fft(){var t,n,r,o,a=gn(-30),u,f=1,h=1/0,p=.81;function g(S){var M,A=t.length,L=dh(t,sft,lft).visitAfter(b);for(o=S,M=0;M<A;++M)n=t[M],L.visit(x)}function m(){if(!!t){var S,M=t.length,A;for(u=new Array(M),S=0;S<M;++S)A=t[S],u[A.index]=+a(A,S,t)}}function b(S){var M=0,A,L,C=0,E,z,D;if(S.length){for(E=z=D=0;D<4;++D)(A=S[D])&&(L=Math.abs(A.value))&&(M+=A.value,C+=L,E+=L*A.x,z+=L*A.y);S.x=E/C,S.y=z/C}else{A=S,A.x=A.data.x,A.y=A.data.y;do M+=u[A.data.index];while(A=A.next)}S.value=M}function x(S,M,A,L){if(!S.value)return!0;var C=S.x-n.x,E=S.y-n.y,z=L-M,D=C*C+E*E;if(z*z/p<D)return D<h&&(C===0&&(C=li(r),D+=C*C),E===0&&(E=li(r),D+=E*E),D<f&&(D=Math.sqrt(f*D)),n.vx+=C*S.value*o/D,n.vy+=E*S.value*o/D),!0;if(S.length||D>=h)return;(S.data!==n||S.next)&&(C===0&&(C=li(r),D+=C*C),E===0&&(E=li(r),D+=E*E),D<f&&(D=Math.sqrt(f*D)));do S.data!==n&&(z=u[S.data.index]*o/D,n.vx+=C*z,n.vy+=E*z);while(S=S.next)}return g.initialize=function(S,M){t=S,r=M,m()},g.strength=function(S){return arguments.length?(a=typeof S=="function"?S:gn(+S),m(),g):a},g.distanceMin=function(S){return arguments.length?(f=S*S,g):Math.sqrt(f)},g.distanceMax=function(S){return arguments.length?(h=S*S,g):Math.sqrt(h)},g.theta=function(S){return arguments.length?(p=S*S,g):Math.sqrt(p)},g}function hft(t){var n=gn(.1),r,o,a;typeof t!="function"&&(t=gn(t==null?0:+t));function u(h){for(var p=0,g=r.length,m;p<g;++p)m=r[p],m.vx+=(a[p]-m.x)*o[p]*h}function f(){if(!!r){var h,p=r.length;for(o=new Array(p),a=new Array(p),h=0;h<p;++h)o[h]=isNaN(a[h]=+t(r[h],h,r))?0:+n(r[h],h,r)}}return u.initialize=function(h){r=h,f()},u.strength=function(h){return arguments.length?(n=typeof h=="function"?h:gn(+h),f(),u):n},u.x=function(h){return arguments.length?(t=typeof h=="function"?h:gn(+h),f(),u):t},u}function dft(t){var n=gn(.1),r,o,a;typeof t!="function"&&(t=gn(t==null?0:+t));function u(h){for(var p=0,g=r.length,m;p<g;++p)m=r[p],m.vy+=(a[p]-m.y)*o[p]*h}function f(){if(!!r){var h,p=r.length;for(o=new Array(p),a=new Array(p),h=0;h<p;++h)o[h]=isNaN(a[h]=+t(r[h],h,r))?0:+n(r[h],h,r)}}return u.initialize=function(h){r=h,f()},u.strength=function(h){return arguments.length?(n=typeof h=="function"?h:gn(+h),f(),u):n},u.y=function(h){return arguments.length?(t=typeof h=="function"?h:gn(+h),f(),u):t},u}var pft=Object.defineProperty,gft=(t,n,r)=>n in t?pft(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,Me=(t,n,r)=>(gft(t,typeof n!="symbol"?n+"":n,r),r);function vft(){return{drag:{end:0,start:.1},filter:{link:1,type:.1,unlinked:{include:.1,exclude:.1}},focus:{acquire:()=>.1,release:()=>.1},initialize:1,labels:{links:{hide:0,show:0},nodes:{hide:0,show:0}},resize:.5}}function mft(){return{centering:{enabled:!0,strength:.1},charge:{enabled:!0,strength:-1},collision:{enabled:!0,strength:1,radiusMultiplier:2},link:{enabled:!0,strength:1,length:128}}}function yft(){return{includeUnlinked:!0,linkFilter:()=>!0,nodeTypeFilter:void 0,showLinkLabels:!0,showNodeLabels:!0}}function Ry(t){t.preventDefault(),t.stopPropagation()}function zy(t){return typeof t=="number"}function gi(t,n){return zy(t.nodeRadius)?t.nodeRadius:t.nodeRadius(n)}function bft(t){return`${t.source.id}-${t.target.id}`}function Iy(t){return`link-arrow-${t}`.replace(/[()]/g,"~")}function wft(t){return`url(#${Iy(t.color)})`}function xft(t){return{size:t,padding:(n,r)=>gi(r,n)+2*t,ref:[t/2,t/2],path:[[0,0],[0,t],[t,t/2]],viewBox:[0,0,t,t].join(",")}}const Fy={Arrow:t=>xft(t)},_ft=(t,n,r)=>[n/2,r/2],Sft=(t,n,r)=>[Nv(0,n),Nv(0,r)];function Nv(t,n){return Math.random()*(n-t)+t}const vf={Centered:_ft,Randomized:Sft};var Go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qy={},mf=Go&&Go.__assign||function(){return mf=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},mf.apply(this,arguments)},kft=Go&&Go.__read||function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),a,u=[],f;try{for(;(n===void 0||n-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(h){f={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(f)throw f.error}}return u},Cft=Go&&Go.__spreadArray||function(t,n,r){if(r||arguments.length===2)for(var o=0,a=n.length,u;o<a;o++)(u||!(o in n))&&(u||(u=Array.prototype.slice.call(n,0,o)),u[o]=n[o]);return t.concat(u||Array.prototype.slice.call(n))};Object.defineProperty(qy,"__esModule",{value:!0});var Pv=function(t){if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){var n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},ai=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(function(r,o){if(Array.isArray(o))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(o).forEach(function(a){["__proto__","constructor","prototype"].includes(a)||(Array.isArray(r[a])&&Array.isArray(o[a])?r[a]=ai.options.mergeArrays?Array.from(new Set(r[a].concat(o[a]))):o[a]:Pv(r[a])&&Pv(o[a])?r[a]=ai(r[a],o[a]):r[a]=o[a])}),r},{})},Hy={mergeArrays:!0};ai.options=Hy;ai.withOptions=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];ai.options=mf({mergeArrays:!0},t);var o=ai.apply(void 0,Cft([],kft(n),!1));return ai.options=Hy,o};var Tft=qy.default=ai;function Lft(){return{autoResize:!1,callbacks:{},initial:yft(),nodeRadius:16,marker:Fy.Arrow(4),modifiers:{},positionInitializer:vf.Centered,simulation:{alphas:vft(),forces:mft()},zoom:{initial:1,min:.1,max:2}}}function Eft(t={}){return Tft.withOptions({mergeArrays:!1},Lft(),t)}function Aft(t,n){let r;return()=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>t(),n)}}function Mft({applyZoom:t,container:n,onDoubleClick:r,onPointerMoved:o,onPointerUp:a,offset:[u,f],scale:h,zoom:p}){const g=n.classed("graph",!0).append("svg").attr("height","100%").attr("width","100%").call(p).on("contextmenu",m=>Ry(m)).on("dblclick",m=>r==null?void 0:r(m)).on("dblclick.zoom",null).on("pointermove",m=>o==null?void 0:o(m)).on("pointerup",m=>a==null?void 0:a(m)).style("cursor","grab");return t&&g.call(p.transform,hh.translate(u,f).scale(h)),g.append("g")}function Nft({canvas:t,scale:n,xOffset:r,yOffset:o}){t==null||t.attr("transform",`translate(${r},${o})scale(${n})`)}function Pft({config:t,onDragStart:n,onDragEnd:r}){var o,a;const u=jat().filter(f=>f.type==="mousedown"?f.button===0:f.type==="touchstart"?f.touches.length===1:!1).on("start",(f,h)=>{f.active===0&&n(f,h),_n(f.sourceEvent.target).classed("grabbed",!0),h.fx=h.x,h.fy=h.y}).on("drag",(f,h)=>{h.fx=f.x,h.fy=f.y}).on("end",(f,h)=>{f.active===0&&r(f,h),_n(f.sourceEvent.target).classed("grabbed",!1),h.fx=void 0,h.fy=void 0});return(a=(o=t.modifiers).drag)==null||a.call(o,u),u}function Oft({graph:t,filter:n,focusedNode:r,includeUnlinked:o,linkFilter:a}){const u=t.links.filter(p=>n.includes(p.source.type)&&n.includes(p.target.type)&&a(p)),f=p=>u.find(g=>g.source.id===p.id||g.target.id===p.id)!==void 0,h=t.nodes.filter(p=>n.includes(p.type)&&(o||f(p)));return r===void 0||!n.includes(r.type)?{nodes:h,links:u}:$ft({nodes:h,links:u},r)}function $ft(t,n){const r=[...Dft(t,n),...Rft(t,n)],o=r.flatMap(a=>[a.source,a.target]);return{nodes:[...new Set([...o,n])],links:[...new Set(r)]}}function Dft(t,n){return By(t,n,(r,o)=>r.target.id===o.id)}function Rft(t,n){return By(t,n,(r,o)=>r.source.id===o.id)}function By(t,n,r){const o=new Set(t.links),a=new Set([n]),u=[];for(;o.size>0;){const f=[...o].filter(h=>[...a].some(p=>r(h,p)));if(f.length===0)return u;f.forEach(h=>{a.add(h.source),a.add(h.target),u.push(h),o.delete(h)})}return u}function yf(t){var n;return(n=t.x)!=null?n:0}function bf(t){var n;return(n=t.y)!=null?n:0}function gh({source:t,target:n}){const r=new hn(yf(t),bf(t)),o=new hn(yf(n),bf(n)),a=o.subtract(r),u=a.length(),f=a.normalize(),h=f.multiply(-1);return{s:r,t:o,dist:u,norm:f,endNorm:h}}function Wy({center:t,node:n}){const r=new hn(yf(n),bf(n));let o=t;return r.x===o.x&&r.y===o.y&&(o=o.add(new hn(0,1))),{n:r,c:o}}function Uy({config:t,source:n,target:r}){const{s:o,t:a,norm:u}=gh({config:t,source:n,target:r}),f=o.add(u.multiply(gi(t,n)-1)),h=a.subtract(u.multiply(t.marker.padding(r,t)));return{start:f,end:h}}function zft(t){const{start:n,end:r}=Uy(t);return`M${n.x},${n.y}
31
31
  L${r.x},${r.y}`}function Ift(t){const{start:n,end:r}=Uy(t),o=r.subtract(n).multiply(.5),a=n.add(o);return`translate(${a.x-8},${a.y-4})`}function Fft({config:t,source:n,target:r}){const{s:o,t:a,dist:u,norm:f,endNorm:h}=gh({config:t,source:n,target:r}),p=10,g=f.rotateByDegrees(-p).multiply(gi(t,n)-1).add(o),m=h.rotateByDegrees(p).multiply(gi(t,r)).add(a).add(h.rotateByDegrees(p).multiply(2*t.marker.size)),b=1.2*u;return`M${g.x},${g.y}
32
32
  A${b},${b},0,0,1,${m.x},${m.y}`}function qft({center:t,config:n,node:r}){const{n:o,c:a}=Wy({center:t,config:n,node:r}),u=gi(n,r),f=o.subtract(a),h=f.multiply(1/f.length()),p=40,g=h.rotateByDegrees(p).multiply(u-1).add(o),m=h.rotateByDegrees(-p).multiply(u).add(o).add(h.rotateByDegrees(-p).multiply(2*n.marker.size));return`M${g.x},${g.y}
33
33
  A${u},${u},0,1,0,${m.x},${m.y}`}function Hft({config:t,source:n,target:r}){const{t:o,dist:a,endNorm:u}=gh({config:t,source:n,target:r}),f=10,h=u.rotateByDegrees(f).multiply(.5*a).add(o);return`translate(${h.x},${h.y})`}function Bft({center:t,config:n,node:r}){const{n:o,c:a}=Wy({center:t,config:n,node:r}),u=o.subtract(a),f=u.multiply(1/u.length()).multiply(3*gi(n,r)+8).add(o);return`translate(${f.x},${f.y})`}const $o={line:{labelTransform:Ift,path:zft},arc:{labelTransform:Hft,path:Fft},reflexive:{labelTransform:Bft,path:qft}};function Wft(t){return t.append("g").classed("links",!0).selectAll("path")}function Uft({config:t,graph:n,selection:r,showLabels:o}){const a=r==null?void 0:r.data(n.links,u=>bft(u)).join(u=>{var f,h,p,g;const m=u.append("g"),b=m.append("path").classed("link",!0).style("marker-end",S=>wft(S)).style("stroke",S=>S.color);(h=(f=t.modifiers).link)==null||h.call(f,b);const x=m.append("text").classed("link__label",!0).style("fill",S=>S.label?S.label.color:null).style("font-size",S=>S.label?S.label.fontSize:null).text(S=>S.label?S.label.text:null);return(g=(p=t.modifiers).linkLabel)==null||g.call(p,x),m});return a==null||a.select(".link__label").attr("opacity",u=>u.label&&o?1:0),a}function jft(t){Gft(t),Vft(t)}function Gft({center:t,config:n,graph:r,selection:o}){o==null||o.selectAll("path").attr("d",a=>a.source.x===void 0||a.source.y===void 0||a.target.x===void 0||a.target.y===void 0?"":a.source.id===a.target.id?$o.reflexive.path({config:n,node:a.source,center:t}):jy(r,a.source,a.target)?$o.arc.path({config:n,source:a.source,target:a.target}):$o.line.path({config:n,source:a.source,target:a.target}))}function Vft({config:t,center:n,graph:r,selection:o}){o==null||o.select(".link__label").attr("transform",a=>a.source.x===void 0||a.source.y===void 0||a.target.x===void 0||a.target.y===void 0?"translate(0, 0)":a.source.id===a.target.id?$o.reflexive.labelTransform({config:t,node:a.source,center:n}):jy(r,a.source,a.target)?$o.arc.labelTransform({config:t,source:a.source,target:a.target}):$o.line.labelTransform({config:t,source:a.source,target:a.target}))}function jy(t,n,r){return n.id!==r.id&&t.links.some(o=>o.target.id===n.id&&o.source.id===r.id)&&t.links.some(o=>o.target.id===r.id&&o.source.id===n.id)}function Kft(t){return t.append("defs").selectAll("marker")}function Xft({config:t,graph:n,selection:r}){return r==null?void 0:r.data(Yft(n),o=>o).join(o=>{const a=o.append("marker").attr("id",u=>Iy(u)).attr("markerHeight",4*t.marker.size).attr("markerWidth",4*t.marker.size).attr("markerUnits","userSpaceOnUse").attr("orient","auto").attr("refX",t.marker.ref[0]).attr("refY",t.marker.ref[1]).attr("viewBox",t.marker.viewBox).style("fill",u=>u);return a.append("path").attr("d",Zft(t.marker.path)),a})}function Yft(t){return[...new Set(t.links.map(n=>n.color))]}function Zft(t){if(t.length<1)return"M0,0";const[[n,r],...o]=t;return o.reduce((a,[u,f])=>`${a}L${u},${f}`,`M${n},${r}`)}function Jft(t){return t.append("g").classed("nodes",!0).selectAll("circle")}function Qft({config:t,drag:n,graph:r,onNodeContext:o,onNodeSelected:a,selection:u,showLabels:f}){const h=u==null?void 0:u.data(r.nodes,p=>p.id).join(p=>{var g,m,b,x;const S=p.append("g");n!==void 0&&S.call(n);const M=S.append("circle").classed("node",!0).attr("aria-label",L=>L.label?L.label.text:L.id).attr("r",L=>gi(t,L)).on("contextmenu",(L,C)=>{Ry(L),o(C)}).on("pointerdown",(L,C)=>eht(L,C,a!=null?a:o)).style("fill",L=>L.color);(m=(g=t.modifiers).node)==null||m.call(g,M);const A=S.append("text").classed("node__label",!0).attr("dy","0.33em").style("fill",L=>L.label?L.label.color:null).style("font-size",L=>L.label?L.label.fontSize:null).style("stroke","none").text(L=>L.label?L.label.text:null);return(x=(b=t.modifiers).nodeLabel)==null||x.call(b,A),S});return h==null||h.select(".node").classed("focused",p=>p.isFocused),h==null||h.select(".node__label").attr("opacity",f?1:0),h}const tht=500;function eht(t,n,r){if(t.button!==void 0&&t.button!==0)return;const o=n.lastInteractionTimestamp,a=Date.now();if(o===void 0||a-o>tht){n.lastInteractionTimestamp=a;return}n.lastInteractionTimestamp=void 0,r(n)}function nht(t){t==null||t.attr("transform",n=>{var r,o;return`translate(${(r=n.x)!=null?r:0},${(o=n.y)!=null?o:0})`})}function rht({center:t,config:n,graph:r,onTick:o}){var a,u;const f=uft(r.nodes),h=n.simulation.forces.centering;if(h&&h.enabled){const b=h.strength;f.force("x",hft(()=>t().x).strength(b)).force("y",dft(()=>t().y).strength(b))}const p=n.simulation.forces.charge;p&&p.enabled&&f.force("charge",fft().strength(p.strength));const g=n.simulation.forces.collision;g&&g.enabled&&f.force("collision",tft().radius(b=>g.radiusMultiplier*gi(n,b)));const m=n.simulation.forces.link;return m&&m.enabled&&f.force("link",nft(r.links).id(b=>b.id).distance(n.simulation.forces.link.length).strength(m.strength)),f.on("tick",()=>o()),(u=(a=n.modifiers).simulation)==null||u.call(a,f),f}function iht({canvasContainer:t,config:n,min:r,max:o,onZoom:a}){var u,f;const h=Dut().scaleExtent([r,o]).filter(p=>{var g;return p.button===0||((g=p.touches)==null?void 0:g.length)>=2}).on("start",()=>t().classed("grabbed",!0)).on("zoom",p=>a(p)).on("end",()=>t().classed("grabbed",!1));return(f=(u=n.modifiers).zoom)==null||f.call(u,h),h}class oht{constructor(n,r,o){if(Me(this,"nodeTypes"),Me(this,"_nodeTypeFilter"),Me(this,"_includeUnlinked",!0),Me(this,"_linkFilter",()=>!0),Me(this,"_showLinkLabels",!0),Me(this,"_showNodeLabels",!0),Me(this,"filteredGraph"),Me(this,"width",0),Me(this,"height",0),Me(this,"simulation"),Me(this,"canvas"),Me(this,"linkSelection"),Me(this,"nodeSelection"),Me(this,"markerSelection"),Me(this,"zoom"),Me(this,"drag"),Me(this,"xOffset",0),Me(this,"yOffset",0),Me(this,"scale"),Me(this,"focusedNode"),Me(this,"resizeObserver"),this.container=n,this.graph=r,this.config=o,this.scale=o.zoom.initial,this.resetView(),this.graph.nodes.forEach(a=>{var u,f;const[h,p]=o.positionInitializer(a,this.effectiveWidth,this.effectiveHeight);a.x=(u=a.x)!=null?u:h,a.y=(f=a.y)!=null?f:p}),this.nodeTypes=[...new Set(r.nodes.map(a=>a.type))],this._nodeTypeFilter=[...this.nodeTypes],o.initial){const{includeUnlinked:a,nodeTypeFilter:u,linkFilter:f,showLinkLabels:h,showNodeLabels:p}=o.initial;this._includeUnlinked=a!=null?a:this._includeUnlinked,this._showLinkLabels=h!=null?h:this._showLinkLabels,this._showNodeLabels=p!=null?p:this._showNodeLabels,this._nodeTypeFilter=u!=null?u:this._nodeTypeFilter,this._linkFilter=f!=null?f:this._linkFilter}this.filterGraph(void 0),this.initGraph(),this.restart(o.simulation.alphas.initialize),o.autoResize&&(this.resizeObserver=new ResizeObserver(Aft(()=>this.resize())),this.resizeObserver.observe(this.container))}get nodeTypeFilter(){return this._nodeTypeFilter}get includeUnlinked(){return this._includeUnlinked}set includeUnlinked(n){this._includeUnlinked=n,this.filterGraph(this.focusedNode);const{include:r,exclude:o}=this.config.simulation.alphas.filter.unlinked,a=n?r:o;this.restart(a)}set linkFilter(n){this._linkFilter=n,this.filterGraph(this.focusedNode),this.restart(this.config.simulation.alphas.filter.link)}get linkFilter(){return this._linkFilter}get showNodeLabels(){return this._showNodeLabels}set showNodeLabels(n){this._showNodeLabels=n;const{hide:r,show:o}=this.config.simulation.alphas.labels.nodes,a=n?o:r;this.restart(a)}get showLinkLabels(){return this._showLinkLabels}set showLinkLabels(n){this._showLinkLabels=n;const{hide:r,show:o}=this.config.simulation.alphas.labels.links,a=n?o:r;this.restart(a)}get effectiveWidth(){return this.width/this.scale}get effectiveHeight(){return this.height/this.scale}get effectiveCenter(){return hn.of([this.width,this.height]).divide(2).subtract(hn.of([this.xOffset,this.yOffset])).divide(this.scale)}resize(){const n=this.width,r=this.height,o=this.container.getBoundingClientRect().width,a=this.container.getBoundingClientRect().height,u=n.toFixed()!==o.toFixed(),f=r.toFixed()!==a.toFixed();if(!u&&!f)return;this.width=this.container.getBoundingClientRect().width,this.height=this.container.getBoundingClientRect().height;const h=this.config.simulation.alphas.resize;this.restart(zy(h)?h:h({oldWidth:n,oldHeight:r,newWidth:o,newHeight:a}))}restart(n){var r;this.markerSelection=Xft({config:this.config,graph:this.filteredGraph,selection:this.markerSelection}),this.linkSelection=Uft({config:this.config,graph:this.filteredGraph,selection:this.linkSelection,showLabels:this._showLinkLabels}),this.nodeSelection=Qft({config:this.config,drag:this.drag,graph:this.filteredGraph,onNodeContext:o=>this.toggleNodeFocus(o),onNodeSelected:this.config.callbacks.nodeClicked,selection:this.nodeSelection,showLabels:this._showNodeLabels}),(r=this.simulation)==null||r.stop(),this.simulation=rht({center:()=>this.effectiveCenter,config:this.config,graph:this.filteredGraph,onTick:()=>this.onTick()}).alpha(n).restart()}filterNodesByType(n,r){n?this._nodeTypeFilter.push(r):this._nodeTypeFilter=this._nodeTypeFilter.filter(o=>o!==r),this.filterGraph(this.focusedNode),this.restart(this.config.simulation.alphas.filter.type)}shutdown(){var n,r;this.focusedNode!==void 0&&(this.focusedNode.isFocused=!1,this.focusedNode=void 0),(n=this.resizeObserver)==null||n.unobserve(this.container),(r=this.simulation)==null||r.stop()}initGraph(){this.zoom=iht({config:this.config,canvasContainer:()=>_n(this.container).select("svg"),min:this.config.zoom.min,max:this.config.zoom.max,onZoom:n=>this.onZoom(n)}),this.canvas=Mft({applyZoom:this.scale!==1,container:_n(this.container),offset:[this.xOffset,this.yOffset],scale:this.scale,zoom:this.zoom}),this.applyZoom(),this.linkSelection=Wft(this.canvas),this.nodeSelection=Jft(this.canvas),this.markerSelection=Kft(this.canvas),this.drag=Pft({config:this.config,onDragStart:()=>{var n;return(n=this.simulation)==null?void 0:n.alphaTarget(this.config.simulation.alphas.drag.start).restart()},onDragEnd:()=>{var n;return(n=this.simulation)==null?void 0:n.alphaTarget(this.config.simulation.alphas.drag.end).restart()}})}onTick(){nht(this.nodeSelection),jft({config:this.config,center:this.effectiveCenter,graph:this.filteredGraph,selection:this.linkSelection})}resetView(){var n;(n=this.simulation)==null||n.stop(),_n(this.container).selectChildren().remove(),this.zoom=void 0,this.canvas=void 0,this.linkSelection=void 0,this.nodeSelection=void 0,this.markerSelection=void 0,this.simulation=void 0,this.width=this.container.getBoundingClientRect().width,this.height=this.container.getBoundingClientRect().height}onZoom(n){var r;this.xOffset=n.transform.x,this.yOffset=n.transform.y,this.scale=n.transform.k,this.applyZoom(),(r=this.simulation)==null||r.restart()}applyZoom(){Nft({canvas:this.canvas,scale:this.scale,xOffset:this.xOffset,yOffset:this.yOffset})}toggleNodeFocus(n){n.isFocused?(this.filterGraph(void 0),this.restart(this.config.simulation.alphas.focus.release(n))):this.focusNode(n)}focusNode(n){this.filterGraph(n),this.restart(this.config.simulation.alphas.focus.acquire(n))}filterGraph(n){this.focusedNode!==void 0&&(this.focusedNode.isFocused=!1,this.focusedNode=void 0),n!==void 0&&this._nodeTypeFilter.includes(n.type)&&(n.isFocused=!0,this.focusedNode=n),this.filteredGraph=Oft({graph:this.graph,filter:this._nodeTypeFilter,focusedNode:this.focusedNode,includeUnlinked:this._includeUnlinked,linkFilter:this._linkFilter})}}function Ov({nodes:t,links:n}){return{nodes:t!=null?t:[],links:n!=null?n:[]}}function sht(t){return{...t}}function Gy(t){return{...t,isFocused:!1,lastInteractionTimestamp:void 0}}const lht={"h-full":"","min-h-75":"","flex-1":"",overflow:"hidden"},aht={flex:"","items-center":"","gap-4":"","px-3":"","py-2":""},cht=["id","checked","onChange"],uht=["for"],fht=ut("div",{"flex-auto":""},null,-1),hht=oe({__name:"ViewModuleGraph",props:{graph:null},setup(t){const n=t,{graph:r}=Wx(n),o=Kt(),a=Kt(!1),u=Kt(),f=Kt();If(()=>{a.value===!1&&setTimeout(()=>u.value=void 0,300)},{flush:"post"}),ul(()=>{g()}),qf(()=>{var b;(b=f.value)==null||b.shutdown()}),Fe(r,g);function h(b,x){var S;(S=f.value)==null||S.filterNodesByType(x,b)}function p(b){u.value=b,a.value=!0}function g(){var b;(b=f.value)==null||b.shutdown(),!(!r.value||!o.value)&&(f.value=new oht(o.value,r.value,Eft({nodeRadius:10,autoResize:!0,simulation:{alphas:{initialize:1,resize:({newHeight:x,newWidth:S})=>x===0&&S===0?0:.25},forces:{collision:{radiusMultiplier:10},link:{length:240}}},marker:Fy.Arrow(2),modifiers:{node:m},positionInitializer:r.value.nodes.length>1?vf.Randomized:vf.Centered,zoom:{min:.5,max:2}})))}function m(b){const x=L=>L.button===0;let S=0,M=0,A=0;b.on("pointerdown",(L,C)=>{C.type!=="external"&&(!C.x||!C.y||!x(L)||(S=C.x,M=C.y,A=Date.now()))}).on("pointerup",(L,C)=>{if(C.type==="external"||!C.x||!C.y||!x(L)||Date.now()-A>500)return;const E=C.x-S,z=C.y-M;E**2+z**2<100&&p(C.id)})}return(b,x)=>{var C;const S=Zo,M=rlt,A=jst,L=Zi("tooltip");return ht(),Mt("div",lht,[ut("div",null,[ut("div",aht,[(ht(!0),Mt(ue,null,lr((C=f.value)==null?void 0:C.nodeTypes.sort(),E=>{var z;return ht(),Mt("div",{key:E,flex:"~ gap-1","items-center":"","select-none":""},[ut("input",{id:`type-${E}`,type:"checkbox",checked:(z=f.value)==null?void 0:z.nodeTypeFilter.includes(E),onChange:D=>h(E,D.target.checked)},null,40,cht),ut("label",{"font-light":"","text-sm":"","ws-nowrap":"","overflow-hidden":"",capitalize:"",truncate:"",for:`type-${E}`,"border-b-2":"",style:kn({"border-color":`var(--color-node-${E})`})},Jt(E)+" Modules",13,uht)])}),128)),fht,ut("div",null,[pn(Rt(S,{icon:"i-carbon-reset",onClick:g},null,512),[[L,"Reset",void 0,{bottom:!0}]])])])]),ut("div",{ref_key:"el",ref:o},null,512),Rt(A,{modelValue:a.value,"onUpdate:modelValue":x[1]||(x[1]=E=>a.value=E),direction:"right"},{default:Zt(()=>[u.value?(ht(),ce(o1,{key:0},{default:Zt(()=>[Rt(M,{id:u.value,onClose:x[0]||(x[0]=E=>a.value=!1)},null,8,["id"])]),_:1})):ye("",!0)]),_:1},8,["modelValue"])])}}});const dht={key:0,"text-green-500":"","flex-shrink-0":"","i-carbon:checkmark":""},pht={key:1,"text-red-500":"","flex-shrink-0":"","i-carbon:compare":""},ght={key:2,"text-red-500":"","flex-shrink-0":"","i-carbon:close":""},vht={key:3,"text-gray-500":"","flex-shrink-0":"","i-carbon:document-blank":""},mht={key:4,"text-gray-500":"","flex-shrink-0":"","i-carbon:redo":"","rotate-90":""},yht={key:5,"text-yellow-500":"","flex-shrink-0":"","i-carbon:circle-dash":"","animate-spin":""},vh=oe({__name:"StatusIcon",props:{task:null},setup(t){return(n,r)=>{var a,u,f;const o=Zi("tooltip");return((a=t.task.result)==null?void 0:a.state)==="pass"?(ht(),Mt("div",dht)):Z(dc)(t.task)?pn((ht(),Mt("div",pht,null,512)),[[o,"Contains failed snapshot",void 0,{right:!0}]]):((u=t.task.result)==null?void 0:u.state)==="fail"?(ht(),Mt("div",ght)):t.task.mode==="todo"?pn((ht(),Mt("div",vht,null,512)),[[o,"Todo",void 0,{right:!0}]]):t.task.mode==="skip"||((f=t.task.result)==null?void 0:f.state)==="skip"?pn((ht(),Mt("div",mht,null,512)),[[o,"Skipped",void 0,{right:!0}]]):(ht(),Mt("div",yht))}}});function bht(t){const n=new Map,r=new Map,o=[];for(;;){let a=0;if(t.forEach((u,f)=>{var m;const{splits:h,finished:p}=u;if(p){a++;const{raw:b,candidate:x}=u;n.set(b,x);return}if(h.length===0){u.finished=!0;return}const g=h[0];r.has(g)?(u.candidate+=u.candidate===""?g:`/${g}`,(m=r.get(g))==null||m.push(f),h.shift()):(r.set(g,[f]),o.push(f))}),o.forEach(u=>{const f=t[u],h=f.splits.shift();f.candidate+=f.candidate===""?h:`/${h}`}),r.forEach(u=>{if(u.length===1){const f=u[0];t[f].finished=!0}}),r.clear(),o.length=0,a===t.length)break}return n}function wht(t){let n=t;n.includes("/node_modules/")&&(n=t.split(/\/node_modules\//g).pop());const r=n.split(/\//g);return{raw:n,splits:r,candidate:"",finished:!1,id:t}}function xht(t){const n=t.map(o=>wht(o)),r=bht(n);return n.map(({raw:o,id:a})=>{var u;return Gy({color:"var(--color-node-external)",label:{color:"var(--color-node-external)",fontSize:"0.875rem",text:(u=r.get(o))!=null?u:""},isFocused:!1,id:a,type:"external"})})}function _ht(t,n){return Gy({color:n?"var(--color-node-root)":"var(--color-node-inline)",label:{color:n?"var(--color-node-root)":"var(--color-node-inline)",fontSize:"0.875rem",text:t.split(/\//g).pop()},isFocused:!1,id:t,type:"inline"})}function Sht(t,n){var h;if(!t)return Ov({});const r=xht(t.externalized),o=(h=t.inlined.map(p=>_ht(p,p===n)))!=null?h:[],a=[...r,...o],u=Object.fromEntries(a.map(p=>[p.id,p])),f=Object.entries(t.graph).flatMap(([p,g])=>g.map(m=>{const b=u[p],x=u[m];if(!(b===void 0||x===void 0))return sht({source:b,target:x,color:"var(--color-link)",label:!1})}).filter(m=>m!==void 0));return Ov({nodes:a,links:f})}const kht={key:0,flex:"","flex-col":"","h-full":"","max-h-full":"","overflow-hidden":""},Cht={p:"2","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},Tht={"flex-1":"","font-light":"","op-50":"","ws-nowrap":"",truncate:"","text-sm":""},Lht={class:"flex text-lg"},Eht={flex:"~","items-center":"","bg-header":"",border:"b-2 base","text-sm":"","h-41px":""},Aht={flex:"","flex-col":"","flex-1":"",overflow:"hidden"},Mht={key:0,"flex-1":""},Nht=oe({__name:"FileDetails",setup(t){const n=Kt({externalized:[],graph:{},inlined:[]}),r=Kt({nodes:[],links:[]}),o=Kt(!1),a=Kt(!1);uC(Le,async(g,m)=>{g&&g.filepath!==(m==null?void 0:m.filepath)&&(n.value=await We.rpc.getModuleGraph(g.filepath),r.value=Sht(n.value,g.filepath))},{debounce:100,immediate:!0});const u=()=>{var m;const g=(m=Le.value)==null?void 0:m.filepath;g&&fetch(`/__open-in-editor?file=${encodeURIComponent(g)}`)},f=g=>{g==="graph"&&(a.value=!0),or.value=g},h=St(()=>{var g,m;return(m=(g=H0.value)==null?void 0:g.reduce((b,{size:x})=>b+x,0))!=null?m:0});function p(g){o.value=g}return(g,m)=>{var E,z;const b=vh,x=Zo,S=hht,M=Ust,A=Fst,L=Nst,C=Zi("tooltip");return Z(Le)?(ht(),Mt("div",kht,[ut("div",null,[ut("div",Cht,[Rt(b,{task:Z(Le)},null,8,["task"]),ut("div",Tht,Jt((E=Z(Le))==null?void 0:E.filepath),1),ut("div",Lht,[pn(Rt(x,{title:"Open in editor",icon:"i-carbon-launch",disabled:!((z=Z(Le))!=null&&z.filepath),onClick:u},null,8,["disabled"]),[[C,"Open in editor",void 0,{bottom:!0}]])])]),ut("div",Eht,[ut("button",{"tab-button":"",class:ge({"tab-button-active":Z(or)==null}),onClick:m[0]||(m[0]=D=>f(null))}," Report ",2),ut("button",{"tab-button":"",class:ge({"tab-button-active":Z(or)==="graph"}),onClick:m[1]||(m[1]=D=>f("graph"))}," Module Graph ",2),ut("button",{"tab-button":"",class:ge({"tab-button-active":Z(or)==="editor"}),onClick:m[2]||(m[2]=D=>f("editor"))},Jt(o.value?"*\xA0":"")+"Code ",3),ut("button",{"tab-button":"",class:ge({"tab-button-active":Z(or)==="console",op20:Z(or)!=="console"&&Z(h)===0}),onClick:m[3]||(m[3]=D=>f("console"))}," Console ("+Jt(Z(h))+") ",3)])]),ut("div",Aht,[a.value?(ht(),Mt("div",Mht,[pn(Rt(S,{graph:r.value},null,8,["graph"]),[[Fm,Z(or)==="graph"]])])):ye("",!0),Z(or)==="editor"?(ht(),ce(M,{key:Z(Le).filepath,file:Z(Le),onDraft:p},null,8,["file"])):Z(or)==="console"?(ht(),ce(A,{key:2,file:Z(Le)},null,8,["file"])):Z(or)?ye("",!0):(ht(),ce(L,{key:3,file:Z(Le)},null,8,["file"]))])])):ye("",!0)}}}),Pht=["open"],Oht=ut("div",{"flex-1":"","h-1px":"",border:"base b",op80:""},null,-1),$ht=ut("div",{"flex-1":"","h-1px":"",border:"base b",op80:""},null,-1),Dht=oe({__name:"DetailsPanel",props:{color:null},setup(t){const n=Kt(!0);return(r,o)=>(ht(),Mt("div",{open:n.value,class:"details-panel",onToggle:o[0]||(o[0]=a=>n.value=a.target.open)},[ut("div",{p:"y1","text-sm":"","bg-base":"","items-center":"","z-5":"","gap-2":"",class:ge(t.color),"w-full":"",flex:"","select-none":"",sticky:"",top:"-1"},[Oht,Kn(r.$slots,"summary",{open:n.value}),$ht],2),Kn(r.$slots,"default")],40,Pht))}});const Rht={key:0,flex:"~ row","items-center":"",p:"x-2 y-1","border-rounded":"","cursor-pointer":"",hover:"bg-active"},zht=["text"],Iht={"text-sm":"",truncate:"","font-light":""},Fht={key:0,text:"xs",op20:"",style:{"white-space":"nowrap"}},qht=oe({__name:"TaskItem",props:{task:null},setup(t){const n=t,r=St(()=>{const{result:o}=n.task;return o&&Math.round(o.duration||0)});return(o,a)=>{var f,h;const u=vh;return t.task?(ht(),Mt("div",Rht,[Rt(u,{task:t.task,"mr-2":""},null,8,["task"]),ut("div",{flex:"","items-end":"","gap-2":"",text:((h=(f=t.task)==null?void 0:f.result)==null?void 0:h.state)==="fail"?"red-500":""},[ut("span",Iht,Jt(t.task.name),1),typeof Z(r)=="number"?(ht(),Mt("span",Fht,Jt(Z(r)>0?Z(r):"< 1")+"ms ",1)):ye("",!0)],8,zht)])):ye("",!0)}}});function Hht(t){return Object.hasOwnProperty.call(t,"tasks")}function Vy(t,n){return typeof t!="string"||typeof n!="string"?!1:t.toLowerCase().includes(n.toLowerCase())}const Bht={key:1},Wht={inheritAttrs:!1},Uht=oe({...Wht,__name:"TaskTree",props:{task:null,indent:{default:0},nested:{type:Boolean,default:!1},search:null,onItemClick:null},setup(t){return(n,r)=>{const o=qht,a=Gi("TaskTree",!0);return ht(),Mt(ue,null,[!t.search||Z(Vy)(t.task.name,t.search)?(ht(),ce(o,hi({key:0},n.$attrs,{task:t.task,style:{paddingLeft:`${t.indent*.75+1}rem`},onClick:r[0]||(r[0]=u=>t.onItemClick&&t.onItemClick(t.task))}),null,16,["task","style"])):ye("",!0),t.nested&&t.task.type==="suite"&&t.task.tasks.length?(ht(),Mt("div",Bht,[(ht(!0),Mt(ue,null,lr(t.task.tasks,u=>(ht(),ce(a,{key:u.id,task:u,nested:t.nested,indent:t.indent+1,search:t.search,"on-item-click":t.onItemClick},null,8,["task","nested","indent","search","on-item-click"]))),128))])):ye("",!0)],64)}}}),jht={h:"full",flex:"~ col"},Ght={p:"2","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},Vht={p:"l3 y2 r2",flex:"~ gap-2","items-center":"","bg-header":"",border:"b-2 base"},Kht=ut("div",{class:"i-carbon:search","flex-shrink-0":""},null,-1),Xht=["op"],Yht={class:"scrolls","flex-auto":"","py-1":""},Zht={"text-red5":""},Jht={"text-yellow5":""},Qht={"text-green5":""},tdt={class:"text-purple5:50"},edt={key:2,flex:"~ col","items-center":"",p:"x4 y4","font-light":""},ndt=ut("div",{op30:""}," No matched test ",-1),rdt={inheritAttrs:!1},Ky=oe({...rdt,__name:"TasksList",props:{tasks:null,indent:{default:0},nested:{type:Boolean,default:!1},groupByType:{type:Boolean,default:!1},onItemClick:null},emits:["run"],setup(t,{emit:n}){const r=t,o=Kt(""),a=Kt(),u=St(()=>o.value.trim()!==""),f=(L,C)=>{let E=!1;for(let z=0;z<L.length;z++){const D=L[z];if(Vy(D.name,C)){E=!0;break}if(Hht(D)&&D.tasks&&(E=f(D.tasks,C),E))break}return E},h=St(()=>o.value.trim()?r.tasks.filter(L=>f([L],o.value)):r.tasks),p=St(()=>u.value?h.value.map(L=>Ia(L.id)).filter(Boolean):[]),g=St(()=>h.value.filter(L=>{var C;return((C=L.result)==null?void 0:C.state)==="fail"})),m=St(()=>h.value.filter(L=>{var C;return((C=L.result)==null?void 0:C.state)==="pass"})),b=St(()=>h.value.filter(L=>L.mode==="skip"||L.mode==="todo")),x=St(()=>h.value.filter(L=>!g.value.includes(L)&&!m.value.includes(L)&&!b.value.includes(L))),S=Jk(x,250),M=L=>{var C;o.value="",L&&((C=a.value)==null||C.focus())},A=St(()=>o.value==="");return(L,C)=>{const E=Zo,z=Uht,D=Dht,G=Zi("tooltip");return ht(),Mt("div",jht,[ut("div",null,[ut("div",Ght,[Kn(L.$slots,"header",{filteredTests:Z(u)?Z(p):void 0})]),ut("div",Vht,[Kht,pn(ut("input",{ref_key:"searchBox",ref:a,"onUpdate:modelValue":C[0]||(C[0]=j=>o.value=j),placeholder:"Search...",outline:"none",bg:"transparent",font:"light",text:"sm","flex-1":"","pl-1":"",op:o.value.length?"100":"50",onKeydown:[C[1]||(C[1]=Gu(j=>M(!1),["esc"])),C[2]||(C[2]=Gu(j=>n("run",Z(u)?Z(p):void 0),["enter"]))]},null,40,Xht),[[k_,o.value]]),pn(Rt(E,{disabled:Z(A),title:"Clear search",icon:"i-carbon:filter-remove",onClickPassive:C[3]||(C[3]=j=>M(!0))},null,8,["disabled"]),[[G,"Clear search",void 0,{bottom:!0}]])])]),ut("div",Yht,[t.groupByType?(ht(),Mt(ue,{key:0},[Z(g).length?(ht(),ce(D,{key:0},{summary:Zt(()=>[ut("div",Zht," FAIL ("+Jt(Z(g).length)+") ",1)]),default:Zt(()=>[(ht(!0),Mt(ue,null,lr(Z(g),j=>(ht(),ce(z,{key:j.id,task:j,nested:t.nested,search:o.value,class:ge(Z(Mr)===j.id?"bg-active":""),"on-item-click":t.onItemClick},null,8,["task","nested","search","class","on-item-click"]))),128))]),_:1})):ye("",!0),Z(x).length||Z(za)==="running"?(ht(),ce(D,{key:1},{summary:Zt(()=>[ut("div",Jht," RUNNING ("+Jt(Z(S).length)+") ",1)]),default:Zt(()=>[(ht(!0),Mt(ue,null,lr(Z(S),j=>(ht(),ce(z,{key:j.id,task:j,nested:t.nested,search:o.value,class:ge(Z(Mr)===j.id?"bg-active":""),"on-item-click":t.onItemClick},null,8,["task","nested","search","class","on-item-click"]))),128))]),_:1})):ye("",!0),Z(m).length?(ht(),ce(D,{key:2},{summary:Zt(()=>[ut("div",Qht," PASS ("+Jt(Z(m).length)+") ",1)]),default:Zt(()=>[(ht(!0),Mt(ue,null,lr(Z(m),j=>(ht(),ce(z,{key:j.id,task:j,nested:t.nested,search:o.value,class:ge(Z(Mr)===j.id?"bg-active":""),"on-item-click":t.onItemClick},null,8,["task","nested","search","class","on-item-click"]))),128))]),_:1})):ye("",!0),Z(b).length?(ht(),ce(D,{key:3},{summary:Zt(()=>[ut("div",tdt," SKIP ("+Jt(Z(b).length)+") ",1)]),default:Zt(()=>[(ht(!0),Mt(ue,null,lr(Z(b),j=>(ht(),ce(z,{key:j.id,task:j,nested:t.nested,search:o.value,class:ge(Z(Mr)===j.id?"bg-active":""),"on-item-click":t.onItemClick},null,8,["task","nested","search","class","on-item-click"]))),128))]),_:1})):ye("",!0)],64)):(ht(!0),Mt(ue,{key:1},lr(Z(h),j=>(ht(),ce(z,{key:j.id,task:j,nested:t.nested,search:o.value,class:ge(Z(Mr)===j.id?"bg-active":""),"on-item-click":t.onItemClick},null,8,["task","nested","search","class","on-item-click"]))),128)),Z(u)&&Z(h).length===0?(ht(),Mt("div",edt,[ndt,ut("button",{"font-light":"",op:"50 hover:100","text-sm":"",border:"~ gray-400/50 rounded",p:"x2 y0.5",m:"t2",onClickPassive:C[4]||(C[4]=j=>M(!0))}," Clear ",32)])):ye("",!0)])])}}}),idt={key:0,"h-full":""},odt={"font-bold":"","text-sm":"","flex-auto":"","ws-nowrap":"","overflow-hidden":"",truncate:""},sdt={class:"flex text-lg"},ldt=oe({__name:"Suites",setup(t){const n=St(()=>{var a;return(a=Le.value)==null?void 0:a.name.split(/\//g).pop()}),r=St(()=>{var a,u;return((a=Le.value)==null?void 0:a.tasks)&&dc((u=Le.value)==null?void 0:u.tasks)}),o=()=>Le.value&&We.rpc.updateSnapshot(Le.value);return(a,u)=>{const f=vh,h=Zo,p=Ky,g=Zi("tooltip");return Z(Le)?(ht(),Mt("div",idt,[Rt(p,{tasks:Z(Le).tasks,nested:!0},{header:Zt(()=>[Rt(f,{"mx-1":"",task:Z(Le)},null,8,["task"]),ut("span",odt,Jt(Z(n)),1),ut("div",sdt,[Z(r)?pn((ht(),ce(h,{key:0,icon:"i-carbon-result-old",onClick:u[0]||(u[0]=m=>o())},null,512)),[[g,`Update failed snapshot(s) of ${Z(Le).name}`,void 0,{bottom:!0}]]):ye("",!0),pn(Rt(h,{icon:"i-carbon-play",onClick:u[1]||(u[1]=m=>Z(wT)())},null,512),[[g,"Rerun file",void 0,{bottom:!0}]])])]),_:1},8,["tasks"])])):ye("",!0)}}}),ja=St(()=>Tn.value.filter(t=>{var n;return((n=t.result)==null?void 0:n.state)==="fail"})),Ga=St(()=>Tn.value.filter(t=>{var n;return((n=t.result)==null?void 0:n.state)==="pass"})),mh=St(()=>Tn.value.filter(t=>t.mode==="skip"||t.mode==="todo"));St(()=>Tn.value.filter(t=>!ja.value.includes(t)&&!Ga.value.includes(t)&&!mh.value.includes(t)));St(()=>mh.value.filter(t=>t.mode==="skip"));const $v=St(()=>Tn.value.filter(dc));St(()=>mh.value.filter(t=>t.mode==="todo"));const adt=St(()=>za.value==="idle"),ml=St(()=>yh(Tn.value)),Xy=St(()=>ml.value.filter(t=>{var n;return((n=t.result)==null?void 0:n.state)==="fail"})),Yy=St(()=>ml.value.filter(t=>{var n;return((n=t.result)==null?void 0:n.state)==="pass"})),Zy=St(()=>ml.value.filter(t=>t.mode==="skip"||t.mode==="todo")),cdt=St(()=>Zy.value.filter(t=>t.mode==="skip")),udt=St(()=>Zy.value.filter(t=>t.mode==="todo"));St(()=>Xy.value.length+Yy.value.length);const fdt=St(()=>{const t=yh(ml.value).reduce((n,r)=>{var o;return(o=r.result)!=null&&o.duration&&(n+=r.result.duration),n},0);return t>1e3?`${(t/1e3).toFixed(2)}s`:`${Math.round(t)}ms`});function hdt(t){return t=t||[],Array.isArray(t)?t:[t]}function Dv(t){return t.type==="test"||t.type==="benchmark"||t.type==="typecheck"}function yh(t){return hdt(t).flatMap(n=>Dv(n)?[n]:n.tasks.flatMap(r=>Dv(r)?[r]:yh(r)))}const gr=t=>(dm("data-v-6679a536"),t=t(),pm(),t),ddt={"data-testid":"test-files-entry",grid:"~ cols-[min-content_1fr_min-content]","items-center":"",gap:"x-2 y-3",p:"x4",relative:"","font-light":"","w-80":"",op80:""},pdt=gr(()=>ut("div",{"i-carbon-document":""},null,-1)),gdt=gr(()=>ut("div",null,"Files",-1)),vdt={class:"number","data-testid":"num-files"},mdt=gr(()=>ut("div",{"i-carbon-checkmark":""},null,-1)),ydt=gr(()=>ut("div",null,"Pass",-1)),bdt={class:"number"},wdt=gr(()=>ut("div",{"i-carbon-close":""},null,-1)),xdt=gr(()=>ut("div",null," Fail ",-1)),_dt={class:"number","text-red5":""},Sdt=gr(()=>ut("div",{"i-carbon-compare":""},null,-1)),kdt=gr(()=>ut("div",null," Snapshot Fail ",-1)),Cdt={class:"number","text-red5":""},Tdt=gr(()=>ut("div",{"i-carbon-timer":""},null,-1)),Ldt=gr(()=>ut("div",null,"Time",-1)),Edt={class:"number","data-testid":"run-time"},Adt=oe({__name:"TestFilesEntry",setup(t){return(n,r)=>(ht(),Mt("div",ddt,[pdt,gdt,ut("div",vdt,Jt(Z(Tn).length),1),Z(Ga).length?(ht(),Mt(ue,{key:0},[mdt,ydt,ut("div",bdt,Jt(Z(Ga).length),1)],64)):ye("",!0),Z(ja).length?(ht(),Mt(ue,{key:1},[wdt,xdt,ut("div",_dt,Jt(Z(ja).length),1)],64)):ye("",!0),Z($v).length?(ht(),Mt(ue,{key:2},[Sdt,kdt,ut("div",Cdt,Jt(Z($v).length),1)],64)):ye("",!0),Tdt,Ldt,ut("div",Edt,Jt(Z(fdt)),1)]))}});const Mdt=Xo(Adt,[["__scopeId","data-v-6679a536"]]),Ndt={"p-2":"","text-center":"",flex:""},Pdt={"text-4xl":"","min-w-2em":""},Odt={"text-md":""},$dt=oe({__name:"DashboardEntry",props:{tail:{type:Boolean,default:!1}},setup(t){return(n,r)=>(ht(),Mt("div",Ndt,[ut("div",null,[ut("div",Pdt,[Kn(n.$slots,"body")]),ut("div",Odt,[Kn(n.$slots,"header")])])]))}}),Ddt={flex:"~ wrap","justify-evenly":"","gap-2":"",p:"x-4",relative:""},Rdt=oe({__name:"TestsEntry",setup(t){const n=St(()=>ml.value.length),r=St(()=>Yy.value.length),o=St(()=>Xy.value.length),a=St(()=>cdt.value.length),u=St(()=>udt.value.length);return St(()=>Z(n)-o.value-r.value),(f,h)=>{const p=$dt;return ht(),Mt("div",Ddt,[Rt(p,{"text-green5":"","data-testid":"pass-entry"},{header:Zt(()=>[fn(" Pass ")]),body:Zt(()=>[fn(Jt(Z(r)),1)]),_:1}),Rt(p,{class:ge({"text-red5":Z(o),op50:!Z(o)}),"data-testid":"fail-entry"},{header:Zt(()=>[fn(" Fail ")]),body:Zt(()=>[fn(Jt(Z(o)),1)]),_:1},8,["class"]),Z(a)?(ht(),ce(p,{key:0,op50:"","data-testid":"skipped-entry"},{header:Zt(()=>[fn(" Skip ")]),body:Zt(()=>[fn(Jt(Z(a)),1)]),_:1})):ye("",!0),Z(u)?(ht(),ce(p,{key:1,op50:"","data-testid":"todo-entry"},{header:Zt(()=>[fn(" Todo ")]),body:Zt(()=>[fn(Jt(Z(u)),1)]),_:1})):ye("",!0),Rt(p,{tail:!0,"data-testid":"total-entry"},{header:Zt(()=>[fn(" Total ")]),body:Zt(()=>[fn(Jt(Z(n)),1)]),_:1})])}}}),zdt={},Idt={"gap-0":"",flex:"~ col gap-4","h-full":"","justify-center":"","items-center":""},Fdt={"aria-labelledby":"tests",m:"y-4 x-2"};function qdt(t,n){const r=Rdt,o=Mdt;return ht(),Mt("div",Idt,[ut("section",Fdt,[Rt(r)]),Rt(o)])}const Hdt=Xo(zdt,[["render",qdt]]),Bdt={},Wdt={h:"full",flex:"~ col"},Udt=ut("div",{p:"3","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},[ut("div",{class:"i-carbon-dashboard"}),ut("span",{"pl-1":"","font-bold":"","text-sm":"","flex-auto":"","ws-nowrap":"","overflow-hidden":"",truncate:""},"Dashboard")],-1),jdt={class:"scrolls","flex-auto":"","py-1":""};function Gdt(t,n){const r=Hdt;return ht(),Mt("div",Wdt,[Udt,ut("div",jdt,[Rt(r)])])}const Vdt=Xo(Bdt,[["render",Gdt]]),Kdt="/__vitest__/favicon.svg",Va=Kt(),Ws=Kt(!0);function Xdt(){const t=Mr.value;if(t&&t.length>0){const n=Ia(t);n?(Va.value=n,Ws.value=!1):fC(()=>We.state.getFiles(),()=>{Va.value=Ia(t),Ws.value=!1})}return Ws}function Rv(t){Ws.value=t,t&&(Va.value=void 0,Mr.value="")}const Ydt=ut("img",{"w-6":"","h-6":"",src:Kdt,alt:"Vitest logo"},null,-1),Zdt=ut("span",{"font-light":"","text-sm":"","flex-1":""},"Vitest",-1),Jdt={class:"flex text-lg"},Qdt=oe({__name:"Navigation",setup(t){const n=St(()=>Tn.value&&dc(Tn.value)),r=()=>We.rpc.updateSnapshot();function o(u){Mr.value=u.id,Va.value=Ia(u.id),Rv(!1)}const a=St(()=>vc.value?"light":"dark");return(u,f)=>{const h=Zo,p=Ky,g=Zi("tooltip");return ht(),ce(p,{border:"r base",tasks:Z(Tn),"on-item-click":o,"group-by-type":!0,onRun:Z(Zg)},{header:Zt(({filteredTests:m})=>[Ydt,Zdt,ut("div",Jdt,[pn(Rt(h,{title:"Show dashboard",class:"!animate-100ms","animate-count-1":"",icon:"i-carbon-dashboard",onClick:f[0]||(f[0]=b=>Z(Rv)(!0))},null,512),[[Fm,!Z(Ws)],[g,"Dashboard",void 0,{bottom:!0}]]),Z(n)?pn((ht(),ce(h,{key:0,icon:"i-carbon-result-old",onClick:f[1]||(f[1]=b=>r())},null,512)),[[g,"Update all failed snapshot(s)",void 0,{bottom:!0}]]):ye("",!0),pn(Rt(h,{disabled:(m==null?void 0:m.length)===0,icon:"i-carbon-play",onClick:b=>Z(Zg)(m)},null,8,["disabled","onClick"]),[[g,m?m.length===0?"No test to run (clear filter)":"Rerun filtered":"Rerun all",void 0,{bottom:!0}]]),pn(Rt(h,{icon:"dark:i-carbon-moon i-carbon-sun",onClick:f[2]||(f[2]=b=>Z(Sst)())},null,512),[[g,`Toggle to ${Z(a)} mode`,void 0,{bottom:!0}]])])]),_:1},8,["tasks","onRun"])}}}),tpt={"h-3px":"",relative:"","overflow-hidden":"",class:"px-0","w-screen":""},ept=oe({__name:"ProgressBar",setup(t){const{width:n}=tT(),r=St(()=>Tn.value.length===0?"!bg-gray-4 !dark:bg-gray-7 in-progress":adt.value?null:"in-progress"),o=St(()=>Tn.value.length),a=St(()=>Ga.value.length),u=St(()=>ja.value.length),f=St(()=>{const m=Z(o);return m>0?n.value*a.value/m:0}),h=St(()=>{const m=Z(o);return m>0?n.value*u.value/m:0}),p=St(()=>Z(o)-u.value-a.value),g=St(()=>{const m=Z(o);return m>0?n.value*p.value/m:0});return(m,b)=>(ht(),Mt("div",{absolute:"","t-0":"","l-0":"","r-0":"","z-index-1031":"","pointer-events-none":"","p-0":"","h-3px":"",grid:"~ auto-cols-max","justify-items-center":"","w-screen":"",class:ge(Z(r))},[ut("div",tpt,[ut("div",{absolute:"","l-0":"","t-0":"","bg-red5":"","h-3px":"",class:ge(Z(r)),style:kn(`width: ${Z(h)}px;`)}," \xA0 ",6),ut("div",{absolute:"","l-0":"","t-0":"","bg-green5":"","h-3px":"",class:ge(Z(r)),style:kn(`left: ${Z(h)}px; width: ${Z(f)}px;`)}," \xA0 ",6),ut("div",{absolute:"","l-0":"","t-0":"","bg-yellow5":"","h-3px":"",class:ge(Z(r)),style:kn(`left: ${Z(f)+Z(h)}px; width: ${Z(g)}px;`)}," \xA0 ",6)])],2))}});const npt=Xo(ept,[["__scopeId","data-v-f967c1fe"]]),zv={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,n)=>(t[n.id]=n)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,n){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=n},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(n=>({min:n.min,max:n.max,size:n.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,n){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===n?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,n),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=n,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[n])},onSplitterDblClick(t,n){let r=0;this.panes=this.panes.map((o,a)=>(o.size=a===n?o.max:o.min,a!==n&&(r+=o.min),o)),this.panes[n].size-=r,this.$emit("pane-maximize",this.panes[n]),this.$emit("resized",this.panes.map(o=>({min:o.min,max:o.max,size:o.size})))},onPaneClick(t,n){this.$emit("pane-click",this.indexedPanes[n])},getCurrentMouseDrag(t){const n=this.container.getBoundingClientRect(),{clientX:r,clientY:o}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:r-n.left,y:o-n.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const n=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=n-t),t*100/n},calculatePanesSize(t){const n=this.touch.activeSplitter;let r={prevPanesSize:this.sumPrevPanesSize(n),nextPanesSize:this.sumNextPanesSize(n),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:r.prevPanesSize),a=100-(this.pushOtherPanes?0:r.nextPanesSize),u=Math.max(Math.min(this.getCurrentDragPercentage(t),a),o);let f=[n,n+1],h=this.panes[f[0]]||null,p=this.panes[f[1]]||null;const g=h.max<100&&u>=h.max+r.prevPanesSize,m=p.max<100&&u<=100-(p.max+this.sumNextPanesSize(n+1));if(g||m){g?(h.size=h.max,p.size=Math.max(100-h.max-r.prevPanesSize-r.nextPanesSize,0)):(h.size=Math.max(100-p.max-r.prevPanesSize-this.sumNextPanesSize(n+1),0),p.size=p.max);return}if(this.pushOtherPanes){const b=this.doPushOtherPanes(r,u);if(!b)return;({sums:r,panesToResize:f}=b),h=this.panes[f[0]]||null,p=this.panes[f[1]]||null}h!==null&&(h.size=Math.min(Math.max(u-r.prevPanesSize-r.prevReachedMinPanes,h.min),h.max)),p!==null&&(p.size=Math.min(Math.max(100-u-r.nextPanesSize-r.nextReachedMinPanes,p.min),p.max))},doPushOtherPanes(t,n){const r=this.touch.activeSplitter,o=[r,r+1];return n<t.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(r).index,t.prevReachedMinPanes=0,o[0]<r&&this.panes.forEach((a,u)=>{u>o[0]&&u<=r&&(a.size=a.min,t.prevReachedMinPanes+=a.min)}),t.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((a,u)=>{u>0&&u<=r&&(a.size=a.min,t.prevReachedMinPanes+=a.min)}),this.panes[o[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):n>100-t.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(r).index,t.nextReachedMinPanes=0,o[1]>r+1&&this.panes.forEach((a,u)=>{u>r&&u<o[1]&&(a.size=a.min,t.nextReachedMinPanes+=a.min)}),t.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(t.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((a,u)=>{u<this.panesCount-1&&u>=r+1&&(a.size=a.min,t.nextReachedMinPanes+=a.min)}),this.panes[o[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:o}},sumPrevPanesSize(t){return this.panes.reduce((n,r,o)=>n+(o<t?r.size:0),0)},sumNextPanesSize(t){return this.panes.reduce((n,r,o)=>n+(o>t+1?r.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(n=>n.index<t&&n.size>n.min)||{}},findNextExpandedPane(t){return this.panes.find(n=>n.index>t+1&&n.size>n.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const n=t.classList.contains("splitpanes__pane"),r=t.classList.contains("splitpanes__splitter");!n&&!r&&(t.parentNode.removeChild(t),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},addSplitter(t,n,r=!1){const o=t-1,a=document.createElement("div");a.classList.add("splitpanes__splitter"),r||(a.onmousedown=u=>this.onMouseDown(u,o),typeof window<"u"&&"ontouchstart"in window&&(a.ontouchstart=u=>this.onMouseDown(u,o)),a.onclick=u=>this.onSplitterClick(u,o+1)),this.dblClickSplitter&&(a.ondblclick=u=>this.onSplitterDblClick(u,o+1)),n.parentNode.insertBefore(a,n)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(r=>{r.className.includes("splitpanes__splitter")&&this.removeSplitter(r)});let n=0;t.forEach(r=>{r.className.includes("splitpanes__pane")&&(!n&&this.firstSplitter?this.addSplitter(n,r,!0):n&&this.addSplitter(n,r),n++)})},requestUpdate({target:t,...n}){const r=this.indexedPanes[t._.uid];Object.entries(n).forEach(([o,a])=>r[o]=a)},onPaneAdd(t){let n=-1;Array.from(t.$el.parentNode.children).some(a=>(a.className.includes("splitpanes__pane")&&n++,a===t.$el));const r=parseFloat(t.minSize),o=parseFloat(t.maxSize);this.panes.splice(n,0,{id:t._.uid,index:n,min:isNaN(r)?0:r,max:isNaN(o)?100:o,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((a,u)=>a.index=u),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[n]}),this.$emit("pane-add",{index:n,panes:this.panes.map(a=>({min:a.min,max:a.max,size:a.size}))})})},onPaneRemove(t){const n=this.panes.findIndex(o=>o.id===t._.uid),r=this.panes.splice(n,1)[0];this.panes.forEach((o,a)=>o.index=a),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...r,index:n}}),this.$emit("pane-remove",{removed:r,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(t={}){!t.addedPane&&!t.removedPane?this.initialPanesSizing():this.panes.some(n=>n.givenSize!==null||n.min||n.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(n=>({min:n.min,max:n.max,size:n.size})))},equalize(){const t=100/this.panesCount;let n=0;const r=[],o=[];this.panes.forEach(a=>{a.size=Math.max(Math.min(t,a.max),a.min),n-=a.size,a.size>=a.max&&r.push(a.id),a.size<=a.min&&o.push(a.id)}),n>.1&&this.readjustSizes(n,r,o)},initialPanesSizing(){let t=100;const n=[],r=[];let o=0;this.panes.forEach(u=>{t-=u.size,u.size!==null&&o++,u.size>=u.max&&n.push(u.id),u.size<=u.min&&r.push(u.id)});let a=100;t>.1&&(this.panes.forEach(u=>{u.size===null&&(u.size=Math.max(Math.min(t/(this.panesCount-o),u.max),u.min)),a-=u.size}),a>.1&&this.readjustSizes(t,n,r))},equalizeAfterAddOrRemove({addedPane:t,removedPane:n}={}){let r=100/this.panesCount,o=0;const a=[],u=[];t&&t.givenSize!==null&&(r=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(f=>{o-=f.size,f.size>=f.max&&a.push(f.id),f.size<=f.min&&u.push(f.id)}),!(Math.abs(o)<.1)&&(this.panes.forEach(f=>{t&&t.givenSize!==null&&t.id===f.id||(f.size=Math.max(Math.min(r,f.max),f.min)),o-=f.size,f.size>=f.max&&a.push(f.id),f.size<=f.min&&u.push(f.id)}),o>.1&&this.readjustSizes(o,a,u))},readjustSizes(t,n,r){let o;t>0?o=t/(this.panesCount-n.length):o=t/(this.panesCount-r.length),this.panes.forEach((a,u)=>{if(t>0&&!n.includes(a.id)){const f=Math.max(Math.min(a.size+o,a.max),a.min);t-=f-a.size,a.size=f}else if(!r.includes(a.id)){const f=Math.max(Math.min(a.size+o,a.max),a.min);t-=f-a.size,a.size=f}a.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[a.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((n,r)=>{n.ondblclick=t?o=>this.onSplitterDblClick(o,r):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return fl("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},rpt=(t,n)=>{const r=t.__vccOpts||t;for(const[o,a]of n)r[o]=a;return r},ipt={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};function opt(t,n,r,o,a,u){return ht(),Mt("div",{class:"splitpanes__pane",onClick:n[0]||(n[0]=f=>u.onPaneClick(f,t._.uid)),style:kn(t.style)},[Kn(t.$slots,"default")],4)}const ua=rpt(ipt,[["render",opt]]),spt={"h-screen":"","w-screen":"",overflow:"hidden"},lpt=oe({__name:"index",setup(t){const n=Xdt(),r=hr([33,67]),o=hr([33,67]),a=$g(h=>{h.forEach((p,g)=>{r[g]=p.size})},0),u=$g(h=>{h.forEach((p,g)=>{o[g]=p.size})},0),f=()=>{const h=window.innerWidth,p=Math.min(h/3,300);r[0]=100*p/h,r[1]=100-r[0],o[0]=100*p/(h-p),o[1]=100-o[0]};return(h,p)=>{const g=npt,m=Qdt,b=Vdt,x=ldt,S=Nht,M=ST;return ht(),Mt(ue,null,[Rt(g),ut("div",spt,[Rt(Z(zv),{class:"pt-4px",onResized:Z(a),onReady:f},{default:Zt(()=>[Rt(Z(ua),{size:r[0]},{default:Zt(()=>[Rt(m)]),_:1},8,["size"]),Rt(Z(ua),{size:r[1]},{default:Zt(()=>[Rt(jf,null,{default:Zt(()=>[Z(n)?(ht(),ce(b,{key:"summary"})):(ht(),ce(Z(zv),{key:"detail",onResized:Z(u)},{default:Zt(()=>[Rt(Z(ua),{size:o[0]},{default:Zt(()=>[Rt(x)]),_:1},8,["size"]),Rt(Z(ua),{size:o[1]},{default:Zt(()=>[Rt(S)]),_:1},8,["size"])]),_:1},8,["onResized"]))]),_:1})]),_:1},8,["size"])]),_:1},8,["onResized"])]),Rt(M)],64)}}}),apt=[{name:"index",path:"/",component:lpt,props:!0}];const cpt={tooltip:Uk};w0.options.instantMove=!0;w0.options.distance=10;const upt=()=>OS({history:X_("/__vitest__/"),routes:apt}),fpt=[upt],bh=qm(N_);fpt.forEach(t=>{bh.use(t())});Object.entries(cpt).forEach(([t,n])=>{bh.directive(t,n)});bh.mount("#app");