import{a as ee,b as re,f as Wa,h as Ua}from"./chunk-3NXJ7VWC.js";var wc=Wa((Ha,Ya)=>{(function(t,e){typeof Ha=="object"&&typeof Ya!="undefined"?Ya.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs=e()})(Ha,function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",n="minute",a="hour",s="day",l="week",c="month",h="quarter",f="year",u="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+)?$/,_=/\[([^\]]+)]|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,T={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(b){var C=["th","st","nd","rd"],g=b%100;return"["+b+(C[(g-20)%10]||C[g]||C[0])+"]"}},S=function(b,C,g){var w=String(b);return!w||w.length>=C?b:""+Array(C+1-w.length).join(g)+b},v={s:S,z:function(b){var C=-b.utcOffset(),g=Math.abs(C),w=Math.floor(g/60),F=g%60;return(C<=0?"+":"-")+S(w,2,"0")+":"+S(F,2,"0")},m:function b(C,g){if(C.date()1)return b(R[0])}else{var j=C.name;E[j]=C,F=j}return!w&&F&&(M=F),F||!w&&M},y=function(b,C){if(I(b))return b.clone();var g=typeof C=="object"?C:{};return g.date=b,g.args=arguments,new et(g)},$=v;$.l=B,$.i=I,$.w=function(b,C){return y(b,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var et=function(){function b(g){this.$L=B(g.locale,null,!0),this.parse(g)}var C=b.prototype;return C.parse=function(g){this.$d=function(w){var F=w.date,D=w.utc;if(F===null)return new Date(NaN);if($.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var R=F.match(x);if(R){var j=R[2]-1||0,X=(R[7]||"0").substring(0,3);return D?new Date(Date.UTC(R[1],j,R[3]||1,R[4]||0,R[5]||0,R[6]||0,X)):new Date(R[1],j,R[3]||1,R[4]||0,R[5]||0,R[6]||0,X)}}return new Date(F)}(g),this.$x=g.x||{},this.init()},C.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()},C.$utils=function(){return $},C.isValid=function(){return this.$d.toString()!==p},C.isSame=function(g,w){var F=y(g);return this.startOf(w)<=F&&F<=this.endOf(w)},C.isAfter=function(g,w){return y(g){"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.sanitizeUrl=void 0;var Jg=/^([^\w]*)(javascript|data|vbscript)/im,t0=/&#(\w+)(^\w|;)?/g,e0=/&(newline|tab);/gi,r0=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,i0=/^.+(:|:)/gim,o0=[".","/"];function n0(t){return o0.indexOf(t[0])>-1}function a0(t){return t.replace(t0,function(e,r){return String.fromCharCode(r)})}function s0(t){var e=a0(t||"").replace(e0,"").replace(r0,"").trim();if(!e)return"about:blank";if(n0(e))return e;var r=e.match(i0);if(!r)return e;var i=r[0];return Jg.test(i)?"about:blank":e}Lo.sanitizeUrl=s0});var Jf=Wa((pl,dl)=>{(function(t,e){typeof pl=="object"&&typeof dl!="undefined"?dl.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self,t.DOMPurify=e())})(pl,function(){"use strict";let{entries:t,setPrototypeOf:e,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object,{freeze:n,seal:a,create:s}=Object,{apply:l,construct:c}=typeof Reflect!="undefined"&&Reflect;n||(n=function(N){return N}),a||(a=function(N){return N}),l||(l=function(N,Q,J){return N.apply(Q,J)}),c||(c=function(N,Q){return new N(...Q)});let h=I(Array.prototype.forEach),f=I(Array.prototype.pop),u=I(Array.prototype.push),p=I(String.prototype.toLowerCase),x=I(String.prototype.toString),_=I(String.prototype.match),T=I(String.prototype.replace),S=I(String.prototype.indexOf),v=I(String.prototype.trim),M=I(RegExp.prototype.test),E=B(TypeError);function I(K){return function(N){for(var Q=arguments.length,J=new Array(Q>1?Q-1:0),Pt=1;Pt2&&arguments[2]!==void 0?arguments[2]:p;e&&e(K,null);let J=N.length;for(;J--;){let Pt=N[J];if(typeof Pt=="string"){let _e=Q(Pt);_e!==Pt&&(r(N)||(N[J]=_e),Pt=_e)}K[Pt]=!0}return K}function $(K){let N=s(null);for(let[Q,J]of t(K))o(K,Q)!==void 0&&(N[Q]=J);return N}function et(K,N){for(;K!==null;){let J=o(K,N);if(J){if(J.get)return I(J.get);if(typeof J.value=="function")return I(J.value)}K=i(K)}function Q(J){return console.warn("fallback value for",J),null}return Q}let rt=n(["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"]),b=n(["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"]),C=n(["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=n(["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"]),w=n(["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"]),F=n(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=n(["#text"]),R=n(["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"]),j=n(["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"]),X=n(["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"]),V=n(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),at=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kt=a(/<%[\w\W]*|[\w\W]*%>/gm),St=a(/\${[\w\W]*}/gm),Xt=a(/^data-[\-\w.\u00B7-\uFFFF]/),mt=a(/^aria-[\-\w]+$/),Nt=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ut=a(/^(?:\w+script|data):/i),Lt=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),O=a(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:at,ERB_EXPR:kt,TMPLIT_EXPR:St,DATA_ATTR:Xt,ARIA_ATTR:mt,IS_ALLOWED_URI:Nt,IS_SCRIPT_OR_DATA:ut,ATTR_WHITESPACE:Lt,DOCTYPE_NAME:O});let Z=function(){return typeof window=="undefined"?null:window},k=function(N,Q){if(typeof N!="object"||typeof N.createPolicy!="function")return null;let J=null,Pt="data-tt-policy-suffix";Q&&Q.hasAttribute(Pt)&&(J=Q.getAttribute(Pt));let _e="dompurify"+(J?"#"+J:"");try{return N.createPolicy(_e,{createHTML(Pr){return Pr},createScriptURL(Pr){return Pr}})}catch(Pr){return console.warn("TrustedTypes policy "+_e+" could not be created."),null}};function wt(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z(),N=W=>wt(W);if(N.version="3.0.6",N.removed=[],!K||!K.document||K.document.nodeType!==9)return N.isSupported=!1,N;let{document:Q}=K,J=Q,Pt=J.currentScript,{DocumentFragment:_e,HTMLTemplateElement:Pr,Node:ka,Element:Jl,NodeFilter:Sa,NamedNodeMap:Lg=K.NamedNodeMap||K.MozNamedAttrMap,HTMLFormElement:Eg,DOMParser:Og,trustedTypes:ko}=K,So=Jl.prototype,Ig=et(So,"cloneNode"),Dg=et(So,"nextSibling"),Ng=et(So,"childNodes"),wa=et(So,"parentNode");if(typeof Pr=="function"){let W=Q.createElement("template");W.content&&W.content.ownerDocument&&(Q=W.content.ownerDocument)}let Rt,Fi="",{implementation:Aa,createNodeIterator:Pg,createDocumentFragment:Rg,getElementsByTagName:$g}=Q,{importNode:zg}=J,ce={};N.isSupported=typeof t=="function"&&typeof wa=="function"&&Aa&&Aa.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ba,ERB_EXPR:Fa,TMPLIT_EXPR:Ma,DATA_ATTR:qg,ARIA_ATTR:Wg,IS_SCRIPT_OR_DATA:Ug,ATTR_WHITESPACE:tc}=G,{IS_ALLOWED_URI:ec}=G,_t=null,rc=y({},[...rt,...b,...C,...w,...D]),Ct=null,ic=y({},[...R,...j,...X,...V]),ht=Object.seal(s(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}})),Mi=null,La=null,oc=!0,Ea=!0,nc=!1,ac=!0,Rr=!1,ir=!1,Oa=!1,Ia=!1,$r=!1,wo=!1,Ao=!1,sc=!0,lc=!1,Hg="user-content-",Da=!0,Li=!1,zr={},qr=null,cc=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"]),uc=null,hc=y({},["audio","video","img","source","image","track"]),Na=null,fc=y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Bo="http://www.w3.org/1998/Math/MathML",Fo="http://www.w3.org/2000/svg",Ce="http://www.w3.org/1999/xhtml",Wr=Ce,Pa=!1,Ra=null,Yg=y({},[Bo,Fo,Ce],x),or=null,jg=["application/xhtml+xml","text/html"],Gg="text/html",bt=null,Ur=null,Vg=Q.createElement("form"),pc=function(d){return d instanceof RegExp||d instanceof Function},$a=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ur&&Ur===d)){if((!d||typeof d!="object")&&(d={}),d=$(d),or=jg.indexOf(d.PARSER_MEDIA_TYPE)===-1?or=Gg:or=d.PARSER_MEDIA_TYPE,bt=or==="application/xhtml+xml"?x:p,_t="ALLOWED_TAGS"in d?y({},d.ALLOWED_TAGS,bt):rc,Ct="ALLOWED_ATTR"in d?y({},d.ALLOWED_ATTR,bt):ic,Ra="ALLOWED_NAMESPACES"in d?y({},d.ALLOWED_NAMESPACES,x):Yg,Na="ADD_URI_SAFE_ATTR"in d?y($(fc),d.ADD_URI_SAFE_ATTR,bt):fc,uc="ADD_DATA_URI_TAGS"in d?y($(hc),d.ADD_DATA_URI_TAGS,bt):hc,qr="FORBID_CONTENTS"in d?y({},d.FORBID_CONTENTS,bt):cc,Mi="FORBID_TAGS"in d?y({},d.FORBID_TAGS,bt):{},La="FORBID_ATTR"in d?y({},d.FORBID_ATTR,bt):{},zr="USE_PROFILES"in d?d.USE_PROFILES:!1,oc=d.ALLOW_ARIA_ATTR!==!1,Ea=d.ALLOW_DATA_ATTR!==!1,nc=d.ALLOW_UNKNOWN_PROTOCOLS||!1,ac=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Rr=d.SAFE_FOR_TEMPLATES||!1,ir=d.WHOLE_DOCUMENT||!1,$r=d.RETURN_DOM||!1,wo=d.RETURN_DOM_FRAGMENT||!1,Ao=d.RETURN_TRUSTED_TYPE||!1,Ia=d.FORCE_BODY||!1,sc=d.SANITIZE_DOM!==!1,lc=d.SANITIZE_NAMED_PROPS||!1,Da=d.KEEP_CONTENT!==!1,Li=d.IN_PLACE||!1,ec=d.ALLOWED_URI_REGEXP||Nt,Wr=d.NAMESPACE||Ce,ht=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&pc(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ht.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&pc(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ht.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ht.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Rr&&(Ea=!1),wo&&($r=!0),zr&&(_t=y({},[...D]),Ct=[],zr.html===!0&&(y(_t,rt),y(Ct,R)),zr.svg===!0&&(y(_t,b),y(Ct,j),y(Ct,V)),zr.svgFilters===!0&&(y(_t,C),y(Ct,j),y(Ct,V)),zr.mathMl===!0&&(y(_t,w),y(Ct,X),y(Ct,V))),d.ADD_TAGS&&(_t===rc&&(_t=$(_t)),y(_t,d.ADD_TAGS,bt)),d.ADD_ATTR&&(Ct===ic&&(Ct=$(Ct)),y(Ct,d.ADD_ATTR,bt)),d.ADD_URI_SAFE_ATTR&&y(Na,d.ADD_URI_SAFE_ATTR,bt),d.FORBID_CONTENTS&&(qr===cc&&(qr=$(qr)),y(qr,d.FORBID_CONTENTS,bt)),Da&&(_t["#text"]=!0),ir&&y(_t,["html","head","body"]),_t.table&&(y(_t,["tbody"]),delete Mi.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Rt=d.TRUSTED_TYPES_POLICY,Fi=Rt.createHTML("")}else Rt===void 0&&(Rt=k(ko,Pt)),Rt!==null&&typeof Fi=="string"&&(Fi=Rt.createHTML(""));n&&n(d),Ur=d}},dc=y({},["mi","mo","mn","ms","mtext"]),mc=y({},["foreignobject","desc","title","annotation-xml"]),Xg=y({},["title","style","font","a","script"]),Mo=y({},b);y(Mo,C),y(Mo,g);let za=y({},w);y(za,F);let Kg=function(d){let A=wa(d);(!A||!A.tagName)&&(A={namespaceURI:Wr,tagName:"template"});let P=p(d.tagName),nt=p(A.tagName);return Ra[d.namespaceURI]?d.namespaceURI===Fo?A.namespaceURI===Ce?P==="svg":A.namespaceURI===Bo?P==="svg"&&(nt==="annotation-xml"||dc[nt]):!!Mo[P]:d.namespaceURI===Bo?A.namespaceURI===Ce?P==="math":A.namespaceURI===Fo?P==="math"&&mc[nt]:!!za[P]:d.namespaceURI===Ce?A.namespaceURI===Fo&&!mc[nt]||A.namespaceURI===Bo&&!dc[nt]?!1:!za[P]&&(Xg[P]||!Mo[P]):!!(or==="application/xhtml+xml"&&Ra[d.namespaceURI]):!1},nr=function(d){u(N.removed,{element:d});try{d.parentNode.removeChild(d)}catch(A){d.remove()}},qa=function(d,A){try{u(N.removed,{attribute:A.getAttributeNode(d),from:A})}catch(P){u(N.removed,{attribute:null,from:A})}if(A.removeAttribute(d),d==="is"&&!Ct[d])if($r||wo)try{nr(A)}catch(P){}else try{A.setAttribute(d,"")}catch(P){}},gc=function(d){let A=null,P=null;if(Ia)d=""+d;else{let Ot=_(d,/^[\r\n\t ]+/);P=Ot&&Ot[0]}or==="application/xhtml+xml"&&Wr===Ce&&(d=''+d+"");let nt=Rt?Rt.createHTML(d):d;if(Wr===Ce)try{A=new Og().parseFromString(nt,or)}catch(Ot){}if(!A||!A.documentElement){A=Aa.createDocument(Wr,"template",null);try{A.documentElement.innerHTML=Pa?Fi:nt}catch(Ot){}}let Et=A.body||A.documentElement;return d&&P&&Et.insertBefore(Q.createTextNode(P),Et.childNodes[0]||null),Wr===Ce?$g.call(A,ir?"html":"body")[0]:ir?A.documentElement:Et},xc=function(d){return Pg.call(d.ownerDocument||d,d,Sa.SHOW_ELEMENT|Sa.SHOW_COMMENT|Sa.SHOW_TEXT,null)},Zg=function(d){return d instanceof Eg&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof Lg)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},yc=function(d){return typeof ka=="function"&&d instanceof ka},be=function(d,A,P){ce[d]&&h(ce[d],nt=>{nt.call(N,A,P,Ur)})},_c=function(d){let A=null;if(be("beforeSanitizeElements",d,null),Zg(d))return nr(d),!0;let P=bt(d.nodeName);if(be("uponSanitizeElement",d,{tagName:P,allowedTags:_t}),d.hasChildNodes()&&!yc(d.firstElementChild)&&M(/<[/\w]/g,d.innerHTML)&&M(/<[/\w]/g,d.textContent))return nr(d),!0;if(!_t[P]||Mi[P]){if(!Mi[P]&&bc(P)&&(ht.tagNameCheck instanceof RegExp&&M(ht.tagNameCheck,P)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(P)))return!1;if(Da&&!qr[P]){let nt=wa(d)||d.parentNode,Et=Ng(d)||d.childNodes;if(Et&&nt){let Ot=Et.length;for(let Wt=Ot-1;Wt>=0;--Wt)nt.insertBefore(Ig(Et[Wt],!0),Dg(d))}}return nr(d),!0}return d instanceof Jl&&!Kg(d)||(P==="noscript"||P==="noembed"||P==="noframes")&&M(/<\/no(script|embed|frames)/i,d.innerHTML)?(nr(d),!0):(Rr&&d.nodeType===3&&(A=d.textContent,h([Ba,Fa,Ma],nt=>{A=T(A,nt," ")}),d.textContent!==A&&(u(N.removed,{element:d.cloneNode()}),d.textContent=A)),be("afterSanitizeElements",d,null),!1)},Cc=function(d,A,P){if(sc&&(A==="id"||A==="name")&&(P in Q||P in Vg))return!1;if(!(Ea&&!La[A]&&M(qg,A))){if(!(oc&&M(Wg,A))){if(!Ct[A]||La[A]){if(!(bc(d)&&(ht.tagNameCheck instanceof RegExp&&M(ht.tagNameCheck,d)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(d))&&(ht.attributeNameCheck instanceof RegExp&&M(ht.attributeNameCheck,A)||ht.attributeNameCheck instanceof Function&&ht.attributeNameCheck(A))||A==="is"&&ht.allowCustomizedBuiltInElements&&(ht.tagNameCheck instanceof RegExp&&M(ht.tagNameCheck,P)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(P))))return!1}else if(!Na[A]){if(!M(ec,T(P,tc,""))){if(!((A==="src"||A==="xlink:href"||A==="href")&&d!=="script"&&S(P,"data:")===0&&uc[d])){if(!(nc&&!M(Ug,T(P,tc,"")))){if(P)return!1}}}}}}return!0},bc=function(d){return d.indexOf("-")>0},Tc=function(d){be("beforeSanitizeAttributes",d,null);let{attributes:A}=d;if(!A)return;let P={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ct},nt=A.length;for(;nt--;){let Et=A[nt],{name:Ot,namespaceURI:Wt,value:ar}=Et,Ei=bt(Ot),Ut=Ot==="value"?ar:v(ar);if(P.attrName=Ei,P.attrValue=Ut,P.keepAttr=!0,P.forceKeepAttr=void 0,be("uponSanitizeAttribute",d,P),Ut=P.attrValue,P.forceKeepAttr||(qa(Ot,d),!P.keepAttr))continue;if(!ac&&M(/\/>/i,Ut)){qa(Ot,d);continue}Rr&&h([Ba,Fa,Ma],kc=>{Ut=T(Ut,kc," ")});let vc=bt(d.nodeName);if(Cc(vc,Ei,Ut)){if(lc&&(Ei==="id"||Ei==="name")&&(qa(Ot,d),Ut=Hg+Ut),Rt&&typeof ko=="object"&&typeof ko.getAttributeType=="function"&&!Wt)switch(ko.getAttributeType(vc,Ei)){case"TrustedHTML":{Ut=Rt.createHTML(Ut);break}case"TrustedScriptURL":{Ut=Rt.createScriptURL(Ut);break}}try{Wt?d.setAttributeNS(Wt,Ot,Ut):d.setAttribute(Ot,Ut),f(N.removed)}catch(kc){}}}be("afterSanitizeAttributes",d,null)},Qg=function W(d){let A=null,P=xc(d);for(be("beforeSanitizeShadowDOM",d,null);A=P.nextNode();)be("uponSanitizeShadowNode",A,null),!_c(A)&&(A.content instanceof _e&&W(A.content),Tc(A));be("afterSanitizeShadowDOM",d,null)};return N.sanitize=function(W){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=null,P=null,nt=null,Et=null;if(Pa=!W,Pa&&(W=""),typeof W!="string"&&!yc(W))if(typeof W.toString=="function"){if(W=W.toString(),typeof W!="string")throw E("dirty is not a string, aborting")}else throw E("toString is not a function");if(!N.isSupported)return W;if(Oa||$a(d),N.removed=[],typeof W=="string"&&(Li=!1),Li){if(W.nodeName){let ar=bt(W.nodeName);if(!_t[ar]||Mi[ar])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(W instanceof ka)A=gc(""),P=A.ownerDocument.importNode(W,!0),P.nodeType===1&&P.nodeName==="BODY"||P.nodeName==="HTML"?A=P:A.appendChild(P);else{if(!$r&&!Rr&&!ir&&W.indexOf("<")===-1)return Rt&&Ao?Rt.createHTML(W):W;if(A=gc(W),!A)return $r?null:Ao?Fi:""}A&&Ia&&nr(A.firstChild);let Ot=xc(Li?W:A);for(;nt=Ot.nextNode();)_c(nt)||(nt.content instanceof _e&&Qg(nt.content),Tc(nt));if(Li)return W;if($r){if(wo)for(Et=Rg.call(A.ownerDocument);A.firstChild;)Et.appendChild(A.firstChild);else Et=A;return(Ct.shadowroot||Ct.shadowrootmode)&&(Et=zg.call(J,Et,!0)),Et}let Wt=ir?A.outerHTML:A.innerHTML;return ir&&_t["!doctype"]&&A.ownerDocument&&A.ownerDocument.doctype&&A.ownerDocument.doctype.name&&M(O,A.ownerDocument.doctype.name)&&(Wt=" `+Wt),Rr&&h([Ba,Fa,Ma],ar=>{Wt=T(Wt,ar," ")}),Rt&&Ao?Rt.createHTML(Wt):Wt},N.setConfig=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$a(W),Oa=!0},N.clearConfig=function(){Ur=null,Oa=!1},N.isValidAttribute=function(W,d,A){Ur||$a({});let P=bt(W),nt=bt(d);return Cc(P,nt,A)},N.addHook=function(W,d){typeof d=="function"&&(ce[W]=ce[W]||[],u(ce[W],d))},N.removeHook=function(W){if(ce[W])return f(ce[W])},N.removeHooks=function(W){ce[W]&&(ce[W]=[])},N.removeAllHooks=function(){ce={}},N}var it=wt();return it})});function Sc(t){for(var e=[],r=1;r=i)&&(r=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(r=o)&&(r=o)}return r}function Fc(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 o of t)(o=e(o,++i,t))!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}return r}function sr(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function ja(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function lr(t){let e,r,i;t.length!==2?(e=sr,r=(s,l)=>sr(t(s),l),i=(s,l)=>t(s)-l):(e=t===sr||t===ja?t:l0,r=t,i=t);function o(s,l,c=0,h=s.length){if(c>>1;r(s[f],l)<0?c=f+1:h=f}while(c>>1;r(s[f],l)<=0?c=f+1:h=f}while(cc&&i(s[f-1],l)>-i(s[f],l)?f-1:f}return{left:o,center:a,right:n}}function l0(){return 0}function Ga(t){return t===null?NaN:+t}var Mc=lr(sr),Lc=Mc.right,c0=Mc.left,u0=lr(Ga).center,Va=Lc;var Hr=class extends Map{constructor(e,r=p0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[i,o]of e)this.set(i,o)}get(e){return super.get(Ec(this,e))}has(e){return super.has(Ec(this,e))}set(e,r){return super.set(h0(this,e),r)}delete(e){return super.delete(f0(this,e))}};function Ec({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}function h0({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function f0({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function p0(t){return t!==null&&typeof t=="object"?t.valueOf():t}var d0=Math.sqrt(50),m0=Math.sqrt(10),g0=Math.sqrt(2);function Eo(t,e,r){let i=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(i)),n=i/Math.pow(10,o),a=n>=d0?10:n>=m0?5:n>=g0?2:1,s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),l0))return[];if(t===e)return[t];let i=e=o))return[];let s=n-o+1,l=new Array(s);if(i)if(a<0)for(let c=0;c+t(e)}function C0(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function b0(){return!this.__axis}function Dc(t,e){var r=[],i=null,o=null,n=6,a=6,s=3,l=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,c=t===No||t===Do?-1:1,h=t===Do||t===Xa?"x":"y",f=t===No||t===Ka?x0:y0;function u(p){var x=i==null?e.ticks?e.ticks.apply(e,r):e.domain():i,_=o==null?e.tickFormat?e.tickFormat.apply(e,r):Oc:o,T=Math.max(n,0)+s,S=e.range(),v=+S[0]+l,M=+S[S.length-1]+l,E=(e.bandwidth?C0:_0)(e.copy(),l),I=p.selection?p.selection():p,B=I.selectAll(".domain").data([null]),y=I.selectAll(".tick").data(x,e).order(),$=y.exit(),et=y.enter().append("g").attr("class","tick"),rt=y.select("line"),b=y.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),y=y.merge(et),rt=rt.merge(et.append("line").attr("stroke","currentColor").attr(h+"2",c*n)),b=b.merge(et.append("text").attr("fill","currentColor").attr(h,c*T).attr("dy",t===No?"0em":t===Ka?"0.71em":"0.32em")),p!==I&&(B=B.transition(p),y=y.transition(p),rt=rt.transition(p),b=b.transition(p),$=$.transition(p).attr("opacity",Ic).attr("transform",function(C){return isFinite(C=E(C))?f(C+l):this.getAttribute("transform")}),et.attr("opacity",Ic).attr("transform",function(C){var g=this.parentNode.__axis;return f((g&&isFinite(g=g(C))?g:E(C))+l)})),$.remove(),B.attr("d",t===Do||t===Xa?a?"M"+c*a+","+v+"H"+l+"V"+M+"H"+c*a:"M"+l+","+v+"V"+M:a?"M"+v+","+c*a+"V"+l+"H"+M+"V"+c*a:"M"+v+","+l+"H"+M),y.attr("opacity",1).attr("transform",function(C){return f(E(C)+l)}),rt.attr(h+"2",c*n),b.attr(h,c*T).text(_),I.filter(b0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Xa?"start":t===Do?"end":"middle"),I.each(function(){this.__axis=E})}return u.scale=function(p){return arguments.length?(e=p,u):e},u.ticks=function(){return r=Array.from(arguments),u},u.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),u):r.slice()},u.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),u):i&&i.slice()},u.tickFormat=function(p){return arguments.length?(o=p,u):o},u.tickSize=function(p){return arguments.length?(n=a=+p,u):n},u.tickSizeInner=function(p){return arguments.length?(n=+p,u):n},u.tickSizeOuter=function(p){return arguments.length?(a=+p,u):a},u.tickPadding=function(p){return arguments.length?(s=+p,u):s},u.offset=function(p){return arguments.length?(l=+p,u):l},u}function T0(t){return Dc(No,t)}function v0(t){return Dc(Ka,t)}function k0(){}function cr(t){return t==null?k0:function(){return this.querySelector(t)}}function Nc(t){typeof t!="function"&&(t=cr(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o=M&&(M=v+1);!(I=T[M])&&++M=0;)(a=i[o])&&(n&&a.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(a,n),n=a);return this}function Vc(t){t||(t=P0);function e(f,u){return f&&u?t(f.__data__,u.__data__):!f-!u}for(var r=this._groups,i=r.length,o=new Array(i),n=0;ne?1:t>=e?0:NaN}function Xc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Kc(){return Array.from(this)}function Zc(){for(var t=this._groups,e=0,r=t.length;e=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Za.hasOwnProperty(e)?{space:Za[e],local:t}:t}function R0(t){return function(){this.removeAttribute(t)}}function $0(t){return function(){this.removeAttributeNS(t.space,t.local)}}function z0(t,e){return function(){this.setAttribute(t,e)}}function q0(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function W0(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function U0(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 eu(t,e){var r=Te(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?$0:R0:typeof e=="function"?r.local?U0:W0:r.local?q0:z0)(r,e))}function zo(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function H0(t){return function(){this.style.removeProperty(t)}}function Y0(t,e,r){return function(){this.style.setProperty(t,e,r)}}function j0(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function ru(t,e,r){return arguments.length>1?this.each((e==null?H0:typeof e=="function"?j0:Y0)(t,e,r==null?"":r)):Ne(this.node(),t)}function Ne(t,e){return t.style.getPropertyValue(e)||zo(t).getComputedStyle(t,null).getPropertyValue(e)}function G0(t){return function(){delete this[t]}}function V0(t,e){return function(){this[t]=e}}function X0(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function iu(t,e){return arguments.length>1?this.each((e==null?G0:typeof e=="function"?X0:V0)(t,e)):this.node()[t]}function ou(t){return t.trim().split(/^|\s+/)}function Qa(t){return t.classList||new nu(t)}function nu(t){this._node=t,this._names=ou(t.getAttribute("class")||"")}nu.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 au(t,e){for(var r=Qa(t),i=-1,o=e.length;++i=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function mx(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,o=e.length,n;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Wo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Wo(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=Tx.exec(t))?new At(e[1],e[2],e[3],1):(e=vx.exec(t))?new At(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=kx.exec(t))?Wo(e[1],e[2],e[3],e[4]):(e=Sx.exec(t))?Wo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=wx.exec(t))?Fu(e[1],e[2]/100,e[3]/100,1):(e=Ax.exec(t))?Fu(e[1],e[2]/100,e[3]/100,e[4]):vu.hasOwnProperty(t)?wu(vu[t]):t==="transparent"?new At(NaN,NaN,NaN,0):null}function wu(t){return new At(t>>16&255,t>>8&255,t&255,1)}function Wo(t,e,r,i){return i<=0&&(t=e=r=NaN),new At(t,e,r,i)}function ts(t){return t instanceof Pe||(t=oe(t)),t?(t=t.rgb(),new At(t.r,t.g,t.b,t.opacity)):new At}function Vr(t,e,r,i){return arguments.length===1?ts(t):new At(t,e,r,i==null?1:i)}function At(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}ur(At,Vr,jr(Pe,{brighter(t){return t=t==null?Ho:Math.pow(Ho,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?$i:Math.pow($i,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new At(fr(this.r),fr(this.g),fr(this.b),Yo(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:Au,formatHex:Au,formatHex8:Mx,formatRgb:Bu,toString:Bu}));function Au(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}`}function Mx(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}${hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Bu(){let t=Yo(this.opacity);return`${t===1?"rgb(":"rgba("}${fr(this.r)}, ${fr(this.g)}, ${fr(this.b)}${t===1?")":`, ${t})`}`}function Yo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function fr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hr(t){return t=fr(t),(t<16?"0":"")+t.toString(16)}function Fu(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new ie(t,e,r,i)}function Lu(t){if(t instanceof ie)return new ie(t.h,t.s,t.l,t.opacity);if(t instanceof Pe||(t=oe(t)),!t)return new ie;if(t instanceof ie)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),n=Math.max(e,r,i),a=NaN,s=n-o,l=(n+o)/2;return s?(e===n?a=(r-i)/s+(r0&&l<1?0:a,new ie(a,s,l,t.opacity)}function Eu(t,e,r,i){return arguments.length===1?Lu(t):new ie(t,e,r,i==null?1:i)}function ie(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}ur(ie,Eu,jr(Pe,{brighter(t){return t=t==null?Ho:Math.pow(Ho,t),new ie(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?$i:Math.pow($i,t),new ie(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,o=2*r-i;return new At(Ja(t>=240?t-240:t+120,o,i),Ja(t,o,i),Ja(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new ie(Mu(this.h),Uo(this.s),Uo(this.l),Yo(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=Yo(this.opacity);return`${t===1?"hsl(":"hsla("}${Mu(this.h)}, ${Uo(this.s)*100}%, ${Uo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Mu(t){return t=(t||0)%360,t<0?t+360:t}function Uo(t){return Math.max(0,Math.min(1,t||0))}function Ja(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 Ou=Math.PI/180,Iu=180/Math.PI;var jo=18,Du=.96422,Nu=1,Pu=.82521,Ru=4/29,Xr=6/29,$u=3*Xr*Xr,Lx=Xr*Xr*Xr;function zu(t){if(t instanceof he)return new he(t.l,t.a,t.b,t.opacity);if(t instanceof ke)return qu(t);t instanceof At||(t=ts(t));var e=os(t.r),r=os(t.g),i=os(t.b),o=es((.2225045*e+.7168786*r+.0606169*i)/Nu),n,a;return e===r&&r===i?n=a=o:(n=es((.4360747*e+.3850649*r+.1430804*i)/Du),a=es((.0139322*e+.0971045*r+.7141733*i)/Pu)),new he(116*o-16,500*(n-o),200*(o-a),t.opacity)}function ns(t,e,r,i){return arguments.length===1?zu(t):new he(t,e,r,i==null?1:i)}function he(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}ur(he,ns,jr(Pe,{brighter(t){return new he(this.l+jo*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new he(this.l-jo*(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=Du*rs(e),t=Nu*rs(t),r=Pu*rs(r),new At(is(3.1338561*e-1.6168667*t-.4906146*r),is(-.9787684*e+1.9161415*t+.033454*r),is(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function es(t){return t>Lx?Math.pow(t,1/3):t/$u+Ru}function rs(t){return t>Xr?t*t*t:$u*(t-Ru)}function is(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function os(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ex(t){if(t instanceof ke)return new ke(t.h,t.c,t.l,t.opacity);if(t instanceof he||(t=zu(t)),t.a===0&&t.b===0)return new ke(NaN,0()=>t;function Wu(t,e){return function(r){return t+r*e}}function Ox(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 Uu(t,e){var r=e-t;return r?Wu(t,r>180||r<-180?r-360*Math.round(r/360):r):Kr(isNaN(t)?e:t)}function Hu(t){return(t=+t)==1?Se:function(e,r){return r-e?Ox(e,r,t):Kr(isNaN(e)?r:e)}}function Se(t,e){var r=e-t;return r?Wu(t,r):Kr(isNaN(t)?e:t)}function Yu(t){return function(e,r){var i=t((e=qi(e)).h,(r=qi(r)).h),o=Se(e.c,r.c),n=Se(e.l,r.l),a=Se(e.opacity,r.opacity);return function(s){return e.h=i(s),e.c=o(s),e.l=n(s),e.opacity=a(s),e+""}}}var Ix=Yu(Uu),Dx=Yu(Se);function as(t,e,r,i,o){var n=t*t,a=n*t;return((1-3*t+3*n-a)*e+(4-6*n+3*a)*r+(1+3*t+3*n-3*a)*i+a*o)/6}function ju(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),o=t[i],n=t[i+1],a=i>0?t[i-1]:2*o-n,s=ir&&(n=e.slice(r,n),s[a]?s[a]+=n:s[++a]=n),(i=i[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:Bt(i,o)})),r=ss.lastIndex;return r180?h+=360:h-c>180&&(c+=360),u.push({i:f.push(o(f)+"rotate(",null,i)-2,x:Bt(c,h)})):h&&f.push(o(f)+"rotate("+h+i)}function s(c,h,f,u){c!==h?u.push({i:f.push(o(f)+"skewX(",null,i)-2,x:Bt(c,h)}):h&&f.push(o(f)+"skewX("+h+i)}function l(c,h,f,u,p,x){if(c!==f||h!==u){var _=p.push(o(p)+"scale(",null,",",null,")");x.push({i:_-4,x:Bt(c,f)},{i:_-2,x:Bt(h,u)})}else(f!==1||u!==1)&&p.push(o(p)+"scale("+f+","+u+")")}return function(c,h){var f=[],u=[];return c=t(c),h=t(h),n(c.translateX,c.translateY,h.translateX,h.translateY,f,u),a(c.rotate,h.rotate,f,u),s(c.skewX,h.skewX,f,u),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,f,u),c=h=null,function(p){for(var x=-1,_=u.length,T;++x<_;)f[(T=u[x]).i]=T.x(p);return f.join("")}}}var hs=ih(eh,"px, ","px)","deg)"),fs=ih(rh,", ",")",")");function Re(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var ps=Symbol("implicit");function Ui(){var t=new Hr,e=[],r=[],i=ps;function o(n){let a=t.get(n);if(a===void 0){if(i!==ps)return i;t.set(n,a=e.push(n)-1)}return r[a%r.length]}return o.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Hr;for(let a of n)t.has(a)||t.set(a,e.push(a)-1);return o},o.range=function(n){return arguments.length?(r=Array.from(n),o):r.slice()},o.unknown=function(n){return arguments.length?(i=n,o):i},o.copy=function(){return Ui(e,r).unknown(i)},Re.apply(o,arguments),o}function ds(){var t=Ui().unknown(void 0),e=t.domain,r=t.range,i=0,o=1,n,a,s=!1,l=0,c=0,h=.5;delete t.unknown;function f(){var u=e().length,p=oe&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function qx(t,e,r){var i=t[0],o=t[1],n=e[0],a=e[1];return o2?Wx:qx,l=c=null,f}function f(u){return u==null||isNaN(u=+u)?n:(l||(l=s(t.map(i),e,r)))(i(a(u)))}return f.invert=function(u){return a(o((c||(c=s(e,t.map(i),Bt)))(u)))},f.domain=function(u){return arguments.length?(t=Array.from(u,gs),h()):t.slice()},f.range=function(u){return arguments.length?(e=Array.from(u),h()):e.slice()},f.rangeRound=function(u){return e=Array.from(u),r=cs,h()},f.clamp=function(u){return arguments.length?(a=u?!0:Zr,h()):a!==Zr},f.interpolate=function(u){return arguments.length?(r=u,h()):r},f.unknown=function(u){return arguments.length?(n=u,f):n},function(u,p){return i=u,o=p,h()}}function Hi(){return Ux()(Zr,Zr)}function nh(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function mr(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 fe(t){return t=mr(Math.abs(t)),t?t[1]:NaN}function ah(t,e){return function(r,i){for(var o=r.length,n=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),n.push(r.substring(o-=s,o+s)),!((l+=s+1)>i));)s=t[a=(a+1)%t.length];return n.reverse().join(e)}}function sh(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var Hx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $e(t){if(!(e=Hx.exec(t)))throw new Error("invalid format: "+t);var e;return new Ko({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]})}$e.prototype=Ko.prototype;function Ko(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+""}Ko.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 lh(t){t:for(var e=t.length,r=1,i=-1,o;r0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(o+1):t}var ys;function ch(t,e){var r=mr(t,e);if(!r)return t+"";var i=r[0],o=r[1],n=o-(ys=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=i.length;return n===a?i:n>a?i+new Array(n-a+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+mr(t,Math.max(0,e+n-1))[0]}function _s(t,e){var r=mr(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}var Cs={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:nh,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)=>_s(t*100,e),r:_s,s:ch,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function bs(t){return t}var uh=Array.prototype.map,hh=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function fh(t){var e=t.grouping===void 0||t.thousands===void 0?bs:ah(uh.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",n=t.numerals===void 0?bs:sh(uh.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(f){f=$e(f);var u=f.fill,p=f.align,x=f.sign,_=f.symbol,T=f.zero,S=f.width,v=f.comma,M=f.precision,E=f.trim,I=f.type;I==="n"?(v=!0,I="g"):Cs[I]||(M===void 0&&(M=12),E=!0,I="g"),(T||u==="0"&&p==="=")&&(T=!0,u="0",p="=");var B=_==="$"?r:_==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",y=_==="$"?i:/[%p]/.test(I)?a:"",$=Cs[I],et=/[defgprs%]/.test(I);M=M===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function rt(b){var C=B,g=y,w,F,D;if(I==="c")g=$(b)+g,b="";else{b=+b;var R=b<0||1/b<0;if(b=isNaN(b)?l:$(Math.abs(b),M),E&&(b=lh(b)),R&&+b==0&&x!=="+"&&(R=!1),C=(R?x==="("?x:s:x==="-"||x==="("?"":x)+C,g=(I==="s"?hh[8+ys/3]:"")+g+(R&&x==="("?")":""),et){for(w=-1,F=b.length;++wD||D>57){g=(D===46?o+b.slice(w+1):b.slice(w))+g,b=b.slice(0,w);break}}}v&&!T&&(b=e(b,1/0));var j=C.length+b.length+g.length,X=j>1)+C+b+g+X.slice(j);break;default:b=X+C+b+g;break}return n(b)}return rt.toString=function(){return f+""},rt}function h(f,u){var p=c((f=$e(f),f.type="f",f)),x=Math.max(-8,Math.min(8,Math.floor(fe(u)/3)))*3,_=Math.pow(10,-x),T=hh[8+x/3];return function(S){return p(_*S)+T}}return{format:c,formatPrefix:h}}var Zo,Qo,Jo;Ts({thousands:",",grouping:[3],currency:["$",""]});function Ts(t){return Zo=fh(t),Qo=Zo.format,Jo=Zo.formatPrefix,Zo}function vs(t){return Math.max(0,-fe(Math.abs(t)))}function ks(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fe(e)/3)))*3-fe(Math.abs(t)))}function Ss(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,fe(e)-fe(t))+1}function ws(t,e,r,i){var o=Yr(t,e,r),n;switch(i=$e(i==null?",f":i),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(n=ks(o,a))&&(i.precision=n),Jo(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(n=Ss(o,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=n-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(n=vs(o))&&(i.precision=n-(i.type==="%")*2);break}}return Qo(i)}function Yx(t){var e=t.domain;return t.ticks=function(r){var i=e();return Oo(i[0],i[i.length-1],r==null?10:r)},t.tickFormat=function(r,i){var o=e();return ws(o[0],o[o.length-1],r==null?10:r,i)},t.nice=function(r){r==null&&(r=10);var i=e(),o=0,n=i.length-1,a=i[o],s=i[n],l,c,h=10;for(s0;){if(c=Oi(a,s,r),c===l)return i[o]=a,i[n]=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 As(){var t=Hi();return t.copy=function(){return Xo(t,As())},Re.apply(t,arguments),Yx(t)}var Bs=new Date,Fs=new Date;function ot(t,e,r,i){function o(n){return t(n=arguments.length===0?new Date:new Date(+n)),n}return o.floor=n=>(t(n=new Date(+n)),n),o.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),o.round=n=>{let a=o(n),s=o.ceil(n);return n-a(e(n=new Date(+n),a==null?1:Math.floor(a)),n),o.range=(n,a,s)=>{let l=[];if(n=o.ceil(n),s=s==null?1:Math.floor(s),!(n0))return l;let c;do l.push(c=new Date(+n)),e(n,s),t(n);while(cot(a=>{if(a>=a)for(;t(a),!n(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!n(a););else for(;--s>=0;)for(;e(a,1),!n(a););}),r&&(o.count=(n,a)=>(Bs.setTime(+n),Fs.setTime(+a),t(Bs),t(Fs),Math.floor(r(Bs,Fs))),o.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?o.filter(i?a=>i(a)%n===0:a=>o.count(0,a)%n===0):o)),o}var gr=ot(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);gr.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):gr);var ph=gr.range;var pe=ot(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),dh=pe.range;var Qr=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()),jx=Qr.range,tn=ot(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),Gx=tn.range;var Jr=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()),Vx=Jr.range,en=ot(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),Xx=en.range;var we=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),Kx=we.range,ji=ot(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),Zx=ji.range,rn=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)),Qx=rn.range;function _r(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 Ae=_r(0),ti=_r(1),gh=_r(2),xh=_r(3),ze=_r(4),yh=_r(5),_h=_r(6),Ch=Ae.range,Jx=ti.range,ty=gh.range,ey=xh.range,ry=ze.range,iy=yh.range,oy=_h.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 br=Cr(0),ei=Cr(1),bh=Cr(2),Th=Cr(3),qe=Cr(4),vh=Cr(5),kh=Cr(6),Sh=br.range,ny=ei.range,ay=bh.range,sy=Th.range,ly=qe.range,cy=vh.range,uy=kh.range;var ri=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()),hy=ri.range,on=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()),fy=on.range;var Kt=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());Kt.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 py=Kt.range,ne=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());ne.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 dy=ne.range;function Ah(t,e,r,i,o,n){let a=[[pe,1,1e3],[pe,5,5*1e3],[pe,15,15*1e3],[pe,30,30*1e3],[n,1,6e4],[n,5,5*6e4],[n,15,15*6e4],[n,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,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,h,f){let u=hT).right(a,u);if(p===a.length)return t.every(Yr(c/31536e6,h/31536e6,f));if(p===0)return gr.every(Math.max(Yr(c,h,f),1));let[x,_]=a[u/a[p-1][2]53)return null;"w"in k||(k.w=1),"Z"in k?(it=Os(Gi(k.y,0,1)),K=it.getUTCDay(),it=K>4||K===0?ei.ceil(it):ei(it),it=ji.offset(it,(k.V-1)*7),k.y=it.getUTCFullYear(),k.m=it.getUTCMonth(),k.d=it.getUTCDate()+(k.w+6)%7):(it=Es(Gi(k.y,0,1)),K=it.getDay(),it=K>4||K===0?ti.ceil(it):ti(it),it=we.offset(it,(k.V-1)*7),k.y=it.getFullYear(),k.m=it.getMonth(),k.d=it.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),K="Z"in k?Os(Gi(k.y,0,1)).getUTCDay():Es(Gi(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(K+5)%7:k.w+k.U*7-(K+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,Os(k)):Es(k)}}function $(O,G,Z,k){for(var wt=0,it=G.length,K=Z.length,N,Q;wt=K)return-1;if(N=G.charCodeAt(wt++),N===37){if(N=G.charAt(wt++),Q=I[N in Bh?G.charAt(wt++):N],!Q||(k=Q(O,Z,k))<0)return-1}else if(N!=Z.charCodeAt(k++))return-1}return k}function et(O,G,Z){var k=c.exec(G.slice(Z));return k?(O.p=h.get(k[0].toLowerCase()),Z+k[0].length):-1}function rt(O,G,Z){var k=p.exec(G.slice(Z));return k?(O.w=x.get(k[0].toLowerCase()),Z+k[0].length):-1}function b(O,G,Z){var k=f.exec(G.slice(Z));return k?(O.w=u.get(k[0].toLowerCase()),Z+k[0].length):-1}function C(O,G,Z){var k=S.exec(G.slice(Z));return k?(O.m=v.get(k[0].toLowerCase()),Z+k[0].length):-1}function g(O,G,Z){var k=_.exec(G.slice(Z));return k?(O.m=T.get(k[0].toLowerCase()),Z+k[0].length):-1}function w(O,G,Z){return $(O,e,G,Z)}function F(O,G,Z){return $(O,r,G,Z)}function D(O,G,Z){return $(O,i,G,Z)}function R(O){return a[O.getDay()]}function j(O){return n[O.getDay()]}function X(O){return l[O.getMonth()]}function V(O){return s[O.getMonth()]}function at(O){return o[+(O.getHours()>=12)]}function kt(O){return 1+~~(O.getMonth()/3)}function St(O){return a[O.getUTCDay()]}function Xt(O){return n[O.getUTCDay()]}function mt(O){return l[O.getUTCMonth()]}function Nt(O){return s[O.getUTCMonth()]}function ut(O){return o[+(O.getUTCHours()>=12)]}function Lt(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var G=B(O+="",M);return G.toString=function(){return O},G},parse:function(O){var G=y(O+="",!1);return G.toString=function(){return O},G},utcFormat:function(O){var G=B(O+="",E);return G.toString=function(){return O},G},utcParse:function(O){var G=y(O+="",!0);return G.toString=function(){return O},G}}}var Bh={"-":"",_:" ",0:"0"},Tt=/^\s*\d+/,yy=/^%/,_y=/[\\^$*+?|[\]().{}]/g;function tt(t,e,r){var i=t<0?"-":"",o=(i?-t:t)+"",n=o.length;return i+(n[e.toLowerCase(),r]))}function by(t,e,r){var i=Tt.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Ty(t,e,r){var i=Tt.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function vy(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function ky(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function Sy(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function Fh(t,e,r){var i=Tt.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function Mh(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function wy(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 Ay(t,e,r){var i=Tt.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function By(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function Lh(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function Fy(t,e,r){var i=Tt.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function Eh(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function My(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function Ly(t,e,r){var i=Tt.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function Ey(t,e,r){var i=Tt.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Oy(t,e,r){var i=Tt.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Iy(t,e,r){var i=yy.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function Dy(t,e,r){var i=Tt.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Ny(t,e,r){var i=Tt.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Oh(t,e){return tt(t.getDate(),e,2)}function Py(t,e){return tt(t.getHours(),e,2)}function Ry(t,e){return tt(t.getHours()%12||12,e,2)}function $y(t,e){return tt(1+we.count(Kt(t),t),e,3)}function Rh(t,e){return tt(t.getMilliseconds(),e,3)}function zy(t,e){return Rh(t,e)+"000"}function qy(t,e){return tt(t.getMonth()+1,e,2)}function Wy(t,e){return tt(t.getMinutes(),e,2)}function Uy(t,e){return tt(t.getSeconds(),e,2)}function Hy(t){var e=t.getDay();return e===0?7:e}function Yy(t,e){return tt(Ae.count(Kt(t)-1,t),e,2)}function $h(t){var e=t.getDay();return e>=4||e===0?ze(t):ze.ceil(t)}function jy(t,e){return t=$h(t),tt(ze.count(Kt(t),t)+(Kt(t).getDay()===4),e,2)}function Gy(t){return t.getDay()}function Vy(t,e){return tt(ti.count(Kt(t)-1,t),e,2)}function Xy(t,e){return tt(t.getFullYear()%100,e,2)}function Ky(t,e){return t=$h(t),tt(t.getFullYear()%100,e,2)}function Zy(t,e){return tt(t.getFullYear()%1e4,e,4)}function Qy(t,e){var r=t.getDay();return t=r>=4||r===0?ze(t):ze.ceil(t),tt(t.getFullYear()%1e4,e,4)}function Jy(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+tt(e/60|0,"0",2)+tt(e%60,"0",2)}function Ih(t,e){return tt(t.getUTCDate(),e,2)}function t_(t,e){return tt(t.getUTCHours(),e,2)}function e_(t,e){return tt(t.getUTCHours()%12||12,e,2)}function r_(t,e){return tt(1+ji.count(ne(t),t),e,3)}function zh(t,e){return tt(t.getUTCMilliseconds(),e,3)}function i_(t,e){return zh(t,e)+"000"}function o_(t,e){return tt(t.getUTCMonth()+1,e,2)}function n_(t,e){return tt(t.getUTCMinutes(),e,2)}function a_(t,e){return tt(t.getUTCSeconds(),e,2)}function s_(t){var e=t.getUTCDay();return e===0?7:e}function l_(t,e){return tt(br.count(ne(t)-1,t),e,2)}function qh(t){var e=t.getUTCDay();return e>=4||e===0?qe(t):qe.ceil(t)}function c_(t,e){return t=qh(t),tt(qe.count(ne(t),t)+(ne(t).getUTCDay()===4),e,2)}function u_(t){return t.getUTCDay()}function h_(t,e){return tt(ei.count(ne(t)-1,t),e,2)}function f_(t,e){return tt(t.getUTCFullYear()%100,e,2)}function p_(t,e){return t=qh(t),tt(t.getUTCFullYear()%100,e,2)}function d_(t,e){return tt(t.getUTCFullYear()%1e4,e,4)}function m_(t,e){var r=t.getUTCDay();return t=r>=4||r===0?qe(t):qe.ceil(t),tt(t.getUTCFullYear()%1e4,e,4)}function g_(){return"+0000"}function Dh(){return"%"}function Nh(t){return+t}function Ph(t){return Math.floor(+t/1e3)}var ii,nn,Wh,Uh,Hh;Ds({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 Ds(t){return ii=Is(t),nn=ii.format,Wh=ii.parse,Uh=ii.utcFormat,Hh=ii.utcParse,ii}function Ns(t,e){t=t.slice();var r=0,i=t.length-1,o=t[r],n=t[i],a;return n1?0:t<-1?oi:Math.acos(t)}function Rs(t){return t>=1?Ki:t<=-1?-Ki:Math.asin(t)}var $s=Math.PI,zs=2*$s,vr=1e-6,C_=zs-vr;function Kh(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Kh;let r=10**e;return function(i){this._+=i[0];for(let o=1,n=i.length;ovr)if(!(Math.abs(f*l-c*h)>vr)||!n)this._append`L${this._x1=e},${this._y1=r}`;else{let p=i-a,x=o-s,_=l*l+c*c,T=p*p+x*x,S=Math.sqrt(_),v=Math.sqrt(u),M=n*Math.tan(($s-Math.acos((_+u-T)/(2*S*v)))/2),E=M/v,I=M/S;Math.abs(E-1)>vr&&this._append`L${e+E*h},${r+E*f}`,this._append`A${n},${n},0,0,${+(f*p>h*x)},${this._x1=e+I*l},${this._y1=r+I*c}`}}arc(e,r,i,o,n,a){if(e=+e,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(o),l=i*Math.sin(o),c=e+s,h=r+l,f=1^a,u=a?o-n:n-o;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>vr||Math.abs(this._y1-h)>vr)&&this._append`L${c},${h}`,i&&(u<0&&(u=u%zs+zs),u>C_?this._append`A${i},${i},0,1,${f},${e-s},${r-l}A${i},${i},0,1,${f},${this._x1=c},${this._y1=h}`:u>vr&&this._append`A${i},${i},0,${+(u>=$s)},${f},${this._x1=e+i*Math.cos(n)},${this._y1=r+i*Math.sin(n)}`)}rect(e,r,i,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}};function Zh(){return new kr}Zh.prototype=kr.prototype;function sn(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 kr(e)}function T_(t){return t.innerRadius}function v_(t){return t.outerRadius}function k_(t){return t.startAngle}function S_(t){return t.endAngle}function w_(t){return t&&t.padAngle}function A_(t,e,r,i,o,n,a,s){var l=r-t,c=i-e,h=a-o,f=s-n,u=f*l-h*c;if(!(u*uw*w+F*F&&($=rt,et=b),{cx:$,cy:et,x01:-h,y01:-f,x11:$*(o/I-1),y11:et*(o/I-1)}}function B_(){var t=T_,e=v_,r=ct(0),i=null,o=k_,n=S_,a=w_,s=null,l=sn(c);function c(){var h,f,u=+t.apply(this,arguments),p=+e.apply(this,arguments),x=o.apply(this,arguments)-Ki,_=n.apply(this,arguments)-Ki,T=Ps(_-x),S=_>x;if(s||(s=h=l()),pvt))s.moveTo(0,0);else if(T>ni-vt)s.moveTo(p*We(x),p*ae(x)),s.arc(0,0,p,x,_,!S),u>vt&&(s.moveTo(u*We(_),u*ae(_)),s.arc(0,0,u,_,x,S));else{var v=x,M=_,E=x,I=_,B=T,y=T,$=a.apply(this,arguments)/2,et=$>vt&&(i?+i.apply(this,arguments):Tr(u*u+p*p)),rt=an(Ps(p-u)/2,+r.apply(this,arguments)),b=rt,C=rt,g,w;if(et>vt){var F=Rs(et/u*ae($)),D=Rs(et/p*ae($));(B-=F*2)>vt?(F*=S?1:-1,E+=F,I-=F):(B=0,E=I=(x+_)/2),(y-=D*2)>vt?(D*=S?1:-1,v+=D,M-=D):(y=0,v=M=(x+_)/2)}var R=p*We(v),j=p*ae(v),X=u*We(I),V=u*ae(I);if(rt>vt){var at=p*We(M),kt=p*ae(M),St=u*We(E),Xt=u*ae(E),mt;if(Tvt?C>vt?(g=ln(St,Xt,R,j,p,C,S),w=ln(at,kt,X,V,p,C,S),s.moveTo(g.cx+g.x01,g.cy+g.y01),Cvt)||!(B>vt)?s.lineTo(X,V):b>vt?(g=ln(X,V,at,kt,u,-b,S),w=ln(R,j,St,Xt,u,-b,S),s.lineTo(g.cx+g.x01,g.cy+g.y01),bt?1:e>=t?0:NaN}function rf(t){return t}function M_(){var t=rf,e=ef,r=null,i=ct(0),o=ct(ni),n=ct(0);function a(s){var l,c=(s=cn(s)).length,h,f,u=0,p=new Array(c),x=new Array(c),_=+i.apply(this,arguments),T=Math.min(ni,Math.max(-ni,o.apply(this,arguments)-_)),S,v=Math.min(Math.abs(T)/c,n.apply(this,arguments)),M=v*(T<0?-1:1),E;for(l=0;l0&&(u+=E);for(e!=null?p.sort(function(I,B){return e(x[I],x[B])}):r!=null&&p.sort(function(I,B){return r(s[I],s[B])}),l=0,f=u?(T-c*M)/u:0;l0?E*f:0)+M,x[h]={data:s[h],index:l,value:E,startAngle:_,endAngle:S,padAngle:v};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?(o=typeof s=="function"?s:ct(+s),a):o},a.padAngle=function(s){return arguments.length?(n=typeof s=="function"?s:ct(+s),a):n},a}function ai(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 Qi(t){this._context=t}Qi.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:ai(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:ai(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qs(t){return new Qi(t)}var un=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 Ws(t){return new un(t,!0)}function Us(t){return new un(t,!1)}function Zt(){}function of(t){this._context=t}of.prototype={areaStart:Zt,areaEnd:Zt,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:ai(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Hs(t){return new of(t)}function nf(t){this._context=t}nf.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:ai(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ys(t){return new nf(t)}function af(t,e){this._basis=new Qi(t),this._beta=e}af.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],o=e[0],n=t[r]-i,a=e[r]-o,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+l*n),this._beta*e[s]+(1-this._beta)*(o+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var js=function t(e){function r(i){return e===1?new Qi(i):new af(i,e)}return r.beta=function(i){return t(+i)},r}(.85);function si(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 hn(t,e){this._context=t,this._k=(1-e)/6}hn.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:si(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:si(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 Gs=function t(e){function r(i){return new hn(i,e)}return r.tension=function(i){return t(+i)},r}(0);function fn(t,e){this._context=t,this._k=(1-e)/6}fn.prototype={areaStart:Zt,areaEnd:Zt,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:si(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 Vs=function t(e){function r(i){return new fn(i,e)}return r.tension=function(i){return t(+i)},r}(0);function pn(t,e){this._context=t,this._k=(1-e)/6}pn.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:si(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 Xs=function t(e){function r(i){return new pn(i,e)}return r.tension=function(i){return t(+i)},r}(0);function Ji(t,e,r){var i=t._x1,o=t._y1,n=t._x2,a=t._y2;if(t._l01_a>vt){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,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>vt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*c+t._x1*t._l23_2a-e*t._l12_2a)/h,a=(a*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(i,o,n,a,t._x2,t._y2)}function sf(t,e){this._context=t,this._alpha=e}sf.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:Ji(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 Ks=function t(e){function r(i){return e?new sf(i,e):new hn(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function lf(t,e){this._context=t,this._alpha=e}lf.prototype={areaStart:Zt,areaEnd:Zt,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:Ji(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 Zs=function t(e){function r(i){return e?new lf(i,e):new fn(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function cf(t,e){this._context=t,this._alpha=e}cf.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:Ji(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 Qs=function t(e){function r(i){return e?new cf(i,e):new pn(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function uf(t){this._context=t}uf.prototype={areaStart:Zt,areaEnd:Zt,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 Js(t){return new uf(t)}function hf(t){return t<0?-1:1}function ff(t,e,r){var i=t._x1-t._x0,o=e-t._x1,n=(t._y1-t._y0)/(i||o<0&&-0),a=(r-t._y1)/(o||i<0&&-0),s=(n*o+a*i)/(i+o);return(hf(n)+hf(a))*Math.min(Math.abs(n),Math.abs(a),.5*Math.abs(s))||0}function pf(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function tl(t,e,r){var i=t._x0,o=t._y0,n=t._x1,a=t._y1,s=(n-i)/3;t._context.bezierCurveTo(i+s,o+s*e,n-s,a-s*r,n,a)}function dn(t){this._context=t}dn.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:tl(this,this._t0,pf(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,tl(this,pf(this,r=ff(this,t,e)),r);break;default:tl(this,this._t0,r=ff(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function df(t){this._context=new mf(t)}(df.prototype=Object.create(dn.prototype)).point=function(t,e){dn.prototype.point.call(this,e,t)};function mf(t){this._context=t}mf.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,o,n){this._context.bezierCurveTo(e,t,i,r,n,o)}};function el(t){return new dn(t)}function rl(t){return new df(t)}function xf(t){this._context=t}xf.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=gf(t),o=gf(e),n=0,a=1;a=0;--e)o[e]=(a[e]-o[e+1])/n[e];for(n[r-1]=(t[r]+o[r-1])/2,e=0;e=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 ol(t){return new mn(t,.5)}function nl(t){return new mn(t,0)}function al(t){return new mn(t,1)}var L_={value:()=>{}};function _f(){for(var t=0,e=arguments.length,r={},i;t=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}gn.prototype=_f.prototype={constructor:gn,on:function(t,e){var r=this._,i=E_(t+"",r),o,n=-1,a=i.length;if(arguments.length<2){for(;++n0)for(var r=new Array(o),i=0,o,n;i=0&&t._call.call(void 0,e),t=t._next;--li}function Cf(){Sr=(yn=io.now())+_n,li=eo=0;try{vf()}finally{li=0,N_(),Sr=0}}function D_(){var t=io.now(),e=t-yn;e>bf&&(_n-=e,yn=t)}function N_(){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);ro=t,ll(i)}function ll(t){if(!li){eo&&(eo=clearTimeout(eo));var e=t-Sr;e>24?(t<1/0&&(eo=setTimeout(Cf,t-io.now()-_n)),to&&(to=clearInterval(to))):(to||(yn=io.now(),to=setInterval(D_,bf)),li=1,Tf(Cf))}}function bn(t,e,r){var i=new oo;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,r),i}var P_=sl("start","end","cancel","interrupt"),R_=[],wf=0,kf=1,vn=2,Tn=3,Sf=4,kn=5,ao=6;function Ue(t,e,r,i,o,n){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;$_(t,r,{name:e,index:i,group:o,on:P_,tween:R_,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:wf})}function so(t,e){var r=gt(t,e);if(r.state>wf)throw new Error("too late; already scheduled");return r}function Mt(t,e){var r=gt(t,e);if(r.state>Tn)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 $_(t,e,r){var i=t.__transition,o;i[e]=r,r.timer=Cn(n,0,r.time);function n(c){r.state=kf,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,f,u,p;if(r.state!==kf)return l();for(h in i)if(p=i[h],p.name===r.name){if(p.state===Tn)return bn(a);p.state===Sf?(p.state=ao,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[h]):+hvn&&i.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function nC(t,e,r){var i,o,n=oC(e)?so:Mt;return function(){var a=n(this,t),s=a.on;s!==i&&(o=(i=s).copy()).on(e,r),a.on=o}}function Pf(t,e){var r=this._id;return arguments.length<2?gt(this.node(),r).on.on(t):this.each(nC(r,t,e))}function aC(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Rf(){return this.on("end.remove",aC(this._id))}function $f(t){var e=this._name,r=this._id;typeof t!="function"&&(t=cr(t));for(var i=this._groups,o=i.length,n=new Array(o),a=0;aQf(e,r).then(i=>new DOMParser().parseFromString(i,t))}var vC=ul("application/xml"),kC=ul("text/html"),SC=ul("image/svg+xml");function He(t,e,r){this.k=t,this.x=e,this.y=r}He.prototype={constructor:He,scale:function(t){return t===1?this:new He(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new He(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 hl=new He(1,0,0);fl.prototype=He.prototype;function fl(t){for(;!t.__zoom;)if(!(t=t.parentNode))return hl;return t.__zoom}var Fn={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 o=r<.5?r*(1+e):r+e-r*e,n=2*r-o;switch(i){case"r":return Fn.hue2rgb(n,o,t+.3333333333333333)*255;case"g":return Fn.hue2rgb(n,o,t)*255;case"b":return Fn.hue2rgb(n,o,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;let o=Math.max(t,e,r),n=Math.min(t,e,r),a=(o+n)/2;if(i==="l")return a*100;if(o===n)return 0;let s=o-n,l=a>.5?s/(2-o-n):s/(o+n);if(i==="s")return l*100;switch(o){case t:return((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},ep=wC;var AC={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},rp=AC;var BC={channel:tp,lang:ep,unit:rp},q=BC;var Fe={};for(let t=0;t<=255;t++)Fe[t]=q.unit.dec2hex(t);var xt={ALL:0,RGB:1,HSL:2};var ml=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}},ip=ml;var gl=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new ip}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:o}=e;r===void 0&&(e.h=q.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=q.channel.rgb2hsl(e,"s")),o===void 0&&(e.l=q.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:i,b:o}=e;r===void 0&&(e.r=q.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=q.channel.hsl2rgb(e,"g")),o===void 0&&(e.b=q.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(),q.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(),q.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(),q.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(),q.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(),q.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(),q.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}},op=gl;var FC=new op({r:0,g:0,b:0,a:0},"transparent"),Ye=FC;var np={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(np.re);if(!e)return;let r=e[1],i=parseInt(r,16),o=r.length,n=o%4===0,a=o>4,s=a?1:17,l=a?8:4,c=n?0:-1,h=a?255:15;return Ye.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:n?(i&h)*s/255:1},t)},stringify:t=>{let{r:e,g:r,b:i,a:o}=t;return o<1?`#${Fe[Math.round(e)]}${Fe[Math.round(r)]}${Fe[Math.round(i)]}${Fe[Math.round(o*255)]}`:`#${Fe[Math.round(e)]}${Fe[Math.round(r)]}${Fe[Math.round(i)]}`}},wr=np;var Mn={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(Mn.hueRe);if(e){let[,r,i]=e;switch(i){case"grad":return q.channel.clamp.h(parseFloat(r)*.9);case"rad":return q.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return q.channel.clamp.h(parseFloat(r)*360)}}return q.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(Mn.re);if(!r)return;let[,i,o,n,a,s]=r;return Ye.set({h:Mn._hue2deg(i),s:q.channel.clamp.s(parseFloat(o)),l:q.channel.clamp.l(parseFloat(n)),a:a?q.channel.clamp.a(s?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{let{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${q.lang.round(e)}, ${q.lang.round(r)}%, ${q.lang.round(i)}%, ${o})`:`hsl(${q.lang.round(e)}, ${q.lang.round(r)}%, ${q.lang.round(i)}%)`}},lo=Mn;var Ln={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=Ln.colors[t];if(e)return wr.parse(e)},stringify:t=>{let e=wr.stringify(t);for(let r in Ln.colors)if(Ln.colors[r]===e)return r}},xl=Ln;var ap={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(ap.re);if(!r)return;let[,i,o,n,a,s,l,c,h]=r;return Ye.set({r:q.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:q.channel.clamp.g(a?parseFloat(n)*2.55:parseFloat(n)),b:q.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?q.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{let{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${q.lang.round(e)}, ${q.lang.round(r)}, ${q.lang.round(i)}, ${q.lang.round(o)})`:`rgb(${q.lang.round(e)}, ${q.lang.round(r)}, ${q.lang.round(i)})`}},co=ap;var MC={format:{keyword:xl,hex:wr,rgb:co,rgba:co,hsl:lo,hsla:lo},parse:t=>{if(typeof t!="string")return t;let e=wr.parse(t)||co.parse(t)||lo.parse(t)||xl.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?lo.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?co.stringify(t):wr.stringify(t)},yt=MC;var LC=(t,e)=>{let r=yt.parse(t);for(let i in e)r[i]=q.channel.clamp[i](e[i]);return yt.stringify(r)},En=LC;var EC=(t,e,r=0,i=1)=>{if(typeof t!="number")return En(t,{a:e});let o=Ye.set({r:q.channel.clamp.r(t),g:q.channel.clamp.g(e),b:q.channel.clamp.b(r),a:q.channel.clamp.a(i)});return yt.stringify(o)},je=EC;var OC=(t,e)=>q.lang.round(yt.parse(t)[e]),IC=OC;var DC=t=>{let{r:e,g:r,b:i}=yt.parse(t),o=.2126*q.channel.toLinear(e)+.7152*q.channel.toLinear(r)+.0722*q.channel.toLinear(i);return q.lang.round(o)},sp=DC;var NC=t=>sp(t)>=.5,lp=NC;var PC=t=>!lp(t),Ar=PC;var RC=(t,e,r)=>{let i=yt.parse(t),o=i[e],n=q.channel.clamp[e](o+r);return o!==n&&(i[e]=n),yt.stringify(i)},On=RC;var $C=(t,e)=>On(t,"l",e),z=$C;var zC=(t,e)=>On(t,"l",-e),H=zC;var qC=(t,e)=>{let r=yt.parse(t),i={};for(let o in e)e[o]&&(i[o]=r[o]+e[o]);return En(t,i)},m=qC;var WC=(t,e,r=50)=>{let{r:i,g:o,b:n,a}=yt.parse(t),{r:s,g:l,b:c,a:h}=yt.parse(e),f=r/100,u=f*2-1,p=a-h,_=((u*p===-1?u:(u+p)/(1+u*p))+1)/2,T=1-_,S=i*_+s*T,v=o*_+l*T,M=n*_+c*T,E=a*f+h*(1-f);return je(S,v,M,E)},cp=WC;var UC=(t,e=100)=>{let r=yt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,cp(r,t,e)},L=UC;var HC=typeof global=="object"&&global&&global.Object===Object&&global,In=HC;var YC=typeof self=="object"&&self&&self.Object===Object&&self,jC=In||YC||Function("return this")(),ft=jC;var GC=ft.Symbol,ui=GC;var up=Object.prototype,VC=up.hasOwnProperty,XC=up.toString,uo=ui?ui.toStringTag:void 0;function KC(t){var e=VC.call(t,uo),r=t[uo];try{t[uo]=void 0;var i=!0}catch(n){}var o=XC.call(t);return i&&(e?t[uo]=r:delete t[uo]),o}var hp=KC;var ZC=Object.prototype,QC=ZC.toString;function JC(t){return QC.call(t)}var fp=JC;var t1="[object Null]",e1="[object Undefined]",pp=ui?ui.toStringTag:void 0;function r1(t){return t==null?t===void 0?e1:t1:pp&&pp in Object(t)?hp(t):fp(t)}var se=r1;function i1(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Yt=i1;var o1="[object AsyncFunction]",n1="[object Function]",a1="[object GeneratorFunction]",s1="[object Proxy]";function l1(t){if(!Yt(t))return!1;var e=se(t);return e==n1||e==a1||e==o1||e==s1}var hi=l1;var c1=ft["__core-js_shared__"],Dn=c1;var dp=function(){var t=/[^.]+$/.exec(Dn&&Dn.keys&&Dn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function u1(t){return!!dp&&dp in t}var mp=u1;var h1=Function.prototype,f1=h1.toString;function p1(t){if(t!=null){try{return f1.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Me=p1;var d1=/[\\^$.*+?()[\]{}|]/g,m1=/^\[object .+?Constructor\]$/,g1=Function.prototype,x1=Object.prototype,y1=g1.toString,_1=x1.hasOwnProperty,C1=RegExp("^"+y1.call(_1).replace(d1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function b1(t){if(!Yt(t)||mp(t))return!1;var e=hi(t)?C1:m1;return e.test(Me(t))}var gp=b1;function T1(t,e){return t==null?void 0:t[e]}var xp=T1;function v1(t,e){var r=xp(t,e);return gp(r)?r:void 0}var jt=v1;var k1=jt(Object,"create"),Le=k1;function S1(){this.__data__=Le?Le(null):{},this.size=0}var yp=S1;function w1(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var _p=w1;var A1="__lodash_hash_undefined__",B1=Object.prototype,F1=B1.hasOwnProperty;function M1(t){var e=this.__data__;if(Le){var r=e[t];return r===A1?void 0:r}return F1.call(e,t)?e[t]:void 0}var Cp=M1;var L1=Object.prototype,E1=L1.hasOwnProperty;function O1(t){var e=this.__data__;return Le?e[t]!==void 0:E1.call(e,t)}var bp=O1;var I1="__lodash_hash_undefined__";function D1(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Le&&e===void 0?I1:e,this}var Tp=D1;function fi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var wp=U1;function H1(t,e){var r=this.__data__,i=Ve(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var Ap=H1;function pi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=Mb}var $n=Lb;function Eb(t){return t!=null&&$n(t.length)&&!hi(t)}var Je=Eb;function Ob(t){return me(t)&&Je(t)}var td=Ob;function Ib(){return!1}var ed=Ib;var od=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rd=od&&typeof module=="object"&&module&&!module.nodeType&&module,Db=rd&&rd.exports===od,id=Db?ft.Buffer:void 0,Nb=id?id.isBuffer:void 0,Pb=Nb||ed,yi=Pb;var Rb="[object Object]",$b=Function.prototype,zb=Object.prototype,nd=$b.toString,qb=zb.hasOwnProperty,Wb=nd.call(Object);function Ub(t){if(!me(t)||se(t)!=Rb)return!1;var e=Rn(t);if(e===null)return!0;var r=qb.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&nd.call(r)==Wb}var ad=Ub;var Hb="[object Arguments]",Yb="[object Array]",jb="[object Boolean]",Gb="[object Date]",Vb="[object Error]",Xb="[object Function]",Kb="[object Map]",Zb="[object Number]",Qb="[object Object]",Jb="[object RegExp]",tT="[object Set]",eT="[object String]",rT="[object WeakMap]",iT="[object ArrayBuffer]",oT="[object DataView]",nT="[object Float32Array]",aT="[object Float64Array]",sT="[object Int8Array]",lT="[object Int16Array]",cT="[object Int32Array]",uT="[object Uint8Array]",hT="[object Uint8ClampedArray]",fT="[object Uint16Array]",pT="[object Uint32Array]",lt={};lt[nT]=lt[aT]=lt[sT]=lt[lT]=lt[cT]=lt[uT]=lt[hT]=lt[fT]=lt[pT]=!0;lt[Hb]=lt[Yb]=lt[iT]=lt[jb]=lt[oT]=lt[Gb]=lt[Vb]=lt[Xb]=lt[Kb]=lt[Zb]=lt[Qb]=lt[Jb]=lt[tT]=lt[eT]=lt[rT]=!1;function dT(t){return me(t)&&$n(t.length)&&!!lt[se(t)]}var sd=dT;function mT(t){return function(e){return t(e)}}var ld=mT;var cd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,po=cd&&typeof module=="object"&&module&&!module.nodeType&&module,gT=po&&po.exports===cd,Tl=gT&&In.process,xT=function(){try{var t=po&&po.require&&po.require("util").types;return t||Tl&&Tl.binding&&Tl.binding("util")}catch(e){}}(),vl=xT;var ud=vl&&vl.isTypedArray,yT=ud?ld(ud):sd,_i=yT;function _T(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var mo=_T;var CT=Object.prototype,bT=CT.hasOwnProperty;function TT(t,e,r){var i=t[e];(!(bT.call(t,e)&&Ge(i,r))||r===void 0&&!(e in t))&&xi(t,e,r)}var hd=TT;function vT(t,e,r,i){var o=!r;r||(r={});for(var n=-1,a=e.length;++n-1&&t%1==0&&t0){if(++e>=UT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var wd=jT;var GT=wd(Sd),Ad=GT;function VT(t,e){return Ad(vd(t,e,Wn),t+"")}var Bd=VT;function XT(t,e,r){if(!Yt(r))return!1;var i=typeof e;return(i=="number"?Je(r)&&zn(e,r.length):i=="string"&&e in r)?Ge(r[e],t):!1}var Fd=XT;function KT(t){return Bd(function(e,r){var i=-1,o=r.length,n=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(n=t.length>3&&typeof n=="function"?(o--,n):void 0,a&&Fd(r[0],r[1],a)&&(n=o<3?void 0:n,o=1),e=Object(e);++i0?Lr(Ti,--Qt):0,bi--,pt===10&&(bi=1,ta--),pt}function Jt(){return pt=Qt2||kl(pt)>3?"":" "}function Kd(t,e){for(;--e&&Jt()&&!(pt<48||pt>102||pt>57&&pt<65||pt>70&&pt<97););return ra(t,xo()+(e<6&&tr()==32&&Jt()==32))}function Sl(t){for(;Jt();)switch(pt){case t:return Qt;case 34:case 39:t!==34&&t!==39&&Sl(pt);break;case 40:t===41&&Sl(t);break;case 92:Jt();break}return Qt}function Zd(t,e){for(;Jt()&&t+pt!==57;)if(t+pt===84&&tr()===47)break;return"/*"+ra(e,Qt-1)+"*"+go(t===47?t:Jt())}function Qd(t){for(;!kl(tr());)Jt();return ra(t,Qt)}function em(t){return Vd(oa("",null,null,null,[""],t=Gd(t),0,[0],t))}function oa(t,e,r,i,o,n,a,s,l){for(var c=0,h=0,f=a,u=0,p=0,x=0,_=1,T=1,S=1,v=0,M="",E=o,I=n,B=i,y=M;T;)switch(x=v,v=Jt()){case 40:if(x!=108&&Lr(y,f-1)==58){Ud(y+=Qn(ia(v),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:y+=ia(v);break;case 9:case 10:case 13:case 32:y+=Xd(x);break;case 92:y+=Kd(xo()-1,7);continue;case 47:switch(tr()){case 42:case 47:Ci(xv(Zd(Jt(),xo()),e,r),l);break;default:y+="/"}break;case 123*_:s[c++]=le(y)*S;case 125*_:case 59:case 0:switch(v){case 0:case 125:T=0;case 59+h:p>0&&le(y)-f&&Ci(p>32?tm(y+";",i,r,f-1):tm(Qn(y," ","")+";",i,r,f-2),l);break;case 59:y+=";";default:if(Ci(B=Jd(y,e,r,c,h,o,s,M,E=[],I=[],f),n),v===123)if(h===0)oa(y,e,B,B,E,n,f,s,I);else switch(u===99&&Lr(y,3)===110?100:u){case 100:case 109:case 115:oa(t,B,B,i&&Ci(Jd(t,B,B,0,0,o,s,M,o,E=[],f),I),o,I,f,s,i?E:I);break;default:oa(y,B,B,B,[""],I,0,s,I)}}c=h=p=0,_=S=1,M=y="",f=a;break;case 58:f=1+le(y),p=x;default:if(_<1){if(v==123)--_;else if(v==125&&_++==0&&jd()==125)continue}switch(y+=go(v),v*_){case 38:S=h>0?1:(y+="\f",-1);break;case 44:s[c++]=(le(y)-1)*S,S=1;break;case 64:tr()===45&&(y+=ia(Jt())),u=tr(),h=f=le(M=y+=Qd(xo())),v++;break;case 45:x===45&&le(y)==2&&(_=0)}}return n}function Jd(t,e,r,i,o,n,a,s,l,c,h){for(var f=o-1,u=o===0?n:[""],p=Jn(u),x=0,_=0,T=0;x0?u[S]+" "+v:Qn(v,/&\f/g,u[S])))&&(l[T++]=M);return ea(t,e,r,o===0?Xn:s,l,c,h)}function xv(t,e,r){return ea(t,e,r,Vn,go(Yd()),Er(t,2,-2),0)}function tm(t,e,r,i){return ea(t,e,r,Kn,Er(t,0,i),Er(t,i+1,-1),i)}function na(t,e){for(var r="",i=Jn(t),o=0;o{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Pl=function(t="fatal"){let e=Ee.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Ee&&(e=Ee[t])):typeof t=="number"&&(e=t),Y.trace=()=>{},Y.debug=()=>{},Y.info=()=>{},Y.warn=()=>{},Y.error=()=>{},Y.fatal=()=>{},e<=Ee.fatal&&(Y.fatal=console.error?console.error.bind(console,te("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",te("FATAL"))),e<=Ee.error&&(Y.error=console.error?console.error.bind(console,te("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",te("ERROR"))),e<=Ee.warn&&(Y.warn=console.warn?console.warn.bind(console,te("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",te("WARN"))),e<=Ee.info&&(Y.info=console.info?console.info.bind(console,te("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",te("INFO"))),e<=Ee.debug&&(Y.debug=console.debug?console.debug.bind(console,te("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",te("DEBUG"))),e<=Ee.trace&&(Y.trace=console.debug?console.debug.bind(console,te("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",te("TRACE")))},te=t=>`%c${(0,Tm.default)().format("ss.SSS")} : ${t} : `,vo=//gi,yv=t=>t?Sm(t).replace(/\\n/g,"#br#").split("#br#"):[""],_v=(()=>{let t=!1;return()=>{t||(Cv(),t=!0)}})();function Cv(){let t="data-temp-href-target";Dr.default.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")||"")}),Dr.default.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)||""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}var km=t=>(_v(),Dr.default.sanitize(t)),im=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){let i=e.securityLevel;i==="antiscript"||i==="strict"?t=km(t):i!=="loose"&&(t=Sm(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=kv(t))}return t},bo=(t,e)=>t&&(e.dompurifyConfig?t=Dr.default.sanitize(im(t,e),e.dompurifyConfig).toString():t=Dr.default.sanitize(im(t,e),{FORBID_TAGS:["style"]}).toString(),t),bv=(t,e)=>typeof t=="string"?bo(t,e):t.flat().map(r=>bo(r,e)),Tv=t=>vo.test(t),vv=t=>t.split(vo),kv=t=>t.replace(/#br#/g,"
"),Sm=t=>t.replace(vo,"#br#"),Sv=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},wm=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),wv=function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},Av=function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},uq=function(t){let e=t.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),Bv=(t,e)=>{let r=Ml(t,"~"),i=Ml(e,"~");return r===1&&i===1},Fv=t=>{let e=Ml(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],o=i.indexOf("~"),n=i.lastIndexOf("~");for(;o!==-1&&n!==-1&&o!==n;)i[o]="<",i[n]=">",o=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},om=()=>window.MathMLElement!==void 0,Ll=/\$\$(.*)\$\$/g,nm=t=>{var r;var e;return((r=(e=t.match(Ll))==null?void 0:e.length)!=null?r:0)>0},hq=async(t,e)=>{t=await Mv(t,e);let r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";let i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);let o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},Mv=async(t,e)=>{if(!nm(t))return t;if(!om()&&!e.legacyMathML)return t.replace(Ll,"MathML is unsupported in this environment.");let{default:r}=await import("./katex-OYT6U2ZE.js");return t.split(vo).map(i=>nm(i)?`
${i}
`:`
${i}
`).join("").replace(Ll,(i,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:om()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(//g,""))},Rl={getRows:yv,sanitizeText:bo,sanitizeTextOrArray:bv,hasBreaks:Tv,splitBreaks:vv,lineBreakRegex:vo,removeScript:km,getUrl:Sv,evaluate:wm,getMax:wv,getMin:Av},qt=(t,e)=>e?m(t,{s:-40,l:10}):m(t,{s:-40,l:-10}),_a="#ffffff",Ca="#f2f2f2",Lv=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(){var e,r,i,o,n,a,s,l,c,h,f;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?H(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||H(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||z(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 p=0;p{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},Ev=t=>{let e=new Lv;return e.calculate(t),e},Ov=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(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=z(L("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=je(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=H("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=H(this.sectionBkgColor,10),this.taskBorderColor=je(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=je(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(){var e,r,i,o,n,a,s,l,c,h,f;this.secondBkg=z(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=z(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=z(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 u=0;u{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},Iv=t=>{let e=new Ov;return e.calculate(t),e},Dv=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=je(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(){var e,r,i,o,n,a,s,l,c,h,f;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||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let u=0;u{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},Nv=t=>{let e=new Dv;return e.calculate(t),e},Pv=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=z("#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(){var e,r,i,o,n,a,s,l,c,h,f;this.actorBorder=H(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||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let u=0;u{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},Rv=t=>{let e=new Pv;return e.calculate(t),e},El=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=z(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(){var e,r,i,o,n,a,s,l,c,h,f;this.secondBkg=z(this.contrast,55),this.border2=this.contrast,this.actorBorder=z(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 u=0;u{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},$v=t=>{let e=new El;return e.calculate(t),e},De={base:{getThemeVariables:Ev},dark:{getThemeVariables:Iv},default:{getThemeVariables:Nv},forest:{getThemeVariables:Rv},neutral:{getThemeVariables:$v}},Oe={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,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,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},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,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"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,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,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{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},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,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},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,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,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"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},theme:"default",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges"],legacyMathML:!1,deterministicIds:!1,fontSize:16},Am=re(ee({},Oe),{deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:De.default.getThemeVariables(),sequence:re(ee({},Oe.sequence),{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:re(ee({},Oe.gantt),{tickInterval:void 0,useWidth:void 0}),c4:re(ee({},Oe.c4),{useWidth:void 0,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}}}),pie:re(ee({},Oe.pie),{useWidth:984}),xyChart:re(ee({},Oe.xyChart),{useWidth:void 0}),requirement:re(ee({},Oe.requirement),{useWidth:void 0}),gitGraph:re(ee({},Oe.gitGraph),{useMaxWidth:!1}),sankey:re(ee({},Oe.sankey),{useMaxWidth:!1})}),Bm=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...Bm(t[i],"")]:[...r,e+i],[]),zv=new Set(Bm(Am,"")),qv=Am,la=t=>{if(Y.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>la(e));return}for(let e of Object.keys(t)){if(Y.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!zv.has(e)||t[e]==null){Y.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){Y.debug("sanitizing object",e),la(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let i of r)e.includes(i)&&(Y.debug("sanitizing css option",e),t[e]=Wv(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}Y.debug("After sanitization",t)}},Wv=t=>{let e=0,r=0;for(let i of t){if(e{for(let{id:e,detector:r,loader:i}of t)Lm(e,r,i)},Lm=(t,e,r)=>{Si[t]?Y.error(`Detector with key ${t} already exists`):Si[t]={detector:e,loader:r},Y.debug(`Detector with key ${t} added${r?" with loader":""}`)},Hv=t=>Si[t].loader,Ol=(t,e,{depth:r=2,clobber:i=!1}={})=>{let o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(n=>Ol(t,n,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(n=>{t.includes(n)||t.push(n)}),t):t===void 0||r<=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(n=>{typeof e[n]=="object"&&(t[n]===void 0||typeof t[n]=="object")?(t[n]===void 0&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Ol(t[n],e[n],{depth:r-1,clobber:i})):(i||typeof t[n]!="object"&&typeof e[n]!="object")&&(t[n]=e[n])}),t)},It=Ol,Yv="\u200B",jv={curveBasis:qs,curveBasisClosed:Hs,curveBasisOpen:Ys,curveBumpX:Ws,curveBumpY:Us,curveBundle:js,curveCardinalClosed:Vs,curveCardinalOpen:Xs,curveCardinal:Gs,curveCatmullRomClosed:Zs,curveCatmullRomOpen:Qs,curveCatmullRom:Ks,curveLinear:Zi,curveLinearClosed:Js,curveMonotoneX:el,curveMonotoneY:rl,curveNatural:il,curveStep:ol,curveStepAfter:al,curveStepBefore:nl},Gv=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vv=function(t,e){let r=Em(t,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let a=r.map(s=>s.args);la(a),i=It(i,[...a])}else i=r.args;if(!i)return;let o=ba(t,e),n="config";return i[n]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[n],delete i[n]),i},Em=function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${Gv.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),Y.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i,o=[];for(;(i=yo.exec(t))!==null;)if(i.index===yo.lastIndex&&yo.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){let n=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:n,args:a})}return o.length===0?{type:t,args:null}:o.length===1?o[0]:o}catch(r){return Y.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},Xv=function(t){return t.replace(yo,"")},Kv=function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return-1};function Zv(t,e){var i;if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return(i=jv[r])!=null?i:e}function Qv(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,vm.sanitizeUrl)(r):r}var Jv=(t,...e)=>{let r=t.split("."),i=r.length-1,o=r[i],n=window;for(let a=0;a{r+=Om(o,e),e=o});let i=r/2;return $l(t,i)}function ek(t){return t.length===1?t[0]:tk(t)}var am=(t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},$l=(t,e)=>{let r,i=e;for(let o of t){if(r){let n=Om(o,r);if(n=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:am((1-a)*r.x+a*o.x,5),y:am((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},rk=(t,e,r)=>{Y.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let o=$l(e,25),n=t?10:5,a=Math.atan2(e[0].y-o.y,e[0].x-o.x),s={x:0,y:0};return s.x=Math.sin(a)*n+(e[0].x+o.x)/2,s.y=-Math.cos(a)*n+(e[0].y+o.y)/2,s};function ik(t,e,r){let i=structuredClone(r);Y.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();let o=25+t,n=$l(i,o),a=10+t*.5,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(s+Math.PI)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s+Math.PI)*a+(i[0].y+n.y)/2):e==="end_right"?(l.x=Math.sin(s-Math.PI)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(i[0].y+n.y)/2-5):e==="end_left"?(l.x=Math.sin(s)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2-5):(l.x=Math.sin(s)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2),l}function ok(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 sm=0,nk=()=>(sm++,"id-"+Math.random().toString(36).substr(2,12)+"-"+sm);function ak(t){let e="",r="0123456789abcdef",i=r.length;for(let o=0;oak(t.length),lk=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,text:""}},ck=function(t,e){let r=e.text.replace(Rl.lineBreakRegex," "),[,i]=ql(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",i),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0&&o.attr("class",e.class);let n=o.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(r),o},uk=Nn((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Rl.lineBreakRegex.test(t)))return t;let i=t.split(" "),o=[],n="";return i.forEach((a,s)=>{let l=ua(`${a} `,r),c=ua(n,r);if(l>e){let{hyphenatedStrings:u,remainingWord:p}=hk(a,e,"-",r);o.push(n,...u),n=p}else c+l>=e?(o.push(n),n=a):n=[n,a].filter(Boolean).join(" ");s+1===i.length&&o.push(n)}),o.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),hk=Nn((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let o=[...t],n=[],a="";return o.forEach((s,l)=>{let c=`${a}${s}`;if(ua(c,i)>=e){let f=l+1,u=o.length===f,p=`${c}${r}`;n.push(u?c:p),a=""}else a=c}),{hyphenatedStrings:n,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function fk(t,e){return zl(t,e).height}function ua(t,e){return zl(t,e).width}var zl=Nn((t,e)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};let[,n]=ql(r),a=["sans-serif",i],s=t.split(Rl.lineBreakRegex),l=[],c=Ht("body");if(!c.remove)return{width:0,height:0,lineHeight:0};let h=c.append("svg");for(let u of a){let p=0,x={width:0,height:0,lineHeight:0};for(let _ of s){let T=lk();T.text=_||Yv;let S=ck(h,T).style("font-size",n).style("font-weight",o).style("font-family",u),v=(S._groups||S)[0][0].getBBox();if(v.width===0&&v.height===0)throw new Error("svg element not in render tree");x.width=Math.round(Math.max(x.width,v.width)),p=Math.round(v.height),x.height+=p,x.lineHeight=Math.round(Math.max(x.lineHeight,p))}l.push(x)}h.remove();let f=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[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Il=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},aa,pk=function(t){return aa=aa||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),aa.innerHTML=t,unescape(aa.textContent)};function Im(t){return"str"in t}var dk=(t,e,r,i)=>{var o;if(!i)return;let n=(o=t.node())==null?void 0:o.getBBox();n&&t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},ql=t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t!=null?t:"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]};function Dm(t,e){return Ld({},t,e)}var _o={assignWithDepth:It,wrapLabel:uk,calculateTextHeight:fk,calculateTextWidth:ua,calculateTextDimensions:zl,cleanAndMerge:Dm,detectInit:Vv,detectDirective:Em,isSubstringInArray:Kv,interpolateToCurve:Zv,calcLabelPosition:ek,calcCardinalityPosition:rk,calcTerminalLabelPosition:ik,formatUrl:Qv,getStylesFromArray:ok,generateId:nk,random:sk,runFunc:Jv,entityDecode:pk,insertTitle:dk,parseFontSize:ql,InitIDGenerator:Il},mk=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},gk=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},lm="10.9.1",wi=Object.freeze(qv),Gt=It({},wi),Nm,Ai=[],Co=It({},wi),Ta=(t,e)=>{let r=It({},t),i={};for(let o of e)$m(o),i=It(i,o);if(r=It(r,i),i.theme&&i.theme in De){let o=It({},Nm),n=It(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in De&&(r.themeVariables=De[r.theme].getThemeVariables(n))}return Co=r,zm(Co),Co},xk=t=>(Gt=It({},wi),Gt=It(Gt,t),t.theme&&De[t.theme]&&(Gt.themeVariables=De[t.theme].getThemeVariables(t.themeVariables)),Ta(Gt,Ai),Gt),yk=t=>{Nm=It({},t)},_k=t=>(Gt=It(Gt,t),Ta(Gt,Ai),Gt),Pm=()=>It({},Gt),Rm=t=>(zm(t),It(Co,t),xe()),xe=()=>It({},Co),$m=t=>{var e;t&&(["secure",...(e=Gt.secure)!=null?e:[]].forEach(r=>{Object.hasOwn(t,r)&&(Y.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.startsWith("__")&&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"&&$m(t[r])}))},Ck=t=>{la(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),Ai.push(t),Ta(Gt,Ai)},ha=(t=Gt)=>{Ai=[],Ta(t,Ai)},bk={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},cm={},Tk=t=>{cm[t]||(Y.warn(bk[t]),cm[t]=!0)},zm=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Tk("LAZY_LOAD_DEPRECATED")},qm="c4",vk=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),kk=async()=>{let{diagram:t}=await import("./c4Diagram-ae766693-OHYOLOWI.js");return{id:qm,diagram:t}},Sk={id:qm,detector:vk,loader:kk},wk=Sk,Wm="flowchart",Ak=(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:/^\s*graph/.test(t)},Bk=async()=>{let{diagram:t}=await import("./flowDiagram-b222e15a-MHG3K63F.js");return{id:Wm,diagram:t}},Fk={id:Wm,detector:Ak,loader:Bk},Mk=Fk,Um="flowchart-v2",Lk=(t,e)=>{var r,i,o;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:/^\s*graph/.test(t)&&((o=e==null?void 0:e.flowchart)==null?void 0:o.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},Ek=async()=>{let{diagram:t}=await import("./flowDiagram-v2-13329dc7-TNS3SID3.js");return{id:Um,diagram:t}},Ok={id:Um,detector:Lk,loader:Ek},Ik=Ok,Hm="er",Dk=t=>/^\s*erDiagram/.test(t),Nk=async()=>{let{diagram:t}=await import("./erDiagram-09d1c15f-E6RRTEFN.js");return{id:Hm,diagram:t}},Pk={id:Hm,detector:Dk,loader:Nk},Rk=Pk,Ym="gitGraph",$k=t=>/^\s*gitGraph/.test(t),zk=async()=>{let{diagram:t}=await import("./gitGraphDiagram-942e62fe-TBVQM52Z.js");return{id:Ym,diagram:t}},qk={id:Ym,detector:$k,loader:zk},Wk=qk,jm="gantt",Uk=t=>/^\s*gantt/.test(t),Hk=async()=>{let{diagram:t}=await import("./ganttDiagram-b62c793e-35CU4I74.js");return{id:jm,diagram:t}},Yk={id:jm,detector:Uk,loader:Hk},jk=Yk,Gm="info",Gk=t=>/^\s*info/.test(t),Vk=async()=>{let{diagram:t}=await import("./infoDiagram-94cd232f-52QBIEA4.js");return{id:Gm,diagram:t}},Xk={id:Gm,detector:Gk,loader:Vk},Vm="pie",Kk=t=>/^\s*pie/.test(t),Zk=async()=>{let{diagram:t}=await import("./pieDiagram-bb1d19e5-3RXTM2PN.js");return{id:Vm,diagram:t}},Qk={id:Vm,detector:Kk,loader:Zk},Xm="quadrantChart",Jk=t=>/^\s*quadrantChart/.test(t),tS=async()=>{let{diagram:t}=await import("./quadrantDiagram-c759a472-7PXIOHML.js");return{id:Xm,diagram:t}},eS={id:Xm,detector:Jk,loader:tS},rS=eS,Km="xychart",iS=t=>/^\s*xychart-beta/.test(t),oS=async()=>{let{diagram:t}=await import("./xychartDiagram-f11f50a6-DRFFK7XY.js");return{id:Km,diagram:t}},nS={id:Km,detector:iS,loader:oS},aS=nS,Zm="requirement",sS=t=>/^\s*requirement(Diagram)?/.test(t),lS=async()=>{let{diagram:t}=await import("./requirementDiagram-87253d64-NWSWUYME.js");return{id:Zm,diagram:t}},cS={id:Zm,detector:sS,loader:lS},uS=cS,Qm="sequence",hS=t=>/^\s*sequenceDiagram/.test(t),fS=async()=>{let{diagram:t}=await import("./sequenceDiagram-6894f283-5D2YHBFE.js");return{id:Qm,diagram:t}},pS={id:Qm,detector:hS,loader:fS},dS=pS,Jm="class",mS=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},gS=async()=>{let{diagram:t}=await import("./classDiagram-fb54d2a0-FQDEDLPC.js");return{id:Jm,diagram:t}},xS={id:Jm,detector:mS,loader:gS},yS=xS,tg="classDiagram",_S=(t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},CS=async()=>{let{diagram:t}=await import("./classDiagram-v2-a2b738ad-K7S7AM4Z.js");return{id:tg,diagram:t}},bS={id:tg,detector:_S,loader:CS},TS=bS,eg="state",vS=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},kS=async()=>{let{diagram:t}=await import("./stateDiagram-5dee940d-44PZGWOL.js");return{id:eg,diagram:t}},SS={id:eg,detector:vS,loader:kS},wS=SS,rg="stateDiagram",AS=(t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},BS=async()=>{let{diagram:t}=await import("./stateDiagram-v2-1992cada-QHLSSAFC.js");return{id:rg,diagram:t}},FS={id:rg,detector:AS,loader:BS},MS=FS,ig="journey",LS=t=>/^\s*journey/.test(t),ES=async()=>{let{diagram:t}=await import("./journeyDiagram-6625b456-O53Z77EJ.js");return{id:ig,diagram:t}},OS={id:ig,detector:LS,loader:ES},IS=OS,DS=function(t,e){for(let r of e)t.attr(r[0],r[1])},NS=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},og=function(t,e,r,i){let o=NS(e,r,i);DS(t,o)},PS=function(t,e,r,i){let o=e.node().getBBox(),n=o.width,a=o.height;Y.info(`SVG bounds: ${n}x${a}`,o);let s=0,l=0;Y.info(`Graph bounds: ${s}x${l}`,t),s=n+r*2,l=a+r*2,Y.info(`Calculated bounds: ${s}x${l}`),og(e,l,s,i);let c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",c)},sa={},RS=(t,e,r)=>{let i="";return t in sa&&sa[t]?i=sa[t](r):Y.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} `},$S=(t,e)=>{e!==void 0&&(sa[t]=e)},zS=RS,Wl="",Ul="",Hl="",Yl=t=>bo(t,xe()),qS=()=>{Wl="",Hl="",Ul=""},WS=t=>{Wl=Yl(t).replace(/^\s+/g,"")},US=()=>Wl,HS=t=>{Hl=Yl(t).replace(/\n\s+/g,` `)},YS=()=>Hl,jS=t=>{Ul=Yl(t)},GS=()=>Ul,VS=Object.freeze(Object.defineProperty({__proto__:null,clear:qS,getAccDescription:YS,getAccTitle:US,getDiagramTitle:GS,setAccDescription:HS,setAccTitle:WS,setDiagramTitle:jS},Symbol.toStringTag,{value:"Module"})),XS=Y,KS=Pl,jl=xe,gq=Rm,xq=wi,ZS=t=>bo(t,jl()),QS=PS,JS=()=>VS,fa={},pa=(t,e,r)=>{var i;if(fa[t])throw new Error(`Diagram ${t} already registered.`);fa[t]=e,r&&Lm(t,r),$S(t,e.styles),(i=e.injectUtils)==null||i.call(e,XS,KS,jl,ZS,QS,JS(),()=>{})},Gl=t=>{if(t in fa)return fa[t];throw new Dl(t)},Dl=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},tw=t=>{var n;var e;let{securityLevel:r}=jl(),i=Ht("body");if(r==="sandbox"){let s=(n=(e=Ht(`#i${t}`).node())==null?void 0:e.contentDocument)!=null?n:document;i=Ht(s.body)}return i.select(`#${t}`)},ew=(t,e,r)=>{Y.debug(`rendering svg for syntax error `);let i=tw(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),og(i,100,512,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},ng={draw:ew},rw=ng,iw={db:{},renderer:ng,parser:{parser:{yy:{}},parse:()=>{}}},ow=iw,ag="flowchart-elk",nw=(t,e)=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},aw=async()=>{let{diagram:t}=await import("./flowchart-elk-definition-ae0efee6-TSVAZW3F.js");return{id:ag,diagram:t}},sw={id:ag,detector:nw,loader:aw},lw=sw,sg="timeline",cw=t=>/^\s*timeline/.test(t),uw=async()=>{let{diagram:t}=await import("./timeline-definition-bf702344-DOX5WOWH.js");return{id:sg,diagram:t}},hw={id:sg,detector:cw,loader:uw},fw=hw,lg="mindmap",pw=t=>/^\s*mindmap/.test(t),dw=async()=>{let{diagram:t}=await import("./mindmap-definition-307c710a-ZJ3HI2GM.js");return{id:lg,diagram:t}},mw={id:lg,detector:pw,loader:dw},gw=mw,cg="sankey",xw=t=>/^\s*sankey-beta/.test(t),yw=async()=>{let{diagram:t}=await import("./sankeyDiagram-707fac0f-AC4DBC4J.js");return{id:cg,diagram:t}},_w={id:cg,detector:xw,loader:yw},Cw=_w,ug="block",bw=t=>/^\s*block-beta/.test(t),Tw=async()=>{let{diagram:t}=await import("./blockDiagram-9f4a6865-YLBNZ57F.js");return{id:ug,diagram:t}},vw={id:ug,detector:bw,loader:Tw},kw=vw,um=!1,Vl=()=>{um||(um=!0,pa("error",ow,t=>t.toLowerCase().trim()==="error"),pa("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},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("---")),Mm(wk,TS,yS,Rk,jk,Xk,Qk,uS,dS,lw,Ik,Mk,gw,fw,Wk,MS,wS,IS,rS,Cw,aS,kw))},da=class{constructor(e,r={}){this.text=e,this.metadata=r,this.type="graph",this.text=mk(e),this.text+=` `;let i=xe();try{this.type=ba(e,i)}catch(n){this.type="error",this.detectError=n}let o=Gl(this.type);Y.debug("Type "+this.type),this.db=o.db,this.renderer=o.renderer,this.parser=o.parser,this.parser.parser.yy=this.db,this.init=o.init,this.parse()}parse(){var e,r,i,o,n;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e);let a=xe();(i=this.init)==null||i.call(this,a),this.metadata.title&&((n=(o=this.db).setDiagramTitle)==null||n.call(o,this.metadata.title)),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}},Sw=async(t,e={})=>{let r=ba(t,xe());try{Gl(r)}catch(i){let o=Hv(r);if(!o)throw new ca(`Diagram ${r} not found.`);let{id:n,diagram:a}=await o();pa(n,a)}return new da(t,e)},hm=[],ww=()=>{hm.forEach(t=>{t()}),hm=[]},Aw="graphics-document document";function Bw(t,e){t.attr("role",Aw),e!==""&&t.attr("aria-roledescription",e)}function Fw(t,e,r,i){if(t.insert!==void 0){if(r){let o=`chart-desc-${i}`;t.attr("aria-describedby",o),t.insert("desc",":first-child").attr("id",o).text(r)}if(e){let o=`chart-title-${i}`;t.attr("aria-labelledby",o),t.insert("title",":first-child").attr("id",o).text(e)}}}var Mw=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();function hg(t){return typeof t=="undefined"||t===null}function Lw(t){return typeof t=="object"&&t!==null}function Ew(t){return Array.isArray(t)?t:hg(t)?[]:[t]}function Ow(t,e){var r,i,o,n;if(e)for(n=Object.keys(e),r=0,i=n.length;rs&&(n=" ... ",e=i-s+n.length),r-i>s&&(a=" ...",r=i+s-a.length),{str:n+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:i-e+n.length}}function Al(t,e){return zt.repeat(" ",e-t.length)+t}function Ww(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],o=[],n,a=-1;n=r.exec(t.buffer);)o.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s="",l,c,h=Math.min(t.line+e.linesAfter,o.length).toString().length,f=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)c=wl(t.buffer,i[a-l],o[a-l],t.position-(i[a]-i[a-l]),f),s=zt.repeat(" ",e.indent)+Al((t.line-l+1).toString(),h)+" | "+c.str+` `+s;for(c=wl(t.buffer,i[a],o[a],t.position,f),s+=zt.repeat(" ",e.indent)+Al((t.line+1).toString(),h)+" | "+c.str+` `,s+=zt.repeat("-",e.indent+h+3+c.pos)+`^ `,l=1;l<=e.linesAfter&&!(a+l>=o.length);l++)c=wl(t.buffer,i[a+l],o[a+l],t.position-(i[a]-i[a+l]),f),s+=zt.repeat(" ",e.indent)+Al((t.line+l+1).toString(),h)+" | "+c.str+` `;return s.replace(/\n$/,"")}var Uw=Ww,Hw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Yw=["scalar","sequence","mapping"];function jw(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function Gw(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(Hw.indexOf(r)===-1)throw new Ie('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=jw(e.styleAliases||null),Yw.indexOf(this.kind)===-1)throw new Ie('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Dt=Gw;function fm(t,e){var r=[];return t[e].forEach(function(i){var o=r.length;r.forEach(function(n,a){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(o=a)}),r[o]=i}),r}function Vw(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(o){o.multi?(t.multi[o.kind].push(o),t.multi.fallback.push(o)):t[o.kind][o.tag]=t.fallback[o.tag]=o}for(e=0,r=arguments.length;e=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"]}}),mA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function gA(t){return!(t===null||!mA.test(t)||t[t.length-1]==="_")}function xA(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 yA=/^[-+]?[0-9]+e/;function _A(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(zt.isNegativeZero(t))return"-0.0";return r=t.toString(10),yA.test(r)?r.replace("e",".e"):r}function CA(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||zt.isNegativeZero(t))}var bA=new Dt("tag:yaml.org,2002:float",{kind:"scalar",resolve:gA,construct:xA,predicate:CA,represent:_A,defaultStyle:"lowercase"}),pg=Jw.extend({implicit:[iA,sA,dA,bA]}),TA=pg,dg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),mg=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 vA(t){return t===null?!1:dg.exec(t)!==null||mg.exec(t)!==null}function kA(t){var e,r,i,o,n,a,s,l=0,c=null,h,f,u;if(e=dg.exec(t),e===null&&(e=mg.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(n=+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]&&(h=+e[10],f=+(e[11]||0),c=(h*60+f)*6e4,e[9]==="-"&&(c=-c)),u=new Date(Date.UTC(r,i,o,n,a,s,l)),c&&u.setTime(u.getTime()-c),u}function SA(t){return t.toISOString()}var wA=new Dt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:vA,construct:kA,instanceOf:Date,represent:SA});function AA(t){return t==="<<"||t===null}var BA=new Dt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:AA}),Xl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function FA(t){if(t===null)return!1;var e,r,i=0,o=t.length,n=Xl;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8===0}function MA(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,n=Xl,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|n.indexOf(i.charAt(e));return r=o%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 LA(t){var e="",r=0,i,o,n=t.length,a=Xl;for(i=0;i>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[i];return o=n%3,o===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):o===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):o===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function EA(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var OA=new Dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:FA,construct:MA,predicate:EA,represent:LA}),IA=Object.prototype.hasOwnProperty,DA=Object.prototype.toString;function NA(t){if(t===null)return!0;var e=[],r,i,o,n,a,s=t;for(r=0,i=s.length;r>10)+55296,(t-65536&1023)+56320)}var Cg=new Array(256),bg=new Array(256);for(Or=0;Or<256;Or++)Cg[Or]=mm(Or)?1:0,bg[Or]=mm(Or);var Or;function rB(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||GA,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 Tg(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=Uw(r),new Ie(e,r)}function U(t,e){throw Tg(t,e)}function xa(t,e){t.onWarning&&t.onWarning.call(null,Tg(t,e))}var gm={YAML:function(e,r,i){var o,n,a;e.version!==null&&U(e,"duplication of %YAML directive"),i.length!==1&&U(e,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&U(e,"ill-formed argument of the YAML directive"),n=parseInt(o[1],10),a=parseInt(o[2],10),n!==1&&U(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&xa(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var o,n;i.length!==2&&U(e,"TAG directive accepts exactly two arguments"),o=i[0],n=i[1],yg.test(o)||U(e,"ill-formed tag handle (first argument) of the TAG directive"),rr.call(e.tagMap,o)&&U(e,'there is a previously declared suffix for "'+o+'" tag handle'),_g.test(n)||U(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(a){U(e,"tag prefix is malformed: "+n)}e.tagMap[o]=n}};function er(t,e,r,i){var o,n,a,s;if(e1&&(t.result+=zt.repeat(` `,e-1))}function iB(t,e,r){var i,o,n,a,s,l,c,h,f=t.kind,u=t.result,p;if(p=t.input.charCodeAt(t.position),Vt(p)||vi(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)&&(o=t.input.charCodeAt(t.position+1),Vt(o)||r&&vi(o)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,s=!1;p!==0;){if(p===58){if(o=t.input.charCodeAt(t.position+1),Vt(o)||r&&vi(o))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),Vt(i))break}else{if(t.position===t.lineStart&&va(t)||r&&vi(p))break;if(ge(p))if(l=t.line,c=t.lineStart,h=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=h;break}}s&&(er(t,n,a,!1),Zl(t,t.line-l),n=a=t.position,s=!1),Ir(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return er(t,n,a,!1),t.result?!0:(t.kind=f,t.result=u,!1)}function oB(t,e){var r,i,o;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(er(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,o=t.position;else return!0;else ge(r)?(er(t,i,o,!0),Zl(t,dt(t,!1,e)),i=o=t.position):t.position===t.lineStart&&va(t)?U(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);U(t,"unexpected end of the stream within a single quoted scalar")}function nB(t,e){var r,i,o,n,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 er(t,r,t.position,!0),t.position++,!0;if(s===92){if(er(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),ge(s))dt(t,!1,e);else if(s<256&&Cg[s])t.result+=bg[s],t.position++;else if((a=JA(s))>0){for(o=a,n=0;o>0;o--)s=t.input.charCodeAt(++t.position),(a=QA(s))>=0?n=(n<<4)+a:U(t,"expected hexadecimal character");t.result+=eB(n),t.position++}else U(t,"unknown escape sequence");r=i=t.position}else ge(s)?(er(t,r,i,!0),Zl(t,dt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&va(t)?U(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}U(t,"unexpected end of the stream within a double quoted scalar")}function aB(t,e){var r=!0,i,o,n,a=t.tag,s,l=t.anchor,c,h,f,u,p,x=Object.create(null),_,T,S,v;if(v=t.input.charCodeAt(t.position),v===91)h=93,p=!1,s=[];else if(v===123)h=125,p=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),v=t.input.charCodeAt(++t.position);v!==0;){if(dt(t,!0,e),v=t.input.charCodeAt(t.position),v===h)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=s,!0;r?v===44&&U(t,"expected the node content, but found ','"):U(t,"missed comma between flow collection entries"),T=_=S=null,f=u=!1,v===63&&(c=t.input.charCodeAt(t.position+1),Vt(c)&&(f=u=!0,t.position++,dt(t,!0,e))),i=t.line,o=t.lineStart,n=t.position,Bi(t,e,ma,!1,!0),T=t.tag,_=t.result,dt(t,!0,e),v=t.input.charCodeAt(t.position),(u||t.line===i)&&v===58&&(f=!0,v=t.input.charCodeAt(++t.position),dt(t,!0,e),Bi(t,e,ma,!1,!0),S=t.result),p?ki(t,s,x,T,_,S,i,o,n):f?s.push(ki(t,null,x,T,_,S,i,o,n)):s.push(_),dt(t,!0,e),v=t.input.charCodeAt(t.position),v===44?(r=!0,v=t.input.charCodeAt(++t.position)):r=!1}U(t,"unexpected end of the stream within a flow collection")}function sB(t,e){var r,i,o=Bl,n=!1,a=!1,s=e,l=0,c=!1,h,f;if(f=t.input.charCodeAt(t.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)Bl===o?o=f===43?pm:VA:U(t,"repeat of a chomping mode identifier");else if((h=tB(f))>=0)h===0?U(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?U(t,"repeat of an indentation width identifier"):(s=e+h-1,a=!0);else break;if(Ir(f)){do f=t.input.charCodeAt(++t.position);while(Ir(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!ge(f)&&f!==0)}for(;f!==0;){for(Kl(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!a||t.lineIndents&&(s=t.lineIndent),ge(f)){l++;continue}if(t.lineIndente)&&l!==0)U(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(T&&(a=t.line,s=t.lineStart,l=t.position),Bi(t,e,ga,!0,o)&&(T?x=t.result:_=t.result),T||(ki(t,f,u,p,x,_,a,s,l),p=x=_=null),dt(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&v!==0)U(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),f=0,u=t.implicitTypes.length;f"),t.result!==null&&x.kind!==t.kind&&U(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)):U(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function fB(t){var e=t.position,r,i,o,n=!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(n=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!Vt(a);)a=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),o=[],i.length<1&&U(t,"directive name must not be less than one character in length");a!==0;){for(;Ir(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!ge(a));break}if(ge(a))break;for(r=t.position;a!==0&&!Vt(a);)a=t.input.charCodeAt(++t.position);o.push(t.input.slice(r,t.position))}a!==0&&Kl(t),rr.call(gm,i)?gm[i](t,i,o):xa(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)):n&&U(t,"directives end mark is expected"),Bi(t,t.lineIndent-1,ga,!1,!0),dt(t,!0,-1),t.checkLineBreaks&&KA.test(t.input.slice(e,t.position))&&xa(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&va(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,dt(t,!0,-1));return}if(t.positiont.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),TB=t=>{let{text:e,metadata:r}=CB(t),{displayMode:i,title:o,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},vB=t=>{var i;let e=(i=_o.detectInit(t))!=null?i:{},r=_o.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:o})=>{}):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:Xv(t),directive:e}};function kg(t){let e=bB(t),r=TB(e),i=vB(r.text),o=Dm(r.config,i.directive);return t=Mw(i.text),{code:t,title:r.title,config:o}}var kB=5e4,SB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",wB="sandbox",AB="loose",BB="http://www.w3.org/2000/svg",FB="http://www.w3.org/1999/xlink",MB="http://www.w3.org/1999/xhtml",LB="100%",EB="100%",OB="border:0;margin:0;",IB="margin:0",DB="allow-top-navigation-by-user-activation allow-popups",NB='The "iframe" tag is not supported by your browser.',PB=["foreignobject"],RB=["dominant-baseline"];function Sg(t){var r;let e=kg(t);return ha(),Ck((r=e.config)!=null?r:{}),e}async function $B(t,e){Vl(),t=Sg(t).code;try{await Ql(t)}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}var _m=(t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,zB=(t,e={})=>{var r;let i="";if(t.themeCSS!==void 0&&(i+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(i+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(i+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!Gn(e)){let s=t.htmlLabels||((r=t.flowchart)==null?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(let l in e){let c=e[l];Gn(c.styles)||s.forEach(h=>{i+=_m(c.id,h,c.styles)}),Gn(c.textStyles)||(i+=_m(c.id,"tspan",c.textStyles))}}return i},qB=(t,e,r,i)=>{let o=zB(t,r),n=zS(e,o,t.themeVariables);return na(em(`${i}{${n}}`),rm)},WB=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=gk(i),i=i.replace(/
/g,"
"),i},UB=(t="",e)=>{var r,i;let o=(i=(r=e==null?void 0:e.viewBox)==null?void 0:r.baseVal)!=null&&i.height?e.viewBox.baseVal.height+"px":EB,n=btoa(''+t+"");return``},Cm=(t,e,r,i,o)=>{let n=t.append("div");n.attr("id",r),i&&n.attr("style",i);let a=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",BB);return o&&a.attr("xmlns:xlink",o),a.append("g"),t};function bm(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}var HB=(t,e,r,i)=>{var o,n,a;(o=t.getElementById(e))==null||o.remove(),(n=t.getElementById(r))==null||n.remove(),(a=t.getElementById(i))==null||a.remove()},YB=async function(t,e,r){var X;var i,o,n,a,s,l;Vl();let c=Sg(e);e=c.code;let h=xe();Y.debug(h),e.length>((X=h==null?void 0:h.maxTextSize)!=null?X:kB)&&(e=SB);let f="#"+t,u="i"+t,p="#"+u,x="d"+t,_="#"+x,T=Ht("body"),S=h.securityLevel===wB,v=h.securityLevel===AB,M=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),S){let V=bm(Ht(r),u);T=Ht(V.nodes()[0].contentDocument.body),T.node().style.margin=0}else T=Ht(r);Cm(T,t,x,`font-family: ${M}`,FB)}else{if(HB(document,t,x,u),S){let V=bm(Ht("body"),u);T=Ht(V.nodes()[0].contentDocument.body),T.node().style.margin=0}else T=Ht("body");Cm(T,t,x)}let E,I;try{E=await Ql(e,{title:c.title})}catch(V){E=new da("error"),I=V}let B=T.select(_).node(),y=E.type,$=B.firstChild,et=$.firstChild,rt=(o=(i=E.renderer).getClasses)==null?void 0:o.call(i,e,E),b=qB(h,y,rt,f),C=document.createElement("style");C.innerHTML=b,$.insertBefore(C,et);try{await E.renderer.draw(e,t,lm,E)}catch(V){throw rw.draw(e,t,lm),V}let g=T.select(`${_} svg`),w=(a=(n=E.db).getAccTitle)==null?void 0:a.call(n),F=(l=(s=E.db).getAccDescription)==null?void 0:l.call(s);GB(y,g,w,F),T.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",MB);let D=T.select(_).node().innerHTML;if(Y.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),D=WB(D,S,wm(h.arrowMarkerAbsolute)),S){let V=T.select(_+" svg").node();D=UB(D,V)}else v||(D=Dr.default.sanitize(D,{ADD_TAGS:PB,ADD_ATTR:RB}));if(ww(),I)throw I;let j=Ht(S?p:_).node();return j&&"remove"in j&&j.remove(),{svg:D,bindFunctions:E.db.bindFunctions}};function jB(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),yk(t),t!=null&&t.theme&&t.theme in De?t.themeVariables=De[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=De.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?xk(t):Pm();Pl(r.logLevel),Vl()}var Ql=(t,e={})=>{let{code:r}=kg(t);return Sw(r,e)};function GB(t,e,r,i){Bw(e,t),Fw(e,r,i,e.attr("id"))}var Nr=Object.freeze({render:YB,parse:$B,getDiagramFromText:Ql,initialize:jB,getConfig:xe,setConfig:Rm,getSiteConfig:Pm,updateSiteConfig:_k,reset:()=>{ha()},globalReset:()=>{ha(wi)},defaultConfig:wi});Pl(xe().logLevel);ha(xe());var VB=async()=>{Y.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(Si).map(async([r,{detector:i,loader:o}])=>{if(o)try{Gl(r)}catch(n){try{let{diagram:a,id:s}=await o();pa(s,a,i)}catch(a){throw Y.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Si[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){Y.error(`Failed to load ${e.length} external diagrams`);for(let r of e)Y.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},XB=(t,e,r)=>{Y.warn(t),Im(t)?(r&&r(t.str,t.hash),e.push(re(ee({},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}))},wg=async function(t={querySelector:".mermaid"}){try{await KB(t)}catch(e){if(Im(e)&&Y.error(e.str),ye.parseError&&ye.parseError(e),!t.suppressErrors)throw Y.error("Use the suppressErrors option to suppress these errors"),e}},KB=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i=Nr.getConfig();Y.debug(`${t?"":"No "}Callback function found`);let o;if(r)o=r;else if(e)o=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");Y.debug(`Found ${o.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(Y.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Nr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));let n=new _o.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),a,s=[];for(let l of Array.from(o)){Y.info("Rendering diagram: "+l.id);if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let c=`mermaid-${n.next()}`;a=l.innerHTML,a=Sc(_o.entityDecode(a)).trim().replace(//gi,"
");let h=_o.detectInit(a);h&&Y.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:u}=await Mg(c,a,l);l.innerHTML=f,t&&await t(c),u&&u(l)}catch(f){XB(f,s,ye.parseError)}}if(s.length>0)throw s[0]},Ag=function(t){Nr.initialize(t)},ZB=async function(t,e,r){Y.warn("mermaid.init is deprecated. Please use run instead."),t&&Ag(t);let i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await wg(i)},QB=async(t,{lazyLoad:e=!0}={})=>{Mm(...t),e===!1&&await VB()},Bg=function(){if(ye.startOnLoad){let{startOnLoad:t}=Nr.getConfig();t&&ye.run().catch(e=>Y.error("Mermaid failed to initialize",e))}};if(typeof document!="undefined"){window.addEventListener("load",Bg,!1)}var JB=function(t){ye.parseError=t},ya=[],Fl=!1,Fg=async()=>{if(!Fl){for(Fl=!0;ya.length>0;){let t=ya.shift();if(t)try{await t()}catch(e){Y.error("Error executing queue",e)}}Fl=!1}},tF=async(t,e)=>new Promise((r,i)=>{let o=()=>new Promise((n,a)=>{Nr.parse(t,e).then(s=>{n(s),r(s)},s=>{var l;Y.error("Error parsing",s),(l=ye.parseError)==null||l.call(ye,s),a(s),i(s)})});ya.push(o),Fg().catch(i)}),Mg=(t,e,r)=>new Promise((i,o)=>{let n=()=>new Promise((a,s)=>{Nr.render(t,e,r).then(l=>{a(l),i(l)},l=>{var c;Y.error("Error parsing",l),(c=ye.parseError)==null||c.call(ye,l),s(l),o(l)})});ya.push(n),Fg().catch(o)}),ye={startOnLoad:!0,mermaidAPI:Nr,parse:tF,render:Mg,init:ZB,run:wg,registerExternalDiagrams:QB,initialize:Ag,parseError:void 0,contentLoaded:Bg,setParseErrorHandler:JB,detectType:ba};export{Sc as a,wc as b,Ac as c,Bc as d,Fc as e,T0 as f,v0 as g,Ht as h,Cx as i,Ix as j,SC as k,Ui as l,ds as m,As as n,gr as o,pe as p,Qr as q,Jr as r,we as s,Ae as t,ti as u,gh as v,xh as w,ze as x,yh as y,_h as z,ri as A,nn as B,jh as C,__ as D,B_ as E,Zi as F,F_ as G,M_ as H,qs as I,Jf as J,je as K,IC as L,Ar as M,z as N,H as O,ft as P,ui as Q,se as R,Yt as S,hi as T,Ge as U,ho as V,Nn as W,$p as X,xi as Y,qp as Z,jp as _,Cl as $,Gp as aa,Vp as ba,Xp as ca,Rn as da,Qp as ea,me as fa,Br as ga,Fr as ha,$n as ia,Je as ja,td as ka,yi as la,ad as ma,ld as na,vl as oa,_i as pa,hd as qa,fd as ra,zn as sa,dd as ta,qn as ua,Wn as va,vd as wa,kd as xa,Ad as ya,Bd as za,Fd as Aa,Ld as Ba,Od as Ca,Yn as Da,$d as Ea,Gn as Fa,Y as Ga,vo as Ha,bo as Ia,wm as Ja,uq as Ka,nm as La,hq as Ma,Mv as Na,Rl as Oa,Nv as Pa,qv as Qa,It as Ra,Yv as Sa,Zv as Ta,ok as Ua,nk as Va,sk as Wa,uk as Xa,fk as Ya,ua as Za,ql as _a,Dm as $a,_o as ab,gk as bb,xe as cb,og as db,PS as eb,qS as fb,WS as gb,US as hb,HS as ib,YS as jb,jS as kb,GS as lb,VS as mb,jl as nb,gq as ob,xq as pb,QS as qb,tw as rb,ye as sb}; /*! Bundled license information: dompurify/dist/purify.js: (*! @license DOMPurify 3.0.6 | (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.6/LICENSE *) mermaid/dist/mermaid-6dc72991.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 *) */