ruru 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/static/7367.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see 7367.js.LICENSE.txt */
2
- export const __webpack_esm_id__=7367;export const __webpack_esm_ids__=[7367];export const __webpack_esm_modules__={25552(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},8041(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var r=n(25552);function i(t){return t.replace(r.ctrlCharactersRegex,"").replace(r.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}e.sanitizeUrl=function(t){if(!t)return r.BLANK_URL;var e,n=a(t.trim());do{e=(n=a(n=i(n).replace(r.htmlCtrlEntityRegex,"").replace(r.ctrlCharactersRegex,"").replace(r.whitespaceEscapeCharsRegex,"").trim())).match(r.ctrlCharactersRegex)||n.match(r.htmlEntitiesRegex)||n.match(r.htmlCtrlEntityRegex)||n.match(r.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var o=n;if(!o)return r.BLANK_URL;if(function(t){return r.relativeFirstCharacters.indexOf(t[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(r.urlSchemeRegex);if(!l)return o;var c=l[0].toLowerCase().trim();if(r.invalidProtocolRegex.test(c))return r.BLANK_URL;var h=s.replace(/\\/g,"/");if("mailto:"===c||c.includes("://"))return h;if("http:"===c||"https:"===c){if(!function(t){return URL.canParse(t)}(h))return r.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h}},23464(t){t.exports=function(){var t=6e4,e=36e5,n="millisecond",r="second",i="minute",a="hour",o="day",s="week",l="month",c="quarter",h="year",u="date",f="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|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,g={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(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,l),a=n-i<0,o=e.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:h,w:s,d:o,D:u,h:a,m:i,s:r,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",x={};x[b]=g;var _="$isDayjsObject",v=function(t){return t instanceof S||!(!t||!t[_])},w=function t(e,n,r){var i;if(!e)return b;if("string"==typeof e){var a=e.toLowerCase();x[a]&&(i=a),n&&(x[a]=n,i=a);var o=e.split("-");if(!i&&o.length>1)return t(o[0])}else{var s=e.name;x[s]=e,i=s}return!r&&i&&(b=i),i||!r&&b},k=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},C=y;C.l=w,C.i=v,C.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var m=g.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(d);if(r){var i=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===f)},m.isSame=function(t,e){var n=k(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return k(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<k(t)},m.$g=function(t,e,n){return C.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,c=!!C.u(e)||e,f=C.p(t),d=function(t,e){var r=C.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?r:r.endOf(o)},p=function(t,e){return C.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},g=this.$W,m=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(f){case h:return c?d(1,0):d(31,11);case l:return c?d(1,m):d(0,m+1);case s:var x=this.$locale().weekStart||0,_=(g<x?g+7:g)-x;return d(c?y-_:y+(6-_),m);case o:case u:return p(b+"Hours",0);case a:return p(b+"Minutes",1);case i:return p(b+"Seconds",2);case r:return p(b+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var s,c=C.p(t),f="set"+(this.$u?"UTC":""),d=(s={},s[o]=f+"Date",s[u]=f+"Date",s[l]=f+"Month",s[h]=f+"FullYear",s[a]=f+"Hours",s[i]=f+"Minutes",s[r]=f+"Seconds",s[n]=f+"Milliseconds",s)[c],p=c===o?this.$D+(e-this.$W):e;if(c===l||c===h){var g=this.clone().set(u,1);g.$d[d](p),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[C.p(t)]()},m.add=function(n,c){var u,f=this;n=Number(n);var d=C.p(c),p=function(t){var e=k(f);return C.w(e.date(e.date()+Math.round(t*n)),f)};if(d===l)return this.set(l,this.$M+n);if(d===h)return this.set(h,this.$y+n);if(d===o)return p(1);if(d===s)return p(7);var g=(u={},u[i]=t,u[a]=e,u[r]=1e3,u)[d]||1,m=this.$d.getTime()+n*g;return C.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=C.z(this),a=this.$H,o=this.$m,s=this.$M,l=n.weekdays,c=n.months,h=n.meridiem,u=function(t,n,i,a){return t&&(t[n]||t(e,r))||i[n].slice(0,a)},d=function(t){return C.s(a%12||12,t,"0")},g=h||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return C.s(e.$y,4,"0");case"M":return s+1;case"MM":return C.s(s+1,2,"0");case"MMM":return u(n.monthsShort,s,c,3);case"MMMM":return u(c,s);case"D":return e.$D;case"DD":return C.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(n.weekdaysMin,e.$W,l,2);case"ddd":return u(n.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return C.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return g(a,o,!0);case"A":return g(a,o,!1);case"m":return String(o);case"mm":return C.s(o,2,"0");case"s":return String(e.$s);case"ss":return C.s(e.$s,2,"0");case"SSS":return C.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,u,f){var d,p=this,g=C.p(u),m=k(n),y=(m.utcOffset()-this.utcOffset())*t,b=this-m,x=function(){return C.m(p,m)};switch(g){case h:d=x()/12;break;case l:d=x();break;case c:d=x()/3;break;case s:d=(b-y)/6048e5;break;case o:d=(b-y)/864e5;break;case a:d=b/e;break;case i:d=b/t;break;case r:d=b/1e3;break;default:d=b}return f?d:C.a(d)},m.daysInMonth=function(){return this.endOf(l).$D},m.$locale=function(){return x[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return C.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),T=S.prototype;return k.prototype=T,[["$ms",n],["$s",r],["$m",i],["$H",a],["$W",o],["$M",l],["$y",h],["$D",u]].forEach(function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),k.extend=function(t,e){return t.$i||(t(e,S,k),t.$i=!0),k},k.locale=w,k.isDayjs=v,k.unix=function(t){return k(1e3*t)},k.en=x[b],k.Ls=x,k.p={},k}()},7083(t,e,n){function r(t,e,n){if(t&&t.length){const[r,i]=e,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(const e of t){const[t,n]=e;e[0]=(t-r)*o-(n-i)*s+r,e[1]=(t-r)*s+(n-i)*o+i}}}function i(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,n,a=1){const o=n,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,c=[0,0];if(o)for(const t of l)r(t,c,o);const h=function(t,e,n){const r=[];for(const e of t){const t=[...e];i(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&r.push(t)}const a=[];e=Math.max(e,.1);const o=[];for(const t of r)for(let e=0;e<t.length-1;e++){const n=t[e],r=t[e+1];if(n[1]!==r[1]){const t=Math.min(n[1],r[1]);o.push({ymin:t,ymax:Math.max(n[1],r[1]),x:t===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return a;let s=[],l=o[0].ymin,c=0;for(;s.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>l);e++)t=e;o.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==n||c%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const n=s[t].edge,r=s[e].edge;a.push([[Math.round(n.x),l],[Math.round(r.x),l]])}l+=n,s.forEach(t=>{t.edge.x=t.edge.x+n*t.edge.islope}),c++}return a}(l,s,a);if(o){for(const t of l)r(t,c,-o);!function(t,e,n){const i=[];t.forEach(t=>i.push(...t)),r(i,e,n)}(h,c,-o)}return h}function o(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(o=i),a(t,i,r,o||1)}n.r(e),n.d(e,{default:()=>it});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const n=o(t,e);return{type:"fillSketch",ops:this.renderLines(n,e)}}renderLines(t,e){const n=[];for(const r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}}function l(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}class c extends s{fillPolygons(t,e){let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);const r=o(t,Object.assign({},e,{hachureGap:n})),i=Math.PI/180*e.hachureAngle,a=[],s=.5*n*Math.cos(i),c=.5*n*Math.sin(i);for(const[t,e]of r)l([t,e])&&a.push([[t[0]-s,t[1]+c],[...e]],[[t[0]+s,t[1]-c],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class h extends s{fillPolygons(t,e){const n=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),i=this._fillPolygons(t,r);return n.ops=n.ops.concat(i.ops),n}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const n=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(n,e)}dotsOnLines(t,e){const n=[];let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let i=e.fillWeight;i<0&&(i=e.strokeWidth/2);const a=r/4;for(const o of t){const t=l(o),s=t/r,c=Math.ceil(s)-1,h=t-c*r,u=(o[0][0]+o[1][0])/2-r/4,f=Math.min(o[0][1],o[1][1]);for(let t=0;t<c;t++){const o=f+h+t*r,s=u-a+2*Math.random()*a,l=o-a+2*Math.random()*a,c=this.helper.ellipse(s,l,i,i,e);n.push(...c.ops)}}return{type:"fillSketch",ops:n}}}class f{constructor(t){this.helper=t}fillPolygons(t,e){const n=o(t,e);return{type:"fillSketch",ops:this.dashedLine(n,e)}}dashedLine(t,e){const n=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,r=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,i=[];return t.forEach(t=>{const a=l(t),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2;let c=t[0],h=t[1];c[0]>h[0]&&(c=t[1],h=t[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let t=0;t<o;t++){const a=t*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],h=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],h[0],h[1],e))}}),i}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const n=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,r=e.zigzagOffset<0?n:e.zigzagOffset,i=o(t,e=Object.assign({},e,{hachureGap:n+r}));return{type:"fillSketch",ops:this.zigzagLines(i,r,e)}}zigzagLines(t,e,n){const r=[];return t.forEach(t=>{const i=l(t),a=Math.round(i/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let t=0;t<a;t++){const i=2*t*e,a=2*(t+1)*e,s=Math.sqrt(2*Math.pow(e,2)),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],h=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],u=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],u[0],u[1],n),...this.helper.doubleLineOps(u[0],u[1],h[0],h[1],n))}}),r}}const p={};class g{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const m={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function y(t,e){return t.type===e}function b(t){const e=[],n=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let r="BOD",i=0,a=n[i];for(;!y(a,2);){let o=0;const s=[];if("BOD"===r){if("M"!==a.text&&"m"!==a.text)return b("M0,0"+t);i++,o=m[a.text],r=a.text}else y(a,1)?o=m[r]:(i++,o=m[a.text],r=a.text);if(!(i+o<n.length))throw new Error("Path data ended short");for(let t=i;t<i+o;t++){const e=n[t];if(!y(e,1))throw new Error("Param not a number: "+r+","+e.text);s[s.length]=+e.text}if("number"!=typeof m[r])throw new Error("Bad segment: "+r);{const t={key:r,data:s};e.push(t),i+=o,a=n[i],"M"===r&&(r="L"),"m"===r&&(r="l")}}return e}function x(t){let e=0,n=0,r=0,i=0;const a=[];for(const{key:o,data:s}of t)switch(o){case"M":a.push({key:"M",data:[...s]}),[e,n]=s,[r,i]=s;break;case"m":e+=s[0],n+=s[1],a.push({key:"M",data:[e,n]}),r=e,i=n;break;case"L":a.push({key:"L",data:[...s]}),[e,n]=s;break;case"l":e+=s[0],n+=s[1],a.push({key:"L",data:[e,n]});break;case"C":a.push({key:"C",data:[...s]}),e=s[4],n=s[5];break;case"c":{const t=s.map((t,r)=>r%2?t+n:t+e);a.push({key:"C",data:t}),e=t[4],n=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],n=s[3];break;case"q":{const t=s.map((t,r)=>r%2?t+n:t+e);a.push({key:"Q",data:t}),e=t[2],n=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],n=s[6];break;case"a":e+=s[5],n+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,n]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],n=s[3];break;case"s":{const t=s.map((t,r)=>r%2?t+n:t+e);a.push({key:"S",data:t}),e=t[2],n=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],n=s[1];break;case"t":e+=s[0],n+=s[1],a.push({key:"T",data:[e,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=r,n=i}return a}function _(t){const e=[];let n="",r=0,i=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[a,o]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],s=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let t=0,a=0;"C"===n||"S"===n?(t=r+(r-s),a=i+(i-l)):(t=r,a=i),e.push({key:"C",data:[t,a,...h]}),s=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[t,a]=h;let o=0,c=0;"Q"===n||"T"===n?(o=r+(r-s),c=i+(i-l)):(o=r,c=i);const u=r+2*(o-r)/3,f=i+2*(c-i)/3,d=t+2*(o-t)/3,p=a+2*(c-a)/3;e.push({key:"C",data:[u,f,d,p,t,a]}),s=o,l=c,r=t,i=a;break}case"Q":{const[t,n,a,o]=h,c=r+2*(t-r)/3,u=i+2*(n-i)/3,f=a+2*(t-a)/3,d=o+2*(n-o)/3;e.push({key:"C",data:[c,u,f,d,a,o]}),s=t,l=n,r=a,i=o;break}case"A":{const t=Math.abs(h[0]),n=Math.abs(h[1]),a=h[2],o=h[3],s=h[4],l=h[5],c=h[6];0===t||0===n?(e.push({key:"C",data:[r,i,l,c,l,c]}),r=l,i=c):r===l&&i===c||(w(r,i,l,c,t,n,a,o,s).forEach(function(t){e.push({key:"C",data:t})}),r=l,i=c);break}case"Z":e.push({key:"Z",data:[]}),r=a,i=o}n=c}return e}function v(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function w(t,e,n,r,i,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,p=0,g=0,m=0;if(c)[d,p,g,m]=c;else{[t,e]=v(t,e,-h),[n,r]=v(n,r,-h);const o=(t-n)/2,c=(e-r)/2;let u=o*o/(i*i)+c*c/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const f=i*i,y=a*a,b=f*y-f*c*c-y*o*o,x=f*c*c+y*o*o,_=(s===l?-1:1)*Math.sqrt(Math.abs(b/x));g=_*i*c/a+(t+n)/2,m=_*-a*o/i+(e+r)/2,d=Math.asin(parseFloat(((e-m)/a).toFixed(9))),p=Math.asin(parseFloat(((r-m)/a).toFixed(9))),t<g&&(d=Math.PI-d),n<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI)}let y=p-d;if(Math.abs(y)>120*Math.PI/180){const t=p,e=n,s=r;p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=w(n=g+i*Math.cos(p),r=m+a*Math.sin(p),e,s,i,a,o,0,l,[p,t,g,m])}y=p-d;const b=Math.cos(d),x=Math.sin(d),_=Math.cos(p),k=Math.sin(p),C=Math.tan(y/4),S=4/3*i*C,T=4/3*a*C,M=[t,e],A=[t+S*x,e-T*b],B=[n+S*k,r-T*_],L=[n,r];if(A[0]=2*M[0]-A[0],A[1]=2*M[1]-A[1],c)return[A,B,L].concat(f);{f=[A,B,L].concat(f);const t=[];for(let e=0;e<f.length;e+=3){const n=v(f[e][0],f[e][1],h),r=v(f[e+1][0],f[e+1][1],h),i=v(f[e+2][0],f[e+2][1],h);t.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return t}}const k={randOffset:function(t,e){return D(t,e)},randOffsetWithRange:function(t,e,n){return N(t,e,n)},ellipse:function(t,e,n,r,i){return A(t,e,i,M(n,r,i)).opset},doubleLineOps:function(t,e,n,r,i){return z(t,e,n,r,i,!0)}};function C(t,e,n,r,i){return{type:"path",ops:z(t,e,n,r,i)}}function S(t,e,n){const r=(t||[]).length;if(r>2){const i=[];for(let e=0;e<r-1;e++)i.push(...z(t[e][0],t[e][1],t[e+1][0],t[e+1][1],n));return e&&i.push(...z(t[r-1][0],t[r-1][1],t[0][0],t[0][1],n)),{type:"path",ops:i}}return 2===r?C(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function T(t,e){if(t.length){const n="number"==typeof t[0][0]?[t]:t,r=P(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:P(n[0],1.5*(1+.22*e.roughness),$(e));for(let t=1;t<n.length;t++){const a=n[t];if(a.length){const t=P(a,1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:P(a,1.5*(1+.22*e.roughness),$(e));for(const e of t)"move"!==e.op&&r.push(e);for(const t of n)"move"!==t.op&&i.push(t)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function M(t,e,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-n.curveFitting;return o+=D(o*l,n),s+=D(s*l,n),{increment:a,rx:o,ry:s}}function A(t,e,n,r){const[i,a]=q(r.increment,t,e,r.rx,r.ry,1,r.increment*N(.1,N(.4,1,n),n),n);let o=R(i,null,n);if(!n.disableMultiStroke&&0!==n.roughness){const[i]=q(r.increment,t,e,r.rx,r.ry,1.5,0,n),a=R(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function B(t,e,n,r,i,a,o,s,l){const c=t,h=e;let u=Math.abs(n/2),f=Math.abs(r/2);u+=D(.01*u,l),f+=D(.01*f,l);let d=i,p=a;for(;d<0;)d+=2*Math.PI,p+=2*Math.PI;p-d>2*Math.PI&&(d=0,p=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(p-d)/2),y=j(m,c,h,u,f,d,p,1,l);if(!l.disableMultiStroke){const t=j(m,c,h,u,f,d,p,1.5,l);y.push(...t)}return o&&(s?y.push(...z(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...z(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:y}}function L(t,e){const n=_(x(b(t))),r=[];let i=[0,0],a=[0,0];for(const{key:t,data:o}of n)switch(t){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":r.push(...z(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[t,n,i,s,l,c]=o;r.push(...W(t,n,i,s,l,c,a,e)),a=[l,c];break}case"Z":r.push(...z(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:r}}function E(t,e){const n=[];for(const r of t)if(r.length){const t=e.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:"move",data:[r[0][0]+D(t,e),r[0][1]+D(t,e)]});for(let a=1;a<i;a++)n.push({op:"lineTo",data:[r[a][0]+D(t,e),r[a][1]+D(t,e)]})}}return{type:"fillPath",ops:n}}function F(t,e){return function(t,e){let n=t.fillStyle||"hachure";if(!p[n])switch(n){case"zigzag":p[n]||(p[n]=new c(e));break;case"cross-hatch":p[n]||(p[n]=new h(e));break;case"dots":p[n]||(p[n]=new u(e));break;case"dashed":p[n]||(p[n]=new f(e));break;case"zigzag-line":p[n]||(p[n]=new d(e));break;default:n="hachure",p[n]||(p[n]=new s(e))}return p[n]}(e,k).fillPolygons(t,e)}function $(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function O(t){return t.randomizer||(t.randomizer=new g(t.seed||0)),t.randomizer.next()}function N(t,e,n,r=1){return n.roughness*r*(O(n)*(e-t)+t)}function D(t,e,n=1){return N(-t,t,e,n)}function z(t,e,n,r,i,a=!1){const o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=I(t,e,n,r,i,!0,!1);if(o)return s;const l=I(t,e,n,r,i,!0,!0);return s.concat(l)}function I(t,e,n,r,i,a,o){const s=Math.pow(t-n,2)+Math.pow(e-r,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*O(i);let d=i.bowing*i.maxRandomnessOffset*(r-e)/200,p=i.bowing*i.maxRandomnessOffset*(t-n)/200;d=D(d,i,c),p=D(p,i,c);const g=[],m=()=>D(u,i,c),y=()=>D(h,i,c),b=i.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(b?0:m()),e+(b?0:m())]}):g.push({op:"move",data:[t+(b?0:D(h,i,c)),e+(b?0:D(h,i,c))]})),o?g.push({op:"bcurveTo",data:[d+t+(n-t)*f+m(),p+e+(r-e)*f+m(),d+t+2*(n-t)*f+m(),p+e+2*(r-e)*f+m(),n+(b?0:m()),r+(b?0:m())]}):g.push({op:"bcurveTo",data:[d+t+(n-t)*f+y(),p+e+(r-e)*f+y(),d+t+2*(n-t)*f+y(),p+e+2*(r-e)*f+y(),n+(b?0:y()),r+(b?0:y())]}),g}function P(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+D(e,n),t[0][1]+D(e,n)]),r.push([t[0][0]+D(e,n),t[0][1]+D(e,n)]);for(let i=1;i<t.length;i++)r.push([t[i][0]+D(e,n),t[i][1]+D(e,n)]),i===t.length-1&&r.push([t[i][0]+D(e,n),t[i][1]+D(e,n)]);return R(r,null,n)}function R(t,e,n){const r=t.length,i=[];if(r>3){const a=[],o=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<r;e++){const n=t[e];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*t[e+1][0]-o*t[e-1][0])/6,n[1]+(o*t[e+1][1]-o*t[e-1][1])/6],a[2]=[t[e+1][0]+(o*t[e][0]-o*t[e+2][0])/6,t[e+1][1]+(o*t[e][1]-o*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=n.maxRandomnessOffset;i.push({op:"lineTo",data:[e[0]+D(t,n),e[1]+D(t,n)]})}}else 3===r?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===r&&i.push(...I(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function q(t,e,n,r,i,a,o,s){const l=[],c=[];if(0===s.roughness){t/=4,c.push([e+r*Math.cos(-t),n+i*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+r*Math.cos(a),n+i*Math.sin(a)];l.push(t),c.push(t)}c.push([e+r*Math.cos(0),n+i*Math.sin(0)]),c.push([e+r*Math.cos(t),n+i*Math.sin(t)])}else{const h=D(.5,s)-Math.PI/2;c.push([D(a,s)+e+.9*r*Math.cos(h-t),D(a,s)+n+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let o=h;o<u;o+=t){const t=[D(a,s)+e+r*Math.cos(o),D(a,s)+n+i*Math.sin(o)];l.push(t),c.push(t)}c.push([D(a,s)+e+r*Math.cos(h+2*Math.PI+.5*o),D(a,s)+n+i*Math.sin(h+2*Math.PI+.5*o)]),c.push([D(a,s)+e+.98*r*Math.cos(h+o),D(a,s)+n+.98*i*Math.sin(h+o)]),c.push([D(a,s)+e+.9*r*Math.cos(h+.5*o),D(a,s)+n+.9*i*Math.sin(h+.5*o)])}return[c,l]}function j(t,e,n,r,i,a,o,s,l){const c=a+D(.1,l),h=[];h.push([D(s,l)+e+.9*r*Math.cos(c-t),D(s,l)+n+.9*i*Math.sin(c-t)]);for(let a=c;a<=o;a+=t)h.push([D(s,l)+e+r*Math.cos(a),D(s,l)+n+i*Math.sin(a)]);return h.push([e+r*Math.cos(o),n+i*Math.sin(o)]),h.push([e+r*Math.cos(o),n+i*Math.sin(o)]),R(h,null,l)}function W(t,e,n,r,i,a,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let d=0;d<u;d++)0===d?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:D(c[0],s)),o[1]+(f?0:D(c[0],s))]}),h=f?[i,a]:[i+D(c[d],s),a+D(c[d],s)],l.push({op:"bcurveTo",data:[t+D(c[d],s),e+D(c[d],s),n+D(c[d],s),r+D(c[d],s),h[0],h[1]]});return l}function H(t){return[...t]}function U(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(3===n)r.push(H(t[0]),H(t[1]),H(t[2]),H(t[2]));else{const n=[];n.push(t[0],t[0]);for(let e=1;e<t.length;e++)n.push(t[e]),e===t.length-1&&n.push(t[e]);const i=[],a=1-e;r.push(H(n[0]));for(let t=1;t+2<n.length;t++){const e=n[t];i[0]=[e[0],e[1]],i[1]=[e[0]+(a*n[t+1][0]-a*n[t-1][0])/6,e[1]+(a*n[t+1][1]-a*n[t-1][1])/6],i[2]=[n[t+1][0]+(a*n[t][0]-a*n[t+2][0])/6,n[t+1][1]+(a*n[t][1]-a*n[t+2][1])/6],i[3]=[n[t+1][0],n[t+1][1]],r.push(i[1],i[2],i[3])}}return r}function Y(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function G(t,e,n){const r=Y(e,n);if(0===r)return Y(t,e);let i=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/r;return i=Math.max(0,Math.min(1,i)),Y(t,V(e,n,i))}function V(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function X(t,e,n,r){const i=r||[];if(function(t,e){const n=t[e+0],r=t[e+1],i=t[e+2],a=t[e+3];let o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let l=3*i[0]-2*a[0]-n[0];l*=l;let c=3*i[1]-2*a[1]-n[1];return c*=c,o<l&&(o=l),s<c&&(s=c),o+s}(t,e)<n){const n=t[e+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(Y(a,o))>1&&i.push(n)):i.push(n),i.push(t[e+3])}else{const r=.5,a=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],c=V(a,o,r),h=V(o,s,r),u=V(s,l,r),f=V(c,h,r),d=V(h,u,r),p=V(f,d,r);X([a,c,f,p],0,n,i),X([p,d,u,l],0,n,i)}var a,o;return i}function Z(t,e){return Q(t,0,t.length,e)}function Q(t,e,n,r,i){const a=i||[],o=t[e],s=t[n-1];let l=0,c=1;for(let r=e+1;r<n-1;++r){const e=G(t[r],o,s);e>l&&(l=e,c=r)}return Math.sqrt(l)>r?(Q(t,e,c+1,r,a),Q(t,c,n,r,a)):(a.length||a.push(o),a.push(s)),a}function K(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let n=0;n<i;n++)X(t,3*n,e,r);return n&&n>0?Q(r,0,r.length,n):r}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,n){return{shape:t,sets:e||[],options:n||this.defaultOptions}}line(t,e,n,r,i){const a=this._o(i);return this._d("line",[C(t,e,n,r,a)],a)}rectangle(t,e,n,r,i){const a=this._o(i),o=[],s=function(t,e,n,r,i){return function(t,e){return S(t,!0,e)}([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}(t,e,n,r,a);if(a.fill){const i=[[t,e],[t+n,e],[t+n,e+r],[t,e+r]];"solid"===a.fillStyle?o.push(E([i],a)):o.push(F([i],a))}return a.stroke!==J&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,n,r,i){const a=this._o(i),o=[],s=M(n,r,a),l=A(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const n=A(t,e,a,s).opset;n.type="fillPath",o.push(n)}else o.push(F([l.estimatedPoints],a));return a.stroke!==J&&o.push(l.opset),this._d("ellipse",o,a)}circle(t,e,n,r){const i=this.ellipse(t,e,n,n,r);return i.shape="circle",i}linearPath(t,e){const n=this._o(e);return this._d("linearPath",[S(t,!1,n)],n)}arc(t,e,n,r,i,a,o=!1,s){const l=this._o(s),c=[],h=B(t,e,n,r,i,a,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=B(t,e,n,r,i,a,!0,!1,o);s.type="fillPath",c.push(s)}else c.push(function(t,e,n,r,i,a,o){const s=t,l=e;let c=Math.abs(n/2),h=Math.abs(r/2);c+=D(.01*c,o),h+=D(.01*h,o);let u=i,f=a;for(;u<0;)u+=2*Math.PI,f+=2*Math.PI;f-u>2*Math.PI&&(u=0,f=2*Math.PI);const d=(f-u)/o.curveStepCount,p=[];for(let t=u;t<=f;t+=d)p.push([s+c*Math.cos(t),l+h*Math.sin(t)]);return p.push([s+c*Math.cos(f),l+h*Math.sin(f)]),p.push([s,l]),F([p],o)}(t,e,n,r,i,a,l));return l.stroke!==J&&c.push(h),this._d("arc",c,l)}curve(t,e){const n=this._o(e),r=[],i=T(t,n);if(n.fill&&n.fill!==J)if("solid"===n.fillStyle){const e=T(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],i=t;if(i.length){const t="number"==typeof i[0][0]?[i]:i;for(const r of t)r.length<3?e.push(...r):3===r.length?e.push(...K(U([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):e.push(...K(U(r),10,(1+n.roughness)/2))}e.length&&r.push(F([e],n))}return n.stroke!==J&&r.push(i),this._d("curve",r,n)}polygon(t,e){const n=this._o(e),r=[],i=S(t,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(E([t],n)):r.push(F([t],n))),n.stroke!==J&&r.push(i),this._d("polygon",r,n)}path(t,e){const n=this._o(e),r=[];if(!t)return this._d("path",r,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=n.fill&&"transparent"!==n.fill&&n.fill!==J,a=n.stroke!==J,o=!!(n.simplification&&n.simplification<1),s=function(t,e,n){const r=_(x(b(t))),i=[];let a=[],o=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...K(s,1)),s=[]},c=()=>{l(),a.length&&(i.push(a),a=[])};for(const{key:t,data:e}of r)switch(t){case"M":c(),o=[e[0],e[1]],a.push(o);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(c(),!n)return i;const h=[];for(const t of i){const e=Z(t,n);e.length&&h.push(e)}return h}(t,0,o?4-4*(n.simplification||1):(1+n.roughness)/2),l=L(t,n);if(i)if("solid"===n.fillStyle)if(1===s.length){const e=L(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(E(s,n));else r.push(F(s,n));return a&&(o?s.forEach(t=>{r.push(S(t,!1,n))}):r.push(l)),this._d("path",r,n)}opsToPath(t,e){let n="";for(const r of t.ops){const t="number"==typeof e&&e>=0?r.data.map(t=>+t.toFixed(e)):r.data;switch(r.op){case"move":n+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":n+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":n+=`L${t[0]} ${t[1]} `}}return n.trim()}toPaths(t){const e=t.sets||[],n=t.options||this.defaultOptions,r=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:n.fill||J};break;case"fillSketch":e=this.fillSketch(t,n)}e&&r.push(e)}return r}fillSketch(t,e){let n=e.fillWeight;return n<0&&(n=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:n,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),r=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(r,a,i,e),r.restore();break}case"fillSketch":this.fillSketch(r,a,n)}}fillSketch(t,e,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=r,this._drawToContext(t,e,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,n,r="nonzero"){t.beginPath();for(const r of e.ops){const e="number"==typeof n&&n>=0?r.data.map(t=>+t.toFixed(n)):r.data;switch(r.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(r):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,n,r,i){const a=this.gen.line(t,e,n,r,i);return this.draw(a),a}rectangle(t,e,n,r,i){const a=this.gen.rectangle(t,e,n,r,i);return this.draw(a),a}ellipse(t,e,n,r,i){const a=this.gen.ellipse(t,e,n,r,i);return this.draw(a),a}circle(t,e,n,r){const i=this.gen.circle(t,e,n,r);return this.draw(i),i}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n),n}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n),n}arc(t,e,n,r,i,a,o=!1,s){const l=this.gen.arc(t,e,n,r,i,a,o,s);return this.draw(l),l}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n),n}path(t,e){const n=this.gen.path(t,e);return this.draw(n),n}}const nt="http://www.w3.org/2000/svg";class rt{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(nt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=r.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke",n.stroke),e.setAttribute("stroke-width",n.strokeWidth+""),e.setAttribute("fill","none"),n.strokeLineDash&&e.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":e=r.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",n.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(r,o,n)}e&&i.appendChild(e)}return i}fillSketch(t,e,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const i=t.createElementNS(nt,"path");return i.setAttribute("d",this.opsToPath(e,n.fixedDecimalPlaceDigits)),i.setAttribute("stroke",n.fill||""),i.setAttribute("stroke-width",r+""),i.setAttribute("fill","none"),n.fillLineDash&&i.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,n,r,i){const a=this.gen.line(t,e,n,r,i);return this.draw(a)}rectangle(t,e,n,r,i){const a=this.gen.rectangle(t,e,n,r,i);return this.draw(a)}ellipse(t,e,n,r,i){const a=this.gen.ellipse(t,e,n,r,i);return this.draw(a)}circle(t,e,n,r){const i=this.gen.circle(t,e,n,r);return this.draw(i)}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n)}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n)}arc(t,e,n,r,i,a,o=!1,s){const l=this.gen.arc(t,e,n,r,i,a,o,s);return this.draw(l)}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n)}path(t,e){const n=this.gen.path(t,e);return this.draw(n)}}var it={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new rt(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},8968(t,e,n){function r(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Array.from("string"==typeof t?[t]:t);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var i=r.reduce(function(t,e){var n=e.match(/\n([\t ]+|(?!\s).)/g);return n?t.concat(n.map(function(t){var e,n;return null!==(n=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==n?n:0})):t},[]);if(i.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,i)+"}","g");r=r.map(function(t){return t.replace(a,"\n")})}r[0]=r[0].replace(/^\r?\n/,"");var o=r[0];return e.forEach(function(t,e){var n=o.match(/(?:^|\n)( *)$/),i=n?n[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+i+t}).join("\n")),o+=a+r[e+1]}),o}n.r(e),n.d(e,{dedent:()=>r,default:()=>i});const i=r},79806(t,e,n){function r(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function i(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function a(t){let e,n,a;function s(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<0?i=e+1:a=e}while(i<a)}return i}return 2!==t.length?(e=r,n=(e,n)=>r(t(e),n),a=(e,n)=>t(e)-n):(e=t===r||t===i?t:o,n=t,a=t),{left:s,center:function(t,e,n=0,r=t.length){const i=s(t,e,n,r-1);return i>n&&a(t[i-1],e)>-a(t[i],e)?i-1:i},right:function(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<=0?i=e+1:a=e}while(i<a)}return i}}}function o(){return 0}function s(t){return null===t?NaN:+t}n.d(e,{Adder:()=>B,Delaunay:()=>zs,FormatSpecifier:()=>Yc,InternMap:()=>F,InternSet:()=>$,Node:()=>mg,Path:()=>Ja,Voronoi:()=>Es,ZoomTransform:()=>vS,active:()=>ia,arc:()=>ak,area:()=>dk,areaRadial:()=>wk,ascending:()=>r,autoType:()=>dl,axisBottom:()=>ge,axisLeft:()=>me,axisRight:()=>pe,axisTop:()=>de,bin:()=>dt,bisect:()=>f,bisectCenter:()=>u,bisectLeft:()=>h,bisectRight:()=>c,bisector:()=>a,blob:()=>Jl,blur:()=>d,blur2:()=>p,blurImage:()=>g,brush:()=>$a,brushSelection:()=>La,brushX:()=>Ea,brushY:()=>Fa,buffer:()=>ec,chord:()=>Ha,chordDirected:()=>Ya,chordTranspose:()=>Ua,cluster:()=>cg,color:()=>lr,contourDensity:()=>ls,contours:()=>ts,count:()=>_,create:()=>$w,creator:()=>kn,cross:()=>C,csv:()=>oc,csvFormat:()=>tl,csvFormatBody:()=>el,csvFormatRow:()=>rl,csvFormatRows:()=>nl,csvFormatValue:()=>il,csvParse:()=>Ks,csvParseRows:()=>Js,cubehelix:()=>Ho,cumsum:()=>S,curveBasis:()=>fC,curveBasisClosed:()=>pC,curveBasisOpen:()=>mC,curveBumpX:()=>Tk,curveBumpY:()=>Mk,curveBundle:()=>bC,curveCardinal:()=>vC,curveCardinalClosed:()=>kC,curveCardinalOpen:()=>SC,curveCatmullRom:()=>AC,curveCatmullRomClosed:()=>LC,curveCatmullRomOpen:()=>FC,curveLinear:()=>ck,curveLinearClosed:()=>OC,curveMonotoneX:()=>jC,curveMonotoneY:()=>WC,curveNatural:()=>YC,curveStep:()=>VC,curveStepAfter:()=>ZC,curveStepBefore:()=>XC,descending:()=>i,deviation:()=>M,difference:()=>Qt,disjoint:()=>Kt,dispatch:()=>we,drag:()=>Hs,dragDisable:()=>jn,dragEnable:()=>Wn,dsv:()=>ac,dsvFormat:()=>Zs,easeBack:()=>Gl,easeBackIn:()=>Ul,easeBackInOut:()=>Gl,easeBackOut:()=>Yl,easeBounce:()=>jl,easeBounceIn:()=>ql,easeBounceInOut:()=>Wl,easeBounceOut:()=>jl,easeCircle:()=>$l,easeCircleIn:()=>El,easeCircleInOut:()=>$l,easeCircleOut:()=>Fl,easeCubic:()=>ta,easeCubicIn:()=>Ki,easeCubicInOut:()=>ta,easeCubicOut:()=>Ji,easeElastic:()=>Zl,easeElasticIn:()=>Xl,easeElasticInOut:()=>Ql,easeElasticOut:()=>Zl,easeExp:()=>Ll,easeExpIn:()=>Al,easeExpInOut:()=>Ll,easeExpOut:()=>Bl,easeLinear:()=>gl,easePoly:()=>vl,easePolyIn:()=>xl,easePolyInOut:()=>vl,easePolyOut:()=>_l,easeQuad:()=>bl,easeQuadIn:()=>ml,easeQuadInOut:()=>bl,easeQuadOut:()=>yl,easeSin:()=>Tl,easeSinIn:()=>Cl,easeSinInOut:()=>Tl,easeSinOut:()=>Sl,every:()=>Ut,extent:()=>A,fcumsum:()=>E,filter:()=>Gt,flatGroup:()=>j,flatRollup:()=>W,forceCenter:()=>gc,forceCollide:()=>Ac,forceLink:()=>Ec,forceManyBody:()=>zc,forceRadial:()=>Ic,forceSimulation:()=>Dc,forceX:()=>Pc,forceY:()=>Rc,format:()=>Qc,formatDefaultLocale:()=>nh,formatLocale:()=>eh,formatPrefix:()=>Kc,formatSpecifier:()=>Uc,fsum:()=>L,geoAlbers:()=>Cp,geoAlbersUsa:()=>Sp,geoArea:()=>ou,geoAzimuthalEqualArea:()=>Bp,geoAzimuthalEqualAreaRaw:()=>Ap,geoAzimuthalEquidistant:()=>Ep,geoAzimuthalEquidistantRaw:()=>Lp,geoBounds:()=>qu,geoCentroid:()=>Ju,geoCircle:()=>uf,geoClipAntimeridian:()=>wf,geoClipCircle:()=>kf,geoClipExtent:()=>Ef,geoClipRectangle:()=>Lf,geoConicConformal:()=>zp,geoConicConformalRaw:()=>Dp,geoConicEqualArea:()=>kp,geoConicEqualAreaRaw:()=>wp,geoConicEquidistant:()=>qp,geoConicEquidistantRaw:()=>Rp,geoContains:()=>Vf,geoDistance:()=>Pf,geoEqualEarth:()=>Vp,geoEqualEarthRaw:()=>Gp,geoEquirectangular:()=>Pp,geoEquirectangularRaw:()=>Ip,geoGnomonic:()=>Zp,geoGnomonicRaw:()=>Xp,geoGraticule:()=>Qf,geoGraticule10:()=>Kf,geoIdentity:()=>Qp,geoInterpolate:()=>Jf,geoLength:()=>Df,geoMercator:()=>$p,geoMercatorRaw:()=>Fp,geoNaturalEarth1:()=>Jp,geoNaturalEarth1Raw:()=>Kp,geoOrthographic:()=>eg,geoOrthographicRaw:()=>tg,geoPath:()=>op,geoProjection:()=>xp,geoProjectionMutator:()=>_p,geoRotation:()=>lf,geoStereographic:()=>rg,geoStereographicRaw:()=>ng,geoStream:()=>Dh,geoTransform:()=>sp,geoTransverseMercator:()=>ag,geoTransverseMercatorRaw:()=>ig,gray:()=>Co,greatest:()=>_t,greatestIndex:()=>zt,group:()=>P,groupSort:()=>tt,groups:()=>R,hcl:()=>$o,hierarchy:()=>ug,histogram:()=>dt,hsl:()=>vr,html:()=>dc,image:()=>lc,index:()=>Y,indexes:()=>G,interpolate:()=>Gr,interpolateArray:()=>Pr,interpolateBasis:()=>Mr,interpolateBasisClosed:()=>Ar,interpolateBlues:()=>ow,interpolateBrBG:()=>bv,interpolateBuGn:()=>Dv,interpolateBuPu:()=>Iv,interpolateCividis:()=>yw,interpolateCool:()=>_w,interpolateCubehelix:()=>Am,interpolateCubehelixDefault:()=>bw,interpolateCubehelixLong:()=>Bm,interpolateDate:()=>qr,interpolateDiscrete:()=>gm,interpolateGnBu:()=>Rv,interpolateGreens:()=>lw,interpolateGreys:()=>hw,interpolateHcl:()=>Sm,interpolateHclLong:()=>Tm,interpolateHsl:()=>vm,interpolateHslLong:()=>wm,interpolateHue:()=>mm,interpolateInferno:()=>Ew,interpolateLab:()=>km,interpolateMagma:()=>Lw,interpolateNumber:()=>jr,interpolateNumberArray:()=>zr,interpolateObject:()=>Wr,interpolateOrRd:()=>jv,interpolateOranges:()=>mw,interpolatePRGn:()=>_v,interpolatePiYG:()=>wv,interpolatePlasma:()=>Fw,interpolatePuBu:()=>Yv,interpolatePuBuGn:()=>Hv,interpolatePuOr:()=>Cv,interpolatePuRd:()=>Vv,interpolatePurples:()=>fw,interpolateRainbow:()=>ww,interpolateRdBu:()=>Tv,interpolateRdGy:()=>Av,interpolateRdPu:()=>Zv,interpolateRdYlBu:()=>Lv,interpolateRdYlGn:()=>Fv,interpolateReds:()=>pw,interpolateRgb:()=>$r,interpolateRgbBasis:()=>Nr,interpolateRgbBasisClosed:()=>Dr,interpolateRound:()=>ym,interpolateSinebow:()=>Tw,interpolateSpectral:()=>Ov,interpolateString:()=>Yr,interpolateTransformCss:()=>Mi,interpolateTransformSvg:()=>Ai,interpolateTurbo:()=>Mw,interpolateViridis:()=>Bw,interpolateWarm:()=>xw,interpolateYlGn:()=>tw,interpolateYlGnBu:()=>Kv,interpolateYlOrBr:()=>nw,interpolateYlOrRd:()=>iw,interpolateZoom:()=>xm,interrupt:()=>vi,intersection:()=>Jt,interval:()=>bS,isoFormat:()=>gS,isoParse:()=>yS,json:()=>hc,lab:()=>So,lch:()=>Fo,least:()=>Nt,leastIndex:()=>Dt,line:()=>fk,lineRadial:()=>vk,link:()=>Ek,linkHorizontal:()=>Fk,linkRadial:()=>Ok,linkVertical:()=>$k,local:()=>Nw,map:()=>Vt,matcher:()=>Ae,max:()=>pt,maxIndex:()=>gt,mean:()=>Tt,median:()=>Mt,medianIndex:()=>At,merge:()=>Bt,min:()=>mt,minIndex:()=>yt,mode:()=>Lt,namespace:()=>We,namespaces:()=>je,nice:()=>ut,now:()=>oi,pack:()=>Pg,packEnclose:()=>kg,packSiblings:()=>zg,pairs:()=>Et,partition:()=>Ug,path:()=>to,pathRound:()=>eo,permute:()=>Z,pie:()=>mk,piecewise:()=>Lm,pointRadial:()=>kk,pointer:()=>Xr,pointers:()=>zw,polygonArea:()=>Fm,polygonCentroid:()=>$m,polygonContains:()=>Im,polygonHull:()=>zm,polygonLength:()=>Pm,precisionFixed:()=>rh,precisionPrefix:()=>ih,precisionRound:()=>ah,quadtree:()=>_c,quantile:()=>vt,quantileIndex:()=>kt,quantileSorted:()=>wt,quantize:()=>Em,quickselect:()=>bt,radialArea:()=>wk,radialLine:()=>vk,randomBates:()=>Ym,randomBernoulli:()=>Xm,randomBeta:()=>Km,randomBinomial:()=>Jm,randomCauchy:()=>ey,randomExponential:()=>Gm,randomGamma:()=>Qm,randomGeometric:()=>Zm,randomInt:()=>jm,randomIrwinHall:()=>Um,randomLcg:()=>ay,randomLogNormal:()=>Hm,randomLogistic:()=>ny,randomNormal:()=>Wm,randomPareto:()=>Vm,randomPoisson:()=>ry,randomUniform:()=>qm,randomWeibull:()=>ty,range:()=>$t,rank:()=>Ot,reduce:()=>Xt,reverse:()=>Zt,rgb:()=>fr,ribbon:()=>fo,ribbonArrow:()=>po,rollup:()=>H,rollups:()=>U,scaleBand:()=>hy,scaleDiverging:()=>J_,scaleDivergingLog:()=>tv,scaleDivergingPow:()=>nv,scaleDivergingSqrt:()=>rv,scaleDivergingSymlog:()=>ev,scaleIdentity:()=>Sy,scaleImplicit:()=>ly,scaleLinear:()=>Cy,scaleLog:()=>Oy,scaleOrdinal:()=>cy,scalePoint:()=>fy,scalePow:()=>Wy,scaleQuantile:()=>Gy,scaleQuantize:()=>Vy,scaleRadial:()=>Yy,scaleSequential:()=>Y_,scaleSequentialLog:()=>G_,scaleSequentialPow:()=>X_,scaleSequentialQuantile:()=>Q_,scaleSequentialSqrt:()=>Z_,scaleSequentialSymlog:()=>V_,scaleSqrt:()=>Hy,scaleSymlog:()=>Iy,scaleThreshold:()=>Xy,scaleTime:()=>j_,scaleUtc:()=>W_,scan:()=>It,schemeAccent:()=>ov,schemeBlues:()=>aw,schemeBrBG:()=>yv,schemeBuGn:()=>Nv,schemeBuPu:()=>zv,schemeCategory10:()=>av,schemeDark2:()=>sv,schemeGnBu:()=>Pv,schemeGreens:()=>sw,schemeGreys:()=>cw,schemeObservable10:()=>lv,schemeOrRd:()=>qv,schemeOranges:()=>gw,schemePRGn:()=>xv,schemePaired:()=>cv,schemePastel1:()=>hv,schemePastel2:()=>uv,schemePiYG:()=>vv,schemePuBu:()=>Uv,schemePuBuGn:()=>Wv,schemePuOr:()=>kv,schemePuRd:()=>Gv,schemePurples:()=>uw,schemeRdBu:()=>Sv,schemeRdGy:()=>Mv,schemeRdPu:()=>Xv,schemeRdYlBu:()=>Bv,schemeRdYlGn:()=>Ev,schemeReds:()=>dw,schemeSet1:()=>fv,schemeSet2:()=>dv,schemeSet3:()=>pv,schemeSpectral:()=>$v,schemeTableau10:()=>gv,schemeYlGn:()=>Jv,schemeYlGnBu:()=>Qv,schemeYlOrBr:()=>ew,schemeYlOrRd:()=>rw,select:()=>zn,selectAll:()=>Iw,selection:()=>Dn,selector:()=>Ce,selectorAll:()=>Me,shuffle:()=>Pt,shuffler:()=>Rt,some:()=>Yt,sort:()=>Q,stack:()=>eS,stackOffsetDiverging:()=>rS,stackOffsetExpand:()=>nS,stackOffsetNone:()=>QC,stackOffsetSilhouette:()=>iS,stackOffsetWiggle:()=>aS,stackOrderAppearance:()=>oS,stackOrderAscending:()=>lS,stackOrderDescending:()=>hS,stackOrderInsideOut:()=>uS,stackOrderNone:()=>KC,stackOrderReverse:()=>fS,stratify:()=>Qg,style:()=>tn,subset:()=>re,sum:()=>qt,superset:()=>ee,svg:()=>pc,symbol:()=>lC,symbolAsterisk:()=>Dk,symbolCircle:()=>zk,symbolCross:()=>Ik,symbolDiamond:()=>qk,symbolDiamond2:()=>jk,symbolPlus:()=>Wk,symbolSquare:()=>Hk,symbolSquare2:()=>Uk,symbolStar:()=>Xk,symbolTimes:()=>aC,symbolTriangle:()=>Qk,symbolTriangle2:()=>Jk,symbolWye:()=>iC,symbolX:()=>aC,symbols:()=>oC,symbolsFill:()=>oC,symbolsStroke:()=>sC,text:()=>rc,thresholdFreedmanDiaconis:()=>Ct,thresholdScott:()=>St,thresholdSturges:()=>ft,tickFormat:()=>wy,tickIncrement:()=>ct,tickStep:()=>ht,ticks:()=>lt,timeDay:()=>yb,timeDays:()=>bb,timeFormat:()=>yx,timeFormatDefaultLocale:()=>I_,timeFormatLocale:()=>gx,timeFriday:()=>Bb,timeFridays:()=>Db,timeHour:()=>db,timeHours:()=>pb,timeInterval:()=>ib,timeMillisecond:()=>ab,timeMilliseconds:()=>ob,timeMinute:()=>cb,timeMinutes:()=>hb,timeMonday:()=>Sb,timeMondays:()=>Fb,timeMonth:()=>Jb,timeMonths:()=>tx,timeParse:()=>bx,timeSaturday:()=>Lb,timeSaturdays:()=>zb,timeSecond:()=>sb,timeSeconds:()=>lb,timeSunday:()=>Cb,timeSundays:()=>Eb,timeThursday:()=>Ab,timeThursdays:()=>Nb,timeTickInterval:()=>ux,timeTicks:()=>hx,timeTuesday:()=>Tb,timeTuesdays:()=>$b,timeWednesday:()=>Mb,timeWednesdays:()=>Ob,timeWeek:()=>Cb,timeWeeks:()=>Eb,timeYear:()=>rx,timeYears:()=>ix,timeout:()=>pi,timer:()=>ci,timerFlush:()=>hi,transition:()=>Xi,transpose:()=>jt,tree:()=>om,treemap:()=>um,treemapBinary:()=>fm,treemapDice:()=>Hg,treemapResquarify:()=>pm,treemapSlice:()=>sm,treemapSliceDice:()=>dm,treemapSquarify:()=>hm,tsv:()=>sc,tsvFormat:()=>ll,tsvFormatBody:()=>cl,tsvFormatRow:()=>ul,tsvFormatRows:()=>hl,tsvFormatValue:()=>fl,tsvParse:()=>ol,tsvParseRows:()=>sl,union:()=>ie,unixDay:()=>vb,unixDays:()=>wb,utcDay:()=>xb,utcDays:()=>_b,utcFormat:()=>xx,utcFriday:()=>Hb,utcFridays:()=>Qb,utcHour:()=>gb,utcHours:()=>mb,utcMillisecond:()=>ab,utcMilliseconds:()=>ob,utcMinute:()=>ub,utcMinutes:()=>fb,utcMonday:()=>Rb,utcMondays:()=>Gb,utcMonth:()=>ex,utcMonths:()=>nx,utcParse:()=>_x,utcSaturday:()=>Ub,utcSaturdays:()=>Kb,utcSecond:()=>sb,utcSeconds:()=>lb,utcSunday:()=>Pb,utcSundays:()=>Yb,utcThursday:()=>Wb,utcThursdays:()=>Zb,utcTickInterval:()=>cx,utcTicks:()=>lx,utcTuesday:()=>qb,utcTuesdays:()=>Vb,utcWednesday:()=>jb,utcWednesdays:()=>Xb,utcWeek:()=>Pb,utcWeeks:()=>Yb,utcYear:()=>ax,utcYears:()=>ox,variance:()=>T,window:()=>Ze,xml:()=>fc,zip:()=>Ht,zoom:()=>FS,zoomIdentity:()=>wS,zoomTransform:()=>kS}),n.r(e);const l=a(r),c=l.right,h=l.left,u=a(s).center,f=c;function d(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=x(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const p=m(x),g=m(function(t){const e=x(t);return(t,n,r,i,a)=>{e(t,n,0+(r<<=2),0+(i<<=2),a<<=2),e(t,n,r+1,i+1,a),e(t,n,r+2,i+2,a),e(t,n,r+3,i+3,a)}});function m(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:a,height:o}=e;if(!((a=Math.floor(a))>=0))throw new RangeError("invalid width");if(!((o=Math.floor(void 0!==o?o:i.length/a))>=0))throw new RangeError("invalid height");if(!a||!o||!n&&!r)return e;const s=n&&t(n),l=r&&t(r),c=i.slice();return s&&l?(y(s,c,i,a,o),y(s,i,c,a,o),y(s,c,i,a,o),b(l,i,c,a,o),b(l,c,i,a,o),b(l,i,c,a,o)):s?(y(s,i,c,a,o),y(s,c,i,a,o),y(s,i,c,a,o)):l&&(b(l,i,c,a,o),b(l,c,i,a,o),b(l,i,c,a,o)),e}}function y(t,e,n,r,i){for(let a=0,o=r*i;a<o;)t(e,n,a,a+=r,1)}function b(t,e,n,r,i){for(let a=0,o=r*i;a<r;++a)t(e,n,a,a+o,r)}function x(t){const e=Math.floor(t);if(e===t)return function(t){const e=2*t+1;return(n,r,i,a,o)=>{if(!((a-=o)>=i))return;let s=t*r[i];const l=o*t;for(let t=i,e=i+l;t<e;t+=o)s+=r[Math.min(a,t)];for(let t=i,c=a;t<=c;t+=o)s+=r[Math.min(a,t+l)],n[t]=s/e,s-=r[Math.max(i,t-l)]}}(t);const n=t-e,r=2*t+1;return(t,i,a,o,s)=>{if(!((o-=s)>=a))return;let l=e*i[a];const c=s*e,h=c+s;for(let t=a,e=a+c;t<e;t+=s)l+=i[Math.min(o,t)];for(let e=a,u=o;e<=u;e+=s)l+=i[Math.min(o,e+c)],t[e]=(l+n*(i[Math.max(a,e-h)]+i[Math.min(o,e+h)]))/r,l-=i[Math.max(a,e-c)]}}function _(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}function v(t){return 0|t.length}function w(t){return!(t>0)}function k(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function C(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(k)).map(v),r=t.length-1,i=new Array(r+1).fill(0),a=[];if(r<0||n.some(w))return a;for(;;){a.push(i.map((e,n)=>t[n][e]));let o=r;for(;++i[o]===n[o];){if(0===o)return e?a.map(e):a;i[o--]=0}}}function S(t,e){var n=0,r=0;return Float64Array.from(t,void 0===e?t=>n+=+t||0:i=>n+=+e(i,r++,t)||0)}function T(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let o=-1;for(let s of t)null!=(s=e(s,++o,t))&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i))}if(r>1)return a/(r-1)}function M(t,e){const n=T(t,e);return n?Math.sqrt(n):n}function A(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}class B{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=e[r],a=t+i,o=Math.abs(t)<Math.abs(i)?t-(a-i):i-(a-t);o&&(e[n++]=o),t=a}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,i=this._n,a=0;if(i>0){for(a=t[--i];i>0&&(e=a,n=t[--i],a=e+n,r=n-(a-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=a+n,n==e-a&&(a=e))}return a}}function L(t,e){const n=new B;if(void 0===e)for(let e of t)(e=+e)&&n.add(e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function E(t,e){const n=new B;let r=-1;return Float64Array.from(t,void 0===e?t=>n.add(+t||0):i=>n.add(+e(i,++r,t)||0))}class F extends Map{constructor(t,e=z){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(O(this,t))}has(t){return super.has(O(this,t))}set(t,e){return super.set(N(this,t),e)}delete(t){return super.delete(D(this,t))}}class $ extends Set{constructor(t,e=z){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const e of t)this.add(e)}has(t){return super.has(O(this,t))}add(t){return super.add(N(this,t))}delete(t){return super.delete(D(this,t))}}function O({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function N({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function D({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function z(t){return null!==t&&"object"==typeof t?t.valueOf():t}function I(t){return t}function P(t,...e){return X(t,I,I,e)}function R(t,...e){return X(t,Array.from,I,e)}function q(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(t=>t.pop().map(([e,n])=>[...t,e,n]));return t}function j(t,...e){return q(R(t,...e),e)}function W(t,e,...n){return q(U(t,e,...n),n)}function H(t,e,...n){return X(t,I,e,n)}function U(t,e,...n){return X(t,Array.from,e,n)}function Y(t,...e){return X(t,I,V,e)}function G(t,...e){return X(t,Array.from,V,e)}function V(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function X(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);const o=new F,s=r[a++];let l=-1;for(const t of i){const e=s(t,++l,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(const[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}function Z(t,e){return Array.from(e,e=>t[e])}function Q(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),r.sort((t,n)=>{for(const r of e){const e=J(r[t],r[n]);if(e)return e}})):(n=t.map(n),r.sort((t,e)=>J(n[t],n[e]))),Z(t,r)}return t.sort(K(n))}function K(t=r){if(t===r)return J;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function J(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function tt(t,e,n){return(2!==e.length?Q(H(t,e,n),([t,e],[n,i])=>r(e,i)||r(t,n)):Q(P(t,n),([t,n],[i,a])=>e(n,a)||r(t,i))).map(([t])=>t)}var et=Array.prototype,nt=et.slice;function rt(t){return()=>t}et.map;const it=Math.sqrt(50),at=Math.sqrt(10),ot=Math.sqrt(2);function st(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=it?10:a>=at?5:a>=ot?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=n&&n<2?st(t,e,2*n):[s,l,c]}function lt(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const r=e<t,[i,a,o]=r?st(e,t,n):st(t,e,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}function ct(t,e,n){return st(t=+t,e=+e,n=+n)[2]}function ht(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?ct(e,t,n):ct(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function ut(t,e,n){let r;for(;;){const i=ct(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function ft(t){return Math.max(1,Math.ceil(Math.log(_(t))/Math.LN2)+1)}function dt(){var t=I,e=A,n=ft;function r(r){Array.isArray(r)||(r=Array.from(r));var i,a,o,s=r.length,l=new Array(s);for(i=0;i<s;++i)l[i]=t(r[i],i,r);var c=e(l),h=c[0],u=c[1],d=n(l,h,u);if(!Array.isArray(d)){const t=u,n=+d;if(e===A&&([h,u]=ut(h,u,n)),(d=lt(h,u,n))[0]<=h&&(o=ct(h,u,n)),d[d.length-1]>=u)if(t>=u&&e===A){const t=ct(h,u,n);isFinite(t)&&(t>0?u=(Math.floor(u/t)+1)*t:t<0&&(u=(Math.ceil(u*-t)+1)/-t))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>u;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y,b=new Array(p+1);for(i=0;i<=p;++i)(y=b[i]=[]).x0=i>0?d[i-1]:h,y.x1=i<p?d[i]:u;if(isFinite(o)){if(o>0)for(i=0;i<s;++i)null!=(a=l[i])&&h<=a&&a<=u&&b[Math.min(p,Math.floor((a-h)/o))].push(r[i]);else if(o<0)for(i=0;i<s;++i)if(null!=(a=l[i])&&h<=a&&a<=u){const t=Math.floor((h-a)*o);b[Math.min(p,t+(d[t]<=a))].push(r[i])}}else for(i=0;i<s;++i)null!=(a=l[i])&&h<=a&&a<=u&&b[f(d,a,0,p)].push(r[i]);return b}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:rt(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:rt([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:rt(Array.isArray(t)?nt.call(t):t),r):n},r}function pt(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function gt(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function mt(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function yt(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function bt(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?J:K(i);r>n;){if(r-n>600){const a=r-n+1,o=e-n+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);bt(t,e,Math.max(n,Math.floor(e-o*l/a+c)),Math.min(r,Math.floor(e+(a-o)*l/a+c)),i)}const a=t[e];let o=n,s=r;for(xt(t,n,e),i(t[r],a)>0&&xt(t,n,r);o<s;){for(xt(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}0===i(t[n],a)?xt(t,n,s):(++s,xt(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function xt(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function _t(t,e=r){let n,i=!1;if(1===e.length){let a;for(const o of t){const t=e(o);(i?r(t,a)>0:0===r(t,t))&&(n=o,a=t,i=!0)}}else for(const r of t)(i?e(r,n)>0:0===e(r,r))&&(n=r,i=!0);return n}function vt(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return mt(t);if(e>=1)return pt(t);var r,i=(r-1)*e,a=Math.floor(i),o=pt(bt(t,a).subarray(0,a+1));return o+(mt(t.subarray(a+1))-o)*(i-a)}}function wt(t,e,n=s){if((r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function kt(t,e,n=s){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(e,r)=>s(n(t[r],r,t))),e<=0)return yt(r);if(e>=1)return gt(r);var r,i=Uint32Array.from(t,(t,e)=>e),a=r.length-1,o=Math.floor(a*e);return bt(i,o,0,a,(t,e)=>J(r[t],r[e])),(o=_t(i.subarray(0,o+1),t=>r[t]))>=0?o:-1}}function Ct(t,e,n){const r=_(t),i=vt(t,.75)-vt(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function St(t,e,n){const r=_(t),i=M(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function Tt(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function Mt(t,e){return vt(t,.5,e)}function At(t,e){return kt(t,.5,e)}function Bt(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Lt(t,e){const n=new F;if(void 0===e)for(let e of t)null!=e&&e>=e&&n.set(e,(n.get(e)||0)+1);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&i>=i&&n.set(i,(n.get(i)||0)+1)}let r,i=0;for(const[t,e]of n)e>i&&(i=e,r=t);return r}function Et(t,e=Ft){const n=[];let r,i=!1;for(const a of t)i&&n.push(e(r,a)),r=a,i=!0;return n}function Ft(t,e){return[t,e]}function $t(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function Ot(t,e=r){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");let n=Array.from(t);const i=new Float64Array(n.length);2!==e.length&&(n=n.map(e),e=r);const a=(t,r)=>e(n[t],n[r]);let o,s;return(t=Uint32Array.from(n,(t,e)=>e)).sort(e===r?(t,e)=>J(n[t],n[e]):K(a)),t.forEach((t,e)=>{const n=a(t,void 0===o?t:o);n>=0?((void 0===o||n>0)&&(o=t,s=e),i[t]=s):i[t]=NaN}),i}function Nt(t,e=r){let n,i=!1;if(1===e.length){let a;for(const o of t){const t=e(o);(i?r(t,a)<0:0===r(t,t))&&(n=o,a=t,i=!0)}}else for(const r of t)(i?e(r,n)<0:0===e(r,r))&&(n=r,i=!0);return n}function Dt(t,e=r){if(1===e.length)return yt(t,e);let n,i=-1,a=-1;for(const r of t)++a,(i<0?0===e(r,r):e(r,n)<0)&&(n=r,i=a);return i}function zt(t,e=r){if(1===e.length)return gt(t,e);let n,i=-1,a=-1;for(const r of t)++a,(i<0?0===e(r,r):e(r,n)>0)&&(n=r,i=a);return i}function It(t,e){const n=Dt(t,e);return n<0?void 0:n}const Pt=Rt(Math.random);function Rt(t){return function(e,n=0,r=e.length){let i=r-(n=+n);for(;i;){const r=t()*i--|0,a=e[i+n];e[i+n]=e[r+n],e[r+n]=a}return e}}function qt(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function jt(t){if(!(i=t.length))return[];for(var e=-1,n=mt(t,Wt),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function Wt(t){return t.length}function Ht(){return jt(arguments)}function Ut(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function Yt(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function Gt(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function Vt(t,e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof e)throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function Xt(t,e,n){if("function"!=typeof e)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,a,o=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++o}for(;({done:i,value:a}=r.next()),!i;)n=e(n,a,++o,t);return n}function Zt(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Qt(t,...e){t=new $(t);for(const n of e)for(const e of n)t.delete(e);return t}function Kt(t,e){const n=e[Symbol.iterator](),r=new $;for(const e of t){if(r.has(e))return!1;let t,i;for(;({value:t,done:i}=n.next())&&!i;){if(Object.is(e,t))return!1;r.add(t)}}return!0}function Jt(t,...e){t=new $(t),e=e.map(te);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function te(t){return t instanceof $?t:new $(t)}function ee(t,e){const n=t[Symbol.iterator](),r=new Set;for(const t of e){const e=ne(t);if(r.has(e))continue;let i,a;for(;({value:i,done:a}=n.next());){if(a)return!1;const t=ne(i);if(r.add(t),Object.is(e,t))break}}return!0}function ne(t){return null!==t&&"object"==typeof t?t.valueOf():t}function re(t,e){return ee(e,t)}function ie(...t){const e=new $;for(const n of t)for(const t of n)e.add(t);return e}function ae(t){return t}var oe=1e-6;function se(t){return"translate("+t+",0)"}function le(t){return"translate(0,"+t+")"}function ce(t){return e=>+t(e)}function he(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ue(){return!this.__axis}function fe(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,h=4===t||2===t?"x":"y",u=1===t||3===t?se:le;function f(f){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):ae:i,g=Math.max(a,0)+s,m=e.range(),y=+m[0]+l,b=+m[m.length-1]+l,x=(e.bandwidth?he:ce)(e.copy(),l),_=f.selection?f.selection():f,v=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(d,e).order(),k=w.exit(),C=w.enter().append("g").attr("class","tick"),S=w.select("line"),T=w.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(C),S=S.merge(C.append("line").attr("stroke","currentColor").attr(h+"2",c*a)),T=T.merge(C.append("text").attr("fill","currentColor").attr(h,c*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==_&&(v=v.transition(f),w=w.transition(f),S=S.transition(f),T=T.transition(f),k=k.transition(f).attr("opacity",oe).attr("transform",function(t){return isFinite(t=x(t))?u(t+l):this.getAttribute("transform")}),C.attr("opacity",oe).attr("transform",function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:x(t))+l)})),k.remove(),v.attr("d",4===t||2===t?o?"M"+c*o+","+y+"H"+l+"V"+b+"H"+c*o:"M"+l+","+y+"V"+b:o?"M"+y+","+c*o+"V"+l+"H"+b+"V"+c*o:"M"+y+","+l+"H"+b),w.attr("opacity",1).attr("transform",function(t){return u(x(t)+l)}),S.attr(h+"2",c*a),T.attr(h,c*g).text(p),_.filter(ue).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each(function(){this.__axis=x})}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function de(t){return fe(1,t)}function pe(t){return fe(2,t)}function ge(t){return fe(3,t)}function me(t){return fe(4,t)}var ye={value:()=>{}};function be(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new xe(r)}function xe(t){this._=t}function _e(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ve(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ye,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}xe.prototype=be.prototype={constructor:xe,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=ve(i[n],t.name,e);else if(null==e)for(n in i)i[n]=ve(i[n],t.name,null);return this}for(;++o<s;)if((n=(t=a[o]).type)&&(n=_e(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xe(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const we=be;function ke(){}function Ce(t){return null==t?ke:function(){return this.querySelector(t)}}function Se(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Te(){return[]}function Me(t){return null==t?Te:function(){return this.querySelectorAll(t)}}function Ae(t){return function(){return this.matches(t)}}function Be(t){return function(e){return e.matches(t)}}var Le=Array.prototype.find;function Ee(){return this.firstElementChild}var Fe=Array.prototype.filter;function $e(){return Array.from(this.children)}function Oe(t){return new Array(t.length)}function Ne(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function De(t,e,n,r,i,a){for(var o,s=0,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new Ne(t,a[s]);for(;s<l;++s)(o=e[s])&&(i[s]=o)}function ze(t,e,n,r,i,a,o){var s,l,c,h=new Map,u=e.length,f=a.length,d=new Array(u);for(s=0;s<u;++s)(l=e[s])&&(d[s]=c=o.call(l,l.__data__,s,e)+"",h.has(c)?i[s]=l:h.set(c,l));for(s=0;s<f;++s)c=o.call(t,a[s],s,a)+"",(l=h.get(c))?(r[s]=l,l.__data__=a[s],h.delete(c)):n[s]=new Ne(t,a[s]);for(s=0;s<u;++s)(l=e[s])&&h.get(d[s])===l&&(i[s]=l)}function Ie(t){return t.__data__}function Pe(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Re(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}Ne.prototype={constructor:Ne,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var qe="http://www.w3.org/1999/xhtml";const je={svg:"http://www.w3.org/2000/svg",xhtml:qe,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function We(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),je.hasOwnProperty(e)?{space:je[e],local:t}:t}function He(t){return function(){this.removeAttribute(t)}}function Ue(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ye(t,e){return function(){this.setAttribute(t,e)}}function Ge(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ve(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Xe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ze(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Qe(t){return function(){this.style.removeProperty(t)}}function Ke(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Je(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function tn(t,e){return t.style.getPropertyValue(e)||Ze(t).getComputedStyle(t,null).getPropertyValue(e)}function en(t){return function(){delete this[t]}}function nn(t,e){return function(){this[t]=e}}function rn(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function an(t){return t.trim().split(/^|\s+/)}function on(t){return t.classList||new sn(t)}function sn(t){this._node=t,this._names=an(t.getAttribute("class")||"")}function ln(t,e){for(var n=on(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function cn(t,e){for(var n=on(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function hn(t){return function(){ln(this,t)}}function un(t){return function(){cn(this,t)}}function fn(t,e){return function(){(e.apply(this,arguments)?ln:cn)(this,t)}}function dn(){this.textContent=""}function pn(t){return function(){this.textContent=t}}function gn(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function mn(){this.innerHTML=""}function yn(t){return function(){this.innerHTML=t}}function bn(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function xn(){this.nextSibling&&this.parentNode.appendChild(this)}function _n(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vn(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===qe&&e.documentElement.namespaceURI===qe?e.createElement(t):e.createElementNS(n,t)}}function wn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kn(t){var e=We(t);return(e.local?wn:vn)(e)}function Cn(){return null}function Sn(){var t=this.parentNode;t&&t.removeChild(this)}function Tn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Mn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function An(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Bn(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Ln(t,e,n){var r=Ze(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function En(t,e){return function(){return Ln(this,t,e)}}function Fn(t,e){return function(){return Ln(this,t,e.apply(this,arguments))}}sn.prototype={add:function(t){this._names.indexOf(t)<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}};var $n=[null];function On(t,e){this._groups=t,this._parents=e}function Nn(){return new On([[document.documentElement]],$n)}On.prototype=Nn.prototype={constructor:On,select:function(t){"function"!=typeof t&&(t=Ce(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],l=s.length,c=r[i]=new Array(l),h=0;h<l;++h)(a=s[h])&&(o=t.call(a,a.__data__,h,s))&&("__data__"in a&&(o.__data__=a.__data__),c[h]=o);return new On(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Se(t.apply(this,arguments))}}(t):Me(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new On(r,i)},selectChild:function(t){return this.select(null==t?Ee:function(t){return function(){return Le.call(this.children,t)}}("function"==typeof t?t:Be(t)))},selectChildren:function(t){return this.selectAll(null==t?$e:function(t){return function(){return Fe.call(this.children,t)}}("function"==typeof t?t:Be(t)))},filter:function(t){"function"!=typeof t&&(t=Ae(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,l=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new On(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Ie);var n,r=e?ze:De,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),l=new Array(o),c=new Array(o),h=0;h<o;++h){var u=i[h],f=a[h],d=f.length,p=Pe(t.call(u,u&&u.__data__,h,i)),g=p.length,m=l[h]=new Array(g),y=s[h]=new Array(g);r(u,f,m,y,c[h]=new Array(d),p,e);for(var b,x,_=0,v=0;_<g;++_)if(b=m[_]){for(_>=v&&(v=_+1);!(x=y[v])&&++v<g;);b._next=x||null}}return(s=new On(s,i))._enter=l,s._exit=c,s},enter:function(){return new On(this._enter||this._groups.map(Oe),this._parents)},exit:function(){return new On(this._exit||this._groups.map(Oe),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),l=0;l<o;++l)for(var c,h=n[l],u=r[l],f=h.length,d=s[l]=new Array(f),p=0;p<f;++p)(c=h[p]||u[p])&&(d[p]=c);for(;l<i;++l)s[l]=n[l];return new On(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Re);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],l=s.length,c=i[a]=new Array(l),h=0;h<l;++h)(o=s[h])&&(c[h]=o);c.sort(e)}return new On(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=We(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Ue:He:"function"==typeof e?n.local?Xe:Ve:n.local?Ge:Ye)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Qe:"function"==typeof e?Je:Ke)(t,e,null==n?"":n)):tn(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?en:"function"==typeof e?rn:nn)(t,e)):this.node()[t]},classed:function(t,e){var n=an(t+"");if(arguments.length<2){for(var r=on(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?fn:e?hn:un)(n,e))},text:function(t){return arguments.length?this.each(null==t?dn:("function"==typeof t?gn:pn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?mn:("function"==typeof t?bn:yn)(t)):this.node().innerHTML},raise:function(){return this.each(xn)},lower:function(){return this.each(_n)},append:function(t){var e="function"==typeof t?t:kn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:kn(t),r=null==e?Cn:"function"==typeof e?e:Ce(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Sn)},clone:function(t){return this.select(t?Mn:Tn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Bn:An,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,h=s.length;c<h;++c)for(r=0,l=s[c];r<o;++r)if((i=a[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Fn:En)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const Dn=Nn;function zn(t){return"string"==typeof t?new On([[document.querySelector(t)]],[document.documentElement]):new On([[t]],$n)}const In={passive:!1},Pn={capture:!0,passive:!1};function Rn(t){t.stopImmediatePropagation()}function qn(t){t.preventDefault(),t.stopImmediatePropagation()}function jn(t){var e=t.document.documentElement,n=zn(t).on("dragstart.drag",qn,Pn);"onselectstart"in e?n.on("selectstart.drag",qn,Pn):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Wn(t,e){var n=t.document.documentElement,r=zn(t).on("dragstart.drag",null);e&&(r.on("click.drag",qn,Pn),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Hn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Un(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Yn(){}var Gn=.7,Vn=1/Gn,Xn="\\s*([+-]?\\d+)\\s*",Zn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kn=/^#([0-9a-f]{3,8})$/,Jn=new RegExp(`^rgb\\(${Xn},${Xn},${Xn}\\)$`),tr=new RegExp(`^rgb\\(${Qn},${Qn},${Qn}\\)$`),er=new RegExp(`^rgba\\(${Xn},${Xn},${Xn},${Zn}\\)$`),nr=new RegExp(`^rgba\\(${Qn},${Qn},${Qn},${Zn}\\)$`),rr=new RegExp(`^hsl\\(${Zn},${Qn},${Qn}\\)$`),ir=new RegExp(`^hsla\\(${Zn},${Qn},${Qn},${Zn}\\)$`),ar={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function or(){return this.rgb().formatHex()}function sr(){return this.rgb().formatRgb()}function lr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Kn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?cr(e):3===n?new dr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?hr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?hr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Jn.exec(t))?new dr(e[1],e[2],e[3],1):(e=tr.exec(t))?new dr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=er.exec(t))?hr(e[1],e[2],e[3],e[4]):(e=nr.exec(t))?hr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=rr.exec(t))?xr(e[1],e[2]/100,e[3]/100,1):(e=ir.exec(t))?xr(e[1],e[2]/100,e[3]/100,e[4]):ar.hasOwnProperty(t)?cr(ar[t]):"transparent"===t?new dr(NaN,NaN,NaN,0):null}function cr(t){return new dr(t>>16&255,t>>8&255,255&t,1)}function hr(t,e,n,r){return r<=0&&(t=e=n=NaN),new dr(t,e,n,r)}function ur(t){return t instanceof Yn||(t=lr(t)),t?new dr((t=t.rgb()).r,t.g,t.b,t.opacity):new dr}function fr(t,e,n,r){return 1===arguments.length?ur(t):new dr(t,e,n,null==r?1:r)}function dr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function pr(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function gr(){const t=mr(this.opacity);return`${1===t?"rgb(":"rgba("}${yr(this.r)}, ${yr(this.g)}, ${yr(this.b)}${1===t?")":`, ${t})`}`}function mr(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function yr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function br(t){return((t=yr(t))<16?"0":"")+t.toString(16)}function xr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new wr(t,e,n,r)}function _r(t){if(t instanceof wr)return new wr(t.h,t.s,t.l,t.opacity);if(t instanceof Yn||(t=lr(t)),!t)return new wr;if(t instanceof wr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new wr(o,s,l,t.opacity)}function vr(t,e,n,r){return 1===arguments.length?_r(t):new wr(t,e,n,null==r?1:r)}function wr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function kr(t){return(t=(t||0)%360)<0?t+360:t}function Cr(t){return Math.max(0,Math.min(1,t||0))}function Sr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Tr(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function Mr(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Tr((n-r/e)*e,o,i,a,s)}}function Ar(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Tr((n-r/e)*e,i,a,o,s)}}Hn(Yn,lr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:or,formatHex:or,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return _r(this).formatHsl()},formatRgb:sr,toString:sr}),Hn(dr,fr,Un(Yn,{brighter(t){return t=null==t?Vn:Math.pow(Vn,t),new dr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Gn:Math.pow(Gn,t),new dr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new dr(yr(this.r),yr(this.g),yr(this.b),mr(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:pr,formatHex:pr,formatHex8:function(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:gr,toString:gr})),Hn(wr,vr,Un(Yn,{brighter(t){return t=null==t?Vn:Math.pow(Vn,t),new wr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Gn:Math.pow(Gn,t),new wr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new dr(Sr(t>=240?t-240:t+120,i,r),Sr(t,i,r),Sr(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new wr(kr(this.h),Cr(this.s),Cr(this.l),mr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=mr(this.opacity);return`${1===t?"hsl(":"hsla("}${kr(this.h)}, ${100*Cr(this.s)}%, ${100*Cr(this.l)}%${1===t?")":`, ${t})`}`}}));const Br=t=>()=>t;function Lr(t,e){return function(n){return t+n*e}}function Er(t,e){var n=e-t;return n?Lr(t,n>180||n<-180?n-360*Math.round(n/360):n):Br(isNaN(t)?e:t)}function Fr(t,e){var n=e-t;return n?Lr(t,n):Br(isNaN(t)?e:t)}const $r=function t(e){var n=function(t){return 1===(t=+t)?Fr:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Br(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=fr(t)).r,(e=fr(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Fr(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Or(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=fr(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var Nr=Or(Mr),Dr=Or(Ar);function zr(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Ir(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Pr(t,e){return(Ir(e)?zr:Rr)(t,e)}function Rr(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Gr(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function qr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function jr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Wr(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Gr(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Hr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ur=new RegExp(Hr.source,"g");function Yr(t,e){var n,r,i,a=Hr.lastIndex=Ur.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=Hr.exec(t))&&(r=Ur.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:jr(n,r)})),a=Ur.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Gr(t,e){var n,r=typeof e;return null==e||"boolean"===r?Br(e):("number"===r?jr:"string"===r?(n=lr(e))?(e=n,$r):Yr:e instanceof lr?$r:e instanceof Date?qr:Ir(e)?zr:Array.isArray(e)?Rr:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Wr:jr)(t,e)}function Vr(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Xr(t,e){if(t=Vr(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var Zr,Qr,Kr=0,Jr=0,ti=0,ei=0,ni=0,ri=0,ii="object"==typeof performance&&performance.now?performance:Date,ai="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function oi(){return ni||(ai(si),ni=ii.now()+ri)}function si(){ni=0}function li(){this._call=this._time=this._next=null}function ci(t,e,n){var r=new li;return r.restart(t,e,n),r}function hi(){oi(),++Kr;for(var t,e=Zr;e;)(t=ni-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Kr}function ui(){ni=(ei=ii.now())+ri,Kr=Jr=0;try{hi()}finally{Kr=0,function(){for(var t,e,n=Zr,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Zr=e);Qr=t,di(r)}(),ni=0}}function fi(){var t=ii.now(),e=t-ei;e>1e3&&(ri-=e,ei=t)}function di(t){Kr||(Jr&&(Jr=clearTimeout(Jr)),t-ni>24?(t<1/0&&(Jr=setTimeout(ui,t-ii.now()-ri)),ti&&(ti=clearInterval(ti))):(ti||(ei=ii.now(),ti=setInterval(fi,1e3)),Kr=1,ai(ui)))}function pi(t,e,n){var r=new li;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}li.prototype=ci.prototype={constructor:li,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?oi():+n)+(null==e?0:+e),this._next||Qr===this||(Qr?Qr._next=this:Zr=this,Qr=this),this._call=t,this._time=n,di()},stop:function(){this._call&&(this._call=null,this._time=1/0,di())}};var gi=we("start","end","cancel","interrupt"),mi=[];function yi(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(l){var c,h,u,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return pi(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(pi(function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(l))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(u=n.tween.length),c=0,h=-1;c<u;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++h]=f);r.length=h+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ci(function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:gi,tween:mi,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function bi(t,e){var n=_i(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function xi(t,e){var n=_i(t,e);if(n.state>3)throw new Error("too late; already running");return n}function _i(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function vi(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var wi,ki=180/Math.PI,Ci={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Si(t,e,n,r,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*ki,skewX:Math.atan(l)*ki,scaleX:o,scaleY:s}}function Ti(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var l=o.push("translate(",null,e,null,n);s.push({i:l-4,x:jr(t,i)},{i:l-2,x:jr(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:jr(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,l),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:jr(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,l),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:jr(t,n)},{i:s-2,x:jr(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Mi=Ti(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ci:Si(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Ai=Ti(function(t){return null==t?Ci:(wi||(wi=document.createElementNS("http://www.w3.org/2000/svg","g")),wi.setAttribute("transform",t),(t=wi.transform.baseVal.consolidate())?Si((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ci)},", ",")",")");function Bi(t,e){var n,r;return function(){var i=xi(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Li(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=xi(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=s;break}l===c&&i.push(s)}a.tween=i}}function Ei(t,e,n){var r=t._id;return t.each(function(){var t=xi(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return _i(t,r).value[e]}}function Fi(t,e){var n;return("number"==typeof e?jr:e instanceof lr?$r:(n=lr(e))?(e=n,$r):Yr)(t,e)}function $i(t){return function(){this.removeAttribute(t)}}function Oi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ni(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Di(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function zi(t,e,n){var r,i,a;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,l));this.removeAttribute(t)}}function Ii(t,e,n){var r,i,a;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,l));this.removeAttributeNS(t.space,t.local)}}function Pi(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function Ri(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function qi(t,e){return function(){bi(this,t).delay=+e.apply(this,arguments)}}function ji(t,e){return e=+e,function(){bi(this,t).delay=e}}function Wi(t,e){return function(){xi(this,t).duration=+e.apply(this,arguments)}}function Hi(t,e){return e=+e,function(){xi(this,t).duration=e}}var Ui=Dn.prototype.constructor;function Yi(t){return function(){this.style.removeProperty(t)}}var Gi=0;function Vi(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Xi(t){return Dn().transition(t)}function Zi(){return++Gi}var Qi=Dn.prototype;function Ki(t){return t*t*t}function Ji(t){return--t*t*t+1}function ta(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Vi.prototype=Xi.prototype={constructor:Vi,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ce(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,l,c=r[o],h=c.length,u=a[o]=new Array(h),f=0;f<h;++f)(s=c[f])&&(l=t.call(s,s.__data__,f,c))&&("__data__"in s&&(l.__data__=s.__data__),u[f]=l,yi(u[f],e,n,f,u,_i(s,n)));return new Vi(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Me(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var l,c=r[s],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var f,d=t.call(l,l.__data__,u,c),p=_i(l,n),g=0,m=d.length;g<m;++g)(f=d[g])&&yi(f,e,n,g,d,p);a.push(d),o.push(l)}return new Vi(a,o,e,n)},selectChild:Qi.selectChild,selectChildren:Qi.selectChildren,filter:function(t){"function"!=typeof t&&(t=Ae(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,l=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new Vi(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var l,c=e[s],h=n[s],u=c.length,f=o[s]=new Array(u),d=0;d<u;++d)(l=c[d]||h[d])&&(f[d]=l);for(;s<r;++s)o[s]=e[s];return new Vi(o,this._parents,this._name,this._id)},selection:function(){return new Ui(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Zi(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,c=0;c<l;++c)if(o=s[c]){var h=_i(o,e);yi(o,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Vi(r,this._parents,t,n)},call:Qi.call,nodes:Qi.nodes,node:Qi.node,size:Qi.size,empty:Qi.empty,each:Qi.each,on:function(t,e){var n=this._id;return arguments.length<2?_i(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?bi:xi;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}(n,t,e))},attr:function(t,e){var n=We(t),r="transform"===n?Ai:Fi;return this.attrTween(t,"function"==typeof e?(n.local?Ii:zi)(n,r,Ei(this,"attr."+t,e)):null==e?(n.local?Oi:$i)(n):(n.local?Di:Ni)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=We(t);return this.tween(n,(r.local?Pi:Ri)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Mi:Fi;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=tn(this,t),o=(this.style.removeProperty(t),tn(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Yi(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=tn(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=tn(this,t)),o===l?null:o===r&&l===i?a:(i=l,a=e(r=o,s))}}(t,r,Ei(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var l=xi(this,t),c=l.on,h=null==l.value[o]?a||(a=Yi(e)):void 0;c===n&&i===h||(r=(n=c).copy()).on(s,i=h),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=tn(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ei(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=_i(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Bi:Li)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?qi:ji)(e,t)):_i(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Wi:Hi)(e,t)):_i(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){xi(this,t).ease=e}}(e,t)):_i(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;xi(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},l={value:function(){0===--i&&a()}};n.each(function(){var n=xi(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e}),0===i&&a()})},[Symbol.iterator]:Qi[Symbol.iterator]};var ea={time:null,delay:0,duration:250,ease:ta};function na(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Dn.prototype.interrupt=function(t){return this.each(function(){vi(this,t)})},Dn.prototype.transition=function(t){var e,n;t instanceof Vi?(e=t._id,t=t._name):(e=Zi(),(n=ea).time=oi(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,c=0;c<l;++c)(o=s[c])&&yi(o,t,e,c,s,n||na(o,e));return new Vi(r,this._parents,t,e)};var ra=[null];function ia(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Vi([[t]],ra,e,+r);return null}const aa=t=>()=>t;function oa(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function sa(t){t.preventDefault(),t.stopImmediatePropagation()}var la={name:"drag"},ca={name:"space"},ha={name:"handle"},ua={name:"center"};const{abs:fa,max:da,min:pa}=Math;function ga(t){return[+t[0],+t[1]]}function ma(t){return[ga(t[0]),ga(t[1])]}var ya={name:"x",handles:["w","e"].map(Sa),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ba={name:"y",handles:["n","s"].map(Sa),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},xa={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Sa),input:function(t){return null==t?null:ma(t)},output:function(t){return t}},_a={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},va={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},wa={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ka={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ca={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Sa(t){return{type:t}}function Ta(t){return!t.ctrlKey&&!t.button}function Ma(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Aa(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ba(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function La(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ea(){return Oa(ya)}function Fa(){return Oa(ba)}function $a(){return Oa(xa)}function Oa(t){var e,n=Ma,r=Ta,i=Aa,a=!0,o=we("start","brush","end"),s=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([Sa("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_a.overlay).merge(n).each(function(){var t=Ba(this).extent;zn(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([Sa("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_a.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,function(t){return t.type});r.exit().remove(),r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return _a[t.type]}),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=zn(this),e=Ba(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function h(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new u(t,e,n):r}function u(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,o,s,l,u,f,d,p,g,m,y,b=this,x=n.target.__data__.type,_="selection"===(a&&n.metaKey?x="overlay":x)?la:a&&n.altKey?ua:ha,v=t===ba?null:ka[x],w=t===ya?null:Ca[x],k=Ba(b),C=k.extent,S=k.selection,T=C[0][0],M=C[0][1],A=C[1][0],B=C[1][1],L=0,E=0,F=v&&w&&a&&n.shiftKey,$=Array.from(n.touches||[n],t=>{const e=t.identifier;return(t=Xr(t,b)).point0=t.slice(),t.identifier=e,t});vi(b);var O=h(b,arguments,!0).beforestart();if("overlay"===x){S&&(g=!0);const e=[$[0],$[1]||$[0]];k.selection=S=[[i=t===ba?T:pa(e[0][0],e[1][0]),s=t===ya?M:pa(e[0][1],e[1][1])],[u=t===ba?A:da(e[0][0],e[1][0]),d=t===ya?B:da(e[0][1],e[1][1])]],$.length>1&&P(n)}else i=S[0][0],s=S[0][1],u=S[1][0],d=S[1][1];o=i,l=s,f=u,p=d;var N=zn(b).attr("pointer-events","none"),D=N.selectAll(".overlay").attr("cursor",_a[x]);if(n.touches)O.moved=I,O.ended=R;else{var z=zn(n.view).on("mousemove.brush",I,!0).on("mouseup.brush",R,!0);a&&z.on("keydown.brush",function(t){switch(t.keyCode){case 16:F=v&&w;break;case 18:_===ha&&(v&&(u=f-L*v,i=o+L*v),w&&(d=p-E*w,s=l+E*w),_=ua,P(t));break;case 32:_!==ha&&_!==ua||(v<0?u=f-L:v>0&&(i=o-L),w<0?d=p-E:w>0&&(s=l-E),_=ca,D.attr("cursor",_a.selection),P(t));break;default:return}sa(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:F&&(m=y=F=!1,P(t));break;case 18:_===ua&&(v<0?u=f:v>0&&(i=o),w<0?d=p:w>0&&(s=l),_=ha,P(t));break;case 32:_===ca&&(t.altKey?(v&&(u=f-L*v,i=o+L*v),w&&(d=p-E*w,s=l+E*w),_=ua):(v<0?u=f:v>0&&(i=o),w<0?d=p:w>0&&(s=l),_=ha),D.attr("cursor",_a[x]),P(t));break;default:return}sa(t)},!0),jn(n.view)}c.call(b),O.start(n,_.name)}function I(t){for(const e of t.changedTouches||[t])for(const t of $)t.identifier===e.identifier&&(t.cur=Xr(e,b));if(F&&!m&&!y&&1===$.length){const t=$[0];fa(t.cur[0]-t[0])>fa(t.cur[1]-t[1])?y=!0:m=!0}for(const t of $)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,sa(t),P(t)}function P(t){const e=$[0],n=e.point0;var r;switch(L=e[0]-n[0],E=e[1]-n[1],_){case ca:case la:v&&(L=da(T-i,pa(A-u,L)),o=i+L,f=u+L),w&&(E=da(M-s,pa(B-d,E)),l=s+E,p=d+E);break;case ha:$[1]?(v&&(o=da(T,pa(A,$[0][0])),f=da(T,pa(A,$[1][0])),v=1),w&&(l=da(M,pa(B,$[0][1])),p=da(M,pa(B,$[1][1])),w=1)):(v<0?(L=da(T-i,pa(A-i,L)),o=i+L,f=u):v>0&&(L=da(T-u,pa(A-u,L)),o=i,f=u+L),w<0?(E=da(M-s,pa(B-s,E)),l=s+E,p=d):w>0&&(E=da(M-d,pa(B-d,E)),l=s,p=d+E));break;case ua:v&&(o=da(T,pa(A,i-L*v)),f=da(T,pa(A,u+L*v))),w&&(l=da(M,pa(B,s-E*w)),p=da(M,pa(B,d+E*w)))}f<o&&(v*=-1,r=i,i=u,u=r,r=o,o=f,f=r,x in va&&D.attr("cursor",_a[x=va[x]])),p<l&&(w*=-1,r=s,s=d,d=r,r=l,l=p,p=r,x in wa&&D.attr("cursor",_a[x=wa[x]])),k.selection&&(S=k.selection),m&&(o=S[0][0],f=S[1][0]),y&&(l=S[0][1],p=S[1][1]),S[0][0]===o&&S[0][1]===l&&S[1][0]===f&&S[1][1]===p||(k.selection=[[o,l],[f,p]],c.call(b),O.brush(t,_.name))}function R(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else Wn(t.view,g),z.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),D.attr("cursor",_a.overlay),k.selection&&(S=k.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(S)&&(k.selection=null,c.call(b)),O.end(t,_.name)}}function d(t){h(this,arguments).moved(t)}function p(t){h(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=ma(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,r){e.tween?e.on("start.brush",function(t){h(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){h(this,arguments).end(t)}).tween("brush",function(){var e=this,r=e.__brush,i=h(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Gr(a,o);function l(t){r.selection=1===t&&null===o?null:s(t),c.call(e),i.brush()}return null!==a&&null!==o?l:l(1)}):e.each(function(){var e=this,i=arguments,a=e.__brush,o=t.input("function"==typeof n?n.apply(e,i):n,a.extent),s=h(e,i).beforestart();vi(e),a.selection=null===o?null:o,c.call(e),s.start(r).brush(r).end(r)})},l.clear=function(t,e){l.move(t,null,e)},u.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=zn(this.that).datum();o.call(e,this.that,new oa(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:r,dispatch:o}),i)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:aa(ma(t)),l):n},l.filter=function(t){return arguments.length?(r="function"==typeof t?t:aa(!!t),l):r},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:aa(!!t),l):i},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(a=!!t,l):a},l.on=function(){var t=o.on.apply(o,arguments);return t===o?l:t},l}var Na=Math.abs,Da=Math.cos,za=Math.sin,Ia=Math.PI,Pa=Ia/2,Ra=2*Ia,qa=Math.max,ja=1e-12;function Wa(t,e){return Array.from({length:e-t},(e,n)=>t+n)}function Ha(){return Ga(!1,!1)}function Ua(){return Ga(!1,!0)}function Ya(){return Ga(!0,!1)}function Ga(t,e){var n=0,r=null,i=null,a=null;function o(o){var s,l=o.length,c=new Array(l),h=Wa(0,l),u=new Array(l*l),f=new Array(l),d=0;o=Float64Array.from({length:l*l},e?(t,e)=>o[e%l][e/l|0]:(t,e)=>o[e/l|0][e%l]);for(let e=0;e<l;++e){let n=0;for(let r=0;r<l;++r)n+=o[e*l+r]+t*o[r*l+e];d+=c[e]=n}s=(d=qa(0,Ra-n*l)/d)?n:Ra/l;{let e=0;r&&h.sort((t,e)=>r(c[t],c[e]));for(const n of h){const r=e;if(t){const t=Wa(1+~l,l).filter(t=>t<0?o[~t*l+n]:o[n*l+t]);i&&t.sort((t,e)=>i(t<0?-o[~t*l+n]:o[n*l+t],e<0?-o[~e*l+n]:o[n*l+e]));for(const r of t)r<0?(u[~r*l+n]||(u[~r*l+n]={source:null,target:null})).target={index:n,startAngle:e,endAngle:e+=o[~r*l+n]*d,value:o[~r*l+n]}:(u[n*l+r]||(u[n*l+r]={source:null,target:null})).source={index:n,startAngle:e,endAngle:e+=o[n*l+r]*d,value:o[n*l+r]};f[n]={index:n,startAngle:r,endAngle:e,value:c[n]}}else{const t=Wa(0,l).filter(t=>o[n*l+t]||o[t*l+n]);i&&t.sort((t,e)=>i(o[n*l+t],o[n*l+e]));for(const r of t){let t;if(n<r?(t=u[n*l+r]||(u[n*l+r]={source:null,target:null}),t.source={index:n,startAngle:e,endAngle:e+=o[n*l+r]*d,value:o[n*l+r]}):(t=u[r*l+n]||(u[r*l+n]={source:null,target:null}),t.target={index:n,startAngle:e,endAngle:e+=o[n*l+r]*d,value:o[n*l+r]},n===r&&(t.source=t.target)),t.source&&t.target&&t.source.value<t.target.value){const e=t.source;t.source=t.target,t.target=e}}f[n]={index:n,startAngle:r,endAngle:e,value:c[n]}}e+=s}}return(u=Object.values(u)).groups=f,a?u.sort(a):u}return o.padAngle=function(t){return arguments.length?(n=qa(0,t),o):n},o.sortGroups=function(t){return arguments.length?(r=t,o):r},o.sortSubgroups=function(t){return arguments.length?(i=t,o):i},o.sortChords=function(t){return arguments.length?(null==t?a=null:(e=t,a=function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)})._=t,o):a&&a._;var e},o}const Va=Math.PI,Xa=2*Va,Za=1e-6,Qa=Xa-Za;function Ka(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Ja{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Ka:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Ka;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-t,l=r-e,c=a-t,h=o-e,u=c*c+h*h;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>Za)if(Math.abs(h*s-l*c)>Za&&i){let f=n-a,d=r-o,p=s*s+l*l,g=f*f+d*d,m=Math.sqrt(p),y=Math.sqrt(u),b=i*Math.tan((Va-Math.acos((p+u-g)/(2*m*y)))/2),x=b/y,_=b/m;Math.abs(x-1)>Za&&this._append`L${t+x*c},${e+x*h}`,this._append`A${i},${i},0,0,${+(h*f>c*d)},${this._x1=t+_*s},${this._y1=e+_*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,h=1^a,u=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Za||Math.abs(this._y1-c)>Za)&&this._append`L${l},${c}`,n&&(u<0&&(u=u%Xa+Xa),u>Qa?this._append`A${n},${n},0,1,${h},${t-o},${e-s}A${n},${n},0,1,${h},${this._x1=l},${this._y1=c}`:u>Za&&this._append`A${n},${n},0,${+(u>=Va)},${h},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function to(){return new Ja}function eo(t=3){return new Ja(+t)}to.prototype=Ja.prototype;var no=Array.prototype.slice;function ro(t){return function(){return t}}function io(t){return t.source}function ao(t){return t.target}function oo(t){return t.radius}function so(t){return t.startAngle}function lo(t){return t.endAngle}function co(){return 0}function ho(){return 10}function uo(t){var e=io,n=ao,r=oo,i=oo,a=so,o=lo,s=co,l=null;function c(){var c,h=e.apply(this,arguments),u=n.apply(this,arguments),f=s.apply(this,arguments)/2,d=no.call(arguments),p=+r.apply(this,(d[0]=h,d)),g=a.apply(this,d)-Pa,m=o.apply(this,d)-Pa,y=+i.apply(this,(d[0]=u,d)),b=a.apply(this,d)-Pa,x=o.apply(this,d)-Pa;if(l||(l=c=to()),f>ja&&(Na(m-g)>2*f+ja?m>g?(g+=f,m-=f):(g-=f,m+=f):g=m=(g+m)/2,Na(x-b)>2*f+ja?x>b?(b+=f,x-=f):(b-=f,x+=f):b=x=(b+x)/2),l.moveTo(p*Da(g),p*za(g)),l.arc(0,0,p,g,m),g!==b||m!==x)if(t){var _=y-+t.apply(this,arguments),v=(b+x)/2;l.quadraticCurveTo(0,0,_*Da(b),_*za(b)),l.lineTo(y*Da(v),y*za(v)),l.lineTo(_*Da(x),_*za(x))}else l.quadraticCurveTo(0,0,y*Da(b),y*za(b)),l.arc(0,0,y,b,x);if(l.quadraticCurveTo(0,0,p*Da(g),p*za(g)),l.closePath(),c)return l=null,c+""||null}return t&&(c.headRadius=function(e){return arguments.length?(t="function"==typeof e?e:ro(+e),c):t}),c.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:ro(+t),c):r},c.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:ro(+t),c):r},c.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:ro(+t),c):i},c.startAngle=function(t){return arguments.length?(a="function"==typeof t?t:ro(+t),c):a},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:ro(+t),c):o},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:ro(+t),c):s},c.source=function(t){return arguments.length?(e=t,c):e},c.target=function(t){return arguments.length?(n=t,c):n},c.context=function(t){return arguments.length?(l=null==t?null:t,c):l},c}function fo(){return uo()}function po(){return uo(ho)}const go=Math.PI/180,mo=180/Math.PI,yo=.96422,bo=.82521,xo=4/29,_o=6/29,vo=3*_o*_o,wo=_o*_o*_o;function ko(t){if(t instanceof To)return new To(t.l,t.a,t.b,t.opacity);if(t instanceof Oo)return No(t);t instanceof dr||(t=ur(t));var e,n,r=Lo(t.r),i=Lo(t.g),a=Lo(t.b),o=Mo((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Mo((.4360747*r+.3850649*i+.1430804*a)/yo),n=Mo((.0139322*r+.0971045*i+.7141733*a)/bo)),new To(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Co(t,e){return new To(t,0,0,null==e?1:e)}function So(t,e,n,r){return 1===arguments.length?ko(t):new To(t,e,n,null==r?1:r)}function To(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Mo(t){return t>wo?Math.pow(t,1/3):t/vo+xo}function Ao(t){return t>_o?t*t*t:vo*(t-xo)}function Bo(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Lo(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Eo(t){if(t instanceof Oo)return new Oo(t.h,t.c,t.l,t.opacity);if(t instanceof To||(t=ko(t)),0===t.a&&0===t.b)return new Oo(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*mo;return new Oo(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Fo(t,e,n,r){return 1===arguments.length?Eo(t):new Oo(n,e,t,null==r?1:r)}function $o(t,e,n,r){return 1===arguments.length?Eo(t):new Oo(t,e,n,null==r?1:r)}function Oo(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function No(t){if(isNaN(t.h))return new To(t.l,0,0,t.opacity);var e=t.h*go;return new To(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Hn(To,So,Un(Yn,{brighter(t){return new To(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new To(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new dr(Bo(3.1338561*(e=yo*Ao(e))-1.6168667*(t=1*Ao(t))-.4906146*(n=bo*Ao(n))),Bo(-.9787684*e+1.9161415*t+.033454*n),Bo(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Hn(Oo,$o,Un(Yn,{brighter(t){return new Oo(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new Oo(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return No(this).rgb()}}));var Do=-.14861,zo=1.78277,Io=-.29227,Po=-.90649,Ro=1.97294,qo=Ro*Po,jo=Ro*zo,Wo=zo*Io-Po*Do;function Ho(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Uo)return new Uo(t.h,t.s,t.l,t.opacity);t instanceof dr||(t=ur(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Wo*r+qo*e-jo*n)/(Wo+qo-jo),a=r-i,o=(Ro*(n-i)-Io*a)/Po,s=Math.sqrt(o*o+a*a)/(Ro*i*(1-i)),l=s?Math.atan2(o,a)*mo-120:NaN;return new Uo(l<0?l+360:l,s,i,t.opacity)}(t):new Uo(t,e,n,null==r?1:r)}function Uo(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Hn(Uo,Ho,Un(Yn,{brighter(t){return t=null==t?Vn:Math.pow(Vn,t),new Uo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Gn:Math.pow(Gn,t),new Uo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*go,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new dr(255*(e+n*(Do*r+zo*i)),255*(e+n*(Io*r+Po*i)),255*(e+n*(Ro*r)),this.opacity)}}));var Yo=Array.prototype.slice;function Go(t,e){return t-e}const Vo=t=>()=>t;function Xo(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Zo(t,e[r]))return n;return 0}function Zo(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var l=t[a],c=l[0],h=l[1],u=t[s],f=u[0],d=u[1];if(Qo(l,u,e))return 0;h>r!=d>r&&n<(f-c)*(r-h)/(d-h)+c&&(i=-i)}return i}function Qo(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Ko(){}var Jo=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ts(){var t=1,e=1,n=ft,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Go);else{const n=A(t,es);for(e=lt(...ut(n[0],n[1],e),e);e[e.length-1]>=n[1];)e.pop();for(;e[1]<n[0];)e.shift()}return e.map(e=>a(t,e))}function a(n,i){const a=null==i?NaN:+i;if(isNaN(a))throw new Error(`invalid value: ${i}`);var s=[],l=[];return function(n,r,i){var a,s,l,c,h,u,f=new Array,d=new Array;for(a=s=-1,c=ns(n[0],r),Jo[c<<1].forEach(p);++a<t-1;)l=c,c=ns(n[a+1],r),Jo[l|c<<1].forEach(p);for(Jo[0|c].forEach(p);++s<e-1;){for(a=-1,c=ns(n[s*t+t],r),h=ns(n[s*t],r),Jo[c<<1|h<<2].forEach(p);++a<t-1;)l=c,c=ns(n[s*t+t+a+1],r),u=h,h=ns(n[s*t+a+1],r),Jo[l|c<<1|h<<2|u<<3].forEach(p);Jo[c|h<<3].forEach(p)}for(a=-1,h=n[s*t]>=r,Jo[h<<2].forEach(p);++a<t-1;)u=h,h=ns(n[s*t+a+1],r),Jo[h<<2|u<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],l=[t[1][0]+a,t[1][1]+s],c=o(r),h=o(l);(e=d[c])?(n=f[h])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(l),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(l),d[e.end=h]=e):(e=f[h])?(n=d[c])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(l),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=c]=e):f[c]=d[h]={start:c,end:h,ring:[r,l]}}Jo[h<<3].forEach(p)}(n,a,function(t){r(t,n,a),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?s.push([t]):l.push(t)}),l.forEach(function(t){for(var e,n=0,r=s.length;n<r;++n)if(-1!==Xo((e=s[n])[0],t))return void e.push(t)}),{type:"MultiPolygon",value:i,coordinates:s}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach(function(n){var a=n[0],o=n[1],s=0|a,l=0|o,c=rs(r[l*t+s]);a>0&&a<t&&s===a&&(n[0]=is(a,rs(r[l*t+s-1]),c,i)),o>0&&o<e&&l===o&&(n[1]=is(o,rs(r[(l-1)*t+s]),c,i))})}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),a=Math.floor(n[1]);if(!(r>=0&&a>=0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Vo(Yo.call(t)):Vo(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ko,i):r===s},i}function es(t){return isFinite(t)?t:NaN}function ns(t,e){return null!=t&&+t>=e}function rs(t){return null==t||isNaN(t=+t)?-1/0:t}function is(t,e,n,r){const i=r-e,a=n-e,o=isFinite(i)||isFinite(a)?i/a:Math.sign(i)/Math.sign(a);return isNaN(o)?t:t+o-.5}function as(t){return t[0]}function os(t){return t[1]}function ss(){return 1}function ls(){var t=as,e=os,n=ss,r=960,i=500,a=20,o=2,s=3*a,l=r+2*s>>o,c=i+2*s>>o,h=Vo(20);function u(r){var i=new Float32Array(l*c),h=Math.pow(2,-o),u=-1;for(const a of r){var f=(t(a,++u,r)+s)*h,d=(e(a,u,r)+s)*h,g=+n(a,u,r);if(g&&f>=0&&f<l&&d>=0&&d<c){var m=Math.floor(f),y=Math.floor(d),b=f-m-.5,x=d-y-.5;i[m+y*l]+=(1-b)*(1-x)*g,i[m+1+y*l]+=b*(1-x)*g,i[m+1+(y+1)*l]+=b*x*g,i[m+(y+1)*l]+=(1-b)*x*g}}return p({data:i,width:l,height:c},a*h),i}function f(t){var e=u(t),n=h(e),r=Math.pow(2,2*o);return Array.isArray(n)||(n=lt(Number.MIN_VALUE,pt(e)/r,n)),ts().size([l,c]).thresholds(n.map(t=>t*r))(e).map((t,e)=>(t.value=+n[e],d(t)))}function d(t){return t.coordinates.forEach(g),t}function g(t){t.forEach(m)}function m(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function b(){return l=r+2*(s=3*a)>>o,c=i+2*s>>o,f}return f.contours=function(t){var e=u(t),n=ts().size([l,c]),r=Math.pow(2,2*o),i=t=>{t=+t;var i=d(n.contour(e,t*r));return i.value=t,i};return Object.defineProperty(i,"max",{get:()=>pt(e)/r}),i},f.x=function(e){return arguments.length?(t="function"==typeof e?e:Vo(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Vo(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Vo(+t),f):n},f.size=function(t){if(!arguments.length)return[r,i];var e=+t[0],n=+t[1];if(!(e>=0&&n>=0))throw new Error("invalid size");return r=e,i=n,b()},f.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),b()},f.thresholds=function(t){return arguments.length?(h="function"==typeof t?t:Array.isArray(t)?Vo(Yo.call(t)):Vo(t),f):h},f.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=(Math.sqrt(4*t*t+1)-1)/2,b()},f}const cs=134217729;function hs(t,e,n,r,i){let a,o,s,l,c=e[0],h=r[0],u=0,f=0;h>c==h>-c?(a=c,c=e[++u]):(a=h,h=r[++f]);let d=0;if(u<t&&f<n)for(h>c==h>-c?(o=c+a,s=a-(o-c),c=e[++u]):(o=h+a,s=a-(o-h),h=r[++f]),a=o,0!==s&&(i[d++]=s);u<t&&f<n;)h>c==h>-c?(o=a+c,l=o-a,s=a-(o-l)+(c-l),c=e[++u]):(o=a+h,l=o-a,s=a-(o-l)+(h-l),h=r[++f]),a=o,0!==s&&(i[d++]=s);for(;u<t;)o=a+c,l=o-a,s=a-(o-l)+(c-l),c=e[++u],a=o,0!==s&&(i[d++]=s);for(;f<n;)o=a+h,l=o-a,s=a-(o-l)+(h-l),h=r[++f],a=o,0!==s&&(i[d++]=s);return 0===a&&0!==d||(i[d++]=a),d}function us(t){return new Float64Array(t)}const fs=us(4),ds=us(8),ps=us(12),gs=us(16),ms=us(4);function ys(t,e,n,r,i,a){const o=(e-a)*(n-i),s=(t-i)*(r-a),l=o-s,c=Math.abs(o+s);return Math.abs(l)>=33306690738754716e-32*c?l:-function(t,e,n,r,i,a,o){let s,l,c,h,u,f,d,p,g,m,y,b,x,_,v,w,k,C;const S=t-i,T=n-i,M=e-a,A=r-a;_=S*A,f=cs*S,d=f-(f-S),p=S-d,f=cs*A,g=f-(f-A),m=A-g,v=p*m-(_-d*g-p*g-d*m),w=M*T,f=cs*M,d=f-(f-M),p=M-d,f=cs*T,g=f-(f-T),m=T-g,k=p*m-(w-d*g-p*g-d*m),y=v-k,u=v-y,fs[0]=v-(y+u)+(u-k),b=_+y,u=b-_,x=_-(b-u)+(y-u),y=x-w,u=x-y,fs[1]=x-(y+u)+(u-w),C=b+y,u=C-b,fs[2]=b-(C-u)+(y-u),fs[3]=C;let B=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,fs),L=22204460492503146e-32*o;if(B>=L||-B>=L)return B;if(u=t-S,s=t-(S+u)+(u-i),u=n-T,c=n-(T+u)+(u-i),u=e-M,l=e-(M+u)+(u-a),u=r-A,h=r-(A+u)+(u-a),0===s&&0===l&&0===c&&0===h)return B;if(L=11093356479670487e-47*o+33306690738754706e-32*Math.abs(B),B+=S*h+A*s-(M*c+T*l),B>=L||-B>=L)return B;_=s*A,f=cs*s,d=f-(f-s),p=s-d,f=cs*A,g=f-(f-A),m=A-g,v=p*m-(_-d*g-p*g-d*m),w=l*T,f=cs*l,d=f-(f-l),p=l-d,f=cs*T,g=f-(f-T),m=T-g,k=p*m-(w-d*g-p*g-d*m),y=v-k,u=v-y,ms[0]=v-(y+u)+(u-k),b=_+y,u=b-_,x=_-(b-u)+(y-u),y=x-w,u=x-y,ms[1]=x-(y+u)+(u-w),C=b+y,u=C-b,ms[2]=b-(C-u)+(y-u),ms[3]=C;const E=hs(4,fs,4,ms,ds);_=S*h,f=cs*S,d=f-(f-S),p=S-d,f=cs*h,g=f-(f-h),m=h-g,v=p*m-(_-d*g-p*g-d*m),w=M*c,f=cs*M,d=f-(f-M),p=M-d,f=cs*c,g=f-(f-c),m=c-g,k=p*m-(w-d*g-p*g-d*m),y=v-k,u=v-y,ms[0]=v-(y+u)+(u-k),b=_+y,u=b-_,x=_-(b-u)+(y-u),y=x-w,u=x-y,ms[1]=x-(y+u)+(u-w),C=b+y,u=C-b,ms[2]=b-(C-u)+(y-u),ms[3]=C;const F=hs(E,ds,4,ms,ps);_=s*h,f=cs*s,d=f-(f-s),p=s-d,f=cs*h,g=f-(f-h),m=h-g,v=p*m-(_-d*g-p*g-d*m),w=l*c,f=cs*l,d=f-(f-l),p=l-d,f=cs*c,g=f-(f-c),m=c-g,k=p*m-(w-d*g-p*g-d*m),y=v-k,u=v-y,ms[0]=v-(y+u)+(u-k),b=_+y,u=b-_,x=_-(b-u)+(y-u),y=x-w,u=x-y,ms[1]=x-(y+u)+(u-w),C=b+y,u=C-b,ms[2]=b-(C-u)+(y-u),ms[3]=C;const $=hs(F,ps,4,ms,gs);return gs[$-1]}(t,e,n,r,i,a,c)}us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(8),us(8),us(8),us(4),us(8),us(8),us(8),us(12),us(192),us(192),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(4),us(4),us(4),us(8),us(16),us(16),us(16),us(32),us(32),us(48),us(64),us(1152),us(1152),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(1152),us(1152),us(1152),us(1152),us(1152),us(2304),us(2304),us(3456),us(5760),us(8),us(8),us(8),us(16),us(24),us(48),us(48),us(96),us(192),us(384),us(384),us(384),us(768),us(96),us(96),us(96),us(1152);const bs=Math.pow(2,-52),xs=new Uint32Array(512);class _s{static from(t,e=Ts,n=Ms){const r=t.length,i=new Float64Array(2*r);for(let a=0;a<r;a++){const r=t[a];i[2*a]=e(r),i[2*a+1]=n(r)}return new _s(i)}constructor(t){const e=t.length>>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=t.length>>1;let o=1/0,s=1/0,l=-1/0,c=-1/0;for(let e=0;e<a;e++){const n=t[2*e],r=t[2*e+1];n<o&&(o=n),r<s&&(s=r),n>l&&(l=n),r>c&&(c=r),this._ids[e]=e}const h=(o+l)/2,u=(s+c)/2;let f,d,p;for(let e=0,n=1/0;e<a;e++){const r=vs(h,u,t[2*e],t[2*e+1]);r<n&&(f=e,n=r)}const g=t[2*f],m=t[2*f+1];for(let e=0,n=1/0;e<a;e++){if(e===f)continue;const r=vs(g,m,t[2*e],t[2*e+1]);r<n&&r>0&&(d=e,n=r)}let y=t[2*d],b=t[2*d+1],x=1/0;for(let e=0;e<a;e++){if(e===f||e===d)continue;const n=ks(g,m,y,b,t[2*e],t[2*e+1]);n<x&&(p=e,x=n)}let _=t[2*p],v=t[2*p+1];if(x===1/0){for(let e=0;e<a;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];Cs(this._ids,this._dists,0,a-1);const e=new Uint32Array(a);let n=0;for(let t=0,r=-1/0;t<a;t++){const i=this._ids[t],a=this._dists[i];a>r&&(e[n++]=i,r=a)}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(ys(g,m,y,b,_,v)<0){const t=d,e=y,n=b;d=p,y=_,b=v,p=t,_=e,v=n}const w=function(t,e,n,r,i,a){const o=n-t,s=r-e,l=i-t,c=a-e,h=o*o+s*s,u=l*l+c*c,f=.5/(o*c-s*l);return{x:t+(c*h-s*u)*f,y:e+(o*u-l*h)*f}}(g,m,y,b,_,v);this._cx=w.x,this._cy=w.y;for(let e=0;e<a;e++)this._dists[e]=vs(t[2*e],t[2*e+1],w.x,w.y);Cs(this._ids,this._dists,0,a-1),this._hullStart=f;let k=3;n[f]=e[p]=d,n[d]=e[f]=p,n[p]=e[d]=f,r[f]=0,r[d]=1,r[p]=2,i.fill(-1),i[this._hashKey(g,m)]=f,i[this._hashKey(y,b)]=d,i[this._hashKey(_,v)]=p,this.trianglesLen=0,this._addTriangle(f,d,p,-1,-1,-1);for(let a,o,s=0;s<this._ids.length;s++){const l=this._ids[s],c=t[2*l],h=t[2*l+1];if(s>0&&Math.abs(c-a)<=bs&&Math.abs(h-o)<=bs)continue;if(a=c,o=h,l===f||l===d||l===p)continue;let u=0;for(let t=0,e=this._hashKey(c,h);t<this._hashSize&&(u=i[(e+t)%this._hashSize],-1===u||u===n[u]);t++);u=e[u];let g,m=u;for(;g=n[m],ys(c,h,t[2*m],t[2*m+1],t[2*g],t[2*g+1])>=0;)if(m=g,m===u){m=-1;break}if(-1===m)continue;let y=this._addTriangle(m,l,n[m],-1,-1,r[m]);r[l]=this._legalize(y+2),r[m]=y,k++;let b=n[m];for(;g=n[b],ys(c,h,t[2*b],t[2*b+1],t[2*g],t[2*g+1])<0;)y=this._addTriangle(b,l,g,r[l],-1,r[b]),r[l]=this._legalize(y+2),n[b]=b,k--,b=g;if(m===u)for(;g=e[m],ys(c,h,t[2*g],t[2*g+1],t[2*m],t[2*m+1])<0;)y=this._addTriangle(g,l,m,-1,r[m],r[g]),this._legalize(y+2),r[g]=y,n[m]=m,k--,m=g;this._hullStart=e[l]=m,n[m]=e[b]=l,n[l]=b,i[this._hashKey(c,h)]=l,i[this._hashKey(t[2*m],t[2*m+1])]=m}this.hull=new Uint32Array(k);for(let t=0,e=this._hullStart;t<k;t++)this.hull[t]=e,e=n[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(function(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,a=0;for(;;){const o=n[t],s=t-t%3;if(a=s+(t+2)%3,-1===o){if(0===i)break;t=xs[--i];continue}const l=o-o%3,c=s+(t+1)%3,h=l+(o+2)%3,u=e[a],f=e[t],d=e[c],p=e[h];if(ws(r[2*u],r[2*u+1],r[2*f],r[2*f+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){e[t]=p,e[o]=u;const r=n[h];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===h){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(o,n[a]),this._link(a,h);const s=l+(o+1)%3;i<xs.length&&(xs[i++]=s)}else{if(0===i)break;t=xs[--i]}}return a}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,r,i,a){const o=this.trianglesLen;return this._triangles[o]=t,this._triangles[o+1]=e,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}}function vs(t,e,n,r){const i=t-n,a=e-r;return i*i+a*a}function ws(t,e,n,r,i,a,o,s){const l=t-o,c=e-s,h=n-o,u=r-s,f=i-o,d=a-s,p=h*h+u*u,g=f*f+d*d;return l*(u*g-p*d)-c*(h*g-p*f)+(l*l+c*c)*(h*d-u*f)<0}function ks(t,e,n,r,i,a){const o=n-t,s=r-e,l=i-t,c=a-e,h=o*o+s*s,u=l*l+c*c,f=.5/(o*c-s*l),d=(c*h-s*u)*f,p=(o*u-l*h)*f;return d*d+p*p}function Cs(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],a=e[r];let o=i-1;for(;o>=n&&e[t[o]]>a;)t[o+1]=t[o--];t[o+1]=r}else{let i=n+1,a=r;Ss(t,n+r>>1,i),e[t[n]]>e[t[r]]&&Ss(t,n,r),e[t[i]]>e[t[r]]&&Ss(t,i,r),e[t[n]]>e[t[i]]&&Ss(t,n,i);const o=t[i],s=e[o];for(;;){do{i++}while(e[t[i]]<s);do{a--}while(e[t[a]]>s);if(a<i)break;Ss(t,i,a)}t[n+1]=t[a],t[a]=o,r-i+1>=a-n?(Cs(t,e,i,r),Cs(t,e,n,a-1)):(Cs(t,e,n,a-1),Cs(t,e,i,r))}}function Ss(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ts(t){return t[0]}function Ms(t){return t[1]}const As=1e-6;class Bs{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){const r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>As||Math.abs(this._y1-i)>As)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,e,n,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Ls{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class Es{constructor(t,[e,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(e=+e)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=e,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:r}=this;let i,a;const o=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,s,l=0,c=0,h=n.length;l<h;l+=3,c+=2){const h=2*n[l],u=2*n[l+1],f=2*n[l+2],d=t[h],p=t[h+1],g=t[u],m=t[u+1],y=t[f],b=t[f+1],x=g-d,_=m-p,v=y-d,w=b-p,k=2*(x*w-_*v);if(Math.abs(k)<1e-9){if(void 0===i){i=a=0;for(const n of e)i+=t[2*n],a+=t[2*n+1];i/=e.length,a/=e.length}const n=1e9*Math.sign((i-d)*w-(a-p)*v);r=(d+y)/2-n*w,s=(p+b)/2+n*v}else{const t=1/k,e=x*x+_*_,n=v*v+w*w;r=d+(w*e-_*n)*t,s=p+(x*n-v*e)*t}o[c]=r,o[c+1]=s}let s,l,c,h=e[e.length-1],u=4*h,f=t[2*h],d=t[2*h+1];r.fill(0);for(let n=0;n<e.length;++n)h=e[n],s=u,l=f,c=d,u=4*h,f=t[2*h],d=t[2*h+1],r[s+2]=r[u]=c-d,r[s+3]=r[u+1]=f-l}render(t){const e=null==t?t=new Bs:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:a,vectors:o}=this;if(i.length<=1)return null;for(let e=0,r=n.length;e<r;++e){const r=n[e];if(r<e)continue;const i=2*Math.floor(e/3),o=2*Math.floor(r/3),s=a[i],l=a[i+1],c=a[o],h=a[o+1];this._renderSegment(s,l,c,h,t)}let s,l=i[i.length-1];for(let e=0;e<i.length;++e){s=l,l=i[e];const n=2*Math.floor(r[l]/3),c=a[n],h=a[n+1],u=4*s,f=this._project(c,h,o[u+2],o[u+3]);f&&this._renderSegment(c,h,f[0],f[1],t)}return e&&e.value()}renderBounds(t){const e=null==t?t=new Bs:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),e&&e.value()}renderCell(t,e){const n=null==e?e=new Bs:void 0,r=this._clip(t);if(null===r||!r.length)return;e.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let t=2;t<i;t+=2)r[t]===r[t-2]&&r[t+1]===r[t-1]||e.lineTo(r[t],r[t+1]);return e.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let e=0,n=t.length/2;e<n;++e){const t=this.cellPolygon(e);t&&(t.index=e,yield t)}}cellPolygon(t){const e=new Ls;return this.renderCell(t,e),e.value()}_renderSegment(t,e,n,r,i){let a;const o=this._regioncode(t,e),s=this._regioncode(n,r);0===o&&0===s?(i.moveTo(t,e),i.lineTo(n,r)):(a=this._clipSegment(t,e,n,r,o,s))&&(i.moveTo(a[0],a[1]),i.lineTo(a[2],a[3]))}contains(t,e,n){return(e=+e)==e&&(n=+n)==n&&this.delaunay._step(t,e,n)===t}*neighbors(t){const e=this._clip(t);if(e)for(const n of this.delaunay.neighbors(t)){const t=this._clip(n);if(t)t:for(let r=0,i=e.length;r<i;r+=2)for(let a=0,o=t.length;a<o;a+=2)if(e[r]===t[a]&&e[r+1]===t[a+1]&&e[(r+2)%i]===t[(a+o-2)%o]&&e[(r+3)%i]===t[(a+o-1)%o]){yield n;break t}}}_cell(t){const{circumcenters:e,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,a=n[t];if(-1===a)return null;const o=[];let s=a;do{const n=Math.floor(s/3);if(o.push(e[2*n],e[2*n+1]),s=s%3==2?s-2:s+1,i[s]!==t)break;s=r[s]}while(s!==a&&-1!==s);return o}_clip(t){if(0===t&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const e=this._cell(t);if(null===e)return null;const{vectors:n}=this,r=4*t;return this._simplify(n[r]||n[r+1]?this._clipInfinite(t,e,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(t,e))}_clipFinite(t,e){const n=e.length;let r,i,a,o,s=null,l=e[n-2],c=e[n-1],h=this._regioncode(l,c),u=0;for(let f=0;f<n;f+=2)if(r=l,i=c,l=e[f],c=e[f+1],a=h,h=this._regioncode(l,c),0===a&&0===h)o=u,u=0,s?s.push(l,c):s=[l,c];else{let e,n,f,d,p;if(0===a){if(null===(e=this._clipSegment(r,i,l,c,a,h)))continue;[n,f,d,p]=e}else{if(null===(e=this._clipSegment(l,c,r,i,h,a)))continue;[d,p,n,f]=e,o=u,u=this._edgecode(n,f),o&&u&&this._edge(t,o,u,s,s.length),s?s.push(n,f):s=[n,f]}o=u,u=this._edgecode(d,p),o&&u&&this._edge(t,o,u,s,s.length),s?s.push(d,p):s=[d,p]}if(s)o=u,u=this._edgecode(s[0],s[1]),o&&u&&this._edge(t,o,u,s,s.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return s}_clipSegment(t,e,n,r,i,a){const o=i<a;for(o&&([t,e,n,r,i,a]=[n,r,t,e,a,i]);;){if(0===i&&0===a)return o?[n,r,t,e]:[t,e,n,r];if(i&a)return null;let s,l,c=i||a;8&c?(s=t+(n-t)*(this.ymax-e)/(r-e),l=this.ymax):4&c?(s=t+(n-t)*(this.ymin-e)/(r-e),l=this.ymin):2&c?(l=e+(r-e)*(this.xmax-t)/(n-t),s=this.xmax):(l=e+(r-e)*(this.xmin-t)/(n-t),s=this.xmin),i?(t=s,e=l,i=this._regioncode(t,e)):(n=s,r=l,a=this._regioncode(n,r))}}_clipInfinite(t,e,n,r,i,a){let o,s=Array.from(e);if((o=this._project(s[0],s[1],n,r))&&s.unshift(o[0],o[1]),(o=this._project(s[s.length-2],s[s.length-1],i,a))&&s.push(o[0],o[1]),s=this._clipFinite(t,s))for(let e,n=0,r=s.length,i=this._edgecode(s[r-2],s[r-1]);n<r;n+=2)e=i,i=this._edgecode(s[n],s[n+1]),e&&i&&(n=this._edge(t,e,i,s,n),r=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,e,n,r,i){for(;e!==n;){let n,a;switch(e){case 5:e=4;continue;case 4:e=6,n=this.xmax,a=this.ymin;break;case 6:e=2;continue;case 2:e=10,n=this.xmax,a=this.ymax;break;case 10:e=8;continue;case 8:e=9,n=this.xmin,a=this.ymax;break;case 9:e=1;continue;case 1:e=5,n=this.xmin,a=this.ymin}r[i]===n&&r[i+1]===a||!this.contains(t,n,a)||(r.splice(i,0,n,a),i+=2)}return i}_project(t,e,n,r){let i,a,o,s=1/0;if(r<0){if(e<=this.ymin)return null;(i=(this.ymin-e)/r)<s&&(o=this.ymin,a=t+(s=i)*n)}else if(r>0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)<s&&(o=this.ymax,a=t+(s=i)*n)}if(n>0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)<s&&(a=this.xmax,o=e+(s=i)*r)}else if(n<0){if(t<=this.xmin)return null;(i=(this.xmin-t)/n)<s&&(a=this.xmin,o=e+(s=i)*r)}return[a,o]}_edgecode(t,e){return(t===this.xmin?1:t===this.xmax?2:0)|(e===this.ymin?4:e===this.ymax?8:0)}_regioncode(t,e){return(t<this.xmin?1:t>this.xmax?2:0)|(e<this.ymin?4:e>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e<t.length;e+=2){const n=(e+2)%t.length,r=(e+4)%t.length;(t[e]===t[n]&&t[n]===t[r]||t[e+1]===t[n+1]&&t[n+1]===t[r+1])&&(t.splice(n,2),e-=2)}t.length||(t=null)}return t}}const Fs=2*Math.PI,$s=Math.pow;function Os(t){return t[0]}function Ns(t){return t[1]}function Ds(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class zs{static from(t,e=Os,n=Ns,r){return new zs("length"in t?function(t,e,n,r){const i=t.length,a=new Float64Array(2*i);for(let o=0;o<i;++o){const i=t[o];a[2*o]=e.call(r,i,o,t),a[2*o+1]=n.call(r,i,o,t)}return a}(t,e,n,r):Float64Array.from(function*(t,e,n,r){let i=0;for(const a of t)yield e.call(r,a,i,t),yield n.call(r,a,i,t),++i}(t,e,n,r)))}constructor(t){this._delaunator=new _s(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t<e.length;t+=3){const r=2*e[t],i=2*e[t+1],a=2*e[t+2];if((n[a]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[a+1]-n[r+1])>1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},(t,e)=>e).sort((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]);const t=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,n=e.length/2;t<n;++t){const n=Ds(e[2*t],e[2*t+1],i);e[2*t]=n[0],e[2*t+1]=n[1]}this._delaunator=new _s(e)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let t=0,e=n.length;t<e;++t){const e=i[t%3==2?t-2:t+1];-1!==n[t]&&-1!==a[e]||(a[e]=t)}for(let t=0,e=r.length;t<e;++t)o[r[t]]=t;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],a[r[0]]=1,2===r.length&&(a[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new Es(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){const e=o.indexOf(t);return e>0&&(yield o[e-1]),void(e<o.length-1&&(yield o[e+1]))}const s=e[t];if(-1===s)return;let l=s,c=-1;do{if(yield c=a[l],l=l%3==2?l-2:l+1,a[l]!==t)return;if(l=i[l],-1===l){const e=n[(r[t]+1)%n.length];return void(e!==c&&(yield e))}}while(l!==s)}find(t,e,n=0){if((t=+t)!=t||(e=+e)!=e)return-1;const r=n;let i;for(;(i=this._step(n,t,e))>=0&&i!==n&&i!==r;)n=i;return i}_step(t,e,n){const{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:l}=this;if(-1===r[t]||!l.length)return(t+1)%(l.length>>1);let c=t,h=$s(e-l[2*t],2)+$s(n-l[2*t+1],2);const u=r[t];let f=u;do{let r=s[f];const u=$s(e-l[2*r],2)+$s(n-l[2*r+1],2);if(u<h&&(h=u,c=r),f=f%3==2?f-2:f+1,s[f]!==t)break;if(f=o[f],-1===f){if(f=i[(a[t]+1)%i.length],f!==r&&$s(e-l[2*f],2)+$s(n-l[2*f+1],2)<h)return f;break}}while(f!==u);return c}render(t){const e=null==t?t=new Bs:void 0,{points:n,halfedges:r,triangles:i}=this;for(let e=0,a=r.length;e<a;++e){const a=r[e];if(a<e)continue;const o=2*i[e],s=2*i[a];t.moveTo(n[o],n[o+1]),t.lineTo(n[s],n[s+1])}return this.renderHull(t),e&&e.value()}renderPoints(t,e){void 0!==e||t&&"function"==typeof t.moveTo||(e=t,t=null),e=null==e?2:+e;const n=null==t?t=new Bs:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){const i=r[n],a=r[n+1];t.moveTo(i+e,a),t.arc(i,a,e,0,Fs)}return n&&n.value()}renderHull(t){const e=null==t?t=new Bs:void 0,{hull:n,points:r}=this,i=2*n[0],a=n.length;t.moveTo(r[i],r[i+1]);for(let e=1;e<a;++e){const i=2*n[e];t.lineTo(r[i],r[i+1])}return t.closePath(),e&&e.value()}hullPolygon(){const t=new Ls;return this.renderHull(t),t.value()}renderTriangle(t,e){const n=null==e?e=new Bs:void 0,{points:r,triangles:i}=this,a=2*i[t*=3],o=2*i[t+1],s=2*i[t+2];return e.moveTo(r[a],r[a+1]),e.lineTo(r[o],r[o+1]),e.lineTo(r[s],r[s+1]),e.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:t}=this;for(let e=0,n=t.length/3;e<n;++e)yield this.trianglePolygon(e)}trianglePolygon(t){const e=new Ls;return this.renderTriangle(t,e),e.value()}}const Is=t=>()=>t;function Ps(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:l,dy:c,dispatch:h}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:h}})}function Rs(t){return!t.ctrlKey&&!t.button}function qs(){return this.parentNode}function js(t,e){return null==e?{x:t.x,y:t.y}:e}function Ws(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hs(){var t,e,n,r,i=Rs,a=qs,o=js,s=Ws,l={},c=we("start","drag","end"),h=0,u=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",m).on("touchmove.drag",y,In).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(o,s){if(!r&&i.call(this,o,s)){var l=x(this,a.call(this,o,s),o,s,"mouse");l&&(zn(o.view).on("mousemove.drag",p,Pn).on("mouseup.drag",g,Pn),jn(o.view),Rn(o),n=!1,t=o.clientX,e=o.clientY,l("start",o))}}function p(r){if(qn(r),!n){var i=r.clientX-t,a=r.clientY-e;n=i*i+a*a>u}l.mouse("drag",r)}function g(t){zn(t.view).on("mousemove.drag mouseup.drag",null),Wn(t.view,n),qn(t),l.mouse("end",t)}function m(t,e){if(i.call(this,t,e)){var n,r,o=t.changedTouches,s=a.call(this,t,e),l=o.length;for(n=0;n<l;++n)(r=x(this,s,t,e,o[n].identifier,o[n]))&&(Rn(t),r("start",t,o[n]))}}function y(t){var e,n,r=t.changedTouches,i=r.length;for(e=0;e<i;++e)(n=l[r[e].identifier])&&(qn(t),n("drag",t,r[e]))}function b(t){var e,n,i=t.changedTouches,a=i.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),e=0;e<a;++e)(n=l[i[e].identifier])&&(Rn(t),n("end",t,i[e]))}function x(t,e,n,r,i,a){var s,u,d,p=c.copy(),g=Xr(a||n,e);if(null!=(d=o.call(t,new Ps("beforestart",{sourceEvent:n,target:f,identifier:i,active:h,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),r)))return s=d.x-g[0]||0,u=d.y-g[1]||0,function n(a,o,c){var m,y=g;switch(a){case"start":l[i]=n,m=h++;break;case"end":delete l[i],--h;case"drag":g=Xr(c||o,e),m=h}p.call(a,t,new Ps(a,{sourceEvent:o,subject:d,target:f,identifier:i,active:m,x:g[0]+s,y:g[1]+u,dx:g[0]-y[0],dy:g[1]-y[1],dispatch:p}),r)}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:Is(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:Is(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:Is(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Is(!!t),f):s},f.on=function(){var t=c.on.apply(c,arguments);return t===c?f:t},f.clickDistance=function(t){return arguments.length?(u=(t=+t)*t,f):Math.sqrt(u)},f}Ps.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Us={},Ys={};function Gs(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Vs(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}function Xs(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Zs(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,l=a<=0,c=!1;function h(){if(l)return Ys;if(c)return c=!1,Us;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?l=!0:10===(r=t.charCodeAt(o++))?c=!0:13===r&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))c=!0;else if(13===r)c=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return l=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=h())!==Ys;){for(var u=[];r!==Us&&r!==Ys;)u.push(r),r=h();e&&null==(u=e(u,s++))||i.push(u)}return i}function i(e,n){return e.map(function(e){return n.map(function(t){return o(e[t])}).join(t)})}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Xs(-e,6):e>9999?"+"+Xs(e,6):Xs(e,4))+"-"+Xs(t.getUTCMonth()+1,2)+"-"+Xs(t.getUTCDate(),2)+(a?"T"+Xs(n,2)+":"+Xs(r,2)+":"+Xs(i,2)+"."+Xs(a,3)+"Z":i?"T"+Xs(n,2)+":"+Xs(r,2)+":"+Xs(i,2)+"Z":r||n?"T"+Xs(n,2)+":"+Xs(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Gs(t);return function(r,i){return e(n(r),i,t)}}(t,e):Gs(t)});return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Vs(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Vs(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var Qs=Zs(","),Ks=Qs.parse,Js=Qs.parseRows,tl=Qs.format,el=Qs.formatBody,nl=Qs.formatRows,rl=Qs.formatRow,il=Qs.formatValue,al=Zs("\t"),ol=al.parse,sl=al.parseRows,ll=al.format,cl=al.formatBody,hl=al.formatRows,ul=al.formatRow,fl=al.formatValue;function dl(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;pl&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const pl=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),gl=t=>+t;function ml(t){return t*t}function yl(t){return t*(2-t)}function bl(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var xl=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),_l=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),vl=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),wl=Math.PI,kl=wl/2;function Cl(t){return 1===+t?1:1-Math.cos(t*kl)}function Sl(t){return Math.sin(t*kl)}function Tl(t){return(1-Math.cos(wl*t))/2}function Ml(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Al(t){return Ml(1-+t)}function Bl(t){return 1-Ml(t)}function Ll(t){return((t*=2)<=1?Ml(1-t):2-Ml(t-1))/2}function El(t){return 1-Math.sqrt(1-t*t)}function Fl(t){return Math.sqrt(1- --t*t)}function $l(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Ol=4/11,Nl=6/11,Dl=8/11,zl=9/11,Il=10/11,Pl=21/22,Rl=7.5625;function ql(t){return 1-jl(1-t)}function jl(t){return(t=+t)<Ol?Rl*t*t:t<Dl?Rl*(t-=Nl)*t+.75:t<Il?Rl*(t-=zl)*t+.9375:Rl*(t-=Pl)*t+.984375}function Wl(t){return((t*=2)<=1?1-jl(1-t):jl(t-1)+1)/2}var Hl=1.70158,Ul=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(Hl),Yl=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(Hl),Gl=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(Hl),Vl=2*Math.PI,Xl=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vl);function i(t){return e*Ml(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Vl)},i.period=function(n){return t(e,n)},i}(1,.3),Zl=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vl);function i(t){return 1-e*Ml(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Vl)},i.period=function(n){return t(e,n)},i}(1,.3),Ql=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vl);function i(t){return((t=2*t-1)<0?e*Ml(-t)*Math.sin((r-t)/n):2-e*Ml(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Vl)},i.period=function(n){return t(e,n)},i}(1,.3);function Kl(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function Jl(t,e){return fetch(t,e).then(Kl)}function tc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function ec(t,e){return fetch(t,e).then(tc)}function nc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function rc(t,e){return fetch(t,e).then(nc)}function ic(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),rc(e,n).then(function(e){return t(e,r)})}}function ac(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=Zs(t);return rc(e,n).then(function(t){return i.parse(t,r)})}var oc=ic(Ks),sc=ic(ol);function lc(t,e){return new Promise(function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function cc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function hc(t,e){return fetch(t,e).then(cc)}function uc(t){return(e,n)=>rc(e,n).then(e=>(new DOMParser).parseFromString(e,t))}const fc=uc("application/xml");var dc=uc("text/html"),pc=uc("image/svg+xml");function gc(t,e){var n,r=1;function i(){var i,a,o=n.length,s=0,l=0;for(i=0;i<o;++i)s+=(a=n[i]).x,l+=a.y;for(s=(s/o-t)*r,l=(l/o-e)*r,i=0;i<o;++i)(a=n[i]).x-=s,a.y-=l}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}function mc(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,l,c,h,u,f,d=t._root,p={data:r},g=t._x0,m=t._y0,y=t._x1,b=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(a=(g+y)/2))?g=a:y=a,(h=n>=(o=(m+b)/2))?m=o:b=o,i=d,!(d=d[u=h<<1|c]))return i[u]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)return p.next=d,i?i[u]=p:t._root=p,t;do{i=i?i[u]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+y)/2))?g=a:y=a,(h=n>=(o=(m+b)/2))?m=o:b=o}while((u=h<<1|c)==(f=(l>=o)<<1|s>=a));return i[f]=d,i[u]=p,t}function yc(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function bc(t){return t[0]}function xc(t){return t[1]}function _c(t,e,n){var r=new vc(null==e?bc:e,null==n?xc:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function vc(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function wc(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var kc=_c.prototype=vc.prototype;function Cc(t){return function(){return t}}function Sc(t){return 1e-6*(t()-.5)}function Tc(t){return t.x+t.vx}function Mc(t){return t.y+t.vy}function Ac(t){var e,n,r,i=1,a=1;function o(){for(var t,o,l,c,h,u,f,d=e.length,p=0;p<a;++p)for(o=_c(e,Tc,Mc).visitAfter(s),t=0;t<d;++t)l=e[t],u=n[l.index],f=u*u,c=l.x+l.vx,h=l.y+l.vy,o.visit(g);function g(t,e,n,a,o){var s=t.data,d=t.r,p=u+d;if(!s)return e>c+p||a<c-p||n>h+p||o<h-p;if(s.index>l.index){var g=c-s.x-s.vx,m=h-s.y-s.vy,y=g*g+m*m;y<p*p&&(0===g&&(y+=(g=Sc(r))*g),0===m&&(y+=(m=Sc(r))*m),y=(p-(y=Math.sqrt(y)))/y*i,l.vx+=(g*=y)*(p=(d*=d)/(f+d)),l.vy+=(m*=y)*p,s.vx-=g*(p=1-p),s.vy-=m*p)}}}function s(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function l(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=Cc(null==t?1:+t)),o.initialize=function(t,n){e=t,r=n,l()},o.iterations=function(t){return arguments.length?(a=+t,o):a},o.strength=function(t){return arguments.length?(i=+t,o):i},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:Cc(+e),l(),o):t},o}function Bc(t){return t.index}function Lc(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Ec(t){var e,n,r,i,a,o,s=Bc,l=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=Cc(30),h=1;function u(r){for(var i=0,s=t.length;i<h;++i)for(var l,c,u,f,d,p,g,m=0;m<s;++m)c=(l=t[m]).source,f=(u=l.target).x+u.vx-c.x-c.vx||Sc(o),d=u.y+u.vy-c.y-c.vy||Sc(o),f*=p=((p=Math.sqrt(f*f+d*d))-n[m])/p*r*e[m],d*=p,u.vx-=f*(g=a[m]),u.vy-=d*g,c.vx+=f*(g=1-g),c.vy+=d*g}function f(){if(r){var o,l,c=r.length,h=t.length,u=new Map(r.map((t,e)=>[s(t,e,r),t]));for(o=0,i=new Array(c);o<h;++o)(l=t[o]).index=o,"object"!=typeof l.source&&(l.source=Lc(u,l.source)),"object"!=typeof l.target&&(l.target=Lc(u,l.target)),i[l.source.index]=(i[l.source.index]||0)+1,i[l.target.index]=(i[l.target.index]||0)+1;for(o=0,a=new Array(h);o<h;++o)l=t[o],a[o]=i[l.source.index]/(i[l.source.index]+i[l.target.index]);e=new Array(h),d(),n=new Array(h),p()}}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+l(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),u.initialize=function(t,e){r=t,o=e,f()},u.links=function(e){return arguments.length?(t=e,f(),u):t},u.id=function(t){return arguments.length?(s=t,u):s},u.iterations=function(t){return arguments.length?(h=+t,u):h},u.strength=function(t){return arguments.length?(l="function"==typeof t?t:Cc(+t),d(),u):l},u.distance=function(t){return arguments.length?(c="function"==typeof t?t:Cc(+t),p(),u):c},u}kc.copy=function(){var t,e,n=new vc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=wc(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=wc(e));return n},kc.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return mc(this.cover(e,n),e,n,t)},kc.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),l=1/0,c=1/0,h=-1/0,u=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<l&&(l=r),r>h&&(h=r),i<c&&(c=i),i>u&&(u=i));if(l>h||c>u)return this;for(this.cover(l,c).cover(h,u),n=0;n<a;++n)mc(this,o[n],s[n],t[n]);return this},kc.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},kc.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},kc.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},kc.find=function(t,e,n){var r,i,a,o,s,l,c,h=this._x0,u=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new yc(g,h,u,f,d)),null==n?n=1/0:(h=t-n,u=e-n,f=t+n,d=e+n,n*=n);l=p.pop();)if(!(!(g=l.node)||(i=l.x0)>f||(a=l.y0)>d||(o=l.x1)<h||(s=l.y1)<u))if(g.length){var m=(i+o)/2,y=(a+s)/2;p.push(new yc(g[3],m,y,o,s),new yc(g[2],i,y,m,s),new yc(g[1],m,a,o,y),new yc(g[0],i,a,m,y)),(c=(e>=y)<<1|t>=m)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=l)}else{var b=t-+this._x.call(null,g.data),x=e-+this._y.call(null,g.data),_=b*b+x*x;if(_<n){var v=Math.sqrt(n=_);h=t-v,u=e-v,f=t+v,d=e+v,r=g.data}}return r},kc.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,l,c,h,u,f,d=this._root,p=this._x0,g=this._y0,m=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((c=a>=(s=(p+m)/2))?p=s:m=s,(h=o>=(l=(g+y)/2))?g=l:y=l,e=d,!(d=d[u=h<<1|c]))return this;if(!d.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[u]=i:delete e[u],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},kc.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},kc.root=function(){return this._root},kc.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},kc.visit=function(t){var e,n,r,i,a,o,s=[],l=this._root;for(l&&s.push(new yc(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&l.length){var c=(r+a)/2,h=(i+o)/2;(n=l[3])&&s.push(new yc(n,c,h,a,o)),(n=l[2])&&s.push(new yc(n,r,h,c,o)),(n=l[1])&&s.push(new yc(n,c,i,a,h)),(n=l[0])&&s.push(new yc(n,r,i,c,h))}return this},kc.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new yc(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,l=e.x1,c=e.y1,h=(o+l)/2,u=(s+c)/2;(a=i[0])&&n.push(new yc(a,o,s,h,u)),(a=i[1])&&n.push(new yc(a,h,s,l,u)),(a=i[2])&&n.push(new yc(a,o,u,h,c)),(a=i[3])&&n.push(new yc(a,h,u,l,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},kc.x=function(t){return arguments.length?(this._x=t,this):this._x},kc.y=function(t){return arguments.length?(this._y=t,this):this._y};const Fc=4294967296;function $c(t){return t.x}function Oc(t){return t.y}var Nc=Math.PI*(3-Math.sqrt(5));function Dc(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,l=ci(u),c=we("tick","end"),h=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Fc)/Fc}();function u(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(r){var l,c,h=t.length;void 0===r&&(r=1);for(var u=0;u<r;++u)for(n+=(a-n)*i,s.forEach(function(t){t(n)}),l=0;l<h;++l)null==(c=t[l]).fx?c.x+=c.vx*=o:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=o:(c.y=c.fy,c.vy=0);return e}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),a=n*Nc;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t,h),e}return null==t&&(t=[]),d(),e={tick:f,restart:function(){return l.restart(u),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),s.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},randomSource:function(t){return arguments.length?(h=t,s.forEach(p),e):h},force:function(t,n){return arguments.length>1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,l,c=0,h=t.length;for(null==r?r=1/0:r*=r,c=0;c<h;++c)(o=(i=e-(s=t[c]).x)*i+(a=n-s.y)*a)<r&&(l=s,r=o);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}function zc(){var t,e,n,r,i,a=Cc(-30),o=1,s=1/0,l=.81;function c(n){var i,a=t.length,o=_c(t,$c,Oc).visitAfter(u);for(r=n,i=0;i<a;++i)e=t[i],o.visit(f)}function h(){if(t){var e,n,r=t.length;for(i=new Array(r),e=0;e<r;++e)n=t[e],i[n.index]=+a(n,e,t)}}function u(t){var e,n,r,a,o,s=0,l=0;if(t.length){for(r=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,l+=n,r+=n*e.x,a+=n*e.y);t.x=r/l,t.y=a/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function f(t,a,c,h){if(!t.value)return!0;var u=t.x-e.x,f=t.y-e.y,d=h-a,p=u*u+f*f;if(d*d/l<p)return p<s&&(0===u&&(p+=(u=Sc(n))*u),0===f&&(p+=(f=Sc(n))*f),p<o&&(p=Math.sqrt(o*p)),e.vx+=u*t.value*r/p,e.vy+=f*t.value*r/p),!0;if(!(t.length||p>=s)){(t.data!==e||t.next)&&(0===u&&(p+=(u=Sc(n))*u),0===f&&(p+=(f=Sc(n))*f),p<o&&(p=Math.sqrt(o*p)));do{t.data!==e&&(d=i[t.data.index]*r/p,e.vx+=u*d,e.vy+=f*d)}while(t=t.next)}}return c.initialize=function(e,r){t=e,n=r,h()},c.strength=function(t){return arguments.length?(a="function"==typeof t?t:Cc(+t),h(),c):a},c.distanceMin=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.distanceMax=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c.theta=function(t){return arguments.length?(l=t*t,c):Math.sqrt(l)},c}function Ic(t,e,n){var r,i,a,o=Cc(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var l=r[o],c=l.x-e||1e-6,h=l.y-n||1e-6,u=Math.sqrt(c*c+h*h),f=(a[o]-u)*i[o]*t/u;l.vx+=c*f,l.vy+=h*f}}function l(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=Cc(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,l()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:Cc(+t),l(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:Cc(+e),l(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s}function Pc(t){var e,n,r,i=Cc(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Cc(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Cc(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:Cc(+e),o(),a):t},a}function Rc(t){var e,n,r,i=Cc(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Cc(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Cc(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Cc(+e),o(),a):t},a}function qc(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function jc(t){return(t=qc(Math.abs(t)))?t[1]:NaN}var Wc,Hc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Uc(t){if(!(e=Hc.exec(t)))throw new Error("invalid format: "+t);var e;return new Yc({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]})}function Yc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Gc(t,e){var n=qc(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Uc.prototype=Yc.prototype,Yc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Vc={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},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)=>Gc(100*t,e),r:Gc,s:function(t,e){var n=qc(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Wc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+qc(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Xc(t){return t}var Zc,Qc,Kc,Jc=Array.prototype.map,th=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function eh(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Xc:(e=Jc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Xc:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Jc.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Uc(t)).fill,n=t.align,u=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,b=t.type;"n"===b?(g=!0,b="g"):Vc[b]||(void 0===m&&(m=12),y=!0,b="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===f?i:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",_="$"===f?a:/[%p]/.test(b)?l:"",v=Vc[b],w=/[defgprs%]/.test(b);function k(t){var i,a,l,f=x,k=_;if("c"===b)k=v(t)+k,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:v(Math.abs(t),m),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),C&&0===+t&&"+"!==u&&(C=!1),f=(C?"("===u?u:c:"-"===u||"("===u?"":u)+f,k=("s"===b?th[8+Wc/3]:"")+k+(C&&"("===u?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(l=t.charCodeAt(i))||l>57){k=(46===l?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var S=f.length+t.length+k.length,T=S<p?new Array(p-S+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-k.length:1/0),T=""),n){case"<":t=f+t+k+T;break;case"=":t=f+T+t+k;break;case"^":t=T.slice(0,S=T.length>>1)+f+t+k+T.slice(S);break;default:t=T+f+t+k}return s(t)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return t+""},k}return{format:u,formatPrefix:function(t,e){var n=u(((t=Uc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(jc(e)/3))),i=Math.pow(10,-r),a=th[8+r/3];return function(t){return n(i*t)+a}}}}function nh(t){return Zc=eh(t),Qc=Zc.format,Kc=Zc.formatPrefix,Zc}function rh(t){return Math.max(0,-jc(Math.abs(t)))}function ih(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(jc(e)/3)))-jc(Math.abs(t)))}function ah(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,jc(e)-jc(t))+1}nh({thousands:",",grouping:[3],currency:["$",""]});var oh=1e-6,sh=1e-12,lh=Math.PI,ch=lh/2,hh=lh/4,uh=2*lh,fh=180/lh,dh=lh/180,ph=Math.abs,gh=Math.atan,mh=Math.atan2,yh=Math.cos,bh=Math.ceil,xh=Math.exp,_h=(Math.floor,Math.hypot),vh=Math.log,wh=Math.pow,kh=Math.sin,Ch=Math.sign||function(t){return t>0?1:t<0?-1:0},Sh=Math.sqrt,Th=Math.tan;function Mh(t){return t>1?0:t<-1?lh:Math.acos(t)}function Ah(t){return t>1?ch:t<-1?-ch:Math.asin(t)}function Bh(t){return(t=kh(t/2))*t}function Lh(){}function Eh(t,e){t&&$h.hasOwnProperty(t.type)&&$h[t.type](t,e)}var Fh={Feature:function(t,e){Eh(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Eh(n[r].geometry,e)}},$h={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Oh(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Oh(n[r],e,0)},Polygon:function(t,e){Nh(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Nh(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Eh(n[r],e)}};function Oh(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Nh(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Oh(t[n],e,1);e.polygonEnd()}function Dh(t,e){t&&Fh.hasOwnProperty(t.type)?Fh[t.type](t,e):Eh(t,e)}var zh,Ih,Ph,Rh,qh,jh,Wh,Hh,Uh,Yh,Gh,Vh,Xh,Zh,Qh,Kh,Jh=new B,tu=new B,eu={point:Lh,lineStart:Lh,lineEnd:Lh,polygonStart:function(){Jh=new B,eu.lineStart=nu,eu.lineEnd=ru},polygonEnd:function(){var t=+Jh;tu.add(t<0?uh+t:t),this.lineStart=this.lineEnd=this.point=Lh},sphere:function(){tu.add(uh)}};function nu(){eu.point=iu}function ru(){au(zh,Ih)}function iu(t,e){eu.point=au,zh=t,Ih=e,Ph=t*=dh,Rh=yh(e=(e*=dh)/2+hh),qh=kh(e)}function au(t,e){var n=(t*=dh)-Ph,r=n>=0?1:-1,i=r*n,a=yh(e=(e*=dh)/2+hh),o=kh(e),s=qh*o,l=Rh*a+s*yh(i),c=s*r*kh(i);Jh.add(mh(c,l)),Ph=t,Rh=a,qh=o}function ou(t){return tu=new B,Dh(t,eu),2*tu}function su(t){return[mh(t[1],t[0]),Ah(t[2])]}function lu(t){var e=t[0],n=t[1],r=yh(n);return[r*yh(e),r*kh(e),kh(n)]}function cu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function hu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function uu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function fu(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function du(t){var e=Sh(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var pu,gu,mu,yu,bu,xu,_u,vu,wu,ku,Cu,Su,Tu,Mu,Au,Bu,Lu={point:Eu,lineStart:$u,lineEnd:Ou,polygonStart:function(){Lu.point=Nu,Lu.lineStart=Du,Lu.lineEnd=zu,Zh=new B,eu.polygonStart()},polygonEnd:function(){eu.polygonEnd(),Lu.point=Eu,Lu.lineStart=$u,Lu.lineEnd=Ou,Jh<0?(jh=-(Hh=180),Wh=-(Uh=90)):Zh>oh?Uh=90:Zh<-1e-6&&(Wh=-90),Kh[0]=jh,Kh[1]=Hh},sphere:function(){jh=-(Hh=180),Wh=-(Uh=90)}};function Eu(t,e){Qh.push(Kh=[jh=t,Hh=t]),e<Wh&&(Wh=e),e>Uh&&(Uh=e)}function Fu(t,e){var n=lu([t*dh,e*dh]);if(Xh){var r=hu(Xh,n),i=hu([r[1],-r[0],0],r);du(i),i=su(i);var a,o=t-Yh,s=o>0?1:-1,l=i[0]*fh*s,c=ph(o)>180;c^(s*Yh<l&&l<s*t)?(a=i[1]*fh)>Uh&&(Uh=a):c^(s*Yh<(l=(l+360)%360-180)&&l<s*t)?(a=-i[1]*fh)<Wh&&(Wh=a):(e<Wh&&(Wh=e),e>Uh&&(Uh=e)),c?t<Yh?Iu(jh,t)>Iu(jh,Hh)&&(Hh=t):Iu(t,Hh)>Iu(jh,Hh)&&(jh=t):Hh>=jh?(t<jh&&(jh=t),t>Hh&&(Hh=t)):t>Yh?Iu(jh,t)>Iu(jh,Hh)&&(Hh=t):Iu(t,Hh)>Iu(jh,Hh)&&(jh=t)}else Qh.push(Kh=[jh=t,Hh=t]);e<Wh&&(Wh=e),e>Uh&&(Uh=e),Xh=n,Yh=t}function $u(){Lu.point=Fu}function Ou(){Kh[0]=jh,Kh[1]=Hh,Lu.point=Eu,Xh=null}function Nu(t,e){if(Xh){var n=t-Yh;Zh.add(ph(n)>180?n+(n>0?360:-360):n)}else Gh=t,Vh=e;eu.point(t,e),Fu(t,e)}function Du(){eu.lineStart()}function zu(){Nu(Gh,Vh),eu.lineEnd(),ph(Zh)>oh&&(jh=-(Hh=180)),Kh[0]=jh,Kh[1]=Hh,Xh=null}function Iu(t,e){return(e-=t)<0?e+360:e}function Pu(t,e){return t[0]-e[0]}function Ru(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function qu(t){var e,n,r,i,a,o,s;if(Uh=Hh=-(jh=Wh=1/0),Qh=[],Dh(t,Lu),n=Qh.length){for(Qh.sort(Pu),e=1,a=[r=Qh[0]];e<n;++e)Ru(r,(i=Qh[e])[0])||Ru(r,i[1])?(Iu(r[0],i[1])>Iu(r[0],r[1])&&(r[1]=i[1]),Iu(i[0],r[1])>Iu(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Iu(r[1],i[0]))>o&&(o=s,jh=i[0],Hh=r[1])}return Qh=Kh=null,jh===1/0||Wh===1/0?[[NaN,NaN],[NaN,NaN]]:[[jh,Wh],[Hh,Uh]]}var ju={sphere:Lh,point:Wu,lineStart:Uu,lineEnd:Vu,polygonStart:function(){ju.lineStart=Xu,ju.lineEnd=Zu},polygonEnd:function(){ju.lineStart=Uu,ju.lineEnd=Vu}};function Wu(t,e){t*=dh;var n=yh(e*=dh);Hu(n*yh(t),n*kh(t),kh(e))}function Hu(t,e,n){++pu,mu+=(t-mu)/pu,yu+=(e-yu)/pu,bu+=(n-bu)/pu}function Uu(){ju.point=Yu}function Yu(t,e){t*=dh;var n=yh(e*=dh);Mu=n*yh(t),Au=n*kh(t),Bu=kh(e),ju.point=Gu,Hu(Mu,Au,Bu)}function Gu(t,e){t*=dh;var n=yh(e*=dh),r=n*yh(t),i=n*kh(t),a=kh(e),o=mh(Sh((o=Au*a-Bu*i)*o+(o=Bu*r-Mu*a)*o+(o=Mu*i-Au*r)*o),Mu*r+Au*i+Bu*a);gu+=o,xu+=o*(Mu+(Mu=r)),_u+=o*(Au+(Au=i)),vu+=o*(Bu+(Bu=a)),Hu(Mu,Au,Bu)}function Vu(){ju.point=Wu}function Xu(){ju.point=Qu}function Zu(){Ku(Su,Tu),ju.point=Wu}function Qu(t,e){Su=t,Tu=e,t*=dh,e*=dh,ju.point=Ku;var n=yh(e);Mu=n*yh(t),Au=n*kh(t),Bu=kh(e),Hu(Mu,Au,Bu)}function Ku(t,e){t*=dh;var n=yh(e*=dh),r=n*yh(t),i=n*kh(t),a=kh(e),o=Au*a-Bu*i,s=Bu*r-Mu*a,l=Mu*i-Au*r,c=_h(o,s,l),h=Ah(c),u=c&&-h/c;wu.add(u*o),ku.add(u*s),Cu.add(u*l),gu+=h,xu+=h*(Mu+(Mu=r)),_u+=h*(Au+(Au=i)),vu+=h*(Bu+(Bu=a)),Hu(Mu,Au,Bu)}function Ju(t){pu=gu=mu=yu=bu=xu=_u=vu=0,wu=new B,ku=new B,Cu=new B,Dh(t,ju);var e=+wu,n=+ku,r=+Cu,i=_h(e,n,r);return i<sh&&(e=xu,n=_u,r=vu,gu<oh&&(e=mu,n=yu,r=bu),(i=_h(e,n,r))<sh)?[NaN,NaN]:[mh(n,e)*fh,Ah(r/i)*fh]}function tf(t){return function(){return t}}function ef(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function nf(t,e){return ph(t)>lh&&(t-=Math.round(t/uh)*uh),[t,e]}function rf(t,e,n){return(t%=uh)?e||n?ef(of(t),sf(e,n)):of(t):e||n?sf(e,n):nf}function af(t){return function(e,n){return ph(e+=t)>lh&&(e-=Math.round(e/uh)*uh),[e,n]}}function of(t){var e=af(t);return e.invert=af(-t),e}function sf(t,e){var n=yh(t),r=kh(t),i=yh(e),a=kh(e);function o(t,e){var o=yh(e),s=yh(t)*o,l=kh(t)*o,c=kh(e),h=c*n+s*r;return[mh(l*i-h*a,s*n-c*r),Ah(h*i+l*a)]}return o.invert=function(t,e){var o=yh(e),s=yh(t)*o,l=kh(t)*o,c=kh(e),h=c*i-l*a;return[mh(l*i+c*a,s*n+h*r),Ah(h*n-s*r)]},o}function lf(t){function e(e){return(e=t(e[0]*dh,e[1]*dh))[0]*=fh,e[1]*=fh,e}return t=rf(t[0]*dh,t[1]*dh,t.length>2?t[2]*dh:0),e.invert=function(e){return(e=t.invert(e[0]*dh,e[1]*dh))[0]*=fh,e[1]*=fh,e},e}function cf(t,e,n,r,i,a){if(n){var o=yh(e),s=kh(e),l=r*n;null==i?(i=e+r*uh,a=e-l/2):(i=hf(o,i),a=hf(o,a),(r>0?i<a:i>a)&&(i+=r*uh));for(var c,h=i;r>0?h>a:h<a;h-=l)c=su([o,-s*yh(h),-s*kh(h)]),t.point(c[0],c[1])}}function hf(t,e){(e=lu(e))[0]-=t,du(e);var n=Mh(-e[1]);return((-e[2]<0?-n:n)+uh-oh)%uh}function uf(){var t,e,n=tf([0,0]),r=tf(90),i=tf(2),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=fh,n[1]*=fh}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*dh,l=i.apply(this,arguments)*dh;return t=[],e=rf(-o[0]*dh,-o[1]*dh,0).invert,cf(a,s,l,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:tf([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:tf(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:tf(+t),o):i},o}function ff(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Lh,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function df(t,e){return ph(t[0]-e[0])<oh&&ph(t[1]-e[1])<oh}function pf(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function gf(t,e,n,r,i){var a,o,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(df(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new pf(r,t,null,!0)),l.push(n.o=new pf(r,null,n,!1)),s.push(n=new pf(o,t,null,!1)),l.push(n.o=new pf(o,null,n,!0))}}),s.length){for(l.sort(e),mf(s),mf(l),a=0,o=l.length;a<o;++a)l[a].e=n=!n;for(var c,h,u=s[0];;){for(var f=u,d=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=c.length;a<o;++a)i.point((h=c[a])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(c=f.p.z,a=c.length-1;a>=0;--a)i.point((h=c[a])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}c=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function mf(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function yf(t){return ph(t[0])<=lh?t[0]:Ch(t[0])*((ph(t[0])+lh)%uh-lh)}function bf(t,e){var n=yf(e),r=e[1],i=kh(r),a=[kh(n),-yh(n),0],o=0,s=0,l=new B;1===i?r=ch+oh:-1===i&&(r=-ch-oh);for(var c=0,h=t.length;c<h;++c)if(f=(u=t[c]).length)for(var u,f,d=u[f-1],p=yf(d),g=d[1]/2+hh,m=kh(g),y=yh(g),b=0;b<f;++b,p=_,m=w,y=k,d=x){var x=u[b],_=yf(x),v=x[1]/2+hh,w=kh(v),k=yh(v),C=_-p,S=C>=0?1:-1,T=S*C,M=T>lh,A=m*w;if(l.add(mh(A*S*kh(T),y*k+A*yh(T))),o+=M?C+S*uh:C,M^p>=n^_>=n){var L=hu(lu(d),lu(x));du(L);var E=hu(a,L);du(E);var F=(M^C>=0?-1:1)*Ah(E[2]);(r>F||r===F&&(L[0]||L[1]))&&(s+=M^C>=0?1:-1)}}return(o<-1e-6||o<oh&&l<-1e-12)^1&s}function xf(t,e,n,r){return function(i){var a,o,s,l=e(i),c=ff(),h=e(c),u=!1,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=b,f.lineEnd=x,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,o=Bt(o);var t=bf(a,r);o.length?(u||(i.polygonStart(),u=!0),gf(o,vf,t,n,i)):t&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){l.point(t,e)}function g(){f.point=p,l.lineStart()}function m(){f.point=d,l.lineEnd()}function y(t,e){s.push([t,e]),h.point(t,e)}function b(){h.lineStart(),s=[]}function x(){y(s[0][0],s[0][1]),h.lineEnd();var t,e,n,r,l=h.clean(),f=c.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&l){if((e=(n=f[0]).length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&l&&f.push(f.pop().concat(f.shift())),o.push(f.filter(_f))}return f}}function _f(t){return t.length>1}function vf(t,e){return((t=t.x)[0]<0?t[1]-ch-oh:ch-t[1])-((e=e.x)[0]<0?e[1]-ch-oh:ch-e[1])}nf.invert=nf;const wf=xf(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?lh:-lh,l=ph(a-n);ph(l-lh)<oh?(t.point(n,r=(r+o)/2>0?ch:-ch),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&l>=lh&&(ph(n-i)<oh&&(n-=i*oh),ph(a-s)<oh&&(a-=s*oh),r=function(t,e,n,r){var i,a,o=kh(t-n);return ph(o)>oh?gh((kh(e)*(a=yh(r))*kh(n)-kh(r)*(i=yh(e))*kh(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*ch,r.point(-lh,i),r.point(0,i),r.point(lh,i),r.point(lh,0),r.point(lh,-i),r.point(0,-i),r.point(-lh,-i),r.point(-lh,0),r.point(-lh,i);else if(ph(t[0]-e[0])>oh){var a=t[0]<e[0]?lh:-lh;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])},[-lh,-ch]);function kf(t){var e=yh(t),n=2*dh,r=e>0,i=ph(e)>oh;function a(t,n){return yh(t)*yh(n)>e}function o(t,n,r){var i=[1,0,0],a=hu(lu(t),lu(n)),o=cu(a,a),s=a[0],l=o-s*s;if(!l)return!r&&t;var c=e*o/l,h=-e*s/l,u=hu(i,a),f=fu(i,c);uu(f,fu(a,h));var d=u,p=cu(f,d),g=cu(d,d),m=p*p-g*(cu(f,f)-1);if(!(m<0)){var y=Sh(m),b=fu(d,(-p-y)/g);if(uu(b,f),b=su(b),!r)return b;var x,_=t[0],v=n[0],w=t[1],k=n[1];v<_&&(x=_,_=v,v=x);var C=v-_,S=ph(C-lh)<oh;if(!S&&k<w&&(x=w,w=k,k=x),S||C<oh?S?w+k>0^b[1]<(ph(b[0]-_)<oh?w:k):w<=b[1]&&b[1]<=k:C>lh^(_<=b[0]&&b[0]<=v)){var T=fu(d,(-p+y)/g);return uu(T,f),[b,su(T)]}}}function s(e,n){var i=r?t:lh-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return xf(a,function(t){var e,n,l,c,h;return{lineStart:function(){c=l=!1,h=1},point:function(u,f){var d,p=[u,f],g=a(u,f),m=r?g?0:s(u,f):g?s(u+(u<0?lh:-lh),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(d=o(e,p))||df(e,d)||df(p,d))&&(p[2]=1),g!==l)h=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var y;m&n||!(y=o(p,e,!0))||(h=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&df(e,p)||t.point(p[0],p[1]),e=p,l=g,n=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return h|(c&&l)<<1}}},function(e,r,i,a){cf(a,t,n,i,e,r)},r?[0,-t]:[-lh,t-lh])}var Cf,Sf,Tf,Mf,Af=1e9,Bf=-Af;function Lf(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,c){var h=0,u=0;if(null==i||(h=o(i,s))!==(u=o(a,s))||l(i,a)<0^s>0)do{c.point(0===h||3===h?t:n,h>1?r:e)}while((h=(h+s+4)%4)!==u);else c.point(a[0],a[1])}function o(r,i){return ph(r[0]-t)<oh?i>0?0:3:ph(r[0]-n)<oh?i>0?2:1:ph(r[1]-e)<oh?i>0?1:0:i>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,h,u,f,d,p,g,m,y,b,x=o,_=ff(),v={point:w,lineStart:function(){v.point=k,c&&c.push(h=[]),y=!0,m=!1,p=g=NaN},lineEnd:function(){l&&(k(u,f),d&&m&&_.rejoin(),l.push(_.result())),v.point=w,m&&x.lineEnd()},polygonStart:function(){x=_,l=[],c=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var a,o,s=c[n],l=1,h=s.length,u=s[0],f=u[0],d=u[1];l<h;++l)a=f,o=d,f=(u=s[l])[0],d=u[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=b&&e,i=(l=Bt(l)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&gf(l,s,e,a,o),o.polygonEnd()),x=o,l=c=h=null}};function w(t,e){i(t,e)&&x.point(t,e)}function k(a,o){var s=i(a,o);if(c&&h.push([a,o]),y)u=a,f=o,d=s,y=!1,s&&(x.lineStart(),x.point(a,o));else if(s&&m)x.point(a,o);else{var l=[p=Math.max(Bf,Math.min(Af,p)),g=Math.max(Bf,Math.min(Af,g))],_=[a=Math.max(Bf,Math.min(Af,a)),o=Math.max(Bf,Math.min(Af,o))];!function(t,e,n,r,i,a){var o,s=t[0],l=t[1],c=0,h=1,u=e[0]-s,f=e[1]-l;if(o=n-s,u||!(o>0)){if(o/=u,u<0){if(o<c)return;o<h&&(h=o)}else if(u>0){if(o>h)return;o>c&&(c=o)}if(o=i-s,u||!(o<0)){if(o/=u,u<0){if(o>h)return;o>c&&(c=o)}else if(u>0){if(o<c)return;o<h&&(h=o)}if(o=r-l,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<h&&(h=o)}else if(f>0){if(o>h)return;o>c&&(c=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<h&&(h=o)}return c>0&&(t[0]=s+c*u,t[1]=l+c*f),h<1&&(e[0]=s+h*u,e[1]=l+h*f),!0}}}}}(l,_,t,e,n,r)?s&&(x.lineStart(),x.point(a,o),b=!1):(m||(x.lineStart(),x.point(l[0],l[1])),x.point(_[0],_[1]),s||x.lineEnd(),b=!1)}p=a,g=o,m=s}return v}}function Ef(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Lf(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}}var Ff={sphere:Lh,point:Lh,lineStart:function(){Ff.point=Of,Ff.lineEnd=$f},lineEnd:Lh,polygonStart:Lh,polygonEnd:Lh};function $f(){Ff.point=Ff.lineEnd=Lh}function Of(t,e){Sf=t*=dh,Tf=kh(e*=dh),Mf=yh(e),Ff.point=Nf}function Nf(t,e){t*=dh;var n=kh(e*=dh),r=yh(e),i=ph(t-Sf),a=yh(i),o=r*kh(i),s=Mf*n-Tf*r*a,l=Tf*n+Mf*r*a;Cf.add(mh(Sh(o*o+s*s),l)),Sf=t,Tf=n,Mf=r}function Df(t){return Cf=new B,Dh(t,Ff),+Cf}var zf=[null,null],If={type:"LineString",coordinates:zf};function Pf(t,e){return zf[0]=t,zf[1]=e,Df(If)}var Rf={Feature:function(t,e){return jf(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(jf(n[r].geometry,e))return!0;return!1}},qf={Sphere:function(){return!0},Point:function(t,e){return Wf(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Wf(n[r],e))return!0;return!1},LineString:function(t,e){return Hf(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Hf(n[r],e))return!0;return!1},Polygon:function(t,e){return Uf(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Uf(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(jf(n[r],e))return!0;return!1}};function jf(t,e){return!(!t||!qf.hasOwnProperty(t.type))&&qf[t.type](t,e)}function Wf(t,e){return 0===Pf(t,e)}function Hf(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=Pf(t[a],e)))return!0;if(a>0&&(i=Pf(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<sh*i)return!0;n=r}return!1}function Uf(t,e){return!!bf(t.map(Yf),Gf(e))}function Yf(t){return(t=t.map(Gf)).pop(),t}function Gf(t){return[t[0]*dh,t[1]*dh]}function Vf(t,e){return(t&&Rf.hasOwnProperty(t.type)?Rf[t.type]:jf)(t,e)}function Xf(t,e,n){var r=$t(t,e-oh,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function Zf(t,e,n){var r=$t(t,e-oh,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function Qf(){var t,e,n,r,i,a,o,s,l,c,h,u,f=10,d=f,p=90,g=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return $t(bh(r/p)*p,n,p).map(h).concat($t(bh(s/g)*g,o,g).map(u)).concat($t(bh(e/f)*f,t,f).filter(function(t){return ph(t%p)>oh}).map(l)).concat($t(bh(a/d)*d,i,d).filter(function(t){return ph(t%g)>oh}).map(c))}return y.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(u(o).slice(1),h(n).reverse().slice(1),u(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),y.precision(m)):[[r,s],[n,o]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),y.precision(m)):[[e,a],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],y):[p,g]},y.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],y):[f,d]},y.precision=function(f){return arguments.length?(m=+f,l=Xf(a,i,90),c=Zf(e,t,m),h=Xf(s,o,90),u=Zf(r,n,m),y):m},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Kf(){return Qf()()}function Jf(t,e){var n=t[0]*dh,r=t[1]*dh,i=e[0]*dh,a=e[1]*dh,o=yh(r),s=kh(r),l=yh(a),c=kh(a),h=o*yh(n),u=o*kh(n),f=l*yh(i),d=l*kh(i),p=2*Ah(Sh(Bh(a-r)+o*l*Bh(i-n))),g=kh(p),m=p?function(t){var e=kh(t*=p)/g,n=kh(p-t)/g,r=n*h+e*f,i=n*u+e*d,a=n*s+e*c;return[mh(i,r)*fh,mh(a,Sh(r*r+i*i))*fh]}:function(){return[n*fh,r*fh]};return m.distance=p,m}const td=t=>t;var ed,nd,rd,id,ad=new B,od=new B,sd={point:Lh,lineStart:Lh,lineEnd:Lh,polygonStart:function(){sd.lineStart=ld,sd.lineEnd=ud},polygonEnd:function(){sd.lineStart=sd.lineEnd=sd.point=Lh,ad.add(ph(od)),od=new B},result:function(){var t=ad/2;return ad=new B,t}};function ld(){sd.point=cd}function cd(t,e){sd.point=hd,ed=rd=t,nd=id=e}function hd(t,e){od.add(id*t-rd*e),rd=t,id=e}function ud(){hd(ed,nd)}const fd=sd;var dd=1/0,pd=dd,gd=-dd,md=gd,yd={point:function(t,e){t<dd&&(dd=t),t>gd&&(gd=t),e<pd&&(pd=e),e>md&&(md=e)},lineStart:Lh,lineEnd:Lh,polygonStart:Lh,polygonEnd:Lh,result:function(){var t=[[dd,pd],[gd,md]];return gd=md=-(pd=dd=1/0),t}};const bd=yd;var xd,_d,vd,wd,kd=0,Cd=0,Sd=0,Td=0,Md=0,Ad=0,Bd=0,Ld=0,Ed=0,Fd={point:$d,lineStart:Od,lineEnd:zd,polygonStart:function(){Fd.lineStart=Id,Fd.lineEnd=Pd},polygonEnd:function(){Fd.point=$d,Fd.lineStart=Od,Fd.lineEnd=zd},result:function(){var t=Ed?[Bd/Ed,Ld/Ed]:Ad?[Td/Ad,Md/Ad]:Sd?[kd/Sd,Cd/Sd]:[NaN,NaN];return kd=Cd=Sd=Td=Md=Ad=Bd=Ld=Ed=0,t}};function $d(t,e){kd+=t,Cd+=e,++Sd}function Od(){Fd.point=Nd}function Nd(t,e){Fd.point=Dd,$d(vd=t,wd=e)}function Dd(t,e){var n=t-vd,r=e-wd,i=Sh(n*n+r*r);Td+=i*(vd+t)/2,Md+=i*(wd+e)/2,Ad+=i,$d(vd=t,wd=e)}function zd(){Fd.point=$d}function Id(){Fd.point=Rd}function Pd(){qd(xd,_d)}function Rd(t,e){Fd.point=qd,$d(xd=vd=t,_d=wd=e)}function qd(t,e){var n=t-vd,r=e-wd,i=Sh(n*n+r*r);Td+=i*(vd+t)/2,Md+=i*(wd+e)/2,Ad+=i,Bd+=(i=wd*t-vd*e)*(vd+t),Ld+=i*(wd+e),Ed+=3*i,$d(vd=t,wd=e)}const jd=Fd;function Wd(t){this._context=t}Wd.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,uh)}},result:Lh};var Hd,Ud,Yd,Gd,Vd,Xd=new B,Zd={point:Lh,lineStart:function(){Zd.point=Qd},lineEnd:function(){Hd&&Kd(Ud,Yd),Zd.point=Lh},polygonStart:function(){Hd=!0},polygonEnd:function(){Hd=null},result:function(){var t=+Xd;return Xd=new B,t}};function Qd(t,e){Zd.point=Kd,Ud=Gd=t,Yd=Vd=e}function Kd(t,e){Gd-=t,Vd-=e,Xd.add(Sh(Gd*Gd+Vd*Vd)),Gd=t,Vd=e}const Jd=Zd;let tp,ep,np,rp;class ip{constructor(t){this._append=null==t?ap:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ap;if(e!==tp){const t=10**e;tp=e,ep=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return ep}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==np||this._append!==ep){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,np=t,ep=this._append,rp=this._,this._=e}this._+=rp}}result(){const t=this._;return this._="",t.length?t:null}}function ap(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function op(t,e){let n,r,i=3,a=4.5;function o(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),Dh(t,n(r))),r.result()}return o.area=function(t){return Dh(t,n(fd)),fd.result()},o.measure=function(t){return Dh(t,n(Jd)),Jd.result()},o.bounds=function(t){return Dh(t,n(bd)),bd.result()},o.centroid=function(t){return Dh(t,n(jd)),jd.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,td):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new ip(i)):new Wd(e=t),"function"!=typeof a&&r.pointRadius(a),o):e},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),o):a},o.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new ip(i)),o},o.projection(t).digits(i).context(e)}function sp(t){return{stream:lp(t)}}function lp(t){return function(e){var n=new cp;for(var r in t)n[r]=t[r];return n.stream=e,n}}function cp(){}function hp(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Dh(n,t.stream(bd)),e(bd.result()),null!=r&&t.clipExtent(r),t}function up(t,e,n){return hp(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])},n)}function fp(t,e,n){return up(t,[[0,0],e],n)}function dp(t,e,n){return hp(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])},n)}function pp(t,e,n){return hp(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])},n)}cp.prototype={constructor:cp,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var gp=yh(30*dh);function mp(t,e){return+e?function(t,e){function n(r,i,a,o,s,l,c,h,u,f,d,p,g,m){var y=c-r,b=h-i,x=y*y+b*b;if(x>4*e&&g--){var _=o+f,v=s+d,w=l+p,k=Sh(_*_+v*v+w*w),C=Ah(w/=k),S=ph(ph(w)-1)<oh||ph(a-u)<oh?(a+u)/2:mh(v,_),T=t(S,C),M=T[0],A=T[1],B=M-r,L=A-i,E=b*B-y*L;(E*E/x>e||ph((y*B+b*L)/x-.5)>.3||o*f+s*d+l*p<gp)&&(n(r,i,a,o,s,l,M,A,S,_/=k,v/=k,w,g,m),m.point(M,A),n(M,A,S,_,v,w,c,h,u,f,d,p,g,m))}}return function(e){var r,i,a,o,s,l,c,h,u,f,d,p,g={point:m,lineStart:y,lineEnd:x,polygonStart:function(){e.polygonStart(),g.lineStart=_},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function m(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){h=NaN,g.point=b,e.lineStart()}function b(r,i){var a=lu([r,i]),o=t(r,i);n(h,u,c,f,d,p,h=o[0],u=o[1],c=r,f=a[0],d=a[1],p=a[2],16,e),e.point(h,u)}function x(){g.point=m,e.lineEnd()}function _(){y(),g.point=v,g.lineEnd=w}function v(t,e){b(r=t,e),i=h,a=u,o=f,s=d,l=p,g.point=b}function w(){n(h,u,c,f,d,p,i,a,r,o,s,l,16,e),g.lineEnd=x,x()}return g}}(t,e):function(t){return lp({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var yp=lp({point:function(t,e){this.stream.point(t*dh,e*dh)}});function bp(t,e,n,r,i,a){if(!a)return function(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}(t,e,n,r,i);var o=yh(a),s=kh(a),l=o*t,c=s*t,h=o/t,u=s/t,f=(s*n-o*e)/t,d=(s*e+o*n)/t;function p(t,a){return[l*(t*=r)-c*(a*=i)+e,n-c*t-l*a]}return p.invert=function(t,e){return[r*(h*t-u*e+f),i*(d-u*t-h*e)]},p}function xp(t){return _p(function(){return t})()}function _p(t){var e,n,r,i,a,o,s,l,c,h,u=150,f=480,d=250,p=0,g=0,m=0,y=0,b=0,x=0,_=1,v=1,w=null,k=wf,C=null,S=td,T=.5;function M(t){return l(t[0]*dh,t[1]*dh)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*fh,t[1]*fh]}function B(){var t=bp(u,0,0,_,v,x).apply(null,e(p,g)),r=bp(u,f-t[0],d-t[1],_,v,x);return n=rf(m,y,b),s=ef(e,r),l=ef(n,s),o=mp(s,T),L()}function L(){return c=h=null,M}return M.stream=function(t){return c&&h===t?c:c=yp(function(t){return lp({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(o(S(h=t)))))},M.preclip=function(t){return arguments.length?(k=t,w=void 0,L()):k},M.postclip=function(t){return arguments.length?(S=t,C=r=i=a=null,L()):S},M.clipAngle=function(t){return arguments.length?(k=+t?kf(w=t*dh):(w=null,wf),L()):w*fh},M.clipExtent=function(t){return arguments.length?(S=null==t?(C=r=i=a=null,td):Lf(C=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),L()):null==C?null:[[C,r],[i,a]]},M.scale=function(t){return arguments.length?(u=+t,B()):u},M.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],B()):[f,d]},M.center=function(t){return arguments.length?(p=t[0]%360*dh,g=t[1]%360*dh,B()):[p*fh,g*fh]},M.rotate=function(t){return arguments.length?(m=t[0]%360*dh,y=t[1]%360*dh,b=t.length>2?t[2]%360*dh:0,B()):[m*fh,y*fh,b*fh]},M.angle=function(t){return arguments.length?(x=t%360*dh,B()):x*fh},M.reflectX=function(t){return arguments.length?(_=t?-1:1,B()):_<0},M.reflectY=function(t){return arguments.length?(v=t?-1:1,B()):v<0},M.precision=function(t){return arguments.length?(o=mp(s,T=t*t),L()):Sh(T)},M.fitExtent=function(t,e){return up(M,t,e)},M.fitSize=function(t,e){return fp(M,t,e)},M.fitWidth=function(t,e){return dp(M,t,e)},M.fitHeight=function(t,e){return pp(M,t,e)},function(){return e=t.apply(this,arguments),M.invert=e.invert&&A,B()}}function vp(t){var e=0,n=lh/3,r=_p(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*dh,n=t[1]*dh):[e*fh,n*fh]},i}function wp(t,e){var n=kh(t),r=(n+kh(e))/2;if(ph(r)<oh)return function(t){var e=yh(t);function n(t,n){return[t*e,kh(n)/e]}return n.invert=function(t,n){return[t/e,Ah(n*e)]},n}(t);var i=1+n*(2*r-n),a=Sh(i)/r;function o(t,e){var n=Sh(i-2*r*kh(e))/r;return[n*kh(t*=r),a-n*yh(t)]}return o.invert=function(t,e){var n=a-e,o=mh(t,ph(n))*Ch(n);return n*r<0&&(o-=lh*Ch(t)*Ch(n)),[o/r,Ah((i-(t*t+n*n)*r*r)/(2*r))]},o}function kp(){return vp(wp).scale(155.424).center([0,33.6442])}function Cp(){return kp().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Sp(){var t,e,n,r,i,a,o=Cp(),s=kp().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=kp().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){a=[t,e]}};function h(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function u(){return t=e=null,h}return h.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:o).invert(t)},h.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),l.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},h.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),l.precision(t),u()):o.precision()},h.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),l.scale(t),h.translate(o.translate())):o.scale()},h.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],h=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,h-.238*e],[a+.455*e,h+.238*e]]).stream(c),r=s.translate([a-.307*e,h+.201*e]).clipExtent([[a-.425*e+oh,h+.12*e+oh],[a-.214*e-oh,h+.234*e-oh]]).stream(c),i=l.translate([a-.205*e,h+.212*e]).clipExtent([[a-.214*e+oh,h+.166*e+oh],[a-.115*e-oh,h+.234*e-oh]]).stream(c),u()},h.fitExtent=function(t,e){return up(h,t,e)},h.fitSize=function(t,e){return fp(h,t,e)},h.fitWidth=function(t,e){return dp(h,t,e)},h.fitHeight=function(t,e){return pp(h,t,e)},h.scale(1070)}function Tp(t){return function(e,n){var r=yh(e),i=yh(n),a=t(r*i);return a===1/0?[2,0]:[a*i*kh(e),a*kh(n)]}}function Mp(t){return function(e,n){var r=Sh(e*e+n*n),i=t(r),a=kh(i),o=yh(i);return[mh(e*a,r*o),Ah(r&&n*a/r)]}}var Ap=Tp(function(t){return Sh(2/(1+t))});function Bp(){return xp(Ap).scale(124.75).clipAngle(179.999)}Ap.invert=Mp(function(t){return 2*Ah(t/2)});var Lp=Tp(function(t){return(t=Mh(t))&&t/kh(t)});function Ep(){return xp(Lp).scale(79.4188).clipAngle(179.999)}function Fp(t,e){return[t,vh(Th((ch+e)/2))]}function $p(){return Op(Fp).scale(961/uh)}function Op(t){var e,n,r,i=xp(t),a=i.center,o=i.scale,s=i.translate,l=i.clipExtent,c=null;function h(){var a=lh*o(),s=i(lf(i.rotate()).invert([0,0]));return l(null==c?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Fp?[[Math.max(s[0]-a,c),e],[Math.min(s[0]+a,n),r]]:[[c,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),h()):o()},i.translate=function(t){return arguments.length?(s(t),h()):s()},i.center=function(t){return arguments.length?(a(t),h()):a()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),h()):null==c?null:[[c,e],[n,r]]},h()}function Np(t){return Th((ch+t)/2)}function Dp(t,e){var n=yh(t),r=t===e?kh(t):vh(n/yh(e))/vh(Np(e)/Np(t)),i=n*wh(Np(t),r)/r;if(!r)return Fp;function a(t,e){i>0?e<-ch+oh&&(e=-ch+oh):e>ch-oh&&(e=ch-oh);var n=i/wh(Np(e),r);return[n*kh(r*t),i-n*yh(r*t)]}return a.invert=function(t,e){var n=i-e,a=Ch(r)*Sh(t*t+n*n),o=mh(t,ph(n))*Ch(n);return n*r<0&&(o-=lh*Ch(t)*Ch(n)),[o/r,2*gh(wh(i/a,1/r))-ch]},a}function zp(){return vp(Dp).scale(109.5).parallels([30,30])}function Ip(t,e){return[t,e]}function Pp(){return xp(Ip).scale(152.63)}function Rp(t,e){var n=yh(t),r=t===e?kh(t):(n-yh(e))/(e-t),i=n/r+t;if(ph(r)<oh)return Ip;function a(t,e){var n=i-e,a=r*t;return[n*kh(a),i-n*yh(a)]}return a.invert=function(t,e){var n=i-e,a=mh(t,ph(n))*Ch(n);return n*r<0&&(a-=lh*Ch(t)*Ch(n)),[a/r,i-Ch(r)*Sh(t*t+n*n)]},a}function qp(){return vp(Rp).scale(131.154).center([0,13.9389])}Lp.invert=Mp(function(t){return t}),Fp.invert=function(t,e){return[t,2*gh(xh(e))-ch]},Ip.invert=Ip;var jp=1.340264,Wp=-.081106,Hp=893e-6,Up=.003796,Yp=Sh(3)/2;function Gp(t,e){var n=Ah(Yp*kh(e)),r=n*n,i=r*r*r;return[t*yh(n)/(Yp*(jp+3*Wp*r+i*(7*Hp+9*Up*r))),n*(jp+Wp*r+i*(Hp+Up*r))]}function Vp(){return xp(Gp).scale(177.158)}function Xp(t,e){var n=yh(e),r=yh(t)*n;return[n*kh(t)/r,kh(e)/r]}function Zp(){return xp(Xp).scale(144.049).clipAngle(60)}function Qp(){var t,e,n,r,i,a,o,s=1,l=0,c=0,h=1,u=1,f=0,d=null,p=1,g=1,m=lp({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),y=td;function b(){return p=s*h,g=s*u,a=o=null,x}function x(n){var r=n[0]*p,i=n[1]*g;if(f){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+l,i+c]}return x.invert=function(n){var r=n[0]-l,i=n[1]-c;if(f){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/g]},x.stream=function(t){return a&&o===t?a:a=m(y(o=t))},x.postclip=function(t){return arguments.length?(y=t,d=n=r=i=null,b()):y},x.clipExtent=function(t){return arguments.length?(y=null==t?(d=n=r=i=null,td):Lf(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==d?null:[[d,n],[r,i]]},x.scale=function(t){return arguments.length?(s=+t,b()):s},x.translate=function(t){return arguments.length?(l=+t[0],c=+t[1],b()):[l,c]},x.angle=function(n){return arguments.length?(e=kh(f=n%360*dh),t=yh(f),b()):f*fh},x.reflectX=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.reflectY=function(t){return arguments.length?(u=t?-1:1,b()):u<0},x.fitExtent=function(t,e){return up(x,t,e)},x.fitSize=function(t,e){return fp(x,t,e)},x.fitWidth=function(t,e){return dp(x,t,e)},x.fitHeight=function(t,e){return pp(x,t,e)},x}function Kp(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function Jp(){return xp(Kp).scale(175.295)}function tg(t,e){return[yh(e)*kh(t),kh(e)]}function eg(){return xp(tg).scale(249.5).clipAngle(90.000001)}function ng(t,e){var n=yh(e),r=1+yh(t)*n;return[n*kh(t)/r,kh(e)/r]}function rg(){return xp(ng).scale(250).clipAngle(142)}function ig(t,e){return[vh(Th((ch+e)/2)),-t]}function ag(){var t=Op(ig),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function og(t,e){return t.parent===e.parent?1:2}function sg(t,e){return t+e.x}function lg(t,e){return Math.max(t,e.y)}function cg(){var t=og,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter(function(e){var n=e.children;n?(e.x=function(t){return t.reduce(sg,0)/t.length}(n),e.y=function(t){return 1+t.reduce(lg,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),l=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=s.x-t(s,l)/2,h=l.x+t(l,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(h-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function hg(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ug(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=dg)):void 0===e&&(e=fg);for(var n,r,i,a,o,s=new mg(t),l=[s];n=l.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)l.push(r=i[a]=new mg(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(gg)}function fg(t){return t.children}function dg(t){return Array.isArray(t)?t[1]:null}function pg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function gg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function mg(t){this.data=t,this.depth=this.height=0,this.parent=null}function yg(t){return null==t?null:bg(t)}function bg(t){if("function"!=typeof t)throw new Error;return t}function xg(){return 0}function _g(t){return function(){return t}}Gp.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(jp+Wp*i+a*(Hp+Up*i))-e)/(jp+3*Wp*i+a*(7*Hp+9*Up*i)))*r)*i*i,!(ph(n)<sh));++o);return[Yp*t*(jp+3*Wp*i+a*(7*Hp+9*Up*i))/yh(r),Ah(kh(r)/Yp)]},Xp.invert=Mp(gh),Kp.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(ph(n)>oh&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},tg.invert=Mp(Ah),ng.invert=Mp(function(t){return 2*gh(t)}),ig.invert=function(t,e){return[-e,2*gh(xh(t))-ch]},mg.prototype=ug.prototype={constructor:mg,count:function(){return this.eachAfter(hg)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i=this,a=[i],o=-1;i=a.pop();)if(t.call(e,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return ug(this).eachBefore(pg)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n])}while(a.length)}};const vg=4294967296;function wg(){let t=1;return()=>(t=(1664525*t+1013904223)%vg)/vg}function kg(t){return Cg(t,wg())}function Cg(t,e){for(var n,r,i=0,a=(t=function(t,e){let n,r,i=t.length;for(;i;)r=e()*i--|0,n=t[i],t[i]=t[r],t[r]=n;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Mg(r,n)?++i:(r=Bg(o=Sg(o,n)),i=0);return r}function Sg(t,e){var n,r;if(Ag(e,t))return[e];for(n=0;n<t.length;++n)if(Tg(e,t[n])&&Ag(Lg(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Tg(Lg(t[n],t[r]),e)&&Tg(Lg(t[n],e),t[r])&&Tg(Lg(t[r],e),t[n])&&Ag(Eg(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Tg(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Mg(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Ag(t,e){for(var n=0;n<e.length;++n)if(!Mg(t,e[n]))return!1;return!0}function Bg(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Lg(t[0],t[1]);case 3:return Eg(t[0],t[1],t[2])}var e}function Lg(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,l=a-n,c=o-r,h=s-i,u=Math.sqrt(l*l+c*c);return{x:(n+a+l/u*h)/2,y:(r+o+c/u*h)/2,r:(u+i+s)/2}}function Eg(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,l=e.r,c=n.x,h=n.y,u=n.r,f=r-o,d=r-c,p=i-s,g=i-h,m=l-a,y=u-a,b=r*r+i*i-a*a,x=b-o*o-s*s+l*l,_=b-c*c-h*h+u*u,v=d*p-f*g,w=(p*_-g*x)/(2*v)-r,k=(g*m-p*y)/v,C=(d*x-f*_)/(2*v)-i,S=(f*y-d*m)/v,T=k*k+S*S-1,M=2*(a+w*k+C*S),A=w*w+C*C-a*a,B=-(Math.abs(T)>1e-6?(M+Math.sqrt(M*M-4*T*A))/(2*T):A/M);return{x:r+w+k*B,y:i+C+S*B,r:B}}function Fg(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function $g(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Og(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Ng(t){this._=t,this.next=null,this.previous=null}function Dg(t,e){if(!(o=(n=t,t="object"==typeof n&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,h,u,f,d;if((r=t[0]).x=0,r.y=0,!(o>1))return r.r;if(i=t[1],r.x=-i.r,i.x=r.r,i.y=0,!(o>2))return r.r+i.r;Fg(i,r,a=t[2]),r=new Ng(r),i=new Ng(i),a=new Ng(a),r.next=a.previous=i,i.next=r.previous=a,a.next=i.previous=r;t:for(c=3;c<o;++c){Fg(r._,i._,a=t[c]),a=new Ng(a),h=i.next,u=r.previous,f=i._.r,d=r._.r;do{if(f<=d){if($g(h._,a._)){i=h,r.next=i,i.previous=r,--c;continue t}f+=h._.r,h=h.next}else{if($g(u._,a._)){(r=u).next=i,i.previous=r,--c;continue t}d+=u._.r,u=u.previous}}while(h!==u.next);for(a.previous=r,a.next=i,r.next=i.previous=i=a,s=Og(r);(a=a.next)!==i;)(l=Og(a))<s&&(r=a,s=l);i=r.next}for(r=[i._],a=i;(a=a.next)!==i;)r.push(a._);for(a=Cg(r,e),c=0;c<o;++c)(r=t[c]).x-=a.x,r.y-=a.y;return a.r}function zg(t){return Dg(t,wg()),t}function Ig(t){return Math.sqrt(t.value)}function Pg(){var t=null,e=1,n=1,r=xg;function i(i){const a=wg();return i.x=e/2,i.y=n/2,t?i.eachBefore(Rg(t)).eachAfter(qg(r,.5,a)).eachBefore(jg(1)):i.eachBefore(Rg(Ig)).eachAfter(qg(xg,1,a)).eachAfter(qg(r,i.r/Math.min(e,n),a)).eachBefore(jg(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=yg(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:_g(+t),i):r},i}function Rg(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function qg(t,e,n){return function(r){if(i=r.children){var i,a,o,s=i.length,l=t(r)*e||0;if(l)for(a=0;a<s;++a)i[a].r+=l;if(o=Dg(i,n),l)for(a=0;a<s;++a)i[a].r-=l;r.r=o+l}}}function jg(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Wg(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Hg(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function Ug(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&Hg(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(Wg),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}var Yg={depth:-1},Gg={},Vg={};function Xg(t){return t.id}function Zg(t){return t.parentId}function Qg(){var t,e=Xg,n=Zg;function r(r){var i,a,o,s,l,c,h,u,f=Array.from(r),d=e,p=n,g=new Map;if(null!=t){const e=f.map((e,n)=>function(t){let e=(t=`${t}`).length;return Jg(t,e-1)&&!Jg(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(e,n,r))),n=e.map(Kg),i=new Set(e).add("");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(Kg(t)),f.push(Vg));d=(t,n)=>e[n],p=(t,e)=>n[e]}for(o=0,i=f.length;o<i;++o)a=f[o],c=f[o]=new mg(a),null!=(h=d(a,o,r))&&(h+="")&&(u=c.id=h,g.set(u,g.has(u)?Gg:c)),null!=(h=p(a,o,r))&&(h+="")&&(c.parent=h);for(o=0;o<i;++o)if(h=(c=f[o]).parent){if(!(l=g.get(h)))throw new Error("missing: "+h);if(l===Gg)throw new Error("ambiguous: "+h);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=t){for(;s.data===Vg&&1===s.children.length;)s=s.children[0],--i;for(let t=f.length-1;t>=0&&(c=f[t]).data===Vg;--t)c.data=null}if(s.parent=Yg,s.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(gg),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(t){return arguments.length?(e=yg(t),r):e},r.parentId=function(t){return arguments.length?(n=yg(t),r):n},r.path=function(e){return arguments.length?(t=yg(e),r):t},r}function Kg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Jg(t,e););return t.slice(0,e)}function Jg(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function tm(t,e){return t.parent===e.parent?1:2}function em(t){var e=t.children;return e?e[0]:t.t}function nm(t){var e=t.children;return e?e[e.length-1]:t.t}function rm(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function im(t,e,n){return t.a.parent===e.parent?t.a:n}function am(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function om(){var t=tm,e=1,n=1,r=null;function i(i){var l=function(t){for(var e,n,r,i,a,o=new am(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new am(r[i],i)),n.parent=e;return(o.parent=new am(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),r)i.eachBefore(s);else{var c=i,h=i,u=i;i.eachBefore(function(t){t.x<c.x&&(c=t),t.x>h.x&&(h=t),t.depth>u.depth&&(u=t)});var f=c===h?1:t(c,h)/2,d=f-c.x,p=e/(h.x+f+d),g=n/(u.depth||1);i.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*g})}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,l=a.parent.children[0],c=a.m,h=o.m,u=s.m,f=l.m;s=nm(s),a=em(a),s&&a;)l=em(l),(o=nm(o)).a=e,(i=s.z+u-a.z-c+t(s._,a._))>0&&(rm(im(s,e,r),e,i),c+=i,h+=i),u+=s.m,c+=a.m,f+=l.m,h+=o.m;s&&!nm(o)&&(o.t=s,o.m+=u-h),a&&!em(l)&&(l.t=a,l.m+=c-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function sm(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}am.prototype=Object.create(mg.prototype);var lm=(1+Math.sqrt(5))/2;function cm(t,e,n,r,i,a){for(var o,s,l,c,h,u,f,d,p,g,m,y=[],b=e.children,x=0,_=0,v=b.length,w=e.value;x<v;){l=i-n,c=a-r;do{h=b[_++].value}while(!h&&_<v);for(u=f=h,m=h*h*(g=Math.max(c/l,l/c)/(w*t)),p=Math.max(f/m,m/u);_<v;++_){if(h+=s=b[_].value,s<u&&(u=s),s>f&&(f=s),m=h*h*g,(d=Math.max(f/m,m/u))>p){h-=s;break}p=d}y.push(o={value:h,dice:l<c,children:b.slice(x,_)}),o.dice?Hg(o,n,r,i,w?r+=c*h/w:a):sm(o,n,r,w?n+=l*h/w:i,a),w-=h,x=_}return y}const hm=function t(e){function n(t,n,r,i,a){cm(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(lm);function um(){var t=hm,e=!1,n=1,r=1,i=[0],a=xg,o=xg,s=xg,l=xg,c=xg;function h(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(u),i=[0],e&&t.eachBefore(Wg),t}function u(e){var n=i[e.depth],r=e.x0+n,h=e.y0+n,u=e.x1-n,f=e.y1-n;u<r&&(r=u=(r+u)/2),f<h&&(h=f=(h+f)/2),e.x0=r,e.y0=h,e.x1=u,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=c(e)-n,h+=o(e)-n,(u-=s(e)-n)<r&&(r=u=(r+u)/2),(f-=l(e)-n)<h&&(h=f=(h+f)/2),t(e,r,h,u,f))}return h.round=function(t){return arguments.length?(e=!!t,h):e},h.size=function(t){return arguments.length?(n=+t[0],r=+t[1],h):[n,r]},h.tile=function(e){return arguments.length?(t=bg(e),h):t},h.padding=function(t){return arguments.length?h.paddingInner(t).paddingOuter(t):h.paddingInner()},h.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:_g(+t),h):a},h.paddingOuter=function(t){return arguments.length?h.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):h.paddingTop()},h.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:_g(+t),h):o},h.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:_g(+t),h):s},h.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:_g(+t),h):l},h.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:_g(+t),h):c},h}function fm(t,e,n,r,i){var a,o,s=t.children,l=s.length,c=new Array(l+1);for(c[0]=o=a=0;a<l;++a)c[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,l){if(e>=n-1){var h=s[e];return h.x0=i,h.y0=a,h.x1=o,void(h.y1=l)}for(var u=c[e],f=r/2+u,d=e+1,p=n-1;d<p;){var g=d+p>>>1;c[g]<f?d=g+1:p=g}f-c[d-1]<c[d]-f&&e+1<d&&--d;var m=c[d]-u,y=r-m;if(o-i>l-a){var b=r?(i*y+o*m)/r:o;t(e,d,m,i,a,b,l),t(d,n,y,b,a,o,l)}else{var x=r?(a*y+l*m)/r:l;t(e,d,m,i,a,o,x),t(d,n,y,i,x,o,l)}}(0,l,t.value,e,n,r,i)}function dm(t,e,n,r,i){(1&t.depth?sm:Hg)(t,e,n,r,i)}const pm=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,h,u=-1,f=o.length,d=t.value;++u<f;){for(l=(s=o[u]).children,c=s.value=0,h=l.length;c<h;++c)s.value+=l[c].value;s.dice?Hg(s,n,r,i,d?r+=(a-r)*s.value/d:a):sm(s,n,r,d?n+=(i-n)*s.value/d:i,a),d-=s.value}else t._squarify=o=cm(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(lm);function gm(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function mm(t,e){var n=Er(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function ym(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function bm(t){return((t=Math.exp(t))+1/t)/2}const xm=function t(e,n,r){function i(t,i){var a,o,s=t[0],l=t[1],c=t[2],h=i[0],u=i[1],f=i[2],d=h-s,p=u-l,g=d*d+p*p;if(g<1e-12)o=Math.log(f/c)/e,a=function(t){return[s+t*d,l+t*p,c*Math.exp(e*t*o)]};else{var m=Math.sqrt(g),y=(f*f-c*c+r*g)/(2*c*n*m),b=(f*f-c*c-r*g)/(2*f*n*m),x=Math.log(Math.sqrt(y*y+1)-y),_=Math.log(Math.sqrt(b*b+1)-b);o=(_-x)/e,a=function(t){var r,i=t*o,a=bm(x),h=c/(n*m)*(a*(r=e*i+x,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(x));return[s+h*d,l+h*p,c*a/bm(e*i+x)]}}return a.duration=1e3*o*e/Math.SQRT2,a}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function _m(t){return function(e,n){var r=t((e=vr(e)).h,(n=vr(n)).h),i=Fr(e.s,n.s),a=Fr(e.l,n.l),o=Fr(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const vm=_m(Er);var wm=_m(Fr);function km(t,e){var n=Fr((t=So(t)).l,(e=So(e)).l),r=Fr(t.a,e.a),i=Fr(t.b,e.b),a=Fr(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function Cm(t){return function(e,n){var r=t((e=$o(e)).h,(n=$o(n)).h),i=Fr(e.c,n.c),a=Fr(e.l,n.l),o=Fr(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Sm=Cm(Er);var Tm=Cm(Fr);function Mm(t){return function e(n){function r(e,r){var i=t((e=Ho(e)).h,(r=Ho(r)).h),a=Fr(e.s,r.s),o=Fr(e.l,r.l),s=Fr(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}const Am=Mm(Er);var Bm=Mm(Fr);function Lm(t,e){void 0===e&&(e=t,t=Gr);for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}function Em(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}function Fm(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2}function $m(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],l=0;++r<i;)e=s,s=t[r],l+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(l*=3),o/l]}function Om(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Nm(t,e){return t[0]-e[0]||t[1]-e[1]}function Dm(t){const e=t.length,n=[0,1];let r,i=2;for(r=2;r<e;++r){for(;i>1&&Om(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function zm(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Nm),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Dm(r),o=Dm(i),s=o[0]===a[0],l=o[o.length-1]===a[a.length-1],c=[];for(e=a.length-1;e>=0;--e)c.push(t[r[a[e]][2]]);for(e=+s;e<o.length-l;++e)c.push(t[r[o[e]][2]]);return c}function Im(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],l=a[0],c=a[1],h=!1,u=0;u<i;++u)n=(a=t[u])[0],(r=a[1])>s!=c>s&&o<(l-n)*(s-r)/(c-r)+n&&(h=!h),l=n,c=r;return h}function Pm(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],l=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],l+=Math.hypot(e,n);return l}const Rm=Math.random,qm=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Rm),jm=function t(e){function n(t,n){return arguments.length<2&&(n=t,t=0),t=Math.floor(t),n=Math.floor(n)-t,function(){return Math.floor(e()*n+t)}}return n.source=t,n}(Rm),Wm=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Rm),Hm=function t(e){var n=Wm.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Rm),Um=function t(e){function n(t){return(t=+t)<=0?()=>0:function(){for(var n=0,r=t;r>1;--r)n+=e();return n+r*e()}}return n.source=t,n}(Rm),Ym=function t(e){var n=Um.source(e);function r(t){if(0===(t=+t))return e;var r=n(t);return function(){return r()/t}}return r.source=t,r}(Rm),Gm=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(Rm),Vm=function t(e){function n(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-e(),t)}}return n.source=t,n}(Rm),Xm=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+t)}}return n.source=t,n}(Rm),Zm=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return n.source=t,n}(Rm),Qm=function t(e){var n=Wm.source(e)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-e())*r;var i=(t<1?t+1:t)-1/3,a=1/(3*Math.sqrt(i)),o=t<1?()=>Math.pow(e(),1/t):()=>1;return function(){do{do{var t=n(),s=1+a*t}while(s<=0);s*=s*s;var l=1-e()}while(l>=1-.0331*t*t*t*t&&Math.log(l)>=.5*t*t+i*(1-s+Math.log(s)));return i*s*o()*r}}return r.source=t,r}(Rm),Km=function t(e){var n=Qm.source(e);function r(t,e){var r=n(t),i=n(e);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(Rm),Jm=function t(e){var n=Zm.source(e),r=Km.source(e);function i(t,e){return t=+t,(e=+e)>=1?()=>t:e<=0?()=>0:function(){for(var i=0,a=t,o=e;a*o>16&&a*(1-o)>16;){var s=Math.floor((a+1)*o),l=r(s,a-s+1)();l<=o?(i+=s,a-=s,o=(o-l)/(1-l)):(a=s-1,o/=l)}for(var c=o<.5,h=n(c?o:1-o),u=h(),f=0;u<=a;++f)u+=h();return i+(c?f:a-f)}}return i.source=t,i}(Rm),ty=function t(e){function n(t,n,r){var i;return 0===(t=+t)?i=t=>-Math.log(t):(t=1/t,i=e=>Math.pow(e,t)),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-e()))}}return n.source=t,n}(Rm),ey=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){return t+n*Math.tan(Math.PI*e())}}return n.source=t,n}(Rm),ny=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){var r=e();return t+n*Math.log(r/(1-r))}}return n.source=t,n}(Rm),ry=function t(e){var n=Qm.source(e),r=Jm.source(e);function i(t){return function(){for(var i=0,a=t;a>16;){var o=Math.floor(.875*a),s=n(o)();if(s>a)return i+r(o-1,a/s)();i+=o,a-=s}for(var l=-Math.log1p(-e()),c=0;l<=a;++c)l-=Math.log1p(-e());return i+c}}return i.source=t,i}(Rm),iy=1/4294967296;function ay(t=Math.random()){let e=0|(0<=t&&t<1?t/iy:Math.abs(t));return()=>(e=1664525*e+1013904223|0,iy*(e>>>0))}function oy(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function sy(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const ly=Symbol("implicit");function cy(){var t=new F,e=[],n=[],r=ly;function i(i){let a=t.get(i);if(void 0===a){if(r!==ly)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new F;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return cy(e,n).unknown(r)},oy.apply(i,arguments),i}function hy(){var t,e,n=cy().unknown(void 0),r=n.domain,i=n.range,a=0,o=1,s=!1,l=0,c=0,h=.5;function u(){var n=r().length,u=o<a,f=u?o:a,d=u?a:o;t=(d-f)/Math.max(1,n-l+2*c),s&&(t=Math.floor(t)),f+=(d-f-t*(n-l))*h,e=t*(1-l),s&&(f=Math.round(f),e=Math.round(e));var p=$t(n).map(function(e){return f+t*e});return i(u?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),u()):r()},n.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,u()):[a,o]},n.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,s=!0,u()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,u()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),u()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),u()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},n.align=function(t){return arguments.length?(h=Math.max(0,Math.min(1,t)),u()):h},n.copy=function(){return hy(r(),[a,o]).round(s).paddingInner(l).paddingOuter(c).align(h)},oy.apply(u(),arguments)}function uy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return uy(e())},t}function fy(){return uy(hy.apply(null,arguments).paddingInner(1))}function dy(t){return+t}var py=[0,1];function gy(t){return t}function my(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function yy(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=my(i,r),a=n(o,a)):(r=my(r,i),a=n(a,o)),function(t){return a(r(t))}}function by(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=my(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=f(t,e,1,r)-1;return a[n](i[n](e))}}function xy(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function _y(){var t,e,n,r,i,a,o=py,s=py,l=Gr,c=gy;function h(){var t,e,n,l=Math.min(o.length,s.length);return c!==gy&&(t=o[0],e=o[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),r=l>2?by:yy,i=a=null,u}function u(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,l)))(t(c(e)))}return u.invert=function(n){return c(e((a||(a=r(s,o.map(t),jr)))(n)))},u.domain=function(t){return arguments.length?(o=Array.from(t,dy),h()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=ym,h()},u.clamp=function(t){return arguments.length?(c=!!t||gy,h()):c!==gy},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(n=t,u):n},function(n,r){return t=n,e=r,h()}}function vy(){return _y()(gy,gy)}function wy(t,e,n,r){var i,a=ht(t,e,n);switch((r=Uc(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ih(a,o))||(r.precision=i),Kc(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=ah(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=rh(a))||(r.precision=i-2*("%"===r.type))}return Qc(r)}function ky(t){var e=t.domain;return t.ticks=function(t){var n=e();return lt(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return wy(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,s=a.length-1,l=a[o],c=a[s],h=10;for(c<l&&(i=l,l=c,c=i,i=o,o=s,s=i);h-- >0;){if((i=ct(l,c,n))===r)return a[o]=l,a[s]=c,e(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function Cy(){var t=vy();return t.copy=function(){return xy(t,Cy())},oy.apply(t,arguments),ky(t)}function Sy(t){var e;function n(t){return null==t||isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,dy),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Sy(t).unknown(e)},t=arguments.length?Array.from(t,dy):[0,1],ky(n)}function Ty(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function My(t){return Math.log(t)}function Ay(t){return Math.exp(t)}function By(t){return-Math.log(-t)}function Ly(t){return-Math.exp(-t)}function Ey(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Fy(t){return(e,n)=>-t(-e,n)}function $y(t){const e=t(My,Ay),n=e.domain;let r,i,a=10;function o(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(a),i=function(t){return 10===t?Ey:t===Math.E?Math.exp:e=>Math.pow(t,e)}(a),n()[0]<0?(r=Fy(r),i=Fy(i),t(By,Ly)):t(My,Ay),e}return e.base=function(t){return arguments.length?(a=+t,o()):a},e.domain=function(t){return arguments.length?(n(t),o()):n()},e.ticks=t=>{const e=n();let o=e[0],s=e[e.length-1];const l=s<o;l&&([o,s]=[s,o]);let c,h,u=r(o),f=r(s);const d=null==t?10:+t;let p=[];if(!(a%1)&&f-u<d){if(u=Math.floor(u),f=Math.ceil(f),o>0){for(;u<=f;++u)for(c=1;c<a;++c)if(h=u<0?c/i(-u):c*i(u),!(h<o)){if(h>s)break;p.push(h)}}else for(;u<=f;++u)for(c=a-1;c>=1;--c)if(h=u>0?c/i(-u):c*i(u),!(h<o)){if(h>s)break;p.push(h)}2*p.length<d&&(p=lt(o,s,d))}else p=lt(u,f,Math.min(f-u,d)).map(i);return l?p.reverse():p},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===a?"s":","),"function"!=typeof n&&(a%1||null!=(n=Uc(n)).precision||(n.trim=!0),n=Qc(n)),t===1/0)return n;const o=Math.max(1,a*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*a<a-.5&&(e*=a),e<=o?n(t):""}},e.nice=()=>n(Ty(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function Oy(){const t=$y(_y()).domain([1,10]);return t.copy=()=>xy(t,Oy()).base(t.base()),oy.apply(t,arguments),t}function Ny(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Dy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function zy(t){var e=1,n=t(Ny(e),Dy(e));return n.constant=function(n){return arguments.length?t(Ny(e=+n),Dy(e)):e},ky(n)}function Iy(){var t=zy(_y());return t.copy=function(){return xy(t,Iy()).constant(t.constant())},oy.apply(t,arguments)}function Py(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Ry(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function qy(t){return t<0?-t*t:t*t}function jy(t){var e=t(gy,gy),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(gy,gy):.5===n?t(Ry,qy):t(Py(n),Py(1/n)):n},ky(e)}function Wy(){var t=jy(_y());return t.copy=function(){return xy(t,Wy()).exponent(t.exponent())},oy.apply(t,arguments),t}function Hy(){return Wy.apply(null,arguments).exponent(.5)}function Uy(t){return Math.sign(t)*t*t}function Yy(){var t,e=vy(),n=[0,1],r=!1;function i(n){var i=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(n));return isNaN(i)?t:r?Math.round(i):i}return i.invert=function(t){return e.invert(Uy(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(t){return arguments.length?(e.range((n=Array.from(t,dy)).map(Uy)),i):n.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(r=!!t,i):r},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Yy(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},oy.apply(i,arguments),ky(i)}function Gy(){var t,e=[],n=[],i=[];function a(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=wt(e,t/r);return o}function o(e){return null==e||isNaN(e=+e)?t:n[f(i,e)]}return o.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(r),a()},o.range=function(t){return arguments.length?(n=Array.from(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return Gy().domain(e).range(n).unknown(t)},oy.apply(o,arguments)}function Vy(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return null!=e&&e<=e?a[f(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=Array.from(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Vy().domain([e,n]).range(a).unknown(t)},oy.apply(ky(o),arguments)}function Xy(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[f(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Xy().domain(e).range(n).unknown(t)},oy.apply(i,arguments)}const Zy=1e3,Qy=6e4,Ky=36e5,Jy=864e5,tb=6048e5,eb=31536e6,nb=new Date,rb=new Date;function ib(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const o=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return o;let s;do{o.push(s=new Date(+n)),e(n,a),t(n)}while(s<n&&n<r);return o},i.filter=n=>ib(e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},(t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}),n&&(i.count=(e,r)=>(nb.setTime(+e),rb.setTime(+r),t(nb),t(rb),Math.floor(n(nb,rb))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t===0:e=>i.count(0,e)%t===0):i:null)),i}const ab=ib(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ab.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?ib(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):ab:null);const ob=ab.range,sb=ib(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Zy)},(t,e)=>(e-t)/Zy,t=>t.getUTCSeconds()),lb=sb.range,cb=ib(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Zy)},(t,e)=>{t.setTime(+t+e*Qy)},(t,e)=>(e-t)/Qy,t=>t.getMinutes()),hb=cb.range,ub=ib(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Qy)},(t,e)=>(e-t)/Qy,t=>t.getUTCMinutes()),fb=ub.range,db=ib(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Zy-t.getMinutes()*Qy)},(t,e)=>{t.setTime(+t+e*Ky)},(t,e)=>(e-t)/Ky,t=>t.getHours()),pb=db.range,gb=ib(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ky)},(t,e)=>(e-t)/Ky,t=>t.getUTCHours()),mb=gb.range,yb=ib(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Qy)/Jy,t=>t.getDate()-1),bb=yb.range,xb=ib(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Jy,t=>t.getUTCDate()-1),_b=xb.range,vb=ib(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Jy,t=>Math.floor(t/Jy)),wb=vb.range;function kb(t){return ib(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Qy)/tb)}const Cb=kb(0),Sb=kb(1),Tb=kb(2),Mb=kb(3),Ab=kb(4),Bb=kb(5),Lb=kb(6),Eb=Cb.range,Fb=Sb.range,$b=Tb.range,Ob=Mb.range,Nb=Ab.range,Db=Bb.range,zb=Lb.range;function Ib(t){return ib(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/tb)}const Pb=Ib(0),Rb=Ib(1),qb=Ib(2),jb=Ib(3),Wb=Ib(4),Hb=Ib(5),Ub=Ib(6),Yb=Pb.range,Gb=Rb.range,Vb=qb.range,Xb=jb.range,Zb=Wb.range,Qb=Hb.range,Kb=Ub.range,Jb=ib(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth()),tx=Jb.range,ex=ib(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth()),nx=ex.range,rx=ib(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());rx.every=t=>isFinite(t=Math.floor(t))&&t>0?ib(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}):null;const ix=rx.range,ax=ib(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());ax.every=t=>isFinite(t=Math.floor(t))&&t>0?ib(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null;const ox=ax.range;function sx(t,e,n,r,i,o){const s=[[sb,1,Zy],[sb,5,5e3],[sb,15,15e3],[sb,30,3e4],[o,1,Qy],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,Ky],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Jy],[r,2,1728e5],[n,1,tb],[e,1,2592e6],[e,3,7776e6],[t,1,eb]];function l(e,n,r){const i=Math.abs(n-e)/r,o=a(([,,t])=>t).right(s,i);if(o===s.length)return t.every(ht(e/eb,n/eb,r));if(0===o)return ab.every(Math.max(ht(e,n,r),1));const[l,c]=s[i/s[o-1][2]<s[o][2]/i?o-1:o];return l.every(c)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:l(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},l]}const[lx,cx]=sx(ax,ex,Pb,vb,gb,ub),[hx,ux]=sx(rx,Jb,Cb,yb,db,cb);function fx(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function dx(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function px(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function gx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,l=t.shortMonths,c=Mx(i),h=Ax(i),u=Mx(a),f=Ax(a),d=Mx(o),p=Ax(o),g=Mx(s),m=Ax(s),y=Mx(l),b=Ax(l),x={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Xx,e:Xx,f:t_,g:u_,G:d_,H:Zx,I:Qx,j:Kx,L:Jx,m:e_,M:n_,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:D_,s:z_,S:r_,u:i_,U:a_,V:s_,w:l_,W:c_,x:null,X:null,y:h_,Y:f_,Z:p_,"%":N_},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:g_,e:g_,f:__,g:E_,G:$_,H:m_,I:y_,j:b_,L:x_,m:v_,M:w_,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:D_,s:z_,S:k_,u:C_,U:S_,V:M_,w:A_,W:B_,x:null,X:null,y:L_,Y:F_,Z:O_,"%":N_},v={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:Px,e:Px,f:Ux,g:Nx,G:Ox,H:qx,I:qx,j:Rx,L:Hx,m:Ix,M:jx,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=h.get(r[0].toLowerCase()),n+r[0].length):-1},q:zx,Q:Gx,s:Vx,S:Wx,u:Lx,U:Ex,V:Fx,w:Bx,W:$x,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:Nx,Y:Ox,Z:Dx,"%":Yx};function w(t,e){return function(n){var r,i,a,o=[],s=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=vx[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),l=s+1);return o.push(t.slice(l,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=px(1900,void 0,1);if(C(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=dx(px(a.y,0,1))).getUTCDay(),r=i>4||0===i?Rb.ceil(r):Rb(r),r=xb.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=fx(px(a.y,0,1))).getDay(),r=i>4||0===i?Sb.ceil(r):Sb(r),r=yb.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?dx(px(a.y,0,1)).getUTCDay():fx(px(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,dx(a)):fx(a)}}function C(t,e,n,r){for(var i,a,o=0,s=e.length,l=n.length;o<s;){if(r>=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=v[i in vx?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=w(n,x),x.X=w(r,x),x.c=w(e,x),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var mx,yx,bx,xx,_x,vx={"-":"",_:" ",0:"0"},wx=/^\s*\d+/,kx=/^%/,Cx=/[\\^$*+?|[\]().{}]/g;function Sx(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Tx(t){return t.replace(Cx,"\\$&")}function Mx(t){return new RegExp("^(?:"+t.map(Tx).join("|")+")","i")}function Ax(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function Bx(t,e,n){var r=wx.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Lx(t,e,n){var r=wx.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ex(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Fx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function $x(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ox(t,e,n){var r=wx.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Nx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Dx(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function zx(t,e,n){var r=wx.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Ix(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Px(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rx(t,e,n){var r=wx.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function qx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function jx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Wx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Hx(t,e,n){var r=wx.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ux(t,e,n){var r=wx.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Yx(t,e,n){var r=kx.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gx(t,e,n){var r=wx.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Vx(t,e,n){var r=wx.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xx(t,e){return Sx(t.getDate(),e,2)}function Zx(t,e){return Sx(t.getHours(),e,2)}function Qx(t,e){return Sx(t.getHours()%12||12,e,2)}function Kx(t,e){return Sx(1+yb.count(rx(t),t),e,3)}function Jx(t,e){return Sx(t.getMilliseconds(),e,3)}function t_(t,e){return Jx(t,e)+"000"}function e_(t,e){return Sx(t.getMonth()+1,e,2)}function n_(t,e){return Sx(t.getMinutes(),e,2)}function r_(t,e){return Sx(t.getSeconds(),e,2)}function i_(t){var e=t.getDay();return 0===e?7:e}function a_(t,e){return Sx(Cb.count(rx(t)-1,t),e,2)}function o_(t){var e=t.getDay();return e>=4||0===e?Ab(t):Ab.ceil(t)}function s_(t,e){return t=o_(t),Sx(Ab.count(rx(t),t)+(4===rx(t).getDay()),e,2)}function l_(t){return t.getDay()}function c_(t,e){return Sx(Sb.count(rx(t)-1,t),e,2)}function h_(t,e){return Sx(t.getFullYear()%100,e,2)}function u_(t,e){return Sx((t=o_(t)).getFullYear()%100,e,2)}function f_(t,e){return Sx(t.getFullYear()%1e4,e,4)}function d_(t,e){var n=t.getDay();return Sx((t=n>=4||0===n?Ab(t):Ab.ceil(t)).getFullYear()%1e4,e,4)}function p_(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Sx(e/60|0,"0",2)+Sx(e%60,"0",2)}function g_(t,e){return Sx(t.getUTCDate(),e,2)}function m_(t,e){return Sx(t.getUTCHours(),e,2)}function y_(t,e){return Sx(t.getUTCHours()%12||12,e,2)}function b_(t,e){return Sx(1+xb.count(ax(t),t),e,3)}function x_(t,e){return Sx(t.getUTCMilliseconds(),e,3)}function __(t,e){return x_(t,e)+"000"}function v_(t,e){return Sx(t.getUTCMonth()+1,e,2)}function w_(t,e){return Sx(t.getUTCMinutes(),e,2)}function k_(t,e){return Sx(t.getUTCSeconds(),e,2)}function C_(t){var e=t.getUTCDay();return 0===e?7:e}function S_(t,e){return Sx(Pb.count(ax(t)-1,t),e,2)}function T_(t){var e=t.getUTCDay();return e>=4||0===e?Wb(t):Wb.ceil(t)}function M_(t,e){return t=T_(t),Sx(Wb.count(ax(t),t)+(4===ax(t).getUTCDay()),e,2)}function A_(t){return t.getUTCDay()}function B_(t,e){return Sx(Rb.count(ax(t)-1,t),e,2)}function L_(t,e){return Sx(t.getUTCFullYear()%100,e,2)}function E_(t,e){return Sx((t=T_(t)).getUTCFullYear()%100,e,2)}function F_(t,e){return Sx(t.getUTCFullYear()%1e4,e,4)}function $_(t,e){var n=t.getUTCDay();return Sx((t=n>=4||0===n?Wb(t):Wb.ceil(t)).getUTCFullYear()%1e4,e,4)}function O_(){return"+0000"}function N_(){return"%"}function D_(t){return+t}function z_(t){return Math.floor(+t/1e3)}function I_(t){return mx=gx(t),yx=mx.format,bx=mx.parse,xx=mx.utcFormat,_x=mx.utcParse,mx}function P_(t){return new Date(t)}function R_(t){return t instanceof Date?+t:+new Date(+t)}function q_(t,e,n,r,i,a,o,s,l,c){var h=vy(),u=h.invert,f=h.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),b=c("%b %d"),x=c("%B"),_=c("%Y");function v(t){return(l(t)<t?d:s(t)<t?p:o(t)<t?g:a(t)<t?m:r(t)<t?i(t)<t?y:b:n(t)<t?x:_)(t)}return h.invert=function(t){return new Date(u(t))},h.domain=function(t){return arguments.length?f(Array.from(t,R_)):f().map(P_)},h.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},h.tickFormat=function(t,e){return null==e?v:c(e)},h.nice=function(t){var n=f();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(Ty(n,t)):h},h.copy=function(){return xy(h,q_(t,e,n,r,i,a,o,s,l,c))},h}function j_(){return oy.apply(q_(hx,ux,rx,Jb,Cb,yb,db,cb,sb,yx).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function W_(){return oy.apply(q_(lx,cx,ax,ex,Pb,xb,gb,ub,sb,xx).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function H_(){var t,e,n,r,i,a=0,o=1,s=gy,l=!1;function c(e){return null==e||isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,l?Math.max(0,Math.min(1,e)):e))}function h(t){return function(e){var n,r;return arguments.length?([n,r]=e,s=t(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([a,o]=i,t=r(a=+a),e=r(o=+o),n=t===e?0:1/(e-t),c):[a,o]},c.clamp=function(t){return arguments.length?(l=!!t,c):l},c.interpolator=function(t){return arguments.length?(s=t,c):s},c.range=h(Gr),c.rangeRound=h(ym),c.unknown=function(t){return arguments.length?(i=t,c):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),c}}function U_(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Y_(){var t=ky(H_()(gy));return t.copy=function(){return U_(t,Y_())},sy.apply(t,arguments)}function G_(){var t=$y(H_()).domain([1,10]);return t.copy=function(){return U_(t,G_()).base(t.base())},sy.apply(t,arguments)}function V_(){var t=zy(H_());return t.copy=function(){return U_(t,V_()).constant(t.constant())},sy.apply(t,arguments)}function X_(){var t=jy(H_());return t.copy=function(){return U_(t,X_()).exponent(t.exponent())},sy.apply(t,arguments)}function Z_(){return X_.apply(null,arguments).exponent(.5)}function Q_(){var t=[],e=gy;function n(n){if(null!=n&&!isNaN(n=+n))return e((f(t,n,1)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(r),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.range=function(){return t.map((n,r)=>e(r/(t.length-1)))},n.quantiles=function(e){return Array.from({length:e+1},(n,r)=>vt(t,r/e))},n.copy=function(){return Q_(e).domain(t)},sy.apply(n,arguments)}function K_(){var t,e,n,r,i,a,o,s=0,l=.5,c=1,h=1,u=gy,f=!1;function d(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(h*t<h*e?r:i),u(f?Math.max(0,Math.min(1,t)):t))}function p(t){return function(e){var n,r,i;return arguments.length?([n,r,i]=e,u=Lm(t,[n,r,i]),d):[u(0),u(.5),u(1)]}}return d.domain=function(o){return arguments.length?([s,l,c]=o,t=a(s=+s),e=a(l=+l),n=a(c=+c),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h=e<t?-1:1,d):[s,l,c]},d.clamp=function(t){return arguments.length?(f=!!t,d):f},d.interpolator=function(t){return arguments.length?(u=t,d):u},d.range=p(Gr),d.rangeRound=p(ym),d.unknown=function(t){return arguments.length?(o=t,d):o},function(o){return a=o,t=o(s),e=o(l),n=o(c),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h=e<t?-1:1,d}}function J_(){var t=ky(K_()(gy));return t.copy=function(){return U_(t,J_())},sy.apply(t,arguments)}function tv(){var t=$y(K_()).domain([.1,1,10]);return t.copy=function(){return U_(t,tv()).base(t.base())},sy.apply(t,arguments)}function ev(){var t=zy(K_());return t.copy=function(){return U_(t,ev()).constant(t.constant())},sy.apply(t,arguments)}function nv(){var t=jy(K_());return t.copy=function(){return U_(t,nv()).exponent(t.exponent())},sy.apply(t,arguments)}function rv(){return nv.apply(null,arguments).exponent(.5)}function iv(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}I_({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"]});const av=iv("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ov=iv("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),sv=iv("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),lv=iv("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),cv=iv("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),hv=iv("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),uv=iv("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),fv=iv("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),dv=iv("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),pv=iv("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),gv=iv("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),mv=t=>Nr(t[t.length-1]);var yv=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(iv);const bv=mv(yv);var xv=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(iv);const _v=mv(xv);var vv=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(iv);const wv=mv(vv);var kv=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(iv);const Cv=mv(kv);var Sv=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(iv);const Tv=mv(Sv);var Mv=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(iv);const Av=mv(Mv);var Bv=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(iv);const Lv=mv(Bv);var Ev=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(iv);const Fv=mv(Ev);var $v=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(iv);const Ov=mv($v);var Nv=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(iv);const Dv=mv(Nv);var zv=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(iv);const Iv=mv(zv);var Pv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(iv);const Rv=mv(Pv);var qv=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(iv);const jv=mv(qv);var Wv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(iv);const Hv=mv(Wv);var Uv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(iv);const Yv=mv(Uv);var Gv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(iv);const Vv=mv(Gv);var Xv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(iv);const Zv=mv(Xv);var Qv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(iv);const Kv=mv(Qv);var Jv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(iv);const tw=mv(Jv);var ew=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(iv);const nw=mv(ew);var rw=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(iv);const iw=mv(rw);var aw=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(iv);const ow=mv(aw);var sw=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(iv);const lw=mv(sw);var cw=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(iv);const hw=mv(cw);var uw=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(iv);const fw=mv(uw);var dw=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(iv);const pw=mv(dw);var gw=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(iv);const mw=mv(gw);function yw(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const bw=Bm(Ho(300,.5,0),Ho(-240,.5,1));var xw=Bm(Ho(-100,.75,.35),Ho(80,1.5,.8)),_w=Bm(Ho(260,.75,.35),Ho(80,1.5,.8)),vw=Ho();function ww(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return vw.h=360*t-100,vw.s=1.5-1.5*e,vw.l=.8-.9*e,vw+""}var kw=fr(),Cw=Math.PI/3,Sw=2*Math.PI/3;function Tw(t){var e;return t=(.5-t)*Math.PI,kw.r=255*(e=Math.sin(t))*e,kw.g=255*(e=Math.sin(t+Cw))*e,kw.b=255*(e=Math.sin(t+Sw))*e,kw+""}function Mw(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function Aw(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Bw=Aw(iv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Lw=Aw(iv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Ew=Aw(iv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Fw=Aw(iv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function $w(t){return zn(kn(t).call(document.documentElement))}var Ow=0;function Nw(){return new Dw}function Dw(){this._="@"+(++Ow).toString(36)}function zw(t,e){return t.target&&(t=Vr(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,t=>Xr(t,e))}function Iw(t){return"string"==typeof t?new On([document.querySelectorAll(t)],[document.documentElement]):new On([Se(t)],$n)}function Pw(t){return function(){return t}}Dw.prototype=Nw.prototype={constructor:Dw,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const Rw=Math.abs,qw=Math.atan2,jw=Math.cos,Ww=Math.max,Hw=Math.min,Uw=Math.sin,Yw=Math.sqrt,Gw=1e-12,Vw=Math.PI,Xw=Vw/2,Zw=2*Vw;function Qw(t){return t>=1?Xw:t<=-1?-Xw:Math.asin(t)}function Kw(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Ja(e)}function Jw(t){return t.innerRadius}function tk(t){return t.outerRadius}function ek(t){return t.startAngle}function nk(t){return t.endAngle}function rk(t){return t&&t.padAngle}function ik(t,e,n,r,i,a,o){var s=t-n,l=e-r,c=(o?a:-a)/Yw(s*s+l*l),h=c*l,u=-c*s,f=t+h,d=e+u,p=n+h,g=r+u,m=(f+p)/2,y=(d+g)/2,b=p-f,x=g-d,_=b*b+x*x,v=i-a,w=f*g-p*d,k=(x<0?-1:1)*Yw(Ww(0,v*v*_-w*w)),C=(w*x-b*k)/_,S=(-w*b-x*k)/_,T=(w*x+b*k)/_,M=(-w*b+x*k)/_,A=C-m,B=S-y,L=T-m,E=M-y;return A*A+B*B>L*L+E*E&&(C=T,S=M),{cx:C,cy:S,x01:-h,y01:-u,x11:C*(i/v-1),y11:S*(i/v-1)}}function ak(){var t=Jw,e=tk,n=Pw(0),r=null,i=ek,a=nk,o=rk,s=null,l=Kw(c);function c(){var c,h,u,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-Xw,g=a.apply(this,arguments)-Xw,m=Rw(g-p),y=g>p;if(s||(s=c=l()),d<f&&(h=d,d=f,f=h),d>Gw)if(m>Zw-Gw)s.moveTo(d*jw(p),d*Uw(p)),s.arc(0,0,d,p,g,!y),f>Gw&&(s.moveTo(f*jw(g),f*Uw(g)),s.arc(0,0,f,g,p,y));else{var b,x,_=p,v=g,w=p,k=g,C=m,S=m,T=o.apply(this,arguments)/2,M=T>Gw&&(r?+r.apply(this,arguments):Yw(f*f+d*d)),A=Hw(Rw(d-f)/2,+n.apply(this,arguments)),B=A,L=A;if(M>Gw){var E=Qw(M/f*Uw(T)),F=Qw(M/d*Uw(T));(C-=2*E)>Gw?(w+=E*=y?1:-1,k-=E):(C=0,w=k=(p+g)/2),(S-=2*F)>Gw?(_+=F*=y?1:-1,v-=F):(S=0,_=v=(p+g)/2)}var $=d*jw(_),O=d*Uw(_),N=f*jw(k),D=f*Uw(k);if(A>Gw){var z,I=d*jw(v),P=d*Uw(v),R=f*jw(w),q=f*Uw(w);if(m<Vw)if(z=function(t,e,n,r,i,a,o,s){var l=n-t,c=r-e,h=o-i,u=s-a,f=u*l-h*c;if(!(f*f<Gw))return[t+(f=(h*(e-a)-u*(t-i))/f)*l,e+f*c]}($,O,R,q,I,P,N,D)){var j=$-z[0],W=O-z[1],H=I-z[0],U=P-z[1],Y=1/Uw(((u=(j*H+W*U)/(Yw(j*j+W*W)*Yw(H*H+U*U)))>1?0:u<-1?Vw:Math.acos(u))/2),G=Yw(z[0]*z[0]+z[1]*z[1]);B=Hw(A,(f-G)/(Y-1)),L=Hw(A,(d-G)/(Y+1))}else B=L=0}S>Gw?L>Gw?(b=ik(R,q,$,O,d,L,y),x=ik(I,P,N,D,d,L,y),s.moveTo(b.cx+b.x01,b.cy+b.y01),L<A?s.arc(b.cx,b.cy,L,qw(b.y01,b.x01),qw(x.y01,x.x01),!y):(s.arc(b.cx,b.cy,L,qw(b.y01,b.x01),qw(b.y11,b.x11),!y),s.arc(0,0,d,qw(b.cy+b.y11,b.cx+b.x11),qw(x.cy+x.y11,x.cx+x.x11),!y),s.arc(x.cx,x.cy,L,qw(x.y11,x.x11),qw(x.y01,x.x01),!y))):(s.moveTo($,O),s.arc(0,0,d,_,v,!y)):s.moveTo($,O),f>Gw&&C>Gw?B>Gw?(b=ik(N,D,I,P,f,-B,y),x=ik($,O,R,q,f,-B,y),s.lineTo(b.cx+b.x01,b.cy+b.y01),B<A?s.arc(b.cx,b.cy,B,qw(b.y01,b.x01),qw(x.y01,x.x01),!y):(s.arc(b.cx,b.cy,B,qw(b.y01,b.x01),qw(b.y11,b.x11),!y),s.arc(0,0,f,qw(b.cy+b.y11,b.cx+b.x11),qw(x.cy+x.y11,x.cx+x.x11),y),s.arc(x.cx,x.cy,B,qw(x.y11,x.x11),qw(x.y01,x.x01),!y))):s.arc(0,0,f,k,w,y):s.lineTo(N,D)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Vw/2;return[jw(r)*n,Uw(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Pw(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Pw(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Pw(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Pw(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Pw(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}var ok=Array.prototype.slice;function sk(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function lk(t){this._context=t}function ck(t){return new lk(t)}function hk(t){return t[0]}function uk(t){return t[1]}function fk(t,e){var n=Pw(!0),r=null,i=ck,a=null,o=Kw(s);function s(s){var l,c,h,u=(s=sk(s)).length,f=!1;for(null==r&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&n(c=s[l],l,s))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(c,l,s),+e(c,l,s));if(h)return a=null,h+""||null}return t="function"==typeof t?t:void 0===t?hk:Pw(t),e="function"==typeof e?e:void 0===e?uk:Pw(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:Pw(!!t),s):n},s.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),s):i},s.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),s):r},s}function dk(t,e,n){var r=null,i=Pw(!0),a=null,o=ck,s=null,l=Kw(c);function c(c){var h,u,f,d,p,g=(c=sk(c)).length,m=!1,y=new Array(g),b=new Array(g);for(null==a&&(s=o(p=l())),h=0;h<=g;++h){if(!(h<g&&i(d=c[h],h,c))===m)if(m=!m)u=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=h-1;f>=u;--f)s.point(y[f],b[f]);s.lineEnd(),s.areaEnd()}m&&(y[h]=+t(d,h,c),b[h]=+e(d,h,c),s.point(r?+r(d,h,c):y[h],n?+n(d,h,c):b[h]))}if(p)return s=null,p+""||null}function h(){return fk().defined(i).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?hk:Pw(+t),e="function"==typeof e?e:Pw(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?uk:Pw(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),r=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Pw(+t),c):r},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Pw(+t),c):n},c.lineX0=c.lineY0=function(){return h().x(t).y(e)},c.lineY1=function(){return h().x(t).y(n)},c.lineX1=function(){return h().x(r).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:Pw(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function pk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function gk(t){return t}function mk(){var t=gk,e=pk,n=null,r=Pw(0),i=Pw(Zw),a=Pw(0);function o(o){var s,l,c,h,u,f=(o=sk(o)).length,d=0,p=new Array(f),g=new Array(f),m=+r.apply(this,arguments),y=Math.min(Zw,Math.max(-Zw,i.apply(this,arguments)-m)),b=Math.min(Math.abs(y)/f,a.apply(this,arguments)),x=b*(y<0?-1:1);for(s=0;s<f;++s)(u=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=u);for(null!=e?p.sort(function(t,n){return e(g[t],g[n])}):null!=n&&p.sort(function(t,e){return n(o[t],o[e])}),s=0,c=d?(y-f*x)/d:0;s<f;++s,m=h)l=p[s],h=m+((u=g[l])>0?u*c:0)+x,g[l]={data:o[l],index:s,value:u,startAngle:m,endAngle:h,padAngle:b};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Pw(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Pw(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Pw(+t),o):a},o}lk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var yk=xk(ck);function bk(t){this._curve=t}function xk(t){function e(e){return new bk(t(e))}return e._curve=t,e}function _k(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(xk(t)):e()._curve},t}function vk(){return _k(fk().curve(yk))}function wk(){var t=dk().curve(yk),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return _k(n())},delete t.lineX0,t.lineEndAngle=function(){return _k(r())},delete t.lineX1,t.lineInnerRadius=function(){return _k(i())},delete t.lineY0,t.lineOuterRadius=function(){return _k(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(xk(t)):e()._curve},t}function kk(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}bk.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};class Ck{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}class Sk{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,e){if(t=+t,e=+e,0===this._point)this._point=1;else{const n=kk(this._x0,this._y0),r=kk(this._x0,this._y0=(this._y0+e)/2),i=kk(t,this._y0),a=kk(t,e);this._context.moveTo(...n),this._context.bezierCurveTo(...r,...i,...a)}this._x0=t,this._y0=e}}function Tk(t){return new Ck(t,!0)}function Mk(t){return new Ck(t,!1)}function Ak(t){return new Sk(t)}function Bk(t){return t.source}function Lk(t){return t.target}function Ek(t){let e=Bk,n=Lk,r=hk,i=uk,a=null,o=null,s=Kw(l);function l(){let l;const c=ok.call(arguments),h=e.apply(this,c),u=n.apply(this,c);if(null==a&&(o=t(l=s())),o.lineStart(),c[0]=h,o.point(+r.apply(this,c),+i.apply(this,c)),c[0]=u,o.point(+r.apply(this,c),+i.apply(this,c)),o.lineEnd(),l)return o=null,l+""||null}return l.source=function(t){return arguments.length?(e=t,l):e},l.target=function(t){return arguments.length?(n=t,l):n},l.x=function(t){return arguments.length?(r="function"==typeof t?t:Pw(+t),l):r},l.y=function(t){return arguments.length?(i="function"==typeof t?t:Pw(+t),l):i},l.context=function(e){return arguments.length?(null==e?a=o=null:o=t(a=e),l):a},l}function Fk(){return Ek(Tk)}function $k(){return Ek(Mk)}function Ok(){const t=Ek(Ak);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Nk=Yw(3),Dk={draw(t,e){const n=.59436*Yw(e+Hw(e/28,.75)),r=n/2,i=r*Nk;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},zk={draw(t,e){const n=Yw(e/Vw);t.moveTo(n,0),t.arc(0,0,n,0,Zw)}},Ik={draw(t,e){const n=Yw(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Pk=Yw(1/3),Rk=2*Pk,qk={draw(t,e){const n=Yw(e/Rk),r=n*Pk;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},jk={draw(t,e){const n=.62625*Yw(e);t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Wk={draw(t,e){const n=.87559*Yw(e-Hw(e/7,2));t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Hk={draw(t,e){const n=Yw(e),r=-n/2;t.rect(r,r,n,n)}},Uk={draw(t,e){const n=.4431*Yw(e);t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},Yk=Uw(Vw/10)/Uw(7*Vw/10),Gk=Uw(Zw/10)*Yk,Vk=-jw(Zw/10)*Yk,Xk={draw(t,e){const n=Yw(.8908130915292852*e),r=Gk*n,i=Vk*n;t.moveTo(0,-n),t.lineTo(r,i);for(let e=1;e<5;++e){const a=Zw*e/5,o=jw(a),s=Uw(a);t.lineTo(s*n,-o*n),t.lineTo(o*r-s*i,s*r+o*i)}t.closePath()}},Zk=Yw(3),Qk={draw(t,e){const n=-Yw(e/(3*Zk));t.moveTo(0,2*n),t.lineTo(-Zk*n,-n),t.lineTo(Zk*n,-n),t.closePath()}},Kk=Yw(3),Jk={draw(t,e){const n=.6824*Yw(e),r=n/2,i=n*Kk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},tC=-.5,eC=Yw(3)/2,nC=1/Yw(12),rC=3*(nC/2+1),iC={draw(t,e){const n=Yw(e/rC),r=n/2,i=n*nC,a=r,o=n*nC+n,s=-a,l=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(tC*r-eC*i,eC*r+tC*i),t.lineTo(tC*a-eC*o,eC*a+tC*o),t.lineTo(tC*s-eC*l,eC*s+tC*l),t.lineTo(tC*r+eC*i,tC*i-eC*r),t.lineTo(tC*a+eC*o,tC*o-eC*a),t.lineTo(tC*s+eC*l,tC*l-eC*s),t.closePath()}},aC={draw(t,e){const n=.6189*Yw(e-Hw(e/6,1.7));t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},oC=[zk,Ik,qk,Hk,Xk,Qk,iC],sC=[zk,Wk,aC,Jk,Dk,Uk,jk];function lC(t,e){let n=null,r=Kw(i);function i(){let i;if(n||(n=i=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return t="function"==typeof t?t:Pw(t||zk),e="function"==typeof e?e:Pw(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:Pw(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}function cC(){}function hC(t,e,n){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+n)/6)}function uC(t){this._context=t}function fC(t){return new uC(t)}function dC(t){this._context=t}function pC(t){return new dC(t)}function gC(t){this._context=t}function mC(t){return new gC(t)}function yC(t,e){this._basis=new uC(t),this._beta=e}uC.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:hC(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:hC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},dC.prototype={areaStart:cC,areaEnd:cC,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)}},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:hC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},gC.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||0!==this._line&&3===this._point)&&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 n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:hC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},yC.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*o),this._beta*e[l]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const bC=function t(e){function n(t){return 1===e?new uC(t):new yC(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function xC(t,e,n){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-n),t._x2,t._y2)}function _C(t,e){this._context=t,this._k=(1-e)/6}_C.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:xC(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:xC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vC=function t(e){function n(t){return new _C(t,e)}return n.tension=function(e){return t(+e)},n}(0);function wC(t,e){this._context=t,this._k=(1-e)/6}wC.prototype={areaStart:cC,areaEnd:cC,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)}},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:xC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kC=function t(e){function n(t){return new wC(t,e)}return n.tension=function(e){return t(+e)},n}(0);function CC(t,e){this._context=t,this._k=(1-e)/6}CC.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||0!==this._line&&3===this._point)&&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:xC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const SC=function t(e){function n(t){return new CC(t,e)}return n.tension=function(e){return t(+e)},n}(0);function TC(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Gw){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);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Gw){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);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function MC(t,e){this._context=t,this._alpha=e}MC.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:TC(this,t,e)}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}};const AC=function t(e){function n(t){return e?new MC(t,e):new _C(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function BC(t,e){this._context=t,this._alpha=e}BC.prototype={areaStart:cC,areaEnd:cC,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:TC(this,t,e)}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}};const LC=function t(e){function n(t){return e?new BC(t,e):new wC(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function EC(t,e){this._context=t,this._alpha=e}EC.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:TC(this,t,e)}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}};const FC=function t(e){function n(t){return e?new EC(t,e):new CC(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $C(t){this._context=t}function OC(t){return new $C(t)}function NC(t){return t<0?-1:1}function DC(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(NC(a)+NC(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function zC(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function IC(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function PC(t){this._context=t}function RC(t){this._context=new qC(t)}function qC(t){this._context=t}function jC(t){return new PC(t)}function WC(t){return new RC(t)}function HC(t){this._context=t}function UC(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function YC(t){return new HC(t)}function GC(t,e){this._context=t,this._t=e}function VC(t){return new GC(t,.5)}function XC(t){return new GC(t,0)}function ZC(t){return new GC(t,1)}function QC(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function KC(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function JC(t,e){return t[e]}function tS(t){const e=[];return e.key=t,e}function eS(){var t=Pw([]),e=KC,n=QC,r=JC;function i(i){var a,o,s=Array.from(t.apply(this,arguments),tS),l=s.length,c=-1;for(const t of i)for(a=0,++c;a<l;++a)(s[a][c]=[0,+r(t,s[a].key,c,i)]).data=t;for(a=0,o=sk(e(s));a<l;++a)s[o[a]].index=a;return n(s,o),s}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Pw(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Pw(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?KC:"function"==typeof t?t:Pw(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?QC:t,i):n},i}function nS(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}QC(t,e)}}function rS(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,l=0,c=t[e[0]].length;l<c;++l)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][l])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function iS(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}QC(t,e)}}function aS(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,l=0,c=0;s<i;++s){for(var h=t[e[s]],u=h[o][1]||0,f=(u-(h[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}l+=u,c+=f*u}n[o-1][1]+=n[o-1][0]=a,l&&(a-=c/l)}n[o-1][1]+=n[o-1][0]=a,QC(t,e)}}function oS(t){var e=t.map(sS);return KC(t).sort(function(t,n){return e[t]-e[n]})}function sS(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function lS(t){var e=t.map(cS);return KC(t).sort(function(t,n){return e[t]-e[n]})}function cS(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function hS(t){return lS(t).reverse()}function uS(t){var e,n,r=t.length,i=t.map(cS),a=oS(t),o=0,s=0,l=[],c=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)}function fS(t){return KC(t).reverse()}$C.prototype={areaStart:cC,areaEnd:cC,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))}},PC.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:IC(this,this._t0,zC(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+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,IC(this,zC(this,n=DC(this,t,e)),n);break;default:IC(this,this._t0,n=DC(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(RC.prototype=Object.create(PC.prototype)).point=function(t,e){PC.prototype.point.call(this,e,t)},qC.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,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},HC.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,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=UC(t),i=UC(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},GC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var dS="%Y-%m-%dT%H:%M:%S.%LZ",pS=Date.prototype.toISOString?function(t){return t.toISOString()}:xx(dS);const gS=pS;var mS=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:_x(dS);const yS=mS;function bS(t,e,n){var r=new li,i=e;return null==e?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(t,e,n){e=+e,n=null==n?oi():+n,r._restart(function a(o){o+=i,r._restart(a,i+=e,n),t(o)},e,n)},r.restart(t,e,n),r)}const xS=t=>()=>t;function _S(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function vS(t,e,n){this.k=t,this.x=e,this.y=n}vS.prototype={constructor:vS,scale:function(t){return 1===t?this:new vS(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new vS(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 wS=new vS(1,0,0);function kS(t){for(;!t.__zoom;)if(!(t=t.parentNode))return wS;return t.__zoom}function CS(t){t.stopImmediatePropagation()}function SS(t){t.preventDefault(),t.stopImmediatePropagation()}function TS(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function MS(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function AS(){return this.__zoom||wS}function BS(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function LS(){return navigator.maxTouchPoints||"ontouchstart"in this}function ES(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function FS(){var t,e,n,r=TS,i=MS,a=ES,o=BS,s=LS,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=xm,f=we("start","zoom","end"),d=0,p=10;function g(t){t.property("__zoom",AS).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",C).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new vS(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new vS(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,r){t.on("start.zoom",function(){_(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(r).end()}).tween("zoom",function(){var t=this,a=arguments,o=_(t,a).event(r),s=i.apply(t,a),l=null==n?b(s):"function"==typeof n?n.apply(t,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),h=t.__zoom,f="function"==typeof e?e.apply(t,a):e,d=u(h.invert(l).concat(c/h.k),f.invert(l).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=c/e[2];t=new vS(n,l[0]-e[0]*n,l[1]-e[1]*n)}o.zoom(null,t)}})}function _(t,e,n){return!n&&t.__zooming||new v(t,e)}function v(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function w(t,...e){if(r.apply(this,arguments)){var n=_(this,e).event(t),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,o.apply(this,arguments)))),h=Xr(t);if(n.wheel)n.mouse[0][0]===h[0]&&n.mouse[0][1]===h[1]||(n.mouse[1]=i.invert(n.mouse[0]=h)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[h,i.invert(h)],vi(this),n.start()}SS(t),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(y(m(i,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function k(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,o=_(this,e,!0).event(t),s=zn(t.view).on("mousemove.zoom",function(t){if(SS(t),!o.moved){var e=t.clientX-h,n=t.clientY-u;o.moved=e*e+n*n>d}o.event(t).zoom("mouse",a(y(o.that.__zoom,o.mouse[0]=Xr(t,i),o.mouse[1]),o.extent,c))},!0).on("mouseup.zoom",function(t){s.on("mousemove.zoom mouseup.zoom",null),Wn(t.view,o.moved),SS(t),o.event(t).end()},!0),l=Xr(t,i),h=t.clientX,u=t.clientY;jn(t.view),CS(t),o.mouse=[l,this.__zoom.invert(l)],vi(this),o.start()}}function C(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,o=Xr(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(o),l=n.k*(t.shiftKey?.5:2),u=a(y(m(n,l),o,s),i.apply(this,e),c);SS(t),h>0?zn(this).transition().duration(h).call(x,u,o,t):zn(this).call(g.transform,u,o,t)}}function S(n,...i){if(r.apply(this,arguments)){var a,o,s,l,c=n.touches,h=c.length,u=_(this,i,n.changedTouches.length===h).event(n);for(CS(n),o=0;o<h;++o)l=[l=Xr(s=c[o],this),this.__zoom.invert(l),s.identifier],u.touch0?u.touch1||u.touch0[2]===l[2]||(u.touch1=l,u.taps=0):(u.touch0=l,a=!0,u.taps=1+!!t);t&&(t=clearTimeout(t)),a&&(u.taps<2&&(e=l[0],t=setTimeout(function(){t=null},500)),vi(this),u.start())}}function T(t,...e){if(this.__zooming){var n,r,i,o,s=_(this,e).event(t),l=t.changedTouches,h=l.length;for(SS(t),n=0;n<h;++n)i=Xr(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var u=s.touch0[0],f=s.touch0[1],d=s.touch1[0],p=s.touch1[1],g=(g=d[0]-u[0])*g+(g=d[1]-u[1])*g,b=(b=p[0]-f[0])*b+(b=p[1]-f[1])*b;r=m(r,Math.sqrt(g/b)),i=[(u[0]+d[0])/2,(u[1]+d[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],o=s.touch0[1]}s.zoom("touch",a(y(r,i,o),s.extent,c))}}function M(t,...r){if(this.__zooming){var i,a,o=_(this,r).event(t),s=t.changedTouches,l=s.length;for(CS(t),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),i=0;i<l;++i)a=s[i],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=Xr(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<p)){var c=zn(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return g.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",AS),t!==i?x(t,e,n,r):i.interrupt().each(function(){_(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},g.scaleBy=function(t,e,n,r){g.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},n,r)},g.scaleTo=function(t,e,n,r){g.transform(t,function(){var t=i.apply(this,arguments),r=this.__zoom,o=null==n?b(t):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(o),l="function"==typeof e?e.apply(this,arguments):e;return a(y(m(r,l),o,s),t,c)},n,r)},g.translateBy=function(t,e,n,r){g.transform(t,function(){return a(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),c)},null,r)},g.translateTo=function(t,e,n,r,o){g.transform(t,function(){var t=i.apply(this,arguments),o=this.__zoom,s=null==r?b(t):"function"==typeof r?r.apply(this,arguments):r;return a(wS.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)},r,o)},v.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=zn(this.that).datum();f.call(t,this.that,new _S(t,{sourceEvent:this.sourceEvent,target:g,type:t,transform:this.that.__zoom,dispatch:f}),e)}},g.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:xS(+t),g):o},g.filter=function(t){return arguments.length?(r="function"==typeof t?t:xS(!!t),g):r},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:xS(!!t),g):s},g.extent=function(t){return arguments.length?(i="function"==typeof t?t:xS([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):i},g.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],g):[l[0],l[1]]},g.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],g):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},g.constrain=function(t){return arguments.length?(a=t,g):a},g.duration=function(t){return arguments.length?(h=+t,g):h},g.interpolate=function(t){return arguments.length?(u=t,g):u},g.on=function(){var t=f.on.apply(f,arguments);return t===f?g:t},g.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,g):Math.sqrt(d)},g.tapDistance=function(t){return arguments.length?(p=+t,g):p},g}kS.prototype=vS.prototype},97519(t,e,n){n.r(e),n.d(e,{default:()=>nt});const{entries:r,setPrototypeOf:i,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:c,create:h}=Object,{apply:u,construct:f}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),c||(c=function(t){return t}),u||(u=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return t.apply(e,r)}),f||(f=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const d=A(Array.prototype.forEach),p=A(Array.prototype.lastIndexOf),g=A(Array.prototype.pop),m=A(Array.prototype.push),y=A(Array.prototype.splice),b=A(String.prototype.toLowerCase),x=A(String.prototype.toString),_=A(String.prototype.match),v=A(String.prototype.replace),w=A(String.prototype.indexOf),k=A(String.prototype.trim),C=A(Object.prototype.hasOwnProperty),S=A(RegExp.prototype.test),T=(M=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return f(M,e)});var M;function A(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(t,e,r)}}function B(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;i&&i(t,null);let r=e.length;for(;r--;){let i=e[r];if("string"==typeof i){const t=n(i);t!==i&&(a(e)||(e[r]=t),i=t)}t[i]=!0}return t}function L(t){for(let e=0;e<t.length;e++)C(t,e)||(t[e]=null);return t}function E(t){const e=h(null);for(const[n,i]of r(t))C(t,n)&&(Array.isArray(i)?e[n]=L(i):i&&"object"==typeof i&&i.constructor===Object?e[n]=E(i):e[n]=i);return e}function F(t,e){for(;null!==t;){const n=s(t,e);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}t=o(t)}return function(){return null}}const $=l(["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","search","section","select","shadow","slot","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"]),O=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N=l(["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"]),D=l(["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"]),z=l(["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"]),I=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=l(["#text"]),R=l(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),q=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","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"]),j=l(["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"]),W=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),U=c(/<%[\w\W]*|[\w\W]*%>/gm),Y=c(/\$\{[\w\W]*/gm),G=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),V=c(/^aria-[\-\w]+$/),X=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=c(/^(?:\w+script|data):/i),Q=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:V,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:J,DATA_ATTR:G,DOCTYPE_NAME:K,ERB_EXPR:U,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:Z,MUSTACHE_EXPR:H,TMPLIT_EXPR:Y});const et=function(){return"undefined"==typeof window?null:window};var nt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const n=e=>t(e);if(n.version="3.3.0",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let{document:i}=e;const a=i,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:u,Element:f,NodeFilter:M,NamedNodeMap:A=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:L,DOMParser:H,trustedTypes:U}=e,Y=f.prototype,G=F(Y,"cloneNode"),V=F(Y,"remove"),Z=F(Y,"nextSibling"),Q=F(Y,"childNodes"),J=F(Y,"parentNode");if("function"==typeof c){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let nt,rt="";const{implementation:it,createNodeIterator:at,createDocumentFragment:ot,getElementsByTagName:st}=i,{importNode:lt}=a;let ct={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof J&&it&&void 0!==it.createHTMLDocument;const{MUSTACHE_EXPR:ht,ERB_EXPR:ut,TMPLIT_EXPR:ft,DATA_ATTR:dt,ARIA_ATTR:pt,IS_SCRIPT_OR_DATA:gt,ATTR_WHITESPACE:mt,CUSTOM_ELEMENT:yt}=tt;let{IS_ALLOWED_URI:bt}=tt,xt=null;const _t=B({},[...$,...O,...N,...z,...P]);let vt=null;const wt=B({},[...R,...q,...j,...W]);let kt=Object.seal(h(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}})),Ct=null,St=null;const Tt=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Mt=!0,At=!0,Bt=!1,Lt=!0,Et=!1,Ft=!0,$t=!1,Ot=!1,Nt=!1,Dt=!1,zt=!1,It=!1,Pt=!0,Rt=!1,qt=!0,jt=!1,Wt={},Ht=null;const Ut=B({},["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"]);let Yt=null;const Gt=B({},["audio","video","img","source","image","track"]);let Vt=null;const Xt=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",Kt="http://www.w3.org/1999/xhtml";let Jt=Kt,te=!1,ee=null;const ne=B({},[Zt,Qt,Kt],x);let re=B({},["mi","mo","mn","ms","mtext"]),ie=B({},["annotation-xml"]);const ae=B({},["title","style","font","a","script"]);let oe=null;const se=["application/xhtml+xml","text/html"];let le=null,ce=null;const he=i.createElement("form"),ue=function(t){return t instanceof RegExp||t instanceof Function},fe=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ce||ce!==t){if(t&&"object"==typeof t||(t={}),t=E(t),oe=-1===se.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,le="application/xhtml+xml"===oe?x:b,xt=C(t,"ALLOWED_TAGS")?B({},t.ALLOWED_TAGS,le):_t,vt=C(t,"ALLOWED_ATTR")?B({},t.ALLOWED_ATTR,le):wt,ee=C(t,"ALLOWED_NAMESPACES")?B({},t.ALLOWED_NAMESPACES,x):ne,Vt=C(t,"ADD_URI_SAFE_ATTR")?B(E(Xt),t.ADD_URI_SAFE_ATTR,le):Xt,Yt=C(t,"ADD_DATA_URI_TAGS")?B(E(Gt),t.ADD_DATA_URI_TAGS,le):Gt,Ht=C(t,"FORBID_CONTENTS")?B({},t.FORBID_CONTENTS,le):Ut,Ct=C(t,"FORBID_TAGS")?B({},t.FORBID_TAGS,le):E({}),St=C(t,"FORBID_ATTR")?B({},t.FORBID_ATTR,le):E({}),Wt=!!C(t,"USE_PROFILES")&&t.USE_PROFILES,Mt=!1!==t.ALLOW_ARIA_ATTR,At=!1!==t.ALLOW_DATA_ATTR,Bt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Et=t.SAFE_FOR_TEMPLATES||!1,Ft=!1!==t.SAFE_FOR_XML,$t=t.WHOLE_DOCUMENT||!1,Dt=t.RETURN_DOM||!1,zt=t.RETURN_DOM_FRAGMENT||!1,It=t.RETURN_TRUSTED_TYPE||!1,Nt=t.FORCE_BODY||!1,Pt=!1!==t.SANITIZE_DOM,Rt=t.SANITIZE_NAMED_PROPS||!1,qt=!1!==t.KEEP_CONTENT,jt=t.IN_PLACE||!1,bt=t.ALLOWED_URI_REGEXP||X,Jt=t.NAMESPACE||Kt,re=t.MATHML_TEXT_INTEGRATION_POINTS||re,ie=t.HTML_INTEGRATION_POINTS||ie,kt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ue(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(kt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ue(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(kt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(kt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Et&&(At=!1),zt&&(Dt=!0),Wt&&(xt=B({},P),vt=[],!0===Wt.html&&(B(xt,$),B(vt,R)),!0===Wt.svg&&(B(xt,O),B(vt,q),B(vt,W)),!0===Wt.svgFilters&&(B(xt,N),B(vt,q),B(vt,W)),!0===Wt.mathMl&&(B(xt,z),B(vt,j),B(vt,W))),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Tt.tagCheck=t.ADD_TAGS:(xt===_t&&(xt=E(xt)),B(xt,t.ADD_TAGS,le))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Tt.attributeCheck=t.ADD_ATTR:(vt===wt&&(vt=E(vt)),B(vt,t.ADD_ATTR,le))),t.ADD_URI_SAFE_ATTR&&B(Vt,t.ADD_URI_SAFE_ATTR,le),t.FORBID_CONTENTS&&(Ht===Ut&&(Ht=E(Ht)),B(Ht,t.FORBID_CONTENTS,le)),qt&&(xt["#text"]=!0),$t&&B(xt,["html","head","body"]),xt.table&&(B(xt,["tbody"]),delete Ct.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');nt=t.TRUSTED_TYPES_POLICY,rt=nt.createHTML("")}else void 0===nt&&(nt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(U,o)),null!==nt&&"string"==typeof rt&&(rt=nt.createHTML(""));l&&l(t),ce=t}},de=B({},[...O,...N,...D]),pe=B({},[...z,...I]),ge=function(t){m(n.removed,{element:t});try{J(t).removeChild(t)}catch(e){V(t)}},me=function(t,e){try{m(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){m(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Dt||zt)try{ge(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ye=function(t){let e=null,n=null;if(Nt)t="<remove></remove>"+t;else{const e=_(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===oe&&Jt===Kt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=nt?nt.createHTML(t):t;if(Jt===Kt)try{e=(new H).parseFromString(r,oe)}catch(t){}if(!e||!e.documentElement){e=it.createDocument(Jt,"template",null);try{e.documentElement.innerHTML=te?rt:r}catch(t){}}const a=e.body||e.documentElement;return t&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),Jt===Kt?st.call(e,$t?"html":"body")[0]:$t?e.documentElement:a},be=function(t){return at.call(t.ownerDocument||t,t,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT|M.SHOW_PROCESSING_INSTRUCTION|M.SHOW_CDATA_SECTION,null)},xe=function(t){return t instanceof L&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof A)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},_e=function(t){return"function"==typeof u&&t instanceof u};function ve(t,e,r){d(t,t=>{t.call(n,e,r,ce)})}const we=function(t){let e=null;if(ve(ct.beforeSanitizeElements,t,null),xe(t))return ge(t),!0;const r=le(t.nodeName);if(ve(ct.uponSanitizeElement,t,{tagName:r,allowedTags:xt}),Ft&&t.hasChildNodes()&&!_e(t.firstElementChild)&&S(/<[/\w!]/g,t.innerHTML)&&S(/<[/\w!]/g,t.textContent))return ge(t),!0;if(7===t.nodeType)return ge(t),!0;if(Ft&&8===t.nodeType&&S(/<[/\w]/g,t.data))return ge(t),!0;if(!(Tt.tagCheck instanceof Function&&Tt.tagCheck(r))&&(!xt[r]||Ct[r])){if(!Ct[r]&&Ce(r)){if(kt.tagNameCheck instanceof RegExp&&S(kt.tagNameCheck,r))return!1;if(kt.tagNameCheck instanceof Function&&kt.tagNameCheck(r))return!1}if(qt&&!Ht[r]){const e=J(t)||t.parentNode,n=Q(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r){const i=G(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,Z(t))}}return ge(t),!0}return t instanceof f&&!function(t){let e=J(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});const n=b(t.tagName),r=b(e.tagName);return!!ee[t.namespaceURI]&&(t.namespaceURI===Qt?e.namespaceURI===Kt?"svg"===n:e.namespaceURI===Zt?"svg"===n&&("annotation-xml"===r||re[r]):Boolean(de[n]):t.namespaceURI===Zt?e.namespaceURI===Kt?"math"===n:e.namespaceURI===Qt?"math"===n&&ie[r]:Boolean(pe[n]):t.namespaceURI===Kt?!(e.namespaceURI===Qt&&!ie[r])&&!(e.namespaceURI===Zt&&!re[r])&&!pe[n]&&(ae[n]||!de[n]):!("application/xhtml+xml"!==oe||!ee[t.namespaceURI]))}(t)?(ge(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!S(/<\/no(script|embed|frames)/i,t.innerHTML)?(Et&&3===t.nodeType&&(e=t.textContent,d([ht,ut,ft],t=>{e=v(e,t," ")}),t.textContent!==e&&(m(n.removed,{element:t.cloneNode()}),t.textContent=e)),ve(ct.afterSanitizeElements,t,null),!1):(ge(t),!0)},ke=function(t,e,n){if(Pt&&("id"===e||"name"===e)&&(n in i||n in he))return!1;if(At&&!St[e]&&S(dt,e));else if(Mt&&S(pt,e));else if(Tt.attributeCheck instanceof Function&&Tt.attributeCheck(e,t));else if(!vt[e]||St[e]){if(!(Ce(t)&&(kt.tagNameCheck instanceof RegExp&&S(kt.tagNameCheck,t)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(t))&&(kt.attributeNameCheck instanceof RegExp&&S(kt.attributeNameCheck,e)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck(e,t))||"is"===e&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&S(kt.tagNameCheck,n)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(n))))return!1}else if(Vt[e]);else if(S(bt,v(n,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==w(n,"data:")||!Yt[t])if(Bt&&!S(gt,v(n,mt,"")));else if(n)return!1;return!0},Ce=function(t){return"annotation-xml"!==t&&_(t,yt)},Se=function(t){ve(ct.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||xe(t))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt,forceKeepAttr:void 0};let i=e.length;for(;i--;){const a=e[i],{name:o,namespaceURI:s,value:l}=a,c=le(o),h=l;let u="value"===o?h:k(h);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,ve(ct.uponSanitizeAttribute,t,r),u=r.attrValue,!Rt||"id"!==c&&"name"!==c||(me(o,t),u="user-content-"+u),Ft&&S(/((--!?|])>)|<\/(style|title|textarea)/i,u)){me(o,t);continue}if("attributename"===c&&_(u,"href")){me(o,t);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){me(o,t);continue}if(!Lt&&S(/\/>/i,u)){me(o,t);continue}Et&&d([ht,ut,ft],t=>{u=v(u,t," ")});const f=le(t.nodeName);if(ke(f,c,u)){if(nt&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(s);else switch(U.getAttributeType(f,c)){case"TrustedHTML":u=nt.createHTML(u);break;case"TrustedScriptURL":u=nt.createScriptURL(u)}if(u!==h)try{s?t.setAttributeNS(s,o,u):t.setAttribute(o,u),xe(t)?ge(t):g(n.removed)}catch(e){me(o,t)}}else me(o,t)}ve(ct.afterSanitizeAttributes,t,null)},Te=function t(e){let n=null;const r=be(e);for(ve(ct.beforeSanitizeShadowDOM,e,null);n=r.nextNode();)ve(ct.uponSanitizeShadowNode,n,null),we(n),Se(n),n.content instanceof s&&t(n.content);ve(ct.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,o=null,l=null;if(te=!t,te&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_e(t)){if("function"!=typeof t.toString)throw T("toString is not a function");if("string"!=typeof(t=t.toString()))throw T("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Ot||fe(e),n.removed=[],"string"==typeof t&&(jt=!1),jt){if(t.nodeName){const e=le(t.nodeName);if(!xt[e]||Ct[e])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)r=ye("\x3c!----\x3e"),i=r.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Dt&&!Et&&!$t&&-1===t.indexOf("<"))return nt&&It?nt.createHTML(t):t;if(r=ye(t),!r)return Dt?null:It?rt:""}r&&Nt&&ge(r.firstChild);const c=be(jt?t:r);for(;o=c.nextNode();)we(o),Se(o),o.content instanceof s&&Te(o.content);if(jt)return t;if(Dt){if(zt)for(l=ot.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(vt.shadowroot||vt.shadowrootmode)&&(l=lt.call(a,l,!0)),l}let h=$t?r.outerHTML:r.innerHTML;return $t&&xt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&S(K,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),Et&&d([ht,ut,ft],t=>{h=v(h,t," ")}),nt&&It?nt.createHTML(h):h},n.setConfig=function(){fe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ot=!0},n.clearConfig=function(){ce=null,Ot=!1},n.isValidAttribute=function(t,e,n){ce||fe({});const r=le(t),i=le(e);return ke(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&m(ct[t],e)},n.removeHook=function(t,e){if(void 0!==e){const n=p(ct[t],e);return-1===n?void 0:y(ct[t],n,1)[0]}return g(ct[t])},n.removeHooks=function(t){ct[t]=[]},n.removeAllHooks=function(){ct={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}()},63545(t,e,n){n.d(e,{default:()=>o}),n.r(e);var r=n(45718),i=n(64607);const a=class{constructor(){this.type=i.TYPE.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=i.TYPE.ALL}is(t){return this.type===t}},o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.TYPE.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:i}=t;void 0===e&&(t.h=r.default.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=r.default.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=r.default.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:i}=t;void 0===e&&(t.r=r.default.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=r.default.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=r.default.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(i.TYPE.HSL)||void 0===e?(this._ensureHSL(),r.default.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(i.TYPE.HSL)||void 0===e?(this._ensureHSL(),r.default.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(i.TYPE.HSL)||void 0===e?(this._ensureHSL(),r.default.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(i.TYPE.RGB)||void 0===e?(this._ensureRGB(),r.default.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(i.TYPE.RGB)||void 0===e?(this._ensureRGB(),r.default.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(i.TYPE.RGB)||void 0===e?(this._ensureRGB(),r.default.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},11028(t,e,n){n.d(e,{default:()=>g}),n.r(e);var r=n(63545),i=n(64607);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const n=e[1],i=parseInt(n,16),o=n.length,s=o%4==0,l=o>4,c=l?1:17,h=l?8:4,u=s?0:-1,f=l?255:15;return r.default.set({r:(i>>h*(u+3)&f)*c,g:(i>>h*(u+2)&f)*c,b:(i>>h*(u+1)&f)*c,a:s?(i&f)*c/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a}=t;return a<1?`#${i.DEC2HEX[Math.round(e)]}${i.DEC2HEX[Math.round(n)]}${i.DEC2HEX[Math.round(r)]}${i.DEC2HEX[Math.round(255*a)]}`:`#${i.DEC2HEX[Math.round(e)]}${i.DEC2HEX[Math.round(n)]}${i.DEC2HEX[Math.round(r)]}`}},o=a;var s=n(45718);const l={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=>{const e=t.match(l.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return s.default.channel.clamp.h(.9*parseFloat(t));case"rad":return s.default.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.default.channel.clamp.h(360*parseFloat(t))}}return s.default.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(l.re);if(!n)return;const[,i,a,o,c,h]=n;return r.default.set({h:l._hue2deg(i),s:s.default.channel.clamp.s(parseFloat(a)),l:s.default.channel.clamp.l(parseFloat(o)),a:c?s.default.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${s.default.lang.round(e)}, ${s.default.lang.round(n)}%, ${s.default.lang.round(r)}%, ${i})`:`hsl(${s.default.lang.round(e)}, ${s.default.lang.round(n)}%, ${s.default.lang.round(r)}%)`}},c=l,h={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();const e=h.colors[t];if(e)return o.parse(e)},stringify:t=>{const e=o.stringify(t);for(const t in h.colors)if(h.colors[t]===e)return t}},u=h,f={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=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(f.re);if(!n)return;const[,i,a,o,l,c,h,u,d]=n;return r.default.set({r:s.default.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:s.default.channel.clamp.g(l?2.55*parseFloat(o):parseFloat(o)),b:s.default.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?s.default.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${s.default.lang.round(e)}, ${s.default.lang.round(n)}, ${s.default.lang.round(r)}, ${s.default.lang.round(i)})`:`rgb(${s.default.lang.round(e)}, ${s.default.lang.round(n)}, ${s.default.lang.round(r)})`}},d=f,p={format:{keyword:h,hex:o,rgb:f,rgba:f,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=o.parse(t)||d.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(i.TYPE.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?d.stringify(t):o.stringify(t)},g=p},64607(t,e,n){n.r(e),n.d(e,{DEC2HEX:()=>i,TYPE:()=>a});var r=n(45718);const i={};for(let t=0;t<=255;t++)i[t]=r.default.unit.dec2hex(t);const a={ALL:0,RGB:1,HSL:2}},85944(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(45718),i=n(11028);const a=(t,e,n)=>{const a=i.default.parse(t),o=a[e],s=r.default.channel.clamp[e](o+n);return o!==s&&(a[e]=s),i.default.stringify(a)}},36135(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(45718),i=n(11028);const a=(t,e)=>{const n=i.default.parse(t);for(const t in e)n[t]=r.default.channel.clamp[t](e[t]);return i.default.stringify(n)}},87708(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(85944);const i=(t,e)=>(0,r.default)(t,"l",-e)},1942(t,e,n){n.d(e,{default:()=>o}),n.r(e);var r=n(45718),i=n(11028);const a=t=>(t=>{const{r:e,g:n,b:a}=i.default.parse(t),o=.2126*r.default.channel.toLinear(e)+.7152*r.default.channel.toLinear(n)+.0722*r.default.channel.toLinear(a);return r.default.lang.round(o)})(t)>=.5,o=t=>!a(t)},47964(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(85944);const i=(t,e)=>(0,r.default)(t,"l",e)},62209(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(45718),i=n(63545),a=n(11028),o=n(36135);const s=(t,e,n=0,s=1)=>{if("number"!=typeof t)return(0,o.default)(t,{a:e});const l=i.default.set({r:r.default.channel.clamp.r(t),g:r.default.channel.clamp.g(e),b:r.default.channel.clamp.b(n),a:r.default.channel.clamp.a(s)});return a.default.stringify(l)}},45718(t,e,n){n.d(e,{default:()=>i}),n.r(e);const r={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=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},i)=>{if(!e)return 2.55*n;t/=360,e/=100;const a=(n/=100)<.5?n*(1+e):n+e-n*e,o=2*n-a;switch(i){case"r":return 255*r.hue2rgb(o,a,t+1/3);case"g":return 255*r.hue2rgb(o,a,t);case"b":return 255*r.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),o=(i+a)/2;if("l"===r)return 100*o;if(i===a)return 0;const s=i-a;if("s"===r)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-n)/s+(e<n?6:0));case e:return 60*((n-t)/s+2);case n:return 60*((t-e)/s+4);default:return-1}}},i={channel:r,lang:{clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},6096(t,e,n){n.d(e,{default:()=>s}),n.r(e);var r=n(26979);const i=function(t,e){for(var n=t.length;n--;)if((0,r.default)(t[n][0],e))return n;return-1};var a=Array.prototype.splice;function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}o.prototype.clear=function(){this.__data__=[],this.size=0},o.prototype.delete=function(t){var e=this.__data__,n=i(e,t);return!(n<0||(n==e.length-1?e.pop():a.call(e,n,1),--this.size,0))},o.prototype.get=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]},o.prototype.has=function(t){return i(this.__data__,t)>-1},o.prototype.set=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const s=o},25436(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(50123),i=n(39600);const a=(0,r.default)(i.default,"Map")},13269(t,e,n){n.d(e,{default:()=>f}),n.r(e);const r=(0,n(50123).default)(Object,"create");var i=Object.prototype.hasOwnProperty;var a=Object.prototype.hasOwnProperty;function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}o.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},o.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},o.prototype.get=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0},o.prototype.has=function(t){var e=this.__data__;return r?void 0!==e[t]:a.call(e,t)},o.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};const s=o;var l=n(6096),c=n(25436);const h=function(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(c.default||l.default),string:new s}},u.prototype.delete=function(t){var e=h(this,t).delete(t);return this.size-=e?1:0,e},u.prototype.get=function(t){return h(this,t).get(t)},u.prototype.has=function(t){return h(this,t).has(t)},u.prototype.set=function(t,e){var n=h(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const f=u},28574(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(50123),i=n(39600);const a=(0,r.default)(i.default,"Set")},36781(t,e,n){n.d(e,{default:()=>s}),n.r(e);var r=n(6096);var i=n(25436),a=n(13269);function o(t){var e=this.__data__=new r.default(t);this.size=e.size}o.prototype.clear=function(){this.__data__=new r.default,this.size=0},o.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},o.prototype.get=function(t){return this.__data__.get(t)},o.prototype.has=function(t){return this.__data__.has(t)},o.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.default){var o=n.__data__;if(!i.default||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a.default(o)}return n.set(t,e),this.size=n.size,this};const s=o},83516(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=n(39600).default.Symbol},97913(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=n(39600).default.Uint8Array},77252(t,e,n){n.d(e,{default:()=>c}),n.r(e);var r=n(88748),i=n(96956),a=n(34517),o=n(85378),s=n(92888),l=Object.prototype.hasOwnProperty;const c=function(t,e){var n=(0,i.default)(t),c=!n&&(0,r.default)(t),h=!n&&!c&&(0,a.default)(t),u=!n&&!c&&!h&&(0,s.default)(t),f=n||c||h||u,d=f?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],p=d.length;for(var g in t)!e&&!l.call(t,g)||f&&("length"==g||h&&("offset"==g||"parent"==g)||u&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||(0,o.default)(g,p))||d.push(g);return d}},76124(t,e,n){n.r(e),n.d(e,{default:()=>o});var r=n(99271),i=n(26979),a=Object.prototype.hasOwnProperty;const o=function(t,e,n){var o=t[e];a.call(t,e)&&(0,i.default)(o,n)&&(void 0!==n||e in t)||(0,r.default)(t,e,n)}},99271(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(61758);const i=function(t,e,n){"__proto__"==e&&r.default?(0,r.default)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},2369(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(97942),i=Object.create;const a=function(){function t(){}return function(e){if(!(0,r.default)(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}()},22857(t,e,n){n.d(e,{default:()=>r}),n.r(e);const r=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[++r];if(!1===e(i[s],s,i))break}return t}},4044(t,e,n){n.d(e,{default:()=>h}),n.r(e);var r=n(83516),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r.default?r.default.toStringTag:void 0;var l=Object.prototype.toString;var c=r.default?r.default.toStringTag:void 0;const h=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}(t):function(t){return l.call(t)}(t)}},68282(t,e,n){n.d(e,{default:()=>o}),n.r(e);var r=n(71140);const i=(0,n(67244).default)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const o=function(t){if(!(0,r.default)(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},50695(t,e,n){n.r(e),n.d(e,{default:()=>o});var r=n(14151),i=n(16264),a=n(97649);const o=function(t,e){return(0,a.default)((0,i.default)(t,e,r.default),t+"")}},58126(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return function(e){return t(e)}}},88724(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(97913);const i=function(t){var e=new t.constructor(t.byteLength);return new r.default(e).set(new r.default(t)),e}},521(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(39600),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i?r.default.Buffer:void 0,s=o?o.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},65246(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(88724);const i=function(t,e){var n=e?(0,r.default)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},80084(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},28078(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(76124),i=n(99271);const a=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,l=e.length;++s<l;){var c=e[s],h=a?a(n[c],t[c],c,n,t):void 0;void 0===h&&(h=t[c]),o?(0,i.default)(n,c,h):(0,r.default)(n,c,h)}return n}},98050(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(50695),i=n(6473);const a=function(t){return(0,r.default)(function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&(0,i.default)(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var l=n[r];l&&t(e,l,r,o)}return e})}},61758(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(50123);const i=function(){try{var t=(0,r.default)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},36713(t,e,n){n.r(e),n.d(e,{default:()=>r});const r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},50123(t,e,n){n.d(e,{default:()=>m}),n.r(e);var r=n(50405);const i=n(39600).default["__core-js_shared__"];var a,o=(a=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";var s=n(97942),l=n(1548),c=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,f=h.toString,d=u.hasOwnProperty,p=RegExp("^"+f.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(t){return!(!(0,s.default)(t)||(e=t,o&&o in e))&&((0,r.default)(t)?p:c).test((0,l.default)(t));var e},m=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return g(n)?n:void 0}},12497(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=(0,n(67244).default)(Object.getPrototypeOf,Object)},97342(t,e,n){n.d(e,{default:()=>k}),n.r(e);var r=n(50123),i=n(39600);const a=(0,r.default)(i.default,"DataView");var o=n(25436);const s=(0,r.default)(i.default,"Promise");var l=n(28574);const c=(0,r.default)(i.default,"WeakMap");var h=n(4044),u=n(1548),f="[object Map]",d="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.default)(a),b=(0,u.default)(o.default),x=(0,u.default)(s),_=(0,u.default)(l.default),v=(0,u.default)(c),w=h.default;(a&&w(new a(new ArrayBuffer(1)))!=m||o.default&&w(new o.default)!=f||s&&w(s.resolve())!=d||l.default&&w(new l.default)!=p||c&&w(new c)!=g)&&(w=function(t){var e=(0,h.default)(t),n="[object Object]"==e?t.constructor:void 0,r=n?(0,u.default)(n):"";if(r)switch(r){case y:return m;case b:return f;case x:return d;case _:return p;case v:return g}return e});const k=w},90190(t,e,n){n.r(e),n.d(e,{default:()=>o});var r=n(2369),i=n(12497),a=n(71140);const o=function(t){return"function"!=typeof t.constructor||(0,a.default)(t)?{}:(0,r.default)((0,i.default)(t))}},85378(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},6473(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(26979),i=n(31475),a=n(85378),o=n(97942);const s=function(t,e,n){if(!(0,o.default)(n))return!1;var s=typeof e;return!!("number"==s?(0,i.default)(n)&&(0,a.default)(e,n.length):"string"==s&&e in n)&&(0,r.default)(n[e],t)}},71140(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=Object.prototype;const i=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},10248(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(36713),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i&&r.default.process;const s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}()},67244(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t,e){return function(n){return t(e(n))}}},16264(t,e,n){n.d(e,{default:()=>i}),n.r(e);var r=Math.max;const i=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,o=r(i.length-e,0),s=Array(o);++a<o;)s[a]=i[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=i[a];return l[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,l)}}},39600(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(36713),i="object"==typeof self&&self&&self.Object===Object&&self;const a=r.default||i||Function("return this")()},97649(t,e,n){n.d(e,{default:()=>l}),n.r(e);var r=n(47845),i=n(61758),a=n(14151);const o=i.default?function(t,e){return(0,i.default)(t,"toString",{configurable:!0,enumerable:!1,value:(0,r.default)(e),writable:!0})}:a.default;var s=Date.now;const l=(c=o,h=0,u=0,function(){var t=s(),e=16-(t-u);if(u=t,e>0){if(++h>=800)return arguments[0]}else h=0;return c.apply(void 0,arguments)});var c,h,u},1548(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=Function.prototype.toString;const i=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},47845(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return function(){return t}}},26979(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},14151(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return t}},88748(t,e,n){n.d(e,{default:()=>h}),n.r(e);var r=n(4044),i=n(47313);const a=function(t){return(0,i.default)(t)&&"[object Arguments]"==(0,r.default)(t)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable,c=a(function(){return arguments}())?a:function(t){return(0,i.default)(t)&&s.call(t,"callee")&&!l.call(t,"callee")};const h=c},96956(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=Array.isArray},31475(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(50405),i=n(47893);const a=function(t){return null!=t&&(0,i.default)(t.length)&&!(0,r.default)(t)}},40376(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(31475),i=n(47313);const a=function(t){return(0,i.default)(t)&&(0,r.default)(t)}},34517(t,e,n){n.d(e,{default:()=>s}),n.r(e);var r=n(39600);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i?r.default.Buffer:void 0;const s=(o?o.isBuffer:void 0)||function(){return!1}},75992(t,e,n){n.r(e),n.d(e,{default:()=>f});var r=n(68282),i=n(97342),a=n(88748),o=n(96956),s=n(31475),l=n(34517),c=n(71140),h=n(92888),u=Object.prototype.hasOwnProperty;const f=function(t){if(null==t)return!0;if((0,s.default)(t)&&((0,o.default)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.default)(t)||(0,h.default)(t)||(0,a.default)(t)))return!t.length;var e=(0,i.default)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.default)(t))return!(0,r.default)(t).length;for(var n in t)if(u.call(t,n))return!1;return!0}},50405(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(4044),i=n(97942);const a=function(t){if(!(0,i.default)(t))return!1;var e=(0,r.default)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},47893(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},97942(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},47313(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},92888(t,e,n){n.d(e,{default:()=>h}),n.r(e);var r=n(4044),i=n(47893),a=n(47313),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var s=n(58126),l=n(10248),c=l.default&&l.default.isTypedArray;const h=c?(0,s.default)(c):function(t){return(0,a.default)(t)&&(0,i.default)(t.length)&&!!o[(0,r.default)(t)]}},81594(t,e,n){n.d(e,{default:()=>c}),n.r(e);var r=n(77252),i=n(97942),a=n(71140);var o=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,i.default)(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=(0,a.default)(t),n=[];for(var r in t)("constructor"!=r||!e&&o.call(t,r))&&n.push(r);return n};var l=n(31475);const c=function(t){return(0,l.default)(t)?(0,r.default)(t,!0):s(t)}},39645(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(13269);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r.default),n}i.Cache=r.default;const a=i},22937(t,e,n){n.d(e,{default:()=>F}),n.r(e);var r=n(36781),i=n(99271),a=n(26979);const o=function(t,e,n){(void 0!==n&&!(0,a.default)(t[e],n)||void 0===n&&!(e in t))&&(0,i.default)(t,e,n)};var s=n(22857),l=n(521),c=n(65246),h=n(80084),u=n(90190),f=n(88748),d=n(96956),p=n(40376),g=n(34517),m=n(50405),y=n(97942),b=n(4044),x=n(12497),_=n(47313),v=Function.prototype,w=Object.prototype,k=v.toString,C=w.hasOwnProperty,S=k.call(Object);var T=n(92888);const M=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var A=n(28078),B=n(81594);const L=function(t,e,n,r,i,a,s){var v,w=M(t,n),L=M(e,n),E=s.get(L);if(E)o(t,n,E);else{var F=a?a(w,L,n+"",t,e,s):void 0,$=void 0===F;if($){var O=(0,d.default)(L),N=!O&&(0,g.default)(L),D=!O&&!N&&(0,T.default)(L);F=L,O||N||D?(0,d.default)(w)?F=w:(0,p.default)(w)?F=(0,h.default)(w):N?($=!1,F=(0,l.default)(L,!0)):D?($=!1,F=(0,c.default)(L,!0)):F=[]:function(t){if(!(0,_.default)(t)||"[object Object]"!=(0,b.default)(t))return!1;var e=(0,x.default)(t);if(null===e)return!0;var n=C.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&k.call(n)==S}(L)||(0,f.default)(L)?(F=w,(0,f.default)(w)?(v=w,F=(0,A.default)(v,(0,B.default)(v))):(0,y.default)(w)&&!(0,m.default)(w)||(F=(0,u.default)(L))):$=!1}$&&(s.set(L,F),i(F,L,r,a,s),s.delete(L)),o(t,n,F)}},E=function t(e,n,i,a,l){e!==n&&(0,s.default)(n,function(s,c){if(l||(l=new r.default),(0,y.default)(s))L(e,n,c,i,t,a,l);else{var h=a?a(M(e,c),s,c+"",e,n,l):void 0;void 0===h&&(h=s),o(e,c,h)}},B.default)},F=(0,n(98050).default)(function(t,e,n){E(t,e,n)})},37710(t,e,n){n.r(e),n.d(e,{package_default:()=>r});var r={name:"mermaid",version:"11.12.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}},54141(t,e,n){n.d(e,{UnknownDiagramError:()=>y,addDirective:()=>rt,assignWithDepth_default:()=>C,calculateMathMLDimensions:()=>$t,clear:()=>Zt,commonDb_exports:()=>Ut,common_default:()=>Dt,configureSvgSize:()=>Pt,defaultConfig:()=>U,defaultConfig2:()=>se,defaultConfig_default:()=>j,detectType:()=>x,detectors:()=>b,directiveRegex:()=>g,evaluate:()=>kt,frontMatterRegex:()=>p,getAccDescription:()=>te,getAccTitle:()=>Kt,getConfig:()=>et,getConfig2:()=>ae,getDiagram:()=>de,getDiagramLoader:()=>w,getDiagramTitle:()=>ne,getSiteConfig:()=>J,getThemeVariables:()=>$,getUrl:()=>wt,getUserDefinedConfig:()=>ct,hasKatex:()=>Ft,lineBreakRegex:()=>ht,parseGenericTypes:()=>Tt,registerDiagram:()=>fe,registerLazyLoadedDiagrams:()=>_,renderKatexSanitized:()=>Nt,reset:()=>it,sanitizeDirective:()=>W,sanitizeText:()=>mt,sanitizeText2:()=>le,saveConfigFromInitialize:()=>Q,setAccDescription:()=>Jt,setAccTitle:()=>Qt,setConfig:()=>tt,setConfig2:()=>oe,setDiagramTitle:()=>ee,setSiteConfig:()=>Z,setupGraphViewbox:()=>Rt,setupGraphViewbox2:()=>ce,styles_default:()=>Ht,themes_default:()=>z,updateSiteConfig:()=>K}),n.r(e);var r=n(60162),i=n(11028),a=n(36135);const o=(t,e)=>{const n=i.default.parse(t),r={};for(const t in e)e[t]&&(r[t]=n[t]+e[t]);return(0,a.default)(t,r)};var s=n(62209);const l=(t,e=100)=>{const n=i.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,((t,e,n=50)=>{const{r,g:a,b:o,a:l}=i.default.parse(t),{r:c,g:h,b:u,a:f}=i.default.parse(e),d=n/100,p=2*d-1,g=l-f,m=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,y=1-m,b=r*m+c*y,x=a*m+h*y,_=o*m+u*y,v=l*d+f*(1-d);return(0,s.default)(b,x,_,v)})(n,t,e)};var c,h=n(87708),u=n(47964),f=n(1942),d=n(97519),p=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,g=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,m=/\s*%%.*\n/gm,y=class extends Error{static{(0,r.__name)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},b={},x=(0,r.__name)(function(t,e){t=t.replace(p,"").replace(g,"").replace(m,"\n");for(const[n,{detector:r}]of Object.entries(b))if(r(t,e))return n;throw new y(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),_=(0,r.__name)((...t)=>{for(const{id:e,detector:n,loader:r}of t)v(e,n,r)},"registerLazyLoadedDiagrams"),v=(0,r.__name)((t,e,n)=>{b[t]&&r.log.warn(`Detector with key ${t} already exists. Overwriting.`),b[t]={detector:e,loader:n},r.log.debug(`Detector with key ${t} added${n?" with loader":""}`)},"addDetector"),w=(0,r.__name)(t=>b[t].loader,"getDiagramLoader"),k=(0,r.__name)((t,e,{depth:n=2,clobber:r=!1}={})=>{const i={depth:n,clobber:r};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>k(t,e,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||n<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(i=>{"object"!=typeof e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(r||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=k(t[i],e[i],{depth:n-1,clobber:r}))}),t)},"assignWithDepth"),C=k,S="#ffffff",T="#f2f2f2",M=(0,r.__name)((t,e)=>o(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),A=class{static{(0,r.__name)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(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?(0,h.default)(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||this.actorBorder,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||(0,h.default)(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||(0,u.default)(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.vertLineColor=this.vertLineColor||"navy",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.darkMode?(this.rowOdd=this.rowOdd||(0,h.default)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,h.default)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.default)(this.mainBkg,5)),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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.default)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||o(this.primaryColor,{h:64}),this.fillType3=this.fillType3||o(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||o(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||o(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||o(this.primaryColor,{h:128}),this.fillType7=this.fillType7||o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-10}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)):(this.git0=(0,h.default)(this.git0,25),this.git1=(0,h.default)(this.git1,25),this.git2=(0,h.default)(this.git2,25),this.git3=(0,h.default)(this.git3,25),this.git4=(0,h.default)(this.git4,25),this.git5=(0,h.default)(this.git5,25),this.git6=(0,h.default)(this.git6,25),this.git7=(0,h.default)(this.git7,25)),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B=(0,r.__name)(t=>{const e=new A;return e.calculate(t),e},"getThemeVariables"),L=class{static{(0,r.__name)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.default)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=l(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(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=(0,u.default)(l("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.default)(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=(0,h.default)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,h.default)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.default)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.default)(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.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,h.default)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,u.default)(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=(0,u.default)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,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=(0,u.default)(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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,u.default)(this.secondaryColor,20),this.git1=(0,u.default)(this.pie2||this.secondaryColor,20),this.git2=(0,u.default)(this.pie3||this.tertiaryColor,20),this.git3=(0,u.default)(this.pie4||o(this.primaryColor,{h:-30}),20),this.git4=(0,u.default)(this.pie5||o(this.primaryColor,{h:-60}),20),this.git5=(0,u.default)(this.pie6||o(this.primaryColor,{h:-90}),10),this.git6=(0,u.default)(this.pie7||o(this.primaryColor,{h:60}),10),this.git7=(0,u.default)(this.pie8||o(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,u.default)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,u.default)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},E=(0,r.__name)(t=>{const e=new L;return e.calculate(t),e},"getThemeVariables"),F=class{static{(0,r.__name)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(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="rgba(232,232,232, 0.8)",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="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="#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.vertLineColor="calculated",this.sectionBkgColor=(0,s.default)(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.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.default)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.default)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.default)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||l(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||l(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,u.default)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.default)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.default)(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||o(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||o(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)):(this.git0=(0,h.default)(this.git0,25),this.git1=(0,h.default)(this.git1,25),this.git2=(0,h.default)(this.git2,25),this.git3=(0,h.default)(this.git3,25),this.git4=(0,h.default)(this.git4,25),this.git5=(0,h.default)(this.git5,25),this.git6=(0,h.default)(this.git6,25),this.git7=(0,h.default)(this.git7,25)),this.gitInv0=this.gitInv0||(0,h.default)(l(this.git0),25),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},$=(0,r.__name)(t=>{const e=new F;return e.calculate(t),e},"getThemeVariables"),O=class{static{(0,r.__name)(this,"Theme")}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=(0,u.default)("#cde498",10),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(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="calculated",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.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,h.default)(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.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.default)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.default)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.default)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.default)(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||o(this.primaryColor,{l:-30}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)):(this.git0=(0,h.default)(this.git0,25),this.git1=(0,h.default)(this.git1,25),this.git2=(0,h.default)(this.git2,25),this.git3=(0,h.default)(this.git3,25),this.git4=(0,h.default)(this.git4,25),this.git5=(0,h.default)(this.git5,25),this.git6=(0,h.default)(this.git6,25),this.git7=(0,h.default)(this.git7,25)),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},N=(0,r.__name)(t=>{const e=new O;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,r.__name)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.default)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(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=this.actorBorder,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.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,u.default)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.default)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,u.default)(this.contrast,30),this.sectionBkgColor2=(0,u.default)(this.contrast,30),this.taskBorderColor=(0,h.default)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,u.default)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,h.default)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,h.default)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||o(this.primaryColor,{h:-30}),this.git4=this.pie5||o(this.primaryColor,{h:-60}),this.git5=this.pie6||o(this.primaryColor,{h:-90}),this.git6=this.pie7||o(this.primaryColor,{h:60}),this.git7=this.pie8||o(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},z={base:{getThemeVariables:B},dark:{getThemeVariables:E},default:{getThemeVariables:$},forest:{getThemeVariables:N},neutral:{getThemeVariables:(0,r.__name)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables")}},I={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,inheritDir:!1},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,maxLabelWidth:360,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"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!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,nodeSpacing:140,rankSpacing:80,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,showDataLabel:!1,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,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},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},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",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","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},P={...I,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:z.default.getThemeVariables(),sequence:{...I.sequence,messageFont:(0,r.__name)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,r.__name)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,r.__name)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...I.gantt,tickInterval:void 0,useWidth:void 0},c4:{...I.c4,useWidth:void 0,personFont:(0,r.__name)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...I.flowchart,inheritDir:!1},external_personFont:(0,r.__name)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,r.__name)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,r.__name)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,r.__name)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,r.__name)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,r.__name)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,r.__name)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,r.__name)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,r.__name)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,r.__name)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,r.__name)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,r.__name)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,r.__name)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,r.__name)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,r.__name)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,r.__name)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,r.__name)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,r.__name)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,r.__name)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,r.__name)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,r.__name)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...I.pie,useWidth:984},xyChart:{...I.xyChart,useWidth:void 0},requirement:{...I.requirement,useWidth:void 0},packet:{...I.packet},radar:{...I.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},R=(0,r.__name)((t,e="")=>Object.keys(t).reduce((n,r)=>Array.isArray(t[r])?n:"object"==typeof t[r]&&null!==t[r]?[...n,e+r,...R(t[r],"")]:[...n,e+r],[]),"keyify"),q=new Set(R(P,"")),j=P,W=(0,r.__name)(t=>{if(r.log.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>W(t));else{for(const e of Object.keys(t)){if(r.log.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!q.has(e)||null==t[e]){r.log.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){r.log.debug("sanitizing object",e),W(t[e]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const i of n)e.includes(i)&&(r.log.debug("sanitizing css option",e),t[e]=H(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const n=t.themeVariables[e];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}r.log.debug("After sanitization",t)}},"sanitizeDirective"),H=(0,r.__name)(t=>{let e=0,n=0;for(const r of t){if(e<n)return"{ /* ERROR: Unbalanced CSS */ }";"{"===r?e++:"}"===r&&n++}return e!==n?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),U=Object.freeze(j),Y=C({},U),G=[],V=C({},U),X=(0,r.__name)((t,e)=>{let n=C({},t),r={};for(const t of e)nt(t),r=C(r,t);if(n=C(n,r),r.theme&&r.theme in z){const t=C({},c),e=C(t.themeVariables||{},r.themeVariables);n.theme&&n.theme in z&&(n.themeVariables=z[n.theme].getThemeVariables(e))}return lt(V=n),V},"updateCurrentConfig"),Z=(0,r.__name)(t=>(Y=C({},U),Y=C(Y,t),t.theme&&z[t.theme]&&(Y.themeVariables=z[t.theme].getThemeVariables(t.themeVariables)),X(Y,G),Y),"setSiteConfig"),Q=(0,r.__name)(t=>{c=C({},t)},"saveConfigFromInitialize"),K=(0,r.__name)(t=>(Y=C(Y,t),X(Y,G),Y),"updateSiteConfig"),J=(0,r.__name)(()=>C({},Y),"getSiteConfig"),tt=(0,r.__name)(t=>(lt(t),C(V,t),et()),"setConfig"),et=(0,r.__name)(()=>C({},V),"getConfig"),nt=(0,r.__name)(t=>{t&&(["secure",...Y.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(r.log.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&nt(t[e])}))},"sanitize"),rt=(0,r.__name)(t=>{W(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),G.push(t),X(Y,G)},"addDirective"),it=(0,r.__name)((t=Y)=>{X(t,G=[])},"reset"),at={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ot={},st=(0,r.__name)(t=>{ot[t]||(r.log.warn(at[t]),ot[t]=!0)},"issueWarning"),lt=(0,r.__name)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&st("LAZY_LOAD_DEPRECATED")},"checkConfig"),ct=(0,r.__name)(()=>{let t={};c&&(t=C(t,c));for(const e of G)t=C(t,e);return t},"getUserDefinedConfig"),ht=/<br\s*\/?>/gi,ut=(0,r.__name)(t=>t?vt(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ft=(()=>{let t=!1;return()=>{t||(dt(),t=!0)}})();function dt(){const t="data-temp-href-target";d.default.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),d.default.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,r.__name)(dt,"setupDompurifyHooks");var pt=(0,r.__name)(t=>(ft(),d.default.sanitize(t)),"removeScript"),gt=(0,r.__name)((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const n=e.securityLevel;"antiscript"===n||"strict"===n?t=pt(t):"loose"!==n&&(t=(t=(t=vt(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=_t(t))}return t},"sanitizeMore"),mt=(0,r.__name)((t,e)=>t?t=e.dompurifyConfig?d.default.sanitize(gt(t,e),e.dompurifyConfig).toString():d.default.sanitize(gt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),yt=(0,r.__name)((t,e)=>"string"==typeof t?mt(t,e):t.flat().map(t=>mt(t,e)),"sanitizeTextOrArray"),bt=(0,r.__name)(t=>ht.test(t),"hasBreaks"),xt=(0,r.__name)(t=>t.split(ht),"splitBreaks"),_t=(0,r.__name)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),vt=(0,r.__name)(t=>t.replace(ht,"#br#"),"breakToPlaceholder"),wt=(0,r.__name)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),kt=(0,r.__name)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),Ct=(0,r.__name)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),St=(0,r.__name)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),Tt=(0,r.__name)(function(t){const e=t.split(/(,)/),n=[];for(let t=0;t<e.length;t++){let r=e[t];if(","===r&&t>0&&t+1<e.length){const i=e[t-1],a=e[t+1];At(i,a)&&(r=i+","+a,t++,n.pop())}n.push(Bt(r))}return n.join("")},"parseGenericTypes"),Mt=(0,r.__name)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),At=(0,r.__name)((t,e)=>{const n=Mt(t,"~"),r=Mt(e,"~");return 1===n&&1===r},"shouldCombineSets"),Bt=(0,r.__name)(t=>{const e=Mt(t,"~");let n=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),n=!0);const r=[...t];let i=r.indexOf("~"),a=r.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)r[i]="<",r[a]=">",i=r.indexOf("~"),a=r.lastIndexOf("~");return n&&r.unshift("~"),r.join("")},"processSet"),Lt=(0,r.__name)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Et=/\$\$(.*)\$\$/g,Ft=(0,r.__name)(t=>(t.match(Et)?.length??0)>0,"hasKatex"),$t=(0,r.__name)(async(t,e)=>{const n=document.createElement("div");n.innerHTML=await Nt(t,e),n.id="katex-temp",n.style.visibility="hidden",n.style.position="absolute",n.style.top="0";const r=document.querySelector("body");r?.insertAdjacentElement("beforeend",n);const i={width:n.clientWidth,height:n.clientHeight};return n.remove(),i},"calculateMathMLDimensions"),Ot=(0,r.__name)(async(t,e)=>{if(!Ft(t))return t;if(!(Lt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Et,"MathML is unsupported in this environment.");{const{default:r}=await n.e(9263).then(n.bind(n,9263)),i=e.forceLegacyMathML||!Lt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ht).map(t=>Ft(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Et,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Nt=(0,r.__name)(async(t,e)=>mt(await Ot(t,e),e),"renderKatexSanitized"),Dt={getRows:ut,sanitizeText:mt,sanitizeTextOrArray:yt,hasBreaks:bt,splitBreaks:xt,lineBreakRegex:ht,removeScript:pt,getUrl:wt,evaluate:kt,getMax:Ct,getMin:St},zt=(0,r.__name)(function(t,e){for(let n of e)t.attr(n[0],n[1])},"d3Attrs"),It=(0,r.__name)(function(t,e,n){let r=new Map;return n?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r},"calculateSvgSizeAttrs"),Pt=(0,r.__name)(function(t,e,n,r){const i=It(e,n,r);zt(t,i)},"configureSvgSize"),Rt=(0,r.__name)(function(t,e,n,i){const a=e.node().getBBox(),o=a.width,s=a.height;r.log.info(`SVG bounds: ${o}x${s}`,a);let l=0,c=0;r.log.info(`Graph bounds: ${l}x${c}`,t),l=o+2*n,c=s+2*n,r.log.info(`Calculated bounds: ${l}x${c}`),Pt(e,c,l,i);const h=`${a.x-n} ${a.y-n} ${a.width+2*n} ${a.height+2*n}`;e.attr("viewBox",h)},"setupGraphViewbox"),qt={},jt=(0,r.__name)((t,e,n)=>{let i="";return t in qt&&qt[t]?i=qt[t](n):r.log.warn(`No theme found for ${t}`),` & {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n fill: ${n.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${n.errorBkgColor};\n }\n & .error-text {\n fill: ${n.errorTextColor};\n stroke: ${n.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${n.lineColor};\n stroke: ${n.lineColor};\n }\n & .marker.cross {\n stroke: ${n.lineColor};\n }\n\n & svg {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`},"getStyles"),Wt=(0,r.__name)((t,e)=>{void 0!==e&&(qt[t]=e)},"addStylesForDiagram"),Ht=jt,Ut={};(0,r.__export)(Ut,{clear:()=>Zt,getAccDescription:()=>te,getAccTitle:()=>Kt,getDiagramTitle:()=>ne,setAccDescription:()=>Jt,setAccTitle:()=>Qt,setDiagramTitle:()=>ee});var Yt="",Gt="",Vt="",Xt=(0,r.__name)(t=>mt(t,et()),"sanitizeText"),Zt=(0,r.__name)(()=>{Yt="",Vt="",Gt=""},"clear"),Qt=(0,r.__name)(t=>{Yt=Xt(t).replace(/^\s+/g,"")},"setAccTitle"),Kt=(0,r.__name)(()=>Yt,"getAccTitle"),Jt=(0,r.__name)(t=>{Vt=Xt(t).replace(/\n\s+/g,"\n")},"setAccDescription"),te=(0,r.__name)(()=>Vt,"getAccDescription"),ee=(0,r.__name)(t=>{Gt=Xt(t)},"setDiagramTitle"),ne=(0,r.__name)(()=>Gt,"getDiagramTitle"),re=r.log,ie=r.setLogLevel,ae=et,oe=tt,se=U,le=(0,r.__name)(t=>mt(t,ae()),"sanitizeText"),ce=Rt,he=(0,r.__name)(()=>Ut,"getCommonDb"),ue={},fe=(0,r.__name)((t,e,n)=>{ue[t]&&re.warn(`Diagram with id ${t} already registered. Overwriting.`),ue[t]=e,n&&v(t,n),Wt(t,e.styles),e.injectUtils?.(re,ie,ae,le,ce,he(),()=>{})},"registerDiagram"),de=(0,r.__name)(t=>{if(t in ue)return ue[t];throw new pe(t)},"getDiagram"),pe=class extends Error{static{(0,r.__name)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},60162(t,e,n){n.r(e),n.d(e,{__export:()=>o,__name:()=>a,log:()=>l,setLogLevel:()=>c});var r=n(23464),i=Object.defineProperty,a=(t,e)=>i(t,"name",{value:e,configurable:!0}),o=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},c=a(function(t="fatal"){let e=s.fatal;"string"==typeof t?t.toLowerCase()in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,h("FATAL"),"color: orange"):console.log.bind(console,"",h("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,h("ERROR"),"color: orange"):console.log.bind(console,"",h("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,h("WARN"),"color: orange"):console.log.bind(console,"",h("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,h("INFO"),"color: lightblue"):console.log.bind(console,"",h("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,h("DEBUG"),"color: lightgreen"):console.log.bind(console,"",h("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,h("TRACE"),"color: lightgreen"):console.log.bind(console,"",h("TRACE")))},"setLogLevel"),h=a(t=>`%c${r().format("ss.SSS")} : ${t} : `,"format")},96540(t,e,n){n.r(e),n.d(e,{compileStyles:()=>o,isLabelStyle:()=>l,solidStateFill:()=>a,styles2String:()=>c,userNodeOverrides:()=>h});var r=n(54141),i=n(60162),a=(0,i.__name)(t=>{const{handDrawnSeed:e}=(0,r.getConfig2)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),o=(0,i.__name)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,i.__name)(t=>{const e=new Map;return t.forEach(t=>{const[n,r]=t.split(":");e.set(n.trim(),r?.trim())}),e},"styles2Map"),l=(0,i.__name)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,i.__name)(t=>{const{stylesArray:e}=o(t),n=[],r=[],i=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?n.push(t.join(":")+" !important"):(r.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:n.join(";"),nodeStyles:r.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),h=(0,i.__name)((t,e)=>{const{themeVariables:n,handDrawnSeed:i}=(0,r.getConfig2)(),{nodeBorder:a,mainBkg:s}=n,{stylesMap:l}=o(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:i,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,i.__name)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},70998(t,e,n){n.r(e),n.d(e,{getSubGraphTitleMargins:()=>r});var r=(0,n(60162).__name)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,n=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:e+n}},"getSubGraphTitleMargins")},92329(t,e,n){n.r(e),n.d(e,{selectSvgElement:()=>o});var r=n(54141),i=n(60162),a=n(79806),o=(0,i.__name)(t=>{const{securityLevel:e}=(0,r.getConfig2)();let n=(0,a.select)("body");if("sandbox"===e){const e=(0,a.select)(`#i${t}`),r=e.node()?.contentDocument??document;n=(0,a.select)(r.body)}return n.select(`#${t}`)},"selectSvgElement")},51437(t,e,n){n.r(e),n.d(e,{getLineFunctionsWithOffset:()=>l,markerOffsets:()=>i,markerOffsets2:()=>a});var r=n(60162),i={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},a={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function o(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=s(t),e=s(e);const[n,r]=[t.x,t.y],[i,a]=[e.x,e.y],o=i-n,l=a-r;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}(0,r.__name)(o,"calculateDeltaAndAngle");var s=(0,r.__name)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),l=(0,r.__name)(t=>({x:(0,r.__name)(function(e,n,r){let a=0;const l=s(r[0]).x<s(r[r.length-1]).x?"left":"right";if(0===n&&Object.hasOwn(i,t.arrowTypeStart)){const{angle:e,deltaX:n}=o(r[0],r[1]);a=i[t.arrowTypeStart]*Math.cos(e)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaX:n}=o(r[r.length-1],r[r.length-2]);a=i[t.arrowTypeEnd]*Math.cos(e)*(n>=0?1:-1)}const c=Math.abs(s(e).x-s(r[r.length-1]).x),h=Math.abs(s(e).y-s(r[r.length-1]).y),u=Math.abs(s(e).x-s(r[0]).x),f=Math.abs(s(e).y-s(r[0]).y),d=i[t.arrowTypeStart],p=i[t.arrowTypeEnd];if(c<p&&c>0&&h<p){let t=p+1-c;t*="right"===l?-1:1,a-=t}if(u<d&&u>0&&f<d){let t=d+1-u;t*="right"===l?-1:1,a+=t}return s(e).x+a},"x"),y:(0,r.__name)(function(e,n,r){let a=0;const l=s(r[0]).y<s(r[r.length-1]).y?"down":"up";if(0===n&&Object.hasOwn(i,t.arrowTypeStart)){const{angle:e,deltaY:n}=o(r[0],r[1]);a=i[t.arrowTypeStart]*Math.abs(Math.sin(e))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaY:n}=o(r[r.length-1],r[r.length-2]);a=i[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(n>=0?1:-1)}const c=Math.abs(s(e).y-s(r[r.length-1]).y),h=Math.abs(s(e).x-s(r[r.length-1]).x),u=Math.abs(s(e).y-s(r[0]).y),f=Math.abs(s(e).x-s(r[0]).x),d=i[t.arrowTypeStart],p=i[t.arrowTypeEnd];if(c<p&&c>0&&h<p){let t=p+1-c;t*="up"===l?-1:1,a-=t}if(u<d&&u>0&&f<d){let t=d+1-u;t*="up"===l?-1:1,a+=t}return s(e).y+a},"y")}),"getLineFunctionsWithOffset")},67099(t,e,n){n.d(e,{computeDimensionOfText:()=>ee,createText:()=>ae,getIconSVG:()=>jt,registerIconPacks:()=>Pt,replaceIconSubstring:()=>ie,unknownIcon:()=>Dt}),n.r(e);var r=n(82029),i=n(54141),a=n(60162);const o=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...s,...l}),h=Object.freeze({...c,body:"",hidden:!1});function u(t,e){const n=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}(t,e);for(const r in h)r in l?r in t&&!(r in n)&&(n[r]=l[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function f(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let a={};function o(t){a=u(r[t]||i[t],a)}return o(e),n.forEach(o),u(t,a)}const d=Object.freeze({width:null,height:null}),p=Object.freeze({...d,...l}),g=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const r=t.split(g);if(null===r||!r.length)return t;const i=[];let a=r.shift(),o=m.test(a);for(;;){if(o){const t=parseFloat(a);isNaN(t)?i.push(a):i.push(Math.ceil(t*e*n)/n)}else i.push(a);if(a=r.shift(),void 0===a)return i.join("");o=!o}}const b=/\sid="(\S+)"/g,x="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let _=0;var v=n(79806);var w={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function k(t){w=t}var C={exec:()=>null};function S(t,e=""){let n="string"==typeof t?t:t.source,r={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(M.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var T=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),M={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,B=/(?:[*+-]|\d{1,9}[.)])/,L=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,E=S(L).replace(/bull/g,B).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),F=S(L).replace(/bull/g,B).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,O=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,N=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",O).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),D=S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,B).getRegex(),z="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",I=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",I).replace("tag",z).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R=S($).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z).getRegex(),q={blockquote:S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",R).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:N,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:A,html:P,lheading:E,list:D,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:R,table:C,text:/^[^\n]+/},j=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z).getRegex(),W={...q,lheading:F,table:j,paragraph:S($).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",j).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z).getRegex()},H={...q,html:S("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",I).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:C,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S($).replace("hr",A).replace("heading"," *#{1,6} *[^\n]").replace("lheading",E).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},U=/^( {2,}|\\)\n(?!\s*$)/,Y=/[\p{P}\p{S}]/u,G=/[\s\p{P}\p{S}]/u,V=/[^\s\p{P}\p{S}]/u,X=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,G).getRegex(),Z=/(?!~)[\p{P}\p{S}]/u,Q=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",T?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),K=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,J=S(K,"u").replace(/punct/g,Y).getRegex(),tt=S(K,"u").replace(/punct/g,Z).getRegex(),et="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nt=S(et,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,G).replace(/punct/g,Y).getRegex(),rt=S(et,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Z).getRegex(),it=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,G).replace(/punct/g,Y).getRegex(),at=S(/\\(punct)/,"gu").replace(/punct/g,Y).getRegex(),ot=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),st=S(I).replace("(?:--\x3e|$)","--\x3e").getRegex(),lt=S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",st).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ct=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ht=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ct).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ut=S(/^!?\[(label)\]\[(ref)\]/).replace("label",ct).replace("ref",O).getRegex(),ft=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",O).getRegex(),dt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pt={_backpedal:C,anyPunctuation:at,autolink:ot,blockSkip:Q,br:U,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:C,emStrongLDelim:J,emStrongRDelimAst:nt,emStrongRDelimUnd:it,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ht,nolink:ft,punctuation:X,reflink:ut,reflinkSearch:S("reflink|nolink(?!\\()","g").replace("reflink",ut).replace("nolink",ft).getRegex(),tag:lt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:C},gt={...pt,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",ct).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ct).getRegex()},mt={...pt,emStrongRDelimAst:rt,emStrongLDelim:tt,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dt).getRegex()},yt={...mt,br:S(U).replace("{2,}","*").getRegex(),text:S(mt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bt={normal:q,gfm:W,pedantic:H},xt={normal:pt,gfm:mt,breaks:yt,pedantic:gt},_t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vt=t=>_t[t];function wt(t,e){if(e){if(M.escapeTest.test(t))return t.replace(M.escapeReplace,vt)}else if(M.escapeTestNoEncode.test(t))return t.replace(M.escapeReplaceNoEncode,vt);return t}function kt(t){try{t=encodeURI(t).replace(M.percentDecode,"%")}catch{return null}return t}function Ct(t,e){let n=t.replace(M.findPipe,(t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(M.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(M.slashPipe,"|");return n}function St(t,e,n){let r=t.length;if(0===r)return"";let i=0;for(;i<r;){let a=t.charAt(r-i-1);if(a!==e||n){if(a===e||!n)break;i++}else i++}return t.slice(0,r-i)}function Tt(t,e,n,r,i){let a=e.href,o=e.title||null,s=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}var Mt=class{options;rules;lexer;constructor(t){this.options=t||w}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:St(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],n=function(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(null===r)return e;let i=r[1];return e.split("\n").map(t=>{let e=t.match(n.other.beginningSpace);if(null===e)return t;let[r]=e;return r.length>=i.length?t.slice(i.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=St(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:St(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=St(e[0],"\n").split("\n"),n="",r="",i=[];for(;t.length>0;){let e,a=!1,o=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))o.push(t[e]),a=!0;else{if(a)break;o.push(t[e])}t=t.slice(e);let s=o.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${s}`:s,r=r?`${r}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;let h=i.at(-1);if("code"===h?.type)break;if("blockquote"===h?.type){let e=h,a=e.raw+"\n"+t.join("\n"),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-e.raw.length)+o.raw,r=r.substring(0,r.length-e.text.length)+o.text;break}if("list"===h?.type){let e=h,a=e.raw+"\n"+t.join("\n"),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-h.raw.length)+o.raw,r=r.substring(0,r.length-e.raw.length)+o.raw,t=a.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let a=this.rules.other.listItemRegex(n),o=!1;for(;t;){let n=!1,r="",s="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,s=l.slice(u),u+=e[1].length),h&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){let e=this.rules.other.nextBulletRegex(u),n=this.rules.other.hrRegex(u),i=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),o=this.rules.other.htmlBeginRegex(u);for(;t;){let f,d=t.split("\n",1)[0];if(c=d,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),i.test(c)||a.test(c)||o.test(c)||e.test(c)||n.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=u||!c.trim())s+="\n"+f.slice(u);else{if(h||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||a.test(l)||n.test(l))break;s+="\n"+c}!h&&!c.trim()&&(h=!0),r+=d+"\n",t=t.substring(d.length+1),l=f.slice(u)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f,d=null;this.options.gfm&&(d=this.rules.other.listIsTask.exec(s),d&&(f="[ ] "!==d[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!d,checked:f,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++)if(this.lexer.state.top=!1,i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]),!i.loose){let e=i.items[t].tokens.filter(t=>"space"===t.type),n=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));i.loose=n}if(i.loose)for(let t=0;t<i.items.length;t++)i.items[t].loose=!0;return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Ct(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let t of r)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<n.length;t++)a.header.push({text:n[t],tokens:this.lexer.inline(n[t]),header:!0,align:a.align[t]});for(let t of i)a.rows.push(Ct(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=St(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let n=0;for(let r=0;r<t.length;r++)if("\\"===t[r])r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),Tt(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return Tt(n,t,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,i,a=[...r[0]].length-1,o=a,s=0,l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(r=l.exec(e));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){o+=i;continue}if((r[5]||r[6])&&a%3&&!((a+i)%3)){s+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+s);let e=[...r[0]][0].length,l=t.slice(0,a+r.index+e+i);if(Math.min(a,i)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let r;do{r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(r!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},At=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||w,this.options.tokenizer=this.options.tokenizer||new Mt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:M,block:bt.normal,inline:xt.normal};this.options.pedantic?(e.block=bt.pedantic,e.inline=xt.pedantic):this.options.gfm&&(e.block=bt.gfm,this.options.breaks?e.inline=xt.breaks:e.inline=xt.gfm),this.tokenizer.rules=e}static get rules(){return{block:bt,inline:xt}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(M.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){for(this.options.pedantic&&(t=t.replace(M.tabCharGlobal," ").replace(M.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let n=e.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},e.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let e,n=1/0,r=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},r),"number"==typeof e&&e>=0&&(n=Math.min(n,e))}),n<1/0&&n>=0&&(i=t.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=e.at(-1);n&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+r.raw,a.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(r),n=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let n=e.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,r=t,i=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(r));)t.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(r));)n=i[2]?i[2].length:0,r=r.slice(0,i.index+n)+"["+"a".repeat(i[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,o="";for(;t;){let n;if(a||(o=""),a=!1,this.options.extensions?.inline?.some(r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))continue;if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length);let r=e.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,r,o)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}let i=t;if(this.options.extensions?.startInline){let e,n=1/0,r=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},r),"number"==typeof e&&e>=0&&(n=Math.min(n,e))}),n<1/0&&n>=0&&(i=t.substring(0,n+1))}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0;let r=e.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Bt=class{options;parser;constructor(t){this.options=t||w}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(M.notSpaceStart)?.[0],i=t.replace(M.endingNewline,"")+"\n";return r?'<pre><code class="language-'+wt(r)+'">'+(n?i:wt(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:wt(i,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,n=t.start,r="";for(let e=0;e<t.items.length;e++){let n=t.items[e];r+=this.listitem(n)}let i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+wt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",n="";for(let e=0;e<t.header.length;e++)n+=this.tablecell(t.header[e]);e+=this.tablerow({text:n});let r="";for(let e=0;e<t.rows.length;e++){let i=t.rows[e];n="";for(let t=0;t<i.length;t++)n+=this.tablecell(i[t]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+r+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${wt(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),i=kt(t);if(null===i)return r;let a='<a href="'+(t=i)+'"';return e&&(a+=' title="'+wt(e)+'"'),a+=">"+r+"</a>",a}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=kt(t);if(null===i)return wt(n);let a=`<img src="${t=i}" alt="${n}"`;return e&&(a+=` title="${wt(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:wt(t.text)}},Lt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Et=class t{options;renderer;textRenderer;constructor(t){this.options=t||w,this.options.renderer=this.options.renderer||new Bt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Lt}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(t,e=!0){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let t=i,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){n+=e||"";continue}}let a=i;switch(a.type){case"space":n+=this.renderer.space(a);continue;case"hr":n+=this.renderer.hr(a);continue;case"heading":n+=this.renderer.heading(a);continue;case"code":n+=this.renderer.code(a);continue;case"table":n+=this.renderer.table(a);continue;case"blockquote":n+=this.renderer.blockquote(a);continue;case"list":n+=this.renderer.list(a);continue;case"html":n+=this.renderer.html(a);continue;case"def":n+=this.renderer.def(a);continue;case"paragraph":n+=this.renderer.paragraph(a);continue;case"text":{let i=a,o=this.renderer.text(i);for(;r+1<t.length&&"text"===t[r+1].type;)i=t[++r],o+="\n"+this.renderer.text(i);n+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}parseInline(t,e=this.renderer){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let t=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=t||"";continue}}let a=i;switch(a.type){case"escape":case"text":n+=e.text(a);break;case"html":n+=e.html(a);break;case"link":n+=e.link(a);break;case"image":n+=e.image(a);break;case"strong":n+=e.strong(a);break;case"em":n+=e.em(a);break;case"codespan":n+=e.codespan(a);break;case"br":n+=e.br(a);break;case"del":n+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}},Ft=class{options;block;constructor(t){this.options=t||w}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?At.lex:At.lexInline}provideParser(){return this.block?Et.parse:Et.parseInline}},$t=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Et;Renderer=Bt;TextRenderer=Lt;Lexer=At;Tokenizer=Mt;Hooks=Ft;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let t=r;for(let r of t.header)n=n.concat(this.walkTokens(r.tokens,e));for(let r of t.rows)for(let t of r)n=n.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=r;n=n.concat(this.walkTokens(t.items,e));break}default:{let t=r;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(r=>{let i=t[r].flat(1/0);n=n.concat(this.walkTokens(i,e))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),n.extensions=e),t.renderer){let e=this.defaults.renderer||new Bt(this.defaults);for(let n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,i=t.renderer[r],a=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Mt(this.defaults);for(let n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,i=t.tokenizer[r],a=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Ft;for(let n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,i=t.hooks[r],a=e[r];Ft.passThroughHooks.has(n)?e[r]=t=>{if(this.defaults.async&&Ft.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(e,t);return a.call(e,n)})();let r=i.call(e,t);return a.call(e,r)}:e[r]=(...t)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(e,t);return!1===n&&(n=await a.apply(e,t)),n})();let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,r=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(r.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return At.lex(t,e??this.defaults)}parser(t,e){return Et.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(e):e,r=await(i.hooks?await i.hooks.provideLexer():t?At.lex:At.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():t?Et.parse:Et.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let n=(i.hooks?i.hooks.provideLexer():t?At.lex:At.lexInline)(e,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():t?Et.parse:Et.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(t){return a(t)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+wt(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}};function Ot(t,e){return $t.parse(t,e)}Ot.options=Ot.setOptions=function(t){return $t.setOptions(t),Ot.defaults=$t.defaults,k(Ot.defaults),Ot},Ot.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Ot.defaults=w,Ot.use=function(...t){return $t.use(...t),Ot.defaults=$t.defaults,k(Ot.defaults),Ot},Ot.walkTokens=function(t,e){return $t.walkTokens(t,e)},Ot.parseInline=$t.parseInline,Ot.Parser=Et,Ot.parser=Et.parse,Ot.Renderer=Bt,Ot.TextRenderer=Lt,Ot.Lexer=At,Ot.lexer=At.lex,Ot.Tokenizer=Mt,Ot.Hooks=Ft,Ot.parse=Ot,Ot.options,Ot.setOptions,Ot.use,Ot.walkTokens,Ot.parseInline,Et.parse,At.lex;var Nt=n(8968),Dt={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},zt=new Map,It=new Map,Pt=(0,a.__name)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.log.debug("Registering icon pack:",e.name),"loader"in e)It.set(e.name,e.loader);else{if(!("icons"in e))throw a.log.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');zt.set(e.name,e.icons)}}},"registerIconPacks"),Rt=(0,a.__name)(async(t,e)=>{const n=((t,e,n,r="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:t};return e&&!o(a)?null:a}const a=i[0],s=a.split("-");if(s.length>1){const t={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!o(t)?null:t}if(n&&""===r){const t={provider:r,prefix:"",name:a};return e&&!o(t,n)?null:t}return null})(t,!0,void 0!==e);if(!n)throw new Error(`Invalid icon name: ${t}`);const r=n.prefix||e;if(!r)throw new Error(`Icon name must contain a prefix: ${t}`);let i=zt.get(r);if(!i){const t=It.get(r);if(!t)throw new Error(`Icon set not found: ${n.prefix}`);try{i={...await t(),prefix:r},zt.set(r,i)}catch(t){throw a.log.error(t),new Error(`Failed to load icon set: ${n.prefix}`)}}const s=function(t,e){if(t.icons[e])return f(t,e,[]);const n=function(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);return(e||Object.keys(n).concat(Object.keys(r))).forEach(function t(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;const n=r[e]&&r[e].parent,a=n&&t(n);a&&(i[e]=[n].concat(a))}return i[e]}),i}(t,[e])[e];return n?f(t,e,n):null}(i,n.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),qt=(0,a.__name)(async t=>{try{return await Rt(t),!0}catch{return!1}},"isIconAvailable"),jt=(0,a.__name)(async(t,e,n)=>{let r;try{r=await Rt(t,e?.fallbackPrefix)}catch(t){a.log.error(t),r=Dt}const o=function(t,e){const n={...c,...t},r={...p,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,r].forEach(t=>{const e=[],n=t.hFlip,r=t.vFlip;let o,s=t.rotate;switch(n?r?s+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):r&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=i.height/2+i.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:o=i.width/2+i.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(i.left!==i.top&&(o=i.left,i.left=i.top,i.top=o),i.width!==i.height&&(o=i.width,i.width=i.height,i.height=o)),e.length&&(a=function(t,e){const n=function(t,e="defs"){let n="";const r=t.indexOf("<"+e);for(;r>=0;){const i=t.indexOf(">",r),a=t.indexOf("</"+e);if(-1===i||-1===a)break;const o=t.indexOf(">",a);if(-1===o)break;n+=t.slice(i+1,a).trim(),t=t.slice(0,r).trim()+t.slice(o+1)}return{defs:n,content:t}}(t);return r=n.defs,i=e+n.content+"</g>",r?"<defs>"+r+"</defs>"+i:i;var r,i}(a,'<g transform="'+e.join(" ")+'">'))});const o=r.width,s=r.height,l=i.width,h=i.height;let u,f;null===o?(f=null===s?"1em":"auto"===s?h:s,u=y(f,l/h)):(u="auto"===o?l:o,f=null===s?y(u,h/l):"auto"===s?h:s);const d={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(d[t]=e.toString())};g("width",u),g("height",f);const m=[i.left,i.top,l,h];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:a}}(r,e),s=function(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)n+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}(function(t,e=x){const n=[];let r;for(;r=b.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(n=>{const r="function"==typeof e?e(n):e+(_++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}(o.body),{...o.attributes,...n});return(0,i.sanitizeText)(s,(0,i.getConfig)())},"getIconSVG");function Wt(t,{markdownAutoWrap:e}){const n=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"),r=(0,Nt.dedent)(n);return!1===e?r.replace(/ /g,"&nbsp;"):r}function Ht(t,e={}){const n=Wt(t,e),r=Ot.lexer(n),i=[[]];let o=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,n)=>{0!==n&&(o++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&i[o].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&i[o].push({content:t.text,type:"normal"})}return(0,a.__name)(s,"processNode"),r.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?i[o].push({content:t.text,type:"normal"}):i[o].push({content:t.raw,type:"normal"})}),i}function Ut(t,{markdownAutoWrap:e}={}){const n=Ot.lexer(t);function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(r).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(r).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(r).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.log.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.__name)(r,"output"),n.map(r).join("")}function Yt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Gt(t,e){return Vt(t,[],Yt(e.content),e.type)}function Vt(t,e,n,r){if(0===n.length)return[{content:e.join(""),type:r},{content:"",type:r}];const[i,...a]=n,o=[...e,i];return t([{content:o.join(""),type:r}])?Vt(t,o,a,r):(0===e.length&&i&&(e.push(i),n.shift()),[{content:e.join(""),type:r},{content:n.join(""),type:r}])}function Xt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Zt(t,e)}function Zt(t,e,n=[],r=[]){if(0===t.length)return r.length>0&&n.push(r),n.length>0?n:[];let i="";" "===t[0].content&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...r];if(""!==i&&o.push({content:i,type:"normal"}),o.push(a),e(o))return Zt(t,e,n,o);if(r.length>0)n.push(r),t.unshift(a);else if(a.content){const[r,i]=Gt(e,a);n.push([r]),i.content&&t.unshift(i)}return Zt(t,e,n)}function Qt(t,e){e&&t.attr("style",e)}async function Kt(t,e,n,r,a=!1,o=(0,i.getConfig)()){const s=t.append("foreignObject");s.attr("width",10*n+"px"),s.attr("height",10*n+"px");const l=s.append("xhtml:div"),c=(0,i.hasKatex)(e.label)?await(0,i.renderKatexSanitized)(e.label.replace(i.common_default.lineBreakRegex,"\n"),o):(0,i.sanitizeText)(e.label,o),h=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(c),Qt(u,e.labelStyle),u.attr("class",`${h} ${r}`),Qt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",n+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let f=l.node().getBoundingClientRect();return f.width===n&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",n+"px"),f=l.node().getBoundingClientRect()),s.node()}function Jt(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}function te(t,e,n){const r=t.append("text"),i=Jt(r,1,e);re(i,n);const a=i.node().getComputedTextLength();return r.remove(),a}function ee(t,e,n){const r=t.append("text"),i=Jt(r,1,e);re(i,[{content:n,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}function ne(t,e,n,r=!1){const i=e.append("g"),o=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1");let l=0;for(const e of n){const n=(0,a.__name)(e=>te(i,1.1,e)<=t,"checkWidth"),r=n(e)?[e]:Xt(e,n);for(const t of r)re(Jt(s,l,1.1),t),l++}if(r){const t=s.node().getBBox(),e=2;return o.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),i.node()}return s.node()}function re(t,e){t.text(""),e.forEach((e,n)=>{const r=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===n?r.text(e.content):r.text(" "+e.content)})}async function ie(t,e={}){const n=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,a)=>(n.push((async()=>{const n=`${r}:${a}`;return await qt(n)?await jt(n,void 0,{class:"label-icon"}):`<i class='${(0,i.sanitizeText)(t,e).replace(":"," ")}'></i>`})()),t));const r=await Promise.all(n);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")}(0,a.__name)(Wt,"preprocessMarkdown"),(0,a.__name)(Ht,"markdownToLines"),(0,a.__name)(Ut,"markdownToHTML"),(0,a.__name)(Yt,"splitTextToChars"),(0,a.__name)(Gt,"splitWordToFitWidth"),(0,a.__name)(Vt,"splitWordToFitWidthRecursion"),(0,a.__name)(Xt,"splitLineToFitWidth"),(0,a.__name)(Zt,"splitLineToFitWidthRecursion"),(0,a.__name)(Qt,"applyStyle"),(0,a.__name)(Kt,"addHtmlSpan"),(0,a.__name)(Jt,"createTspan"),(0,a.__name)(te,"computeWidthOfText"),(0,a.__name)(ee,"computeDimensionOfText"),(0,a.__name)(ne,"createFormattedText"),(0,a.__name)(re,"updateTextContentAndStyles"),(0,a.__name)(ie,"replaceIconSubstring");var ae=(0,a.__name)(async(t,e="",{style:n="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,isNode:c=!0,width:h=200,addSvgBackground:u=!1}={},f)=>{if(a.log.debug("XYZ createText",e,n,o,s,l,c,"addSvgBackground: ",u),l){const a=Ut(e,f),o=await ie((0,r.decodeEntities)(a),f),l=e.replace(/\\\\/g,"\\"),d={isNode:c,label:(0,i.hasKatex)(e)?l:o,labelStyle:n.replace("fill:","color:")};return await Kt(t,d,h,s,u,f)}{const r=ne(h,t,Ht(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),f),!!e&&u);if(c){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));const t=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,v.select)(r).attr("style",t)}else{const t=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,v.select)(r).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,v.select)(r).select("text").attr("style",e)}return r}},"createText")},85533(t,e,n){n.r(e),n.d(e,{clear:()=>L,clear2:()=>Me,createLabel_default:()=>v,insertCluster:()=>B,insertNode:()=>Se,isValidShape:()=>ke,labelHelper:()=>u,positionNode:()=>Ae,setNodeElem:()=>Te,updateNodeBounds:()=>d});var r=n(70998),i=n(96540),a=n(67099),o=n(82029),s=n(54141),l=n(60162),c=n(79806),h=n(7083),u=(0,l.__name)(async(t,e,n)=>{let r;const i=e.useHtmlLabels||(0,s.evaluate)((0,s.getConfig2)()?.htmlLabels);r=n||"node default";const h=t.insert("g").attr("class",r).attr("id",e.domId||e.id),u=h.insert("g").attr("class","label").attr("style",(0,o.handleUndefinedAttr)(e.labelStyle));let f;f=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const d=await(0,a.createText)(u,(0,s.sanitizeText)((0,o.decodeEntities)(f),(0,s.getConfig2)()),{useHtmlLabels:i,width:e.width||(0,s.getConfig2)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let p=d.getBBox();const g=(e?.padding??0)/2;if(i){const t=d.children[0],e=(0,c.select)(d),n=t.getElementsByTagName("img");if(n){const t=""===f.replace(/<img[^>]*>/g,"").trim();await Promise.all([...n].map(e=>new Promise(n=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,s.getConfig2)().fontSize?(0,s.getConfig2)().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[r=s.defaultConfig_default.fontSize]=(0,o.parseFontSize)(t),i=r*n+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";n(e)}(0,l.__name)(r,"setupImage"),setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return i?u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):u.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:h,bbox:p,halfPadding:g,label:u}},"labelHelper"),f=(0,l.__name)(async(t,e,n)=>{const r=n.useHtmlLabels||(0,s.evaluate)((0,s.getConfig2)()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",n.labelStyle||""),l=await(0,a.createText)(i,(0,s.sanitizeText)((0,o.decodeEntities)(e),(0,s.getConfig2)()),{useHtmlLabels:r,width:n.width||(0,s.getConfig2)()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img});let h=l.getBBox();const u=n.padding/2;if((0,s.evaluate)((0,s.getConfig2)()?.flowchart?.htmlLabels)){const t=l.children[0],e=(0,c.select)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return r?i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):i.attr("transform","translate(0, "+-h.height/2+")"),n.centerLabel&&i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:h,halfPadding:u,label:i}},"insertLabel"),d=(0,l.__name)((t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height},"updateNodeBounds"),p=(0,l.__name)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function g(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function m(t,e,n,r,i,a){const o=[],s=n-t,l=r-e,c=s/a,h=2*Math.PI/c,u=e+l/2;for(let e=0;e<=50;e++){const n=t+e/50*s,r=u+i*Math.sin(h*(n-t));o.push({x:n,y:r})}return o}function y(t,e,n,r,i,a){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){const r=s+i*l,a=t+n*Math.cos(r),c=e+n*Math.sin(r);o.push({x:-a,y:-c})}return o}(0,l.__name)(g,"createPathFromPoints"),(0,l.__name)(m,"generateFullSineWavePoints"),(0,l.__name)(y,"generateCirclePoints");var b=(0,l.__name)((t,e)=>{var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),n=0===s?0:c*o/s,r=c):(o<0&&(l=-l),n=l,r=0===o?0:l*s/o),{x:i+n,y:a+r}},"intersectRect");function x(t,e){e&&t.attr("style",e)}async function _(t){const e=(0,c.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div"),r=(0,s.getConfig2)();let i=t.label;t.label&&(0,s.hasKatex)(t.label)&&(i=await(0,s.renderKatexSanitized)(t.label.replace(s.common_default.lineBreakRegex,"\n"),r));const a='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>";return n.html((0,s.sanitizeText)(a,r)),x(n,t.labelStyle),n.style("display","inline-block"),n.style("padding-right","1px"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,l.__name)(x,"applyStyle"),(0,l.__name)(_,"addHtmlLabel");var v=(0,l.__name)(async(t,e,n,r)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),(0,s.evaluate)((0,s.getConfig2)().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),l.log.info("vertexText"+i);const t={isNode:r,label:(0,o.decodeEntities)(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await _(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(const e of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),n?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}},"createLabel"),w=(0,l.__name)((t,e,n,r,i)=>["M",t+i,e,"H",t+n-i,"A",i,i,0,0,1,t+n,e+i,"V",e+r-i,"A",i,i,0,0,1,t+n-i,e+r,"H",t+i,"A",i,i,0,0,1,t,e+r-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,l.__name)(async(t,e)=>{l.log.info("Creating subgraph rect for ",e.id,e);const n=(0,s.getConfig2)(),{themeVariables:o,handDrawnSeed:u}=n,{clusterBkg:f,clusterBorder:d}=o,{labelStyles:p,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.styles2String)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),_=(0,s.evaluate)(n.flowchart.htmlLabels),v=x.insert("g").attr("class","cluster-label "),k=await(0,a.createText)(v,e.label,{style:e.labelStyle,useHtmlLabels:_,isNode:!0});let C=k.getBBox();if((0,s.evaluate)(n.flowchart.htmlLabels)){const t=k.children[0],e=(0,c.select)(k);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}const S=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,M=e.x-S/2,A=e.y-T/2;let B;if(l.log.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.default.svg(x),n=(0,i.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:d,fillWeight:3,seed:u}),r=t.path(w(M,A,S,T,0),n);B=x.insert(()=>(l.log.debug("Rough node insert CXC",r),r),":first-child"),B.select("path:nth-child(2)").attr("style",m.join(";")),B.select("path").attr("style",y.join(";").replace("fill","stroke"))}else B=x.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",M).attr("y",A).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,r.getSubGraphTitleMargins)(n);if(v.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+L})`),p){const t=v.select("span");t&&t.attr("style",p)}const E=B.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=C.height-e.padding/2,e.intersect=function(t){return b(e,t)},{cluster:x,labelBBox:C}},"rect"),C=(0,l.__name)((t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return b(e,t)},{cluster:n,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,l.__name)(async(t,e)=>{const n=(0,s.getConfig2)(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=r,f=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),d=f.insert("g",":first-child"),p=f.insert("g").attr("class","cluster-label");let g=f.append("rect");const m=p.node().appendChild(await v(e.label,e.labelStyle,void 0,!0));let y=m.getBBox();if((0,s.evaluate)(n.flowchart.htmlLabels)){const t=m.children[0],e=(0,c.select)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const x=0*e.padding,_=x/2,k=(e.width<=y.width+e.padding?y.width+e.padding:e.width)+x;e.width<=y.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height+x,S=e.height+x-y.height-6,T=e.x-k/2,M=e.y-C/2;e.width=k;const A=e.y-e.height/2-_+y.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),n=h.default.svg(f),r=e.rx||e.ry?n.path(w(T,M,k,C,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):n.rectangle(T,M,k,C,{seed:i});B=f.insert(()=>r,":first-child");const s=n.rectangle(T,A,k,S,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:i});B=f.insert(()=>r,":first-child"),g=f.insert(()=>s)}else{B=d.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",T).attr("y",M).attr("width",k).attr("height",C).attr("data-look",e.look),g.attr("class","inner").attr("x",T).attr("y",A).attr("width",k).attr("height",S)}p.attr("transform",`translate(${e.x-y.width/2}, ${M+1-((0,s.evaluate)(n.flowchart.htmlLabels)?0:3)})`);const L=B.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=y.height-e.padding/2,e.labelBBox=y,e.intersect=function(t){return b(e,t)},{cluster:f,labelBBox:y}},"roundedWithTitle"),T=(0,l.__name)(async(t,e)=>{l.log.info("Creating subgraph rect for ",e.id,e);const n=(0,s.getConfig2)(),{themeVariables:o,handDrawnSeed:u}=n,{clusterBkg:f,clusterBorder:d}=o,{labelStyles:p,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.styles2String)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),_=(0,s.evaluate)(n.flowchart.htmlLabels),v=x.insert("g").attr("class","cluster-label "),k=await(0,a.createText)(v,e.label,{style:e.labelStyle,useHtmlLabels:_,isNode:!0,width:e.width});let C=k.getBBox();if((0,s.evaluate)(n.flowchart.htmlLabels)){const t=k.children[0],e=(0,c.select)(k);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}const S=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,M=e.x-S/2,A=e.y-T/2;let B;if(l.log.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.default.svg(x),n=(0,i.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:d,fillWeight:4,seed:u}),r=t.path(w(M,A,S,T,e.rx),n);B=x.insert(()=>(l.log.debug("Rough node insert CXC",r),r),":first-child"),B.select("path:nth-child(2)").attr("style",m.join(";")),B.select("path").attr("style",y.join(";").replace("fill","stroke"))}else B=x.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",M).attr("y",A).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,r.getSubGraphTitleMargins)(n);if(v.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+L})`),p){const t=v.select("span");t&&t.attr("style",p)}const E=B.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=C.height-e.padding/2,e.intersect=function(t){return b(e,t)},{cluster:x,labelBBox:C}},"kanbanSection"),M={rect:k,squareRect:k,roundedWithTitle:S,noteGroup:C,divider:(0,l.__name)((t,e)=>{const n=(0,s.getConfig2)(),{themeVariables:r,handDrawnSeed:i}=n,{nodeBorder:a}=r,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const f=e.height+c,d=e.x-u/2,p=e.y-f/2;let g;if(e.width=u,"handDrawn"===e.look){const t=h.default.svg(o).rectangle(d,p,u,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});g=o.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",d).attr("y",p).attr("width",u).attr("height",f).attr("data-look",e.look)}const m=g.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return b(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:T},A=new Map,B=(0,l.__name)(async(t,e)=>{const n=e.shape||"rect",r=await M[n](t,e);return A.set(e.id,r),r},"insertCluster"),L=(0,l.__name)(()=>{A=new Map},"clear");function E(t,e){return t.intersect(e)}(0,l.__name)(E,"intersectNode");var F=E;function $(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,l=Math.sqrt(e*e*s*s+n*n*o*o),c=Math.abs(e*n*o/l);r.x<i&&(c=-c);var h=Math.abs(e*n*s/l);return r.y<a&&(h=-h),{x:i+c,y:a+h}}(0,l.__name)($,"intersectEllipse");var O=$;function N(t,e,n){return O(t,e,e,n)}(0,l.__name)(N,"intersectCircle");var D=N;function z(t,e,n,r){{const i=e.y-t.y,a=t.x-e.x,o=e.x*t.y-t.x*e.y,s=i*n.x+a*n.y+o,l=i*r.x+a*r.y+o,c=1e-6;if(0!==s&&0!==l&&I(s,l))return;const h=r.y-n.y,u=n.x-r.x,f=r.x*n.y-n.x*r.y,d=h*t.x+u*t.y+f,p=h*e.x+u*e.y+f;if(Math.abs(d)<c&&Math.abs(p)<c&&I(d,p))return;const g=i*u-h*a;if(0===g)return;const m=Math.abs(g/2);let y=a*f-u*o;const b=y<0?(y-m)/g:(y+m)/g;return y=h*o-i*f,{x:b,y:y<0?(y-m)/g:(y+m)/g}}}function I(t,e){return t*e>0}(0,l.__name)(z,"intersectLine"),(0,l.__name)(I,"sameSign");var P=z;function R(t,e,n){let r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=r-t.width/2-o,c=i-t.height/2-s;for(let r=0;r<e.length;r++){let i=e[r],o=e[r<e.length-1?r+1:0],s=P(t,n,{x:l+i.x,y:c+i.y},{x:l+o.x,y:c+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(t,e){let r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,l=Math.sqrt(o*o+s*s);return a<l?-1:a===l?0:1}),a[0]):t}(0,l.__name)(R,"intersectPolygon");var q={node:F,circle:D,ellipse:O,polygon:R,rect:b};function j(t,e){const{labelStyles:n}=(0,i.styles2String)(e);e.labelStyle=n;const r=p(e);let a=r;r||(a="anchor");const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:c}=e,u=h.default.svg(s),f=(0,i.userNodeOverrides)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);const g=u.circle(0,0,2,f),m=s.insert(()=>g,":first-child");return m.attr("class","anchor").attr("style",(0,o.handleUndefinedAttr)(c)),d(e,m),e.intersect=function(t){return l.log.info("Circle intersect",e,1,t),q.circle(e,1,t)},s}function W(t,e,n,r,i,a,o){const s=(t+n)/2,l=(e+r)/2,c=Math.atan2(r-e,n-t),h=(n-t)/2/i,u=(r-e)/2/a,f=Math.sqrt(h**2+u**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const d=Math.sqrt(1-f**2),p=s+d*a*Math.sin(c)*(o?-1:1),g=l-d*i*Math.cos(c)*(o?-1:1),m=Math.atan2((e-g)/a,(t-p)/i);let y=Math.atan2((r-g)/a,(n-p)/i)-m;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);const b=[];for(let t=0;t<20;t++){const e=m+t/19*y,n=p+i*Math.cos(e),r=g+a*Math.sin(e);b.push({x:n,y:r})}return b}async function H(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.width+e.padding+20,l=o.height+e.padding,c=l/2,f=c/(2.5+l/50),{cssStyles:m}=e,y=[{x:s/2,y:-l/2},{x:-s/2,y:-l/2},...W(-s/2,-l/2,-s/2,l/2,f,c,!1),{x:s/2,y:l/2},...W(s/2,l/2,s/2,-l/2,f,c,!0)],b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=g(y),v=b.path(_,x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),w.attr("transform",`translate(${f/2}, 0)`),d(e,w),e.intersect=function(t){return q.polygon(e,y,t)},a}function U(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}async function Y(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.height+e.padding,l=o.width+e.padding+12,c=-s,f=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}];let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(f),o=t.path(r,n);m=a.insert(()=>o,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),y&&m.attr("style",y)}else m=U(a,l,s,f);return r&&m.attr("style",r),d(e,m),e.intersect=function(t){return q.polygon(e,f,t)},a}function G(t,e){const{nodeStyles:n}=(0,i.styles2String)(e);e.label="";const r=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],l=h.default.svg(r),c=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=g(s),f=l.path(u,c),d=r.insert(()=>f,":first-child");return a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return q.polygon(e,s,t)},r}async function V(t,e,n){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:s,bbox:c,halfPadding:f}=await u(t,e,p(e)),g=n?.padding??f,m=c.width/2+g;let y;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.default.svg(s),n=(0,i.userNodeOverrides)(e,{}),r=t.circle(0,0,2*m,n);y=s.insert(()=>r,":first-child"),y.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(b))}else y=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",m).attr("cx",0).attr("cy",0);return d(e,y),e.calcIntersect=function(t,e){const n=t.width/2;return q.circle(t,n,e)},e.intersect=function(t){return l.log.info("Circle intersect",e,m,t),q.circle(e,m,t)},s}function X(t){const e=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=2*t;return`M ${-r/2*e},${r/2*n} L ${r/2*e},${-r/2*n}\n M ${r/2*e},${r/2*n} L ${-r/2*e},${-r/2*n}`}function Z(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n,e.label="";const a=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),o=Math.max(30,e?.width??0),{cssStyles:s}=e,c=h.default.svg(a),u=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const f=c.circle(0,0,2*o,u),g=X(o),m=c.path(g,u),y=a.insert(()=>f,":first-child");return y.insert(()=>m),s&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),d(e,y),e.intersect=function(t){return l.log.info("crossedCircle intersect",e,{radius:o,point:t}),q.circle(e,o,t)},a}function Q(t,e,n,r=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){const r=s+i*l,a=t+n*Math.cos(r),c=e+n*Math.sin(r);o.push({x:-a,y:-c})}return o}async function K(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=o.width+(e.padding??0),c=o.height+(e.padding??0),f=Math.max(5,.1*c),{cssStyles:m}=e,y=[...Q(l/2,-c/2,f,30,-90,0),{x:-l/2-f,y:f},...Q(l/2+2*f,-f,f,20,-180,-270),...Q(l/2+2*f,f,f,20,-90,-180),{x:-l/2-f,y:-c/2},...Q(l/2,c/2,f,20,0,90)],b=[{x:l/2,y:-c/2-f},{x:-l/2,y:-c/2-f},...Q(l/2,-c/2,f,20,-90,0),{x:-l/2-f,y:-f},...Q(l/2+.1*l,-f,f,20,-180,-270),...Q(l/2+.1*l,f,f,20,-90,-180),{x:-l/2-f,y:c/2},...Q(l/2,c/2,f,20,0,90),{x:-l/2,y:c/2+f},{x:l/2,y:c/2+f}],x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=g(y).replace("Z",""),w=x.path(v,_),k=g(b),C=x.path(k,{..._}),S=a.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>w,":first-child"),S.attr("class","text"),m&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",r),S.attr("transform",`translate(${f}, 0)`),s.attr("transform",`translate(${-l/2+f-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),d(e,S),e.intersect=function(t){return q.polygon(e,b,t)},a}function J(t,e,n,r=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){const r=s+i*l,a=t+n*Math.cos(r),c=e+n*Math.sin(r);o.push({x:a,y:c})}return o}async function tt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=o.width+(e.padding??0),c=o.height+(e.padding??0),f=Math.max(5,.1*c),{cssStyles:m}=e,y=[...J(l/2,-c/2,f,20,-90,0),{x:l/2+f,y:-f},...J(l/2+2*f,-f,f,20,-180,-270),...J(l/2+2*f,f,f,20,-90,-180),{x:l/2+f,y:c/2},...J(l/2,c/2,f,20,0,90)],b=[{x:-l/2,y:-c/2-f},{x:l/2,y:-c/2-f},...J(l/2,-c/2,f,20,-90,0),{x:l/2+f,y:-f},...J(l/2+2*f,-f,f,20,-180,-270),...J(l/2+2*f,f,f,20,-90,-180),{x:l/2+f,y:c/2},...J(l/2,c/2,f,20,0,90),{x:l/2,y:c/2+f},{x:-l/2,y:c/2+f}],x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=g(y).replace("Z",""),w=x.path(v,_),k=g(b),C=x.path(k,{..._}),S=a.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>w,":first-child"),S.attr("class","text"),m&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",r),S.attr("transform",`translate(${-f}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),d(e,S),e.intersect=function(t){return q.polygon(e,b,t)},a}function et(t,e,n,r=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){const r=s+i*l,a=t+n*Math.cos(r),c=e+n*Math.sin(r);o.push({x:-a,y:-c})}return o}async function nt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=o.width+(e.padding??0),c=o.height+(e.padding??0),f=Math.max(5,.1*c),{cssStyles:m}=e,y=[...et(l/2,-c/2,f,30,-90,0),{x:-l/2-f,y:f},...et(l/2+2*f,-f,f,20,-180,-270),...et(l/2+2*f,f,f,20,-90,-180),{x:-l/2-f,y:-c/2},...et(l/2,c/2,f,20,0,90)],b=[...et(-l/2+f+f/2,-c/2,f,20,-90,-180),{x:l/2-f/2,y:f},...et(-l/2-f/2,-f,f,20,0,90),...et(-l/2-f/2,f,f,20,-90,0),{x:l/2-f/2,y:-f},...et(-l/2+f+f/2,c/2,f,30,-180,-270)],x=[{x:l/2,y:-c/2-f},{x:-l/2,y:-c/2-f},...et(l/2,-c/2,f,20,-90,0),{x:-l/2-f,y:-f},...et(l/2+2*f,-f,f,20,-180,-270),...et(l/2+2*f,f,f,20,-90,-180),{x:-l/2-f,y:c/2},...et(l/2,c/2,f,20,0,90),{x:-l/2,y:c/2+f},{x:l/2-f-f/2,y:c/2+f},...et(-l/2+f+f/2,-c/2,f,20,-90,-180),{x:l/2-f/2,y:f},...et(-l/2-f/2,-f,f,20,0,90),...et(-l/2-f/2,f,f,20,-90,0),{x:l/2-f/2,y:-f},...et(-l/2+f+f/2,c/2,f,30,-180,-270)],_=h.default.svg(a),v=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const w=g(y).replace("Z",""),k=_.path(w,v),C=g(b).replace("Z",""),S=_.path(C,v),T=g(x),M=_.path(T,{...v}),A=a.insert("g",":first-child");return A.insert(()=>M,":first-child").attr("stroke-opacity",0),A.insert(()=>k,":first-child"),A.insert(()=>S,":first-child"),A.attr("class","text"),m&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",r),A.attr("transform",`translate(${f-f/4}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),d(e,A),e.intersect=function(t){return q.polygon(e,x,t)},a}async function rt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(80,1.25*(o.width+2*(e.padding??0)),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),c=l/2,{cssStyles:f}=e,m=h.default.svg(a),b=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=s-c,_=l/4,v=[{x,y:0},{x:_,y:0},{x:0,y:l/2},{x:_,y:l},{x,y:l},...y(-x,-l/2,c,50,270,90)],w=g(v),k=m.path(w,b),C=a.insert(()=>k,":first-child");return C.attr("class","basic label-container"),f&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",f),r&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",r),C.attr("transform",`translate(${-s/2}, ${-l/2})`),d(e,C),e.intersect=function(t){return q.polygon(e,v,t)},a}(0,l.__name)(j,"anchor"),(0,l.__name)(W,"generateArcPoints"),(0,l.__name)(H,"bowTieRect"),(0,l.__name)(U,"insertPolygonShape"),(0,l.__name)(Y,"card"),(0,l.__name)(G,"choice"),(0,l.__name)(V,"circle"),(0,l.__name)(X,"createLine"),(0,l.__name)(Z,"crossedCircle"),(0,l.__name)(Q,"generateCirclePoints"),(0,l.__name)(K,"curlyBraceLeft"),(0,l.__name)(J,"generateCirclePoints"),(0,l.__name)(tt,"curlyBraceRight"),(0,l.__name)(et,"generateCirclePoints"),(0,l.__name)(nt,"curlyBraces"),(0,l.__name)(rt,"curvedTrapezoid");var it=(0,l.__name)((t,e,n,r,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r].join(" "),"createCylinderPathD"),at=(0,l.__name)((t,e,n,r,i,a)=>[`M${t},${e+a}`,`M${t+n},${e+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r].join(" "),"createOuterCylinderPathD"),ot=(0,l.__name)((t,e,n,r,i,a)=>[`M${t-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function st(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,p(e)),c=Math.max(s.width+e.padding,e.width??0),f=c/2,g=f/(2.5+c/50),m=Math.max(s.height+g+e.padding,e.height??0);let y;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=at(0,0,c,m,f,g),r=ot(0,g,c,m,f,g),o=t.path(n,(0,i.userNodeOverrides)(e,{})),s=t.path(r,(0,i.userNodeOverrides)(e,{fill:"none"}));y=a.insert(()=>s,":first-child"),y=a.insert(()=>o,":first-child"),y.attr("class","basic label-container"),b&&y.attr("style",b)}else{const t=it(0,0,c,m,f,g);y=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(b)).attr("style",r)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-c/2}, ${-(m/2+g)})`),d(e,y),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+(e.padding??0)/1.5-(s.y-(s.top??0))})`),e.intersect=function(t){const n=q.rect(e,t),r=n.x-(e.x??0);if(0!=f&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(n.y-(e.y??0))>(e.height??0)/2-g)){let i=g*g*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=g-i,t.y-(e.y??0)>0&&(i=-i),n.y+=i}return n},a}async function lt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=o.width+e.padding,c=o.height+e.padding,f=.2*c,g=-l/2,m=-c/2-f/2,{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=[{x:g,y:m+f},{x:-g,y:m+f},{x:-g,y:-m},{x:g,y:-m},{x:g,y:m},{x:-g,y:m},{x:-g,y:m+f}],v=b.polygon(_.map(t=>[t.x,t.y]),x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),s.attr("transform",`translate(${g+(e.padding??0)/2-(o.x-(o.left??0))}, ${m+f+(e.padding??0)/2-(o.y-(o.top??0))})`),d(e,w),e.intersect=function(t){return q.rect(e,t)},a}async function ct(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:c}=await u(t,e,p(e)),f=s.width/2+c+5,g=s.width/2+c;let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{roughness:.2,strokeWidth:2.5}),r=(0,i.userNodeOverrides)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*f,n),l=t.circle(0,0,2*g,r);m=a.insert("g",":first-child"),m.attr("class",(0,o.handleUndefinedAttr)(e.cssClasses)).attr("style",(0,o.handleUndefinedAttr)(y)),m.node()?.appendChild(s),m.node()?.appendChild(l)}else{m=a.insert("g",":first-child");const t=m.insert("circle",":first-child"),e=m.insert("circle");m.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",f).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",g).attr("cx",0).attr("cy",0)}return d(e,m),e.intersect=function(t){return l.log.info("DoubleCircle intersect",e,f,t),q.circle(e,f,t)},a}function ht(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.label="",e.labelStyle=r;const o=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,c=h.default.svg(o),{nodeBorder:u}=n,f=(0,i.userNodeOverrides)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);const g=c.circle(0,0,14,f),m=o.insert(()=>g,":first-child");return m.selectAll("path").attr("style",`fill: ${u} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",a),d(e,m),e.intersect=function(t){return l.log.info("filledCircle intersect",e,{radius:7,point:t}),q.circle(e,7,t)},o}async function ut(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),c=o.width+(e.padding??0),f=c+o.height,m=c+o.height,y=[{x:0,y:-f},{x:m,y:-f},{x:m/2,y:0}],{cssStyles:b}=e,x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=g(y),w=x.path(v,_),k=a.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`);return b&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",b),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),e.width=c,e.height=f,d(e,k),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-f/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return l.log.info("Triangle intersect",e,y,t),q.polygon(e,y,t)},a}function ft(t,e,{dir:n,config:{state:r,themeVariables:a}}){const{nodeStyles:o}=(0,i.styles2String)(e);e.label="";const s=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let c=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);"LR"===n&&(c=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const f=-1*c/2,g=-1*u/2,m=h.default.svg(s),y=(0,i.userNodeOverrides)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const b=m.rectangle(f,g,c,u,y),x=s.insert(()=>b,":first-child");l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),o&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",o),d(e,x);const _=r?.padding??0;return e.width&&e.height&&(e.width+=_/2||0,e.height+=_/2||0),e.intersect=function(t){return q.rect(e,t)},s}async function dt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(80,o.width+2*(e.padding??0),e?.width??0),c=Math.max(50,o.height+2*(e.padding??0),e?.height??0),f=c/2,{cssStyles:m}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=[{x:-s/2,y:-c/2},{x:s/2-f,y:-c/2},...y(-s/2+f,0,f,50,90,270),{x:s/2-f,y:c/2},{x:-s/2,y:c/2}],v=g(_),w=b.path(v,x),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",m),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),d(e,k),e.intersect=function(t){return l.log.info("Pill intersect",e,{radius:f,point:t}),q.polygon(e,_,t)},a}async function pt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.height+(e.padding??0),l=o.width+2.5*(e.padding??0),{cssStyles:c}=e,f=h.default.svg(a),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let y=l/2;y+=y/6;const b=s/2,x=y-b/2,_=[{x:-x,y:-b},{x:0,y:-b},{x,y:-b},{x:y,y:0},{x,y:b},{x:0,y:b},{x:-x,y:b},{x:-y,y:0}],v=g(_),w=f.path(v,m),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),e.width=l,e.height=s,d(e,k),e.intersect=function(t){return q.polygon(e,_,t)},a}async function gt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.label="",e.labelStyle=n;const{shapeSvg:a}=await u(t,e,p(e)),o=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:c}=e,f=h.default.svg(a),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],b=g(y),x=f.path(b,m),_=a.insert(()=>x,":first-child");return _.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",r),_.attr("transform",`translate(${-o/2}, ${-s/2})`),d(e,_),e.intersect=function(t){return l.log.info("Pill intersect",e,{points:y}),q.polygon(e,y,t)},a}async function mt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:o}=(0,i.styles2String)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,f=Math.max(s,c),p=r?.wrappingWidth;e.width=Math.max(f,p??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),b="t"===e.pos,x=f,_=f,{nodeBorder:v}=n,{stylesMap:w}=(0,i.compileStyles)(e),k=-_/2,C=-x/2,S=e.label?8:0,T=h.default.svg(g),M=(0,i.userNodeOverrides)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const A=T.rectangle(k,C,_,x,M),B=Math.max(_,m.width),L=x+m.height+S,E=T.rectangle(-B/2,-L/2,B,L,{...M,fill:"transparent",stroke:"none"}),F=g.insert(()=>A,":first-child"),$=g.insert(()=>E);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.getIconSVG)(e.icon,{height:f,width:f,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,o=n.x,s=n.y;t.attr("transform",`translate(${-r/2-o},${b?m.height/2+S/2-i/2-s:-m.height/2-S/2-i/2-s})`),t.attr("style",`color: ${w.get("stroke")??v};`)}return y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-L/2:L/2-m.height})`),F.attr("transform",`translate(0,${b?m.height/2+S/2:-m.height/2-S/2})`),d(e,$),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];return a=b?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+S},{x:n+_/2,y:r-i/2+m.height+S},{x:n+_/2,y:r+i/2},{x:n-_/2,y:r+i/2},{x:n-_/2,y:r-i/2+m.height+S},{x:n-m.width/2,y:r-i/2+m.height+S}]:[{x:n-_/2,y:r-i/2},{x:n+_/2,y:r-i/2},{x:n+_/2,y:r-i/2+x},{x:n+m.width/2,y:r-i/2+x},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+x},{x:n-_/2,y:r-i/2+x}],q.polygon(e,a,t)},g}async function yt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:o}=(0,i.styles2String)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,f=Math.max(s,c),p=r?.wrappingWidth;e.width=Math.max(f,p??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),b=e.label?8:0,x="t"===e.pos,{nodeBorder:_,mainBkg:v}=n,{stylesMap:w}=(0,i.compileStyles)(e),k=h.default.svg(g),C=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const S=w.get("fill");C.stroke=S??v;const T=g.append("g");e.icon&&T.html(`<g>${await(0,a.getIconSVG)(e.icon,{height:f,width:f,fallbackPrefix:""})}</g>`);const M=T.node().getBBox(),A=M.width,B=M.height,L=M.x,E=M.y,F=Math.max(A,B)*Math.SQRT2+40,$=k.circle(0,0,F,C),O=Math.max(F,m.width),N=F+m.height+b,D=k.rectangle(-O/2,-N/2,O,N,{...C,fill:"transparent",stroke:"none"}),z=g.insert(()=>$,":first-child"),I=g.insert(()=>D);return T.attr("transform",`translate(${-A/2-L},${x?m.height/2+b/2-B/2-E:-m.height/2-b/2-B/2-E})`),T.attr("style",`color: ${w.get("stroke")??_};`),y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-N/2:N/2-m.height})`),z.attr("transform",`translate(0,${x?m.height/2+b/2:-m.height/2-b/2})`),d(e,I),e.intersect=function(t){return l.log.info("iconSquare intersect",e,t),q.rect(e,t)},g}async function bt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:o}=(0,i.styles2String)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,f=Math.max(s,c),p=r?.wrappingWidth;e.width=Math.max(f,p??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:b}=await u(t,e,"icon-shape default"),x="t"===e.pos,_=f+2*y,v=f+2*y,{nodeBorder:k,mainBkg:C}=n,{stylesMap:S}=(0,i.compileStyles)(e),T=-v/2,M=-_/2,A=e.label?8:0,B=h.default.svg(g),L=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const E=S.get("fill");L.stroke=E??C;const F=B.path(w(T,M,v,_,5),L),$=Math.max(v,m.width),O=_+m.height+A,N=B.rectangle(-$/2,-O/2,$,O,{...L,fill:"transparent",stroke:"none"}),D=g.insert(()=>F,":first-child").attr("class","icon-shape2"),z=g.insert(()=>N);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.getIconSVG)(e.icon,{height:f,width:f,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,o=n.x,s=n.y;t.attr("transform",`translate(${-r/2-o},${x?m.height/2+A/2-i/2-s:-m.height/2-A/2-i/2-s})`),t.attr("style",`color: ${S.get("stroke")??k};`)}return b.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-O/2:O/2-m.height})`),D.attr("transform",`translate(0,${x?m.height/2+A/2:-m.height/2-A/2})`),d(e,z),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];return a=x?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+A},{x:n+v/2,y:r-i/2+m.height+A},{x:n+v/2,y:r+i/2},{x:n-v/2,y:r+i/2},{x:n-v/2,y:r-i/2+m.height+A},{x:n-m.width/2,y:r-i/2+m.height+A}]:[{x:n-v/2,y:r-i/2},{x:n+v/2,y:r-i/2},{x:n+v/2,y:r-i/2+_},{x:n+m.width/2,y:r-i/2+_},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+_},{x:n-v/2,y:r-i/2+_}],q.polygon(e,a,t)},g}async function xt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:o}=(0,i.styles2String)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,f=Math.max(s,c),p=r?.wrappingWidth;e.width=Math.max(f,p??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:b}=await u(t,e,"icon-shape default"),x="t"===e.pos,_=f+2*y,v=f+2*y,{nodeBorder:k,mainBkg:C}=n,{stylesMap:S}=(0,i.compileStyles)(e),T=-v/2,M=-_/2,A=e.label?8:0,B=h.default.svg(g),L=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const E=S.get("fill");L.stroke=E??C;const F=B.path(w(T,M,v,_,.1),L),$=Math.max(v,m.width),O=_+m.height+A,N=B.rectangle(-$/2,-O/2,$,O,{...L,fill:"transparent",stroke:"none"}),D=g.insert(()=>F,":first-child"),z=g.insert(()=>N);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.getIconSVG)(e.icon,{height:f,width:f,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,o=n.x,s=n.y;t.attr("transform",`translate(${-r/2-o},${x?m.height/2+A/2-i/2-s:-m.height/2-A/2-i/2-s})`),t.attr("style",`color: ${S.get("stroke")??k};`)}return b.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-O/2:O/2-m.height})`),D.attr("transform",`translate(0,${x?m.height/2+A/2:-m.height/2-A/2})`),d(e,z),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];return a=x?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+A},{x:n+v/2,y:r-i/2+m.height+A},{x:n+v/2,y:r+i/2},{x:n-v/2,y:r+i/2},{x:n-v/2,y:r-i/2+m.height+A},{x:n-m.width/2,y:r-i/2+m.height+A}]:[{x:n-v/2,y:r-i/2},{x:n+v/2,y:r-i/2},{x:n+v/2,y:r-i/2+_},{x:n+m.width/2,y:r-i/2+_},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+_},{x:n-v/2,y:r-i/2+_}],q.polygon(e,a,t)},g}async function _t(t,e,{config:{flowchart:n}}){const r=new Image;r.src=e?.img??"",await r.decode();const a=Number(r.naturalWidth.toString().replace("px","")),o=Number(r.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:s}=(0,i.styles2String)(e);e.labelStyle=s;const c=n?.wrappingWidth;e.defaultWidth=n?.wrappingWidth;const f=Math.max(e.label?c??0:0,e?.assetWidth??a),p="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:f,g="on"===e.constraint?p/e.imageAspectRatio:e?.assetHeight??o;e.width=Math.max(p,c??0);const{shapeSvg:m,bbox:y,label:b}=await u(t,e,"image-shape default"),x="t"===e.pos,_=-p/2,v=-g/2,w=e.label?8:0,k=h.default.svg(m),C=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const S=k.rectangle(_,v,p,g,C),T=Math.max(p,y.width),M=g+y.height+w,A=k.rectangle(-T/2,-M/2,T,M,{...C,fill:"none",stroke:"none"}),B=m.insert(()=>S,":first-child"),L=m.insert(()=>A);if(e.img){const t=m.append("image");t.attr("href",e.img),t.attr("width",p),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-p/2},${x?M/2-g:-M/2})`)}return b.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-g/2-y.height/2-w/2:g/2-y.height/2+w/2})`),B.attr("transform",`translate(0,${x?y.height/2+w/2:-y.height/2-w/2})`),d(e,L),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];return a=x?[{x:n-y.width/2,y:r-i/2},{x:n+y.width/2,y:r-i/2},{x:n+y.width/2,y:r-i/2+y.height+w},{x:n+p/2,y:r-i/2+y.height+w},{x:n+p/2,y:r+i/2},{x:n-p/2,y:r+i/2},{x:n-p/2,y:r-i/2+y.height+w},{x:n-y.width/2,y:r-i/2+y.height+w}]:[{x:n-p/2,y:r-i/2},{x:n+p/2,y:r-i/2},{x:n+p/2,y:r-i/2+g},{x:n+y.width/2,y:r-i/2+g},{x:n+y.width/2/2,y:r+i/2},{x:n-y.width/2,y:r+i/2},{x:n-y.width/2,y:r-i/2+g},{x:n-p/2,y:r-i/2+g}],q.polygon(e,a,t)},m}async function vt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:-3*l/6,y:-l}];let f;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(c),o=t.path(r,n);f=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),m&&f.attr("style",m)}else f=U(a,s,l,c);return r&&f.attr("style",r),e.width=s,e.height=l,d(e,f),e.intersect=function(t){return q.polygon(e,c,t)},a}async function wt(t,e,n){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:s,bbox:l}=await u(t,e,p(e)),c=Math.max(l.width+2*n.labelPaddingX,e?.width||0),f=Math.max(l.height+2*n.labelPaddingY,e?.height||0),g=-c/2,m=-f/2;let y,{rx:b,ry:x}=e;const{cssStyles:_}=e;if(n?.rx&&n.ry&&(b=n.rx,x=n.ry),"handDrawn"===e.look){const t=h.default.svg(s),n=(0,i.userNodeOverrides)(e,{}),r=b||x?t.path(w(g,m,c,f,b||0),n):t.rectangle(g,m,c,f,n);y=s.insert(()=>r,":first-child"),y.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(_))}else y=s.insert("rect",":first-child"),y.attr("class","basic label-container").attr("style",a).attr("rx",(0,o.handleUndefinedAttr)(b)).attr("ry",(0,o.handleUndefinedAttr)(x)).attr("x",g).attr("y",m).attr("width",c).attr("height",f);return d(e,y),e.calcIntersect=function(t,e){return q.rect(t,e)},e.intersect=function(t){return q.rect(e,t)},s}async function kt(t,e){const{shapeSvg:n,bbox:r,label:i}=await u(t,e,"label"),a=n.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),n.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),d(e,a),e.intersect=function(t){return q.rect(e,t)},n}async function Ct(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:-3*l/6,y:-l}];let f;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(c),o=t.path(r,n);f=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),m&&f.attr("style",m)}else f=U(a,s,l,c);return r&&f.attr("style",r),e.width=s,e.height=l,d(e,f),e.intersect=function(t){return q.polygon(e,c,t)},a}async function St(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),c=[{x:-3*l/6,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:0,y:-l}];let f;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(c),o=t.path(r,n);f=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),m&&f.attr("style",m)}else f=U(a,s,l,c);return r&&f.attr("style",r),e.width=s,e.height=l,d(e,f),e.intersect=function(t){return q.polygon(e,c,t)},a}function Tt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=Math.max(35,e?.width??0),c=Math.max(35,e?.height??0),u=[{x:s,y:0},{x:0,y:c+3.5},{x:s-14,y:c+3.5},{x:0,y:2*c},{x:s,y:c-3.5},{x:14,y:c-3.5}],f=h.default.svg(a),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=g(u),b=f.path(y,m),x=a.insert(()=>b,":first-child");return o&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",r),x.attr("transform",`translate(-${s/2},${-c})`),d(e,x),e.intersect=function(t){return l.log.info("lightningBolt intersect",e,t),q.polygon(e,u,t)},a}(0,l.__name)(st,"cylinder"),(0,l.__name)(lt,"dividedRectangle"),(0,l.__name)(ct,"doublecircle"),(0,l.__name)(ht,"filledCircle"),(0,l.__name)(ut,"flippedTriangle"),(0,l.__name)(ft,"forkJoin"),(0,l.__name)(dt,"halfRoundedRectangle"),(0,l.__name)(pt,"hexagon"),(0,l.__name)(gt,"hourglass"),(0,l.__name)(mt,"icon"),(0,l.__name)(yt,"iconCircle"),(0,l.__name)(bt,"iconRounded"),(0,l.__name)(xt,"iconSquare"),(0,l.__name)(_t,"imageSquare"),(0,l.__name)(vt,"inv_trapezoid"),(0,l.__name)(wt,"drawRect"),(0,l.__name)(kt,"labelRect"),(0,l.__name)(Ct,"lean_left"),(0,l.__name)(St,"lean_right"),(0,l.__name)(Tt,"lightningBolt");var Mt=(0,l.__name)((t,e,n,r,i,a,o)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r,`M${t},${e+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createCylinderPathD"),At=(0,l.__name)((t,e,n,r,i,a,o)=>[`M${t},${e+a}`,`M${t+n},${e+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r,`M${t},${e+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createOuterCylinderPathD"),Bt=(0,l.__name)((t,e,n,r,i,a)=>[`M${t-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function Lt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,p(e)),c=Math.max(s.width+(e.padding??0),e.width??0),f=c/2,g=f/(2.5+c/50),m=Math.max(s.height+g+(e.padding??0),e.height??0),y=.1*m;let b;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=At(0,0,c,m,f,g,y),r=Bt(0,g,c,m,f,g),o=(0,i.userNodeOverrides)(e,{}),s=t.path(n,o),l=t.path(r,o);a.insert(()=>l,":first-child").attr("class","line"),b=a.insert(()=>s,":first-child"),b.attr("class","basic label-container"),x&&b.attr("style",x)}else{const t=Mt(0,0,c,m,f,g,y);b=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(x)).attr("style",r)}return b.attr("label-offset-y",g),b.attr("transform",`translate(${-c/2}, ${-(m/2+g)})`),d(e,b),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+g-(s.y-(s.top??0))})`),e.intersect=function(t){const n=q.rect(e,t),r=n.x-(e.x??0);if(0!=f&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(n.y-(e.y??0))>(e.height??0)/2-g)){let i=g*g*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=g-i,t.y-(e.y??0)>0&&(i=-i),n.y+=i}return n},a}async function Et(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=c/4,g=c+f,{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=[{x:-l/2-l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:g/2},...m(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,f,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2},{x:-l/2,y:-g/2},{x:-l/2,y:g/2*1.1},{x:-l/2,y:-g/2}],v=b.polygon(_.map(t=>[t.x,t.y]),x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),w.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)-f/2-(o.y-(o.top??0))})`),d(e,w),e.intersect=function(t){return q.polygon(e,_,t)},a}async function Ft(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=-l/2,m=-c/2,{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{}),_=[{x:f-5,y:m+5},{x:f-5,y:m+c+5},{x:f+l-5,y:m+c+5},{x:f+l-5,y:m+c},{x:f+l,y:m+c},{x:f+l,y:m+c-5},{x:f+l+5,y:m+c-5},{x:f+l+5,y:m-5},{x:f+5,y:m-5},{x:f+5,y:m},{x:f,y:m},{x:f,y:m+5}],v=[{x:f,y:m+5},{x:f+l-5,y:m+5},{x:f+l-5,y:m+c},{x:f+l,y:m+c},{x:f+l,y:m},{x:f,y:m}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const w=g(_),k=b.path(w,x),C=g(v),S=b.path(C,{...x,fill:"none"}),T=a.insert(()=>S,":first-child");return T.insert(()=>k,":first-child"),T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),d(e,T),e.intersect=function(t){return q.polygon(e,_,t)},a}async function $t(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=c/4,y=c+f,b=-l/2,x=-y/2,{cssStyles:_}=e,v=m(b-5,x+y+5,b+l-5,x+y+5,f,.8),w=v?.[v.length-1],k=[{x:b-5,y:x+5},{x:b-5,y:x+y+5},...v,{x:b+l-5,y:w.y-5},{x:b+l,y:w.y-5},{x:b+l,y:w.y-10},{x:b+l+5,y:w.y-10},{x:b+l+5,y:x-5},{x:b+5,y:x-5},{x:b+5,y:x},{x:b,y:x},{x:b,y:x+5}],C=[{x:b,y:x+5},{x:b+l-5,y:x+5},{x:b+l-5,y:w.y-5},{x:b+l,y:w.y-5},{x:b+l,y:x},{x:b,y:x}],S=h.default.svg(a),T=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const M=g(k),A=S.path(M,T),B=g(C),L=S.path(B,T),E=a.insert(()=>A,":first-child");return E.insert(()=>L),E.attr("class","basic label-container"),_&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",_),r&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",r),E.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-f/2-(o.y-(o.top??0))})`),d(e,E),e.intersect=function(t){return q.polygon(e,k,t)},a}async function Ot(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r,e.useHtmlLabels||!1!==(0,s.getConfig)().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:o,bbox:l,label:c}=await u(t,e,p(e)),f=Math.max(l.width+2*(e.padding??0),e?.width??0),g=Math.max(l.height+2*(e.padding??0),e?.height??0),m=-f/2,y=-g/2,{cssStyles:b}=e,x=h.default.svg(o),_=(0,i.userNodeOverrides)(e,{fill:n.noteBkgColor,stroke:n.noteBorderColor});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=x.rectangle(m,y,f,g,_),w=o.insert(()=>v,":first-child");return w.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",b),a&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",a),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),d(e,w),e.intersect=function(t){return q.rect(e,t)},o}(0,l.__name)(Lt,"linedCylinder"),(0,l.__name)(Et,"linedWaveEdgedRect"),(0,l.__name)(Ft,"multiRect"),(0,l.__name)($t,"multiWaveEdgedRectangle"),(0,l.__name)(Ot,"note");var Nt=(0,l.__name)((t,e,n)=>[`M${t+n/2},${e}`,`L${t+n},${e-n/2}`,`L${t+n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Dt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.width+e.padding+(o.height+e.padding),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=Nt(0,0,s),o=t.path(r,n);c=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),f&&c.attr("style",f)}else c=U(a,s,s,l),c.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return r&&c.attr("style",r),d(e,c),e.calcIntersect=function(t,e){const n=t.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=q.polygon(t,r,e);return{x:i.x-.5,y:i.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function zt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=-Math.max(o.width+(e.padding??0),e?.width??0)/2,c=-Math.max(o.height+(e.padding??0),e?.height??0)/2,f=c/2,m=[{x:l+f,y:c},{x:l,y:0},{x:l+f,y:-c},{x:-l,y:-c},{x:-l,y:c}],{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=g(m),v=b.path(_,x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),w.attr("transform",`translate(${-f/2},0)`),s.attr("transform",`translate(${-f/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),d(e,w),e.intersect=function(t){return q.polygon(e,m,t)},a}async function It(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);let a;e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";const o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=o.insert("g"),f=o.insert("g").attr("class","label").attr("style",r),p=e.description,g=e.label,m=f.node().appendChild(await v(g,e.labelStyle,!0,!0));let y={width:0,height:0};if((0,s.evaluate)((0,s.getConfig2)()?.flowchart?.htmlLabels)){const t=m.children[0],e=(0,c.select)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}l.log.info("Text 2",p);const b=p||[],x=m.getBBox(),_=f.node().appendChild(await v(b.join?b.join("<br/>"):b,e.labelStyle,!0,!0)),k=_.children[0],C=(0,c.select)(_);y=k.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height);const S=(e.padding||0)/2;(0,c.select)(_).attr("transform","translate( "+(y.width>x.width?0:(x.width-y.width)/2)+", "+(x.height+S+5)+")"),(0,c.select)(m).attr("transform","translate( "+(y.width<x.width?0:-(x.width-y.width)/2)+", 0)"),y=f.node().getBBox(),f.attr("transform","translate("+-y.width/2+", "+(-y.height/2-S+3)+")");const T=y.width+(e.padding||0),M=y.height+(e.padding||0),A=-y.width/2-S,B=-y.height/2-S;let L,E;if("handDrawn"===e.look){const t=h.default.svg(o),n=(0,i.userNodeOverrides)(e,{}),r=t.path(w(A,B,T,M,e.rx||0),n),a=t.line(-y.width/2-S,-y.height/2-S+x.height+S,y.width/2+S,-y.height/2-S+x.height+S,n);E=o.insert(()=>(l.log.debug("Rough node insert CXC",r),a),":first-child"),L=o.insert(()=>(l.log.debug("Rough node insert CXC",r),r),":first-child")}else L=u.insert("rect",":first-child"),E=u.insert("line"),L.attr("class","outer title-state").attr("style",r).attr("x",-y.width/2-S).attr("y",-y.height/2-S).attr("width",y.width+(e.padding||0)).attr("height",y.height+(e.padding||0)),E.attr("class","divider").attr("x1",-y.width/2-S).attr("x2",y.width/2+S).attr("y1",-y.height/2-S+x.height+S).attr("y2",-y.height/2-S+x.height+S);return d(e,L),e.intersect=function(t){return q.rect(e,t)},o}function Pt(t,e,n,r,i,a,o){const s=(t+n)/2,l=(e+r)/2,c=Math.atan2(r-e,n-t),h=(n-t)/2/i,u=(r-e)/2/a,f=Math.sqrt(h**2+u**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const d=Math.sqrt(1-f**2),p=s+d*a*Math.sin(c)*(o?-1:1),g=l-d*i*Math.cos(c)*(o?-1:1),m=Math.atan2((e-g)/a,(t-p)/i);let y=Math.atan2((r-g)/a,(n-p)/i)-m;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);const b=[];for(let t=0;t<20;t++){const e=m+t/19*y,n=p+i*Math.cos(e),r=g+a*Math.sin(e);b.push({x:n,y:r})}return b}async function Rt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=e?.padding??0,l=e?.padding??0,c=(e?.width?e?.width:o.width)+2*s,f=(e?.height?e?.height:o.height)+2*l,m=e.radius||5,y=e.taper||5,{cssStyles:b}=e,x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{});e.stroke&&(_.stroke=e.stroke),"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=[{x:-c/2+y,y:-f/2},{x:c/2-y,y:-f/2},...Pt(c/2-y,-f/2,c/2,-f/2+y,m,m,!0),{x:c/2,y:-f/2+y},{x:c/2,y:f/2-y},...Pt(c/2,f/2-y,c/2-y,f/2,m,m,!0),{x:c/2-y,y:f/2},{x:-c/2+y,y:f/2},...Pt(-c/2+y,f/2,-c/2,f/2-y,m,m,!0),{x:-c/2,y:f/2-y},{x:-c/2,y:-f/2+y},...Pt(-c/2,-f/2+y,-c/2+y,-f/2,m,m,!0)],w=g(v),k=x.path(w,_),C=a.insert(()=>k,":first-child");return C.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",b),r&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",r),d(e,C),e.intersect=function(t){return q.polygon(e,v,t)},a}async function qt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,p(e)),c=e?.padding??0,f=Math.max(s.width+2*(e.padding??0),e?.width??0),g=Math.max(s.height+2*(e.padding??0),e?.height??0),m=-s.width/2-c,y=-s.height/2-c,{cssStyles:b}=e,x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=[{x:m,y},{x:m+f+8,y},{x:m+f+8,y:y+g},{x:m-8,y:y+g},{x:m-8,y},{x:m,y},{x:m,y:y+g}],w=x.polygon(v.map(t=>[t.x,t.y]),_),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(b)),r&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",r),b&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",r),l.attr("transform",`translate(${-f/2+4+(e.padding??0)-(s.x-(s.left??0))},${-g/2+(e.padding??0)-(s.y-(s.top??0))})`),d(e,k),e.intersect=function(t){return q.rect(e,t)},a}async function jt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=-l/2,m=-c/2,{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=[{x:f,y:m},{x:f,y:m+c},{x:f+l,y:m+c},{x:f+l,y:m-c/2}],v=g(_),w=b.path(v,x),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",y),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),k.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))}, ${-c/4+(e.padding??0)-(o.y-(o.top??0))})`),d(e,k),e.intersect=function(t){return q.polygon(e,_,t)},a}async function Wt(t,e){return wt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Ht(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.height+e.padding,l=o.width+s/4+e.padding,c=s/2,{cssStyles:f}=e,m=h.default.svg(a),b=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-l/2+c,y:-s/2},{x:l/2-c,y:-s/2},...y(-l/2+c,0,c,50,90,270),{x:l/2-c,y:s/2},...y(l/2-c,0,c,50,270,450)],_=g(x),v=m.path(_,b),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",f),r&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",r),d(e,w),e.intersect=function(t){return q.polygon(e,x,t)},a}async function Ut(t,e){return wt(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function Yt(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r;const{cssStyles:o}=e,{lineColor:s,stateBorder:l,nodeBorder:c}=n,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),f=h.default.svg(u),p=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=f.circle(0,0,14,{...p,stroke:s,strokeWidth:2}),m=l??c,y=f.circle(0,0,5,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),b=u.insert(()=>g,":first-child");return b.insert(()=>y),o&&b.selectAll("path").attr("style",o),a&&b.selectAll("path").attr("style",a),d(e,b),e.intersect=function(t){return q.circle(e,7,t)},u}function Gt(t,e,{config:{themeVariables:n}}){const{lineColor:r}=n,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if("handDrawn"===e.look){const t=h.default.svg(a).circle(0,0,14,(0,i.solidStateFill)(r));o=a.insert(()=>t),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return d(e,o),e.intersect=function(t){return q.circle(e,7,t)},a}async function Vt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,p(e)),l=(e?.padding||0)/2,c=s.width+e.padding,f=s.height+e.padding,g=-s.width/2-l,m=-s.height/2-l,y=[{x:0,y:0},{x:c,y:0},{x:c,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=t.rectangle(g-8,m,c+16,f,n),s=t.line(g,m,g,m+f,n),l=t.line(g+c,m,g+c,m+f,n);a.insert(()=>s,":first-child"),a.insert(()=>l,":first-child");const u=a.insert(()=>r,":first-child"),{cssStyles:p}=e;u.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(p)),d(e,u)}else{const t=U(a,c,f,y);r&&t.attr("style",r),d(e,t)}return e.intersect=function(t){return q.polygon(e,y,t)},a}async function Xt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=-s/2,f=-l/2,m=.2*l,y=.2*l,{cssStyles:b}=e,x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{}),v=[{x:c-m/2,y:f},{x:c+s+m/2,y:f},{x:c+s+m/2,y:f+l},{x:c-m/2,y:f+l}],w=[{x:c+s-m/2,y:f+l},{x:c+s+m/2,y:f+l},{x:c+s+m/2,y:f+l-y}];"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const k=g(v),C=x.path(k,_),S=g(w),T=x.path(S,{..._,fillStyle:"solid"}),M=a.insert(()=>T,":first-child");return M.insert(()=>C,":first-child"),M.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",b),r&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",r),d(e,M),e.intersect=function(t){return q.polygon(e,v,t)},a}async function Zt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=c/4,y=.2*l,b=.2*c,x=c+f,{cssStyles:_}=e,v=h.default.svg(a),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:x/2},...m(-l/2-l/2*.1,x/2,l/2+l/2*.1,x/2,f,.8),{x:l/2+l/2*.1,y:-x/2},{x:-l/2-l/2*.1,y:-x/2}],C=-l/2+l/2*.1,S=-x/2-.4*b,T=[{x:C+l-y,y:1.4*(S+c)},{x:C+l,y:S+c-b},{x:C+l,y:.9*(S+c)},...m(C+l,1.3*(S+c),C+l-y,1.5*(S+c),.03*-c,.5)],M=g(k),A=v.path(M,w),B=g(T),L=v.path(B,{...w,fillStyle:"solid"}),E=a.insert(()=>L,":first-child");return E.insert(()=>A,":first-child"),E.attr("class","basic label-container"),_&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",_),r&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",r),E.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-c/2+(e.padding??0)-f/2-(o.y-(o.top??0))})`),d(e,E),e.intersect=function(t){return q.polygon(e,k,t)},a}async function Qt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+e.padding,e?.width||0),l=Math.max(o.height+e.padding,e?.height||0),c=-s/2,h=-l/2,f=a.insert("rect",":first-child");return f.attr("class","text").attr("style",r).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",s).attr("height",l),d(e,f),e.intersect=function(t){return q.rect(e,t)},a}(0,l.__name)(Dt,"question"),(0,l.__name)(zt,"rect_left_inv_arrow"),(0,l.__name)(It,"rectWithTitle"),(0,l.__name)(Pt,"generateArcPoints"),(0,l.__name)(Rt,"roundedRect"),(0,l.__name)(qt,"shadedProcess"),(0,l.__name)(jt,"slopedRect"),(0,l.__name)(Wt,"squareRect"),(0,l.__name)(Ht,"stadium"),(0,l.__name)(Ut,"state"),(0,l.__name)(Yt,"stateEnd"),(0,l.__name)(Gt,"stateStart"),(0,l.__name)(Vt,"subroutine"),(0,l.__name)(Xt,"taggedRect"),(0,l.__name)(Zt,"taggedWaveEdgedRectangle"),(0,l.__name)(Qt,"text");var Kt=(0,l.__name)((t,e,n,r,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-r}\n l${n},0\n a${i},${a} 0,0,1 0,${r}\n M${n},${-r}\n a${i},${a} 0,0,0 0,${r}\n l${-n},0`,"createCylinderPathD"),Jt=(0,l.__name)((t,e,n,r,i,a)=>[`M${t},${e}`,`M${t+n},${e}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(" "),"createOuterCylinderPathD"),te=(0,l.__name)((t,e,n,r,i,a)=>[`M${t+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(" "),"createInnerCylinderPathD");async function ee(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l,halfPadding:c}=await u(t,e,p(e)),f="neo"===e.look?2*c:c,g=s.height+f,m=g/2,y=m/(2.5+g/50),b=s.width+y+f,{cssStyles:x}=e;let _;if("handDrawn"===e.look){const t=h.default.svg(a),n=Jt(0,0,b,g,y,m),r=te(0,0,b,g,y,m),o=t.path(n,(0,i.userNodeOverrides)(e,{})),s=t.path(r,(0,i.userNodeOverrides)(e,{fill:"none"}));_=a.insert(()=>s,":first-child"),_=a.insert(()=>o,":first-child"),_.attr("class","basic label-container"),x&&_.attr("style",x)}else{const t=Kt(0,0,b,g,y,m);_=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(x)).attr("style",r),_.attr("class","basic label-container"),x&&_.selectAll("path").attr("style",x),r&&_.selectAll("path").attr("style",r)}return _.attr("label-offset-x",y),_.attr("transform",`translate(${-b/2}, ${g/2} )`),l.attr("transform",`translate(${-s.width/2-y-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),d(e,_),e.intersect=function(t){const n=q.rect(e,t),r=n.y-(e.y??0);if(0!=m&&(Math.abs(r)<(e.height??0)/2||Math.abs(r)==(e.height??0)/2&&Math.abs(n.x-(e.x??0))>(e.width??0)/2-y)){let i=y*y*(1-r*r/(m*m));0!=i&&(i=Math.sqrt(Math.abs(i))),i=y-i,t.x-(e.x??0)>0&&(i=-i),n.x+=i}return n},a}async function ne(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.width+e.padding,l=o.height+e.padding,c=[{x:-3*l/6,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:0,y:-l}];let f;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(c),o=t.path(r,n);f=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),m&&f.attr("style",m)}else f=U(a,s,l,c);return r&&f.attr("style",r),e.width=s,e.height=l,d(e,f),e.intersect=function(t){return q.polygon(e,c,t)},a}async function re(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(60,o.width+2*(e.padding??0),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),{cssStyles:c}=e,f=h.default.svg(a),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2*.8,y:-l/2},{x:s/2*.8,y:-l/2},{x:s/2,y:-l/2*.6},{x:s/2,y:l/2},{x:-s/2,y:l/2},{x:-s/2,y:-l/2*.6}],b=g(y),x=f.path(b,m),_=a.insert(()=>x,":first-child");return _.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",r),d(e,_),e.intersect=function(t){return q.polygon(e,y,t)},a}async function ie(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:c}=await u(t,e,p(e)),f=(0,s.evaluate)((0,s.getConfig2)().flowchart?.htmlLabels),m=o.width+(e.padding??0),y=m+o.height,b=m+o.height,x=[{x:0,y:0},{x:b,y:0},{x:b/2,y:-y}],{cssStyles:_}=e,v=h.default.svg(a),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=g(x),C=v.path(k,w),S=a.insert(()=>C,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`);return _&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",_),r&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",r),e.width=m,e.height=y,d(e,S),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${y/2-(o.height+(e.padding??0)/(f?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return l.log.info("Triangle intersect",e,x,t),q.polygon(e,x,t)},a}async function ae(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=c/8,y=c+f,{cssStyles:b}=e,x=70-l,_=x>0?x/2:0,v=h.default.svg(a),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-l/2-_,y:y/2},...m(-l/2-_,y/2,l/2+_,y/2,f,.8),{x:l/2+_,y:-y/2},{x:-l/2-_,y:-y/2}],C=g(k),S=v.path(C,w),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",b),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),T.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-c/2+(e.padding??0)-f-(o.y-(o.top??0))})`),d(e,T),e.intersect=function(t){return q.polygon(e,k,t)},a}async function oe(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=s/l;let f=s,y=l;f>y*c?y=f/c:f=y*c,f=Math.max(f,100),y=Math.max(y,50);const b=Math.min(.2*y,y/4),x=y+2*b,{cssStyles:_}=e,v=h.default.svg(a),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-f/2,y:x/2},...m(-f/2,x/2,f/2,x/2,b,1),{x:f/2,y:-x/2},...m(f/2,-x/2,-f/2,-x/2,b,-1)],C=g(k),S=v.path(C,w),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),_&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",_),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),d(e,T),e.intersect=function(t){return q.polygon(e,k,t)},a}async function se(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=-l/2,g=-c/2,{cssStyles:m}=e,y=h.default.svg(a),b=(0,i.userNodeOverrides)(e,{}),x=[{x:f-5,y:g-5},{x:f-5,y:g+c},{x:f+l,y:g+c},{x:f+l,y:g-5}],_=`M${f-5},${g-5} L${f+l},${g-5} L${f+l},${g+c} L${f-5},${g+c} L${f-5},${g-5}\n M${f-5},${g} L${f+l},${g}\n M${f},${g-5} L${f},${g+c}`;"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const v=y.path(_,b),w=a.insert(()=>v,":first-child");return w.attr("transform","translate(2.5, 2.5)"),w.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),s.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),d(e,w),e.intersect=function(t){return q.polygon(e,x,t)},a}async function le(t,e){const n=e;if(n.alias&&(e.label=n.alias),"handDrawn"===e.look){const{themeVariables:n}=(0,s.getConfig)(),{background:r}=n,i={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${r}`]};await le(t,i)}const r=(0,s.getConfig)();e.useHtmlLabels=r.htmlLabels;let a=r.er?.diagramPadding??10,l=r.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:f,nodeStyles:g}=(0,i.styles2String)(e);if(0===n.attributes.length&&e.label){const n={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a,classes:""};(0,o.calculateTextWidth)(e.label,r)+2*n.labelPaddingX<r.er.minEntityWidth&&(e.width=r.er.minEntityWidth);const i=await wt(t,e,n);if(!(0,s.evaluate)(r.htmlLabels)){const t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}r.htmlLabels||(a*=1.25,l*=1.25);let m=p(e);m||(m="node default");const y=t.insert("g").attr("class",m).attr("id",e.domId||e.id),b=await ce(y,e.label??"",r,0,0,["name"],f);b.height+=l;let x=0;const _=[],v=[];let w=0,k=0,C=0,S=0,T=!0,M=!0;for(const t of n.attributes){const e=await ce(y,t.type,r,0,x,["attribute-type"],f);w=Math.max(w,e.width+a);const n=await ce(y,t.name,r,0,x,["attribute-name"],f);k=Math.max(k,n.width+a);const i=await ce(y,t.keys.join(),r,0,x,["attribute-keys"],f);C=Math.max(C,i.width+a);const o=await ce(y,t.comment,r,0,x,["attribute-comment"],f);S=Math.max(S,o.width+a);const s=Math.max(e.height,n.height,i.height,o.height)+l;v.push({yOffset:x,rowHeight:s}),x+=s}let A=4;C<=a&&(T=!1,C=0,A--),S<=a&&(M=!1,S=0,A--);const B=y.node().getBBox();if(b.width+2*a-(w+k+C+S)>0){const t=b.width+2*a-(w+k+C+S);w+=t/A,k+=t/A,C>0&&(C+=t/A),S>0&&(S+=t/A)}const L=w+k+C+S,E=h.default.svg(y),F=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");let $=0;v.length>0&&($=v.reduce((t,e)=>t+(e?.rowHeight??0),0));const O=Math.max(B.width+2*a,e?.width||0,L),N=Math.max(($??0)+b.height,e?.height||0),D=-O/2,z=-N/2;y.selectAll("g:not(:first-child)").each((t,e,n)=>{const r=(0,c.select)(n[e]),i=r.attr("transform");let o=0,s=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(o=parseFloat(t[1]),s=parseFloat(t[2]),r.attr("class").includes("attribute-name")?o+=w:r.attr("class").includes("attribute-keys")?o+=w+k:r.attr("class").includes("attribute-comment")&&(o+=w+k+C))}r.attr("transform",`translate(${D+a/2+o}, ${s+z+b.height+l/2})`)}),y.select(".name").attr("transform","translate("+-b.width/2+", "+(z+l/2)+")");const I=E.rectangle(D,z,O,N,F),P=y.insert(()=>I,":first-child").attr("style",u.join("")),{themeVariables:R}=(0,s.getConfig)(),{rowEven:j,rowOdd:W,nodeBorder:H}=R;_.push(0);for(const[t,e]of v.entries()){const n=(t+1)%2==0&&0!==e.yOffset,r=E.rectangle(D,b.height+z+e?.yOffset,O,e?.rowHeight,{...F,fill:n?j:W,stroke:H});y.insert(()=>r,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(n?"even":"odd"))}let U=E.line(D,b.height+z,O+D,b.height+z,F);y.insert(()=>U).attr("class","divider"),U=E.line(w+D,b.height+z,w+D,N+z,F),y.insert(()=>U).attr("class","divider"),T&&(U=E.line(w+k+D,b.height+z,w+k+D,N+z,F),y.insert(()=>U).attr("class","divider")),M&&(U=E.line(w+k+C+D,b.height+z,w+k+C+D,N+z,F),y.insert(()=>U).attr("class","divider"));for(const t of _)U=E.line(D,b.height+z+t,O+D,b.height+z+t,F),y.insert(()=>U).attr("class","divider");if(d(e,P),g&&"handDrawn"!==e.look){const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");y.selectAll("path").attr("style",e??""),y.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return q.rect(e,t)},y}async function ce(t,e,n,r=0,i=0,l=[],h=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${r}, ${i})`).attr("style",h);e!==(0,s.parseGenericTypes)(e)&&(e=(e=(0,s.parseGenericTypes)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const f=u.node().appendChild(await(0,a.createText)(u,e,{width:(0,o.calculateTextWidth)(e,n)+100,style:h,useHtmlLabels:n.htmlLabels},n));if(e.includes("&lt;")||e.includes("&gt;")){let t=f.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let d=f.getBBox();if((0,s.evaluate)(n.htmlLabels)){const t=f.children[0];t.style.textAlign="start";const e=(0,c.select)(f);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return d}async function he(t,e,n,r,i=n.class.padding??12){const a=r?0:3,o=t.insert("g").attr("class",p(e)).attr("id",e.domId||e.id);let s=null,l=null,c=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await ue(s,{text:`«${t}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ue(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const t of e.members)m+=await ue(c,t,m,[t.parseClassifier()])+a;d=c.node().getBBox().height,d<=0&&(d=i/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const t of e.methods)y+=await ue(h,t,y,[t.parseClassifier()])+a;let b=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),b=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+2*i})`),b=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+4*i:2*i)})`),b=o.node().getBBox(),{shapeSvg:o,bbox:b}}async function ue(t,e,n,r=[]){const i=t.insert("g").attr("class","label").attr("style",r.join("; ")),h=(0,s.getConfig)();let u="useHtmlLabels"in e?e.useHtmlLabels:(0,s.evaluate)(h.htmlLabels)??!0,f="";f="text"in e?e.text:e.label,!u&&f.startsWith("\\")&&(f=f.substring(1)),(0,s.hasKatex)(f)&&(u=!0);const d=await(0,a.createText)(i,(0,s.sanitizeText2)((0,o.decodeEntities)(f)),{width:(0,o.calculateTextWidth)(f,h)+50,classes:"markdown-node-label",useHtmlLabels:u},h);let p,g=1;if(u){const t=d.children[0],e=(0,c.select)(d);g=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(g+=t.innerHTML.split("<mrow>").length-1);const n=t.getElementsByTagName("img");if(n){const t=""===f.replace(/<img[^>]*>/g,"").trim();await Promise.all([...n].map(e=>new Promise(n=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=h.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,n=5,r=parseInt(t,10)*n+"px";e.style.minWidth=r,e.style.maxWidth=r}else e.style.width="100%";n(e)}(0,l.__name)(r,"setupImage"),setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}else{r.includes("font-weight: bolder")&&(0,c.select)(d).selectAll("tspan").attr("font-weight",""),g=d.children.length;const t=d.children[0];(""===d.textContent||d.textContent.includes("&gt"))&&(t.textContent=f[0]+f.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim()," "===f[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),p=d.getBBox()}return i.attr("transform","translate(0,"+(-p.height/(2*g)+n)+")"),p.height}async function fe(t,e){const n=(0,s.getConfig2)(),r=n.class.padding??12,a=r,o=e.useHtmlLabels??(0,s.evaluate)(n.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:f}=await he(t,e,n,o,a),{labelStyles:p,nodeStyles:g}=(0,i.styles2String)(e);e.labelStyle=p,e.cssStyles=l.styles||"";const m=l.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=m.replaceAll("!important","").split(";"));const y=0===l.members.length&&0===l.methods.length&&!n.class?.hideEmptyMembersBox,b=h.default.svg(u),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=f.width;let v=f.height;0===l.members.length&&0===l.methods.length?v+=a:l.members.length>0&&0===l.methods.length&&(v+=2*a);const w=-_/2,k=-v/2,C=b.rectangle(w-r,k-r-(y?r:0===l.members.length&&0===l.methods.length?-r/2:0),_+2*r,v+2*r+(y?2*r:0===l.members.length&&0===l.methods.length?-r:0),x),S=u.insert(()=>C,":first-child");S.attr("class","basic label-container");const T=S.node().getBBox();u.selectAll(".text").each((t,e,n)=>{const i=(0,c.select)(n[e]),a=i.attr("transform");let s=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(s=parseFloat(t[2]))}let h=s+k+r-(y?r:0===l.members.length&&0===l.methods.length?-r/2:0);o||(h-=4);let f=w;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(f=-i.node()?.getBBox().width/2||0,u.selectAll("text").each(function(t,e,n){"middle"===window.getComputedStyle(n[e]).textAnchor&&(f=0)})),i.attr("transform",`translate(${f}, ${h})`)});const M=u.select(".annotation-group").node().getBBox().height-(y?r/2:0)||0,A=u.select(".label-group").node().getBBox().height-(y?r/2:0)||0,B=u.select(".members-group").node().getBBox().height-(y?r/2:0)||0;if(l.members.length>0||l.methods.length>0||y){const t=b.line(T.x,M+A+k+r,T.x+T.width,M+A+k+r,x);u.insert(()=>t).attr("class","divider").attr("style",m)}if(y||l.members.length>0||l.methods.length>0){const t=b.line(T.x,M+A+B+k+2*a+r,T.x+T.width,M+A+B+k+r+2*a,x);u.insert(()=>t).attr("class","divider").attr("style",m)}if("handDrawn"!==l.look&&u.selectAll("path").attr("style",m),S.select(":nth-child(2)").attr("style",m),u.selectAll(".divider").select("path").attr("style",m),e.labelStyle?u.selectAll("span").attr("style",e.labelStyle):u.selectAll("span").attr("style",m),!o){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(m);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}else if(p){const e=t.exec(p);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}}}return d(e,S),e.intersect=function(t){return q.rect(e,t)},u}async function de(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const a=e,o=e,s="verifyMethod"in e,l=p(e),u=t.insert("g").attr("class",l).attr("id",e.domId??e.id);let f;f=s?await pe(u,`&lt;&lt;${a.type}&gt;&gt;`,0,e.labelStyle):await pe(u,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let g=f;const m=await pe(u,a.name,g,e.labelStyle+"; font-weight: bold;");g+=m+20,s?(g+=await pe(u,a.requirementId?`ID: ${a.requirementId}`:"",g,e.labelStyle),g+=await pe(u,a.text?`Text: ${a.text}`:"",g,e.labelStyle),g+=await pe(u,a.risk?`Risk: ${a.risk}`:"",g,e.labelStyle),await pe(u,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",g,e.labelStyle)):(g+=await pe(u,o.type?`Type: ${o.type}`:"",g,e.labelStyle),await pe(u,o.docRef?`Doc Ref: ${o.docRef}`:"",g,e.labelStyle));const y=(u.node()?.getBBox().width??200)+20,b=(u.node()?.getBBox().height??200)+20,x=-y/2,_=-b/2,v=h.default.svg(u),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=v.rectangle(x,_,y,b,w),C=u.insert(()=>k,":first-child");if(C.attr("class","basic label-container").attr("style",r),u.selectAll(".label").each((t,e,n)=>{const r=(0,c.select)(n[e]),i=r.attr("transform");let a=0,o=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(a=parseFloat(t[1]),o=parseFloat(t[2]))}const s=o-b/2;let l=x+10;0!==e&&1!==e||(l=a),r.attr("transform",`translate(${l}, ${s+20})`)}),g>f+m+20){const t=v.line(x,_+f+m+20,x+y,_+f+m+20,w);u.insert(()=>t).attr("style",r)}return d(e,C),e.intersect=function(t){return q.rect(e,t)},u}async function pe(t,e,n,r=""){if(""===e)return 0;const i=t.insert("g").attr("class","label").attr("style",r),l=(0,s.getConfig2)(),h=l.htmlLabels??!0,u=await(0,a.createText)(i,(0,s.sanitizeText2)((0,o.decodeEntities)(e)),{width:(0,o.calculateTextWidth)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:h,style:r},l);let f;if(h){const t=u.children[0],e=(0,c.select)(u);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{const t=u.children[0];for(const e of t.children)e.textContent=e.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),r&&e.setAttribute("style",r);f=u.getBBox(),f.height+=6}return i.attr("transform",`translate(${-f.width/2},${-f.height/2+n})`),f.height}(0,l.__name)(ee,"tiltedCylinder"),(0,l.__name)(ne,"trapezoid"),(0,l.__name)(re,"trapezoidalPentagon"),(0,l.__name)(ie,"triangle"),(0,l.__name)(ae,"waveEdgedRectangle"),(0,l.__name)(oe,"waveRectangle"),(0,l.__name)(se,"windowPane"),(0,l.__name)(le,"erBox"),(0,l.__name)(ce,"addText"),(0,l.__name)(he,"textHelper"),(0,l.__name)(ue,"addText"),(0,l.__name)(fe,"classBox"),(0,l.__name)(de,"requirementBox"),(0,l.__name)(pe,"addText");var ge=(0,l.__name)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function me(t,e,{config:n}){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r||"";const o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await u(t,e,p(e)),g=e.padding||10;let m,y="";"ticket"in e&&e.ticket&&n?.kanban?.ticketBaseUrl&&(y=n?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),m=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",y).attr("target","_blank"));const b={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,_;({label:x,bbox:_}=m?await f(m,"ticket"in e&&e.ticket||"",b):await f(s,"ticket"in e&&e.ticket||"",b));const{label:v,bbox:k}=await f(s,"assigned"in e&&e.assigned||"",b);e.width=o;const C=e?.width||0,S=Math.max(_.height,k.height)/2,T=Math.max(l.height+20,e?.height||0)+S,M=-C/2,A=-T/2;let B;c.attr("transform","translate("+(g-C/2)+", "+(-S-l.height/2)+")"),x.attr("transform","translate("+(g-C/2)+", "+(-S+l.height/2)+")"),v.attr("transform","translate("+(g+C/2-k.width-20)+", "+(-S+l.height/2)+")");const{rx:L,ry:E}=e,{cssStyles:F}=e;if("handDrawn"===e.look){const t=h.default.svg(s),n=(0,i.userNodeOverrides)(e,{}),r=L||E?t.path(w(M,A,C,T,L||0),n):t.rectangle(M,A,C,T,n);B=s.insert(()=>r,":first-child"),B.attr("class","basic label-container").attr("style",F||null)}else{B=s.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",E??5).attr("x",M).attr("y",A).attr("width",C).attr("height",T);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),n=M+2,r=A+Math.floor((L??0)/2),i=A+T-Math.floor((L??0)/2);e.attr("x1",n).attr("y1",r).attr("x2",n).attr("y2",i).attr("stroke-width","4").attr("stroke",ge(t))}}return d(e,B),e.height=T,e.intersect=function(t){return q.rect(e,t)},s}async function ye(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:c,label:f}=await u(t,e,p(e)),g=s.width+10*c,m=s.height+8*c,y=.15*g,{cssStyles:b}=e,x=s.width+20,_=s.height+20,v=Math.max(g,x),w=Math.max(m,_);let k;f.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const C=`M0 0 \n a${y},${y} 1 0,0 ${.25*v},${-1*w*.1}\n a${y},${y} 1 0,0 ${.25*v},0\n a${y},${y} 1 0,0 ${.25*v},0\n a${y},${y} 1 0,0 ${.25*v},${.1*w}\n\n a${y},${y} 1 0,0 ${.15*v},${.33*w}\n a${.8*y},${.8*y} 1 0,0 0,${.34*w}\n a${y},${y} 1 0,0 ${-1*v*.15},${.33*w}\n\n a${y},${y} 1 0,0 ${-1*v*.25},${.15*w}\n a${y},${y} 1 0,0 ${-1*v*.25},0\n a${y},${y} 1 0,0 ${-1*v*.25},0\n a${y},${y} 1 0,0 ${-1*v*.25},${-1*w*.15}\n\n a${y},${y} 1 0,0 ${-1*v*.1},${-1*w*.33}\n a${.8*y},${.8*y} 1 0,0 0,${-1*w*.34}\n a${y},${y} 1 0,0 ${.1*v},${-1*w*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=t.path(C,n);k=a.insert(()=>r,":first-child"),k.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(b))}else k=a.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",C);return k.attr("transform",`translate(${-v/2}, ${-w/2})`),d(e,k),e.calcIntersect=function(t,e){return q.rect(t,e)},e.intersect=function(t){return l.log.info("Bang intersect",e,t),q.rect(e,t)},a}async function be(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:c,label:f}=await u(t,e,p(e)),g=s.width+2*c,m=s.height+2*c,y=.15*g,b=.25*g,x=.35*g,_=.2*g,{cssStyles:v}=e;let w;const k=`M0 0 \n a${y},${y} 0 0,1 ${.25*g},${-1*g*.1}\n a${x},${x} 1 0,1 ${.4*g},${-1*g*.1}\n a${b},${b} 1 0,1 ${.35*g},${.2*g}\n\n a${y},${y} 1 0,1 ${.15*g},${.35*m}\n a${_},${_} 1 0,1 ${-1*g*.15},${.65*m}\n\n a${b},${y} 1 0,1 ${-1*g*.25},${.15*g}\n a${x},${x} 1 0,1 ${-1*g*.5},0\n a${y},${y} 1 0,1 ${-1*g*.25},${-1*g*.15}\n\n a${y},${y} 1 0,1 ${-1*g*.1},${-1*m*.35}\n a${_},${_} 1 0,1 ${.1*g},${-1*m*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=t.path(k,n);w=a.insert(()=>r,":first-child"),w.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(v))}else w=a.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",k);return f.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),w.attr("transform",`translate(${-g/2}, ${-m/2})`),d(e,w),e.calcIntersect=function(t,e){return q.rect(t,e)},e.intersect=function(t){return l.log.info("Cloud intersect",e,t),q.rect(e,t)},a}async function xe(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,halfPadding:s,label:l}=await u(t,e,p(e)),c=o.width+8*s,h=o.height+2*s,f=`\n M${-c/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${c-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${10-c}\n q-5,0 -5,-5\n Z\n `,g=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",r).attr("d",f);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>l.node()),d(e,g),e.calcIntersect=function(t,e){return q.rect(t,e)},e.intersect=function(t){return q.rect(e,t)},a}async function _e(t,e){return V(t,e,{padding:e.padding??0})}(0,l.__name)(me,"kanbanItem"),(0,l.__name)(ye,"bang"),(0,l.__name)(be,"cloud"),(0,l.__name)(xe,"defaultMindmapNode"),(0,l.__name)(_e,"mindmapCircle");var ve=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Wt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Rt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ht},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Vt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:st},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:V},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ye},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:be},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Dt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:St},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ct},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ne},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:vt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ct},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Qt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Y},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:qt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Gt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ft},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:gt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:K},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:nt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Tt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ae},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:dt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ee},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:rt},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ie},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:se},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ht},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:re},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ut},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:jt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:$t},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ft},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:H},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Z},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Zt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:oe},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:zt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Et}],we=(0,l.__name)(()=>{const t={state:Ut,choice:G,note:Ot,rectWithTitle:It,labelRect:kt,iconSquare:xt,iconCircle:yt,icon:mt,iconRounded:bt,imageSquare:_t,anchor:j,kanbanItem:me,mindmapCircle:_e,defaultMindmapNode:xe,classBox:fe,erBox:le,requirementBox:de},e=[...Object.entries(t),...ve.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function ke(t){return t in we}(0,l.__name)(ke,"isValidShape");var Ce=new Map;async function Se(t,e,n){let r,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?we[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===n.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),i=await a(r,e,n)}else i=await a(t,e,n),r=i;return e.tooltip&&i.attr("title",e.tooltip),Ce.set(e.id,r),e.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}(0,l.__name)(Se,"insertNode");var Te=(0,l.__name)((t,e)=>{Ce.set(e.id,t)},"setNodeElem"),Me=(0,l.__name)(()=>{Ce.clear()},"clear"),Ae=(0,l.__name)(t=>{const e=Ce.get(t.id);l.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")},38698(t,e,n){n.r(e),n.d(e,{JSON_SCHEMA:()=>tn,load:()=>en});var r=n(60162);function i(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:i(t)?[]:[t]}function s(t,e){var n,r,i,a;if(e)for(n=0,r=(a=Object.keys(e)).length;n<r;n+=1)t[i=a[n]]=e[i];return t}function l(t,e){var n,r="";for(n=0;n<e;n+=1)r+=t;return r}function c(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}(0,r.__name)(i,"isNothing"),(0,r.__name)(a,"isObject"),(0,r.__name)(o,"toArray"),(0,r.__name)(s,"extend"),(0,r.__name)(l,"repeat"),(0,r.__name)(c,"isNegativeZero");var h={isNothing:i,isObject:a,toArray:o,repeat:l,isNegativeZero:c,extend:s};function u(t,e){var n="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(n+="\n\n"+t.mark.snippet),r+" "+n):r}function f(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=u(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(0,r.__name)(u,"formatError"),(0,r.__name)(f,"YAMLException$1"),f.prototype=Object.create(Error.prototype),f.prototype.constructor=f,f.prototype.toString=(0,r.__name)(function(t){return this.name+": "+u(this,t)},"toString");var d=f;function p(t,e,n,r,i){var a="",o="",s=Math.floor(i/2)-1;return r-e>s&&(e=r-s+(a=" ... ").length),n-r>s&&(n=r+s-(o=" ...").length),{str:a+t.slice(e,n).replace(/\t/g,"→")+o,pos:r-e+a.length}}function g(t,e){return h.repeat(" ",e-t.length)+t}function m(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,i=[0],a=[],o=-1;n=r.exec(t.buffer);)a.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,f=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=p(t.buffer,i[o-s],a[o-s],t.position-(i[o]-i[o-s]),f),c=h.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=p(t.buffer,i[o],a[o],t.position,f),c+=h.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",c+=h.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=a.length);s++)l=p(t.buffer,i[o+s],a[o+s],t.position-(i[o]-i[o+s]),f),c+=h.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,r.__name)(p,"getLine"),(0,r.__name)(g,"padStart"),(0,r.__name)(m,"makeSnippet");var y=m,b=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],x=["scalar","sequence","mapping"];function _(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}function v(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===b.indexOf(e))throw new d('Unknown option "'+e+'" 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(t){return t},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=_(e.styleAliases||null),-1===x.indexOf(this.kind))throw new d('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,r.__name)(_,"compileStyleAliases"),(0,r.__name)(v,"Type$1");var w=v;function k(t,e){var n=[];return t[e].forEach(function(t){var e=n.length;n.forEach(function(n,r){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=r)}),n[e]=t}),n}function C(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for((0,r.__name)(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return n}function S(t){return this.extend(t)}(0,r.__name)(k,"compileList"),(0,r.__name)(C,"compileMap"),(0,r.__name)(S,"Schema$1"),S.prototype.extend=(0,r.__name)(function(t){var e=[],n=[];if(t instanceof w)n.push(t);else if(Array.isArray(t))n=n.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new d("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof w))throw new d("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new d("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new d("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(t){if(!(t instanceof w))throw new d("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(S.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=k(r,"implicit"),r.compiledExplicit=k(r,"explicit"),r.compiledTypeMap=C(r.compiledImplicit,r.compiledExplicit),r},"extend");var T=new S({explicit:[new w("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,r.__name)(function(t){return null!==t?t:""},"construct")}),new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,r.__name)(function(t){return null!==t?t:[]},"construct")}),new w("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,r.__name)(function(t){return null!==t?t:{}},"construct")})]});function M(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function A(){return null}function B(t){return null===t}(0,r.__name)(M,"resolveYamlNull"),(0,r.__name)(A,"constructYamlNull"),(0,r.__name)(B,"isNull");var L=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:M,construct:A,predicate:B,represent:{canonical:(0,r.__name)(function(){return"~"},"canonical"),lowercase:(0,r.__name)(function(){return"null"},"lowercase"),uppercase:(0,r.__name)(function(){return"NULL"},"uppercase"),camelcase:(0,r.__name)(function(){return"Null"},"camelcase"),empty:(0,r.__name)(function(){return""},"empty")},defaultStyle:"lowercase"});function E(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function F(t){return"true"===t||"True"===t||"TRUE"===t}function $(t){return"[object Boolean]"===Object.prototype.toString.call(t)}(0,r.__name)(E,"resolveYamlBoolean"),(0,r.__name)(F,"constructYamlBoolean"),(0,r.__name)($,"isBoolean");var O=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:E,construct:F,predicate:$,represent:{lowercase:(0,r.__name)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,r.__name)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,r.__name)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function N(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function D(t){return 48<=t&&t<=55}function z(t){return 48<=t&&t<=57}function I(t){if(null===t)return!1;var e,n=t.length,r=0,i=!1;if(!n)return!1;if("-"!==(e=t[r])&&"+"!==e||(e=t[++r]),"0"===e){if(r+1===n)return!0;if("b"===(e=t[++r])){for(r++;r<n;r++)if("_"!==(e=t[r])){if("0"!==e&&"1"!==e)return!1;i=!0}return i&&"_"!==e}if("x"===e){for(r++;r<n;r++)if("_"!==(e=t[r])){if(!N(t.charCodeAt(r)))return!1;i=!0}return i&&"_"!==e}if("o"===e){for(r++;r<n;r++)if("_"!==(e=t[r])){if(!D(t.charCodeAt(r)))return!1;i=!0}return i&&"_"!==e}}if("_"===e)return!1;for(;r<n;r++)if("_"!==(e=t[r])){if(!z(t.charCodeAt(r)))return!1;i=!0}return!(!i||"_"===e)}function P(t){var e,n=t,r=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(e=n[0])&&"+"!==e||("-"===e&&(r=-1),e=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===e){if("b"===n[1])return r*parseInt(n.slice(2),2);if("x"===n[1])return r*parseInt(n.slice(2),16);if("o"===n[1])return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)}function R(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!h.isNegativeZero(t)}(0,r.__name)(N,"isHexCode"),(0,r.__name)(D,"isOctCode"),(0,r.__name)(z,"isDecCode"),(0,r.__name)(I,"resolveYamlInteger"),(0,r.__name)(P,"constructYamlInteger"),(0,r.__name)(R,"isInteger");var q=new w("tag:yaml.org,2002:int",{kind:"scalar",resolve:I,construct:P,predicate:R,represent:{binary:(0,r.__name)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,r.__name)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,r.__name)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,r.__name)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),j=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function W(t){return null!==t&&!(!j.test(t)||"_"===t[t.length-1])}function H(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)}(0,r.__name)(W,"resolveYamlFloat"),(0,r.__name)(H,"constructYamlFloat");var U=/^[-+]?[0-9]+e/;function Y(t,e){var n;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(h.isNegativeZero(t))return"-0.0";return n=t.toString(10),U.test(n)?n.replace("e",".e"):n}function G(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||h.isNegativeZero(t))}(0,r.__name)(Y,"representYamlFloat"),(0,r.__name)(G,"isFloat");var V=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:W,construct:H,predicate:G,represent:Y,defaultStyle:"lowercase"}),X=T.extend({implicit:[L,O,q,V]}),Z=X,Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),K=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 J(t){return null!==t&&(null!==Q.exec(t)||null!==K.exec(t))}function tt(t){var e,n,r,i,a,o,s,l,c=0,h=null;if(null===(e=Q.exec(t))&&(e=K.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(n,r,i,a,o,s,c)),h&&l.setTime(l.getTime()-h),l}function et(t){return t.toISOString()}(0,r.__name)(J,"resolveYamlTimestamp"),(0,r.__name)(tt,"constructYamlTimestamp"),(0,r.__name)(et,"representYamlTimestamp");var nt=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function rt(t){return"<<"===t||null===t}(0,r.__name)(rt,"resolveYamlMerge");var it=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rt}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ot(t){if(null===t)return!1;var e,n,r=0,i=t.length,a=at;for(n=0;n<i;n++)if(!((e=a.indexOf(t.charAt(n)))>64)){if(e<0)return!1;r+=6}return r%8==0}function st(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,a=at,o=0,s=[];for(e=0;e<i;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(r.charAt(e));return 0==(n=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===n?(s.push(o>>10&255),s.push(o>>2&255)):12===n&&s.push(o>>4&255),new Uint8Array(s)}function lt(t){var e,n,r="",i=0,a=t.length,o=at;for(e=0;e<a;e++)e%3==0&&e&&(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+t[e];return 0==(n=a%3)?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===n?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===n&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function ct(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,r.__name)(ot,"resolveYamlBinary"),(0,r.__name)(st,"constructYamlBinary"),(0,r.__name)(lt,"representYamlBinary"),(0,r.__name)(ct,"isBinary");var ht=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ot,construct:st,predicate:ct,represent:lt}),ut=Object.prototype.hasOwnProperty,ft=Object.prototype.toString;function dt(t){if(null===t)return!0;var e,n,r,i,a,o=[],s=t;for(e=0,n=s.length;e<n;e+=1){if(r=s[e],a=!1,"[object Object]"!==ft.call(r))return!1;for(i in r)if(ut.call(r,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==o.indexOf(i))return!1;o.push(i)}return!0}function pt(t){return null!==t?t:[]}(0,r.__name)(dt,"resolveYamlOmap"),(0,r.__name)(pt,"constructYamlOmap");var gt=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:dt,construct:pt}),mt=Object.prototype.toString;function yt(t){if(null===t)return!0;var e,n,r,i,a,o=t;for(a=new Array(o.length),e=0,n=o.length;e<n;e+=1){if(r=o[e],"[object Object]"!==mt.call(r))return!1;if(1!==(i=Object.keys(r)).length)return!1;a[e]=[i[0],r[i[0]]]}return!0}function bt(t){if(null===t)return[];var e,n,r,i,a,o=t;for(a=new Array(o.length),e=0,n=o.length;e<n;e+=1)r=o[e],i=Object.keys(r),a[e]=[i[0],r[i[0]]];return a}(0,r.__name)(yt,"resolveYamlPairs"),(0,r.__name)(bt,"constructYamlPairs");var xt=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:yt,construct:bt}),_t=Object.prototype.hasOwnProperty;function vt(t){if(null===t)return!0;var e,n=t;for(e in n)if(_t.call(n,e)&&null!==n[e])return!1;return!0}function wt(t){return null!==t?t:{}}(0,r.__name)(vt,"resolveYamlSet"),(0,r.__name)(wt,"constructYamlSet");var kt=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:vt,construct:wt}),Ct=Z.extend({implicit:[nt,it],explicit:[ht,gt,xt,kt]}),St=Object.prototype.hasOwnProperty,Tt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Mt=/[\x85\u2028\u2029]/,At=/[,\[\]\{\}]/,Bt=/^(?:!|!!|![a-z\-]+!)$/i,Lt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Et(t){return Object.prototype.toString.call(t)}function Ft(t){return 10===t||13===t}function $t(t){return 9===t||32===t}function Ot(t){return 9===t||32===t||10===t||13===t}function Nt(t){return 44===t||91===t||93===t||123===t||125===t}function Dt(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function zt(t){return 120===t?2:117===t?4:85===t?8:0}function It(t){return 48<=t&&t<=57?t-48:-1}function Pt(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Rt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}(0,r.__name)(Et,"_class"),(0,r.__name)(Ft,"is_EOL"),(0,r.__name)($t,"is_WHITE_SPACE"),(0,r.__name)(Ot,"is_WS_OR_EOL"),(0,r.__name)(Nt,"is_FLOW_INDICATOR"),(0,r.__name)(Dt,"fromHexCode"),(0,r.__name)(zt,"escapedHexLen"),(0,r.__name)(It,"fromDecimalCode"),(0,r.__name)(Pt,"simpleEscapeSequence"),(0,r.__name)(Rt,"charFromCodepoint");var qt,jt=new Array(256),Wt=new Array(256);for(qt=0;qt<256;qt++)jt[qt]=Pt(qt)?1:0,Wt[qt]=Pt(qt);function Ht(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Ct,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 Ut(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=y(n),new d(e,n)}function Yt(t,e){throw Ut(t,e)}function Gt(t,e){t.onWarning&&t.onWarning.call(null,Ut(t,e))}(0,r.__name)(Ht,"State$1"),(0,r.__name)(Ut,"generateError"),(0,r.__name)(Yt,"throwError"),(0,r.__name)(Gt,"throwWarning");var Vt={YAML:(0,r.__name)(function(t,e,n){var r,i,a;null!==t.version&&Yt(t,"duplication of %YAML directive"),1!==n.length&&Yt(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Yt(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),a=parseInt(r[2],10),1!==i&&Yt(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Gt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,r.__name)(function(t,e,n){var r,i;2!==n.length&&Yt(t,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],Bt.test(r)||Yt(t,"ill-formed tag handle (first argument) of the TAG directive"),St.call(t.tagMap,r)&&Yt(t,'there is a previously declared suffix for "'+r+'" tag handle'),Lt.test(i)||Yt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){Yt(t,"tag prefix is malformed: "+i)}t.tagMap[r]=i},"handleTagDirective")};function Xt(t,e,n,r){var i,a,o,s;if(e<n){if(s=t.input.slice(e,n),r)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||Yt(t,"expected valid JSON character");else Tt.test(s)&&Yt(t,"the stream contains non-printable characters");t.result+=s}}function Zt(t,e,n,r){var i,a,o,s;for(h.isObject(n)||Yt(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(i=Object.keys(n)).length;o<s;o+=1)a=i[o],St.call(e,a)||(e[a]=n[a],r[a]=!0)}function Qt(t,e,n,r,i,a,o,s,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&Yt(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===Et(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===Et(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)Zt(t,e,a[c],n);else Zt(t,e,a,n);else t.json||St.call(n,i)||!St.call(e,i)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,Yt(t,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete n[i];return e}function Kt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Yt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Jt(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);0!==i;){for(;$t(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)do{i=t.input.charCodeAt(++t.position)}while(10!==i&&13!==i&&0!==i);if(!Ft(i))break;for(Kt(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==n&&0!==r&&t.lineIndent<n&&Gt(t,"deficient indentation"),r}function te(t){var e,n=t.position;return!(45!==(e=t.input.charCodeAt(n))&&46!==e||e!==t.input.charCodeAt(n+1)||e!==t.input.charCodeAt(n+2)||(n+=3,0!==(e=t.input.charCodeAt(n))&&!Ot(e)))}function ee(t,e){1===e?t.result+=" ":e>1&&(t.result+=h.repeat("\n",e-1))}function ne(t,e,n){var r,i,a,o,s,l,c,h,u=t.kind,f=t.result;if(Ot(h=t.input.charCodeAt(t.position))||Nt(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(Ot(r=t.input.charCodeAt(t.position+1))||n&&Nt(r)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,o=!1;0!==h;){if(58===h){if(Ot(r=t.input.charCodeAt(t.position+1))||n&&Nt(r))break}else if(35===h){if(Ot(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&te(t)||n&&Nt(h))break;if(Ft(h)){if(s=t.line,l=t.lineStart,c=t.lineIndent,Jt(t,!1,-1),t.lineIndent>=e){o=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=c;break}}o&&(Xt(t,i,a,!1),ee(t,t.line-s),i=a=t.position,o=!1),$t(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Xt(t,i,a,!1),!!t.result||(t.kind=u,t.result=f,!1)}function re(t,e){var n,r,i;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(Xt(t,r,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else Ft(n)?(Xt(t,r,i,!0),ee(t,Jt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&te(t)?Yt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Yt(t,"unexpected end of the stream within a single quoted scalar")}function ie(t,e){var n,r,i,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Xt(t,n,t.position,!0),t.position++,!0;if(92===s){if(Xt(t,n,t.position,!0),Ft(s=t.input.charCodeAt(++t.position)))Jt(t,!1,e);else if(s<256&&jt[s])t.result+=Wt[s],t.position++;else if((o=zt(s))>0){for(i=o,a=0;i>0;i--)(o=Dt(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:Yt(t,"expected hexadecimal character");t.result+=Rt(a),t.position++}else Yt(t,"unknown escape sequence");n=r=t.position}else Ft(s)?(Xt(t,n,r,!0),ee(t,Jt(t,!1,e)),n=r=t.position):t.position===t.lineStart&&te(t)?Yt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}Yt(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var n,r,i,a,o,s,l,c,h,u,f,d,p=!0,g=t.tag,m=t.anchor,y=Object.create(null);if(91===(d=t.input.charCodeAt(t.position)))o=93,c=!1,a=[];else{if(123!==d)return!1;o=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),d=t.input.charCodeAt(++t.position);0!==d;){if(Jt(t,!0,e),(d=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=a,!0;p?44===d&&Yt(t,"expected the node content, but found ','"):Yt(t,"missed comma between flow collection entries"),f=null,s=l=!1,63===d&&Ot(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,Jt(t,!0,e)),n=t.line,r=t.lineStart,i=t.position,fe(t,e,1,!1,!0),u=t.tag,h=t.result,Jt(t,!0,e),d=t.input.charCodeAt(t.position),!l&&t.line!==n||58!==d||(s=!0,d=t.input.charCodeAt(++t.position),Jt(t,!0,e),fe(t,e,1,!1,!0),f=t.result),c?Qt(t,a,y,u,h,f,n,r,i):s?a.push(Qt(t,null,y,u,h,f,n,r,i)):a.push(h),Jt(t,!0,e),44===(d=t.input.charCodeAt(t.position))?(p=!0,d=t.input.charCodeAt(++t.position)):p=!1}Yt(t,"unexpected end of the stream within a flow collection")}function oe(t,e){var n,r,i,a,o=1,s=!1,l=!1,c=e,u=0,f=!1;if(124===(a=t.input.charCodeAt(t.position)))r=!1;else{if(62!==a)return!1;r=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===o?o=43===a?3:2:Yt(t,"repeat of a chomping mode identifier");else{if(!((i=It(a))>=0))break;0===i?Yt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Yt(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if($t(a)){do{a=t.input.charCodeAt(++t.position)}while($t(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Ft(a)&&0!==a)}for(;0!==a;){for(Kt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<c)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>c&&(c=t.lineIndent),Ft(a))u++;else{if(t.lineIndent<c){3===o?t.result+=h.repeat("\n",s?1+u:u):1===o&&s&&(t.result+="\n");break}for(r?$t(a)?(f=!0,t.result+=h.repeat("\n",s?1+u:u)):f?(f=!1,t.result+=h.repeat("\n",u+1)):0===u?s&&(t.result+=" "):t.result+=h.repeat("\n",u):t.result+=h.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,n=t.position;!Ft(a)&&0!==a;)a=t.input.charCodeAt(++t.position);Xt(t,n,t.position,!1)}}return!0}function se(t,e){var n,r,i=t.tag,a=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),r=t.input.charCodeAt(t.position);0!==r&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),45===r)&&Ot(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,Jt(t,!0,-1)&&t.lineIndent<=e)o.push(null),r=t.input.charCodeAt(t.position);else if(n=t.line,fe(t,e,3,!1,!0),o.push(t.result),Jt(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==r)Yt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=i,t.anchor=a,t.kind="sequence",t.result=o,!0)}function le(t,e,n){var r,i,a,o,s,l,c,h=t.tag,u=t.anchor,f={},d=Object.create(null),p=null,g=null,m=null,y=!1,b=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=f),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),a=t.line,63!==c&&58!==c||!Ot(r)){if(o=t.line,s=t.lineStart,l=t.position,!fe(t,n,2,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);$t(c);)c=t.input.charCodeAt(++t.position);if(58===c)Ot(c=t.input.charCodeAt(++t.position))||Yt(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Qt(t,f,d,p,g,null,o,s,l),p=g=m=null),b=!0,y=!1,i=!1,p=t.tag,g=t.result;else{if(!b)return t.tag=h,t.anchor=u,!0;Yt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return t.tag=h,t.anchor=u,!0;Yt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Qt(t,f,d,p,g,null,o,s,l),p=g=m=null),b=!0,y=!0,i=!0):y?(y=!1,i=!0):Yt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=r;if((t.line===a||t.lineIndent>e)&&(y&&(o=t.line,s=t.lineStart,l=t.position),fe(t,e,4,!0,i)&&(y?g=t.result:m=t.result),y||(Qt(t,f,d,p,g,m,o,s,l),p=g=m=null),Jt(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Yt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Qt(t,f,d,p,g,null,o,s,l),b&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=f),b}function ce(t){var e,n,r,i,a=!1,o=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Yt(t,"duplication of a tag property"),60===(i=t.input.charCodeAt(++t.position))?(a=!0,i=t.input.charCodeAt(++t.position)):33===i?(o=!0,n="!!",i=t.input.charCodeAt(++t.position)):n="!",e=t.position,a){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&62!==i);t.position<t.length?(r=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):Yt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!Ot(i);)33===i&&(o?Yt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Bt.test(n)||Yt(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),At.test(r)&&Yt(t,"tag suffix cannot contain flow indicator characters")}r&&!Lt.test(r)&&Yt(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(e){Yt(t,"tag name is malformed: "+r)}return a?t.tag=r:St.call(t.tagMap,n)?t.tag=t.tagMap[n]+r:"!"===n?t.tag="!"+r:"!!"===n?t.tag="tag:yaml.org,2002:"+r:Yt(t,'undeclared tag handle "'+n+'"'),!0}function he(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Yt(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Ot(n)&&!Nt(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function ue(t){var e,n,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Ot(r)&&!Nt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),St.call(t.anchorMap,n)||Yt(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],Jt(t,!0,-1),!0}function fe(t,e,n,r,i){var a,o,s,l,c,h,u,f,d,p=1,g=!1,m=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=o=s=4===n||3===n,r&&Jt(t,!0,-1)&&(g=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),1===p)for(;ce(t)||he(t);)Jt(t,!0,-1)?(g=!0,s=a,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):s=!1;if(s&&(s=g||i),1!==p&&4!==n||(f=1===n||2===n?e:e+1,d=t.position-t.lineStart,1===p?s&&(se(t,d)||le(t,d,f))||ae(t,f)?m=!0:(o&&oe(t,f)||re(t,f)||ie(t,f)?m=!0:ue(t)?(m=!0,null===t.tag&&null===t.anchor||Yt(t,"alias node should not have any properties")):ne(t,f,1===n)&&(m=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===p&&(m=s&&se(t,d))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Yt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(St.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||Yt(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&Yt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Yt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function de(t){var e,n,r,i,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(Jt(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(o=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Ot(i);)i=t.input.charCodeAt(++t.position);for(r=[],(n=t.input.slice(e,t.position)).length<1&&Yt(t,"directive name must not be less than one character in length");0!==i;){for(;$t(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!Ft(i));break}if(Ft(i))break;for(e=t.position;0!==i&&!Ot(i);)i=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==i&&Kt(t),St.call(Vt,n)?Vt[n](t,n,r):Gt(t,'unknown document directive "'+n+'"')}Jt(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Jt(t,!0,-1)):o&&Yt(t,"directives end mark is expected"),fe(t,t.lineIndent-1,4,!1,!0),Jt(t,!0,-1),t.checkLineBreaks&&Mt.test(t.input.slice(a,t.position))&&Gt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&te(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Jt(t,!0,-1)):t.position<t.length-1&&Yt(t,"end of the stream or a document separator is expected")}function pe(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new Ht(t,e),r=t.indexOf("\0");for(-1!==r&&(n.position=r,Yt(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)de(n);return n.documents}function ge(t,e,n){null!==e&&"object"==typeof e&&void 0===n&&(n=e,e=null);var r=pe(t,n);if("function"!=typeof e)return r;for(var i=0,a=r.length;i<a;i+=1)e(r[i])}function me(t,e){var n=pe(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new d("expected a single document in the stream, but found more")}}(0,r.__name)(Xt,"captureSegment"),(0,r.__name)(Zt,"mergeMappings"),(0,r.__name)(Qt,"storeMappingPair"),(0,r.__name)(Kt,"readLineBreak"),(0,r.__name)(Jt,"skipSeparationSpace"),(0,r.__name)(te,"testDocumentSeparator"),(0,r.__name)(ee,"writeFoldedLines"),(0,r.__name)(ne,"readPlainScalar"),(0,r.__name)(re,"readSingleQuotedScalar"),(0,r.__name)(ie,"readDoubleQuotedScalar"),(0,r.__name)(ae,"readFlowCollection"),(0,r.__name)(oe,"readBlockScalar"),(0,r.__name)(se,"readBlockSequence"),(0,r.__name)(le,"readBlockMapping"),(0,r.__name)(ce,"readTagProperty"),(0,r.__name)(he,"readAnchorProperty"),(0,r.__name)(ue,"readAlias"),(0,r.__name)(fe,"composeNode"),(0,r.__name)(de,"readDocument"),(0,r.__name)(pe,"loadDocuments"),(0,r.__name)(ge,"loadAll$1"),(0,r.__name)(me,"load$1");var ye=me,be=Object.prototype.toString,xe=Object.prototype.hasOwnProperty,_e=65279,ve={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},we=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ke=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ce(t,e){var n,r,i,a,o,s,l;if(null===e)return{};for(n={},i=0,a=(r=Object.keys(e)).length;i<a;i+=1)o=r[i],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&xe.call(l.styleAliases,s)&&(s=l.styleAliases[s]),n[o]=s;return n}function Se(t){var e,n,r;if(e=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else{if(!(t<=4294967295))throw new d("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+h.repeat("0",r-e.length)+e}function Te(t){this.schema=t.schema||Ct,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=h.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Ce(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Me(t,e){for(var n,r=h.repeat(" ",e),i=0,a=-1,o="",s=t.length;i<s;)-1===(a=t.indexOf("\n",i))?(n=t.slice(i),i=s):(n=t.slice(i,a+1),i=a+1),n.length&&"\n"!==n&&(o+=r),o+=n;return o}function Ae(t,e){return"\n"+h.repeat(" ",t.indent*e)}function Be(t,e){var n,r;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(t.implicitTypes[n].resolve(e))return!0;return!1}function Le(t){return 32===t||9===t}function Ee(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==_e||65536<=t&&t<=1114111}function Fe(t){return Ee(t)&&t!==_e&&13!==t&&10!==t}function $e(t,e,n){var r=Fe(t),i=r&&!Le(t);return(n?r:r&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||Fe(e)&&!Le(e)&&35===t||58===e&&i}function Oe(t){return Ee(t)&&t!==_e&&!Le(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Ne(t){return!Le(t)&&58!==t}function De(t,e){var n,r=t.charCodeAt(e);return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1))>=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function ze(t){return/^\n* /.test(t)}function Ie(t,e,n,r,i,a,o,s){var l,c=0,h=null,u=!1,f=!1,d=-1!==r,p=-1,g=Oe(De(t,0))&&Ne(De(t,t.length-1));if(e||o)for(l=0;l<t.length;c>=65536?l+=2:l++){if(!Ee(c=De(t,l)))return 5;g=g&&$e(c,h,s),h=c}else{for(l=0;l<t.length;c>=65536?l+=2:l++){if(10===(c=De(t,l)))u=!0,d&&(f=f||l-p-1>r&&" "!==t[p+1],p=l);else if(!Ee(c))return 5;g=g&&$e(c,h,s),h=c}f=f||d&&l-p-1>r&&" "!==t[p+1]}return u||f?n>9&&ze(t)?5:o?2===a?5:2:f?4:3:!g||o||i(t)?2===a?5:2:1}function Pe(t,e,n,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==we.indexOf(e)||ke.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,n),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=i||t.flowLevel>-1&&n>=t.flowLevel;function c(e){return Be(t,e)}switch((0,r.__name)(c,"testAmbiguity"),Ie(e,l,t.indent,s,c,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Re(e,t.indent)+qe(Me(e,o));case 4:return">"+Re(e,t.indent)+qe(Me(je(e,s),o));case 5:return'"'+He(e)+'"';default:throw new d("impossible error: invalid scalar style")}}()}function Re(t,e){var n=ze(t)?String(e):"",r="\n"===t[t.length-1];return n+(!r||"\n"!==t[t.length-2]&&"\n"!==t?r?"":"-":"+")+"\n"}function qe(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function je(t,e){for(var n,r,i,a=/(\n+)([^\n]*)/g,o=(n=-1!==(n=t.indexOf("\n"))?n:t.length,a.lastIndex=n,We(t.slice(0,n),e)),s="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],c=i[2];r=" "===c[0],o+=l+(s||r||""===c?"":"\n")+We(c,e),s=r}return o}function We(t,e){if(""===t||" "===t[0])return t;for(var n,r,i=/ [^ ]/g,a=0,o=0,s=0,l="";n=i.exec(t);)(s=n.index)-a>e&&(r=o>a?o:s,l+="\n"+t.slice(a,r),a=r+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function He(t){for(var e,n="",r=0,i=0;i<t.length;r>=65536?i+=2:i++)r=De(t,i),!(e=ve[r])&&Ee(r)?(n+=t[i],r>=65536&&(n+=t[i+1])):n+=e||Se(r);return n}function Ue(t,e,n){var r,i,a,o="",s=t.tag;for(r=0,i=n.length;r<i;r+=1)a=n[r],t.replacer&&(a=t.replacer.call(n,String(r),a)),(Ze(t,e,a,!1,!1)||void 0===a&&Ze(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function Ye(t,e,n,r){var i,a,o,s="",l=t.tag;for(i=0,a=n.length;i<a;i+=1)o=n[i],t.replacer&&(o=t.replacer.call(n,String(i),o)),(Ze(t,e+1,o,!0,!0,!1,!0)||void 0===o&&Ze(t,e+1,null,!0,!0,!1,!0))&&(r&&""===s||(s+=Ae(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function Ge(t,e,n){var r,i,a,o,s,l="",c=t.tag,h=Object.keys(n);for(r=0,i=h.length;r<i;r+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=n[a=h[r]],t.replacer&&(o=t.replacer.call(n,a,o)),Ze(t,e,a,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}function Ve(t,e,n,r){var i,a,o,s,l,c,h="",u=t.tag,f=Object.keys(n);if(!0===t.sortKeys)f.sort();else if("function"==typeof t.sortKeys)f.sort(t.sortKeys);else if(t.sortKeys)throw new d("sortKeys must be a boolean or a function");for(i=0,a=f.length;i<a;i+=1)c="",r&&""===h||(c+=Ae(t,e)),s=n[o=f[i]],t.replacer&&(s=t.replacer.call(n,o,s)),Ze(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Ae(t,e)),Ze(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Xe(t,e,n){var r,i,a,o,s,l;for(a=0,o=(i=n?t.explicitTypes:t.implicitTypes).length;a<o;a+=1)if(((s=i[a]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(n?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===be.call(s.represent))r=s.represent(e,l);else{if(!xe.call(s.represent,l))throw new d("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');r=s.represent[l](e,l)}t.dump=r}return!0}return!1}function Ze(t,e,n,r,i,a,o){t.tag=null,t.dump=n,Xe(t,n,!1)||Xe(t,n,!0);var s,l=be.call(t.dump),c=r;r&&(r=t.flowLevel<0||t.flowLevel>e);var h,u,f="[object Object]"===l||"[object Array]"===l;if(f&&(u=-1!==(h=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(f&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)r&&0!==Object.keys(t.dump).length?(Ve(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ge(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)r&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?Ye(t,e-1,t.dump,i):Ye(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ue(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new d("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Pe(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Qe(t,e){var n,r,i=[],a=[];for(Ke(t,i,a),n=0,r=a.length;n<r;n+=1)e.duplicates.push(i[a[n]]);e.usedDuplicates=new Array(r)}function Ke(t,e,n){var r,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===n.indexOf(i)&&n.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)Ke(t[i],e,n);else for(i=0,a=(r=Object.keys(t)).length;i<a;i+=1)Ke(t[r[i]],e,n)}function Je(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}(0,r.__name)(Ce,"compileStyleMap"),(0,r.__name)(Se,"encodeHex"),(0,r.__name)(Te,"State"),(0,r.__name)(Me,"indentString"),(0,r.__name)(Ae,"generateNextLine"),(0,r.__name)(Be,"testImplicitResolving"),(0,r.__name)(Le,"isWhitespace"),(0,r.__name)(Ee,"isPrintable"),(0,r.__name)(Fe,"isNsCharOrWhitespace"),(0,r.__name)($e,"isPlainSafe"),(0,r.__name)(Oe,"isPlainSafeFirst"),(0,r.__name)(Ne,"isPlainSafeLast"),(0,r.__name)(De,"codePointAt"),(0,r.__name)(ze,"needIndentIndicator"),(0,r.__name)(Ie,"chooseScalarStyle"),(0,r.__name)(Pe,"writeScalar"),(0,r.__name)(Re,"blockHeader"),(0,r.__name)(qe,"dropEndingNewline"),(0,r.__name)(je,"foldString"),(0,r.__name)(We,"foldLine"),(0,r.__name)(He,"escapeString"),(0,r.__name)(Ue,"writeFlowSequence"),(0,r.__name)(Ye,"writeBlockSequence"),(0,r.__name)(Ge,"writeFlowMapping"),(0,r.__name)(Ve,"writeBlockMapping"),(0,r.__name)(Xe,"detectType"),(0,r.__name)(Ze,"writeNode"),(0,r.__name)(Qe,"getDuplicateReferences"),(0,r.__name)(Ke,"inspectNode"),(0,r.__name)(function(t,e){var n=new Te(e=e||{});n.noRefs||Qe(t,n);var r=t;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Ze(n,0,r,!0,!0)?n.dump+"\n":""},"dump$1"),(0,r.__name)(Je,"renamed");var tn=X,en=ye;Je("safeLoad","load"),Je("safeLoadAll","loadAll"),Je("safeDump","dump")},87094(t,e,n){n.r(e),n.d(e,{getRegisteredLayoutAlgorithm:()=>f,registerLayoutLoaders:()=>h,render:()=>u});var r=n(54275),i=n(85533),a=n(82029),o=n(54141),s=n(60162),l={common:o.common_default,getConfig:o.getConfig,insertCluster:i.insertCluster,insertEdge:r.insertEdge,insertEdgeLabel:r.insertEdgeLabel,insertMarkers:r.markers_default,insertNode:i.insertNode,interpolateToCurve:a.interpolateToCurve,labelHelper:i.labelHelper,log:s.log,positionEdgeLabel:r.positionEdgeLabel},c={},h=(0,s.__name)(t=>{for(const e of t)c[e.name]=e},"registerLayoutLoaders");(0,s.__name)(()=>{h([{name:"dagre",loader:(0,s.__name)(async()=>await Promise.all([n.e(6530),n.e(8042),n.e(3102)]).then(n.bind(n,43102)),"loader")},{name:"cose-bilkent",loader:(0,s.__name)(async()=>await Promise.all([n.e(8936),n.e(1777)]).then(n.bind(n,71777)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,s.__name)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const n=c[t.layoutAlgorithm];return(await n.loader()).render(t,e,l,{algorithm:n.algorithm})},"render"),f=(0,s.__name)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return s.log.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},54275(t,e,n){n.r(e),n.d(e,{clear:()=>b,insertEdge:()=>L,insertEdgeLabel:()=>_,markers_default:()=>D,positionEdgeLabel:()=>w});var r=n(51437),i=n(85533),a=n(70998),o=n(96540),s=n(67099),l=n(82029),c=n(54141),h=n(60162),u=n(79806),f=n(7083),d=(0,h.__name)((t,e,n,r,i,a)=>{e.arrowTypeStart&&g(t,"start",e.arrowTypeStart,n,r,i,a),e.arrowTypeEnd&&g(t,"end",e.arrowTypeEnd,n,r,i,a)},"addEdgeMarkers"),p={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},g=(0,h.__name)((t,e,n,r,i,a,o)=>{const s=p[n];if(!s)return void h.log.warn(`Unknown arrow type: ${n}`);const l=`${i}_${a}-${s.type}${"start"===e?"Start":"End"}`;if(o&&""!==o.trim()){const n=`${l}_${o.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(n)){const t=document.getElementById(l);if(t){const e=t.cloneNode(!0);e.id=n,e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",o),s.fill&&t.setAttribute("fill",o)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${r}#${n})`)}else t.attr(`marker-${e}`,`url(${r}#${l})`)},"addEdgeMarker"),m=new Map,y=new Map,b=(0,h.__name)(()=>{m.clear(),y.clear()},"clear"),x=(0,h.__name)(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),_=(0,h.__name)(async(t,e)=>{let n=(0,c.evaluate)((0,c.getConfig2)().flowchart.htmlLabels);const{labelStyles:r}=(0,o.styles2String)(e);e.labelStyle=r;const a=await(0,s.createText)(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0,isNode:!1});h.log.info("abc82",e,e.labelType);const l=t.insert("g").attr("class","edgeLabel"),f=l.insert("g").attr("class","label").attr("data-id",e.id);f.node().appendChild(a);let d,p=a.getBBox();if(n){const t=a.children[0],e=(0,u.select)(a);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}if(f.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),m.set(e.id,l),e.width=p.width,e.height=p.height,e.startLabelLeft){const n=await(0,i.createLabel_default)(e.startLabelLeft,x(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner");d=a.node().appendChild(n);const o=n.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),y.get(e.id)||y.set(e.id,{}),y.get(e.id).startLeft=r,v(d,e.startLabelLeft)}if(e.startLabelRight){const n=await(0,i.createLabel_default)(e.startLabelRight,x(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner");d=r.node().appendChild(n),a.node().appendChild(n);const o=n.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),y.get(e.id)||y.set(e.id,{}),y.get(e.id).startRight=r,v(d,e.startLabelRight)}if(e.endLabelLeft){const n=await(0,i.createLabel_default)(e.endLabelLeft,x(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner");d=a.node().appendChild(n);const o=n.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),r.node().appendChild(n),y.get(e.id)||y.set(e.id,{}),y.get(e.id).endLeft=r,v(d,e.endLabelLeft)}if(e.endLabelRight){const n=await(0,i.createLabel_default)(e.endLabelRight,x(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner");d=a.node().appendChild(n);const o=n.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),r.node().appendChild(n),y.get(e.id)||y.set(e.id,{}),y.get(e.id).endRight=r,v(d,e.endLabelRight)}return a},"insertEdgeLabel");function v(t,e){(0,c.getConfig2)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,h.__name)(v,"setTerminalWidth");var w=(0,h.__name)((t,e)=>{h.log.debug("Moving label abc88 ",t.id,t.label,m.get(t.id),e);let n=e.updatedPath?e.updatedPath:e.originalPath;const r=(0,c.getConfig2)(),{subGraphTitleTotalMargin:i}=(0,a.getSubGraphTitleMargins)(r);if(t.label){const r=m.get(t.id);let a=t.x,o=t.y;if(n){const r=l.utils_default.calcLabelPosition(n);h.log.debug("Moving label "+t.label+" from (",a,",",o,") to (",r.x,",",r.y,") abc88"),e.updatedPath&&(a=r.x,o=r.y)}r.attr("transform",`translate(${a}, ${o+i/2})`)}if(t.startLabelLeft){const e=y.get(t.id).startLeft;let r=t.x,i=t.y;if(n){const e=l.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){const e=y.get(t.id).startRight;let r=t.x,i=t.y;if(n){const e=l.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){const e=y.get(t.id).endLeft;let r=t.x,i=t.y;if(n){const e=l.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){const e=y.get(t.id).endRight;let r=t.x,i=t.y;if(n){const e=l.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),k=(0,h.__name)((t,e)=>{const n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s},"outsideNode"),C=(0,h.__name)((t,e,n)=>{h.log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2;let s=n.x<e.x?o-a:o+a;const l=t.height/2,c=Math.abs(e.y-n.y),u=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*o>Math.abs(r-e.x)*l){let t=n.y<e.y?e.y-l-i:i-l-e.y;s=u*t/c;const r={x:n.x<e.x?n.x+s:n.x-u+s,y:n.y<e.y?n.y+c-t:n.y-c+t};return 0===s&&(r.x=e.x,r.y=e.y),0===u&&(r.x=e.x),0===c&&(r.y=e.y),h.log.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${u}, r ${s}`,r),r}{s=n.x<e.x?e.x-o-r:r-o-e.x;let t=c*s/u,i=n.x<e.x?n.x+u-s:n.x-u+s,a=n.y<e.y?n.y+t:n.y-t;return h.log.debug(`sides calc abc89, Q ${c}, q ${t}, R ${u}, r ${s}`,{_x:i,_y:a}),0===s&&(i=e.x,a=e.y),0===u&&(i=e.x),0===c&&(a=e.y),{x:i,y:a}}},"intersection"),S=(0,h.__name)((t,e)=>{h.log.warn("abc88 cutPathAtIntersect",t,e);let n=[],r=t[0],i=!1;return t.forEach(t=>{if(h.log.info("abc88 checking point",t,e),k(e,t)||i)h.log.warn("abc88 outside",t,r),r=t,i||n.push(t);else{const a=C(e,r,t);h.log.debug("abc88 inside",t,r,a),h.log.debug("abc88 intersection",a,e);let o=!1;n.forEach(t=>{o=o||t.x===a.x&&t.y===a.y}),n.some(t=>t.x===a.x&&t.y===a.y)?h.log.warn("abc88 no intersect",a,n):n.push(a),i=!0}}),h.log.debug("returning points",n),n},"cutPathAtIntersect");function T(t){const e=[],n=[];for(let r=1;r<t.length-1;r++){const i=t[r-1],a=t[r],o=t[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),n.push(r))}return{cornerPoints:e,cornerPointPositions:n}}(0,h.__name)(T,"extractCornerPoints");var M=(0,h.__name)(function(t,e,n){const r=e.x-t.x,i=e.y-t.y,a=n/Math.sqrt(r*r+i*i);return{x:e.x-a*r,y:e.y-a*i}},"findAdjacentPoint"),A=(0,h.__name)(function(t){const{cornerPointPositions:e}=T(t),n=[];for(let r=0;r<t.length;r++)if(e.includes(r)){const e=t[r-1],i=t[r+1],a=t[r],o=M(e,a,5),s=M(i,a,5),l=s.x-o.x,c=s.y-o.y;n.push(o);const u=2*Math.sqrt(2);let f={x:a.x,y:a.y};if(Math.abs(i.x-e.x)>10&&Math.abs(i.y-e.y)>=10){h.log.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;f=a.x===o.x?{x:l<0?o.x-t+u:o.x+t-u,y:c<0?o.y-u:o.y+u}:{x:l<0?o.x-u:o.x+u,y:c<0?o.y-t+u:o.y+t-u}}else h.log.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));n.push(f,s)}else n.push(t[r]);return n},"fixCorners"),B=(0,h.__name)((t,e,n)=>{const r=t-e-n,i=Math.floor(r/4);return`0 ${e} ${Array(i).fill("2 2").join(" ")} ${n}`},"generateDashArray"),L=(0,h.__name)(function(t,e,n,i,a,s,p,g=!1){const{handDrawnSeed:m}=(0,c.getConfig2)();let y=e.points,b=!1;const x=a;var _=s;const v=[];for(const t in e.cssCompiledStyles)(0,o.isLabelStyle)(t)||v.push(e.cssCompiledStyles[t]);h.log.debug("UIO intersect check",e.points,_.x,x.x),_.intersect&&x.intersect&&!g&&(y=y.slice(1,e.points.length-1),y.unshift(x.intersect(y[0])),h.log.debug("Last point UIO",e.start,"--\x3e",e.end,y[y.length-1],_,_.intersect(y[y.length-1])),y.push(_.intersect(y[y.length-1])));const w=btoa(JSON.stringify(y));e.toCluster&&(h.log.info("to cluster abc88",n.get(e.toCluster)),y=S(e.points,n.get(e.toCluster).node),b=!0),e.fromCluster&&(h.log.debug("from cluster abc88",n.get(e.fromCluster),JSON.stringify(y,null,2)),y=S(y.reverse(),n.get(e.fromCluster).node).reverse(),b=!0);let k=y.filter(t=>!Number.isNaN(t.y));k=A(k);let C=u.curveBasis;switch(C=u.curveLinear,e.curve){case"linear":C=u.curveLinear;break;case"basis":default:C=u.curveBasis;break;case"cardinal":C=u.curveCardinal;break;case"bumpX":C=u.curveBumpX;break;case"bumpY":C=u.curveBumpY;break;case"catmullRom":C=u.curveCatmullRom;break;case"monotoneX":C=u.curveMonotoneX;break;case"monotoneY":C=u.curveMonotoneY;break;case"natural":C=u.curveNatural;break;case"step":C=u.curveStep;break;case"stepAfter":C=u.curveStepAfter;break;case"stepBefore":C=u.curveStepBefore}const{x:T,y:M}=(0,r.getLineFunctionsWithOffset)(e),L=(0,u.line)().x(T).y(M).curve(C);let F,O;switch(e.thickness){case"normal":default:F="edge-thickness-normal";break;case"thick":F="edge-thickness-thick";break;case"invisible":F="edge-thickness-invisible"}switch(e.pattern){case"solid":default:F+=" edge-pattern-solid";break;case"dotted":F+=" edge-pattern-dotted";break;case"dashed":F+=" edge-pattern-dashed"}let N="rounded"===e.curve?E($(k,e),5):L(k);const D=Array.isArray(e.style)?e.style:[e.style];let z=D.find(t=>t?.startsWith("stroke:")),I=!1;if("handDrawn"===e.look){const n=f.default.svg(t);Object.assign([],k);const r=n.path(N,{roughness:.3,seed:m});F+=" transition",O=(0,u.select)(r).select("path").attr("id",e.id).attr("class"," "+F+(e.classes?" "+e.classes:"")).attr("style",D?D.reduce((t,e)=>t+";"+e,""):"");let i=O.attr("d");O.attr("d",i),t.node().appendChild(O.node())}else{const n=v.join(";"),i=D?D.reduce((t,e)=>t+e+";",""):"";let a="";e.animate&&(a=" edge-animation-fast"),e.animation&&(a=" edge-animation-"+e.animation);const o=(n?n+";"+i+";":i)+";"+(D?D.reduce((t,e)=>t+";"+e,""):"");O=t.append("path").attr("d",N).attr("id",e.id).attr("class"," "+F+(e.classes?" "+e.classes:"")+(a??"")).attr("style",o),z=o.match(/stroke:([^;]+)/)?.[1],I=!0===e.animate||!!e.animation||n.includes("animation");const s=O.node(),l="function"==typeof s.getTotalLength?s.getTotalLength():0,c=r.markerOffsets2[e.arrowTypeStart]||0,h=r.markerOffsets2[e.arrowTypeEnd]||0;if("neo"===e.look&&!I){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?B(l,c,h):`0 ${c} ${l-c-h} ${h}`}; stroke-dashoffset: 0;`;O.attr("style",t+O.attr("style"))}}O.attr("data-edge",!0),O.attr("data-et","edge"),O.attr("data-id",e.id),O.attr("data-points",w),e.showPoints&&k.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let P="";((0,c.getConfig2)().flowchart.arrowMarkerAbsolute||(0,c.getConfig2)().state.arrowMarkerAbsolute)&&(P=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,P=P.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.log.info("arrowTypeStart",e.arrowTypeStart),h.log.info("arrowTypeEnd",e.arrowTypeEnd),d(O,e,P,p,i,z);const R=y[Math.floor(y.length/2)];l.utils_default.isLabelCoordinateInPath(R,O.attr("d"))||(b=!0);let q={};return b&&(q.updatedPath=y),q.originalPath=e.points,q},"insertEdge");function E(t,e){if(t.length<2)return"";let n="";const r=t.length,i=1e-5;for(let a=0;a<r;a++){const o=t[a],s=t[a-1],l=t[a+1];if(0===a)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{const t=o.x-s.x,r=o.y-s.y,a=l.x-o.x,c=l.y-o.y,h=Math.hypot(t,r),u=Math.hypot(a,c);if(h<i||u<i){n+=`L${o.x},${o.y}`;continue}const f=t/h,d=r/h,p=a/u,g=c/u,m=f*p+d*g,y=Math.max(-1,Math.min(1,m)),b=Math.acos(y);if(b<i||Math.abs(Math.PI-b)<i){n+=`L${o.x},${o.y}`;continue}const x=Math.min(e/Math.sin(b/2),h/2,u/2),_=o.x-f*x,v=o.y-d*x,w=o.x+p*x,k=o.y+g*x;n+=`L${_},${v}`,n+=`Q${o.x},${o.y} ${w},${k}`}}return n}function F(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const n=e.x-t.x,r=e.y-t.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}function $(t,e){const n=t.map(t=>({...t}));if(t.length>=2&&r.markerOffsets[e.arrowTypeStart]){const i=r.markerOffsets[e.arrowTypeStart],a=t[0],o=t[1],{angle:s}=F(a,o),l=i*Math.cos(s),c=i*Math.sin(s);n[0].x=a.x+l,n[0].y=a.y+c}const i=t.length;if(i>=2&&r.markerOffsets[e.arrowTypeEnd]){const a=r.markerOffsets[e.arrowTypeEnd],o=t[i-1],s=t[i-2],{angle:l}=F(s,o),c=a*Math.cos(l),h=a*Math.sin(l);n[i-1].x=o.x-c,n[i-1].y=o.y-h}return n}(0,h.__name)(E,"generateRoundedPath"),(0,h.__name)(F,"calculateDeltaAndAngle"),(0,h.__name)($,"applyMarkerOffsetsToPoints");var O=(0,h.__name)((t,e,n,r)=>{e.forEach(e=>{N[e](t,n,r)})},"insertMarkers"),N={extension:(0,h.__name)((t,e,n)=>{h.log.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,h.__name)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,h.__name)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,h.__name)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",n+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:(0,h.__name)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");r.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("d","M9,0 L9,18");const i=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",n+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:(0,h.__name)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");r.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:(0,h.__name)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");r.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),r.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),r.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},D=O},82029(t,e,n){n.r(e),n.d(e,{ZERO_WIDTH_SPACE:()=>c,calculateTextHeight:()=>N,calculateTextWidth:()=>D,cleanAndMerge:()=>H,decodeEntities:()=>G,encodeEntities:()=>Y,generateId:()=>A,getEdgeId:()=>V,getStylesFromArray:()=>T,handleUndefinedAttr:()=>X,interpolateToCurve:()=>m,isDetailedError:()=>q,parseFontSize:()=>W,random:()=>L,removeDirectives:()=>p,utils_default:()=>U,wrapLabel:()=>$});var r=n(54141),i=n(60162),a=n(8041),o=n(79806),s=n(39645),l=n(22937),c="​",h={curveBasis:o.curveBasis,curveBasisClosed:o.curveBasisClosed,curveBasisOpen:o.curveBasisOpen,curveBumpX:o.curveBumpX,curveBumpY:o.curveBumpY,curveBundle:o.curveBundle,curveCardinalClosed:o.curveCardinalClosed,curveCardinalOpen:o.curveCardinalOpen,curveCardinal:o.curveCardinal,curveCatmullRomClosed:o.curveCatmullRomClosed,curveCatmullRomOpen:o.curveCatmullRomOpen,curveCatmullRom:o.curveCatmullRom,curveLinear:o.curveLinear,curveLinearClosed:o.curveLinearClosed,curveMonotoneX:o.curveMonotoneX,curveMonotoneY:o.curveMonotoneY,curveNatural:o.curveNatural,curveStep:o.curveStep,curveStepAfter:o.curveStepAfter,curveStepBefore:o.curveStepBefore},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,f=(0,i.__name)(function(t,e){const n=d(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(n)){const t=n.map(t=>t.args);(0,r.sanitizeDirective)(t),i=(0,r.assignWithDepth_default)(i,[...t])}else i=n.args;if(!i)return;let a=(0,r.detectType)(t,e);const o="config";return void 0!==i[o]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),d=(0,i.__name)(function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(n,"").replace(/'/gm,'"'),i.log.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(a=r.directiveRegex.exec(t));)if(a.index===r.directiveRegex.lastIndex&&r.directiveRegex.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(n){return i.log.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),p=(0,i.__name)(function(t){return t.replace(r.directiveRegex,"")},"removeDirectives"),g=(0,i.__name)(function(t,e){for(const[n,r]of e.entries())if(r.match(t))return n;return-1},"isSubstringInArray");function m(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return h[n]??e}function y(t,e){const n=t.trim();if(n)return"loose"!==e.securityLevel?(0,a.sanitizeUrl)(n):n}(0,i.__name)(m,"interpolateToCurve"),(0,i.__name)(y,"formatUrl");var b=(0,i.__name)((t,...e)=>{const n=t.split("."),r=n.length-1,a=n[r];let o=window;for(let e=0;e<r;e++)if(o=o[n[e]],!o)return void i.log.error(`Function name: ${t} not found in window`);o[a](...e)},"runFunc");function x(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function _(t){let e,n=0;return t.forEach(t=>{n+=x(t,e),e=t}),k(t,n/2)}function v(t){return 1===t.length?t[0]:_(t)}(0,i.__name)(x,"distance"),(0,i.__name)(_,"traverseEdge"),(0,i.__name)(v,"calcLabelPosition");var w=(0,i.__name)((t,e=2)=>{const n=Math.pow(10,e);return Math.round(t*n)/n},"roundNumber"),k=(0,i.__name)((t,e)=>{let n,r=e;for(const e of t){if(n){const t=x(e,n);if(0===t)return n;if(t<r)r-=t;else{const i=r/t;if(i<=0)return n;if(i>=1)return{x:e.x,y:e.y};if(i>0&&i<1)return{x:w((1-i)*n.x+i*e.x,5),y:w((1-i)*n.y+i*e.y,5)}}}n=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),C=(0,i.__name)((t,e,n)=>{i.log.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());const r=k(e,25),a=t?10:5,o=Math.atan2(e[0].y-r.y,e[0].x-r.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+r.x)/2,s.y=-Math.cos(o)*a+(e[0].y+r.y)/2,s},"calcCardinalityPosition");function S(t,e,n){const r=structuredClone(n);i.log.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse();const a=k(r,25+t),o=10+.5*t,s=Math.atan2(r[0].y-a.y,r[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(r[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(r[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(r[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(r[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(r[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(r[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(r[0].x+a.x)/2,l.y=-Math.cos(s)*o+(r[0].y+a.y)/2),l}function T(t){let e="",n="";for(const r of t)void 0!==r&&(r.startsWith("color:")||r.startsWith("text-align:")?n=n+r+";":e=e+r+";");return{style:e,labelStyle:n}}(0,i.__name)(S,"calcTerminalLabelPosition"),(0,i.__name)(T,"getStylesFromArray");var M=0,A=(0,i.__name)(()=>(M++,"id-"+Math.random().toString(36).substr(2,12)+"-"+M),"generateId");function B(t){let e="";for(let n=0;n<t;n++)e+="0123456789abcdef".charAt(Math.floor(16*Math.random()));return e}(0,i.__name)(B,"makeRandomHex");var L=(0,i.__name)(t=>B(t.length),"random"),E=(0,i.__name)(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:""}},"getTextObj"),F=(0,i.__name)(function(t,e){const n=e.text.replace(r.common_default.lineBreakRegex," "),[,i]=W(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(n),a},"drawSimpleText"),$=(0,s.default)((t,e,n)=>{if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),r.common_default.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let o="";return i.forEach((t,r)=>{const s=D(`${t} `,n),l=D(o,n);if(s>e){const{hyphenatedStrings:r,remainingWord:i}=O(t,e,"-",n);a.push(o,...r),o=i}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");r+1===i.length&&a.push(o)}),a.filter(t=>""!==t).join(n.joinWith)},(t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),O=(0,s.default)((t,e,n="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const i=[...t],a=[];let o="";return i.forEach((t,s)=>{const l=`${o}${t}`;if(D(l,r)>=e){const t=s+1,e=i.length===t,r=`${l}${n}`;a.push(e?l:r),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,n="-",r)=>`${t}${e}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function N(t,e){return I(t,e).height}function D(t,e){return I(t,e).width}(0,i.__name)(N,"calculateTextHeight"),(0,i.__name)(D,"calculateTextWidth");var z,I=(0,s.default)((t,e)=>{const{fontSize:n=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=W(n),l=["sans-serif",i],h=t.split(r.common_default.lineBreakRegex),u=[],f=(0,o.select)("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const d=f.append("svg");for(const t of l){let e=0;const n={width:0,height:0,lineHeight:0};for(const r of h){const i=E();i.text=r||c;const o=F(d,i).style("font-size",s).style("font-weight",a).style("font-family",t),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");n.width=Math.round(Math.max(n.width,l.width)),e=Math.round(l.height),n.height+=e,n.lineHeight=Math.round(Math.max(n.lineHeight,e))}u.push(n)}return d.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),P=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,i.__name)(this,"InitIDGenerator")}},R=(0,i.__name)(function(t){return z=z||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),z.innerHTML=t,unescape(z.textContent)},"entityDecode");function q(t){return"str"in t}(0,i.__name)(q,"isDetailedError");var j=(0,i.__name)((t,e,n,r)=>{if(!r)return;const i=t.node()?.getBBox();i&&t.append("text").text(r).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-n).attr("class",e)},"insertTitle"),W=(0,i.__name)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function H(t,e){return(0,l.default)({},t,e)}(0,i.__name)(H,"cleanAndMerge");var U={assignWithDepth:r.assignWithDepth_default,wrapLabel:$,calculateTextHeight:N,calculateTextWidth:D,calculateTextDimensions:I,cleanAndMerge:H,detectInit:f,detectDirective:d,isSubstringInArray:g,interpolateToCurve:m,calcLabelPosition:v,calcCardinalityPosition:C,calcTerminalLabelPosition:S,formatUrl:y,getStylesFromArray:T,generateId:A,random:L,runFunc:b,entityDecode:R,insertTitle:j,isLabelCoordinateInPath:Z,parseFontSize:W,InitIDGenerator:P},Y=(0,i.__name)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),G=(0,i.__name)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),V=(0,i.__name)((t,e,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:""}${t}_${e}_${n}${i?`_${i}`:""}`,"getEdgeId");function X(t){return t??null}function Z(t,e){const n=Math.round(t.x),r=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return i.includes(n.toString())||i.includes(r.toString())}(0,i.__name)(X,"handleUndefinedAttr"),(0,i.__name)(Z,"isLabelCoordinateInPath")},67367(t,e,n){n.d(e,{default:()=>Ye}),n.r(e);var r=n(37710),i=n(92329),a=n(38698),o=n(87094),s=(n(54275),n(51437),n(85533),n(70998),n(96540),n(67099)),l=n(82029),c=n(54141),h=n(60162),u=n(8968),f=n(79806),d="comm",p="rule",g="decl",m=Math.abs,y=String.fromCharCode;function b(t){return t.trim()}function x(t,e,n){return t.replace(e,n)}function _(t,e,n){return t.indexOf(e,n)}function v(t,e){return 0|t.charCodeAt(e)}function w(t,e,n){return t.slice(e,n)}function k(t){return t.length}function C(t,e){return e.push(t),t}function S(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function T(t,e,n,r){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case g:return t.return=t.return||t.value;case d:return"";case"@keyframes":return t.return=t.value+"{"+S(t.children,r)+"}";case p:if(!k(t.value=t.props.join(",")))return""}return k(n=S(t.children,r))?t.return=t.value+"{"+n+"}":""}Object.assign;var M=1,A=1,B=0,L=0,E=0,F="";function $(t,e,n,r,i,a,o,s){return{value:t,root:e,parent:n,type:r,props:i,children:a,line:M,column:A,length:o,return:"",siblings:s}}function O(){return E=L>0?v(F,--L):0,A--,10===E&&(A=1,M--),E}function N(){return E=L<B?v(F,L++):0,A++,10===E&&(A=1,M++),E}function D(){return v(F,L)}function z(){return L}function I(t,e){return w(F,t,e)}function P(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function R(t){return b(I(L-1,W(91===t?t+2:40===t?t+1:t)))}function q(t){for(;(E=D())&&E<33;)N();return P(t)>2||P(E)>3?"":" "}function j(t,e){for(;--e&&N()&&!(E<48||E>102||E>57&&E<65||E>70&&E<97););return I(t,z()+(e<6&&32==D()&&32==N()))}function W(t){for(;N();)switch(E){case t:return L;case 34:case 39:34!==t&&39!==t&&W(E);break;case 40:41===t&&W(t);break;case 92:N()}return L}function H(t,e){for(;N()&&t+E!==57&&(t+E!==84||47!==D()););return"/*"+I(e,L-1)+"*"+y(47===t?t:N())}function U(t){for(;!P(D());)N();return I(t,L)}function Y(t){return function(t){return F="",t}(G("",null,null,null,[""],t=function(t){return M=A=1,B=k(F=t),L=0,[]}(t),0,[0],t))}function G(t,e,n,r,i,a,o,s,l){for(var c=0,h=0,u=o,f=0,d=0,p=0,g=1,b=1,S=1,T=0,M="",A=i,B=a,L=r,E=M;b;)switch(p=T,T=N()){case 40:if(108!=p&&58==v(E,u-1)){-1!=_(E+=x(R(T),"&","&\f"),"&\f",m(c?s[c-1]:0))&&(S=-1);break}case 34:case 39:case 91:E+=R(T);break;case 9:case 10:case 13:case 32:E+=q(p);break;case 92:E+=j(z()-1,7);continue;case 47:switch(D()){case 42:case 47:C(X(H(N(),z()),e,n,l),l),5!=P(p||1)&&5!=P(D()||1)||!k(E)||" "===w(E,-1,void 0)||(E+=" ");break;default:E+="/"}break;case 123*g:s[c++]=k(E)*S;case 125*g:case 59:case 0:switch(T){case 0:case 125:b=0;case 59+h:-1==S&&(E=x(E,/\f/g,"")),d>0&&(k(E)-u||0===g&&47===p)&&C(d>32?Z(E+";",r,n,u-1,l):Z(x(E," ","")+";",r,n,u-2,l),l);break;case 59:E+=";";default:if(C(L=V(E,e,n,c,h,i,s,M,A=[],B=[],u,a),a),123===T)if(0===h)G(E,e,L,L,A,a,u,s,B);else{switch(f){case 99:if(110===v(E,3))break;case 108:if(97===v(E,2))break;default:h=0;case 100:case 109:case 115:}h?G(t,L,L,r&&C(V(t,L,L,0,0,i,s,M,i,A=[],u,B),B),i,B,u,s,r?A:B):G(E,L,L,L,[""],B,0,s,B)}}c=h=d=0,g=S=1,M=E="",u=o;break;case 58:u=1+k(E),d=p;default:if(g<1)if(123==T)--g;else if(125==T&&0==g++&&125==O())continue;switch(E+=y(T),T*g){case 38:S=h>0?1:(E+="\f",-1);break;case 44:s[c++]=(k(E)-1)*S,S=1;break;case 64:45===D()&&(E+=R(N())),f=D(),h=u=k(M=E+=U(z())),T++;break;case 45:45===p&&2==k(E)&&(g=0)}}return a}function V(t,e,n,r,i,a,o,s,l,c,h,u){for(var f=i-1,d=0===i?a:[""],g=function(t){return t.length}(d),y=0,_=0,v=0;y<r;++y)for(var k=0,C=w(t,f+1,f=m(_=o[y])),S=t;k<g;++k)(S=b(_>0?d[k]+" "+C:x(C,/&\f/g,d[k])))&&(l[v++]=S);return $(t,e,n,0===i?p:s,l,c,h,u)}function X(t,e,n,r){return $(t,e,n,d,y(E),w(t,2,-2),0,r)}function Z(t,e,n,r,i){return $(t,e,n,g,w(t,0,r),w(t,r+1,-1),r,i)}var Q=n(97519),K=n(75992),J={id:"c4",detector:(0,h.__name)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(5658).then(n.bind(n,25658));return{id:"c4",diagram:t}},"loader")},tt="flowchart",et={id:tt,detector:(0,h.__name)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6584).then(n.bind(n,16584));return{id:tt,diagram:t}},"loader")},nt="flowchart-v2",rt={id:nt,detector:(0,h.__name)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6584).then(n.bind(n,16584));return{id:nt,diagram:t}},"loader")},it={id:"er",detector:(0,h.__name)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(3919).then(n.bind(n,93919));return{id:"er",diagram:t}},"loader")},at="gitGraph",ot={id:at,detector:(0,h.__name)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(7764)]).then(n.bind(n,77764));return{id:at,diagram:t}},"loader")},st="gantt",lt={id:st,detector:(0,h.__name)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6334).then(n.bind(n,66334));return{id:st,diagram:t}},"loader")},ct="info",ht={id:ct,detector:(0,h.__name)(t=>/^\s*info/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(6781)]).then(n.bind(n,6781));return{id:ct,diagram:t}},"loader")},ut={id:"pie",detector:(0,h.__name)(t=>/^\s*pie/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(3097)]).then(n.bind(n,23097));return{id:"pie",diagram:t}},"loader")},ft="quadrantChart",dt={id:ft,detector:(0,h.__name)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(2412).then(n.bind(n,12412));return{id:ft,diagram:t}},"loader")},pt="xychart",gt={id:pt,detector:(0,h.__name)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(3766).then(n.bind(n,13766));return{id:pt,diagram:t}},"loader")},mt="requirement",yt={id:mt,detector:(0,h.__name)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(2193).then(n.bind(n,92193));return{id:mt,diagram:t}},"loader")},bt="sequence",xt={id:bt,detector:(0,h.__name)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(4899).then(n.bind(n,74899));return{id:bt,diagram:t}},"loader")},_t="class",vt={id:_t,detector:(0,h.__name)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(5437),n.e(9127)]).then(n.bind(n,9127));return{id:_t,diagram:t}},"loader")},wt="classDiagram",kt={id:wt,detector:(0,h.__name)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(5437),n.e(8096)]).then(n.bind(n,18096));return{id:wt,diagram:t}},"loader")},Ct="state",St={id:Ct,detector:(0,h.__name)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(8042),n.e(8075),n.e(3311)]).then(n.bind(n,13311));return{id:Ct,diagram:t}},"loader")},Tt="stateDiagram",Mt={id:Tt,detector:(0,h.__name)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(8075),n.e(7001)]).then(n.bind(n,27001));return{id:Tt,diagram:t}},"loader")},At="journey",Bt={id:At,detector:(0,h.__name)(t=>/^\s*journey/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(4513).then(n.bind(n,74513));return{id:At,diagram:t}},"loader")},Lt={draw:(0,h.__name)((t,e,n)=>{h.log.debug("rendering svg for syntax error\n");const r=(0,i.selectSvgElement)(e),a=r.append("g");r.attr("viewBox","0 0 2412 512"),(0,c.configureSvgSize)(r,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw")},Et=Lt,Ft={db:{},renderer:Lt,parser:{parse:(0,h.__name)(()=>{},"parse")}},$t="flowchart-elk",Ot={id:$t,detector:(0,h.__name)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6584).then(n.bind(n,16584));return{id:$t,diagram:t}},"loader")},Nt="timeline",Dt={id:Nt,detector:(0,h.__name)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(8824).then(n.bind(n,68824));return{id:Nt,diagram:t}},"loader")},zt="mindmap",It={id:zt,detector:(0,h.__name)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(3895).then(n.bind(n,13895));return{id:zt,diagram:t}},"loader")},Pt="kanban",Rt={id:Pt,detector:(0,h.__name)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6826).then(n.bind(n,46826));return{id:Pt,diagram:t}},"loader")},qt="sankey",jt={id:qt,detector:(0,h.__name)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(5016).then(n.bind(n,95016));return{id:qt,diagram:t}},"loader")},Wt="packet",Ht={id:Wt,detector:(0,h.__name)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(3896)]).then(n.bind(n,3896));return{id:Wt,diagram:t}},"loader")},Ut="radar",Yt={id:Ut,detector:(0,h.__name)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(1803)]).then(n.bind(n,31803));return{id:Ut,diagram:t}},"loader")},Gt="block",Vt={id:Gt,detector:(0,h.__name)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(521)]).then(n.bind(n,22902));return{id:Gt,diagram:t}},"loader")},Xt="architecture",Zt={id:Xt,detector:(0,h.__name)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(8936),n.e(4898)]).then(n.bind(n,14898));return{id:Xt,diagram:t}},"loader")},Qt="treemap",Kt={id:Qt,detector:(0,h.__name)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(1498)]).then(n.bind(n,41498));return{id:Qt,diagram:t}},"loader")},Jt=!1,te=(0,h.__name)(()=>{Jt||(Jt=!0,(0,c.registerDiagram)("error",Ft,t=>"error"===t.toLowerCase().trim()),(0,c.registerDiagram)("---",{db:{clear:(0,h.__name)(()=>{},"clear")},styles:{},renderer:{draw:(0,h.__name)(()=>{},"draw")},parser:{parse:(0,h.__name)(()=>{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")},"parse")},init:(0,h.__name)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,c.registerLazyLoadedDiagrams)(Ot,It,Zt),(0,c.registerLazyLoadedDiagrams)(J,Rt,kt,vt,it,lt,ht,ut,yt,xt,rt,et,Dt,ot,Mt,St,Bt,dt,jt,Ht,gt,Vt,Yt,Kt))},"addDiagrams"),ee=(0,h.__name)(async()=>{h.log.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(c.detectors).map(async([t,{detector:e,loader:n}])=>{if(n)try{(0,c.getDiagram)(t)}catch{try{const{diagram:t,id:r}=await n();(0,c.registerDiagram)(r,t,e)}catch(e){throw h.log.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete c.detectors[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){h.log.error(`Failed to load ${t.length} external diagrams`);for(const e of t)h.log.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function ne(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function re(t,e,n,r){if(void 0!==t.insert){if(n){const e=`chart-desc-${r}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(n)}if(e){const n=`chart-title-${r}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}(0,h.__name)(ne,"setA11yDiagramInfo"),(0,h.__name)(re,"addSVGa11yTitleDescription");var ie=class t{constructor(t,e,n,r,i){this.type=t,this.text=e,this.db=n,this.parser=r,this.renderer=i}static{(0,h.__name)(this,"Diagram")}static async fromText(e,n={}){const r=(0,c.getConfig)(),i=(0,c.detectType)(e,r);e=(0,l.encodeEntities)(e)+"\n";try{(0,c.getDiagram)(i)}catch{const t=(0,c.getDiagramLoader)(i);if(!t)throw new c.UnknownDiagramError(`Diagram ${i} not found.`);const{id:e,diagram:n}=await t();(0,c.registerDiagram)(e,n)}const{db:a,parser:o,renderer:s,init:h}=(0,c.getDiagram)(i);return o.parser&&(o.parser.yy=a),a.clear?.(),h?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(e),new t(i,e,a,o,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},ae=[],oe=(0,h.__name)(()=>{ae.forEach(t=>{t()}),ae=[]},"attachFunctions"),se=(0,h.__name)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function le(t){const e=t.match(c.frontMatterRegex);if(!e)return{text:t,metadata:{}};let n=(0,a.load)(e[1],{schema:a.JSON_SCHEMA})??{};n="object"!=typeof n||Array.isArray(n)?{}:n;const r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:t.slice(e[0].length),metadata:r}}(0,h.__name)(le,"extractFrontMatter");var ce=(0,h.__name)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,n)=>"<"+e+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),he=(0,h.__name)(t=>{const{text:e,metadata:n}=le(t),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||(a.gantt={}),a.gantt.displayMode=r),{title:i,config:a,text:e}},"processFrontmatter"),ue=(0,h.__name)(t=>{const e=l.utils_default.detectInit(t)??{},n=l.utils_default.detectDirective(t,"wrap");return Array.isArray(n)?e.wrap=n.some(({type:t})=>"wrap"===t):"wrap"===n?.type&&(e.wrap=!0),{text:(0,l.removeDirectives)(t),directive:e}},"processDirectives");function fe(t){const e=ce(t),n=he(e),r=ue(n.text),i=(0,l.cleanAndMerge)(n.config,r.directive);return{code:t=se(r.text),title:n.title,config:i}}function de(t){const e=(new TextEncoder).encode(t),n=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(n)}(0,h.__name)(fe,"preprocessDiagram"),(0,h.__name)(de,"toBase64");var pe=["foreignobject"],ge=["dominant-baseline"];function me(t){const e=fe(t);return(0,c.reset)(),(0,c.addDirective)(e.config??{}),e}async function ye(t,e){te();try{const{code:e,config:n}=me(t);return{diagramType:(await Ae(e)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,h.__name)(me,"processAndSetConfigs"),(0,h.__name)(ye,"parse");var be=(0,h.__name)((t,e,n=[])=>`\n.${t} ${e} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),xe=(0,h.__name)((t,e=new Map)=>{let n="";if(void 0!==t.themeCSS&&(n+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(n+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const r=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{(0,K.default)(t.styles)||r.forEach(e=>{n+=be(t.id,e,t.styles)}),(0,K.default)(t.textStyles)||(n+=be(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),_e=(0,h.__name)((t,e,n,r)=>{const i=xe(t,n);return S(Y(`${r}{${(0,c.styles_default)(e,i,t.themeVariables)}}`),T)},"createUserStyles"),ve=(0,h.__name)((t="",e,n)=>{let r=t;return n||e||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=(0,l.decodeEntities)(r),r=r.replace(/<br>/g,"<br/>"),r},"cleanUpSvgCode"),we=(0,h.__name)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${de(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),ke=(0,h.__name)((t,e,n,r,i)=>{const a=t.append("div");a.attr("id",n),r&&a.attr("style",r);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&o.attr("xmlns:xlink",i),o.append("g"),t},"appendDivSvgG");function Ce(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,h.__name)(Ce,"sandboxedIframe");var Se=(0,h.__name)((t,e,n,r)=>{t.getElementById(e)?.remove(),t.getElementById(n)?.remove(),t.getElementById(r)?.remove()},"removeExistingElements"),Te=(0,h.__name)(async function(t,e,n){te();const i=me(e);e=i.code;const a=(0,c.getConfig)();h.log.debug(a),e.length>(a?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+t,s="i"+t,l="#"+s,u="d"+t,d="#"+u,p=(0,h.__name)(()=>{const t=m?l:d,e=(0,f.select)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,f.select)("body");const m="sandbox"===a.securityLevel,y="loose"===a.securityLevel,b=a.fontFamily;if(void 0!==n){if(n&&(n.innerHTML=""),m){const t=Ce((0,f.select)(n),s);g=(0,f.select)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,f.select)(n);ke(g,t,u,`font-family: ${b}`,"http://www.w3.org/1999/xlink")}else{if(Se(document,t,u,s),m){const t=Ce((0,f.select)("body"),s);g=(0,f.select)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,f.select)("body");ke(g,t,u)}let x,_;try{x=await ie.fromText(e,{title:i.title})}catch(t){if(a.suppressErrorRendering)throw p(),t;x=await ie.fromText("error"),_=t}const v=g.select(d).node(),w=x.type,k=v.firstChild,C=k.firstChild,S=x.renderer.getClasses?.(e,x),T=_e(a,w,S,o),M=document.createElement("style");M.innerHTML=T,k.insertBefore(M,C);try{await x.renderer.draw(e,t,r.package_default.version,x)}catch(n){throw a.suppressErrorRendering?p():Et.draw(e,t,r.package_default.version),n}const A=g.select(`${d} svg`),B=x.db.getAccTitle?.(),L=x.db.getAccDescription?.();Be(w,A,B,L),g.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let E=g.select(d).node().innerHTML;if(h.log.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=ve(E,m,(0,c.evaluate)(a.arrowMarkerAbsolute)),m){const t=g.select(d+" svg").node();E=we(E,t)}else y||(E=Q.default.sanitize(E,{ADD_TAGS:pe,ADD_ATTR:ge,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oe(),_)throw _;return p(),{diagramType:w,svg:E,bindFunctions:x.db.bindFunctions}},"render");function Me(t={}){const e=(0,c.assignWithDepth_default)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,c.saveConfigFromInitialize)(e),e?.theme&&e.theme in c.themes_default?e.themeVariables=c.themes_default[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=c.themes_default.default.getThemeVariables(e.themeVariables));const n="object"==typeof e?(0,c.setSiteConfig)(e):(0,c.getSiteConfig)();(0,h.setLogLevel)(n.logLevel),te()}(0,h.__name)(Me,"initialize");var Ae=(0,h.__name)((t,e={})=>{const{code:n}=fe(t);return ie.fromText(n,e)},"getDiagramFromText");function Be(t,e,n,r){ne(e,t),re(e,n,r,e.attr("id"))}(0,h.__name)(Be,"addA11yInfo");var Le=Object.freeze({render:Te,parse:ye,getDiagramFromText:Ae,initialize:Me,getConfig:c.getConfig,setConfig:c.setConfig,getSiteConfig:c.getSiteConfig,updateSiteConfig:c.updateSiteConfig,reset:(0,h.__name)(()=>{(0,c.reset)()},"reset"),globalReset:(0,h.__name)(()=>{(0,c.reset)(c.defaultConfig)},"globalReset"),defaultConfig:c.defaultConfig});(0,h.setLogLevel)((0,c.getConfig)().logLevel),(0,c.reset)((0,c.getConfig)());var Ee=(0,h.__name)((t,e,n)=>{h.log.warn(t),(0,l.isDetailedError)(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Fe=(0,h.__name)(async function(t={querySelector:".mermaid"}){try{await $e(t)}catch(e){if((0,l.isDetailedError)(e)&&h.log.error(e.str),Ue.parseError&&Ue.parseError(e),!t.suppressErrors)throw h.log.error("Use the suppressErrors option to suppress these errors"),e}},"run"),$e=(0,h.__name)(async function({postRenderCallback:t,querySelector:e,nodes:n}={querySelector:".mermaid"}){const r=Le.getConfig();let i;if(h.log.debug((t?"":"No ")+"Callback function found"),n)i=n;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}h.log.debug(`Found ${i.length} diagrams`),void 0!==r?.startOnLoad&&(h.log.debug("Start On Load: "+r?.startOnLoad),Le.updateSiteConfig({startOnLoad:r?.startOnLoad}));const a=new l.utils_default.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const s=[];for(const e of Array.from(i)){if(h.log.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const n=`mermaid-${a.next()}`;o=e.innerHTML,o=(0,u.dedent)(l.utils_default.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=l.utils_default.detectInit(o);r&&h.log.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await We(n,o,e);e.innerHTML=r,t&&await t(n),i&&i(e)}catch(t){Ee(t,s,Ue.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Oe=(0,h.__name)(function(t){Le.initialize(t)},"initialize"),Ne=(0,h.__name)(async function(t,e,n){h.log.warn("mermaid.init is deprecated. Please use run instead."),t&&Oe(t);const r={postRenderCallback:n,querySelector:".mermaid"};"string"==typeof e?r.querySelector=e:e&&(e instanceof HTMLElement?r.nodes=[e]:r.nodes=e),await Fe(r)},"init"),De=(0,h.__name)(async(t,{lazyLoad:e=!0}={})=>{te(),(0,c.registerLazyLoadedDiagrams)(...t),!1===e&&await ee()},"registerExternalDiagrams"),ze=(0,h.__name)(function(){if(Ue.startOnLoad){const{startOnLoad:t}=Le.getConfig();t&&Ue.run().catch(t=>h.log.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",ze,!1);var Ie=(0,h.__name)(function(t){Ue.parseError=t},"setParseErrorHandler"),Pe=[],Re=!1,qe=(0,h.__name)(async()=>{if(!Re){for(Re=!0;Pe.length>0;){const t=Pe.shift();if(t)try{await t()}catch(t){h.log.error("Error executing queue",t)}}Re=!1}},"executeQueue"),je=(0,h.__name)(async(t,e)=>new Promise((n,r)=>{const i=(0,h.__name)(()=>new Promise((i,a)=>{Le.parse(t,e).then(t=>{i(t),n(t)},t=>{h.log.error("Error parsing",t),Ue.parseError?.(t),a(t),r(t)})}),"performCall");Pe.push(i),qe().catch(r)}),"parse"),We=(0,h.__name)((t,e,n)=>new Promise((r,i)=>{const a=(0,h.__name)(()=>new Promise((a,o)=>{Le.render(t,e,n).then(t=>{a(t),r(t)},t=>{h.log.error("Error parsing",t),Ue.parseError?.(t),o(t),i(t)})}),"performCall");Pe.push(a),qe().catch(i)}),"render"),He=(0,h.__name)(()=>Object.keys(c.detectors).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Ue={startOnLoad:!0,mermaidAPI:Le,parse:je,render:We,init:Ne,run:Fe,registerExternalDiagrams:De,registerLayoutLoaders:o.registerLayoutLoaders,initialize:Oe,parseError:void 0,contentLoaded:ze,setParseErrorHandler:Ie,detectType:c.detectType,registerIconPacks:s.registerIconPacks,getRegisteredDiagramsMetadata:He},Ye=Ue}};
2
+ export const __webpack_esm_id__=7367;export const __webpack_esm_ids__=[7367];export const __webpack_esm_modules__={25552(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},8041(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var r=n(25552);function i(t){return t.replace(r.ctrlCharactersRegex,"").replace(r.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}e.sanitizeUrl=function(t){if(!t)return r.BLANK_URL;var e,n=a(t.trim());do{e=(n=a(n=i(n).replace(r.htmlCtrlEntityRegex,"").replace(r.ctrlCharactersRegex,"").replace(r.whitespaceEscapeCharsRegex,"").trim())).match(r.ctrlCharactersRegex)||n.match(r.htmlEntitiesRegex)||n.match(r.htmlCtrlEntityRegex)||n.match(r.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var o=n;if(!o)return r.BLANK_URL;if(function(t){return r.relativeFirstCharacters.indexOf(t[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(r.urlSchemeRegex);if(!l)return o;var c=l[0].toLowerCase().trim();if(r.invalidProtocolRegex.test(c))return r.BLANK_URL;var h=s.replace(/\\/g,"/");if("mailto:"===c||c.includes("://"))return h;if("http:"===c||"https:"===c){if(!function(t){return URL.canParse(t)}(h))return r.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h}},23464(t){t.exports=function(){var t=6e4,e=36e5,n="millisecond",r="second",i="minute",a="hour",o="day",s="week",l="month",c="quarter",h="year",u="date",f="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|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,g={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(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,l),a=n-i<0,o=e.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:h,w:s,d:o,D:u,h:a,m:i,s:r,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",x={};x[b]=g;var _="$isDayjsObject",v=function(t){return t instanceof S||!(!t||!t[_])},w=function t(e,n,r){var i;if(!e)return b;if("string"==typeof e){var a=e.toLowerCase();x[a]&&(i=a),n&&(x[a]=n,i=a);var o=e.split("-");if(!i&&o.length>1)return t(o[0])}else{var s=e.name;x[s]=e,i=s}return!r&&i&&(b=i),i||!r&&b},k=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},C=y;C.l=w,C.i=v,C.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var m=g.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(d);if(r){var i=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===f)},m.isSame=function(t,e){var n=k(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return k(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<k(t)},m.$g=function(t,e,n){return C.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,c=!!C.u(e)||e,f=C.p(t),d=function(t,e){var r=C.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?r:r.endOf(o)},p=function(t,e){return C.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},g=this.$W,m=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(f){case h:return c?d(1,0):d(31,11);case l:return c?d(1,m):d(0,m+1);case s:var x=this.$locale().weekStart||0,_=(g<x?g+7:g)-x;return d(c?y-_:y+(6-_),m);case o:case u:return p(b+"Hours",0);case a:return p(b+"Minutes",1);case i:return p(b+"Seconds",2);case r:return p(b+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var s,c=C.p(t),f="set"+(this.$u?"UTC":""),d=(s={},s[o]=f+"Date",s[u]=f+"Date",s[l]=f+"Month",s[h]=f+"FullYear",s[a]=f+"Hours",s[i]=f+"Minutes",s[r]=f+"Seconds",s[n]=f+"Milliseconds",s)[c],p=c===o?this.$D+(e-this.$W):e;if(c===l||c===h){var g=this.clone().set(u,1);g.$d[d](p),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[C.p(t)]()},m.add=function(n,c){var u,f=this;n=Number(n);var d=C.p(c),p=function(t){var e=k(f);return C.w(e.date(e.date()+Math.round(t*n)),f)};if(d===l)return this.set(l,this.$M+n);if(d===h)return this.set(h,this.$y+n);if(d===o)return p(1);if(d===s)return p(7);var g=(u={},u[i]=t,u[a]=e,u[r]=1e3,u)[d]||1,m=this.$d.getTime()+n*g;return C.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=C.z(this),a=this.$H,o=this.$m,s=this.$M,l=n.weekdays,c=n.months,h=n.meridiem,u=function(t,n,i,a){return t&&(t[n]||t(e,r))||i[n].slice(0,a)},d=function(t){return C.s(a%12||12,t,"0")},g=h||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return C.s(e.$y,4,"0");case"M":return s+1;case"MM":return C.s(s+1,2,"0");case"MMM":return u(n.monthsShort,s,c,3);case"MMMM":return u(c,s);case"D":return e.$D;case"DD":return C.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(n.weekdaysMin,e.$W,l,2);case"ddd":return u(n.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return C.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return g(a,o,!0);case"A":return g(a,o,!1);case"m":return String(o);case"mm":return C.s(o,2,"0");case"s":return String(e.$s);case"ss":return C.s(e.$s,2,"0");case"SSS":return C.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,u,f){var d,p=this,g=C.p(u),m=k(n),y=(m.utcOffset()-this.utcOffset())*t,b=this-m,x=function(){return C.m(p,m)};switch(g){case h:d=x()/12;break;case l:d=x();break;case c:d=x()/3;break;case s:d=(b-y)/6048e5;break;case o:d=(b-y)/864e5;break;case a:d=b/e;break;case i:d=b/t;break;case r:d=b/1e3;break;default:d=b}return f?d:C.a(d)},m.daysInMonth=function(){return this.endOf(l).$D},m.$locale=function(){return x[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return C.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),T=S.prototype;return k.prototype=T,[["$ms",n],["$s",r],["$m",i],["$H",a],["$W",o],["$M",l],["$y",h],["$D",u]].forEach(function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),k.extend=function(t,e){return t.$i||(t(e,S,k),t.$i=!0),k},k.locale=w,k.isDayjs=v,k.unix=function(t){return k(1e3*t)},k.en=x[b],k.Ls=x,k.p={},k}()},7083(t,e,n){function r(t,e,n){if(t&&t.length){const[r,i]=e,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(const e of t){const[t,n]=e;e[0]=(t-r)*o-(n-i)*s+r,e[1]=(t-r)*s+(n-i)*o+i}}}function i(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,n,a=1){const o=n,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,c=[0,0];if(o)for(const t of l)r(t,c,o);const h=function(t,e,n){const r=[];for(const e of t){const t=[...e];i(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&r.push(t)}const a=[];e=Math.max(e,.1);const o=[];for(const t of r)for(let e=0;e<t.length-1;e++){const n=t[e],r=t[e+1];if(n[1]!==r[1]){const t=Math.min(n[1],r[1]);o.push({ymin:t,ymax:Math.max(n[1],r[1]),x:t===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return a;let s=[],l=o[0].ymin,c=0;for(;s.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>l);e++)t=e;o.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==n||c%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const n=s[t].edge,r=s[e].edge;a.push([[Math.round(n.x),l],[Math.round(r.x),l]])}l+=n,s.forEach(t=>{t.edge.x=t.edge.x+n*t.edge.islope}),c++}return a}(l,s,a);if(o){for(const t of l)r(t,c,-o);!function(t,e,n){const i=[];t.forEach(t=>i.push(...t)),r(i,e,n)}(h,c,-o)}return h}function o(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(o=i),a(t,i,r,o||1)}n.r(e),n.d(e,{default:()=>it});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const n=o(t,e);return{type:"fillSketch",ops:this.renderLines(n,e)}}renderLines(t,e){const n=[];for(const r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}}function l(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}class c extends s{fillPolygons(t,e){let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);const r=o(t,Object.assign({},e,{hachureGap:n})),i=Math.PI/180*e.hachureAngle,a=[],s=.5*n*Math.cos(i),c=.5*n*Math.sin(i);for(const[t,e]of r)l([t,e])&&a.push([[t[0]-s,t[1]+c],[...e]],[[t[0]+s,t[1]-c],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class h extends s{fillPolygons(t,e){const n=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),i=this._fillPolygons(t,r);return n.ops=n.ops.concat(i.ops),n}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const n=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(n,e)}dotsOnLines(t,e){const n=[];let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let i=e.fillWeight;i<0&&(i=e.strokeWidth/2);const a=r/4;for(const o of t){const t=l(o),s=t/r,c=Math.ceil(s)-1,h=t-c*r,u=(o[0][0]+o[1][0])/2-r/4,f=Math.min(o[0][1],o[1][1]);for(let t=0;t<c;t++){const o=f+h+t*r,s=u-a+2*Math.random()*a,l=o-a+2*Math.random()*a,c=this.helper.ellipse(s,l,i,i,e);n.push(...c.ops)}}return{type:"fillSketch",ops:n}}}class f{constructor(t){this.helper=t}fillPolygons(t,e){const n=o(t,e);return{type:"fillSketch",ops:this.dashedLine(n,e)}}dashedLine(t,e){const n=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,r=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,i=[];return t.forEach(t=>{const a=l(t),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2;let c=t[0],h=t[1];c[0]>h[0]&&(c=t[1],h=t[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let t=0;t<o;t++){const a=t*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],h=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],h[0],h[1],e))}}),i}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const n=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,r=e.zigzagOffset<0?n:e.zigzagOffset,i=o(t,e=Object.assign({},e,{hachureGap:n+r}));return{type:"fillSketch",ops:this.zigzagLines(i,r,e)}}zigzagLines(t,e,n){const r=[];return t.forEach(t=>{const i=l(t),a=Math.round(i/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let t=0;t<a;t++){const i=2*t*e,a=2*(t+1)*e,s=Math.sqrt(2*Math.pow(e,2)),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],h=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],u=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],u[0],u[1],n),...this.helper.doubleLineOps(u[0],u[1],h[0],h[1],n))}}),r}}const p={};class g{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const m={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function y(t,e){return t.type===e}function b(t){const e=[],n=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let r="BOD",i=0,a=n[i];for(;!y(a,2);){let o=0;const s=[];if("BOD"===r){if("M"!==a.text&&"m"!==a.text)return b("M0,0"+t);i++,o=m[a.text],r=a.text}else y(a,1)?o=m[r]:(i++,o=m[a.text],r=a.text);if(!(i+o<n.length))throw new Error("Path data ended short");for(let t=i;t<i+o;t++){const e=n[t];if(!y(e,1))throw new Error("Param not a number: "+r+","+e.text);s[s.length]=+e.text}if("number"!=typeof m[r])throw new Error("Bad segment: "+r);{const t={key:r,data:s};e.push(t),i+=o,a=n[i],"M"===r&&(r="L"),"m"===r&&(r="l")}}return e}function x(t){let e=0,n=0,r=0,i=0;const a=[];for(const{key:o,data:s}of t)switch(o){case"M":a.push({key:"M",data:[...s]}),[e,n]=s,[r,i]=s;break;case"m":e+=s[0],n+=s[1],a.push({key:"M",data:[e,n]}),r=e,i=n;break;case"L":a.push({key:"L",data:[...s]}),[e,n]=s;break;case"l":e+=s[0],n+=s[1],a.push({key:"L",data:[e,n]});break;case"C":a.push({key:"C",data:[...s]}),e=s[4],n=s[5];break;case"c":{const t=s.map((t,r)=>r%2?t+n:t+e);a.push({key:"C",data:t}),e=t[4],n=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],n=s[3];break;case"q":{const t=s.map((t,r)=>r%2?t+n:t+e);a.push({key:"Q",data:t}),e=t[2],n=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],n=s[6];break;case"a":e+=s[5],n+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,n]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],n=s[3];break;case"s":{const t=s.map((t,r)=>r%2?t+n:t+e);a.push({key:"S",data:t}),e=t[2],n=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],n=s[1];break;case"t":e+=s[0],n+=s[1],a.push({key:"T",data:[e,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=r,n=i}return a}function _(t){const e=[];let n="",r=0,i=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[a,o]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],s=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let t=0,a=0;"C"===n||"S"===n?(t=r+(r-s),a=i+(i-l)):(t=r,a=i),e.push({key:"C",data:[t,a,...h]}),s=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[t,a]=h;let o=0,c=0;"Q"===n||"T"===n?(o=r+(r-s),c=i+(i-l)):(o=r,c=i);const u=r+2*(o-r)/3,f=i+2*(c-i)/3,d=t+2*(o-t)/3,p=a+2*(c-a)/3;e.push({key:"C",data:[u,f,d,p,t,a]}),s=o,l=c,r=t,i=a;break}case"Q":{const[t,n,a,o]=h,c=r+2*(t-r)/3,u=i+2*(n-i)/3,f=a+2*(t-a)/3,d=o+2*(n-o)/3;e.push({key:"C",data:[c,u,f,d,a,o]}),s=t,l=n,r=a,i=o;break}case"A":{const t=Math.abs(h[0]),n=Math.abs(h[1]),a=h[2],o=h[3],s=h[4],l=h[5],c=h[6];0===t||0===n?(e.push({key:"C",data:[r,i,l,c,l,c]}),r=l,i=c):r===l&&i===c||(w(r,i,l,c,t,n,a,o,s).forEach(function(t){e.push({key:"C",data:t})}),r=l,i=c);break}case"Z":e.push({key:"Z",data:[]}),r=a,i=o}n=c}return e}function v(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function w(t,e,n,r,i,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,p=0,g=0,m=0;if(c)[d,p,g,m]=c;else{[t,e]=v(t,e,-h),[n,r]=v(n,r,-h);const o=(t-n)/2,c=(e-r)/2;let u=o*o/(i*i)+c*c/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const f=i*i,y=a*a,b=f*y-f*c*c-y*o*o,x=f*c*c+y*o*o,_=(s===l?-1:1)*Math.sqrt(Math.abs(b/x));g=_*i*c/a+(t+n)/2,m=_*-a*o/i+(e+r)/2,d=Math.asin(parseFloat(((e-m)/a).toFixed(9))),p=Math.asin(parseFloat(((r-m)/a).toFixed(9))),t<g&&(d=Math.PI-d),n<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI)}let y=p-d;if(Math.abs(y)>120*Math.PI/180){const t=p,e=n,s=r;p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=w(n=g+i*Math.cos(p),r=m+a*Math.sin(p),e,s,i,a,o,0,l,[p,t,g,m])}y=p-d;const b=Math.cos(d),x=Math.sin(d),_=Math.cos(p),k=Math.sin(p),C=Math.tan(y/4),S=4/3*i*C,T=4/3*a*C,M=[t,e],A=[t+S*x,e-T*b],B=[n+S*k,r-T*_],L=[n,r];if(A[0]=2*M[0]-A[0],A[1]=2*M[1]-A[1],c)return[A,B,L].concat(f);{f=[A,B,L].concat(f);const t=[];for(let e=0;e<f.length;e+=3){const n=v(f[e][0],f[e][1],h),r=v(f[e+1][0],f[e+1][1],h),i=v(f[e+2][0],f[e+2][1],h);t.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return t}}const k={randOffset:function(t,e){return D(t,e)},randOffsetWithRange:function(t,e,n){return N(t,e,n)},ellipse:function(t,e,n,r,i){return A(t,e,i,M(n,r,i)).opset},doubleLineOps:function(t,e,n,r,i){return I(t,e,n,r,i,!0)}};function C(t,e,n,r,i){return{type:"path",ops:I(t,e,n,r,i)}}function S(t,e,n){const r=(t||[]).length;if(r>2){const i=[];for(let e=0;e<r-1;e++)i.push(...I(t[e][0],t[e][1],t[e+1][0],t[e+1][1],n));return e&&i.push(...I(t[r-1][0],t[r-1][1],t[0][0],t[0][1],n)),{type:"path",ops:i}}return 2===r?C(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function T(t,e){if(t.length){const n="number"==typeof t[0][0]?[t]:t,r=P(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:P(n[0],1.5*(1+.22*e.roughness),$(e));for(let t=1;t<n.length;t++){const a=n[t];if(a.length){const t=P(a,1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:P(a,1.5*(1+.22*e.roughness),$(e));for(const e of t)"move"!==e.op&&r.push(e);for(const t of n)"move"!==t.op&&i.push(t)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function M(t,e,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-n.curveFitting;return o+=D(o*l,n),s+=D(s*l,n),{increment:a,rx:o,ry:s}}function A(t,e,n,r){const[i,a]=q(r.increment,t,e,r.rx,r.ry,1,r.increment*N(.1,N(.4,1,n),n),n);let o=R(i,null,n);if(!n.disableMultiStroke&&0!==n.roughness){const[i]=q(r.increment,t,e,r.rx,r.ry,1.5,0,n),a=R(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function B(t,e,n,r,i,a,o,s,l){const c=t,h=e;let u=Math.abs(n/2),f=Math.abs(r/2);u+=D(.01*u,l),f+=D(.01*f,l);let d=i,p=a;for(;d<0;)d+=2*Math.PI,p+=2*Math.PI;p-d>2*Math.PI&&(d=0,p=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(p-d)/2),y=j(m,c,h,u,f,d,p,1,l);if(!l.disableMultiStroke){const t=j(m,c,h,u,f,d,p,1.5,l);y.push(...t)}return o&&(s?y.push(...I(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...I(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:y}}function L(t,e){const n=_(x(b(t))),r=[];let i=[0,0],a=[0,0];for(const{key:t,data:o}of n)switch(t){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":r.push(...I(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[t,n,i,s,l,c]=o;r.push(...W(t,n,i,s,l,c,a,e)),a=[l,c];break}case"Z":r.push(...I(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:r}}function E(t,e){const n=[];for(const r of t)if(r.length){const t=e.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:"move",data:[r[0][0]+D(t,e),r[0][1]+D(t,e)]});for(let a=1;a<i;a++)n.push({op:"lineTo",data:[r[a][0]+D(t,e),r[a][1]+D(t,e)]})}}return{type:"fillPath",ops:n}}function F(t,e){return function(t,e){let n=t.fillStyle||"hachure";if(!p[n])switch(n){case"zigzag":p[n]||(p[n]=new c(e));break;case"cross-hatch":p[n]||(p[n]=new h(e));break;case"dots":p[n]||(p[n]=new u(e));break;case"dashed":p[n]||(p[n]=new f(e));break;case"zigzag-line":p[n]||(p[n]=new d(e));break;default:n="hachure",p[n]||(p[n]=new s(e))}return p[n]}(e,k).fillPolygons(t,e)}function $(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function O(t){return t.randomizer||(t.randomizer=new g(t.seed||0)),t.randomizer.next()}function N(t,e,n,r=1){return n.roughness*r*(O(n)*(e-t)+t)}function D(t,e,n=1){return N(-t,t,e,n)}function I(t,e,n,r,i,a=!1){const o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=z(t,e,n,r,i,!0,!1);if(o)return s;const l=z(t,e,n,r,i,!0,!0);return s.concat(l)}function z(t,e,n,r,i,a,o){const s=Math.pow(t-n,2)+Math.pow(e-r,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*O(i);let d=i.bowing*i.maxRandomnessOffset*(r-e)/200,p=i.bowing*i.maxRandomnessOffset*(t-n)/200;d=D(d,i,c),p=D(p,i,c);const g=[],m=()=>D(u,i,c),y=()=>D(h,i,c),b=i.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(b?0:m()),e+(b?0:m())]}):g.push({op:"move",data:[t+(b?0:D(h,i,c)),e+(b?0:D(h,i,c))]})),o?g.push({op:"bcurveTo",data:[d+t+(n-t)*f+m(),p+e+(r-e)*f+m(),d+t+2*(n-t)*f+m(),p+e+2*(r-e)*f+m(),n+(b?0:m()),r+(b?0:m())]}):g.push({op:"bcurveTo",data:[d+t+(n-t)*f+y(),p+e+(r-e)*f+y(),d+t+2*(n-t)*f+y(),p+e+2*(r-e)*f+y(),n+(b?0:y()),r+(b?0:y())]}),g}function P(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+D(e,n),t[0][1]+D(e,n)]),r.push([t[0][0]+D(e,n),t[0][1]+D(e,n)]);for(let i=1;i<t.length;i++)r.push([t[i][0]+D(e,n),t[i][1]+D(e,n)]),i===t.length-1&&r.push([t[i][0]+D(e,n),t[i][1]+D(e,n)]);return R(r,null,n)}function R(t,e,n){const r=t.length,i=[];if(r>3){const a=[],o=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<r;e++){const n=t[e];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*t[e+1][0]-o*t[e-1][0])/6,n[1]+(o*t[e+1][1]-o*t[e-1][1])/6],a[2]=[t[e+1][0]+(o*t[e][0]-o*t[e+2][0])/6,t[e+1][1]+(o*t[e][1]-o*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=n.maxRandomnessOffset;i.push({op:"lineTo",data:[e[0]+D(t,n),e[1]+D(t,n)]})}}else 3===r?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===r&&i.push(...z(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function q(t,e,n,r,i,a,o,s){const l=[],c=[];if(0===s.roughness){t/=4,c.push([e+r*Math.cos(-t),n+i*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+r*Math.cos(a),n+i*Math.sin(a)];l.push(t),c.push(t)}c.push([e+r*Math.cos(0),n+i*Math.sin(0)]),c.push([e+r*Math.cos(t),n+i*Math.sin(t)])}else{const h=D(.5,s)-Math.PI/2;c.push([D(a,s)+e+.9*r*Math.cos(h-t),D(a,s)+n+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let o=h;o<u;o+=t){const t=[D(a,s)+e+r*Math.cos(o),D(a,s)+n+i*Math.sin(o)];l.push(t),c.push(t)}c.push([D(a,s)+e+r*Math.cos(h+2*Math.PI+.5*o),D(a,s)+n+i*Math.sin(h+2*Math.PI+.5*o)]),c.push([D(a,s)+e+.98*r*Math.cos(h+o),D(a,s)+n+.98*i*Math.sin(h+o)]),c.push([D(a,s)+e+.9*r*Math.cos(h+.5*o),D(a,s)+n+.9*i*Math.sin(h+.5*o)])}return[c,l]}function j(t,e,n,r,i,a,o,s,l){const c=a+D(.1,l),h=[];h.push([D(s,l)+e+.9*r*Math.cos(c-t),D(s,l)+n+.9*i*Math.sin(c-t)]);for(let a=c;a<=o;a+=t)h.push([D(s,l)+e+r*Math.cos(a),D(s,l)+n+i*Math.sin(a)]);return h.push([e+r*Math.cos(o),n+i*Math.sin(o)]),h.push([e+r*Math.cos(o),n+i*Math.sin(o)]),R(h,null,l)}function W(t,e,n,r,i,a,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let d=0;d<u;d++)0===d?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:D(c[0],s)),o[1]+(f?0:D(c[0],s))]}),h=f?[i,a]:[i+D(c[d],s),a+D(c[d],s)],l.push({op:"bcurveTo",data:[t+D(c[d],s),e+D(c[d],s),n+D(c[d],s),r+D(c[d],s),h[0],h[1]]});return l}function H(t){return[...t]}function U(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(3===n)r.push(H(t[0]),H(t[1]),H(t[2]),H(t[2]));else{const n=[];n.push(t[0],t[0]);for(let e=1;e<t.length;e++)n.push(t[e]),e===t.length-1&&n.push(t[e]);const i=[],a=1-e;r.push(H(n[0]));for(let t=1;t+2<n.length;t++){const e=n[t];i[0]=[e[0],e[1]],i[1]=[e[0]+(a*n[t+1][0]-a*n[t-1][0])/6,e[1]+(a*n[t+1][1]-a*n[t-1][1])/6],i[2]=[n[t+1][0]+(a*n[t][0]-a*n[t+2][0])/6,n[t+1][1]+(a*n[t][1]-a*n[t+2][1])/6],i[3]=[n[t+1][0],n[t+1][1]],r.push(i[1],i[2],i[3])}}return r}function Y(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function G(t,e,n){const r=Y(e,n);if(0===r)return Y(t,e);let i=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/r;return i=Math.max(0,Math.min(1,i)),Y(t,V(e,n,i))}function V(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function X(t,e,n,r){const i=r||[];if(function(t,e){const n=t[e+0],r=t[e+1],i=t[e+2],a=t[e+3];let o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let l=3*i[0]-2*a[0]-n[0];l*=l;let c=3*i[1]-2*a[1]-n[1];return c*=c,o<l&&(o=l),s<c&&(s=c),o+s}(t,e)<n){const n=t[e+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(Y(a,o))>1&&i.push(n)):i.push(n),i.push(t[e+3])}else{const r=.5,a=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],c=V(a,o,r),h=V(o,s,r),u=V(s,l,r),f=V(c,h,r),d=V(h,u,r),p=V(f,d,r);X([a,c,f,p],0,n,i),X([p,d,u,l],0,n,i)}var a,o;return i}function Z(t,e){return Q(t,0,t.length,e)}function Q(t,e,n,r,i){const a=i||[],o=t[e],s=t[n-1];let l=0,c=1;for(let r=e+1;r<n-1;++r){const e=G(t[r],o,s);e>l&&(l=e,c=r)}return Math.sqrt(l)>r?(Q(t,e,c+1,r,a),Q(t,c,n,r,a)):(a.length||a.push(o),a.push(s)),a}function K(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let n=0;n<i;n++)X(t,3*n,e,r);return n&&n>0?Q(r,0,r.length,n):r}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,n){return{shape:t,sets:e||[],options:n||this.defaultOptions}}line(t,e,n,r,i){const a=this._o(i);return this._d("line",[C(t,e,n,r,a)],a)}rectangle(t,e,n,r,i){const a=this._o(i),o=[],s=function(t,e,n,r,i){return function(t,e){return S(t,!0,e)}([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}(t,e,n,r,a);if(a.fill){const i=[[t,e],[t+n,e],[t+n,e+r],[t,e+r]];"solid"===a.fillStyle?o.push(E([i],a)):o.push(F([i],a))}return a.stroke!==J&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,n,r,i){const a=this._o(i),o=[],s=M(n,r,a),l=A(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const n=A(t,e,a,s).opset;n.type="fillPath",o.push(n)}else o.push(F([l.estimatedPoints],a));return a.stroke!==J&&o.push(l.opset),this._d("ellipse",o,a)}circle(t,e,n,r){const i=this.ellipse(t,e,n,n,r);return i.shape="circle",i}linearPath(t,e){const n=this._o(e);return this._d("linearPath",[S(t,!1,n)],n)}arc(t,e,n,r,i,a,o=!1,s){const l=this._o(s),c=[],h=B(t,e,n,r,i,a,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=B(t,e,n,r,i,a,!0,!1,o);s.type="fillPath",c.push(s)}else c.push(function(t,e,n,r,i,a,o){const s=t,l=e;let c=Math.abs(n/2),h=Math.abs(r/2);c+=D(.01*c,o),h+=D(.01*h,o);let u=i,f=a;for(;u<0;)u+=2*Math.PI,f+=2*Math.PI;f-u>2*Math.PI&&(u=0,f=2*Math.PI);const d=(f-u)/o.curveStepCount,p=[];for(let t=u;t<=f;t+=d)p.push([s+c*Math.cos(t),l+h*Math.sin(t)]);return p.push([s+c*Math.cos(f),l+h*Math.sin(f)]),p.push([s,l]),F([p],o)}(t,e,n,r,i,a,l));return l.stroke!==J&&c.push(h),this._d("arc",c,l)}curve(t,e){const n=this._o(e),r=[],i=T(t,n);if(n.fill&&n.fill!==J)if("solid"===n.fillStyle){const e=T(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],i=t;if(i.length){const t="number"==typeof i[0][0]?[i]:i;for(const r of t)r.length<3?e.push(...r):3===r.length?e.push(...K(U([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):e.push(...K(U(r),10,(1+n.roughness)/2))}e.length&&r.push(F([e],n))}return n.stroke!==J&&r.push(i),this._d("curve",r,n)}polygon(t,e){const n=this._o(e),r=[],i=S(t,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(E([t],n)):r.push(F([t],n))),n.stroke!==J&&r.push(i),this._d("polygon",r,n)}path(t,e){const n=this._o(e),r=[];if(!t)return this._d("path",r,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=n.fill&&"transparent"!==n.fill&&n.fill!==J,a=n.stroke!==J,o=!!(n.simplification&&n.simplification<1),s=function(t,e,n){const r=_(x(b(t))),i=[];let a=[],o=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...K(s,1)),s=[]},c=()=>{l(),a.length&&(i.push(a),a=[])};for(const{key:t,data:e}of r)switch(t){case"M":c(),o=[e[0],e[1]],a.push(o);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(c(),!n)return i;const h=[];for(const t of i){const e=Z(t,n);e.length&&h.push(e)}return h}(t,0,o?4-4*(n.simplification||1):(1+n.roughness)/2),l=L(t,n);if(i)if("solid"===n.fillStyle)if(1===s.length){const e=L(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(E(s,n));else r.push(F(s,n));return a&&(o?s.forEach(t=>{r.push(S(t,!1,n))}):r.push(l)),this._d("path",r,n)}opsToPath(t,e){let n="";for(const r of t.ops){const t="number"==typeof e&&e>=0?r.data.map(t=>+t.toFixed(e)):r.data;switch(r.op){case"move":n+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":n+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":n+=`L${t[0]} ${t[1]} `}}return n.trim()}toPaths(t){const e=t.sets||[],n=t.options||this.defaultOptions,r=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:n.fill||J};break;case"fillSketch":e=this.fillSketch(t,n)}e&&r.push(e)}return r}fillSketch(t,e){let n=e.fillWeight;return n<0&&(n=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:n,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),r=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(r,a,i,e),r.restore();break}case"fillSketch":this.fillSketch(r,a,n)}}fillSketch(t,e,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=r,this._drawToContext(t,e,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,n,r="nonzero"){t.beginPath();for(const r of e.ops){const e="number"==typeof n&&n>=0?r.data.map(t=>+t.toFixed(n)):r.data;switch(r.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(r):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,n,r,i){const a=this.gen.line(t,e,n,r,i);return this.draw(a),a}rectangle(t,e,n,r,i){const a=this.gen.rectangle(t,e,n,r,i);return this.draw(a),a}ellipse(t,e,n,r,i){const a=this.gen.ellipse(t,e,n,r,i);return this.draw(a),a}circle(t,e,n,r){const i=this.gen.circle(t,e,n,r);return this.draw(i),i}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n),n}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n),n}arc(t,e,n,r,i,a,o=!1,s){const l=this.gen.arc(t,e,n,r,i,a,o,s);return this.draw(l),l}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n),n}path(t,e){const n=this.gen.path(t,e);return this.draw(n),n}}const nt="http://www.w3.org/2000/svg";class rt{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(nt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=r.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke",n.stroke),e.setAttribute("stroke-width",n.strokeWidth+""),e.setAttribute("fill","none"),n.strokeLineDash&&e.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":e=r.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",n.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(r,o,n)}e&&i.appendChild(e)}return i}fillSketch(t,e,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const i=t.createElementNS(nt,"path");return i.setAttribute("d",this.opsToPath(e,n.fixedDecimalPlaceDigits)),i.setAttribute("stroke",n.fill||""),i.setAttribute("stroke-width",r+""),i.setAttribute("fill","none"),n.fillLineDash&&i.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,n,r,i){const a=this.gen.line(t,e,n,r,i);return this.draw(a)}rectangle(t,e,n,r,i){const a=this.gen.rectangle(t,e,n,r,i);return this.draw(a)}ellipse(t,e,n,r,i){const a=this.gen.ellipse(t,e,n,r,i);return this.draw(a)}circle(t,e,n,r){const i=this.gen.circle(t,e,n,r);return this.draw(i)}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n)}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n)}arc(t,e,n,r,i,a,o=!1,s){const l=this.gen.arc(t,e,n,r,i,a,o,s);return this.draw(l)}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n)}path(t,e){const n=this.gen.path(t,e);return this.draw(n)}}var it={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new rt(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},8968(t,e,n){function r(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Array.from("string"==typeof t?[t]:t);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var i=r.reduce(function(t,e){var n=e.match(/\n([\t ]+|(?!\s).)/g);return n?t.concat(n.map(function(t){var e,n;return null!==(n=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==n?n:0})):t},[]);if(i.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,i)+"}","g");r=r.map(function(t){return t.replace(a,"\n")})}r[0]=r[0].replace(/^\r?\n/,"");var o=r[0];return e.forEach(function(t,e){var n=o.match(/(?:^|\n)( *)$/),i=n?n[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+i+t}).join("\n")),o+=a+r[e+1]}),o}n.r(e),n.d(e,{dedent:()=>r,default:()=>i});const i=r},79806(t,e,n){function r(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function i(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function a(t){let e,n,a;function s(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<0?i=e+1:a=e}while(i<a)}return i}return 2!==t.length?(e=r,n=(e,n)=>r(t(e),n),a=(e,n)=>t(e)-n):(e=t===r||t===i?t:o,n=t,a=t),{left:s,center:function(t,e,n=0,r=t.length){const i=s(t,e,n,r-1);return i>n&&a(t[i-1],e)>-a(t[i],e)?i-1:i},right:function(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<=0?i=e+1:a=e}while(i<a)}return i}}}function o(){return 0}function s(t){return null===t?NaN:+t}n.d(e,{Adder:()=>B,Delaunay:()=>Is,FormatSpecifier:()=>Yc,InternMap:()=>F,InternSet:()=>$,Node:()=>mg,Path:()=>Ja,Voronoi:()=>Es,ZoomTransform:()=>vS,active:()=>ia,arc:()=>ak,area:()=>dk,areaRadial:()=>wk,ascending:()=>r,autoType:()=>dl,axisBottom:()=>ge,axisLeft:()=>me,axisRight:()=>pe,axisTop:()=>de,bin:()=>dt,bisect:()=>f,bisectCenter:()=>u,bisectLeft:()=>h,bisectRight:()=>c,bisector:()=>a,blob:()=>Jl,blur:()=>d,blur2:()=>p,blurImage:()=>g,brush:()=>$a,brushSelection:()=>La,brushX:()=>Ea,brushY:()=>Fa,buffer:()=>ec,chord:()=>Ha,chordDirected:()=>Ya,chordTranspose:()=>Ua,cluster:()=>cg,color:()=>lr,contourDensity:()=>ls,contours:()=>ts,count:()=>_,create:()=>$w,creator:()=>kn,cross:()=>C,csv:()=>oc,csvFormat:()=>tl,csvFormatBody:()=>el,csvFormatRow:()=>rl,csvFormatRows:()=>nl,csvFormatValue:()=>il,csvParse:()=>Ks,csvParseRows:()=>Js,cubehelix:()=>Ho,cumsum:()=>S,curveBasis:()=>fC,curveBasisClosed:()=>pC,curveBasisOpen:()=>mC,curveBumpX:()=>Tk,curveBumpY:()=>Mk,curveBundle:()=>bC,curveCardinal:()=>vC,curveCardinalClosed:()=>kC,curveCardinalOpen:()=>SC,curveCatmullRom:()=>AC,curveCatmullRomClosed:()=>LC,curveCatmullRomOpen:()=>FC,curveLinear:()=>ck,curveLinearClosed:()=>OC,curveMonotoneX:()=>jC,curveMonotoneY:()=>WC,curveNatural:()=>YC,curveStep:()=>VC,curveStepAfter:()=>ZC,curveStepBefore:()=>XC,descending:()=>i,deviation:()=>M,difference:()=>Qt,disjoint:()=>Kt,dispatch:()=>we,drag:()=>Hs,dragDisable:()=>jn,dragEnable:()=>Wn,dsv:()=>ac,dsvFormat:()=>Zs,easeBack:()=>Gl,easeBackIn:()=>Ul,easeBackInOut:()=>Gl,easeBackOut:()=>Yl,easeBounce:()=>jl,easeBounceIn:()=>ql,easeBounceInOut:()=>Wl,easeBounceOut:()=>jl,easeCircle:()=>$l,easeCircleIn:()=>El,easeCircleInOut:()=>$l,easeCircleOut:()=>Fl,easeCubic:()=>ta,easeCubicIn:()=>Ki,easeCubicInOut:()=>ta,easeCubicOut:()=>Ji,easeElastic:()=>Zl,easeElasticIn:()=>Xl,easeElasticInOut:()=>Ql,easeElasticOut:()=>Zl,easeExp:()=>Ll,easeExpIn:()=>Al,easeExpInOut:()=>Ll,easeExpOut:()=>Bl,easeLinear:()=>gl,easePoly:()=>vl,easePolyIn:()=>xl,easePolyInOut:()=>vl,easePolyOut:()=>_l,easeQuad:()=>bl,easeQuadIn:()=>ml,easeQuadInOut:()=>bl,easeQuadOut:()=>yl,easeSin:()=>Tl,easeSinIn:()=>Cl,easeSinInOut:()=>Tl,easeSinOut:()=>Sl,every:()=>Ut,extent:()=>A,fcumsum:()=>E,filter:()=>Gt,flatGroup:()=>j,flatRollup:()=>W,forceCenter:()=>gc,forceCollide:()=>Ac,forceLink:()=>Ec,forceManyBody:()=>Ic,forceRadial:()=>zc,forceSimulation:()=>Dc,forceX:()=>Pc,forceY:()=>Rc,format:()=>Qc,formatDefaultLocale:()=>nh,formatLocale:()=>eh,formatPrefix:()=>Kc,formatSpecifier:()=>Uc,fsum:()=>L,geoAlbers:()=>Cp,geoAlbersUsa:()=>Sp,geoArea:()=>ou,geoAzimuthalEqualArea:()=>Bp,geoAzimuthalEqualAreaRaw:()=>Ap,geoAzimuthalEquidistant:()=>Ep,geoAzimuthalEquidistantRaw:()=>Lp,geoBounds:()=>qu,geoCentroid:()=>Ju,geoCircle:()=>uf,geoClipAntimeridian:()=>wf,geoClipCircle:()=>kf,geoClipExtent:()=>Ef,geoClipRectangle:()=>Lf,geoConicConformal:()=>Ip,geoConicConformalRaw:()=>Dp,geoConicEqualArea:()=>kp,geoConicEqualAreaRaw:()=>wp,geoConicEquidistant:()=>qp,geoConicEquidistantRaw:()=>Rp,geoContains:()=>Vf,geoDistance:()=>Pf,geoEqualEarth:()=>Vp,geoEqualEarthRaw:()=>Gp,geoEquirectangular:()=>Pp,geoEquirectangularRaw:()=>zp,geoGnomonic:()=>Zp,geoGnomonicRaw:()=>Xp,geoGraticule:()=>Qf,geoGraticule10:()=>Kf,geoIdentity:()=>Qp,geoInterpolate:()=>Jf,geoLength:()=>Df,geoMercator:()=>$p,geoMercatorRaw:()=>Fp,geoNaturalEarth1:()=>Jp,geoNaturalEarth1Raw:()=>Kp,geoOrthographic:()=>eg,geoOrthographicRaw:()=>tg,geoPath:()=>op,geoProjection:()=>xp,geoProjectionMutator:()=>_p,geoRotation:()=>lf,geoStereographic:()=>rg,geoStereographicRaw:()=>ng,geoStream:()=>Dh,geoTransform:()=>sp,geoTransverseMercator:()=>ag,geoTransverseMercatorRaw:()=>ig,gray:()=>Co,greatest:()=>_t,greatestIndex:()=>It,group:()=>P,groupSort:()=>tt,groups:()=>R,hcl:()=>$o,hierarchy:()=>ug,histogram:()=>dt,hsl:()=>vr,html:()=>dc,image:()=>lc,index:()=>Y,indexes:()=>G,interpolate:()=>Gr,interpolateArray:()=>Pr,interpolateBasis:()=>Mr,interpolateBasisClosed:()=>Ar,interpolateBlues:()=>ow,interpolateBrBG:()=>bv,interpolateBuGn:()=>Dv,interpolateBuPu:()=>zv,interpolateCividis:()=>yw,interpolateCool:()=>_w,interpolateCubehelix:()=>Am,interpolateCubehelixDefault:()=>bw,interpolateCubehelixLong:()=>Bm,interpolateDate:()=>qr,interpolateDiscrete:()=>gm,interpolateGnBu:()=>Rv,interpolateGreens:()=>lw,interpolateGreys:()=>hw,interpolateHcl:()=>Sm,interpolateHclLong:()=>Tm,interpolateHsl:()=>vm,interpolateHslLong:()=>wm,interpolateHue:()=>mm,interpolateInferno:()=>Ew,interpolateLab:()=>km,interpolateMagma:()=>Lw,interpolateNumber:()=>jr,interpolateNumberArray:()=>Ir,interpolateObject:()=>Wr,interpolateOrRd:()=>jv,interpolateOranges:()=>mw,interpolatePRGn:()=>_v,interpolatePiYG:()=>wv,interpolatePlasma:()=>Fw,interpolatePuBu:()=>Yv,interpolatePuBuGn:()=>Hv,interpolatePuOr:()=>Cv,interpolatePuRd:()=>Vv,interpolatePurples:()=>fw,interpolateRainbow:()=>ww,interpolateRdBu:()=>Tv,interpolateRdGy:()=>Av,interpolateRdPu:()=>Zv,interpolateRdYlBu:()=>Lv,interpolateRdYlGn:()=>Fv,interpolateReds:()=>pw,interpolateRgb:()=>$r,interpolateRgbBasis:()=>Nr,interpolateRgbBasisClosed:()=>Dr,interpolateRound:()=>ym,interpolateSinebow:()=>Tw,interpolateSpectral:()=>Ov,interpolateString:()=>Yr,interpolateTransformCss:()=>Mi,interpolateTransformSvg:()=>Ai,interpolateTurbo:()=>Mw,interpolateViridis:()=>Bw,interpolateWarm:()=>xw,interpolateYlGn:()=>tw,interpolateYlGnBu:()=>Kv,interpolateYlOrBr:()=>nw,interpolateYlOrRd:()=>iw,interpolateZoom:()=>xm,interrupt:()=>vi,intersection:()=>Jt,interval:()=>bS,isoFormat:()=>gS,isoParse:()=>yS,json:()=>hc,lab:()=>So,lch:()=>Fo,least:()=>Nt,leastIndex:()=>Dt,line:()=>fk,lineRadial:()=>vk,link:()=>Ek,linkHorizontal:()=>Fk,linkRadial:()=>Ok,linkVertical:()=>$k,local:()=>Nw,map:()=>Vt,matcher:()=>Ae,max:()=>pt,maxIndex:()=>gt,mean:()=>Tt,median:()=>Mt,medianIndex:()=>At,merge:()=>Bt,min:()=>mt,minIndex:()=>yt,mode:()=>Lt,namespace:()=>We,namespaces:()=>je,nice:()=>ut,now:()=>oi,pack:()=>Pg,packEnclose:()=>kg,packSiblings:()=>Ig,pairs:()=>Et,partition:()=>Ug,path:()=>to,pathRound:()=>eo,permute:()=>Z,pie:()=>mk,piecewise:()=>Lm,pointRadial:()=>kk,pointer:()=>Xr,pointers:()=>Iw,polygonArea:()=>Fm,polygonCentroid:()=>$m,polygonContains:()=>zm,polygonHull:()=>Im,polygonLength:()=>Pm,precisionFixed:()=>rh,precisionPrefix:()=>ih,precisionRound:()=>ah,quadtree:()=>_c,quantile:()=>vt,quantileIndex:()=>kt,quantileSorted:()=>wt,quantize:()=>Em,quickselect:()=>bt,radialArea:()=>wk,radialLine:()=>vk,randomBates:()=>Ym,randomBernoulli:()=>Xm,randomBeta:()=>Km,randomBinomial:()=>Jm,randomCauchy:()=>ey,randomExponential:()=>Gm,randomGamma:()=>Qm,randomGeometric:()=>Zm,randomInt:()=>jm,randomIrwinHall:()=>Um,randomLcg:()=>ay,randomLogNormal:()=>Hm,randomLogistic:()=>ny,randomNormal:()=>Wm,randomPareto:()=>Vm,randomPoisson:()=>ry,randomUniform:()=>qm,randomWeibull:()=>ty,range:()=>$t,rank:()=>Ot,reduce:()=>Xt,reverse:()=>Zt,rgb:()=>fr,ribbon:()=>fo,ribbonArrow:()=>po,rollup:()=>H,rollups:()=>U,scaleBand:()=>hy,scaleDiverging:()=>J_,scaleDivergingLog:()=>tv,scaleDivergingPow:()=>nv,scaleDivergingSqrt:()=>rv,scaleDivergingSymlog:()=>ev,scaleIdentity:()=>Sy,scaleImplicit:()=>ly,scaleLinear:()=>Cy,scaleLog:()=>Oy,scaleOrdinal:()=>cy,scalePoint:()=>fy,scalePow:()=>Wy,scaleQuantile:()=>Gy,scaleQuantize:()=>Vy,scaleRadial:()=>Yy,scaleSequential:()=>Y_,scaleSequentialLog:()=>G_,scaleSequentialPow:()=>X_,scaleSequentialQuantile:()=>Q_,scaleSequentialSqrt:()=>Z_,scaleSequentialSymlog:()=>V_,scaleSqrt:()=>Hy,scaleSymlog:()=>zy,scaleThreshold:()=>Xy,scaleTime:()=>j_,scaleUtc:()=>W_,scan:()=>zt,schemeAccent:()=>ov,schemeBlues:()=>aw,schemeBrBG:()=>yv,schemeBuGn:()=>Nv,schemeBuPu:()=>Iv,schemeCategory10:()=>av,schemeDark2:()=>sv,schemeGnBu:()=>Pv,schemeGreens:()=>sw,schemeGreys:()=>cw,schemeObservable10:()=>lv,schemeOrRd:()=>qv,schemeOranges:()=>gw,schemePRGn:()=>xv,schemePaired:()=>cv,schemePastel1:()=>hv,schemePastel2:()=>uv,schemePiYG:()=>vv,schemePuBu:()=>Uv,schemePuBuGn:()=>Wv,schemePuOr:()=>kv,schemePuRd:()=>Gv,schemePurples:()=>uw,schemeRdBu:()=>Sv,schemeRdGy:()=>Mv,schemeRdPu:()=>Xv,schemeRdYlBu:()=>Bv,schemeRdYlGn:()=>Ev,schemeReds:()=>dw,schemeSet1:()=>fv,schemeSet2:()=>dv,schemeSet3:()=>pv,schemeSpectral:()=>$v,schemeTableau10:()=>gv,schemeYlGn:()=>Jv,schemeYlGnBu:()=>Qv,schemeYlOrBr:()=>ew,schemeYlOrRd:()=>rw,select:()=>In,selectAll:()=>zw,selection:()=>Dn,selector:()=>Ce,selectorAll:()=>Me,shuffle:()=>Pt,shuffler:()=>Rt,some:()=>Yt,sort:()=>Q,stack:()=>eS,stackOffsetDiverging:()=>rS,stackOffsetExpand:()=>nS,stackOffsetNone:()=>QC,stackOffsetSilhouette:()=>iS,stackOffsetWiggle:()=>aS,stackOrderAppearance:()=>oS,stackOrderAscending:()=>lS,stackOrderDescending:()=>hS,stackOrderInsideOut:()=>uS,stackOrderNone:()=>KC,stackOrderReverse:()=>fS,stratify:()=>Qg,style:()=>tn,subset:()=>re,sum:()=>qt,superset:()=>ee,svg:()=>pc,symbol:()=>lC,symbolAsterisk:()=>Dk,symbolCircle:()=>Ik,symbolCross:()=>zk,symbolDiamond:()=>qk,symbolDiamond2:()=>jk,symbolPlus:()=>Wk,symbolSquare:()=>Hk,symbolSquare2:()=>Uk,symbolStar:()=>Xk,symbolTimes:()=>aC,symbolTriangle:()=>Qk,symbolTriangle2:()=>Jk,symbolWye:()=>iC,symbolX:()=>aC,symbols:()=>oC,symbolsFill:()=>oC,symbolsStroke:()=>sC,text:()=>rc,thresholdFreedmanDiaconis:()=>Ct,thresholdScott:()=>St,thresholdSturges:()=>ft,tickFormat:()=>wy,tickIncrement:()=>ct,tickStep:()=>ht,ticks:()=>lt,timeDay:()=>yb,timeDays:()=>bb,timeFormat:()=>yx,timeFormatDefaultLocale:()=>z_,timeFormatLocale:()=>gx,timeFriday:()=>Bb,timeFridays:()=>Db,timeHour:()=>db,timeHours:()=>pb,timeInterval:()=>ib,timeMillisecond:()=>ab,timeMilliseconds:()=>ob,timeMinute:()=>cb,timeMinutes:()=>hb,timeMonday:()=>Sb,timeMondays:()=>Fb,timeMonth:()=>Jb,timeMonths:()=>tx,timeParse:()=>bx,timeSaturday:()=>Lb,timeSaturdays:()=>Ib,timeSecond:()=>sb,timeSeconds:()=>lb,timeSunday:()=>Cb,timeSundays:()=>Eb,timeThursday:()=>Ab,timeThursdays:()=>Nb,timeTickInterval:()=>ux,timeTicks:()=>hx,timeTuesday:()=>Tb,timeTuesdays:()=>$b,timeWednesday:()=>Mb,timeWednesdays:()=>Ob,timeWeek:()=>Cb,timeWeeks:()=>Eb,timeYear:()=>rx,timeYears:()=>ix,timeout:()=>pi,timer:()=>ci,timerFlush:()=>hi,transition:()=>Xi,transpose:()=>jt,tree:()=>om,treemap:()=>um,treemapBinary:()=>fm,treemapDice:()=>Hg,treemapResquarify:()=>pm,treemapSlice:()=>sm,treemapSliceDice:()=>dm,treemapSquarify:()=>hm,tsv:()=>sc,tsvFormat:()=>ll,tsvFormatBody:()=>cl,tsvFormatRow:()=>ul,tsvFormatRows:()=>hl,tsvFormatValue:()=>fl,tsvParse:()=>ol,tsvParseRows:()=>sl,union:()=>ie,unixDay:()=>vb,unixDays:()=>wb,utcDay:()=>xb,utcDays:()=>_b,utcFormat:()=>xx,utcFriday:()=>Hb,utcFridays:()=>Qb,utcHour:()=>gb,utcHours:()=>mb,utcMillisecond:()=>ab,utcMilliseconds:()=>ob,utcMinute:()=>ub,utcMinutes:()=>fb,utcMonday:()=>Rb,utcMondays:()=>Gb,utcMonth:()=>ex,utcMonths:()=>nx,utcParse:()=>_x,utcSaturday:()=>Ub,utcSaturdays:()=>Kb,utcSecond:()=>sb,utcSeconds:()=>lb,utcSunday:()=>Pb,utcSundays:()=>Yb,utcThursday:()=>Wb,utcThursdays:()=>Zb,utcTickInterval:()=>cx,utcTicks:()=>lx,utcTuesday:()=>qb,utcTuesdays:()=>Vb,utcWednesday:()=>jb,utcWednesdays:()=>Xb,utcWeek:()=>Pb,utcWeeks:()=>Yb,utcYear:()=>ax,utcYears:()=>ox,variance:()=>T,window:()=>Ze,xml:()=>fc,zip:()=>Ht,zoom:()=>FS,zoomIdentity:()=>wS,zoomTransform:()=>kS}),n.r(e);const l=a(r),c=l.right,h=l.left,u=a(s).center,f=c;function d(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=x(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const p=m(x),g=m(function(t){const e=x(t);return(t,n,r,i,a)=>{e(t,n,0+(r<<=2),0+(i<<=2),a<<=2),e(t,n,r+1,i+1,a),e(t,n,r+2,i+2,a),e(t,n,r+3,i+3,a)}});function m(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:a,height:o}=e;if(!((a=Math.floor(a))>=0))throw new RangeError("invalid width");if(!((o=Math.floor(void 0!==o?o:i.length/a))>=0))throw new RangeError("invalid height");if(!a||!o||!n&&!r)return e;const s=n&&t(n),l=r&&t(r),c=i.slice();return s&&l?(y(s,c,i,a,o),y(s,i,c,a,o),y(s,c,i,a,o),b(l,i,c,a,o),b(l,c,i,a,o),b(l,i,c,a,o)):s?(y(s,i,c,a,o),y(s,c,i,a,o),y(s,i,c,a,o)):l&&(b(l,i,c,a,o),b(l,c,i,a,o),b(l,i,c,a,o)),e}}function y(t,e,n,r,i){for(let a=0,o=r*i;a<o;)t(e,n,a,a+=r,1)}function b(t,e,n,r,i){for(let a=0,o=r*i;a<r;++a)t(e,n,a,a+o,r)}function x(t){const e=Math.floor(t);if(e===t)return function(t){const e=2*t+1;return(n,r,i,a,o)=>{if(!((a-=o)>=i))return;let s=t*r[i];const l=o*t;for(let t=i,e=i+l;t<e;t+=o)s+=r[Math.min(a,t)];for(let t=i,c=a;t<=c;t+=o)s+=r[Math.min(a,t+l)],n[t]=s/e,s-=r[Math.max(i,t-l)]}}(t);const n=t-e,r=2*t+1;return(t,i,a,o,s)=>{if(!((o-=s)>=a))return;let l=e*i[a];const c=s*e,h=c+s;for(let t=a,e=a+c;t<e;t+=s)l+=i[Math.min(o,t)];for(let e=a,u=o;e<=u;e+=s)l+=i[Math.min(o,e+c)],t[e]=(l+n*(i[Math.max(a,e-h)]+i[Math.min(o,e+h)]))/r,l-=i[Math.max(a,e-c)]}}function _(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}function v(t){return 0|t.length}function w(t){return!(t>0)}function k(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function C(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(k)).map(v),r=t.length-1,i=new Array(r+1).fill(0),a=[];if(r<0||n.some(w))return a;for(;;){a.push(i.map((e,n)=>t[n][e]));let o=r;for(;++i[o]===n[o];){if(0===o)return e?a.map(e):a;i[o--]=0}}}function S(t,e){var n=0,r=0;return Float64Array.from(t,void 0===e?t=>n+=+t||0:i=>n+=+e(i,r++,t)||0)}function T(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let o=-1;for(let s of t)null!=(s=e(s,++o,t))&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i))}if(r>1)return a/(r-1)}function M(t,e){const n=T(t,e);return n?Math.sqrt(n):n}function A(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}class B{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=e[r],a=t+i,o=Math.abs(t)<Math.abs(i)?t-(a-i):i-(a-t);o&&(e[n++]=o),t=a}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,i=this._n,a=0;if(i>0){for(a=t[--i];i>0&&(e=a,n=t[--i],a=e+n,r=n-(a-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=a+n,n==e-a&&(a=e))}return a}}function L(t,e){const n=new B;if(void 0===e)for(let e of t)(e=+e)&&n.add(e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function E(t,e){const n=new B;let r=-1;return Float64Array.from(t,void 0===e?t=>n.add(+t||0):i=>n.add(+e(i,++r,t)||0))}class F extends Map{constructor(t,e=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(O(this,t))}has(t){return super.has(O(this,t))}set(t,e){return super.set(N(this,t),e)}delete(t){return super.delete(D(this,t))}}class $ extends Set{constructor(t,e=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const e of t)this.add(e)}has(t){return super.has(O(this,t))}add(t){return super.add(N(this,t))}delete(t){return super.delete(D(this,t))}}function O({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function N({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function D({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function I(t){return null!==t&&"object"==typeof t?t.valueOf():t}function z(t){return t}function P(t,...e){return X(t,z,z,e)}function R(t,...e){return X(t,Array.from,z,e)}function q(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(t=>t.pop().map(([e,n])=>[...t,e,n]));return t}function j(t,...e){return q(R(t,...e),e)}function W(t,e,...n){return q(U(t,e,...n),n)}function H(t,e,...n){return X(t,z,e,n)}function U(t,e,...n){return X(t,Array.from,e,n)}function Y(t,...e){return X(t,z,V,e)}function G(t,...e){return X(t,Array.from,V,e)}function V(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function X(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);const o=new F,s=r[a++];let l=-1;for(const t of i){const e=s(t,++l,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(const[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}function Z(t,e){return Array.from(e,e=>t[e])}function Q(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),r.sort((t,n)=>{for(const r of e){const e=J(r[t],r[n]);if(e)return e}})):(n=t.map(n),r.sort((t,e)=>J(n[t],n[e]))),Z(t,r)}return t.sort(K(n))}function K(t=r){if(t===r)return J;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function J(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function tt(t,e,n){return(2!==e.length?Q(H(t,e,n),([t,e],[n,i])=>r(e,i)||r(t,n)):Q(P(t,n),([t,n],[i,a])=>e(n,a)||r(t,i))).map(([t])=>t)}var et=Array.prototype,nt=et.slice;function rt(t){return()=>t}et.map;const it=Math.sqrt(50),at=Math.sqrt(10),ot=Math.sqrt(2);function st(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=it?10:a>=at?5:a>=ot?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=n&&n<2?st(t,e,2*n):[s,l,c]}function lt(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const r=e<t,[i,a,o]=r?st(e,t,n):st(t,e,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}function ct(t,e,n){return st(t=+t,e=+e,n=+n)[2]}function ht(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?ct(e,t,n):ct(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function ut(t,e,n){let r;for(;;){const i=ct(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function ft(t){return Math.max(1,Math.ceil(Math.log(_(t))/Math.LN2)+1)}function dt(){var t=z,e=A,n=ft;function r(r){Array.isArray(r)||(r=Array.from(r));var i,a,o,s=r.length,l=new Array(s);for(i=0;i<s;++i)l[i]=t(r[i],i,r);var c=e(l),h=c[0],u=c[1],d=n(l,h,u);if(!Array.isArray(d)){const t=u,n=+d;if(e===A&&([h,u]=ut(h,u,n)),(d=lt(h,u,n))[0]<=h&&(o=ct(h,u,n)),d[d.length-1]>=u)if(t>=u&&e===A){const t=ct(h,u,n);isFinite(t)&&(t>0?u=(Math.floor(u/t)+1)*t:t<0&&(u=(Math.ceil(u*-t)+1)/-t))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>u;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y,b=new Array(p+1);for(i=0;i<=p;++i)(y=b[i]=[]).x0=i>0?d[i-1]:h,y.x1=i<p?d[i]:u;if(isFinite(o)){if(o>0)for(i=0;i<s;++i)null!=(a=l[i])&&h<=a&&a<=u&&b[Math.min(p,Math.floor((a-h)/o))].push(r[i]);else if(o<0)for(i=0;i<s;++i)if(null!=(a=l[i])&&h<=a&&a<=u){const t=Math.floor((h-a)*o);b[Math.min(p,t+(d[t]<=a))].push(r[i])}}else for(i=0;i<s;++i)null!=(a=l[i])&&h<=a&&a<=u&&b[f(d,a,0,p)].push(r[i]);return b}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:rt(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:rt([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:rt(Array.isArray(t)?nt.call(t):t),r):n},r}function pt(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function gt(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function mt(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function yt(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function bt(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?J:K(i);r>n;){if(r-n>600){const a=r-n+1,o=e-n+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);bt(t,e,Math.max(n,Math.floor(e-o*l/a+c)),Math.min(r,Math.floor(e+(a-o)*l/a+c)),i)}const a=t[e];let o=n,s=r;for(xt(t,n,e),i(t[r],a)>0&&xt(t,n,r);o<s;){for(xt(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}0===i(t[n],a)?xt(t,n,s):(++s,xt(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function xt(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function _t(t,e=r){let n,i=!1;if(1===e.length){let a;for(const o of t){const t=e(o);(i?r(t,a)>0:0===r(t,t))&&(n=o,a=t,i=!0)}}else for(const r of t)(i?e(r,n)>0:0===e(r,r))&&(n=r,i=!0);return n}function vt(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return mt(t);if(e>=1)return pt(t);var r,i=(r-1)*e,a=Math.floor(i),o=pt(bt(t,a).subarray(0,a+1));return o+(mt(t.subarray(a+1))-o)*(i-a)}}function wt(t,e,n=s){if((r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function kt(t,e,n=s){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(e,r)=>s(n(t[r],r,t))),e<=0)return yt(r);if(e>=1)return gt(r);var r,i=Uint32Array.from(t,(t,e)=>e),a=r.length-1,o=Math.floor(a*e);return bt(i,o,0,a,(t,e)=>J(r[t],r[e])),(o=_t(i.subarray(0,o+1),t=>r[t]))>=0?o:-1}}function Ct(t,e,n){const r=_(t),i=vt(t,.75)-vt(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function St(t,e,n){const r=_(t),i=M(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function Tt(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function Mt(t,e){return vt(t,.5,e)}function At(t,e){return kt(t,.5,e)}function Bt(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Lt(t,e){const n=new F;if(void 0===e)for(let e of t)null!=e&&e>=e&&n.set(e,(n.get(e)||0)+1);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&i>=i&&n.set(i,(n.get(i)||0)+1)}let r,i=0;for(const[t,e]of n)e>i&&(i=e,r=t);return r}function Et(t,e=Ft){const n=[];let r,i=!1;for(const a of t)i&&n.push(e(r,a)),r=a,i=!0;return n}function Ft(t,e){return[t,e]}function $t(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function Ot(t,e=r){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");let n=Array.from(t);const i=new Float64Array(n.length);2!==e.length&&(n=n.map(e),e=r);const a=(t,r)=>e(n[t],n[r]);let o,s;return(t=Uint32Array.from(n,(t,e)=>e)).sort(e===r?(t,e)=>J(n[t],n[e]):K(a)),t.forEach((t,e)=>{const n=a(t,void 0===o?t:o);n>=0?((void 0===o||n>0)&&(o=t,s=e),i[t]=s):i[t]=NaN}),i}function Nt(t,e=r){let n,i=!1;if(1===e.length){let a;for(const o of t){const t=e(o);(i?r(t,a)<0:0===r(t,t))&&(n=o,a=t,i=!0)}}else for(const r of t)(i?e(r,n)<0:0===e(r,r))&&(n=r,i=!0);return n}function Dt(t,e=r){if(1===e.length)return yt(t,e);let n,i=-1,a=-1;for(const r of t)++a,(i<0?0===e(r,r):e(r,n)<0)&&(n=r,i=a);return i}function It(t,e=r){if(1===e.length)return gt(t,e);let n,i=-1,a=-1;for(const r of t)++a,(i<0?0===e(r,r):e(r,n)>0)&&(n=r,i=a);return i}function zt(t,e){const n=Dt(t,e);return n<0?void 0:n}const Pt=Rt(Math.random);function Rt(t){return function(e,n=0,r=e.length){let i=r-(n=+n);for(;i;){const r=t()*i--|0,a=e[i+n];e[i+n]=e[r+n],e[r+n]=a}return e}}function qt(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function jt(t){if(!(i=t.length))return[];for(var e=-1,n=mt(t,Wt),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function Wt(t){return t.length}function Ht(){return jt(arguments)}function Ut(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function Yt(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function Gt(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function Vt(t,e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof e)throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function Xt(t,e,n){if("function"!=typeof e)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,a,o=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++o}for(;({done:i,value:a}=r.next()),!i;)n=e(n,a,++o,t);return n}function Zt(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Qt(t,...e){t=new $(t);for(const n of e)for(const e of n)t.delete(e);return t}function Kt(t,e){const n=e[Symbol.iterator](),r=new $;for(const e of t){if(r.has(e))return!1;let t,i;for(;({value:t,done:i}=n.next())&&!i;){if(Object.is(e,t))return!1;r.add(t)}}return!0}function Jt(t,...e){t=new $(t),e=e.map(te);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function te(t){return t instanceof $?t:new $(t)}function ee(t,e){const n=t[Symbol.iterator](),r=new Set;for(const t of e){const e=ne(t);if(r.has(e))continue;let i,a;for(;({value:i,done:a}=n.next());){if(a)return!1;const t=ne(i);if(r.add(t),Object.is(e,t))break}}return!0}function ne(t){return null!==t&&"object"==typeof t?t.valueOf():t}function re(t,e){return ee(e,t)}function ie(...t){const e=new $;for(const n of t)for(const t of n)e.add(t);return e}function ae(t){return t}var oe=1e-6;function se(t){return"translate("+t+",0)"}function le(t){return"translate(0,"+t+")"}function ce(t){return e=>+t(e)}function he(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ue(){return!this.__axis}function fe(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,h=4===t||2===t?"x":"y",u=1===t||3===t?se:le;function f(f){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):ae:i,g=Math.max(a,0)+s,m=e.range(),y=+m[0]+l,b=+m[m.length-1]+l,x=(e.bandwidth?he:ce)(e.copy(),l),_=f.selection?f.selection():f,v=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(d,e).order(),k=w.exit(),C=w.enter().append("g").attr("class","tick"),S=w.select("line"),T=w.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(C),S=S.merge(C.append("line").attr("stroke","currentColor").attr(h+"2",c*a)),T=T.merge(C.append("text").attr("fill","currentColor").attr(h,c*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==_&&(v=v.transition(f),w=w.transition(f),S=S.transition(f),T=T.transition(f),k=k.transition(f).attr("opacity",oe).attr("transform",function(t){return isFinite(t=x(t))?u(t+l):this.getAttribute("transform")}),C.attr("opacity",oe).attr("transform",function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:x(t))+l)})),k.remove(),v.attr("d",4===t||2===t?o?"M"+c*o+","+y+"H"+l+"V"+b+"H"+c*o:"M"+l+","+y+"V"+b:o?"M"+y+","+c*o+"V"+l+"H"+b+"V"+c*o:"M"+y+","+l+"H"+b),w.attr("opacity",1).attr("transform",function(t){return u(x(t)+l)}),S.attr(h+"2",c*a),T.attr(h,c*g).text(p),_.filter(ue).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each(function(){this.__axis=x})}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function de(t){return fe(1,t)}function pe(t){return fe(2,t)}function ge(t){return fe(3,t)}function me(t){return fe(4,t)}var ye={value:()=>{}};function be(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new xe(r)}function xe(t){this._=t}function _e(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ve(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ye,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}xe.prototype=be.prototype={constructor:xe,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=ve(i[n],t.name,e);else if(null==e)for(n in i)i[n]=ve(i[n],t.name,null);return this}for(;++o<s;)if((n=(t=a[o]).type)&&(n=_e(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xe(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const we=be;function ke(){}function Ce(t){return null==t?ke:function(){return this.querySelector(t)}}function Se(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Te(){return[]}function Me(t){return null==t?Te:function(){return this.querySelectorAll(t)}}function Ae(t){return function(){return this.matches(t)}}function Be(t){return function(e){return e.matches(t)}}var Le=Array.prototype.find;function Ee(){return this.firstElementChild}var Fe=Array.prototype.filter;function $e(){return Array.from(this.children)}function Oe(t){return new Array(t.length)}function Ne(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function De(t,e,n,r,i,a){for(var o,s=0,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new Ne(t,a[s]);for(;s<l;++s)(o=e[s])&&(i[s]=o)}function Ie(t,e,n,r,i,a,o){var s,l,c,h=new Map,u=e.length,f=a.length,d=new Array(u);for(s=0;s<u;++s)(l=e[s])&&(d[s]=c=o.call(l,l.__data__,s,e)+"",h.has(c)?i[s]=l:h.set(c,l));for(s=0;s<f;++s)c=o.call(t,a[s],s,a)+"",(l=h.get(c))?(r[s]=l,l.__data__=a[s],h.delete(c)):n[s]=new Ne(t,a[s]);for(s=0;s<u;++s)(l=e[s])&&h.get(d[s])===l&&(i[s]=l)}function ze(t){return t.__data__}function Pe(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Re(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}Ne.prototype={constructor:Ne,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var qe="http://www.w3.org/1999/xhtml";const je={svg:"http://www.w3.org/2000/svg",xhtml:qe,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function We(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),je.hasOwnProperty(e)?{space:je[e],local:t}:t}function He(t){return function(){this.removeAttribute(t)}}function Ue(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ye(t,e){return function(){this.setAttribute(t,e)}}function Ge(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ve(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Xe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ze(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Qe(t){return function(){this.style.removeProperty(t)}}function Ke(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Je(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function tn(t,e){return t.style.getPropertyValue(e)||Ze(t).getComputedStyle(t,null).getPropertyValue(e)}function en(t){return function(){delete this[t]}}function nn(t,e){return function(){this[t]=e}}function rn(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function an(t){return t.trim().split(/^|\s+/)}function on(t){return t.classList||new sn(t)}function sn(t){this._node=t,this._names=an(t.getAttribute("class")||"")}function ln(t,e){for(var n=on(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function cn(t,e){for(var n=on(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function hn(t){return function(){ln(this,t)}}function un(t){return function(){cn(this,t)}}function fn(t,e){return function(){(e.apply(this,arguments)?ln:cn)(this,t)}}function dn(){this.textContent=""}function pn(t){return function(){this.textContent=t}}function gn(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function mn(){this.innerHTML=""}function yn(t){return function(){this.innerHTML=t}}function bn(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function xn(){this.nextSibling&&this.parentNode.appendChild(this)}function _n(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vn(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===qe&&e.documentElement.namespaceURI===qe?e.createElement(t):e.createElementNS(n,t)}}function wn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kn(t){var e=We(t);return(e.local?wn:vn)(e)}function Cn(){return null}function Sn(){var t=this.parentNode;t&&t.removeChild(this)}function Tn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Mn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function An(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Bn(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Ln(t,e,n){var r=Ze(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function En(t,e){return function(){return Ln(this,t,e)}}function Fn(t,e){return function(){return Ln(this,t,e.apply(this,arguments))}}sn.prototype={add:function(t){this._names.indexOf(t)<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}};var $n=[null];function On(t,e){this._groups=t,this._parents=e}function Nn(){return new On([[document.documentElement]],$n)}On.prototype=Nn.prototype={constructor:On,select:function(t){"function"!=typeof t&&(t=Ce(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],l=s.length,c=r[i]=new Array(l),h=0;h<l;++h)(a=s[h])&&(o=t.call(a,a.__data__,h,s))&&("__data__"in a&&(o.__data__=a.__data__),c[h]=o);return new On(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Se(t.apply(this,arguments))}}(t):Me(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new On(r,i)},selectChild:function(t){return this.select(null==t?Ee:function(t){return function(){return Le.call(this.children,t)}}("function"==typeof t?t:Be(t)))},selectChildren:function(t){return this.selectAll(null==t?$e:function(t){return function(){return Fe.call(this.children,t)}}("function"==typeof t?t:Be(t)))},filter:function(t){"function"!=typeof t&&(t=Ae(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,l=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new On(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,ze);var n,r=e?Ie:De,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),l=new Array(o),c=new Array(o),h=0;h<o;++h){var u=i[h],f=a[h],d=f.length,p=Pe(t.call(u,u&&u.__data__,h,i)),g=p.length,m=l[h]=new Array(g),y=s[h]=new Array(g);r(u,f,m,y,c[h]=new Array(d),p,e);for(var b,x,_=0,v=0;_<g;++_)if(b=m[_]){for(_>=v&&(v=_+1);!(x=y[v])&&++v<g;);b._next=x||null}}return(s=new On(s,i))._enter=l,s._exit=c,s},enter:function(){return new On(this._enter||this._groups.map(Oe),this._parents)},exit:function(){return new On(this._exit||this._groups.map(Oe),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),l=0;l<o;++l)for(var c,h=n[l],u=r[l],f=h.length,d=s[l]=new Array(f),p=0;p<f;++p)(c=h[p]||u[p])&&(d[p]=c);for(;l<i;++l)s[l]=n[l];return new On(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Re);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],l=s.length,c=i[a]=new Array(l),h=0;h<l;++h)(o=s[h])&&(c[h]=o);c.sort(e)}return new On(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=We(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Ue:He:"function"==typeof e?n.local?Xe:Ve:n.local?Ge:Ye)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Qe:"function"==typeof e?Je:Ke)(t,e,null==n?"":n)):tn(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?en:"function"==typeof e?rn:nn)(t,e)):this.node()[t]},classed:function(t,e){var n=an(t+"");if(arguments.length<2){for(var r=on(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?fn:e?hn:un)(n,e))},text:function(t){return arguments.length?this.each(null==t?dn:("function"==typeof t?gn:pn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?mn:("function"==typeof t?bn:yn)(t)):this.node().innerHTML},raise:function(){return this.each(xn)},lower:function(){return this.each(_n)},append:function(t){var e="function"==typeof t?t:kn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:kn(t),r=null==e?Cn:"function"==typeof e?e:Ce(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Sn)},clone:function(t){return this.select(t?Mn:Tn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Bn:An,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,h=s.length;c<h;++c)for(r=0,l=s[c];r<o;++r)if((i=a[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Fn:En)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const Dn=Nn;function In(t){return"string"==typeof t?new On([[document.querySelector(t)]],[document.documentElement]):new On([[t]],$n)}const zn={passive:!1},Pn={capture:!0,passive:!1};function Rn(t){t.stopImmediatePropagation()}function qn(t){t.preventDefault(),t.stopImmediatePropagation()}function jn(t){var e=t.document.documentElement,n=In(t).on("dragstart.drag",qn,Pn);"onselectstart"in e?n.on("selectstart.drag",qn,Pn):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Wn(t,e){var n=t.document.documentElement,r=In(t).on("dragstart.drag",null);e&&(r.on("click.drag",qn,Pn),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Hn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Un(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Yn(){}var Gn=.7,Vn=1/Gn,Xn="\\s*([+-]?\\d+)\\s*",Zn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kn=/^#([0-9a-f]{3,8})$/,Jn=new RegExp(`^rgb\\(${Xn},${Xn},${Xn}\\)$`),tr=new RegExp(`^rgb\\(${Qn},${Qn},${Qn}\\)$`),er=new RegExp(`^rgba\\(${Xn},${Xn},${Xn},${Zn}\\)$`),nr=new RegExp(`^rgba\\(${Qn},${Qn},${Qn},${Zn}\\)$`),rr=new RegExp(`^hsl\\(${Zn},${Qn},${Qn}\\)$`),ir=new RegExp(`^hsla\\(${Zn},${Qn},${Qn},${Zn}\\)$`),ar={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function or(){return this.rgb().formatHex()}function sr(){return this.rgb().formatRgb()}function lr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Kn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?cr(e):3===n?new dr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?hr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?hr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Jn.exec(t))?new dr(e[1],e[2],e[3],1):(e=tr.exec(t))?new dr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=er.exec(t))?hr(e[1],e[2],e[3],e[4]):(e=nr.exec(t))?hr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=rr.exec(t))?xr(e[1],e[2]/100,e[3]/100,1):(e=ir.exec(t))?xr(e[1],e[2]/100,e[3]/100,e[4]):ar.hasOwnProperty(t)?cr(ar[t]):"transparent"===t?new dr(NaN,NaN,NaN,0):null}function cr(t){return new dr(t>>16&255,t>>8&255,255&t,1)}function hr(t,e,n,r){return r<=0&&(t=e=n=NaN),new dr(t,e,n,r)}function ur(t){return t instanceof Yn||(t=lr(t)),t?new dr((t=t.rgb()).r,t.g,t.b,t.opacity):new dr}function fr(t,e,n,r){return 1===arguments.length?ur(t):new dr(t,e,n,null==r?1:r)}function dr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function pr(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function gr(){const t=mr(this.opacity);return`${1===t?"rgb(":"rgba("}${yr(this.r)}, ${yr(this.g)}, ${yr(this.b)}${1===t?")":`, ${t})`}`}function mr(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function yr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function br(t){return((t=yr(t))<16?"0":"")+t.toString(16)}function xr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new wr(t,e,n,r)}function _r(t){if(t instanceof wr)return new wr(t.h,t.s,t.l,t.opacity);if(t instanceof Yn||(t=lr(t)),!t)return new wr;if(t instanceof wr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new wr(o,s,l,t.opacity)}function vr(t,e,n,r){return 1===arguments.length?_r(t):new wr(t,e,n,null==r?1:r)}function wr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function kr(t){return(t=(t||0)%360)<0?t+360:t}function Cr(t){return Math.max(0,Math.min(1,t||0))}function Sr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Tr(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function Mr(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Tr((n-r/e)*e,o,i,a,s)}}function Ar(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Tr((n-r/e)*e,i,a,o,s)}}Hn(Yn,lr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:or,formatHex:or,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return _r(this).formatHsl()},formatRgb:sr,toString:sr}),Hn(dr,fr,Un(Yn,{brighter(t){return t=null==t?Vn:Math.pow(Vn,t),new dr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Gn:Math.pow(Gn,t),new dr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new dr(yr(this.r),yr(this.g),yr(this.b),mr(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:pr,formatHex:pr,formatHex8:function(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:gr,toString:gr})),Hn(wr,vr,Un(Yn,{brighter(t){return t=null==t?Vn:Math.pow(Vn,t),new wr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Gn:Math.pow(Gn,t),new wr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new dr(Sr(t>=240?t-240:t+120,i,r),Sr(t,i,r),Sr(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new wr(kr(this.h),Cr(this.s),Cr(this.l),mr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=mr(this.opacity);return`${1===t?"hsl(":"hsla("}${kr(this.h)}, ${100*Cr(this.s)}%, ${100*Cr(this.l)}%${1===t?")":`, ${t})`}`}}));const Br=t=>()=>t;function Lr(t,e){return function(n){return t+n*e}}function Er(t,e){var n=e-t;return n?Lr(t,n>180||n<-180?n-360*Math.round(n/360):n):Br(isNaN(t)?e:t)}function Fr(t,e){var n=e-t;return n?Lr(t,n):Br(isNaN(t)?e:t)}const $r=function t(e){var n=function(t){return 1===(t=+t)?Fr:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Br(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=fr(t)).r,(e=fr(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Fr(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Or(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=fr(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var Nr=Or(Mr),Dr=Or(Ar);function Ir(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function zr(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Pr(t,e){return(zr(e)?Ir:Rr)(t,e)}function Rr(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Gr(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function qr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function jr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Wr(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Gr(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Hr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ur=new RegExp(Hr.source,"g");function Yr(t,e){var n,r,i,a=Hr.lastIndex=Ur.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=Hr.exec(t))&&(r=Ur.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:jr(n,r)})),a=Ur.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Gr(t,e){var n,r=typeof e;return null==e||"boolean"===r?Br(e):("number"===r?jr:"string"===r?(n=lr(e))?(e=n,$r):Yr:e instanceof lr?$r:e instanceof Date?qr:zr(e)?Ir:Array.isArray(e)?Rr:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Wr:jr)(t,e)}function Vr(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Xr(t,e){if(t=Vr(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var Zr,Qr,Kr=0,Jr=0,ti=0,ei=0,ni=0,ri=0,ii="object"==typeof performance&&performance.now?performance:Date,ai="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function oi(){return ni||(ai(si),ni=ii.now()+ri)}function si(){ni=0}function li(){this._call=this._time=this._next=null}function ci(t,e,n){var r=new li;return r.restart(t,e,n),r}function hi(){oi(),++Kr;for(var t,e=Zr;e;)(t=ni-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Kr}function ui(){ni=(ei=ii.now())+ri,Kr=Jr=0;try{hi()}finally{Kr=0,function(){for(var t,e,n=Zr,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Zr=e);Qr=t,di(r)}(),ni=0}}function fi(){var t=ii.now(),e=t-ei;e>1e3&&(ri-=e,ei=t)}function di(t){Kr||(Jr&&(Jr=clearTimeout(Jr)),t-ni>24?(t<1/0&&(Jr=setTimeout(ui,t-ii.now()-ri)),ti&&(ti=clearInterval(ti))):(ti||(ei=ii.now(),ti=setInterval(fi,1e3)),Kr=1,ai(ui)))}function pi(t,e,n){var r=new li;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}li.prototype=ci.prototype={constructor:li,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?oi():+n)+(null==e?0:+e),this._next||Qr===this||(Qr?Qr._next=this:Zr=this,Qr=this),this._call=t,this._time=n,di()},stop:function(){this._call&&(this._call=null,this._time=1/0,di())}};var gi=we("start","end","cancel","interrupt"),mi=[];function yi(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(l){var c,h,u,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return pi(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(pi(function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(l))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(u=n.tween.length),c=0,h=-1;c<u;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++h]=f);r.length=h+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ci(function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:gi,tween:mi,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function bi(t,e){var n=_i(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function xi(t,e){var n=_i(t,e);if(n.state>3)throw new Error("too late; already running");return n}function _i(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function vi(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var wi,ki=180/Math.PI,Ci={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Si(t,e,n,r,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*ki,skewX:Math.atan(l)*ki,scaleX:o,scaleY:s}}function Ti(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var l=o.push("translate(",null,e,null,n);s.push({i:l-4,x:jr(t,i)},{i:l-2,x:jr(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:jr(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,l),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:jr(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,l),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:jr(t,n)},{i:s-2,x:jr(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Mi=Ti(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ci:Si(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Ai=Ti(function(t){return null==t?Ci:(wi||(wi=document.createElementNS("http://www.w3.org/2000/svg","g")),wi.setAttribute("transform",t),(t=wi.transform.baseVal.consolidate())?Si((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ci)},", ",")",")");function Bi(t,e){var n,r;return function(){var i=xi(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Li(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=xi(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=s;break}l===c&&i.push(s)}a.tween=i}}function Ei(t,e,n){var r=t._id;return t.each(function(){var t=xi(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return _i(t,r).value[e]}}function Fi(t,e){var n;return("number"==typeof e?jr:e instanceof lr?$r:(n=lr(e))?(e=n,$r):Yr)(t,e)}function $i(t){return function(){this.removeAttribute(t)}}function Oi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ni(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Di(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Ii(t,e,n){var r,i,a;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,l));this.removeAttribute(t)}}function zi(t,e,n){var r,i,a;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,l));this.removeAttributeNS(t.space,t.local)}}function Pi(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function Ri(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function qi(t,e){return function(){bi(this,t).delay=+e.apply(this,arguments)}}function ji(t,e){return e=+e,function(){bi(this,t).delay=e}}function Wi(t,e){return function(){xi(this,t).duration=+e.apply(this,arguments)}}function Hi(t,e){return e=+e,function(){xi(this,t).duration=e}}var Ui=Dn.prototype.constructor;function Yi(t){return function(){this.style.removeProperty(t)}}var Gi=0;function Vi(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Xi(t){return Dn().transition(t)}function Zi(){return++Gi}var Qi=Dn.prototype;function Ki(t){return t*t*t}function Ji(t){return--t*t*t+1}function ta(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Vi.prototype=Xi.prototype={constructor:Vi,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ce(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,l,c=r[o],h=c.length,u=a[o]=new Array(h),f=0;f<h;++f)(s=c[f])&&(l=t.call(s,s.__data__,f,c))&&("__data__"in s&&(l.__data__=s.__data__),u[f]=l,yi(u[f],e,n,f,u,_i(s,n)));return new Vi(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Me(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var l,c=r[s],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var f,d=t.call(l,l.__data__,u,c),p=_i(l,n),g=0,m=d.length;g<m;++g)(f=d[g])&&yi(f,e,n,g,d,p);a.push(d),o.push(l)}return new Vi(a,o,e,n)},selectChild:Qi.selectChild,selectChildren:Qi.selectChildren,filter:function(t){"function"!=typeof t&&(t=Ae(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,l=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new Vi(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var l,c=e[s],h=n[s],u=c.length,f=o[s]=new Array(u),d=0;d<u;++d)(l=c[d]||h[d])&&(f[d]=l);for(;s<r;++s)o[s]=e[s];return new Vi(o,this._parents,this._name,this._id)},selection:function(){return new Ui(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Zi(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,c=0;c<l;++c)if(o=s[c]){var h=_i(o,e);yi(o,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Vi(r,this._parents,t,n)},call:Qi.call,nodes:Qi.nodes,node:Qi.node,size:Qi.size,empty:Qi.empty,each:Qi.each,on:function(t,e){var n=this._id;return arguments.length<2?_i(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?bi:xi;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}(n,t,e))},attr:function(t,e){var n=We(t),r="transform"===n?Ai:Fi;return this.attrTween(t,"function"==typeof e?(n.local?zi:Ii)(n,r,Ei(this,"attr."+t,e)):null==e?(n.local?Oi:$i)(n):(n.local?Di:Ni)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=We(t);return this.tween(n,(r.local?Pi:Ri)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Mi:Fi;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=tn(this,t),o=(this.style.removeProperty(t),tn(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Yi(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=tn(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=tn(this,t)),o===l?null:o===r&&l===i?a:(i=l,a=e(r=o,s))}}(t,r,Ei(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var l=xi(this,t),c=l.on,h=null==l.value[o]?a||(a=Yi(e)):void 0;c===n&&i===h||(r=(n=c).copy()).on(s,i=h),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=tn(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ei(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=_i(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Bi:Li)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?qi:ji)(e,t)):_i(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Wi:Hi)(e,t)):_i(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){xi(this,t).ease=e}}(e,t)):_i(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;xi(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},l={value:function(){0===--i&&a()}};n.each(function(){var n=xi(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e}),0===i&&a()})},[Symbol.iterator]:Qi[Symbol.iterator]};var ea={time:null,delay:0,duration:250,ease:ta};function na(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Dn.prototype.interrupt=function(t){return this.each(function(){vi(this,t)})},Dn.prototype.transition=function(t){var e,n;t instanceof Vi?(e=t._id,t=t._name):(e=Zi(),(n=ea).time=oi(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,c=0;c<l;++c)(o=s[c])&&yi(o,t,e,c,s,n||na(o,e));return new Vi(r,this._parents,t,e)};var ra=[null];function ia(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Vi([[t]],ra,e,+r);return null}const aa=t=>()=>t;function oa(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function sa(t){t.preventDefault(),t.stopImmediatePropagation()}var la={name:"drag"},ca={name:"space"},ha={name:"handle"},ua={name:"center"};const{abs:fa,max:da,min:pa}=Math;function ga(t){return[+t[0],+t[1]]}function ma(t){return[ga(t[0]),ga(t[1])]}var ya={name:"x",handles:["w","e"].map(Sa),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ba={name:"y",handles:["n","s"].map(Sa),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},xa={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Sa),input:function(t){return null==t?null:ma(t)},output:function(t){return t}},_a={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},va={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},wa={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ka={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ca={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Sa(t){return{type:t}}function Ta(t){return!t.ctrlKey&&!t.button}function Ma(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Aa(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ba(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function La(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ea(){return Oa(ya)}function Fa(){return Oa(ba)}function $a(){return Oa(xa)}function Oa(t){var e,n=Ma,r=Ta,i=Aa,a=!0,o=we("start","brush","end"),s=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([Sa("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_a.overlay).merge(n).each(function(){var t=Ba(this).extent;In(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([Sa("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_a.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,function(t){return t.type});r.exit().remove(),r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return _a[t.type]}),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=In(this),e=Ba(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function h(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new u(t,e,n):r}function u(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,o,s,l,u,f,d,p,g,m,y,b=this,x=n.target.__data__.type,_="selection"===(a&&n.metaKey?x="overlay":x)?la:a&&n.altKey?ua:ha,v=t===ba?null:ka[x],w=t===ya?null:Ca[x],k=Ba(b),C=k.extent,S=k.selection,T=C[0][0],M=C[0][1],A=C[1][0],B=C[1][1],L=0,E=0,F=v&&w&&a&&n.shiftKey,$=Array.from(n.touches||[n],t=>{const e=t.identifier;return(t=Xr(t,b)).point0=t.slice(),t.identifier=e,t});vi(b);var O=h(b,arguments,!0).beforestart();if("overlay"===x){S&&(g=!0);const e=[$[0],$[1]||$[0]];k.selection=S=[[i=t===ba?T:pa(e[0][0],e[1][0]),s=t===ya?M:pa(e[0][1],e[1][1])],[u=t===ba?A:da(e[0][0],e[1][0]),d=t===ya?B:da(e[0][1],e[1][1])]],$.length>1&&P(n)}else i=S[0][0],s=S[0][1],u=S[1][0],d=S[1][1];o=i,l=s,f=u,p=d;var N=In(b).attr("pointer-events","none"),D=N.selectAll(".overlay").attr("cursor",_a[x]);if(n.touches)O.moved=z,O.ended=R;else{var I=In(n.view).on("mousemove.brush",z,!0).on("mouseup.brush",R,!0);a&&I.on("keydown.brush",function(t){switch(t.keyCode){case 16:F=v&&w;break;case 18:_===ha&&(v&&(u=f-L*v,i=o+L*v),w&&(d=p-E*w,s=l+E*w),_=ua,P(t));break;case 32:_!==ha&&_!==ua||(v<0?u=f-L:v>0&&(i=o-L),w<0?d=p-E:w>0&&(s=l-E),_=ca,D.attr("cursor",_a.selection),P(t));break;default:return}sa(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:F&&(m=y=F=!1,P(t));break;case 18:_===ua&&(v<0?u=f:v>0&&(i=o),w<0?d=p:w>0&&(s=l),_=ha,P(t));break;case 32:_===ca&&(t.altKey?(v&&(u=f-L*v,i=o+L*v),w&&(d=p-E*w,s=l+E*w),_=ua):(v<0?u=f:v>0&&(i=o),w<0?d=p:w>0&&(s=l),_=ha),D.attr("cursor",_a[x]),P(t));break;default:return}sa(t)},!0),jn(n.view)}c.call(b),O.start(n,_.name)}function z(t){for(const e of t.changedTouches||[t])for(const t of $)t.identifier===e.identifier&&(t.cur=Xr(e,b));if(F&&!m&&!y&&1===$.length){const t=$[0];fa(t.cur[0]-t[0])>fa(t.cur[1]-t[1])?y=!0:m=!0}for(const t of $)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,sa(t),P(t)}function P(t){const e=$[0],n=e.point0;var r;switch(L=e[0]-n[0],E=e[1]-n[1],_){case ca:case la:v&&(L=da(T-i,pa(A-u,L)),o=i+L,f=u+L),w&&(E=da(M-s,pa(B-d,E)),l=s+E,p=d+E);break;case ha:$[1]?(v&&(o=da(T,pa(A,$[0][0])),f=da(T,pa(A,$[1][0])),v=1),w&&(l=da(M,pa(B,$[0][1])),p=da(M,pa(B,$[1][1])),w=1)):(v<0?(L=da(T-i,pa(A-i,L)),o=i+L,f=u):v>0&&(L=da(T-u,pa(A-u,L)),o=i,f=u+L),w<0?(E=da(M-s,pa(B-s,E)),l=s+E,p=d):w>0&&(E=da(M-d,pa(B-d,E)),l=s,p=d+E));break;case ua:v&&(o=da(T,pa(A,i-L*v)),f=da(T,pa(A,u+L*v))),w&&(l=da(M,pa(B,s-E*w)),p=da(M,pa(B,d+E*w)))}f<o&&(v*=-1,r=i,i=u,u=r,r=o,o=f,f=r,x in va&&D.attr("cursor",_a[x=va[x]])),p<l&&(w*=-1,r=s,s=d,d=r,r=l,l=p,p=r,x in wa&&D.attr("cursor",_a[x=wa[x]])),k.selection&&(S=k.selection),m&&(o=S[0][0],f=S[1][0]),y&&(l=S[0][1],p=S[1][1]),S[0][0]===o&&S[0][1]===l&&S[1][0]===f&&S[1][1]===p||(k.selection=[[o,l],[f,p]],c.call(b),O.brush(t,_.name))}function R(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else Wn(t.view,g),I.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),D.attr("cursor",_a.overlay),k.selection&&(S=k.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(S)&&(k.selection=null,c.call(b)),O.end(t,_.name)}}function d(t){h(this,arguments).moved(t)}function p(t){h(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=ma(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,r){e.tween?e.on("start.brush",function(t){h(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){h(this,arguments).end(t)}).tween("brush",function(){var e=this,r=e.__brush,i=h(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Gr(a,o);function l(t){r.selection=1===t&&null===o?null:s(t),c.call(e),i.brush()}return null!==a&&null!==o?l:l(1)}):e.each(function(){var e=this,i=arguments,a=e.__brush,o=t.input("function"==typeof n?n.apply(e,i):n,a.extent),s=h(e,i).beforestart();vi(e),a.selection=null===o?null:o,c.call(e),s.start(r).brush(r).end(r)})},l.clear=function(t,e){l.move(t,null,e)},u.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=In(this.that).datum();o.call(e,this.that,new oa(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:r,dispatch:o}),i)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:aa(ma(t)),l):n},l.filter=function(t){return arguments.length?(r="function"==typeof t?t:aa(!!t),l):r},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:aa(!!t),l):i},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(a=!!t,l):a},l.on=function(){var t=o.on.apply(o,arguments);return t===o?l:t},l}var Na=Math.abs,Da=Math.cos,Ia=Math.sin,za=Math.PI,Pa=za/2,Ra=2*za,qa=Math.max,ja=1e-12;function Wa(t,e){return Array.from({length:e-t},(e,n)=>t+n)}function Ha(){return Ga(!1,!1)}function Ua(){return Ga(!1,!0)}function Ya(){return Ga(!0,!1)}function Ga(t,e){var n=0,r=null,i=null,a=null;function o(o){var s,l=o.length,c=new Array(l),h=Wa(0,l),u=new Array(l*l),f=new Array(l),d=0;o=Float64Array.from({length:l*l},e?(t,e)=>o[e%l][e/l|0]:(t,e)=>o[e/l|0][e%l]);for(let e=0;e<l;++e){let n=0;for(let r=0;r<l;++r)n+=o[e*l+r]+t*o[r*l+e];d+=c[e]=n}s=(d=qa(0,Ra-n*l)/d)?n:Ra/l;{let e=0;r&&h.sort((t,e)=>r(c[t],c[e]));for(const n of h){const r=e;if(t){const t=Wa(1+~l,l).filter(t=>t<0?o[~t*l+n]:o[n*l+t]);i&&t.sort((t,e)=>i(t<0?-o[~t*l+n]:o[n*l+t],e<0?-o[~e*l+n]:o[n*l+e]));for(const r of t)r<0?(u[~r*l+n]||(u[~r*l+n]={source:null,target:null})).target={index:n,startAngle:e,endAngle:e+=o[~r*l+n]*d,value:o[~r*l+n]}:(u[n*l+r]||(u[n*l+r]={source:null,target:null})).source={index:n,startAngle:e,endAngle:e+=o[n*l+r]*d,value:o[n*l+r]};f[n]={index:n,startAngle:r,endAngle:e,value:c[n]}}else{const t=Wa(0,l).filter(t=>o[n*l+t]||o[t*l+n]);i&&t.sort((t,e)=>i(o[n*l+t],o[n*l+e]));for(const r of t){let t;if(n<r?(t=u[n*l+r]||(u[n*l+r]={source:null,target:null}),t.source={index:n,startAngle:e,endAngle:e+=o[n*l+r]*d,value:o[n*l+r]}):(t=u[r*l+n]||(u[r*l+n]={source:null,target:null}),t.target={index:n,startAngle:e,endAngle:e+=o[n*l+r]*d,value:o[n*l+r]},n===r&&(t.source=t.target)),t.source&&t.target&&t.source.value<t.target.value){const e=t.source;t.source=t.target,t.target=e}}f[n]={index:n,startAngle:r,endAngle:e,value:c[n]}}e+=s}}return(u=Object.values(u)).groups=f,a?u.sort(a):u}return o.padAngle=function(t){return arguments.length?(n=qa(0,t),o):n},o.sortGroups=function(t){return arguments.length?(r=t,o):r},o.sortSubgroups=function(t){return arguments.length?(i=t,o):i},o.sortChords=function(t){return arguments.length?(null==t?a=null:(e=t,a=function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)})._=t,o):a&&a._;var e},o}const Va=Math.PI,Xa=2*Va,Za=1e-6,Qa=Xa-Za;function Ka(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Ja{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Ka:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Ka;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-t,l=r-e,c=a-t,h=o-e,u=c*c+h*h;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>Za)if(Math.abs(h*s-l*c)>Za&&i){let f=n-a,d=r-o,p=s*s+l*l,g=f*f+d*d,m=Math.sqrt(p),y=Math.sqrt(u),b=i*Math.tan((Va-Math.acos((p+u-g)/(2*m*y)))/2),x=b/y,_=b/m;Math.abs(x-1)>Za&&this._append`L${t+x*c},${e+x*h}`,this._append`A${i},${i},0,0,${+(h*f>c*d)},${this._x1=t+_*s},${this._y1=e+_*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,h=1^a,u=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Za||Math.abs(this._y1-c)>Za)&&this._append`L${l},${c}`,n&&(u<0&&(u=u%Xa+Xa),u>Qa?this._append`A${n},${n},0,1,${h},${t-o},${e-s}A${n},${n},0,1,${h},${this._x1=l},${this._y1=c}`:u>Za&&this._append`A${n},${n},0,${+(u>=Va)},${h},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function to(){return new Ja}function eo(t=3){return new Ja(+t)}to.prototype=Ja.prototype;var no=Array.prototype.slice;function ro(t){return function(){return t}}function io(t){return t.source}function ao(t){return t.target}function oo(t){return t.radius}function so(t){return t.startAngle}function lo(t){return t.endAngle}function co(){return 0}function ho(){return 10}function uo(t){var e=io,n=ao,r=oo,i=oo,a=so,o=lo,s=co,l=null;function c(){var c,h=e.apply(this,arguments),u=n.apply(this,arguments),f=s.apply(this,arguments)/2,d=no.call(arguments),p=+r.apply(this,(d[0]=h,d)),g=a.apply(this,d)-Pa,m=o.apply(this,d)-Pa,y=+i.apply(this,(d[0]=u,d)),b=a.apply(this,d)-Pa,x=o.apply(this,d)-Pa;if(l||(l=c=to()),f>ja&&(Na(m-g)>2*f+ja?m>g?(g+=f,m-=f):(g-=f,m+=f):g=m=(g+m)/2,Na(x-b)>2*f+ja?x>b?(b+=f,x-=f):(b-=f,x+=f):b=x=(b+x)/2),l.moveTo(p*Da(g),p*Ia(g)),l.arc(0,0,p,g,m),g!==b||m!==x)if(t){var _=y-+t.apply(this,arguments),v=(b+x)/2;l.quadraticCurveTo(0,0,_*Da(b),_*Ia(b)),l.lineTo(y*Da(v),y*Ia(v)),l.lineTo(_*Da(x),_*Ia(x))}else l.quadraticCurveTo(0,0,y*Da(b),y*Ia(b)),l.arc(0,0,y,b,x);if(l.quadraticCurveTo(0,0,p*Da(g),p*Ia(g)),l.closePath(),c)return l=null,c+""||null}return t&&(c.headRadius=function(e){return arguments.length?(t="function"==typeof e?e:ro(+e),c):t}),c.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:ro(+t),c):r},c.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:ro(+t),c):r},c.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:ro(+t),c):i},c.startAngle=function(t){return arguments.length?(a="function"==typeof t?t:ro(+t),c):a},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:ro(+t),c):o},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:ro(+t),c):s},c.source=function(t){return arguments.length?(e=t,c):e},c.target=function(t){return arguments.length?(n=t,c):n},c.context=function(t){return arguments.length?(l=null==t?null:t,c):l},c}function fo(){return uo()}function po(){return uo(ho)}const go=Math.PI/180,mo=180/Math.PI,yo=.96422,bo=.82521,xo=4/29,_o=6/29,vo=3*_o*_o,wo=_o*_o*_o;function ko(t){if(t instanceof To)return new To(t.l,t.a,t.b,t.opacity);if(t instanceof Oo)return No(t);t instanceof dr||(t=ur(t));var e,n,r=Lo(t.r),i=Lo(t.g),a=Lo(t.b),o=Mo((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Mo((.4360747*r+.3850649*i+.1430804*a)/yo),n=Mo((.0139322*r+.0971045*i+.7141733*a)/bo)),new To(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Co(t,e){return new To(t,0,0,null==e?1:e)}function So(t,e,n,r){return 1===arguments.length?ko(t):new To(t,e,n,null==r?1:r)}function To(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Mo(t){return t>wo?Math.pow(t,1/3):t/vo+xo}function Ao(t){return t>_o?t*t*t:vo*(t-xo)}function Bo(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Lo(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Eo(t){if(t instanceof Oo)return new Oo(t.h,t.c,t.l,t.opacity);if(t instanceof To||(t=ko(t)),0===t.a&&0===t.b)return new Oo(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*mo;return new Oo(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Fo(t,e,n,r){return 1===arguments.length?Eo(t):new Oo(n,e,t,null==r?1:r)}function $o(t,e,n,r){return 1===arguments.length?Eo(t):new Oo(t,e,n,null==r?1:r)}function Oo(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function No(t){if(isNaN(t.h))return new To(t.l,0,0,t.opacity);var e=t.h*go;return new To(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Hn(To,So,Un(Yn,{brighter(t){return new To(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new To(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new dr(Bo(3.1338561*(e=yo*Ao(e))-1.6168667*(t=1*Ao(t))-.4906146*(n=bo*Ao(n))),Bo(-.9787684*e+1.9161415*t+.033454*n),Bo(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Hn(Oo,$o,Un(Yn,{brighter(t){return new Oo(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new Oo(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return No(this).rgb()}}));var Do=-.14861,Io=1.78277,zo=-.29227,Po=-.90649,Ro=1.97294,qo=Ro*Po,jo=Ro*Io,Wo=Io*zo-Po*Do;function Ho(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Uo)return new Uo(t.h,t.s,t.l,t.opacity);t instanceof dr||(t=ur(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Wo*r+qo*e-jo*n)/(Wo+qo-jo),a=r-i,o=(Ro*(n-i)-zo*a)/Po,s=Math.sqrt(o*o+a*a)/(Ro*i*(1-i)),l=s?Math.atan2(o,a)*mo-120:NaN;return new Uo(l<0?l+360:l,s,i,t.opacity)}(t):new Uo(t,e,n,null==r?1:r)}function Uo(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Hn(Uo,Ho,Un(Yn,{brighter(t){return t=null==t?Vn:Math.pow(Vn,t),new Uo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Gn:Math.pow(Gn,t),new Uo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*go,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new dr(255*(e+n*(Do*r+Io*i)),255*(e+n*(zo*r+Po*i)),255*(e+n*(Ro*r)),this.opacity)}}));var Yo=Array.prototype.slice;function Go(t,e){return t-e}const Vo=t=>()=>t;function Xo(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Zo(t,e[r]))return n;return 0}function Zo(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var l=t[a],c=l[0],h=l[1],u=t[s],f=u[0],d=u[1];if(Qo(l,u,e))return 0;h>r!=d>r&&n<(f-c)*(r-h)/(d-h)+c&&(i=-i)}return i}function Qo(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Ko(){}var Jo=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ts(){var t=1,e=1,n=ft,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Go);else{const n=A(t,es);for(e=lt(...ut(n[0],n[1],e),e);e[e.length-1]>=n[1];)e.pop();for(;e[1]<n[0];)e.shift()}return e.map(e=>a(t,e))}function a(n,i){const a=null==i?NaN:+i;if(isNaN(a))throw new Error(`invalid value: ${i}`);var s=[],l=[];return function(n,r,i){var a,s,l,c,h,u,f=new Array,d=new Array;for(a=s=-1,c=ns(n[0],r),Jo[c<<1].forEach(p);++a<t-1;)l=c,c=ns(n[a+1],r),Jo[l|c<<1].forEach(p);for(Jo[0|c].forEach(p);++s<e-1;){for(a=-1,c=ns(n[s*t+t],r),h=ns(n[s*t],r),Jo[c<<1|h<<2].forEach(p);++a<t-1;)l=c,c=ns(n[s*t+t+a+1],r),u=h,h=ns(n[s*t+a+1],r),Jo[l|c<<1|h<<2|u<<3].forEach(p);Jo[c|h<<3].forEach(p)}for(a=-1,h=n[s*t]>=r,Jo[h<<2].forEach(p);++a<t-1;)u=h,h=ns(n[s*t+a+1],r),Jo[h<<2|u<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],l=[t[1][0]+a,t[1][1]+s],c=o(r),h=o(l);(e=d[c])?(n=f[h])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(l),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(l),d[e.end=h]=e):(e=f[h])?(n=d[c])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(l),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=c]=e):f[c]=d[h]={start:c,end:h,ring:[r,l]}}Jo[h<<3].forEach(p)}(n,a,function(t){r(t,n,a),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?s.push([t]):l.push(t)}),l.forEach(function(t){for(var e,n=0,r=s.length;n<r;++n)if(-1!==Xo((e=s[n])[0],t))return void e.push(t)}),{type:"MultiPolygon",value:i,coordinates:s}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach(function(n){var a=n[0],o=n[1],s=0|a,l=0|o,c=rs(r[l*t+s]);a>0&&a<t&&s===a&&(n[0]=is(a,rs(r[l*t+s-1]),c,i)),o>0&&o<e&&l===o&&(n[1]=is(o,rs(r[(l-1)*t+s]),c,i))})}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),a=Math.floor(n[1]);if(!(r>=0&&a>=0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Vo(Yo.call(t)):Vo(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ko,i):r===s},i}function es(t){return isFinite(t)?t:NaN}function ns(t,e){return null!=t&&+t>=e}function rs(t){return null==t||isNaN(t=+t)?-1/0:t}function is(t,e,n,r){const i=r-e,a=n-e,o=isFinite(i)||isFinite(a)?i/a:Math.sign(i)/Math.sign(a);return isNaN(o)?t:t+o-.5}function as(t){return t[0]}function os(t){return t[1]}function ss(){return 1}function ls(){var t=as,e=os,n=ss,r=960,i=500,a=20,o=2,s=3*a,l=r+2*s>>o,c=i+2*s>>o,h=Vo(20);function u(r){var i=new Float32Array(l*c),h=Math.pow(2,-o),u=-1;for(const a of r){var f=(t(a,++u,r)+s)*h,d=(e(a,u,r)+s)*h,g=+n(a,u,r);if(g&&f>=0&&f<l&&d>=0&&d<c){var m=Math.floor(f),y=Math.floor(d),b=f-m-.5,x=d-y-.5;i[m+y*l]+=(1-b)*(1-x)*g,i[m+1+y*l]+=b*(1-x)*g,i[m+1+(y+1)*l]+=b*x*g,i[m+(y+1)*l]+=(1-b)*x*g}}return p({data:i,width:l,height:c},a*h),i}function f(t){var e=u(t),n=h(e),r=Math.pow(2,2*o);return Array.isArray(n)||(n=lt(Number.MIN_VALUE,pt(e)/r,n)),ts().size([l,c]).thresholds(n.map(t=>t*r))(e).map((t,e)=>(t.value=+n[e],d(t)))}function d(t){return t.coordinates.forEach(g),t}function g(t){t.forEach(m)}function m(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function b(){return l=r+2*(s=3*a)>>o,c=i+2*s>>o,f}return f.contours=function(t){var e=u(t),n=ts().size([l,c]),r=Math.pow(2,2*o),i=t=>{t=+t;var i=d(n.contour(e,t*r));return i.value=t,i};return Object.defineProperty(i,"max",{get:()=>pt(e)/r}),i},f.x=function(e){return arguments.length?(t="function"==typeof e?e:Vo(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Vo(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Vo(+t),f):n},f.size=function(t){if(!arguments.length)return[r,i];var e=+t[0],n=+t[1];if(!(e>=0&&n>=0))throw new Error("invalid size");return r=e,i=n,b()},f.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),b()},f.thresholds=function(t){return arguments.length?(h="function"==typeof t?t:Array.isArray(t)?Vo(Yo.call(t)):Vo(t),f):h},f.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=(Math.sqrt(4*t*t+1)-1)/2,b()},f}const cs=134217729;function hs(t,e,n,r,i){let a,o,s,l,c=e[0],h=r[0],u=0,f=0;h>c==h>-c?(a=c,c=e[++u]):(a=h,h=r[++f]);let d=0;if(u<t&&f<n)for(h>c==h>-c?(o=c+a,s=a-(o-c),c=e[++u]):(o=h+a,s=a-(o-h),h=r[++f]),a=o,0!==s&&(i[d++]=s);u<t&&f<n;)h>c==h>-c?(o=a+c,l=o-a,s=a-(o-l)+(c-l),c=e[++u]):(o=a+h,l=o-a,s=a-(o-l)+(h-l),h=r[++f]),a=o,0!==s&&(i[d++]=s);for(;u<t;)o=a+c,l=o-a,s=a-(o-l)+(c-l),c=e[++u],a=o,0!==s&&(i[d++]=s);for(;f<n;)o=a+h,l=o-a,s=a-(o-l)+(h-l),h=r[++f],a=o,0!==s&&(i[d++]=s);return 0===a&&0!==d||(i[d++]=a),d}function us(t){return new Float64Array(t)}const fs=us(4),ds=us(8),ps=us(12),gs=us(16),ms=us(4);function ys(t,e,n,r,i,a){const o=(e-a)*(n-i),s=(t-i)*(r-a),l=o-s,c=Math.abs(o+s);return Math.abs(l)>=33306690738754716e-32*c?l:-function(t,e,n,r,i,a,o){let s,l,c,h,u,f,d,p,g,m,y,b,x,_,v,w,k,C;const S=t-i,T=n-i,M=e-a,A=r-a;_=S*A,f=cs*S,d=f-(f-S),p=S-d,f=cs*A,g=f-(f-A),m=A-g,v=p*m-(_-d*g-p*g-d*m),w=M*T,f=cs*M,d=f-(f-M),p=M-d,f=cs*T,g=f-(f-T),m=T-g,k=p*m-(w-d*g-p*g-d*m),y=v-k,u=v-y,fs[0]=v-(y+u)+(u-k),b=_+y,u=b-_,x=_-(b-u)+(y-u),y=x-w,u=x-y,fs[1]=x-(y+u)+(u-w),C=b+y,u=C-b,fs[2]=b-(C-u)+(y-u),fs[3]=C;let B=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,fs),L=22204460492503146e-32*o;if(B>=L||-B>=L)return B;if(u=t-S,s=t-(S+u)+(u-i),u=n-T,c=n-(T+u)+(u-i),u=e-M,l=e-(M+u)+(u-a),u=r-A,h=r-(A+u)+(u-a),0===s&&0===l&&0===c&&0===h)return B;if(L=11093356479670487e-47*o+33306690738754706e-32*Math.abs(B),B+=S*h+A*s-(M*c+T*l),B>=L||-B>=L)return B;_=s*A,f=cs*s,d=f-(f-s),p=s-d,f=cs*A,g=f-(f-A),m=A-g,v=p*m-(_-d*g-p*g-d*m),w=l*T,f=cs*l,d=f-(f-l),p=l-d,f=cs*T,g=f-(f-T),m=T-g,k=p*m-(w-d*g-p*g-d*m),y=v-k,u=v-y,ms[0]=v-(y+u)+(u-k),b=_+y,u=b-_,x=_-(b-u)+(y-u),y=x-w,u=x-y,ms[1]=x-(y+u)+(u-w),C=b+y,u=C-b,ms[2]=b-(C-u)+(y-u),ms[3]=C;const E=hs(4,fs,4,ms,ds);_=S*h,f=cs*S,d=f-(f-S),p=S-d,f=cs*h,g=f-(f-h),m=h-g,v=p*m-(_-d*g-p*g-d*m),w=M*c,f=cs*M,d=f-(f-M),p=M-d,f=cs*c,g=f-(f-c),m=c-g,k=p*m-(w-d*g-p*g-d*m),y=v-k,u=v-y,ms[0]=v-(y+u)+(u-k),b=_+y,u=b-_,x=_-(b-u)+(y-u),y=x-w,u=x-y,ms[1]=x-(y+u)+(u-w),C=b+y,u=C-b,ms[2]=b-(C-u)+(y-u),ms[3]=C;const F=hs(E,ds,4,ms,ps);_=s*h,f=cs*s,d=f-(f-s),p=s-d,f=cs*h,g=f-(f-h),m=h-g,v=p*m-(_-d*g-p*g-d*m),w=l*c,f=cs*l,d=f-(f-l),p=l-d,f=cs*c,g=f-(f-c),m=c-g,k=p*m-(w-d*g-p*g-d*m),y=v-k,u=v-y,ms[0]=v-(y+u)+(u-k),b=_+y,u=b-_,x=_-(b-u)+(y-u),y=x-w,u=x-y,ms[1]=x-(y+u)+(u-w),C=b+y,u=C-b,ms[2]=b-(C-u)+(y-u),ms[3]=C;const $=hs(F,ps,4,ms,gs);return gs[$-1]}(t,e,n,r,i,a,c)}us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(8),us(8),us(8),us(4),us(8),us(8),us(8),us(12),us(192),us(192),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(4),us(4),us(4),us(8),us(16),us(16),us(16),us(32),us(32),us(48),us(64),us(1152),us(1152),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(1152),us(1152),us(1152),us(1152),us(1152),us(2304),us(2304),us(3456),us(5760),us(8),us(8),us(8),us(16),us(24),us(48),us(48),us(96),us(192),us(384),us(384),us(384),us(768),us(96),us(96),us(96),us(1152);const bs=Math.pow(2,-52),xs=new Uint32Array(512);class _s{static from(t,e=Ts,n=Ms){const r=t.length,i=new Float64Array(2*r);for(let a=0;a<r;a++){const r=t[a];i[2*a]=e(r),i[2*a+1]=n(r)}return new _s(i)}constructor(t){const e=t.length>>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=t.length>>1;let o=1/0,s=1/0,l=-1/0,c=-1/0;for(let e=0;e<a;e++){const n=t[2*e],r=t[2*e+1];n<o&&(o=n),r<s&&(s=r),n>l&&(l=n),r>c&&(c=r),this._ids[e]=e}const h=(o+l)/2,u=(s+c)/2;let f,d,p;for(let e=0,n=1/0;e<a;e++){const r=vs(h,u,t[2*e],t[2*e+1]);r<n&&(f=e,n=r)}const g=t[2*f],m=t[2*f+1];for(let e=0,n=1/0;e<a;e++){if(e===f)continue;const r=vs(g,m,t[2*e],t[2*e+1]);r<n&&r>0&&(d=e,n=r)}let y=t[2*d],b=t[2*d+1],x=1/0;for(let e=0;e<a;e++){if(e===f||e===d)continue;const n=ks(g,m,y,b,t[2*e],t[2*e+1]);n<x&&(p=e,x=n)}let _=t[2*p],v=t[2*p+1];if(x===1/0){for(let e=0;e<a;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];Cs(this._ids,this._dists,0,a-1);const e=new Uint32Array(a);let n=0;for(let t=0,r=-1/0;t<a;t++){const i=this._ids[t],a=this._dists[i];a>r&&(e[n++]=i,r=a)}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(ys(g,m,y,b,_,v)<0){const t=d,e=y,n=b;d=p,y=_,b=v,p=t,_=e,v=n}const w=function(t,e,n,r,i,a){const o=n-t,s=r-e,l=i-t,c=a-e,h=o*o+s*s,u=l*l+c*c,f=.5/(o*c-s*l);return{x:t+(c*h-s*u)*f,y:e+(o*u-l*h)*f}}(g,m,y,b,_,v);this._cx=w.x,this._cy=w.y;for(let e=0;e<a;e++)this._dists[e]=vs(t[2*e],t[2*e+1],w.x,w.y);Cs(this._ids,this._dists,0,a-1),this._hullStart=f;let k=3;n[f]=e[p]=d,n[d]=e[f]=p,n[p]=e[d]=f,r[f]=0,r[d]=1,r[p]=2,i.fill(-1),i[this._hashKey(g,m)]=f,i[this._hashKey(y,b)]=d,i[this._hashKey(_,v)]=p,this.trianglesLen=0,this._addTriangle(f,d,p,-1,-1,-1);for(let a,o,s=0;s<this._ids.length;s++){const l=this._ids[s],c=t[2*l],h=t[2*l+1];if(s>0&&Math.abs(c-a)<=bs&&Math.abs(h-o)<=bs)continue;if(a=c,o=h,l===f||l===d||l===p)continue;let u=0;for(let t=0,e=this._hashKey(c,h);t<this._hashSize&&(u=i[(e+t)%this._hashSize],-1===u||u===n[u]);t++);u=e[u];let g,m=u;for(;g=n[m],ys(c,h,t[2*m],t[2*m+1],t[2*g],t[2*g+1])>=0;)if(m=g,m===u){m=-1;break}if(-1===m)continue;let y=this._addTriangle(m,l,n[m],-1,-1,r[m]);r[l]=this._legalize(y+2),r[m]=y,k++;let b=n[m];for(;g=n[b],ys(c,h,t[2*b],t[2*b+1],t[2*g],t[2*g+1])<0;)y=this._addTriangle(b,l,g,r[l],-1,r[b]),r[l]=this._legalize(y+2),n[b]=b,k--,b=g;if(m===u)for(;g=e[m],ys(c,h,t[2*g],t[2*g+1],t[2*m],t[2*m+1])<0;)y=this._addTriangle(g,l,m,-1,r[m],r[g]),this._legalize(y+2),r[g]=y,n[m]=m,k--,m=g;this._hullStart=e[l]=m,n[m]=e[b]=l,n[l]=b,i[this._hashKey(c,h)]=l,i[this._hashKey(t[2*m],t[2*m+1])]=m}this.hull=new Uint32Array(k);for(let t=0,e=this._hullStart;t<k;t++)this.hull[t]=e,e=n[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(function(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,a=0;for(;;){const o=n[t],s=t-t%3;if(a=s+(t+2)%3,-1===o){if(0===i)break;t=xs[--i];continue}const l=o-o%3,c=s+(t+1)%3,h=l+(o+2)%3,u=e[a],f=e[t],d=e[c],p=e[h];if(ws(r[2*u],r[2*u+1],r[2*f],r[2*f+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){e[t]=p,e[o]=u;const r=n[h];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===h){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(o,n[a]),this._link(a,h);const s=l+(o+1)%3;i<xs.length&&(xs[i++]=s)}else{if(0===i)break;t=xs[--i]}}return a}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,r,i,a){const o=this.trianglesLen;return this._triangles[o]=t,this._triangles[o+1]=e,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}}function vs(t,e,n,r){const i=t-n,a=e-r;return i*i+a*a}function ws(t,e,n,r,i,a,o,s){const l=t-o,c=e-s,h=n-o,u=r-s,f=i-o,d=a-s,p=h*h+u*u,g=f*f+d*d;return l*(u*g-p*d)-c*(h*g-p*f)+(l*l+c*c)*(h*d-u*f)<0}function ks(t,e,n,r,i,a){const o=n-t,s=r-e,l=i-t,c=a-e,h=o*o+s*s,u=l*l+c*c,f=.5/(o*c-s*l),d=(c*h-s*u)*f,p=(o*u-l*h)*f;return d*d+p*p}function Cs(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],a=e[r];let o=i-1;for(;o>=n&&e[t[o]]>a;)t[o+1]=t[o--];t[o+1]=r}else{let i=n+1,a=r;Ss(t,n+r>>1,i),e[t[n]]>e[t[r]]&&Ss(t,n,r),e[t[i]]>e[t[r]]&&Ss(t,i,r),e[t[n]]>e[t[i]]&&Ss(t,n,i);const o=t[i],s=e[o];for(;;){do{i++}while(e[t[i]]<s);do{a--}while(e[t[a]]>s);if(a<i)break;Ss(t,i,a)}t[n+1]=t[a],t[a]=o,r-i+1>=a-n?(Cs(t,e,i,r),Cs(t,e,n,a-1)):(Cs(t,e,n,a-1),Cs(t,e,i,r))}}function Ss(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ts(t){return t[0]}function Ms(t){return t[1]}const As=1e-6;class Bs{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){const r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>As||Math.abs(this._y1-i)>As)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,e,n,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Ls{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class Es{constructor(t,[e,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(e=+e)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=e,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:r}=this;let i,a;const o=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,s,l=0,c=0,h=n.length;l<h;l+=3,c+=2){const h=2*n[l],u=2*n[l+1],f=2*n[l+2],d=t[h],p=t[h+1],g=t[u],m=t[u+1],y=t[f],b=t[f+1],x=g-d,_=m-p,v=y-d,w=b-p,k=2*(x*w-_*v);if(Math.abs(k)<1e-9){if(void 0===i){i=a=0;for(const n of e)i+=t[2*n],a+=t[2*n+1];i/=e.length,a/=e.length}const n=1e9*Math.sign((i-d)*w-(a-p)*v);r=(d+y)/2-n*w,s=(p+b)/2+n*v}else{const t=1/k,e=x*x+_*_,n=v*v+w*w;r=d+(w*e-_*n)*t,s=p+(x*n-v*e)*t}o[c]=r,o[c+1]=s}let s,l,c,h=e[e.length-1],u=4*h,f=t[2*h],d=t[2*h+1];r.fill(0);for(let n=0;n<e.length;++n)h=e[n],s=u,l=f,c=d,u=4*h,f=t[2*h],d=t[2*h+1],r[s+2]=r[u]=c-d,r[s+3]=r[u+1]=f-l}render(t){const e=null==t?t=new Bs:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:a,vectors:o}=this;if(i.length<=1)return null;for(let e=0,r=n.length;e<r;++e){const r=n[e];if(r<e)continue;const i=2*Math.floor(e/3),o=2*Math.floor(r/3),s=a[i],l=a[i+1],c=a[o],h=a[o+1];this._renderSegment(s,l,c,h,t)}let s,l=i[i.length-1];for(let e=0;e<i.length;++e){s=l,l=i[e];const n=2*Math.floor(r[l]/3),c=a[n],h=a[n+1],u=4*s,f=this._project(c,h,o[u+2],o[u+3]);f&&this._renderSegment(c,h,f[0],f[1],t)}return e&&e.value()}renderBounds(t){const e=null==t?t=new Bs:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),e&&e.value()}renderCell(t,e){const n=null==e?e=new Bs:void 0,r=this._clip(t);if(null===r||!r.length)return;e.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let t=2;t<i;t+=2)r[t]===r[t-2]&&r[t+1]===r[t-1]||e.lineTo(r[t],r[t+1]);return e.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let e=0,n=t.length/2;e<n;++e){const t=this.cellPolygon(e);t&&(t.index=e,yield t)}}cellPolygon(t){const e=new Ls;return this.renderCell(t,e),e.value()}_renderSegment(t,e,n,r,i){let a;const o=this._regioncode(t,e),s=this._regioncode(n,r);0===o&&0===s?(i.moveTo(t,e),i.lineTo(n,r)):(a=this._clipSegment(t,e,n,r,o,s))&&(i.moveTo(a[0],a[1]),i.lineTo(a[2],a[3]))}contains(t,e,n){return(e=+e)==e&&(n=+n)==n&&this.delaunay._step(t,e,n)===t}*neighbors(t){const e=this._clip(t);if(e)for(const n of this.delaunay.neighbors(t)){const t=this._clip(n);if(t)t:for(let r=0,i=e.length;r<i;r+=2)for(let a=0,o=t.length;a<o;a+=2)if(e[r]===t[a]&&e[r+1]===t[a+1]&&e[(r+2)%i]===t[(a+o-2)%o]&&e[(r+3)%i]===t[(a+o-1)%o]){yield n;break t}}}_cell(t){const{circumcenters:e,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,a=n[t];if(-1===a)return null;const o=[];let s=a;do{const n=Math.floor(s/3);if(o.push(e[2*n],e[2*n+1]),s=s%3==2?s-2:s+1,i[s]!==t)break;s=r[s]}while(s!==a&&-1!==s);return o}_clip(t){if(0===t&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const e=this._cell(t);if(null===e)return null;const{vectors:n}=this,r=4*t;return this._simplify(n[r]||n[r+1]?this._clipInfinite(t,e,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(t,e))}_clipFinite(t,e){const n=e.length;let r,i,a,o,s=null,l=e[n-2],c=e[n-1],h=this._regioncode(l,c),u=0;for(let f=0;f<n;f+=2)if(r=l,i=c,l=e[f],c=e[f+1],a=h,h=this._regioncode(l,c),0===a&&0===h)o=u,u=0,s?s.push(l,c):s=[l,c];else{let e,n,f,d,p;if(0===a){if(null===(e=this._clipSegment(r,i,l,c,a,h)))continue;[n,f,d,p]=e}else{if(null===(e=this._clipSegment(l,c,r,i,h,a)))continue;[d,p,n,f]=e,o=u,u=this._edgecode(n,f),o&&u&&this._edge(t,o,u,s,s.length),s?s.push(n,f):s=[n,f]}o=u,u=this._edgecode(d,p),o&&u&&this._edge(t,o,u,s,s.length),s?s.push(d,p):s=[d,p]}if(s)o=u,u=this._edgecode(s[0],s[1]),o&&u&&this._edge(t,o,u,s,s.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return s}_clipSegment(t,e,n,r,i,a){const o=i<a;for(o&&([t,e,n,r,i,a]=[n,r,t,e,a,i]);;){if(0===i&&0===a)return o?[n,r,t,e]:[t,e,n,r];if(i&a)return null;let s,l,c=i||a;8&c?(s=t+(n-t)*(this.ymax-e)/(r-e),l=this.ymax):4&c?(s=t+(n-t)*(this.ymin-e)/(r-e),l=this.ymin):2&c?(l=e+(r-e)*(this.xmax-t)/(n-t),s=this.xmax):(l=e+(r-e)*(this.xmin-t)/(n-t),s=this.xmin),i?(t=s,e=l,i=this._regioncode(t,e)):(n=s,r=l,a=this._regioncode(n,r))}}_clipInfinite(t,e,n,r,i,a){let o,s=Array.from(e);if((o=this._project(s[0],s[1],n,r))&&s.unshift(o[0],o[1]),(o=this._project(s[s.length-2],s[s.length-1],i,a))&&s.push(o[0],o[1]),s=this._clipFinite(t,s))for(let e,n=0,r=s.length,i=this._edgecode(s[r-2],s[r-1]);n<r;n+=2)e=i,i=this._edgecode(s[n],s[n+1]),e&&i&&(n=this._edge(t,e,i,s,n),r=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,e,n,r,i){for(;e!==n;){let n,a;switch(e){case 5:e=4;continue;case 4:e=6,n=this.xmax,a=this.ymin;break;case 6:e=2;continue;case 2:e=10,n=this.xmax,a=this.ymax;break;case 10:e=8;continue;case 8:e=9,n=this.xmin,a=this.ymax;break;case 9:e=1;continue;case 1:e=5,n=this.xmin,a=this.ymin}r[i]===n&&r[i+1]===a||!this.contains(t,n,a)||(r.splice(i,0,n,a),i+=2)}return i}_project(t,e,n,r){let i,a,o,s=1/0;if(r<0){if(e<=this.ymin)return null;(i=(this.ymin-e)/r)<s&&(o=this.ymin,a=t+(s=i)*n)}else if(r>0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)<s&&(o=this.ymax,a=t+(s=i)*n)}if(n>0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)<s&&(a=this.xmax,o=e+(s=i)*r)}else if(n<0){if(t<=this.xmin)return null;(i=(this.xmin-t)/n)<s&&(a=this.xmin,o=e+(s=i)*r)}return[a,o]}_edgecode(t,e){return(t===this.xmin?1:t===this.xmax?2:0)|(e===this.ymin?4:e===this.ymax?8:0)}_regioncode(t,e){return(t<this.xmin?1:t>this.xmax?2:0)|(e<this.ymin?4:e>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e<t.length;e+=2){const n=(e+2)%t.length,r=(e+4)%t.length;(t[e]===t[n]&&t[n]===t[r]||t[e+1]===t[n+1]&&t[n+1]===t[r+1])&&(t.splice(n,2),e-=2)}t.length||(t=null)}return t}}const Fs=2*Math.PI,$s=Math.pow;function Os(t){return t[0]}function Ns(t){return t[1]}function Ds(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Is{static from(t,e=Os,n=Ns,r){return new Is("length"in t?function(t,e,n,r){const i=t.length,a=new Float64Array(2*i);for(let o=0;o<i;++o){const i=t[o];a[2*o]=e.call(r,i,o,t),a[2*o+1]=n.call(r,i,o,t)}return a}(t,e,n,r):Float64Array.from(function*(t,e,n,r){let i=0;for(const a of t)yield e.call(r,a,i,t),yield n.call(r,a,i,t),++i}(t,e,n,r)))}constructor(t){this._delaunator=new _s(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t<e.length;t+=3){const r=2*e[t],i=2*e[t+1],a=2*e[t+2];if((n[a]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[a+1]-n[r+1])>1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},(t,e)=>e).sort((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]);const t=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,n=e.length/2;t<n;++t){const n=Ds(e[2*t],e[2*t+1],i);e[2*t]=n[0],e[2*t+1]=n[1]}this._delaunator=new _s(e)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let t=0,e=n.length;t<e;++t){const e=i[t%3==2?t-2:t+1];-1!==n[t]&&-1!==a[e]||(a[e]=t)}for(let t=0,e=r.length;t<e;++t)o[r[t]]=t;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],a[r[0]]=1,2===r.length&&(a[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new Es(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){const e=o.indexOf(t);return e>0&&(yield o[e-1]),void(e<o.length-1&&(yield o[e+1]))}const s=e[t];if(-1===s)return;let l=s,c=-1;do{if(yield c=a[l],l=l%3==2?l-2:l+1,a[l]!==t)return;if(l=i[l],-1===l){const e=n[(r[t]+1)%n.length];return void(e!==c&&(yield e))}}while(l!==s)}find(t,e,n=0){if((t=+t)!=t||(e=+e)!=e)return-1;const r=n;let i;for(;(i=this._step(n,t,e))>=0&&i!==n&&i!==r;)n=i;return i}_step(t,e,n){const{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:l}=this;if(-1===r[t]||!l.length)return(t+1)%(l.length>>1);let c=t,h=$s(e-l[2*t],2)+$s(n-l[2*t+1],2);const u=r[t];let f=u;do{let r=s[f];const u=$s(e-l[2*r],2)+$s(n-l[2*r+1],2);if(u<h&&(h=u,c=r),f=f%3==2?f-2:f+1,s[f]!==t)break;if(f=o[f],-1===f){if(f=i[(a[t]+1)%i.length],f!==r&&$s(e-l[2*f],2)+$s(n-l[2*f+1],2)<h)return f;break}}while(f!==u);return c}render(t){const e=null==t?t=new Bs:void 0,{points:n,halfedges:r,triangles:i}=this;for(let e=0,a=r.length;e<a;++e){const a=r[e];if(a<e)continue;const o=2*i[e],s=2*i[a];t.moveTo(n[o],n[o+1]),t.lineTo(n[s],n[s+1])}return this.renderHull(t),e&&e.value()}renderPoints(t,e){void 0!==e||t&&"function"==typeof t.moveTo||(e=t,t=null),e=null==e?2:+e;const n=null==t?t=new Bs:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){const i=r[n],a=r[n+1];t.moveTo(i+e,a),t.arc(i,a,e,0,Fs)}return n&&n.value()}renderHull(t){const e=null==t?t=new Bs:void 0,{hull:n,points:r}=this,i=2*n[0],a=n.length;t.moveTo(r[i],r[i+1]);for(let e=1;e<a;++e){const i=2*n[e];t.lineTo(r[i],r[i+1])}return t.closePath(),e&&e.value()}hullPolygon(){const t=new Ls;return this.renderHull(t),t.value()}renderTriangle(t,e){const n=null==e?e=new Bs:void 0,{points:r,triangles:i}=this,a=2*i[t*=3],o=2*i[t+1],s=2*i[t+2];return e.moveTo(r[a],r[a+1]),e.lineTo(r[o],r[o+1]),e.lineTo(r[s],r[s+1]),e.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:t}=this;for(let e=0,n=t.length/3;e<n;++e)yield this.trianglePolygon(e)}trianglePolygon(t){const e=new Ls;return this.renderTriangle(t,e),e.value()}}const zs=t=>()=>t;function Ps(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:l,dy:c,dispatch:h}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:h}})}function Rs(t){return!t.ctrlKey&&!t.button}function qs(){return this.parentNode}function js(t,e){return null==e?{x:t.x,y:t.y}:e}function Ws(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hs(){var t,e,n,r,i=Rs,a=qs,o=js,s=Ws,l={},c=we("start","drag","end"),h=0,u=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",m).on("touchmove.drag",y,zn).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(o,s){if(!r&&i.call(this,o,s)){var l=x(this,a.call(this,o,s),o,s,"mouse");l&&(In(o.view).on("mousemove.drag",p,Pn).on("mouseup.drag",g,Pn),jn(o.view),Rn(o),n=!1,t=o.clientX,e=o.clientY,l("start",o))}}function p(r){if(qn(r),!n){var i=r.clientX-t,a=r.clientY-e;n=i*i+a*a>u}l.mouse("drag",r)}function g(t){In(t.view).on("mousemove.drag mouseup.drag",null),Wn(t.view,n),qn(t),l.mouse("end",t)}function m(t,e){if(i.call(this,t,e)){var n,r,o=t.changedTouches,s=a.call(this,t,e),l=o.length;for(n=0;n<l;++n)(r=x(this,s,t,e,o[n].identifier,o[n]))&&(Rn(t),r("start",t,o[n]))}}function y(t){var e,n,r=t.changedTouches,i=r.length;for(e=0;e<i;++e)(n=l[r[e].identifier])&&(qn(t),n("drag",t,r[e]))}function b(t){var e,n,i=t.changedTouches,a=i.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),e=0;e<a;++e)(n=l[i[e].identifier])&&(Rn(t),n("end",t,i[e]))}function x(t,e,n,r,i,a){var s,u,d,p=c.copy(),g=Xr(a||n,e);if(null!=(d=o.call(t,new Ps("beforestart",{sourceEvent:n,target:f,identifier:i,active:h,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),r)))return s=d.x-g[0]||0,u=d.y-g[1]||0,function n(a,o,c){var m,y=g;switch(a){case"start":l[i]=n,m=h++;break;case"end":delete l[i],--h;case"drag":g=Xr(c||o,e),m=h}p.call(a,t,new Ps(a,{sourceEvent:o,subject:d,target:f,identifier:i,active:m,x:g[0]+s,y:g[1]+u,dx:g[0]-y[0],dy:g[1]-y[1],dispatch:p}),r)}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:zs(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:zs(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:zs(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:zs(!!t),f):s},f.on=function(){var t=c.on.apply(c,arguments);return t===c?f:t},f.clickDistance=function(t){return arguments.length?(u=(t=+t)*t,f):Math.sqrt(u)},f}Ps.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Us={},Ys={};function Gs(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Vs(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}function Xs(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Zs(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,l=a<=0,c=!1;function h(){if(l)return Ys;if(c)return c=!1,Us;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?l=!0:10===(r=t.charCodeAt(o++))?c=!0:13===r&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))c=!0;else if(13===r)c=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return l=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=h())!==Ys;){for(var u=[];r!==Us&&r!==Ys;)u.push(r),r=h();e&&null==(u=e(u,s++))||i.push(u)}return i}function i(e,n){return e.map(function(e){return n.map(function(t){return o(e[t])}).join(t)})}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Xs(-e,6):e>9999?"+"+Xs(e,6):Xs(e,4))+"-"+Xs(t.getUTCMonth()+1,2)+"-"+Xs(t.getUTCDate(),2)+(a?"T"+Xs(n,2)+":"+Xs(r,2)+":"+Xs(i,2)+"."+Xs(a,3)+"Z":i?"T"+Xs(n,2)+":"+Xs(r,2)+":"+Xs(i,2)+"Z":r||n?"T"+Xs(n,2)+":"+Xs(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Gs(t);return function(r,i){return e(n(r),i,t)}}(t,e):Gs(t)});return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Vs(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Vs(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var Qs=Zs(","),Ks=Qs.parse,Js=Qs.parseRows,tl=Qs.format,el=Qs.formatBody,nl=Qs.formatRows,rl=Qs.formatRow,il=Qs.formatValue,al=Zs("\t"),ol=al.parse,sl=al.parseRows,ll=al.format,cl=al.formatBody,hl=al.formatRows,ul=al.formatRow,fl=al.formatValue;function dl(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;pl&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const pl=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),gl=t=>+t;function ml(t){return t*t}function yl(t){return t*(2-t)}function bl(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var xl=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),_l=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),vl=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),wl=Math.PI,kl=wl/2;function Cl(t){return 1===+t?1:1-Math.cos(t*kl)}function Sl(t){return Math.sin(t*kl)}function Tl(t){return(1-Math.cos(wl*t))/2}function Ml(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Al(t){return Ml(1-+t)}function Bl(t){return 1-Ml(t)}function Ll(t){return((t*=2)<=1?Ml(1-t):2-Ml(t-1))/2}function El(t){return 1-Math.sqrt(1-t*t)}function Fl(t){return Math.sqrt(1- --t*t)}function $l(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Ol=4/11,Nl=6/11,Dl=8/11,Il=9/11,zl=10/11,Pl=21/22,Rl=7.5625;function ql(t){return 1-jl(1-t)}function jl(t){return(t=+t)<Ol?Rl*t*t:t<Dl?Rl*(t-=Nl)*t+.75:t<zl?Rl*(t-=Il)*t+.9375:Rl*(t-=Pl)*t+.984375}function Wl(t){return((t*=2)<=1?1-jl(1-t):jl(t-1)+1)/2}var Hl=1.70158,Ul=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(Hl),Yl=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(Hl),Gl=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(Hl),Vl=2*Math.PI,Xl=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vl);function i(t){return e*Ml(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Vl)},i.period=function(n){return t(e,n)},i}(1,.3),Zl=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vl);function i(t){return 1-e*Ml(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Vl)},i.period=function(n){return t(e,n)},i}(1,.3),Ql=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vl);function i(t){return((t=2*t-1)<0?e*Ml(-t)*Math.sin((r-t)/n):2-e*Ml(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Vl)},i.period=function(n){return t(e,n)},i}(1,.3);function Kl(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function Jl(t,e){return fetch(t,e).then(Kl)}function tc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function ec(t,e){return fetch(t,e).then(tc)}function nc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function rc(t,e){return fetch(t,e).then(nc)}function ic(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),rc(e,n).then(function(e){return t(e,r)})}}function ac(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=Zs(t);return rc(e,n).then(function(t){return i.parse(t,r)})}var oc=ic(Ks),sc=ic(ol);function lc(t,e){return new Promise(function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function cc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function hc(t,e){return fetch(t,e).then(cc)}function uc(t){return(e,n)=>rc(e,n).then(e=>(new DOMParser).parseFromString(e,t))}const fc=uc("application/xml");var dc=uc("text/html"),pc=uc("image/svg+xml");function gc(t,e){var n,r=1;function i(){var i,a,o=n.length,s=0,l=0;for(i=0;i<o;++i)s+=(a=n[i]).x,l+=a.y;for(s=(s/o-t)*r,l=(l/o-e)*r,i=0;i<o;++i)(a=n[i]).x-=s,a.y-=l}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}function mc(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,l,c,h,u,f,d=t._root,p={data:r},g=t._x0,m=t._y0,y=t._x1,b=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(a=(g+y)/2))?g=a:y=a,(h=n>=(o=(m+b)/2))?m=o:b=o,i=d,!(d=d[u=h<<1|c]))return i[u]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)return p.next=d,i?i[u]=p:t._root=p,t;do{i=i?i[u]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+y)/2))?g=a:y=a,(h=n>=(o=(m+b)/2))?m=o:b=o}while((u=h<<1|c)==(f=(l>=o)<<1|s>=a));return i[f]=d,i[u]=p,t}function yc(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function bc(t){return t[0]}function xc(t){return t[1]}function _c(t,e,n){var r=new vc(null==e?bc:e,null==n?xc:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function vc(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function wc(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var kc=_c.prototype=vc.prototype;function Cc(t){return function(){return t}}function Sc(t){return 1e-6*(t()-.5)}function Tc(t){return t.x+t.vx}function Mc(t){return t.y+t.vy}function Ac(t){var e,n,r,i=1,a=1;function o(){for(var t,o,l,c,h,u,f,d=e.length,p=0;p<a;++p)for(o=_c(e,Tc,Mc).visitAfter(s),t=0;t<d;++t)l=e[t],u=n[l.index],f=u*u,c=l.x+l.vx,h=l.y+l.vy,o.visit(g);function g(t,e,n,a,o){var s=t.data,d=t.r,p=u+d;if(!s)return e>c+p||a<c-p||n>h+p||o<h-p;if(s.index>l.index){var g=c-s.x-s.vx,m=h-s.y-s.vy,y=g*g+m*m;y<p*p&&(0===g&&(y+=(g=Sc(r))*g),0===m&&(y+=(m=Sc(r))*m),y=(p-(y=Math.sqrt(y)))/y*i,l.vx+=(g*=y)*(p=(d*=d)/(f+d)),l.vy+=(m*=y)*p,s.vx-=g*(p=1-p),s.vy-=m*p)}}}function s(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function l(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=Cc(null==t?1:+t)),o.initialize=function(t,n){e=t,r=n,l()},o.iterations=function(t){return arguments.length?(a=+t,o):a},o.strength=function(t){return arguments.length?(i=+t,o):i},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:Cc(+e),l(),o):t},o}function Bc(t){return t.index}function Lc(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Ec(t){var e,n,r,i,a,o,s=Bc,l=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=Cc(30),h=1;function u(r){for(var i=0,s=t.length;i<h;++i)for(var l,c,u,f,d,p,g,m=0;m<s;++m)c=(l=t[m]).source,f=(u=l.target).x+u.vx-c.x-c.vx||Sc(o),d=u.y+u.vy-c.y-c.vy||Sc(o),f*=p=((p=Math.sqrt(f*f+d*d))-n[m])/p*r*e[m],d*=p,u.vx-=f*(g=a[m]),u.vy-=d*g,c.vx+=f*(g=1-g),c.vy+=d*g}function f(){if(r){var o,l,c=r.length,h=t.length,u=new Map(r.map((t,e)=>[s(t,e,r),t]));for(o=0,i=new Array(c);o<h;++o)(l=t[o]).index=o,"object"!=typeof l.source&&(l.source=Lc(u,l.source)),"object"!=typeof l.target&&(l.target=Lc(u,l.target)),i[l.source.index]=(i[l.source.index]||0)+1,i[l.target.index]=(i[l.target.index]||0)+1;for(o=0,a=new Array(h);o<h;++o)l=t[o],a[o]=i[l.source.index]/(i[l.source.index]+i[l.target.index]);e=new Array(h),d(),n=new Array(h),p()}}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+l(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),u.initialize=function(t,e){r=t,o=e,f()},u.links=function(e){return arguments.length?(t=e,f(),u):t},u.id=function(t){return arguments.length?(s=t,u):s},u.iterations=function(t){return arguments.length?(h=+t,u):h},u.strength=function(t){return arguments.length?(l="function"==typeof t?t:Cc(+t),d(),u):l},u.distance=function(t){return arguments.length?(c="function"==typeof t?t:Cc(+t),p(),u):c},u}kc.copy=function(){var t,e,n=new vc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=wc(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=wc(e));return n},kc.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return mc(this.cover(e,n),e,n,t)},kc.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),l=1/0,c=1/0,h=-1/0,u=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<l&&(l=r),r>h&&(h=r),i<c&&(c=i),i>u&&(u=i));if(l>h||c>u)return this;for(this.cover(l,c).cover(h,u),n=0;n<a;++n)mc(this,o[n],s[n],t[n]);return this},kc.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},kc.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},kc.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},kc.find=function(t,e,n){var r,i,a,o,s,l,c,h=this._x0,u=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new yc(g,h,u,f,d)),null==n?n=1/0:(h=t-n,u=e-n,f=t+n,d=e+n,n*=n);l=p.pop();)if(!(!(g=l.node)||(i=l.x0)>f||(a=l.y0)>d||(o=l.x1)<h||(s=l.y1)<u))if(g.length){var m=(i+o)/2,y=(a+s)/2;p.push(new yc(g[3],m,y,o,s),new yc(g[2],i,y,m,s),new yc(g[1],m,a,o,y),new yc(g[0],i,a,m,y)),(c=(e>=y)<<1|t>=m)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=l)}else{var b=t-+this._x.call(null,g.data),x=e-+this._y.call(null,g.data),_=b*b+x*x;if(_<n){var v=Math.sqrt(n=_);h=t-v,u=e-v,f=t+v,d=e+v,r=g.data}}return r},kc.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,l,c,h,u,f,d=this._root,p=this._x0,g=this._y0,m=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((c=a>=(s=(p+m)/2))?p=s:m=s,(h=o>=(l=(g+y)/2))?g=l:y=l,e=d,!(d=d[u=h<<1|c]))return this;if(!d.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[u]=i:delete e[u],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},kc.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},kc.root=function(){return this._root},kc.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},kc.visit=function(t){var e,n,r,i,a,o,s=[],l=this._root;for(l&&s.push(new yc(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&l.length){var c=(r+a)/2,h=(i+o)/2;(n=l[3])&&s.push(new yc(n,c,h,a,o)),(n=l[2])&&s.push(new yc(n,r,h,c,o)),(n=l[1])&&s.push(new yc(n,c,i,a,h)),(n=l[0])&&s.push(new yc(n,r,i,c,h))}return this},kc.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new yc(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,l=e.x1,c=e.y1,h=(o+l)/2,u=(s+c)/2;(a=i[0])&&n.push(new yc(a,o,s,h,u)),(a=i[1])&&n.push(new yc(a,h,s,l,u)),(a=i[2])&&n.push(new yc(a,o,u,h,c)),(a=i[3])&&n.push(new yc(a,h,u,l,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},kc.x=function(t){return arguments.length?(this._x=t,this):this._x},kc.y=function(t){return arguments.length?(this._y=t,this):this._y};const Fc=4294967296;function $c(t){return t.x}function Oc(t){return t.y}var Nc=Math.PI*(3-Math.sqrt(5));function Dc(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,l=ci(u),c=we("tick","end"),h=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Fc)/Fc}();function u(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(r){var l,c,h=t.length;void 0===r&&(r=1);for(var u=0;u<r;++u)for(n+=(a-n)*i,s.forEach(function(t){t(n)}),l=0;l<h;++l)null==(c=t[l]).fx?c.x+=c.vx*=o:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=o:(c.y=c.fy,c.vy=0);return e}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),a=n*Nc;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t,h),e}return null==t&&(t=[]),d(),e={tick:f,restart:function(){return l.restart(u),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),s.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},randomSource:function(t){return arguments.length?(h=t,s.forEach(p),e):h},force:function(t,n){return arguments.length>1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,l,c=0,h=t.length;for(null==r?r=1/0:r*=r,c=0;c<h;++c)(o=(i=e-(s=t[c]).x)*i+(a=n-s.y)*a)<r&&(l=s,r=o);return l},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}}function Ic(){var t,e,n,r,i,a=Cc(-30),o=1,s=1/0,l=.81;function c(n){var i,a=t.length,o=_c(t,$c,Oc).visitAfter(u);for(r=n,i=0;i<a;++i)e=t[i],o.visit(f)}function h(){if(t){var e,n,r=t.length;for(i=new Array(r),e=0;e<r;++e)n=t[e],i[n.index]=+a(n,e,t)}}function u(t){var e,n,r,a,o,s=0,l=0;if(t.length){for(r=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,l+=n,r+=n*e.x,a+=n*e.y);t.x=r/l,t.y=a/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function f(t,a,c,h){if(!t.value)return!0;var u=t.x-e.x,f=t.y-e.y,d=h-a,p=u*u+f*f;if(d*d/l<p)return p<s&&(0===u&&(p+=(u=Sc(n))*u),0===f&&(p+=(f=Sc(n))*f),p<o&&(p=Math.sqrt(o*p)),e.vx+=u*t.value*r/p,e.vy+=f*t.value*r/p),!0;if(!(t.length||p>=s)){(t.data!==e||t.next)&&(0===u&&(p+=(u=Sc(n))*u),0===f&&(p+=(f=Sc(n))*f),p<o&&(p=Math.sqrt(o*p)));do{t.data!==e&&(d=i[t.data.index]*r/p,e.vx+=u*d,e.vy+=f*d)}while(t=t.next)}}return c.initialize=function(e,r){t=e,n=r,h()},c.strength=function(t){return arguments.length?(a="function"==typeof t?t:Cc(+t),h(),c):a},c.distanceMin=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.distanceMax=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c.theta=function(t){return arguments.length?(l=t*t,c):Math.sqrt(l)},c}function zc(t,e,n){var r,i,a,o=Cc(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var l=r[o],c=l.x-e||1e-6,h=l.y-n||1e-6,u=Math.sqrt(c*c+h*h),f=(a[o]-u)*i[o]*t/u;l.vx+=c*f,l.vy+=h*f}}function l(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=Cc(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,l()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:Cc(+t),l(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:Cc(+e),l(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s}function Pc(t){var e,n,r,i=Cc(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Cc(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Cc(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:Cc(+e),o(),a):t},a}function Rc(t){var e,n,r,i=Cc(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Cc(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Cc(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Cc(+e),o(),a):t},a}function qc(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function jc(t){return(t=qc(Math.abs(t)))?t[1]:NaN}var Wc,Hc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Uc(t){if(!(e=Hc.exec(t)))throw new Error("invalid format: "+t);var e;return new Yc({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]})}function Yc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Gc(t,e){var n=qc(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Uc.prototype=Yc.prototype,Yc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Vc={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},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)=>Gc(100*t,e),r:Gc,s:function(t,e){var n=qc(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Wc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+qc(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Xc(t){return t}var Zc,Qc,Kc,Jc=Array.prototype.map,th=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function eh(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Xc:(e=Jc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Xc:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Jc.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Uc(t)).fill,n=t.align,u=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,b=t.type;"n"===b?(g=!0,b="g"):Vc[b]||(void 0===m&&(m=12),y=!0,b="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===f?i:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",_="$"===f?a:/[%p]/.test(b)?l:"",v=Vc[b],w=/[defgprs%]/.test(b);function k(t){var i,a,l,f=x,k=_;if("c"===b)k=v(t)+k,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:v(Math.abs(t),m),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),C&&0===+t&&"+"!==u&&(C=!1),f=(C?"("===u?u:c:"-"===u||"("===u?"":u)+f,k=("s"===b?th[8+Wc/3]:"")+k+(C&&"("===u?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(l=t.charCodeAt(i))||l>57){k=(46===l?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var S=f.length+t.length+k.length,T=S<p?new Array(p-S+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-k.length:1/0),T=""),n){case"<":t=f+t+k+T;break;case"=":t=f+T+t+k;break;case"^":t=T.slice(0,S=T.length>>1)+f+t+k+T.slice(S);break;default:t=T+f+t+k}return s(t)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return t+""},k}return{format:u,formatPrefix:function(t,e){var n=u(((t=Uc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(jc(e)/3))),i=Math.pow(10,-r),a=th[8+r/3];return function(t){return n(i*t)+a}}}}function nh(t){return Zc=eh(t),Qc=Zc.format,Kc=Zc.formatPrefix,Zc}function rh(t){return Math.max(0,-jc(Math.abs(t)))}function ih(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(jc(e)/3)))-jc(Math.abs(t)))}function ah(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,jc(e)-jc(t))+1}nh({thousands:",",grouping:[3],currency:["$",""]});var oh=1e-6,sh=1e-12,lh=Math.PI,ch=lh/2,hh=lh/4,uh=2*lh,fh=180/lh,dh=lh/180,ph=Math.abs,gh=Math.atan,mh=Math.atan2,yh=Math.cos,bh=Math.ceil,xh=Math.exp,_h=(Math.floor,Math.hypot),vh=Math.log,wh=Math.pow,kh=Math.sin,Ch=Math.sign||function(t){return t>0?1:t<0?-1:0},Sh=Math.sqrt,Th=Math.tan;function Mh(t){return t>1?0:t<-1?lh:Math.acos(t)}function Ah(t){return t>1?ch:t<-1?-ch:Math.asin(t)}function Bh(t){return(t=kh(t/2))*t}function Lh(){}function Eh(t,e){t&&$h.hasOwnProperty(t.type)&&$h[t.type](t,e)}var Fh={Feature:function(t,e){Eh(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Eh(n[r].geometry,e)}},$h={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Oh(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Oh(n[r],e,0)},Polygon:function(t,e){Nh(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Nh(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Eh(n[r],e)}};function Oh(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Nh(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Oh(t[n],e,1);e.polygonEnd()}function Dh(t,e){t&&Fh.hasOwnProperty(t.type)?Fh[t.type](t,e):Eh(t,e)}var Ih,zh,Ph,Rh,qh,jh,Wh,Hh,Uh,Yh,Gh,Vh,Xh,Zh,Qh,Kh,Jh=new B,tu=new B,eu={point:Lh,lineStart:Lh,lineEnd:Lh,polygonStart:function(){Jh=new B,eu.lineStart=nu,eu.lineEnd=ru},polygonEnd:function(){var t=+Jh;tu.add(t<0?uh+t:t),this.lineStart=this.lineEnd=this.point=Lh},sphere:function(){tu.add(uh)}};function nu(){eu.point=iu}function ru(){au(Ih,zh)}function iu(t,e){eu.point=au,Ih=t,zh=e,Ph=t*=dh,Rh=yh(e=(e*=dh)/2+hh),qh=kh(e)}function au(t,e){var n=(t*=dh)-Ph,r=n>=0?1:-1,i=r*n,a=yh(e=(e*=dh)/2+hh),o=kh(e),s=qh*o,l=Rh*a+s*yh(i),c=s*r*kh(i);Jh.add(mh(c,l)),Ph=t,Rh=a,qh=o}function ou(t){return tu=new B,Dh(t,eu),2*tu}function su(t){return[mh(t[1],t[0]),Ah(t[2])]}function lu(t){var e=t[0],n=t[1],r=yh(n);return[r*yh(e),r*kh(e),kh(n)]}function cu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function hu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function uu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function fu(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function du(t){var e=Sh(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var pu,gu,mu,yu,bu,xu,_u,vu,wu,ku,Cu,Su,Tu,Mu,Au,Bu,Lu={point:Eu,lineStart:$u,lineEnd:Ou,polygonStart:function(){Lu.point=Nu,Lu.lineStart=Du,Lu.lineEnd=Iu,Zh=new B,eu.polygonStart()},polygonEnd:function(){eu.polygonEnd(),Lu.point=Eu,Lu.lineStart=$u,Lu.lineEnd=Ou,Jh<0?(jh=-(Hh=180),Wh=-(Uh=90)):Zh>oh?Uh=90:Zh<-1e-6&&(Wh=-90),Kh[0]=jh,Kh[1]=Hh},sphere:function(){jh=-(Hh=180),Wh=-(Uh=90)}};function Eu(t,e){Qh.push(Kh=[jh=t,Hh=t]),e<Wh&&(Wh=e),e>Uh&&(Uh=e)}function Fu(t,e){var n=lu([t*dh,e*dh]);if(Xh){var r=hu(Xh,n),i=hu([r[1],-r[0],0],r);du(i),i=su(i);var a,o=t-Yh,s=o>0?1:-1,l=i[0]*fh*s,c=ph(o)>180;c^(s*Yh<l&&l<s*t)?(a=i[1]*fh)>Uh&&(Uh=a):c^(s*Yh<(l=(l+360)%360-180)&&l<s*t)?(a=-i[1]*fh)<Wh&&(Wh=a):(e<Wh&&(Wh=e),e>Uh&&(Uh=e)),c?t<Yh?zu(jh,t)>zu(jh,Hh)&&(Hh=t):zu(t,Hh)>zu(jh,Hh)&&(jh=t):Hh>=jh?(t<jh&&(jh=t),t>Hh&&(Hh=t)):t>Yh?zu(jh,t)>zu(jh,Hh)&&(Hh=t):zu(t,Hh)>zu(jh,Hh)&&(jh=t)}else Qh.push(Kh=[jh=t,Hh=t]);e<Wh&&(Wh=e),e>Uh&&(Uh=e),Xh=n,Yh=t}function $u(){Lu.point=Fu}function Ou(){Kh[0]=jh,Kh[1]=Hh,Lu.point=Eu,Xh=null}function Nu(t,e){if(Xh){var n=t-Yh;Zh.add(ph(n)>180?n+(n>0?360:-360):n)}else Gh=t,Vh=e;eu.point(t,e),Fu(t,e)}function Du(){eu.lineStart()}function Iu(){Nu(Gh,Vh),eu.lineEnd(),ph(Zh)>oh&&(jh=-(Hh=180)),Kh[0]=jh,Kh[1]=Hh,Xh=null}function zu(t,e){return(e-=t)<0?e+360:e}function Pu(t,e){return t[0]-e[0]}function Ru(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function qu(t){var e,n,r,i,a,o,s;if(Uh=Hh=-(jh=Wh=1/0),Qh=[],Dh(t,Lu),n=Qh.length){for(Qh.sort(Pu),e=1,a=[r=Qh[0]];e<n;++e)Ru(r,(i=Qh[e])[0])||Ru(r,i[1])?(zu(r[0],i[1])>zu(r[0],r[1])&&(r[1]=i[1]),zu(i[0],r[1])>zu(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=zu(r[1],i[0]))>o&&(o=s,jh=i[0],Hh=r[1])}return Qh=Kh=null,jh===1/0||Wh===1/0?[[NaN,NaN],[NaN,NaN]]:[[jh,Wh],[Hh,Uh]]}var ju={sphere:Lh,point:Wu,lineStart:Uu,lineEnd:Vu,polygonStart:function(){ju.lineStart=Xu,ju.lineEnd=Zu},polygonEnd:function(){ju.lineStart=Uu,ju.lineEnd=Vu}};function Wu(t,e){t*=dh;var n=yh(e*=dh);Hu(n*yh(t),n*kh(t),kh(e))}function Hu(t,e,n){++pu,mu+=(t-mu)/pu,yu+=(e-yu)/pu,bu+=(n-bu)/pu}function Uu(){ju.point=Yu}function Yu(t,e){t*=dh;var n=yh(e*=dh);Mu=n*yh(t),Au=n*kh(t),Bu=kh(e),ju.point=Gu,Hu(Mu,Au,Bu)}function Gu(t,e){t*=dh;var n=yh(e*=dh),r=n*yh(t),i=n*kh(t),a=kh(e),o=mh(Sh((o=Au*a-Bu*i)*o+(o=Bu*r-Mu*a)*o+(o=Mu*i-Au*r)*o),Mu*r+Au*i+Bu*a);gu+=o,xu+=o*(Mu+(Mu=r)),_u+=o*(Au+(Au=i)),vu+=o*(Bu+(Bu=a)),Hu(Mu,Au,Bu)}function Vu(){ju.point=Wu}function Xu(){ju.point=Qu}function Zu(){Ku(Su,Tu),ju.point=Wu}function Qu(t,e){Su=t,Tu=e,t*=dh,e*=dh,ju.point=Ku;var n=yh(e);Mu=n*yh(t),Au=n*kh(t),Bu=kh(e),Hu(Mu,Au,Bu)}function Ku(t,e){t*=dh;var n=yh(e*=dh),r=n*yh(t),i=n*kh(t),a=kh(e),o=Au*a-Bu*i,s=Bu*r-Mu*a,l=Mu*i-Au*r,c=_h(o,s,l),h=Ah(c),u=c&&-h/c;wu.add(u*o),ku.add(u*s),Cu.add(u*l),gu+=h,xu+=h*(Mu+(Mu=r)),_u+=h*(Au+(Au=i)),vu+=h*(Bu+(Bu=a)),Hu(Mu,Au,Bu)}function Ju(t){pu=gu=mu=yu=bu=xu=_u=vu=0,wu=new B,ku=new B,Cu=new B,Dh(t,ju);var e=+wu,n=+ku,r=+Cu,i=_h(e,n,r);return i<sh&&(e=xu,n=_u,r=vu,gu<oh&&(e=mu,n=yu,r=bu),(i=_h(e,n,r))<sh)?[NaN,NaN]:[mh(n,e)*fh,Ah(r/i)*fh]}function tf(t){return function(){return t}}function ef(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function nf(t,e){return ph(t)>lh&&(t-=Math.round(t/uh)*uh),[t,e]}function rf(t,e,n){return(t%=uh)?e||n?ef(of(t),sf(e,n)):of(t):e||n?sf(e,n):nf}function af(t){return function(e,n){return ph(e+=t)>lh&&(e-=Math.round(e/uh)*uh),[e,n]}}function of(t){var e=af(t);return e.invert=af(-t),e}function sf(t,e){var n=yh(t),r=kh(t),i=yh(e),a=kh(e);function o(t,e){var o=yh(e),s=yh(t)*o,l=kh(t)*o,c=kh(e),h=c*n+s*r;return[mh(l*i-h*a,s*n-c*r),Ah(h*i+l*a)]}return o.invert=function(t,e){var o=yh(e),s=yh(t)*o,l=kh(t)*o,c=kh(e),h=c*i-l*a;return[mh(l*i+c*a,s*n+h*r),Ah(h*n-s*r)]},o}function lf(t){function e(e){return(e=t(e[0]*dh,e[1]*dh))[0]*=fh,e[1]*=fh,e}return t=rf(t[0]*dh,t[1]*dh,t.length>2?t[2]*dh:0),e.invert=function(e){return(e=t.invert(e[0]*dh,e[1]*dh))[0]*=fh,e[1]*=fh,e},e}function cf(t,e,n,r,i,a){if(n){var o=yh(e),s=kh(e),l=r*n;null==i?(i=e+r*uh,a=e-l/2):(i=hf(o,i),a=hf(o,a),(r>0?i<a:i>a)&&(i+=r*uh));for(var c,h=i;r>0?h>a:h<a;h-=l)c=su([o,-s*yh(h),-s*kh(h)]),t.point(c[0],c[1])}}function hf(t,e){(e=lu(e))[0]-=t,du(e);var n=Mh(-e[1]);return((-e[2]<0?-n:n)+uh-oh)%uh}function uf(){var t,e,n=tf([0,0]),r=tf(90),i=tf(2),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=fh,n[1]*=fh}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*dh,l=i.apply(this,arguments)*dh;return t=[],e=rf(-o[0]*dh,-o[1]*dh,0).invert,cf(a,s,l,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:tf([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:tf(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:tf(+t),o):i},o}function ff(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Lh,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function df(t,e){return ph(t[0]-e[0])<oh&&ph(t[1]-e[1])<oh}function pf(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function gf(t,e,n,r,i){var a,o,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(df(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new pf(r,t,null,!0)),l.push(n.o=new pf(r,null,n,!1)),s.push(n=new pf(o,t,null,!1)),l.push(n.o=new pf(o,null,n,!0))}}),s.length){for(l.sort(e),mf(s),mf(l),a=0,o=l.length;a<o;++a)l[a].e=n=!n;for(var c,h,u=s[0];;){for(var f=u,d=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=c.length;a<o;++a)i.point((h=c[a])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(c=f.p.z,a=c.length-1;a>=0;--a)i.point((h=c[a])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}c=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function mf(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function yf(t){return ph(t[0])<=lh?t[0]:Ch(t[0])*((ph(t[0])+lh)%uh-lh)}function bf(t,e){var n=yf(e),r=e[1],i=kh(r),a=[kh(n),-yh(n),0],o=0,s=0,l=new B;1===i?r=ch+oh:-1===i&&(r=-ch-oh);for(var c=0,h=t.length;c<h;++c)if(f=(u=t[c]).length)for(var u,f,d=u[f-1],p=yf(d),g=d[1]/2+hh,m=kh(g),y=yh(g),b=0;b<f;++b,p=_,m=w,y=k,d=x){var x=u[b],_=yf(x),v=x[1]/2+hh,w=kh(v),k=yh(v),C=_-p,S=C>=0?1:-1,T=S*C,M=T>lh,A=m*w;if(l.add(mh(A*S*kh(T),y*k+A*yh(T))),o+=M?C+S*uh:C,M^p>=n^_>=n){var L=hu(lu(d),lu(x));du(L);var E=hu(a,L);du(E);var F=(M^C>=0?-1:1)*Ah(E[2]);(r>F||r===F&&(L[0]||L[1]))&&(s+=M^C>=0?1:-1)}}return(o<-1e-6||o<oh&&l<-1e-12)^1&s}function xf(t,e,n,r){return function(i){var a,o,s,l=e(i),c=ff(),h=e(c),u=!1,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=b,f.lineEnd=x,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,o=Bt(o);var t=bf(a,r);o.length?(u||(i.polygonStart(),u=!0),gf(o,vf,t,n,i)):t&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){l.point(t,e)}function g(){f.point=p,l.lineStart()}function m(){f.point=d,l.lineEnd()}function y(t,e){s.push([t,e]),h.point(t,e)}function b(){h.lineStart(),s=[]}function x(){y(s[0][0],s[0][1]),h.lineEnd();var t,e,n,r,l=h.clean(),f=c.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&l){if((e=(n=f[0]).length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&l&&f.push(f.pop().concat(f.shift())),o.push(f.filter(_f))}return f}}function _f(t){return t.length>1}function vf(t,e){return((t=t.x)[0]<0?t[1]-ch-oh:ch-t[1])-((e=e.x)[0]<0?e[1]-ch-oh:ch-e[1])}nf.invert=nf;const wf=xf(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?lh:-lh,l=ph(a-n);ph(l-lh)<oh?(t.point(n,r=(r+o)/2>0?ch:-ch),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&l>=lh&&(ph(n-i)<oh&&(n-=i*oh),ph(a-s)<oh&&(a-=s*oh),r=function(t,e,n,r){var i,a,o=kh(t-n);return ph(o)>oh?gh((kh(e)*(a=yh(r))*kh(n)-kh(r)*(i=yh(e))*kh(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*ch,r.point(-lh,i),r.point(0,i),r.point(lh,i),r.point(lh,0),r.point(lh,-i),r.point(0,-i),r.point(-lh,-i),r.point(-lh,0),r.point(-lh,i);else if(ph(t[0]-e[0])>oh){var a=t[0]<e[0]?lh:-lh;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])},[-lh,-ch]);function kf(t){var e=yh(t),n=2*dh,r=e>0,i=ph(e)>oh;function a(t,n){return yh(t)*yh(n)>e}function o(t,n,r){var i=[1,0,0],a=hu(lu(t),lu(n)),o=cu(a,a),s=a[0],l=o-s*s;if(!l)return!r&&t;var c=e*o/l,h=-e*s/l,u=hu(i,a),f=fu(i,c);uu(f,fu(a,h));var d=u,p=cu(f,d),g=cu(d,d),m=p*p-g*(cu(f,f)-1);if(!(m<0)){var y=Sh(m),b=fu(d,(-p-y)/g);if(uu(b,f),b=su(b),!r)return b;var x,_=t[0],v=n[0],w=t[1],k=n[1];v<_&&(x=_,_=v,v=x);var C=v-_,S=ph(C-lh)<oh;if(!S&&k<w&&(x=w,w=k,k=x),S||C<oh?S?w+k>0^b[1]<(ph(b[0]-_)<oh?w:k):w<=b[1]&&b[1]<=k:C>lh^(_<=b[0]&&b[0]<=v)){var T=fu(d,(-p+y)/g);return uu(T,f),[b,su(T)]}}}function s(e,n){var i=r?t:lh-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return xf(a,function(t){var e,n,l,c,h;return{lineStart:function(){c=l=!1,h=1},point:function(u,f){var d,p=[u,f],g=a(u,f),m=r?g?0:s(u,f):g?s(u+(u<0?lh:-lh),f):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(!(d=o(e,p))||df(e,d)||df(p,d))&&(p[2]=1),g!==l)h=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var y;m&n||!(y=o(p,e,!0))||(h=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&df(e,p)||t.point(p[0],p[1]),e=p,l=g,n=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return h|(c&&l)<<1}}},function(e,r,i,a){cf(a,t,n,i,e,r)},r?[0,-t]:[-lh,t-lh])}var Cf,Sf,Tf,Mf,Af=1e9,Bf=-Af;function Lf(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,c){var h=0,u=0;if(null==i||(h=o(i,s))!==(u=o(a,s))||l(i,a)<0^s>0)do{c.point(0===h||3===h?t:n,h>1?r:e)}while((h=(h+s+4)%4)!==u);else c.point(a[0],a[1])}function o(r,i){return ph(r[0]-t)<oh?i>0?0:3:ph(r[0]-n)<oh?i>0?2:1:ph(r[1]-e)<oh?i>0?1:0:i>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,h,u,f,d,p,g,m,y,b,x=o,_=ff(),v={point:w,lineStart:function(){v.point=k,c&&c.push(h=[]),y=!0,m=!1,p=g=NaN},lineEnd:function(){l&&(k(u,f),d&&m&&_.rejoin(),l.push(_.result())),v.point=w,m&&x.lineEnd()},polygonStart:function(){x=_,l=[],c=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var a,o,s=c[n],l=1,h=s.length,u=s[0],f=u[0],d=u[1];l<h;++l)a=f,o=d,f=(u=s[l])[0],d=u[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=b&&e,i=(l=Bt(l)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&gf(l,s,e,a,o),o.polygonEnd()),x=o,l=c=h=null}};function w(t,e){i(t,e)&&x.point(t,e)}function k(a,o){var s=i(a,o);if(c&&h.push([a,o]),y)u=a,f=o,d=s,y=!1,s&&(x.lineStart(),x.point(a,o));else if(s&&m)x.point(a,o);else{var l=[p=Math.max(Bf,Math.min(Af,p)),g=Math.max(Bf,Math.min(Af,g))],_=[a=Math.max(Bf,Math.min(Af,a)),o=Math.max(Bf,Math.min(Af,o))];!function(t,e,n,r,i,a){var o,s=t[0],l=t[1],c=0,h=1,u=e[0]-s,f=e[1]-l;if(o=n-s,u||!(o>0)){if(o/=u,u<0){if(o<c)return;o<h&&(h=o)}else if(u>0){if(o>h)return;o>c&&(c=o)}if(o=i-s,u||!(o<0)){if(o/=u,u<0){if(o>h)return;o>c&&(c=o)}else if(u>0){if(o<c)return;o<h&&(h=o)}if(o=r-l,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<h&&(h=o)}else if(f>0){if(o>h)return;o>c&&(c=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<h&&(h=o)}return c>0&&(t[0]=s+c*u,t[1]=l+c*f),h<1&&(e[0]=s+h*u,e[1]=l+h*f),!0}}}}}(l,_,t,e,n,r)?s&&(x.lineStart(),x.point(a,o),b=!1):(m||(x.lineStart(),x.point(l[0],l[1])),x.point(_[0],_[1]),s||x.lineEnd(),b=!1)}p=a,g=o,m=s}return v}}function Ef(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Lf(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}}var Ff={sphere:Lh,point:Lh,lineStart:function(){Ff.point=Of,Ff.lineEnd=$f},lineEnd:Lh,polygonStart:Lh,polygonEnd:Lh};function $f(){Ff.point=Ff.lineEnd=Lh}function Of(t,e){Sf=t*=dh,Tf=kh(e*=dh),Mf=yh(e),Ff.point=Nf}function Nf(t,e){t*=dh;var n=kh(e*=dh),r=yh(e),i=ph(t-Sf),a=yh(i),o=r*kh(i),s=Mf*n-Tf*r*a,l=Tf*n+Mf*r*a;Cf.add(mh(Sh(o*o+s*s),l)),Sf=t,Tf=n,Mf=r}function Df(t){return Cf=new B,Dh(t,Ff),+Cf}var If=[null,null],zf={type:"LineString",coordinates:If};function Pf(t,e){return If[0]=t,If[1]=e,Df(zf)}var Rf={Feature:function(t,e){return jf(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(jf(n[r].geometry,e))return!0;return!1}},qf={Sphere:function(){return!0},Point:function(t,e){return Wf(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Wf(n[r],e))return!0;return!1},LineString:function(t,e){return Hf(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Hf(n[r],e))return!0;return!1},Polygon:function(t,e){return Uf(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Uf(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(jf(n[r],e))return!0;return!1}};function jf(t,e){return!(!t||!qf.hasOwnProperty(t.type))&&qf[t.type](t,e)}function Wf(t,e){return 0===Pf(t,e)}function Hf(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=Pf(t[a],e)))return!0;if(a>0&&(i=Pf(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<sh*i)return!0;n=r}return!1}function Uf(t,e){return!!bf(t.map(Yf),Gf(e))}function Yf(t){return(t=t.map(Gf)).pop(),t}function Gf(t){return[t[0]*dh,t[1]*dh]}function Vf(t,e){return(t&&Rf.hasOwnProperty(t.type)?Rf[t.type]:jf)(t,e)}function Xf(t,e,n){var r=$t(t,e-oh,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function Zf(t,e,n){var r=$t(t,e-oh,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function Qf(){var t,e,n,r,i,a,o,s,l,c,h,u,f=10,d=f,p=90,g=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return $t(bh(r/p)*p,n,p).map(h).concat($t(bh(s/g)*g,o,g).map(u)).concat($t(bh(e/f)*f,t,f).filter(function(t){return ph(t%p)>oh}).map(l)).concat($t(bh(a/d)*d,i,d).filter(function(t){return ph(t%g)>oh}).map(c))}return y.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(u(o).slice(1),h(n).reverse().slice(1),u(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),y.precision(m)):[[r,s],[n,o]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),y.precision(m)):[[e,a],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],y):[p,g]},y.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],y):[f,d]},y.precision=function(f){return arguments.length?(m=+f,l=Xf(a,i,90),c=Zf(e,t,m),h=Xf(s,o,90),u=Zf(r,n,m),y):m},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Kf(){return Qf()()}function Jf(t,e){var n=t[0]*dh,r=t[1]*dh,i=e[0]*dh,a=e[1]*dh,o=yh(r),s=kh(r),l=yh(a),c=kh(a),h=o*yh(n),u=o*kh(n),f=l*yh(i),d=l*kh(i),p=2*Ah(Sh(Bh(a-r)+o*l*Bh(i-n))),g=kh(p),m=p?function(t){var e=kh(t*=p)/g,n=kh(p-t)/g,r=n*h+e*f,i=n*u+e*d,a=n*s+e*c;return[mh(i,r)*fh,mh(a,Sh(r*r+i*i))*fh]}:function(){return[n*fh,r*fh]};return m.distance=p,m}const td=t=>t;var ed,nd,rd,id,ad=new B,od=new B,sd={point:Lh,lineStart:Lh,lineEnd:Lh,polygonStart:function(){sd.lineStart=ld,sd.lineEnd=ud},polygonEnd:function(){sd.lineStart=sd.lineEnd=sd.point=Lh,ad.add(ph(od)),od=new B},result:function(){var t=ad/2;return ad=new B,t}};function ld(){sd.point=cd}function cd(t,e){sd.point=hd,ed=rd=t,nd=id=e}function hd(t,e){od.add(id*t-rd*e),rd=t,id=e}function ud(){hd(ed,nd)}const fd=sd;var dd=1/0,pd=dd,gd=-dd,md=gd,yd={point:function(t,e){t<dd&&(dd=t),t>gd&&(gd=t),e<pd&&(pd=e),e>md&&(md=e)},lineStart:Lh,lineEnd:Lh,polygonStart:Lh,polygonEnd:Lh,result:function(){var t=[[dd,pd],[gd,md]];return gd=md=-(pd=dd=1/0),t}};const bd=yd;var xd,_d,vd,wd,kd=0,Cd=0,Sd=0,Td=0,Md=0,Ad=0,Bd=0,Ld=0,Ed=0,Fd={point:$d,lineStart:Od,lineEnd:Id,polygonStart:function(){Fd.lineStart=zd,Fd.lineEnd=Pd},polygonEnd:function(){Fd.point=$d,Fd.lineStart=Od,Fd.lineEnd=Id},result:function(){var t=Ed?[Bd/Ed,Ld/Ed]:Ad?[Td/Ad,Md/Ad]:Sd?[kd/Sd,Cd/Sd]:[NaN,NaN];return kd=Cd=Sd=Td=Md=Ad=Bd=Ld=Ed=0,t}};function $d(t,e){kd+=t,Cd+=e,++Sd}function Od(){Fd.point=Nd}function Nd(t,e){Fd.point=Dd,$d(vd=t,wd=e)}function Dd(t,e){var n=t-vd,r=e-wd,i=Sh(n*n+r*r);Td+=i*(vd+t)/2,Md+=i*(wd+e)/2,Ad+=i,$d(vd=t,wd=e)}function Id(){Fd.point=$d}function zd(){Fd.point=Rd}function Pd(){qd(xd,_d)}function Rd(t,e){Fd.point=qd,$d(xd=vd=t,_d=wd=e)}function qd(t,e){var n=t-vd,r=e-wd,i=Sh(n*n+r*r);Td+=i*(vd+t)/2,Md+=i*(wd+e)/2,Ad+=i,Bd+=(i=wd*t-vd*e)*(vd+t),Ld+=i*(wd+e),Ed+=3*i,$d(vd=t,wd=e)}const jd=Fd;function Wd(t){this._context=t}Wd.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,uh)}},result:Lh};var Hd,Ud,Yd,Gd,Vd,Xd=new B,Zd={point:Lh,lineStart:function(){Zd.point=Qd},lineEnd:function(){Hd&&Kd(Ud,Yd),Zd.point=Lh},polygonStart:function(){Hd=!0},polygonEnd:function(){Hd=null},result:function(){var t=+Xd;return Xd=new B,t}};function Qd(t,e){Zd.point=Kd,Ud=Gd=t,Yd=Vd=e}function Kd(t,e){Gd-=t,Vd-=e,Xd.add(Sh(Gd*Gd+Vd*Vd)),Gd=t,Vd=e}const Jd=Zd;let tp,ep,np,rp;class ip{constructor(t){this._append=null==t?ap:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ap;if(e!==tp){const t=10**e;tp=e,ep=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return ep}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==np||this._append!==ep){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,np=t,ep=this._append,rp=this._,this._=e}this._+=rp}}result(){const t=this._;return this._="",t.length?t:null}}function ap(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function op(t,e){let n,r,i=3,a=4.5;function o(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),Dh(t,n(r))),r.result()}return o.area=function(t){return Dh(t,n(fd)),fd.result()},o.measure=function(t){return Dh(t,n(Jd)),Jd.result()},o.bounds=function(t){return Dh(t,n(bd)),bd.result()},o.centroid=function(t){return Dh(t,n(jd)),jd.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,td):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new ip(i)):new Wd(e=t),"function"!=typeof a&&r.pointRadius(a),o):e},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),o):a},o.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new ip(i)),o},o.projection(t).digits(i).context(e)}function sp(t){return{stream:lp(t)}}function lp(t){return function(e){var n=new cp;for(var r in t)n[r]=t[r];return n.stream=e,n}}function cp(){}function hp(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Dh(n,t.stream(bd)),e(bd.result()),null!=r&&t.clipExtent(r),t}function up(t,e,n){return hp(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])},n)}function fp(t,e,n){return up(t,[[0,0],e],n)}function dp(t,e,n){return hp(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])},n)}function pp(t,e,n){return hp(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])},n)}cp.prototype={constructor:cp,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var gp=yh(30*dh);function mp(t,e){return+e?function(t,e){function n(r,i,a,o,s,l,c,h,u,f,d,p,g,m){var y=c-r,b=h-i,x=y*y+b*b;if(x>4*e&&g--){var _=o+f,v=s+d,w=l+p,k=Sh(_*_+v*v+w*w),C=Ah(w/=k),S=ph(ph(w)-1)<oh||ph(a-u)<oh?(a+u)/2:mh(v,_),T=t(S,C),M=T[0],A=T[1],B=M-r,L=A-i,E=b*B-y*L;(E*E/x>e||ph((y*B+b*L)/x-.5)>.3||o*f+s*d+l*p<gp)&&(n(r,i,a,o,s,l,M,A,S,_/=k,v/=k,w,g,m),m.point(M,A),n(M,A,S,_,v,w,c,h,u,f,d,p,g,m))}}return function(e){var r,i,a,o,s,l,c,h,u,f,d,p,g={point:m,lineStart:y,lineEnd:x,polygonStart:function(){e.polygonStart(),g.lineStart=_},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function m(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){h=NaN,g.point=b,e.lineStart()}function b(r,i){var a=lu([r,i]),o=t(r,i);n(h,u,c,f,d,p,h=o[0],u=o[1],c=r,f=a[0],d=a[1],p=a[2],16,e),e.point(h,u)}function x(){g.point=m,e.lineEnd()}function _(){y(),g.point=v,g.lineEnd=w}function v(t,e){b(r=t,e),i=h,a=u,o=f,s=d,l=p,g.point=b}function w(){n(h,u,c,f,d,p,i,a,r,o,s,l,16,e),g.lineEnd=x,x()}return g}}(t,e):function(t){return lp({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var yp=lp({point:function(t,e){this.stream.point(t*dh,e*dh)}});function bp(t,e,n,r,i,a){if(!a)return function(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}(t,e,n,r,i);var o=yh(a),s=kh(a),l=o*t,c=s*t,h=o/t,u=s/t,f=(s*n-o*e)/t,d=(s*e+o*n)/t;function p(t,a){return[l*(t*=r)-c*(a*=i)+e,n-c*t-l*a]}return p.invert=function(t,e){return[r*(h*t-u*e+f),i*(d-u*t-h*e)]},p}function xp(t){return _p(function(){return t})()}function _p(t){var e,n,r,i,a,o,s,l,c,h,u=150,f=480,d=250,p=0,g=0,m=0,y=0,b=0,x=0,_=1,v=1,w=null,k=wf,C=null,S=td,T=.5;function M(t){return l(t[0]*dh,t[1]*dh)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*fh,t[1]*fh]}function B(){var t=bp(u,0,0,_,v,x).apply(null,e(p,g)),r=bp(u,f-t[0],d-t[1],_,v,x);return n=rf(m,y,b),s=ef(e,r),l=ef(n,s),o=mp(s,T),L()}function L(){return c=h=null,M}return M.stream=function(t){return c&&h===t?c:c=yp(function(t){return lp({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(o(S(h=t)))))},M.preclip=function(t){return arguments.length?(k=t,w=void 0,L()):k},M.postclip=function(t){return arguments.length?(S=t,C=r=i=a=null,L()):S},M.clipAngle=function(t){return arguments.length?(k=+t?kf(w=t*dh):(w=null,wf),L()):w*fh},M.clipExtent=function(t){return arguments.length?(S=null==t?(C=r=i=a=null,td):Lf(C=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),L()):null==C?null:[[C,r],[i,a]]},M.scale=function(t){return arguments.length?(u=+t,B()):u},M.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],B()):[f,d]},M.center=function(t){return arguments.length?(p=t[0]%360*dh,g=t[1]%360*dh,B()):[p*fh,g*fh]},M.rotate=function(t){return arguments.length?(m=t[0]%360*dh,y=t[1]%360*dh,b=t.length>2?t[2]%360*dh:0,B()):[m*fh,y*fh,b*fh]},M.angle=function(t){return arguments.length?(x=t%360*dh,B()):x*fh},M.reflectX=function(t){return arguments.length?(_=t?-1:1,B()):_<0},M.reflectY=function(t){return arguments.length?(v=t?-1:1,B()):v<0},M.precision=function(t){return arguments.length?(o=mp(s,T=t*t),L()):Sh(T)},M.fitExtent=function(t,e){return up(M,t,e)},M.fitSize=function(t,e){return fp(M,t,e)},M.fitWidth=function(t,e){return dp(M,t,e)},M.fitHeight=function(t,e){return pp(M,t,e)},function(){return e=t.apply(this,arguments),M.invert=e.invert&&A,B()}}function vp(t){var e=0,n=lh/3,r=_p(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*dh,n=t[1]*dh):[e*fh,n*fh]},i}function wp(t,e){var n=kh(t),r=(n+kh(e))/2;if(ph(r)<oh)return function(t){var e=yh(t);function n(t,n){return[t*e,kh(n)/e]}return n.invert=function(t,n){return[t/e,Ah(n*e)]},n}(t);var i=1+n*(2*r-n),a=Sh(i)/r;function o(t,e){var n=Sh(i-2*r*kh(e))/r;return[n*kh(t*=r),a-n*yh(t)]}return o.invert=function(t,e){var n=a-e,o=mh(t,ph(n))*Ch(n);return n*r<0&&(o-=lh*Ch(t)*Ch(n)),[o/r,Ah((i-(t*t+n*n)*r*r)/(2*r))]},o}function kp(){return vp(wp).scale(155.424).center([0,33.6442])}function Cp(){return kp().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Sp(){var t,e,n,r,i,a,o=Cp(),s=kp().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=kp().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){a=[t,e]}};function h(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function u(){return t=e=null,h}return h.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:o).invert(t)},h.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),l.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},h.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),l.precision(t),u()):o.precision()},h.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),l.scale(t),h.translate(o.translate())):o.scale()},h.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],h=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,h-.238*e],[a+.455*e,h+.238*e]]).stream(c),r=s.translate([a-.307*e,h+.201*e]).clipExtent([[a-.425*e+oh,h+.12*e+oh],[a-.214*e-oh,h+.234*e-oh]]).stream(c),i=l.translate([a-.205*e,h+.212*e]).clipExtent([[a-.214*e+oh,h+.166*e+oh],[a-.115*e-oh,h+.234*e-oh]]).stream(c),u()},h.fitExtent=function(t,e){return up(h,t,e)},h.fitSize=function(t,e){return fp(h,t,e)},h.fitWidth=function(t,e){return dp(h,t,e)},h.fitHeight=function(t,e){return pp(h,t,e)},h.scale(1070)}function Tp(t){return function(e,n){var r=yh(e),i=yh(n),a=t(r*i);return a===1/0?[2,0]:[a*i*kh(e),a*kh(n)]}}function Mp(t){return function(e,n){var r=Sh(e*e+n*n),i=t(r),a=kh(i),o=yh(i);return[mh(e*a,r*o),Ah(r&&n*a/r)]}}var Ap=Tp(function(t){return Sh(2/(1+t))});function Bp(){return xp(Ap).scale(124.75).clipAngle(179.999)}Ap.invert=Mp(function(t){return 2*Ah(t/2)});var Lp=Tp(function(t){return(t=Mh(t))&&t/kh(t)});function Ep(){return xp(Lp).scale(79.4188).clipAngle(179.999)}function Fp(t,e){return[t,vh(Th((ch+e)/2))]}function $p(){return Op(Fp).scale(961/uh)}function Op(t){var e,n,r,i=xp(t),a=i.center,o=i.scale,s=i.translate,l=i.clipExtent,c=null;function h(){var a=lh*o(),s=i(lf(i.rotate()).invert([0,0]));return l(null==c?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Fp?[[Math.max(s[0]-a,c),e],[Math.min(s[0]+a,n),r]]:[[c,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),h()):o()},i.translate=function(t){return arguments.length?(s(t),h()):s()},i.center=function(t){return arguments.length?(a(t),h()):a()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),h()):null==c?null:[[c,e],[n,r]]},h()}function Np(t){return Th((ch+t)/2)}function Dp(t,e){var n=yh(t),r=t===e?kh(t):vh(n/yh(e))/vh(Np(e)/Np(t)),i=n*wh(Np(t),r)/r;if(!r)return Fp;function a(t,e){i>0?e<-ch+oh&&(e=-ch+oh):e>ch-oh&&(e=ch-oh);var n=i/wh(Np(e),r);return[n*kh(r*t),i-n*yh(r*t)]}return a.invert=function(t,e){var n=i-e,a=Ch(r)*Sh(t*t+n*n),o=mh(t,ph(n))*Ch(n);return n*r<0&&(o-=lh*Ch(t)*Ch(n)),[o/r,2*gh(wh(i/a,1/r))-ch]},a}function Ip(){return vp(Dp).scale(109.5).parallels([30,30])}function zp(t,e){return[t,e]}function Pp(){return xp(zp).scale(152.63)}function Rp(t,e){var n=yh(t),r=t===e?kh(t):(n-yh(e))/(e-t),i=n/r+t;if(ph(r)<oh)return zp;function a(t,e){var n=i-e,a=r*t;return[n*kh(a),i-n*yh(a)]}return a.invert=function(t,e){var n=i-e,a=mh(t,ph(n))*Ch(n);return n*r<0&&(a-=lh*Ch(t)*Ch(n)),[a/r,i-Ch(r)*Sh(t*t+n*n)]},a}function qp(){return vp(Rp).scale(131.154).center([0,13.9389])}Lp.invert=Mp(function(t){return t}),Fp.invert=function(t,e){return[t,2*gh(xh(e))-ch]},zp.invert=zp;var jp=1.340264,Wp=-.081106,Hp=893e-6,Up=.003796,Yp=Sh(3)/2;function Gp(t,e){var n=Ah(Yp*kh(e)),r=n*n,i=r*r*r;return[t*yh(n)/(Yp*(jp+3*Wp*r+i*(7*Hp+9*Up*r))),n*(jp+Wp*r+i*(Hp+Up*r))]}function Vp(){return xp(Gp).scale(177.158)}function Xp(t,e){var n=yh(e),r=yh(t)*n;return[n*kh(t)/r,kh(e)/r]}function Zp(){return xp(Xp).scale(144.049).clipAngle(60)}function Qp(){var t,e,n,r,i,a,o,s=1,l=0,c=0,h=1,u=1,f=0,d=null,p=1,g=1,m=lp({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),y=td;function b(){return p=s*h,g=s*u,a=o=null,x}function x(n){var r=n[0]*p,i=n[1]*g;if(f){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+l,i+c]}return x.invert=function(n){var r=n[0]-l,i=n[1]-c;if(f){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/g]},x.stream=function(t){return a&&o===t?a:a=m(y(o=t))},x.postclip=function(t){return arguments.length?(y=t,d=n=r=i=null,b()):y},x.clipExtent=function(t){return arguments.length?(y=null==t?(d=n=r=i=null,td):Lf(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==d?null:[[d,n],[r,i]]},x.scale=function(t){return arguments.length?(s=+t,b()):s},x.translate=function(t){return arguments.length?(l=+t[0],c=+t[1],b()):[l,c]},x.angle=function(n){return arguments.length?(e=kh(f=n%360*dh),t=yh(f),b()):f*fh},x.reflectX=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.reflectY=function(t){return arguments.length?(u=t?-1:1,b()):u<0},x.fitExtent=function(t,e){return up(x,t,e)},x.fitSize=function(t,e){return fp(x,t,e)},x.fitWidth=function(t,e){return dp(x,t,e)},x.fitHeight=function(t,e){return pp(x,t,e)},x}function Kp(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function Jp(){return xp(Kp).scale(175.295)}function tg(t,e){return[yh(e)*kh(t),kh(e)]}function eg(){return xp(tg).scale(249.5).clipAngle(90.000001)}function ng(t,e){var n=yh(e),r=1+yh(t)*n;return[n*kh(t)/r,kh(e)/r]}function rg(){return xp(ng).scale(250).clipAngle(142)}function ig(t,e){return[vh(Th((ch+e)/2)),-t]}function ag(){var t=Op(ig),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function og(t,e){return t.parent===e.parent?1:2}function sg(t,e){return t+e.x}function lg(t,e){return Math.max(t,e.y)}function cg(){var t=og,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter(function(e){var n=e.children;n?(e.x=function(t){return t.reduce(sg,0)/t.length}(n),e.y=function(t){return 1+t.reduce(lg,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),l=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=s.x-t(s,l)/2,h=l.x+t(l,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(h-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function hg(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ug(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=dg)):void 0===e&&(e=fg);for(var n,r,i,a,o,s=new mg(t),l=[s];n=l.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)l.push(r=i[a]=new mg(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(gg)}function fg(t){return t.children}function dg(t){return Array.isArray(t)?t[1]:null}function pg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function gg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function mg(t){this.data=t,this.depth=this.height=0,this.parent=null}function yg(t){return null==t?null:bg(t)}function bg(t){if("function"!=typeof t)throw new Error;return t}function xg(){return 0}function _g(t){return function(){return t}}Gp.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(jp+Wp*i+a*(Hp+Up*i))-e)/(jp+3*Wp*i+a*(7*Hp+9*Up*i)))*r)*i*i,!(ph(n)<sh));++o);return[Yp*t*(jp+3*Wp*i+a*(7*Hp+9*Up*i))/yh(r),Ah(kh(r)/Yp)]},Xp.invert=Mp(gh),Kp.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(ph(n)>oh&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},tg.invert=Mp(Ah),ng.invert=Mp(function(t){return 2*gh(t)}),ig.invert=function(t,e){return[-e,2*gh(xh(t))-ch]},mg.prototype=ug.prototype={constructor:mg,count:function(){return this.eachAfter(hg)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i=this,a=[i],o=-1;i=a.pop();)if(t.call(e,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return ug(this).eachBefore(pg)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n])}while(a.length)}};const vg=4294967296;function wg(){let t=1;return()=>(t=(1664525*t+1013904223)%vg)/vg}function kg(t){return Cg(t,wg())}function Cg(t,e){for(var n,r,i=0,a=(t=function(t,e){let n,r,i=t.length;for(;i;)r=e()*i--|0,n=t[i],t[i]=t[r],t[r]=n;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Mg(r,n)?++i:(r=Bg(o=Sg(o,n)),i=0);return r}function Sg(t,e){var n,r;if(Ag(e,t))return[e];for(n=0;n<t.length;++n)if(Tg(e,t[n])&&Ag(Lg(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Tg(Lg(t[n],t[r]),e)&&Tg(Lg(t[n],e),t[r])&&Tg(Lg(t[r],e),t[n])&&Ag(Eg(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Tg(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Mg(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Ag(t,e){for(var n=0;n<e.length;++n)if(!Mg(t,e[n]))return!1;return!0}function Bg(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Lg(t[0],t[1]);case 3:return Eg(t[0],t[1],t[2])}var e}function Lg(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,l=a-n,c=o-r,h=s-i,u=Math.sqrt(l*l+c*c);return{x:(n+a+l/u*h)/2,y:(r+o+c/u*h)/2,r:(u+i+s)/2}}function Eg(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,l=e.r,c=n.x,h=n.y,u=n.r,f=r-o,d=r-c,p=i-s,g=i-h,m=l-a,y=u-a,b=r*r+i*i-a*a,x=b-o*o-s*s+l*l,_=b-c*c-h*h+u*u,v=d*p-f*g,w=(p*_-g*x)/(2*v)-r,k=(g*m-p*y)/v,C=(d*x-f*_)/(2*v)-i,S=(f*y-d*m)/v,T=k*k+S*S-1,M=2*(a+w*k+C*S),A=w*w+C*C-a*a,B=-(Math.abs(T)>1e-6?(M+Math.sqrt(M*M-4*T*A))/(2*T):A/M);return{x:r+w+k*B,y:i+C+S*B,r:B}}function Fg(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function $g(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Og(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Ng(t){this._=t,this.next=null,this.previous=null}function Dg(t,e){if(!(o=(n=t,t="object"==typeof n&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,h,u,f,d;if((r=t[0]).x=0,r.y=0,!(o>1))return r.r;if(i=t[1],r.x=-i.r,i.x=r.r,i.y=0,!(o>2))return r.r+i.r;Fg(i,r,a=t[2]),r=new Ng(r),i=new Ng(i),a=new Ng(a),r.next=a.previous=i,i.next=r.previous=a,a.next=i.previous=r;t:for(c=3;c<o;++c){Fg(r._,i._,a=t[c]),a=new Ng(a),h=i.next,u=r.previous,f=i._.r,d=r._.r;do{if(f<=d){if($g(h._,a._)){i=h,r.next=i,i.previous=r,--c;continue t}f+=h._.r,h=h.next}else{if($g(u._,a._)){(r=u).next=i,i.previous=r,--c;continue t}d+=u._.r,u=u.previous}}while(h!==u.next);for(a.previous=r,a.next=i,r.next=i.previous=i=a,s=Og(r);(a=a.next)!==i;)(l=Og(a))<s&&(r=a,s=l);i=r.next}for(r=[i._],a=i;(a=a.next)!==i;)r.push(a._);for(a=Cg(r,e),c=0;c<o;++c)(r=t[c]).x-=a.x,r.y-=a.y;return a.r}function Ig(t){return Dg(t,wg()),t}function zg(t){return Math.sqrt(t.value)}function Pg(){var t=null,e=1,n=1,r=xg;function i(i){const a=wg();return i.x=e/2,i.y=n/2,t?i.eachBefore(Rg(t)).eachAfter(qg(r,.5,a)).eachBefore(jg(1)):i.eachBefore(Rg(zg)).eachAfter(qg(xg,1,a)).eachAfter(qg(r,i.r/Math.min(e,n),a)).eachBefore(jg(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=yg(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:_g(+t),i):r},i}function Rg(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function qg(t,e,n){return function(r){if(i=r.children){var i,a,o,s=i.length,l=t(r)*e||0;if(l)for(a=0;a<s;++a)i[a].r+=l;if(o=Dg(i,n),l)for(a=0;a<s;++a)i[a].r-=l;r.r=o+l}}}function jg(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Wg(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Hg(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function Ug(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&Hg(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(Wg),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}var Yg={depth:-1},Gg={},Vg={};function Xg(t){return t.id}function Zg(t){return t.parentId}function Qg(){var t,e=Xg,n=Zg;function r(r){var i,a,o,s,l,c,h,u,f=Array.from(r),d=e,p=n,g=new Map;if(null!=t){const e=f.map((e,n)=>function(t){let e=(t=`${t}`).length;return Jg(t,e-1)&&!Jg(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(e,n,r))),n=e.map(Kg),i=new Set(e).add("");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(Kg(t)),f.push(Vg));d=(t,n)=>e[n],p=(t,e)=>n[e]}for(o=0,i=f.length;o<i;++o)a=f[o],c=f[o]=new mg(a),null!=(h=d(a,o,r))&&(h+="")&&(u=c.id=h,g.set(u,g.has(u)?Gg:c)),null!=(h=p(a,o,r))&&(h+="")&&(c.parent=h);for(o=0;o<i;++o)if(h=(c=f[o]).parent){if(!(l=g.get(h)))throw new Error("missing: "+h);if(l===Gg)throw new Error("ambiguous: "+h);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=t){for(;s.data===Vg&&1===s.children.length;)s=s.children[0],--i;for(let t=f.length-1;t>=0&&(c=f[t]).data===Vg;--t)c.data=null}if(s.parent=Yg,s.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(gg),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(t){return arguments.length?(e=yg(t),r):e},r.parentId=function(t){return arguments.length?(n=yg(t),r):n},r.path=function(e){return arguments.length?(t=yg(e),r):t},r}function Kg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Jg(t,e););return t.slice(0,e)}function Jg(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function tm(t,e){return t.parent===e.parent?1:2}function em(t){var e=t.children;return e?e[0]:t.t}function nm(t){var e=t.children;return e?e[e.length-1]:t.t}function rm(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function im(t,e,n){return t.a.parent===e.parent?t.a:n}function am(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function om(){var t=tm,e=1,n=1,r=null;function i(i){var l=function(t){for(var e,n,r,i,a,o=new am(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new am(r[i],i)),n.parent=e;return(o.parent=new am(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),r)i.eachBefore(s);else{var c=i,h=i,u=i;i.eachBefore(function(t){t.x<c.x&&(c=t),t.x>h.x&&(h=t),t.depth>u.depth&&(u=t)});var f=c===h?1:t(c,h)/2,d=f-c.x,p=e/(h.x+f+d),g=n/(u.depth||1);i.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*g})}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,l=a.parent.children[0],c=a.m,h=o.m,u=s.m,f=l.m;s=nm(s),a=em(a),s&&a;)l=em(l),(o=nm(o)).a=e,(i=s.z+u-a.z-c+t(s._,a._))>0&&(rm(im(s,e,r),e,i),c+=i,h+=i),u+=s.m,c+=a.m,f+=l.m,h+=o.m;s&&!nm(o)&&(o.t=s,o.m+=u-h),a&&!em(l)&&(l.t=a,l.m+=c-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function sm(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}am.prototype=Object.create(mg.prototype);var lm=(1+Math.sqrt(5))/2;function cm(t,e,n,r,i,a){for(var o,s,l,c,h,u,f,d,p,g,m,y=[],b=e.children,x=0,_=0,v=b.length,w=e.value;x<v;){l=i-n,c=a-r;do{h=b[_++].value}while(!h&&_<v);for(u=f=h,m=h*h*(g=Math.max(c/l,l/c)/(w*t)),p=Math.max(f/m,m/u);_<v;++_){if(h+=s=b[_].value,s<u&&(u=s),s>f&&(f=s),m=h*h*g,(d=Math.max(f/m,m/u))>p){h-=s;break}p=d}y.push(o={value:h,dice:l<c,children:b.slice(x,_)}),o.dice?Hg(o,n,r,i,w?r+=c*h/w:a):sm(o,n,r,w?n+=l*h/w:i,a),w-=h,x=_}return y}const hm=function t(e){function n(t,n,r,i,a){cm(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(lm);function um(){var t=hm,e=!1,n=1,r=1,i=[0],a=xg,o=xg,s=xg,l=xg,c=xg;function h(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(u),i=[0],e&&t.eachBefore(Wg),t}function u(e){var n=i[e.depth],r=e.x0+n,h=e.y0+n,u=e.x1-n,f=e.y1-n;u<r&&(r=u=(r+u)/2),f<h&&(h=f=(h+f)/2),e.x0=r,e.y0=h,e.x1=u,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=c(e)-n,h+=o(e)-n,(u-=s(e)-n)<r&&(r=u=(r+u)/2),(f-=l(e)-n)<h&&(h=f=(h+f)/2),t(e,r,h,u,f))}return h.round=function(t){return arguments.length?(e=!!t,h):e},h.size=function(t){return arguments.length?(n=+t[0],r=+t[1],h):[n,r]},h.tile=function(e){return arguments.length?(t=bg(e),h):t},h.padding=function(t){return arguments.length?h.paddingInner(t).paddingOuter(t):h.paddingInner()},h.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:_g(+t),h):a},h.paddingOuter=function(t){return arguments.length?h.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):h.paddingTop()},h.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:_g(+t),h):o},h.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:_g(+t),h):s},h.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:_g(+t),h):l},h.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:_g(+t),h):c},h}function fm(t,e,n,r,i){var a,o,s=t.children,l=s.length,c=new Array(l+1);for(c[0]=o=a=0;a<l;++a)c[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,l){if(e>=n-1){var h=s[e];return h.x0=i,h.y0=a,h.x1=o,void(h.y1=l)}for(var u=c[e],f=r/2+u,d=e+1,p=n-1;d<p;){var g=d+p>>>1;c[g]<f?d=g+1:p=g}f-c[d-1]<c[d]-f&&e+1<d&&--d;var m=c[d]-u,y=r-m;if(o-i>l-a){var b=r?(i*y+o*m)/r:o;t(e,d,m,i,a,b,l),t(d,n,y,b,a,o,l)}else{var x=r?(a*y+l*m)/r:l;t(e,d,m,i,a,o,x),t(d,n,y,i,x,o,l)}}(0,l,t.value,e,n,r,i)}function dm(t,e,n,r,i){(1&t.depth?sm:Hg)(t,e,n,r,i)}const pm=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,h,u=-1,f=o.length,d=t.value;++u<f;){for(l=(s=o[u]).children,c=s.value=0,h=l.length;c<h;++c)s.value+=l[c].value;s.dice?Hg(s,n,r,i,d?r+=(a-r)*s.value/d:a):sm(s,n,r,d?n+=(i-n)*s.value/d:i,a),d-=s.value}else t._squarify=o=cm(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(lm);function gm(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function mm(t,e){var n=Er(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function ym(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function bm(t){return((t=Math.exp(t))+1/t)/2}const xm=function t(e,n,r){function i(t,i){var a,o,s=t[0],l=t[1],c=t[2],h=i[0],u=i[1],f=i[2],d=h-s,p=u-l,g=d*d+p*p;if(g<1e-12)o=Math.log(f/c)/e,a=function(t){return[s+t*d,l+t*p,c*Math.exp(e*t*o)]};else{var m=Math.sqrt(g),y=(f*f-c*c+r*g)/(2*c*n*m),b=(f*f-c*c-r*g)/(2*f*n*m),x=Math.log(Math.sqrt(y*y+1)-y),_=Math.log(Math.sqrt(b*b+1)-b);o=(_-x)/e,a=function(t){var r,i=t*o,a=bm(x),h=c/(n*m)*(a*(r=e*i+x,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(x));return[s+h*d,l+h*p,c*a/bm(e*i+x)]}}return a.duration=1e3*o*e/Math.SQRT2,a}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function _m(t){return function(e,n){var r=t((e=vr(e)).h,(n=vr(n)).h),i=Fr(e.s,n.s),a=Fr(e.l,n.l),o=Fr(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const vm=_m(Er);var wm=_m(Fr);function km(t,e){var n=Fr((t=So(t)).l,(e=So(e)).l),r=Fr(t.a,e.a),i=Fr(t.b,e.b),a=Fr(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function Cm(t){return function(e,n){var r=t((e=$o(e)).h,(n=$o(n)).h),i=Fr(e.c,n.c),a=Fr(e.l,n.l),o=Fr(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Sm=Cm(Er);var Tm=Cm(Fr);function Mm(t){return function e(n){function r(e,r){var i=t((e=Ho(e)).h,(r=Ho(r)).h),a=Fr(e.s,r.s),o=Fr(e.l,r.l),s=Fr(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}const Am=Mm(Er);var Bm=Mm(Fr);function Lm(t,e){void 0===e&&(e=t,t=Gr);for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}function Em(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}function Fm(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2}function $m(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],l=0;++r<i;)e=s,s=t[r],l+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(l*=3),o/l]}function Om(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Nm(t,e){return t[0]-e[0]||t[1]-e[1]}function Dm(t){const e=t.length,n=[0,1];let r,i=2;for(r=2;r<e;++r){for(;i>1&&Om(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function Im(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Nm),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Dm(r),o=Dm(i),s=o[0]===a[0],l=o[o.length-1]===a[a.length-1],c=[];for(e=a.length-1;e>=0;--e)c.push(t[r[a[e]][2]]);for(e=+s;e<o.length-l;++e)c.push(t[r[o[e]][2]]);return c}function zm(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],l=a[0],c=a[1],h=!1,u=0;u<i;++u)n=(a=t[u])[0],(r=a[1])>s!=c>s&&o<(l-n)*(s-r)/(c-r)+n&&(h=!h),l=n,c=r;return h}function Pm(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],l=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],l+=Math.hypot(e,n);return l}const Rm=Math.random,qm=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Rm),jm=function t(e){function n(t,n){return arguments.length<2&&(n=t,t=0),t=Math.floor(t),n=Math.floor(n)-t,function(){return Math.floor(e()*n+t)}}return n.source=t,n}(Rm),Wm=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Rm),Hm=function t(e){var n=Wm.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Rm),Um=function t(e){function n(t){return(t=+t)<=0?()=>0:function(){for(var n=0,r=t;r>1;--r)n+=e();return n+r*e()}}return n.source=t,n}(Rm),Ym=function t(e){var n=Um.source(e);function r(t){if(0===(t=+t))return e;var r=n(t);return function(){return r()/t}}return r.source=t,r}(Rm),Gm=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(Rm),Vm=function t(e){function n(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-e(),t)}}return n.source=t,n}(Rm),Xm=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+t)}}return n.source=t,n}(Rm),Zm=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return n.source=t,n}(Rm),Qm=function t(e){var n=Wm.source(e)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-e())*r;var i=(t<1?t+1:t)-1/3,a=1/(3*Math.sqrt(i)),o=t<1?()=>Math.pow(e(),1/t):()=>1;return function(){do{do{var t=n(),s=1+a*t}while(s<=0);s*=s*s;var l=1-e()}while(l>=1-.0331*t*t*t*t&&Math.log(l)>=.5*t*t+i*(1-s+Math.log(s)));return i*s*o()*r}}return r.source=t,r}(Rm),Km=function t(e){var n=Qm.source(e);function r(t,e){var r=n(t),i=n(e);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(Rm),Jm=function t(e){var n=Zm.source(e),r=Km.source(e);function i(t,e){return t=+t,(e=+e)>=1?()=>t:e<=0?()=>0:function(){for(var i=0,a=t,o=e;a*o>16&&a*(1-o)>16;){var s=Math.floor((a+1)*o),l=r(s,a-s+1)();l<=o?(i+=s,a-=s,o=(o-l)/(1-l)):(a=s-1,o/=l)}for(var c=o<.5,h=n(c?o:1-o),u=h(),f=0;u<=a;++f)u+=h();return i+(c?f:a-f)}}return i.source=t,i}(Rm),ty=function t(e){function n(t,n,r){var i;return 0===(t=+t)?i=t=>-Math.log(t):(t=1/t,i=e=>Math.pow(e,t)),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-e()))}}return n.source=t,n}(Rm),ey=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){return t+n*Math.tan(Math.PI*e())}}return n.source=t,n}(Rm),ny=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){var r=e();return t+n*Math.log(r/(1-r))}}return n.source=t,n}(Rm),ry=function t(e){var n=Qm.source(e),r=Jm.source(e);function i(t){return function(){for(var i=0,a=t;a>16;){var o=Math.floor(.875*a),s=n(o)();if(s>a)return i+r(o-1,a/s)();i+=o,a-=s}for(var l=-Math.log1p(-e()),c=0;l<=a;++c)l-=Math.log1p(-e());return i+c}}return i.source=t,i}(Rm),iy=1/4294967296;function ay(t=Math.random()){let e=0|(0<=t&&t<1?t/iy:Math.abs(t));return()=>(e=1664525*e+1013904223|0,iy*(e>>>0))}function oy(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function sy(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const ly=Symbol("implicit");function cy(){var t=new F,e=[],n=[],r=ly;function i(i){let a=t.get(i);if(void 0===a){if(r!==ly)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new F;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return cy(e,n).unknown(r)},oy.apply(i,arguments),i}function hy(){var t,e,n=cy().unknown(void 0),r=n.domain,i=n.range,a=0,o=1,s=!1,l=0,c=0,h=.5;function u(){var n=r().length,u=o<a,f=u?o:a,d=u?a:o;t=(d-f)/Math.max(1,n-l+2*c),s&&(t=Math.floor(t)),f+=(d-f-t*(n-l))*h,e=t*(1-l),s&&(f=Math.round(f),e=Math.round(e));var p=$t(n).map(function(e){return f+t*e});return i(u?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),u()):r()},n.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,u()):[a,o]},n.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,s=!0,u()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,u()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),u()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),u()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},n.align=function(t){return arguments.length?(h=Math.max(0,Math.min(1,t)),u()):h},n.copy=function(){return hy(r(),[a,o]).round(s).paddingInner(l).paddingOuter(c).align(h)},oy.apply(u(),arguments)}function uy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return uy(e())},t}function fy(){return uy(hy.apply(null,arguments).paddingInner(1))}function dy(t){return+t}var py=[0,1];function gy(t){return t}function my(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function yy(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=my(i,r),a=n(o,a)):(r=my(r,i),a=n(a,o)),function(t){return a(r(t))}}function by(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=my(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=f(t,e,1,r)-1;return a[n](i[n](e))}}function xy(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function _y(){var t,e,n,r,i,a,o=py,s=py,l=Gr,c=gy;function h(){var t,e,n,l=Math.min(o.length,s.length);return c!==gy&&(t=o[0],e=o[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),r=l>2?by:yy,i=a=null,u}function u(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,l)))(t(c(e)))}return u.invert=function(n){return c(e((a||(a=r(s,o.map(t),jr)))(n)))},u.domain=function(t){return arguments.length?(o=Array.from(t,dy),h()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=ym,h()},u.clamp=function(t){return arguments.length?(c=!!t||gy,h()):c!==gy},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(n=t,u):n},function(n,r){return t=n,e=r,h()}}function vy(){return _y()(gy,gy)}function wy(t,e,n,r){var i,a=ht(t,e,n);switch((r=Uc(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ih(a,o))||(r.precision=i),Kc(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=ah(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=rh(a))||(r.precision=i-2*("%"===r.type))}return Qc(r)}function ky(t){var e=t.domain;return t.ticks=function(t){var n=e();return lt(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return wy(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,s=a.length-1,l=a[o],c=a[s],h=10;for(c<l&&(i=l,l=c,c=i,i=o,o=s,s=i);h-- >0;){if((i=ct(l,c,n))===r)return a[o]=l,a[s]=c,e(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function Cy(){var t=vy();return t.copy=function(){return xy(t,Cy())},oy.apply(t,arguments),ky(t)}function Sy(t){var e;function n(t){return null==t||isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,dy),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Sy(t).unknown(e)},t=arguments.length?Array.from(t,dy):[0,1],ky(n)}function Ty(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function My(t){return Math.log(t)}function Ay(t){return Math.exp(t)}function By(t){return-Math.log(-t)}function Ly(t){return-Math.exp(-t)}function Ey(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Fy(t){return(e,n)=>-t(-e,n)}function $y(t){const e=t(My,Ay),n=e.domain;let r,i,a=10;function o(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(a),i=function(t){return 10===t?Ey:t===Math.E?Math.exp:e=>Math.pow(t,e)}(a),n()[0]<0?(r=Fy(r),i=Fy(i),t(By,Ly)):t(My,Ay),e}return e.base=function(t){return arguments.length?(a=+t,o()):a},e.domain=function(t){return arguments.length?(n(t),o()):n()},e.ticks=t=>{const e=n();let o=e[0],s=e[e.length-1];const l=s<o;l&&([o,s]=[s,o]);let c,h,u=r(o),f=r(s);const d=null==t?10:+t;let p=[];if(!(a%1)&&f-u<d){if(u=Math.floor(u),f=Math.ceil(f),o>0){for(;u<=f;++u)for(c=1;c<a;++c)if(h=u<0?c/i(-u):c*i(u),!(h<o)){if(h>s)break;p.push(h)}}else for(;u<=f;++u)for(c=a-1;c>=1;--c)if(h=u>0?c/i(-u):c*i(u),!(h<o)){if(h>s)break;p.push(h)}2*p.length<d&&(p=lt(o,s,d))}else p=lt(u,f,Math.min(f-u,d)).map(i);return l?p.reverse():p},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===a?"s":","),"function"!=typeof n&&(a%1||null!=(n=Uc(n)).precision||(n.trim=!0),n=Qc(n)),t===1/0)return n;const o=Math.max(1,a*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*a<a-.5&&(e*=a),e<=o?n(t):""}},e.nice=()=>n(Ty(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function Oy(){const t=$y(_y()).domain([1,10]);return t.copy=()=>xy(t,Oy()).base(t.base()),oy.apply(t,arguments),t}function Ny(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Dy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Iy(t){var e=1,n=t(Ny(e),Dy(e));return n.constant=function(n){return arguments.length?t(Ny(e=+n),Dy(e)):e},ky(n)}function zy(){var t=Iy(_y());return t.copy=function(){return xy(t,zy()).constant(t.constant())},oy.apply(t,arguments)}function Py(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Ry(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function qy(t){return t<0?-t*t:t*t}function jy(t){var e=t(gy,gy),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(gy,gy):.5===n?t(Ry,qy):t(Py(n),Py(1/n)):n},ky(e)}function Wy(){var t=jy(_y());return t.copy=function(){return xy(t,Wy()).exponent(t.exponent())},oy.apply(t,arguments),t}function Hy(){return Wy.apply(null,arguments).exponent(.5)}function Uy(t){return Math.sign(t)*t*t}function Yy(){var t,e=vy(),n=[0,1],r=!1;function i(n){var i=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(n));return isNaN(i)?t:r?Math.round(i):i}return i.invert=function(t){return e.invert(Uy(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(t){return arguments.length?(e.range((n=Array.from(t,dy)).map(Uy)),i):n.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(r=!!t,i):r},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Yy(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},oy.apply(i,arguments),ky(i)}function Gy(){var t,e=[],n=[],i=[];function a(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=wt(e,t/r);return o}function o(e){return null==e||isNaN(e=+e)?t:n[f(i,e)]}return o.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(r),a()},o.range=function(t){return arguments.length?(n=Array.from(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return Gy().domain(e).range(n).unknown(t)},oy.apply(o,arguments)}function Vy(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return null!=e&&e<=e?a[f(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=Array.from(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Vy().domain([e,n]).range(a).unknown(t)},oy.apply(ky(o),arguments)}function Xy(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[f(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Xy().domain(e).range(n).unknown(t)},oy.apply(i,arguments)}const Zy=1e3,Qy=6e4,Ky=36e5,Jy=864e5,tb=6048e5,eb=31536e6,nb=new Date,rb=new Date;function ib(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const o=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return o;let s;do{o.push(s=new Date(+n)),e(n,a),t(n)}while(s<n&&n<r);return o},i.filter=n=>ib(e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},(t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}),n&&(i.count=(e,r)=>(nb.setTime(+e),rb.setTime(+r),t(nb),t(rb),Math.floor(n(nb,rb))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t===0:e=>i.count(0,e)%t===0):i:null)),i}const ab=ib(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ab.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?ib(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):ab:null);const ob=ab.range,sb=ib(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Zy)},(t,e)=>(e-t)/Zy,t=>t.getUTCSeconds()),lb=sb.range,cb=ib(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Zy)},(t,e)=>{t.setTime(+t+e*Qy)},(t,e)=>(e-t)/Qy,t=>t.getMinutes()),hb=cb.range,ub=ib(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Qy)},(t,e)=>(e-t)/Qy,t=>t.getUTCMinutes()),fb=ub.range,db=ib(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Zy-t.getMinutes()*Qy)},(t,e)=>{t.setTime(+t+e*Ky)},(t,e)=>(e-t)/Ky,t=>t.getHours()),pb=db.range,gb=ib(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ky)},(t,e)=>(e-t)/Ky,t=>t.getUTCHours()),mb=gb.range,yb=ib(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Qy)/Jy,t=>t.getDate()-1),bb=yb.range,xb=ib(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Jy,t=>t.getUTCDate()-1),_b=xb.range,vb=ib(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Jy,t=>Math.floor(t/Jy)),wb=vb.range;function kb(t){return ib(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Qy)/tb)}const Cb=kb(0),Sb=kb(1),Tb=kb(2),Mb=kb(3),Ab=kb(4),Bb=kb(5),Lb=kb(6),Eb=Cb.range,Fb=Sb.range,$b=Tb.range,Ob=Mb.range,Nb=Ab.range,Db=Bb.range,Ib=Lb.range;function zb(t){return ib(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/tb)}const Pb=zb(0),Rb=zb(1),qb=zb(2),jb=zb(3),Wb=zb(4),Hb=zb(5),Ub=zb(6),Yb=Pb.range,Gb=Rb.range,Vb=qb.range,Xb=jb.range,Zb=Wb.range,Qb=Hb.range,Kb=Ub.range,Jb=ib(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth()),tx=Jb.range,ex=ib(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth()),nx=ex.range,rx=ib(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());rx.every=t=>isFinite(t=Math.floor(t))&&t>0?ib(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}):null;const ix=rx.range,ax=ib(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());ax.every=t=>isFinite(t=Math.floor(t))&&t>0?ib(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null;const ox=ax.range;function sx(t,e,n,r,i,o){const s=[[sb,1,Zy],[sb,5,5e3],[sb,15,15e3],[sb,30,3e4],[o,1,Qy],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,Ky],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Jy],[r,2,1728e5],[n,1,tb],[e,1,2592e6],[e,3,7776e6],[t,1,eb]];function l(e,n,r){const i=Math.abs(n-e)/r,o=a(([,,t])=>t).right(s,i);if(o===s.length)return t.every(ht(e/eb,n/eb,r));if(0===o)return ab.every(Math.max(ht(e,n,r),1));const[l,c]=s[i/s[o-1][2]<s[o][2]/i?o-1:o];return l.every(c)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:l(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},l]}const[lx,cx]=sx(ax,ex,Pb,vb,gb,ub),[hx,ux]=sx(rx,Jb,Cb,yb,db,cb);function fx(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function dx(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function px(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function gx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,l=t.shortMonths,c=Mx(i),h=Ax(i),u=Mx(a),f=Ax(a),d=Mx(o),p=Ax(o),g=Mx(s),m=Ax(s),y=Mx(l),b=Ax(l),x={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Xx,e:Xx,f:t_,g:u_,G:d_,H:Zx,I:Qx,j:Kx,L:Jx,m:e_,M:n_,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:D_,s:I_,S:r_,u:i_,U:a_,V:s_,w:l_,W:c_,x:null,X:null,y:h_,Y:f_,Z:p_,"%":N_},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:g_,e:g_,f:__,g:E_,G:$_,H:m_,I:y_,j:b_,L:x_,m:v_,M:w_,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:D_,s:I_,S:k_,u:C_,U:S_,V:M_,w:A_,W:B_,x:null,X:null,y:L_,Y:F_,Z:O_,"%":N_},v={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:Px,e:Px,f:Ux,g:Nx,G:Ox,H:qx,I:qx,j:Rx,L:Hx,m:zx,M:jx,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=h.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ix,Q:Gx,s:Vx,S:Wx,u:Lx,U:Ex,V:Fx,w:Bx,W:$x,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:Nx,Y:Ox,Z:Dx,"%":Yx};function w(t,e){return function(n){var r,i,a,o=[],s=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=vx[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),l=s+1);return o.push(t.slice(l,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=px(1900,void 0,1);if(C(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=dx(px(a.y,0,1))).getUTCDay(),r=i>4||0===i?Rb.ceil(r):Rb(r),r=xb.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=fx(px(a.y,0,1))).getDay(),r=i>4||0===i?Sb.ceil(r):Sb(r),r=yb.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?dx(px(a.y,0,1)).getUTCDay():fx(px(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,dx(a)):fx(a)}}function C(t,e,n,r){for(var i,a,o=0,s=e.length,l=n.length;o<s;){if(r>=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=v[i in vx?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=w(n,x),x.X=w(r,x),x.c=w(e,x),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var mx,yx,bx,xx,_x,vx={"-":"",_:" ",0:"0"},wx=/^\s*\d+/,kx=/^%/,Cx=/[\\^$*+?|[\]().{}]/g;function Sx(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Tx(t){return t.replace(Cx,"\\$&")}function Mx(t){return new RegExp("^(?:"+t.map(Tx).join("|")+")","i")}function Ax(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function Bx(t,e,n){var r=wx.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Lx(t,e,n){var r=wx.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ex(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Fx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function $x(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ox(t,e,n){var r=wx.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Nx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Dx(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ix(t,e,n){var r=wx.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function zx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Px(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rx(t,e,n){var r=wx.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function qx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function jx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Wx(t,e,n){var r=wx.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Hx(t,e,n){var r=wx.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ux(t,e,n){var r=wx.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Yx(t,e,n){var r=kx.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gx(t,e,n){var r=wx.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Vx(t,e,n){var r=wx.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xx(t,e){return Sx(t.getDate(),e,2)}function Zx(t,e){return Sx(t.getHours(),e,2)}function Qx(t,e){return Sx(t.getHours()%12||12,e,2)}function Kx(t,e){return Sx(1+yb.count(rx(t),t),e,3)}function Jx(t,e){return Sx(t.getMilliseconds(),e,3)}function t_(t,e){return Jx(t,e)+"000"}function e_(t,e){return Sx(t.getMonth()+1,e,2)}function n_(t,e){return Sx(t.getMinutes(),e,2)}function r_(t,e){return Sx(t.getSeconds(),e,2)}function i_(t){var e=t.getDay();return 0===e?7:e}function a_(t,e){return Sx(Cb.count(rx(t)-1,t),e,2)}function o_(t){var e=t.getDay();return e>=4||0===e?Ab(t):Ab.ceil(t)}function s_(t,e){return t=o_(t),Sx(Ab.count(rx(t),t)+(4===rx(t).getDay()),e,2)}function l_(t){return t.getDay()}function c_(t,e){return Sx(Sb.count(rx(t)-1,t),e,2)}function h_(t,e){return Sx(t.getFullYear()%100,e,2)}function u_(t,e){return Sx((t=o_(t)).getFullYear()%100,e,2)}function f_(t,e){return Sx(t.getFullYear()%1e4,e,4)}function d_(t,e){var n=t.getDay();return Sx((t=n>=4||0===n?Ab(t):Ab.ceil(t)).getFullYear()%1e4,e,4)}function p_(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Sx(e/60|0,"0",2)+Sx(e%60,"0",2)}function g_(t,e){return Sx(t.getUTCDate(),e,2)}function m_(t,e){return Sx(t.getUTCHours(),e,2)}function y_(t,e){return Sx(t.getUTCHours()%12||12,e,2)}function b_(t,e){return Sx(1+xb.count(ax(t),t),e,3)}function x_(t,e){return Sx(t.getUTCMilliseconds(),e,3)}function __(t,e){return x_(t,e)+"000"}function v_(t,e){return Sx(t.getUTCMonth()+1,e,2)}function w_(t,e){return Sx(t.getUTCMinutes(),e,2)}function k_(t,e){return Sx(t.getUTCSeconds(),e,2)}function C_(t){var e=t.getUTCDay();return 0===e?7:e}function S_(t,e){return Sx(Pb.count(ax(t)-1,t),e,2)}function T_(t){var e=t.getUTCDay();return e>=4||0===e?Wb(t):Wb.ceil(t)}function M_(t,e){return t=T_(t),Sx(Wb.count(ax(t),t)+(4===ax(t).getUTCDay()),e,2)}function A_(t){return t.getUTCDay()}function B_(t,e){return Sx(Rb.count(ax(t)-1,t),e,2)}function L_(t,e){return Sx(t.getUTCFullYear()%100,e,2)}function E_(t,e){return Sx((t=T_(t)).getUTCFullYear()%100,e,2)}function F_(t,e){return Sx(t.getUTCFullYear()%1e4,e,4)}function $_(t,e){var n=t.getUTCDay();return Sx((t=n>=4||0===n?Wb(t):Wb.ceil(t)).getUTCFullYear()%1e4,e,4)}function O_(){return"+0000"}function N_(){return"%"}function D_(t){return+t}function I_(t){return Math.floor(+t/1e3)}function z_(t){return mx=gx(t),yx=mx.format,bx=mx.parse,xx=mx.utcFormat,_x=mx.utcParse,mx}function P_(t){return new Date(t)}function R_(t){return t instanceof Date?+t:+new Date(+t)}function q_(t,e,n,r,i,a,o,s,l,c){var h=vy(),u=h.invert,f=h.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),b=c("%b %d"),x=c("%B"),_=c("%Y");function v(t){return(l(t)<t?d:s(t)<t?p:o(t)<t?g:a(t)<t?m:r(t)<t?i(t)<t?y:b:n(t)<t?x:_)(t)}return h.invert=function(t){return new Date(u(t))},h.domain=function(t){return arguments.length?f(Array.from(t,R_)):f().map(P_)},h.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},h.tickFormat=function(t,e){return null==e?v:c(e)},h.nice=function(t){var n=f();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(Ty(n,t)):h},h.copy=function(){return xy(h,q_(t,e,n,r,i,a,o,s,l,c))},h}function j_(){return oy.apply(q_(hx,ux,rx,Jb,Cb,yb,db,cb,sb,yx).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function W_(){return oy.apply(q_(lx,cx,ax,ex,Pb,xb,gb,ub,sb,xx).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function H_(){var t,e,n,r,i,a=0,o=1,s=gy,l=!1;function c(e){return null==e||isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,l?Math.max(0,Math.min(1,e)):e))}function h(t){return function(e){var n,r;return arguments.length?([n,r]=e,s=t(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([a,o]=i,t=r(a=+a),e=r(o=+o),n=t===e?0:1/(e-t),c):[a,o]},c.clamp=function(t){return arguments.length?(l=!!t,c):l},c.interpolator=function(t){return arguments.length?(s=t,c):s},c.range=h(Gr),c.rangeRound=h(ym),c.unknown=function(t){return arguments.length?(i=t,c):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),c}}function U_(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Y_(){var t=ky(H_()(gy));return t.copy=function(){return U_(t,Y_())},sy.apply(t,arguments)}function G_(){var t=$y(H_()).domain([1,10]);return t.copy=function(){return U_(t,G_()).base(t.base())},sy.apply(t,arguments)}function V_(){var t=Iy(H_());return t.copy=function(){return U_(t,V_()).constant(t.constant())},sy.apply(t,arguments)}function X_(){var t=jy(H_());return t.copy=function(){return U_(t,X_()).exponent(t.exponent())},sy.apply(t,arguments)}function Z_(){return X_.apply(null,arguments).exponent(.5)}function Q_(){var t=[],e=gy;function n(n){if(null!=n&&!isNaN(n=+n))return e((f(t,n,1)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(r),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.range=function(){return t.map((n,r)=>e(r/(t.length-1)))},n.quantiles=function(e){return Array.from({length:e+1},(n,r)=>vt(t,r/e))},n.copy=function(){return Q_(e).domain(t)},sy.apply(n,arguments)}function K_(){var t,e,n,r,i,a,o,s=0,l=.5,c=1,h=1,u=gy,f=!1;function d(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(h*t<h*e?r:i),u(f?Math.max(0,Math.min(1,t)):t))}function p(t){return function(e){var n,r,i;return arguments.length?([n,r,i]=e,u=Lm(t,[n,r,i]),d):[u(0),u(.5),u(1)]}}return d.domain=function(o){return arguments.length?([s,l,c]=o,t=a(s=+s),e=a(l=+l),n=a(c=+c),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h=e<t?-1:1,d):[s,l,c]},d.clamp=function(t){return arguments.length?(f=!!t,d):f},d.interpolator=function(t){return arguments.length?(u=t,d):u},d.range=p(Gr),d.rangeRound=p(ym),d.unknown=function(t){return arguments.length?(o=t,d):o},function(o){return a=o,t=o(s),e=o(l),n=o(c),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h=e<t?-1:1,d}}function J_(){var t=ky(K_()(gy));return t.copy=function(){return U_(t,J_())},sy.apply(t,arguments)}function tv(){var t=$y(K_()).domain([.1,1,10]);return t.copy=function(){return U_(t,tv()).base(t.base())},sy.apply(t,arguments)}function ev(){var t=Iy(K_());return t.copy=function(){return U_(t,ev()).constant(t.constant())},sy.apply(t,arguments)}function nv(){var t=jy(K_());return t.copy=function(){return U_(t,nv()).exponent(t.exponent())},sy.apply(t,arguments)}function rv(){return nv.apply(null,arguments).exponent(.5)}function iv(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}z_({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"]});const av=iv("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ov=iv("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),sv=iv("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),lv=iv("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),cv=iv("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),hv=iv("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),uv=iv("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),fv=iv("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),dv=iv("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),pv=iv("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),gv=iv("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),mv=t=>Nr(t[t.length-1]);var yv=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(iv);const bv=mv(yv);var xv=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(iv);const _v=mv(xv);var vv=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(iv);const wv=mv(vv);var kv=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(iv);const Cv=mv(kv);var Sv=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(iv);const Tv=mv(Sv);var Mv=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(iv);const Av=mv(Mv);var Bv=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(iv);const Lv=mv(Bv);var Ev=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(iv);const Fv=mv(Ev);var $v=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(iv);const Ov=mv($v);var Nv=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(iv);const Dv=mv(Nv);var Iv=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(iv);const zv=mv(Iv);var Pv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(iv);const Rv=mv(Pv);var qv=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(iv);const jv=mv(qv);var Wv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(iv);const Hv=mv(Wv);var Uv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(iv);const Yv=mv(Uv);var Gv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(iv);const Vv=mv(Gv);var Xv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(iv);const Zv=mv(Xv);var Qv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(iv);const Kv=mv(Qv);var Jv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(iv);const tw=mv(Jv);var ew=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(iv);const nw=mv(ew);var rw=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(iv);const iw=mv(rw);var aw=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(iv);const ow=mv(aw);var sw=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(iv);const lw=mv(sw);var cw=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(iv);const hw=mv(cw);var uw=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(iv);const fw=mv(uw);var dw=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(iv);const pw=mv(dw);var gw=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(iv);const mw=mv(gw);function yw(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const bw=Bm(Ho(300,.5,0),Ho(-240,.5,1));var xw=Bm(Ho(-100,.75,.35),Ho(80,1.5,.8)),_w=Bm(Ho(260,.75,.35),Ho(80,1.5,.8)),vw=Ho();function ww(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return vw.h=360*t-100,vw.s=1.5-1.5*e,vw.l=.8-.9*e,vw+""}var kw=fr(),Cw=Math.PI/3,Sw=2*Math.PI/3;function Tw(t){var e;return t=(.5-t)*Math.PI,kw.r=255*(e=Math.sin(t))*e,kw.g=255*(e=Math.sin(t+Cw))*e,kw.b=255*(e=Math.sin(t+Sw))*e,kw+""}function Mw(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function Aw(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Bw=Aw(iv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Lw=Aw(iv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Ew=Aw(iv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Fw=Aw(iv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function $w(t){return In(kn(t).call(document.documentElement))}var Ow=0;function Nw(){return new Dw}function Dw(){this._="@"+(++Ow).toString(36)}function Iw(t,e){return t.target&&(t=Vr(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,t=>Xr(t,e))}function zw(t){return"string"==typeof t?new On([document.querySelectorAll(t)],[document.documentElement]):new On([Se(t)],$n)}function Pw(t){return function(){return t}}Dw.prototype=Nw.prototype={constructor:Dw,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const Rw=Math.abs,qw=Math.atan2,jw=Math.cos,Ww=Math.max,Hw=Math.min,Uw=Math.sin,Yw=Math.sqrt,Gw=1e-12,Vw=Math.PI,Xw=Vw/2,Zw=2*Vw;function Qw(t){return t>=1?Xw:t<=-1?-Xw:Math.asin(t)}function Kw(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Ja(e)}function Jw(t){return t.innerRadius}function tk(t){return t.outerRadius}function ek(t){return t.startAngle}function nk(t){return t.endAngle}function rk(t){return t&&t.padAngle}function ik(t,e,n,r,i,a,o){var s=t-n,l=e-r,c=(o?a:-a)/Yw(s*s+l*l),h=c*l,u=-c*s,f=t+h,d=e+u,p=n+h,g=r+u,m=(f+p)/2,y=(d+g)/2,b=p-f,x=g-d,_=b*b+x*x,v=i-a,w=f*g-p*d,k=(x<0?-1:1)*Yw(Ww(0,v*v*_-w*w)),C=(w*x-b*k)/_,S=(-w*b-x*k)/_,T=(w*x+b*k)/_,M=(-w*b+x*k)/_,A=C-m,B=S-y,L=T-m,E=M-y;return A*A+B*B>L*L+E*E&&(C=T,S=M),{cx:C,cy:S,x01:-h,y01:-u,x11:C*(i/v-1),y11:S*(i/v-1)}}function ak(){var t=Jw,e=tk,n=Pw(0),r=null,i=ek,a=nk,o=rk,s=null,l=Kw(c);function c(){var c,h,u,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-Xw,g=a.apply(this,arguments)-Xw,m=Rw(g-p),y=g>p;if(s||(s=c=l()),d<f&&(h=d,d=f,f=h),d>Gw)if(m>Zw-Gw)s.moveTo(d*jw(p),d*Uw(p)),s.arc(0,0,d,p,g,!y),f>Gw&&(s.moveTo(f*jw(g),f*Uw(g)),s.arc(0,0,f,g,p,y));else{var b,x,_=p,v=g,w=p,k=g,C=m,S=m,T=o.apply(this,arguments)/2,M=T>Gw&&(r?+r.apply(this,arguments):Yw(f*f+d*d)),A=Hw(Rw(d-f)/2,+n.apply(this,arguments)),B=A,L=A;if(M>Gw){var E=Qw(M/f*Uw(T)),F=Qw(M/d*Uw(T));(C-=2*E)>Gw?(w+=E*=y?1:-1,k-=E):(C=0,w=k=(p+g)/2),(S-=2*F)>Gw?(_+=F*=y?1:-1,v-=F):(S=0,_=v=(p+g)/2)}var $=d*jw(_),O=d*Uw(_),N=f*jw(k),D=f*Uw(k);if(A>Gw){var I,z=d*jw(v),P=d*Uw(v),R=f*jw(w),q=f*Uw(w);if(m<Vw)if(I=function(t,e,n,r,i,a,o,s){var l=n-t,c=r-e,h=o-i,u=s-a,f=u*l-h*c;if(!(f*f<Gw))return[t+(f=(h*(e-a)-u*(t-i))/f)*l,e+f*c]}($,O,R,q,z,P,N,D)){var j=$-I[0],W=O-I[1],H=z-I[0],U=P-I[1],Y=1/Uw(((u=(j*H+W*U)/(Yw(j*j+W*W)*Yw(H*H+U*U)))>1?0:u<-1?Vw:Math.acos(u))/2),G=Yw(I[0]*I[0]+I[1]*I[1]);B=Hw(A,(f-G)/(Y-1)),L=Hw(A,(d-G)/(Y+1))}else B=L=0}S>Gw?L>Gw?(b=ik(R,q,$,O,d,L,y),x=ik(z,P,N,D,d,L,y),s.moveTo(b.cx+b.x01,b.cy+b.y01),L<A?s.arc(b.cx,b.cy,L,qw(b.y01,b.x01),qw(x.y01,x.x01),!y):(s.arc(b.cx,b.cy,L,qw(b.y01,b.x01),qw(b.y11,b.x11),!y),s.arc(0,0,d,qw(b.cy+b.y11,b.cx+b.x11),qw(x.cy+x.y11,x.cx+x.x11),!y),s.arc(x.cx,x.cy,L,qw(x.y11,x.x11),qw(x.y01,x.x01),!y))):(s.moveTo($,O),s.arc(0,0,d,_,v,!y)):s.moveTo($,O),f>Gw&&C>Gw?B>Gw?(b=ik(N,D,z,P,f,-B,y),x=ik($,O,R,q,f,-B,y),s.lineTo(b.cx+b.x01,b.cy+b.y01),B<A?s.arc(b.cx,b.cy,B,qw(b.y01,b.x01),qw(x.y01,x.x01),!y):(s.arc(b.cx,b.cy,B,qw(b.y01,b.x01),qw(b.y11,b.x11),!y),s.arc(0,0,f,qw(b.cy+b.y11,b.cx+b.x11),qw(x.cy+x.y11,x.cx+x.x11),y),s.arc(x.cx,x.cy,B,qw(x.y11,x.x11),qw(x.y01,x.x01),!y))):s.arc(0,0,f,k,w,y):s.lineTo(N,D)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Vw/2;return[jw(r)*n,Uw(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Pw(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Pw(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Pw(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Pw(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Pw(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}var ok=Array.prototype.slice;function sk(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function lk(t){this._context=t}function ck(t){return new lk(t)}function hk(t){return t[0]}function uk(t){return t[1]}function fk(t,e){var n=Pw(!0),r=null,i=ck,a=null,o=Kw(s);function s(s){var l,c,h,u=(s=sk(s)).length,f=!1;for(null==r&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&n(c=s[l],l,s))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(c,l,s),+e(c,l,s));if(h)return a=null,h+""||null}return t="function"==typeof t?t:void 0===t?hk:Pw(t),e="function"==typeof e?e:void 0===e?uk:Pw(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:Pw(!!t),s):n},s.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),s):i},s.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),s):r},s}function dk(t,e,n){var r=null,i=Pw(!0),a=null,o=ck,s=null,l=Kw(c);function c(c){var h,u,f,d,p,g=(c=sk(c)).length,m=!1,y=new Array(g),b=new Array(g);for(null==a&&(s=o(p=l())),h=0;h<=g;++h){if(!(h<g&&i(d=c[h],h,c))===m)if(m=!m)u=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=h-1;f>=u;--f)s.point(y[f],b[f]);s.lineEnd(),s.areaEnd()}m&&(y[h]=+t(d,h,c),b[h]=+e(d,h,c),s.point(r?+r(d,h,c):y[h],n?+n(d,h,c):b[h]))}if(p)return s=null,p+""||null}function h(){return fk().defined(i).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?hk:Pw(+t),e="function"==typeof e?e:Pw(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?uk:Pw(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),r=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Pw(+t),c):r},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Pw(+t),c):n},c.lineX0=c.lineY0=function(){return h().x(t).y(e)},c.lineY1=function(){return h().x(t).y(n)},c.lineX1=function(){return h().x(r).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:Pw(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function pk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function gk(t){return t}function mk(){var t=gk,e=pk,n=null,r=Pw(0),i=Pw(Zw),a=Pw(0);function o(o){var s,l,c,h,u,f=(o=sk(o)).length,d=0,p=new Array(f),g=new Array(f),m=+r.apply(this,arguments),y=Math.min(Zw,Math.max(-Zw,i.apply(this,arguments)-m)),b=Math.min(Math.abs(y)/f,a.apply(this,arguments)),x=b*(y<0?-1:1);for(s=0;s<f;++s)(u=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=u);for(null!=e?p.sort(function(t,n){return e(g[t],g[n])}):null!=n&&p.sort(function(t,e){return n(o[t],o[e])}),s=0,c=d?(y-f*x)/d:0;s<f;++s,m=h)l=p[s],h=m+((u=g[l])>0?u*c:0)+x,g[l]={data:o[l],index:s,value:u,startAngle:m,endAngle:h,padAngle:b};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Pw(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Pw(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Pw(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Pw(+t),o):a},o}lk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var yk=xk(ck);function bk(t){this._curve=t}function xk(t){function e(e){return new bk(t(e))}return e._curve=t,e}function _k(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(xk(t)):e()._curve},t}function vk(){return _k(fk().curve(yk))}function wk(){var t=dk().curve(yk),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return _k(n())},delete t.lineX0,t.lineEndAngle=function(){return _k(r())},delete t.lineX1,t.lineInnerRadius=function(){return _k(i())},delete t.lineY0,t.lineOuterRadius=function(){return _k(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(xk(t)):e()._curve},t}function kk(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}bk.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};class Ck{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}class Sk{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,e){if(t=+t,e=+e,0===this._point)this._point=1;else{const n=kk(this._x0,this._y0),r=kk(this._x0,this._y0=(this._y0+e)/2),i=kk(t,this._y0),a=kk(t,e);this._context.moveTo(...n),this._context.bezierCurveTo(...r,...i,...a)}this._x0=t,this._y0=e}}function Tk(t){return new Ck(t,!0)}function Mk(t){return new Ck(t,!1)}function Ak(t){return new Sk(t)}function Bk(t){return t.source}function Lk(t){return t.target}function Ek(t){let e=Bk,n=Lk,r=hk,i=uk,a=null,o=null,s=Kw(l);function l(){let l;const c=ok.call(arguments),h=e.apply(this,c),u=n.apply(this,c);if(null==a&&(o=t(l=s())),o.lineStart(),c[0]=h,o.point(+r.apply(this,c),+i.apply(this,c)),c[0]=u,o.point(+r.apply(this,c),+i.apply(this,c)),o.lineEnd(),l)return o=null,l+""||null}return l.source=function(t){return arguments.length?(e=t,l):e},l.target=function(t){return arguments.length?(n=t,l):n},l.x=function(t){return arguments.length?(r="function"==typeof t?t:Pw(+t),l):r},l.y=function(t){return arguments.length?(i="function"==typeof t?t:Pw(+t),l):i},l.context=function(e){return arguments.length?(null==e?a=o=null:o=t(a=e),l):a},l}function Fk(){return Ek(Tk)}function $k(){return Ek(Mk)}function Ok(){const t=Ek(Ak);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Nk=Yw(3),Dk={draw(t,e){const n=.59436*Yw(e+Hw(e/28,.75)),r=n/2,i=r*Nk;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},Ik={draw(t,e){const n=Yw(e/Vw);t.moveTo(n,0),t.arc(0,0,n,0,Zw)}},zk={draw(t,e){const n=Yw(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Pk=Yw(1/3),Rk=2*Pk,qk={draw(t,e){const n=Yw(e/Rk),r=n*Pk;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},jk={draw(t,e){const n=.62625*Yw(e);t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Wk={draw(t,e){const n=.87559*Yw(e-Hw(e/7,2));t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Hk={draw(t,e){const n=Yw(e),r=-n/2;t.rect(r,r,n,n)}},Uk={draw(t,e){const n=.4431*Yw(e);t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},Yk=Uw(Vw/10)/Uw(7*Vw/10),Gk=Uw(Zw/10)*Yk,Vk=-jw(Zw/10)*Yk,Xk={draw(t,e){const n=Yw(.8908130915292852*e),r=Gk*n,i=Vk*n;t.moveTo(0,-n),t.lineTo(r,i);for(let e=1;e<5;++e){const a=Zw*e/5,o=jw(a),s=Uw(a);t.lineTo(s*n,-o*n),t.lineTo(o*r-s*i,s*r+o*i)}t.closePath()}},Zk=Yw(3),Qk={draw(t,e){const n=-Yw(e/(3*Zk));t.moveTo(0,2*n),t.lineTo(-Zk*n,-n),t.lineTo(Zk*n,-n),t.closePath()}},Kk=Yw(3),Jk={draw(t,e){const n=.6824*Yw(e),r=n/2,i=n*Kk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},tC=-.5,eC=Yw(3)/2,nC=1/Yw(12),rC=3*(nC/2+1),iC={draw(t,e){const n=Yw(e/rC),r=n/2,i=n*nC,a=r,o=n*nC+n,s=-a,l=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(tC*r-eC*i,eC*r+tC*i),t.lineTo(tC*a-eC*o,eC*a+tC*o),t.lineTo(tC*s-eC*l,eC*s+tC*l),t.lineTo(tC*r+eC*i,tC*i-eC*r),t.lineTo(tC*a+eC*o,tC*o-eC*a),t.lineTo(tC*s+eC*l,tC*l-eC*s),t.closePath()}},aC={draw(t,e){const n=.6189*Yw(e-Hw(e/6,1.7));t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},oC=[Ik,zk,qk,Hk,Xk,Qk,iC],sC=[Ik,Wk,aC,Jk,Dk,Uk,jk];function lC(t,e){let n=null,r=Kw(i);function i(){let i;if(n||(n=i=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return t="function"==typeof t?t:Pw(t||Ik),e="function"==typeof e?e:Pw(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:Pw(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:Pw(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}function cC(){}function hC(t,e,n){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+n)/6)}function uC(t){this._context=t}function fC(t){return new uC(t)}function dC(t){this._context=t}function pC(t){return new dC(t)}function gC(t){this._context=t}function mC(t){return new gC(t)}function yC(t,e){this._basis=new uC(t),this._beta=e}uC.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:hC(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:hC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},dC.prototype={areaStart:cC,areaEnd:cC,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)}},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:hC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},gC.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||0!==this._line&&3===this._point)&&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 n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:hC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},yC.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*o),this._beta*e[l]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const bC=function t(e){function n(t){return 1===e?new uC(t):new yC(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function xC(t,e,n){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-n),t._x2,t._y2)}function _C(t,e){this._context=t,this._k=(1-e)/6}_C.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:xC(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:xC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vC=function t(e){function n(t){return new _C(t,e)}return n.tension=function(e){return t(+e)},n}(0);function wC(t,e){this._context=t,this._k=(1-e)/6}wC.prototype={areaStart:cC,areaEnd:cC,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)}},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:xC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kC=function t(e){function n(t){return new wC(t,e)}return n.tension=function(e){return t(+e)},n}(0);function CC(t,e){this._context=t,this._k=(1-e)/6}CC.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||0!==this._line&&3===this._point)&&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:xC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const SC=function t(e){function n(t){return new CC(t,e)}return n.tension=function(e){return t(+e)},n}(0);function TC(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Gw){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);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Gw){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);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function MC(t,e){this._context=t,this._alpha=e}MC.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:TC(this,t,e)}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}};const AC=function t(e){function n(t){return e?new MC(t,e):new _C(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function BC(t,e){this._context=t,this._alpha=e}BC.prototype={areaStart:cC,areaEnd:cC,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:TC(this,t,e)}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}};const LC=function t(e){function n(t){return e?new BC(t,e):new wC(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function EC(t,e){this._context=t,this._alpha=e}EC.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:TC(this,t,e)}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}};const FC=function t(e){function n(t){return e?new EC(t,e):new CC(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $C(t){this._context=t}function OC(t){return new $C(t)}function NC(t){return t<0?-1:1}function DC(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(NC(a)+NC(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function IC(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function zC(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function PC(t){this._context=t}function RC(t){this._context=new qC(t)}function qC(t){this._context=t}function jC(t){return new PC(t)}function WC(t){return new RC(t)}function HC(t){this._context=t}function UC(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function YC(t){return new HC(t)}function GC(t,e){this._context=t,this._t=e}function VC(t){return new GC(t,.5)}function XC(t){return new GC(t,0)}function ZC(t){return new GC(t,1)}function QC(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function KC(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function JC(t,e){return t[e]}function tS(t){const e=[];return e.key=t,e}function eS(){var t=Pw([]),e=KC,n=QC,r=JC;function i(i){var a,o,s=Array.from(t.apply(this,arguments),tS),l=s.length,c=-1;for(const t of i)for(a=0,++c;a<l;++a)(s[a][c]=[0,+r(t,s[a].key,c,i)]).data=t;for(a=0,o=sk(e(s));a<l;++a)s[o[a]].index=a;return n(s,o),s}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Pw(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Pw(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?KC:"function"==typeof t?t:Pw(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?QC:t,i):n},i}function nS(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}QC(t,e)}}function rS(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,l=0,c=t[e[0]].length;l<c;++l)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][l])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function iS(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}QC(t,e)}}function aS(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,l=0,c=0;s<i;++s){for(var h=t[e[s]],u=h[o][1]||0,f=(u-(h[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}l+=u,c+=f*u}n[o-1][1]+=n[o-1][0]=a,l&&(a-=c/l)}n[o-1][1]+=n[o-1][0]=a,QC(t,e)}}function oS(t){var e=t.map(sS);return KC(t).sort(function(t,n){return e[t]-e[n]})}function sS(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function lS(t){var e=t.map(cS);return KC(t).sort(function(t,n){return e[t]-e[n]})}function cS(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function hS(t){return lS(t).reverse()}function uS(t){var e,n,r=t.length,i=t.map(cS),a=oS(t),o=0,s=0,l=[],c=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)}function fS(t){return KC(t).reverse()}$C.prototype={areaStart:cC,areaEnd:cC,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))}},PC.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:zC(this,this._t0,IC(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+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,zC(this,IC(this,n=DC(this,t,e)),n);break;default:zC(this,this._t0,n=DC(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(RC.prototype=Object.create(PC.prototype)).point=function(t,e){PC.prototype.point.call(this,e,t)},qC.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,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},HC.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,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=UC(t),i=UC(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},GC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var dS="%Y-%m-%dT%H:%M:%S.%LZ",pS=Date.prototype.toISOString?function(t){return t.toISOString()}:xx(dS);const gS=pS;var mS=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:_x(dS);const yS=mS;function bS(t,e,n){var r=new li,i=e;return null==e?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(t,e,n){e=+e,n=null==n?oi():+n,r._restart(function a(o){o+=i,r._restart(a,i+=e,n),t(o)},e,n)},r.restart(t,e,n),r)}const xS=t=>()=>t;function _S(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function vS(t,e,n){this.k=t,this.x=e,this.y=n}vS.prototype={constructor:vS,scale:function(t){return 1===t?this:new vS(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new vS(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 wS=new vS(1,0,0);function kS(t){for(;!t.__zoom;)if(!(t=t.parentNode))return wS;return t.__zoom}function CS(t){t.stopImmediatePropagation()}function SS(t){t.preventDefault(),t.stopImmediatePropagation()}function TS(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function MS(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function AS(){return this.__zoom||wS}function BS(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function LS(){return navigator.maxTouchPoints||"ontouchstart"in this}function ES(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function FS(){var t,e,n,r=TS,i=MS,a=ES,o=BS,s=LS,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=xm,f=we("start","zoom","end"),d=0,p=10;function g(t){t.property("__zoom",AS).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",C).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new vS(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new vS(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,r){t.on("start.zoom",function(){_(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(r).end()}).tween("zoom",function(){var t=this,a=arguments,o=_(t,a).event(r),s=i.apply(t,a),l=null==n?b(s):"function"==typeof n?n.apply(t,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),h=t.__zoom,f="function"==typeof e?e.apply(t,a):e,d=u(h.invert(l).concat(c/h.k),f.invert(l).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=c/e[2];t=new vS(n,l[0]-e[0]*n,l[1]-e[1]*n)}o.zoom(null,t)}})}function _(t,e,n){return!n&&t.__zooming||new v(t,e)}function v(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function w(t,...e){if(r.apply(this,arguments)){var n=_(this,e).event(t),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,o.apply(this,arguments)))),h=Xr(t);if(n.wheel)n.mouse[0][0]===h[0]&&n.mouse[0][1]===h[1]||(n.mouse[1]=i.invert(n.mouse[0]=h)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[h,i.invert(h)],vi(this),n.start()}SS(t),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(y(m(i,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function k(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,o=_(this,e,!0).event(t),s=In(t.view).on("mousemove.zoom",function(t){if(SS(t),!o.moved){var e=t.clientX-h,n=t.clientY-u;o.moved=e*e+n*n>d}o.event(t).zoom("mouse",a(y(o.that.__zoom,o.mouse[0]=Xr(t,i),o.mouse[1]),o.extent,c))},!0).on("mouseup.zoom",function(t){s.on("mousemove.zoom mouseup.zoom",null),Wn(t.view,o.moved),SS(t),o.event(t).end()},!0),l=Xr(t,i),h=t.clientX,u=t.clientY;jn(t.view),CS(t),o.mouse=[l,this.__zoom.invert(l)],vi(this),o.start()}}function C(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,o=Xr(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(o),l=n.k*(t.shiftKey?.5:2),u=a(y(m(n,l),o,s),i.apply(this,e),c);SS(t),h>0?In(this).transition().duration(h).call(x,u,o,t):In(this).call(g.transform,u,o,t)}}function S(n,...i){if(r.apply(this,arguments)){var a,o,s,l,c=n.touches,h=c.length,u=_(this,i,n.changedTouches.length===h).event(n);for(CS(n),o=0;o<h;++o)l=[l=Xr(s=c[o],this),this.__zoom.invert(l),s.identifier],u.touch0?u.touch1||u.touch0[2]===l[2]||(u.touch1=l,u.taps=0):(u.touch0=l,a=!0,u.taps=1+!!t);t&&(t=clearTimeout(t)),a&&(u.taps<2&&(e=l[0],t=setTimeout(function(){t=null},500)),vi(this),u.start())}}function T(t,...e){if(this.__zooming){var n,r,i,o,s=_(this,e).event(t),l=t.changedTouches,h=l.length;for(SS(t),n=0;n<h;++n)i=Xr(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var u=s.touch0[0],f=s.touch0[1],d=s.touch1[0],p=s.touch1[1],g=(g=d[0]-u[0])*g+(g=d[1]-u[1])*g,b=(b=p[0]-f[0])*b+(b=p[1]-f[1])*b;r=m(r,Math.sqrt(g/b)),i=[(u[0]+d[0])/2,(u[1]+d[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],o=s.touch0[1]}s.zoom("touch",a(y(r,i,o),s.extent,c))}}function M(t,...r){if(this.__zooming){var i,a,o=_(this,r).event(t),s=t.changedTouches,l=s.length;for(CS(t),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),i=0;i<l;++i)a=s[i],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=Xr(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<p)){var c=In(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return g.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",AS),t!==i?x(t,e,n,r):i.interrupt().each(function(){_(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},g.scaleBy=function(t,e,n,r){g.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},n,r)},g.scaleTo=function(t,e,n,r){g.transform(t,function(){var t=i.apply(this,arguments),r=this.__zoom,o=null==n?b(t):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(o),l="function"==typeof e?e.apply(this,arguments):e;return a(y(m(r,l),o,s),t,c)},n,r)},g.translateBy=function(t,e,n,r){g.transform(t,function(){return a(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),c)},null,r)},g.translateTo=function(t,e,n,r,o){g.transform(t,function(){var t=i.apply(this,arguments),o=this.__zoom,s=null==r?b(t):"function"==typeof r?r.apply(this,arguments):r;return a(wS.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)},r,o)},v.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=In(this.that).datum();f.call(t,this.that,new _S(t,{sourceEvent:this.sourceEvent,target:g,type:t,transform:this.that.__zoom,dispatch:f}),e)}},g.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:xS(+t),g):o},g.filter=function(t){return arguments.length?(r="function"==typeof t?t:xS(!!t),g):r},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:xS(!!t),g):s},g.extent=function(t){return arguments.length?(i="function"==typeof t?t:xS([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):i},g.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],g):[l[0],l[1]]},g.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],g):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},g.constrain=function(t){return arguments.length?(a=t,g):a},g.duration=function(t){return arguments.length?(h=+t,g):h},g.interpolate=function(t){return arguments.length?(u=t,g):u},g.on=function(){var t=f.on.apply(f,arguments);return t===f?g:t},g.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,g):Math.sqrt(d)},g.tapDistance=function(t){return arguments.length?(p=+t,g):p},g}kS.prototype=vS.prototype},97519(t,e,n){n.r(e),n.d(e,{default:()=>lt});const{entries:r,setPrototypeOf:i,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:c,create:h}=Object,{apply:u,construct:f}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),c||(c=function(t){return t}),u||(u=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return t.apply(e,r)}),f||(f=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const d=O(Array.prototype.forEach),p=O(Array.prototype.lastIndexOf),g=O(Array.prototype.pop),m=O(Array.prototype.push),y=O(Array.prototype.splice),b=Array.isArray,x=O(String.prototype.toLowerCase),_=O(String.prototype.toString),v=O(String.prototype.match),w=O(String.prototype.replace),k=O(String.prototype.indexOf),C=O(String.prototype.trim),S=O(Number.prototype.toString),T=O(Boolean.prototype.toString),M="undefined"==typeof BigInt?null:O(BigInt.prototype.toString),A="undefined"==typeof Symbol?null:O(Symbol.prototype.toString),B=O(Object.prototype.hasOwnProperty),L=O(Object.prototype.toString),E=O(RegExp.prototype.test),F=($=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return f($,e)});var $;function O(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(t,e,r)}}function N(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;if(i&&i(t,null),!b(e))return t;let r=e.length;for(;r--;){let i=e[r];if("string"==typeof i){const t=n(i);t!==i&&(a(e)||(e[r]=t),i=t)}t[i]=!0}return t}function D(t){for(let e=0;e<t.length;e++)B(t,e)||(t[e]=null);return t}function I(t){const e=h(null);for(const[n,i]of r(t))B(t,n)&&(b(i)?e[n]=D(i):i&&"object"==typeof i&&i.constructor===Object?e[n]=I(i):e[n]=i);return e}function z(t,e){for(;null!==t;){const n=s(t,e);if(n){if(n.get)return O(n.get);if("function"==typeof n.value)return O(n.value)}t=o(t)}return function(){return null}}const P=l(["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","search","section","select","shadow","slot","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"]),R=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),q=l(["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"]),j=l(["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=l(["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"]),H=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=l(["#text"]),Y=l(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),G=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","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"]),V=l(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),X=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=c(/<%[\w\W]*|[\w\W]*%>/gm),K=c(/\$\{[\w\W]*/gm),J=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),tt=c(/^aria-[\-\w]+$/),et=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nt=c(/^(?:\w+script|data):/i),rt=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),it=c(/^html$/i),at=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ot=Object.freeze({__proto__:null,ARIA_ATTR:tt,ATTR_WHITESPACE:rt,CUSTOM_ELEMENT:at,DATA_ATTR:J,DOCTYPE_NAME:it,ERB_EXPR:Q,IS_ALLOWED_URI:et,IS_SCRIPT_OR_DATA:nt,MUSTACHE_EXPR:Z,TMPLIT_EXPR:K});const st=function(){return"undefined"==typeof window?null:window};var lt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:st();const n=e=>t(e);if(n.version="3.4.2",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let{document:i}=e;const a=i,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:u,Element:f,NodeFilter:$,NamedNodeMap:O=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:D,DOMParser:Z,trustedTypes:Q}=e,K=f.prototype,J=z(K,"cloneNode"),tt=z(K,"remove"),nt=z(K,"nextSibling"),rt=z(K,"childNodes"),at=z(K,"parentNode");if("function"==typeof c){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let lt,ct="";const{implementation:ht,createNodeIterator:ut,createDocumentFragment:ft,getElementsByTagName:dt}=i,{importNode:pt}=a;let gt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof at&&ht&&void 0!==ht.createHTMLDocument;const{MUSTACHE_EXPR:mt,ERB_EXPR:yt,TMPLIT_EXPR:bt,DATA_ATTR:xt,ARIA_ATTR:_t,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:wt,CUSTOM_ELEMENT:kt}=ot;let{IS_ALLOWED_URI:Ct}=ot,St=null;const Tt=N({},[...P,...R,...q,...W,...U]);let Mt=null;const At=N({},[...Y,...G,...V,...X]);let Bt=Object.seal(h(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}})),Lt=null,Et=null;const Ft=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $t=!0,Ot=!0,Nt=!1,Dt=!0,It=!1,zt=!0,Pt=!1,Rt=!1,qt=!1,jt=!1,Wt=!1,Ht=!1,Ut=!0,Yt=!1;const Gt="user-content-";let Vt=!0,Xt=!1,Zt={},Qt=null;const Kt=N({},["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"]);let Jt=null;const te=N({},["audio","video","img","source","image","track"]);let ee=null;const ne=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",ae="http://www.w3.org/1999/xhtml";let oe=ae,se=!1,le=null;const ce=N({},[re,ie,ae],_);let he=N({},["mi","mo","mn","ms","mtext"]),ue=N({},["annotation-xml"]);const fe=N({},["title","style","font","a","script"]);let de=null;const pe=["application/xhtml+xml","text/html"];let ge=null,me=null;const ye=i.createElement("form"),be=function(t){return t instanceof RegExp||t instanceof Function},xe=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(me&&me===t)return;t&&"object"==typeof t||(t={}),t=I(t),de=-1===pe.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,ge="application/xhtml+xml"===de?_:x,St=B(t,"ALLOWED_TAGS")&&b(t.ALLOWED_TAGS)?N({},t.ALLOWED_TAGS,ge):Tt,Mt=B(t,"ALLOWED_ATTR")&&b(t.ALLOWED_ATTR)?N({},t.ALLOWED_ATTR,ge):At,le=B(t,"ALLOWED_NAMESPACES")&&b(t.ALLOWED_NAMESPACES)?N({},t.ALLOWED_NAMESPACES,_):ce,ee=B(t,"ADD_URI_SAFE_ATTR")&&b(t.ADD_URI_SAFE_ATTR)?N(I(ne),t.ADD_URI_SAFE_ATTR,ge):ne,Jt=B(t,"ADD_DATA_URI_TAGS")&&b(t.ADD_DATA_URI_TAGS)?N(I(te),t.ADD_DATA_URI_TAGS,ge):te,Qt=B(t,"FORBID_CONTENTS")&&b(t.FORBID_CONTENTS)?N({},t.FORBID_CONTENTS,ge):Kt,Lt=B(t,"FORBID_TAGS")&&b(t.FORBID_TAGS)?N({},t.FORBID_TAGS,ge):I({}),Et=B(t,"FORBID_ATTR")&&b(t.FORBID_ATTR)?N({},t.FORBID_ATTR,ge):I({}),Zt=!!B(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?I(t.USE_PROFILES):t.USE_PROFILES),$t=!1!==t.ALLOW_ARIA_ATTR,Ot=!1!==t.ALLOW_DATA_ATTR,Nt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,zt=!1!==t.SAFE_FOR_XML,Pt=t.WHOLE_DOCUMENT||!1,jt=t.RETURN_DOM||!1,Wt=t.RETURN_DOM_FRAGMENT||!1,Ht=t.RETURN_TRUSTED_TYPE||!1,qt=t.FORCE_BODY||!1,Ut=!1!==t.SANITIZE_DOM,Yt=t.SANITIZE_NAMED_PROPS||!1,Vt=!1!==t.KEEP_CONTENT,Xt=t.IN_PLACE||!1,Ct=function(t){try{return E(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:et,oe="string"==typeof t.NAMESPACE?t.NAMESPACE:ae,he=B(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?I(t.MATHML_TEXT_INTEGRATION_POINTS):N({},["mi","mo","mn","ms","mtext"]),ue=B(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?I(t.HTML_INTEGRATION_POINTS):N({},["annotation-xml"]);const e=B(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?I(t.CUSTOM_ELEMENT_HANDLING):h(null);if(Bt=h(null),B(e,"tagNameCheck")&&be(e.tagNameCheck)&&(Bt.tagNameCheck=e.tagNameCheck),B(e,"attributeNameCheck")&&be(e.attributeNameCheck)&&(Bt.attributeNameCheck=e.attributeNameCheck),B(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(Bt.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),It&&(Ot=!1),Wt&&(jt=!0),Zt&&(St=N({},U),Mt=h(null),!0===Zt.html&&(N(St,P),N(Mt,Y)),!0===Zt.svg&&(N(St,R),N(Mt,G),N(Mt,X)),!0===Zt.svgFilters&&(N(St,q),N(Mt,G),N(Mt,X)),!0===Zt.mathMl&&(N(St,W),N(Mt,V),N(Mt,X))),Ft.tagCheck=null,Ft.attributeCheck=null,B(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?Ft.tagCheck=t.ADD_TAGS:b(t.ADD_TAGS)&&(St===Tt&&(St=I(St)),N(St,t.ADD_TAGS,ge))),B(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?Ft.attributeCheck=t.ADD_ATTR:b(t.ADD_ATTR)&&(Mt===At&&(Mt=I(Mt)),N(Mt,t.ADD_ATTR,ge))),B(t,"ADD_URI_SAFE_ATTR")&&b(t.ADD_URI_SAFE_ATTR)&&N(ee,t.ADD_URI_SAFE_ATTR,ge),B(t,"FORBID_CONTENTS")&&b(t.FORBID_CONTENTS)&&(Qt===Kt&&(Qt=I(Qt)),N(Qt,t.FORBID_CONTENTS,ge)),B(t,"ADD_FORBID_CONTENTS")&&b(t.ADD_FORBID_CONTENTS)&&(Qt===Kt&&(Qt=I(Qt)),N(Qt,t.ADD_FORBID_CONTENTS,ge)),Vt&&(St["#text"]=!0),Pt&&N(St,["html","head","body"]),St.table&&(N(St,["tbody"]),delete Lt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw F('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw F('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');lt=t.TRUSTED_TYPES_POLICY,ct=lt.createHTML("")}else void 0===lt&&(lt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(Q,o)),null!==lt&&"string"==typeof ct&&(ct=lt.createHTML(""));l&&l(t),me=t},_e=N({},[...R,...q,...j]),ve=N({},[...W,...H]),we=function(t){m(n.removed,{element:t});try{at(t).removeChild(t)}catch(e){tt(t)}},ke=function(t,e){try{m(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){m(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(jt||Wt)try{we(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Ce=function(t){let e=null,n=null;if(qt)t="<remove></remove>"+t;else{const e=v(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===de&&oe===ae&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=lt?lt.createHTML(t):t;if(oe===ae)try{e=(new Z).parseFromString(r,de)}catch(t){}if(!e||!e.documentElement){e=ht.createDocument(oe,"template",null);try{e.documentElement.innerHTML=se?ct:r}catch(t){}}const a=e.body||e.documentElement;return t&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),oe===ae?dt.call(e,Pt?"html":"body")[0]:Pt?e.documentElement:a},Se=function(t){return ut.call(t.ownerDocument||t,t,$.SHOW_ELEMENT|$.SHOW_COMMENT|$.SHOW_TEXT|$.SHOW_PROCESSING_INSTRUCTION|$.SHOW_CDATA_SECTION,null)},Te=function(t){return t instanceof D&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof O)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Me=function(t){return"function"==typeof u&&t instanceof u};function Ae(t,e,r){d(t,t=>{t.call(n,e,r,me)})}const Be=function(t){let e=null;if(Ae(gt.beforeSanitizeElements,t,null),Te(t))return we(t),!0;const r=ge(t.nodeName);if(Ae(gt.uponSanitizeElement,t,{tagName:r,allowedTags:St}),zt&&t.hasChildNodes()&&!Me(t.firstElementChild)&&E(/<[/\w!]/g,t.innerHTML)&&E(/<[/\w!]/g,t.textContent))return we(t),!0;if(zt&&t.namespaceURI===ae&&"style"===r&&Me(t.firstElementChild))return we(t),!0;if(7===t.nodeType)return we(t),!0;if(zt&&8===t.nodeType&&E(/<[/\w]/g,t.data))return we(t),!0;if(Lt[r]||!(Ft.tagCheck instanceof Function&&Ft.tagCheck(r))&&!St[r]){if(!Lt[r]&&Fe(r)){if(Bt.tagNameCheck instanceof RegExp&&E(Bt.tagNameCheck,r))return!1;if(Bt.tagNameCheck instanceof Function&&Bt.tagNameCheck(r))return!1}if(Vt&&!Qt[r]){const e=at(t)||t.parentNode,n=rt(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r){const i=J(n[r],!0);e.insertBefore(i,nt(t))}}return we(t),!0}return t instanceof f&&!function(t){let e=at(t);e&&e.tagName||(e={namespaceURI:oe,tagName:"template"});const n=x(t.tagName),r=x(e.tagName);return!!le[t.namespaceURI]&&(t.namespaceURI===ie?e.namespaceURI===ae?"svg"===n:e.namespaceURI===re?"svg"===n&&("annotation-xml"===r||he[r]):Boolean(_e[n]):t.namespaceURI===re?e.namespaceURI===ae?"math"===n:e.namespaceURI===ie?"math"===n&&ue[r]:Boolean(ve[n]):t.namespaceURI===ae?!(e.namespaceURI===ie&&!ue[r])&&!(e.namespaceURI===re&&!he[r])&&!ve[n]&&(fe[n]||!_e[n]):!("application/xhtml+xml"!==de||!le[t.namespaceURI]))}(t)?(we(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!E(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&3===t.nodeType&&(e=t.textContent,d([mt,yt,bt],t=>{e=w(e,t," ")}),t.textContent!==e&&(m(n.removed,{element:t.cloneNode()}),t.textContent=e)),Ae(gt.afterSanitizeElements,t,null),!1):(we(t),!0)},Le=function(t,e,n){if(Et[e])return!1;if(Ut&&("id"===e||"name"===e)&&(n in i||n in ye))return!1;const r=Mt[e]||Ft.attributeCheck instanceof Function&&Ft.attributeCheck(e,t);if(Ot&&!Et[e]&&E(xt,e));else if($t&&E(_t,e));else if(!r||Et[e]){if(!(Fe(t)&&(Bt.tagNameCheck instanceof RegExp&&E(Bt.tagNameCheck,t)||Bt.tagNameCheck instanceof Function&&Bt.tagNameCheck(t))&&(Bt.attributeNameCheck instanceof RegExp&&E(Bt.attributeNameCheck,e)||Bt.attributeNameCheck instanceof Function&&Bt.attributeNameCheck(e,t))||"is"===e&&Bt.allowCustomizedBuiltInElements&&(Bt.tagNameCheck instanceof RegExp&&E(Bt.tagNameCheck,n)||Bt.tagNameCheck instanceof Function&&Bt.tagNameCheck(n))))return!1}else if(ee[e]);else if(E(Ct,w(n,wt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==k(n,"data:")||!Jt[t])if(Nt&&!E(vt,w(n,wt,"")));else if(n)return!1;return!0},Ee=N({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Fe=function(t){return!Ee[x(t)]&&E(kt,t)},$e=function(t){Ae(gt.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Te(t))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Mt,forceKeepAttr:void 0};let i=e.length;for(;i--;){const a=e[i],{name:o,namespaceURI:s,value:l}=a,c=ge(o),h=l;let u="value"===o?h:C(h);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Ae(gt.uponSanitizeAttribute,t,r),u=r.attrValue,!Yt||"id"!==c&&"name"!==c||0===k(u,Gt)||(ke(o,t),u=Gt+u),zt&&E(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){ke(o,t);continue}if("attributename"===c&&v(u,"href")){ke(o,t);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){ke(o,t);continue}if(!Dt&&E(/\/>/i,u)){ke(o,t);continue}It&&d([mt,yt,bt],t=>{u=w(u,t," ")});const f=ge(t.nodeName);if(Le(f,c,u)){if(lt&&"object"==typeof Q&&"function"==typeof Q.getAttributeType)if(s);else switch(Q.getAttributeType(f,c)){case"TrustedHTML":u=lt.createHTML(u);break;case"TrustedScriptURL":u=lt.createScriptURL(u)}if(u!==h)try{s?t.setAttributeNS(s,o,u):t.setAttribute(o,u),Te(t)?we(t):g(n.removed)}catch(e){ke(o,t)}}else ke(o,t)}Ae(gt.afterSanitizeAttributes,t,null)},Oe=function(t){let e=null;const n=Se(t);for(Ae(gt.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)Ae(gt.uponSanitizeShadowNode,e,null),Be(e),$e(e),e.content instanceof s&&Oe(e.content);Ae(gt.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,o=null,l=null;if(se=!t,se&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Me(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return S(t);case"boolean":return T(t);case"bigint":return M?M(t):"0";case"symbol":return A?A(t):"Symbol()";case"undefined":default:return L(t);case"function":case"object":{if(null===t)return L(t);const e=t,n=z(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:L(t)}return L(t)}}}(t)))throw F("dirty is not a string, aborting");if(!n.isSupported)return t;if(Rt||xe(e),n.removed=[],"string"==typeof t&&(Xt=!1),Xt){const e=t.nodeName;if("string"==typeof e){const t=ge(e);if(!St[t]||Lt[t])throw F("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)r=Ce("\x3c!----\x3e"),i=r.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!jt&&!It&&!Pt&&-1===t.indexOf("<"))return lt&&Ht?lt.createHTML(t):t;if(r=Ce(t),!r)return jt?null:Ht?ct:""}r&&qt&&we(r.firstChild);const c=Se(Xt?t:r);for(;o=c.nextNode();)Be(o),$e(o),o.content instanceof s&&Oe(o.content);if(Xt)return t;if(jt){if(It){r.normalize();let t=r.innerHTML;d([mt,yt,bt],e=>{t=w(t,e," ")}),r.innerHTML=t}if(Wt)for(l=ft.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(Mt.shadowroot||Mt.shadowrootmode)&&(l=pt.call(a,l,!0)),l}let h=Pt?r.outerHTML:r.innerHTML;return Pt&&St["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&E(it,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),It&&d([mt,yt,bt],t=>{h=w(h,t," ")}),lt&&Ht?lt.createHTML(h):h},n.setConfig=function(){xe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Rt=!0},n.clearConfig=function(){me=null,Rt=!1},n.isValidAttribute=function(t,e,n){me||xe({});const r=ge(t),i=ge(e);return Le(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&m(gt[t],e)},n.removeHook=function(t,e){if(void 0!==e){const n=p(gt[t],e);return-1===n?void 0:y(gt[t],n,1)[0]}return g(gt[t])},n.removeHooks=function(t){gt[t]=[]},n.removeAllHooks=function(){gt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}()},63545(t,e,n){n.d(e,{default:()=>o}),n.r(e);var r=n(45718),i=n(64607);const a=class{constructor(){this.type=i.TYPE.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=i.TYPE.ALL}is(t){return this.type===t}},o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.TYPE.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:i}=t;void 0===e&&(t.h=r.default.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=r.default.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=r.default.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:i}=t;void 0===e&&(t.r=r.default.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=r.default.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=r.default.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(i.TYPE.HSL)||void 0===e?(this._ensureHSL(),r.default.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(i.TYPE.HSL)||void 0===e?(this._ensureHSL(),r.default.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(i.TYPE.HSL)||void 0===e?(this._ensureHSL(),r.default.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(i.TYPE.RGB)||void 0===e?(this._ensureRGB(),r.default.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(i.TYPE.RGB)||void 0===e?(this._ensureRGB(),r.default.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(i.TYPE.RGB)||void 0===e?(this._ensureRGB(),r.default.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},11028(t,e,n){n.d(e,{default:()=>g}),n.r(e);var r=n(63545),i=n(64607);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const n=e[1],i=parseInt(n,16),o=n.length,s=o%4==0,l=o>4,c=l?1:17,h=l?8:4,u=s?0:-1,f=l?255:15;return r.default.set({r:(i>>h*(u+3)&f)*c,g:(i>>h*(u+2)&f)*c,b:(i>>h*(u+1)&f)*c,a:s?(i&f)*c/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a}=t;return a<1?`#${i.DEC2HEX[Math.round(e)]}${i.DEC2HEX[Math.round(n)]}${i.DEC2HEX[Math.round(r)]}${i.DEC2HEX[Math.round(255*a)]}`:`#${i.DEC2HEX[Math.round(e)]}${i.DEC2HEX[Math.round(n)]}${i.DEC2HEX[Math.round(r)]}`}},o=a;var s=n(45718);const l={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=>{const e=t.match(l.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return s.default.channel.clamp.h(.9*parseFloat(t));case"rad":return s.default.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.default.channel.clamp.h(360*parseFloat(t))}}return s.default.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(l.re);if(!n)return;const[,i,a,o,c,h]=n;return r.default.set({h:l._hue2deg(i),s:s.default.channel.clamp.s(parseFloat(a)),l:s.default.channel.clamp.l(parseFloat(o)),a:c?s.default.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${s.default.lang.round(e)}, ${s.default.lang.round(n)}%, ${s.default.lang.round(r)}%, ${i})`:`hsl(${s.default.lang.round(e)}, ${s.default.lang.round(n)}%, ${s.default.lang.round(r)}%)`}},c=l,h={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();const e=h.colors[t];if(e)return o.parse(e)},stringify:t=>{const e=o.stringify(t);for(const t in h.colors)if(h.colors[t]===e)return t}},u=h,f={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=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(f.re);if(!n)return;const[,i,a,o,l,c,h,u,d]=n;return r.default.set({r:s.default.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:s.default.channel.clamp.g(l?2.55*parseFloat(o):parseFloat(o)),b:s.default.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?s.default.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${s.default.lang.round(e)}, ${s.default.lang.round(n)}, ${s.default.lang.round(r)}, ${s.default.lang.round(i)})`:`rgb(${s.default.lang.round(e)}, ${s.default.lang.round(n)}, ${s.default.lang.round(r)})`}},d=f,p={format:{keyword:h,hex:o,rgb:f,rgba:f,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=o.parse(t)||d.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(i.TYPE.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?d.stringify(t):o.stringify(t)},g=p},64607(t,e,n){n.r(e),n.d(e,{DEC2HEX:()=>i,TYPE:()=>a});var r=n(45718);const i={};for(let t=0;t<=255;t++)i[t]=r.default.unit.dec2hex(t);const a={ALL:0,RGB:1,HSL:2}},85944(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(45718),i=n(11028);const a=(t,e,n)=>{const a=i.default.parse(t),o=a[e],s=r.default.channel.clamp[e](o+n);return o!==s&&(a[e]=s),i.default.stringify(a)}},36135(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(45718),i=n(11028);const a=(t,e)=>{const n=i.default.parse(t);for(const t in e)n[t]=r.default.channel.clamp[t](e[t]);return i.default.stringify(n)}},87708(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(85944);const i=(t,e)=>(0,r.default)(t,"l",-e)},1942(t,e,n){n.d(e,{default:()=>o}),n.r(e);var r=n(45718),i=n(11028);const a=t=>(t=>{const{r:e,g:n,b:a}=i.default.parse(t),o=.2126*r.default.channel.toLinear(e)+.7152*r.default.channel.toLinear(n)+.0722*r.default.channel.toLinear(a);return r.default.lang.round(o)})(t)>=.5,o=t=>!a(t)},47964(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(85944);const i=(t,e)=>(0,r.default)(t,"l",e)},62209(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(45718),i=n(63545),a=n(11028),o=n(36135);const s=(t,e,n=0,s=1)=>{if("number"!=typeof t)return(0,o.default)(t,{a:e});const l=i.default.set({r:r.default.channel.clamp.r(t),g:r.default.channel.clamp.g(e),b:r.default.channel.clamp.b(n),a:r.default.channel.clamp.a(s)});return a.default.stringify(l)}},45718(t,e,n){n.d(e,{default:()=>i}),n.r(e);const r={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=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},i)=>{if(!e)return 2.55*n;t/=360,e/=100;const a=(n/=100)<.5?n*(1+e):n+e-n*e,o=2*n-a;switch(i){case"r":return 255*r.hue2rgb(o,a,t+1/3);case"g":return 255*r.hue2rgb(o,a,t);case"b":return 255*r.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),o=(i+a)/2;if("l"===r)return 100*o;if(i===a)return 0;const s=i-a;if("s"===r)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-n)/s+(e<n?6:0));case e:return 60*((n-t)/s+2);case n:return 60*((t-e)/s+4);default:return-1}}},i={channel:r,lang:{clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},6096(t,e,n){n.d(e,{default:()=>s}),n.r(e);var r=n(26979);const i=function(t,e){for(var n=t.length;n--;)if((0,r.default)(t[n][0],e))return n;return-1};var a=Array.prototype.splice;function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}o.prototype.clear=function(){this.__data__=[],this.size=0},o.prototype.delete=function(t){var e=this.__data__,n=i(e,t);return!(n<0||(n==e.length-1?e.pop():a.call(e,n,1),--this.size,0))},o.prototype.get=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]},o.prototype.has=function(t){return i(this.__data__,t)>-1},o.prototype.set=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const s=o},25436(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(50123),i=n(39600);const a=(0,r.default)(i.default,"Map")},13269(t,e,n){n.d(e,{default:()=>f}),n.r(e);const r=(0,n(50123).default)(Object,"create");var i=Object.prototype.hasOwnProperty;var a=Object.prototype.hasOwnProperty;function o(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}o.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},o.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},o.prototype.get=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0},o.prototype.has=function(t){var e=this.__data__;return r?void 0!==e[t]:a.call(e,t)},o.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};const s=o;var l=n(6096),c=n(25436);const h=function(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(c.default||l.default),string:new s}},u.prototype.delete=function(t){var e=h(this,t).delete(t);return this.size-=e?1:0,e},u.prototype.get=function(t){return h(this,t).get(t)},u.prototype.has=function(t){return h(this,t).has(t)},u.prototype.set=function(t,e){var n=h(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const f=u},28574(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(50123),i=n(39600);const a=(0,r.default)(i.default,"Set")},36781(t,e,n){n.d(e,{default:()=>s}),n.r(e);var r=n(6096);var i=n(25436),a=n(13269);function o(t){var e=this.__data__=new r.default(t);this.size=e.size}o.prototype.clear=function(){this.__data__=new r.default,this.size=0},o.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},o.prototype.get=function(t){return this.__data__.get(t)},o.prototype.has=function(t){return this.__data__.has(t)},o.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.default){var o=n.__data__;if(!i.default||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a.default(o)}return n.set(t,e),this.size=n.size,this};const s=o},83516(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=n(39600).default.Symbol},97913(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=n(39600).default.Uint8Array},77252(t,e,n){n.d(e,{default:()=>c}),n.r(e);var r=n(88748),i=n(96956),a=n(34517),o=n(85378),s=n(92888),l=Object.prototype.hasOwnProperty;const c=function(t,e){var n=(0,i.default)(t),c=!n&&(0,r.default)(t),h=!n&&!c&&(0,a.default)(t),u=!n&&!c&&!h&&(0,s.default)(t),f=n||c||h||u,d=f?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],p=d.length;for(var g in t)!e&&!l.call(t,g)||f&&("length"==g||h&&("offset"==g||"parent"==g)||u&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||(0,o.default)(g,p))||d.push(g);return d}},76124(t,e,n){n.r(e),n.d(e,{default:()=>o});var r=n(99271),i=n(26979),a=Object.prototype.hasOwnProperty;const o=function(t,e,n){var o=t[e];a.call(t,e)&&(0,i.default)(o,n)&&(void 0!==n||e in t)||(0,r.default)(t,e,n)}},99271(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(61758);const i=function(t,e,n){"__proto__"==e&&r.default?(0,r.default)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},2369(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(97942),i=Object.create;const a=function(){function t(){}return function(e){if(!(0,r.default)(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}()},22857(t,e,n){n.d(e,{default:()=>r}),n.r(e);const r=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[++r];if(!1===e(i[s],s,i))break}return t}},4044(t,e,n){n.d(e,{default:()=>h}),n.r(e);var r=n(83516),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r.default?r.default.toStringTag:void 0;var l=Object.prototype.toString;var c=r.default?r.default.toStringTag:void 0;const h=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}(t):function(t){return l.call(t)}(t)}},68282(t,e,n){n.d(e,{default:()=>o}),n.r(e);var r=n(71140);const i=(0,n(67244).default)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const o=function(t){if(!(0,r.default)(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},50695(t,e,n){n.r(e),n.d(e,{default:()=>o});var r=n(14151),i=n(16264),a=n(97649);const o=function(t,e){return(0,a.default)((0,i.default)(t,e,r.default),t+"")}},58126(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return function(e){return t(e)}}},88724(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(97913);const i=function(t){var e=new t.constructor(t.byteLength);return new r.default(e).set(new r.default(t)),e}},521(t,e,n){n.r(e),n.d(e,{default:()=>l});var r=n(39600),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i?r.default.Buffer:void 0,s=o?o.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},65246(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(88724);const i=function(t,e){var n=e?(0,r.default)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},80084(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},28078(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(76124),i=n(99271);const a=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,l=e.length;++s<l;){var c=e[s],h=a?a(n[c],t[c],c,n,t):void 0;void 0===h&&(h=t[c]),o?(0,i.default)(n,c,h):(0,r.default)(n,c,h)}return n}},98050(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(50695),i=n(6473);const a=function(t){return(0,r.default)(function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&(0,i.default)(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var l=n[r];l&&t(e,l,r,o)}return e})}},61758(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(50123);const i=function(){try{var t=(0,r.default)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},36713(t,e,n){n.r(e),n.d(e,{default:()=>r});const r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},50123(t,e,n){n.d(e,{default:()=>m}),n.r(e);var r=n(50405);const i=n(39600).default["__core-js_shared__"];var a,o=(a=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";var s=n(97942),l=n(1548),c=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,f=h.toString,d=u.hasOwnProperty,p=RegExp("^"+f.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(t){return!(!(0,s.default)(t)||(e=t,o&&o in e))&&((0,r.default)(t)?p:c).test((0,l.default)(t));var e},m=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return g(n)?n:void 0}},12497(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=(0,n(67244).default)(Object.getPrototypeOf,Object)},97342(t,e,n){n.d(e,{default:()=>k}),n.r(e);var r=n(50123),i=n(39600);const a=(0,r.default)(i.default,"DataView");var o=n(25436);const s=(0,r.default)(i.default,"Promise");var l=n(28574);const c=(0,r.default)(i.default,"WeakMap");var h=n(4044),u=n(1548),f="[object Map]",d="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.default)(a),b=(0,u.default)(o.default),x=(0,u.default)(s),_=(0,u.default)(l.default),v=(0,u.default)(c),w=h.default;(a&&w(new a(new ArrayBuffer(1)))!=m||o.default&&w(new o.default)!=f||s&&w(s.resolve())!=d||l.default&&w(new l.default)!=p||c&&w(new c)!=g)&&(w=function(t){var e=(0,h.default)(t),n="[object Object]"==e?t.constructor:void 0,r=n?(0,u.default)(n):"";if(r)switch(r){case y:return m;case b:return f;case x:return d;case _:return p;case v:return g}return e});const k=w},90190(t,e,n){n.r(e),n.d(e,{default:()=>o});var r=n(2369),i=n(12497),a=n(71140);const o=function(t){return"function"!=typeof t.constructor||(0,a.default)(t)?{}:(0,r.default)((0,i.default)(t))}},85378(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},6473(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(26979),i=n(31475),a=n(85378),o=n(97942);const s=function(t,e,n){if(!(0,o.default)(n))return!1;var s=typeof e;return!!("number"==s?(0,i.default)(n)&&(0,a.default)(e,n.length):"string"==s&&e in n)&&(0,r.default)(n[e],t)}},71140(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=Object.prototype;const i=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},10248(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(36713),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i&&r.default.process;const s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}()},67244(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t,e){return function(n){return t(e(n))}}},16264(t,e,n){n.d(e,{default:()=>i}),n.r(e);var r=Math.max;const i=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,o=r(i.length-e,0),s=Array(o);++a<o;)s[a]=i[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=i[a];return l[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,l)}}},39600(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(36713),i="object"==typeof self&&self&&self.Object===Object&&self;const a=r.default||i||Function("return this")()},97649(t,e,n){n.d(e,{default:()=>l}),n.r(e);var r=n(47845),i=n(61758),a=n(14151);const o=i.default?function(t,e){return(0,i.default)(t,"toString",{configurable:!0,enumerable:!1,value:(0,r.default)(e),writable:!0})}:a.default;var s=Date.now;const l=(c=o,h=0,u=0,function(){var t=s(),e=16-(t-u);if(u=t,e>0){if(++h>=800)return arguments[0]}else h=0;return c.apply(void 0,arguments)});var c,h,u},1548(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=Function.prototype.toString;const i=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},47845(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return function(){return t}}},26979(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},14151(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return t}},88748(t,e,n){n.d(e,{default:()=>h}),n.r(e);var r=n(4044),i=n(47313);const a=function(t){return(0,i.default)(t)&&"[object Arguments]"==(0,r.default)(t)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable,c=a(function(){return arguments}())?a:function(t){return(0,i.default)(t)&&s.call(t,"callee")&&!l.call(t,"callee")};const h=c},96956(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=Array.isArray},31475(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(50405),i=n(47893);const a=function(t){return null!=t&&(0,i.default)(t.length)&&!(0,r.default)(t)}},40376(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(31475),i=n(47313);const a=function(t){return(0,i.default)(t)&&(0,r.default)(t)}},34517(t,e,n){n.d(e,{default:()=>s}),n.r(e);var r=n(39600);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i?r.default.Buffer:void 0;const s=(o?o.isBuffer:void 0)||function(){return!1}},75992(t,e,n){n.r(e),n.d(e,{default:()=>f});var r=n(68282),i=n(97342),a=n(88748),o=n(96956),s=n(31475),l=n(34517),c=n(71140),h=n(92888),u=Object.prototype.hasOwnProperty;const f=function(t){if(null==t)return!0;if((0,s.default)(t)&&((0,o.default)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.default)(t)||(0,h.default)(t)||(0,a.default)(t)))return!t.length;var e=(0,i.default)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.default)(t))return!(0,r.default)(t).length;for(var n in t)if(u.call(t,n))return!1;return!0}},50405(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(4044),i=n(97942);const a=function(t){if(!(0,i.default)(t))return!1;var e=(0,r.default)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},47893(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},97942(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},47313(t,e,n){n.r(e),n.d(e,{default:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},92888(t,e,n){n.d(e,{default:()=>h}),n.r(e);var r=n(4044),i=n(47893),a=n(47313),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var s=n(58126),l=n(10248),c=l.default&&l.default.isTypedArray;const h=c?(0,s.default)(c):function(t){return(0,a.default)(t)&&(0,i.default)(t.length)&&!!o[(0,r.default)(t)]}},81594(t,e,n){n.d(e,{default:()=>c}),n.r(e);var r=n(77252),i=n(97942),a=n(71140);var o=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,i.default)(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=(0,a.default)(t),n=[];for(var r in t)("constructor"!=r||!e&&o.call(t,r))&&n.push(r);return n};var l=n(31475);const c=function(t){return(0,l.default)(t)?(0,r.default)(t,!0):s(t)}},39645(t,e,n){n.r(e),n.d(e,{default:()=>a});var r=n(13269);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r.default),n}i.Cache=r.default;const a=i},22937(t,e,n){n.d(e,{default:()=>F}),n.r(e);var r=n(36781),i=n(99271),a=n(26979);const o=function(t,e,n){(void 0!==n&&!(0,a.default)(t[e],n)||void 0===n&&!(e in t))&&(0,i.default)(t,e,n)};var s=n(22857),l=n(521),c=n(65246),h=n(80084),u=n(90190),f=n(88748),d=n(96956),p=n(40376),g=n(34517),m=n(50405),y=n(97942),b=n(4044),x=n(12497),_=n(47313),v=Function.prototype,w=Object.prototype,k=v.toString,C=w.hasOwnProperty,S=k.call(Object);var T=n(92888);const M=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var A=n(28078),B=n(81594);const L=function(t,e,n,r,i,a,s){var v,w=M(t,n),L=M(e,n),E=s.get(L);if(E)o(t,n,E);else{var F=a?a(w,L,n+"",t,e,s):void 0,$=void 0===F;if($){var O=(0,d.default)(L),N=!O&&(0,g.default)(L),D=!O&&!N&&(0,T.default)(L);F=L,O||N||D?(0,d.default)(w)?F=w:(0,p.default)(w)?F=(0,h.default)(w):N?($=!1,F=(0,l.default)(L,!0)):D?($=!1,F=(0,c.default)(L,!0)):F=[]:function(t){if(!(0,_.default)(t)||"[object Object]"!=(0,b.default)(t))return!1;var e=(0,x.default)(t);if(null===e)return!0;var n=C.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&k.call(n)==S}(L)||(0,f.default)(L)?(F=w,(0,f.default)(w)?(v=w,F=(0,A.default)(v,(0,B.default)(v))):(0,y.default)(w)&&!(0,m.default)(w)||(F=(0,u.default)(L))):$=!1}$&&(s.set(L,F),i(F,L,r,a,s),s.delete(L)),o(t,n,F)}},E=function t(e,n,i,a,l){e!==n&&(0,s.default)(n,function(s,c){if(l||(l=new r.default),(0,y.default)(s))L(e,n,c,i,t,a,l);else{var h=a?a(M(e,c),s,c+"",e,n,l):void 0;void 0===h&&(h=s),o(e,c,h)}},B.default)},F=(0,n(98050).default)(function(t,e,n){E(t,e,n)})},37710(t,e,n){n.r(e),n.d(e,{package_default:()=>r});var r={name:"mermaid",version:"11.12.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}},54141(t,e,n){n.d(e,{UnknownDiagramError:()=>y,addDirective:()=>rt,assignWithDepth_default:()=>C,calculateMathMLDimensions:()=>$t,clear:()=>Zt,commonDb_exports:()=>Ut,common_default:()=>Dt,configureSvgSize:()=>Pt,defaultConfig:()=>U,defaultConfig2:()=>se,defaultConfig_default:()=>j,detectType:()=>x,detectors:()=>b,directiveRegex:()=>g,evaluate:()=>kt,frontMatterRegex:()=>p,getAccDescription:()=>te,getAccTitle:()=>Kt,getConfig:()=>et,getConfig2:()=>ae,getDiagram:()=>de,getDiagramLoader:()=>w,getDiagramTitle:()=>ne,getSiteConfig:()=>J,getThemeVariables:()=>$,getUrl:()=>wt,getUserDefinedConfig:()=>ct,hasKatex:()=>Ft,lineBreakRegex:()=>ht,parseGenericTypes:()=>Tt,registerDiagram:()=>fe,registerLazyLoadedDiagrams:()=>_,renderKatexSanitized:()=>Nt,reset:()=>it,sanitizeDirective:()=>W,sanitizeText:()=>mt,sanitizeText2:()=>le,saveConfigFromInitialize:()=>Q,setAccDescription:()=>Jt,setAccTitle:()=>Qt,setConfig:()=>tt,setConfig2:()=>oe,setDiagramTitle:()=>ee,setSiteConfig:()=>Z,setupGraphViewbox:()=>Rt,setupGraphViewbox2:()=>ce,styles_default:()=>Ht,themes_default:()=>I,updateSiteConfig:()=>K}),n.r(e);var r=n(60162),i=n(11028),a=n(36135);const o=(t,e)=>{const n=i.default.parse(t),r={};for(const t in e)e[t]&&(r[t]=n[t]+e[t]);return(0,a.default)(t,r)};var s=n(62209);const l=(t,e=100)=>{const n=i.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,((t,e,n=50)=>{const{r,g:a,b:o,a:l}=i.default.parse(t),{r:c,g:h,b:u,a:f}=i.default.parse(e),d=n/100,p=2*d-1,g=l-f,m=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,y=1-m,b=r*m+c*y,x=a*m+h*y,_=o*m+u*y,v=l*d+f*(1-d);return(0,s.default)(b,x,_,v)})(n,t,e)};var c,h=n(87708),u=n(47964),f=n(1942),d=n(97519),p=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,g=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,m=/\s*%%.*\n/gm,y=class extends Error{static{(0,r.__name)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},b={},x=(0,r.__name)(function(t,e){t=t.replace(p,"").replace(g,"").replace(m,"\n");for(const[n,{detector:r}]of Object.entries(b))if(r(t,e))return n;throw new y(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),_=(0,r.__name)((...t)=>{for(const{id:e,detector:n,loader:r}of t)v(e,n,r)},"registerLazyLoadedDiagrams"),v=(0,r.__name)((t,e,n)=>{b[t]&&r.log.warn(`Detector with key ${t} already exists. Overwriting.`),b[t]={detector:e,loader:n},r.log.debug(`Detector with key ${t} added${n?" with loader":""}`)},"addDetector"),w=(0,r.__name)(t=>b[t].loader,"getDiagramLoader"),k=(0,r.__name)((t,e,{depth:n=2,clobber:r=!1}={})=>{const i={depth:n,clobber:r};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>k(t,e,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||n<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(i=>{"object"!=typeof e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(r||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=k(t[i],e[i],{depth:n-1,clobber:r}))}),t)},"assignWithDepth"),C=k,S="#ffffff",T="#f2f2f2",M=(0,r.__name)((t,e)=>o(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),A=class{static{(0,r.__name)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(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?(0,h.default)(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||this.actorBorder,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||(0,h.default)(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||(0,u.default)(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.vertLineColor=this.vertLineColor||"navy",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.darkMode?(this.rowOdd=this.rowOdd||(0,h.default)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,h.default)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.default)(this.mainBkg,5)),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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.default)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||o(this.primaryColor,{h:64}),this.fillType3=this.fillType3||o(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||o(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||o(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||o(this.primaryColor,{h:128}),this.fillType7=this.fillType7||o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-10}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)):(this.git0=(0,h.default)(this.git0,25),this.git1=(0,h.default)(this.git1,25),this.git2=(0,h.default)(this.git2,25),this.git3=(0,h.default)(this.git3,25),this.git4=(0,h.default)(this.git4,25),this.git5=(0,h.default)(this.git5,25),this.git6=(0,h.default)(this.git6,25),this.git7=(0,h.default)(this.git7,25)),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B=(0,r.__name)(t=>{const e=new A;return e.calculate(t),e},"getThemeVariables"),L=class{static{(0,r.__name)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.default)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=l(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(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=(0,u.default)(l("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.default)(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=(0,h.default)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,h.default)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.default)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.default)(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.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,h.default)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,u.default)(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=(0,u.default)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,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=(0,u.default)(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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,u.default)(this.secondaryColor,20),this.git1=(0,u.default)(this.pie2||this.secondaryColor,20),this.git2=(0,u.default)(this.pie3||this.tertiaryColor,20),this.git3=(0,u.default)(this.pie4||o(this.primaryColor,{h:-30}),20),this.git4=(0,u.default)(this.pie5||o(this.primaryColor,{h:-60}),20),this.git5=(0,u.default)(this.pie6||o(this.primaryColor,{h:-90}),10),this.git6=(0,u.default)(this.pie7||o(this.primaryColor,{h:60}),10),this.git7=(0,u.default)(this.pie8||o(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,u.default)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,u.default)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},E=(0,r.__name)(t=>{const e=new L;return e.calculate(t),e},"getThemeVariables"),F=class{static{(0,r.__name)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(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="rgba(232,232,232, 0.8)",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="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="#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.vertLineColor="calculated",this.sectionBkgColor=(0,s.default)(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.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.default)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.default)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.default)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||l(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||l(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,u.default)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.default)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.default)(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||o(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||o(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)):(this.git0=(0,h.default)(this.git0,25),this.git1=(0,h.default)(this.git1,25),this.git2=(0,h.default)(this.git2,25),this.git3=(0,h.default)(this.git3,25),this.git4=(0,h.default)(this.git4,25),this.git5=(0,h.default)(this.git5,25),this.git6=(0,h.default)(this.git6,25),this.git7=(0,h.default)(this.git7,25)),this.gitInv0=this.gitInv0||(0,h.default)(l(this.git0),25),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},$=(0,r.__name)(t=>{const e=new F;return e.calculate(t),e},"getThemeVariables"),O=class{static{(0,r.__name)(this,"Theme")}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=(0,u.default)("#cde498",10),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(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="calculated",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.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,h.default)(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.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.default)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.default)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.default)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.default)(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||o(this.primaryColor,{l:-30}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||o(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)):(this.git0=(0,h.default)(this.git0,25),this.git1=(0,h.default)(this.git1,25),this.git2=(0,h.default)(this.git2,25),this.git3=(0,h.default)(this.git3,25),this.git4=(0,h.default)(this.git4,25),this.git5=(0,h.default)(this.git5,25),this.git6=(0,h.default)(this.git6,25),this.git7=(0,h.default)(this.git7,25)),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||l(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||l(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},N=(0,r.__name)(t=>{const e=new O;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,r.__name)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.default)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(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=this.actorBorder,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.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,u.default)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.default)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||l(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,u.default)(this.contrast,30),this.sectionBkgColor2=(0,u.default)(this.contrast,30),this.taskBorderColor=(0,h.default)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,u.default)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,h.default)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,u.default)(this.quadrant1Fill):(0,h.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,h.default)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||o(this.primaryColor,{h:-30}),this.git4=this.pie5||o(this.primaryColor,{h:-60}),this.git5=this.pie6||o(this.primaryColor,{h:-90}),this.git6=this.pie7||o(this.primaryColor,{h:60}),this.git7=this.pie8||o(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||l(this.git0),this.gitInv1=this.gitInv1||l(this.git1),this.gitInv2=this.gitInv2||l(this.git2),this.gitInv3=this.gitInv3||l(this.git3),this.gitInv4=this.gitInv4||l(this.git4),this.gitInv5=this.gitInv5||l(this.git5),this.gitInv6=this.gitInv6||l(this.git6),this.gitInv7=this.gitInv7||l(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||T}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},I={base:{getThemeVariables:B},dark:{getThemeVariables:E},default:{getThemeVariables:$},forest:{getThemeVariables:N},neutral:{getThemeVariables:(0,r.__name)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables")}},z={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,inheritDir:!1},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,maxLabelWidth:360,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"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!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,nodeSpacing:140,rankSpacing:80,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,showDataLabel:!1,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,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},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},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",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","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},P={...z,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:I.default.getThemeVariables(),sequence:{...z.sequence,messageFont:(0,r.__name)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,r.__name)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,r.__name)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...z.gantt,tickInterval:void 0,useWidth:void 0},c4:{...z.c4,useWidth:void 0,personFont:(0,r.__name)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...z.flowchart,inheritDir:!1},external_personFont:(0,r.__name)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,r.__name)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,r.__name)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,r.__name)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,r.__name)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,r.__name)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,r.__name)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,r.__name)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,r.__name)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,r.__name)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,r.__name)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,r.__name)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,r.__name)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,r.__name)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,r.__name)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,r.__name)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,r.__name)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,r.__name)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,r.__name)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,r.__name)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,r.__name)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...z.pie,useWidth:984},xyChart:{...z.xyChart,useWidth:void 0},requirement:{...z.requirement,useWidth:void 0},packet:{...z.packet},radar:{...z.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},R=(0,r.__name)((t,e="")=>Object.keys(t).reduce((n,r)=>Array.isArray(t[r])?n:"object"==typeof t[r]&&null!==t[r]?[...n,e+r,...R(t[r],"")]:[...n,e+r],[]),"keyify"),q=new Set(R(P,"")),j=P,W=(0,r.__name)(t=>{if(r.log.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>W(t));else{for(const e of Object.keys(t)){if(r.log.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!q.has(e)||null==t[e]){r.log.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){r.log.debug("sanitizing object",e),W(t[e]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const i of n)e.includes(i)&&(r.log.debug("sanitizing css option",e),t[e]=H(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const n=t.themeVariables[e];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}r.log.debug("After sanitization",t)}},"sanitizeDirective"),H=(0,r.__name)(t=>{let e=0,n=0;for(const r of t){if(e<n)return"{ /* ERROR: Unbalanced CSS */ }";"{"===r?e++:"}"===r&&n++}return e!==n?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),U=Object.freeze(j),Y=C({},U),G=[],V=C({},U),X=(0,r.__name)((t,e)=>{let n=C({},t),r={};for(const t of e)nt(t),r=C(r,t);if(n=C(n,r),r.theme&&r.theme in I){const t=C({},c),e=C(t.themeVariables||{},r.themeVariables);n.theme&&n.theme in I&&(n.themeVariables=I[n.theme].getThemeVariables(e))}return lt(V=n),V},"updateCurrentConfig"),Z=(0,r.__name)(t=>(Y=C({},U),Y=C(Y,t),t.theme&&I[t.theme]&&(Y.themeVariables=I[t.theme].getThemeVariables(t.themeVariables)),X(Y,G),Y),"setSiteConfig"),Q=(0,r.__name)(t=>{c=C({},t)},"saveConfigFromInitialize"),K=(0,r.__name)(t=>(Y=C(Y,t),X(Y,G),Y),"updateSiteConfig"),J=(0,r.__name)(()=>C({},Y),"getSiteConfig"),tt=(0,r.__name)(t=>(lt(t),C(V,t),et()),"setConfig"),et=(0,r.__name)(()=>C({},V),"getConfig"),nt=(0,r.__name)(t=>{t&&(["secure",...Y.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(r.log.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&nt(t[e])}))},"sanitize"),rt=(0,r.__name)(t=>{W(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),G.push(t),X(Y,G)},"addDirective"),it=(0,r.__name)((t=Y)=>{X(t,G=[])},"reset"),at={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ot={},st=(0,r.__name)(t=>{ot[t]||(r.log.warn(at[t]),ot[t]=!0)},"issueWarning"),lt=(0,r.__name)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&st("LAZY_LOAD_DEPRECATED")},"checkConfig"),ct=(0,r.__name)(()=>{let t={};c&&(t=C(t,c));for(const e of G)t=C(t,e);return t},"getUserDefinedConfig"),ht=/<br\s*\/?>/gi,ut=(0,r.__name)(t=>t?vt(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ft=(()=>{let t=!1;return()=>{t||(dt(),t=!0)}})();function dt(){const t="data-temp-href-target";d.default.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),d.default.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,r.__name)(dt,"setupDompurifyHooks");var pt=(0,r.__name)(t=>(ft(),d.default.sanitize(t)),"removeScript"),gt=(0,r.__name)((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const n=e.securityLevel;"antiscript"===n||"strict"===n?t=pt(t):"loose"!==n&&(t=(t=(t=vt(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=_t(t))}return t},"sanitizeMore"),mt=(0,r.__name)((t,e)=>t?t=e.dompurifyConfig?d.default.sanitize(gt(t,e),e.dompurifyConfig).toString():d.default.sanitize(gt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),yt=(0,r.__name)((t,e)=>"string"==typeof t?mt(t,e):t.flat().map(t=>mt(t,e)),"sanitizeTextOrArray"),bt=(0,r.__name)(t=>ht.test(t),"hasBreaks"),xt=(0,r.__name)(t=>t.split(ht),"splitBreaks"),_t=(0,r.__name)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),vt=(0,r.__name)(t=>t.replace(ht,"#br#"),"breakToPlaceholder"),wt=(0,r.__name)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),kt=(0,r.__name)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),Ct=(0,r.__name)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),St=(0,r.__name)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),Tt=(0,r.__name)(function(t){const e=t.split(/(,)/),n=[];for(let t=0;t<e.length;t++){let r=e[t];if(","===r&&t>0&&t+1<e.length){const i=e[t-1],a=e[t+1];At(i,a)&&(r=i+","+a,t++,n.pop())}n.push(Bt(r))}return n.join("")},"parseGenericTypes"),Mt=(0,r.__name)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),At=(0,r.__name)((t,e)=>{const n=Mt(t,"~"),r=Mt(e,"~");return 1===n&&1===r},"shouldCombineSets"),Bt=(0,r.__name)(t=>{const e=Mt(t,"~");let n=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),n=!0);const r=[...t];let i=r.indexOf("~"),a=r.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)r[i]="<",r[a]=">",i=r.indexOf("~"),a=r.lastIndexOf("~");return n&&r.unshift("~"),r.join("")},"processSet"),Lt=(0,r.__name)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Et=/\$\$(.*)\$\$/g,Ft=(0,r.__name)(t=>(t.match(Et)?.length??0)>0,"hasKatex"),$t=(0,r.__name)(async(t,e)=>{const n=document.createElement("div");n.innerHTML=await Nt(t,e),n.id="katex-temp",n.style.visibility="hidden",n.style.position="absolute",n.style.top="0";const r=document.querySelector("body");r?.insertAdjacentElement("beforeend",n);const i={width:n.clientWidth,height:n.clientHeight};return n.remove(),i},"calculateMathMLDimensions"),Ot=(0,r.__name)(async(t,e)=>{if(!Ft(t))return t;if(!(Lt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Et,"MathML is unsupported in this environment.");{const{default:r}=await n.e(9263).then(n.bind(n,9263)),i=e.forceLegacyMathML||!Lt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ht).map(t=>Ft(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Et,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Nt=(0,r.__name)(async(t,e)=>mt(await Ot(t,e),e),"renderKatexSanitized"),Dt={getRows:ut,sanitizeText:mt,sanitizeTextOrArray:yt,hasBreaks:bt,splitBreaks:xt,lineBreakRegex:ht,removeScript:pt,getUrl:wt,evaluate:kt,getMax:Ct,getMin:St},It=(0,r.__name)(function(t,e){for(let n of e)t.attr(n[0],n[1])},"d3Attrs"),zt=(0,r.__name)(function(t,e,n){let r=new Map;return n?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r},"calculateSvgSizeAttrs"),Pt=(0,r.__name)(function(t,e,n,r){const i=zt(e,n,r);It(t,i)},"configureSvgSize"),Rt=(0,r.__name)(function(t,e,n,i){const a=e.node().getBBox(),o=a.width,s=a.height;r.log.info(`SVG bounds: ${o}x${s}`,a);let l=0,c=0;r.log.info(`Graph bounds: ${l}x${c}`,t),l=o+2*n,c=s+2*n,r.log.info(`Calculated bounds: ${l}x${c}`),Pt(e,c,l,i);const h=`${a.x-n} ${a.y-n} ${a.width+2*n} ${a.height+2*n}`;e.attr("viewBox",h)},"setupGraphViewbox"),qt={},jt=(0,r.__name)((t,e,n)=>{let i="";return t in qt&&qt[t]?i=qt[t](n):r.log.warn(`No theme found for ${t}`),` & {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n fill: ${n.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${n.errorBkgColor};\n }\n & .error-text {\n fill: ${n.errorTextColor};\n stroke: ${n.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${n.lineColor};\n stroke: ${n.lineColor};\n }\n & .marker.cross {\n stroke: ${n.lineColor};\n }\n\n & svg {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`},"getStyles"),Wt=(0,r.__name)((t,e)=>{void 0!==e&&(qt[t]=e)},"addStylesForDiagram"),Ht=jt,Ut={};(0,r.__export)(Ut,{clear:()=>Zt,getAccDescription:()=>te,getAccTitle:()=>Kt,getDiagramTitle:()=>ne,setAccDescription:()=>Jt,setAccTitle:()=>Qt,setDiagramTitle:()=>ee});var Yt="",Gt="",Vt="",Xt=(0,r.__name)(t=>mt(t,et()),"sanitizeText"),Zt=(0,r.__name)(()=>{Yt="",Vt="",Gt=""},"clear"),Qt=(0,r.__name)(t=>{Yt=Xt(t).replace(/^\s+/g,"")},"setAccTitle"),Kt=(0,r.__name)(()=>Yt,"getAccTitle"),Jt=(0,r.__name)(t=>{Vt=Xt(t).replace(/\n\s+/g,"\n")},"setAccDescription"),te=(0,r.__name)(()=>Vt,"getAccDescription"),ee=(0,r.__name)(t=>{Gt=Xt(t)},"setDiagramTitle"),ne=(0,r.__name)(()=>Gt,"getDiagramTitle"),re=r.log,ie=r.setLogLevel,ae=et,oe=tt,se=U,le=(0,r.__name)(t=>mt(t,ae()),"sanitizeText"),ce=Rt,he=(0,r.__name)(()=>Ut,"getCommonDb"),ue={},fe=(0,r.__name)((t,e,n)=>{ue[t]&&re.warn(`Diagram with id ${t} already registered. Overwriting.`),ue[t]=e,n&&v(t,n),Wt(t,e.styles),e.injectUtils?.(re,ie,ae,le,ce,he(),()=>{})},"registerDiagram"),de=(0,r.__name)(t=>{if(t in ue)return ue[t];throw new pe(t)},"getDiagram"),pe=class extends Error{static{(0,r.__name)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},60162(t,e,n){n.r(e),n.d(e,{__export:()=>o,__name:()=>a,log:()=>l,setLogLevel:()=>c});var r=n(23464),i=Object.defineProperty,a=(t,e)=>i(t,"name",{value:e,configurable:!0}),o=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},c=a(function(t="fatal"){let e=s.fatal;"string"==typeof t?t.toLowerCase()in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,h("FATAL"),"color: orange"):console.log.bind(console,"",h("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,h("ERROR"),"color: orange"):console.log.bind(console,"",h("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,h("WARN"),"color: orange"):console.log.bind(console,"",h("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,h("INFO"),"color: lightblue"):console.log.bind(console,"",h("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,h("DEBUG"),"color: lightgreen"):console.log.bind(console,"",h("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,h("TRACE"),"color: lightgreen"):console.log.bind(console,"",h("TRACE")))},"setLogLevel"),h=a(t=>`%c${r().format("ss.SSS")} : ${t} : `,"format")},96540(t,e,n){n.r(e),n.d(e,{compileStyles:()=>o,isLabelStyle:()=>l,solidStateFill:()=>a,styles2String:()=>c,userNodeOverrides:()=>h});var r=n(54141),i=n(60162),a=(0,i.__name)(t=>{const{handDrawnSeed:e}=(0,r.getConfig2)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),o=(0,i.__name)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,i.__name)(t=>{const e=new Map;return t.forEach(t=>{const[n,r]=t.split(":");e.set(n.trim(),r?.trim())}),e},"styles2Map"),l=(0,i.__name)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,i.__name)(t=>{const{stylesArray:e}=o(t),n=[],r=[],i=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?n.push(t.join(":")+" !important"):(r.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:n.join(";"),nodeStyles:r.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),h=(0,i.__name)((t,e)=>{const{themeVariables:n,handDrawnSeed:i}=(0,r.getConfig2)(),{nodeBorder:a,mainBkg:s}=n,{stylesMap:l}=o(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:i,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,i.__name)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},70998(t,e,n){n.r(e),n.d(e,{getSubGraphTitleMargins:()=>r});var r=(0,n(60162).__name)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,n=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:e+n}},"getSubGraphTitleMargins")},92329(t,e,n){n.r(e),n.d(e,{selectSvgElement:()=>o});var r=n(54141),i=n(60162),a=n(79806),o=(0,i.__name)(t=>{const{securityLevel:e}=(0,r.getConfig2)();let n=(0,a.select)("body");if("sandbox"===e){const e=(0,a.select)(`#i${t}`),r=e.node()?.contentDocument??document;n=(0,a.select)(r.body)}return n.select(`#${t}`)},"selectSvgElement")},51437(t,e,n){n.r(e),n.d(e,{getLineFunctionsWithOffset:()=>l,markerOffsets:()=>i,markerOffsets2:()=>a});var r=n(60162),i={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},a={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function o(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=s(t),e=s(e);const[n,r]=[t.x,t.y],[i,a]=[e.x,e.y],o=i-n,l=a-r;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}(0,r.__name)(o,"calculateDeltaAndAngle");var s=(0,r.__name)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),l=(0,r.__name)(t=>({x:(0,r.__name)(function(e,n,r){let a=0;const l=s(r[0]).x<s(r[r.length-1]).x?"left":"right";if(0===n&&Object.hasOwn(i,t.arrowTypeStart)){const{angle:e,deltaX:n}=o(r[0],r[1]);a=i[t.arrowTypeStart]*Math.cos(e)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaX:n}=o(r[r.length-1],r[r.length-2]);a=i[t.arrowTypeEnd]*Math.cos(e)*(n>=0?1:-1)}const c=Math.abs(s(e).x-s(r[r.length-1]).x),h=Math.abs(s(e).y-s(r[r.length-1]).y),u=Math.abs(s(e).x-s(r[0]).x),f=Math.abs(s(e).y-s(r[0]).y),d=i[t.arrowTypeStart],p=i[t.arrowTypeEnd];if(c<p&&c>0&&h<p){let t=p+1-c;t*="right"===l?-1:1,a-=t}if(u<d&&u>0&&f<d){let t=d+1-u;t*="right"===l?-1:1,a+=t}return s(e).x+a},"x"),y:(0,r.__name)(function(e,n,r){let a=0;const l=s(r[0]).y<s(r[r.length-1]).y?"down":"up";if(0===n&&Object.hasOwn(i,t.arrowTypeStart)){const{angle:e,deltaY:n}=o(r[0],r[1]);a=i[t.arrowTypeStart]*Math.abs(Math.sin(e))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaY:n}=o(r[r.length-1],r[r.length-2]);a=i[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(n>=0?1:-1)}const c=Math.abs(s(e).y-s(r[r.length-1]).y),h=Math.abs(s(e).x-s(r[r.length-1]).x),u=Math.abs(s(e).y-s(r[0]).y),f=Math.abs(s(e).x-s(r[0]).x),d=i[t.arrowTypeStart],p=i[t.arrowTypeEnd];if(c<p&&c>0&&h<p){let t=p+1-c;t*="up"===l?-1:1,a-=t}if(u<d&&u>0&&f<d){let t=d+1-u;t*="up"===l?-1:1,a+=t}return s(e).y+a},"y")}),"getLineFunctionsWithOffset")},67099(t,e,n){n.d(e,{computeDimensionOfText:()=>ee,createText:()=>ae,getIconSVG:()=>jt,registerIconPacks:()=>Pt,replaceIconSubstring:()=>ie,unknownIcon:()=>Dt}),n.r(e);var r=n(82029),i=n(54141),a=n(60162);const o=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...s,...l}),h=Object.freeze({...c,body:"",hidden:!1});function u(t,e){const n=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}(t,e);for(const r in h)r in l?r in t&&!(r in n)&&(n[r]=l[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function f(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let a={};function o(t){a=u(r[t]||i[t],a)}return o(e),n.forEach(o),u(t,a)}const d=Object.freeze({width:null,height:null}),p=Object.freeze({...d,...l}),g=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const r=t.split(g);if(null===r||!r.length)return t;const i=[];let a=r.shift(),o=m.test(a);for(;;){if(o){const t=parseFloat(a);isNaN(t)?i.push(a):i.push(Math.ceil(t*e*n)/n)}else i.push(a);if(a=r.shift(),void 0===a)return i.join("");o=!o}}const b=/\sid="(\S+)"/g,x="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let _=0;var v=n(79806);var w={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function k(t){w=t}var C={exec:()=>null};function S(t,e=""){let n="string"==typeof t?t:t.source,r={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(M.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var T=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),M={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,B=/(?:[*+-]|\d{1,9}[.)])/,L=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,E=S(L).replace(/bull/g,B).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),F=S(L).replace(/bull/g,B).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,O=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,N=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",O).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),D=S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,B).getRegex(),I="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",z).replace("tag",I).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R=S($).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex(),q={blockquote:S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",R).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:N,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:A,html:P,lheading:E,list:D,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:R,table:C,text:/^[^\n]+/},j=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex(),W={...q,lheading:F,table:j,paragraph:S($).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",j).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",I).getRegex()},H={...q,html:S("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:C,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S($).replace("hr",A).replace("heading"," *#{1,6} *[^\n]").replace("lheading",E).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},U=/^( {2,}|\\)\n(?!\s*$)/,Y=/[\p{P}\p{S}]/u,G=/[\s\p{P}\p{S}]/u,V=/[^\s\p{P}\p{S}]/u,X=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,G).getRegex(),Z=/(?!~)[\p{P}\p{S}]/u,Q=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",T?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),K=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,J=S(K,"u").replace(/punct/g,Y).getRegex(),tt=S(K,"u").replace(/punct/g,Z).getRegex(),et="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nt=S(et,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,G).replace(/punct/g,Y).getRegex(),rt=S(et,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Z).getRegex(),it=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,G).replace(/punct/g,Y).getRegex(),at=S(/\\(punct)/,"gu").replace(/punct/g,Y).getRegex(),ot=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),st=S(z).replace("(?:--\x3e|$)","--\x3e").getRegex(),lt=S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",st).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ct=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ht=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ct).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ut=S(/^!?\[(label)\]\[(ref)\]/).replace("label",ct).replace("ref",O).getRegex(),ft=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",O).getRegex(),dt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pt={_backpedal:C,anyPunctuation:at,autolink:ot,blockSkip:Q,br:U,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:C,emStrongLDelim:J,emStrongRDelimAst:nt,emStrongRDelimUnd:it,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ht,nolink:ft,punctuation:X,reflink:ut,reflinkSearch:S("reflink|nolink(?!\\()","g").replace("reflink",ut).replace("nolink",ft).getRegex(),tag:lt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:C},gt={...pt,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",ct).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ct).getRegex()},mt={...pt,emStrongRDelimAst:rt,emStrongLDelim:tt,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dt).getRegex()},yt={...mt,br:S(U).replace("{2,}","*").getRegex(),text:S(mt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bt={normal:q,gfm:W,pedantic:H},xt={normal:pt,gfm:mt,breaks:yt,pedantic:gt},_t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vt=t=>_t[t];function wt(t,e){if(e){if(M.escapeTest.test(t))return t.replace(M.escapeReplace,vt)}else if(M.escapeTestNoEncode.test(t))return t.replace(M.escapeReplaceNoEncode,vt);return t}function kt(t){try{t=encodeURI(t).replace(M.percentDecode,"%")}catch{return null}return t}function Ct(t,e){let n=t.replace(M.findPipe,(t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(M.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(M.slashPipe,"|");return n}function St(t,e,n){let r=t.length;if(0===r)return"";let i=0;for(;i<r;){let a=t.charAt(r-i-1);if(a!==e||n){if(a===e||!n)break;i++}else i++}return t.slice(0,r-i)}function Tt(t,e,n,r,i){let a=e.href,o=e.title||null,s=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}var Mt=class{options;rules;lexer;constructor(t){this.options=t||w}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:St(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],n=function(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(null===r)return e;let i=r[1];return e.split("\n").map(t=>{let e=t.match(n.other.beginningSpace);if(null===e)return t;let[r]=e;return r.length>=i.length?t.slice(i.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=St(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:St(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=St(e[0],"\n").split("\n"),n="",r="",i=[];for(;t.length>0;){let e,a=!1,o=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))o.push(t[e]),a=!0;else{if(a)break;o.push(t[e])}t=t.slice(e);let s=o.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${s}`:s,r=r?`${r}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;let h=i.at(-1);if("code"===h?.type)break;if("blockquote"===h?.type){let e=h,a=e.raw+"\n"+t.join("\n"),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-e.raw.length)+o.raw,r=r.substring(0,r.length-e.text.length)+o.text;break}if("list"===h?.type){let e=h,a=e.raw+"\n"+t.join("\n"),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-h.raw.length)+o.raw,r=r.substring(0,r.length-e.raw.length)+o.raw,t=a.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let a=this.rules.other.listItemRegex(n),o=!1;for(;t;){let n=!1,r="",s="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,s=l.slice(u),u+=e[1].length),h&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){let e=this.rules.other.nextBulletRegex(u),n=this.rules.other.hrRegex(u),i=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),o=this.rules.other.htmlBeginRegex(u);for(;t;){let f,d=t.split("\n",1)[0];if(c=d,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),i.test(c)||a.test(c)||o.test(c)||e.test(c)||n.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=u||!c.trim())s+="\n"+f.slice(u);else{if(h||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||a.test(l)||n.test(l))break;s+="\n"+c}!h&&!c.trim()&&(h=!0),r+=d+"\n",t=t.substring(d.length+1),l=f.slice(u)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f,d=null;this.options.gfm&&(d=this.rules.other.listIsTask.exec(s),d&&(f="[ ] "!==d[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!d,checked:f,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++)if(this.lexer.state.top=!1,i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]),!i.loose){let e=i.items[t].tokens.filter(t=>"space"===t.type),n=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));i.loose=n}if(i.loose)for(let t=0;t<i.items.length;t++)i.items[t].loose=!0;return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Ct(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let t of r)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<n.length;t++)a.header.push({text:n[t],tokens:this.lexer.inline(n[t]),header:!0,align:a.align[t]});for(let t of i)a.rows.push(Ct(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=St(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let n=0;for(let r=0;r<t.length;r++)if("\\"===t[r])r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),Tt(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return Tt(n,t,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,i,a=[...r[0]].length-1,o=a,s=0,l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(r=l.exec(e));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){o+=i;continue}if((r[5]||r[6])&&a%3&&!((a+i)%3)){s+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+s);let e=[...r[0]][0].length,l=t.slice(0,a+r.index+e+i);if(Math.min(a,i)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let r;do{r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(r!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},At=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||w,this.options.tokenizer=this.options.tokenizer||new Mt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:M,block:bt.normal,inline:xt.normal};this.options.pedantic?(e.block=bt.pedantic,e.inline=xt.pedantic):this.options.gfm&&(e.block=bt.gfm,this.options.breaks?e.inline=xt.breaks:e.inline=xt.gfm),this.tokenizer.rules=e}static get rules(){return{block:bt,inline:xt}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(M.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){for(this.options.pedantic&&(t=t.replace(M.tabCharGlobal," ").replace(M.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let n=e.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},e.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let e,n=1/0,r=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},r),"number"==typeof e&&e>=0&&(n=Math.min(n,e))}),n<1/0&&n>=0&&(i=t.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=e.at(-1);n&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+r.raw,a.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(r),n=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let n=e.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,r=t,i=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(r));)t.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(r));)n=i[2]?i[2].length:0,r=r.slice(0,i.index+n)+"["+"a".repeat(i[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,o="";for(;t;){let n;if(a||(o=""),a=!1,this.options.extensions?.inline?.some(r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))continue;if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length);let r=e.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,r,o)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}let i=t;if(this.options.extensions?.startInline){let e,n=1/0,r=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},r),"number"==typeof e&&e>=0&&(n=Math.min(n,e))}),n<1/0&&n>=0&&(i=t.substring(0,n+1))}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0;let r=e.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Bt=class{options;parser;constructor(t){this.options=t||w}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(M.notSpaceStart)?.[0],i=t.replace(M.endingNewline,"")+"\n";return r?'<pre><code class="language-'+wt(r)+'">'+(n?i:wt(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:wt(i,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,n=t.start,r="";for(let e=0;e<t.items.length;e++){let n=t.items[e];r+=this.listitem(n)}let i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+wt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",n="";for(let e=0;e<t.header.length;e++)n+=this.tablecell(t.header[e]);e+=this.tablerow({text:n});let r="";for(let e=0;e<t.rows.length;e++){let i=t.rows[e];n="";for(let t=0;t<i.length;t++)n+=this.tablecell(i[t]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+r+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${wt(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),i=kt(t);if(null===i)return r;let a='<a href="'+(t=i)+'"';return e&&(a+=' title="'+wt(e)+'"'),a+=">"+r+"</a>",a}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=kt(t);if(null===i)return wt(n);let a=`<img src="${t=i}" alt="${n}"`;return e&&(a+=` title="${wt(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:wt(t.text)}},Lt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Et=class t{options;renderer;textRenderer;constructor(t){this.options=t||w,this.options.renderer=this.options.renderer||new Bt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Lt}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(t,e=!0){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let t=i,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){n+=e||"";continue}}let a=i;switch(a.type){case"space":n+=this.renderer.space(a);continue;case"hr":n+=this.renderer.hr(a);continue;case"heading":n+=this.renderer.heading(a);continue;case"code":n+=this.renderer.code(a);continue;case"table":n+=this.renderer.table(a);continue;case"blockquote":n+=this.renderer.blockquote(a);continue;case"list":n+=this.renderer.list(a);continue;case"html":n+=this.renderer.html(a);continue;case"def":n+=this.renderer.def(a);continue;case"paragraph":n+=this.renderer.paragraph(a);continue;case"text":{let i=a,o=this.renderer.text(i);for(;r+1<t.length&&"text"===t[r+1].type;)i=t[++r],o+="\n"+this.renderer.text(i);n+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}parseInline(t,e=this.renderer){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let t=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=t||"";continue}}let a=i;switch(a.type){case"escape":case"text":n+=e.text(a);break;case"html":n+=e.html(a);break;case"link":n+=e.link(a);break;case"image":n+=e.image(a);break;case"strong":n+=e.strong(a);break;case"em":n+=e.em(a);break;case"codespan":n+=e.codespan(a);break;case"br":n+=e.br(a);break;case"del":n+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}},Ft=class{options;block;constructor(t){this.options=t||w}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?At.lex:At.lexInline}provideParser(){return this.block?Et.parse:Et.parseInline}},$t=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Et;Renderer=Bt;TextRenderer=Lt;Lexer=At;Tokenizer=Mt;Hooks=Ft;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let t=r;for(let r of t.header)n=n.concat(this.walkTokens(r.tokens,e));for(let r of t.rows)for(let t of r)n=n.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=r;n=n.concat(this.walkTokens(t.items,e));break}default:{let t=r;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(r=>{let i=t[r].flat(1/0);n=n.concat(this.walkTokens(i,e))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),n.extensions=e),t.renderer){let e=this.defaults.renderer||new Bt(this.defaults);for(let n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,i=t.renderer[r],a=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Mt(this.defaults);for(let n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,i=t.tokenizer[r],a=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Ft;for(let n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,i=t.hooks[r],a=e[r];Ft.passThroughHooks.has(n)?e[r]=t=>{if(this.defaults.async&&Ft.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(e,t);return a.call(e,n)})();let r=i.call(e,t);return a.call(e,r)}:e[r]=(...t)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(e,t);return!1===n&&(n=await a.apply(e,t)),n})();let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,r=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(r.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return At.lex(t,e??this.defaults)}parser(t,e){return Et.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(e):e,r=await(i.hooks?await i.hooks.provideLexer():t?At.lex:At.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():t?Et.parse:Et.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let n=(i.hooks?i.hooks.provideLexer():t?At.lex:At.lexInline)(e,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():t?Et.parse:Et.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(t){return a(t)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+wt(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}};function Ot(t,e){return $t.parse(t,e)}Ot.options=Ot.setOptions=function(t){return $t.setOptions(t),Ot.defaults=$t.defaults,k(Ot.defaults),Ot},Ot.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Ot.defaults=w,Ot.use=function(...t){return $t.use(...t),Ot.defaults=$t.defaults,k(Ot.defaults),Ot},Ot.walkTokens=function(t,e){return $t.walkTokens(t,e)},Ot.parseInline=$t.parseInline,Ot.Parser=Et,Ot.parser=Et.parse,Ot.Renderer=Bt,Ot.TextRenderer=Lt,Ot.Lexer=At,Ot.lexer=At.lex,Ot.Tokenizer=Mt,Ot.Hooks=Ft,Ot.parse=Ot,Ot.options,Ot.setOptions,Ot.use,Ot.walkTokens,Ot.parseInline,Et.parse,At.lex;var Nt=n(8968),Dt={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},It=new Map,zt=new Map,Pt=(0,a.__name)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.log.debug("Registering icon pack:",e.name),"loader"in e)zt.set(e.name,e.loader);else{if(!("icons"in e))throw a.log.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');It.set(e.name,e.icons)}}},"registerIconPacks"),Rt=(0,a.__name)(async(t,e)=>{const n=((t,e,n,r="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:t};return e&&!o(a)?null:a}const a=i[0],s=a.split("-");if(s.length>1){const t={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!o(t)?null:t}if(n&&""===r){const t={provider:r,prefix:"",name:a};return e&&!o(t,n)?null:t}return null})(t,!0,void 0!==e);if(!n)throw new Error(`Invalid icon name: ${t}`);const r=n.prefix||e;if(!r)throw new Error(`Icon name must contain a prefix: ${t}`);let i=It.get(r);if(!i){const t=zt.get(r);if(!t)throw new Error(`Icon set not found: ${n.prefix}`);try{i={...await t(),prefix:r},It.set(r,i)}catch(t){throw a.log.error(t),new Error(`Failed to load icon set: ${n.prefix}`)}}const s=function(t,e){if(t.icons[e])return f(t,e,[]);const n=function(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);return(e||Object.keys(n).concat(Object.keys(r))).forEach(function t(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;const n=r[e]&&r[e].parent,a=n&&t(n);a&&(i[e]=[n].concat(a))}return i[e]}),i}(t,[e])[e];return n?f(t,e,n):null}(i,n.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),qt=(0,a.__name)(async t=>{try{return await Rt(t),!0}catch{return!1}},"isIconAvailable"),jt=(0,a.__name)(async(t,e,n)=>{let r;try{r=await Rt(t,e?.fallbackPrefix)}catch(t){a.log.error(t),r=Dt}const o=function(t,e){const n={...c,...t},r={...p,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,r].forEach(t=>{const e=[],n=t.hFlip,r=t.vFlip;let o,s=t.rotate;switch(n?r?s+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):r&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=i.height/2+i.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:o=i.width/2+i.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(i.left!==i.top&&(o=i.left,i.left=i.top,i.top=o),i.width!==i.height&&(o=i.width,i.width=i.height,i.height=o)),e.length&&(a=function(t,e){const n=function(t,e="defs"){let n="";const r=t.indexOf("<"+e);for(;r>=0;){const i=t.indexOf(">",r),a=t.indexOf("</"+e);if(-1===i||-1===a)break;const o=t.indexOf(">",a);if(-1===o)break;n+=t.slice(i+1,a).trim(),t=t.slice(0,r).trim()+t.slice(o+1)}return{defs:n,content:t}}(t);return r=n.defs,i=e+n.content+"</g>",r?"<defs>"+r+"</defs>"+i:i;var r,i}(a,'<g transform="'+e.join(" ")+'">'))});const o=r.width,s=r.height,l=i.width,h=i.height;let u,f;null===o?(f=null===s?"1em":"auto"===s?h:s,u=y(f,l/h)):(u="auto"===o?l:o,f=null===s?y(u,h/l):"auto"===s?h:s);const d={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(d[t]=e.toString())};g("width",u),g("height",f);const m=[i.left,i.top,l,h];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:a}}(r,e),s=function(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)n+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}(function(t,e=x){const n=[];let r;for(;r=b.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(n=>{const r="function"==typeof e?e(n):e+(_++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}(o.body),{...o.attributes,...n});return(0,i.sanitizeText)(s,(0,i.getConfig)())},"getIconSVG");function Wt(t,{markdownAutoWrap:e}){const n=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"),r=(0,Nt.dedent)(n);return!1===e?r.replace(/ /g,"&nbsp;"):r}function Ht(t,e={}){const n=Wt(t,e),r=Ot.lexer(n),i=[[]];let o=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,n)=>{0!==n&&(o++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&i[o].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&i[o].push({content:t.text,type:"normal"})}return(0,a.__name)(s,"processNode"),r.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?i[o].push({content:t.text,type:"normal"}):i[o].push({content:t.raw,type:"normal"})}),i}function Ut(t,{markdownAutoWrap:e}={}){const n=Ot.lexer(t);function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(r).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(r).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(r).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.log.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.__name)(r,"output"),n.map(r).join("")}function Yt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Gt(t,e){return Vt(t,[],Yt(e.content),e.type)}function Vt(t,e,n,r){if(0===n.length)return[{content:e.join(""),type:r},{content:"",type:r}];const[i,...a]=n,o=[...e,i];return t([{content:o.join(""),type:r}])?Vt(t,o,a,r):(0===e.length&&i&&(e.push(i),n.shift()),[{content:e.join(""),type:r},{content:n.join(""),type:r}])}function Xt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Zt(t,e)}function Zt(t,e,n=[],r=[]){if(0===t.length)return r.length>0&&n.push(r),n.length>0?n:[];let i="";" "===t[0].content&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...r];if(""!==i&&o.push({content:i,type:"normal"}),o.push(a),e(o))return Zt(t,e,n,o);if(r.length>0)n.push(r),t.unshift(a);else if(a.content){const[r,i]=Gt(e,a);n.push([r]),i.content&&t.unshift(i)}return Zt(t,e,n)}function Qt(t,e){e&&t.attr("style",e)}async function Kt(t,e,n,r,a=!1,o=(0,i.getConfig)()){const s=t.append("foreignObject");s.attr("width",10*n+"px"),s.attr("height",10*n+"px");const l=s.append("xhtml:div"),c=(0,i.hasKatex)(e.label)?await(0,i.renderKatexSanitized)(e.label.replace(i.common_default.lineBreakRegex,"\n"),o):(0,i.sanitizeText)(e.label,o),h=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(c),Qt(u,e.labelStyle),u.attr("class",`${h} ${r}`),Qt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",n+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let f=l.node().getBoundingClientRect();return f.width===n&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",n+"px"),f=l.node().getBoundingClientRect()),s.node()}function Jt(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}function te(t,e,n){const r=t.append("text"),i=Jt(r,1,e);re(i,n);const a=i.node().getComputedTextLength();return r.remove(),a}function ee(t,e,n){const r=t.append("text"),i=Jt(r,1,e);re(i,[{content:n,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}function ne(t,e,n,r=!1){const i=e.append("g"),o=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1");let l=0;for(const e of n){const n=(0,a.__name)(e=>te(i,1.1,e)<=t,"checkWidth"),r=n(e)?[e]:Xt(e,n);for(const t of r)re(Jt(s,l,1.1),t),l++}if(r){const t=s.node().getBBox(),e=2;return o.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),i.node()}return s.node()}function re(t,e){t.text(""),e.forEach((e,n)=>{const r=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===n?r.text(e.content):r.text(" "+e.content)})}async function ie(t,e={}){const n=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,a)=>(n.push((async()=>{const n=`${r}:${a}`;return await qt(n)?await jt(n,void 0,{class:"label-icon"}):`<i class='${(0,i.sanitizeText)(t,e).replace(":"," ")}'></i>`})()),t));const r=await Promise.all(n);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")}(0,a.__name)(Wt,"preprocessMarkdown"),(0,a.__name)(Ht,"markdownToLines"),(0,a.__name)(Ut,"markdownToHTML"),(0,a.__name)(Yt,"splitTextToChars"),(0,a.__name)(Gt,"splitWordToFitWidth"),(0,a.__name)(Vt,"splitWordToFitWidthRecursion"),(0,a.__name)(Xt,"splitLineToFitWidth"),(0,a.__name)(Zt,"splitLineToFitWidthRecursion"),(0,a.__name)(Qt,"applyStyle"),(0,a.__name)(Kt,"addHtmlSpan"),(0,a.__name)(Jt,"createTspan"),(0,a.__name)(te,"computeWidthOfText"),(0,a.__name)(ee,"computeDimensionOfText"),(0,a.__name)(ne,"createFormattedText"),(0,a.__name)(re,"updateTextContentAndStyles"),(0,a.__name)(ie,"replaceIconSubstring");var ae=(0,a.__name)(async(t,e="",{style:n="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,isNode:c=!0,width:h=200,addSvgBackground:u=!1}={},f)=>{if(a.log.debug("XYZ createText",e,n,o,s,l,c,"addSvgBackground: ",u),l){const a=Ut(e,f),o=await ie((0,r.decodeEntities)(a),f),l=e.replace(/\\\\/g,"\\"),d={isNode:c,label:(0,i.hasKatex)(e)?l:o,labelStyle:n.replace("fill:","color:")};return await Kt(t,d,h,s,u,f)}{const r=ne(h,t,Ht(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),f),!!e&&u);if(c){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));const t=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,v.select)(r).attr("style",t)}else{const t=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,v.select)(r).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,v.select)(r).select("text").attr("style",e)}return r}},"createText")},85533(t,e,n){n.r(e),n.d(e,{clear:()=>L,clear2:()=>Me,createLabel_default:()=>v,insertCluster:()=>B,insertNode:()=>Se,isValidShape:()=>ke,labelHelper:()=>u,positionNode:()=>Ae,setNodeElem:()=>Te,updateNodeBounds:()=>d});var r=n(70998),i=n(96540),a=n(67099),o=n(82029),s=n(54141),l=n(60162),c=n(79806),h=n(7083),u=(0,l.__name)(async(t,e,n)=>{let r;const i=e.useHtmlLabels||(0,s.evaluate)((0,s.getConfig2)()?.htmlLabels);r=n||"node default";const h=t.insert("g").attr("class",r).attr("id",e.domId||e.id),u=h.insert("g").attr("class","label").attr("style",(0,o.handleUndefinedAttr)(e.labelStyle));let f;f=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const d=await(0,a.createText)(u,(0,s.sanitizeText)((0,o.decodeEntities)(f),(0,s.getConfig2)()),{useHtmlLabels:i,width:e.width||(0,s.getConfig2)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let p=d.getBBox();const g=(e?.padding??0)/2;if(i){const t=d.children[0],e=(0,c.select)(d),n=t.getElementsByTagName("img");if(n){const t=""===f.replace(/<img[^>]*>/g,"").trim();await Promise.all([...n].map(e=>new Promise(n=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,s.getConfig2)().fontSize?(0,s.getConfig2)().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[r=s.defaultConfig_default.fontSize]=(0,o.parseFontSize)(t),i=r*n+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";n(e)}(0,l.__name)(r,"setupImage"),setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return i?u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):u.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:h,bbox:p,halfPadding:g,label:u}},"labelHelper"),f=(0,l.__name)(async(t,e,n)=>{const r=n.useHtmlLabels||(0,s.evaluate)((0,s.getConfig2)()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",n.labelStyle||""),l=await(0,a.createText)(i,(0,s.sanitizeText)((0,o.decodeEntities)(e),(0,s.getConfig2)()),{useHtmlLabels:r,width:n.width||(0,s.getConfig2)()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img});let h=l.getBBox();const u=n.padding/2;if((0,s.evaluate)((0,s.getConfig2)()?.flowchart?.htmlLabels)){const t=l.children[0],e=(0,c.select)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return r?i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):i.attr("transform","translate(0, "+-h.height/2+")"),n.centerLabel&&i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:h,halfPadding:u,label:i}},"insertLabel"),d=(0,l.__name)((t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height},"updateNodeBounds"),p=(0,l.__name)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function g(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function m(t,e,n,r,i,a){const o=[],s=n-t,l=r-e,c=s/a,h=2*Math.PI/c,u=e+l/2;for(let e=0;e<=50;e++){const n=t+e/50*s,r=u+i*Math.sin(h*(n-t));o.push({x:n,y:r})}return o}function y(t,e,n,r,i,a){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){const r=s+i*l,a=t+n*Math.cos(r),c=e+n*Math.sin(r);o.push({x:-a,y:-c})}return o}(0,l.__name)(g,"createPathFromPoints"),(0,l.__name)(m,"generateFullSineWavePoints"),(0,l.__name)(y,"generateCirclePoints");var b=(0,l.__name)((t,e)=>{var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),n=0===s?0:c*o/s,r=c):(o<0&&(l=-l),n=l,r=0===o?0:l*s/o),{x:i+n,y:a+r}},"intersectRect");function x(t,e){e&&t.attr("style",e)}async function _(t){const e=(0,c.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div"),r=(0,s.getConfig2)();let i=t.label;t.label&&(0,s.hasKatex)(t.label)&&(i=await(0,s.renderKatexSanitized)(t.label.replace(s.common_default.lineBreakRegex,"\n"),r));const a='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>";return n.html((0,s.sanitizeText)(a,r)),x(n,t.labelStyle),n.style("display","inline-block"),n.style("padding-right","1px"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,l.__name)(x,"applyStyle"),(0,l.__name)(_,"addHtmlLabel");var v=(0,l.__name)(async(t,e,n,r)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),(0,s.evaluate)((0,s.getConfig2)().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),l.log.info("vertexText"+i);const t={isNode:r,label:(0,o.decodeEntities)(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await _(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(const e of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),n?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}},"createLabel"),w=(0,l.__name)((t,e,n,r,i)=>["M",t+i,e,"H",t+n-i,"A",i,i,0,0,1,t+n,e+i,"V",e+r-i,"A",i,i,0,0,1,t+n-i,e+r,"H",t+i,"A",i,i,0,0,1,t,e+r-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,l.__name)(async(t,e)=>{l.log.info("Creating subgraph rect for ",e.id,e);const n=(0,s.getConfig2)(),{themeVariables:o,handDrawnSeed:u}=n,{clusterBkg:f,clusterBorder:d}=o,{labelStyles:p,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.styles2String)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),_=(0,s.evaluate)(n.flowchart.htmlLabels),v=x.insert("g").attr("class","cluster-label "),k=await(0,a.createText)(v,e.label,{style:e.labelStyle,useHtmlLabels:_,isNode:!0});let C=k.getBBox();if((0,s.evaluate)(n.flowchart.htmlLabels)){const t=k.children[0],e=(0,c.select)(k);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}const S=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,M=e.x-S/2,A=e.y-T/2;let B;if(l.log.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.default.svg(x),n=(0,i.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:d,fillWeight:3,seed:u}),r=t.path(w(M,A,S,T,0),n);B=x.insert(()=>(l.log.debug("Rough node insert CXC",r),r),":first-child"),B.select("path:nth-child(2)").attr("style",m.join(";")),B.select("path").attr("style",y.join(";").replace("fill","stroke"))}else B=x.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",M).attr("y",A).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,r.getSubGraphTitleMargins)(n);if(v.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+L})`),p){const t=v.select("span");t&&t.attr("style",p)}const E=B.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=C.height-e.padding/2,e.intersect=function(t){return b(e,t)},{cluster:x,labelBBox:C}},"rect"),C=(0,l.__name)((t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return b(e,t)},{cluster:n,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,l.__name)(async(t,e)=>{const n=(0,s.getConfig2)(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=r,f=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),d=f.insert("g",":first-child"),p=f.insert("g").attr("class","cluster-label");let g=f.append("rect");const m=p.node().appendChild(await v(e.label,e.labelStyle,void 0,!0));let y=m.getBBox();if((0,s.evaluate)(n.flowchart.htmlLabels)){const t=m.children[0],e=(0,c.select)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const x=0*e.padding,_=x/2,k=(e.width<=y.width+e.padding?y.width+e.padding:e.width)+x;e.width<=y.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height+x,S=e.height+x-y.height-6,T=e.x-k/2,M=e.y-C/2;e.width=k;const A=e.y-e.height/2-_+y.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),n=h.default.svg(f),r=e.rx||e.ry?n.path(w(T,M,k,C,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):n.rectangle(T,M,k,C,{seed:i});B=f.insert(()=>r,":first-child");const s=n.rectangle(T,A,k,S,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:i});B=f.insert(()=>r,":first-child"),g=f.insert(()=>s)}else{B=d.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",T).attr("y",M).attr("width",k).attr("height",C).attr("data-look",e.look),g.attr("class","inner").attr("x",T).attr("y",A).attr("width",k).attr("height",S)}p.attr("transform",`translate(${e.x-y.width/2}, ${M+1-((0,s.evaluate)(n.flowchart.htmlLabels)?0:3)})`);const L=B.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=y.height-e.padding/2,e.labelBBox=y,e.intersect=function(t){return b(e,t)},{cluster:f,labelBBox:y}},"roundedWithTitle"),T=(0,l.__name)(async(t,e)=>{l.log.info("Creating subgraph rect for ",e.id,e);const n=(0,s.getConfig2)(),{themeVariables:o,handDrawnSeed:u}=n,{clusterBkg:f,clusterBorder:d}=o,{labelStyles:p,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.styles2String)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),_=(0,s.evaluate)(n.flowchart.htmlLabels),v=x.insert("g").attr("class","cluster-label "),k=await(0,a.createText)(v,e.label,{style:e.labelStyle,useHtmlLabels:_,isNode:!0,width:e.width});let C=k.getBBox();if((0,s.evaluate)(n.flowchart.htmlLabels)){const t=k.children[0],e=(0,c.select)(k);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}const S=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,M=e.x-S/2,A=e.y-T/2;let B;if(l.log.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.default.svg(x),n=(0,i.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:d,fillWeight:4,seed:u}),r=t.path(w(M,A,S,T,e.rx),n);B=x.insert(()=>(l.log.debug("Rough node insert CXC",r),r),":first-child"),B.select("path:nth-child(2)").attr("style",m.join(";")),B.select("path").attr("style",y.join(";").replace("fill","stroke"))}else B=x.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",M).attr("y",A).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,r.getSubGraphTitleMargins)(n);if(v.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+L})`),p){const t=v.select("span");t&&t.attr("style",p)}const E=B.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=C.height-e.padding/2,e.intersect=function(t){return b(e,t)},{cluster:x,labelBBox:C}},"kanbanSection"),M={rect:k,squareRect:k,roundedWithTitle:S,noteGroup:C,divider:(0,l.__name)((t,e)=>{const n=(0,s.getConfig2)(),{themeVariables:r,handDrawnSeed:i}=n,{nodeBorder:a}=r,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const f=e.height+c,d=e.x-u/2,p=e.y-f/2;let g;if(e.width=u,"handDrawn"===e.look){const t=h.default.svg(o).rectangle(d,p,u,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});g=o.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",d).attr("y",p).attr("width",u).attr("height",f).attr("data-look",e.look)}const m=g.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return b(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:T},A=new Map,B=(0,l.__name)(async(t,e)=>{const n=e.shape||"rect",r=await M[n](t,e);return A.set(e.id,r),r},"insertCluster"),L=(0,l.__name)(()=>{A=new Map},"clear");function E(t,e){return t.intersect(e)}(0,l.__name)(E,"intersectNode");var F=E;function $(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,l=Math.sqrt(e*e*s*s+n*n*o*o),c=Math.abs(e*n*o/l);r.x<i&&(c=-c);var h=Math.abs(e*n*s/l);return r.y<a&&(h=-h),{x:i+c,y:a+h}}(0,l.__name)($,"intersectEllipse");var O=$;function N(t,e,n){return O(t,e,e,n)}(0,l.__name)(N,"intersectCircle");var D=N;function I(t,e,n,r){{const i=e.y-t.y,a=t.x-e.x,o=e.x*t.y-t.x*e.y,s=i*n.x+a*n.y+o,l=i*r.x+a*r.y+o,c=1e-6;if(0!==s&&0!==l&&z(s,l))return;const h=r.y-n.y,u=n.x-r.x,f=r.x*n.y-n.x*r.y,d=h*t.x+u*t.y+f,p=h*e.x+u*e.y+f;if(Math.abs(d)<c&&Math.abs(p)<c&&z(d,p))return;const g=i*u-h*a;if(0===g)return;const m=Math.abs(g/2);let y=a*f-u*o;const b=y<0?(y-m)/g:(y+m)/g;return y=h*o-i*f,{x:b,y:y<0?(y-m)/g:(y+m)/g}}}function z(t,e){return t*e>0}(0,l.__name)(I,"intersectLine"),(0,l.__name)(z,"sameSign");var P=I;function R(t,e,n){let r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=r-t.width/2-o,c=i-t.height/2-s;for(let r=0;r<e.length;r++){let i=e[r],o=e[r<e.length-1?r+1:0],s=P(t,n,{x:l+i.x,y:c+i.y},{x:l+o.x,y:c+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(t,e){let r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,l=Math.sqrt(o*o+s*s);return a<l?-1:a===l?0:1}),a[0]):t}(0,l.__name)(R,"intersectPolygon");var q={node:F,circle:D,ellipse:O,polygon:R,rect:b};function j(t,e){const{labelStyles:n}=(0,i.styles2String)(e);e.labelStyle=n;const r=p(e);let a=r;r||(a="anchor");const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:c}=e,u=h.default.svg(s),f=(0,i.userNodeOverrides)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);const g=u.circle(0,0,2,f),m=s.insert(()=>g,":first-child");return m.attr("class","anchor").attr("style",(0,o.handleUndefinedAttr)(c)),d(e,m),e.intersect=function(t){return l.log.info("Circle intersect",e,1,t),q.circle(e,1,t)},s}function W(t,e,n,r,i,a,o){const s=(t+n)/2,l=(e+r)/2,c=Math.atan2(r-e,n-t),h=(n-t)/2/i,u=(r-e)/2/a,f=Math.sqrt(h**2+u**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const d=Math.sqrt(1-f**2),p=s+d*a*Math.sin(c)*(o?-1:1),g=l-d*i*Math.cos(c)*(o?-1:1),m=Math.atan2((e-g)/a,(t-p)/i);let y=Math.atan2((r-g)/a,(n-p)/i)-m;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);const b=[];for(let t=0;t<20;t++){const e=m+t/19*y,n=p+i*Math.cos(e),r=g+a*Math.sin(e);b.push({x:n,y:r})}return b}async function H(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.width+e.padding+20,l=o.height+e.padding,c=l/2,f=c/(2.5+l/50),{cssStyles:m}=e,y=[{x:s/2,y:-l/2},{x:-s/2,y:-l/2},...W(-s/2,-l/2,-s/2,l/2,f,c,!1),{x:s/2,y:l/2},...W(s/2,l/2,s/2,-l/2,f,c,!0)],b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=g(y),v=b.path(_,x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),w.attr("transform",`translate(${f/2}, 0)`),d(e,w),e.intersect=function(t){return q.polygon(e,y,t)},a}function U(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}async function Y(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.height+e.padding,l=o.width+e.padding+12,c=-s,f=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}];let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(f),o=t.path(r,n);m=a.insert(()=>o,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),y&&m.attr("style",y)}else m=U(a,l,s,f);return r&&m.attr("style",r),d(e,m),e.intersect=function(t){return q.polygon(e,f,t)},a}function G(t,e){const{nodeStyles:n}=(0,i.styles2String)(e);e.label="";const r=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],l=h.default.svg(r),c=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=g(s),f=l.path(u,c),d=r.insert(()=>f,":first-child");return a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return q.polygon(e,s,t)},r}async function V(t,e,n){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:s,bbox:c,halfPadding:f}=await u(t,e,p(e)),g=n?.padding??f,m=c.width/2+g;let y;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.default.svg(s),n=(0,i.userNodeOverrides)(e,{}),r=t.circle(0,0,2*m,n);y=s.insert(()=>r,":first-child"),y.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(b))}else y=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",m).attr("cx",0).attr("cy",0);return d(e,y),e.calcIntersect=function(t,e){const n=t.width/2;return q.circle(t,n,e)},e.intersect=function(t){return l.log.info("Circle intersect",e,m,t),q.circle(e,m,t)},s}function X(t){const e=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=2*t;return`M ${-r/2*e},${r/2*n} L ${r/2*e},${-r/2*n}\n M ${r/2*e},${r/2*n} L ${-r/2*e},${-r/2*n}`}function Z(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n,e.label="";const a=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),o=Math.max(30,e?.width??0),{cssStyles:s}=e,c=h.default.svg(a),u=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const f=c.circle(0,0,2*o,u),g=X(o),m=c.path(g,u),y=a.insert(()=>f,":first-child");return y.insert(()=>m),s&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),d(e,y),e.intersect=function(t){return l.log.info("crossedCircle intersect",e,{radius:o,point:t}),q.circle(e,o,t)},a}function Q(t,e,n,r=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){const r=s+i*l,a=t+n*Math.cos(r),c=e+n*Math.sin(r);o.push({x:-a,y:-c})}return o}async function K(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=o.width+(e.padding??0),c=o.height+(e.padding??0),f=Math.max(5,.1*c),{cssStyles:m}=e,y=[...Q(l/2,-c/2,f,30,-90,0),{x:-l/2-f,y:f},...Q(l/2+2*f,-f,f,20,-180,-270),...Q(l/2+2*f,f,f,20,-90,-180),{x:-l/2-f,y:-c/2},...Q(l/2,c/2,f,20,0,90)],b=[{x:l/2,y:-c/2-f},{x:-l/2,y:-c/2-f},...Q(l/2,-c/2,f,20,-90,0),{x:-l/2-f,y:-f},...Q(l/2+.1*l,-f,f,20,-180,-270),...Q(l/2+.1*l,f,f,20,-90,-180),{x:-l/2-f,y:c/2},...Q(l/2,c/2,f,20,0,90),{x:-l/2,y:c/2+f},{x:l/2,y:c/2+f}],x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=g(y).replace("Z",""),w=x.path(v,_),k=g(b),C=x.path(k,{..._}),S=a.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>w,":first-child"),S.attr("class","text"),m&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",r),S.attr("transform",`translate(${f}, 0)`),s.attr("transform",`translate(${-l/2+f-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),d(e,S),e.intersect=function(t){return q.polygon(e,b,t)},a}function J(t,e,n,r=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){const r=s+i*l,a=t+n*Math.cos(r),c=e+n*Math.sin(r);o.push({x:a,y:c})}return o}async function tt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=o.width+(e.padding??0),c=o.height+(e.padding??0),f=Math.max(5,.1*c),{cssStyles:m}=e,y=[...J(l/2,-c/2,f,20,-90,0),{x:l/2+f,y:-f},...J(l/2+2*f,-f,f,20,-180,-270),...J(l/2+2*f,f,f,20,-90,-180),{x:l/2+f,y:c/2},...J(l/2,c/2,f,20,0,90)],b=[{x:-l/2,y:-c/2-f},{x:l/2,y:-c/2-f},...J(l/2,-c/2,f,20,-90,0),{x:l/2+f,y:-f},...J(l/2+2*f,-f,f,20,-180,-270),...J(l/2+2*f,f,f,20,-90,-180),{x:l/2+f,y:c/2},...J(l/2,c/2,f,20,0,90),{x:l/2,y:c/2+f},{x:-l/2,y:c/2+f}],x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=g(y).replace("Z",""),w=x.path(v,_),k=g(b),C=x.path(k,{..._}),S=a.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>w,":first-child"),S.attr("class","text"),m&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",r),S.attr("transform",`translate(${-f}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),d(e,S),e.intersect=function(t){return q.polygon(e,b,t)},a}function et(t,e,n,r=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){const r=s+i*l,a=t+n*Math.cos(r),c=e+n*Math.sin(r);o.push({x:-a,y:-c})}return o}async function nt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=o.width+(e.padding??0),c=o.height+(e.padding??0),f=Math.max(5,.1*c),{cssStyles:m}=e,y=[...et(l/2,-c/2,f,30,-90,0),{x:-l/2-f,y:f},...et(l/2+2*f,-f,f,20,-180,-270),...et(l/2+2*f,f,f,20,-90,-180),{x:-l/2-f,y:-c/2},...et(l/2,c/2,f,20,0,90)],b=[...et(-l/2+f+f/2,-c/2,f,20,-90,-180),{x:l/2-f/2,y:f},...et(-l/2-f/2,-f,f,20,0,90),...et(-l/2-f/2,f,f,20,-90,0),{x:l/2-f/2,y:-f},...et(-l/2+f+f/2,c/2,f,30,-180,-270)],x=[{x:l/2,y:-c/2-f},{x:-l/2,y:-c/2-f},...et(l/2,-c/2,f,20,-90,0),{x:-l/2-f,y:-f},...et(l/2+2*f,-f,f,20,-180,-270),...et(l/2+2*f,f,f,20,-90,-180),{x:-l/2-f,y:c/2},...et(l/2,c/2,f,20,0,90),{x:-l/2,y:c/2+f},{x:l/2-f-f/2,y:c/2+f},...et(-l/2+f+f/2,-c/2,f,20,-90,-180),{x:l/2-f/2,y:f},...et(-l/2-f/2,-f,f,20,0,90),...et(-l/2-f/2,f,f,20,-90,0),{x:l/2-f/2,y:-f},...et(-l/2+f+f/2,c/2,f,30,-180,-270)],_=h.default.svg(a),v=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const w=g(y).replace("Z",""),k=_.path(w,v),C=g(b).replace("Z",""),S=_.path(C,v),T=g(x),M=_.path(T,{...v}),A=a.insert("g",":first-child");return A.insert(()=>M,":first-child").attr("stroke-opacity",0),A.insert(()=>k,":first-child"),A.insert(()=>S,":first-child"),A.attr("class","text"),m&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",r),A.attr("transform",`translate(${f-f/4}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),d(e,A),e.intersect=function(t){return q.polygon(e,x,t)},a}async function rt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(80,1.25*(o.width+2*(e.padding??0)),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),c=l/2,{cssStyles:f}=e,m=h.default.svg(a),b=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=s-c,_=l/4,v=[{x,y:0},{x:_,y:0},{x:0,y:l/2},{x:_,y:l},{x,y:l},...y(-x,-l/2,c,50,270,90)],w=g(v),k=m.path(w,b),C=a.insert(()=>k,":first-child");return C.attr("class","basic label-container"),f&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",f),r&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",r),C.attr("transform",`translate(${-s/2}, ${-l/2})`),d(e,C),e.intersect=function(t){return q.polygon(e,v,t)},a}(0,l.__name)(j,"anchor"),(0,l.__name)(W,"generateArcPoints"),(0,l.__name)(H,"bowTieRect"),(0,l.__name)(U,"insertPolygonShape"),(0,l.__name)(Y,"card"),(0,l.__name)(G,"choice"),(0,l.__name)(V,"circle"),(0,l.__name)(X,"createLine"),(0,l.__name)(Z,"crossedCircle"),(0,l.__name)(Q,"generateCirclePoints"),(0,l.__name)(K,"curlyBraceLeft"),(0,l.__name)(J,"generateCirclePoints"),(0,l.__name)(tt,"curlyBraceRight"),(0,l.__name)(et,"generateCirclePoints"),(0,l.__name)(nt,"curlyBraces"),(0,l.__name)(rt,"curvedTrapezoid");var it=(0,l.__name)((t,e,n,r,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r].join(" "),"createCylinderPathD"),at=(0,l.__name)((t,e,n,r,i,a)=>[`M${t},${e+a}`,`M${t+n},${e+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r].join(" "),"createOuterCylinderPathD"),ot=(0,l.__name)((t,e,n,r,i,a)=>[`M${t-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function st(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,p(e)),c=Math.max(s.width+e.padding,e.width??0),f=c/2,g=f/(2.5+c/50),m=Math.max(s.height+g+e.padding,e.height??0);let y;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=at(0,0,c,m,f,g),r=ot(0,g,c,m,f,g),o=t.path(n,(0,i.userNodeOverrides)(e,{})),s=t.path(r,(0,i.userNodeOverrides)(e,{fill:"none"}));y=a.insert(()=>s,":first-child"),y=a.insert(()=>o,":first-child"),y.attr("class","basic label-container"),b&&y.attr("style",b)}else{const t=it(0,0,c,m,f,g);y=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(b)).attr("style",r)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-c/2}, ${-(m/2+g)})`),d(e,y),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+(e.padding??0)/1.5-(s.y-(s.top??0))})`),e.intersect=function(t){const n=q.rect(e,t),r=n.x-(e.x??0);if(0!=f&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(n.y-(e.y??0))>(e.height??0)/2-g)){let i=g*g*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=g-i,t.y-(e.y??0)>0&&(i=-i),n.y+=i}return n},a}async function lt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=o.width+e.padding,c=o.height+e.padding,f=.2*c,g=-l/2,m=-c/2-f/2,{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=[{x:g,y:m+f},{x:-g,y:m+f},{x:-g,y:-m},{x:g,y:-m},{x:g,y:m},{x:-g,y:m},{x:-g,y:m+f}],v=b.polygon(_.map(t=>[t.x,t.y]),x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),s.attr("transform",`translate(${g+(e.padding??0)/2-(o.x-(o.left??0))}, ${m+f+(e.padding??0)/2-(o.y-(o.top??0))})`),d(e,w),e.intersect=function(t){return q.rect(e,t)},a}async function ct(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:c}=await u(t,e,p(e)),f=s.width/2+c+5,g=s.width/2+c;let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{roughness:.2,strokeWidth:2.5}),r=(0,i.userNodeOverrides)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*f,n),l=t.circle(0,0,2*g,r);m=a.insert("g",":first-child"),m.attr("class",(0,o.handleUndefinedAttr)(e.cssClasses)).attr("style",(0,o.handleUndefinedAttr)(y)),m.node()?.appendChild(s),m.node()?.appendChild(l)}else{m=a.insert("g",":first-child");const t=m.insert("circle",":first-child"),e=m.insert("circle");m.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",f).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",g).attr("cx",0).attr("cy",0)}return d(e,m),e.intersect=function(t){return l.log.info("DoubleCircle intersect",e,f,t),q.circle(e,f,t)},a}function ht(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.label="",e.labelStyle=r;const o=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,c=h.default.svg(o),{nodeBorder:u}=n,f=(0,i.userNodeOverrides)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);const g=c.circle(0,0,14,f),m=o.insert(()=>g,":first-child");return m.selectAll("path").attr("style",`fill: ${u} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",a),d(e,m),e.intersect=function(t){return l.log.info("filledCircle intersect",e,{radius:7,point:t}),q.circle(e,7,t)},o}async function ut(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),c=o.width+(e.padding??0),f=c+o.height,m=c+o.height,y=[{x:0,y:-f},{x:m,y:-f},{x:m/2,y:0}],{cssStyles:b}=e,x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=g(y),w=x.path(v,_),k=a.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`);return b&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",b),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),e.width=c,e.height=f,d(e,k),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-f/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return l.log.info("Triangle intersect",e,y,t),q.polygon(e,y,t)},a}function ft(t,e,{dir:n,config:{state:r,themeVariables:a}}){const{nodeStyles:o}=(0,i.styles2String)(e);e.label="";const s=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let c=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);"LR"===n&&(c=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const f=-1*c/2,g=-1*u/2,m=h.default.svg(s),y=(0,i.userNodeOverrides)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const b=m.rectangle(f,g,c,u,y),x=s.insert(()=>b,":first-child");l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),o&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",o),d(e,x);const _=r?.padding??0;return e.width&&e.height&&(e.width+=_/2||0,e.height+=_/2||0),e.intersect=function(t){return q.rect(e,t)},s}async function dt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(80,o.width+2*(e.padding??0),e?.width??0),c=Math.max(50,o.height+2*(e.padding??0),e?.height??0),f=c/2,{cssStyles:m}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=[{x:-s/2,y:-c/2},{x:s/2-f,y:-c/2},...y(-s/2+f,0,f,50,90,270),{x:s/2-f,y:c/2},{x:-s/2,y:c/2}],v=g(_),w=b.path(v,x),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",m),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),d(e,k),e.intersect=function(t){return l.log.info("Pill intersect",e,{radius:f,point:t}),q.polygon(e,_,t)},a}async function pt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.height+(e.padding??0),l=o.width+2.5*(e.padding??0),{cssStyles:c}=e,f=h.default.svg(a),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let y=l/2;y+=y/6;const b=s/2,x=y-b/2,_=[{x:-x,y:-b},{x:0,y:-b},{x,y:-b},{x:y,y:0},{x,y:b},{x:0,y:b},{x:-x,y:b},{x:-y,y:0}],v=g(_),w=f.path(v,m),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),e.width=l,e.height=s,d(e,k),e.intersect=function(t){return q.polygon(e,_,t)},a}async function gt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.label="",e.labelStyle=n;const{shapeSvg:a}=await u(t,e,p(e)),o=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:c}=e,f=h.default.svg(a),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],b=g(y),x=f.path(b,m),_=a.insert(()=>x,":first-child");return _.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",r),_.attr("transform",`translate(${-o/2}, ${-s/2})`),d(e,_),e.intersect=function(t){return l.log.info("Pill intersect",e,{points:y}),q.polygon(e,y,t)},a}async function mt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:o}=(0,i.styles2String)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,f=Math.max(s,c),p=r?.wrappingWidth;e.width=Math.max(f,p??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),b="t"===e.pos,x=f,_=f,{nodeBorder:v}=n,{stylesMap:w}=(0,i.compileStyles)(e),k=-_/2,C=-x/2,S=e.label?8:0,T=h.default.svg(g),M=(0,i.userNodeOverrides)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const A=T.rectangle(k,C,_,x,M),B=Math.max(_,m.width),L=x+m.height+S,E=T.rectangle(-B/2,-L/2,B,L,{...M,fill:"transparent",stroke:"none"}),F=g.insert(()=>A,":first-child"),$=g.insert(()=>E);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.getIconSVG)(e.icon,{height:f,width:f,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,o=n.x,s=n.y;t.attr("transform",`translate(${-r/2-o},${b?m.height/2+S/2-i/2-s:-m.height/2-S/2-i/2-s})`),t.attr("style",`color: ${w.get("stroke")??v};`)}return y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-L/2:L/2-m.height})`),F.attr("transform",`translate(0,${b?m.height/2+S/2:-m.height/2-S/2})`),d(e,$),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];return a=b?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+S},{x:n+_/2,y:r-i/2+m.height+S},{x:n+_/2,y:r+i/2},{x:n-_/2,y:r+i/2},{x:n-_/2,y:r-i/2+m.height+S},{x:n-m.width/2,y:r-i/2+m.height+S}]:[{x:n-_/2,y:r-i/2},{x:n+_/2,y:r-i/2},{x:n+_/2,y:r-i/2+x},{x:n+m.width/2,y:r-i/2+x},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+x},{x:n-_/2,y:r-i/2+x}],q.polygon(e,a,t)},g}async function yt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:o}=(0,i.styles2String)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,f=Math.max(s,c),p=r?.wrappingWidth;e.width=Math.max(f,p??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),b=e.label?8:0,x="t"===e.pos,{nodeBorder:_,mainBkg:v}=n,{stylesMap:w}=(0,i.compileStyles)(e),k=h.default.svg(g),C=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const S=w.get("fill");C.stroke=S??v;const T=g.append("g");e.icon&&T.html(`<g>${await(0,a.getIconSVG)(e.icon,{height:f,width:f,fallbackPrefix:""})}</g>`);const M=T.node().getBBox(),A=M.width,B=M.height,L=M.x,E=M.y,F=Math.max(A,B)*Math.SQRT2+40,$=k.circle(0,0,F,C),O=Math.max(F,m.width),N=F+m.height+b,D=k.rectangle(-O/2,-N/2,O,N,{...C,fill:"transparent",stroke:"none"}),I=g.insert(()=>$,":first-child"),z=g.insert(()=>D);return T.attr("transform",`translate(${-A/2-L},${x?m.height/2+b/2-B/2-E:-m.height/2-b/2-B/2-E})`),T.attr("style",`color: ${w.get("stroke")??_};`),y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-N/2:N/2-m.height})`),I.attr("transform",`translate(0,${x?m.height/2+b/2:-m.height/2-b/2})`),d(e,z),e.intersect=function(t){return l.log.info("iconSquare intersect",e,t),q.rect(e,t)},g}async function bt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:o}=(0,i.styles2String)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,f=Math.max(s,c),p=r?.wrappingWidth;e.width=Math.max(f,p??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:b}=await u(t,e,"icon-shape default"),x="t"===e.pos,_=f+2*y,v=f+2*y,{nodeBorder:k,mainBkg:C}=n,{stylesMap:S}=(0,i.compileStyles)(e),T=-v/2,M=-_/2,A=e.label?8:0,B=h.default.svg(g),L=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const E=S.get("fill");L.stroke=E??C;const F=B.path(w(T,M,v,_,5),L),$=Math.max(v,m.width),O=_+m.height+A,N=B.rectangle(-$/2,-O/2,$,O,{...L,fill:"transparent",stroke:"none"}),D=g.insert(()=>F,":first-child").attr("class","icon-shape2"),I=g.insert(()=>N);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.getIconSVG)(e.icon,{height:f,width:f,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,o=n.x,s=n.y;t.attr("transform",`translate(${-r/2-o},${x?m.height/2+A/2-i/2-s:-m.height/2-A/2-i/2-s})`),t.attr("style",`color: ${S.get("stroke")??k};`)}return b.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-O/2:O/2-m.height})`),D.attr("transform",`translate(0,${x?m.height/2+A/2:-m.height/2-A/2})`),d(e,I),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];return a=x?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+A},{x:n+v/2,y:r-i/2+m.height+A},{x:n+v/2,y:r+i/2},{x:n-v/2,y:r+i/2},{x:n-v/2,y:r-i/2+m.height+A},{x:n-m.width/2,y:r-i/2+m.height+A}]:[{x:n-v/2,y:r-i/2},{x:n+v/2,y:r-i/2},{x:n+v/2,y:r-i/2+_},{x:n+m.width/2,y:r-i/2+_},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+_},{x:n-v/2,y:r-i/2+_}],q.polygon(e,a,t)},g}async function xt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:o}=(0,i.styles2String)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,f=Math.max(s,c),p=r?.wrappingWidth;e.width=Math.max(f,p??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:b}=await u(t,e,"icon-shape default"),x="t"===e.pos,_=f+2*y,v=f+2*y,{nodeBorder:k,mainBkg:C}=n,{stylesMap:S}=(0,i.compileStyles)(e),T=-v/2,M=-_/2,A=e.label?8:0,B=h.default.svg(g),L=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const E=S.get("fill");L.stroke=E??C;const F=B.path(w(T,M,v,_,.1),L),$=Math.max(v,m.width),O=_+m.height+A,N=B.rectangle(-$/2,-O/2,$,O,{...L,fill:"transparent",stroke:"none"}),D=g.insert(()=>F,":first-child"),I=g.insert(()=>N);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.getIconSVG)(e.icon,{height:f,width:f,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,o=n.x,s=n.y;t.attr("transform",`translate(${-r/2-o},${x?m.height/2+A/2-i/2-s:-m.height/2-A/2-i/2-s})`),t.attr("style",`color: ${S.get("stroke")??k};`)}return b.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-O/2:O/2-m.height})`),D.attr("transform",`translate(0,${x?m.height/2+A/2:-m.height/2-A/2})`),d(e,I),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];return a=x?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+A},{x:n+v/2,y:r-i/2+m.height+A},{x:n+v/2,y:r+i/2},{x:n-v/2,y:r+i/2},{x:n-v/2,y:r-i/2+m.height+A},{x:n-m.width/2,y:r-i/2+m.height+A}]:[{x:n-v/2,y:r-i/2},{x:n+v/2,y:r-i/2},{x:n+v/2,y:r-i/2+_},{x:n+m.width/2,y:r-i/2+_},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+_},{x:n-v/2,y:r-i/2+_}],q.polygon(e,a,t)},g}async function _t(t,e,{config:{flowchart:n}}){const r=new Image;r.src=e?.img??"",await r.decode();const a=Number(r.naturalWidth.toString().replace("px","")),o=Number(r.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:s}=(0,i.styles2String)(e);e.labelStyle=s;const c=n?.wrappingWidth;e.defaultWidth=n?.wrappingWidth;const f=Math.max(e.label?c??0:0,e?.assetWidth??a),p="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:f,g="on"===e.constraint?p/e.imageAspectRatio:e?.assetHeight??o;e.width=Math.max(p,c??0);const{shapeSvg:m,bbox:y,label:b}=await u(t,e,"image-shape default"),x="t"===e.pos,_=-p/2,v=-g/2,w=e.label?8:0,k=h.default.svg(m),C=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const S=k.rectangle(_,v,p,g,C),T=Math.max(p,y.width),M=g+y.height+w,A=k.rectangle(-T/2,-M/2,T,M,{...C,fill:"none",stroke:"none"}),B=m.insert(()=>S,":first-child"),L=m.insert(()=>A);if(e.img){const t=m.append("image");t.attr("href",e.img),t.attr("width",p),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-p/2},${x?M/2-g:-M/2})`)}return b.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-g/2-y.height/2-w/2:g/2-y.height/2+w/2})`),B.attr("transform",`translate(0,${x?y.height/2+w/2:-y.height/2-w/2})`),d(e,L),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return q.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];return a=x?[{x:n-y.width/2,y:r-i/2},{x:n+y.width/2,y:r-i/2},{x:n+y.width/2,y:r-i/2+y.height+w},{x:n+p/2,y:r-i/2+y.height+w},{x:n+p/2,y:r+i/2},{x:n-p/2,y:r+i/2},{x:n-p/2,y:r-i/2+y.height+w},{x:n-y.width/2,y:r-i/2+y.height+w}]:[{x:n-p/2,y:r-i/2},{x:n+p/2,y:r-i/2},{x:n+p/2,y:r-i/2+g},{x:n+y.width/2,y:r-i/2+g},{x:n+y.width/2/2,y:r+i/2},{x:n-y.width/2,y:r+i/2},{x:n-y.width/2,y:r-i/2+g},{x:n-p/2,y:r-i/2+g}],q.polygon(e,a,t)},m}async function vt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:-3*l/6,y:-l}];let f;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(c),o=t.path(r,n);f=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),m&&f.attr("style",m)}else f=U(a,s,l,c);return r&&f.attr("style",r),e.width=s,e.height=l,d(e,f),e.intersect=function(t){return q.polygon(e,c,t)},a}async function wt(t,e,n){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:s,bbox:l}=await u(t,e,p(e)),c=Math.max(l.width+2*n.labelPaddingX,e?.width||0),f=Math.max(l.height+2*n.labelPaddingY,e?.height||0),g=-c/2,m=-f/2;let y,{rx:b,ry:x}=e;const{cssStyles:_}=e;if(n?.rx&&n.ry&&(b=n.rx,x=n.ry),"handDrawn"===e.look){const t=h.default.svg(s),n=(0,i.userNodeOverrides)(e,{}),r=b||x?t.path(w(g,m,c,f,b||0),n):t.rectangle(g,m,c,f,n);y=s.insert(()=>r,":first-child"),y.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(_))}else y=s.insert("rect",":first-child"),y.attr("class","basic label-container").attr("style",a).attr("rx",(0,o.handleUndefinedAttr)(b)).attr("ry",(0,o.handleUndefinedAttr)(x)).attr("x",g).attr("y",m).attr("width",c).attr("height",f);return d(e,y),e.calcIntersect=function(t,e){return q.rect(t,e)},e.intersect=function(t){return q.rect(e,t)},s}async function kt(t,e){const{shapeSvg:n,bbox:r,label:i}=await u(t,e,"label"),a=n.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),n.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),d(e,a),e.intersect=function(t){return q.rect(e,t)},n}async function Ct(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:-3*l/6,y:-l}];let f;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(c),o=t.path(r,n);f=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),m&&f.attr("style",m)}else f=U(a,s,l,c);return r&&f.attr("style",r),e.width=s,e.height=l,d(e,f),e.intersect=function(t){return q.polygon(e,c,t)},a}async function St(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),c=[{x:-3*l/6,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:0,y:-l}];let f;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(c),o=t.path(r,n);f=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),m&&f.attr("style",m)}else f=U(a,s,l,c);return r&&f.attr("style",r),e.width=s,e.height=l,d(e,f),e.intersect=function(t){return q.polygon(e,c,t)},a}function Tt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=Math.max(35,e?.width??0),c=Math.max(35,e?.height??0),u=[{x:s,y:0},{x:0,y:c+3.5},{x:s-14,y:c+3.5},{x:0,y:2*c},{x:s,y:c-3.5},{x:14,y:c-3.5}],f=h.default.svg(a),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=g(u),b=f.path(y,m),x=a.insert(()=>b,":first-child");return o&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",r),x.attr("transform",`translate(-${s/2},${-c})`),d(e,x),e.intersect=function(t){return l.log.info("lightningBolt intersect",e,t),q.polygon(e,u,t)},a}(0,l.__name)(st,"cylinder"),(0,l.__name)(lt,"dividedRectangle"),(0,l.__name)(ct,"doublecircle"),(0,l.__name)(ht,"filledCircle"),(0,l.__name)(ut,"flippedTriangle"),(0,l.__name)(ft,"forkJoin"),(0,l.__name)(dt,"halfRoundedRectangle"),(0,l.__name)(pt,"hexagon"),(0,l.__name)(gt,"hourglass"),(0,l.__name)(mt,"icon"),(0,l.__name)(yt,"iconCircle"),(0,l.__name)(bt,"iconRounded"),(0,l.__name)(xt,"iconSquare"),(0,l.__name)(_t,"imageSquare"),(0,l.__name)(vt,"inv_trapezoid"),(0,l.__name)(wt,"drawRect"),(0,l.__name)(kt,"labelRect"),(0,l.__name)(Ct,"lean_left"),(0,l.__name)(St,"lean_right"),(0,l.__name)(Tt,"lightningBolt");var Mt=(0,l.__name)((t,e,n,r,i,a,o)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r,`M${t},${e+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createCylinderPathD"),At=(0,l.__name)((t,e,n,r,i,a,o)=>[`M${t},${e+a}`,`M${t+n},${e+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r,`M${t},${e+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createOuterCylinderPathD"),Bt=(0,l.__name)((t,e,n,r,i,a)=>[`M${t-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function Lt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,p(e)),c=Math.max(s.width+(e.padding??0),e.width??0),f=c/2,g=f/(2.5+c/50),m=Math.max(s.height+g+(e.padding??0),e.height??0),y=.1*m;let b;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=At(0,0,c,m,f,g,y),r=Bt(0,g,c,m,f,g),o=(0,i.userNodeOverrides)(e,{}),s=t.path(n,o),l=t.path(r,o);a.insert(()=>l,":first-child").attr("class","line"),b=a.insert(()=>s,":first-child"),b.attr("class","basic label-container"),x&&b.attr("style",x)}else{const t=Mt(0,0,c,m,f,g,y);b=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(x)).attr("style",r)}return b.attr("label-offset-y",g),b.attr("transform",`translate(${-c/2}, ${-(m/2+g)})`),d(e,b),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+g-(s.y-(s.top??0))})`),e.intersect=function(t){const n=q.rect(e,t),r=n.x-(e.x??0);if(0!=f&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(n.y-(e.y??0))>(e.height??0)/2-g)){let i=g*g*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=g-i,t.y-(e.y??0)>0&&(i=-i),n.y+=i}return n},a}async function Et(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=c/4,g=c+f,{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=[{x:-l/2-l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:g/2},...m(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,f,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2},{x:-l/2,y:-g/2},{x:-l/2,y:g/2*1.1},{x:-l/2,y:-g/2}],v=b.polygon(_.map(t=>[t.x,t.y]),x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),w.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)-f/2-(o.y-(o.top??0))})`),d(e,w),e.intersect=function(t){return q.polygon(e,_,t)},a}async function Ft(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=-l/2,m=-c/2,{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{}),_=[{x:f-5,y:m+5},{x:f-5,y:m+c+5},{x:f+l-5,y:m+c+5},{x:f+l-5,y:m+c},{x:f+l,y:m+c},{x:f+l,y:m+c-5},{x:f+l+5,y:m+c-5},{x:f+l+5,y:m-5},{x:f+5,y:m-5},{x:f+5,y:m},{x:f,y:m},{x:f,y:m+5}],v=[{x:f,y:m+5},{x:f+l-5,y:m+5},{x:f+l-5,y:m+c},{x:f+l,y:m+c},{x:f+l,y:m},{x:f,y:m}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const w=g(_),k=b.path(w,x),C=g(v),S=b.path(C,{...x,fill:"none"}),T=a.insert(()=>S,":first-child");return T.insert(()=>k,":first-child"),T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),d(e,T),e.intersect=function(t){return q.polygon(e,_,t)},a}async function $t(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=c/4,y=c+f,b=-l/2,x=-y/2,{cssStyles:_}=e,v=m(b-5,x+y+5,b+l-5,x+y+5,f,.8),w=v?.[v.length-1],k=[{x:b-5,y:x+5},{x:b-5,y:x+y+5},...v,{x:b+l-5,y:w.y-5},{x:b+l,y:w.y-5},{x:b+l,y:w.y-10},{x:b+l+5,y:w.y-10},{x:b+l+5,y:x-5},{x:b+5,y:x-5},{x:b+5,y:x},{x:b,y:x},{x:b,y:x+5}],C=[{x:b,y:x+5},{x:b+l-5,y:x+5},{x:b+l-5,y:w.y-5},{x:b+l,y:w.y-5},{x:b+l,y:x},{x:b,y:x}],S=h.default.svg(a),T=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const M=g(k),A=S.path(M,T),B=g(C),L=S.path(B,T),E=a.insert(()=>A,":first-child");return E.insert(()=>L),E.attr("class","basic label-container"),_&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",_),r&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",r),E.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-f/2-(o.y-(o.top??0))})`),d(e,E),e.intersect=function(t){return q.polygon(e,k,t)},a}async function Ot(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r,e.useHtmlLabels||!1!==(0,s.getConfig)().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:o,bbox:l,label:c}=await u(t,e,p(e)),f=Math.max(l.width+2*(e.padding??0),e?.width??0),g=Math.max(l.height+2*(e.padding??0),e?.height??0),m=-f/2,y=-g/2,{cssStyles:b}=e,x=h.default.svg(o),_=(0,i.userNodeOverrides)(e,{fill:n.noteBkgColor,stroke:n.noteBorderColor});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=x.rectangle(m,y,f,g,_),w=o.insert(()=>v,":first-child");return w.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",b),a&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",a),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),d(e,w),e.intersect=function(t){return q.rect(e,t)},o}(0,l.__name)(Lt,"linedCylinder"),(0,l.__name)(Et,"linedWaveEdgedRect"),(0,l.__name)(Ft,"multiRect"),(0,l.__name)($t,"multiWaveEdgedRectangle"),(0,l.__name)(Ot,"note");var Nt=(0,l.__name)((t,e,n)=>[`M${t+n/2},${e}`,`L${t+n},${e-n/2}`,`L${t+n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Dt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.width+e.padding+(o.height+e.padding),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=Nt(0,0,s),o=t.path(r,n);c=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),f&&c.attr("style",f)}else c=U(a,s,s,l),c.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return r&&c.attr("style",r),d(e,c),e.calcIntersect=function(t,e){const n=t.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=q.polygon(t,r,e);return{x:i.x-.5,y:i.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function It(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=-Math.max(o.width+(e.padding??0),e?.width??0)/2,c=-Math.max(o.height+(e.padding??0),e?.height??0)/2,f=c/2,m=[{x:l+f,y:c},{x:l,y:0},{x:l+f,y:-c},{x:-l,y:-c},{x:-l,y:c}],{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=g(m),v=b.path(_,x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),w.attr("transform",`translate(${-f/2},0)`),s.attr("transform",`translate(${-f/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),d(e,w),e.intersect=function(t){return q.polygon(e,m,t)},a}async function zt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);let a;e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";const o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=o.insert("g"),f=o.insert("g").attr("class","label").attr("style",r),p=e.description,g=e.label,m=f.node().appendChild(await v(g,e.labelStyle,!0,!0));let y={width:0,height:0};if((0,s.evaluate)((0,s.getConfig2)()?.flowchart?.htmlLabels)){const t=m.children[0],e=(0,c.select)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}l.log.info("Text 2",p);const b=p||[],x=m.getBBox(),_=f.node().appendChild(await v(b.join?b.join("<br/>"):b,e.labelStyle,!0,!0)),k=_.children[0],C=(0,c.select)(_);y=k.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height);const S=(e.padding||0)/2;(0,c.select)(_).attr("transform","translate( "+(y.width>x.width?0:(x.width-y.width)/2)+", "+(x.height+S+5)+")"),(0,c.select)(m).attr("transform","translate( "+(y.width<x.width?0:-(x.width-y.width)/2)+", 0)"),y=f.node().getBBox(),f.attr("transform","translate("+-y.width/2+", "+(-y.height/2-S+3)+")");const T=y.width+(e.padding||0),M=y.height+(e.padding||0),A=-y.width/2-S,B=-y.height/2-S;let L,E;if("handDrawn"===e.look){const t=h.default.svg(o),n=(0,i.userNodeOverrides)(e,{}),r=t.path(w(A,B,T,M,e.rx||0),n),a=t.line(-y.width/2-S,-y.height/2-S+x.height+S,y.width/2+S,-y.height/2-S+x.height+S,n);E=o.insert(()=>(l.log.debug("Rough node insert CXC",r),a),":first-child"),L=o.insert(()=>(l.log.debug("Rough node insert CXC",r),r),":first-child")}else L=u.insert("rect",":first-child"),E=u.insert("line"),L.attr("class","outer title-state").attr("style",r).attr("x",-y.width/2-S).attr("y",-y.height/2-S).attr("width",y.width+(e.padding||0)).attr("height",y.height+(e.padding||0)),E.attr("class","divider").attr("x1",-y.width/2-S).attr("x2",y.width/2+S).attr("y1",-y.height/2-S+x.height+S).attr("y2",-y.height/2-S+x.height+S);return d(e,L),e.intersect=function(t){return q.rect(e,t)},o}function Pt(t,e,n,r,i,a,o){const s=(t+n)/2,l=(e+r)/2,c=Math.atan2(r-e,n-t),h=(n-t)/2/i,u=(r-e)/2/a,f=Math.sqrt(h**2+u**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const d=Math.sqrt(1-f**2),p=s+d*a*Math.sin(c)*(o?-1:1),g=l-d*i*Math.cos(c)*(o?-1:1),m=Math.atan2((e-g)/a,(t-p)/i);let y=Math.atan2((r-g)/a,(n-p)/i)-m;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);const b=[];for(let t=0;t<20;t++){const e=m+t/19*y,n=p+i*Math.cos(e),r=g+a*Math.sin(e);b.push({x:n,y:r})}return b}async function Rt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=e?.padding??0,l=e?.padding??0,c=(e?.width?e?.width:o.width)+2*s,f=(e?.height?e?.height:o.height)+2*l,m=e.radius||5,y=e.taper||5,{cssStyles:b}=e,x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{});e.stroke&&(_.stroke=e.stroke),"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=[{x:-c/2+y,y:-f/2},{x:c/2-y,y:-f/2},...Pt(c/2-y,-f/2,c/2,-f/2+y,m,m,!0),{x:c/2,y:-f/2+y},{x:c/2,y:f/2-y},...Pt(c/2,f/2-y,c/2-y,f/2,m,m,!0),{x:c/2-y,y:f/2},{x:-c/2+y,y:f/2},...Pt(-c/2+y,f/2,-c/2,f/2-y,m,m,!0),{x:-c/2,y:f/2-y},{x:-c/2,y:-f/2+y},...Pt(-c/2,-f/2+y,-c/2+y,-f/2,m,m,!0)],w=g(v),k=x.path(w,_),C=a.insert(()=>k,":first-child");return C.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",b),r&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",r),d(e,C),e.intersect=function(t){return q.polygon(e,v,t)},a}async function qt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,p(e)),c=e?.padding??0,f=Math.max(s.width+2*(e.padding??0),e?.width??0),g=Math.max(s.height+2*(e.padding??0),e?.height??0),m=-s.width/2-c,y=-s.height/2-c,{cssStyles:b}=e,x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=[{x:m,y},{x:m+f+8,y},{x:m+f+8,y:y+g},{x:m-8,y:y+g},{x:m-8,y},{x:m,y},{x:m,y:y+g}],w=x.polygon(v.map(t=>[t.x,t.y]),_),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(b)),r&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",r),b&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",r),l.attr("transform",`translate(${-f/2+4+(e.padding??0)-(s.x-(s.left??0))},${-g/2+(e.padding??0)-(s.y-(s.top??0))})`),d(e,k),e.intersect=function(t){return q.rect(e,t)},a}async function jt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=-l/2,m=-c/2,{cssStyles:y}=e,b=h.default.svg(a),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=[{x:f,y:m},{x:f,y:m+c},{x:f+l,y:m+c},{x:f+l,y:m-c/2}],v=g(_),w=b.path(v,x),k=a.insert(()=>w,":first-child");return k.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",y),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),k.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))}, ${-c/4+(e.padding??0)-(o.y-(o.top??0))})`),d(e,k),e.intersect=function(t){return q.polygon(e,_,t)},a}async function Wt(t,e){return wt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Ht(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.height+e.padding,l=o.width+s/4+e.padding,c=s/2,{cssStyles:f}=e,m=h.default.svg(a),b=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-l/2+c,y:-s/2},{x:l/2-c,y:-s/2},...y(-l/2+c,0,c,50,90,270),{x:l/2-c,y:s/2},...y(l/2-c,0,c,50,270,450)],_=g(x),v=m.path(_,b),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",f),r&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",r),d(e,w),e.intersect=function(t){return q.polygon(e,x,t)},a}async function Ut(t,e){return wt(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function Yt(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r;const{cssStyles:o}=e,{lineColor:s,stateBorder:l,nodeBorder:c}=n,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),f=h.default.svg(u),p=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=f.circle(0,0,14,{...p,stroke:s,strokeWidth:2}),m=l??c,y=f.circle(0,0,5,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),b=u.insert(()=>g,":first-child");return b.insert(()=>y),o&&b.selectAll("path").attr("style",o),a&&b.selectAll("path").attr("style",a),d(e,b),e.intersect=function(t){return q.circle(e,7,t)},u}function Gt(t,e,{config:{themeVariables:n}}){const{lineColor:r}=n,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if("handDrawn"===e.look){const t=h.default.svg(a).circle(0,0,14,(0,i.solidStateFill)(r));o=a.insert(()=>t),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return d(e,o),e.intersect=function(t){return q.circle(e,7,t)},a}async function Vt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,p(e)),l=(e?.padding||0)/2,c=s.width+e.padding,f=s.height+e.padding,g=-s.width/2-l,m=-s.height/2-l,y=[{x:0,y:0},{x:c,y:0},{x:c,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=t.rectangle(g-8,m,c+16,f,n),s=t.line(g,m,g,m+f,n),l=t.line(g+c,m,g+c,m+f,n);a.insert(()=>s,":first-child"),a.insert(()=>l,":first-child");const u=a.insert(()=>r,":first-child"),{cssStyles:p}=e;u.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(p)),d(e,u)}else{const t=U(a,c,f,y);r&&t.attr("style",r),d(e,t)}return e.intersect=function(t){return q.polygon(e,y,t)},a}async function Xt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=-s/2,f=-l/2,m=.2*l,y=.2*l,{cssStyles:b}=e,x=h.default.svg(a),_=(0,i.userNodeOverrides)(e,{}),v=[{x:c-m/2,y:f},{x:c+s+m/2,y:f},{x:c+s+m/2,y:f+l},{x:c-m/2,y:f+l}],w=[{x:c+s-m/2,y:f+l},{x:c+s+m/2,y:f+l},{x:c+s+m/2,y:f+l-y}];"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const k=g(v),C=x.path(k,_),S=g(w),T=x.path(S,{..._,fillStyle:"solid"}),M=a.insert(()=>T,":first-child");return M.insert(()=>C,":first-child"),M.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",b),r&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",r),d(e,M),e.intersect=function(t){return q.polygon(e,v,t)},a}async function Zt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=c/4,y=.2*l,b=.2*c,x=c+f,{cssStyles:_}=e,v=h.default.svg(a),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:x/2},...m(-l/2-l/2*.1,x/2,l/2+l/2*.1,x/2,f,.8),{x:l/2+l/2*.1,y:-x/2},{x:-l/2-l/2*.1,y:-x/2}],C=-l/2+l/2*.1,S=-x/2-.4*b,T=[{x:C+l-y,y:1.4*(S+c)},{x:C+l,y:S+c-b},{x:C+l,y:.9*(S+c)},...m(C+l,1.3*(S+c),C+l-y,1.5*(S+c),.03*-c,.5)],M=g(k),A=v.path(M,w),B=g(T),L=v.path(B,{...w,fillStyle:"solid"}),E=a.insert(()=>L,":first-child");return E.insert(()=>A,":first-child"),E.attr("class","basic label-container"),_&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",_),r&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",r),E.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-c/2+(e.padding??0)-f/2-(o.y-(o.top??0))})`),d(e,E),e.intersect=function(t){return q.polygon(e,k,t)},a}async function Qt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+e.padding,e?.width||0),l=Math.max(o.height+e.padding,e?.height||0),c=-s/2,h=-l/2,f=a.insert("rect",":first-child");return f.attr("class","text").attr("style",r).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",s).attr("height",l),d(e,f),e.intersect=function(t){return q.rect(e,t)},a}(0,l.__name)(Dt,"question"),(0,l.__name)(It,"rect_left_inv_arrow"),(0,l.__name)(zt,"rectWithTitle"),(0,l.__name)(Pt,"generateArcPoints"),(0,l.__name)(Rt,"roundedRect"),(0,l.__name)(qt,"shadedProcess"),(0,l.__name)(jt,"slopedRect"),(0,l.__name)(Wt,"squareRect"),(0,l.__name)(Ht,"stadium"),(0,l.__name)(Ut,"state"),(0,l.__name)(Yt,"stateEnd"),(0,l.__name)(Gt,"stateStart"),(0,l.__name)(Vt,"subroutine"),(0,l.__name)(Xt,"taggedRect"),(0,l.__name)(Zt,"taggedWaveEdgedRectangle"),(0,l.__name)(Qt,"text");var Kt=(0,l.__name)((t,e,n,r,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-r}\n l${n},0\n a${i},${a} 0,0,1 0,${r}\n M${n},${-r}\n a${i},${a} 0,0,0 0,${r}\n l${-n},0`,"createCylinderPathD"),Jt=(0,l.__name)((t,e,n,r,i,a)=>[`M${t},${e}`,`M${t+n},${e}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(" "),"createOuterCylinderPathD"),te=(0,l.__name)((t,e,n,r,i,a)=>[`M${t+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(" "),"createInnerCylinderPathD");async function ee(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l,halfPadding:c}=await u(t,e,p(e)),f="neo"===e.look?2*c:c,g=s.height+f,m=g/2,y=m/(2.5+g/50),b=s.width+y+f,{cssStyles:x}=e;let _;if("handDrawn"===e.look){const t=h.default.svg(a),n=Jt(0,0,b,g,y,m),r=te(0,0,b,g,y,m),o=t.path(n,(0,i.userNodeOverrides)(e,{})),s=t.path(r,(0,i.userNodeOverrides)(e,{fill:"none"}));_=a.insert(()=>s,":first-child"),_=a.insert(()=>o,":first-child"),_.attr("class","basic label-container"),x&&_.attr("style",x)}else{const t=Kt(0,0,b,g,y,m);_=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(x)).attr("style",r),_.attr("class","basic label-container"),x&&_.selectAll("path").attr("style",x),r&&_.selectAll("path").attr("style",r)}return _.attr("label-offset-x",y),_.attr("transform",`translate(${-b/2}, ${g/2} )`),l.attr("transform",`translate(${-s.width/2-y-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),d(e,_),e.intersect=function(t){const n=q.rect(e,t),r=n.y-(e.y??0);if(0!=m&&(Math.abs(r)<(e.height??0)/2||Math.abs(r)==(e.height??0)/2&&Math.abs(n.x-(e.x??0))>(e.width??0)/2-y)){let i=y*y*(1-r*r/(m*m));0!=i&&(i=Math.sqrt(Math.abs(i))),i=y-i,t.x-(e.x??0)>0&&(i=-i),n.x+=i}return n},a}async function ne(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=o.width+e.padding,l=o.height+e.padding,c=[{x:-3*l/6,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:0,y:-l}];let f;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=g(c),o=t.path(r,n);f=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),m&&f.attr("style",m)}else f=U(a,s,l,c);return r&&f.attr("style",r),e.width=s,e.height=l,d(e,f),e.intersect=function(t){return q.polygon(e,c,t)},a}async function re(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(60,o.width+2*(e.padding??0),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),{cssStyles:c}=e,f=h.default.svg(a),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2*.8,y:-l/2},{x:s/2*.8,y:-l/2},{x:s/2,y:-l/2*.6},{x:s/2,y:l/2},{x:-s/2,y:l/2},{x:-s/2,y:-l/2*.6}],b=g(y),x=f.path(b,m),_=a.insert(()=>x,":first-child");return _.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",r),d(e,_),e.intersect=function(t){return q.polygon(e,y,t)},a}async function ie(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:c}=await u(t,e,p(e)),f=(0,s.evaluate)((0,s.getConfig2)().flowchart?.htmlLabels),m=o.width+(e.padding??0),y=m+o.height,b=m+o.height,x=[{x:0,y:0},{x:b,y:0},{x:b/2,y:-y}],{cssStyles:_}=e,v=h.default.svg(a),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=g(x),C=v.path(k,w),S=a.insert(()=>C,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`);return _&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",_),r&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",r),e.width=m,e.height=y,d(e,S),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${y/2-(o.height+(e.padding??0)/(f?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return l.log.info("Triangle intersect",e,x,t),q.polygon(e,x,t)},a}async function ae(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=c/8,y=c+f,{cssStyles:b}=e,x=70-l,_=x>0?x/2:0,v=h.default.svg(a),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-l/2-_,y:y/2},...m(-l/2-_,y/2,l/2+_,y/2,f,.8),{x:l/2+_,y:-y/2},{x:-l/2-_,y:-y/2}],C=g(k),S=v.path(C,w),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",b),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),T.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-c/2+(e.padding??0)-f-(o.y-(o.top??0))})`),d(e,T),e.intersect=function(t){return q.polygon(e,k,t)},a}async function oe(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,p(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=s/l;let f=s,y=l;f>y*c?y=f/c:f=y*c,f=Math.max(f,100),y=Math.max(y,50);const b=Math.min(.2*y,y/4),x=y+2*b,{cssStyles:_}=e,v=h.default.svg(a),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-f/2,y:x/2},...m(-f/2,x/2,f/2,x/2,b,1),{x:f/2,y:-x/2},...m(f/2,-x/2,-f/2,-x/2,b,-1)],C=g(k),S=v.path(C,w),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),_&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",_),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),d(e,T),e.intersect=function(t){return q.polygon(e,k,t)},a}async function se(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),f=-l/2,g=-c/2,{cssStyles:m}=e,y=h.default.svg(a),b=(0,i.userNodeOverrides)(e,{}),x=[{x:f-5,y:g-5},{x:f-5,y:g+c},{x:f+l,y:g+c},{x:f+l,y:g-5}],_=`M${f-5},${g-5} L${f+l},${g-5} L${f+l},${g+c} L${f-5},${g+c} L${f-5},${g-5}\n M${f-5},${g} L${f+l},${g}\n M${f},${g-5} L${f},${g+c}`;"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const v=y.path(_,b),w=a.insert(()=>v,":first-child");return w.attr("transform","translate(2.5, 2.5)"),w.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),s.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),d(e,w),e.intersect=function(t){return q.polygon(e,x,t)},a}async function le(t,e){const n=e;if(n.alias&&(e.label=n.alias),"handDrawn"===e.look){const{themeVariables:n}=(0,s.getConfig)(),{background:r}=n,i={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${r}`]};await le(t,i)}const r=(0,s.getConfig)();e.useHtmlLabels=r.htmlLabels;let a=r.er?.diagramPadding??10,l=r.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:f,nodeStyles:g}=(0,i.styles2String)(e);if(0===n.attributes.length&&e.label){const n={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a,classes:""};(0,o.calculateTextWidth)(e.label,r)+2*n.labelPaddingX<r.er.minEntityWidth&&(e.width=r.er.minEntityWidth);const i=await wt(t,e,n);if(!(0,s.evaluate)(r.htmlLabels)){const t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}r.htmlLabels||(a*=1.25,l*=1.25);let m=p(e);m||(m="node default");const y=t.insert("g").attr("class",m).attr("id",e.domId||e.id),b=await ce(y,e.label??"",r,0,0,["name"],f);b.height+=l;let x=0;const _=[],v=[];let w=0,k=0,C=0,S=0,T=!0,M=!0;for(const t of n.attributes){const e=await ce(y,t.type,r,0,x,["attribute-type"],f);w=Math.max(w,e.width+a);const n=await ce(y,t.name,r,0,x,["attribute-name"],f);k=Math.max(k,n.width+a);const i=await ce(y,t.keys.join(),r,0,x,["attribute-keys"],f);C=Math.max(C,i.width+a);const o=await ce(y,t.comment,r,0,x,["attribute-comment"],f);S=Math.max(S,o.width+a);const s=Math.max(e.height,n.height,i.height,o.height)+l;v.push({yOffset:x,rowHeight:s}),x+=s}let A=4;C<=a&&(T=!1,C=0,A--),S<=a&&(M=!1,S=0,A--);const B=y.node().getBBox();if(b.width+2*a-(w+k+C+S)>0){const t=b.width+2*a-(w+k+C+S);w+=t/A,k+=t/A,C>0&&(C+=t/A),S>0&&(S+=t/A)}const L=w+k+C+S,E=h.default.svg(y),F=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");let $=0;v.length>0&&($=v.reduce((t,e)=>t+(e?.rowHeight??0),0));const O=Math.max(B.width+2*a,e?.width||0,L),N=Math.max(($??0)+b.height,e?.height||0),D=-O/2,I=-N/2;y.selectAll("g:not(:first-child)").each((t,e,n)=>{const r=(0,c.select)(n[e]),i=r.attr("transform");let o=0,s=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(o=parseFloat(t[1]),s=parseFloat(t[2]),r.attr("class").includes("attribute-name")?o+=w:r.attr("class").includes("attribute-keys")?o+=w+k:r.attr("class").includes("attribute-comment")&&(o+=w+k+C))}r.attr("transform",`translate(${D+a/2+o}, ${s+I+b.height+l/2})`)}),y.select(".name").attr("transform","translate("+-b.width/2+", "+(I+l/2)+")");const z=E.rectangle(D,I,O,N,F),P=y.insert(()=>z,":first-child").attr("style",u.join("")),{themeVariables:R}=(0,s.getConfig)(),{rowEven:j,rowOdd:W,nodeBorder:H}=R;_.push(0);for(const[t,e]of v.entries()){const n=(t+1)%2==0&&0!==e.yOffset,r=E.rectangle(D,b.height+I+e?.yOffset,O,e?.rowHeight,{...F,fill:n?j:W,stroke:H});y.insert(()=>r,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(n?"even":"odd"))}let U=E.line(D,b.height+I,O+D,b.height+I,F);y.insert(()=>U).attr("class","divider"),U=E.line(w+D,b.height+I,w+D,N+I,F),y.insert(()=>U).attr("class","divider"),T&&(U=E.line(w+k+D,b.height+I,w+k+D,N+I,F),y.insert(()=>U).attr("class","divider")),M&&(U=E.line(w+k+C+D,b.height+I,w+k+C+D,N+I,F),y.insert(()=>U).attr("class","divider"));for(const t of _)U=E.line(D,b.height+I+t,O+D,b.height+I+t,F),y.insert(()=>U).attr("class","divider");if(d(e,P),g&&"handDrawn"!==e.look){const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");y.selectAll("path").attr("style",e??""),y.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return q.rect(e,t)},y}async function ce(t,e,n,r=0,i=0,l=[],h=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${r}, ${i})`).attr("style",h);e!==(0,s.parseGenericTypes)(e)&&(e=(e=(0,s.parseGenericTypes)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const f=u.node().appendChild(await(0,a.createText)(u,e,{width:(0,o.calculateTextWidth)(e,n)+100,style:h,useHtmlLabels:n.htmlLabels},n));if(e.includes("&lt;")||e.includes("&gt;")){let t=f.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let d=f.getBBox();if((0,s.evaluate)(n.htmlLabels)){const t=f.children[0];t.style.textAlign="start";const e=(0,c.select)(f);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return d}async function he(t,e,n,r,i=n.class.padding??12){const a=r?0:3,o=t.insert("g").attr("class",p(e)).attr("id",e.domId||e.id);let s=null,l=null,c=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await ue(s,{text:`«${t}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ue(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const t of e.members)m+=await ue(c,t,m,[t.parseClassifier()])+a;d=c.node().getBBox().height,d<=0&&(d=i/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const t of e.methods)y+=await ue(h,t,y,[t.parseClassifier()])+a;let b=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),b=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+2*i})`),b=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+4*i:2*i)})`),b=o.node().getBBox(),{shapeSvg:o,bbox:b}}async function ue(t,e,n,r=[]){const i=t.insert("g").attr("class","label").attr("style",r.join("; ")),h=(0,s.getConfig)();let u="useHtmlLabels"in e?e.useHtmlLabels:(0,s.evaluate)(h.htmlLabels)??!0,f="";f="text"in e?e.text:e.label,!u&&f.startsWith("\\")&&(f=f.substring(1)),(0,s.hasKatex)(f)&&(u=!0);const d=await(0,a.createText)(i,(0,s.sanitizeText2)((0,o.decodeEntities)(f)),{width:(0,o.calculateTextWidth)(f,h)+50,classes:"markdown-node-label",useHtmlLabels:u},h);let p,g=1;if(u){const t=d.children[0],e=(0,c.select)(d);g=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(g+=t.innerHTML.split("<mrow>").length-1);const n=t.getElementsByTagName("img");if(n){const t=""===f.replace(/<img[^>]*>/g,"").trim();await Promise.all([...n].map(e=>new Promise(n=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=h.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,n=5,r=parseInt(t,10)*n+"px";e.style.minWidth=r,e.style.maxWidth=r}else e.style.width="100%";n(e)}(0,l.__name)(r,"setupImage"),setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}else{r.includes("font-weight: bolder")&&(0,c.select)(d).selectAll("tspan").attr("font-weight",""),g=d.children.length;const t=d.children[0];(""===d.textContent||d.textContent.includes("&gt"))&&(t.textContent=f[0]+f.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim()," "===f[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),p=d.getBBox()}return i.attr("transform","translate(0,"+(-p.height/(2*g)+n)+")"),p.height}async function fe(t,e){const n=(0,s.getConfig2)(),r=n.class.padding??12,a=r,o=e.useHtmlLabels??(0,s.evaluate)(n.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:f}=await he(t,e,n,o,a),{labelStyles:p,nodeStyles:g}=(0,i.styles2String)(e);e.labelStyle=p,e.cssStyles=l.styles||"";const m=l.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=m.replaceAll("!important","").split(";"));const y=0===l.members.length&&0===l.methods.length&&!n.class?.hideEmptyMembersBox,b=h.default.svg(u),x=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const _=f.width;let v=f.height;0===l.members.length&&0===l.methods.length?v+=a:l.members.length>0&&0===l.methods.length&&(v+=2*a);const w=-_/2,k=-v/2,C=b.rectangle(w-r,k-r-(y?r:0===l.members.length&&0===l.methods.length?-r/2:0),_+2*r,v+2*r+(y?2*r:0===l.members.length&&0===l.methods.length?-r:0),x),S=u.insert(()=>C,":first-child");S.attr("class","basic label-container");const T=S.node().getBBox();u.selectAll(".text").each((t,e,n)=>{const i=(0,c.select)(n[e]),a=i.attr("transform");let s=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(s=parseFloat(t[2]))}let h=s+k+r-(y?r:0===l.members.length&&0===l.methods.length?-r/2:0);o||(h-=4);let f=w;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(f=-i.node()?.getBBox().width/2||0,u.selectAll("text").each(function(t,e,n){"middle"===window.getComputedStyle(n[e]).textAnchor&&(f=0)})),i.attr("transform",`translate(${f}, ${h})`)});const M=u.select(".annotation-group").node().getBBox().height-(y?r/2:0)||0,A=u.select(".label-group").node().getBBox().height-(y?r/2:0)||0,B=u.select(".members-group").node().getBBox().height-(y?r/2:0)||0;if(l.members.length>0||l.methods.length>0||y){const t=b.line(T.x,M+A+k+r,T.x+T.width,M+A+k+r,x);u.insert(()=>t).attr("class","divider").attr("style",m)}if(y||l.members.length>0||l.methods.length>0){const t=b.line(T.x,M+A+B+k+2*a+r,T.x+T.width,M+A+B+k+r+2*a,x);u.insert(()=>t).attr("class","divider").attr("style",m)}if("handDrawn"!==l.look&&u.selectAll("path").attr("style",m),S.select(":nth-child(2)").attr("style",m),u.selectAll(".divider").select("path").attr("style",m),e.labelStyle?u.selectAll("span").attr("style",e.labelStyle):u.selectAll("span").attr("style",m),!o){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(m);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}else if(p){const e=t.exec(p);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}}}return d(e,S),e.intersect=function(t){return q.rect(e,t)},u}async function de(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const a=e,o=e,s="verifyMethod"in e,l=p(e),u=t.insert("g").attr("class",l).attr("id",e.domId??e.id);let f;f=s?await pe(u,`&lt;&lt;${a.type}&gt;&gt;`,0,e.labelStyle):await pe(u,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let g=f;const m=await pe(u,a.name,g,e.labelStyle+"; font-weight: bold;");g+=m+20,s?(g+=await pe(u,a.requirementId?`ID: ${a.requirementId}`:"",g,e.labelStyle),g+=await pe(u,a.text?`Text: ${a.text}`:"",g,e.labelStyle),g+=await pe(u,a.risk?`Risk: ${a.risk}`:"",g,e.labelStyle),await pe(u,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",g,e.labelStyle)):(g+=await pe(u,o.type?`Type: ${o.type}`:"",g,e.labelStyle),await pe(u,o.docRef?`Doc Ref: ${o.docRef}`:"",g,e.labelStyle));const y=(u.node()?.getBBox().width??200)+20,b=(u.node()?.getBBox().height??200)+20,x=-y/2,_=-b/2,v=h.default.svg(u),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=v.rectangle(x,_,y,b,w),C=u.insert(()=>k,":first-child");if(C.attr("class","basic label-container").attr("style",r),u.selectAll(".label").each((t,e,n)=>{const r=(0,c.select)(n[e]),i=r.attr("transform");let a=0,o=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(a=parseFloat(t[1]),o=parseFloat(t[2]))}const s=o-b/2;let l=x+10;0!==e&&1!==e||(l=a),r.attr("transform",`translate(${l}, ${s+20})`)}),g>f+m+20){const t=v.line(x,_+f+m+20,x+y,_+f+m+20,w);u.insert(()=>t).attr("style",r)}return d(e,C),e.intersect=function(t){return q.rect(e,t)},u}async function pe(t,e,n,r=""){if(""===e)return 0;const i=t.insert("g").attr("class","label").attr("style",r),l=(0,s.getConfig2)(),h=l.htmlLabels??!0,u=await(0,a.createText)(i,(0,s.sanitizeText2)((0,o.decodeEntities)(e)),{width:(0,o.calculateTextWidth)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:h,style:r},l);let f;if(h){const t=u.children[0],e=(0,c.select)(u);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{const t=u.children[0];for(const e of t.children)e.textContent=e.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),r&&e.setAttribute("style",r);f=u.getBBox(),f.height+=6}return i.attr("transform",`translate(${-f.width/2},${-f.height/2+n})`),f.height}(0,l.__name)(ee,"tiltedCylinder"),(0,l.__name)(ne,"trapezoid"),(0,l.__name)(re,"trapezoidalPentagon"),(0,l.__name)(ie,"triangle"),(0,l.__name)(ae,"waveEdgedRectangle"),(0,l.__name)(oe,"waveRectangle"),(0,l.__name)(se,"windowPane"),(0,l.__name)(le,"erBox"),(0,l.__name)(ce,"addText"),(0,l.__name)(he,"textHelper"),(0,l.__name)(ue,"addText"),(0,l.__name)(fe,"classBox"),(0,l.__name)(de,"requirementBox"),(0,l.__name)(pe,"addText");var ge=(0,l.__name)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function me(t,e,{config:n}){const{labelStyles:r,nodeStyles:a}=(0,i.styles2String)(e);e.labelStyle=r||"";const o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await u(t,e,p(e)),g=e.padding||10;let m,y="";"ticket"in e&&e.ticket&&n?.kanban?.ticketBaseUrl&&(y=n?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),m=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",y).attr("target","_blank"));const b={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,_;({label:x,bbox:_}=m?await f(m,"ticket"in e&&e.ticket||"",b):await f(s,"ticket"in e&&e.ticket||"",b));const{label:v,bbox:k}=await f(s,"assigned"in e&&e.assigned||"",b);e.width=o;const C=e?.width||0,S=Math.max(_.height,k.height)/2,T=Math.max(l.height+20,e?.height||0)+S,M=-C/2,A=-T/2;let B;c.attr("transform","translate("+(g-C/2)+", "+(-S-l.height/2)+")"),x.attr("transform","translate("+(g-C/2)+", "+(-S+l.height/2)+")"),v.attr("transform","translate("+(g+C/2-k.width-20)+", "+(-S+l.height/2)+")");const{rx:L,ry:E}=e,{cssStyles:F}=e;if("handDrawn"===e.look){const t=h.default.svg(s),n=(0,i.userNodeOverrides)(e,{}),r=L||E?t.path(w(M,A,C,T,L||0),n):t.rectangle(M,A,C,T,n);B=s.insert(()=>r,":first-child"),B.attr("class","basic label-container").attr("style",F||null)}else{B=s.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",E??5).attr("x",M).attr("y",A).attr("width",C).attr("height",T);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),n=M+2,r=A+Math.floor((L??0)/2),i=A+T-Math.floor((L??0)/2);e.attr("x1",n).attr("y1",r).attr("x2",n).attr("y2",i).attr("stroke-width","4").attr("stroke",ge(t))}}return d(e,B),e.height=T,e.intersect=function(t){return q.rect(e,t)},s}async function ye(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:c,label:f}=await u(t,e,p(e)),g=s.width+10*c,m=s.height+8*c,y=.15*g,{cssStyles:b}=e,x=s.width+20,_=s.height+20,v=Math.max(g,x),w=Math.max(m,_);let k;f.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const C=`M0 0 \n a${y},${y} 1 0,0 ${.25*v},${-1*w*.1}\n a${y},${y} 1 0,0 ${.25*v},0\n a${y},${y} 1 0,0 ${.25*v},0\n a${y},${y} 1 0,0 ${.25*v},${.1*w}\n\n a${y},${y} 1 0,0 ${.15*v},${.33*w}\n a${.8*y},${.8*y} 1 0,0 0,${.34*w}\n a${y},${y} 1 0,0 ${-1*v*.15},${.33*w}\n\n a${y},${y} 1 0,0 ${-1*v*.25},${.15*w}\n a${y},${y} 1 0,0 ${-1*v*.25},0\n a${y},${y} 1 0,0 ${-1*v*.25},0\n a${y},${y} 1 0,0 ${-1*v*.25},${-1*w*.15}\n\n a${y},${y} 1 0,0 ${-1*v*.1},${-1*w*.33}\n a${.8*y},${.8*y} 1 0,0 0,${-1*w*.34}\n a${y},${y} 1 0,0 ${.1*v},${-1*w*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=t.path(C,n);k=a.insert(()=>r,":first-child"),k.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(b))}else k=a.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",C);return k.attr("transform",`translate(${-v/2}, ${-w/2})`),d(e,k),e.calcIntersect=function(t,e){return q.rect(t,e)},e.intersect=function(t){return l.log.info("Bang intersect",e,t),q.rect(e,t)},a}async function be(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:c,label:f}=await u(t,e,p(e)),g=s.width+2*c,m=s.height+2*c,y=.15*g,b=.25*g,x=.35*g,_=.2*g,{cssStyles:v}=e;let w;const k=`M0 0 \n a${y},${y} 0 0,1 ${.25*g},${-1*g*.1}\n a${x},${x} 1 0,1 ${.4*g},${-1*g*.1}\n a${b},${b} 1 0,1 ${.35*g},${.2*g}\n\n a${y},${y} 1 0,1 ${.15*g},${.35*m}\n a${_},${_} 1 0,1 ${-1*g*.15},${.65*m}\n\n a${b},${y} 1 0,1 ${-1*g*.25},${.15*g}\n a${x},${x} 1 0,1 ${-1*g*.5},0\n a${y},${y} 1 0,1 ${-1*g*.25},${-1*g*.15}\n\n a${y},${y} 1 0,1 ${-1*g*.1},${-1*m*.35}\n a${_},${_} 1 0,1 ${.1*g},${-1*m*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.default.svg(a),n=(0,i.userNodeOverrides)(e,{}),r=t.path(k,n);w=a.insert(()=>r,":first-child"),w.attr("class","basic label-container").attr("style",(0,o.handleUndefinedAttr)(v))}else w=a.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",k);return f.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),w.attr("transform",`translate(${-g/2}, ${-m/2})`),d(e,w),e.calcIntersect=function(t,e){return q.rect(t,e)},e.intersect=function(t){return l.log.info("Cloud intersect",e,t),q.rect(e,t)},a}async function xe(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,halfPadding:s,label:l}=await u(t,e,p(e)),c=o.width+8*s,h=o.height+2*s,f=`\n M${-c/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${c-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${10-c}\n q-5,0 -5,-5\n Z\n `,g=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",r).attr("d",f);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>l.node()),d(e,g),e.calcIntersect=function(t,e){return q.rect(t,e)},e.intersect=function(t){return q.rect(e,t)},a}async function _e(t,e){return V(t,e,{padding:e.padding??0})}(0,l.__name)(me,"kanbanItem"),(0,l.__name)(ye,"bang"),(0,l.__name)(be,"cloud"),(0,l.__name)(xe,"defaultMindmapNode"),(0,l.__name)(_e,"mindmapCircle");var ve=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Wt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Rt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ht},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Vt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:st},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:V},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ye},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:be},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Dt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:St},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ct},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ne},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:vt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ct},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Qt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Y},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:qt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Gt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ft},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:gt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:K},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:nt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Tt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ae},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:dt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ee},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:rt},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ie},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:se},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ht},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:re},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ut},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:jt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:$t},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ft},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:H},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Z},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Zt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:oe},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:It},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Et}],we=(0,l.__name)(()=>{const t={state:Ut,choice:G,note:Ot,rectWithTitle:zt,labelRect:kt,iconSquare:xt,iconCircle:yt,icon:mt,iconRounded:bt,imageSquare:_t,anchor:j,kanbanItem:me,mindmapCircle:_e,defaultMindmapNode:xe,classBox:fe,erBox:le,requirementBox:de},e=[...Object.entries(t),...ve.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function ke(t){return t in we}(0,l.__name)(ke,"isValidShape");var Ce=new Map;async function Se(t,e,n){let r,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?we[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===n.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),i=await a(r,e,n)}else i=await a(t,e,n),r=i;return e.tooltip&&i.attr("title",e.tooltip),Ce.set(e.id,r),e.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}(0,l.__name)(Se,"insertNode");var Te=(0,l.__name)((t,e)=>{Ce.set(e.id,t)},"setNodeElem"),Me=(0,l.__name)(()=>{Ce.clear()},"clear"),Ae=(0,l.__name)(t=>{const e=Ce.get(t.id);l.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")},38698(t,e,n){n.r(e),n.d(e,{JSON_SCHEMA:()=>tn,load:()=>en});var r=n(60162);function i(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:i(t)?[]:[t]}function s(t,e){var n,r,i,a;if(e)for(n=0,r=(a=Object.keys(e)).length;n<r;n+=1)t[i=a[n]]=e[i];return t}function l(t,e){var n,r="";for(n=0;n<e;n+=1)r+=t;return r}function c(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}(0,r.__name)(i,"isNothing"),(0,r.__name)(a,"isObject"),(0,r.__name)(o,"toArray"),(0,r.__name)(s,"extend"),(0,r.__name)(l,"repeat"),(0,r.__name)(c,"isNegativeZero");var h={isNothing:i,isObject:a,toArray:o,repeat:l,isNegativeZero:c,extend:s};function u(t,e){var n="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(n+="\n\n"+t.mark.snippet),r+" "+n):r}function f(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=u(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(0,r.__name)(u,"formatError"),(0,r.__name)(f,"YAMLException$1"),f.prototype=Object.create(Error.prototype),f.prototype.constructor=f,f.prototype.toString=(0,r.__name)(function(t){return this.name+": "+u(this,t)},"toString");var d=f;function p(t,e,n,r,i){var a="",o="",s=Math.floor(i/2)-1;return r-e>s&&(e=r-s+(a=" ... ").length),n-r>s&&(n=r+s-(o=" ...").length),{str:a+t.slice(e,n).replace(/\t/g,"→")+o,pos:r-e+a.length}}function g(t,e){return h.repeat(" ",e-t.length)+t}function m(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,i=[0],a=[],o=-1;n=r.exec(t.buffer);)a.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,f=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=p(t.buffer,i[o-s],a[o-s],t.position-(i[o]-i[o-s]),f),c=h.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=p(t.buffer,i[o],a[o],t.position,f),c+=h.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",c+=h.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=a.length);s++)l=p(t.buffer,i[o+s],a[o+s],t.position-(i[o]-i[o+s]),f),c+=h.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,r.__name)(p,"getLine"),(0,r.__name)(g,"padStart"),(0,r.__name)(m,"makeSnippet");var y=m,b=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],x=["scalar","sequence","mapping"];function _(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}function v(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===b.indexOf(e))throw new d('Unknown option "'+e+'" 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(t){return t},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=_(e.styleAliases||null),-1===x.indexOf(this.kind))throw new d('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,r.__name)(_,"compileStyleAliases"),(0,r.__name)(v,"Type$1");var w=v;function k(t,e){var n=[];return t[e].forEach(function(t){var e=n.length;n.forEach(function(n,r){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=r)}),n[e]=t}),n}function C(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for((0,r.__name)(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return n}function S(t){return this.extend(t)}(0,r.__name)(k,"compileList"),(0,r.__name)(C,"compileMap"),(0,r.__name)(S,"Schema$1"),S.prototype.extend=(0,r.__name)(function(t){var e=[],n=[];if(t instanceof w)n.push(t);else if(Array.isArray(t))n=n.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new d("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof w))throw new d("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new d("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new d("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(t){if(!(t instanceof w))throw new d("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(S.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=k(r,"implicit"),r.compiledExplicit=k(r,"explicit"),r.compiledTypeMap=C(r.compiledImplicit,r.compiledExplicit),r},"extend");var T=new S({explicit:[new w("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,r.__name)(function(t){return null!==t?t:""},"construct")}),new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,r.__name)(function(t){return null!==t?t:[]},"construct")}),new w("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,r.__name)(function(t){return null!==t?t:{}},"construct")})]});function M(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function A(){return null}function B(t){return null===t}(0,r.__name)(M,"resolveYamlNull"),(0,r.__name)(A,"constructYamlNull"),(0,r.__name)(B,"isNull");var L=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:M,construct:A,predicate:B,represent:{canonical:(0,r.__name)(function(){return"~"},"canonical"),lowercase:(0,r.__name)(function(){return"null"},"lowercase"),uppercase:(0,r.__name)(function(){return"NULL"},"uppercase"),camelcase:(0,r.__name)(function(){return"Null"},"camelcase"),empty:(0,r.__name)(function(){return""},"empty")},defaultStyle:"lowercase"});function E(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function F(t){return"true"===t||"True"===t||"TRUE"===t}function $(t){return"[object Boolean]"===Object.prototype.toString.call(t)}(0,r.__name)(E,"resolveYamlBoolean"),(0,r.__name)(F,"constructYamlBoolean"),(0,r.__name)($,"isBoolean");var O=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:E,construct:F,predicate:$,represent:{lowercase:(0,r.__name)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,r.__name)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,r.__name)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function N(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function D(t){return 48<=t&&t<=55}function I(t){return 48<=t&&t<=57}function z(t){if(null===t)return!1;var e,n=t.length,r=0,i=!1;if(!n)return!1;if("-"!==(e=t[r])&&"+"!==e||(e=t[++r]),"0"===e){if(r+1===n)return!0;if("b"===(e=t[++r])){for(r++;r<n;r++)if("_"!==(e=t[r])){if("0"!==e&&"1"!==e)return!1;i=!0}return i&&"_"!==e}if("x"===e){for(r++;r<n;r++)if("_"!==(e=t[r])){if(!N(t.charCodeAt(r)))return!1;i=!0}return i&&"_"!==e}if("o"===e){for(r++;r<n;r++)if("_"!==(e=t[r])){if(!D(t.charCodeAt(r)))return!1;i=!0}return i&&"_"!==e}}if("_"===e)return!1;for(;r<n;r++)if("_"!==(e=t[r])){if(!I(t.charCodeAt(r)))return!1;i=!0}return!(!i||"_"===e)}function P(t){var e,n=t,r=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(e=n[0])&&"+"!==e||("-"===e&&(r=-1),e=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===e){if("b"===n[1])return r*parseInt(n.slice(2),2);if("x"===n[1])return r*parseInt(n.slice(2),16);if("o"===n[1])return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)}function R(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!h.isNegativeZero(t)}(0,r.__name)(N,"isHexCode"),(0,r.__name)(D,"isOctCode"),(0,r.__name)(I,"isDecCode"),(0,r.__name)(z,"resolveYamlInteger"),(0,r.__name)(P,"constructYamlInteger"),(0,r.__name)(R,"isInteger");var q=new w("tag:yaml.org,2002:int",{kind:"scalar",resolve:z,construct:P,predicate:R,represent:{binary:(0,r.__name)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,r.__name)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,r.__name)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,r.__name)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),j=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function W(t){return null!==t&&!(!j.test(t)||"_"===t[t.length-1])}function H(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)}(0,r.__name)(W,"resolveYamlFloat"),(0,r.__name)(H,"constructYamlFloat");var U=/^[-+]?[0-9]+e/;function Y(t,e){var n;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(h.isNegativeZero(t))return"-0.0";return n=t.toString(10),U.test(n)?n.replace("e",".e"):n}function G(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||h.isNegativeZero(t))}(0,r.__name)(Y,"representYamlFloat"),(0,r.__name)(G,"isFloat");var V=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:W,construct:H,predicate:G,represent:Y,defaultStyle:"lowercase"}),X=T.extend({implicit:[L,O,q,V]}),Z=X,Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),K=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 J(t){return null!==t&&(null!==Q.exec(t)||null!==K.exec(t))}function tt(t){var e,n,r,i,a,o,s,l,c=0,h=null;if(null===(e=Q.exec(t))&&(e=K.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(n,r,i,a,o,s,c)),h&&l.setTime(l.getTime()-h),l}function et(t){return t.toISOString()}(0,r.__name)(J,"resolveYamlTimestamp"),(0,r.__name)(tt,"constructYamlTimestamp"),(0,r.__name)(et,"representYamlTimestamp");var nt=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function rt(t){return"<<"===t||null===t}(0,r.__name)(rt,"resolveYamlMerge");var it=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rt}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ot(t){if(null===t)return!1;var e,n,r=0,i=t.length,a=at;for(n=0;n<i;n++)if(!((e=a.indexOf(t.charAt(n)))>64)){if(e<0)return!1;r+=6}return r%8==0}function st(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,a=at,o=0,s=[];for(e=0;e<i;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(r.charAt(e));return 0==(n=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===n?(s.push(o>>10&255),s.push(o>>2&255)):12===n&&s.push(o>>4&255),new Uint8Array(s)}function lt(t){var e,n,r="",i=0,a=t.length,o=at;for(e=0;e<a;e++)e%3==0&&e&&(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+t[e];return 0==(n=a%3)?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===n?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===n&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function ct(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,r.__name)(ot,"resolveYamlBinary"),(0,r.__name)(st,"constructYamlBinary"),(0,r.__name)(lt,"representYamlBinary"),(0,r.__name)(ct,"isBinary");var ht=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ot,construct:st,predicate:ct,represent:lt}),ut=Object.prototype.hasOwnProperty,ft=Object.prototype.toString;function dt(t){if(null===t)return!0;var e,n,r,i,a,o=[],s=t;for(e=0,n=s.length;e<n;e+=1){if(r=s[e],a=!1,"[object Object]"!==ft.call(r))return!1;for(i in r)if(ut.call(r,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==o.indexOf(i))return!1;o.push(i)}return!0}function pt(t){return null!==t?t:[]}(0,r.__name)(dt,"resolveYamlOmap"),(0,r.__name)(pt,"constructYamlOmap");var gt=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:dt,construct:pt}),mt=Object.prototype.toString;function yt(t){if(null===t)return!0;var e,n,r,i,a,o=t;for(a=new Array(o.length),e=0,n=o.length;e<n;e+=1){if(r=o[e],"[object Object]"!==mt.call(r))return!1;if(1!==(i=Object.keys(r)).length)return!1;a[e]=[i[0],r[i[0]]]}return!0}function bt(t){if(null===t)return[];var e,n,r,i,a,o=t;for(a=new Array(o.length),e=0,n=o.length;e<n;e+=1)r=o[e],i=Object.keys(r),a[e]=[i[0],r[i[0]]];return a}(0,r.__name)(yt,"resolveYamlPairs"),(0,r.__name)(bt,"constructYamlPairs");var xt=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:yt,construct:bt}),_t=Object.prototype.hasOwnProperty;function vt(t){if(null===t)return!0;var e,n=t;for(e in n)if(_t.call(n,e)&&null!==n[e])return!1;return!0}function wt(t){return null!==t?t:{}}(0,r.__name)(vt,"resolveYamlSet"),(0,r.__name)(wt,"constructYamlSet");var kt=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:vt,construct:wt}),Ct=Z.extend({implicit:[nt,it],explicit:[ht,gt,xt,kt]}),St=Object.prototype.hasOwnProperty,Tt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Mt=/[\x85\u2028\u2029]/,At=/[,\[\]\{\}]/,Bt=/^(?:!|!!|![a-z\-]+!)$/i,Lt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Et(t){return Object.prototype.toString.call(t)}function Ft(t){return 10===t||13===t}function $t(t){return 9===t||32===t}function Ot(t){return 9===t||32===t||10===t||13===t}function Nt(t){return 44===t||91===t||93===t||123===t||125===t}function Dt(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function It(t){return 120===t?2:117===t?4:85===t?8:0}function zt(t){return 48<=t&&t<=57?t-48:-1}function Pt(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Rt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}(0,r.__name)(Et,"_class"),(0,r.__name)(Ft,"is_EOL"),(0,r.__name)($t,"is_WHITE_SPACE"),(0,r.__name)(Ot,"is_WS_OR_EOL"),(0,r.__name)(Nt,"is_FLOW_INDICATOR"),(0,r.__name)(Dt,"fromHexCode"),(0,r.__name)(It,"escapedHexLen"),(0,r.__name)(zt,"fromDecimalCode"),(0,r.__name)(Pt,"simpleEscapeSequence"),(0,r.__name)(Rt,"charFromCodepoint");var qt,jt=new Array(256),Wt=new Array(256);for(qt=0;qt<256;qt++)jt[qt]=Pt(qt)?1:0,Wt[qt]=Pt(qt);function Ht(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Ct,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 Ut(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=y(n),new d(e,n)}function Yt(t,e){throw Ut(t,e)}function Gt(t,e){t.onWarning&&t.onWarning.call(null,Ut(t,e))}(0,r.__name)(Ht,"State$1"),(0,r.__name)(Ut,"generateError"),(0,r.__name)(Yt,"throwError"),(0,r.__name)(Gt,"throwWarning");var Vt={YAML:(0,r.__name)(function(t,e,n){var r,i,a;null!==t.version&&Yt(t,"duplication of %YAML directive"),1!==n.length&&Yt(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Yt(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),a=parseInt(r[2],10),1!==i&&Yt(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Gt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,r.__name)(function(t,e,n){var r,i;2!==n.length&&Yt(t,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],Bt.test(r)||Yt(t,"ill-formed tag handle (first argument) of the TAG directive"),St.call(t.tagMap,r)&&Yt(t,'there is a previously declared suffix for "'+r+'" tag handle'),Lt.test(i)||Yt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){Yt(t,"tag prefix is malformed: "+i)}t.tagMap[r]=i},"handleTagDirective")};function Xt(t,e,n,r){var i,a,o,s;if(e<n){if(s=t.input.slice(e,n),r)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||Yt(t,"expected valid JSON character");else Tt.test(s)&&Yt(t,"the stream contains non-printable characters");t.result+=s}}function Zt(t,e,n,r){var i,a,o,s;for(h.isObject(n)||Yt(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(i=Object.keys(n)).length;o<s;o+=1)a=i[o],St.call(e,a)||(e[a]=n[a],r[a]=!0)}function Qt(t,e,n,r,i,a,o,s,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&Yt(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===Et(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===Et(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)Zt(t,e,a[c],n);else Zt(t,e,a,n);else t.json||St.call(n,i)||!St.call(e,i)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,Yt(t,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete n[i];return e}function Kt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Yt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Jt(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);0!==i;){for(;$t(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)do{i=t.input.charCodeAt(++t.position)}while(10!==i&&13!==i&&0!==i);if(!Ft(i))break;for(Kt(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==n&&0!==r&&t.lineIndent<n&&Gt(t,"deficient indentation"),r}function te(t){var e,n=t.position;return!(45!==(e=t.input.charCodeAt(n))&&46!==e||e!==t.input.charCodeAt(n+1)||e!==t.input.charCodeAt(n+2)||(n+=3,0!==(e=t.input.charCodeAt(n))&&!Ot(e)))}function ee(t,e){1===e?t.result+=" ":e>1&&(t.result+=h.repeat("\n",e-1))}function ne(t,e,n){var r,i,a,o,s,l,c,h,u=t.kind,f=t.result;if(Ot(h=t.input.charCodeAt(t.position))||Nt(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(Ot(r=t.input.charCodeAt(t.position+1))||n&&Nt(r)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,o=!1;0!==h;){if(58===h){if(Ot(r=t.input.charCodeAt(t.position+1))||n&&Nt(r))break}else if(35===h){if(Ot(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&te(t)||n&&Nt(h))break;if(Ft(h)){if(s=t.line,l=t.lineStart,c=t.lineIndent,Jt(t,!1,-1),t.lineIndent>=e){o=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=c;break}}o&&(Xt(t,i,a,!1),ee(t,t.line-s),i=a=t.position,o=!1),$t(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Xt(t,i,a,!1),!!t.result||(t.kind=u,t.result=f,!1)}function re(t,e){var n,r,i;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(Xt(t,r,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else Ft(n)?(Xt(t,r,i,!0),ee(t,Jt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&te(t)?Yt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Yt(t,"unexpected end of the stream within a single quoted scalar")}function ie(t,e){var n,r,i,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Xt(t,n,t.position,!0),t.position++,!0;if(92===s){if(Xt(t,n,t.position,!0),Ft(s=t.input.charCodeAt(++t.position)))Jt(t,!1,e);else if(s<256&&jt[s])t.result+=Wt[s],t.position++;else if((o=It(s))>0){for(i=o,a=0;i>0;i--)(o=Dt(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:Yt(t,"expected hexadecimal character");t.result+=Rt(a),t.position++}else Yt(t,"unknown escape sequence");n=r=t.position}else Ft(s)?(Xt(t,n,r,!0),ee(t,Jt(t,!1,e)),n=r=t.position):t.position===t.lineStart&&te(t)?Yt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}Yt(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var n,r,i,a,o,s,l,c,h,u,f,d,p=!0,g=t.tag,m=t.anchor,y=Object.create(null);if(91===(d=t.input.charCodeAt(t.position)))o=93,c=!1,a=[];else{if(123!==d)return!1;o=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),d=t.input.charCodeAt(++t.position);0!==d;){if(Jt(t,!0,e),(d=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=a,!0;p?44===d&&Yt(t,"expected the node content, but found ','"):Yt(t,"missed comma between flow collection entries"),f=null,s=l=!1,63===d&&Ot(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,Jt(t,!0,e)),n=t.line,r=t.lineStart,i=t.position,fe(t,e,1,!1,!0),u=t.tag,h=t.result,Jt(t,!0,e),d=t.input.charCodeAt(t.position),!l&&t.line!==n||58!==d||(s=!0,d=t.input.charCodeAt(++t.position),Jt(t,!0,e),fe(t,e,1,!1,!0),f=t.result),c?Qt(t,a,y,u,h,f,n,r,i):s?a.push(Qt(t,null,y,u,h,f,n,r,i)):a.push(h),Jt(t,!0,e),44===(d=t.input.charCodeAt(t.position))?(p=!0,d=t.input.charCodeAt(++t.position)):p=!1}Yt(t,"unexpected end of the stream within a flow collection")}function oe(t,e){var n,r,i,a,o=1,s=!1,l=!1,c=e,u=0,f=!1;if(124===(a=t.input.charCodeAt(t.position)))r=!1;else{if(62!==a)return!1;r=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===o?o=43===a?3:2:Yt(t,"repeat of a chomping mode identifier");else{if(!((i=zt(a))>=0))break;0===i?Yt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Yt(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if($t(a)){do{a=t.input.charCodeAt(++t.position)}while($t(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Ft(a)&&0!==a)}for(;0!==a;){for(Kt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<c)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>c&&(c=t.lineIndent),Ft(a))u++;else{if(t.lineIndent<c){3===o?t.result+=h.repeat("\n",s?1+u:u):1===o&&s&&(t.result+="\n");break}for(r?$t(a)?(f=!0,t.result+=h.repeat("\n",s?1+u:u)):f?(f=!1,t.result+=h.repeat("\n",u+1)):0===u?s&&(t.result+=" "):t.result+=h.repeat("\n",u):t.result+=h.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,n=t.position;!Ft(a)&&0!==a;)a=t.input.charCodeAt(++t.position);Xt(t,n,t.position,!1)}}return!0}function se(t,e){var n,r,i=t.tag,a=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),r=t.input.charCodeAt(t.position);0!==r&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),45===r)&&Ot(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,Jt(t,!0,-1)&&t.lineIndent<=e)o.push(null),r=t.input.charCodeAt(t.position);else if(n=t.line,fe(t,e,3,!1,!0),o.push(t.result),Jt(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==r)Yt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=i,t.anchor=a,t.kind="sequence",t.result=o,!0)}function le(t,e,n){var r,i,a,o,s,l,c,h=t.tag,u=t.anchor,f={},d=Object.create(null),p=null,g=null,m=null,y=!1,b=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=f),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),a=t.line,63!==c&&58!==c||!Ot(r)){if(o=t.line,s=t.lineStart,l=t.position,!fe(t,n,2,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);$t(c);)c=t.input.charCodeAt(++t.position);if(58===c)Ot(c=t.input.charCodeAt(++t.position))||Yt(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Qt(t,f,d,p,g,null,o,s,l),p=g=m=null),b=!0,y=!1,i=!1,p=t.tag,g=t.result;else{if(!b)return t.tag=h,t.anchor=u,!0;Yt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return t.tag=h,t.anchor=u,!0;Yt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Qt(t,f,d,p,g,null,o,s,l),p=g=m=null),b=!0,y=!0,i=!0):y?(y=!1,i=!0):Yt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=r;if((t.line===a||t.lineIndent>e)&&(y&&(o=t.line,s=t.lineStart,l=t.position),fe(t,e,4,!0,i)&&(y?g=t.result:m=t.result),y||(Qt(t,f,d,p,g,m,o,s,l),p=g=m=null),Jt(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Yt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Qt(t,f,d,p,g,null,o,s,l),b&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=f),b}function ce(t){var e,n,r,i,a=!1,o=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Yt(t,"duplication of a tag property"),60===(i=t.input.charCodeAt(++t.position))?(a=!0,i=t.input.charCodeAt(++t.position)):33===i?(o=!0,n="!!",i=t.input.charCodeAt(++t.position)):n="!",e=t.position,a){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&62!==i);t.position<t.length?(r=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):Yt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!Ot(i);)33===i&&(o?Yt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Bt.test(n)||Yt(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),At.test(r)&&Yt(t,"tag suffix cannot contain flow indicator characters")}r&&!Lt.test(r)&&Yt(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(e){Yt(t,"tag name is malformed: "+r)}return a?t.tag=r:St.call(t.tagMap,n)?t.tag=t.tagMap[n]+r:"!"===n?t.tag="!"+r:"!!"===n?t.tag="tag:yaml.org,2002:"+r:Yt(t,'undeclared tag handle "'+n+'"'),!0}function he(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Yt(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Ot(n)&&!Nt(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function ue(t){var e,n,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Ot(r)&&!Nt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),St.call(t.anchorMap,n)||Yt(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],Jt(t,!0,-1),!0}function fe(t,e,n,r,i){var a,o,s,l,c,h,u,f,d,p=1,g=!1,m=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=o=s=4===n||3===n,r&&Jt(t,!0,-1)&&(g=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),1===p)for(;ce(t)||he(t);)Jt(t,!0,-1)?(g=!0,s=a,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):s=!1;if(s&&(s=g||i),1!==p&&4!==n||(f=1===n||2===n?e:e+1,d=t.position-t.lineStart,1===p?s&&(se(t,d)||le(t,d,f))||ae(t,f)?m=!0:(o&&oe(t,f)||re(t,f)||ie(t,f)?m=!0:ue(t)?(m=!0,null===t.tag&&null===t.anchor||Yt(t,"alias node should not have any properties")):ne(t,f,1===n)&&(m=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===p&&(m=s&&se(t,d))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Yt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(St.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||Yt(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&Yt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Yt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function de(t){var e,n,r,i,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(Jt(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(o=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Ot(i);)i=t.input.charCodeAt(++t.position);for(r=[],(n=t.input.slice(e,t.position)).length<1&&Yt(t,"directive name must not be less than one character in length");0!==i;){for(;$t(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!Ft(i));break}if(Ft(i))break;for(e=t.position;0!==i&&!Ot(i);)i=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==i&&Kt(t),St.call(Vt,n)?Vt[n](t,n,r):Gt(t,'unknown document directive "'+n+'"')}Jt(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Jt(t,!0,-1)):o&&Yt(t,"directives end mark is expected"),fe(t,t.lineIndent-1,4,!1,!0),Jt(t,!0,-1),t.checkLineBreaks&&Mt.test(t.input.slice(a,t.position))&&Gt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&te(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Jt(t,!0,-1)):t.position<t.length-1&&Yt(t,"end of the stream or a document separator is expected")}function pe(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new Ht(t,e),r=t.indexOf("\0");for(-1!==r&&(n.position=r,Yt(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)de(n);return n.documents}function ge(t,e,n){null!==e&&"object"==typeof e&&void 0===n&&(n=e,e=null);var r=pe(t,n);if("function"!=typeof e)return r;for(var i=0,a=r.length;i<a;i+=1)e(r[i])}function me(t,e){var n=pe(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new d("expected a single document in the stream, but found more")}}(0,r.__name)(Xt,"captureSegment"),(0,r.__name)(Zt,"mergeMappings"),(0,r.__name)(Qt,"storeMappingPair"),(0,r.__name)(Kt,"readLineBreak"),(0,r.__name)(Jt,"skipSeparationSpace"),(0,r.__name)(te,"testDocumentSeparator"),(0,r.__name)(ee,"writeFoldedLines"),(0,r.__name)(ne,"readPlainScalar"),(0,r.__name)(re,"readSingleQuotedScalar"),(0,r.__name)(ie,"readDoubleQuotedScalar"),(0,r.__name)(ae,"readFlowCollection"),(0,r.__name)(oe,"readBlockScalar"),(0,r.__name)(se,"readBlockSequence"),(0,r.__name)(le,"readBlockMapping"),(0,r.__name)(ce,"readTagProperty"),(0,r.__name)(he,"readAnchorProperty"),(0,r.__name)(ue,"readAlias"),(0,r.__name)(fe,"composeNode"),(0,r.__name)(de,"readDocument"),(0,r.__name)(pe,"loadDocuments"),(0,r.__name)(ge,"loadAll$1"),(0,r.__name)(me,"load$1");var ye=me,be=Object.prototype.toString,xe=Object.prototype.hasOwnProperty,_e=65279,ve={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},we=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ke=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ce(t,e){var n,r,i,a,o,s,l;if(null===e)return{};for(n={},i=0,a=(r=Object.keys(e)).length;i<a;i+=1)o=r[i],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&xe.call(l.styleAliases,s)&&(s=l.styleAliases[s]),n[o]=s;return n}function Se(t){var e,n,r;if(e=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else{if(!(t<=4294967295))throw new d("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+h.repeat("0",r-e.length)+e}function Te(t){this.schema=t.schema||Ct,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=h.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Ce(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Me(t,e){for(var n,r=h.repeat(" ",e),i=0,a=-1,o="",s=t.length;i<s;)-1===(a=t.indexOf("\n",i))?(n=t.slice(i),i=s):(n=t.slice(i,a+1),i=a+1),n.length&&"\n"!==n&&(o+=r),o+=n;return o}function Ae(t,e){return"\n"+h.repeat(" ",t.indent*e)}function Be(t,e){var n,r;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(t.implicitTypes[n].resolve(e))return!0;return!1}function Le(t){return 32===t||9===t}function Ee(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==_e||65536<=t&&t<=1114111}function Fe(t){return Ee(t)&&t!==_e&&13!==t&&10!==t}function $e(t,e,n){var r=Fe(t),i=r&&!Le(t);return(n?r:r&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||Fe(e)&&!Le(e)&&35===t||58===e&&i}function Oe(t){return Ee(t)&&t!==_e&&!Le(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Ne(t){return!Le(t)&&58!==t}function De(t,e){var n,r=t.charCodeAt(e);return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1))>=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function Ie(t){return/^\n* /.test(t)}function ze(t,e,n,r,i,a,o,s){var l,c=0,h=null,u=!1,f=!1,d=-1!==r,p=-1,g=Oe(De(t,0))&&Ne(De(t,t.length-1));if(e||o)for(l=0;l<t.length;c>=65536?l+=2:l++){if(!Ee(c=De(t,l)))return 5;g=g&&$e(c,h,s),h=c}else{for(l=0;l<t.length;c>=65536?l+=2:l++){if(10===(c=De(t,l)))u=!0,d&&(f=f||l-p-1>r&&" "!==t[p+1],p=l);else if(!Ee(c))return 5;g=g&&$e(c,h,s),h=c}f=f||d&&l-p-1>r&&" "!==t[p+1]}return u||f?n>9&&Ie(t)?5:o?2===a?5:2:f?4:3:!g||o||i(t)?2===a?5:2:1}function Pe(t,e,n,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==we.indexOf(e)||ke.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,n),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=i||t.flowLevel>-1&&n>=t.flowLevel;function c(e){return Be(t,e)}switch((0,r.__name)(c,"testAmbiguity"),ze(e,l,t.indent,s,c,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Re(e,t.indent)+qe(Me(e,o));case 4:return">"+Re(e,t.indent)+qe(Me(je(e,s),o));case 5:return'"'+He(e)+'"';default:throw new d("impossible error: invalid scalar style")}}()}function Re(t,e){var n=Ie(t)?String(e):"",r="\n"===t[t.length-1];return n+(!r||"\n"!==t[t.length-2]&&"\n"!==t?r?"":"-":"+")+"\n"}function qe(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function je(t,e){for(var n,r,i,a=/(\n+)([^\n]*)/g,o=(n=-1!==(n=t.indexOf("\n"))?n:t.length,a.lastIndex=n,We(t.slice(0,n),e)),s="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],c=i[2];r=" "===c[0],o+=l+(s||r||""===c?"":"\n")+We(c,e),s=r}return o}function We(t,e){if(""===t||" "===t[0])return t;for(var n,r,i=/ [^ ]/g,a=0,o=0,s=0,l="";n=i.exec(t);)(s=n.index)-a>e&&(r=o>a?o:s,l+="\n"+t.slice(a,r),a=r+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function He(t){for(var e,n="",r=0,i=0;i<t.length;r>=65536?i+=2:i++)r=De(t,i),!(e=ve[r])&&Ee(r)?(n+=t[i],r>=65536&&(n+=t[i+1])):n+=e||Se(r);return n}function Ue(t,e,n){var r,i,a,o="",s=t.tag;for(r=0,i=n.length;r<i;r+=1)a=n[r],t.replacer&&(a=t.replacer.call(n,String(r),a)),(Ze(t,e,a,!1,!1)||void 0===a&&Ze(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function Ye(t,e,n,r){var i,a,o,s="",l=t.tag;for(i=0,a=n.length;i<a;i+=1)o=n[i],t.replacer&&(o=t.replacer.call(n,String(i),o)),(Ze(t,e+1,o,!0,!0,!1,!0)||void 0===o&&Ze(t,e+1,null,!0,!0,!1,!0))&&(r&&""===s||(s+=Ae(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function Ge(t,e,n){var r,i,a,o,s,l="",c=t.tag,h=Object.keys(n);for(r=0,i=h.length;r<i;r+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=n[a=h[r]],t.replacer&&(o=t.replacer.call(n,a,o)),Ze(t,e,a,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}function Ve(t,e,n,r){var i,a,o,s,l,c,h="",u=t.tag,f=Object.keys(n);if(!0===t.sortKeys)f.sort();else if("function"==typeof t.sortKeys)f.sort(t.sortKeys);else if(t.sortKeys)throw new d("sortKeys must be a boolean or a function");for(i=0,a=f.length;i<a;i+=1)c="",r&&""===h||(c+=Ae(t,e)),s=n[o=f[i]],t.replacer&&(s=t.replacer.call(n,o,s)),Ze(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Ae(t,e)),Ze(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Xe(t,e,n){var r,i,a,o,s,l;for(a=0,o=(i=n?t.explicitTypes:t.implicitTypes).length;a<o;a+=1)if(((s=i[a]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(n?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===be.call(s.represent))r=s.represent(e,l);else{if(!xe.call(s.represent,l))throw new d("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');r=s.represent[l](e,l)}t.dump=r}return!0}return!1}function Ze(t,e,n,r,i,a,o){t.tag=null,t.dump=n,Xe(t,n,!1)||Xe(t,n,!0);var s,l=be.call(t.dump),c=r;r&&(r=t.flowLevel<0||t.flowLevel>e);var h,u,f="[object Object]"===l||"[object Array]"===l;if(f&&(u=-1!==(h=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(f&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)r&&0!==Object.keys(t.dump).length?(Ve(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ge(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)r&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?Ye(t,e-1,t.dump,i):Ye(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ue(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new d("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Pe(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Qe(t,e){var n,r,i=[],a=[];for(Ke(t,i,a),n=0,r=a.length;n<r;n+=1)e.duplicates.push(i[a[n]]);e.usedDuplicates=new Array(r)}function Ke(t,e,n){var r,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===n.indexOf(i)&&n.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)Ke(t[i],e,n);else for(i=0,a=(r=Object.keys(t)).length;i<a;i+=1)Ke(t[r[i]],e,n)}function Je(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}(0,r.__name)(Ce,"compileStyleMap"),(0,r.__name)(Se,"encodeHex"),(0,r.__name)(Te,"State"),(0,r.__name)(Me,"indentString"),(0,r.__name)(Ae,"generateNextLine"),(0,r.__name)(Be,"testImplicitResolving"),(0,r.__name)(Le,"isWhitespace"),(0,r.__name)(Ee,"isPrintable"),(0,r.__name)(Fe,"isNsCharOrWhitespace"),(0,r.__name)($e,"isPlainSafe"),(0,r.__name)(Oe,"isPlainSafeFirst"),(0,r.__name)(Ne,"isPlainSafeLast"),(0,r.__name)(De,"codePointAt"),(0,r.__name)(Ie,"needIndentIndicator"),(0,r.__name)(ze,"chooseScalarStyle"),(0,r.__name)(Pe,"writeScalar"),(0,r.__name)(Re,"blockHeader"),(0,r.__name)(qe,"dropEndingNewline"),(0,r.__name)(je,"foldString"),(0,r.__name)(We,"foldLine"),(0,r.__name)(He,"escapeString"),(0,r.__name)(Ue,"writeFlowSequence"),(0,r.__name)(Ye,"writeBlockSequence"),(0,r.__name)(Ge,"writeFlowMapping"),(0,r.__name)(Ve,"writeBlockMapping"),(0,r.__name)(Xe,"detectType"),(0,r.__name)(Ze,"writeNode"),(0,r.__name)(Qe,"getDuplicateReferences"),(0,r.__name)(Ke,"inspectNode"),(0,r.__name)(function(t,e){var n=new Te(e=e||{});n.noRefs||Qe(t,n);var r=t;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Ze(n,0,r,!0,!0)?n.dump+"\n":""},"dump$1"),(0,r.__name)(Je,"renamed");var tn=X,en=ye;Je("safeLoad","load"),Je("safeLoadAll","loadAll"),Je("safeDump","dump")},87094(t,e,n){n.r(e),n.d(e,{getRegisteredLayoutAlgorithm:()=>f,registerLayoutLoaders:()=>h,render:()=>u});var r=n(54275),i=n(85533),a=n(82029),o=n(54141),s=n(60162),l={common:o.common_default,getConfig:o.getConfig,insertCluster:i.insertCluster,insertEdge:r.insertEdge,insertEdgeLabel:r.insertEdgeLabel,insertMarkers:r.markers_default,insertNode:i.insertNode,interpolateToCurve:a.interpolateToCurve,labelHelper:i.labelHelper,log:s.log,positionEdgeLabel:r.positionEdgeLabel},c={},h=(0,s.__name)(t=>{for(const e of t)c[e.name]=e},"registerLayoutLoaders");(0,s.__name)(()=>{h([{name:"dagre",loader:(0,s.__name)(async()=>await Promise.all([n.e(6530),n.e(8042),n.e(3102)]).then(n.bind(n,43102)),"loader")},{name:"cose-bilkent",loader:(0,s.__name)(async()=>await Promise.all([n.e(8936),n.e(1777)]).then(n.bind(n,71777)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,s.__name)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const n=c[t.layoutAlgorithm];return(await n.loader()).render(t,e,l,{algorithm:n.algorithm})},"render"),f=(0,s.__name)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return s.log.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},54275(t,e,n){n.r(e),n.d(e,{clear:()=>b,insertEdge:()=>L,insertEdgeLabel:()=>_,markers_default:()=>D,positionEdgeLabel:()=>w});var r=n(51437),i=n(85533),a=n(70998),o=n(96540),s=n(67099),l=n(82029),c=n(54141),h=n(60162),u=n(79806),f=n(7083),d=(0,h.__name)((t,e,n,r,i,a)=>{e.arrowTypeStart&&g(t,"start",e.arrowTypeStart,n,r,i,a),e.arrowTypeEnd&&g(t,"end",e.arrowTypeEnd,n,r,i,a)},"addEdgeMarkers"),p={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},g=(0,h.__name)((t,e,n,r,i,a,o)=>{const s=p[n];if(!s)return void h.log.warn(`Unknown arrow type: ${n}`);const l=`${i}_${a}-${s.type}${"start"===e?"Start":"End"}`;if(o&&""!==o.trim()){const n=`${l}_${o.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(n)){const t=document.getElementById(l);if(t){const e=t.cloneNode(!0);e.id=n,e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",o),s.fill&&t.setAttribute("fill",o)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${r}#${n})`)}else t.attr(`marker-${e}`,`url(${r}#${l})`)},"addEdgeMarker"),m=new Map,y=new Map,b=(0,h.__name)(()=>{m.clear(),y.clear()},"clear"),x=(0,h.__name)(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),_=(0,h.__name)(async(t,e)=>{let n=(0,c.evaluate)((0,c.getConfig2)().flowchart.htmlLabels);const{labelStyles:r}=(0,o.styles2String)(e);e.labelStyle=r;const a=await(0,s.createText)(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0,isNode:!1});h.log.info("abc82",e,e.labelType);const l=t.insert("g").attr("class","edgeLabel"),f=l.insert("g").attr("class","label").attr("data-id",e.id);f.node().appendChild(a);let d,p=a.getBBox();if(n){const t=a.children[0],e=(0,u.select)(a);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}if(f.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),m.set(e.id,l),e.width=p.width,e.height=p.height,e.startLabelLeft){const n=await(0,i.createLabel_default)(e.startLabelLeft,x(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner");d=a.node().appendChild(n);const o=n.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),y.get(e.id)||y.set(e.id,{}),y.get(e.id).startLeft=r,v(d,e.startLabelLeft)}if(e.startLabelRight){const n=await(0,i.createLabel_default)(e.startLabelRight,x(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner");d=r.node().appendChild(n),a.node().appendChild(n);const o=n.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),y.get(e.id)||y.set(e.id,{}),y.get(e.id).startRight=r,v(d,e.startLabelRight)}if(e.endLabelLeft){const n=await(0,i.createLabel_default)(e.endLabelLeft,x(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner");d=a.node().appendChild(n);const o=n.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),r.node().appendChild(n),y.get(e.id)||y.set(e.id,{}),y.get(e.id).endLeft=r,v(d,e.endLabelLeft)}if(e.endLabelRight){const n=await(0,i.createLabel_default)(e.endLabelRight,x(e.labelStyle)),r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner");d=a.node().appendChild(n);const o=n.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),r.node().appendChild(n),y.get(e.id)||y.set(e.id,{}),y.get(e.id).endRight=r,v(d,e.endLabelRight)}return a},"insertEdgeLabel");function v(t,e){(0,c.getConfig2)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,h.__name)(v,"setTerminalWidth");var w=(0,h.__name)((t,e)=>{h.log.debug("Moving label abc88 ",t.id,t.label,m.get(t.id),e);let n=e.updatedPath?e.updatedPath:e.originalPath;const r=(0,c.getConfig2)(),{subGraphTitleTotalMargin:i}=(0,a.getSubGraphTitleMargins)(r);if(t.label){const r=m.get(t.id);let a=t.x,o=t.y;if(n){const r=l.utils_default.calcLabelPosition(n);h.log.debug("Moving label "+t.label+" from (",a,",",o,") to (",r.x,",",r.y,") abc88"),e.updatedPath&&(a=r.x,o=r.y)}r.attr("transform",`translate(${a}, ${o+i/2})`)}if(t.startLabelLeft){const e=y.get(t.id).startLeft;let r=t.x,i=t.y;if(n){const e=l.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){const e=y.get(t.id).startRight;let r=t.x,i=t.y;if(n){const e=l.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){const e=y.get(t.id).endLeft;let r=t.x,i=t.y;if(n){const e=l.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){const e=y.get(t.id).endRight;let r=t.x,i=t.y;if(n){const e=l.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),k=(0,h.__name)((t,e)=>{const n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s},"outsideNode"),C=(0,h.__name)((t,e,n)=>{h.log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2;let s=n.x<e.x?o-a:o+a;const l=t.height/2,c=Math.abs(e.y-n.y),u=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*o>Math.abs(r-e.x)*l){let t=n.y<e.y?e.y-l-i:i-l-e.y;s=u*t/c;const r={x:n.x<e.x?n.x+s:n.x-u+s,y:n.y<e.y?n.y+c-t:n.y-c+t};return 0===s&&(r.x=e.x,r.y=e.y),0===u&&(r.x=e.x),0===c&&(r.y=e.y),h.log.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${u}, r ${s}`,r),r}{s=n.x<e.x?e.x-o-r:r-o-e.x;let t=c*s/u,i=n.x<e.x?n.x+u-s:n.x-u+s,a=n.y<e.y?n.y+t:n.y-t;return h.log.debug(`sides calc abc89, Q ${c}, q ${t}, R ${u}, r ${s}`,{_x:i,_y:a}),0===s&&(i=e.x,a=e.y),0===u&&(i=e.x),0===c&&(a=e.y),{x:i,y:a}}},"intersection"),S=(0,h.__name)((t,e)=>{h.log.warn("abc88 cutPathAtIntersect",t,e);let n=[],r=t[0],i=!1;return t.forEach(t=>{if(h.log.info("abc88 checking point",t,e),k(e,t)||i)h.log.warn("abc88 outside",t,r),r=t,i||n.push(t);else{const a=C(e,r,t);h.log.debug("abc88 inside",t,r,a),h.log.debug("abc88 intersection",a,e);let o=!1;n.forEach(t=>{o=o||t.x===a.x&&t.y===a.y}),n.some(t=>t.x===a.x&&t.y===a.y)?h.log.warn("abc88 no intersect",a,n):n.push(a),i=!0}}),h.log.debug("returning points",n),n},"cutPathAtIntersect");function T(t){const e=[],n=[];for(let r=1;r<t.length-1;r++){const i=t[r-1],a=t[r],o=t[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),n.push(r))}return{cornerPoints:e,cornerPointPositions:n}}(0,h.__name)(T,"extractCornerPoints");var M=(0,h.__name)(function(t,e,n){const r=e.x-t.x,i=e.y-t.y,a=n/Math.sqrt(r*r+i*i);return{x:e.x-a*r,y:e.y-a*i}},"findAdjacentPoint"),A=(0,h.__name)(function(t){const{cornerPointPositions:e}=T(t),n=[];for(let r=0;r<t.length;r++)if(e.includes(r)){const e=t[r-1],i=t[r+1],a=t[r],o=M(e,a,5),s=M(i,a,5),l=s.x-o.x,c=s.y-o.y;n.push(o);const u=2*Math.sqrt(2);let f={x:a.x,y:a.y};if(Math.abs(i.x-e.x)>10&&Math.abs(i.y-e.y)>=10){h.log.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;f=a.x===o.x?{x:l<0?o.x-t+u:o.x+t-u,y:c<0?o.y-u:o.y+u}:{x:l<0?o.x-u:o.x+u,y:c<0?o.y-t+u:o.y+t-u}}else h.log.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));n.push(f,s)}else n.push(t[r]);return n},"fixCorners"),B=(0,h.__name)((t,e,n)=>{const r=t-e-n,i=Math.floor(r/4);return`0 ${e} ${Array(i).fill("2 2").join(" ")} ${n}`},"generateDashArray"),L=(0,h.__name)(function(t,e,n,i,a,s,p,g=!1){const{handDrawnSeed:m}=(0,c.getConfig2)();let y=e.points,b=!1;const x=a;var _=s;const v=[];for(const t in e.cssCompiledStyles)(0,o.isLabelStyle)(t)||v.push(e.cssCompiledStyles[t]);h.log.debug("UIO intersect check",e.points,_.x,x.x),_.intersect&&x.intersect&&!g&&(y=y.slice(1,e.points.length-1),y.unshift(x.intersect(y[0])),h.log.debug("Last point UIO",e.start,"--\x3e",e.end,y[y.length-1],_,_.intersect(y[y.length-1])),y.push(_.intersect(y[y.length-1])));const w=btoa(JSON.stringify(y));e.toCluster&&(h.log.info("to cluster abc88",n.get(e.toCluster)),y=S(e.points,n.get(e.toCluster).node),b=!0),e.fromCluster&&(h.log.debug("from cluster abc88",n.get(e.fromCluster),JSON.stringify(y,null,2)),y=S(y.reverse(),n.get(e.fromCluster).node).reverse(),b=!0);let k=y.filter(t=>!Number.isNaN(t.y));k=A(k);let C=u.curveBasis;switch(C=u.curveLinear,e.curve){case"linear":C=u.curveLinear;break;case"basis":default:C=u.curveBasis;break;case"cardinal":C=u.curveCardinal;break;case"bumpX":C=u.curveBumpX;break;case"bumpY":C=u.curveBumpY;break;case"catmullRom":C=u.curveCatmullRom;break;case"monotoneX":C=u.curveMonotoneX;break;case"monotoneY":C=u.curveMonotoneY;break;case"natural":C=u.curveNatural;break;case"step":C=u.curveStep;break;case"stepAfter":C=u.curveStepAfter;break;case"stepBefore":C=u.curveStepBefore}const{x:T,y:M}=(0,r.getLineFunctionsWithOffset)(e),L=(0,u.line)().x(T).y(M).curve(C);let F,O;switch(e.thickness){case"normal":default:F="edge-thickness-normal";break;case"thick":F="edge-thickness-thick";break;case"invisible":F="edge-thickness-invisible"}switch(e.pattern){case"solid":default:F+=" edge-pattern-solid";break;case"dotted":F+=" edge-pattern-dotted";break;case"dashed":F+=" edge-pattern-dashed"}let N="rounded"===e.curve?E($(k,e),5):L(k);const D=Array.isArray(e.style)?e.style:[e.style];let I=D.find(t=>t?.startsWith("stroke:")),z=!1;if("handDrawn"===e.look){const n=f.default.svg(t);Object.assign([],k);const r=n.path(N,{roughness:.3,seed:m});F+=" transition",O=(0,u.select)(r).select("path").attr("id",e.id).attr("class"," "+F+(e.classes?" "+e.classes:"")).attr("style",D?D.reduce((t,e)=>t+";"+e,""):"");let i=O.attr("d");O.attr("d",i),t.node().appendChild(O.node())}else{const n=v.join(";"),i=D?D.reduce((t,e)=>t+e+";",""):"";let a="";e.animate&&(a=" edge-animation-fast"),e.animation&&(a=" edge-animation-"+e.animation);const o=(n?n+";"+i+";":i)+";"+(D?D.reduce((t,e)=>t+";"+e,""):"");O=t.append("path").attr("d",N).attr("id",e.id).attr("class"," "+F+(e.classes?" "+e.classes:"")+(a??"")).attr("style",o),I=o.match(/stroke:([^;]+)/)?.[1],z=!0===e.animate||!!e.animation||n.includes("animation");const s=O.node(),l="function"==typeof s.getTotalLength?s.getTotalLength():0,c=r.markerOffsets2[e.arrowTypeStart]||0,h=r.markerOffsets2[e.arrowTypeEnd]||0;if("neo"===e.look&&!z){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?B(l,c,h):`0 ${c} ${l-c-h} ${h}`}; stroke-dashoffset: 0;`;O.attr("style",t+O.attr("style"))}}O.attr("data-edge",!0),O.attr("data-et","edge"),O.attr("data-id",e.id),O.attr("data-points",w),e.showPoints&&k.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let P="";((0,c.getConfig2)().flowchart.arrowMarkerAbsolute||(0,c.getConfig2)().state.arrowMarkerAbsolute)&&(P=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,P=P.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.log.info("arrowTypeStart",e.arrowTypeStart),h.log.info("arrowTypeEnd",e.arrowTypeEnd),d(O,e,P,p,i,I);const R=y[Math.floor(y.length/2)];l.utils_default.isLabelCoordinateInPath(R,O.attr("d"))||(b=!0);let q={};return b&&(q.updatedPath=y),q.originalPath=e.points,q},"insertEdge");function E(t,e){if(t.length<2)return"";let n="";const r=t.length,i=1e-5;for(let a=0;a<r;a++){const o=t[a],s=t[a-1],l=t[a+1];if(0===a)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{const t=o.x-s.x,r=o.y-s.y,a=l.x-o.x,c=l.y-o.y,h=Math.hypot(t,r),u=Math.hypot(a,c);if(h<i||u<i){n+=`L${o.x},${o.y}`;continue}const f=t/h,d=r/h,p=a/u,g=c/u,m=f*p+d*g,y=Math.max(-1,Math.min(1,m)),b=Math.acos(y);if(b<i||Math.abs(Math.PI-b)<i){n+=`L${o.x},${o.y}`;continue}const x=Math.min(e/Math.sin(b/2),h/2,u/2),_=o.x-f*x,v=o.y-d*x,w=o.x+p*x,k=o.y+g*x;n+=`L${_},${v}`,n+=`Q${o.x},${o.y} ${w},${k}`}}return n}function F(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const n=e.x-t.x,r=e.y-t.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}function $(t,e){const n=t.map(t=>({...t}));if(t.length>=2&&r.markerOffsets[e.arrowTypeStart]){const i=r.markerOffsets[e.arrowTypeStart],a=t[0],o=t[1],{angle:s}=F(a,o),l=i*Math.cos(s),c=i*Math.sin(s);n[0].x=a.x+l,n[0].y=a.y+c}const i=t.length;if(i>=2&&r.markerOffsets[e.arrowTypeEnd]){const a=r.markerOffsets[e.arrowTypeEnd],o=t[i-1],s=t[i-2],{angle:l}=F(s,o),c=a*Math.cos(l),h=a*Math.sin(l);n[i-1].x=o.x-c,n[i-1].y=o.y-h}return n}(0,h.__name)(E,"generateRoundedPath"),(0,h.__name)(F,"calculateDeltaAndAngle"),(0,h.__name)($,"applyMarkerOffsetsToPoints");var O=(0,h.__name)((t,e,n,r)=>{e.forEach(e=>{N[e](t,n,r)})},"insertMarkers"),N={extension:(0,h.__name)((t,e,n)=>{h.log.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,h.__name)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,h.__name)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,h.__name)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",n+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:(0,h.__name)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");r.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("d","M9,0 L9,18");const i=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",n+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:(0,h.__name)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");r.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:(0,h.__name)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:(0,h.__name)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");r.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),r.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),r.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},D=O},82029(t,e,n){n.r(e),n.d(e,{ZERO_WIDTH_SPACE:()=>c,calculateTextHeight:()=>N,calculateTextWidth:()=>D,cleanAndMerge:()=>H,decodeEntities:()=>G,encodeEntities:()=>Y,generateId:()=>A,getEdgeId:()=>V,getStylesFromArray:()=>T,handleUndefinedAttr:()=>X,interpolateToCurve:()=>m,isDetailedError:()=>q,parseFontSize:()=>W,random:()=>L,removeDirectives:()=>p,utils_default:()=>U,wrapLabel:()=>$});var r=n(54141),i=n(60162),a=n(8041),o=n(79806),s=n(39645),l=n(22937),c="​",h={curveBasis:o.curveBasis,curveBasisClosed:o.curveBasisClosed,curveBasisOpen:o.curveBasisOpen,curveBumpX:o.curveBumpX,curveBumpY:o.curveBumpY,curveBundle:o.curveBundle,curveCardinalClosed:o.curveCardinalClosed,curveCardinalOpen:o.curveCardinalOpen,curveCardinal:o.curveCardinal,curveCatmullRomClosed:o.curveCatmullRomClosed,curveCatmullRomOpen:o.curveCatmullRomOpen,curveCatmullRom:o.curveCatmullRom,curveLinear:o.curveLinear,curveLinearClosed:o.curveLinearClosed,curveMonotoneX:o.curveMonotoneX,curveMonotoneY:o.curveMonotoneY,curveNatural:o.curveNatural,curveStep:o.curveStep,curveStepAfter:o.curveStepAfter,curveStepBefore:o.curveStepBefore},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,f=(0,i.__name)(function(t,e){const n=d(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(n)){const t=n.map(t=>t.args);(0,r.sanitizeDirective)(t),i=(0,r.assignWithDepth_default)(i,[...t])}else i=n.args;if(!i)return;let a=(0,r.detectType)(t,e);const o="config";return void 0!==i[o]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),d=(0,i.__name)(function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(n,"").replace(/'/gm,'"'),i.log.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(a=r.directiveRegex.exec(t));)if(a.index===r.directiveRegex.lastIndex&&r.directiveRegex.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(n){return i.log.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),p=(0,i.__name)(function(t){return t.replace(r.directiveRegex,"")},"removeDirectives"),g=(0,i.__name)(function(t,e){for(const[n,r]of e.entries())if(r.match(t))return n;return-1},"isSubstringInArray");function m(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return h[n]??e}function y(t,e){const n=t.trim();if(n)return"loose"!==e.securityLevel?(0,a.sanitizeUrl)(n):n}(0,i.__name)(m,"interpolateToCurve"),(0,i.__name)(y,"formatUrl");var b=(0,i.__name)((t,...e)=>{const n=t.split("."),r=n.length-1,a=n[r];let o=window;for(let e=0;e<r;e++)if(o=o[n[e]],!o)return void i.log.error(`Function name: ${t} not found in window`);o[a](...e)},"runFunc");function x(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function _(t){let e,n=0;return t.forEach(t=>{n+=x(t,e),e=t}),k(t,n/2)}function v(t){return 1===t.length?t[0]:_(t)}(0,i.__name)(x,"distance"),(0,i.__name)(_,"traverseEdge"),(0,i.__name)(v,"calcLabelPosition");var w=(0,i.__name)((t,e=2)=>{const n=Math.pow(10,e);return Math.round(t*n)/n},"roundNumber"),k=(0,i.__name)((t,e)=>{let n,r=e;for(const e of t){if(n){const t=x(e,n);if(0===t)return n;if(t<r)r-=t;else{const i=r/t;if(i<=0)return n;if(i>=1)return{x:e.x,y:e.y};if(i>0&&i<1)return{x:w((1-i)*n.x+i*e.x,5),y:w((1-i)*n.y+i*e.y,5)}}}n=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),C=(0,i.__name)((t,e,n)=>{i.log.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());const r=k(e,25),a=t?10:5,o=Math.atan2(e[0].y-r.y,e[0].x-r.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+r.x)/2,s.y=-Math.cos(o)*a+(e[0].y+r.y)/2,s},"calcCardinalityPosition");function S(t,e,n){const r=structuredClone(n);i.log.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse();const a=k(r,25+t),o=10+.5*t,s=Math.atan2(r[0].y-a.y,r[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(r[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(r[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(r[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(r[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(r[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(r[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(r[0].x+a.x)/2,l.y=-Math.cos(s)*o+(r[0].y+a.y)/2),l}function T(t){let e="",n="";for(const r of t)void 0!==r&&(r.startsWith("color:")||r.startsWith("text-align:")?n=n+r+";":e=e+r+";");return{style:e,labelStyle:n}}(0,i.__name)(S,"calcTerminalLabelPosition"),(0,i.__name)(T,"getStylesFromArray");var M=0,A=(0,i.__name)(()=>(M++,"id-"+Math.random().toString(36).substr(2,12)+"-"+M),"generateId");function B(t){let e="";for(let n=0;n<t;n++)e+="0123456789abcdef".charAt(Math.floor(16*Math.random()));return e}(0,i.__name)(B,"makeRandomHex");var L=(0,i.__name)(t=>B(t.length),"random"),E=(0,i.__name)(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:""}},"getTextObj"),F=(0,i.__name)(function(t,e){const n=e.text.replace(r.common_default.lineBreakRegex," "),[,i]=W(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(n),a},"drawSimpleText"),$=(0,s.default)((t,e,n)=>{if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),r.common_default.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let o="";return i.forEach((t,r)=>{const s=D(`${t} `,n),l=D(o,n);if(s>e){const{hyphenatedStrings:r,remainingWord:i}=O(t,e,"-",n);a.push(o,...r),o=i}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");r+1===i.length&&a.push(o)}),a.filter(t=>""!==t).join(n.joinWith)},(t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),O=(0,s.default)((t,e,n="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const i=[...t],a=[];let o="";return i.forEach((t,s)=>{const l=`${o}${t}`;if(D(l,r)>=e){const t=s+1,e=i.length===t,r=`${l}${n}`;a.push(e?l:r),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,n="-",r)=>`${t}${e}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function N(t,e){return z(t,e).height}function D(t,e){return z(t,e).width}(0,i.__name)(N,"calculateTextHeight"),(0,i.__name)(D,"calculateTextWidth");var I,z=(0,s.default)((t,e)=>{const{fontSize:n=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=W(n),l=["sans-serif",i],h=t.split(r.common_default.lineBreakRegex),u=[],f=(0,o.select)("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const d=f.append("svg");for(const t of l){let e=0;const n={width:0,height:0,lineHeight:0};for(const r of h){const i=E();i.text=r||c;const o=F(d,i).style("font-size",s).style("font-weight",a).style("font-family",t),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");n.width=Math.round(Math.max(n.width,l.width)),e=Math.round(l.height),n.height+=e,n.lineHeight=Math.round(Math.max(n.lineHeight,e))}u.push(n)}return d.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),P=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,i.__name)(this,"InitIDGenerator")}},R=(0,i.__name)(function(t){return I=I||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),I.innerHTML=t,unescape(I.textContent)},"entityDecode");function q(t){return"str"in t}(0,i.__name)(q,"isDetailedError");var j=(0,i.__name)((t,e,n,r)=>{if(!r)return;const i=t.node()?.getBBox();i&&t.append("text").text(r).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-n).attr("class",e)},"insertTitle"),W=(0,i.__name)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function H(t,e){return(0,l.default)({},t,e)}(0,i.__name)(H,"cleanAndMerge");var U={assignWithDepth:r.assignWithDepth_default,wrapLabel:$,calculateTextHeight:N,calculateTextWidth:D,calculateTextDimensions:z,cleanAndMerge:H,detectInit:f,detectDirective:d,isSubstringInArray:g,interpolateToCurve:m,calcLabelPosition:v,calcCardinalityPosition:C,calcTerminalLabelPosition:S,formatUrl:y,getStylesFromArray:T,generateId:A,random:L,runFunc:b,entityDecode:R,insertTitle:j,isLabelCoordinateInPath:Z,parseFontSize:W,InitIDGenerator:P},Y=(0,i.__name)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),G=(0,i.__name)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),V=(0,i.__name)((t,e,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:""}${t}_${e}_${n}${i?`_${i}`:""}`,"getEdgeId");function X(t){return t??null}function Z(t,e){const n=Math.round(t.x),r=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return i.includes(n.toString())||i.includes(r.toString())}(0,i.__name)(X,"handleUndefinedAttr"),(0,i.__name)(Z,"isLabelCoordinateInPath")},67367(t,e,n){n.d(e,{default:()=>Ye}),n.r(e);var r=n(37710),i=n(92329),a=n(38698),o=n(87094),s=(n(54275),n(51437),n(85533),n(70998),n(96540),n(67099)),l=n(82029),c=n(54141),h=n(60162),u=n(8968),f=n(79806),d="comm",p="rule",g="decl",m=Math.abs,y=String.fromCharCode;function b(t){return t.trim()}function x(t,e,n){return t.replace(e,n)}function _(t,e,n){return t.indexOf(e,n)}function v(t,e){return 0|t.charCodeAt(e)}function w(t,e,n){return t.slice(e,n)}function k(t){return t.length}function C(t,e){return e.push(t),t}function S(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function T(t,e,n,r){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case g:return t.return=t.return||t.value;case d:return"";case"@keyframes":return t.return=t.value+"{"+S(t.children,r)+"}";case p:if(!k(t.value=t.props.join(",")))return""}return k(n=S(t.children,r))?t.return=t.value+"{"+n+"}":""}Object.assign;var M=1,A=1,B=0,L=0,E=0,F="";function $(t,e,n,r,i,a,o,s){return{value:t,root:e,parent:n,type:r,props:i,children:a,line:M,column:A,length:o,return:"",siblings:s}}function O(){return E=L>0?v(F,--L):0,A--,10===E&&(A=1,M--),E}function N(){return E=L<B?v(F,L++):0,A++,10===E&&(A=1,M++),E}function D(){return v(F,L)}function I(){return L}function z(t,e){return w(F,t,e)}function P(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function R(t){return b(z(L-1,W(91===t?t+2:40===t?t+1:t)))}function q(t){for(;(E=D())&&E<33;)N();return P(t)>2||P(E)>3?"":" "}function j(t,e){for(;--e&&N()&&!(E<48||E>102||E>57&&E<65||E>70&&E<97););return z(t,I()+(e<6&&32==D()&&32==N()))}function W(t){for(;N();)switch(E){case t:return L;case 34:case 39:34!==t&&39!==t&&W(E);break;case 40:41===t&&W(t);break;case 92:N()}return L}function H(t,e){for(;N()&&t+E!==57&&(t+E!==84||47!==D()););return"/*"+z(e,L-1)+"*"+y(47===t?t:N())}function U(t){for(;!P(D());)N();return z(t,L)}function Y(t){return function(t){return F="",t}(G("",null,null,null,[""],t=function(t){return M=A=1,B=k(F=t),L=0,[]}(t),0,[0],t))}function G(t,e,n,r,i,a,o,s,l){for(var c=0,h=0,u=o,f=0,d=0,p=0,g=1,b=1,S=1,T=0,M="",A=i,B=a,L=r,E=M;b;)switch(p=T,T=N()){case 40:if(108!=p&&58==v(E,u-1)){-1!=_(E+=x(R(T),"&","&\f"),"&\f",m(c?s[c-1]:0))&&(S=-1);break}case 34:case 39:case 91:E+=R(T);break;case 9:case 10:case 13:case 32:E+=q(p);break;case 92:E+=j(I()-1,7);continue;case 47:switch(D()){case 42:case 47:C(X(H(N(),I()),e,n,l),l),5!=P(p||1)&&5!=P(D()||1)||!k(E)||" "===w(E,-1,void 0)||(E+=" ");break;default:E+="/"}break;case 123*g:s[c++]=k(E)*S;case 125*g:case 59:case 0:switch(T){case 0:case 125:b=0;case 59+h:-1==S&&(E=x(E,/\f/g,"")),d>0&&(k(E)-u||0===g&&47===p)&&C(d>32?Z(E+";",r,n,u-1,l):Z(x(E," ","")+";",r,n,u-2,l),l);break;case 59:E+=";";default:if(C(L=V(E,e,n,c,h,i,s,M,A=[],B=[],u,a),a),123===T)if(0===h)G(E,e,L,L,A,a,u,s,B);else{switch(f){case 99:if(110===v(E,3))break;case 108:if(97===v(E,2))break;default:h=0;case 100:case 109:case 115:}h?G(t,L,L,r&&C(V(t,L,L,0,0,i,s,M,i,A=[],u,B),B),i,B,u,s,r?A:B):G(E,L,L,L,[""],B,0,s,B)}}c=h=d=0,g=S=1,M=E="",u=o;break;case 58:u=1+k(E),d=p;default:if(g<1)if(123==T)--g;else if(125==T&&0==g++&&125==O())continue;switch(E+=y(T),T*g){case 38:S=h>0?1:(E+="\f",-1);break;case 44:s[c++]=(k(E)-1)*S,S=1;break;case 64:45===D()&&(E+=R(N())),f=D(),h=u=k(M=E+=U(I())),T++;break;case 45:45===p&&2==k(E)&&(g=0)}}return a}function V(t,e,n,r,i,a,o,s,l,c,h,u){for(var f=i-1,d=0===i?a:[""],g=function(t){return t.length}(d),y=0,_=0,v=0;y<r;++y)for(var k=0,C=w(t,f+1,f=m(_=o[y])),S=t;k<g;++k)(S=b(_>0?d[k]+" "+C:x(C,/&\f/g,d[k])))&&(l[v++]=S);return $(t,e,n,0===i?p:s,l,c,h,u)}function X(t,e,n,r){return $(t,e,n,d,y(E),w(t,2,-2),0,r)}function Z(t,e,n,r,i){return $(t,e,n,g,w(t,0,r),w(t,r+1,-1),r,i)}var Q=n(97519),K=n(75992),J={id:"c4",detector:(0,h.__name)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(5658).then(n.bind(n,25658));return{id:"c4",diagram:t}},"loader")},tt="flowchart",et={id:tt,detector:(0,h.__name)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6584).then(n.bind(n,16584));return{id:tt,diagram:t}},"loader")},nt="flowchart-v2",rt={id:nt,detector:(0,h.__name)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6584).then(n.bind(n,16584));return{id:nt,diagram:t}},"loader")},it={id:"er",detector:(0,h.__name)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(3919).then(n.bind(n,93919));return{id:"er",diagram:t}},"loader")},at="gitGraph",ot={id:at,detector:(0,h.__name)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(7764)]).then(n.bind(n,77764));return{id:at,diagram:t}},"loader")},st="gantt",lt={id:st,detector:(0,h.__name)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6334).then(n.bind(n,66334));return{id:st,diagram:t}},"loader")},ct="info",ht={id:ct,detector:(0,h.__name)(t=>/^\s*info/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(6781)]).then(n.bind(n,6781));return{id:ct,diagram:t}},"loader")},ut={id:"pie",detector:(0,h.__name)(t=>/^\s*pie/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(3097)]).then(n.bind(n,23097));return{id:"pie",diagram:t}},"loader")},ft="quadrantChart",dt={id:ft,detector:(0,h.__name)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(2412).then(n.bind(n,12412));return{id:ft,diagram:t}},"loader")},pt="xychart",gt={id:pt,detector:(0,h.__name)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(3766).then(n.bind(n,13766));return{id:pt,diagram:t}},"loader")},mt="requirement",yt={id:mt,detector:(0,h.__name)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(2193).then(n.bind(n,92193));return{id:mt,diagram:t}},"loader")},bt="sequence",xt={id:bt,detector:(0,h.__name)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(4899).then(n.bind(n,74899));return{id:bt,diagram:t}},"loader")},_t="class",vt={id:_t,detector:(0,h.__name)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(5437),n.e(9127)]).then(n.bind(n,9127));return{id:_t,diagram:t}},"loader")},wt="classDiagram",kt={id:wt,detector:(0,h.__name)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(5437),n.e(8096)]).then(n.bind(n,18096));return{id:wt,diagram:t}},"loader")},Ct="state",St={id:Ct,detector:(0,h.__name)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(8042),n.e(8075),n.e(3311)]).then(n.bind(n,13311));return{id:Ct,diagram:t}},"loader")},Tt="stateDiagram",Mt={id:Tt,detector:(0,h.__name)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(8075),n.e(7001)]).then(n.bind(n,27001));return{id:Tt,diagram:t}},"loader")},At="journey",Bt={id:At,detector:(0,h.__name)(t=>/^\s*journey/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(4513).then(n.bind(n,74513));return{id:At,diagram:t}},"loader")},Lt={draw:(0,h.__name)((t,e,n)=>{h.log.debug("rendering svg for syntax error\n");const r=(0,i.selectSvgElement)(e),a=r.append("g");r.attr("viewBox","0 0 2412 512"),(0,c.configureSvgSize)(r,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw")},Et=Lt,Ft={db:{},renderer:Lt,parser:{parse:(0,h.__name)(()=>{},"parse")}},$t="flowchart-elk",Ot={id:$t,detector:(0,h.__name)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6584).then(n.bind(n,16584));return{id:$t,diagram:t}},"loader")},Nt="timeline",Dt={id:Nt,detector:(0,h.__name)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(8824).then(n.bind(n,68824));return{id:Nt,diagram:t}},"loader")},It="mindmap",zt={id:It,detector:(0,h.__name)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(3895).then(n.bind(n,13895));return{id:It,diagram:t}},"loader")},Pt="kanban",Rt={id:Pt,detector:(0,h.__name)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(6826).then(n.bind(n,46826));return{id:Pt,diagram:t}},"loader")},qt="sankey",jt={id:qt,detector:(0,h.__name)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await n.e(5016).then(n.bind(n,95016));return{id:qt,diagram:t}},"loader")},Wt="packet",Ht={id:Wt,detector:(0,h.__name)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(3896)]).then(n.bind(n,3896));return{id:Wt,diagram:t}},"loader")},Ut="radar",Yt={id:Ut,detector:(0,h.__name)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(1803)]).then(n.bind(n,31803));return{id:Ut,diagram:t}},"loader")},Gt="block",Vt={id:Gt,detector:(0,h.__name)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(521)]).then(n.bind(n,22902));return{id:Gt,diagram:t}},"loader")},Xt="architecture",Zt={id:Xt,detector:(0,h.__name)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(8936),n.e(4898)]).then(n.bind(n,14898));return{id:Xt,diagram:t}},"loader")},Qt="treemap",Kt={id:Qt,detector:(0,h.__name)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,h.__name)(async()=>{const{diagram:t}=await Promise.all([n.e(6530),n.e(3744),n.e(1498)]).then(n.bind(n,41498));return{id:Qt,diagram:t}},"loader")},Jt=!1,te=(0,h.__name)(()=>{Jt||(Jt=!0,(0,c.registerDiagram)("error",Ft,t=>"error"===t.toLowerCase().trim()),(0,c.registerDiagram)("---",{db:{clear:(0,h.__name)(()=>{},"clear")},styles:{},renderer:{draw:(0,h.__name)(()=>{},"draw")},parser:{parse:(0,h.__name)(()=>{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")},"parse")},init:(0,h.__name)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,c.registerLazyLoadedDiagrams)(Ot,zt,Zt),(0,c.registerLazyLoadedDiagrams)(J,Rt,kt,vt,it,lt,ht,ut,yt,xt,rt,et,Dt,ot,Mt,St,Bt,dt,jt,Ht,gt,Vt,Yt,Kt))},"addDiagrams"),ee=(0,h.__name)(async()=>{h.log.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(c.detectors).map(async([t,{detector:e,loader:n}])=>{if(n)try{(0,c.getDiagram)(t)}catch{try{const{diagram:t,id:r}=await n();(0,c.registerDiagram)(r,t,e)}catch(e){throw h.log.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete c.detectors[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){h.log.error(`Failed to load ${t.length} external diagrams`);for(const e of t)h.log.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function ne(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function re(t,e,n,r){if(void 0!==t.insert){if(n){const e=`chart-desc-${r}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(n)}if(e){const n=`chart-title-${r}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}(0,h.__name)(ne,"setA11yDiagramInfo"),(0,h.__name)(re,"addSVGa11yTitleDescription");var ie=class t{constructor(t,e,n,r,i){this.type=t,this.text=e,this.db=n,this.parser=r,this.renderer=i}static{(0,h.__name)(this,"Diagram")}static async fromText(e,n={}){const r=(0,c.getConfig)(),i=(0,c.detectType)(e,r);e=(0,l.encodeEntities)(e)+"\n";try{(0,c.getDiagram)(i)}catch{const t=(0,c.getDiagramLoader)(i);if(!t)throw new c.UnknownDiagramError(`Diagram ${i} not found.`);const{id:e,diagram:n}=await t();(0,c.registerDiagram)(e,n)}const{db:a,parser:o,renderer:s,init:h}=(0,c.getDiagram)(i);return o.parser&&(o.parser.yy=a),a.clear?.(),h?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(e),new t(i,e,a,o,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},ae=[],oe=(0,h.__name)(()=>{ae.forEach(t=>{t()}),ae=[]},"attachFunctions"),se=(0,h.__name)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function le(t){const e=t.match(c.frontMatterRegex);if(!e)return{text:t,metadata:{}};let n=(0,a.load)(e[1],{schema:a.JSON_SCHEMA})??{};n="object"!=typeof n||Array.isArray(n)?{}:n;const r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:t.slice(e[0].length),metadata:r}}(0,h.__name)(le,"extractFrontMatter");var ce=(0,h.__name)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,n)=>"<"+e+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),he=(0,h.__name)(t=>{const{text:e,metadata:n}=le(t),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||(a.gantt={}),a.gantt.displayMode=r),{title:i,config:a,text:e}},"processFrontmatter"),ue=(0,h.__name)(t=>{const e=l.utils_default.detectInit(t)??{},n=l.utils_default.detectDirective(t,"wrap");return Array.isArray(n)?e.wrap=n.some(({type:t})=>"wrap"===t):"wrap"===n?.type&&(e.wrap=!0),{text:(0,l.removeDirectives)(t),directive:e}},"processDirectives");function fe(t){const e=ce(t),n=he(e),r=ue(n.text),i=(0,l.cleanAndMerge)(n.config,r.directive);return{code:t=se(r.text),title:n.title,config:i}}function de(t){const e=(new TextEncoder).encode(t),n=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(n)}(0,h.__name)(fe,"preprocessDiagram"),(0,h.__name)(de,"toBase64");var pe=["foreignobject"],ge=["dominant-baseline"];function me(t){const e=fe(t);return(0,c.reset)(),(0,c.addDirective)(e.config??{}),e}async function ye(t,e){te();try{const{code:e,config:n}=me(t);return{diagramType:(await Ae(e)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,h.__name)(me,"processAndSetConfigs"),(0,h.__name)(ye,"parse");var be=(0,h.__name)((t,e,n=[])=>`\n.${t} ${e} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),xe=(0,h.__name)((t,e=new Map)=>{let n="";if(void 0!==t.themeCSS&&(n+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(n+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const r=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{(0,K.default)(t.styles)||r.forEach(e=>{n+=be(t.id,e,t.styles)}),(0,K.default)(t.textStyles)||(n+=be(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),_e=(0,h.__name)((t,e,n,r)=>{const i=xe(t,n);return S(Y(`${r}{${(0,c.styles_default)(e,i,t.themeVariables)}}`),T)},"createUserStyles"),ve=(0,h.__name)((t="",e,n)=>{let r=t;return n||e||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=(0,l.decodeEntities)(r),r=r.replace(/<br>/g,"<br/>"),r},"cleanUpSvgCode"),we=(0,h.__name)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${de(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),ke=(0,h.__name)((t,e,n,r,i)=>{const a=t.append("div");a.attr("id",n),r&&a.attr("style",r);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&o.attr("xmlns:xlink",i),o.append("g"),t},"appendDivSvgG");function Ce(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,h.__name)(Ce,"sandboxedIframe");var Se=(0,h.__name)((t,e,n,r)=>{t.getElementById(e)?.remove(),t.getElementById(n)?.remove(),t.getElementById(r)?.remove()},"removeExistingElements"),Te=(0,h.__name)(async function(t,e,n){te();const i=me(e);e=i.code;const a=(0,c.getConfig)();h.log.debug(a),e.length>(a?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+t,s="i"+t,l="#"+s,u="d"+t,d="#"+u,p=(0,h.__name)(()=>{const t=m?l:d,e=(0,f.select)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,f.select)("body");const m="sandbox"===a.securityLevel,y="loose"===a.securityLevel,b=a.fontFamily;if(void 0!==n){if(n&&(n.innerHTML=""),m){const t=Ce((0,f.select)(n),s);g=(0,f.select)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,f.select)(n);ke(g,t,u,`font-family: ${b}`,"http://www.w3.org/1999/xlink")}else{if(Se(document,t,u,s),m){const t=Ce((0,f.select)("body"),s);g=(0,f.select)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,f.select)("body");ke(g,t,u)}let x,_;try{x=await ie.fromText(e,{title:i.title})}catch(t){if(a.suppressErrorRendering)throw p(),t;x=await ie.fromText("error"),_=t}const v=g.select(d).node(),w=x.type,k=v.firstChild,C=k.firstChild,S=x.renderer.getClasses?.(e,x),T=_e(a,w,S,o),M=document.createElement("style");M.innerHTML=T,k.insertBefore(M,C);try{await x.renderer.draw(e,t,r.package_default.version,x)}catch(n){throw a.suppressErrorRendering?p():Et.draw(e,t,r.package_default.version),n}const A=g.select(`${d} svg`),B=x.db.getAccTitle?.(),L=x.db.getAccDescription?.();Be(w,A,B,L),g.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let E=g.select(d).node().innerHTML;if(h.log.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=ve(E,m,(0,c.evaluate)(a.arrowMarkerAbsolute)),m){const t=g.select(d+" svg").node();E=we(E,t)}else y||(E=Q.default.sanitize(E,{ADD_TAGS:pe,ADD_ATTR:ge,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oe(),_)throw _;return p(),{diagramType:w,svg:E,bindFunctions:x.db.bindFunctions}},"render");function Me(t={}){const e=(0,c.assignWithDepth_default)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,c.saveConfigFromInitialize)(e),e?.theme&&e.theme in c.themes_default?e.themeVariables=c.themes_default[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=c.themes_default.default.getThemeVariables(e.themeVariables));const n="object"==typeof e?(0,c.setSiteConfig)(e):(0,c.getSiteConfig)();(0,h.setLogLevel)(n.logLevel),te()}(0,h.__name)(Me,"initialize");var Ae=(0,h.__name)((t,e={})=>{const{code:n}=fe(t);return ie.fromText(n,e)},"getDiagramFromText");function Be(t,e,n,r){ne(e,t),re(e,n,r,e.attr("id"))}(0,h.__name)(Be,"addA11yInfo");var Le=Object.freeze({render:Te,parse:ye,getDiagramFromText:Ae,initialize:Me,getConfig:c.getConfig,setConfig:c.setConfig,getSiteConfig:c.getSiteConfig,updateSiteConfig:c.updateSiteConfig,reset:(0,h.__name)(()=>{(0,c.reset)()},"reset"),globalReset:(0,h.__name)(()=>{(0,c.reset)(c.defaultConfig)},"globalReset"),defaultConfig:c.defaultConfig});(0,h.setLogLevel)((0,c.getConfig)().logLevel),(0,c.reset)((0,c.getConfig)());var Ee=(0,h.__name)((t,e,n)=>{h.log.warn(t),(0,l.isDetailedError)(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Fe=(0,h.__name)(async function(t={querySelector:".mermaid"}){try{await $e(t)}catch(e){if((0,l.isDetailedError)(e)&&h.log.error(e.str),Ue.parseError&&Ue.parseError(e),!t.suppressErrors)throw h.log.error("Use the suppressErrors option to suppress these errors"),e}},"run"),$e=(0,h.__name)(async function({postRenderCallback:t,querySelector:e,nodes:n}={querySelector:".mermaid"}){const r=Le.getConfig();let i;if(h.log.debug((t?"":"No ")+"Callback function found"),n)i=n;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}h.log.debug(`Found ${i.length} diagrams`),void 0!==r?.startOnLoad&&(h.log.debug("Start On Load: "+r?.startOnLoad),Le.updateSiteConfig({startOnLoad:r?.startOnLoad}));const a=new l.utils_default.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const s=[];for(const e of Array.from(i)){if(h.log.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const n=`mermaid-${a.next()}`;o=e.innerHTML,o=(0,u.dedent)(l.utils_default.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=l.utils_default.detectInit(o);r&&h.log.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await We(n,o,e);e.innerHTML=r,t&&await t(n),i&&i(e)}catch(t){Ee(t,s,Ue.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Oe=(0,h.__name)(function(t){Le.initialize(t)},"initialize"),Ne=(0,h.__name)(async function(t,e,n){h.log.warn("mermaid.init is deprecated. Please use run instead."),t&&Oe(t);const r={postRenderCallback:n,querySelector:".mermaid"};"string"==typeof e?r.querySelector=e:e&&(e instanceof HTMLElement?r.nodes=[e]:r.nodes=e),await Fe(r)},"init"),De=(0,h.__name)(async(t,{lazyLoad:e=!0}={})=>{te(),(0,c.registerLazyLoadedDiagrams)(...t),!1===e&&await ee()},"registerExternalDiagrams"),Ie=(0,h.__name)(function(){if(Ue.startOnLoad){const{startOnLoad:t}=Le.getConfig();t&&Ue.run().catch(t=>h.log.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Ie,!1);var ze=(0,h.__name)(function(t){Ue.parseError=t},"setParseErrorHandler"),Pe=[],Re=!1,qe=(0,h.__name)(async()=>{if(!Re){for(Re=!0;Pe.length>0;){const t=Pe.shift();if(t)try{await t()}catch(t){h.log.error("Error executing queue",t)}}Re=!1}},"executeQueue"),je=(0,h.__name)(async(t,e)=>new Promise((n,r)=>{const i=(0,h.__name)(()=>new Promise((i,a)=>{Le.parse(t,e).then(t=>{i(t),n(t)},t=>{h.log.error("Error parsing",t),Ue.parseError?.(t),a(t),r(t)})}),"performCall");Pe.push(i),qe().catch(r)}),"parse"),We=(0,h.__name)((t,e,n)=>new Promise((r,i)=>{const a=(0,h.__name)(()=>new Promise((a,o)=>{Le.render(t,e,n).then(t=>{a(t),r(t)},t=>{h.log.error("Error parsing",t),Ue.parseError?.(t),o(t),i(t)})}),"performCall");Pe.push(a),qe().catch(i)}),"render"),He=(0,h.__name)(()=>Object.keys(c.detectors).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Ue={startOnLoad:!0,mermaidAPI:Le,parse:je,render:We,init:Ne,run:Fe,registerExternalDiagrams:De,registerLayoutLoaders:o.registerLayoutLoaders,initialize:Oe,parseError:void 0,contentLoaded:Ie,setParseErrorHandler:ze,detectType:c.detectType,registerIconPacks:s.registerIconPacks,getRegisteredDiagramsMetadata:He},Ye=Ue}};
3
3
  //# sourceMappingURL=7367.js.map