tag; it should be "scalar", not "'+t.kind+'"'),d=0,p=t.implicitTypes.length;d"),t.result!==null&&g.kind!==t.kind&&or(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):or(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||f}function Ize(t){var e=t.position,r,i,n,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Zn(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!bo(s);)s=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&or(t,"directive name must not be less than one character in length");s!==0;){for(;S0(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!wu(s));break}if(wu(s))break;for(r=t.position;s!==0&&!bo(s);)s=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}s!==0&&BI(t),ld.call(_ne,i)?_ne[i](t,i,n):J3(t,'unknown document directive "'+i+'"')}if(Zn(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,Zn(t,!0,-1)):a&&or(t,"directives end mark is expected"),A1(t,t.lineIndent-1,Z3,!1,!0),Zn(t,!0,-1),t.checkLineBreaks&&yze.test(t.input.slice(e,t.position))&&J3(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&r5(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Zn(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var i=Jne(t,r);if(typeof e!="function")return i;for(var n=0,a=i.length;n=55296&&r<=56319&&e+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function lae(t){var e=/^\n* /;return e.test(t)}function cGe(t,e,r,i,n,a,s,l){var u,h=0,f=null,d=!1,p=!1,m=i!==-1,g=-1,y=oGe(pb(t,0))&&lGe(pb(t,t.length-1));if(e||s)for(u=0;u=65536?u+=2:u++){if(h=pb(t,u),!vb(h))return w1;y=y&&Ine(h,f,l),f=h}else{for(u=0;u=65536?u+=2:u++){if(h=pb(t,u),h===gb)d=!0,m&&(p=p||u-g-1>i&&t[g+1]!==" ",g=u);else if(!vb(h))return w1;y=y&&Ine(h,f,l),f=h}p=p||m&&u-g-1>i&&t[g+1]!==" "}return!d&&!p?y&&!s&&!n(t)?cae:a===yb?w1:MI:r>9&&lae(t)?w1:s?a===yb?w1:MI:p?hae:uae}function uGe(t,e,r,i,n){t.dump=(function(){if(e.length===0)return t.quotingType===yb?'""':"''";if(!t.noCompatMode&&(eGe.indexOf(e)!==-1||tGe.test(e)))return t.quotingType===yb?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=i||t.flowLevel>-1&&r>=t.flowLevel;function u(h){return sGe(t,h)}switch(o(u,"testAmbiguity"),cGe(e,l,t.indent,s,u,t.quotingType,t.forceQuotes&&!i,n)){case cae:return e;case MI:return"'"+e.replace(/'/g,"''")+"'";case uae:return"|"+Mne(e,t.indent)+One(Rne(e,a));case hae:return">"+Mne(e,t.indent)+One(Rne(hGe(e,s),a));case w1:return'"'+fGe(e)+'"';default:throw new xo("impossible error: invalid scalar style")}})()}function Mne(t,e){var r=lae(t)?String(e):"",i=t[t.length-1]===`
-`,n=i&&(t[t.length-2]===`
-`||t===`
+ ${t}
+`},"getStyles"),tX=o((e,t)=>{t!==void 0&&(gk[e]=t)},"addStylesForDiagram"),rX=dOe});var wv={};xr(wv,{clear:()=>gr,getAccDescription:()=>Sr,getAccTitle:()=>kr,getDiagramTitle:()=>Er,setAccDescription:()=>wr,setAccTitle:()=>Cr,setDiagramTitle:()=>Ar});var PD,BD,FD,$D,gr,Cr,kr,wr,Sr,Ar,Er,Ci=z(()=>{"use strict";Ir();br();PD="",BD="",FD="",$D=o(e=>fr(e,Nt()),"sanitizeText"),gr=o(()=>{PD="",FD="",BD=""},"clear"),Cr=o(e=>{PD=$D(e).replace(/^\s+/g,"")},"setAccTitle"),kr=o(()=>PD,"getAccTitle"),wr=o(e=>{FD=$D(e).replace(/\n\s+/g,`
+`)},"setAccDescription"),Sr=o(()=>FD,"getAccDescription"),Ar=o(e=>{BD=$D(e)},"setDiagramTitle"),Er=o(()=>BD,"getDiagramTitle")});var iX,fOe,ge,Sv,vk,Ev,Av,pOe,yk,Kf,_v,zD,Ut=z(()=>{"use strict";Xf();St();br();Ir();Di();OD();Ci();iX=Z,fOe=Zy,ge=Nt,Sv=OC,vk=Ph,Ev=o(e=>fr(e,ge()),"sanitizeText"),Av=Io,pOe=o(()=>wv,"getCommonDb"),yk={},Kf=o((e,t,r)=>{yk[e]&&iX.warn(`Diagram with id ${e} already registered. Overwriting.`),yk[e]=t,r&&MD(e,r),tX(e,t.styles),t.injectUtils?.(iX,fOe,ge,Ev,Av,pOe(),()=>{})},"registerDiagram"),_v=o(e=>{if(e in yk)return yk[e];throw new zD(e)},"getDiagram"),zD=class extends Error{static{o(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}});var yl,Vh,Xa,gl,hc,Dv,GD,VD,xk,bk,nX,mOe,gOe,yOe,vOe,xOe,bOe,TOe,COe,kOe,wOe,SOe,EOe,AOe,_Oe,DOe,ROe,LOe,aX,MOe,NOe,sX,IOe,OOe,POe,BOe,Wh,FOe,$Oe,zOe,GOe,VOe,Rv,WD=z(()=>{"use strict";Ut();Ir();Ci();yl=[],Vh=[""],Xa="global",gl="",hc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Dv=[],GD="",VD=!1,xk=4,bk=2,mOe=o(function(){return nX},"getC4Type"),gOe=o(function(e){nX=fr(e,ge())},"setC4Type"),yOe=o(function(e,t,r,i,n,a,s,l,u){if(e==null||t===void 0||t===null||r===void 0||r===null||i===void 0||i===null)return;let h={},d=Dv.find(f=>f.from===t&&f.to===r);if(d?h=d:Dv.push(h),h.type=e,h.from=t,h.to=r,h.label={text:i},n==null)h.techn={text:""};else if(typeof n=="object"){let[f,p]=Object.entries(n)[0];h[f]={text:p}}else h.techn={text:n};if(a==null)h.descr={text:""};else if(typeof a=="object"){let[f,p]=Object.entries(a)[0];h[f]={text:p}}else h.descr={text:a};if(typeof s=="object"){let[f,p]=Object.entries(s)[0];h[f]=p}else h.sprite=s;if(typeof l=="object"){let[f,p]=Object.entries(l)[0];h[f]=p}else h.tags=l;if(typeof u=="object"){let[f,p]=Object.entries(u)[0];h[f]=p}else h.link=u;h.wrap=Wh()},"addRel"),vOe=o(function(e,t,r,i,n,a,s){if(t===null||r===null)return;let l={},u=yl.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,yl.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.descr={text:""};else if(typeof i=="object"){let[h,d]=Object.entries(i)[0];l[h]={text:d}}else l.descr={text:i};if(typeof n=="object"){let[h,d]=Object.entries(n)[0];l[h]=d}else l.sprite=n;if(typeof a=="object"){let[h,d]=Object.entries(a)[0];l[h]=d}else l.tags=a;if(typeof s=="object"){let[h,d]=Object.entries(s)[0];l[h]=d}else l.link=s;l.typeC4Shape={text:e},l.parentBoundary=Xa,l.wrap=Wh()},"addPersonOrSystem"),xOe=o(function(e,t,r,i,n,a,s,l){if(t===null||r===null)return;let u={},h=yl.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,yl.push(u)),r==null?u.label={text:""}:u.label={text:r},i==null)u.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.techn={text:i};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];u[d]=f}else u.sprite=a;if(typeof s=="object"){let[d,f]=Object.entries(s)[0];u[d]=f}else u.tags=s;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];u[d]=f}else u.link=l;u.wrap=Wh(),u.typeC4Shape={text:e},u.parentBoundary=Xa},"addContainer"),bOe=o(function(e,t,r,i,n,a,s,l){if(t===null||r===null)return;let u={},h=yl.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,yl.push(u)),r==null?u.label={text:""}:u.label={text:r},i==null)u.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.techn={text:i};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];u[d]=f}else u.sprite=a;if(typeof s=="object"){let[d,f]=Object.entries(s)[0];u[d]=f}else u.tags=s;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];u[d]=f}else u.link=l;u.wrap=Wh(),u.typeC4Shape={text:e},u.parentBoundary=Xa},"addComponent"),TOe=o(function(e,t,r,i,n){if(e===null||t===null)return;let a={},s=hc.find(l=>l.alias===e);if(s&&e===s.alias?a=s:(a.alias=e,hc.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.tags=i;if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.link=n;a.parentBoundary=Xa,a.wrap=Wh(),gl=Xa,Xa=e,Vh.push(gl)},"addPersonOrSystemBoundary"),COe=o(function(e,t,r,i,n){if(e===null||t===null)return;let a={},s=hc.find(l=>l.alias===e);if(s&&e===s.alias?a=s:(a.alias=e,hc.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.tags=i;if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.link=n;a.parentBoundary=Xa,a.wrap=Wh(),gl=Xa,Xa=e,Vh.push(gl)},"addContainerBoundary"),kOe=o(function(e,t,r,i,n,a,s,l){if(t===null||r===null)return;let u={},h=hc.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,hc.push(u)),r==null?u.label={text:""}:u.label={text:r},i==null)u.type={text:"node"};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.type={text:i};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.descr={text:n};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];u[d]=f}else u.tags=s;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];u[d]=f}else u.link=l;u.nodeType=e,u.parentBoundary=Xa,u.wrap=Wh(),gl=Xa,Xa=t,Vh.push(gl)},"addDeploymentNode"),wOe=o(function(){Xa=gl,Vh.pop(),gl=Vh.pop(),Vh.push(gl)},"popBoundaryParseStack"),SOe=o(function(e,t,r,i,n,a,s,l,u,h,d){let f=yl.find(p=>p.alias===t);if(!(f===void 0&&(f=hc.find(p=>p.alias===t),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];f[p]=m}else f.bgColor=r;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];f[p]=m}else f.fontColor=i;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];f[p]=m}else f.borderColor=n;if(a!=null)if(typeof a=="object"){let[p,m]=Object.entries(a)[0];f[p]=m}else f.shadowing=a;if(s!=null)if(typeof s=="object"){let[p,m]=Object.entries(s)[0];f[p]=m}else f.shape=s;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];f[p]=m}else f.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];f[p]=m}else f.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];f[p]=m}else f.legendText=h;if(d!=null)if(typeof d=="object"){let[p,m]=Object.entries(d)[0];f[p]=m}else f.legendSprite=d}},"updateElStyle"),EOe=o(function(e,t,r,i,n,a,s){let l=Dv.find(u=>u.from===t&&u.to===r);if(l!==void 0){if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.textColor=i;if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.lineColor=n;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[u,h]=Object.entries(s)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(s)}},"updateRelStyle"),AOe=o(function(e,t,r){let i=xk,n=bk;if(typeof t=="object"){let a=Object.values(t)[0];i=parseInt(a)}else i=parseInt(t);if(typeof r=="object"){let a=Object.values(r)[0];n=parseInt(a)}else n=parseInt(r);i>=1&&(xk=i),n>=1&&(bk=n)},"updateLayoutConfig"),_Oe=o(function(){return xk},"getC4ShapeInRow"),DOe=o(function(){return bk},"getC4BoundaryInRow"),ROe=o(function(){return Xa},"getCurrentBoundaryParse"),LOe=o(function(){return gl},"getParentBoundaryParse"),aX=o(function(e){return e==null?yl:yl.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),MOe=o(function(e){return yl.find(t=>t.alias===e)},"getC4Shape"),NOe=o(function(e){return Object.keys(aX(e))},"getC4ShapeKeys"),sX=o(function(e){return e==null?hc:hc.filter(t=>t.parentBoundary===e)},"getBoundaries"),IOe=sX,OOe=o(function(){return Dv},"getRels"),POe=o(function(){return GD},"getTitle"),BOe=o(function(e){VD=e},"setWrap"),Wh=o(function(){return VD},"autoWrap"),FOe=o(function(){yl=[],hc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],gl="",Xa="global",Vh=[""],Dv=[],Vh=[""],GD="",VD=!1,xk=4,bk=2},"clear"),$Oe={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},zOe={FILLED:0,OPEN:1},GOe={LEFTOF:0,RIGHTOF:1,OVER:2},VOe=o(function(e){GD=fr(e,ge())},"setTitle"),Rv={addPersonOrSystem:vOe,addPersonOrSystemBoundary:TOe,addContainer:xOe,addContainerBoundary:COe,addComponent:bOe,addDeploymentNode:kOe,popBoundaryParseStack:wOe,addRel:yOe,updateElStyle:SOe,updateRelStyle:EOe,updateLayoutConfig:AOe,autoWrap:Wh,setWrap:BOe,getC4ShapeArray:aX,getC4Shape:MOe,getC4ShapeKeys:NOe,getBoundaries:sX,getBoundarys:IOe,getCurrentBoundaryParse:ROe,getParentBoundaryParse:LOe,getRels:OOe,getTitle:POe,getC4Type:mOe,getC4ShapeInRow:_Oe,getC4BoundaryInRow:DOe,setAccTitle:Cr,getAccTitle:kr,getAccDescription:Sr,setAccDescription:wr,getConfig:o(()=>ge().c4,"getConfig"),clear:FOe,LINETYPE:$Oe,ARROWTYPE:zOe,PLACEMENT:GOe,setTitle:VOe,setC4Type:gOe}});function Zf(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}var qD=z(()=>{"use strict";o(Zf,"ascending")});function UD(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}var oX=z(()=>{"use strict";o(UD,"descending")});function Qf(e){let t,r,i;e.length!==2?(t=Zf,r=o((l,u)=>Zf(e(l),u),"compare2"),i=o((l,u)=>e(l)-u,"delta")):(t=e===Zf||e===UD?e:WOe,r=e,i=e);function n(l,u,h=0,d=l.length){if(h>>1;r(l[f],u)<0?h=f+1:d=f}while(h>>1;r(l[f],u)<=0?h=f+1:d=f}while(hh&&i(l[f-1],u)>-i(l[f],u)?f-1:f}return o(s,"center"),{left:n,center:s,right:a}}function WOe(){return 0}var HD=z(()=>{"use strict";qD();oX();o(Qf,"bisector");o(WOe,"zero")});function YD(e){return e===null?NaN:+e}var lX=z(()=>{"use strict";o(YD,"number")});var cX,uX,qOe,UOe,jD,hX=z(()=>{"use strict";qD();HD();lX();cX=Qf(Zf),uX=cX.right,qOe=cX.left,UOe=Qf(YD).center,jD=uX});function dX({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):r}function HOe({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function YOe({_intern:e,_key:t},r){let i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function jOe(e){return e!==null&&typeof e=="object"?e.valueOf():e}var Gm,fX=z(()=>{"use strict";Gm=class extends Map{static{o(this,"InternMap")}constructor(t,r=jOe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[i,n]of t)this.set(i,n)}get(t){return super.get(dX(this,t))}has(t){return super.has(dX(this,t))}set(t,r){return super.set(HOe(this,t),r)}delete(t){return super.delete(YOe(this,t))}};o(dX,"intern_get");o(HOe,"intern_set");o(YOe,"intern_delete");o(jOe,"keyof")});function Tk(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=a>=XOe?10:a>=KOe?5:a>=ZOe?2:1,l,u,h;return n<0?(h=Math.pow(10,-n)/s,l=Math.round(e*h),u=Math.round(t*h),l/ht&&--u,h=-h):(h=Math.pow(10,n)*s,l=Math.round(e/h),u=Math.round(t/h),l*ht&&--u),u0))return[];if(e===t)return[e];let i=t=n))return[];let l=a-n+1,u=new Array(l);if(i)if(s<0)for(let h=0;h{"use strict";XOe=Math.sqrt(50),KOe=Math.sqrt(10),ZOe=Math.sqrt(2);o(Tk,"tickSpec");o(Ck,"ticks");o(Lv,"tickIncrement");o(Vm,"tickStep")});function kk(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r=n)&&(r=n)}return r}var mX=z(()=>{"use strict";o(kk,"max")});function wk(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}var gX=z(()=>{"use strict";o(wk,"min")});function Sk(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(n);++i{"use strict";o(Sk,"range")});var qh=z(()=>{"use strict";hX();HD();mX();gX();yX();pX();fX()});function XD(e){return e}var vX=z(()=>{"use strict";o(XD,"default")});function QOe(e){return"translate("+e+",0)"}function JOe(e){return"translate(0,"+e+")"}function ePe(e){return t=>+e(t)}function tPe(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function rPe(){return!this.__axis}function bX(e,t){var r=[],i=null,n=null,a=6,s=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=e===Ak||e===Ek?-1:1,d=e===Ek||e===KD?"x":"y",f=e===Ak||e===ZD?QOe:JOe;function p(m){var g=i??(t.ticks?t.ticks.apply(t,r):t.domain()),y=n??(t.tickFormat?t.tickFormat.apply(t,r):XD),v=Math.max(a,0)+l,x=t.range(),b=+x[0]+u,T=+x[x.length-1]+u,w=(t.bandwidth?tPe:ePe)(t.copy(),u),C=m.selection?m.selection():m,k=C.selectAll(".domain").data([null]),E=C.selectAll(".tick").data(g,t).order(),A=E.exit(),N=E.enter().append("g").attr("class","tick"),P=E.select("line"),I=E.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(N),P=P.merge(N.append("line").attr("stroke","currentColor").attr(d+"2",h*a)),I=I.merge(N.append("text").attr("fill","currentColor").attr(d,h*v).attr("dy",e===Ak?"0em":e===ZD?"0.71em":"0.32em")),m!==C&&(k=k.transition(m),E=E.transition(m),P=P.transition(m),I=I.transition(m),A=A.transition(m).attr("opacity",xX).attr("transform",function(D){return isFinite(D=w(D))?f(D+u):this.getAttribute("transform")}),N.attr("opacity",xX).attr("transform",function(D){var _=this.parentNode.__axis;return f((_&&isFinite(_=_(D))?_:w(D))+u)})),A.remove(),k.attr("d",e===Ek||e===KD?s?"M"+h*s+","+b+"H"+u+"V"+T+"H"+h*s:"M"+u+","+b+"V"+T:s?"M"+b+","+h*s+"V"+u+"H"+T+"V"+h*s:"M"+b+","+u+"H"+T),E.attr("opacity",1).attr("transform",function(D){return f(w(D)+u)}),P.attr(d+"2",h*a),I.attr(d,h*v).text(y),C.filter(rPe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===KD?"start":e===Ek?"end":"middle"),C.each(function(){this.__axis=w})}return o(p,"axis"),p.scale=function(m){return arguments.length?(t=m,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(i=m==null?null:Array.from(m),p):i&&i.slice()},p.tickFormat=function(m){return arguments.length?(n=m,p):n},p.tickSize=function(m){return arguments.length?(a=s=+m,p):a},p.tickSizeInner=function(m){return arguments.length?(a=+m,p):a},p.tickSizeOuter=function(m){return arguments.length?(s=+m,p):s},p.tickPadding=function(m){return arguments.length?(l=+m,p):l},p.offset=function(m){return arguments.length?(u=+m,p):u},p}function QD(e){return bX(Ak,e)}function JD(e){return bX(ZD,e)}var Ak,KD,ZD,Ek,xX,TX=z(()=>{"use strict";vX();Ak=1,KD=2,ZD=3,Ek=4,xX=1e-6;o(QOe,"translateX");o(JOe,"translateY");o(ePe,"number");o(tPe,"center");o(rPe,"entering");o(bX,"axis");o(QD,"axisTop");o(JD,"axisBottom")});var CX=z(()=>{"use strict";TX()});function wX(){for(var e=0,t=arguments.length,r={},i;e=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}function aPe(e,t){for(var r=0,i=e.length,n;r{"use strict";iPe={value:o(()=>{},"value")};o(wX,"dispatch");o(_k,"Dispatch");o(nPe,"parseTypenames");_k.prototype=wX.prototype={constructor:_k,on:o(function(e,t){var r=this._,i=nPe(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),i=0,n,a;i{"use strict";SX()});var Dk,r8,i8=z(()=>{"use strict";Dk="http://www.w3.org/1999/xhtml",r8={svg:"http://www.w3.org/2000/svg",xhtml:Dk,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function dc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),r8.hasOwnProperty(t)?{space:r8[t],local:e}:e}var Rk=z(()=>{"use strict";i8();o(dc,"default")});function sPe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Dk&&t.documentElement.namespaceURI===Dk?t.createElement(e):t.createElementNS(r,e)}}function oPe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Mv(e){var t=dc(e);return(t.local?oPe:sPe)(t)}var n8=z(()=>{"use strict";Rk();i8();o(sPe,"creatorInherit");o(oPe,"creatorFixed");o(Mv,"default")});function lPe(){}function Uh(e){return e==null?lPe:function(){return this.querySelector(e)}}var Lk=z(()=>{"use strict";o(lPe,"none");o(Uh,"default")});function a8(e){typeof e!="function"&&(e=Uh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{"use strict";vl();Lk();o(a8,"default")});function s8(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var AX=z(()=>{"use strict";o(s8,"array")});function cPe(){return[]}function Wm(e){return e==null?cPe:function(){return this.querySelectorAll(e)}}var o8=z(()=>{"use strict";o(cPe,"empty");o(Wm,"default")});function uPe(e){return function(){return s8(e.apply(this,arguments))}}function l8(e){typeof e=="function"?e=uPe(e):e=Wm(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a{"use strict";vl();AX();o8();o(uPe,"arrayAll");o(l8,"default")});function qm(e){return function(){return this.matches(e)}}function Mk(e){return function(t){return t.matches(e)}}var Nv=z(()=>{"use strict";o(qm,"default");o(Mk,"childMatcher")});function dPe(e){return function(){return hPe.call(this.children,e)}}function fPe(){return this.firstElementChild}function c8(e){return this.select(e==null?fPe:dPe(typeof e=="function"?e:Mk(e)))}var hPe,DX=z(()=>{"use strict";Nv();hPe=Array.prototype.find;o(dPe,"childFind");o(fPe,"childFirst");o(c8,"default")});function mPe(){return Array.from(this.children)}function gPe(e){return function(){return pPe.call(this.children,e)}}function u8(e){return this.selectAll(e==null?mPe:gPe(typeof e=="function"?e:Mk(e)))}var pPe,RX=z(()=>{"use strict";Nv();pPe=Array.prototype.filter;o(mPe,"children");o(gPe,"childrenFilter");o(u8,"default")});function h8(e){typeof e!="function"&&(e=qm(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{"use strict";vl();Nv();o(h8,"default")});function Iv(e){return new Array(e.length)}var d8=z(()=>{"use strict";o(Iv,"default")});function f8(){return new sn(this._enter||this._groups.map(Iv),this._parents)}function Ov(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var p8=z(()=>{"use strict";d8();vl();o(f8,"default");o(Ov,"EnterNode");Ov.prototype={constructor:Ov,appendChild:o(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:o(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:o(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:o(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function m8(e){return function(){return e}}var MX=z(()=>{"use strict";o(m8,"default")});function yPe(e,t,r,i,n,a){for(var s=0,l,u=t.length,h=a.length;s=T&&(T=b+1);!(C=v[T])&&++T{"use strict";vl();p8();MX();o(yPe,"bindIndex");o(vPe,"bindKey");o(xPe,"datum");o(g8,"default");o(bPe,"arraylike")});function y8(){return new sn(this._exit||this._groups.map(Iv),this._parents)}var IX=z(()=>{"use strict";d8();vl();o(y8,"default")});function v8(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}var OX=z(()=>{"use strict";o(v8,"default")});function x8(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,s=Math.min(n,a),l=new Array(n),u=0;u{"use strict";vl();o(x8,"default")});function b8(){for(var e=this._groups,t=-1,r=e.length;++t=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}var BX=z(()=>{"use strict";o(b8,"default")});function T8(e){e||(e=TPe);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}o(t,"compareNode");for(var r=this._groups,i=r.length,n=new Array(i),a=0;at?1:e>=t?0:NaN}var FX=z(()=>{"use strict";vl();o(T8,"default");o(TPe,"ascending")});function C8(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var $X=z(()=>{"use strict";o(C8,"default")});function k8(){return Array.from(this)}var zX=z(()=>{"use strict";o(k8,"default")});function w8(){for(var e=this._groups,t=0,r=e.length;t{"use strict";o(w8,"default")});function S8(){let e=0;for(let t of this)++e;return e}var VX=z(()=>{"use strict";o(S8,"default")});function E8(){return!this.node()}var WX=z(()=>{"use strict";o(E8,"default")});function A8(e){for(var t=this._groups,r=0,i=t.length;r{"use strict";o(A8,"default")});function CPe(e){return function(){this.removeAttribute(e)}}function kPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wPe(e,t){return function(){this.setAttribute(e,t)}}function SPe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function EPe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function APe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function _8(e,t){var r=dc(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?kPe:CPe:typeof t=="function"?r.local?APe:EPe:r.local?SPe:wPe)(r,t))}var UX=z(()=>{"use strict";Rk();o(CPe,"attrRemove");o(kPe,"attrRemoveNS");o(wPe,"attrConstant");o(SPe,"attrConstantNS");o(EPe,"attrFunction");o(APe,"attrFunctionNS");o(_8,"default")});function Pv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var D8=z(()=>{"use strict";o(Pv,"default")});function _Pe(e){return function(){this.style.removeProperty(e)}}function DPe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function RPe(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function R8(e,t,r){return arguments.length>1?this.each((t==null?_Pe:typeof t=="function"?RPe:DPe)(e,t,r??"")):Hh(this.node(),e)}function Hh(e,t){return e.style.getPropertyValue(t)||Pv(e).getComputedStyle(e,null).getPropertyValue(t)}var L8=z(()=>{"use strict";D8();o(_Pe,"styleRemove");o(DPe,"styleConstant");o(RPe,"styleFunction");o(R8,"default");o(Hh,"styleValue")});function LPe(e){return function(){delete this[e]}}function MPe(e,t){return function(){this[e]=t}}function NPe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function M8(e,t){return arguments.length>1?this.each((t==null?LPe:typeof t=="function"?NPe:MPe)(e,t)):this.node()[e]}var HX=z(()=>{"use strict";o(LPe,"propertyRemove");o(MPe,"propertyConstant");o(NPe,"propertyFunction");o(M8,"default")});function YX(e){return e.trim().split(/^|\s+/)}function N8(e){return e.classList||new jX(e)}function jX(e){this._node=e,this._names=YX(e.getAttribute("class")||"")}function XX(e,t){for(var r=N8(e),i=-1,n=t.length;++i{"use strict";o(YX,"classArray");o(N8,"classList");o(jX,"ClassList");jX.prototype={add:o(function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:o(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:o(function(e){return this._names.indexOf(e)>=0},"contains")};o(XX,"classedAdd");o(KX,"classedRemove");o(IPe,"classedTrue");o(OPe,"classedFalse");o(PPe,"classedFunction");o(I8,"default")});function BPe(){this.textContent=""}function FPe(e){return function(){this.textContent=e}}function $Pe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function O8(e){return arguments.length?this.each(e==null?BPe:(typeof e=="function"?$Pe:FPe)(e)):this.node().textContent}var QX=z(()=>{"use strict";o(BPe,"textRemove");o(FPe,"textConstant");o($Pe,"textFunction");o(O8,"default")});function zPe(){this.innerHTML=""}function GPe(e){return function(){this.innerHTML=e}}function VPe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function P8(e){return arguments.length?this.each(e==null?zPe:(typeof e=="function"?VPe:GPe)(e)):this.node().innerHTML}var JX=z(()=>{"use strict";o(zPe,"htmlRemove");o(GPe,"htmlConstant");o(VPe,"htmlFunction");o(P8,"default")});function WPe(){this.nextSibling&&this.parentNode.appendChild(this)}function B8(){return this.each(WPe)}var eK=z(()=>{"use strict";o(WPe,"raise");o(B8,"default")});function qPe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function F8(){return this.each(qPe)}var tK=z(()=>{"use strict";o(qPe,"lower");o(F8,"default")});function $8(e){var t=typeof e=="function"?e:Mv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var rK=z(()=>{"use strict";n8();o($8,"default")});function UPe(){return null}function z8(e,t){var r=typeof e=="function"?e:Mv(e),i=t==null?UPe:typeof t=="function"?t:Uh(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var iK=z(()=>{"use strict";n8();Lk();o(UPe,"constantNull");o(z8,"default")});function HPe(){var e=this.parentNode;e&&e.removeChild(this)}function G8(){return this.each(HPe)}var nK=z(()=>{"use strict";o(HPe,"remove");o(G8,"default")});function YPe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function jPe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function V8(e){return this.select(e?jPe:YPe)}var aK=z(()=>{"use strict";o(YPe,"selection_cloneShallow");o(jPe,"selection_cloneDeep");o(V8,"default")});function W8(e){return arguments.length?this.property("__data__",e):this.node().__data__}var sK=z(()=>{"use strict";o(W8,"default")});function XPe(e){return function(t){e.call(this,t,this.__data__)}}function KPe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function ZPe(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r{"use strict";o(XPe,"contextListener");o(KPe,"parseTypenames");o(ZPe,"onRemove");o(QPe,"onAdd");o(q8,"default")});function lK(e,t,r){var i=Pv(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function JPe(e,t){return function(){return lK(this,e,t)}}function eBe(e,t){return function(){return lK(this,e,t.apply(this,arguments))}}function U8(e,t){return this.each((typeof t=="function"?eBe:JPe)(e,t))}var cK=z(()=>{"use strict";D8();o(lK,"dispatchEvent");o(JPe,"dispatchConstant");o(eBe,"dispatchFunction");o(U8,"default")});function*H8(){for(var e=this._groups,t=0,r=e.length;t{"use strict";o(H8,"default")});function sn(e,t){this._groups=e,this._parents=t}function hK(){return new sn([[document.documentElement]],Y8)}function tBe(){return this}var Y8,wu,vl=z(()=>{"use strict";EX();_X();DX();RX();LX();NX();p8();IX();OX();PX();BX();FX();$X();zX();GX();VX();WX();qX();UX();L8();HX();ZX();QX();JX();eK();tK();rK();iK();nK();aK();sK();oK();cK();uK();Y8=[null];o(sn,"Selection");o(hK,"selection");o(tBe,"selection_selection");sn.prototype=hK.prototype={constructor:sn,select:a8,selectAll:l8,selectChild:c8,selectChildren:u8,filter:h8,data:g8,enter:f8,exit:y8,join:v8,merge:x8,selection:tBe,order:b8,sort:T8,call:C8,nodes:k8,node:w8,size:S8,empty:E8,each:A8,attr:_8,style:R8,property:M8,classed:I8,text:O8,html:P8,raise:B8,lower:F8,append:$8,insert:z8,remove:G8,clone:V8,datum:W8,on:q8,dispatch:U8,[Symbol.iterator]:H8};wu=hK});function Je(e){return typeof e=="string"?new sn([[document.querySelector(e)]],[document.documentElement]):new sn([[e]],Y8)}var dK=z(()=>{"use strict";vl();o(Je,"default")});var xl=z(()=>{"use strict";Nv();Rk();dK();vl();Lk();o8();L8()});var fK=z(()=>{"use strict"});function Yh(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Um(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}var j8=z(()=>{"use strict";o(Yh,"default");o(Um,"extend")});function jh(){}function mK(){return this.rgb().formatHex()}function cBe(){return this.rgb().formatHex8()}function uBe(){return CK(this).formatHsl()}function gK(){return this.rgb().formatRgb()}function Tl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=rBe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?yK(t):r===3?new ua(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Nk(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Nk(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=iBe.exec(e))?new ua(t[1],t[2],t[3],1):(t=nBe.exec(e))?new ua(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=aBe.exec(e))?Nk(t[1],t[2],t[3],t[4]):(t=sBe.exec(e))?Nk(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oBe.exec(e))?bK(t[1],t[2]/100,t[3]/100,1):(t=lBe.exec(e))?bK(t[1],t[2]/100,t[3]/100,t[4]):pK.hasOwnProperty(e)?yK(pK[e]):e==="transparent"?new ua(NaN,NaN,NaN,0):null}function yK(e){return new ua(e>>16&255,e>>8&255,e&255,1)}function Nk(e,t,r,i){return i<=0&&(e=t=r=NaN),new ua(e,t,r,i)}function K8(e){return e instanceof jh||(e=Tl(e)),e?(e=e.rgb(),new ua(e.r,e.g,e.b,e.opacity)):new ua}function Ym(e,t,r,i){return arguments.length===1?K8(e):new ua(e,t,r,i??1)}function ua(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function vK(){return`#${Jf(this.r)}${Jf(this.g)}${Jf(this.b)}`}function hBe(){return`#${Jf(this.r)}${Jf(this.g)}${Jf(this.b)}${Jf((isNaN(this.opacity)?1:this.opacity)*255)}`}function xK(){let e=Pk(this.opacity);return`${e===1?"rgb(":"rgba("}${ep(this.r)}, ${ep(this.g)}, ${ep(this.b)}${e===1?")":`, ${e})`}`}function Pk(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ep(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jf(e){return e=ep(e),(e<16?"0":"")+e.toString(16)}function bK(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new bl(e,t,r,i)}function CK(e){if(e instanceof bl)return new bl(e.h,e.s,e.l,e.opacity);if(e instanceof jh||(e=Tl(e)),!e)return new bl;if(e instanceof bl)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,l=a-n,u=(a+n)/2;return l?(t===a?s=(r-i)/l+(r