livebook/static/assets/chunk-RQT2CUZQ.js
2023-06-20 15:34:33 +00:00

98 lines
275 KiB
JavaScript

import{a as Jl,b as tc,f as va,h as Sa}from"./chunk-2YVZDWG7.js";var rc=va((ka,wa)=>{(function(t,e){typeof ka=="object"&&typeof wa!="undefined"?wa.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs=e()})(ka,function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",n="second",o="minute",a="hour",s="day",l="week",c="month",u="quarter",h="year",f="date",p="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var T=["th","st","nd","rd"],g=C%100;return"["+C+(T[(g-20)%10]||T[g]||T[0])+"]"}},A=function(C,T,g){var v=String(C);return!v||v.length>=T?C:""+Array(T+1-v.length).join(g)+C},_={s:A,z:function(C){var T=-C.utcOffset(),g=Math.abs(T),v=Math.floor(g/60),M=g%60;return(T<=0?"+":"-")+A(v,2,"0")+":"+A(M,2,"0")},m:function C(T,g){if(T.date()<g.date())return-C(g,T);var v=12*(g.year()-T.year())+(g.month()-T.month()),M=T.clone().add(v,c),z=g-M<0,$=T.clone().add(v+(z?-1:1),c);return+(-(v+(g-M)/(z?M-$:$-M))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:c,y:h,w:l,d:s,D:f,h:a,m:o,s:n,ms:i,Q:u}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},F="en",N={};N[F]=w;var O=function(C){return C instanceof rt},B=function C(T,g,v){var M;if(!T)return F;if(typeof T=="string"){var z=T.toLowerCase();N[z]&&(M=z),g&&(N[z]=g,M=z);var $=T.split("-");if(!M&&$.length>1)return C($[0])}else{var W=T.name;N[W]=T,M=W}return!v&&M&&(F=M),M||!v&&F},y=function(C,T){if(O(C))return C.clone();var g=typeof T=="object"?T:{};return g.date=C,g.args=arguments,new rt(g)},q=_;q.l=B,q.i=O,q.w=function(C,T){return y(C,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var rt=function(){function C(g){this.$L=B(g.locale,null,!0),this.parse(g)}var T=C.prototype;return T.parse=function(g){this.$d=function(v){var M=v.date,z=v.utc;if(M===null)return new Date(NaN);if(q.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var $=M.match(x);if($){var W=$[2]-1||0,G=($[7]||"0").substring(0,3);return z?new Date(Date.UTC($[1],W,$[3]||1,$[4]||0,$[5]||0,$[6]||0,G)):new Date($[1],W,$[3]||1,$[4]||0,$[5]||0,$[6]||0,G)}}return new Date(M)}(g),this.$x=g.x||{},this.init()},T.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},T.$utils=function(){return q},T.isValid=function(){return this.$d.toString()!==p},T.isSame=function(g,v){var M=y(g);return this.startOf(v)<=M&&M<=this.endOf(v)},T.isAfter=function(g,v){return y(g)<this.startOf(v)},T.isBefore=function(g,v){return this.endOf(v)<y(g)},T.$g=function(g,v,M){return q.u(g)?this[v]:this.set(M,g)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(g,v){var M=this,z=!!q.u(v)||v,$=q.p(g),W=function(Rt,ht){var Ot=q.w(M.$u?Date.UTC(M.$y,ht,Rt):new Date(M.$y,ht,Rt),M);return z?Ot:Ot.endOf(s)},G=function(Rt,ht){return q.w(M.toDate()[Rt].apply(M.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(ht)),M)},K=this.$W,at=this.$M,wt=this.$D,Bt="set"+(this.$u?"UTC":"");switch($){case h:return z?W(1,0):W(31,11);case c:return z?W(1,at):W(0,at+1);case l:var Ht=this.$locale().weekStart||0,mt=(K<Ht?K+7:K)-Ht;return W(z?wt-mt:wt+(6-mt),at);case s:case f:return G(Bt+"Hours",0);case a:return G(Bt+"Minutes",1);case o:return G(Bt+"Seconds",2);case n:return G(Bt+"Milliseconds",3);default:return this.clone()}},T.endOf=function(g){return this.startOf(g,!1)},T.$set=function(g,v){var M,z=q.p(g),$="set"+(this.$u?"UTC":""),W=(M={},M[s]=$+"Date",M[f]=$+"Date",M[c]=$+"Month",M[h]=$+"FullYear",M[a]=$+"Hours",M[o]=$+"Minutes",M[n]=$+"Seconds",M[i]=$+"Milliseconds",M)[z],G=z===s?this.$D+(v-this.$W):v;if(z===c||z===h){var K=this.clone().set(f,1);K.$d[W](G),K.init(),this.$d=K.set(f,Math.min(this.$D,K.daysInMonth())).$d}else W&&this.$d[W](G);return this.init(),this},T.set=function(g,v){return this.clone().$set(g,v)},T.get=function(g){return this[q.p(g)]()},T.add=function(g,v){var M,z=this;g=Number(g);var $=q.p(v),W=function(at){var wt=y(z);return q.w(wt.date(wt.date()+Math.round(at*g)),z)};if($===c)return this.set(c,this.$M+g);if($===h)return this.set(h,this.$y+g);if($===s)return W(1);if($===l)return W(7);var G=(M={},M[o]=e,M[a]=r,M[n]=t,M)[$]||1,K=this.$d.getTime()+g*G;return q.w(K,this)},T.subtract=function(g,v){return this.add(-1*g,v)},T.format=function(g){var v=this,M=this.$locale();if(!this.isValid())return M.invalidDate||p;var z=g||"YYYY-MM-DDTHH:mm:ssZ",$=q.z(this),W=this.$H,G=this.$m,K=this.$M,at=M.weekdays,wt=M.months,Bt=function(ht,Ot,E,V){return ht&&(ht[Ot]||ht(v,z))||E[Ot].slice(0,V)},Ht=function(ht){return q.s(W%12||12,ht,"0")},mt=M.meridiem||function(ht,Ot,E){var V=ht<12?"AM":"PM";return E?V.toLowerCase():V},Rt={YY:String(this.$y).slice(-2),YYYY:this.$y,M:K+1,MM:q.s(K+1,2,"0"),MMM:Bt(M.monthsShort,K,wt,3),MMMM:Bt(wt,K),D:this.$D,DD:q.s(this.$D,2,"0"),d:String(this.$W),dd:Bt(M.weekdaysMin,this.$W,at,2),ddd:Bt(M.weekdaysShort,this.$W,at,3),dddd:at[this.$W],H:String(W),HH:q.s(W,2,"0"),h:Ht(1),hh:Ht(2),a:mt(W,G,!0),A:mt(W,G,!1),m:String(G),mm:q.s(G,2,"0"),s:String(this.$s),ss:q.s(this.$s,2,"0"),SSS:q.s(this.$ms,3,"0"),Z:$};return z.replace(b,function(ht,Ot){return Ot||Rt[ht]||$.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(g,v,M){var z,$=q.p(v),W=y(g),G=(W.utcOffset()-this.utcOffset())*e,K=this-W,at=q.m(this,W);return at=(z={},z[h]=at/12,z[c]=at,z[u]=at/3,z[l]=(K-G)/6048e5,z[s]=(K-G)/864e5,z[a]=K/r,z[o]=K/e,z[n]=K/t,z)[$]||K,M?at:q.a(at)},T.daysInMonth=function(){return this.endOf(c).$D},T.$locale=function(){return N[this.$L]},T.locale=function(g,v){if(!g)return this.$L;var M=this.clone(),z=B(g,v,!0);return z&&(M.$L=z),M},T.clone=function(){return q.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},C}(),et=rt.prototype;return y.prototype=et,[["$ms",i],["$s",n],["$m",o],["$H",a],["$W",s],["$M",c],["$y",h],["$D",f]].forEach(function(C){et[C[1]]=function(T){return this.$g(T,C[0],C[1])}}),y.extend=function(C,T){return C.$i||(C(T,rt,y),C.$i=!0),y},y.locale=B,y.isDayjs=O,y.unix=function(C){return y(1e3*C)},y.en=N[F],y.Ls=N,y.p={},y})});var ic=va(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.sanitizeUrl=void 0;var Hm=/^([^\w]*)(javascript|data|vbscript)/im,Ym=/&#(\w+)(^\w|;)?/g,jm=/&(newline|tab);/gi,Vm=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Gm=/^.+(:|&colon;)/gim,Xm=[".","/"];function Zm(t){return Xm.indexOf(t[0])>-1}function Km(t){return t.replace(Ym,function(e,r){return String.fromCharCode(r)})}function Qm(t){var e=Km(t||"").replace(jm,"").replace(Vm,"").trim();if(!e)return"about:blank";if(Zm(e))return e;var r=e.match(Gm);if(!r)return e;var i=r[0];return Hm.test(i)?"about:blank":e}hn.sanitizeUrl=Qm});var Bf=va((Gs,Xs)=>{(function(t,e){typeof Gs=="object"&&typeof Xs!="undefined"?Xs.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self,t.DOMPurify=e())})(Gs,function(){"use strict";let{entries:t,setPrototypeOf:e,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:n}=Object,{freeze:o,seal:a,create:s}=Object,{apply:l,construct:c}=typeof Reflect!="undefined"&&Reflect;l||(l=function(R,Q,J){return R.apply(Q,J)}),o||(o=function(R){return R}),a||(a=function(R){return R}),c||(c=function(R,Q){return new R(...Q)});let u=O(Array.prototype.forEach),h=O(Array.prototype.pop),f=O(Array.prototype.push),p=O(String.prototype.toLowerCase),x=O(String.prototype.toString),b=O(String.prototype.match),w=O(String.prototype.replace),A=O(String.prototype.indexOf),_=O(String.prototype.trim),F=O(RegExp.prototype.test),N=B(TypeError);function O(X){return function(R){for(var Q=arguments.length,J=new Array(Q>1?Q-1:0),_t=1;_t<Q;_t++)J[_t-1]=arguments[_t];return l(X,R,J)}}function B(X){return function(){for(var R=arguments.length,Q=new Array(R),J=0;J<R;J++)Q[J]=arguments[J];return c(X,Q)}}function y(X,R,Q){var J;Q=(J=Q)!==null&&J!==void 0?J:p,e&&e(X,null);let _t=R.length;for(;_t--;){let Jt=R[_t];if(typeof Jt=="string"){let oe=Q(Jt);oe!==Jt&&(r(R)||(R[_t]=oe),Jt=oe)}X[Jt]=!0}return X}function q(X){let R=s(null);for(let[Q,J]of t(X))R[Q]=J;return R}function rt(X,R){for(;X!==null;){let J=n(X,R);if(J){if(J.get)return O(J.get);if(typeof J.value=="function")return O(J.value)}X=i(X)}function Q(J){return console.warn("fallback value for",J),null}return Q}let et=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),g=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),v=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),z=o(["#text"]),$=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),W=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),G=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),at=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),wt=a(/<%[\w\W]*|[\w\W]*%>/gm),Bt=a(/\${[\w\W]*}/gm),Ht=a(/^data-[\-\w.\u00B7-\uFFFF]/),mt=a(/^aria-[\-\w]+$/),Rt=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ht=a(/^(?:\w+script|data):/i),Ot=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),E=a(/^html$/i);var V=Object.freeze({__proto__:null,MUSTACHE_EXPR:at,ERB_EXPR:wt,TMPLIT_EXPR:Bt,DATA_ATTR:Ht,ARIA_ATTR:mt,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:ht,ATTR_WHITESPACE:Ot,DOCTYPE_NAME:E});let Z=()=>typeof window=="undefined"?null:window,S=function(R,Q){if(typeof R!="object"||typeof R.createPolicy!="function")return null;let J=null,_t="data-tt-policy-suffix";Q&&Q.hasAttribute(_t)&&(J=Q.getAttribute(_t));let Jt="dompurify"+(J?"#"+J:"");try{return R.createPolicy(Jt,{createHTML(oe){return oe},createScriptURL(oe){return oe}})}catch(oe){return console.warn("TrustedTypes policy "+Jt+" could not be created."),null}};function Ft(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z(),R=H=>Ft(H);if(R.version="3.0.3",R.removed=[],!X||!X.document||X.document.nodeType!==9)return R.isSupported=!1,R;let Q=X.document,J=Q.currentScript,{document:_t}=X,{DocumentFragment:Jt,HTMLTemplateElement:oe,Node:na,Element:Ml,NodeFilter:oa,NamedNodeMap:Tm=X.NamedNodeMap||X.MozNamedAttrMap,HTMLFormElement:vm,DOMParser:Sm,trustedTypes:rn}=X,nn=Ml.prototype,km=rt(nn,"cloneNode"),wm=rt(nn,"nextSibling"),Bm=rt(nn,"childNodes"),aa=rt(nn,"parentNode");if(typeof oe=="function"){let H=_t.createElement("template");H.content&&H.content.ownerDocument&&(_t=H.content.ownerDocument)}let $t,fi="",{implementation:sa,createNodeIterator:Fm,createDocumentFragment:Mm,getElementsByTagName:Am}=_t,{importNode:Lm}=Q,ae={};R.isSupported=typeof t=="function"&&typeof aa=="function"&&sa&&sa.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:la,ERB_EXPR:ca,TMPLIT_EXPR:ua,DATA_ATTR:Em,ARIA_ATTR:Om,IS_SCRIPT_OR_DATA:Im,ATTR_WHITESPACE:Al}=V,{IS_ALLOWED_URI:Ll}=V,bt=null,El=y({},[...et,...C,...T,...v,...z]),Ct=null,Ol=y({},[...$,...W,...G,...K]),ft=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pi=null,ha=null,Il=!0,fa=!0,Dl=!1,Nl=!0,Sr=!1,Ge=!1,pa=!1,da=!1,kr=!1,on=!1,an=!1,Rl=!0,$l=!1,Dm="user-content-",ma=!0,di=!1,wr={},Br=null,zl=y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Pl=null,ql=y({},["audio","video","img","source","image","track"]),ga=null,Wl=y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),sn="http://www.w3.org/1998/Math/MathML",ln="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml",Fr=me,xa=!1,ya=null,Nm=y({},[sn,ln,me],x),Xe,Rm=["application/xhtml+xml","text/html"],$m="text/html",Tt,Mr=null,zm=_t.createElement("form"),Ul=function(d){return d instanceof RegExp||d instanceof Function},_a=function(d){if(!(Mr&&Mr===d)){if((!d||typeof d!="object")&&(d={}),d=q(d),Xe=Rm.indexOf(d.PARSER_MEDIA_TYPE)===-1?Xe=$m:Xe=d.PARSER_MEDIA_TYPE,Tt=Xe==="application/xhtml+xml"?x:p,bt="ALLOWED_TAGS"in d?y({},d.ALLOWED_TAGS,Tt):El,Ct="ALLOWED_ATTR"in d?y({},d.ALLOWED_ATTR,Tt):Ol,ya="ALLOWED_NAMESPACES"in d?y({},d.ALLOWED_NAMESPACES,x):Nm,ga="ADD_URI_SAFE_ATTR"in d?y(q(Wl),d.ADD_URI_SAFE_ATTR,Tt):Wl,Pl="ADD_DATA_URI_TAGS"in d?y(q(ql),d.ADD_DATA_URI_TAGS,Tt):ql,Br="FORBID_CONTENTS"in d?y({},d.FORBID_CONTENTS,Tt):zl,pi="FORBID_TAGS"in d?y({},d.FORBID_TAGS,Tt):{},ha="FORBID_ATTR"in d?y({},d.FORBID_ATTR,Tt):{},wr="USE_PROFILES"in d?d.USE_PROFILES:!1,Il=d.ALLOW_ARIA_ATTR!==!1,fa=d.ALLOW_DATA_ATTR!==!1,Dl=d.ALLOW_UNKNOWN_PROTOCOLS||!1,Nl=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Sr=d.SAFE_FOR_TEMPLATES||!1,Ge=d.WHOLE_DOCUMENT||!1,kr=d.RETURN_DOM||!1,on=d.RETURN_DOM_FRAGMENT||!1,an=d.RETURN_TRUSTED_TYPE||!1,da=d.FORCE_BODY||!1,Rl=d.SANITIZE_DOM!==!1,$l=d.SANITIZE_NAMED_PROPS||!1,ma=d.KEEP_CONTENT!==!1,di=d.IN_PLACE||!1,Ll=d.ALLOWED_URI_REGEXP||Rt,Fr=d.NAMESPACE||me,ft=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&Ul(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ft.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&Ul(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ft.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ft.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Sr&&(fa=!1),on&&(kr=!0),wr&&(bt=y({},[...z]),Ct=[],wr.html===!0&&(y(bt,et),y(Ct,$)),wr.svg===!0&&(y(bt,C),y(Ct,W),y(Ct,K)),wr.svgFilters===!0&&(y(bt,T),y(Ct,W),y(Ct,K)),wr.mathMl===!0&&(y(bt,v),y(Ct,G),y(Ct,K))),d.ADD_TAGS&&(bt===El&&(bt=q(bt)),y(bt,d.ADD_TAGS,Tt)),d.ADD_ATTR&&(Ct===Ol&&(Ct=q(Ct)),y(Ct,d.ADD_ATTR,Tt)),d.ADD_URI_SAFE_ATTR&&y(ga,d.ADD_URI_SAFE_ATTR,Tt),d.FORBID_CONTENTS&&(Br===zl&&(Br=q(Br)),y(Br,d.FORBID_CONTENTS,Tt)),ma&&(bt["#text"]=!0),Ge&&y(bt,["html","head","body"]),bt.table&&(y(bt,["tbody"]),delete pi.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$t=d.TRUSTED_TYPES_POLICY,fi=$t.createHTML("")}else $t===void 0&&($t=S(rn,J)),$t!==null&&typeof fi=="string"&&(fi=$t.createHTML(""));o&&o(d),Mr=d}},Hl=y({},["mi","mo","mn","ms","mtext"]),Yl=y({},["foreignobject","desc","title","annotation-xml"]),Pm=y({},["title","style","font","a","script"]),cn=y({},C);y(cn,T),y(cn,g);let ba=y({},v);y(ba,M);let qm=function(d){let k=aa(d);(!k||!k.tagName)&&(k={namespaceURI:Fr,tagName:"template"});let I=p(d.tagName),nt=p(k.tagName);return ya[d.namespaceURI]?d.namespaceURI===ln?k.namespaceURI===me?I==="svg":k.namespaceURI===sn?I==="svg"&&(nt==="annotation-xml"||Hl[nt]):!!cn[I]:d.namespaceURI===sn?k.namespaceURI===me?I==="math":k.namespaceURI===ln?I==="math"&&Yl[nt]:!!ba[I]:d.namespaceURI===me?k.namespaceURI===ln&&!Yl[nt]||k.namespaceURI===sn&&!Hl[nt]?!1:!ba[I]&&(Pm[I]||!cn[I]):!!(Xe==="application/xhtml+xml"&&ya[d.namespaceURI]):!1},Ze=function(d){f(R.removed,{element:d});try{d.parentNode.removeChild(d)}catch(k){d.remove()}},Ca=function(d,k){try{f(R.removed,{attribute:k.getAttributeNode(d),from:k})}catch(I){f(R.removed,{attribute:null,from:k})}if(k.removeAttribute(d),d==="is"&&!Ct[d])if(kr||on)try{Ze(k)}catch(I){}else try{k.setAttribute(d,"")}catch(I){}},jl=function(d){let k,I;if(da)d="<remove></remove>"+d;else{let jt=b(d,/^[\r\n\t ]+/);I=jt&&jt[0]}Xe==="application/xhtml+xml"&&Fr===me&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");let nt=$t?$t.createHTML(d):d;if(Fr===me)try{k=new Sm().parseFromString(nt,Xe)}catch(jt){}if(!k||!k.documentElement){k=sa.createDocument(Fr,"template",null);try{k.documentElement.innerHTML=xa?fi:nt}catch(jt){}}let vt=k.body||k.documentElement;return d&&I&&vt.insertBefore(_t.createTextNode(I),vt.childNodes[0]||null),Fr===me?Am.call(k,Ge?"html":"body")[0]:Ge?k.documentElement:vt},Vl=function(d){return Fm.call(d.ownerDocument||d,d,oa.SHOW_ELEMENT|oa.SHOW_COMMENT|oa.SHOW_TEXT,null,!1)},Wm=function(d){return d instanceof vm&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof Tm)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},un=function(d){return typeof na=="object"?d instanceof na:d&&typeof d=="object"&&typeof d.nodeType=="number"&&typeof d.nodeName=="string"},ge=function(d,k,I){ae[d]&&u(ae[d],nt=>{nt.call(R,k,I,Mr)})},Gl=function(d){let k;if(ge("beforeSanitizeElements",d,null),Wm(d))return Ze(d),!0;let I=Tt(d.nodeName);if(ge("uponSanitizeElement",d,{tagName:I,allowedTags:bt}),d.hasChildNodes()&&!un(d.firstElementChild)&&(!un(d.content)||!un(d.content.firstElementChild))&&F(/<[/\w]/g,d.innerHTML)&&F(/<[/\w]/g,d.textContent))return Ze(d),!0;if(!bt[I]||pi[I]){if(!pi[I]&&Zl(I)&&(ft.tagNameCheck instanceof RegExp&&F(ft.tagNameCheck,I)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(I)))return!1;if(ma&&!Br[I]){let nt=aa(d)||d.parentNode,vt=Bm(d)||d.childNodes;if(vt&&nt){let jt=vt.length;for(let ut=jt-1;ut>=0;--ut)nt.insertBefore(km(vt[ut],!0),wm(d))}}return Ze(d),!0}return d instanceof Ml&&!qm(d)||(I==="noscript"||I==="noembed")&&F(/<\/no(script|embed)/i,d.innerHTML)?(Ze(d),!0):(Sr&&d.nodeType===3&&(k=d.textContent,k=w(k,la," "),k=w(k,ca," "),k=w(k,ua," "),d.textContent!==k&&(f(R.removed,{element:d.cloneNode()}),d.textContent=k)),ge("afterSanitizeElements",d,null),!1)},Xl=function(d,k,I){if(Rl&&(k==="id"||k==="name")&&(I in _t||I in zm))return!1;if(!(fa&&!ha[k]&&F(Em,k))){if(!(Il&&F(Om,k))){if(!Ct[k]||ha[k]){if(!(Zl(d)&&(ft.tagNameCheck instanceof RegExp&&F(ft.tagNameCheck,d)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(d))&&(ft.attributeNameCheck instanceof RegExp&&F(ft.attributeNameCheck,k)||ft.attributeNameCheck instanceof Function&&ft.attributeNameCheck(k))||k==="is"&&ft.allowCustomizedBuiltInElements&&(ft.tagNameCheck instanceof RegExp&&F(ft.tagNameCheck,I)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(I))))return!1}else if(!ga[k]){if(!F(Ll,w(I,Al,""))){if(!((k==="src"||k==="xlink:href"||k==="href")&&d!=="script"&&A(I,"data:")===0&&Pl[d])){if(!(Dl&&!F(Im,w(I,Al,"")))){if(I)return!1}}}}}}return!0},Zl=function(d){return d.indexOf("-")>0},Kl=function(d){let k,I,nt,vt;ge("beforeSanitizeAttributes",d,null);let{attributes:jt}=d;if(!jt)return;let ut={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ct};for(vt=jt.length;vt--;){k=jt[vt];let{name:se,namespaceURI:Ta}=k;if(I=se==="value"?k.value:_(k.value),nt=Tt(se),ut.attrName=nt,ut.attrValue=I,ut.keepAttr=!0,ut.forceKeepAttr=void 0,ge("uponSanitizeAttribute",d,ut),I=ut.attrValue,ut.forceKeepAttr||(Ca(se,d),!ut.keepAttr))continue;if(!Nl&&F(/\/>/i,I)){Ca(se,d);continue}Sr&&(I=w(I,la," "),I=w(I,ca," "),I=w(I,ua," "));let Ql=Tt(d.nodeName);if(Xl(Ql,nt,I)){if($l&&(nt==="id"||nt==="name")&&(Ca(se,d),I=Dm+I),$t&&typeof rn=="object"&&typeof rn.getAttributeType=="function"&&!Ta)switch(rn.getAttributeType(Ql,nt)){case"TrustedHTML":{I=$t.createHTML(I);break}case"TrustedScriptURL":{I=$t.createScriptURL(I);break}}try{Ta?d.setAttributeNS(Ta,se,I):d.setAttribute(se,I),h(R.removed)}catch(_w){}}}ge("afterSanitizeAttributes",d,null)},Um=function H(d){let k,I=Vl(d);for(ge("beforeSanitizeShadowDOM",d,null);k=I.nextNode();)ge("uponSanitizeShadowNode",k,null),!Gl(k)&&(k.content instanceof Jt&&H(k.content),Kl(k));ge("afterSanitizeShadowDOM",d,null)};return R.sanitize=function(H){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k,I,nt,vt;if(xa=!H,xa&&(H="<!-->"),typeof H!="string"&&!un(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw N("dirty is not a string, aborting")}else throw N("toString is not a function");if(!R.isSupported)return H;if(pa||_a(d),R.removed=[],typeof H=="string"&&(di=!1),di){if(H.nodeName){let se=Tt(H.nodeName);if(!bt[se]||pi[se])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof na)k=jl("<!---->"),I=k.ownerDocument.importNode(H,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?k=I:k.appendChild(I);else{if(!kr&&!Sr&&!Ge&&H.indexOf("<")===-1)return $t&&an?$t.createHTML(H):H;if(k=jl(H),!k)return kr?null:an?fi:""}k&&da&&Ze(k.firstChild);let jt=Vl(di?H:k);for(;nt=jt.nextNode();)Gl(nt)||(nt.content instanceof Jt&&Um(nt.content),Kl(nt));if(di)return H;if(kr){if(on)for(vt=Mm.call(k.ownerDocument);k.firstChild;)vt.appendChild(k.firstChild);else vt=k;return(Ct.shadowroot||Ct.shadowrootmod)&&(vt=Lm.call(Q,vt,!0)),vt}let ut=Ge?k.outerHTML:k.innerHTML;return Ge&&bt["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&F(E,k.ownerDocument.doctype.name)&&(ut="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
`+ut),Sr&&(ut=w(ut,la," "),ut=w(ut,ca," "),ut=w(ut,ua," ")),$t&&an?$t.createHTML(ut):ut},R.setConfig=function(H){_a(H),pa=!0},R.clearConfig=function(){Mr=null,pa=!1},R.isValidAttribute=function(H,d,k){Mr||_a({});let I=Tt(H),nt=Tt(d);return Xl(I,nt,k)},R.addHook=function(H,d){typeof d=="function"&&(ae[H]=ae[H]||[],f(ae[H],d))},R.removeHook=function(H){if(ae[H])return h(ae[H])},R.removeHooks=function(H){ae[H]&&(ae[H]=[])},R.removeAllHooks=function(){ae={}},R}var it=Ft();return it})});function ec(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(u){var h,f;return(f=(h=u.match(/[\t ]/g))===null||h===void 0?void 0:h.length)!==null&&f!==void 0?f:0})):s},[]);if(n.length){var o=new RegExp(`
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(s){return s.replace(o,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return e.forEach(function(s,l){var c=a.match(/(?:^|\n)( *)$/),u=c?c[1]:"",h=s;typeof s=="string"&&s.includes(`
`)&&(h=String(s).split(`
`).map(function(f,p){return p===0?f:""+u+f}).join(`
`)),a+=h+i[l+1]}),a}function nc(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function oc(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function Ke(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ba(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qe(t){let e,r,i;t.length!==2?(e=Ke,r=(s,l)=>Ke(t(s),l),i=(s,l)=>t(s)-l):(e=t===Ke||t===Ba?t:Jm,r=t,i=t);function n(s,l,c=0,u=s.length){if(c<u){if(e(l,l)!==0)return u;do{let h=c+u>>>1;r(s[h],l)<0?c=h+1:u=h}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(e(l,l)!==0)return u;do{let h=c+u>>>1;r(s[h],l)<=0?c=h+1:u=h}while(c<u)}return c}function a(s,l,c=0,u=s.length){let h=n(s,l,c,u-1);return h>c&&i(s[h-1],l)>-i(s[h],l)?h-1:h}return{left:n,center:a,right:o}}function Jm(){return 0}function Fa(t){return t===null?NaN:+t}var ac=Qe(Ke),sc=ac.right,tg=ac.left,eg=Qe(Fa).center,Ma=sc;var Ar=class extends Map{constructor(e,r=ng){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[i,n]of e)this.set(i,n)}get(e){return super.get(lc(this,e))}has(e){return super.has(lc(this,e))}set(e,r){return super.set(rg(this,e),r)}delete(e){return super.delete(ig(this,e))}};function lc({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}function rg({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function ig({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function ng(t){return t!==null&&typeof t=="object"?t.valueOf():t}var og=Math.sqrt(50),ag=Math.sqrt(10),sg=Math.sqrt(2);function fn(t,e,r){let i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),o=i/Math.pow(10,n),a=o>=og?10:o>=ag?5:o>=sg?2:1,s,l,c;return n<0?(c=Math.pow(10,-n)/a,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,n)*a,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=r&&r<2?fn(t,e,r*2):[s,l,c]}function pn(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let i=e<t,[n,o,a]=i?fn(e,t,r):fn(t,e,r);if(!(o>=n))return[];let s=o-n+1,l=new Array(s);if(i)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(n+c)/-a;else for(let c=0;c<s;++c)l[c]=(n+c)*a;return l}function mi(t,e,r){return e=+e,t=+t,r=+r,fn(t,e,r)[2]}function Lr(t,e,r){e=+e,t=+t,r=+r;let i=e<t,n=i?mi(e,t,r):mi(t,e,r);return(i?-1:1)*(n<0?1/-n:n)}function cc(t){return t}var mn=1,Aa=2,La=3,dn=4,uc=1e-6;function lg(t){return"translate("+t+",0)"}function cg(t){return"translate(0,"+t+")"}function ug(t){return e=>+t(e)}function hg(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function fg(){return!this.__axis}function hc(t,e){var r=[],i=null,n=null,o=6,a=6,s=3,l=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,c=t===mn||t===dn?-1:1,u=t===dn||t===Aa?"x":"y",h=t===mn||t===La?lg:cg;function f(p){var x=i==null?e.ticks?e.ticks.apply(e,r):e.domain():i,b=n==null?e.tickFormat?e.tickFormat.apply(e,r):cc:n,w=Math.max(o,0)+s,A=e.range(),_=+A[0]+l,F=+A[A.length-1]+l,N=(e.bandwidth?hg:ug)(e.copy(),l),O=p.selection?p.selection():p,B=O.selectAll(".domain").data([null]),y=O.selectAll(".tick").data(x,e).order(),q=y.exit(),rt=y.enter().append("g").attr("class","tick"),et=y.select("line"),C=y.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),y=y.merge(rt),et=et.merge(rt.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),C=C.merge(rt.append("text").attr("fill","currentColor").attr(u,c*w).attr("dy",t===mn?"0em":t===La?"0.71em":"0.32em")),p!==O&&(B=B.transition(p),y=y.transition(p),et=et.transition(p),C=C.transition(p),q=q.transition(p).attr("opacity",uc).attr("transform",function(T){return isFinite(T=N(T))?h(T+l):this.getAttribute("transform")}),rt.attr("opacity",uc).attr("transform",function(T){var g=this.parentNode.__axis;return h((g&&isFinite(g=g(T))?g:N(T))+l)})),q.remove(),B.attr("d",t===dn||t===Aa?a?"M"+c*a+","+_+"H"+l+"V"+F+"H"+c*a:"M"+l+","+_+"V"+F:a?"M"+_+","+c*a+"V"+l+"H"+F+"V"+c*a:"M"+_+","+l+"H"+F),y.attr("opacity",1).attr("transform",function(T){return h(N(T)+l)}),et.attr(u+"2",c*o),C.attr(u,c*w).text(b),O.filter(fg).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Aa?"start":t===dn?"end":"middle"),O.each(function(){this.__axis=N})}return f.scale=function(p){return arguments.length?(e=p,f):e},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),f):r.slice()},f.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),f):i&&i.slice()},f.tickFormat=function(p){return arguments.length?(n=p,f):n},f.tickSize=function(p){return arguments.length?(o=a=+p,f):o},f.tickSizeInner=function(p){return arguments.length?(o=+p,f):o},f.tickSizeOuter=function(p){return arguments.length?(a=+p,f):a},f.tickPadding=function(p){return arguments.length?(s=+p,f):s},f.offset=function(p){return arguments.length?(l=+p,f):l},f}function pg(t){return hc(mn,t)}function dg(t){return hc(La,t)}function mg(){}function Je(t){return t==null?mg:function(){return this.querySelector(t)}}function fc(t){typeof t!="function"&&(t=Je(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o=e[n],a=o.length,s=i[n]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=t.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new st(i,this._parents)}function gi(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function gg(){return[]}function xi(t){return t==null?gg:function(){return this.querySelectorAll(t)}}function xg(t){return function(){return gi(t.apply(this,arguments))}}function pc(t){typeof t=="function"?t=xg(t):t=xi(t);for(var e=this._groups,r=e.length,i=[],n=[],o=0;o<r;++o)for(var a=e[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(i.push(t.call(l,l.__data__,c,a)),n.push(l));return new st(i,n)}function yi(t){return function(){return this.matches(t)}}function gn(t){return function(e){return e.matches(t)}}var yg=Array.prototype.find;function _g(t){return function(){return yg.call(this.children,t)}}function bg(){return this.firstElementChild}function dc(t){return this.select(t==null?bg:_g(typeof t=="function"?t:gn(t)))}var Cg=Array.prototype.filter;function Tg(){return Array.from(this.children)}function vg(t){return function(){return Cg.call(this.children,t)}}function mc(t){return this.selectAll(t==null?Tg:vg(typeof t=="function"?t:gn(t)))}function gc(t){typeof t!="function"&&(t=yi(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o=e[n],a=o.length,s=i[n]=[],l,c=0;c<a;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&s.push(l);return new st(i,this._parents)}function xn(t){return new Array(t.length)}function xc(){return new st(this._enter||this._groups.map(xn),this._parents)}function _i(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}_i.prototype={constructor:_i,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function yc(t){return function(){return t}}function Sg(t,e,r,i,n,o){for(var a=0,s,l=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],i[a]=s):r[a]=new _i(t,o[a]);for(;a<l;++a)(s=e[a])&&(n[a]=s)}function kg(t,e,r,i,n,o,a){var s,l,c=new Map,u=e.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=e[s])&&(f[s]=p=a.call(l,l.__data__,s,e)+"",c.has(p)?n[s]=l:c.set(p,l));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(l=c.get(p))?(i[s]=l,l.__data__=o[s],c.delete(p)):r[s]=new _i(t,o[s]);for(s=0;s<u;++s)(l=e[s])&&c.get(f[s])===l&&(n[s]=l)}function wg(t){return t.__data__}function _c(t,e){if(!arguments.length)return Array.from(this,wg);var r=e?kg:Sg,i=this._parents,n=this._groups;typeof t!="function"&&(t=yc(t));for(var o=n.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=i[c],h=n[c],f=h.length,p=Bg(t.call(u,u&&u.__data__,c,i)),x=p.length,b=s[c]=new Array(x),w=a[c]=new Array(x),A=l[c]=new Array(f);r(u,h,b,w,A,p,e);for(var _=0,F=0,N,O;_<x;++_)if(N=b[_]){for(_>=F&&(F=_+1);!(O=w[F])&&++F<x;);N._next=O||null}}return a=new st(a,i),a._enter=s,a._exit=l,a}function Bg(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bc(){return new st(this._exit||this._groups.map(xn),this._parents)}function Cc(t,e,r){var i=this.enter(),n=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?o.remove():r(o),i&&n?i.merge(n).order():n}function Tc(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,o=i.length,a=Math.min(n,o),s=new Array(n),l=0;l<a;++l)for(var c=r[l],u=i[l],h=c.length,f=s[l]=new Array(h),p,x=0;x<h;++x)(p=c[x]||u[x])&&(f[x]=p);for(;l<n;++l)s[l]=r[l];return new st(s,this._parents)}function vc(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],n=i.length-1,o=i[n],a;--n>=0;)(a=i[n])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Sc(t){t||(t=Fg);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var r=this._groups,i=r.length,n=new Array(i),o=0;o<i;++o){for(var a=r[o],s=a.length,l=n[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(e)}return new st(n,this._parents).order()}function Fg(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function kc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function wc(){return Array.from(this)}function Bc(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,o=i.length;n<o;++n){var a=i[n];if(a)return a}return null}function Fc(){let t=0;for(let e of this)++t;return t}function Mc(){return!this.node()}function Ac(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n=e[r],o=0,a=n.length,s;o<a;++o)(s=n[o])&&t.call(s,s.__data__,o,n);return this}var yn="http://www.w3.org/1999/xhtml",Ea={svg:"http://www.w3.org/2000/svg",xhtml:yn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function xe(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Ea.hasOwnProperty(e)?{space:Ea[e],local:t}:t}function Mg(t){return function(){this.removeAttribute(t)}}function Ag(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Lg(t,e){return function(){this.setAttribute(t,e)}}function Eg(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Og(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function Ig(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Lc(t,e){var r=xe(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?Ag:Mg:typeof e=="function"?r.local?Ig:Og:r.local?Eg:Lg)(r,e))}function _n(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Dg(t){return function(){this.style.removeProperty(t)}}function Ng(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Rg(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function Ec(t,e,r){return arguments.length>1?this.each((e==null?Dg:typeof e=="function"?Rg:Ng)(t,e,r==null?"":r)):Ee(this.node(),t)}function Ee(t,e){return t.style.getPropertyValue(e)||_n(t).getComputedStyle(t,null).getPropertyValue(e)}function $g(t){return function(){delete this[t]}}function zg(t,e){return function(){this[t]=e}}function Pg(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function Oc(t,e){return arguments.length>1?this.each((e==null?$g:typeof e=="function"?Pg:zg)(t,e)):this.node()[t]}function Ic(t){return t.trim().split(/^|\s+/)}function Oa(t){return t.classList||new Dc(t)}function Dc(t){this._node=t,this._names=Ic(t.getAttribute("class")||"")}Dc.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Nc(t,e){for(var r=Oa(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function Rc(t,e){for(var r=Oa(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function qg(t){return function(){Nc(this,t)}}function Wg(t){return function(){Rc(this,t)}}function Ug(t,e){return function(){(e.apply(this,arguments)?Nc:Rc)(this,t)}}function $c(t,e){var r=Ic(t+"");if(arguments.length<2){for(var i=Oa(this.node()),n=-1,o=r.length;++n<o;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?Ug:e?qg:Wg)(r,e))}function Hg(){this.textContent=""}function Yg(t){return function(){this.textContent=t}}function jg(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function zc(t){return arguments.length?this.each(t==null?Hg:(typeof t=="function"?jg:Yg)(t)):this.node().textContent}function Vg(){this.innerHTML=""}function Gg(t){return function(){this.innerHTML=t}}function Xg(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function Pc(t){return arguments.length?this.each(t==null?Vg:(typeof t=="function"?Xg:Gg)(t)):this.node().innerHTML}function Zg(){this.nextSibling&&this.parentNode.appendChild(this)}function qc(){return this.each(Zg)}function Kg(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Wc(){return this.each(Kg)}function Qg(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===yn&&e.documentElement.namespaceURI===yn?e.createElement(t):e.createElementNS(r,t)}}function Jg(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function bn(t){var e=xe(t);return(e.local?Jg:Qg)(e)}function Uc(t){var e=typeof t=="function"?t:bn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function t0(){return null}function Hc(t,e){var r=typeof t=="function"?t:bn(t),i=e==null?t0:typeof e=="function"?e:Je(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function e0(){var t=this.parentNode;t&&t.removeChild(this)}function Yc(){return this.each(e0)}function r0(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function i0(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jc(t){return this.select(t?i0:r0)}function Vc(t){return arguments.length?this.property("__data__",t):this.node().__data__}function n0(t){return function(e){t.call(this,e,this.__data__)}}function o0(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function a0(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,o;r<n;++r)o=e[r],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function s0(t,e,r){return function(){var i=this.__on,n,o=n0(e);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=o,n.options=r),n.value=e;return}}this.addEventListener(t.type,o,r),n={type:t.type,name:t.name,value:e,listener:o,options:r},i?i.push(n):this.__on=[n]}}function Gc(t,e,r){var i=o0(t+""),n,o=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(n=0,u=s[l];n<o;++n)if((a=i[n]).type===u.type&&a.name===u.name)return u.value}return}for(s=e?s0:a0,n=0;n<o;++n)this.each(s(i[n],e,r));return this}function Xc(t,e,r){var i=_n(t),n=i.CustomEvent;typeof n=="function"?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function l0(t,e){return function(){return Xc(this,t,e)}}function c0(t,e){return function(){return Xc(this,t,e.apply(this,arguments))}}function Zc(t,e){return this.each((typeof e=="function"?c0:l0)(t,e))}function*Kc(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,o=i.length,a;n<o;++n)(a=i[n])&&(yield a)}var bi=[null];function st(t,e){this._groups=t,this._parents=e}function Qc(){return new st([[document.documentElement]],bi)}function u0(){return this}st.prototype=Qc.prototype={constructor:st,select:fc,selectAll:pc,selectChild:dc,selectChildren:mc,filter:gc,data:_c,enter:xc,exit:bc,join:Cc,merge:Tc,selection:u0,order:vc,sort:Sc,call:kc,nodes:wc,node:Bc,size:Fc,empty:Mc,each:Ac,attr:Lc,style:Ec,property:Oc,classed:$c,text:zc,html:Pc,raise:qc,lower:Wc,append:Uc,insert:Hc,remove:Yc,clone:jc,datum:Vc,on:Gc,dispatch:Zc,[Symbol.iterator]:Kc};var ye=Qc;function Vt(t){return typeof t=="string"?new st([[document.querySelector(t)]],[document.documentElement]):new st([[t]],bi)}function h0(t){return typeof t=="string"?new st([document.querySelectorAll(t)],[document.documentElement]):new st([gi(t)],bi)}function tr(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Er(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Oe(){}var Ci=.7,vn=1/Ci,Or="\\s*([+-]?\\d+)\\s*",Ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f0=/^#([0-9a-f]{3,8})$/,p0=new RegExp(`^rgb\\(${Or},${Or},${Or}\\)$`),d0=new RegExp(`^rgb\\(${le},${le},${le}\\)$`),m0=new RegExp(`^rgba\\(${Or},${Or},${Or},${Ti}\\)$`),g0=new RegExp(`^rgba\\(${le},${le},${le},${Ti}\\)$`),x0=new RegExp(`^hsl\\(${Ti},${le},${le}\\)$`),y0=new RegExp(`^hsla\\(${Ti},${le},${le},${Ti}\\)$`),Jc={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};tr(Oe,ee,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:tu,formatHex:tu,formatHex8:_0,formatHsl:b0,formatRgb:eu,toString:eu});function tu(){return this.rgb().formatHex()}function _0(){return this.rgb().formatHex8()}function b0(){return su(this).formatHsl()}function eu(){return this.rgb().formatRgb()}function ee(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=f0.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?ru(e):r===3?new Mt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Cn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Cn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=p0.exec(t))?new Mt(e[1],e[2],e[3],1):(e=d0.exec(t))?new Mt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=m0.exec(t))?Cn(e[1],e[2],e[3],e[4]):(e=g0.exec(t))?Cn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=x0.exec(t))?ou(e[1],e[2]/100,e[3]/100,1):(e=y0.exec(t))?ou(e[1],e[2]/100,e[3]/100,e[4]):Jc.hasOwnProperty(t)?ru(Jc[t]):t==="transparent"?new Mt(NaN,NaN,NaN,0):null}function ru(t){return new Mt(t>>16&255,t>>8&255,t&255,1)}function Cn(t,e,r,i){return i<=0&&(t=e=r=NaN),new Mt(t,e,r,i)}function Da(t){return t instanceof Oe||(t=ee(t)),t?(t=t.rgb(),new Mt(t.r,t.g,t.b,t.opacity)):new Mt}function Ir(t,e,r,i){return arguments.length===1?Da(t):new Mt(t,e,r,i==null?1:i)}function Mt(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}tr(Mt,Ir,Er(Oe,{brighter(t){return t=t==null?vn:Math.pow(vn,t),new Mt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ci:Math.pow(Ci,t),new Mt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Mt(rr(this.r),rr(this.g),rr(this.b),Sn(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:iu,formatHex:iu,formatHex8:C0,formatRgb:nu,toString:nu}));function iu(){return`#${er(this.r)}${er(this.g)}${er(this.b)}`}function C0(){return`#${er(this.r)}${er(this.g)}${er(this.b)}${er((isNaN(this.opacity)?1:this.opacity)*255)}`}function nu(){let t=Sn(this.opacity);return`${t===1?"rgb(":"rgba("}${rr(this.r)}, ${rr(this.g)}, ${rr(this.b)}${t===1?")":`, ${t})`}`}function Sn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function rr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function er(t){return t=rr(t),(t<16?"0":"")+t.toString(16)}function ou(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new te(t,e,r,i)}function su(t){if(t instanceof te)return new te(t.h,t.s,t.l,t.opacity);if(t instanceof Oe||(t=ee(t)),!t)return new te;if(t instanceof te)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),o=Math.max(e,r,i),a=NaN,s=o-n,l=(o+n)/2;return s?(e===o?a=(r-i)/s+(r<i)*6:r===o?a=(i-e)/s+2:a=(e-r)/s+4,s/=l<.5?o+n:2-o-n,a*=60):s=l>0&&l<1?0:a,new te(a,s,l,t.opacity)}function lu(t,e,r,i){return arguments.length===1?su(t):new te(t,e,r,i==null?1:i)}function te(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}tr(te,lu,Er(Oe,{brighter(t){return t=t==null?vn:Math.pow(vn,t),new te(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ci:Math.pow(Ci,t),new te(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new Mt(Ia(t>=240?t-240:t+120,n,i),Ia(t,n,i),Ia(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new te(au(this.h),Tn(this.s),Tn(this.l),Sn(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(){let t=Sn(this.opacity);return`${t===1?"hsl(":"hsla("}${au(this.h)}, ${Tn(this.s)*100}%, ${Tn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function au(t){return t=(t||0)%360,t<0?t+360:t}function Tn(t){return Math.max(0,Math.min(1,t||0))}function Ia(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var cu=Math.PI/180,uu=180/Math.PI;var kn=18,hu=.96422,fu=1,pu=.82521,du=4/29,Dr=6/29,mu=3*Dr*Dr,T0=Dr*Dr*Dr;function gu(t){if(t instanceof ce)return new ce(t.l,t.a,t.b,t.opacity);if(t instanceof _e)return xu(t);t instanceof Mt||(t=Da(t));var e=za(t.r),r=za(t.g),i=za(t.b),n=Na((.2225045*e+.7168786*r+.0606169*i)/fu),o,a;return e===r&&r===i?o=a=n:(o=Na((.4360747*e+.3850649*r+.1430804*i)/hu),a=Na((.0139322*e+.0971045*r+.7141733*i)/pu)),new ce(116*n-16,500*(o-n),200*(n-a),t.opacity)}function Pa(t,e,r,i){return arguments.length===1?gu(t):new ce(t,e,r,i==null?1:i)}function ce(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}tr(ce,Pa,Er(Oe,{brighter(t){return new ce(this.l+kn*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new ce(this.l-kn*(t==null?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=hu*Ra(e),t=fu*Ra(t),r=pu*Ra(r),new Mt($a(3.1338561*e-1.6168667*t-.4906146*r),$a(-.9787684*e+1.9161415*t+.033454*r),$a(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function Na(t){return t>T0?Math.pow(t,1/3):t/mu+du}function Ra(t){return t>Dr?t*t*t:mu*(t-du)}function $a(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function za(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function v0(t){if(t instanceof _e)return new _e(t.h,t.c,t.l,t.opacity);if(t instanceof ce||(t=gu(t)),t.a===0&&t.b===0)return new _e(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*uu;return new _e(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function vi(t,e,r,i){return arguments.length===1?v0(t):new _e(t,e,r,i==null?1:i)}function _e(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function xu(t){if(isNaN(t.h))return new ce(t.l,0,0,t.opacity);var e=t.h*cu;return new ce(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}tr(_e,vi,Er(Oe,{brighter(t){return new _e(this.h,this.c,this.l+kn*(t==null?1:t),this.opacity)},darker(t){return new _e(this.h,this.c,this.l-kn*(t==null?1:t),this.opacity)},rgb(){return xu(this).rgb()}}));var Nr=t=>()=>t;function yu(t,e){return function(r){return t+r*e}}function S0(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function _u(t,e){var r=e-t;return r?yu(t,r>180||r<-180?r-360*Math.round(r/360):r):Nr(isNaN(t)?e:t)}function bu(t){return(t=+t)==1?be:function(e,r){return r-e?S0(e,r,t):Nr(isNaN(e)?r:e)}}function be(t,e){var r=e-t;return r?yu(t,r):Nr(isNaN(t)?e:t)}function Cu(t){return function(e,r){var i=t((e=vi(e)).h,(r=vi(r)).h),n=be(e.c,r.c),o=be(e.l,r.l),a=be(e.opacity,r.opacity);return function(s){return e.h=i(s),e.c=n(s),e.l=o(s),e.opacity=a(s),e+""}}}var k0=Cu(_u),w0=Cu(be);function qa(t,e,r,i,n){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*i+a*n)/6}function Tu(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),n=t[i],o=t[i+1],a=i>0?t[i-1]:2*n-o,s=i<e-1?t[i+2]:2*o-n;return qa((r-i/e)*e,a,n,o,s)}}function vu(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),n=t[(i+e-1)%e],o=t[i%e],a=t[(i+1)%e],s=t[(i+2)%e];return qa((r-i/e)*e,n,o,a,s)}}var ir=function t(e){var r=bu(e);function i(n,o){var a=r((n=Ir(n)).r,(o=Ir(o)).r),s=r(n.g,o.g),l=r(n.b,o.b),c=be(n.opacity,o.opacity);return function(u){return n.r=a(u),n.g=s(u),n.b=l(u),n.opacity=c(u),n+""}}return i.gamma=t,i}(1);function Su(t){return function(e){var r=e.length,i=new Array(r),n=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=Ir(e[a]),i[a]=s.r||0,n[a]=s.g||0,o[a]=s.b||0;return i=t(i),n=t(n),o=t(o),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=o(l),s+""}}}var B0=Su(Tu),F0=Su(vu);function ku(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),n;return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function wu(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Bu(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),o=new Array(r),a;for(a=0;a<i;++a)n[a]=nr(t[a],e[a]);for(;a<r;++a)o[a]=e[a];return function(s){for(a=0;a<i;++a)o[a]=n[a](s);return o}}function Fu(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function At(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Mu(t,e){var r={},i={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=nr(t[n],e[n]):i[n]=e[n];return function(o){for(n in r)i[n]=r[n](o);return i}}var Ua=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wa=new RegExp(Ua.source,"g");function M0(t){return function(){return t}}function A0(t){return function(e){return t(e)+""}}function Si(t,e){var r=Ua.lastIndex=Wa.lastIndex=0,i,n,o,a=-1,s=[],l=[];for(t=t+"",e=e+"";(i=Ua.exec(t))&&(n=Wa.exec(e));)(o=n.index)>r&&(o=e.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:At(i,n)})),r=Wa.lastIndex;return r<e.length&&(o=e.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?A0(l[0].x):M0(e):(e=l.length,function(c){for(var u=0,h;u<e;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}function nr(t,e){var r=typeof e,i;return e==null||r==="boolean"?Nr(e):(r==="number"?At:r==="string"?(i=ee(e))?(e=i,ir):Si:e instanceof ee?ir:e instanceof Date?Fu:wu(e)?ku:Array.isArray(e)?Bu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Mu:At)(t,e)}function Ha(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var Au=180/Math.PI,wn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ya(t,e,r,i,n,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:n,translateY:o,rotate:Math.atan2(e,t)*Au,skewX:Math.atan(l)*Au,scaleX:a,scaleY:s}}var Bn;function Lu(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?wn:Ya(e.a,e.b,e.c,e.d,e.e,e.f)}function Eu(t){return t==null?wn:(Bn||(Bn=document.createElementNS("http://www.w3.org/2000/svg","g")),Bn.setAttribute("transform",t),(t=Bn.transform.baseVal.consolidate())?(t=t.matrix,Ya(t.a,t.b,t.c,t.d,t.e,t.f)):wn)}function Ou(t,e,r,i){function n(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,x){if(c!==h||u!==f){var b=p.push("translate(",null,e,null,r);x.push({i:b-4,x:At(c,h)},{i:b-2,x:At(u,f)})}else(h||f)&&p.push("translate("+h+e+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(n(h)+"rotate(",null,i)-2,x:At(c,u)})):u&&h.push(n(h)+"rotate("+u+i)}function s(c,u,h,f){c!==u?f.push({i:h.push(n(h)+"skewX(",null,i)-2,x:At(c,u)}):u&&h.push(n(h)+"skewX("+u+i)}function l(c,u,h,f,p,x){if(c!==h||u!==f){var b=p.push(n(p)+"scale(",null,",",null,")");x.push({i:b-4,x:At(c,h)},{i:b-2,x:At(u,f)})}else(h!==1||f!==1)&&p.push(n(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=t(c),u=t(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var x=-1,b=f.length,w;++x<b;)h[(w=f[x]).i]=w.x(p);return h.join("")}}}var ja=Ou(Lu,"px, ","px)","deg)"),Va=Ou(Eu,", ",")",")");function Rr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var Ga=Symbol("implicit");function Xa(){var t=new Ar,e=[],r=[],i=Ga;function n(o){let a=t.get(o);if(a===void 0){if(i!==Ga)return i;t.set(o,a=e.push(o)-1)}return r[a%r.length]}return n.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ar;for(let a of o)t.has(a)||t.set(a,e.push(a)-1);return n},n.range=function(o){return arguments.length?(r=Array.from(o),n):r.slice()},n.unknown=function(o){return arguments.length?(i=o,n):i},n.copy=function(){return Xa(e,r).unknown(i)},Rr.apply(n,arguments),n}function Za(t){return function(){return t}}function Ka(t){return+t}var Iu=[0,1];function $r(t){return t}function Qa(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:Za(isNaN(e)?NaN:.5)}function L0(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function E0(t,e,r){var i=t[0],n=t[1],o=e[0],a=e[1];return n<i?(i=Qa(n,i),o=r(a,o)):(i=Qa(i,n),o=r(o,a)),function(s){return o(i(s))}}function O0(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),o=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)n[a]=Qa(t[a],t[a+1]),o[a]=r(e[a],e[a+1]);return function(s){var l=Ma(t,s,1,i)-1;return o[l](n[l](s))}}function Fn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function I0(){var t=Iu,e=Iu,r=nr,i,n,o,a=$r,s,l,c;function u(){var f=Math.min(t.length,e.length);return a!==$r&&(a=L0(t[0],t[f-1])),s=f>2?O0:E0,l=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(l||(l=s(t.map(i),e,r)))(i(a(f)))}return h.invert=function(f){return a(n((c||(c=s(e,t.map(i),At)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Ka),u()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),u()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),r=Ha,u()},h.clamp=function(f){return arguments.length?(a=f?!0:$r,u()):a!==$r},h.interpolate=function(f){return arguments.length?(r=f,u()):r},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return i=f,n=p,u()}}function ki(){return I0()($r,$r)}function Du(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function or(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function ue(t){return t=or(Math.abs(t)),t?t[1]:NaN}function Nu(t,e){return function(r,i){for(var n=r.length,o=[],a=0,s=t[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(r.substring(n-=s,n+s)),!((l+=s+1)>i));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function Ru(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var D0=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ie(t){if(!(e=D0.exec(t)))throw new Error("invalid format: "+t);var e;return new Mn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ie.prototype=Mn.prototype;function Mn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Mn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $u(t){t:for(var e=t.length,r=1,i=-1,n;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(n+1):t}var Ja;function zu(t,e){var r=or(t,e);if(!r)return t+"";var i=r[0],n=r[1],o=n-(Ja=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+or(t,Math.max(0,e+o-1))[0]}function ts(t,e){var r=or(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var es={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Du,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ts(t*100,e),r:ts,s:zu,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function rs(t){return t}var Pu=Array.prototype.map,qu=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Wu(t){var e=t.grouping===void 0||t.thousands===void 0?rs:Nu(Pu.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?rs:Ru(Pu.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Ie(h);var f=h.fill,p=h.align,x=h.sign,b=h.symbol,w=h.zero,A=h.width,_=h.comma,F=h.precision,N=h.trim,O=h.type;O==="n"?(_=!0,O="g"):es[O]||(F===void 0&&(F=12),N=!0,O="g"),(w||f==="0"&&p==="=")&&(w=!0,f="0",p="=");var B=b==="$"?r:b==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",y=b==="$"?i:/[%p]/.test(O)?a:"",q=es[O],rt=/[defgprs%]/.test(O);F=F===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,F)):Math.max(0,Math.min(20,F));function et(C){var T=B,g=y,v,M,z;if(O==="c")g=q(C)+g,C="";else{C=+C;var $=C<0||1/C<0;if(C=isNaN(C)?l:q(Math.abs(C),F),N&&(C=$u(C)),$&&+C==0&&x!=="+"&&($=!1),T=($?x==="("?x:s:x==="-"||x==="("?"":x)+T,g=(O==="s"?qu[8+Ja/3]:"")+g+($&&x==="("?")":""),rt){for(v=-1,M=C.length;++v<M;)if(z=C.charCodeAt(v),48>z||z>57){g=(z===46?n+C.slice(v+1):C.slice(v))+g,C=C.slice(0,v);break}}}_&&!w&&(C=e(C,1/0));var W=T.length+C.length+g.length,G=W<A?new Array(A-W+1).join(f):"";switch(_&&w&&(C=e(G+C,G.length?A-g.length:1/0),G=""),p){case"<":C=T+C+g+G;break;case"=":C=T+G+C+g;break;case"^":C=G.slice(0,W=G.length>>1)+T+C+g+G.slice(W);break;default:C=G+T+C+g;break}return o(C)}return et.toString=function(){return h+""},et}function u(h,f){var p=c((h=Ie(h),h.type="f",h)),x=Math.max(-8,Math.min(8,Math.floor(ue(f)/3)))*3,b=Math.pow(10,-x),w=qu[8+x/3];return function(A){return p(b*A)+w}}return{format:c,formatPrefix:u}}var An,Ln,En;is({thousands:",",grouping:[3],currency:["$",""]});function is(t){return An=Wu(t),Ln=An.format,En=An.formatPrefix,An}function ns(t){return Math.max(0,-ue(Math.abs(t)))}function os(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ue(e)/3)))*3-ue(Math.abs(t)))}function as(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ue(e)-ue(t))+1}function ss(t,e,r,i){var n=Lr(t,e,r),o;switch(i=Ie(i==null?",f":i),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=os(n,a))&&(i.precision=o),En(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=as(n,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=ns(n))&&(i.precision=o-(i.type==="%")*2);break}}return Ln(i)}function N0(t){var e=t.domain;return t.ticks=function(r){var i=e();return pn(i[0],i[i.length-1],r==null?10:r)},t.tickFormat=function(r,i){var n=e();return ss(n[0],n[n.length-1],r==null?10:r,i)},t.nice=function(r){r==null&&(r=10);var i=e(),n=0,o=i.length-1,a=i[n],s=i[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=n,n=o,o=c);u-- >0;){if(c=mi(a,s,r),c===l)return i[n]=a,i[o]=s,e(i);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return t},t}function ls(){var t=ki();return t.copy=function(){return Fn(t,ls())},Rr.apply(t,arguments),N0(t)}var cs=new Date,us=new Date;function ot(t,e,r,i){function n(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return n.floor=o=>(t(o=new Date(+o)),o),n.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),n.round=o=>{let a=n(o),s=n.ceil(o);return o-a<s-o?a:s},n.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),n.range=(o,a,s)=>{let l=[];if(o=n.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return l},n.filter=o=>ot(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),r&&(n.count=(o,a)=>(cs.setTime(+o),us.setTime(+a),t(cs),t(us),Math.floor(r(cs,us))),n.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?n.filter(i?a=>i(a)%o===0:a=>n.count(0,a)%o===0):n)),n}var zr=ot(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),R0=zr.range,On=ot(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),$0=On.range;var Pr=ot(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),z0=Pr.range,In=ot(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),P0=In.range;var Ce=ot(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),q0=Ce.range,Bi=ot(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),W0=Bi.range,Dn=ot(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),U0=Dn.range;function lr(t){return ot(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var Te=lr(0),qr=lr(1),Hu=lr(2),Yu=lr(3),De=lr(4),ju=lr(5),Vu=lr(6),Gu=Te.range,H0=qr.range,Y0=Hu.range,j0=Yu.range,V0=De.range,G0=ju.range,X0=Vu.range;function cr(t){return ot(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var ur=cr(0),Wr=cr(1),Xu=cr(2),Zu=cr(3),Ne=cr(4),Ku=cr(5),Qu=cr(6),Ju=ur.range,Z0=Wr.range,K0=Xu.range,Q0=Zu.range,J0=Ne.range,tx=Ku.range,ex=Qu.range;var Ur=ot(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),rx=Ur.range,Nn=ot(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),ix=Nn.range;var Fi=ot(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Fi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?ot(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Fi);var EL=Fi.range;var fe=ot(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),th=fe.range;var Yt=ot(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Yt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:ot(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});var nx=Yt.range,re=ot(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());re.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:ot(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});var ox=re.range;function rh(t,e,r,i,n,o){let a=[[fe,1,1e3],[fe,5,5*1e3],[fe,15,15*1e3],[fe,30,30*1e3],[o,1,6e4],[o,5,5*6e4],[o,15,15*6e4],[o,30,30*6e4],[n,1,36e5],[n,3,3*36e5],[n,6,6*36e5],[n,12,12*36e5],[i,1,864e5],[i,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function s(c,u,h){let f=u<c;f&&([c,u]=[u,c]);let p=h&&typeof h.range=="function"?h:l(c,u,h),x=p?p.range(c,+u+1):[];return f?x.reverse():x}function l(c,u,h){let f=Math.abs(u-c)/h,p=Qe(([,,w])=>w).right(a,f);if(p===a.length)return t.every(Lr(c/31536e6,u/31536e6,h));if(p===0)return Fi.every(Math.max(Lr(c,u,h),1));let[x,b]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return x.every(b)}return[s,l]}var[sx,lx]=rh(re,Nn,ur,Dn,In,On),[hs,fs]=rh(Yt,Ur,Te,Ce,Pr,zr);function ps(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ds(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Mi(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function ms(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,c=Ai(n),u=Li(n),h=Ai(o),f=Li(o),p=Ai(a),x=Li(a),b=Ai(s),w=Li(s),A=Ai(l),_=Li(l),F={a:$,A:W,b:G,B:K,c:null,d:lh,e:lh,f:Lx,g:qx,G:Ux,H:Fx,I:Mx,j:Ax,L:ph,m:Ex,M:Ox,p:at,q:wt,Q:hh,s:fh,S:Ix,u:Dx,U:Nx,V:Rx,w:$x,W:zx,x:null,X:null,y:Px,Y:Wx,Z:Hx,"%":uh},N={a:Bt,A:Ht,b:mt,B:Rt,c:null,d:ch,e:ch,f:Gx,g:ny,G:ay,H:Yx,I:jx,j:Vx,L:mh,m:Xx,M:Zx,p:ht,q:Ot,Q:hh,s:fh,S:Kx,u:Qx,U:Jx,V:ty,w:ey,W:ry,x:null,X:null,y:iy,Y:oy,Z:sy,"%":uh},O={a:et,A:C,b:T,B:g,c:v,d:ah,e:ah,f:Sx,g:oh,G:nh,H:sh,I:sh,j:bx,L:vx,m:_x,M:Cx,p:rt,q:yx,Q:wx,s:Bx,S:Tx,u:px,U:dx,V:mx,w:fx,W:gx,x:M,X:z,y:oh,Y:nh,Z:xx,"%":kx};F.x=B(r,F),F.X=B(i,F),F.c=B(e,F),N.x=B(r,N),N.X=B(i,N),N.c=B(e,N);function B(E,V){return function(Z){var S=[],Ft=-1,it=0,X=E.length,R,Q,J;for(Z instanceof Date||(Z=new Date(+Z));++Ft<X;)E.charCodeAt(Ft)===37&&(S.push(E.slice(it,Ft)),(Q=ih[R=E.charAt(++Ft)])!=null?R=E.charAt(++Ft):Q=R==="e"?" ":"0",(J=V[R])&&(R=J(Z,Q)),S.push(R),it=Ft+1);return S.push(E.slice(it,Ft)),S.join("")}}function y(E,V){return function(Z){var S=Mi(1900,void 0,1),Ft=q(S,E,Z+="",0),it,X;if(Ft!=Z.length)return null;if("Q"in S)return new Date(S.Q);if("s"in S)return new Date(S.s*1e3+("L"in S?S.L:0));if(V&&!("Z"in S)&&(S.Z=0),"p"in S&&(S.H=S.H%12+S.p*12),S.m===void 0&&(S.m="q"in S?S.q:0),"V"in S){if(S.V<1||S.V>53)return null;"w"in S||(S.w=1),"Z"in S?(it=ds(Mi(S.y,0,1)),X=it.getUTCDay(),it=X>4||X===0?Wr.ceil(it):Wr(it),it=Bi.offset(it,(S.V-1)*7),S.y=it.getUTCFullYear(),S.m=it.getUTCMonth(),S.d=it.getUTCDate()+(S.w+6)%7):(it=ps(Mi(S.y,0,1)),X=it.getDay(),it=X>4||X===0?qr.ceil(it):qr(it),it=Ce.offset(it,(S.V-1)*7),S.y=it.getFullYear(),S.m=it.getMonth(),S.d=it.getDate()+(S.w+6)%7)}else("W"in S||"U"in S)&&("w"in S||(S.w="u"in S?S.u%7:"W"in S?1:0),X="Z"in S?ds(Mi(S.y,0,1)).getUTCDay():ps(Mi(S.y,0,1)).getDay(),S.m=0,S.d="W"in S?(S.w+6)%7+S.W*7-(X+5)%7:S.w+S.U*7-(X+6)%7);return"Z"in S?(S.H+=S.Z/100|0,S.M+=S.Z%100,ds(S)):ps(S)}}function q(E,V,Z,S){for(var Ft=0,it=V.length,X=Z.length,R,Q;Ft<it;){if(S>=X)return-1;if(R=V.charCodeAt(Ft++),R===37){if(R=V.charAt(Ft++),Q=O[R in ih?V.charAt(Ft++):R],!Q||(S=Q(E,Z,S))<0)return-1}else if(R!=Z.charCodeAt(S++))return-1}return S}function rt(E,V,Z){var S=c.exec(V.slice(Z));return S?(E.p=u.get(S[0].toLowerCase()),Z+S[0].length):-1}function et(E,V,Z){var S=p.exec(V.slice(Z));return S?(E.w=x.get(S[0].toLowerCase()),Z+S[0].length):-1}function C(E,V,Z){var S=h.exec(V.slice(Z));return S?(E.w=f.get(S[0].toLowerCase()),Z+S[0].length):-1}function T(E,V,Z){var S=A.exec(V.slice(Z));return S?(E.m=_.get(S[0].toLowerCase()),Z+S[0].length):-1}function g(E,V,Z){var S=b.exec(V.slice(Z));return S?(E.m=w.get(S[0].toLowerCase()),Z+S[0].length):-1}function v(E,V,Z){return q(E,e,V,Z)}function M(E,V,Z){return q(E,r,V,Z)}function z(E,V,Z){return q(E,i,V,Z)}function $(E){return a[E.getDay()]}function W(E){return o[E.getDay()]}function G(E){return l[E.getMonth()]}function K(E){return s[E.getMonth()]}function at(E){return n[+(E.getHours()>=12)]}function wt(E){return 1+~~(E.getMonth()/3)}function Bt(E){return a[E.getUTCDay()]}function Ht(E){return o[E.getUTCDay()]}function mt(E){return l[E.getUTCMonth()]}function Rt(E){return s[E.getUTCMonth()]}function ht(E){return n[+(E.getUTCHours()>=12)]}function Ot(E){return 1+~~(E.getUTCMonth()/3)}return{format:function(E){var V=B(E+="",F);return V.toString=function(){return E},V},parse:function(E){var V=y(E+="",!1);return V.toString=function(){return E},V},utcFormat:function(E){var V=B(E+="",N);return V.toString=function(){return E},V},utcParse:function(E){var V=y(E+="",!0);return V.toString=function(){return E},V}}}var ih={"-":"",_:" ",0:"0"},St=/^\s*\d+/,cx=/^%/,ux=/[\\^$*+?|[\]().{}]/g;function tt(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",o=n.length;return i+(o<r?new Array(r-o+1).join(e)+n:n)}function hx(t){return t.replace(ux,"\\$&")}function Ai(t){return new RegExp("^(?:"+t.map(hx).join("|")+")","i")}function Li(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function fx(t,e,r){var i=St.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function px(t,e,r){var i=St.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function dx(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function mx(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function gx(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function nh(t,e,r){var i=St.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function oh(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function xx(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function yx(t,e,r){var i=St.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function _x(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function ah(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function bx(t,e,r){var i=St.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function sh(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function Cx(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function Tx(t,e,r){var i=St.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function vx(t,e,r){var i=St.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Sx(t,e,r){var i=St.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function kx(t,e,r){var i=cx.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function wx(t,e,r){var i=St.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Bx(t,e,r){var i=St.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function lh(t,e){return tt(t.getDate(),e,2)}function Fx(t,e){return tt(t.getHours(),e,2)}function Mx(t,e){return tt(t.getHours()%12||12,e,2)}function Ax(t,e){return tt(1+Ce.count(Yt(t),t),e,3)}function ph(t,e){return tt(t.getMilliseconds(),e,3)}function Lx(t,e){return ph(t,e)+"000"}function Ex(t,e){return tt(t.getMonth()+1,e,2)}function Ox(t,e){return tt(t.getMinutes(),e,2)}function Ix(t,e){return tt(t.getSeconds(),e,2)}function Dx(t){var e=t.getDay();return e===0?7:e}function Nx(t,e){return tt(Te.count(Yt(t)-1,t),e,2)}function dh(t){var e=t.getDay();return e>=4||e===0?De(t):De.ceil(t)}function Rx(t,e){return t=dh(t),tt(De.count(Yt(t),t)+(Yt(t).getDay()===4),e,2)}function $x(t){return t.getDay()}function zx(t,e){return tt(qr.count(Yt(t)-1,t),e,2)}function Px(t,e){return tt(t.getFullYear()%100,e,2)}function qx(t,e){return t=dh(t),tt(t.getFullYear()%100,e,2)}function Wx(t,e){return tt(t.getFullYear()%1e4,e,4)}function Ux(t,e){var r=t.getDay();return t=r>=4||r===0?De(t):De.ceil(t),tt(t.getFullYear()%1e4,e,4)}function Hx(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+tt(e/60|0,"0",2)+tt(e%60,"0",2)}function ch(t,e){return tt(t.getUTCDate(),e,2)}function Yx(t,e){return tt(t.getUTCHours(),e,2)}function jx(t,e){return tt(t.getUTCHours()%12||12,e,2)}function Vx(t,e){return tt(1+Bi.count(re(t),t),e,3)}function mh(t,e){return tt(t.getUTCMilliseconds(),e,3)}function Gx(t,e){return mh(t,e)+"000"}function Xx(t,e){return tt(t.getUTCMonth()+1,e,2)}function Zx(t,e){return tt(t.getUTCMinutes(),e,2)}function Kx(t,e){return tt(t.getUTCSeconds(),e,2)}function Qx(t){var e=t.getUTCDay();return e===0?7:e}function Jx(t,e){return tt(ur.count(re(t)-1,t),e,2)}function gh(t){var e=t.getUTCDay();return e>=4||e===0?Ne(t):Ne.ceil(t)}function ty(t,e){return t=gh(t),tt(Ne.count(re(t),t)+(re(t).getUTCDay()===4),e,2)}function ey(t){return t.getUTCDay()}function ry(t,e){return tt(Wr.count(re(t)-1,t),e,2)}function iy(t,e){return tt(t.getUTCFullYear()%100,e,2)}function ny(t,e){return t=gh(t),tt(t.getUTCFullYear()%100,e,2)}function oy(t,e){return tt(t.getUTCFullYear()%1e4,e,4)}function ay(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Ne(t):Ne.ceil(t),tt(t.getUTCFullYear()%1e4,e,4)}function sy(){return"+0000"}function uh(){return"%"}function hh(t){return+t}function fh(t){return Math.floor(+t/1e3)}var Hr,Rn,xh,yh,_h;gs({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gs(t){return Hr=ms(t),Rn=Hr.format,xh=Hr.parse,yh=Hr.utcFormat,_h=Hr.utcParse,Hr}function xs(t,e){t=t.slice();var r=0,i=t.length-1,n=t[r],o=t[i],a;return o<n&&(a=r,r=i,i=a,a=n,n=o,o=a),t[r]=e.floor(n),t[i]=e.ceil(o),t}function ly(t){return new Date(t)}function cy(t){return t instanceof Date?+t:+new Date(+t)}function bh(t,e,r,i,n,o,a,s,l,c){var u=ki(),h=u.invert,f=u.domain,p=c(".%L"),x=c(":%S"),b=c("%I:%M"),w=c("%I %p"),A=c("%a %d"),_=c("%b %d"),F=c("%B"),N=c("%Y");function O(B){return(l(B)<B?p:s(B)<B?x:a(B)<B?b:o(B)<B?w:i(B)<B?n(B)<B?A:_:r(B)<B?F:N)(B)}return u.invert=function(B){return new Date(h(B))},u.domain=function(B){return arguments.length?f(Array.from(B,cy)):f().map(ly)},u.ticks=function(B){var y=f();return t(y[0],y[y.length-1],B==null?10:B)},u.tickFormat=function(B,y){return y==null?O:c(y)},u.nice=function(B){var y=f();return(!B||typeof B.range!="function")&&(B=e(y[0],y[y.length-1],B==null?10:B)),B?f(xs(y,B)):u},u.copy=function(){return Fn(u,bh(t,e,r,i,n,o,a,s,l,c))},u}function Ch(){return Rr.apply(bh(hs,fs,Yt,Ur,Te,Ce,Pr,zr,fe,Rn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ct(t){return function(){return t}}var ys=Math.abs,Lt=Math.atan2,Re=Math.cos,Th=Math.max,$n=Math.min,ie=Math.sin,hr=Math.sqrt,kt=1e-12,Yr=Math.PI,Ei=Yr/2,jr=2*Yr;function vh(t){return t>1?0:t<-1?Yr:Math.acos(t)}function _s(t){return t>=1?Ei:t<=-1?-Ei:Math.asin(t)}var bs=Math.PI,Cs=2*bs,fr=1e-6,uy=Cs-fr;function Sh(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function hy(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Sh;let r=10**e;return function(i){this._+=i[0];for(let n=1,o=i.length;n<o;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}var pr=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Sh:hy(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,n){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,r,i,n,o,a){this._append`C${+e},${+r},${+i},${+n},${this._x1=+o},${this._y1=+a}`}arcTo(e,r,i,n,o){if(e=+e,r=+r,i=+i,n=+n,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=i-e,c=n-r,u=a-e,h=s-r,f=u*u+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(f>fr)if(!(Math.abs(h*l-c*u)>fr)||!o)this._append`L${this._x1=e},${this._y1=r}`;else{let p=i-a,x=n-s,b=l*l+c*c,w=p*p+x*x,A=Math.sqrt(b),_=Math.sqrt(f),F=o*Math.tan((bs-Math.acos((b+f-w)/(2*A*_)))/2),N=F/_,O=F/A;Math.abs(N-1)>fr&&this._append`L${e+N*u},${r+N*h}`,this._append`A${o},${o},0,0,${+(h*p>u*x)},${this._x1=e+O*l},${this._y1=r+O*c}`}}arc(e,r,i,n,o,a){if(e=+e,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=e+s,u=r+l,h=1^a,f=a?n-o:o-n;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>fr||Math.abs(this._y1-u)>fr)&&this._append`L${c},${u}`,i&&(f<0&&(f=f%Cs+Cs),f>uy?this._append`A${i},${i},0,1,${h},${e-s},${r-l}A${i},${i},0,1,${h},${this._x1=c},${this._y1=u}`:f>fr&&this._append`A${i},${i},0,${+(f>=bs)},${h},${this._x1=e+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function kh(){return new pr}kh.prototype=pr.prototype;function zn(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new pr(e)}function fy(t){return t.innerRadius}function py(t){return t.outerRadius}function dy(t){return t.startAngle}function my(t){return t.endAngle}function gy(t){return t&&t.padAngle}function xy(t,e,r,i,n,o,a,s){var l=r-t,c=i-e,u=a-n,h=s-o,f=h*l-u*c;if(!(f*f<kt))return f=(u*(e-o)-h*(t-n))/f,[t+f*l,e+f*c]}function Pn(t,e,r,i,n,o,a){var s=t-r,l=e-i,c=(a?o:-o)/hr(s*s+l*l),u=c*l,h=-c*s,f=t+u,p=e+h,x=r+u,b=i+h,w=(f+x)/2,A=(p+b)/2,_=x-f,F=b-p,N=_*_+F*F,O=n-o,B=f*b-x*p,y=(F<0?-1:1)*hr(Th(0,O*O*N-B*B)),q=(B*F-_*y)/N,rt=(-B*_-F*y)/N,et=(B*F+_*y)/N,C=(-B*_+F*y)/N,T=q-w,g=rt-A,v=et-w,M=C-A;return T*T+g*g>v*v+M*M&&(q=et,rt=C),{cx:q,cy:rt,x01:-u,y01:-h,x11:q*(n/O-1),y11:rt*(n/O-1)}}function yy(){var t=fy,e=py,r=ct(0),i=null,n=dy,o=my,a=gy,s=null,l=zn(c);function c(){var u,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),x=n.apply(this,arguments)-Ei,b=o.apply(this,arguments)-Ei,w=ys(b-x),A=b>x;if(s||(s=u=l()),p<f&&(h=p,p=f,f=h),!(p>kt))s.moveTo(0,0);else if(w>jr-kt)s.moveTo(p*Re(x),p*ie(x)),s.arc(0,0,p,x,b,!A),f>kt&&(s.moveTo(f*Re(b),f*ie(b)),s.arc(0,0,f,b,x,A));else{var _=x,F=b,N=x,O=b,B=w,y=w,q=a.apply(this,arguments)/2,rt=q>kt&&(i?+i.apply(this,arguments):hr(f*f+p*p)),et=$n(ys(p-f)/2,+r.apply(this,arguments)),C=et,T=et,g,v;if(rt>kt){var M=_s(rt/f*ie(q)),z=_s(rt/p*ie(q));(B-=M*2)>kt?(M*=A?1:-1,N+=M,O-=M):(B=0,N=O=(x+b)/2),(y-=z*2)>kt?(z*=A?1:-1,_+=z,F-=z):(y=0,_=F=(x+b)/2)}var $=p*Re(_),W=p*ie(_),G=f*Re(O),K=f*ie(O);if(et>kt){var at=p*Re(F),wt=p*ie(F),Bt=f*Re(N),Ht=f*ie(N),mt;if(w<Yr)if(mt=xy($,W,Bt,Ht,at,wt,G,K)){var Rt=$-mt[0],ht=W-mt[1],Ot=at-mt[0],E=wt-mt[1],V=1/ie(vh((Rt*Ot+ht*E)/(hr(Rt*Rt+ht*ht)*hr(Ot*Ot+E*E)))/2),Z=hr(mt[0]*mt[0]+mt[1]*mt[1]);C=$n(et,(f-Z)/(V-1)),T=$n(et,(p-Z)/(V+1))}else C=T=0}y>kt?T>kt?(g=Pn(Bt,Ht,$,W,p,T,A),v=Pn(at,wt,G,K,p,T,A),s.moveTo(g.cx+g.x01,g.cy+g.y01),T<et?s.arc(g.cx,g.cy,T,Lt(g.y01,g.x01),Lt(v.y01,v.x01),!A):(s.arc(g.cx,g.cy,T,Lt(g.y01,g.x01),Lt(g.y11,g.x11),!A),s.arc(0,0,p,Lt(g.cy+g.y11,g.cx+g.x11),Lt(v.cy+v.y11,v.cx+v.x11),!A),s.arc(v.cx,v.cy,T,Lt(v.y11,v.x11),Lt(v.y01,v.x01),!A))):(s.moveTo($,W),s.arc(0,0,p,_,F,!A)):s.moveTo($,W),!(f>kt)||!(B>kt)?s.lineTo(G,K):C>kt?(g=Pn(G,K,at,wt,f,-C,A),v=Pn($,W,Bt,Ht,f,-C,A),s.lineTo(g.cx+g.x01,g.cy+g.y01),C<et?s.arc(g.cx,g.cy,C,Lt(g.y01,g.x01),Lt(v.y01,v.x01),!A):(s.arc(g.cx,g.cy,C,Lt(g.y01,g.x01),Lt(g.y11,g.x11),!A),s.arc(0,0,f,Lt(g.cy+g.y11,g.cx+g.x11),Lt(v.cy+v.y11,v.cx+v.x11),A),s.arc(v.cx,v.cy,C,Lt(v.y11,v.x11),Lt(v.y01,v.x01),!A))):s.arc(0,0,f,O,N,A)}if(s.closePath(),u)return s=null,u+""||null}return c.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+n.apply(this,arguments)+ +o.apply(this,arguments))/2-Yr/2;return[Re(h)*u,ie(h)*u]},c.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ct(+u),c):t},c.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ct(+u),c):e},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:ct(+u),c):r},c.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:ct(+u),c):i},c.startAngle=function(u){return arguments.length?(n=typeof u=="function"?u:ct(+u),c):n},c.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:ct(+u),c):o},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ct(+u),c):a},c.context=function(u){return arguments.length?(s=u==null?null:u,c):s},c}function wh(t){this._context=t}wh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Oi(t){return new wh(t)}var O5=Array.prototype.slice;function qn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Bh(t){return t[0]}function Fh(t){return t[1]}function _y(t,e){var r=ct(!0),i=null,n=Oi,o=null,a=zn(s);t=typeof t=="function"?t:t===void 0?Bh:ct(t),e=typeof e=="function"?e:e===void 0?Fh:ct(e);function s(l){var c,u=(l=qn(l)).length,h,f=!1,p;for(i==null&&(o=n(p=a())),c=0;c<=u;++c)!(c<u&&r(h=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,l),+e(h,c,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:ct(+l),s):t},s.y=function(l){return arguments.length?(e=typeof l=="function"?l:ct(+l),s):e},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ct(!!l),s):r},s.curve=function(l){return arguments.length?(n=l,i!=null&&(o=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=o=null:o=n(i=l),s):i},s}function Mh(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Ah(t){return t}function by(){var t=Ah,e=Mh,r=null,i=ct(0),n=ct(jr),o=ct(0);function a(s){var l,c=(s=qn(s)).length,u,h,f=0,p=new Array(c),x=new Array(c),b=+i.apply(this,arguments),w=Math.min(jr,Math.max(-jr,n.apply(this,arguments)-b)),A,_=Math.min(Math.abs(w)/c,o.apply(this,arguments)),F=_*(w<0?-1:1),N;for(l=0;l<c;++l)(N=x[p[l]=l]=+t(s[l],l,s))>0&&(f+=N);for(e!=null?p.sort(function(O,B){return e(x[O],x[B])}):r!=null&&p.sort(function(O,B){return r(s[O],s[B])}),l=0,h=f?(w-c*F)/f:0;l<c;++l,b=A)u=p[l],N=x[u],A=b+(N>0?N*h:0)+F,x[u]={data:s[u],index:l,value:N,startAngle:b,endAngle:A,padAngle:_};return x}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ct(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,r=null,a):e},a.sort=function(s){return arguments.length?(r=s,e=null,a):r},a.startAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ct(+s),a):i},a.endAngle=function(s){return arguments.length?(n=typeof s=="function"?s:ct(+s),a):n},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ct(+s),a):o},a}function Vr(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Ii(t){this._context=t}Ii.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Vr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Vr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ts(t){return new Ii(t)}var Wn=class{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}};function vs(t){return new Wn(t,!0)}function Ss(t){return new Wn(t,!1)}function Gt(){}function Lh(t){this._context=t}Lh.prototype={areaStart:Gt,areaEnd:Gt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Vr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ks(t){return new Lh(t)}function Eh(t){this._context=t}Eh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Vr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ws(t){return new Eh(t)}function Oh(t,e){this._basis=new Ii(t),this._beta=e}Oh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],n=e[0],o=t[r]-i,a=e[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+l*o),this._beta*e[s]+(1-this._beta)*(n+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Bs=function t(e){function r(i){return e===1?new Ii(i):new Oh(i,e)}return r.beta=function(i){return t(+i)},r}(.85);function Gr(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Un(t,e){this._context=t,this._k=(1-e)/6}Un.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Gr(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Gr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Fs=function t(e){function r(i){return new Un(i,e)}return r.tension=function(i){return t(+i)},r}(0);function Hn(t,e){this._context=t,this._k=(1-e)/6}Hn.prototype={areaStart:Gt,areaEnd:Gt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Gr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ms=function t(e){function r(i){return new Hn(i,e)}return r.tension=function(i){return t(+i)},r}(0);function Yn(t,e){this._context=t,this._k=(1-e)/6}Yn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var As=function t(e){function r(i){return new Yn(i,e)}return r.tension=function(i){return t(+i)},r}(0);function Di(t,e,r){var i=t._x1,n=t._y1,o=t._x2,a=t._y2;if(t._l01_a>kt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>kt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(i,n,o,a,t._x2,t._y2)}function Ih(t,e){this._context=t,this._alpha=e}Ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Di(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ls=function t(e){function r(i){return e?new Ih(i,e):new Un(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Dh(t,e){this._context=t,this._alpha=e}Dh.prototype={areaStart:Gt,areaEnd:Gt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Di(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Es=function t(e){function r(i){return e?new Dh(i,e):new Hn(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Nh(t,e){this._context=t,this._alpha=e}Nh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Di(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Os=function t(e){function r(i){return e?new Nh(i,e):new Yn(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Rh(t){this._context=t}Rh.prototype={areaStart:Gt,areaEnd:Gt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Is(t){return new Rh(t)}function $h(t){return t<0?-1:1}function zh(t,e,r){var i=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),s=(o*n+a*i)/(i+n);return($h(o)+$h(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ph(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ds(t,e,r){var i=t._x0,n=t._y0,o=t._x1,a=t._y1,s=(o-i)/3;t._context.bezierCurveTo(i+s,n+s*e,o-s,a-s*r,o,a)}function jn(t){this._context=t}jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ds(this,this._t0,Ph(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ds(this,Ph(this,r=zh(this,t,e)),r);break;default:Ds(this,this._t0,r=zh(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function qh(t){this._context=new Wh(t)}(qh.prototype=Object.create(jn.prototype)).point=function(t,e){jn.prototype.point.call(this,e,t)};function Wh(t){this._context=t}Wh.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,o){this._context.bezierCurveTo(e,t,i,r,o,n)}};function Ns(t){return new jn(t)}function Rs(t){return new qh(t)}function Hh(t){this._context=t}Hh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=Uh(t),n=Uh(e),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],n[0][o],i[1][o],n[1][o],t[a],e[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Uh(t){var e,r=t.length-1,i,n=new Array(r),o=new Array(r),a=new Array(r);for(n[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/o[e-1],o[e]-=i,a[e]-=i*a[e-1];for(n[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)n[e]=(a[e]-n[e+1])/o[e];for(o[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-n[e+1];return[n,o]}function $s(t){return new Hh(t)}function Vn(t,e){this._context=t,this._t=e}Vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function zs(t){return new Vn(t,.5)}function Ps(t){return new Vn(t,0)}function qs(t){return new Vn(t,1)}var Cy={value:()=>{}};function jh(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Gn(r)}function Gn(t){this._=t}function Ty(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Gn.prototype=jh.prototype={constructor:Gn,on:function(t,e){var r=this._,i=Ty(t+"",r),n,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((n=(t=i[o]).type)&&(n=vy(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Yh(r[n],t.name,e);else if(e==null)for(n in r)r[n]=Yh(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Gn(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,o;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,n=o.length;i<n;++i)o[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,o=i.length;n<o;++n)i[n].value.apply(e,r)}};function vy(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function Yh(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=Cy,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var Ws=jh;var Xr=0,Ri=0,Ni=0,Gh=1e3,Xn,$i,Zn=0,dr=0,Kn=0,zi=typeof performance=="object"&&performance.now?performance:Date,Xh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qi(){return dr||(Xh(Sy),dr=zi.now()+Kn)}function Sy(){dr=0}function Pi(){this._call=this._time=this._next=null}Pi.prototype=Qn.prototype={constructor:Pi,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?qi():+r)+(e==null?0:+e),!this._next&&$i!==this&&($i?$i._next=this:Xn=this,$i=this),this._call=t,this._time=r,Us()},stop:function(){this._call&&(this._call=null,this._time=1/0,Us())}};function Qn(t,e,r){var i=new Pi;return i.restart(t,e,r),i}function Zh(){qi(),++Xr;for(var t=Xn,e;t;)(e=dr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Xr}function Vh(){dr=(Zn=zi.now())+Kn,Xr=Ri=0;try{Zh()}finally{Xr=0,wy(),dr=0}}function ky(){var t=zi.now(),e=t-Zn;e>Gh&&(Kn-=e,Zn=t)}function wy(){for(var t,e=Xn,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Xn=r);$i=t,Us(i)}function Us(t){if(!Xr){Ri&&(Ri=clearTimeout(Ri));var e=t-dr;e>24?(t<1/0&&(Ri=setTimeout(Vh,t-zi.now()-Kn)),Ni&&(Ni=clearInterval(Ni))):(Ni||(Zn=zi.now(),Ni=setInterval(ky,Gh)),Xr=1,Xh(Vh))}}function Jn(t,e,r){var i=new Pi;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var By=Ws("start","end","cancel","interrupt"),Fy=[],Jh=0,Kh=1,eo=2,to=3,Qh=4,ro=5,Wi=6;function $e(t,e,r,i,n,o){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;My(t,r,{name:e,index:i,group:n,on:By,tween:Fy,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Jh})}function Ui(t,e){var r=gt(t,e);if(r.state>Jh)throw new Error("too late; already scheduled");return r}function Et(t,e){var r=gt(t,e);if(r.state>to)throw new Error("too late; already running");return r}function gt(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function My(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=Qn(o,0,r.time);function o(c){r.state=Kh,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==Kh)return l();for(u in i)if(p=i[u],p.name===r.name){if(p.state===to)return Jn(a);p.state===Qh?(p.state=Wi,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[u]):+u<e&&(p.state=Wi,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete i[u])}if(Jn(function(){r.state===to&&(r.state=Qh,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=eo,r.on.call("start",t,t.__data__,r.index,r.group),r.state===eo){for(r.state=to,n=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(n[++h]=p);n.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=ro,1),h=-1,f=n.length;++h<f;)n[h].call(t,u);r.state===ro&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Wi,r.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function io(t,e){var r=t.__transition,i,n,o=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((i=r[a]).name!==e){o=!1;continue}n=i.state>eo&&i.state<ro,i.state=Wi,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[a]}o&&delete t.__transition}}function tf(t){return this.each(function(){io(this,t)})}function Ay(t,e){var r,i;return function(){var n=Et(this,t),o=n.tween;if(o!==r){i=r=o;for(var a=0,s=i.length;a<s;++a)if(i[a].name===e){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function Ly(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var o=Et(this,t),a=o.tween;if(a!==i){n=(i=a).slice();for(var s={name:e,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===e){n[l]=s;break}l===c&&n.push(s)}o.tween=n}}function ef(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=gt(this.node(),r).tween,n=0,o=i.length,a;n<o;++n)if((a=i[n]).name===t)return a.value;return null}return this.each((e==null?Ay:Ly)(r,t,e))}function Zr(t,e,r){var i=t._id;return t.each(function(){var n=Et(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return gt(n,i).value[e]}}function no(t,e){var r;return(typeof e=="number"?At:e instanceof ee?ir:(r=ee(e))?(e=r,ir):Si)(t,e)}function Ey(t){return function(){this.removeAttribute(t)}}function Oy(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Iy(t,e,r){var i,n=r+"",o;return function(){var a=this.getAttribute(t);return a===n?null:a===i?o:o=e(i=a,r)}}function Dy(t,e,r){var i,n=r+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?o:o=e(i=a,r)}}function Ny(t,e,r){var i,n,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s)))}}function Ry(t,e,r){var i,n,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s)))}}function rf(t,e){var r=xe(t),i=r==="transform"?Va:no;return this.attrTween(t,typeof e=="function"?(r.local?Ry:Ny)(r,i,Zr(this,"attr."+t,e)):e==null?(r.local?Oy:Ey)(r):(r.local?Dy:Iy)(r,i,e))}function $y(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function zy(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function Py(t,e){var r,i;function n(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&zy(t,o)),r}return n._value=e,n}function qy(t,e){var r,i;function n(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&$y(t,o)),r}return n._value=e,n}function nf(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=xe(t);return this.tween(r,(i.local?Py:qy)(i,e))}function Wy(t,e){return function(){Ui(this,t).delay=+e.apply(this,arguments)}}function Uy(t,e){return e=+e,function(){Ui(this,t).delay=e}}function of(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Wy:Uy)(e,t)):gt(this.node(),e).delay}function Hy(t,e){return function(){Et(this,t).duration=+e.apply(this,arguments)}}function Yy(t,e){return e=+e,function(){Et(this,t).duration=e}}function af(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Hy:Yy)(e,t)):gt(this.node(),e).duration}function jy(t,e){if(typeof e!="function")throw new Error;return function(){Et(this,t).ease=e}}function sf(t){var e=this._id;return arguments.length?this.each(jy(e,t)):gt(this.node(),e).ease}function Vy(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Et(this,t).ease=r}}function lf(t){if(typeof t!="function")throw new Error;return this.each(Vy(this._id,t))}function cf(t){typeof t!="function"&&(t=yi(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o=e[n],a=o.length,s=i[n]=[],l,c=0;c<a;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&s.push(l);return new zt(i,this._parents,this._name,this._id)}function uf(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,o=Math.min(i,n),a=new Array(i),s=0;s<o;++s)for(var l=e[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<i;++s)a[s]=e[s];return new zt(a,this._parents,this._name,this._id)}function Gy(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function Xy(t,e,r){var i,n,o=Gy(e)?Ui:Et;return function(){var a=o(this,t),s=a.on;s!==i&&(n=(i=s).copy()).on(e,r),a.on=n}}function hf(t,e){var r=this._id;return arguments.length<2?gt(this.node(),r).on.on(t):this.each(Xy(r,t,e))}function Zy(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function ff(){return this.on("end.remove",Zy(this._id))}function pf(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Je(t));for(var i=this._groups,n=i.length,o=new Array(n),a=0;a<n;++a)for(var s=i[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=t.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,$e(c[f],e,r,f,c,gt(u,r)));return new zt(o,this._parents,e,r)}function df(t){var e=this._name,r=this._id;typeof t!="function"&&(t=xi(t));for(var i=this._groups,n=i.length,o=[],a=[],s=0;s<n;++s)for(var l=i[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=t.call(u,u.__data__,h,l),p,x=gt(u,r),b=0,w=f.length;b<w;++b)(p=f[b])&&$e(p,e,r,b,f,x);o.push(f),a.push(u)}return new zt(o,a,e,r)}var Ky=ye.prototype.constructor;function mf(){return new Ky(this._groups,this._parents)}function Qy(t,e){var r,i,n;return function(){var o=Ee(this,t),a=(this.style.removeProperty(t),Ee(this,t));return o===a?null:o===r&&a===i?n:n=e(r=o,i=a)}}function gf(t){return function(){this.style.removeProperty(t)}}function Jy(t,e,r){var i,n=r+"",o;return function(){var a=Ee(this,t);return a===n?null:a===i?o:o=e(i=a,r)}}function t_(t,e,r){var i,n,o;return function(){var a=Ee(this,t),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),Ee(this,t))),a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s))}}function e_(t,e){var r,i,n,o="style."+e,a="end."+o,s;return function(){var l=Et(this,t),c=l.on,u=l.value[o]==null?s||(s=gf(e)):void 0;(c!==r||n!==u)&&(i=(r=c).copy()).on(a,n=u),l.on=i}}function xf(t,e,r){var i=(t+="")=="transform"?ja:no;return e==null?this.styleTween(t,Qy(t,i)).on("end.style."+t,gf(t)):typeof e=="function"?this.styleTween(t,t_(t,i,Zr(this,"style."+t,e))).each(e_(this._id,t)):this.styleTween(t,Jy(t,i,e),r).on("end.style."+t,null)}function r_(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function i_(t,e,r){var i,n;function o(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&r_(t,a,r)),i}return o._value=e,o}function yf(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,i_(t,e,r==null?"":r))}function n_(t){return function(){this.textContent=t}}function o_(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function _f(t){return this.tween("text",typeof t=="function"?o_(Zr(this,"text",t)):n_(t==null?"":t+""))}function a_(t){return function(e){this.textContent=t.call(this,e)}}function s_(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&a_(n)),e}return i._value=t,i}function bf(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,s_(t))}function Cf(){for(var t=this._name,e=this._id,r=oo(),i=this._groups,n=i.length,o=0;o<n;++o)for(var a=i[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=gt(l,e);$e(l,t,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new zt(i,this._parents,t,r)}function Tf(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--n===0&&o()}};r.each(function(){var c=Et(this,i),u=c.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),c.on=e}),n===0&&o()})}var l_=0;function zt(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function vf(t){return ye().transition(t)}function oo(){return++l_}var ve=ye.prototype;zt.prototype=vf.prototype={constructor:zt,select:pf,selectAll:df,selectChild:ve.selectChild,selectChildren:ve.selectChildren,filter:cf,merge:uf,selection:mf,transition:Cf,call:ve.call,nodes:ve.nodes,node:ve.node,size:ve.size,empty:ve.empty,each:ve.each,on:hf,attr:rf,attrTween:nf,style:xf,styleTween:yf,text:_f,textTween:bf,remove:ff,tween:ef,delay:of,duration:af,ease:sf,easeVarying:lf,end:Tf,[Symbol.iterator]:ve[Symbol.iterator]};function ao(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var c_={time:null,delay:0,duration:250,ease:ao};function u_(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Sf(t){var e,r;t instanceof zt?(e=t._id,t=t._name):(e=oo(),(r=c_).time=qi(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,o=0;o<n;++o)for(var a=i[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&$e(l,t,e,c,a,r||u_(l,e));return new zt(i,this._parents,t,e)}ye.prototype.interrupt=tf;ye.prototype.transition=Sf;var{abs:rO,max:iO,min:nO}=Math;function kf(t){return[+t[0],+t[1]]}function h_(t){return[kf(t[0]),kf(t[1])]}var oO={name:"x",handles:["w","e"].map(Hs),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},aO={name:"y",handles:["n","s"].map(Hs),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},sO={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Hs),input:function(t){return t==null?null:h_(t)},output:function(t){return t}};function Hs(t){return{type:t}}function f_(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function wf(t,e){return fetch(t,e).then(f_)}function Ys(t){return(e,r)=>wf(e,r).then(i=>new DOMParser().parseFromString(i,t))}var p_=Ys("application/xml"),d_=Ys("text/html"),m_=Ys("image/svg+xml");function ze(t,e,r){this.k=t,this.x=e,this.y=r}ze.prototype={constructor:ze,scale:function(t){return t===1?this:new ze(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ze(this.k,this.x+this.k*t,this.y+this.k*e)},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 js=new ze(1,0,0);Vs.prototype=ze.prototype;function Vs(t){for(;!t.__zoom;)if(!(t=t.parentNode))return js;return t.__zoom}var so={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let n=r<.5?r*(1+e):r+e-r*e,o=2*r-n;switch(i){case"r":return so.hue2rgb(o,n,t+.3333333333333333)*255;case"g":return so.hue2rgb(o,n,t)*255;case"b":return so.hue2rgb(o,n,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;let n=Math.max(t,e,r),o=Math.min(t,e,r),a=(n+o)/2;if(i==="l")return a*100;if(n===o)return 0;let s=n-o,l=a>.5?s/(2-n-o):s/(n+o);if(i==="s")return l*100;switch(n){case t:return((e-r)/s+(e<r?6:0))*60;case e:return((r-t)/s+2)*60;case r:return((t-e)/s+4)*60;default:return-1}}},Ff=so;var g_={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Mf=g_;var x_={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Af=x_;var y_={channel:Ff,lang:Mf,unit:Af},U=y_;var Se={};for(let t=0;t<=255;t++)Se[t]=U.unit.dec2hex(t);var xt={ALL:0,RGB:1,HSL:2};var Zs=class{constructor(){this.type=xt.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=xt.ALL}is(e){return this.type===e}},Lf=Zs;var Ks=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Lf}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=xt.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=U.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=U.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=U.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=U.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=U.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=U.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(xt.HSL)&&r!==void 0?r:(this._ensureHSL(),U.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(xt.HSL)&&r!==void 0?r:(this._ensureHSL(),U.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(xt.HSL)&&r!==void 0?r:(this._ensureHSL(),U.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(xt.RGB)&&r!==void 0?r:(this._ensureRGB(),U.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(xt.RGB)&&r!==void 0?r:(this._ensureRGB(),U.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(xt.RGB)&&r!==void 0?r:(this._ensureRGB(),U.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(xt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(xt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(xt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(xt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(xt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(xt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},Ef=Ks;var __=new Ef({r:0,g:0,b:0,a:0},"transparent"),Pe=__;var Of={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(Of.re);if(!e)return;let r=e[1],i=parseInt(r,16),n=r.length,o=n%4===0,a=n>4,s=a?1:17,l=a?8:4,c=o?0:-1,u=a?255:15;return Pe.set({r:(i>>l*(c+3)&u)*s,g:(i>>l*(c+2)&u)*s,b:(i>>l*(c+1)&u)*s,a:o?(i&u)*s/255:1},t)},stringify:t=>{let{r:e,g:r,b:i,a:n}=t;return n<1?`#${Se[Math.round(e)]}${Se[Math.round(r)]}${Se[Math.round(i)]}${Se[Math.round(n*255)]}`:`#${Se[Math.round(e)]}${Se[Math.round(r)]}${Se[Math.round(i)]}`}},mr=Of;var lo={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{let e=t.match(lo.hueRe);if(e){let[,r,i]=e;switch(i){case"grad":return U.channel.clamp.h(parseFloat(r)*.9);case"rad":return U.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return U.channel.clamp.h(parseFloat(r)*360)}}return U.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(lo.re);if(!r)return;let[,i,n,o,a,s]=r;return Pe.set({h:lo._hue2deg(i),s:U.channel.clamp.s(parseFloat(n)),l:U.channel.clamp.l(parseFloat(o)),a:a?U.channel.clamp.a(s?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{let{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${U.lang.round(e)}, ${U.lang.round(r)}%, ${U.lang.round(i)}%, ${n})`:`hsl(${U.lang.round(e)}, ${U.lang.round(r)}%, ${U.lang.round(i)}%)`}},Hi=lo;var co={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();let e=co.colors[t];if(e)return mr.parse(e)},stringify:t=>{let e=mr.stringify(t);for(let r in co.colors)if(co.colors[r]===e)return r}},Qs=co;var If={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(If.re);if(!r)return;let[,i,n,o,a,s,l,c,u]=r;return Pe.set({r:U.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:U.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:U.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?U.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{let{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${U.lang.round(e)}, ${U.lang.round(r)}, ${U.lang.round(i)}, ${U.lang.round(n)})`:`rgb(${U.lang.round(e)}, ${U.lang.round(r)}, ${U.lang.round(i)})`}},Yi=If;var b_={format:{keyword:Qs,hex:mr,rgb:Yi,rgba:Yi,hsl:Hi,hsla:Hi},parse:t=>{if(typeof t!="string")return t;let e=mr.parse(t)||Yi.parse(t)||Hi.parse(t)||Qs.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(xt.HSL)||t.data.r===void 0?Hi.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Yi.stringify(t):mr.stringify(t)},yt=b_;var C_=t=>{let{r:e,g:r,b:i}=yt.parse(t),n=.2126*U.channel.toLinear(e)+.7152*U.channel.toLinear(r)+.0722*U.channel.toLinear(i);return U.lang.round(n)},Df=C_;var T_=t=>Df(t)>=.5,Nf=T_;var v_=t=>!Nf(t),gr=v_;var S_=(t,e,r)=>{let i=yt.parse(t),n=i[e],o=U.channel.clamp[e](n+r);return n!==o&&(i[e]=o),yt.stringify(i)},uo=S_;var k_=(t,e)=>uo(t,"l",e),P=k_;var w_=(t,e)=>uo(t,"l",-e),j=w_;var B_=(t,e)=>{let r=yt.parse(t);for(let i in e)r[i]=U.channel.clamp[i](e[i]);return yt.stringify(r)},ho=B_;var F_=(t,e,r=0,i=1)=>{if(typeof t!="number")return ho(t,{a:e});let n=Pe.set({r:U.channel.clamp.r(t),g:U.channel.clamp.g(e),b:U.channel.clamp.b(r),a:U.channel.clamp.a(i)});return yt.stringify(n)},qe=F_;var M_=(t,e)=>U.lang.round(yt.parse(t)[e]),A_=M_;var L_=(t,e)=>{let r=yt.parse(t),i={};for(let n in e)e[n]&&(i[n]=r[n]+e[n]);return ho(t,i)},m=L_;var E_=(t,e,r=50)=>{let{r:i,g:n,b:o,a}=yt.parse(t),{r:s,g:l,b:c,a:u}=yt.parse(e),h=r/100,f=h*2-1,p=a-u,b=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,w=1-b,A=i*b+s*w,_=n*b+l*w,F=o*b+c*w,N=a*h+u*(1-h);return qe(A,_,F,N)},Rf=E_;var O_=(t,e=100)=>{let r=yt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Rf(r,t,e)},L=O_;var I_=typeof global=="object"&&global&&global.Object===Object&&global,fo=I_;var D_=typeof self=="object"&&self&&self.Object===Object&&self,N_=fo||D_||Function("return this")(),It=N_;var R_=It.Symbol,Kr=R_;var $f=Object.prototype,$_=$f.hasOwnProperty,z_=$f.toString,ji=Kr?Kr.toStringTag:void 0;function P_(t){var e=$_.call(t,ji),r=t[ji];try{t[ji]=void 0;var i=!0}catch(o){}var n=z_.call(t);return i&&(e?t[ji]=r:delete t[ji]),n}var zf=P_;var q_=Object.prototype,W_=q_.toString;function U_(t){return W_.call(t)}var Pf=U_;var H_="[object Null]",Y_="[object Undefined]",qf=Kr?Kr.toStringTag:void 0;function j_(t){return t==null?t===void 0?Y_:H_:qf&&qf in Object(t)?zf(t):Pf(t)}var ke=j_;function V_(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var po=V_;var G_="[object AsyncFunction]",X_="[object Function]",Z_="[object GeneratorFunction]",K_="[object Proxy]";function Q_(t){if(!po(t))return!1;var e=ke(t);return e==X_||e==Z_||e==G_||e==K_}var mo=Q_;var J_=It["__core-js_shared__"],go=J_;var Wf=function(){var t=/[^.]+$/.exec(go&&go.keys&&go.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function t1(t){return!!Wf&&Wf in t}var Uf=t1;var e1=Function.prototype,r1=e1.toString;function i1(t){if(t!=null){try{return r1.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var we=i1;var n1=/[\\^$.*+?()[\]{}|]/g,o1=/^\[object .+?Constructor\]$/,a1=Function.prototype,s1=Object.prototype,l1=a1.toString,c1=s1.hasOwnProperty,u1=RegExp("^"+l1.call(c1).replace(n1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h1(t){if(!po(t)||Uf(t))return!1;var e=mo(t)?u1:o1;return e.test(we(t))}var Hf=h1;function f1(t,e){return t==null?void 0:t[e]}var Yf=f1;function p1(t,e){var r=Yf(t,e);return Hf(r)?r:void 0}var Xt=p1;var d1=Xt(Object,"create"),Be=d1;function m1(){this.__data__=Be?Be(null):{},this.size=0}var jf=m1;function g1(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Vf=g1;var x1="__lodash_hash_undefined__",y1=Object.prototype,_1=y1.hasOwnProperty;function b1(t){var e=this.__data__;if(Be){var r=e[t];return r===x1?void 0:r}return _1.call(e,t)?e[t]:void 0}var Gf=b1;var C1=Object.prototype,T1=C1.hasOwnProperty;function v1(t){var e=this.__data__;return Be?e[t]!==void 0:T1.call(e,t)}var Xf=v1;var S1="__lodash_hash_undefined__";function k1(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Be&&e===void 0?S1:e,this}var Zf=k1;function Qr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Qr.prototype.clear=jf;Qr.prototype.delete=Vf;Qr.prototype.get=Gf;Qr.prototype.has=Xf;Qr.prototype.set=Zf;var Js=Qr;function w1(){this.__data__=[],this.size=0}var Kf=w1;function B1(t,e){return t===e||t!==t&&e!==e}var Qf=B1;function F1(t,e){for(var r=t.length;r--;)if(Qf(t[r][0],e))return r;return-1}var We=F1;var M1=Array.prototype,A1=M1.splice;function L1(t){var e=this.__data__,r=We(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():A1.call(e,r,1),--this.size,!0}var Jf=L1;function E1(t){var e=this.__data__,r=We(e,t);return r<0?void 0:e[r][1]}var tp=E1;function O1(t){return We(this.__data__,t)>-1}var ep=O1;function I1(t,e){var r=this.__data__,i=We(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var rp=I1;function Jr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Jr.prototype.clear=Kf;Jr.prototype.delete=Jf;Jr.prototype.get=tp;Jr.prototype.has=ep;Jr.prototype.set=rp;var ip=Jr;var D1=Xt(It,"Map"),ti=D1;function N1(){this.size=0,this.__data__={hash:new Js,map:new(ti||ip),string:new Js}}var np=N1;function R1(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var op=R1;function $1(t,e){var r=t.__data__;return op(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ue=$1;function z1(t){var e=Ue(this,t).delete(t);return this.size-=e?1:0,e}var ap=z1;function P1(t){return Ue(this,t).get(t)}var sp=P1;function q1(t){return Ue(this,t).has(t)}var lp=q1;function W1(t,e){var r=Ue(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}var cp=W1;function ei(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ei.prototype.clear=np;ei.prototype.delete=ap;ei.prototype.get=sp;ei.prototype.has=lp;ei.prototype.set=cp;var tl=ei;var U1="Expected a function";function el(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(U1);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return r.cache=o.set(n,a)||o,a};return r.cache=new(el.Cache||tl),r}el.Cache=tl;var xo=el;var H1=Object.prototype;function Y1(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||H1;return t===r}var yo=Y1;function j1(t,e){return function(r){return t(e(r))}}var up=j1;var V1=up(Object.keys,Object),hp=V1;var G1=Object.prototype,X1=G1.hasOwnProperty;function Z1(t){if(!yo(t))return hp(t);var e=[];for(var r in Object(t))X1.call(t,r)&&r!="constructor"&&e.push(r);return e}var fp=Z1;var K1=Xt(It,"DataView"),_o=K1;var Q1=Xt(It,"Promise"),bo=Q1;var J1=Xt(It,"Set"),Co=J1;var tb=Xt(It,"WeakMap"),To=tb;var pp="[object Map]",eb="[object Object]",dp="[object Promise]",mp="[object Set]",gp="[object WeakMap]",xp="[object DataView]",rb=we(_o),ib=we(ti),nb=we(bo),ob=we(Co),ab=we(To),xr=ke;(_o&&xr(new _o(new ArrayBuffer(1)))!=xp||ti&&xr(new ti)!=pp||bo&&xr(bo.resolve())!=dp||Co&&xr(new Co)!=mp||To&&xr(new To)!=gp)&&(xr=function(t){var e=ke(t),r=e==eb?t.constructor:void 0,i=r?we(r):"";if(i)switch(i){case rb:return xp;case ib:return pp;case nb:return dp;case ob:return mp;case ab:return gp}return e});var yp=xr;function sb(t){return t!=null&&typeof t=="object"}var ri=sb;var lb="[object Arguments]";function cb(t){return ri(t)&&ke(t)==lb}var rl=cb;var _p=Object.prototype,ub=_p.hasOwnProperty,hb=_p.propertyIsEnumerable,fb=rl(function(){return arguments}())?rl:function(t){return ri(t)&&ub.call(t,"callee")&&!hb.call(t,"callee")},bp=fb;var pb=Array.isArray,Cp=pb;var db=9007199254740991;function mb(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=db}var vo=mb;function gb(t){return t!=null&&vo(t.length)&&!mo(t)}var Tp=gb;function xb(){return!1}var vp=xb;var wp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sp=wp&&typeof module=="object"&&module&&!module.nodeType&&module,yb=Sp&&Sp.exports===wp,kp=yb?It.Buffer:void 0,_b=kp?kp.isBuffer:void 0,bb=_b||vp,Bp=bb;var Cb="[object Arguments]",Tb="[object Array]",vb="[object Boolean]",Sb="[object Date]",kb="[object Error]",wb="[object Function]",Bb="[object Map]",Fb="[object Number]",Mb="[object Object]",Ab="[object RegExp]",Lb="[object Set]",Eb="[object String]",Ob="[object WeakMap]",Ib="[object ArrayBuffer]",Db="[object DataView]",Nb="[object Float32Array]",Rb="[object Float64Array]",$b="[object Int8Array]",zb="[object Int16Array]",Pb="[object Int32Array]",qb="[object Uint8Array]",Wb="[object Uint8ClampedArray]",Ub="[object Uint16Array]",Hb="[object Uint32Array]",lt={};lt[Nb]=lt[Rb]=lt[$b]=lt[zb]=lt[Pb]=lt[qb]=lt[Wb]=lt[Ub]=lt[Hb]=!0;lt[Cb]=lt[Tb]=lt[Ib]=lt[vb]=lt[Db]=lt[Sb]=lt[kb]=lt[wb]=lt[Bb]=lt[Fb]=lt[Mb]=lt[Ab]=lt[Lb]=lt[Eb]=lt[Ob]=!1;function Yb(t){return ri(t)&&vo(t.length)&&!!lt[ke(t)]}var Fp=Yb;function jb(t){return function(e){return t(e)}}var Mp=jb;var Ap=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vi=Ap&&typeof module=="object"&&module&&!module.nodeType&&module,Vb=Vi&&Vi.exports===Ap,il=Vb&&fo.process,Gb=function(){try{var t=Vi&&Vi.require&&Vi.require("util").types;return t||il&&il.binding&&il.binding("util")}catch(e){}}(),nl=Gb;var Lp=nl&&nl.isTypedArray,Xb=Lp?Mp(Lp):Fp,Ep=Xb;var Zb="[object Map]",Kb="[object Set]",Qb=Object.prototype,Jb=Qb.hasOwnProperty;function tC(t){if(t==null)return!0;if(Tp(t)&&(Cp(t)||typeof t=="string"||typeof t.splice=="function"||Bp(t)||Ep(t)||bp(t)))return!t.length;var e=yp(t);if(e==Zb||e==Kb)return!t.size;if(yo(t))return!fp(t).length;for(var r in t)if(Jb.call(t,r))return!1;return!0}var Gi=tC;var hd=Sa(rc(),1),fd=Sa(ic(),1);var Qi=Sa(Bf(),1);var So="comm",ko="rule",wo="decl";var Op="@import";var Ip="@keyframes";var Dp=Math.abs,Xi=String.fromCharCode;function Bo(t){return t.trim()}function Fo(t,e,r){return t.replace(e,r)}function Np(t,e){return t.indexOf(e)}function yr(t,e){return t.charCodeAt(e)|0}function _r(t,e,r){return t.slice(e,r)}function ne(t){return t.length}function Mo(t){return t.length}function ii(t,e){return e.push(t),t}var Ao=1,ni=1,Rp=0,Zt=0,pt=0,oi="";function Lo(t,e,r,i,n,o,a){return{value:t,root:e,parent:r,type:i,props:n,children:o,line:Ao,column:ni,length:a,return:""}}function $p(){return pt}function zp(){return pt=Zt>0?yr(oi,--Zt):0,ni--,pt===10&&(ni=1,Ao--),pt}function Kt(){return pt=Zt<Rp?yr(oi,Zt++):0,ni++,pt===10&&(ni=1,Ao++),pt}function He(){return yr(oi,Zt)}function Zi(){return Zt}function Eo(t,e){return _r(oi,t,e)}function ol(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Pp(t){return Ao=ni=1,Rp=ne(oi=t),Zt=0,[]}function qp(t){return oi="",t}function Oo(t){return Bo(Eo(Zt-1,al(t===91?t+2:t===40?t+1:t)))}function Wp(t){for(;(pt=He())&&pt<33;)Kt();return ol(t)>2||ol(pt)>3?"":" "}function Up(t,e){for(;--e&&Kt()&&!(pt<48||pt>102||pt>57&&pt<65||pt>70&&pt<97););return Eo(t,Zi()+(e<6&&He()==32&&Kt()==32))}function al(t){for(;Kt();)switch(pt){case t:return Zt;case 34:case 39:t!==34&&t!==39&&al(pt);break;case 40:t===41&&al(t);break;case 92:Kt();break}return Zt}function Hp(t,e){for(;Kt()&&t+pt!==47+10;)if(t+pt===42+42&&He()===47)break;return"/*"+Eo(e,Zt-1)+"*"+Xi(t===47?t:Kt())}function Yp(t){for(;!ol(He());)Kt();return Eo(t,Zt)}function Gp(t){return qp(Io("",null,null,null,[""],t=Pp(t),0,[0],t))}function Io(t,e,r,i,n,o,a,s,l){for(var c=0,u=0,h=a,f=0,p=0,x=0,b=1,w=1,A=1,_=0,F="",N=n,O=o,B=i,y=F;w;)switch(x=_,_=Kt()){case 40:if(x!=108&&yr(y,h-1)==58){Np(y+=Fo(Oo(_),"&","&\f"),"&\f")!=-1&&(A=-1);break}case 34:case 39:case 91:y+=Oo(_);break;case 9:case 10:case 13:case 32:y+=Wp(x);break;case 92:y+=Up(Zi()-1,7);continue;case 47:switch(He()){case 42:case 47:ii(eC(Hp(Kt(),Zi()),e,r),l);break;default:y+="/"}break;case 123*b:s[c++]=ne(y)*A;case 125*b:case 59:case 0:switch(_){case 0:case 125:w=0;case 59+u:p>0&&ne(y)-h&&ii(p>32?Vp(y+";",i,r,h-1):Vp(Fo(y," ","")+";",i,r,h-2),l);break;case 59:y+=";";default:if(ii(B=jp(y,e,r,c,u,n,s,F,N=[],O=[],h),o),_===123)if(u===0)Io(y,e,B,B,N,o,h,s,O);else switch(f===99&&yr(y,3)===110?100:f){case 100:case 109:case 115:Io(t,B,B,i&&ii(jp(t,B,B,0,0,n,s,F,n,N=[],h),O),n,O,h,s,i?N:O);break;default:Io(y,B,B,B,[""],O,0,s,O)}}c=u=p=0,b=A=1,F=y="",h=a;break;case 58:h=1+ne(y),p=x;default:if(b<1){if(_==123)--b;else if(_==125&&b++==0&&zp()==125)continue}switch(y+=Xi(_),_*b){case 38:A=u>0?1:(y+="\f",-1);break;case 44:s[c++]=(ne(y)-1)*A,A=1;break;case 64:He()===45&&(y+=Oo(Kt())),f=He(),u=h=ne(F=y+=Yp(Zi())),_++;break;case 45:x===45&&ne(y)==2&&(b=0)}}return o}function jp(t,e,r,i,n,o,a,s,l,c,u){for(var h=n-1,f=n===0?o:[""],p=Mo(f),x=0,b=0,w=0;x<i;++x)for(var A=0,_=_r(t,h+1,h=Dp(b=a[x])),F=t;A<p;++A)(F=Bo(b>0?f[A]+" "+_:Fo(_,/&\f/g,f[A])))&&(l[w++]=F);return Lo(t,e,r,n===0?ko:s,l,c,u)}function eC(t,e,r){return Lo(t,e,r,So,Xi($p()),_r(t,2,-2),0)}function Vp(t,e,r,i){return Lo(t,e,r,wo,_r(t,0,i),_r(t,i+1,-1),i)}function Do(t,e){for(var r="",i=Mo(t),n=0;n<i;n++)r+=e(t[n],n,t,e)||"";return r}function Xp(t,e,r,i){switch(t.type){case Op:case wo:return t.return=t.return||t.value;case So:return"";case Ip:return t.return=t.value+"{"+Do(t.children,i)+"}";case ko:t.value=t.props.join(",")}return ne(r=Do(t.children,i))?t.return=t.value+"{"+r+"}":""}var Fe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},gl=function(t="fatal"){let e=Fe.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Fe&&(e=Fe[t])):typeof t=="number"&&(e=t),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},e<=Fe.fatal&&(D.fatal=console.error?console.error.bind(console,Qt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Qt("FATAL"))),e<=Fe.error&&(D.error=console.error?console.error.bind(console,Qt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Qt("ERROR"))),e<=Fe.warn&&(D.warn=console.warn?console.warn.bind(console,Qt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Qt("WARN"))),e<=Fe.info&&(D.info=console.info?console.info.bind(console,Qt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Qt("INFO"))),e<=Fe.debug&&(D.debug=console.debug?console.debug.bind(console,Qt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Qt("DEBUG"))),e<=Fe.trace&&(D.trace=console.debug?console.debug.bind(console,Qt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Qt("TRACE")))},Qt=t=>`%c${(0,hd.default)().format("ss.SSS")} : ${t} : `,Ko=/<br\s*\/?>/gi,rC=t=>t?dd(t).replace(/\\n/g,"#br#").split("#br#"):[""],pd=t=>Qi.default.sanitize(t),Zp=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){let i=e.securityLevel;i==="antiscript"||i==="strict"?t=pd(t):i!=="loose"&&(t=dd(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=aC(t))}return t},Ji=(t,e)=>t&&(e.dompurifyConfig?t=Qi.default.sanitize(Zp(t,e),e.dompurifyConfig).toString():t=Qi.default.sanitize(Zp(t,e),{FORBID_TAGS:["style"]}).toString(),t),iC=(t,e)=>typeof t=="string"?Ji(t,e):t.flat().map(r=>Ji(r,e)),nC=t=>Ko.test(t),oC=t=>t.split(Ko),aC=t=>t.replace(/#br#/g,"<br/>"),dd=t=>t.replace(Ko,"#br#"),sC=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},md=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),lC=function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},cC=function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},uC=function(t){let e=t;if(t.split("~").length-1>=2){let r=e;do e=r,r=e.replace(/~([^\s,:;]+)~/,"<$1>");while(r!=e);return uC(r)}else return e},xl={getRows:rC,sanitizeText:Ji,sanitizeTextOrArray:iC,hasBreaks:nC,splitBreaks:oC,lineBreakRegex:Ko,removeScript:pd,getUrl:sC,evaluate:md,getMax:lC,getMin:cC},qt=(t,e)=>e?m(t,{s:-40,l:10}):m(t,{s:-40,l:-10}),Qo="#ffffff",Jo="#f2f2f2",hC=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||m(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||m(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=j(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=j(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||P(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||j(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||m(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||m(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||m(this.primaryColor,{h:64}),this.fillType3=this.fillType3||m(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||m(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||m(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||m(this.primaryColor,{h:128}),this.fillType7=this.fillType7||m(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||m(this.primaryColor,{l:-10}),this.pie5=this.pie5||m(this.secondaryColor,{l:-10}),this.pie6=this.pie6||m(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||m(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||m(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||m(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||m(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||m(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||m(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||gr(this.quadrant1Fill)?P(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||m(this.primaryColor,{h:-30}),this.git4=this.git4||m(this.primaryColor,{h:-60}),this.git5=this.git5||m(this.primaryColor,{h:-90}),this.git6=this.git6||m(this.primaryColor,{h:60}),this.git7=this.git7||m(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qo,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Jo}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},fC=t=>{let e=new hC;return e.calculate(t),e},pC=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=qe(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=j("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=j(this.sectionBkgColor,10),this.taskBorderColor=qe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=qe(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=P(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=P(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=P(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||L(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||P(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||m(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||m(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||gr(this.quadrant1Fill)?P(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=P(this.secondaryColor,20),this.git1=P(this.pie2||this.secondaryColor,20),this.git2=P(this.pie3||this.tertiaryColor,20),this.git3=P(this.pie4||m(this.primaryColor,{h:-30}),20),this.git4=P(this.pie5||m(this.primaryColor,{h:-60}),20),this.git5=P(this.pie6||m(this.primaryColor,{h:-90}),10),this.git6=P(this.pie7||m(this.primaryColor,{h:60}),10),this.git7=P(this.pie8||m(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||P(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},dC=t=>{let e=new pC;return e.calculate(t),e},mC=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=m(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=qe(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||j(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||j(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=j(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||j(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||m(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||m(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||m(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=P(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||m(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||m(this.primaryColor,{l:-10}),this.pie5=this.pie5||m(this.secondaryColor,{l:-30}),this.pie6=this.pie6||m(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||m(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||m(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||m(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||m(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||m(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||m(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||gr(this.quadrant1Fill)?P(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||m(this.primaryColor,{h:-30}),this.git4=this.git4||m(this.primaryColor,{h:-60}),this.git5=this.git5||m(this.primaryColor,{h:-90}),this.git6=this.git6||m(this.primaryColor,{h:60}),this.git7=this.git7||m(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||j(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qo,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Jo}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},gC=t=>{let e=new mC;return e.calculate(t),e},xC=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=P("#cde498",10),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=j(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||j(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||j(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=j(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||j(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||m(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||m(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||m(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||m(this.primaryColor,{l:-30}),this.pie5=this.pie5||m(this.secondaryColor,{l:-30}),this.pie6=this.pie6||m(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||m(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||m(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||m(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||m(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||m(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||m(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||gr(this.quadrant1Fill)?P(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||m(this.primaryColor,{h:-30}),this.git4=this.git4||m(this.primaryColor,{h:-60}),this.git5=this.git5||m(this.primaryColor,{h:-90}),this.git6=this.git6||m(this.primaryColor,{h:60}),this.git7=this.git7||m(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qo,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Jo}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},yC=t=>{let e=new xC;return e.calculate(t),e},fl=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=P(this.contrast,55),this.background="#ffffff",this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=P(this.contrast,55),this.border2=this.contrast,this.actorBorder=P(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||L(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||P(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||j(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||m(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||m(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=P(this.contrast,30),this.sectionBkgColor2=P(this.contrast,30),this.taskBorderColor=j(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=P(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=j(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||gr(this.quadrant1Fill)?P(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=j(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||m(this.primaryColor,{h:-30}),this.git4=this.pie5||m(this.primaryColor,{h:-60}),this.git5=this.pie6||m(this.primaryColor,{h:-90}),this.git6=this.pie7||m(this.primaryColor,{h:60}),this.git7=this.pie8||m(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qo,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Jo}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},_C=t=>{let e=new fl;return e.calculate(t),e},Ae={base:{getThemeVariables:fC},dark:{getThemeVariables:dC},default:{getThemeVariables:gC},forest:{getThemeVariables:yC},neutral:{getThemeVariables:_C}},Ye={theme:"default",themeVariables:Ae.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,displayMode:"",axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0,textPosition:.75},quadrantChart:{chartWidth:500,chartHeight:500,titlePadding:10,titleFontSize:20,quadrantPadding:5,quadrantTextTopPadding:5,quadrantLabelFontSize:16,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2,xAxisLabelPadding:5,xAxisLabelFontSize:16,xAxisPosition:"top",yAxisLabelPadding:5,yAxisLabelFontSize:16,yAxisPosition:"left",pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Ye.class&&(Ye.class.arrowMarkerAbsolute=Ye.arrowMarkerAbsolute);Ye.gitGraph&&(Ye.gitGraph.arrowMarkerAbsolute=Ye.arrowMarkerAbsolute);var gd=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...gd(t[i],"")]:[...r,e+i],[]),bC=gd(Ye,""),CC=Ye;function xd(t){return typeof t=="undefined"||t===null}function TC(t){return typeof t=="object"&&t!==null}function vC(t){return Array.isArray(t)?t:xd(t)?[]:[t]}function SC(t,e){var r,i,n,o;if(e)for(o=Object.keys(e),r=0,i=o.length;r<i;r+=1)n=o[r],t[n]=e[n];return t}function kC(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function wC(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var BC=xd,FC=TC,MC=vC,AC=kC,LC=wC,EC=SC,Pt={isNothing:BC,isObject:FC,toArray:MC,repeat:AC,isNegativeZero:LC,extend:EC};function yd(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
`+t.mark.snippet),i+" "+r):i}function tn(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=yd(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}tn.prototype=Object.create(Error.prototype);tn.prototype.constructor=tn;tn.prototype.toString=function(e){return this.name+": "+yd(this,e)};var Me=tn;function sl(t,e,r,i,n){var o="",a="",s=Math.floor(n/2)-1;return i-e>s&&(o=" ... ",e=i-s+o.length),r-i>s&&(a=" ...",r=i+s-a.length),{str:o+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:i-e+o.length}}function ll(t,e){return Pt.repeat(" ",e-t.length)+t}function OC(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],o,a=-1;o=r.exec(t.buffer);)n.push(o.index),i.push(o.index+o[0].length),t.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s="",l,c,u=Math.min(t.line+e.linesAfter,n.length).toString().length,h=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)c=sl(t.buffer,i[a-l],n[a-l],t.position-(i[a]-i[a-l]),h),s=Pt.repeat(" ",e.indent)+ll((t.line-l+1).toString(),u)+" | "+c.str+`
`+s;for(c=sl(t.buffer,i[a],n[a],t.position,h),s+=Pt.repeat(" ",e.indent)+ll((t.line+1).toString(),u)+" | "+c.str+`
`,s+=Pt.repeat("-",e.indent+u+3+c.pos)+`^
`,l=1;l<=e.linesAfter&&!(a+l>=n.length);l++)c=sl(t.buffer,i[a+l],n[a+l],t.position-(i[a]-i[a+l]),h),s+=Pt.repeat(" ",e.indent)+ll((t.line+l+1).toString(),u)+" | "+c.str+`
`;return s.replace(/\n$/,"")}var IC=OC,DC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],NC=["scalar","sequence","mapping"];function RC(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function $C(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(DC.indexOf(r)===-1)throw new Me('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=RC(e.styleAliases||null),NC.indexOf(this.kind)===-1)throw new Me('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Nt=$C;function Kp(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(n=a)}),r[n]=i}),r}function zC(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function pl(t){return this.extend(t)}pl.prototype.extend=function(e){var r=[],i=[];if(e instanceof Nt)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new Me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Nt))throw new Me("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof Nt))throw new Me("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(pl.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Kp(n,"implicit"),n.compiledExplicit=Kp(n,"explicit"),n.compiledTypeMap=zC(n.compiledImplicit,n.compiledExplicit),n};var PC=pl,qC=new Nt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),WC=new Nt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),UC=new Nt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),_d=new PC({explicit:[qC,WC,UC]});function HC(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function YC(){return null}function jC(t){return t===null}var VC=new Nt("tag:yaml.org,2002:null",{kind:"scalar",resolve:HC,construct:YC,predicate:jC,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function GC(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function XC(t){return t==="true"||t==="True"||t==="TRUE"}function ZC(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var KC=new Nt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:GC,construct:XC,predicate:ZC,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function QC(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function JC(t){return 48<=t&&t<=55}function tT(t){return 48<=t&&t<=57}function eT(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!QC(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!JC(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!tT(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function rT(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function iT(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Pt.isNegativeZero(t)}var nT=new Nt("tag:yaml.org,2002:int",{kind:"scalar",resolve:eT,construct:rT,predicate:iT,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),oT=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function aT(t){return!(t===null||!oT.test(t)||t[t.length-1]==="_")}function sT(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var lT=/^[-+]?[0-9]+e/;function cT(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Pt.isNegativeZero(t))return"-0.0";return r=t.toString(10),lT.test(r)?r.replace("e",".e"):r}function uT(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Pt.isNegativeZero(t))}var hT=new Nt("tag:yaml.org,2002:float",{kind:"scalar",resolve:aT,construct:sT,predicate:uT,represent:cT,defaultStyle:"lowercase"}),fT=_d.extend({implicit:[VC,KC,nT,hT]}),pT=fT,bd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Cd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function dT(t){return t===null?!1:bd.exec(t)!==null||Cd.exec(t)!==null}function mT(t){var e,r,i,n,o,a,s,l=0,c=null,u,h,f;if(e=bd.exec(t),e===null&&(e=Cd.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],h=+(e[11]||0),c=(u*60+h)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,o,a,s,l)),c&&f.setTime(f.getTime()-c),f}function gT(t){return t.toISOString()}var xT=new Nt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:dT,construct:mT,instanceOf:Date,represent:gT});function yT(t){return t==="<<"||t===null}var _T=new Nt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:yT}),yl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function bT(t){if(t===null)return!1;var e,r,i=0,n=t.length,o=yl;for(r=0;r<n;r++)if(e=o.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function CT(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,o=yl,a=0,s=[];for(e=0;e<n;e++)e%4===0&&e&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|o.indexOf(i.charAt(e));return r=n%4*6,r===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):r===18?(s.push(a>>10&255),s.push(a>>2&255)):r===12&&s.push(a>>4&255),new Uint8Array(s)}function TT(t){var e="",r=0,i,n,o=t.length,a=yl;for(i=0;i<o;i++)i%3===0&&i&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[i];return n=o%3,n===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):n===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):n===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function vT(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var ST=new Nt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:bT,construct:CT,predicate:vT,represent:TT}),kT=Object.prototype.hasOwnProperty,wT=Object.prototype.toString;function BT(t){if(t===null)return!0;var e=[],r,i,n,o,a,s=t;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],a=!1,wT.call(n)!=="[object Object]")return!1;for(o in n)if(kT.call(n,o))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}function FT(t){return t!==null?t:[]}var MT=new Nt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:BT,construct:FT}),AT=Object.prototype.toString;function LT(t){if(t===null)return!0;var e,r,i,n,o,a=t;for(o=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],AT.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[e]=[n[0],i[n[0]]]}return!0}function ET(t){if(t===null)return[];var e,r,i,n,o,a=t;for(o=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],n=Object.keys(i),o[e]=[n[0],i[n[0]]];return o}var OT=new Nt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:LT,construct:ET}),IT=Object.prototype.hasOwnProperty;function DT(t){if(t===null)return!0;var e,r=t;for(e in r)if(IT.call(r,e)&&r[e]!==null)return!1;return!0}function NT(t){return t!==null?t:{}}var RT=new Nt("tag:yaml.org,2002:set",{kind:"mapping",resolve:DT,construct:NT}),$T=pT.extend({implicit:[xT,_T],explicit:[ST,MT,OT,RT]}),Ve=Object.prototype.hasOwnProperty,Po=1,Td=2,vd=3,qo=4,cl=1,zT=2,Qp=3,PT=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qT=/[\x85\u2028\u2029]/,WT=/[,\[\]\{\}]/,Sd=/^(?:!|!!|![a-z\-]+!)$/i,kd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jp(t){return Object.prototype.toString.call(t)}function pe(t){return t===10||t===13}function Tr(t){return t===9||t===32}function Ut(t){return t===9||t===32||t===10||t===13}function ai(t){return t===44||t===91||t===93||t===123||t===125}function UT(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function HT(t){return t===120?2:t===117?4:t===85?8:0}function YT(t){return 48<=t&&t<=57?t-48:-1}function td(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function jT(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var wd=new Array(256),Bd=new Array(256);for(br=0;br<256;br++)wd[br]=td(br)?1:0,Bd[br]=td(br);var br;function VT(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||$T,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Fd(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=IC(r),new Me(e,r)}function Y(t,e){throw Fd(t,e)}function Wo(t,e){t.onWarning&&t.onWarning.call(null,Fd(t,e))}var ed={YAML:function(e,r,i){var n,o,a;e.version!==null&&Y(e,"duplication of %YAML directive"),i.length!==1&&Y(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Y(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),a=parseInt(n[2],10),o!==1&&Y(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Wo(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,o;i.length!==2&&Y(e,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],Sd.test(n)||Y(e,"ill-formed tag handle (first argument) of the TAG directive"),Ve.call(e.tagMap,n)&&Y(e,'there is a previously declared suffix for "'+n+'" tag handle'),kd.test(o)||Y(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(a){Y(e,"tag prefix is malformed: "+o)}e.tagMap[n]=o}};function je(t,e,r,i){var n,o,a,s;if(e<r){if(s=t.input.slice(e,r),i)for(n=0,o=s.length;n<o;n+=1)a=s.charCodeAt(n),a===9||32<=a&&a<=1114111||Y(t,"expected valid JSON character");else PT.test(s)&&Y(t,"the stream contains non-printable characters");t.result+=s}}function rd(t,e,r,i){var n,o,a,s;for(Pt.isObject(r)||Y(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,s=n.length;a<s;a+=1)o=n[a],Ve.call(e,o)||(e[o]=r[o],i[o]=!0)}function si(t,e,r,i,n,o,a,s,l){var c,u;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,u=n.length;c<u;c+=1)Array.isArray(n[c])&&Y(t,"nested arrays are not supported inside keys"),typeof n=="object"&&Jp(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Jp(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)rd(t,e,o[c],r);else rd(t,e,o,r);else!t.json&&!Ve.call(r,n)&&Ve.call(e,n)&&(t.line=a||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,Y(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[n]=o,delete r[n];return e}function _l(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Y(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function dt(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;Tr(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(pe(n))for(_l(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&Wo(t,"deficient indentation"),i}function ta(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Ut(r)))}function bl(t,e){e===1?t.result+=" ":e>1&&(t.result+=Pt.repeat(`
`,e-1))}function GT(t,e,r){var i,n,o,a,s,l,c,u,h=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),Ut(p)||ai(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=t.input.charCodeAt(t.position+1),Ut(n)||r&&ai(n)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,s=!1;p!==0;){if(p===58){if(n=t.input.charCodeAt(t.position+1),Ut(n)||r&&ai(n))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),Ut(i))break}else{if(t.position===t.lineStart&&ta(t)||r&&ai(p))break;if(pe(p))if(l=t.line,c=t.lineStart,u=t.lineIndent,dt(t,!1,-1),t.lineIndent>=e){s=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=c,t.lineIndent=u;break}}s&&(je(t,o,a,!1),bl(t,t.line-l),o=a=t.position,s=!1),Tr(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return je(t,o,a,!1),t.result?!0:(t.kind=h,t.result=f,!1)}function XT(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(je(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else pe(r)?(je(t,i,n,!0),bl(t,dt(t,!1,e)),i=n=t.position):t.position===t.lineStart&&ta(t)?Y(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Y(t,"unexpected end of the stream within a single quoted scalar")}function ZT(t,e){var r,i,n,o,a,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return je(t,r,t.position,!0),t.position++,!0;if(s===92){if(je(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),pe(s))dt(t,!1,e);else if(s<256&&wd[s])t.result+=Bd[s],t.position++;else if((a=HT(s))>0){for(n=a,o=0;n>0;n--)s=t.input.charCodeAt(++t.position),(a=UT(s))>=0?o=(o<<4)+a:Y(t,"expected hexadecimal character");t.result+=jT(o),t.position++}else Y(t,"unknown escape sequence");r=i=t.position}else pe(s)?(je(t,r,i,!0),bl(t,dt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ta(t)?Y(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Y(t,"unexpected end of the stream within a double quoted scalar")}function KT(t,e){var r=!0,i,n,o,a=t.tag,s,l=t.anchor,c,u,h,f,p,x=Object.create(null),b,w,A,_;if(_=t.input.charCodeAt(t.position),_===91)u=93,p=!1,s=[];else if(_===123)u=125,p=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),_=t.input.charCodeAt(++t.position);_!==0;){if(dt(t,!0,e),_=t.input.charCodeAt(t.position),_===u)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=s,!0;r?_===44&&Y(t,"expected the node content, but found ','"):Y(t,"missed comma between flow collection entries"),w=b=A=null,h=f=!1,_===63&&(c=t.input.charCodeAt(t.position+1),Ut(c)&&(h=f=!0,t.position++,dt(t,!0,e))),i=t.line,n=t.lineStart,o=t.position,li(t,e,Po,!1,!0),w=t.tag,b=t.result,dt(t,!0,e),_=t.input.charCodeAt(t.position),(f||t.line===i)&&_===58&&(h=!0,_=t.input.charCodeAt(++t.position),dt(t,!0,e),li(t,e,Po,!1,!0),A=t.result),p?si(t,s,x,w,b,A,i,n,o):h?s.push(si(t,null,x,w,b,A,i,n,o)):s.push(b),dt(t,!0,e),_=t.input.charCodeAt(t.position),_===44?(r=!0,_=t.input.charCodeAt(++t.position)):r=!1}Y(t,"unexpected end of the stream within a flow collection")}function QT(t,e){var r,i,n=cl,o=!1,a=!1,s=e,l=0,c=!1,u,h;if(h=t.input.charCodeAt(t.position),h===124)i=!1;else if(h===62)i=!0;else return!1;for(t.kind="scalar",t.result="";h!==0;)if(h=t.input.charCodeAt(++t.position),h===43||h===45)cl===n?n=h===43?Qp:zT:Y(t,"repeat of a chomping mode identifier");else if((u=YT(h))>=0)u===0?Y(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Y(t,"repeat of an indentation width identifier"):(s=e+u-1,a=!0);else break;if(Tr(h)){do h=t.input.charCodeAt(++t.position);while(Tr(h));if(h===35)do h=t.input.charCodeAt(++t.position);while(!pe(h)&&h!==0)}for(;h!==0;){for(_l(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!a||t.lineIndent<s)&&h===32;)t.lineIndent++,h=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>s&&(s=t.lineIndent),pe(h)){l++;continue}if(t.lineIndent<s){n===Qp?t.result+=Pt.repeat(`
`,o?1+l:l):n===cl&&o&&(t.result+=`
`);break}for(i?Tr(h)?(c=!0,t.result+=Pt.repeat(`
`,o?1+l:l)):c?(c=!1,t.result+=Pt.repeat(`
`,l+1)):l===0?o&&(t.result+=" "):t.result+=Pt.repeat(`
`,l):t.result+=Pt.repeat(`
`,o?1+l:l),o=!0,a=!0,l=0,r=t.position;!pe(h)&&h!==0;)h=t.input.charCodeAt(++t.position);je(t,r,t.position,!1)}return!0}function id(t,e){var r,i=t.tag,n=t.anchor,o=[],a,s=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Y(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!Ut(a))));){if(s=!0,t.position++,dt(t,!0,-1)&&t.lineIndent<=e){o.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,li(t,e,vd,!1,!0),o.push(t.result),dt(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Y(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return s?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=o,!0):!1}function JT(t,e,r){var i,n,o,a,s,l,c=t.tag,u=t.anchor,h={},f=Object.create(null),p=null,x=null,b=null,w=!1,A=!1,_;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),_=t.input.charCodeAt(t.position);_!==0;){if(!w&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Y(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),o=t.line,(_===63||_===58)&&Ut(i))_===63?(w&&(si(t,h,f,p,x,null,a,s,l),p=x=b=null),A=!0,w=!0,n=!0):w?(w=!1,n=!0):Y(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,_=i;else{if(a=t.line,s=t.lineStart,l=t.position,!li(t,r,Td,!1,!0))break;if(t.line===o){for(_=t.input.charCodeAt(t.position);Tr(_);)_=t.input.charCodeAt(++t.position);if(_===58)_=t.input.charCodeAt(++t.position),Ut(_)||Y(t,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(si(t,h,f,p,x,null,a,s,l),p=x=b=null),A=!0,w=!1,n=!1,p=t.tag,x=t.result;else if(A)Y(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=u,!0}else if(A)Y(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=u,!0}if((t.line===o||t.lineIndent>e)&&(w&&(a=t.line,s=t.lineStart,l=t.position),li(t,e,qo,!0,n)&&(w?x=t.result:b=t.result),w||(si(t,h,f,p,x,b,a,s,l),p=x=b=null),dt(t,!0,-1),_=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&_!==0)Y(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return w&&si(t,h,f,p,x,null,a,s,l),A&&(t.tag=c,t.anchor=u,t.kind="mapping",t.result=h),A}function tv(t){var e,r=!1,i=!1,n,o,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&Y(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(i=!0,n="!!",a=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(o=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):Y(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Ut(a);)a===33&&(i?Y(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Sd.test(n)||Y(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),WT.test(o)&&Y(t,"tag suffix cannot contain flow indicator characters")}o&&!kd.test(o)&&Y(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch(s){Y(t,"tag name is malformed: "+o)}return r?t.tag=o:Ve.call(t.tagMap,n)?t.tag=t.tagMap[n]+o:n==="!"?t.tag="!"+o:n==="!!"?t.tag="tag:yaml.org,2002:"+o:Y(t,'undeclared tag handle "'+n+'"'),!0}function ev(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Y(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ut(r)&&!ai(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Y(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function rv(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!Ut(i)&&!ai(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Y(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Ve.call(t.anchorMap,r)||Y(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],dt(t,!0,-1),!0}function li(t,e,r,i,n){var o,a,s,l=1,c=!1,u=!1,h,f,p,x,b,w;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=a=s=qo===r||vd===r,i&&dt(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;tv(t)||ev(t);)dt(t,!0,-1)?(c=!0,s=o,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):s=!1;if(s&&(s=c||n),(l===1||qo===r)&&(Po===r||Td===r?b=e:b=e+1,w=t.position-t.lineStart,l===1?s&&(id(t,w)||JT(t,w,b))||KT(t,b)?u=!0:(a&&QT(t,b)||XT(t,b)||ZT(t,b)?u=!0:rv(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&Y(t,"alias node should not have any properties")):GT(t,b,Po===r)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=s&&id(t,w))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Y(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),h=0,f=t.implicitTypes.length;h<f;h+=1)if(x=t.implicitTypes[h],x.resolve(t.result)){t.result=x.construct(t.result),t.tag=x.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Ve.call(t.typeMap[t.kind||"fallback"],t.tag))x=t.typeMap[t.kind||"fallback"][t.tag];else for(x=null,p=t.typeMap.multi[t.kind||"fallback"],h=0,f=p.length;h<f;h+=1)if(t.tag.slice(0,p[h].tag.length)===p[h].tag){x=p[h];break}x||Y(t,"unknown tag !<"+t.tag+">"),t.result!==null&&x.kind!==t.kind&&Y(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+x.kind+'", not "'+t.kind+'"'),x.resolve(t.result,t.tag)?(t.result=x.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Y(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function iv(t){var e=t.position,r,i,n,o=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(dt(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(o=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!Ut(a);)a=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&Y(t,"directive name must not be less than one character in length");a!==0;){for(;Tr(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!pe(a));break}if(pe(a))break;for(r=t.position;a!==0&&!Ut(a);)a=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}a!==0&&_l(t),Ve.call(ed,i)?ed[i](t,i,n):Wo(t,'unknown document directive "'+i+'"')}if(dt(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,dt(t,!0,-1)):o&&Y(t,"directives end mark is expected"),li(t,t.lineIndent-1,qo,!1,!0),dt(t,!0,-1),t.checkLineBreaks&&qT.test(t.input.slice(e,t.position))&&Wo(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ta(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,dt(t,!0,-1));return}if(t.position<t.length-1)Y(t,"end of the stream or a document separator is expected");else return}function Md(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new VT(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,Y(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)iv(r);return r.documents}function nv(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var i=Md(t,r);if(typeof e!="function")return i;for(var n=0,o=i.length;n<o;n+=1)e(i[n])}function ov(t,e){var r=Md(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Me("expected a single document in the stream, but found more")}}var av=nv,sv=ov,lv={loadAll:av,load:sv},cv=_d,uv=lv.load,Ad=new RegExp("^-{3}\\s*[\\n\\r](.*?)[\\n\\r]-{3}\\s*[\\n\\r]+","s");function hv(t,e){var r,i;let n=t.match(Ad);if(n){let o=uv(n[1],{schema:cv});return o!=null&&o.title&&((r=e.setDiagramTitle)==null||r.call(e,o.title)),o!=null&&o.displayMode&&((i=e.setDisplayMode)==null||i.call(e,o.displayMode)),t.slice(n[0].length)}else return t}var dl=function(t,e,r){let{depth:i,clobber:n}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(o=>dl(t,o,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(o=>{t.includes(o)||t.push(o)}),t):t===void 0||i<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&(t[o]===void 0||typeof t[o]=="object")?(t[o]===void 0&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=dl(t[o],e[o],{depth:i-1,clobber:n})):(n||typeof t[o]!="object"&&typeof e[o]!="object")&&(t[o]=e[o])}),t)},Dt=dl,en=Object.freeze(CC),Wt=Dt({},en),Ld,ci=[],Ki=Dt({},en),ea=(t,e)=>{let r=Dt({},t),i={};for(let n of e)Od(n),i=Dt(i,n);if(r=Dt(r,i),i.theme&&i.theme in Ae){let n=Dt({},Ld),o=Dt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ae&&(r.themeVariables=Ae[r.theme].getThemeVariables(o))}return Ki=r,Nd(Ki),Ki},fv=t=>(Wt=Dt({},en),Wt=Dt(Wt,t),t.theme&&Ae[t.theme]&&(Wt.themeVariables=Ae[t.theme].getThemeVariables(t.themeVariables)),ea(Wt,ci),Wt),pv=t=>{Ld=Dt({},t)},dv=t=>(Wt=Dt(Wt,t),ea(Wt,ci),Wt),Ed=()=>Dt({},Wt),mv=t=>(Nd(t),Dt(Ki,t),Le()),Le=()=>Dt({},Ki),Od=t=>{var e;["secure",...(e=Wt.secure)!=null?e:[]].forEach(r=>{t[r]!==void 0&&(D.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.indexOf("__")===0&&delete t[r]}),Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].includes("<")||t[r].includes(">")||t[r].includes("url(data:"))&&delete t[r],typeof t[r]=="object"&&Od(t[r])})},Id=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),ci.push(t),ea(Wt,ci)},Uo=(t=Wt)=>{ci=[],ea(t,ci)},Dd=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(Dd||{}),nd={},gv=t=>{nd[t]||(D.warn(Dd[t]),nd[t]=!0)},Nd=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&gv("LAZY_LOAD_DEPRECATED")},xv=function(t,e){for(let r of e)t.attr(r[0],r[1])},yv=function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},_v=function(t,e,r,i){let n=yv(e,r,i);xv(t,n)},bv=function(t,e,r,i){let n=e.node().getBBox(),o=n.width,a=n.height;D.info(`SVG bounds: ${o}x${a}`,n);let s=0,l=0;D.info(`Graph bounds: ${s}x${l}`,t),s=o+r*2,l=a+r*2,D.info(`Calculated bounds: ${s}x${l}`),_v(e,l,s,i);let c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},Ro={},Cv=(t,e,r)=>{let i="";return t in Ro&&Ro[t]?i=Ro[t](r):D.warn(`No theme found for ${t}`),` & {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${r.errorBkgColor};
}
& .error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: 2px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
& .marker.cross {
stroke: ${r.lineColor};
}
& svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
${i}
${e}
`},Tv=(t,e)=>{Ro[t]=e},vv=Cv,Cl="",ra="",Tl="",vl=t=>Ji(t,Le()),Rd=function(){Cl="",Tl="",ra=""},$d=function(t){Cl=vl(t).replace(/^\s+/g,"")},zd=function(){return Cl||ra},Pd=function(t){Tl=vl(t).replace(/\n\s+/g,`
`)},qd=function(){return Tl},Wd=function(t){ra=vl(t)},Ud=function(){return ra},Sv={getAccTitle:zd,setAccTitle:$d,getDiagramTitle:Ud,setDiagramTitle:Wd,getAccDescription:qd,setAccDescription:Pd,clear:Rd},kv=Object.freeze(Object.defineProperty({__proto__:null,clear:Rd,default:Sv,getAccDescription:qd,getAccTitle:zd,getDiagramTitle:Ud,setAccDescription:Pd,setAccTitle:$d,setDiagramTitle:Wd},Symbol.toStringTag,{value:"Module"})),Cr={},Hd=function(t,e,r,i){D.debug("parseDirective is being called",e,r,i);try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":Cr={};break;case"type_directive":if(!Cr)throw new Error("currentDirective is undefined");Cr.type=e.toLowerCase();break;case"arg_directive":if(!Cr)throw new Error("currentDirective is undefined");Cr.args=JSON.parse(e);break;case"close_directive":wv(t,Cr,i),Cr=void 0;break}}catch(n){D.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),D.error(n.message)}},wv=function(t,e,r){switch(D.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(i=>{e.args[i]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[i],delete e.args[i])}),D.info("sanitize in handleDirective",e.args),hi(e.args),D.info("sanitize in handleDirective (done)",e.args),Id(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":D.warn("themeCss encountered");break;default:D.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},Bv=D,Fv=gl,Yd=Le,Mv=t=>Ji(t,Yd()),Av=bv,Lv=()=>kv,Ev=(t,e,r,i)=>Hd(t,e,r,i),Ho={},Yo=(t,e,r)=>{if(Ho[t])throw new Error(`Diagram ${t} already registered.`);Ho[t]=e,r&&Vd(t,r),Tv(t,e.styles),e.injectUtils&&e.injectUtils(Bv,Fv,Yd,Mv,Av,Lv(),Ev)},Sl=t=>{if(t in Ho)return Ho[t];throw new Error(`Diagram ${t} not found.`)},jo=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},Ov=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Iv=/\s*%%.*\n/gm,ui={},ia=function(t,e){t=t.replace(Ad,"").replace(Ov,"").replace(Iv,`
`);for(let[r,{detector:i}]of Object.entries(ui))if(i(t,e))return r;throw new jo(`No diagram type detected matching given configuration for text: ${t}`)},jd=(...t)=>{for(let{id:e,detector:r,loader:i}of t)Vd(e,r,i)},Dv=async()=>{D.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(ui).map(async([r,{detector:i,loader:n}])=>{if(n)try{Sl(r)}catch(o){try{let{diagram:a,id:s}=await n();Yo(s,a,i)}catch(a){throw D.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ui[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){D.error(`Failed to load ${e.length} external diagrams`);for(let r of e)D.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},Vd=(t,e,r)=>{ui[t]?D.error(`Detector with key ${t} already exists`):ui[t]={detector:e,loader:r},D.debug(`Detector with key ${t} added${r?" with loader":""}`)},Nv=t=>ui[t].loader,Rv="\u200B",$v={curveBasis:Ts,curveBasisClosed:ks,curveBasisOpen:ws,curveBumpX:vs,curveBumpY:Ss,curveBundle:Bs,curveCardinalClosed:Ms,curveCardinalOpen:As,curveCardinal:Fs,curveCatmullRomClosed:Es,curveCatmullRomOpen:Os,curveCatmullRom:Ls,curveLinear:Oi,curveLinearClosed:Is,curveMonotoneX:Ns,curveMonotoneY:Rs,curveNatural:$s,curveStep:zs,curveStepAfter:qs,curveStepBefore:Ps},ul=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,zv=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Pv=function(t,e){let r=Gd(t,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let n=r.map(o=>o.args);hi(n),i=Dt(i,[...n])}else i=r.args;if(i){let n=ia(t,e);["config"].forEach(o=>{i[o]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[o],delete i[o])})}return i},Gd=function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${zv.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i,n=[];for(;(i=ul.exec(t))!==null;)if(i.index===ul.lastIndex&&ul.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){let o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:o,args:a})}return n.length===0&&n.push({type:t,args:null}),n.length===1?n[0]:n}catch(r){return D.error(`ERROR: ${r.message} - Unable to parse directive
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},qv=function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return-1};function Wv(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return $v[r]||e}function Uv(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,fd.sanitizeUrl)(r):r}var Hv=(t,...e)=>{let r=t.split("."),i=r.length-1,n=r[i],o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o)return;o[n](...e)};function Vo(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function Yv(t){let e,r=0;t.forEach(o=>{r+=Vo(o,e),e=o});let i=r/2,n;return e=void 0,t.forEach(o=>{if(e&&!n){let a=Vo(o,e);if(a<i)i-=a;else{let s=i/a;s<=0&&(n=e),s>=1&&(n={x:o.x,y:o.y}),s>0&&s<1&&(n={x:(1-s)*e.x+s*o.x,y:(1-s)*e.y+s*o.y})}}e=o}),n}function jv(t){return t.length===1?t[0]:Yv(t)}var Vv=(t,e,r)=>{let i;D.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let o=25,a;i=void 0,e.forEach(u=>{if(i&&!a){let h=Vo(u,i);if(h<o)o-=h;else{let f=o/h;f<=0&&(a=i),f>=1&&(a={x:u.x,y:u.y}),f>0&&f<1&&(a={x:(1-f)*i.x+f*u.x,y:(1-f)*i.y+f*u.y})}}i=u});let s=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),c={x:0,y:0};return c.x=Math.sin(l)*s+(e[0].x+a.x)/2,c.y=-Math.cos(l)*s+(e[0].y+a.y)/2,c};function Gv(t,e,r){let i=JSON.parse(JSON.stringify(r)),n;D.info("our points",i),e!=="start_left"&&e!=="start_right"&&(i=i.reverse()),i.forEach(h=>{n=h});let a=25+t,s;n=void 0,i.forEach(h=>{if(n&&!s){let f=Vo(h,n);if(f<a)a-=f;else{let p=a/f;p<=0&&(s=n),p>=1&&(s={x:h.x,y:h.y}),p>0&&p<1&&(s={x:(1-p)*n.x+p*h.x,y:(1-p)*n.y+p*h.y})}}n=h});let l=10+t*.5,c=Math.atan2(i[0].y-s.y,i[0].x-s.x),u={x:0,y:0};return u.x=Math.sin(c)*l+(i[0].x+s.x)/2,u.y=-Math.cos(c)*l+(i[0].y+s.y)/2,e==="start_left"&&(u.x=Math.sin(c+Math.PI)*l+(i[0].x+s.x)/2,u.y=-Math.cos(c+Math.PI)*l+(i[0].y+s.y)/2),e==="end_right"&&(u.x=Math.sin(c-Math.PI)*l+(i[0].x+s.x)/2-5,u.y=-Math.cos(c-Math.PI)*l+(i[0].y+s.y)/2-5),e==="end_left"&&(u.x=Math.sin(c)*l+(i[0].x+s.x)/2-5,u.y=-Math.cos(c)*l+(i[0].y+s.y)/2-5),u}function Xv(t){let e="",r="";for(let i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}var od=0,Zv=()=>(od++,"id-"+Math.random().toString(36).substr(2,12)+"-"+od);function Kv(t){let e="",r="0123456789abcdef",i=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*i));return e}var Qv=t=>Kv(t.length),Jv=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},tS=function(t,e){let r=e.text.replace(xl.lineBreakRegex," "),[,i]=wl(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",i),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);let o=n.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(r),n},eS=xo((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),xl.lineBreakRegex.test(t)))return t;let i=t.split(" "),n=[],o="";return i.forEach((a,s)=>{let l=Go(`${a} `,r),c=Go(o,r);if(l>e){let{hyphenatedStrings:f,remainingWord:p}=rS(a,e,"-",r);n.push(o,...f),o=p}else c+l>=e?(n.push(o),o=a):o=[o,a].filter(Boolean).join(" ");s+1===i.length&&n.push(o)}),n.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),rS=xo((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let n=[...t],o=[],a="";return n.forEach((s,l)=>{let c=`${a}${s}`;if(Go(c,i)>=e){let h=l+1,f=n.length===h,p=`${c}${r}`;o.push(f?c:p),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function iS(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),kl(t,e).height}function Go(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),kl(t,e).width}var kl=xo((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);let{fontSize:r,fontFamily:i,fontWeight:n}=e;if(!t)return{width:0,height:0};let[,o]=wl(r),a=["sans-serif",i],s=t.split(xl.lineBreakRegex),l=[],c=Vt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};let u=c.append("svg");for(let f of a){let p=0,x={width:0,height:0,lineHeight:0};for(let b of s){let w=Jv();w.text=b||Rv;let A=tS(u,w).style("font-size",o).style("font-weight",n).style("font-family",f),_=(A._groups||A)[0][0].getBBox();if(_.width===0&&_.height===0)throw new Error("svg element not in render tree");x.width=Math.round(Math.max(x.width,_.width)),p=Math.round(_.height),x.height+=p,x.lineHeight=Math.round(Math.max(x.lineHeight,p))}l.push(x)}u.remove();let h=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[h]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),nS=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}},No,oS=function(t){return No=No||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),No.innerHTML=t,unescape(No.textContent)},hi=t=>{if(D.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>hi(e)):Object.keys(t).forEach(e=>{D.debug("Checking key",e),e.startsWith("__")&&(D.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(D.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(D.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(D.debug("sanitizing themeCss option"),t[e]=$o(t[e])),e.includes("fontFamily")&&(D.debug("sanitizing fontFamily option"),t[e]=$o(t[e])),e.includes("altFontFamily")&&(D.debug("sanitizing altFontFamily option"),t[e]=$o(t[e])),bC.includes(e)?typeof t[e]=="object"&&(D.debug("sanitize deleting object",e),hi(t[e])):(D.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){let e=Object.keys(t.themeVariables);for(let r of e){let i=t.themeVariables[r];i&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}D.debug("After sanitization",t)},$o=t=>{let e=0,r=0;for(let i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t};function Xd(t){return"str"in t}function aS(t){return t instanceof Error?t.message:String(t)}var sS=(t,e,r,i)=>{if(!i)return;let n=t.node().getBBox();t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},wl=t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},zo={assignWithDepth:Dt,wrapLabel:eS,calculateTextHeight:iS,calculateTextWidth:Go,calculateTextDimensions:kl,detectInit:Pv,detectDirective:Gd,isSubstringInArray:qv,interpolateToCurve:Wv,calcLabelPosition:jv,calcCardinalityPosition:Vv,calcTerminalLabelPosition:Gv,formatUrl:Uv,getStylesFromArray:Xv,generateId:Zv,random:Qv,runFunc:Hv,entityDecode:oS,initIdGenerator:nS,directiveSanitizer:hi,sanitizeCss:$o,insertTitle:sS,parseFontSize:wl},ad="10.2.3",Zd="c4",lS=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null,cS=async()=>{let{diagram:t}=await import("./c4Diagram-9cddb37f-VEMBEPAJ.js");return{id:Zd,diagram:t}},uS={id:Zd,detector:lS,loader:cS},hS=uS,Kd="flowchart",fS=(t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null},pS=async()=>{let{diagram:t}=await import("./flowDiagram-93327f21-556RAONP.js");return{id:Kd,diagram:t}},dS={id:Kd,detector:fS,loader:pS},mS=dS,Qd="flowchart-v2",gS=(t,e)=>{var r,i,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*flowchart/)!==null},xS=async()=>{let{diagram:t}=await import("./flowDiagram-v2-476db779-MJ7V6SUX.js");return{id:Qd,diagram:t}},yS={id:Qd,detector:gS,loader:xS},_S=yS,Jd="er",bS=t=>t.match(/^\s*erDiagram/)!==null,CS=async()=>{let{diagram:t}=await import("./erDiagram-f6946109-Y5XG64G2.js");return{id:Jd,diagram:t}},TS={id:Jd,detector:bS,loader:CS},vS=TS,tm="gitGraph",SS=t=>t.match(/^\s*gitGraph/)!==null,kS=async()=>{let{diagram:t}=await import("./gitGraphDiagram-1e960c50-KZ6MJQEY.js");return{id:tm,diagram:t}},wS={id:tm,detector:SS,loader:kS},BS=wS,em="gantt",FS=t=>t.match(/^\s*gantt/)!==null,MS=async()=>{let{diagram:t}=await import("./ganttDiagram-7ce12d6b-V34GPBT6.js");return{id:em,diagram:t}},AS={id:em,detector:FS,loader:MS},LS=AS,rm="info",ES=t=>t.match(/^\s*info/)!==null,OS=async()=>{let{diagram:t}=await import("./infoDiagram-264bed3e-R6QAATB5.js");return{id:rm,diagram:t}},IS={id:rm,detector:ES,loader:OS},DS=IS,im="pie",NS=t=>t.match(/^\s*pie/)!==null,RS=async()=>{let{diagram:t}=await import("./pieDiagram-157505fe-V6JD4T7X.js");return{id:im,diagram:t}},$S={id:im,detector:NS,loader:RS},zS=$S,nm="quadrantChart",PS=t=>t.match(/^\s*quadrantChart/)!==null,qS=async()=>{let{diagram:t}=await import("./quadrantDiagram-fd70f2d0-MWMOTS3C.js");return{id:nm,diagram:t}},WS={id:nm,detector:PS,loader:qS},US=WS,om="requirement",HS=t=>t.match(/^\s*requirement(Diagram)?/)!==null,YS=async()=>{let{diagram:t}=await import("./requirementDiagram-19c99588-V42TWALT.js");return{id:om,diagram:t}},jS={id:om,detector:HS,loader:YS},VS=jS,am="sequence",GS=t=>t.match(/^\s*sequenceDiagram/)!==null,XS=async()=>{let{diagram:t}=await import("./sequenceDiagram-5dfd0049-KWO2N2CO.js");return{id:am,diagram:t}},ZS={id:am,detector:GS,loader:XS},KS=ZS,sm="class",QS=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},JS=async()=>{let{diagram:t}=await import("./classDiagram-bc733c3b-BGXEVLTQ.js");return{id:sm,diagram:t}},tk={id:sm,detector:QS,loader:JS},ek=tk,lm="classDiagram",rk=(t,e)=>{var r;return t.match(/^\s*classDiagram/)!==null&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},ik=async()=>{let{diagram:t}=await import("./classDiagram-v2-8931bdaf-3NPM3BUH.js");return{id:lm,diagram:t}},nk={id:lm,detector:rk,loader:ik},ok=nk,cm="state",ak=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},sk=async()=>{let{diagram:t}=await import("./stateDiagram-133e3642-OCKHV567.js");return{id:cm,diagram:t}},lk={id:cm,detector:ak,loader:sk},ck=lk,um="stateDiagram",uk=(t,e)=>{var r,i;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||t.match(/^\s*stateDiagram/)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},hk=async()=>{let{diagram:t}=await import("./stateDiagram-v2-6371a76b-JX3O2JSW.js");return{id:um,diagram:t}},fk={id:um,detector:uk,loader:hk},pk=fk,hm="journey",dk=t=>t.match(/^\s*journey/)!==null,mk=async()=>{let{diagram:t}=await import("./journeyDiagram-31be0096-HDM7DZM7.js");return{id:hm,diagram:t}},gk={id:hm,detector:dk,loader:mk},xk=gk,yk=()=>"",_k=yk,bk=function(){},Ck=(t,e,r)=>{try{D.debug(`Renering svg for syntax error
`);let i=Vt("#"+e),n=i.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){D.error("Error while rendering info diagram"),D.error(aS(i))}},fm={setConf:bk,draw:Ck},Tk={db:{clear:()=>{}},styles:_k,renderer:fm,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},vk=Tk,pm="flowchart-elk",Sk=(t,e)=>{var r;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},kk=async()=>{let{diagram:t}=await import("./flowchart-elk-definition-5082a990-7Y6HDQKQ.js");return{id:pm,diagram:t}},wk={id:pm,detector:Sk,loader:kk},Bk=wk,dm="timeline",Fk=t=>t.match(/^\s*timeline/)!==null,Mk=async()=>{let{diagram:t}=await import("./timeline-definition-5ed366f4-SXE5KBKU.js");return{id:dm,diagram:t}},Ak={id:dm,detector:Fk,loader:Mk},Lk=Ak,mm="mindmap",Ek=t=>t.match(/^\s*mindmap/)!==null,Ok=async()=>{let{diagram:t}=await import("./mindmap-definition-4fc2557c-XRKVNVVT.js");return{id:mm,diagram:t}},Ik={id:mm,detector:Ek,loader:Ok},Dk=Ik,sd=!1,Bl=()=>{sd||(sd=!0,Yo("error",vk,t=>t.toLowerCase().trim()==="error"),Yo("---",{db:{clear:()=>{}},styles:{},renderer:{},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),jd(hS,ok,ek,vS,LS,DS,zS,VS,KS,Bk,_S,mS,Dk,Lk,BS,pk,ck,xk,US))},Nk=t=>t.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm,""),Xo=class{constructor(e){var r,i;this.text=e,this.type="graph",this.text+=`
`;let n=Le();try{this.type=ia(e,n)}catch(s){this.type="error",this.detectError=s}let o=Sl(this.type);D.debug("Type "+this.type),this.db=o.db,(i=(r=this.db).clear)==null||i.call(r),this.renderer=o.renderer,this.parser=o.parser;let a=this.parser.parse.bind(this.parser);this.parser.parse=s=>a(Nk(hv(s,this.db))),this.parser.parser.yy=this.db,o.init&&(o.init(n),D.info("Initialized diagram "+this.type,n)),this.parse()}parse(){var e,r;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},Fl=async t=>{let e=ia(t,Le());try{Sl(e)}catch(r){let i=Nv(e);if(!i)throw new jo(`Diagram ${e} not found.`);let{id:n,diagram:o}=await i();Yo(n,o)}return new Xo(t)},ml=[],QN=t=>{ml.push(t)},Rk=()=>{ml.forEach(t=>{t()}),ml=[]},$k="graphics-document document";function zk(t,e){t.attr("role",$k),Gi(e)||t.attr("aria-roledescription",e)}function Pk(t,e,r,i){if(t.insert!==void 0)if(e||r){if(r){let n="chart-desc-"+i;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){let n="chart-title-"+i;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}else return}var gm=["graph","flowchart","flowchart-v2","flowchart-elk","stateDiagram","stateDiagram-v2"],qk=5e4,Wk="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Uk="sandbox",Hk="loose",Yk="http://www.w3.org/2000/svg",jk="http://www.w3.org/1999/xlink",Vk="http://www.w3.org/1999/xhtml",Gk="100%",Xk="100%",Zk="border:0;margin:0;",Kk="margin:0",Qk="allow-top-navigation-by-user-activation allow-popups",Jk='The "iframe" tag is not supported by your browser.',tw=["foreignobject"],ew=["dominant-baseline"];async function rw(t,e){Bl();try{(await Fl(t)).parse()}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}var iw=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),e},nw=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},ld=(t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,ow=(t,e,r={})=>{var i;let n="";if(t.themeCSS!==void 0&&(n+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(n+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!Gi(r)&&gm.includes(e)){let l=t.htmlLabels||((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(let c in r){let u=r[c];Gi(u.styles)||l.forEach(h=>{n+=ld(u.id,h,u.styles)}),Gi(u.textStyles)||(n+=ld(u.id,"tspan",u.textStyles))}}return n},aw=(t,e,r,i)=>{let n=ow(t,e,r),o=vv(e,n,t.themeVariables);return Do(Gp(`${i}{${o}}`),Xp)},sw=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=nw(i),i=i.replace(/<br>/g,"<br/>"),i},lw=(t="",e)=>{let r=e?e.viewBox.baseVal.height+"px":Xk,i=btoa('<body style="'+Kk+'">'+t+"</body>");return`<iframe style="width:${Gk};height:${r};${Zk}" src="data:text/html;base64,${i}" sandbox="${Qk}">
${Jk}
</iframe>`},cd=(t,e,r,i,n)=>{let o=t.append("div");o.attr("id",r),i&&o.attr("style",i);let a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Yk);return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function ud(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}var cw=(t,e,r,i)=>{var n,o,a;(n=t.getElementById(e))==null||n.remove(),(o=t.getElementById(r))==null||o.remove(),(a=t.getElementById(i))==null||a.remove()},uw=async function(t,e,r){var $;var i,n,o,a;Bl(),Uo();let s=zo.detectInit(e);s&&(hi(s),Id(s));let l=Le();D.debug(l),e.length>(($=l==null?void 0:l.maxTextSize)!=null?$:qk)&&(e=Wk),e=e.replace(/\r\n?/g,`
`),e=e.replace(/<(\w+)([^>]*)>/g,(W,G,K)=>"<"+G+K.replace(/="([^"]*)"/g,"='$1'")+">");let c="#"+t,u="i"+t,h="#"+u,f="d"+t,p="#"+f,x=Vt("body"),b=l.securityLevel===Uk,w=l.securityLevel===Hk,A=l.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),b){let W=ud(Vt(r),u);x=Vt(W.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=Vt(r);cd(x,t,f,`font-family: ${A}`,jk)}else{if(cw(document,t,f,u),b){let W=ud(Vt("body"),u);x=Vt(W.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=Vt("body");cd(x,t,f)}e=iw(e);let _,F;try{_=await Fl(e)}catch(W){_=new Xo("error"),F=W}let N=x.select(p).node(),O=_.type,B=N.firstChild,y=B.firstChild,q=gm.includes(O)?_.renderer.getClasses(e,_):{},rt=aw(l,O,q,c),et=document.createElement("style");et.innerHTML=rt,B.insertBefore(et,y);try{await _.renderer.draw(e,t,ad,_)}catch(W){throw fm.draw(e,t,ad),W}let C=x.select(`${p} svg`),T=(n=(i=_.db).getAccTitle)==null?void 0:n.call(i),g=(a=(o=_.db).getAccDescription)==null?void 0:a.call(o);fw(O,C,T,g),x.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Vk);let v=x.select(p).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",l.arrowMarkerAbsolute),v=sw(v,b,md(l.arrowMarkerAbsolute)),b){let W=x.select(p+" svg").node();v=lw(v,W)}else w||(v=Qi.default.sanitize(v,{ADD_TAGS:tw,ADD_ATTR:ew}));if(Rk(),F)throw F;let z=Vt(b?h:p).node();return z&&"remove"in z&&z.remove(),{svg:v,bindFunctions:_.db.bindFunctions}};function hw(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),pv(t),t!=null&&t.theme&&t.theme in Ae?t.themeVariables=Ae[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ae.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?fv(t):Ed();gl(r.logLevel),Bl()}function fw(t,e,r,i){zk(e,t),Pk(e,r,i,e.attr("id"))}var vr=Object.freeze({render:uw,parse:rw,parseDirective:Hd,getDiagramFromText:Fl,initialize:hw,getConfig:Le,setConfig:mv,getSiteConfig:Ed,updateSiteConfig:dv,reset:()=>{Uo()},globalReset:()=>{Uo(en)},defaultConfig:en});gl(Le().logLevel);Uo(Le());var pw=(t,e,r)=>{D.warn(t),Xd(t)?(r&&r(t.str,t.hash),e.push(tc(Jl({},t),{message:t.str,error:t}))):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},xm=async function(t={querySelector:".mermaid"}){try{await dw(t)}catch(e){if(Xd(e)&&D.error(e.str),de.parseError&&de.parseError(e),!t.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),e}},dw=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i=vr.getConfig();D.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else if(e)n=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");D.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(D.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),vr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));let o=new zo.initIdGenerator(i.deterministicIds,i.deterministicIDSeed),a,s=[];for(let l of Array.from(n)){D.info("Rendering diagram: "+l.id);if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let c=`mermaid-${o.next()}`;a=l.innerHTML,a=ec(zo.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");let u=zo.detectInit(a);u&&D.debug("Detected early reinit: ",u);try{let{svg:h,bindFunctions:f}=await Cm(c,a,l);l.innerHTML=h,t&&await t(c),f&&f(l)}catch(h){pw(h,s,de.parseError)}}if(s.length>0)throw s[0]},ym=function(t){vr.initialize(t)},mw=async function(t,e,r){D.warn("mermaid.init is deprecated. Please use run instead."),t&&ym(t);let i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await xm(i)},gw=async(t,{lazyLoad:e=!0}={})=>{jd(...t),e===!1&&await Dv()},_m=function(){if(de.startOnLoad){let{startOnLoad:t}=vr.getConfig();t&&de.run().catch(e=>D.error("Mermaid failed to initialize",e))}};if(typeof document!="undefined"){window.addEventListener("load",_m,!1)}var xw=function(t){de.parseError=t},Zo=[],hl=!1,bm=async()=>{if(!hl){for(hl=!0;Zo.length>0;){let t=Zo.shift();if(t)try{await t()}catch(e){D.error("Error executing queue",e)}}hl=!1}},yw=async(t,e)=>new Promise((r,i)=>{let n=()=>new Promise((o,a)=>{vr.parse(t,e).then(s=>{o(s),r(s)},s=>{var l;D.error("Error parsing",s),(l=de.parseError)==null||l.call(de,s),a(s),i(s)})});Zo.push(n),bm().catch(i)}),Cm=(t,e,r)=>new Promise((i,n)=>{let o=()=>new Promise((a,s)=>{vr.render(t,e,r).then(l=>{a(l),i(l)},l=>{var c;D.error("Error parsing",l),(c=de.parseError)==null||c.call(de,l),s(l),n(l)})});Zo.push(o),bm().catch(n)}),de={startOnLoad:!0,mermaidAPI:vr,parse:yw,render:Cm,init:mw,run:xm,registerExternalDiagrams:gw,initialize:ym,parseError:void 0,contentLoaded:_m,setParseErrorHandler:xw,detectType:ia};export{ec as a,rc as b,ic as c,nc as d,oc as e,pg as f,dg as g,Vt as h,h0 as i,k0 as j,m_ as k,Xa as l,ls as m,zr as n,Pr as o,Ce as p,Te as q,Ur as r,Rn as s,Ch as t,yy as u,Oi as v,_y as w,by as x,Ts as y,Bf as z,qe as A,A_ as B,gr as C,P as D,j as E,It as F,Kr as G,ke as H,po as I,mo as J,Xt as K,Qf as L,ip as M,ti as N,tl as O,xo as P,yo as Q,up as R,fp as S,Co as T,yp as U,ri as V,bp as W,Cp as X,vo as Y,Tp as Z,Bp as _,Mp as $,nl as aa,Ep as ba,Gi as ca,D as da,Ji as ea,md as fa,uC as ga,xl as ha,gC as ia,CC as ja,Dt as ka,en as la,mv as ma,Le as na,_v as oa,bv as pa,Rd as qa,$d as ra,zd as sa,Pd as ta,qd as ua,Wd as va,Ud as wa,kv as xa,Hd as ya,Yd as za,Av as Aa,Rv as Ba,Wv as Ca,Xv as Da,Zv as Ea,Qv as Fa,eS as Ga,iS as Ha,Go as Ia,wl as Ja,zo as Ka,QN as La,nw as Ma,vr as Na,de as Oa};
/*! Bundled license information:
dompurify/dist/purify.js:
(*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/LICENSE *)
mermaid/dist/mermaid-b0ad2de1.js:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
(*! Check if previously processed *)
(*!
* Wait for document loaded before starting the execution
*)
*/