filecat 6.62.0 → 6.62.2

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.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 8947.23e0d2bbb7604e1e0063.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8947],{74353(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",n="minute",s="hour",a="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|YYYY|YY|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,y={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"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,h),n=r-o<0,s=e.clone().add(i+(n?-1:1),h);return+(-(i+(r-o)/(n?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:a,D:u,h:s,m:n,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},C="en",b={};b[C]=y;var k="$isDayjsObject",w=function(t){return t instanceof B||!(!t||!t[k])},S=function t(e,r,i){var o;if(!e)return C;if("string"==typeof e){var n=e.toLowerCase();b[n]&&(o=n),r&&(b[n]=r,o=n);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,o=a}return!i&&o&&(C=o),o||!i&&C},T=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new B(r)},v=x;v.l=S,v.i=w,v.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var B=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}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 v},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=T(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return T(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<T(t)},m.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!v.u(e)||e,c=v.p(t),p=function(t,e){var o=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?o:o.endOf(a)},g=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var C=this.$locale().weekStart||0,b=(f<C?f+7:f)-C;return p(i?m-b:m+(6-b),y);case a:case u:return g(x+"Hours",0);case s:return g(x+"Minutes",1);case n:return g(x+"Seconds",2);case o:return g(x+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=v.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[a]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[s]=c+"Hours",r[n]=c+"Minutes",r[o]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===a?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[v.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=v.p(c),f=function(t){var e=T(p);return v.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===a)return f(1);if(g===l)return f(7);var y=(u={},u[n]=e,u[s]=r,u[o]=t,u)[g]||1,m=this.$d.getTime()+i*y;return v.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=v.z(this),n=this.$H,s=this.$m,a=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,o,n){return t&&(t[r]||t(e,i))||o[r].slice(0,n)},u=function(t){return v.s(n%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return a+1;case"MM":return v.s(a+1,2,"0");case"MMM":return d(r.monthsShort,a,h,3);case"MMMM":return d(h,a);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return v.s(n,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(n,s,!0);case"A":return g(n,s,!1);case"m":return String(s);case"mm":return v.s(s,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=v.p(u),m=T(i),x=(m.utcOffset()-this.utcOffset())*e,C=this-m,b=function(){return v.m(f,m)};switch(y){case d:g=b()/12;break;case h:g=b();break;case c:g=b()/3;break;case l:g=(C-x)/6048e5;break;case a:g=(C-x)/864e5;break;case s:g=C/r;break;case n:g=C/e;break;case o:g=C/t;break;default:g=C}return p?g:v.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return b[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=S(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return v.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()},y}(),_=B.prototype;return T.prototype=_,[["$ms",i],["$s",o],["$m",n],["$H",s],["$W",a],["$M",h],["$y",d],["$D",u]].forEach(function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),T.extend=function(t,e){return t.$i||(t(e,B,T),t.$i=!0),T},T.locale=S,T.isDayjs=w,T.unix=function(t){return T(1e3*t)},T.en=b[C],T.Ls=b,T.p={},T}()},50048(t,e,r){var i;!function(){var e={initialize:function(){this._tasks=new Map},mutate:function(t,e){return o(this,"mutate",t,e)},measure:function(t,e){return o(this,"measure",t,e)},clear:function(t){var e=this._tasks,r=e.get(t);this.fastdom.clear(r),e.delete(t)}};function o(t,e,r,i){var o,n=t._tasks,s=t.fastdom,a=new Promise(function(t,l){o=s[e](function(){n.delete(a);try{t(i?r.call(i):r())}catch(t){l(t)}},i)});return n.set(a,o),a}"f"=="function"[0]?void 0===(i=function(){return e}.call(e,r,e,t))||(t.exports=i):"o"=="object"[0]?t.exports=e:window.fastdomPromised=e}()},98551(t,e,r){var i;!function(e){"use strict";var o=function(){},n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return setTimeout(t,16)};function s(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e),o("initialized",t)}function a(t){t.scheduled||(t.scheduled=!0,t.raf(l.bind(null,t)),o("flush scheduled"))}function l(t){o("flush");var e,r=t.writes,i=t.reads;try{o("flushing reads",i.length),t.runTasks(i),o("flushing writes",r.length),t.runTasks(r)}catch(t){e=t}if(t.scheduled=!1,(i.length||r.length)&&a(t),e){if(o("task errored",e.message),!t.catch)throw e;t.catch(e)}}function h(t,e){var r=t.indexOf(e);return!!~r&&!!t.splice(r,1)}s.prototype={constructor:s,runTasks:function(t){var e;for(o("run tasks");e=t.shift();)e()},measure:function(t,e){o("measure");var r=e?t.bind(e):t;return this.reads.push(r),a(this),r},mutate:function(t,e){o("mutate");var r=e?t.bind(e):t;return this.writes.push(r),a(this),r},clear:function(t){return o("clear",t),h(this.reads,t)||h(this.writes,t)},extend:function(t){if(o("extend",t),"object"!=typeof t)throw new Error("expected object");var e=Object.create(this);return function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}(e,t),e.fastdom=this,e.initialize&&e.initialize(),e},catch:null};var c=e.fastdom=e.fastdom||new s;void 0===(i=function(){return c}.call(c,r,c,t))||(t.exports=i)}("undefined"!=typeof window?window:void 0!==this?this:globalThis)},3234(t,e){"use strict";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"},62559(t,e,r){"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=n(t.trim());do{e=(r=n(r=o(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var s=r;if(!s)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(s))return s;var a=s.trimStart(),l=a.match(i.urlSchemeRegex);if(!l)return s;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=a.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var i=r(3234);function o(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function n(t){try{return decodeURIComponent(t)}catch(e){return t}}},61057(t,e,r){"use strict";function i(t,e,r){if(t&&t.length){const[i,o]=e,n=Math.PI/180*r,s=Math.cos(n),a=Math.sin(n);for(const e of t){const[t,r]=e;e[0]=(t-i)*s-(r-o)*a+i,e[1]=(t-i)*a+(r-o)*s+o}}}function o(t,e){return t[0]===e[0]&&t[1]===e[1]}function n(t,e,r,n=1){const s=r,a=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(s)for(const t of l)i(t,h,s);const c=function(t,e,r){const i=[];for(const e of t){const t=[...e];o(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const n=[];e=Math.max(e,.1);const s=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);s.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(s.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)),!s.length)return n;let a=[],l=s[0].ymin,h=0;for(;a.length||s.length;){if(s.length){let t=-1;for(let e=0;e<s.length&&!(s[e].ymin>l);e++)t=e;s.splice(0,t+1).forEach(t=>{a.push({s:l,edge:t})})}if(a=a.filter(t=>!(t.edge.ymax<=l)),a.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!==r||h%e==0)&&a.length>1)for(let t=0;t<a.length;t+=2){const e=t+1;if(e>=a.length)break;const r=a[t].edge,i=a[e].edge;n.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,a.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return n}(l,a,n);if(s){for(const t of l)i(t,h,-s);!function(t,e,r){const o=[];t.forEach(t=>o.push(...t)),i(o,e,r)}(c,h,-s)}return c}function s(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(s=o),n(t,o,i,s||1)}r.d(e,{A:()=>ot});class a{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=s(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends a{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=s(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,n=[],a=.5*r*Math.cos(o),h=.5*r*Math.sin(o);for(const[t,e]of i)l([t,e])&&n.push([[t[0]-a,t[1]+h],[...e]],[[t[0]+a,t[1]-h],[...e]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class c extends a{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=s(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const n=i/4;for(const s of t){const t=l(s),a=t/i,h=Math.ceil(a)-1,c=t-h*i,d=(s[0][0]+s[1][0])/2-i/4,u=Math.min(s[0][1],s[1][1]);for(let t=0;t<h;t++){const s=u+c+t*i,a=d-n+2*Math.random()*n,l=s-n+2*Math.random()*n,h=this.helper.ellipse(a,l,o,o,e);r.push(...h.ops)}}return{type:"fillSketch",ops:r}}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=s(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{const n=l(t),s=Math.floor(n/(r+i)),a=(n+i-s*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const d=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let t=0;t<s;t++){const n=t*(r+i),s=n+r,l=[h[0]+n*Math.cos(d)+a*Math.cos(d),h[1]+n*Math.sin(d)+a*Math.sin(d)],c=[h[0]+s*Math.cos(d)+a*Math.cos(d),h[1]+s*Math.sin(d)+a*Math.sin(d)];o.push(...this.helper.doubleLineOps(l[0],l[1],c[0],c[1],e))}}),o}}class p{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,o=s(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const o=l(t),n=Math.round(o/(2*e));let s=t[0],a=t[1];s[0]>a[0]&&(s=t[1],a=t[0]);const h=Math.atan((a[1]-s[1])/(a[0]-s[0]));for(let t=0;t<n;t++){const o=2*t*e,n=2*(t+1)*e,a=Math.sqrt(2*Math.pow(e,2)),l=[s[0]+o*Math.cos(h),s[1]+o*Math.sin(h)],c=[s[0]+n*Math.cos(h),s[1]+n*Math.sin(h)],d=[l[0]+a*Math.cos(h+Math.PI/4),l[1]+a*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}const g={};class f{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const y={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 m(t,e){return t.type===e}function x(t){const e=[],r=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 i="BOD",o=0,n=r[o];for(;!m(n,2);){let s=0;const a=[];if("BOD"===i){if("M"!==n.text&&"m"!==n.text)return x("M0,0"+t);o++,s=y[n.text],i=n.text}else m(n,1)?s=y[i]:(o++,s=y[n.text],i=n.text);if(!(o+s<r.length))throw new Error("Path data ended short");for(let t=o;t<o+s;t++){const e=r[t];if(!m(e,1))throw new Error("Param not a number: "+i+","+e.text);a[a.length]=+e.text}if("number"!=typeof y[i])throw new Error("Bad segment: "+i);{const t={key:i,data:a};e.push(t),o+=s,n=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function C(t){let e=0,r=0,i=0,o=0;const n=[];for(const{key:s,data:a}of t)switch(s){case"M":n.push({key:"M",data:[...a]}),[e,r]=a,[i,o]=a;break;case"m":e+=a[0],r+=a[1],n.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":n.push({key:"L",data:[...a]}),[e,r]=a;break;case"l":e+=a[0],r+=a[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...a]}),e=a[4],r=a[5];break;case"c":{const t=a.map((t,i)=>i%2?t+r:t+e);n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...a]}),e=a[2],r=a[3];break;case"q":{const t=a.map((t,i)=>i%2?t+r:t+e);n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...a]}),e=a[5],r=a[6];break;case"a":e+=a[5],r+=a[6],n.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,r]});break;case"H":n.push({key:"H",data:[...a]}),e=a[0];break;case"h":e+=a[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...a]}),r=a[0];break;case"v":r+=a[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...a]}),e=a[2],r=a[3];break;case"s":{const t=a.map((t,i)=>i%2?t+r:t+e);n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...a]}),e=a[0],r=a[1];break;case"t":e+=a[0],r+=a[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=o}return n}function b(t){const e=[];let r="",i=0,o=0,n=0,s=0,a=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[n,s]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],a=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,n=0;"C"===r||"S"===r?(t=i+(i-a),n=o+(o-l)):(t=i,n=o),e.push({key:"C",data:[t,n,...c]}),a=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,n]=c;let s=0,h=0;"Q"===r||"T"===r?(s=i+(i-a),h=o+(o-l)):(s=i,h=o);const d=i+2*(s-i)/3,u=o+2*(h-o)/3,p=t+2*(s-t)/3,g=n+2*(h-n)/3;e.push({key:"C",data:[d,u,p,g,t,n]}),a=s,l=h,i=t,o=n;break}case"Q":{const[t,r,n,s]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=n+2*(t-n)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[h,d,u,p,n,s]}),a=t,l=r,i=n,o=s;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),n=c[2],s=c[3],a=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(w(i,o,l,h,t,r,n,s,a).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=n,o=s}r=h}return e}function k(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function w(t,e,r,i,o,n,s,a,l,h){const c=(d=s,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=k(t,e,-c),[r,i]=k(r,i,-c);const s=(t-r)/2,h=(e-i)/2;let d=s*s/(o*o)+h*h/(n*n);d>1&&(d=Math.sqrt(d),o*=d,n*=d);const u=o*o,m=n*n,x=u*m-u*h*h-m*s*s,C=u*h*h+m*s*s,b=(a===l?-1:1)*Math.sqrt(Math.abs(x/C));f=b*o*h/n+(t+r)/2,y=b*-n*s/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,a=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=w(r=f+o*Math.cos(g),i=y+n*Math.sin(g),e,a,o,n,s,0,l,[g,t,f,y])}m=g-p;const x=Math.cos(p),C=Math.sin(p),b=Math.cos(g),S=Math.sin(g),T=Math.tan(m/4),v=4/3*o*T,B=4/3*n*T,_=[t,e],A=[t+v*C,e-B*x],L=[r+v*S,i-B*b],F=[r,i];if(A[0]=2*_[0]-A[0],A[1]=2*_[1]-A[1],h)return[A,L,F].concat(u);{u=[A,L,F].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=k(u[e][0],u[e][1],c),i=k(u[e+1][0],u[e+1][1],c),o=k(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const S={randOffset:function(t,e){return I(t,e)},randOffsetWithRange:function(t,e,r){return D(t,e,r)},ellipse:function(t,e,r,i,o){return A(t,e,o,_(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return q(t,e,r,i,o,!0)}};function T(t,e,r,i,o){return{type:"path",ops:q(t,e,r,i,o)}}function v(t,e,r){const i=(t||[]).length;if(i>2){const o=[];for(let e=0;e<i-1;e++)o.push(...q(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...q(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?T(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function B(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=K(r[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:K(r[0],1.5*(1+.22*e.roughness),$(e));for(let t=1;t<r.length;t++){const n=r[t];if(n.length){const t=K(n,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:K(n,1.5*(1+.22*e.roughness),$(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&o.push(t)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function _(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/o;let s=Math.abs(t/2),a=Math.abs(e/2);const l=1-r.curveFitting;return s+=I(s*l,r),a+=I(a*l,r),{increment:n,rx:s,ry:a}}function A(t,e,r,i){const[o,n]=N(i.increment,t,e,i.rx,i.ry,1,i.increment*D(.1,D(.4,1,r),r),r);let s=z(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=N(i.increment,t,e,i.rx,i.ry,1.5,0,r),n=z(o,null,r);s=s.concat(n)}return{estimatedPoints:n,opset:{type:"path",ops:s}}}function L(t,e,r,i,o,n,s,a,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=I(.01*d,l),u+=I(.01*u,l);let p=o,g=n;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=P(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=P(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return s&&(a?m.push(...q(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...q(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function F(t,e){const r=b(C(x(t))),i=[];let o=[0,0],n=[0,0];for(const{key:t,data:s}of r)switch(t){case"M":n=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...q(n[0],n[1],s[0],s[1],e)),n=[s[0],s[1]];break;case"C":{const[t,r,o,a,l,h]=s;i.push(...W(t,r,o,a,l,h,n,e)),n=[l,h];break}case"Z":i.push(...q(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]]}return{type:"path",ops:i}}function M(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+I(t,e),i[0][1]+I(t,e)]});for(let n=1;n<o;n++)r.push({op:"lineTo",data:[i[n][0]+I(t,e),i[n][1]+I(t,e)]})}}return{type:"fillPath",ops:r}}function E(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!g[r])switch(r){case"zigzag":g[r]||(g[r]=new h(e));break;case"cross-hatch":g[r]||(g[r]=new c(e));break;case"dots":g[r]||(g[r]=new d(e));break;case"dashed":g[r]||(g[r]=new u(e));break;case"zigzag-line":g[r]||(g[r]=new p(e));break;default:r="hachure",g[r]||(g[r]=new a(e))}return g[r]}(e,S).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 f(t.seed||0)),t.randomizer.next()}function D(t,e,r,i=1){return r.roughness*i*(O(r)*(e-t)+t)}function I(t,e,r=1){return D(-t,t,e,r)}function q(t,e,r,i,o,n=!1){const s=n?o.disableMultiStrokeFill:o.disableMultiStroke,a=R(t,e,r,i,o,!0,!1);if(s)return a;const l=R(t,e,r,i,o,!0,!0);return a.concat(l)}function R(t,e,r,i,o,n,s){const a=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(a);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>a&&(c=l/10);const d=c/2,u=.2+.2*O(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=I(p,o,h),g=I(g,o,h);const f=[],y=()=>I(d,o,h),m=()=>I(c,o,h),x=o.preserveVertices;return n&&(s?f.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):f.push({op:"move",data:[t+(x?0:I(c,o,h)),e+(x?0:I(c,o,h))]})),s?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(x?0:y()),i+(x?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(x?0:m()),i+(x?0:m())]}),f}function K(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]),i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+I(e,r),t[o][1]+I(e,r)]),o===t.length-1&&i.push([t[o][0]+I(e,r),t[o][1]+I(e,r)]);return z(i,null,r)}function z(t,e,r){const i=t.length,o=[];if(i>3){const n=[],s=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const r=t[e];n[0]=[r[0],r[1]],n[1]=[r[0]+(s*t[e+1][0]-s*t[e-1][0])/6,r[1]+(s*t[e+1][1]-s*t[e-1][1])/6],n[2]=[t[e+1][0]+(s*t[e][0]-s*t[e+2][0])/6,t[e+1][1]+(s*t[e][1]-s*t[e+2][1])/6],n[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}if(e&&2===e.length){const t=r.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+I(t,r),e[1]+I(t,r)]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...R(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return o}function N(t,e,r,i,o,n,s,a){const l=[],h=[];if(0===a.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let n=0;n<=2*Math.PI;n+=t){const t=[e+i*Math.cos(n),r+o*Math.sin(n)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+o*Math.sin(0)]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{const c=I(.5,a)-Math.PI/2;h.push([I(n,a)+e+.9*i*Math.cos(c-t),I(n,a)+r+.9*o*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let s=c;s<d;s+=t){const t=[I(n,a)+e+i*Math.cos(s),I(n,a)+r+o*Math.sin(s)];l.push(t),h.push(t)}h.push([I(n,a)+e+i*Math.cos(c+2*Math.PI+.5*s),I(n,a)+r+o*Math.sin(c+2*Math.PI+.5*s)]),h.push([I(n,a)+e+.98*i*Math.cos(c+s),I(n,a)+r+.98*o*Math.sin(c+s)]),h.push([I(n,a)+e+.9*i*Math.cos(c+.5*s),I(n,a)+r+.9*o*Math.sin(c+.5*s)])}return[h,l]}function P(t,e,r,i,o,n,s,a,l){const h=n+I(.1,l),c=[];c.push([I(a,l)+e+.9*i*Math.cos(h-t),I(a,l)+r+.9*o*Math.sin(h-t)]);for(let n=h;n<=s;n+=t)c.push([I(a,l)+e+i*Math.cos(n),I(a,l)+r+o*Math.sin(n)]);return c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),z(c,null,l)}function W(t,e,r,i,o,n,s,a){const l=[],h=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let c=[0,0];const d=a.disableMultiStroke?1:2,u=a.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(u?0:I(h[0],a)),s[1]+(u?0:I(h[0],a))]}),c=u?[o,n]:[o+I(h[p],a),n+I(h[p],a)],l.push({op:"bcurveTo",data:[t+I(h[p],a),e+I(h[p],a),r+I(h[p],a),i+I(h[p],a),c[0],c[1]]});return l}function j(t){return[...t]}function H(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(j(t[0]),j(t[1]),j(t[2]),j(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const o=[],n=1-e;i.push(j(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(n*r[t+1][0]-n*r[t-1][0])/6,e[1]+(n*r[t+1][1]-n*r[t-1][1])/6],o[2]=[r[t+1][0]+(n*r[t][0]-n*r[t+2][0])/6,r[t+1][1]+(n*r[t][1]-n*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function U(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Y(t,e,r){const i=U(e,r);if(0===i)return U(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return o=Math.max(0,Math.min(1,o)),U(t,X(e,r,o))}function X(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function G(t,e,r,i){const o=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],o=t[e+2],n=t[e+3];let s=3*i[0]-2*r[0]-n[0];s*=s;let a=3*i[1]-2*r[1]-n[1];a*=a;let l=3*o[0]-2*n[0]-r[0];l*=l;let h=3*o[1]-2*n[1]-r[1];return h*=h,s<l&&(s=l),a<h&&(a=h),s+a}(t,e)<r){const r=t[e+0];o.length?(n=o[o.length-1],s=r,Math.sqrt(U(n,s))>1&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,n=t[e+0],s=t[e+1],a=t[e+2],l=t[e+3],h=X(n,s,i),c=X(s,a,i),d=X(a,l,i),u=X(h,c,i),p=X(c,d,i),g=X(u,p,i);G([n,h,u,g],0,r,o),G([g,p,d,l],0,r,o)}var n,s;return o}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,o){const n=o||[],s=t[e],a=t[r-1];let l=0,h=1;for(let i=e+1;i<r-1;++i){const e=Y(t[i],s,a);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(Z(t,e,h+1,i,n),Z(t,h,r,i,n)):(n.length||n.push(s),n.push(a)),n}function Q(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let r=0;r<o;r++)G(t,3*r,e,i);return r&&r>0?Z(i,0,i.length,r):i}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,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const n=this._o(o);return this._d("line",[T(t,e,r,i,n)],n)}rectangle(t,e,r,i,o){const n=this._o(o),s=[],a=function(t,e,r,i,o){return function(t,e){return v(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,n);if(n.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===n.fillStyle?s.push(M([o],n)):s.push(E([o],n))}return n.stroke!==J&&s.push(a),this._d("rectangle",s,n)}ellipse(t,e,r,i,o){const n=this._o(o),s=[],a=_(r,i,n),l=A(t,e,n,a);if(n.fill)if("solid"===n.fillStyle){const r=A(t,e,n,a).opset;r.type="fillPath",s.push(r)}else s.push(E([l.estimatedPoints],n));return n.stroke!==J&&s.push(l.opset),this._d("ellipse",s,n)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[v(t,!1,r)],r)}arc(t,e,r,i,o,n,s=!1,a){const l=this._o(a),h=[],c=L(t,e,r,i,o,n,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const a=L(t,e,r,i,o,n,!0,!1,s);a.type="fillPath",h.push(a)}else h.push(function(t,e,r,i,o,n,s){const a=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=I(.01*h,s),c+=I(.01*c,s);let d=o,u=n;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/s.curveStepCount,g=[];for(let t=d;t<=u;t+=p)g.push([a+h*Math.cos(t),l+c*Math.sin(t)]);return g.push([a+h*Math.cos(u),l+c*Math.sin(u)]),g.push([a,l]),E([g],s)}(t,e,r,i,o,n,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=B(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=B(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push(E([e],r))}return r.stroke!==J&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=v(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(M([t],r)):i.push(E([t],r))),r.stroke!==J&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==J,n=r.stroke!==J,s=!!(r.simplification&&r.simplification<1),a=function(t,e,r){const i=b(C(x(t))),o=[];let n=[],s=[0,0],a=[];const l=()=>{a.length>=4&&n.push(...Q(a,1)),a=[]},h=()=>{l(),n.length&&(o.push(n),n=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),s=[e[0],e[1]],n.push(s);break;case"L":l(),n.push([e[0],e[1]]);break;case"C":if(!a.length){const t=n.length?n[n.length-1]:s;a.push([t[0],t[1]])}a.push([e[0],e[1]]),a.push([e[2],e[3]]),a.push([e[4],e[5]]);break;case"Z":l(),n.push([s[0],s[1]])}if(h(),!r)return o;const c=[];for(const t of o){const e=V(t,r);e.length&&c.push(e)}return c}(t,0,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=F(t,r);if(o)if("solid"===r.fillStyle)if(1===a.length){const e=F(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(M(a,r));else i.push(E(a,r));return n&&(s?a.forEach(t=>{i.push(v(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,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||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const n of e)switch(n.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,n,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,n,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,n,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.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(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const n=this.gen.line(t,e,r,i,o);return this.draw(n),n}rectangle(t,e,r,i,o){const n=this.gen.rectangle(t,e,r,i,o);return this.draw(n),n}ellipse(t,e,r,i,o){const n=this.gen.ellipse(t,e,r,i,o);return this.draw(n),n}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,n,s=!1,a){const l=this.gen.arc(t,e,r,i,o,n,s,a);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(rt,"g"),n=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(s,n)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(s,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,s,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(rt,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const n=this.gen.line(t,e,r,i,o);return this.draw(n)}rectangle(t,e,r,i,o){const n=this.gen.rectangle(t,e,r,i,o);return this.draw(n)}ellipse(t,e,r,i,o){const n=this.gen.ellipse(t,e,r,i,o);return this.draw(n)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,n,s=!1,a){const l=this.gen.arc(t,e,r,i,o,n,s,a);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var ot={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},68947(t,e,r){"use strict";r.r(e),r.d(e,{parseMermaidToExcalidraw:()=>Xo});var i,o,n,s=r.cw(function(t,e){e.k=void 0;e.k=function(t,e){void 0===e&&(e={listUnicodeChar:""}),(e=e||{}).listUnicodeChar=!!e.hasOwnProperty("listUnicodeChar")&&e.listUnicodeChar,e.stripListLeaders=!e.hasOwnProperty("stripListLeaders")||e.stripListLeaders,e.gfm=!e.hasOwnProperty("gfm")||e.gfm,e.useImgAltText=!e.hasOwnProperty("useImgAltText")||e.useImgAltText,e.preserveLinks=!!e.hasOwnProperty("preserveLinks")&&e.preserveLinks;var r=t||"";r=r.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm,"");try{e.stripListLeaders&&(r=e.listUnicodeChar?r.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,e.listUnicodeChar+" $1"):r.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,"$1")),e.gfm&&(r=r.replace(/\n={2,}/g,"\n").replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/`{3}.*\n/g,"")),e.preserveLinks&&(r=r.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g,"$1 ($2)")),r=r.replace(/<[^>]*>/g,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,e.useImgAltText?"$1":"").replace(/\[(.*?)\][\[\(].*?[\]\)]/g,"$1").replace(/^\s{0,3}>\s?/g,"").replace(/(^|\n)\s{0,3}>\s?/g,"\n\n").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm,"$1$2$3").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/\n{2,}/g,"\n\n")}catch(e){return console.error(e),t}return r}});class a{constructor({converter:t}){this.convert=(t,e)=>this.converter(t,{...e,fontSize:e.fontSize||20}),this.converter=t}}!function(t){t.ROUND="round",t.STADIUM="stadium",t.DOUBLECIRCLE="doublecircle",t.CIRCLE="circle",t.DIAMOND="diamond",t.CYLINDER="cylinder"}(i||(i={})),function(t){t.COLOR="color"}(o||(o={})),function(t){t.FILL="fill",t.STROKE="stroke",t.STROKE_WIDTH="stroke-width",t.STROKE_DASHARRAY="stroke-dasharray"}(n||(n={})),s();const l={arrow_circle:{endArrowhead:"circle"},arrow_cross:{endArrowhead:"bar"},arrow_open:{endArrowhead:null,startArrowhead:null},double_arrow_circle:{endArrowhead:"circle",startArrowhead:"circle"},double_arrow_cross:{endArrowhead:"bar",startArrowhead:"bar"},double_arrow_point:{endArrowhead:"arrow",startArrowhead:"arrow"}},h=t=>{let e=t.text;return"markdown"===t.labelType&&(e=(0,s().k)(t.text)),c(e)},c=t=>t.replace(/\s?(fa|fab):[a-zA-Z0-9-]+/g,""),d=t=>{const e={};return Object.keys(t).forEach(r=>{switch(r){case n.FILL:e.backgroundColor=t[r],e.fillStyle="solid";break;case n.STROKE:e.strokeColor=t[r];break;case n.STROKE_WIDTH:e.strokeWidth=Number(t[r]?.split("px")[0]);break;case n.STROKE_DASHARRAY:e.strokeStyle="dashed"}}),e},u=t=>{const e={};return Object.keys(t).forEach(r=>{if(r===o.COLOR)e.strokeColor=t[r]}),e},p=(t,e)=>Math.max(20,Math.ceil(t.length*e*.62)),g=new a({converter:(t,e)=>{const r=[],o=e.fontSize,{getGroupIds:n,getParentId:s}=(t=>{const e={};t.subGraphs.map(r=>{r.nodeIds.forEach(i=>{e[r.id]={id:r.id,parent:null,isLeaf:!1},e[i]={id:i,parent:r.id,isLeaf:void 0!==t.vertices[i]}})});const r={};return[...Object.keys(t.vertices),...t.subGraphs.map(t=>t.id)].forEach(t=>{if(!e[t])return;let i=e[t];const o=[];for(i.isLeaf||o.push(`subgraph_group_${i.id}`);i.parent;)o.push(`subgraph_group_${i.parent}`),i=e[i.parent];r[t]=o}),{getGroupIds:t=>r[t]||[],getParentId:t=>e[t]?e[t].parent:null}})(t);return t.subGraphs.reverse().forEach(t=>{const e=n(t.id),i=h(t),s=p(i,o||16)+64,a=Math.max(t.width,s),l=t.x-(a-t.width)/2,c=d(t.containerStyle),g=u(t.labelStyle),f={id:t.id,type:"rectangle",groupIds:e,x:l,y:t.y,width:a,height:t.height,label:{groupIds:e,text:i,fontSize:o,verticalAlign:"top",...g},...c};r.push(f)}),Object.values(t.vertices).forEach(t=>{if(!t)return;const e=n(t.id),s=h(t),a=((t,e,r,o)=>{const n=o||20;if(t!==i.CYLINDER||!e||e.includes("\n"))return n;const s=Math.max(20,r-12);return p(e,n)<=s?n:Math.max(12,Math.floor(s/(.62*e.length)))})(t.type,s,t.width,o),l=d(t.containerStyle),c=u(t.labelStyle);let g={id:t.id,type:"rectangle",groupIds:e,x:t.x,y:t.y,width:t.width,height:t.height,strokeWidth:2,label:{groupIds:e,text:s,fontSize:a,...c},link:t.link||null,...l};switch(t.type){case i.STADIUM:case i.ROUND:g={...g,roundness:{type:3}};break;case i.DOUBLECIRCLE:{const i=5;e.push(`doublecircle_${t.id}}`);const o={type:"ellipse",groupIds:e,x:t.x+i,y:t.y+i,width:t.width-2*i,height:t.height-2*i,strokeWidth:2,roundness:{type:3},label:{groupIds:e,text:s,fontSize:a,...c}};g={...g,groupIds:e,type:"ellipse"},r.push(o);break}case i.CIRCLE:g.type="ellipse";break;case i.DIAMOND:g.type="diamond"}r.push(g)}),t.edges.forEach(t=>{let e=[];const i=s(t.start),a=s(t.end);i&&i===a&&(e=n(i));const{startX:c,startY:d,reflectionPoints:u}=t,p=u.map(t=>{return e=t.x-u[0].x,r=t.y-u[0].y,[e,r];var e,r}),g=(f=t.type||"arrow_point",l[f]);var f;const y=r.find(e=>e.id===t.start),m=r.find(e=>e.id===t.end);if(!y||!m)return;const x={id:`${t.start}_${t.end}`,type:"arrow",groupIds:e,x:c,y:d,strokeWidth:"thick"===t.stroke?4:2,strokeStyle:"dotted"===t.stroke?"dashed":void 0,points:p,...t.text?{label:{text:h(t),fontSize:o,groupIds:e}}:{},roundness:{type:2},...g,start:{id:y.id||""},end:{id:m.id||""}};r.push(x)}),{elements:r}}});let f=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_","");const y=new a({converter:t=>{const e=f(),{width:r,height:i}=t,o={type:"image",x:0,y:0,width:r,height:i,status:"saved",fileId:e};return{files:{[e]:{id:e,mimeType:t.mimeType,dataURL:t.dataURL}},elements:[o]}}}),m=(t,e)=>[t,e],x=t=>t.replace(/\\n/g,"\n"),C=t=>{const e={type:"line",x:t.startX,y:t.startY,points:[m(0,0),m(t.endX-t.startX,t.endY-t.startY)],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:t.strokeStyle||"solid",strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||1};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},b=t=>{const e={type:"text",x:t.x,y:t.y,width:t.width,height:t.height,text:x(t.text)||"",fontSize:t.fontSize,verticalAlign:"top",strokeColor:t.color};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},k=t=>{const e={text:x(t?.label?.text||""),fontSize:t?.label?.fontSize,textAlign:t.label?.textAlign,verticalAlign:t.label?.verticalAlign||"middle",strokeColor:t.label?.color||"#000",...t.groupId?{groupIds:[t.groupId]}:{}};let r={};"rectangle"===t.type&&"activation"===t.subtype&&(r={backgroundColor:"#e9ecef",fillStyle:"solid"});const i={id:t.id,type:t.type,x:t.x,y:t.y,width:t.width,height:t.height,label:e,strokeStyle:t?.strokeStyle,strokeWidth:t?.strokeWidth,strokeColor:t?.strokeColor,backgroundColor:t?.bgColor,fillStyle:"solid",...r};return t.groupId&&Object.assign(i,{groupIds:[t.groupId]}),i},w=t=>{const e={type:"arrow",x:t.startX,y:t.startY,points:t.points?.map(([t,e])=>m(t,e))||[m(0,0),m(t.endX-t.startX,t.endY-t.startY)],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:t?.strokeStyle||"solid",endArrowhead:t?.endArrowhead||null,startArrowhead:t?.startArrowhead||null,label:{text:x(t?.label?.text||""),fontSize:16,textAlign:t?.label?.textAlign,verticalAlign:t?.label?.verticalAlign},roundness:{type:2},start:t.start,end:t.end};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),e},S=t=>{if(!t)return!0;const e=t.trim().toLowerCase();return"transparent"===e||"none"===e||"rgba(0,0,0,0)"===e||"rgba(0, 0, 0, 0)"===e},T=(t,e,r=!0)=>{const i=t,o=i.groupIds??[];if(o.includes(e)||(i.groupIds=[...o,e]),!r||!i.label)return;const n=i.label.groupIds??[];n.includes(e)||(i.label.groupIds=[...n,e])},v=new a({converter:t=>{const e=[],r=[];if(Object.values(t.nodes).forEach(t=>{t&&t.length&&t.forEach(t=>{let i;switch(t.type){case"line":i=C(t);break;case"rectangle":case"ellipse":i=k(t);break;case"text":i=b(t);break;default:throw`unknown type ${t.type}`}"rectangle"===t.type&&"activation"===t?.subtype?r.push(i):e.push(i)})}),Object.values(t.lines).forEach(t=>{t&&e.push(C(t))}),Object.values(t.arrows).forEach(t=>{t&&(e.push(w(t)),t.sequenceNumber&&e.push(k(t.sequenceNumber)))}),e.push(...r),t.loops){const{lines:r,texts:i,nodes:o}=t.loops;r.forEach(t=>{e.push(C(t))}),i.forEach(t=>{e.push(b(t))}),o.forEach(t=>{e.push(k(t))})}return t.groups&&t.groups.forEach(t=>{const{actorKeys:r,name:i}=t;let o=1/0,n=1/0,s=0,a=0;if(!r.length)return;const l=e.filter(t=>{if(t.id){const e=t.id.indexOf("-"),i=t.id.substring(0,e);return r.includes(i)}return!1});if(!l.length)return;if(l.forEach(t=>{void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height&&(o=Math.min(o,t.x),n=Math.min(n,t.y),s=Math.max(s,t.x+t.width),a=Math.max(a,t.y+t.height))}),!(Number.isFinite(o)&&Number.isFinite(n)&&Number.isFinite(s)&&Number.isFinite(a)))return;const h=o-10,c=n-10,d=s-o+20,u=a-n+20,p=f(),g=f(),y=k({type:"rectangle",x:h,y:c,width:d,height:u,bgColor:S(t.fill)?void 0:t.fill,strokeColor:"#1f1f1f",strokeWidth:1,id:p,groupId:g});if(e.unshift(y),e.forEach(t=>{t.id!==p&&void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height&&t.x>=o&&t.x+t.width<=s&&t.y>=n&&t.y+t.height<=a&&T(t,g)}),i){const t=b({type:"text",id:f(),text:i,x:h+4,y:c-24,width:(m=i,x=16,Math.max(20,Math.round(m.length*x*.6))),height:24,fontSize:16,color:"#1f1f1f",groupId:g});T(t,g,!1),e.push(t)}var m,x}),{elements:e}}}),B=new a({converter:t=>{const e=[];return t.nodes.forEach(t=>{t&&t.length&&t.forEach(t=>{let r;switch(t.type){case"line":r=C(t);break;case"rectangle":case"ellipse":r=k(t);break;case"text":r=b(t);break;default:throw`unknown type ${t.type}`}e.push(r)})}),Object.values(t.lines).forEach(t=>{t&&e.push(C(t))}),Object.values(t.arrows).forEach(t=>{if(!t)return;const r=w(t);e.push(r)}),Object.values(t.text).forEach(t=>{const r=b(t);e.push(r)}),Object.values(t.namespaces).forEach(r=>{const i=Object.keys(r.classes),o=[...i],n=[...t.lines,...t.arrows,...t.text];i.forEach(t=>{const e=n.filter(e=>e.metadata&&e.metadata.classId===t).map(t=>t.id);e.length&&o.push(...e)});const s={type:"frame",id:f(),name:r.id,children:o};e.push(s)}),{elements:e}}}),_=new a({converter:t=>{const e=[];return t.nodes.forEach(t=>{t&&t.length&&t.forEach(t=>{let r;switch(t.type){case"line":r=C(t);break;case"rectangle":case"ellipse":r=k(t);break;case"text":r=b(t);break;default:throw`unknown type ${t.type}`}e.push(r)})}),t.lines.forEach(t=>{e.push(C(t))}),t.arrows.forEach(t=>{e.push(w(t))}),t.text.forEach(t=>{e.push(b(t))}),{elements:e}}}),A=(t,e)=>[t,e],L="#000000",F=new Set(["choice","fork","join","stateStart","stateEnd","divider"]),M=t=>"stateEnd"===t.shape?[`state_end_group_${t.id}`]:void 0,E=t=>"rectWithTitle"===t.shape&&t.description.length?[t.text,...t.description].join("\n"):t.text;let $;const O=(t,e)=>{const r=(()=>{if(void 0!==$)return $;if("undefined"==typeof document)return $=null,$;try{$=document.createElement("canvas").getContext("2d")}catch{$=null}return $})();return r?(r.font=`${e}px Excalifont, sans-serif`,r.measureText(t).width):t.length*e*.6},D=(t,e,r)=>{if(O(t,e)<=r)return[t];const i=[];let o="";for(const n of t){const t=`${o}${n}`;o&&O(t,e)>r?(i.push(o),o=n):o=t}return o&&i.push(o),i},I=(t,e,r)=>{const i=t.map(t=>((t,e,r)=>{if(!t.trim())return t;if(O(t,e)<=r)return t;const i=t.split(/\s+/).filter(Boolean),o=[];let n="";for(const t of i){const i=D(t,e,r);for(const[t,s]of i.entries()){const i=n?`${n}${n&&0===t?" ":""}${s}`:s;O(i,e)<=r?n=i:(n&&o.push(n),n=s)}i.length}return o.push(n),o.join("\n")})(t,e,r)).join("\n"),o=i.split("\n");return{width:Math.max(...o.map(t=>O(t,e))),height:o.length*e*1.25}},q=t=>{const e=E(t);if(!e||F.has(t.shape))return 16;const r=Math.max(1,t.width-10),i=Math.max(1,t.height-10),o=e.split("\n");if(o.length>1){if(Math.max(...o.map(t=>O(t,16)))<=r)return 16}return((t,e,r,i)=>{const o=t.split("\n");for(let t=16;t>=14;t-=1){const{height:i}=I(o,t,e);if(i<=r)return t}return i})(e,r,i,1===o.length?16:14)},R=t=>{const e=d(t.containerStyle),r=(t=>{if(F.has(t.shape))return;const e=E(t);return e?{text:e,fontSize:q(t),verticalAlign:"rectWithTitle"===t.shape||"roundedWithTitle"===t.shape?"top":"middle",...u(t.labelStyle)}:void 0})(t),i="choice"===t.shape?"diamond":"stateStart"===t.shape||"stateEnd"===t.shape?"ellipse":"rectangle",o="rect"===t.shape||"rectWithTitle"===t.shape||"roundedWithTitle"===t.shape,n="stateStart"===t.shape||"fork"===t.shape||"join"===t.shape,s=e.backgroundColor||e.strokeColor||L,a=e.strokeColor||e.backgroundColor||L;return{id:t.id,type:i,...M(t)?{groupIds:M(t)}:{},x:t.x,y:t.y,width:t.width,height:t.height,...r?{label:r}:{},...e,...o?{roundness:{type:3}}:{},...n?{backgroundColor:s,strokeColor:a,fillStyle:"solid"}:{}}},K=new a({converter:t=>{const e=[];return t.nodes.forEach(t=>{if(!t.isRenderable)return;const r=R(t);e.push(r);const i=(t=>{if(!t.dividerLine)return null;const e=d(t.containerStyle);return{id:`${t.id}__divider`,type:"line",x:t.dividerLine.startX,y:t.dividerLine.startY,width:t.dividerLine.endX-t.dividerLine.startX,height:t.dividerLine.endY-t.dividerLine.startY,points:[A(0,0),A(t.dividerLine.endX-t.dividerLine.startX,t.dividerLine.endY-t.dividerLine.startY)],strokeColor:e.strokeColor||"#000",strokeWidth:e.strokeWidth||1}})(t);i&&e.push(i),"stateEnd"===t.shape&&e.push((t=>{const e=d(t.containerStyle),r=Math.max(2,.32*Math.min(t.width,t.height)),i=t.endInnerColor||e.strokeColor||e.backgroundColor||L;return{id:`${t.id}__inner`,type:"ellipse",groupIds:M(t),x:t.x+r,y:t.y+r,width:Math.max(1,t.width-2*r),height:Math.max(1,t.height-2*r),backgroundColor:i,strokeColor:i,fillStyle:"solid",strokeWidth:1}})(t))}),t.edges.forEach(t=>{e.push((t=>{const e=t.reflectionPoints.map((t,e,r)=>{const i=r[0];return 0===e?A(0,0):A(t.x-i.x,t.y-i.y)});return{id:t.id,type:"arrow",x:t.startX,y:t.startY,width:t.endX-t.startX,height:t.endY-t.startY,points:e,strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||2,strokeStyle:t.strokeStyle||"solid",endArrowhead:t.isNoteEdge?null:"triangle",roundness:{type:2},start:{id:t.start},end:{id:t.end},...t.text?{label:{text:t.text,fontSize:16}}:{}}})(t))}),{elements:e}}}),z=t=>{const e=(t=P(t)).replace(/#(\d+);/g,"&#$1;").replace(/#([a-z]+);/g,"&$1;"),r=document.createElement("textarea");return r.innerHTML=e,r.value},N=t=>{const e=t.getAttribute("transform"),r=e?.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/);let i=0,o=0;return r&&(i=Number(r[1]),o=Number(r[2])),{transformX:i,transformY:o}},P=function(t){return t.replace(/fl°°/g,"#").replace(/fl°/g,"&").replace(/¶ß/g,";")},W=(t,e=.5)=>{const r=[];return t.forEach(t=>{const i=r[r.length-1];if(!i)return void r.push(t);Math.hypot(t[0]-i[0],t[1]-i[1])<=e||r.push(t)}),r},j=t=>{const e=t.getAttribute("d");if(!e)return null;const r=Array.from(e.matchAll(/-?\d*\.?\d+(?:e[-+]?\d+)?/gi),t=>Number(t[0]));return r.length<4?null:{startX:r[0],startY:r[1],endX:r[r.length-2],endY:r[r.length-1]}},H=t=>{const e=t.getAttribute("data-points");if(!e){const e=j(t);return e?[{x:e.startX,y:e.startY},{x:e.endX,y:e.endY}]:[]}try{const t=atob(e),r=JSON.parse(t);return Array.isArray(r)?r.filter(t=>t&&"number"==typeof t.x&&"number"==typeof t.y&&Number.isFinite(t.x)&&Number.isFinite(t.y)):[]}catch{return[]}},U=(t,e={x:0,y:0},r="LM")=>{if("path"!==t.tagName.toLowerCase())throw new Error(`Invalid input: Expected an HTMLElement of tag "path", got ${t.tagName}`);const i=t.getAttribute("d");if(!i)throw new Error('Path element does not contain a "d" attribute');const o=i.split(new RegExp(`(?=[${r}])`)),n=o[0].substring(1).split(",").map(t=>parseFloat(t)),s=o[o.length-1].substring(1).split(",").map(t=>parseFloat(t)),a=o.map(t=>{const e=t[0],r=t.substring(1).split(",").map(t=>parseFloat(t));return"C"===e?{x:r[4],y:r[5],command:e}:{x:r[0],y:r[1],command:e}}).filter((t,e,r)=>{if(0===e||e===r.length-1)return!0;if(t.x===r[e-1].x&&t.y===r[e-1].y)return!1;if(e===r.length-2&&"C"===t.command)return!1;if(e===r.length-2&&(r[e-1].x===t.x||r[e-1].y===t.y)){const e=r[r.length-1];return Math.hypot(e.x-t.x,e.y-t.y)>20}return t.x!==r[e-1].x||t.y!==r[e-1].y}).map(t=>({x:t.x+e.x,y:t.y+e.y}));return{startX:n[0]+e.x,startY:n[1]+e.y,endX:s[0]+e.x,endY:s[1]+e.y,reflectionPoints:a}},Y=(t,e={})=>(t=>({...t,elements:t.elements.map(t=>{if(!("points"in t)||!Array.isArray(t.points))return t;const e=t.points;if(e.length<2)return t;const r=W(e);return r.length===e.length?t:{...t,points:r}})}))((()=>{switch(t.type){case"graphImage":return y.convert(t,e);case"flowchart":return g.convert(t,e);case"sequence":return v.convert(t,e);case"class":return B.convert(t,e);case"erd":return _.convert(t,e);case"state":return K.convert(t,e);default:throw new Error(`graphToExcalidraw: unknown graph type "${t.type}, only flowcharts are supported!"`)}})());var X=r(5637),G=(r(5691),r(841)),V=r(10561),Z=(r(24980),r(27838),r(96865),r(48159),r(44505),r(69793),r(43287)),Q=r(12505),J=r(86535),tt=r(31293),et=r(86827),rt=r(84146),it=r(51444),ot="comm",nt="rule",st="decl",at="@keyframes",lt="@layer",ht=Math.abs,ct=String.fromCharCode;Object.assign;function dt(t){return t.trim()}function ut(t,e,r){return t.replace(e,r)}function pt(t,e){return 0|t.charCodeAt(e)}function gt(t,e,r){return t.slice(e,r)}function ft(t){return t.length}function yt(t){return t.length}function mt(t,e){return e.push(t),t}function xt(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function Ct(t,e,r,i){switch(t.type){case lt:if(t.children.length)break;case"@import":case"@namespace":case st:return t.return=t.return||t.value;case ot:return"";case at:return t.return=t.value+"{"+xt(t.children,i)+"}";case nt:if(!ft(t.value=t.props.join(",")))return""}return ft(r=xt(t.children,i))?t.return=t.value+"{"+r+"}":""}var bt=1,kt=1,wt=0,St=0,Tt=0,vt="";function Bt(t,e,r,i,o,n,s,a){return{value:t,root:e,parent:r,type:i,props:o,children:n,line:bt,column:kt,length:s,return:"",siblings:a}}function _t(){return Tt=St>0?pt(vt,--St):0,kt--,10===Tt&&(kt=1,bt--),Tt}function At(){return Tt=St<wt?pt(vt,St++):0,kt++,10===Tt&&(kt=1,bt++),Tt}function Lt(){return pt(vt,St)}function Ft(){return St}function Mt(t,e){return gt(vt,t,e)}function Et(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 $t(t){return bt=kt=1,wt=ft(vt=t),St=0,[]}function Ot(t){return vt="",t}function Dt(t){return dt(Mt(St-1,Rt(91===t?t+2:40===t?t+1:t)))}function It(t){for(;(Tt=Lt())&&Tt<33;)At();return Et(t)>2||Et(Tt)>3?"":" "}function qt(t,e){for(;--e&&At()&&!(Tt<48||Tt>102||Tt>57&&Tt<65||Tt>70&&Tt<97););return Mt(t,Ft()+(e<6&&32==Lt()&&32==At()))}function Rt(t){for(;At();)switch(Tt){case t:return St;case 34:case 39:34!==t&&39!==t&&Rt(Tt);break;case 40:41===t&&Rt(t);break;case 92:At()}return St}function Kt(t,e){for(;At()&&t+Tt!==57&&(t+Tt!==84||47!==Lt()););return"/*"+Mt(e,St-1)+"*"+ct(47===t?t:At())}function zt(t){for(;!Et(Lt());)At();return Mt(t,St)}function Nt(t){return Ot(Pt("",null,null,null,[""],t=$t(t),0,[0],t))}function Pt(t,e,r,i,o,n,s,a,l){for(var h=0,c=0,d=s,u=0,p=0,g=0,f=1,y=1,m=1,x=0,C=0,b="",k=o,w=n,S=i,T=b;y;)switch(g=C,C=At()){case 40:108!=g&&58==pt(T,d-1)?(x++,T+="("):T+=Dt(C);break;case 41:x--,T+=")";break;case 34:case 39:case 91:T+=Dt(C);break;case 9:case 10:case 13:case 32:if(x>0){T+=ct(C);break}T+=It(g);break;case 92:T+=qt(Ft()-1,7);continue;case 47:switch(Lt()){case 42:case 47:mt(jt(Kt(At(),Ft()),e,r,l),l),5!=Et(g||1)&&5!=Et(Lt()||1)||!ft(T)||" "===gt(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*f:a[h++]=ft(T)*m;case 125*f:case 59:case 0:if(x>0&&C){T+=ct(C);break}switch(C){case 0:case 125:y=0;case 59+c:-1==m&&(T=ut(T,/\f/g,"")),p>0&&(ft(T)-d||0===f)&&mt(p>32?Ht(T+";",i,r,d-1,l):Ht(ut(T," ","")+";",i,r,d-2,l),l);break;case 59:T+=";";default:if(mt(S=Wt(T,e,r,h,c,o,a,b,k=[],w=[],d,n),n),123===C)if(0===c)Pt(T,e,S,S,k,n,d,a,w);else{switch(u){case 99:if(110===pt(T,3))break;case 108:if(97===pt(T,2))break;default:c=0;case 100:case 109:case 115:}c?Pt(t,S,S,i&&mt(Wt(t,S,S,0,0,o,a,b,o,k=[],d,w),w),o,w,d,a,i?k:w):Pt(T,S,S,S,[""],w,0,a,w)}}h=c=p=0,f=m=1,b=T="",d=s;break;case 58:d=1+ft(T),p=g;default:if(f<1)if(123==C)--f;else if(125==C&&0==f++&&125==_t())continue;switch(T+=ct(C),C*f){case 38:m=c>0?1:(T+="\f",-1);break;case 44:if(x>0)break;a[h++]=(ft(T)-1)*m,m=1;break;case 64:45===Lt()&&(T+=Dt(At())),u=Lt(),c=d=ft(b=T+=zt(Ft())),C++;break;case 45:45===g&&2==ft(T)&&(f=0)}}return n}function Wt(t,e,r,i,o,n,s,a,l,h,c,d){for(var u=o-1,p=0===o?n:[""],g=yt(p),f=0,y=0,m=0;f<i;++f)for(var x=0,C=gt(t,u+1,u=ht(y=s[f])),b=t;x<g;++x)(b=dt(y>0?p[x]+" "+C:ut(C,/&\f/g,p[x])))&&(l[m++]=b);return Bt(t,e,r,0===o?nt:a,l,h,c,d)}function jt(t,e,r,i){return Bt(t,e,r,ot,ct(Tt),gt(t,2,-2),0,i)}function Ht(t,e,r,i,o){return Bt(t,e,r,st,gt(t,0,i),gt(t,i+1,-1),i,o)}var Ut=r(99418),Yt=r(32178),Xt=r(30622),Gt=r(14608);var Vt=r(19663);function Zt(t){if(null==t)return!0;if((0,Xt.X)(t))return!!("function"==typeof t.splice||"string"==typeof t||(0,Yt.P)(t)||(0,Vt.i)(t)||(0,Gt.N)(t))&&0===t.length;if("object"==typeof t||"function"==typeof t){if(t instanceof Map||t instanceof Set)return 0===t.size;const e=Object.keys(t);return function(t){const e=t?.constructor;return t===("function"==typeof e?e.prototype:Object.prototype)}(t)?0===e.filter(t=>"constructor"!==t).length:0===e.length}return!0}var Qt={id:"c4",detector:(0,et.K)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(7834).then(()=>r(87834));return{id:"c4",diagram:t}},"loader")},Jt="flowchart",te={id:Jt,detector:(0,et.K)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(7038),r.e(6089)]).then(()=>r(96089));return{id:Jt,diagram:t}},"loader")},ee="flowchart-v2",re={id:ee,detector:(0,et.K)((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,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(7038),r.e(6089)]).then(()=>r(96089));return{id:ee,diagram:t}},"loader")},ie="swimlane",oe={id:ie,detector:(0,et.K)(t=>/^\s*swimlane-beta\b/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(7038),r.e(7567)]).then(()=>r(67567));return{id:ie,diagram:t}},"loader")},ne={id:"er",detector:(0,et.K)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(4560).then(()=>r(94560));return{id:"er",diagram:t}},"loader")},se="gitGraph",ae={id:se,detector:(0,et.K)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6789)]).then(()=>r(46789));return{id:se,diagram:t}},"loader")},le="gantt",he={id:le,detector:(0,et.K)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(2822).then(()=>r(92822));return{id:le,diagram:t}},"loader")},ce="info",de={id:ce,detector:(0,et.K)(t=>/^\s*info/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(3566)]).then(()=>r(23566));return{id:ce,diagram:t}},"loader")},ue={id:"pie",detector:(0,et.K)(t=>/^\s*pie/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6806)]).then(()=>r(76806));return{id:"pie",diagram:t}},"loader")},pe="quadrantChart",ge={id:pe,detector:(0,et.K)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(7486).then(()=>r(87486));return{id:pe,diagram:t}},"loader")},fe="xychart",ye={id:fe,detector:(0,et.K)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(4061).then(()=>r(34061));return{id:fe,diagram:t}},"loader")},me="requirement",xe={id:me,detector:(0,et.K)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(3283).then(()=>r(13283));return{id:me,diagram:t}},"loader")},Ce="sequence",be={id:Ce,detector:(0,et.K)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(4985).then(()=>r(24985));return{id:Ce,diagram:t}},"loader")},ke="class",we={id:ke,detector:(0,et.K)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4469),r.e(4772)]).then(()=>r(14772));return{id:ke,diagram:t}},"loader")},Se="classDiagram",Te={id:Se,detector:(0,et.K)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4469),r.e(1388)]).then(()=>r(1388));return{id:Se,diagram:t}},"loader")},ve="state",Be={id:ve,detector:(0,et.K)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4193),r.e(3230),r.e(4220)]).then(()=>r(94220));return{id:ve,diagram:t}},"loader")},_e="stateDiagram",Ae={id:_e,detector:(0,et.K)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(3230),r.e(5617)]).then(()=>r(65617));return{id:_e,diagram:t}},"loader")},Le="journey",Fe={id:Le,detector:(0,et.K)(t=>/^\s*journey/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(1671).then(()=>r(31671));return{id:Le,diagram:t}},"loader")},Me={draw:(0,et.K)((t,e,r)=>{tt.R.debug("rendering svg for syntax error\n");const i=(0,X.D)(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,J.a$)(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},Ee=Me,$e={db:{},renderer:Me,parser:{parse:(0,et.K)(()=>{},"parse")}},Oe="flowchart-elk",De={id:Oe,detector:(0,et.K)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(7038),r.e(6089)]).then(()=>r(96089));return{id:Oe,diagram:t}},"loader")},Ie="timeline",qe={id:Ie,detector:(0,et.K)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(1045).then(()=>r(91045));return{id:Ie,diagram:t}},"loader")},Re="mindmap",Ke={id:Re,detector:(0,et.K)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(1128).then(()=>r(11128));return{id:Re,diagram:t}},"loader")},ze="kanban",Ne={id:ze,detector:(0,et.K)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(6284).then(()=>r(16284));return{id:ze,diagram:t}},"loader")},Pe="sankey",We={id:Pe,detector:(0,et.K)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(6800).then(()=>r(36800));return{id:Pe,diagram:t}},"loader")},je="packet",He={id:je,detector:(0,et.K)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(3509)]).then(()=>r(83509));return{id:je,diagram:t}},"loader")},Ue="radar",Ye={id:Ue,detector:(0,et.K)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6571)]).then(()=>r(76571));return{id:Ue,diagram:t}},"loader")},Xe="block",Ge={id:Xe,detector:(0,et.K)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(8727).then(()=>r(38727));return{id:Xe,diagram:t}},"loader")},Ve="treeView",Ze={id:Ve,detector:(0,et.K)(t=>/^\s*treeView-beta/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(583)]).then(()=>r(30583));return{id:Ve,diagram:t}},"loader")},Qe="architecture",Je={id:Qe,detector:(0,et.K)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(165),r.e(6344)]).then(()=>r(6344));return{id:Qe,diagram:t}},"loader")},tr="eventmodeling",er={id:tr,detector:(0,et.K)(t=>/^\s*eventmodeling/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(3510)]).then(()=>r(93510));return{id:tr,diagram:t}},"loader")},rr="ishikawa",ir={id:rr,detector:(0,et.K)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(6803).then(()=>r(66803));return{id:rr,diagram:t}},"loader")},or="venn",nr={id:or,detector:(0,et.K)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await r.e(3990).then(()=>r(33990));return{id:or,diagram:t}},"loader")},sr="treemap",ar={id:sr,detector:(0,et.K)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(8677)]).then(()=>r(88677));return{id:sr,diagram:t}},"loader")},lr="wardley",hr={id:lr,detector:(0,et.K)(t=>/^\s*wardley-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(7483)]).then(()=>r(27483));return{id:lr,diagram:t}},"loader")},cr="cynefin",dr={id:cr,detector:(0,et.K)(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(629)]).then(()=>r(53010));return{id:cr,diagram:t}},"loader")},ur="railroad",pr={id:ur,detector:(0,et.K)(t=>/^\s*railroad-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6164),r.e(200)]).then(()=>r(60200));return{id:ur,diagram:t}},"loader")},gr="railroadEbnf",fr={id:gr,detector:(0,et.K)(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6164),r.e(1738)]).then(()=>r(51738));return{id:gr,diagram:t}},"loader")},yr="railroadAbnf",mr={id:yr,detector:(0,et.K)(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6164),r.e(3608)]).then(()=>r(13608));return{id:yr,diagram:t}},"loader")},xr="railroadPeg",Cr={id:xr,detector:(0,et.K)(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),loader:(0,et.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6164),r.e(2122)]).then(()=>r(2122));return{id:xr,diagram:t}},"loader")},br=!1,kr=(0,et.K)(()=>{br||(br=!0,(0,J.Js)("error",$e,t=>"error"===t.toLowerCase().trim()),(0,J.Js)("---",{db:{clear:(0,et.K)(()=>{},"clear")},styles:{},renderer:{draw:(0,et.K)(()=>{},"draw")},parser:{parse:(0,et.K)(()=>{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,et.K)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,J.Xd)(De,Ke,Je),(0,J.Xd)(Qt,Ne,Te,we,ne,he,de,ue,xe,be,oe,re,te,qe,ae,Ae,Be,Fe,ge,We,He,ye,Ge,er,Ze,Ye,ir,ar,pr,fr,mr,Cr,nr,hr,dr))},"addDiagrams"),wr=(0,et.K)(async()=>{tt.R.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(J.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,J.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,J.Js)(i,t,e)}catch(e){throw tt.R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete J.mW[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){tt.R.error(`Failed to load ${t.length} external diagrams`);for(const e of t)tt.R.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function Sr(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function Tr(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,et.K)(Sr,"setA11yDiagramInfo"),(0,et.K)(Tr,"addSVGa11yTitleDescription");var vr=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{(0,et.K)(this,"Diagram")}static async fromText(e,r={}){const i=(0,J.zj)(),o=(0,J.Ch)(e,i);e=(0,Q.C4)(e)+"\n";try{(0,J.Gs)(o)}catch{const t=(0,J.J$)(o);if(!t)throw new J.C0(`Diagram ${o} not found.`);const{id:e,diagram:r}=await t();(0,J.Js)(e,r)}const{db:n,parser:s,renderer:a,init:l}=(0,J.Gs)(o);return s.parser&&(s.parser.yy=n),n.clear?.(),l?.(i),r.title&&n.setDiagramTitle?.(r.title),await s.parse(e),new t(o,e,n,s,a)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},Br=[],_r=(0,et.K)(()=>{Br.forEach(t=>{t()}),Br=[]},"attachFunctions"),Ar=(0,et.K)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Lr(t){const e=t.match(J.EJ);if(!e)return{text:t,metadata:{}};const r=e[1],i=r?e[2].split("\n").map(t=>t.startsWith(r)?t.slice(r.length):t).join("\n"):e[2];let o=(0,G.H)(i,{schema:G.r})??{};o="object"!=typeof o||Array.isArray(o)?{}:o;const n={};return o.displayMode&&(n.displayMode=o.displayMode.toString()),o.title&&(n.title=o.title.toString()),o.config&&(n.config=o.config),{text:t.slice(e[0].length),metadata:n}}(0,et.K)(Lr,"extractFrontMatter");var Fr=(0,et.K)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Mr=(0,et.K)(t=>{const{text:e,metadata:r}=Lr(t),{displayMode:i,title:o,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},"processFrontmatter"),Er=(0,et.K)(t=>{const e=Q._K.detectInit(t)??{},r=Q._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,Q.vU)(t),directive:e}},"processDirectives");function $r(t){const e=Fr(t),r=Mr(e),i=Er(r.text),o=(0,Q.$t)(r.config,i.directive);return{code:t=Ar(i.text),title:r.title,config:o}}function Or(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,et.K)($r,"preprocessDiagram"),(0,et.K)(Or,"toBase64");var Dr=["foreignobject"],Ir=["dominant-baseline"];function qr(t){const e=$r(t);return(0,J.cL)(),(0,J.xA)(e.config??{}),e}async function Rr(t,e){kr();try{const{code:e,config:r}=qr(t);return{diagramType:(await Vr(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,et.K)(qr,"processAndSetConfigs"),(0,et.K)(Rr,"parse");var Kr=(0,et.K)((t,e,r=[])=>`.${t} ${e} ${(0,J.Df)(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),zr=(0,et.K)((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const i=(0,J.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{Zt(t.styles)||i.forEach(e=>{r.insertRule(Kr(t.id,e,t.styles),r.cssRules.length)}),Zt(t.textStyles)||r.insertRule(Kr(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=(0,J.KG)(e)+"\n"}else i+=`${t.themeCSS}\n`;return i+(0,J.KG)(r)},"createCssStyles"),Nr=(0,et.K)((t,e)=>{return xt(Nt(`${t}{${e}}`),(i=yt(r=[(0,et.K)(function(e,r,i,o){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===at)return;e.props=e.props.map(r=>r===t&&Array.isArray(e.children)&&e.children.every(t=>"decl"===t.type&&new Set(["font-family","font-size","fill"]).has(t.props))?r:!r.startsWith(`${t} `)&&!r.startsWith(`${t}>`)||r.startsWith(`${t} ||`)?`${t} ${r}`:r)}else e.type.startsWith("@")&&(["@media","@supports",lt,"@scope","@container","@starting-style",at].includes(e.type)||(tt.R.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=ot))},"addNamespace"),Ct]),function(t,e,o,n){for(var s="",a=0;a<i;a++)s+=r[a](t,e,o,n)||"";return s}));var r,i},"compileCSS"),Pr=(0,et.K)((t,e,r,i)=>{const o=zr(t,r),n=(0,J.tM)(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return Nr(i,n)},"createUserStyles"),Wr=(0,et.K)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,Q.Sm)(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),jr=(0,et.K)((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,${Or(`<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"),Hr=(0,et.K)((t,e,r,i,o)=>{const n=t.append("div");n.attr("id",r),i&&n.attr("style",i);const s=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&s.attr("xmlns:xlink",o),s.append("g"),t},"appendDivSvgG");function Ur(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,et.K)(Ur,"sandboxedIframe");var Yr=(0,et.K)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),Xr=(0,et.K)(async function(t,e,r){kr();const i=qr(e);e=i.code;const o=(0,J.zj)();tt.R.debug(o),e.length>(o?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const n=`#${t}`,s="i"+t,a="#"+s,l="d"+t,h="#"+l,c=(0,et.K)(()=>{const t=u?a:h,e=(0,it.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let d=(0,it.Ltv)(document.body);const u="sandbox"===o.securityLevel,p="loose"===o.securityLevel,g=o.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),u){const t=Ur((0,it.Ltv)(r),s);d=(0,it.Ltv)(t.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=(0,it.Ltv)(r);Hr(d,t,l,`font-family: ${g}`,"http://www.w3.org/1999/xlink")}else{if(Yr(document,t,l,s),u){const t=Ur((0,it.Ltv)(document.body),s);d=(0,it.Ltv)(t.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=(0,it.Ltv)("body");Hr(d,t,l)}let f,y;try{f=await vr.fromText(e,{title:i.title})}catch(t){if(o.suppressErrorRendering)throw c(),t;f=await vr.fromText("error"),y=t}const m=d.select(h).node(),x=f.type,C=m.firstChild,b=C.firstChild,k=f.renderer.getClasses?.(e,f),w=Pr(o,x,k,n),S=document.createElement("style");S.innerHTML=w,C.insertBefore(S,b);try{await f.renderer.draw(e,t,"11.17.2",f)}catch(r){throw o.suppressErrorRendering?c():Ee.draw(e,t,"11.17.2"),r}const T=d.select(`${h} svg`),v=f.db.getAccTitle?.(),B=f.db.getAccDescription?.();Zr(x,T,v,B);const _=(0,et.K)(()=>{d.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let e=d.select(h).node().innerHTML;if(tt.R.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),e=Wr(e,u,(0,J._3)(o.arrowMarkerAbsolute)),u){const t=d.select(h+" svg").node();e=jr(e,t)}else p||(e=Ut.A.sanitize(e,{ADD_TAGS:Dr,ADD_ATTR:Ir,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return _r(),e},"serializeSvg")();if(y)throw y;return c(),{diagramType:x,svg:_,bindFunctions:f.db.bindFunctions}},"render");function Gr(t={}){const e=(0,J.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,J.wZ)(e),e?.theme&&e.theme in J.H$?e.themeVariables=J.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=J.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,J.UU)(e):(0,J.Q2)();(0,tt.H)(r.logLevel),kr()}(0,et.K)(Gr,"initialize");var Vr=(0,et.K)((t,e={})=>{const{code:r}=$r(t);return vr.fromText(r,e)},"getDiagramFromText");function Zr(t,e,r,i){Sr(e,t),Tr(e,r,i,e.attr("id"))}(0,et.K)(Zr,"addA11yInfo");var Qr=Object.freeze({render:Xr,parse:Rr,getDiagramFromText:Vr,initialize:Gr,getConfig:J.zj,setConfig:J.Nk,getSiteConfig:J.Q2,updateSiteConfig:J.B6,reset:(0,et.K)(()=>{(0,J.cL)()},"reset"),globalReset:(0,et.K)(()=>{(0,J.cL)(J.sb)},"globalReset"),defaultConfig:J.sb});(0,tt.H)((0,J.zj)().logLevel),(0,J.cL)((0,J.zj)());var Jr=(0,et.K)((t,e,r)=>{tt.R.warn(t),(0,Q.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),ti=(0,et.K)(async function(t={querySelector:".mermaid"}){try{await ei(t)}catch(e){if((0,Q.dq)(e)&&tt.R.error(e.str),pi.parseError&&pi.parseError(e),!t.suppressErrors)throw tt.R.error("Use the suppressErrors option to suppress these errors"),e}},"run"),ei=(0,et.K)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Qr.getConfig();let o;if(tt.R.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}tt.R.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(tt.R.debug("Start On Load: "+i?.startOnLoad),Qr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const n=new Q._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const a=[];for(const e of Array.from(o)){if(tt.R.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${n.next()}`;s=e.innerHTML,s=(0,rt.T)(Q._K.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=Q._K.detectInit(s);i&&tt.R.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:o}=await di(r,s,e);e.innerHTML=i,t&&await t(r),o&&o(e)}catch(t){Jr(t,a,pi.parseError)}}if(a.length>0)throw a[0]},"runThrowsErrors"),ri=(0,et.K)(function(t){Qr.initialize(t)},"initialize"),ii=(0,et.K)(async function(t,e,r){tt.R.warn("mermaid.init is deprecated. Please use run instead."),t&&ri(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await ti(i)},"init"),oi=(0,et.K)(async(t,{lazyLoad:e=!0}={})=>{kr(),(0,J.Xd)(...t),!1===e&&await wr()},"registerExternalDiagrams"),ni=(0,et.K)(function(){if(pi.startOnLoad){const{startOnLoad:t}=Qr.getConfig();t&&pi.run().catch(t=>tt.R.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",ni,!1);var si=(0,et.K)(function(t){pi.parseError=t},"setParseErrorHandler"),ai=[],li=!1,hi=(0,et.K)(async()=>{if(!li){for(li=!0;ai.length>0;){const t=ai.shift();if(t)try{await t()}catch(t){tt.R.error("Error executing queue",t)}}li=!1}},"executeQueue"),ci=(0,et.K)(async(t,e)=>new Promise((r,i)=>{const o=(0,et.K)(()=>new Promise((o,n)=>{Qr.parse(t,e).then(t=>{o(t),r(t)},t=>{tt.R.error("Error parsing",t),pi.parseError?.(t),n(t),i(t)})}),"performCall");ai.push(o),hi().catch(i)}),"parse"),di=(0,et.K)((t,e,r)=>new Promise((i,o)=>{const n=(0,et.K)(()=>new Promise((n,s)=>{Qr.render(t,e,r).then(t=>{n(t),i(t)},t=>{tt.R.error("Error parsing",t),pi.parseError?.(t),s(t),o(t)})}),"performCall");ai.push(n),hi().catch(o)}),"render"),ui=(0,et.K)(()=>Object.keys(J.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),pi={startOnLoad:!0,mermaidAPI:Qr,parse:ci,render:di,init:ii,run:ti,registerExternalDiagrams:oi,registerLayoutLoaders:V.sO,initialize:ri,parseError:void 0,contentLoaded:ni,setParseErrorHandler:si,detectType:J.Ch,registerIconPacks:Z.pC,getRegisteredDiagramsMetadata:ui},gi=pi;const fi={rect:"rectangle",circle:"ellipse"},yi={startOnLoad:!1,flowchart:{curve:"linear"},themeVariables:{fontSize:"20px"},maxEdges:500,maxTextSize:5e4},mi=t=>t.replace(/\s*!important\s*$/i,"").trim(),xi=(t,e)=>{let r=e;for(;r<t.length&&/\s/.test(t[r]);)r+=1;const i=r;for(;r<t.length&&/[a-z-]/i.test(t[r]);)r+=1;if(r===i)return!1;for(;r<t.length&&/\s/.test(t[r]);)r+=1;return":"===t[r]},Ci=t=>{const e=[];let r=0;for(;r<t.length;){for(;r<t.length&&/[\s;,]/.test(t[r]);)r+=1;if(r>=t.length)break;const i=r;for(;r<t.length&&":"!==t[r]&&";"!==t[r]&&","!==t[r];)r+=1;if(r>=t.length||":"!==t[r])break;const o=t.substring(i,r).trim().toLowerCase();r+=1;const n=r;let s=0,a=null;for(;r<t.length;){const e=t[r];if(a)e===a&&"\\"!==t[r-1]&&(a=null),r+=1;else if('"'!==e&&"'"!==e)if("("!==e)if(")"!==e){if(0===s){if(";"===e||","===e)break;if(/\s/.test(e)&&xi(t,r))break}r+=1}else s=Math.max(0,s-1),r+=1;else s+=1,r+=1;else a=e,r+=1}const l=mi(t.substring(n,r));o&&l&&e.push({property:o,value:l}),r<t.length&&(";"===t[r]||","===t[r])&&(r+=1)}return e},bi=t=>{const e=mi(t);if(!e)return!1;if("undefined"!=typeof CSS&&"function"==typeof CSS.supports)return CSS.supports("color",e);if("undefined"!=typeof document){const t=document.createElement("div");return t.style.color="",t.style.color=e,""!==t.style.color}return!1},ki=(t,e)=>{const r=t.getAttribute("style");return r&&Ci(r).find(t=>t.property===e)?.value||""},wi=(...t)=>{for(const e of t){const t=mi(e||"");if(bi(t))return t}},Si=(t,e)=>{const r=t.querySelector("text, foreignObject, div, span, p")||t,i=wi(r.getAttribute?.("fill"),ki(r,"fill"),r.style?.fill);if(i)return i;const o=wi(r.getAttribute?.("color"),ki(r,"color"),r.style?.color);if(o)return o;const n=wi(e);return n||void 0},Ti=(t,e,r)=>{switch(e){case n.FILL:case n.STROKE:bi(r)&&(t[e]=r);break;case n.STROKE_WIDTH:case n.STROKE_DASHARRAY:t[e]=r}},vi=(t,e,r)=>{e===o.COLOR&&bi(r)&&(t[o.COLOR]=r)},Bi=(t,e,r)=>{t&&Ci(t).forEach(({property:t,value:i})=>{Ti(e,t,i),vi(r,t,i)})},_i=(t,e)=>{t&&Ci(t).forEach(({property:t,value:r})=>{"fill"===t&&bi(r)?e[o.COLOR]=r:vi(e,t,r)})},Ai=(t,e)=>{if(!t)return;[[n.FILL,t.getAttribute("fill")],[n.STROKE,t.getAttribute("stroke")],[n.STROKE_WIDTH,t.getAttribute("stroke-width")],[n.STROKE_DASHARRAY,t.getAttribute("stroke-dasharray")]].forEach(([t,r])=>{const i=mi(r||"");i&&Ti(e,t,i)})},Li=(t,e)=>{if(!t)return;const r=t.getAttribute("fill")||t.getAttribute("color"),i=mi(r||"");bi(i)&&(e[o.COLOR]=i)},Fi=(t,e,r,i)=>{if(!(e instanceof Map))return;const o=e.get(t);o&&(o.styles?.forEach(t=>{Ci(t).forEach(({property:t,value:e})=>{Ti(r,t,e),vi(i,t,e)})}),o.textStyles?.forEach(t=>{Ci(t).forEach(({property:t,value:e})=>{vi(i,t,e)})}))},Mi=(t,e,r)=>{const i=e.querySelector(`[id*="${t.domId}"]`);if(!i)return;let o;"a"===i.parentElement?.tagName.toLowerCase()&&(o=i.parentElement.getAttribute("xlink:href"));const n=Ei(o?i.parentElement:i,e),s=i.getBBox(),a={width:s.width,height:s.height},l={},h={};t.classes&&r instanceof Map&&(Array.isArray(t.classes)?t.classes:[t.classes]).forEach(t=>{Fi(t,r,l,h)}),t.styles?.forEach(t=>{Bi(t,l,h)});const c=i.querySelector(".label-container");Bi(c?.getAttribute("style"),l,h),Ai(c,l);return Array.from(i.querySelectorAll(".label, .nodeLabel, .label text, .label tspan, .label span, .label div")).forEach(t=>{_i(t.getAttribute("style"),h),Li(t,h)}),{id:t.id,labelType:t.labelType,text:z(t.text||""),type:t.type,link:o||void 0,...n,...a,containerStyle:l,labelStyle:h}},Ei=(t,e)=>{if(!t)throw new Error("Element not found");let r=t.parentElement?.parentElement;const i=t.childNodes[0];let o={x:0,y:0};if(i){const{transformX:t,transformY:e}=N(i),r=i.getBBox();o={x:Number(i.getAttribute("x"))||t+r.x||0,y:Number(i.getAttribute("y"))||e+r.y||0}}const{transformX:n,transformY:s}=N(t),a={x:n+o.x,y:s+o.y};for(;r&&r.id!==e.id;){if("root"===r.classList.value&&r.hasAttribute("transform")){const{transformX:t,transformY:e}=N(r);a.x+=t,a.y+=e}r=r.parentElement}return a},$i=(t,e)=>{const r=t.getVertices(),i=t.getEdges(),o=t.getSubGraphs(),n=t.getClasses(),s={},a=n instanceof Map?n:{};r instanceof Map?r.forEach((t,r)=>{s[r]=Mi(t,e,a)}):"object"==typeof r&&null!==r&&Object.entries(r).forEach(([t,r])=>{s[t]=Mi(r,e,a)});const l=new Map,h=(Array.isArray(i)?i:[]).map(t=>{if(!e.querySelector(`[id*="${t.id}"]`))return null;const r=`${t.start}-${t.end}`,i=l.get(r)||0;return l.set(r,i+1),((t,e,r)=>{const i=r.querySelector(`[id*="${t.id}"]`);if(!i)throw new Error("Edge element not found");const o=Ei(i,r),n=U(i,o);return t.length=void 0,{...t,...n,text:z(t.text)}})(t,0,e)}).filter(t=>null!==t&&t.reflectionPoints.length>1),c=(Array.isArray(o)?o:[]).map(t=>((t,e,r)=>{const i=t.nodes.map(t=>t.startsWith("flowchart-")?t.split("-")[1]:t),o=e.querySelector(`[id='${t.id}']`);if(!o)throw new Error("SubGraph element not found");const n=Ei(o,e),s=o.getBBox(),a={width:s.width,height:s.height},l={},h={},c=o.querySelector(":scope > rect, :scope > path, :scope > polygon, :scope > ellipse")||o.querySelector(".cluster > rect, .cluster > path, .cluster > polygon, .cluster > ellipse")||o.querySelector("rect, path, polygon, ellipse");Bi(o.getAttribute("style"),l,h),Bi(c?.getAttribute("style"),l,h),Ai(c,l);const d=o.querySelector(".cluster-label text, .cluster-label tspan")||o.querySelector("text");return _i(d?.getAttribute("style"),h),Li(d,h),Fi(t.id,r,l,h),t.classes?.forEach(t=>{Fi(t,r,l,h)}),{id:t.id,nodeIds:i,text:z(t.title),labelType:"text",...n,...a,containerStyle:l,labelStyle:h}})(t,e,a));return{type:"flowchart",subGraphs:c,vertices:s,edges:h}},Oi=(t,e,r,i,o)=>{const n={type:"arrow"};return n.startX=t,n.startY=e,n.endX=r,n.endY=i,Object.assign(n,{...o}),n},Di=(t,e,r,i)=>({type:"text",x:t,y:e,text:r,width:i?.width||20,height:i?.height||20,fontSize:i?.fontSize||20,id:i?.id,color:i?.color,groupId:i?.groupId,metadata:i?.metadata}),Ii=(t,e,r)=>{const i={},o=Number(t.getAttribute("x")),n=Number(t.getAttribute("y"));i.type="text",i.text=z(e),r?.id&&(i.id=r.id),r?.groupId&&(i.groupId=r.groupId);const s=t.getBBox();i.width=s.width,i.height=s.height,i.x=o-s.width/2,i.y=n;const a=parseInt(getComputedStyle(t).fontSize);return i.fontSize=a,i.color=Si(t),i},qi=(t,e,r={})=>{const i={};i.type=e;const{label:o,subtype:n,id:s,groupId:a}=r;i.id=s,a&&(i.groupId=a),o&&(i.label={text:z(o.text),fontSize:16,textAlign:o?.textAlign,verticalAlign:o?.verticalAlign});const l=t.getBBox();switch(i.x=l.x,i.y=l.y,i.width=l.width,i.height=l.height,i.subtype=n,n){case"highlight":const e=t.getAttribute("fill");e&&(i.bgColor=mi(e));break;case"note":i.strokeStyle="dashed"}return i},Ri=(t,e,r,i,o,n)=>{const s={};s.startX=e,s.startY=r,s.endX=i,n?.groupId&&(s.groupId=n.groupId),n?.id&&(s.id=n.id),s.endY=o;const a=t.getAttribute("stroke");return s.strokeColor=a?mi(a):null,s.strokeWidth=Number(t.getAttribute("stroke-width")),s.type="line",s},Ki={0:"SOLID",1:"DOTTED",3:"SOLID_CROSS",4:"DOTTED_CROSS",5:"SOLID_OPEN",6:"DOTTED_OPEN",24:"SOLID_POINT",25:"DOTTED_POINT"},zi=0,Ni=1,Pi=2,Wi=3,ji=4,Hi=5,Ui=6,Yi=24,Xi=25,Gi=27,Vi=t=>{let e;switch(t){case zi:case Wi:case Hi:case Yi:e="solid";break;case Ni:case ji:case Ui:case Xi:e="dotted";break;default:e="solid"}return e},Zi=(t,e,r)=>{if(!t)throw"root node not found";const i=f(),o=Array.from(t.children),n=[];return o.forEach((t,o)=>{const s=`${r?.id}-${o}`;let a;switch(t.tagName){case"line":const r=Number(t.getAttribute("x1")),o=Number(t.getAttribute("y1")),n=Number(t.getAttribute("x2")),l=Number(t.getAttribute("y2"));a=Ri(t,r,o,n,l,{groupId:i,id:s});break;case"text":a=Ii(t,e,{groupId:i,id:s});break;case"circle":a=qi(t,"ellipse",{label:t.textContent?{text:t.textContent}:void 0,groupId:i,id:s});default:a=qi(t,fi[t.tagName],{label:t.textContent?{text:t.textContent}:void 0,groupId:i,id:s})}n.push(a)}),n},Qi=(t,e)=>{const r=e.getAttribute("fill"),i=e.getAttribute("stroke"),o=e.getAttribute("stroke-width"),n=e.getAttribute("stroke-dasharray");r&&"none"!==r&&(t.bgColor=mi(r)),i&&"none"!==i&&(t.strokeColor=mi(i)),o&&(t.strokeWidth=Number(o)),n&&n.trim()&&(t.strokeStyle="dashed")},Ji=(t,e,r)=>{const i=[],o=Array.from(e.querySelectorAll('[class*="messageLine"]')),n=Object.keys(Ki),s=t.filter(t=>n.includes(t.type.toString()));return o.forEach((t,e)=>{const o=s[e],n=Ki[o.type],a=((t,e)=>{const r={};e?.label&&(r.label={text:z(e.label),fontSize:16});const i=t.tagName;if("line"===i)r.startX=Number(t.getAttribute("x1")),r.startY=Number(t.getAttribute("y1")),r.endX=Number(t.getAttribute("x2")),r.endY=Number(t.getAttribute("y2"));else if("path"===i){const e=t.getAttribute("d");if(!e)throw new Error('Path element does not contain a "d" attribute');const i=e.split(/(?=[LC])/),o=i[0].substring(1).split(",").map(t=>parseFloat(t)),n=[];i.forEach(t=>{const e=t.substring(1).trim().split(" ").map(t=>{const[e,r]=t.split(",");return[parseFloat(e)-o[0],parseFloat(r)-o[1]]});n.push(...e)});const s=n[n.length-1];r.startX=o[0],r.startY=o[1],r.endX=s[0],r.endY=s[1],r.points=n}if(e?.label){const t=10;r.startY=r.startY-t,r.endY=r.endY-t}const o=t.getAttribute("stroke"),n=(o&&"none"!==o?o:"")||getComputedStyle(t).stroke||"";return r.strokeColor=n?mi(n):null,r.strokeWidth=Number(t.getAttribute("stroke-width")),r.type="arrow",r.strokeStyle=e?.strokeStyle||"solid",r.startArrowhead=e?.startArrowhead||null,r.endArrowhead=e?.endArrowhead||null,r})(t,{label:o?.message,strokeStyle:Vi(o.type),endArrowhead:"SOLID_OPEN"===n||"DOTTED_OPEN"===n?null:"arrow"}),l=r[o.from],h=r[o.to];l?.topId&&h?.topId&&(a.start={type:l.bindType||"rectangle",id:l.topId},a.end={type:h.bindType||"rectangle",id:h.topId}),((t,e)=>{if(t.nextElementSibling?.classList.contains("sequenceNumber")){const r=t.nextElementSibling?.textContent;if(!r)throw new Error("sequence number not present");const i=30,o=i/2,n=10,s={type:"rectangle",x:e.startX-n,y:e.startY-o,label:{text:r,fontSize:14},bgColor:"#e9ecef",height:i,subtype:"sequence"};Object.assign(e,{sequenceNumber:s})}})(t,a),i.push(a)}),i},to=(t,e)=>{const r=t.db,i=[],o=r.getBoxes().map(t=>({...t,fill:mi(t.fill||"")})),n=(t=>{const e=Array.from(t.querySelectorAll(".rect")).filter(t=>"g"!==t.parentElement?.tagName),r=[];return e.forEach(t=>{const e=qi(t,"rectangle",{label:{text:""},subtype:"highlight"});r.push(e)}),r})(e),s=r.getActors(),{nodes:a,lines:l,actorMap:h}=((t,e)=>{const r=Array.from(e.querySelectorAll(".actor-top")),i=Array.from(e.querySelectorAll(".actor-bottom")),o=[],n=[],s={},a=t instanceof Map?Array.from(t.values()):Object.values(t),l=Array.from(e.querySelectorAll(".actor-line")),h=(t,e)=>{const r=t.name,i=l.find(t=>t.getAttribute("name")===r);if(i)return i;const o="participant"===t.type?e.parentElement?.previousElementSibling:e.previousElementSibling;return o?"line"===o.tagName?o:o.querySelector("line"):null};return a.forEach(t=>{const e=r.find(e=>e.getAttribute("name")===t.name),a=i.find(e=>e.getAttribute("name")===t.name);if(!e||!a)throw"root not found";const l=t.description;if("participant"===t.type){const r=qi(e,"rectangle",{id:`${t.name}-top`,label:{text:l},subtype:"actor"});if(Qi(r,e),!r)throw"Top Node element not found!";o.push([r]);const i=qi(a,"rectangle",{id:`${t.name}-bottom`,label:{text:l},subtype:"actor"});s[t.name]={topId:`${t.name}-top`,bottomId:`${t.name}-bottom`,bindType:"rectangle"},Qi(i,a),o.push([i]);const c=h(t,e);if("line"!==c?.tagName)throw"Line not found";const d=Number(c.getAttribute("x1"));if(!r.height)throw"Top node element height is null";const u=r.y+r.height,p=i.y,g=Number(c.getAttribute("x2")),f=Ri(c,d,u,g,p);n.push(f)}else if("actor"===t.type){const r=Zi(e,l,{id:`${t.name}-top`});o.push(r);const i=Zi(a,l,{id:`${t.name}-bottom`});o.push(i);const c=h(t,e);if("line"!==c?.tagName)throw"Line not found";const d=Number(c.getAttribute("x1")),u=Number(c.getAttribute("y1")),p=Number(c.getAttribute("x2")),g=i.find(t=>"ellipse"===t.type);if(g){const t=g.y,e=Ri(c,d,u,p,t);n.push(e)}const f=r.find(t=>"ellipse"===t.type),y=i.find(t=>"ellipse"===t.type);f?.id&&y?.id&&(s[t.name]={topId:f.id,bottomId:y.id,bindType:"ellipse"})}}),{nodes:o,lines:n,actorMap:s}})(s,e),c=r.getMessages(),d=Ji(c,e,h),u=((t,e)=>{const r=Array.from(e.querySelectorAll(".note")).map(t=>t.parentElement),i=t.filter(t=>t.type===Pi),o=[];return r.forEach((t,e)=>{if(!t)return;const r=t.firstChild,n=i[e].message,s=qi(r,"rectangle",{label:{text:n},subtype:"note"}),a=r.getAttribute("fill"),l=r.getAttribute("stroke"),h=r.getAttribute("stroke-width"),c=r.getAttribute("stroke-dasharray");a&&"none"!==a&&(s.bgColor=mi(a)),l&&"none"!==l&&(s.strokeColor=mi(l)),h&&(s.strokeWidth=Number(h)),c&&c.trim()&&(s.strokeStyle="dashed"),o.push(s)}),o})(c,e),p=(t=>{const e=Array.from(t.querySelectorAll("[class*=activation]")),r=[];return e.forEach(t=>{const e=qi(t,"rectangle",{label:{text:""},subtype:"activation"});(()=>{const r=t.getAttribute("fill"),i=t.getAttribute("stroke"),o=t.getAttribute("stroke-width"),n=t.getAttribute("stroke-dasharray");r&&"none"!==r&&(e.bgColor=mi(r)),i&&"none"!==i&&(e.strokeColor=mi(i)),o&&(e.strokeWidth=Number(o)),n&&n.trim()&&(e.strokeStyle="dashed")})(),r.push(e)}),r})(e),g=((t,e)=>{const r=Array.from(e.querySelectorAll(".loopLine")),i=[],o=[],n=[];r.forEach(t=>{const e=Number(t.getAttribute("x1")),r=Number(t.getAttribute("y1")),o=Number(t.getAttribute("x2")),n=Number(t.getAttribute("y2")),s=Ri(t,e,r,o,n);s.strokeStyle="dotted",s.strokeColor="#adb5bd",s.strokeWidth=2,i.push(s)});const s=Array.from(e.querySelectorAll(".loopText")),a=t.filter(t=>t.type===Gi).map(t=>t.message);s.forEach(t=>{const e=t.textContent||"",r=Ii(t,e),i=e.match(/\[(.*?)\]/)?.[1]||"";a.includes(i)&&(r.x+=16),o.push(r)});const l=Array.from(e?.querySelectorAll(".labelBox")),h=Array.from(e?.querySelectorAll(".labelText"));return l.forEach((t,e)=>{const r=h[e]?.textContent||"",i=qi(t,"rectangle",{label:{text:r}});i.strokeColor="#adb5bd",i.bgColor="#e9ecef",i.width=void 0,n.push(i)}),{lines:i,texts:o,nodes:n}})(c,e);return i.push(n),i.push(...a),i.push(u),i.push(p),{type:"sequence",lines:l,arrows:d,nodes:i,loops:g,groups:o}},eo=0,ro=1,io=2,oo=0,no=1,so=t=>{let e;switch(t){case eo:e="diamond_outline";break;case io:e="diamond";break;case ro:e="triangle_outline";break;case"none":e=null;break;default:e="arrow"}return e},ao=(t,e)=>{let r=0,i=0,o=t;for(;o&&o!==e;){const{transformX:t,transformY:e}=N(o);r+=t,i+=e,o=o.parentElement}return{tx:r,ty:i}},lo=new Set(["triangle_outline","diamond","diamond_outline"]),ho=(t,e=.5)=>{if(t.length<=2)return[...t];const r=[t[0]];for(let i=1;i<t.length-1;i++){const o=r[r.length-1],n=t[i],s=t[i+1],a=s.x-o.x,l=s.y-o.y,h=Math.hypot(a,l);if(!h)continue;const c=Math.abs(a*(n.y-o.y)-l*(n.x-o.x))/h,d=((n.x-o.x)*a+(n.y-o.y)*l)/(h*h);c<=e&&d>=-e&&d<=1+e||r.push(n)}return r.push(t[t.length-1]),r},co=t=>{const e=W(H(t).map(t=>[t.x,t.y])).map(([t,e])=>({x:t,y:e})),r=j(t);return r&&e.length>=2&&(e[0]={x:r.startX,y:r.startY},e[e.length-1]={x:r.endX,y:r.endY}),ho(e)},uo=(t,e,r)=>{const i=t.x-e.x,o=t.y-e.y,n=Math.hypot(i,o);return n?{x:t.x+i/n*r,y:t.y+o/n*r}:t},po=t=>{const e=t.points?.map(([e,r])=>({x:t.startX+e,y:t.startY+r})).filter(t=>Number.isFinite(t.x)&&Number.isFinite(t.y));if(!e||e.length<2)return t;const r=[...e],i=!!t.startArrowhead&&lo.has(t.startArrowhead),o=!!t.endArrowhead&&lo.has(t.endArrowhead);if(!i&&!o)return t;if(i&&(r[0]=uo(r[0],r[1],16)),o){const t=r.length-1;r[t]=uo(r[t],r[t-1],16)}return((t,e)=>{const r=W(e.map(t=>[t.x,t.y])).map(([t,e])=>({x:t,y:e}));if(r.length<2)throw new Error("Arrow route must contain at least two points");const i=r[0],o=r[r.length-1];t.startX=i.x,t.startY=i.y,t.endX=o.x,t.endY=o.y,t.points=r.map(t=>[t.x-i.x,t.y-i.y])})(t,r),t},go=(t,e,r)=>{if(t.length<2)throw new Error(`Class diagram edge ${e?.id||"<unknown>"} is missing usable path points`);const i=t[0],o=t[t.length-1],n=Oi(i.x,i.y,o.x,o.y,{id:e?.getAttribute("data-id")||e?.id||void 0,...r,points:t.map(t=>[t.x-i.x,t.y-i.y])});return e&&((t,e)=>{const r=mi(t.getAttribute("stroke")||getComputedStyle(t).stroke||""),i=parseFloat(t.getAttribute("stroke-width")||getComputedStyle(t).strokeWidth||"1");bi(r)&&"none"!==r&&(e.strokeColor=r),Number.isFinite(i)&&i>0&&(e.strokeWidth=i)})(e,n),po(n)},fo=(t,e)=>go((t=>{const e=[];return t.forEach(t=>{co(t).forEach(t=>{const r=e[e.length-1];r&&r.x===t.x&&r.y===t.y||e.push(t)})}),ho(e)})(t),t[0],e),yo=(t,e)=>{const r=(t=>t.points?.map(([e,r])=>({x:t.startX+e,y:t.startY+r})).filter(t=>Number.isFinite(t.x)&&Number.isFinite(t.y))||[])(t);if(r.length<2)return null;const i="start"===e,o=i?r[0]:r[r.length-1],n=i?r[1]:r[r.length-2],s=n.x===o.x?i?-1:1:Math.sign(n.x-o.x),a=n.y===o.y?1:Math.sign(n.y-o.y);return{x:o.x+20*s,y:o.y+(a>=0?12:-28)}},mo=(t,e)=>{let r=t;for(;r&&r!==e;){if(r.classList.contains("annotation-group"))return"header";if(r.classList.contains("label-group"))return"header";if(r.classList.contains("members-group"))return"members";if(r.classList.contains("methods-group"))return"methods";r=r.parentElement}return"other"},xo=(t,e,r)=>{const i=[],o=[],n=[];return Object.values(t).forEach(t=>{const{domId:s,id:a}=t,l=f(),h=(t=>{const e={};return t?(t.forEach(t=>{Ci(t).forEach(({property:t,value:r})=>{t&&r&&(e[t]=mi(r))})}),e):e})(t.styles||t.cssStyles);let c;try{c=r?r(a):void 0}catch{c=void 0}const d=c&&e.querySelector(`#${c}`)||e.querySelector(`#${s}`)||e.querySelector(`[data-id='${a}']`)||(t=>{const r=new RegExp(`^classId-${t}(?:-|$)`);return Array.from(e.querySelectorAll("[id]")).filter(t=>r.test(t.id))[0]})(a);if(!d)throw Error(`DOM Node with id ${s} not found`);const u=d.querySelector("rect")||d,p=u.getBBox(),{tx:g,ty:y}=ao(u,e),m={type:"rectangle",id:a,groupId:l,x:p.x+g,y:p.y+y,width:p.width,height:p.height,metadata:{classId:a}},x=u.getAttribute("fill"),C=u.getAttribute("stroke"),b=u.getAttribute("stroke-width"),k=u.getAttribute("stroke-dasharray"),w=getComputedStyle(u),S=mi(x||h.fill||(x?w.fill:"")),T=mi(C||h.stroke||(C?w.stroke:"")),v=b||h["stroke-width"]||(b?w.strokeWidth:""),B=k||h["stroke-dasharray"]||(k?"none"===w.strokeDasharray?"":w.strokeDasharray:""),_=t=>{if(!t)return!1;if(!bi(t))return!1;const e=t.toLowerCase();return!("none"===e||"transparent"===e||"rgba(0, 0, 0, 0)"===e||"black"===e||"#000"===e||"#000000"===e||"rgb(0, 0, 0)"===e||"rgba(0, 0, 0, 1)"===e)};_(S)?m.bgColor=S:m.bgColor=void 0,_(T)?m.strokeColor=T:m.strokeColor=void 0,m.strokeWidth=v?Number(v):void 0,B&&B.trim().length>0?m.strokeStyle="dashed":m.strokeStyle=void 0,i.push(m);[...Array.from(d.querySelectorAll("line")),...Array.from(d.querySelectorAll("g.divider path"))].forEach(t=>{const{tx:r,ty:i}=ao(t,e);let n,s,h,c;if("line"===t.tagName.toLowerCase())n=Number(t.getAttribute("x1"))+r,s=Number(t.getAttribute("y1"))+i,h=Number(t.getAttribute("x2"))+r,c=Number(t.getAttribute("y2"))+i;else{const e=t.getBBox();n=e.x+r,h=e.x+e.width+r;const o=e.y+e.height/2+i;s=o,c=o}if(n===h&&s===c)return;const d=Ri(t,n,s,h,c,{groupId:l,id:f()});m.strokeColor?d.strokeColor=m.strokeColor:d.strokeColor=void 0,void 0!==m.strokeWidth?d.strokeWidth=m.strokeWidth:d.strokeWidth=void 0,m.strokeStyle?d.strokeStyle=m.strokeStyle:d.strokeStyle=void 0,d.metadata={classId:a},o.push(d)});const A=Array.from(d.querySelectorAll("text, foreignObject")),L=[];A.forEach(t=>{const r="foreignobject"===t.tagName.toLowerCase(),i=r?[]:Array.from(t.querySelectorAll("tspan")),o=i.length?i.map(t=>t.textContent?.trim()).filter(Boolean).join("\n"):t.textContent?.trim()||"";if(!o)return;const n=t.getBBox(),{ty:s}=ao(t,e);let a=parseFloat(getComputedStyle(t).fontSize||"");if(r&&(!Number.isFinite(a)||!a)){const e=t.querySelector("div, span, p");e&&(a=parseFloat(getComputedStyle(e).fontSize||""))}(!Number.isFinite(a)||a<=0)&&(a=Math.max(12,.6*n.height)),a*=.9;const l=Si(t,h.color);L.push({section:mo(t,d),text:z(o),x:n.x,y:n.y+s,width:m&&m.width?Math.max(m.width-8,n.width):n.width,height:n.height,fontSize:a,color:l})});const F=L.filter(t=>"header"===t.section).sort((t,e)=>t.y-e.y||t.x-e.x);if(!m.label){const t=0===F.length&&1===L.length?L:F;t.length>0&&(m.label={text:t.map(t=>t.text).join("\n"),fontSize:Math.max(...t.map(t=>t.fontSize)),color:t.find(t=>t.color)?.color,verticalAlign:"top"})}L.filter(t=>F.length>0?"header"!==t.section:!(m.label&&1===L.length)).forEach(t=>{const e=Di((m?.x||0)+4,t.y,t.text,{width:t.width,height:t.height,fontSize:t.fontSize,color:t.color,id:f(),groupId:l,metadata:{classId:a}});n.push(e)})}),{nodes:i,lines:o,text:n}},Co=(t,e,r,i)=>{const o=Array.from(r.querySelectorAll('.edgePaths path[data-edge="true"]:not([id^="edgeNote"]):not([id*="-cyclic-special-"])'));if(0===t.length)return{arrows:[],text:[]};const n=[],s=[];let a=0;return t.forEach(t=>{const{id1:l,id2:h,relation:c}=t,d=e.find(t=>t.id===l),u=e.find(t=>t.id===h);if(!d)throw new Error(`parseRelations: Cannot find node with id ${l}`);if(!u)throw new Error(`parseRelations: Cannot find node with id ${h}`);const p=(t=>{let e;switch(t){case oo:e="solid";break;case no:e="dotted";break;default:e="solid"}return e})(c.lineType),g=so(c.type1),f=so(c.type2);let y;if(l===h){const e=((t,e)=>[`${t}-cyclic-special-1`,`${t}-cyclic-special-mid`,`${t}-cyclic-special-2`].map(t=>e.querySelector(`path[id="${t}"][data-edge="true"]`)).filter(t=>null!==t))(l,r);if(!e.length)throw new Error(`parseRelations: Cannot find rendered SVG edge for relation ${l} -> ${h}`);y=fo(e,{strokeStyle:p,startArrowhead:g,endArrowhead:f,label:t.title?{text:t.title}:void 0,start:{type:"rectangle",id:d.id},end:{type:"rectangle",id:u.id}})}else{const e=o[a];if(!e)throw new Error(`parseRelations: Cannot find rendered SVG edge for relation ${l} -> ${h}`);a+=1,y=((t,e)=>{const r=co(t);return go([r[0],r[r.length-1]],t,e)})(e,{strokeStyle:p,startArrowhead:g,endArrowhead:f,label:t.title?{text:t.title}:void 0,start:{type:"rectangle",id:d.id},end:{type:"rectangle",id:u.id}})}n.push(y);const{relationTitle1:m,relationTitle2:x}=t,C=l===h,b=20,k=15,w=15;let S,T;if(m&&"none"!==m){if(C){const t=yo(y,"start");t&&(S=t.x,T=t.y)}else switch(i){case"TB":S=y.startX-b,y.endX<y.startX&&(S-=w),T=y.startY+k;break;case"BT":S=y.startX+b,y.endX>y.startX&&(S+=w),T=y.startY-k;break;case"LR":S=y.startX+b,T=y.startY+k,y.endY>y.startY&&(T+=w);break;case"RL":S=y.startX-b,T=y.startY-k,y.startY>y.endY&&(T-=w);break;default:S=y.startX-b,T=y.startY+k}S??=y.startX-b,T??=y.startY+k;const t=Di(S,T,m,{fontSize:16});s.push(t)}if(x&&"none"!==x){if(C){const t=yo(y,"end");t&&(S=t.x,T=t.y)}else switch(i){case"TB":S=y.endX+b,y.endX<y.startX&&(S+=w),T=y.endY-k;break;case"BT":S=y.endX-b,y.endX>y.startX&&(S-=w),T=y.endY+k;break;case"LR":S=y.endX-b,T=y.endY-k,y.endY>y.startY&&(T-=w);break;case"RL":S=y.endX+b,T=y.endY+k,y.startY>y.endY&&(T+=w);break;default:S=y.endX+b,T=y.endY-k}S??=y.endX+b,T??=y.endY+k;const t=Di(S,T,x,{fontSize:16});s.push(t)}}),{arrows:n,text:s}},bo=(t,e,r)=>{const i=[],o=[];return t.forEach((t,n)=>{const{id:s,text:a,class:l}=t,h=e.querySelector(`#${s}`);if(!h)throw new Error(`Node with id ${s} not found!`);const{transformX:c,transformY:d}=N(h),u=h.firstChild,p=qi(u,"rectangle",{id:s,subtype:"note",label:{text:a}});if(Object.assign(p,{x:p.x+c,y:p.y+d}),i.push(p),l){const t=r.find(t=>t.id===l);if(!t)throw new Error(`class node with id ${l} not found!`);const i=e.querySelector(`path[id="edgeNote${n+1}"][data-edge="true"]`);if(i)return void o.push(((t,e)=>fo([t],e))(i,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:p.id,type:"rectangle"},end:{id:t.id,type:"rectangle"}}));const s=p.x+(p.width||0)/2,a=p.y+(p.height||0),h=s,c=t.y,d=Oi(s,a,h,c,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:p.id,type:"rectangle"},end:{id:t.id,type:"rectangle"}});o.push(d)}}),{notes:i,connectors:o}},ko=(t,e)=>{let r=0,i=0,o=t;for(;o&&o!==e;){const{transformX:t,transformY:e}=N(o);r+=t,i+=e,o=o.parentElement}return{tx:r,ty:i}},wo=t=>{const e=t.querySelector("text, foreignObject, div, span, p")||t;let r=parseFloat(getComputedStyle(e).fontSize||"");return(!Number.isFinite(r)||r<=0)&&(r=Math.max(12,.75*t.getBBox().height)),r},So=(t,e,r)=>{const i=(t=>{const e=Array.from(t.querySelectorAll("tspan")),r=e.length?e.map(t=>t.textContent?.trim()).filter(Boolean).join("\n"):t.textContent?.trim()||"";return z(r)})(t);if(!i)return null;const o=t.getBBox(),{tx:n,ty:s}=ko(t,e);return{className:t.getAttribute("class")||"",text:i,x:o.x+n,y:o.y+s,width:o.width,height:o.height,fontSize:wo(t),color:Si(t,r)}},To=t=>{switch(t?.toLowerCase()){case"one":return"cardinality_one";case"many":return"cardinality_many";case"only_one":return"cardinality_exactly_one";case"one_or_more":return"cardinality_one_or_many";case"zero_or_one":return"cardinality_zero_or_one";case"zero_or_more":return"cardinality_zero_or_many";default:return null}},vo=t=>{switch(t){case"dotted":return"dotted";case"dashed":return"dashed";default:return"solid"}},Bo=(t,e)=>{const r=e.querySelector(`[id="${t.id}"]`);if(!r)throw new Error(`ER entity ${t.id} not found in rendered SVG`);const i=t.attributes.length?f():void 0,o=r.getBBox(),{tx:n,ty:s}=ko(r,e),a=(t=>{const e={};return t?(t.forEach(t=>{Ci(t).forEach(({property:t,value:r})=>{t&&r&&(e[t]=mi(r))})}),e):e})([...t.cssStyles||[],...t.cssCompiledStyles||[]]),l=mi(a.fill||""),h=mi(a.stroke||""),c=(t=>{if(null==t||""===t)return;const e="number"==typeof t?t:parseFloat(mi(t));return!Number.isFinite(e)||e<=0?void 0:e})(a["stroke-width"]),d=mi(a["stroke-dasharray"]||""),u=Array.from(r.querySelectorAll("g.label")).map(t=>So(t,e,a.color)).filter(t=>null!==t),p=u.find(t=>t.className.includes("name"))||u[0],g=u.filter(t=>t!==p),y=p?.text||z(t.alias||t.label||""),m={type:"rectangle",id:t.id,groupId:i,x:o.x+n,y:o.y+s,width:o.width,height:o.height,label:{text:y,fontSize:t.attributes.length?18:p?.fontSize||16,color:p?.color,textAlign:"center",verticalAlign:t.attributes.length?"top":"middle"},metadata:{entityId:t.id,entityLabel:t.label,entityAlias:t.alias}};bi(l)&&"none"!==l&&(m.bgColor=l),bi(h)&&"none"!==h&&(m.strokeColor=h),c&&Number.isFinite(c)&&c>0&&(m.strokeWidth=c),d&&"none"!==d&&(m.strokeStyle="dashed");const x=Array.from(r.querySelectorAll(".divider path, path.divider, line.divider")).map(r=>((t,e,r,i,o,n,s)=>{const{tx:a,ty:l}=ko(t,e);let h=0,c=0,d=0,u=0;if("line"===t.tagName.toLowerCase())h=Number(t.getAttribute("x1"))+a,c=Number(t.getAttribute("y1"))+l,d=Number(t.getAttribute("x2"))+a,u=Number(t.getAttribute("y2"))+l;else{const e=j(t);if(!e)return null;h=e.startX+a,c=e.startY+l,d=e.endX+a,u=e.endY+l}const p={type:"line",id:f(),groupId:r,startX:h,startY:c,endX:d,endY:u,metadata:{entityId:i}};return o&&bi(o)&&"none"!==o&&(p.strokeColor=o),void 0!==n&&(p.strokeWidth=n),s&&(p.strokeStyle=s),p})(r,e,i,t.id,m.strokeColor,m.strokeWidth,m.strokeStyle)).filter(t=>null!==t),C=g.map(e=>Di(e.x,e.y,e.text,{id:f(),groupId:i,width:e.width,height:e.height,fontSize:18,color:e.color,metadata:{entityId:t.id}}));return{container:m,lines:x,text:C}},_o=(t,e)=>{const r=((t,e)=>{const r=e.querySelector(`path[id="${t.id}"][data-edge="true"]`);return r?[r]:t.start!==t.end?[]:[`${t.start}-cyclic-special-1`,`${t.start}-cyclic-special-mid`,`${t.start}-cyclic-special-2`].map(t=>e.querySelector(`path[id="${t}"][data-edge="true"]`)).filter(t=>null!==t)})(t,e);if(!r.length)throw new Error(`ER relationship ${t.id} not found in rendered SVG`);const i=(t=>{const e=[];return t.forEach(t=>{H(t).forEach(t=>{const r=e[e.length-1];r&&r.x===t.x&&r.y===t.y||e.push(t)})}),e})(r);if(i.length<2)throw new Error(`ER relationship ${t.id} is missing usable path points`);const o=i[0],n=i[i.length-1],s=r[0],a=mi(s.getAttribute("stroke")||getComputedStyle(s).stroke||""),l=Number(s.getAttribute("stroke-width")||getComputedStyle(s).strokeWidth||1),h=Oi(o.x,o.y,n.x,n.y,{id:t.id,label:t.label?{text:z(t.label),fontSize:16,textAlign:"center"}:void 0,strokeStyle:vo(t.pattern),startArrowhead:To(t.arrowTypeStart),endArrowhead:To(t.arrowTypeEnd),start:{type:"rectangle",id:t.start},end:{type:"rectangle",id:t.end},points:i.map(t=>[t.x-o.x,t.y-o.y])});return bi(a)&&"none"!==a&&(h.strokeColor=a),Number.isFinite(l)&&l>0&&(h.strokeWidth=l),h},Ao=t=>{const e=mi(t||"");return!!e&&("none"!==e&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgba(0,0,0,0)"!==e&&bi(e))},Lo=(t,e,r)=>{switch(e){case n.FILL:case n.STROKE:Ao(r)&&(t[e]=mi(r));break;case n.STROKE_WIDTH:case n.STROKE_DASHARRAY:mi(r)&&(t[e]=mi(r))}},Fo=(t,e,r)=>{e===o.COLOR&&Ao(r)&&(t[o.COLOR]=mi(r))},Mo=(t,e)=>{t&&Ci(t).forEach(({property:t,value:r})=>{t===n.FILL&&Ao(r)?e[o.COLOR]=mi(r):Fo(e,t,r)})},Eo=(t,e)=>{let r=0,i=0,o=t;for(;o&&o!==e;){const{transformX:t,transformY:e}=N(o);r+=t,i+=e,o=o.parentElement}return{tx:r,ty:i}},$o=(t,e)=>{const r=t.querySelector("line.divider");if(!r)return;const{tx:i,ty:o}=Eo(r,e);return{startX:Number(r.getAttribute("x1"))+i,startY:Number(r.getAttribute("y1"))+o,endX:Number(r.getAttribute("x2"))+i,endY:Number(r.getAttribute("y2"))+o}},Oo=t=>{const e=t.getBBox();return Math.abs(e.width*e.height)},Do=(t,e)=>{const r=t.getAttribute("style");if(!r)return;const i=Ci(r).find(t=>t.property===e);return i?mi(i.value):void 0},Io=(t,e)=>{const r=t.map(t=>({element:t,area:Oo(t)})).filter(({area:t})=>Number.isFinite(t)&&t>0);if(0===r.length)return null;return r.sort((t,r)=>"largest"===e?r.area-t.area:t.area-r.area)[0].element},qo=(t,e)=>{const r=Array.from(t.querySelectorAll("circle, ellipse, path"));return((t,e)=>{if(!t)return;if(!e.has(n.FILL)&&!e.has(n.STROKE))return;const r=mi(t.getAttribute("fill")||Do(t,n.FILL)||""),i=mi(t.getAttribute("stroke")||Do(t,n.STROKE)||"");return Ao(r)?r:Ao(i)?i:void 0})(Io(r,"smallest"),e)},Ro=t=>(t=>{if(t.length<2)return t;const e=t.slice(1),r=e.filter(t=>t.trim().length>0).reduce((t,e)=>{const r=e.match(/^\s*/)?.[0].length??0;return Math.min(t,r)},Number.POSITIVE_INFINITY);return!Number.isFinite(r)||r<=0?t.map(t=>t.trimEnd()):[t[0].trimEnd(),...e.map(t=>t.replace(new RegExp(`^\\s{0,${r}}`),"").trimEnd())]})(Array.isArray(t.label)?t.label.map(t=>z(t)):z(t.label||"").split("\n")).join("\n"),Ko=t=>{if(!t.description)return[];return(Array.isArray(t.description)?t.description:[t.description]).map(t=>z(t)).filter(t=>t.length>0)},zo=(t,e,r)=>{const i=r(t);if(!i)throw new Error(`State node element not found for "${t.id}"`);const s=((t,e)=>{switch(e){case"roundedWithTitle":case"rectWithTitle":return t.querySelector("rect.outer")||t.querySelector("rect")||t;case"divider":return t.querySelector("rect.divider")||t.querySelector("rect")||t;case"stateStart":case"stateEnd":return Io(Array.from(t.querySelectorAll("circle, ellipse, path")),"largest")||t;default:return t.querySelector("rect, path, circle, ellipse, polygon")||t}})(i,t.shape),a={},l={},h=[t.labelStyle,...t.cssCompiledStyles||[],...t.cssStyles||[]],c=(t=>{const e=new Set;return t.filter(Boolean).forEach(t=>{Ci(t||"").forEach(({property:t})=>{e.add(t)})}),e})(h);h.filter(Boolean).forEach(t=>{((t,e,r)=>{t&&Ci(t).forEach(({property:t,value:i})=>{Lo(e,t,i),Fo(r,t,i)})})(t,a,l)}),((t,e,r)=>{if(!t)return;[[n.FILL,t.getAttribute("fill")],[n.STROKE,t.getAttribute("stroke")],[n.STROKE_WIDTH,t.getAttribute("stroke-width")],[n.STROKE_DASHARRAY,t.getAttribute("stroke-dasharray")]].forEach(([t,i])=>{if(!r.has(t))return;if(e[t])return;const o=mi(i||"");o&&Lo(e,t,o)})})(s,a,c),((t,e,r)=>{if(!t)return;const i=[t,...Array.from(t.querySelectorAll("text, foreignObject, div, span, p"))];for(const t of i){if(e[o.COLOR])break;if((r.has(o.COLOR)||r.has(n.FILL))&&(Mo(t.getAttribute("style"),e),e[o.COLOR]))break;const i=mi(t.getAttribute("fill")||t.getAttribute("color")||"");(r.has(o.COLOR)||r.has(n.FILL))&&Ao(i)&&(e[o.COLOR]=i)}})(i,l,c);const d=((t,e)=>{const r=t.getBBox(),{tx:i,ty:o}=Eo(t,e);return{x:r.x+i,y:r.y+o,width:r.width,height:r.height}})(s,e);return{id:t.id,shape:t.shape,text:Ro(t),description:Ko(t),x:d.x,y:d.y,width:d.width,height:d.height,parentId:t.parentId,position:t.position,containerStyle:a,labelStyle:l,dividerLine:"rectWithTitle"===t.shape?$o(i,e):void 0,endInnerColor:"stateEnd"===t.shape?qo(i,c):void 0,isRenderable:"noteGroup"!==t.shape}},No=(t,e)=>{const r=e.querySelector(`[id='${t.id}']`);if(!r)return null;const{tx:i,ty:o}=Eo(r,e),s=U(r,{x:i,y:o},"MCL");if(s.reflectionPoints.length<2)return null;const a={};[t.style].filter(Boolean).forEach(t=>{Ci(t||"").forEach(({property:t,value:e})=>{((t,e)=>{switch(t){case n.STROKE:Ao(e)&&(a.strokeColor=mi(e));break;case n.STROKE_WIDTH:{const t=parseFloat(mi(e));Number.isFinite(t)&&t>0&&(a.strokeWidth=t);break}case n.STROKE_DASHARRAY:mi(e)&&(a.strokeStyle="dashed")}})(t,e)})});const l="none"===t.arrowhead||t.classes?.includes("note-edge");return{id:t.id,start:t.start,end:t.end,text:z(t.label||""),...s,strokeColor:a.strokeColor,strokeWidth:a.strokeWidth,strokeStyle:l?"dashed":a.strokeStyle,isNoteEdge:l}},Po=(t,e)=>{const{nodes:r,edges:i}=t.getData(),o=(t=>{const e=new Set,r=t=>(t&&e.add(t),t),i=t=>{const i=t.find(t=>!e.has(t));return r(i||null)};return e=>{const o=[`[id='${e.domId}']`,`[id='${e.id}']`,`[data-id='${e.id}']`];for(const e of o){const i=t.querySelector(e);if(i)return r(i)}switch(e.shape){case"divider":return i(Array.from(t.querySelectorAll("g.statediagram-cluster-alt")));case"stateStart":return i(Array.from(t.querySelectorAll("g.node.default")).filter(t=>t.querySelector("circle.state-start")));case"stateEnd":return i(Array.from(t.querySelectorAll("g.node.default")).filter(t=>!t.querySelector("circle.state-start")));default:return null}}})(e);return{type:"state",nodes:r.map(t=>zo(t,e,o)),edges:i.map(t=>No(t,e)).filter(t=>null!==t)}};let Wo=Promise.resolve();let jo=null,Ho=0;const Uo=t=>{const e=t.querySelector("svg");if(!e)throw new Error("SVG element not found");const r=e.getBoundingClientRect(),i=r.width,o=r.height;e.setAttribute("width",`${i}`),e.setAttribute("height",`${o}`);const n=unescape(encodeURIComponent(e.outerHTML));return{type:"graphImage",mimeType:"image/svg+xml",dataURL:`data:image/svg+xml;base64,${btoa(n)}`,width:i,height:o}},Yo=async(t,e=yi)=>(t=>{const e=Wo.then(t,t);return Wo=e.then(()=>{},()=>{}),e})(async()=>{const r=e.themeVariables?.fontSize??yi.themeVariables.fontSize,i={...yi,...e,fontSize:r,themeVariables:{...yi.themeVariables,...e.themeVariables,fontSize:r}},o=(t=>JSON.stringify(t))(i);o!==jo&&(gi.initialize(i),jo=o);const n=await gi.mermaidAPI.getDiagramFromText((t=>{let e=t;return e=e.replace(/style.*:\S*#.*;/g,t=>t.substring(0,t.length-1)),e=e.replace(/classDef.*:\S*#.*;/g,t=>t.substring(0,t.length-1)),e=e.replace(/#\w+;/g,t=>{const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?`fl°°${e}¶ß`:`fl°${e}¶ß`}),e})(t)),s="mermaid-to-excalidraw-"+Ho++,a=document.createElement("div");a.setAttribute("style","opacity: 0; position: fixed; z-index: -1; left: -99999px; top: -99999px;");const l=`${s}-container`;a.id=l,document.getElementById(l)?.remove(),document.body.appendChild(a);try{const{svg:e}=await gi.render(s,t,a);let r;a.innerHTML=e;try{switch(n.type){case"flowchart-v2":case"graph":r=$i(n.db,a);break;case"sequence":r=to(n,a);break;case"class":case"classDiagram":r=((t,e)=>{const r=t.db,i=r.getDirection?.()||"TB",o=[],n=[],s=[],a=[],l=r.getNamespaces?.()||[],h=r.getClasses?.()||{},c=h instanceof Map?Object.fromEntries(h):h;if(c&&Object.keys(c).length){const t="function"==typeof r.lookUpDomId?r.lookUpDomId.bind(r):void 0,i=xo(c,e,t);o.push(i.nodes),n.push(...i.lines),s.push(...i.text),a.push(...i.nodes)}const d=r.getRelations?.()||[],{arrows:u,text:p}=Co(d,a,e,i),g=r.getNotes?.()||[],{notes:f,connectors:y}=bo(g,e,a);return o.push(f),u.push(...y),s.push(...p),{type:"class",nodes:o,lines:n,arrows:u,text:s,namespaces:l}})(n,a);break;case"er":r=((t,e)=>{const r=t.getData(),i=r.nodes,o=r.edges,n=[],s=[],a=[];i.forEach(t=>{const r=Bo(t,e);n.push(r.container),s.push(...r.lines),a.push(...r.text)});const l=o.map(t=>_o(t,e));return{type:"erd",nodes:[n],lines:s,arrows:l,text:a}})(n.db,a);break;case"state":case"stateDiagram":r=Po(n.db,a);break;default:r=Uo(a)}}catch(t){console.error("Error processing Mermaid diagram:",t),r=Uo(a)}return r}finally{a.remove()}}),Xo=async(t,e)=>{const r=e||{},i=parseInt(r.themeVariables?.fontSize??"")||20,o=await Yo(t,{...r,themeVariables:{...r.themeVariables}});return Y(o,{fontSize:i})}},51444(t,e,r){"use strict";function i(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r<e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r<o||void 0===r&&o>=o)&&(r=o)}return r}function o(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function n(t){return t}r.d(e,{JLW:()=>Xl,l78:()=>g,tlR:()=>p,qrM:()=>ah,Yu4:()=>hh,IA3:()=>dh,Wi0:()=>ph,PGM:()=>gh,OEq:()=>yh,y8u:()=>Ch,olC:()=>kh,IrU:()=>Sh,oDi:()=>Bh,Q7f:()=>Ah,cVp:()=>Fh,lUB:()=>Zl,Lx9:()=>Eh,nVG:()=>zh,uxU:()=>Nh,Xf2:()=>jh,GZz:()=>Uh,UPb:()=>Xh,dyv:()=>Yh,GPZ:()=>xo,Sk5:()=>qo,bEH:()=>mn,n8j:()=>th,T9B:()=>i,jkA:()=>o,rLf:()=>ih,WH:()=>Bn,m4Y:()=>ns,UMr:()=>vn,w7C:()=>Cl,zt:()=>kl,Ltv:()=>wl,UAC:()=>bs,DCK:()=>Qs,TUC:()=>Ls,Agd:()=>xs,t6C:()=>gs,wXd:()=>ys,ABi:()=>vs,Ui6:()=>Ks,rGn:()=>Fs,ucG:()=>fs,YPH:()=>Ts,Mol:()=>As,PGu:()=>Bs,GuW:()=>_s,hkb:()=>Vo}),r.dn(n);var s=1e-6;function a(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function h(t){return e=>+t(e)}function c(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function d(){return!this.__axis}function u(t,e){var r=[],i=null,o=null,u=6,p=6,g=3,f="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",x=1===t||3===t?a:l;function C(a){var l=i??(e.ticks?e.ticks.apply(e,r):e.domain()),C=o??(e.tickFormat?e.tickFormat.apply(e,r):n),b=Math.max(u,0)+g,k=e.range(),w=+k[0]+f,S=+k[k.length-1]+f,T=(e.bandwidth?c:h)(e.copy(),f),v=a.selection?a.selection():a,B=v.selectAll(".domain").data([null]),_=v.selectAll(".tick").data(l,e).order(),A=_.exit(),L=_.enter().append("g").attr("class","tick"),F=_.select("line"),M=_.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(L),F=F.merge(L.append("line").attr("stroke","currentColor").attr(m+"2",y*u)),M=M.merge(L.append("text").attr("fill","currentColor").attr(m,y*b).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),a!==v&&(B=B.transition(a),_=_.transition(a),F=F.transition(a),M=M.transition(a),A=A.transition(a).attr("opacity",s).attr("transform",function(t){return isFinite(t=T(t))?x(t+f):this.getAttribute("transform")}),L.attr("opacity",s).attr("transform",function(t){var e=this.parentNode.__axis;return x((e&&isFinite(e=e(t))?e:T(t))+f)})),A.remove(),B.attr("d",4===t||2===t?p?"M"+y*p+","+w+"H"+f+"V"+S+"H"+y*p:"M"+f+","+w+"V"+S:p?"M"+w+","+y*p+"V"+f+"H"+S+"V"+y*p:"M"+w+","+f+"H"+S),_.attr("opacity",1).attr("transform",function(t){return x(T(t)+f)}),F.attr(m+"2",y*u),M.attr(m,y*b).text(C),v.filter(d).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),v.each(function(){this.__axis=T})}return C.scale=function(t){return arguments.length?(e=t,C):e},C.ticks=function(){return r=Array.from(arguments),C},C.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),C):r.slice()},C.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),C):i&&i.slice()},C.tickFormat=function(t){return arguments.length?(o=t,C):o},C.tickSize=function(t){return arguments.length?(u=p=+t,C):u},C.tickSizeInner=function(t){return arguments.length?(u=+t,C):u},C.tickSizeOuter=function(t){return arguments.length?(p=+t,C):p},C.tickPadding=function(t){return arguments.length?(g=+t,C):g},C.offset=function(t){return arguments.length?(f=+t,C):f},C}function p(t){return u(1,t)}function g(t){return u(3,t)}function f(){}function y(t){return null==t?f:function(){return this.querySelector(t)}}function m(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,s,a=e[o],l=a.length,h=i[o]=new Array(l),c=0;c<l;++c)(n=a[c])&&(s=t.call(n,n.__data__,c,a))&&("__data__"in n&&(s.__data__=n.__data__),h[c]=s);return new se(i,this._parents)}function x(){return[]}function C(t){return null==t?x:function(){return this.querySelectorAll(t)}}function b(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function k(t){t="function"==typeof t?b(t):C(t);for(var e=this._groups,r=e.length,i=[],o=[],n=0;n<r;++n)for(var s,a=e[n],l=a.length,h=0;h<l;++h)(s=a[h])&&(i.push(t.call(s,s.__data__,h,a)),o.push(s));return new se(i,o)}function w(t){return function(){return this.matches(t)}}function S(t){return function(e){return e.matches(t)}}r.dn(y),r.dn(m),r.dn(C),r.dn(k),r.dn(w),r.dn(B);var T=Array.prototype.find;function v(){return this.firstElementChild}function B(t){return this.select(null==t?v:function(t){return function(){return T.call(this.children,t)}}("function"==typeof t?t:S(t)))}r.dn(L);var _=Array.prototype.filter;function A(){return Array.from(this.children)}function L(t){return this.selectAll(null==t?A:function(t){return function(){return _.call(this.children,t)}}("function"==typeof t?t:S(t)))}function F(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,s=e[o],a=s.length,l=i[o]=[],h=0;h<a;++h)(n=s[h])&&t.call(n,n.__data__,h,s)&&l.push(n);return new se(i,this._parents)}function M(t){return new Array(t.length)}function E(){return new se(this._enter||this._groups.map(M),this._parents)}function $(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function O(t){return function(){return t}}function D(t,e,r,i,o,n){for(var s,a=0,l=e.length,h=n.length;a<h;++a)(s=e[a])?(s.__data__=n[a],i[a]=s):r[a]=new $(t,n[a]);for(;a<l;++a)(s=e[a])&&(o[a]=s)}function I(t,e,r,i,o,n,s){var a,l,h,c=new Map,d=e.length,u=n.length,p=new Array(d);for(a=0;a<d;++a)(l=e[a])&&(p[a]=h=s.call(l,l.__data__,a,e)+"",c.has(h)?o[a]=l:c.set(h,l));for(a=0;a<u;++a)h=s.call(t,n[a],a,n)+"",(l=c.get(h))?(i[a]=l,l.__data__=n[a],c.delete(h)):r[a]=new $(t,n[a]);for(a=0;a<d;++a)(l=e[a])&&c.get(p[a])===l&&(o[a]=l)}function q(t){return t.__data__}function R(t,e){if(!arguments.length)return Array.from(this,q);var r=e?I:D,i=this._parents,o=this._groups;"function"!=typeof t&&(t=O(t));for(var n=o.length,s=new Array(n),a=new Array(n),l=new Array(n),h=0;h<n;++h){var c=i[h],d=o[h],u=d.length,p=K(t.call(c,c&&c.__data__,h,i)),g=p.length,f=a[h]=new Array(g),y=s[h]=new Array(g);r(c,d,f,y,l[h]=new Array(u),p,e);for(var m,x,C=0,b=0;C<g;++C)if(m=f[C]){for(C>=b&&(b=C+1);!(x=y[b])&&++b<g;);m._next=x||null}}return(s=new se(s,i))._enter=a,s._exit=l,s}function K(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function z(){return new se(this._exit||this._groups.map(M),this._parents)}function N(t,e,r){var i=this.enter(),o=this,n=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==r?n.remove():r(n),i&&o?i.merge(o).order():o}function P(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,n=i.length,s=Math.min(o,n),a=new Array(o),l=0;l<s;++l)for(var h,c=r[l],d=i[l],u=c.length,p=a[l]=new Array(u),g=0;g<u;++g)(h=c[g]||d[g])&&(p[g]=h);for(;l<o;++l)a[l]=r[l];return new se(a,this._parents)}function W(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,o=t[e],n=o.length-1,s=o[n];--n>=0;)(i=o[n])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this}function j(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=H);for(var r=this._groups,i=r.length,o=new Array(i),n=0;n<i;++n){for(var s,a=r[n],l=a.length,h=o[n]=new Array(l),c=0;c<l;++c)(s=a[c])&&(h[c]=s);h.sort(e)}return new se(o,this._parents).order()}function H(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function U(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Y(){return Array.from(this)}function X(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,n=i.length;o<n;++o){var s=i[o];if(s)return s}return null}function G(){let t=0;for(const e of this)++t;return t}function V(){return!this.node()}function Z(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o,n=e[r],s=0,a=n.length;s<a;++s)(o=n[s])&&t.call(o,o.__data__,s,n);return this}r.dn(F),r.dn(M),r.dn(E),$.prototype={constructor:$,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)}},r.dn(O),r.dn(R),r.dn(z),r.dn(N),r.dn(P),r.dn(W),r.dn(j),r.dn(U),r.dn(Y),r.dn(X),r.dn(G),r.dn(V),r.dn(Z);var Q="http://www.w3.org/1999/xhtml";const J={svg:"http://www.w3.org/2000/svg",xhtml:Q,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tt(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),J.hasOwnProperty(e)?{space:J[e],local:t}:t}function et(t){return function(){this.removeAttribute(t)}}function rt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function it(t,e){return function(){this.setAttribute(t,e)}}function ot(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function nt(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function st(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function at(t,e){var r=tt(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?rt:et:"function"==typeof e?r.local?st:nt:r.local?ot:it)(r,e))}function lt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ht(t){return function(){this.style.removeProperty(t)}}function ct(t,e,r){return function(){this.style.setProperty(t,e,r)}}function dt(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function ut(t,e,r){return arguments.length>1?this.each((null==e?ht:"function"==typeof e?dt:ct)(t,e,r??"")):pt(this.node(),t)}function pt(t,e){return t.style.getPropertyValue(e)||lt(t).getComputedStyle(t,null).getPropertyValue(e)}function gt(t){return function(){delete this[t]}}function ft(t,e){return function(){this[t]=e}}function yt(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function mt(t,e){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?yt:ft)(t,e)):this.node()[t]}function xt(t){return t.trim().split(/^|\s+/)}function Ct(t){return t.classList||new bt(t)}function bt(t){this._node=t,this._names=xt(t.getAttribute("class")||"")}function kt(t,e){for(var r=Ct(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function wt(t,e){for(var r=Ct(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function St(t){return function(){kt(this,t)}}function Tt(t){return function(){wt(this,t)}}function vt(t,e){return function(){(e.apply(this,arguments)?kt:wt)(this,t)}}function Bt(t,e){var r=xt(t+"");if(arguments.length<2){for(var i=Ct(this.node()),o=-1,n=r.length;++o<n;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?vt:e?St:Tt)(r,e))}function _t(){this.textContent=""}function At(t){return function(){this.textContent=t}}function Lt(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ft(t){return arguments.length?this.each(null==t?_t:("function"==typeof t?Lt:At)(t)):this.node().textContent}function Mt(){this.innerHTML=""}function Et(t){return function(){this.innerHTML=t}}function $t(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ot(t){return arguments.length?this.each(null==t?Mt:("function"==typeof t?$t:Et)(t)):this.node().innerHTML}function Dt(){this.nextSibling&&this.parentNode.appendChild(this)}function It(){return this.each(Dt)}function qt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Rt(){return this.each(qt)}function Kt(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Q&&e.documentElement.namespaceURI===Q?e.createElement(t):e.createElementNS(r,t)}}function zt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Nt(t){var e=tt(t);return(e.local?zt:Kt)(e)}function Pt(t){var e="function"==typeof t?t:Nt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Wt(){return null}function jt(t,e){var r="function"==typeof t?t:Nt(t),i=null==e?Wt:"function"==typeof e?e:y(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Ht(){var t=this.parentNode;t&&t.removeChild(this)}function Ut(){return this.each(Ht)}function Yt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gt(t){return this.select(t?Xt:Yt)}function Vt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Zt(t){return function(){var e=this.__on;if(e){for(var r,i=0,o=-1,n=e.length;i<n;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?e.length=o:delete this.__on}}}function Qt(t,e,r){return function(){var i,o=this.__on,n=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var s=0,a=o.length;s<a;++s)if((i=o[s]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=n,i.options=r),void(i.value=e);this.addEventListener(t.type,n,r),i={type:t.type,name:t.name,value:e,listener:n,options:r},o?o.push(i):this.__on=[i]}}function Jt(t,e,r){var i,o,n=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),s=n.length;if(!(arguments.length<2)){for(a=e?Qt:Zt,i=0;i<s;++i)this.each(a(n[i],e,r));return this}var a=this.node().__on;if(a)for(var l,h=0,c=a.length;h<c;++h)for(i=0,l=a[h];i<s;++i)if((o=n[i]).type===l.type&&o.name===l.name)return l.value}function te(t,e,r){var i=lt(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function ee(t,e){return function(){return te(this,t,e)}}function re(t,e){return function(){return te(this,t,e.apply(this,arguments))}}function ie(t,e){return this.each(("function"==typeof e?re:ee)(t,e))}function*oe(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,o=t[e],n=0,s=o.length;n<s;++n)(i=o[n])&&(yield i)}r.dn(tt),r.dn(at),r.dn(lt),r.dn(ut),r.dn(mt),r.dn(Bt),bt.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}},r.dn(Ft),r.dn(Ot),r.dn(It),r.dn(Rt),r.dn(Nt),r.dn(Pt),r.dn(jt),r.dn(Ut),r.dn(Gt),r.dn(Vt),r.dn(Jt),r.dn(ie),r.dn(oe);var ne=[null];function se(t,e){this._groups=t,this._parents=e}function ae(){return new se([[document.documentElement]],ne)}se.prototype=ae.prototype={constructor:se,select:m,selectAll:k,selectChild:B,selectChildren:L,filter:F,data:R,enter:E,exit:z,join:N,merge:P,selection:function(){return this},order:W,sort:j,call:U,nodes:Y,node:X,size:G,empty:V,each:Z,attr:at,style:ut,property:mt,classed:Bt,text:Ft,html:Ot,raise:It,lower:Rt,append:Pt,insert:jt,remove:Ut,clone:Gt,datum:Vt,on:Jt,dispatch:ie,[Symbol.iterator]:oe};const le=ae;var he={value:()=>{}};function ce(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new de(i)}function de(t){this._=t}function ue(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}function pe(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=he,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}de.prototype=ce.prototype={constructor:de,on:function(t,e){var r,i,o=this._,n=(i=o,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),s=-1,a=n.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<a;)if(r=(t=n[s]).type)o[r]=pe(o[r],t.name,e);else if(null==e)for(r in o)o[r]=pe(o[r],t.name,null);return this}for(;++s<a;)if((r=(t=n[s]).type)&&(r=ue(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new de(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,o=new Array(r),n=0;n<r;++n)o[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(n=0,r=(i=this._[t]).length;n<r;++n)i[n].value.apply(e,o)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,n=i.length;o<n;++o)i[o].value.apply(e,r)}};const ge=ce;var fe,ye,me=0,xe=0,Ce=0,be=0,ke=0,we=0,Se="object"==typeof performance&&performance.now?performance:Date,Te="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ve(){return ke||(Te(Be),ke=Se.now()+we)}function Be(){ke=0}function _e(){this._call=this._time=this._next=null}function Ae(t,e,r){var i=new _e;return i.restart(t,e,r),i}function Le(){ke=(be=Se.now())+we,me=xe=0;try{!function(){ve(),++me;for(var t,e=fe;e;)(t=ke-e._time)>=0&&e._call.call(void 0,t),e=e._next;--me}()}finally{me=0,function(){var t,e,r=fe,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:fe=e);ye=t,Me(i)}(),ke=0}}function Fe(){var t=Se.now(),e=t-be;e>1e3&&(we-=e,be=t)}function Me(t){me||(xe&&(xe=clearTimeout(xe)),t-ke>24?(t<1/0&&(xe=setTimeout(Le,t-Se.now()-we)),Ce&&(Ce=clearInterval(Ce))):(Ce||(be=Se.now(),Ce=setInterval(Fe,1e3)),me=1,Te(Le)))}function Ee(t,e,r){var i=new _e;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}_e.prototype=Ae.prototype={constructor:_e,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?ve():+r)+(null==e?0:+e),this._next||ye===this||(ye?ye._next=this:fe=this,ye=this),this._call=t,this._time=r,Me()},stop:function(){this._call&&(this._call=null,this._time=1/0,Me())}},r.dn(Ee),r.dn(De);var $e=ge("start","end","cancel","interrupt"),Oe=[];function De(t,e,r,i,o,n){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function n(t){r.state=1,r.timer.restart(s,r.delay,r.time),r.delay<=t&&s(t-r.delay)}function s(n){var h,c,d,u;if(1!==r.state)return l();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return Ee(s);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(Ee(function(){3===r.state&&(r.state=4,r.timer.restart(a,r.delay,r.time),a(n))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function a(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(l),r.state=5,1),n=-1,s=i.length;++n<s;)i[n].call(t,o);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var i in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=Ae(n,0,r.time)}(t,r,{name:e,index:i,group:o,on:$e,tween:Oe,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:0})}function Ie(t,e){var r=Re(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function qe(t,e){var r=Re(t,e);if(r.state>3)throw new Error("too late; already running");return r}function Re(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Ke(t,e){var r,i,o,n=t.__transition,s=!0;if(n){for(o in e=null==e?null:e+"",n)(r=n[o]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]):s=!1;s&&delete t.__transition}}function ze(t){return this.each(function(){Ke(this,t)})}function Ne(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}r.dn(Ke),r.dn(ze),r.dn(Ne),r.dn(He);var Pe,We=180/Math.PI,je={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function He(t,e,r,i,o,n){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(a=Math.sqrt(r*r+i*i))&&(r/=a,i/=a,l/=a),t*i<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:o,translateY:n,rotate:Math.atan2(e,t)*We,skewX:Math.atan(l)*We,scaleX:s,scaleY:a}}function Ue(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(n,s){var a=[],l=[];return n=t(n),s=t(s),function(t,i,o,n,s,a){if(t!==o||i!==n){var l=s.push("translate(",null,e,null,r);a.push({i:l-4,x:Ne(t,o)},{i:l-2,x:Ne(i,n)})}else(o||n)&&s.push("translate("+o+e+n+r)}(n.translateX,n.translateY,s.translateX,s.translateY,a,l),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(o(r)+"rotate(",null,i)-2,x:Ne(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}(n.rotate,s.rotate,a,l),function(t,e,r,n){t!==e?n.push({i:r.push(o(r)+"skewX(",null,i)-2,x:Ne(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}(n.skewX,s.skewX,a,l),function(t,e,r,i,n,s){if(t!==r||e!==i){var a=n.push(o(n)+"scale(",null,",",null,")");s.push({i:a-4,x:Ne(t,r)},{i:a-2,x:Ne(e,i)})}else 1===r&&1===i||n.push(o(n)+"scale("+r+","+i+")")}(n.scaleX,n.scaleY,s.scaleX,s.scaleY,a,l),n=s=null,function(t){for(var e,r=-1,i=l.length;++r<i;)a[(e=l[r]).i]=e.x(t);return a.join("")}}}var Ye=Ue(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?je:He(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Xe=Ue(function(t){return null==t?je:(Pe||(Pe=document.createElementNS("http://www.w3.org/2000/svg","g")),Pe.setAttribute("transform",t),(t=Pe.transform.baseVal.consolidate())?He((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):je)},", ",")",")");function Ge(t,e){var r,i;return function(){var o=qe(this,t),n=o.tween;if(n!==r)for(var s=0,a=(i=r=n).length;s<a;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}o.tween=i}}function Ve(t,e,r){var i,o;if("function"!=typeof r)throw new Error;return function(){var n=qe(this,t),s=n.tween;if(s!==i){o=(i=s).slice();for(var a={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=a;break}l===h&&o.push(a)}n.tween=o}}function Ze(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=Re(this.node(),r).tween,n=0,s=o.length;n<s;++n)if((i=o[n]).name===t)return i.value;return null}return this.each((null==e?Ge:Ve)(r,t,e))}function Qe(t,e,r){var i=t._id;return t.each(function(){var t=qe(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Re(t,i).value[e]}}function Je(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function tr(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function er(){}r.dn(Ze),r.dn(Je);var rr=.7,ir=1/rr,or="\\s*([+-]?\\d+)\\s*",nr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ar=/^#([0-9a-f]{3,8})$/,lr=new RegExp(`^rgb\\(${or},${or},${or}\\)$`),hr=new RegExp(`^rgb\\(${sr},${sr},${sr}\\)$`),cr=new RegExp(`^rgba\\(${or},${or},${or},${nr}\\)$`),dr=new RegExp(`^rgba\\(${sr},${sr},${sr},${nr}\\)$`),ur=new RegExp(`^hsl\\(${nr},${sr},${sr}\\)$`),pr=new RegExp(`^hsla\\(${nr},${sr},${sr},${nr}\\)$`),gr={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 fr(){return this.rgb().formatHex()}function yr(){return this.rgb().formatRgb()}function mr(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=ar.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?xr(e):3===r?new wr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Cr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Cr(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=lr.exec(t))?new wr(e[1],e[2],e[3],1):(e=hr.exec(t))?new wr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=cr.exec(t))?Cr(e[1],e[2],e[3],e[4]):(e=dr.exec(t))?Cr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ur.exec(t))?Ar(e[1],e[2]/100,e[3]/100,1):(e=pr.exec(t))?Ar(e[1],e[2]/100,e[3]/100,e[4]):gr.hasOwnProperty(t)?xr(gr[t]):"transparent"===t?new wr(NaN,NaN,NaN,0):null}function xr(t){return new wr(t>>16&255,t>>8&255,255&t,1)}function Cr(t,e,r,i){return i<=0&&(t=e=r=NaN),new wr(t,e,r,i)}function br(t){return t instanceof er||(t=mr(t)),t?new wr((t=t.rgb()).r,t.g,t.b,t.opacity):new wr}function kr(t,e,r,i){return 1===arguments.length?br(t):new wr(t,e,r,i??1)}function wr(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Sr(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}`}function Tr(){const t=vr(this.opacity);return`${1===t?"rgb(":"rgba("}${Br(this.r)}, ${Br(this.g)}, ${Br(this.b)}${1===t?")":`, ${t})`}`}function vr(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Br(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function _r(t){return((t=Br(t))<16?"0":"")+t.toString(16)}function Ar(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Fr(t,e,r,i)}function Lr(t){if(t instanceof Fr)return new Fr(t.h,t.s,t.l,t.opacity);if(t instanceof er||(t=mr(t)),!t)return new Fr;if(t instanceof Fr)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),n=Math.max(e,r,i),s=NaN,a=n-o,l=(n+o)/2;return a?(s=e===n?(r-i)/a+6*(r<i):r===n?(i-e)/a+2:(e-r)/a+4,a/=l<.5?n+o:2-n-o,s*=60):a=l>0&&l<1?0:s,new Fr(s,a,l,t.opacity)}function Fr(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Mr(t){return(t=(t||0)%360)<0?t+360:t}function Er(t){return Math.max(0,Math.min(1,t||0))}function $r(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Or(t,e,r,i,o){var n=t*t,s=n*t;return((1-3*t+3*n-s)*e+(4-6*n+3*s)*r+(1+3*t+3*n-3*s)*i+s*o)/6}function Dr(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),o=t[i],n=t[i+1],s=i>0?t[i-1]:2*o-n,a=i<e-1?t[i+2]:2*n-o;return Or((r-i/e)*e,s,o,n,a)}}function Ir(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),o=t[(i+e-1)%e],n=t[i%e],s=t[(i+1)%e],a=t[(i+2)%e];return Or((r-i/e)*e,o,n,s,a)}}Je(er,mr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:fr,formatHex:fr,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Lr(this).formatHsl()},formatRgb:yr,toString:yr}),Je(wr,kr,tr(er,{brighter(t){return t=null==t?ir:Math.pow(ir,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?rr:Math.pow(rr,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wr(Br(this.r),Br(this.g),Br(this.b),vr(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:Sr,formatHex:Sr,formatHex8:function(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}${_r(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Tr,toString:Tr})),Je(Fr,function(t,e,r,i){return 1===arguments.length?Lr(t):new Fr(t,e,r,i??1)},tr(er,{brighter(t){return t=null==t?ir:Math.pow(ir,t),new Fr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?rr:Math.pow(rr,t),new Fr(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,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new wr($r(t>=240?t-240:t+120,o,i),$r(t,o,i),$r(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new Fr(Mr(this.h),Er(this.s),Er(this.l),vr(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=vr(this.opacity);return`${1===t?"hsl(":"hsla("}${Mr(this.h)}, ${100*Er(this.s)}%, ${100*Er(this.l)}%${1===t?")":`, ${t})`}`}})),r.dn(Dr),r.dn(Ir);const qr=t=>()=>t;function Rr(t,e){return function(r){return t+r*e}}function Kr(t){return 1===(t=+t)?zr:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):qr(isNaN(e)?r:e)}}function zr(t,e){var r=e-t;return r?Rr(t,r):qr(isNaN(t)?e:t)}r.dn(qr);const Nr=function t(e){var r=Kr(e);function i(t,e){var i=r((t=kr(t)).r,(e=kr(e)).r),o=r(t.g,e.g),n=r(t.b,e.b),s=zr(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=n(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function Pr(t){return function(e){var r,i,o=e.length,n=new Array(o),s=new Array(o),a=new Array(o);for(r=0;r<o;++r)i=kr(e[r]),n[r]=i.r||0,s[r]=i.g||0,a[r]=i.b||0;return n=t(n),s=t(s),a=t(a),i.opacity=1,function(t){return i.r=n(t),i.g=s(t),i.b=a(t),i+""}}}Pr(Dr),Pr(Ir);r.dn(Hr);var Wr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jr=new RegExp(Wr.source,"g");function Hr(t,e){var r,i,o,n=Wr.lastIndex=jr.lastIndex=0,s=-1,a=[],l=[];for(t+="",e+="";(r=Wr.exec(t))&&(i=jr.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ne(r,i)})),n=jr.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.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 r,i=0;i<e;++i)a[(r=l[i]).i]=r.x(t);return a.join("")})}function Ur(t,e){var r;return("number"==typeof e?Ne:e instanceof mr?Nr:(r=mr(e))?(e=r,Nr):Hr)(t,e)}function Yr(t){return function(){this.removeAttribute(t)}}function Xr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Gr(t,e,r){var i,o,n=r+"";return function(){var s=this.getAttribute(t);return s===n?null:s===i?o:o=e(i=s,r)}}function Vr(t,e,r){var i,o,n=r+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===n?null:s===i?o:o=e(i=s,r)}}function Zr(t,e,r){var i,o,n;return function(){var s,a,l=r(this);if(null!=l)return(s=this.getAttribute(t))===(a=l+"")?null:s===i&&a===o?n:(o=a,n=e(i=s,l));this.removeAttribute(t)}}function Qr(t,e,r){var i,o,n;return function(){var s,a,l=r(this);if(null!=l)return(s=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:s===i&&a===o?n:(o=a,n=e(i=s,l));this.removeAttributeNS(t.space,t.local)}}function Jr(t,e){var r=tt(t),i="transform"===r?Xe:Ur;return this.attrTween(t,"function"==typeof e?(r.local?Qr:Zr)(r,i,Qe(this,"attr."+t,e)):null==e?(r.local?Xr:Yr)(r):(r.local?Vr:Gr)(r,i,e))}function ti(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,o)),r}return o._value=e,o}function ei(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,o)),r}return o._value=e,o}function ri(t,e){var r="attr."+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;var i=tt(t);return this.tween(r,(i.local?ti:ei)(i,e))}function ii(t,e){return function(){Ie(this,t).delay=+e.apply(this,arguments)}}function oi(t,e){return e=+e,function(){Ie(this,t).delay=e}}function ni(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ii:oi)(e,t)):Re(this.node(),e).delay}function si(t,e){return function(){qe(this,t).duration=+e.apply(this,arguments)}}function ai(t,e){return e=+e,function(){qe(this,t).duration=e}}function li(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?si:ai)(e,t)):Re(this.node(),e).duration}function hi(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){qe(this,t).ease=e}}(e,t)):Re(this.node(),e).ease}function ci(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;qe(this,t).ease=r}}(this._id,t))}function di(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var n,s=e[o],a=s.length,l=i[o]=[],h=0;h<a;++h)(n=s[h])&&t.call(n,n.__data__,h,s)&&l.push(n);return new _i(i,this._parents,this._name,this._id)}function ui(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,n=Math.min(i,o),s=new Array(i),a=0;a<n;++a)for(var l,h=e[a],c=r[a],d=h.length,u=s[a]=new Array(d),p=0;p<d;++p)(l=h[p]||c[p])&&(u[p]=l);for(;a<i;++a)s[a]=e[a];return new _i(s,this._parents,this._name,this._id)}function pi(t,e){var r=this._id;return arguments.length<2?Re(this.node(),r).on.on(t):this.each(function(t,e,r){var i,o,n=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)?Ie:qe;return function(){var s=n(this,t),a=s.on;a!==i&&(o=(i=a).copy()).on(e,r),s.on=o}}(r,t,e))}function gi(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))}function fi(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=y(t));for(var i=this._groups,o=i.length,n=new Array(o),s=0;s<o;++s)for(var a,l,h=i[s],c=h.length,d=n[s]=new Array(c),u=0;u<c;++u)(a=h[u])&&(l=t.call(a,a.__data__,u,h))&&("__data__"in a&&(l.__data__=a.__data__),d[u]=l,De(d[u],e,r,u,d,Re(a,r)));return new _i(n,this._parents,e,r)}function yi(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=C(t));for(var i=this._groups,o=i.length,n=[],s=[],a=0;a<o;++a)for(var l,h=i[a],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,p=t.call(l,l.__data__,d,h),g=Re(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&De(u,e,r,f,p,g);n.push(p),s.push(l)}return new _i(n,s,e,r)}r.dn(Ur),r.dn(Jr),r.dn(ri),r.dn(ni),r.dn(li),r.dn(hi),r.dn(ci),r.dn(di),r.dn(ui),r.dn(pi),r.dn(gi),r.dn(fi),r.dn(yi),r.dn(xi);var mi=le.prototype.constructor;function xi(){return new mi(this._groups,this._parents)}function Ci(t){return function(){this.style.removeProperty(t)}}function bi(t,e,r){var i="transform"==(t+="")?Ye:Ur;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var n=pt(this,t),s=(this.style.removeProperty(t),pt(this,t));return n===s?null:n===r&&s===i?o:o=e(r=n,i=s)}}(t,i)).on("end.style."+t,Ci(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,n;return function(){var s=pt(this,t),a=r(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=pt(this,t)),s===l?null:s===i&&l===o?n:(o=l,n=e(i=s,a))}}(t,i,Qe(this,"style."+t,e))).each(function(t,e){var r,i,o,n,s="style."+e,a="end."+s;return function(){var l=qe(this,t),h=l.on,c=null==l.value[s]?n||(n=Ci(e)):void 0;h===r&&o===c||(i=(r=h).copy()).on(a,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,n=r+"";return function(){var s=pt(this,t);return s===n?null:s===i?o:o=e(i=s,r)}}(t,i,e),r).on("end.style."+t,null)}function ki(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,o;function n(){var n=e.apply(this,arguments);return n!==o&&(i=(o=n)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,n,r)),i}return n._value=e,n}(t,e,r??""))}function wi(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=e??""}}(Qe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))}function Si(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,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))}function Ti(){for(var t=this._name,e=this._id,r=Ai(),i=this._groups,o=i.length,n=0;n<o;++n)for(var s,a=i[n],l=a.length,h=0;h<l;++h)if(s=a[h]){var c=Re(s,e);De(s,t,r,h,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new _i(i,this._parents,t,r)}function vi(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(n,s){var a={value:s},l={value:function(){0===--o&&n()}};r.each(function(){var r=qe(this,i),o=r.on;o!==t&&((e=(t=o).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),r.on=e}),0===o&&n()})}r.dn(bi),r.dn(ki),r.dn(wi),r.dn(Si),r.dn(Ti),r.dn(vi);var Bi=0;function _i(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Ai(){return++Bi}var Li=le.prototype;_i.prototype=function(t){return le().transition(t)}.prototype={constructor:_i,select:fi,selectAll:yi,selectChild:Li.selectChild,selectChildren:Li.selectChildren,filter:di,merge:ui,selection:xi,transition:Ti,call:Li.call,nodes:Li.nodes,node:Li.node,size:Li.size,empty:Li.empty,each:Li.each,on:pi,attr:Jr,attrTween:ri,style:bi,styleTween:ki,text:wi,textTween:Si,remove:gi,tween:Ze,delay:ni,duration:li,ease:hi,easeVarying:ci,end:vi,[Symbol.iterator]:Li[Symbol.iterator]},r.dn(qi);var Fi,Mi,Ei,$i,Oi,Di={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ii(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function qi(t){var e,r;t instanceof _i?(e=t._id,t=t._name):(e=Ai(),(r=Di).time=ve(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,n=0;n<o;++n)for(var s,a=i[n],l=a.length,h=0;h<l;++h)(s=a[h])&&De(s,t,e,h,a,r||Ii(s,e));return new _i(i,this._parents,t,e)}le.prototype.interrupt=ze,le.prototype.transition=qi,r.dn(function(){return eo(Xi)});var Ri=null,Ki=null,zi=null;const{abs:Ni,max:Pi,min:Wi}=Math;function ji(t){return[+t[0],+t[1]]}function Hi(t){return[ji(t[0]),ji(t[1])]}var Ui={name:"x",handles:["w","e"].map(Vi),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]]}},Yi={name:"y",handles:["n","s"].map(Vi),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]]}},Xi={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Vi),input:function(t){return null==t?null:Hi(t)},output:function(t){return t}},Gi=null;function Vi(t){return{type:t}}function Zi(t){return!t.ctrlKey&&!t.button}function Qi(){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 Ji(){return navigator.maxTouchPoints||"ontouchstart"in this}function to(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function eo(t){var e,r=Qi,i=Zi,o=Ji,n=!0,s=(void 0)("start","brush","end"),a=6;function l(e){var r=e.property("__brush",f).selectAll(".overlay").data([Vi("overlay")]);r.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Gi.overlay).merge(r).each(function(){var t=to(this).extent;Mi(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([Vi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Gi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return Gi[t.type]}),e.each(h).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",u).filter(o).on("touchstart.brush",u).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){var t=Mi(this),e=to(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]-a/2:e[0][0]-a/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,r){var i=t.__brush.emitter;return!i||r&&i.clean?new d(t,e,r):i}function d(t,e,r){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=r}function u(r){if((!e||r.touches)&&i.apply(this,arguments)){var o,s,a,l,d,u,p,g,f,y,m,x=this,C=r.target.__data__.type,b="selection"===(n&&r.metaKey?C="overlay":C)?null:n&&r.altKey?zi:Ki,k=t===Yi?null:null[C],w=t===Ui?null:null[C],S=to(x),T=S.extent,v=S.selection,B=T[0][0],_=T[0][1],A=T[1][0],L=T[1][1],F=0,M=0,E=k&&w&&n&&r.shiftKey,$=Array.from(r.touches||[r],t=>{const e=t.identifier;return(t=Fi(t,x)).point0=t.slice(),t.identifier=e,t});Ei(x);var O=c(x,arguments,!0).beforestart();if("overlay"===C){v&&(f=!0);const e=[$[0],$[1]||$[0]];S.selection=v=[[o=t===Yi?B:Wi(e[0][0],e[1][0]),a=t===Ui?_:Wi(e[0][1],e[1][1])],[d=t===Yi?A:Pi(e[0][0],e[1][0]),p=t===Ui?L:Pi(e[0][1],e[1][1])]],$.length>1&&K(r)}else o=v[0][0],a=v[0][1],d=v[1][0],p=v[1][1];s=o,l=a,u=d,g=p;var D=Mi(x).attr("pointer-events","none"),I=D.selectAll(".overlay").attr("cursor",Gi[C]);if(r.touches)O.moved=R,O.ended=z;else{var q=Mi(r.view).on("mousemove.brush",R,!0).on("mouseup.brush",z,!0);n&&q.on("keydown.brush",function(t){switch(t.keyCode){case 16:E=k&&w;break;case 18:b===Ki&&(k&&(d=u-F*k,o=s+F*k),w&&(p=g-M*w,a=l+M*w),b=zi,K(t));break;case 32:b!==Ki&&b!==zi||(k<0?d=u-F:k>0&&(o=s-F),w<0?p=g-M:w>0&&(a=l-M),b=Ri,I.attr("cursor",Gi.selection),K(t));break;default:return}Oi(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:E&&(y=m=E=!1,K(t));break;case 18:b===zi&&(k<0?d=u:k>0&&(o=s),w<0?p=g:w>0&&(a=l),b=Ki,K(t));break;case 32:b===Ri&&(t.altKey?(k&&(d=u-F*k,o=s+F*k),w&&(p=g-M*w,a=l+M*w),b=zi):(k<0?d=u:k>0&&(o=s),w<0?p=g:w>0&&(a=l),b=Ki),I.attr("cursor",Gi[C]),K(t));break;default:return}Oi(t)},!0),(void 0)(r.view)}h.call(x),O.start(r,b.name)}function R(t){for(const e of t.changedTouches||[t])for(const t of $)t.identifier===e.identifier&&(t.cur=Fi(e,x));if(E&&!y&&!m&&1===$.length){const t=$[0];Ni(t.cur[0]-t[0])>Ni(t.cur[1]-t[1])?m=!0:y=!0}for(const t of $)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);f=!0,Oi(t),K(t)}function K(t){const e=$[0],r=e.point0;var i;switch(F=e[0]-r[0],M=e[1]-r[1],b){case Ri:case null:k&&(F=Pi(B-o,Wi(A-d,F)),s=o+F,u=d+F),w&&(M=Pi(_-a,Wi(L-p,M)),l=a+M,g=p+M);break;case Ki:$[1]?(k&&(s=Pi(B,Wi(A,$[0][0])),u=Pi(B,Wi(A,$[1][0])),k=1),w&&(l=Pi(_,Wi(L,$[0][1])),g=Pi(_,Wi(L,$[1][1])),w=1)):(k<0?(F=Pi(B-o,Wi(A-o,F)),s=o+F,u=d):k>0&&(F=Pi(B-d,Wi(A-d,F)),s=o,u=d+F),w<0?(M=Pi(_-a,Wi(L-a,M)),l=a+M,g=p):w>0&&(M=Pi(_-p,Wi(L-p,M)),l=a,g=p+M));break;case zi:k&&(s=Pi(B,Wi(A,o-F*k)),u=Pi(B,Wi(A,d+F*k))),w&&(l=Pi(_,Wi(L,a-M*w)),g=Pi(_,Wi(L,p+M*w)))}u<s&&(k*=-1,i=o,o=d,d=i,i=s,s=u,u=i,C in null&&I.attr("cursor",Gi[C=null[C]])),g<l&&(w*=-1,i=a,a=p,p=i,i=l,l=g,g=i,C in null&&I.attr("cursor",Gi[C=null[C]])),S.selection&&(v=S.selection),y&&(s=v[0][0],u=v[1][0]),m&&(l=v[0][1],g=v[1][1]),v[0][0]===s&&v[0][1]===l&&v[1][0]===u&&v[1][1]===g||(S.selection=[[s,l],[u,g]],h.call(x),O.brush(t,b.name))}function z(t){if((void 0)(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else(void 0)(t.view,f),q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);D.attr("pointer-events","all"),I.attr("cursor",Gi.overlay),S.selection&&(v=S.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(v)&&(S.selection=null,h.call(x)),O.end(t,b.name)}}function p(t){c(this,arguments).moved(t)}function g(t){c(this,arguments).ended(t)}function f(){var e=this.__brush||{selection:null};return e.extent=Hi(r.apply(this,arguments)),e.dim=t,e}return l.move=function(e,r,i){e.tween?e.on("start.brush",function(t){c(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){c(this,arguments).end(t)}).tween("brush",function(){var e=this,i=e.__brush,o=c(e,arguments),n=i.selection,s=t.input("function"==typeof r?r.apply(this,arguments):r,i.extent),a=(void 0)(n,s);function l(t){i.selection=1===t&&null===s?null:a(t),h.call(e),o.brush()}return null!==n&&null!==s?l:l(1)}):e.each(function(){var e=this,o=arguments,n=e.__brush,s=t.input("function"==typeof r?r.apply(e,o):r,n.extent),a=c(e,o).beforestart();Ei(e),n.selection=null===s?null:s,h.call(e),a.start(i).brush(i).end(i)})},l.clear=function(t,e){l.move(t,null,e)},d.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,r,i){var o=Mi(this.that).datum();s.call(e,this.that,new(void 0)(e,{sourceEvent:r,target:l,selection:t.output(this.state.selection),mode:i,dispatch:s}),o)}},l.extent=function(t){return arguments.length?(r="function"==typeof t?t:$i(Hi(t)),l):r},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:$i(!!t),l):i},l.touchable=function(t){return arguments.length?(o="function"==typeof t?t:$i(!!t),l):o},l.handleSize=function(t){return arguments.length?(a=+t,l):a},l.keyModifiers=function(t){return arguments.length?(n=!!t,l):n},l.on=function(){var t=s.on.apply(s,arguments);return t===s?l:t},l}function ro(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function io(t,e){if(!isFinite(t)||0===t)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function oo(t){return(t=io(Math.abs(t)))?t[1]:NaN}function no(t,e){return function(r,i){for(var o=r.length,n=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),n.push(r.substring(o-=a,o+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return n.reverse().join(e)}}function so(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}r.dn(ro),r.dn(oo),r.dn(no),r.dn(so);var ao,lo=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ho(t){if(!(e=lo.exec(t)))throw new Error("invalid format: "+t);var e;return new co({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 co(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 uo(t){t:for(var e,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;default:if(!+t[i])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}function po(t,e){var r=io(t,e);if(!r)return ao=void 0,t.toPrecision(e);var i=r[0],o=r[1],n=o-(ao=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return n===s?i:n>s?i+new Array(n-s+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+io(t,Math.max(0,e+n-1))[0]}function go(t,e){var r=io(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}ho.prototype=co.prototype,co.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},r.dn(uo),r.dn(po),r.dn(go);const fo={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ro,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)=>go(100*t,e),r:go,s:po,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function yo(t){return t}r.dn(yo),r.dn(wo);var mo,xo,Co,bo=Array.prototype.map,ko=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wo(t){var e=void 0===t.grouping||void 0===t.thousands?yo:no(bo.call(t.grouping,Number),t.thousands+""),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",n=void 0===t.numerals?yo:so(bo.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t,h){var c=(t=ho(t)).fill,d=t.align,u=t.sign,p=t.symbol,g=t.zero,f=t.width,y=t.comma,m=t.precision,x=t.trim,C=t.type;"n"===C?(y=!0,C="g"):fo[C]||(void 0===m&&(m=12),x=!0,C="g"),(g||"0"===c&&"="===d)&&(g=!0,c="0",d="=");var b=(h&&void 0!==h.prefix?h.prefix:"")+("$"===p?r:"#"===p&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),k=("$"===p?i:/[%p]/.test(C)?s:"")+(h&&void 0!==h.suffix?h.suffix:""),w=fo[C],S=/[defgprs%]/.test(C);function T(t){var r,i,s,h=b,p=k;if("c"===C)p=w(t)+p,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),m),x&&(t=uo(t)),T&&0===+t&&"+"!==u&&(T=!1),h=(T?"("===u?u:a:"-"===u||"("===u?"":u)+h,p=("s"!==C||isNaN(t)||void 0===ao?"":ko[8+ao/3])+p+(T&&"("===u?")":""),S)for(r=-1,i=t.length;++r<i;)if(48>(s=t.charCodeAt(r))||s>57){p=(46===s?o+t.slice(r+1):t.slice(r))+p,t=t.slice(0,r);break}}y&&!g&&(t=e(t,1/0));var v=h.length+t.length+p.length,B=v<f?new Array(f-v+1).join(c):"";switch(y&&g&&(t=e(B+t,B.length?f-p.length:1/0),B=""),d){case"<":t=h+t+p+B;break;case"=":t=h+B+t+p;break;case"^":t=B.slice(0,v=B.length>>1)+h+t+p+B.slice(v);break;default:t=B+h+t+p}return n(t)}return m=void 0===m?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(oo(e)/3))),i=Math.pow(10,-r),o=h(((t=ho(t)).type="f",t),{suffix:ko[8+r/3]});return function(t){return o(i*t)}}}}function So(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function To(){return this.eachAfter(So)}function vo(t,e){let r=-1;for(const i of this)t.call(e,i,++r,this);return this}function Bo(t,e){for(var r,i,o=this,n=[o],s=-1;o=n.pop();)if(t.call(e,o,++s,this),r=o.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function _o(t,e){for(var r,i,o,n=this,s=[n],a=[],l=-1;n=s.pop();)if(a.push(n),r=n.children)for(i=0,o=r.length;i<o;++i)s.push(r[i]);for(;n=a.pop();)t.call(e,n,++l,this);return this}function Ao(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i}function Lo(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,o=i&&i.length;--o>=0;)r+=i[o].value;e.value=r})}function Fo(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function Mo(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),o=null;t=r.pop(),e=i.pop();for(;t===e;)o=t,t=r.pop(),e=i.pop();return o}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;t!==r;)i.splice(o,0,t),t=t.parent;return i}function Eo(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function $o(){return Array.from(this)}function Oo(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function Do(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*Io(){var t,e,r,i,o=this,n=[o];do{for(t=n.reverse(),n=[];o=t.pop();)if(yield o,e=o.children)for(r=0,i=e.length;r<i;++r)n.push(e[r])}while(n.length)}function qo(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Ko)):void 0===e&&(e=Ro);for(var r,i,o,n,s,a=new Po(t),l=[a];r=l.pop();)if((o=e(r.data))&&(s=(o=Array.from(o)).length))for(r.children=o,n=s-1;n>=0;--n)l.push(i=o[n]=new Po(o[n])),i.parent=r,i.depth=r.depth+1;return a.eachBefore(No)}function Ro(t){return t.children}function Ko(t){return Array.isArray(t)?t[1]:null}function zo(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function No(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Po(t){this.data=t,this.depth=this.height=0,this.parent=null}function Wo(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 jo(t,e,r,i,o){for(var n,s=t.children,a=-1,l=s.length,h=t.value&&(i-e)/t.value;++a<l;)(n=s[a]).y0=r,n.y1=o,n.x0=e,n.x1=e+=n.value*h}function Ho(t,e,r,i,o){for(var n,s=t.children,a=-1,l=s.length,h=t.value&&(o-r)/t.value;++a<l;)(n=s[a]).x0=e,n.x1=i,n.y0=r,n.y1=r+=n.value*h}mo=wo({thousands:",",grouping:[3],currency:["$",""]}),xo=mo.format,Co=mo.formatPrefix,r.dn(To),r.dn(vo),r.dn(Bo),r.dn(_o),r.dn(Ao),r.dn(Lo),r.dn(Fo),r.dn(Mo),r.dn(Eo),r.dn($o),r.dn(Oo),r.dn(Do),r.dn(Io),Po.prototype=qo.prototype={constructor:Po,count:To,each:vo,eachAfter:_o,eachBefore:Bo,find:Ao,sum:Lo,sort:Fo,path:Mo,ancestors:Eo,descendants:$o,leaves:Oo,links:Do,copy:function(){return qo(this).eachBefore(zo)},[Symbol.iterator]:Io},r.dn(Wo),r.dn(jo),r.dn(Ho);const Uo=function t(e){function r(t,r,i,o,n){!function(t,e,r,i,o,n){for(var s,a,l,h,c,d,u,p,g,f,y,m=[],x=e.children,C=0,b=0,k=x.length,w=e.value;C<k;){l=o-r,h=n-i;do{c=x[b++].value}while(!c&&b<k);for(d=u=c,y=c*c*(f=Math.max(h/l,l/h)/(w*t)),g=Math.max(u/y,y/d);b<k;++b){if(c+=a=x[b].value,a<d&&(d=a),a>u&&(u=a),y=c*c*f,(p=Math.max(u/y,y/d))>g){c-=a;break}g=p}m.push(s={value:c,dice:l<h,children:x.slice(C,b)}),s.dice?jo(s,r,i,o,w?i+=h*c/w:n):Ho(s,r,i,w?r+=l*c/w:o,n),w-=c,C=b}}(e,t,r,i,o,n)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}((1+Math.sqrt(5))/2);function Yo(t){if("function"!=typeof t)throw new Error;return t}function Xo(){return 0}function Go(t){return function(){return t}}function Vo(){var t=Uo,e=!1,r=1,i=1,o=[0],n=Xo,s=Xo,a=Xo,l=Xo,h=Xo;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(d),o=[0],e&&t.eachBefore(Wo),t}function d(e){var r=o[e.depth],i=e.x0+r,c=e.y0+r,d=e.x1-r,u=e.y1-r;d<i&&(i=d=(i+d)/2),u<c&&(c=u=(c+u)/2),e.x0=i,e.y0=c,e.x1=d,e.y1=u,e.children&&(r=o[e.depth+1]=n(e)/2,i+=h(e)-r,c+=s(e)-r,(d-=a(e)-r)<i&&(i=d=(i+d)/2),(u-=l(e)-r)<c&&(c=u=(c+u)/2),t(e,i,c,d,u))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],i=+t[1],c):[r,i]},c.tile=function(e){return arguments.length?(t=Yo(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(n="function"==typeof t?t:Go(+t),c):n},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(s="function"==typeof t?t:Go(+t),c):s},c.paddingRight=function(t){return arguments.length?(a="function"==typeof t?t:Go(+t),c):a},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:Go(+t),c):l},c.paddingLeft=function(t){return arguments.length?(h="function"==typeof t?t:Go(+t),c):h},c}r.dn(Go),r.dn(Vo);const Zo=Math.PI/180,Qo=180/Math.PI,Jo=.96422,tn=.82521,en=4/29,rn=6/29,on=3*rn*rn,nn=rn*rn*rn;function sn(t){if(t instanceof an)return new an(t.l,t.a,t.b,t.opacity);if(t instanceof gn)return fn(t);t instanceof wr||(t=br(t));var e,r,i=dn(t.r),o=dn(t.g),n=dn(t.b),s=ln((.2225045*i+.7168786*o+.0606169*n)/1);return i===o&&o===n?e=r=s:(e=ln((.4360747*i+.3850649*o+.1430804*n)/Jo),r=ln((.0139322*i+.0971045*o+.7141733*n)/tn)),new an(116*s-16,500*(e-s),200*(s-r),t.opacity)}function an(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function ln(t){return t>nn?Math.pow(t,1/3):t/on+en}function hn(t){return t>rn?t*t*t:on*(t-en)}function cn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function dn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function un(t){if(t instanceof gn)return new gn(t.h,t.c,t.l,t.opacity);if(t instanceof an||(t=sn(t)),0===t.a&&0===t.b)return new gn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Qo;return new gn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function pn(t,e,r,i){return 1===arguments.length?un(t):new gn(t,e,r,i??1)}function gn(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function fn(t){if(isNaN(t.h))return new an(t.l,0,0,t.opacity);var e=t.h*Zo;return new an(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function yn(t){return function(e,r){var i=t((e=pn(e)).h,(r=pn(r)).h),o=zr(e.c,r.c),n=zr(e.l,r.l),s=zr(e.opacity,r.opacity);return function(t){return e.h=i(t),e.c=o(t),e.l=n(t),e.opacity=s(t),e+""}}}Je(an,function(t,e,r,i){return 1===arguments.length?sn(t):new an(t,e,r,i??1)},tr(er,{brighter(t){return new an(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new an(this.l-18*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new wr(cn(3.1338561*(e=Jo*hn(e))-1.6168667*(t=1*hn(t))-.4906146*(r=tn*hn(r))),cn(-.9787684*e+1.9161415*t+.033454*r),cn(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Je(gn,pn,tr(er,{brighter(t){return new gn(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new gn(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return fn(this).rgb()}}));const mn=yn(function(t,e){var r=e-t;return r?Rr(t,r>180||r<-180?r-360*Math.round(r/360):r):qr(isNaN(t)?e:t)});yn(zr);function xn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class Cn extends Map{constructor(t,e=Sn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(bn(this,t))}has(t){return super.has(bn(this,t))}set(t,e){return super.set(kn(this,t),e)}delete(t){return super.delete(wn(this,t))}}Set;function bn({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function kn({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function wn({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Sn(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Tn=Symbol("implicit");function vn(){var t=new Cn,e=[],r=[],i=Tn;function o(o){let n=t.get(o);if(void 0===n){if(i!==Tn)return i;t.set(o,n=e.push(o)-1)}return r[n%r.length]}return o.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new Cn;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return o},o.range=function(t){return arguments.length?(r=Array.from(t),o):r.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return vn(e,r).unknown(i)},xn.apply(o,arguments),o}function Bn(){var t,e,r=vn().unknown(void 0),i=r.domain,o=r.range,n=0,s=1,a=!1,l=0,h=0,c=.5;function d(){var r=i().length,d=s<n,u=d?s:n,p=d?n:s;t=(p-u)/Math.max(1,r-l+2*h),a&&(t=Math.floor(t)),u+=(p-u-t*(r-l))*c,e=t*(1-l),a&&(u=Math.round(u),e=Math.round(e));var g=function(t,e,r){t=+t,e=+e,r=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+r;for(var i=-1,o=0|Math.max(0,Math.ceil((e-t)/r)),n=new Array(o);++i<o;)n[i]=t+i*r;return n}(r).map(function(e){return u+t*e});return o(d?g.reverse():g)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),d()):i()},r.range=function(t){return arguments.length?([n,s]=t,n=+n,s=+s,d()):[n,s]},r.rangeRound=function(t){return[n,s]=t,n=+n,s=+s,a=!0,d()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(a=!!t,d()):a},r.padding=function(t){return arguments.length?(l=Math.min(1,h=+t),d()):l},r.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},r.paddingOuter=function(t){return arguments.length?(h=+t,d()):h},r.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},r.copy=function(){return Bn(i(),[n,s]).round(a).paddingInner(l).paddingOuter(h).align(c)},xn.apply(d(),arguments)}const _n=Math.sqrt(50),An=Math.sqrt(10),Ln=Math.sqrt(2);function Fn(t,e,r){const i=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(i)),n=i/Math.pow(10,o),s=n>=_n?10:n>=An?5:n>=Ln?2:1;let a,l,h;return o<0?(h=Math.pow(10,-o)/s,a=Math.round(t*h),l=Math.round(e*h),a/h<t&&++a,l/h>e&&--l,h=-h):(h=Math.pow(10,o)*s,a=Math.round(t/h),l=Math.round(e/h),a*h<t&&++a,l*h>e&&--l),l<a&&.5<=r&&r<2?Fn(t,e,2*r):[a,l,h]}function Mn(t,e,r){return Fn(t=+t,e=+e,r=+r)[2]}function En(t,e,r){r=+r;const i=(e=+e)<(t=+t),o=i?Mn(e,t,r):Mn(t,e,r);return(i?-1:1)*(o<0?1/-o:o)}function $n(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function On(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Dn(t){let e,r,i;function o(t,i,o=0,n=t.length){if(o<n){if(0!==e(i,i))return n;do{const e=o+n>>>1;r(t[e],i)<0?o=e+1:n=e}while(o<n)}return o}return 2!==t.length?(e=$n,r=(e,r)=>$n(t(e),r),i=(e,r)=>t(e)-r):(e=t===$n||t===On?t:In,r=t,i=t),{left:o,center:function(t,e,r=0,n=t.length){const s=o(t,e,r,n-1);return s>r&&i(t[s-1],e)>-i(t[s],e)?s-1:s},right:function(t,i,o=0,n=t.length){if(o<n){if(0!==e(i,i))return n;do{const e=o+n>>>1;r(t[e],i)<=0?o=e+1:n=e}while(o<n)}return o}}}function In(){return 0}const qn=Dn($n),Rn=qn.right,Kn=(qn.left,Dn(function(t){return null===t?NaN:+t}).center,Rn);function zn(t,e){var r,i=e?e.length:0,o=t?Math.min(i,t.length):0,n=new Array(o),s=new Array(i);for(r=0;r<o;++r)n[r]=jn(t[r],e[r]);for(;r<i;++r)s[r]=e[r];return function(t){for(r=0;r<o;++r)s[r]=n[r](t);return s}}function Nn(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function Pn(t,e){var r,i={},o={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?i[r]=jn(t[r],e[r]):o[r]=e[r];return function(t){for(r in i)o[r]=i[r](t);return o}}function Wn(t,e){e||(e=[]);var r,i=t?Math.min(e.length,t.length):0,o=e.slice();return function(n){for(r=0;r<i;++r)o[r]=t[r]*(1-n)+e[r]*n;return o}}function jn(t,e){var r,i,o=typeof e;return null==e||"boolean"===o?qr(e):("number"===o?Ne:"string"===o?(r=mr(e))?(e=r,Nr):Hr:e instanceof mr?Nr:e instanceof Date?Nn:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?zn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Pn:Ne:Wn))(t,e)}function Hn(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function Un(t){return+t}r.dn(function(t,e){return((void 0)(e)?void 0:zn)(t,e)}),r.dn(Nn),r.dn(Pn),r.dn(Wn),r.dn(jn),r.dn(Hn);var Yn=[0,1];function Xn(t){return t}function Gn(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:(r=isNaN(e)?NaN:.5,function(){return r});var r}function Vn(t,e,r){var i=t[0],o=t[1],n=e[0],s=e[1];return o<i?(i=Gn(o,i),n=r(s,n)):(i=Gn(i,o),n=r(n,s)),function(t){return n(i(t))}}function Zn(t,e,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),n=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)o[s]=Gn(t[s],t[s+1]),n[s]=r(e[s],e[s+1]);return function(e){var r=Kn(t,e,1,i)-1;return n[r](o[r](e))}}function Qn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Jn(){var t,e,r,i,o,n,s=Yn,a=Yn,l=jn,h=Xn;function c(){var t,e,r,l=Math.min(s.length,a.length);return h!==Xn&&(t=s[0],e=s[l-1],t>e&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?Zn:Vn,o=n=null,d}function d(e){return null==e||isNaN(e=+e)?r:(o||(o=i(s.map(t),a,l)))(t(h(e)))}return d.invert=function(r){return h(e((n||(n=i(a,s.map(t),Ne)))(r)))},d.domain=function(t){return arguments.length?(s=Array.from(t,Un),c()):s.slice()},d.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},d.rangeRound=function(t){return a=Array.from(t),l=Hn,c()},d.clamp=function(t){return arguments.length?(h=!!t||Xn,c()):h!==Xn},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,i){return t=r,e=i,c()}}function ts(){return Jn()(Xn,Xn)}function es(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(oo(e)/3)))-oo(Math.abs(t)))}function rs(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,oo(e)-oo(t))+1}function is(t){return Math.max(0,-oo(Math.abs(t)))}function os(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[o,n,s]=i?Fn(e,t,r):Fn(t,e,r);if(!(n>=o))return[];const a=n-o+1,l=new Array(a);if(i)if(s<0)for(let t=0;t<a;++t)l[t]=(n-t)/-s;else for(let t=0;t<a;++t)l[t]=(n-t)*s;else if(s<0)for(let t=0;t<a;++t)l[t]=(o+t)/-s;else for(let t=0;t<a;++t)l[t]=(o+t)*s;return l}(r[0],r[r.length-1],t??10)},t.tickFormat=function(t,r){var i=e();return function(t,e,r,i){var o,n=En(t,e,r);switch((i=ho(i??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(o=es(n,s))||(i.precision=o),Co(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=rs(n,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=is(n))||(i.precision=o-2*("%"===i.type))}return xo(i)}(i[0],i[i.length-1],t??10,r)},t.nice=function(r){null==r&&(r=10);var i,o,n=e(),s=0,a=n.length-1,l=n[s],h=n[a],c=10;for(h<l&&(o=l,l=h,h=o,o=s,s=a,a=o);c-- >0;){if((o=Mn(l,h,r))===i)return n[s]=l,n[a]=h,e(n);if(o>0)l=Math.floor(l/o)*o,h=Math.ceil(h/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,h=Math.floor(h*o)/o}i=o}return t},t}function ns(){var t=ts();return t.copy=function(){return Qn(t,ns())},xn.apply(t,arguments),os(t)}r.dn(es),r.dn(rs),r.dn(is);const ss=36e5,as=864e5,ls=6048e5,hs=2592e6,cs=31536e6,ds=new Date,us=new Date;function ps(t,e,r,i){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{const e=o(t),r=o.ceil(t);return t-e<r-t?e:r},o.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,i,n)=>{const s=[];if(r=o.ceil(r),n=null==n?1:Math.floor(n),!(r<i&&n>0))return s;let a;do{s.push(a=new Date(+r)),e(r,n),t(r)}while(a<r&&r<i);return s},o.filter=r=>ps(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(o.count=(e,i)=>(ds.setTime(+e),us.setTime(+i),t(ds),t(us),Math.floor(r(ds,us))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(i?e=>i(e)%t===0:e=>o.count(0,e)%t===0):o:null)),o}const gs=ps(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);gs.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?ps(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):gs:null);gs.range;const fs=ps(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),ys=(fs.range,ps(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes())),ms=(ys.range,ps(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())),xs=(ms.range,ps(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+e*ss)},(t,e)=>(e-t)/ss,t=>t.getHours())),Cs=(xs.range,ps(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ss)},(t,e)=>(e-t)/ss,t=>t.getUTCHours())),bs=(Cs.range,ps(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/as,t=>t.getDate()-1)),ks=(bs.range,ps(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/as,t=>t.getUTCDate()-1)),ws=(ks.range,ps(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/as,t=>Math.floor(t/as)));ws.range;function Ss(t){return ps(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-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/ls)}const Ts=Ss(0),vs=Ss(1),Bs=Ss(2),_s=Ss(3),As=Ss(4),Ls=Ss(5),Fs=Ss(6);Ts.range,vs.range,Bs.range,_s.range,As.range,Ls.range,Fs.range;function Ms(t){return ps(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)/ls)}const Es=Ms(0),$s=Ms(1),Os=Ms(2),Ds=Ms(3),Is=Ms(4),qs=Ms(5),Rs=Ms(6),Ks=(Es.range,$s.range,Os.range,Ds.range,Is.range,qs.range,Rs.range,ps(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())),zs=(Ks.range,ps(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())),Ns=(zs.range,ps(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()));Ns.every=t=>isFinite(t=Math.floor(t))&&t>0?ps(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null;Ns.range;const Ps=ps(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());Ps.every=t=>isFinite(t=Math.floor(t))&&t>0?ps(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null;Ps.range;function Ws(t,e,r,i,o,n){const s=[[fs,1,1e3],[fs,5,5e3],[fs,15,15e3],[fs,30,3e4],[n,1,6e4],[n,5,3e5],[n,15,9e5],[n,30,18e5],[o,1,ss],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,as],[i,2,1728e5],[r,1,ls],[e,1,hs],[e,3,7776e6],[t,1,cs]];function a(e,r,i){const o=Math.abs(r-e)/i,n=Dn(([,,t])=>t).right(s,o);if(n===s.length)return t.every(En(e/cs,r/cs,i));if(0===n)return gs.every(Math.max(En(e,r,i),1));const[a,l]=s[o/s[n-1][2]<s[n][2]/o?n-1:n];return a.every(l)}return[function(t,e,r){const i=e<t;i&&([t,e]=[e,t]);const o=r&&"function"==typeof r.range?r:a(t,e,r),n=o?o.range(t,+e+1):[];return i?n.reverse():n},a]}const[js,Hs]=Ws(Ps,zs,Es,ws,Cs,ms),[Us,Ys]=Ws(Ns,Ks,Ts,bs,xs,ys);function Xs(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 Gs(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 Vs(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var Zs,Qs,Js={"-":"",_:" ",0:"0"},ta=/^\s*\d+/,ea=/^%/,ra=/[\\^$*+?|[\]().{}]/g;function ia(t,e,r){var i=t<0?"-":"",o=(i?-t:t)+"",n=o.length;return i+(n<r?new Array(r-n+1).join(e)+o:o)}function oa(t){return t.replace(ra,"\\$&")}function na(t){return new RegExp("^(?:"+t.map(oa).join("|")+")","i")}function sa(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function aa(t,e,r){var i=ta.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function la(t,e,r){var i=ta.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function ha(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function ca(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function da(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function ua(t,e,r){var i=ta.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function pa(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function ga(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function fa(t,e,r){var i=ta.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function ya(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function ma(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function xa(t,e,r){var i=ta.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function Ca(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function ba(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function ka(t,e,r){var i=ta.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function wa(t,e,r){var i=ta.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Sa(t,e,r){var i=ta.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Ta(t,e,r){var i=ea.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function va(t,e,r){var i=ta.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Ba(t,e,r){var i=ta.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function _a(t,e){return ia(t.getDate(),e,2)}function Aa(t,e){return ia(t.getHours(),e,2)}function La(t,e){return ia(t.getHours()%12||12,e,2)}function Fa(t,e){return ia(1+bs.count(Ns(t),t),e,3)}function Ma(t,e){return ia(t.getMilliseconds(),e,3)}function Ea(t,e){return Ma(t,e)+"000"}function $a(t,e){return ia(t.getMonth()+1,e,2)}function Oa(t,e){return ia(t.getMinutes(),e,2)}function Da(t,e){return ia(t.getSeconds(),e,2)}function Ia(t){var e=t.getDay();return 0===e?7:e}function qa(t,e){return ia(Ts.count(Ns(t)-1,t),e,2)}function Ra(t){var e=t.getDay();return e>=4||0===e?As(t):As.ceil(t)}function Ka(t,e){return t=Ra(t),ia(As.count(Ns(t),t)+(4===Ns(t).getDay()),e,2)}function za(t){return t.getDay()}function Na(t,e){return ia(vs.count(Ns(t)-1,t),e,2)}function Pa(t,e){return ia(t.getFullYear()%100,e,2)}function Wa(t,e){return ia((t=Ra(t)).getFullYear()%100,e,2)}function ja(t,e){return ia(t.getFullYear()%1e4,e,4)}function Ha(t,e){var r=t.getDay();return ia((t=r>=4||0===r?As(t):As.ceil(t)).getFullYear()%1e4,e,4)}function Ua(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ia(e/60|0,"0",2)+ia(e%60,"0",2)}function Ya(t,e){return ia(t.getUTCDate(),e,2)}function Xa(t,e){return ia(t.getUTCHours(),e,2)}function Ga(t,e){return ia(t.getUTCHours()%12||12,e,2)}function Va(t,e){return ia(1+ks.count(Ps(t),t),e,3)}function Za(t,e){return ia(t.getUTCMilliseconds(),e,3)}function Qa(t,e){return Za(t,e)+"000"}function Ja(t,e){return ia(t.getUTCMonth()+1,e,2)}function tl(t,e){return ia(t.getUTCMinutes(),e,2)}function el(t,e){return ia(t.getUTCSeconds(),e,2)}function rl(t){var e=t.getUTCDay();return 0===e?7:e}function il(t,e){return ia(Es.count(Ps(t)-1,t),e,2)}function ol(t){var e=t.getUTCDay();return e>=4||0===e?Is(t):Is.ceil(t)}function nl(t,e){return t=ol(t),ia(Is.count(Ps(t),t)+(4===Ps(t).getUTCDay()),e,2)}function sl(t){return t.getUTCDay()}function al(t,e){return ia($s.count(Ps(t)-1,t),e,2)}function ll(t,e){return ia(t.getUTCFullYear()%100,e,2)}function hl(t,e){return ia((t=ol(t)).getUTCFullYear()%100,e,2)}function cl(t,e){return ia(t.getUTCFullYear()%1e4,e,4)}function dl(t,e){var r=t.getUTCDay();return ia((t=r>=4||0===r?Is(t):Is.ceil(t)).getUTCFullYear()%1e4,e,4)}function ul(){return"+0000"}function pl(){return"%"}function gl(t){return+t}function fl(t){return Math.floor(+t/1e3)}function yl(t){return new Date(t)}function ml(t){return t instanceof Date?+t:+new Date(+t)}function xl(t,e,r,i,o,n,s,a,l,h){var c=ts(),d=c.invert,u=c.domain,p=h(".%L"),g=h(":%S"),f=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),x=h("%b %d"),C=h("%B"),b=h("%Y");function k(t){return(l(t)<t?p:a(t)<t?g:s(t)<t?f:n(t)<t?y:i(t)<t?o(t)<t?m:x:r(t)<t?C:b)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?u(Array.from(t,ml)):u().map(yl)},c.ticks=function(e){var r=u();return t(r[0],r[r.length-1],e??10)},c.tickFormat=function(t,e){return null==e?k:h(e)},c.nice=function(t){var r=u();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],t??10)),t?u(function(t,e){var r,i=0,o=(t=t.slice()).length-1,n=t[i],s=t[o];return s<n&&(r=i,i=o,o=r,r=n,n=s,s=r),t[i]=e.floor(n),t[o]=e.ceil(s),t}(r,t)):c},c.copy=function(){return Qn(c,xl(t,e,r,i,o,n,s,a,l,h))},c}function Cl(){return xn.apply(xl(Us,Ys,Ns,Ks,Ts,bs,xs,ys,fs,Qs).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bl(t){for(var e=t.length/6|0,r=new Array(e),i=0;i<e;)r[i]="#"+t.slice(6*i,6*++i);return r}!function(t){Zs=function(t){var e=t.dateTime,r=t.date,i=t.time,o=t.periods,n=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,h=na(o),c=sa(o),d=na(n),u=sa(n),p=na(s),g=sa(s),f=na(a),y=sa(a),m=na(l),x=sa(l),C={a:function(t){return s[t.getDay()]},A:function(t){return n[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:_a,e:_a,f:Ea,g:Wa,G:Ha,H:Aa,I:La,j:Fa,L:Ma,m:$a,M:Oa,p:function(t){return o[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:gl,s:fl,S:Da,u:Ia,U:qa,V:Ka,w:za,W:Na,x:null,X:null,y:Pa,Y:ja,Z:Ua,"%":pl},b={a:function(t){return s[t.getUTCDay()]},A:function(t){return n[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Ya,e:Ya,f:Qa,g:hl,G:dl,H:Xa,I:Ga,j:Va,L:Za,m:Ja,M:tl,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:gl,s:fl,S:el,u:rl,U:il,V:nl,w:sl,W:al,x:null,X:null,y:ll,Y:cl,Z:ul,"%":pl},k={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=g.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=d.exec(e.slice(r));return i?(t.w=u.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=f.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return T(t,e,r,i)},d:ma,e:ma,f:Sa,g:pa,G:ua,H:Ca,I:Ca,j:xa,L:wa,m:ya,M:ba,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:fa,Q:va,s:Ba,S:ka,u:la,U:ha,V:ca,w:aa,W:da,x:function(t,e,i){return T(t,r,e,i)},X:function(t,e,r){return T(t,i,e,r)},y:pa,Y:ua,Z:ga,"%":Ta};function w(t,e){return function(r){var i,o,n,s=[],a=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++a<h;)37===t.charCodeAt(a)&&(s.push(t.slice(l,a)),null!=(o=Js[i=t.charAt(++a)])?i=t.charAt(++a):o="e"===i?" ":"0",(n=e[i])&&(i=n(r,o)),s.push(i),l=a+1);return s.push(t.slice(l,a)),s.join("")}}function S(t,e){return function(r){var i,o,n=Vs(1900,void 0,1);if(T(n,t,r+="",0)!=r.length)return null;if("Q"in n)return new Date(n.Q);if("s"in n)return new Date(1e3*n.s+("L"in n?n.L:0));if(e&&!("Z"in n)&&(n.Z=0),"p"in n&&(n.H=n.H%12+12*n.p),void 0===n.m&&(n.m="q"in n?n.q:0),"V"in n){if(n.V<1||n.V>53)return null;"w"in n||(n.w=1),"Z"in n?(o=(i=Gs(Vs(n.y,0,1))).getUTCDay(),i=o>4||0===o?$s.ceil(i):$s(i),i=ks.offset(i,7*(n.V-1)),n.y=i.getUTCFullYear(),n.m=i.getUTCMonth(),n.d=i.getUTCDate()+(n.w+6)%7):(o=(i=Xs(Vs(n.y,0,1))).getDay(),i=o>4||0===o?vs.ceil(i):vs(i),i=bs.offset(i,7*(n.V-1)),n.y=i.getFullYear(),n.m=i.getMonth(),n.d=i.getDate()+(n.w+6)%7)}else("W"in n||"U"in n)&&("w"in n||(n.w="u"in n?n.u%7:"W"in n?1:0),o="Z"in n?Gs(Vs(n.y,0,1)).getUTCDay():Xs(Vs(n.y,0,1)).getDay(),n.m=0,n.d="W"in n?(n.w+6)%7+7*n.W-(o+5)%7:n.w+7*n.U-(o+6)%7);return"Z"in n?(n.H+=n.Z/100|0,n.M+=n.Z%100,Gs(n)):Xs(n)}}function T(t,e,r,i){for(var o,n,s=0,a=e.length,l=r.length;s<a;){if(i>=l)return-1;if(37===(o=e.charCodeAt(s++))){if(o=e.charAt(s++),!(n=k[o in Js?e.charAt(s++):o])||(i=n(t,r,i))<0)return-1}else if(o!=r.charCodeAt(i++))return-1}return i}return C.x=w(r,C),C.X=w(i,C),C.c=w(e,C),b.x=w(r,b),b.X=w(i,b),b.c=w(e,b),{format:function(t){var e=w(t+="",C);return e.toString=function(){return t},e},parse:function(t){var e=S(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=S(t+="",!0);return e.toString=function(){return t},e}}}(t),Qs=Zs.format,Zs.parse,Zs.utcFormat,Zs.utcParse}({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"]}),r.dn(bl);const kl=bl("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function wl(t){return"string"==typeof t?new se([[document.querySelector(t)]],[document.documentElement]):new se([[t]],ne)}function Sl(t){return function(){return t}}r.dn(wl),r.dn(Sl);const Tl=Math.abs,vl=Math.atan2,Bl=Math.cos,_l=Math.max,Al=Math.min,Ll=Math.sin,Fl=Math.sqrt,Ml=Math.PI,El=Ml/2,$l=2*Ml;function Ol(t){return t>=1?El:t<=-1?-El:Math.asin(t)}const Dl=Math.PI,Il=2*Dl,ql=1e-6,Rl=Il-ql;function Kl(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class zl{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Kl:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Kl;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+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,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,o,n){this._append`C${+t},${+e},${+r},${+i},${this._x1=+o},${this._y1=+n}`}arcTo(t,e,r,i,o){if(t=+t,e=+e,r=+r,i=+i,(o=+o)<0)throw new Error(`negative radius: ${o}`);let n=this._x1,s=this._y1,a=r-t,l=i-e,h=n-t,c=s-e,d=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>ql)if(Math.abs(c*a-l*h)>ql&&o){let u=r-n,p=i-s,g=a*a+l*l,f=u*u+p*p,y=Math.sqrt(g),m=Math.sqrt(d),x=o*Math.tan((Dl-Math.acos((g+d-f)/(2*y*m)))/2),C=x/m,b=x/y;Math.abs(C-1)>ql&&this._append`L${t+C*h},${e+C*c}`,this._append`A${o},${o},0,0,${+(c*u>h*p)},${this._x1=t+b*a},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,i,o,n){if(t=+t,e=+e,n=!!n,(r=+r)<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),a=r*Math.sin(i),l=t+s,h=e+a,c=1^n,d=n?i-o:o-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>ql||Math.abs(this._y1-h)>ql)&&this._append`L${l},${h}`,r&&(d<0&&(d=d%Il+Il),d>Rl?this._append`A${r},${r},0,1,${c},${t-s},${e-a}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:d>ql&&this._append`A${r},${r},0,${+(d>=Dl)},${c},${this._x1=t+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Nl(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new zl(e)}function Pl(t){return t.innerRadius}function Wl(t){return t.outerRadius}function jl(t){return t.startAngle}function Hl(t){return t.endAngle}function Ul(t){return t&&t.padAngle}function Yl(t,e,r,i,o,n,s){var a=t-r,l=e-i,h=(s?n:-n)/Fl(a*a+l*l),c=h*l,d=-h*a,u=t+c,p=e+d,g=r+c,f=i+d,y=(u+g)/2,m=(p+f)/2,x=g-u,C=f-p,b=x*x+C*C,k=o-n,w=u*f-g*p,S=(C<0?-1:1)*Fl(_l(0,k*k*b-w*w)),T=(w*C-x*S)/b,v=(-w*x-C*S)/b,B=(w*C+x*S)/b,_=(-w*x+C*S)/b,A=T-y,L=v-m,F=B-y,M=_-m;return A*A+L*L>F*F+M*M&&(T=B,v=_),{cx:T,cy:v,x01:-c,y01:-d,x11:T*(o/k-1),y11:v*(o/k-1)}}function Xl(){var t=Pl,e=Wl,r=Sl(0),i=null,o=jl,n=Hl,s=Ul,a=null,l=Nl(h);function h(){var h,c,d,u=+t.apply(this,arguments),p=+e.apply(this,arguments),g=o.apply(this,arguments)-El,f=n.apply(this,arguments)-El,y=Tl(f-g),m=f>g;if(a||(a=h=l()),p<u&&(c=p,p=u,u=c),p>1e-12)if(y>$l-1e-12)a.moveTo(p*Bl(g),p*Ll(g)),a.arc(0,0,p,g,f,!m),u>1e-12&&(a.moveTo(u*Bl(f),u*Ll(f)),a.arc(0,0,u,f,g,m));else{var x,C,b=g,k=f,w=g,S=f,T=y,v=y,B=s.apply(this,arguments)/2,_=B>1e-12&&(i?+i.apply(this,arguments):Fl(u*u+p*p)),A=Al(Tl(p-u)/2,+r.apply(this,arguments)),L=A,F=A;if(_>1e-12){var M=Ol(_/u*Ll(B)),E=Ol(_/p*Ll(B));(T-=2*M)>1e-12?(w+=M*=m?1:-1,S-=M):(T=0,w=S=(g+f)/2),(v-=2*E)>1e-12?(b+=E*=m?1:-1,k-=E):(v=0,b=k=(g+f)/2)}var $=p*Bl(b),O=p*Ll(b),D=u*Bl(S),I=u*Ll(S);if(A>1e-12){var q,R=p*Bl(k),K=p*Ll(k),z=u*Bl(w),N=u*Ll(w);if(y<Ml)if(q=function(t,e,r,i,o,n,s,a){var l=r-t,h=i-e,c=s-o,d=a-n,u=d*l-c*h;if(!(u*u<1e-12))return[t+(u=(c*(e-n)-d*(t-o))/u)*l,e+u*h]}($,O,z,N,R,K,D,I)){var P=$-q[0],W=O-q[1],j=R-q[0],H=K-q[1],U=1/Ll(((d=(P*j+W*H)/(Fl(P*P+W*W)*Fl(j*j+H*H)))>1?0:d<-1?Ml:Math.acos(d))/2),Y=Fl(q[0]*q[0]+q[1]*q[1]);L=Al(A,(u-Y)/(U-1)),F=Al(A,(p-Y)/(U+1))}else L=F=0}v>1e-12?F>1e-12?(x=Yl(z,N,$,O,p,F,m),C=Yl(R,K,D,I,p,F,m),a.moveTo(x.cx+x.x01,x.cy+x.y01),F<A?a.arc(x.cx,x.cy,F,vl(x.y01,x.x01),vl(C.y01,C.x01),!m):(a.arc(x.cx,x.cy,F,vl(x.y01,x.x01),vl(x.y11,x.x11),!m),a.arc(0,0,p,vl(x.cy+x.y11,x.cx+x.x11),vl(C.cy+C.y11,C.cx+C.x11),!m),a.arc(C.cx,C.cy,F,vl(C.y11,C.x11),vl(C.y01,C.x01),!m))):(a.moveTo($,O),a.arc(0,0,p,b,k,!m)):a.moveTo($,O),u>1e-12&&T>1e-12?L>1e-12?(x=Yl(D,I,R,K,u,-L,m),C=Yl($,O,z,N,u,-L,m),a.lineTo(x.cx+x.x01,x.cy+x.y01),L<A?a.arc(x.cx,x.cy,L,vl(x.y01,x.x01),vl(C.y01,C.x01),!m):(a.arc(x.cx,x.cy,L,vl(x.y01,x.x01),vl(x.y11,x.x11),!m),a.arc(0,0,u,vl(x.cy+x.y11,x.cx+x.x11),vl(C.cy+C.y11,C.cx+C.x11),m),a.arc(C.cx,C.cy,L,vl(C.y11,C.x11),vl(C.y01,C.x01),!m))):a.arc(0,0,u,S,w,m):a.lineTo(D,I)}else a.moveTo(0,0);if(a.closePath(),h)return a=null,h+""||null}return h.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+o.apply(this,arguments)+ +n.apply(this,arguments))/2-Ml/2;return[Bl(i)*r,Ll(i)*r]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Sl(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Sl(+t),h):e},h.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:Sl(+t),h):r},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Sl(+t),h):i},h.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:Sl(+t),h):o},h.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:Sl(+t),h):n},h.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Sl(+t),h):s},h.context=function(t){return arguments.length?(a=t??null,h):a},h}r.dn(Xl),r.dn(Gl);Array.prototype.slice;function Gl(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Vl(t){this._context=t}function Zl(t){return new Vl(t)}function Ql(t){return t[0]}function Jl(t){return t[1]}function th(t,e){var r=Sl(!0),i=null,o=Zl,n=null,s=Nl(a);function a(a){var l,h,c,d=(a=Gl(a)).length,u=!1;for(null==i&&(n=o(c=s())),l=0;l<=d;++l)!(l<d&&r(h=a[l],l,a))===u&&((u=!u)?n.lineStart():n.lineEnd()),u&&n.point(+t(h,l,a),+e(h,l,a));if(c)return n=null,c+""||null}return t="function"==typeof t?t:void 0===t?Ql:Sl(t),e="function"==typeof e?e:void 0===e?Jl:Sl(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:Sl(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Sl(+t),a):e},a.defined=function(t){return arguments.length?(r="function"==typeof t?t:Sl(!!t),a):r},a.curve=function(t){return arguments.length?(o=t,null!=i&&(n=o(i)),a):o},a.context=function(t){return arguments.length?(null==t?i=n=null:n=o(i=t),a):i},a}function eh(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function rh(t){return t}function ih(){var t=rh,e=eh,r=null,i=Sl(0),o=Sl($l),n=Sl(0);function s(s){var a,l,h,c,d,u=(s=Gl(s)).length,p=0,g=new Array(u),f=new Array(u),y=+i.apply(this,arguments),m=Math.min($l,Math.max(-$l,o.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/u,n.apply(this,arguments)),C=x*(m<0?-1:1);for(a=0;a<u;++a)(d=f[g[a]=a]=+t(s[a],a,s))>0&&(p+=d);for(null!=e?g.sort(function(t,r){return e(f[t],f[r])}):null!=r&&g.sort(function(t,e){return r(s[t],s[e])}),a=0,h=p?(m-u*C)/p:0;a<u;++a,y=c)l=g[a],c=y+((d=f[l])>0?d*h:0)+C,f[l]={data:s[l],index:a,value:d,startAngle:y,endAngle:c,padAngle:x};return f}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Sl(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,r=null,s):e},s.sort=function(t){return arguments.length?(r=t,e=null,s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Sl(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Sl(+t),s):o},s.padAngle=function(t){return arguments.length?(n="function"==typeof t?t:Sl(+t),s):n},s}function oh(){}function nh(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function sh(t){this._context=t}function ah(t){return new sh(t)}function lh(t){this._context=t}function hh(t){return new lh(t)}function ch(t){this._context=t}function dh(t){return new ch(t)}r.dn(Zl),Vl.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)}}},r.dn(th),r.dn(eh),r.dn(rh),r.dn(ih),r.dn(oh),r.dn(ah),sh.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:nh(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:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},r.dn(hh),lh.prototype={areaStart:oh,areaEnd:oh,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:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},r.dn(dh),ch.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 r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class uh{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}}function ph(t){return new uh(t,!0)}function gh(t){return new uh(t,!1)}function fh(t,e){this._basis=new sh(t),this._beta=e}fh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],n=e[0],s=t[r]-o,a=e[r]-n,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*s),this._beta*e[l]+(1-this._beta)*(n+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const yh=function t(e){function r(t){return 1===e?new sh(t):new fh(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function mh(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function xh(t,e){this._context=t,this._k=(1-e)/6}xh.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:mh(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:mh(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 Ch=function t(e){function r(t){return new xh(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bh(t,e){this._context=t,this._k=(1-e)/6}bh.prototype={areaStart:oh,areaEnd:oh,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:mh(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 kh=function t(e){function r(t){return new bh(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wh(t,e){this._context=t,this._k=(1-e)/6}wh.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:mh(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 Sh=function t(e){function r(t){return new wh(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Th(t,e,r){var i=t._x1,o=t._y1,n=t._x2,s=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*h+t._x1*t._l23_2a-e*t._l12_2a)/c,s=(s*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,o,n,s,t._x2,t._y2)}function vh(t,e){this._context=t,this._alpha=e}vh.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 r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Th(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 Bh=function t(e){function r(t){return e?new vh(t,e):new xh(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function _h(t,e){this._context=t,this._alpha=e}_h.prototype={areaStart:oh,areaEnd:oh,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 r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Th(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 Ah=function t(e){function r(t){return e?new _h(t,e):new bh(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lh(t,e){this._context=t,this._alpha=e}Lh.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 r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Th(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 Fh=function t(e){function r(t){return e?new Lh(t,e):new wh(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Mh(t){this._context=t}function Eh(t){return new Mh(t)}function $h(t){return t<0?-1:1}function Oh(t,e,r){var i=t._x1-t._x0,o=e-t._x1,n=(t._y1-t._y0)/(i||o<0&&-0),s=(r-t._y1)/(o||i<0&&-0),a=(n*o+s*i)/(i+o);return($h(n)+$h(s))*Math.min(Math.abs(n),Math.abs(s),.5*Math.abs(a))||0}function Dh(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ih(t,e,r){var i=t._x0,o=t._y0,n=t._x1,s=t._y1,a=(n-i)/3;t._context.bezierCurveTo(i+a,o+a*e,n-a,s-a*r,n,s)}function qh(t){this._context=t}function Rh(t){this._context=new Kh(t)}function Kh(t){this._context=t}function zh(t){return new qh(t)}function Nh(t){return new Rh(t)}function Ph(t){this._context=t}function Wh(t){var e,r,i=t.length-1,o=new Array(i),n=new Array(i),s=new Array(i);for(o[0]=0,n[0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)o[e]=1,n[e]=4,s[e]=4*t[e]+2*t[e+1];for(o[i-1]=2,n[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=o[e]/n[e-1],n[e]-=r,s[e]-=r*s[e-1];for(o[i-1]=s[i-1]/n[i-1],e=i-2;e>=0;--e)o[e]=(s[e]-o[e+1])/n[e];for(n[i-1]=(t[i]+o[i-1])/2,e=0;e<i-1;++e)n[e]=2*t[e+1]-o[e+1];return[o,n]}function jh(t){return new Ph(t)}function Hh(t,e){this._context=t,this._t=e}function Uh(t){return new Hh(t,.5)}function Yh(t){return new Hh(t,0)}function Xh(t){return new Hh(t,1)}function Gh(t,e,r){this.k=t,this.x=e,this.y=r}r.dn(Eh),Mh.prototype={areaStart:oh,areaEnd:oh,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))}},qh.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:Ih(this,this._t0,Dh(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=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,Ih(this,Dh(this,r=Oh(this,t,e)),r);break;default:Ih(this,this._t0,r=Oh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Rh.prototype=Object.create(qh.prototype)).point=function(t,e){qh.prototype.point.call(this,e,t)},Kh.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,n){this._context.bezierCurveTo(e,t,i,r,n,o)}},r.dn(jh),Ph.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=Wh(t),o=Wh(e),n=0,s=1;s<r;++n,++s)this._context.bezierCurveTo(i[0][n],o[0][n],i[1][n],o[1][n],t[s],e[s]);(this._line||0!==this._line&&1===r)&&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)}},r.dn(Uh),Hh.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 r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},Gh.prototype={constructor:Gh,scale:function(t){return 1===t?this:new Gh(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Gh(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 Vh,Zh,Qh,Jh,tc,ec,rc,ic;new Gh(1,0,0);function oc(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function nc(){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 sc(){return this.__zoom||tc}function ac(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function lc(){return navigator.maxTouchPoints||"ontouchstart"in this}function hc(t,e,r){var i=t.invertX(e[0][0])-r[0][0],o=t.invertX(e[1][0])-r[1][0],n=t.invertY(e[0][1])-r[0][1],s=t.invertY(e[1][1])-r[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>n?(n+s)/2:Math.min(0,n)||Math.max(0,s))}Gh.prototype,r.dn(function(){var t,e,r,i=oc,o=nc,n=hc,s=ac,a=lc,l=[0,1/0],h=[[-1/0,-1/0],[1/0,1/0]],c=250,d=void 0,u=(void 0)("start","zoom","end"),p=0,g=10;function f(t){t.property("__zoom",sc).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",T).filter(a).on("touchstart.zoom",v).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",_).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new ec(e,t.x,t.y)}function m(t,e,r){var i=e[0]-r[0]*t.k,o=e[1]-r[1]*t.k;return i===t.x&&o===t.y?t:new ec(t.k,i,o)}function x(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function C(t,e,r,i){t.on("start.zoom",function(){b(this,arguments).event(i).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(i).end()}).tween("zoom",function(){var t=this,n=arguments,s=b(t,n).event(i),a=o.apply(t,n),l=null==r?x(a):"function"==typeof r?r.apply(t,n):r,h=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),c=t.__zoom,u="function"==typeof e?e.apply(t,n):e,p=d(c.invert(l).concat(h/c.k),u.invert(l).concat(h/u.k));return function(t){if(1===t)t=u;else{var e=p(t),r=h/e[2];t=new ec(r,l[0]-e[0]*r,l[1]-e[1]*r)}s.zoom(null,t)}})}function b(t,e,r){return!r&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=o.apply(t,e),this.taps=0}function w(t,...e){if(i.apply(this,arguments)){var r=b(this,e).event(t),o=this.__zoom,a=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,s.apply(this,arguments)))),c=Vh(t);if(r.wheel)r.mouse[0][0]===c[0]&&r.mouse[0][1]===c[1]||(r.mouse[1]=o.invert(r.mouse[0]=c)),clearTimeout(r.wheel);else{if(o.k===a)return;r.mouse=[c,o.invert(c)],Qh(this),r.start()}rc(t),r.wheel=setTimeout(function(){r.wheel=null,r.end()},150),r.zoom("mouse",n(m(y(o,a),r.mouse[0],r.mouse[1]),r.extent,h))}}function S(t,...e){if(!r&&i.apply(this,arguments)){var o=t.currentTarget,s=b(this,e,!0).event(t),a=Zh(t.view).on("mousemove.zoom",function(t){if(rc(t),!s.moved){var e=t.clientX-c,r=t.clientY-d;s.moved=e*e+r*r>p}s.event(t).zoom("mouse",n(m(s.that.__zoom,s.mouse[0]=Vh(t,o),s.mouse[1]),s.extent,h))},!0).on("mouseup.zoom",function(t){a.on("mousemove.zoom mouseup.zoom",null),(void 0)(t.view,s.moved),rc(t),s.event(t).end()},!0),l=Vh(t,o),c=t.clientX,d=t.clientY;(void 0)(t.view),ic(t),s.mouse=[l,this.__zoom.invert(l)],Qh(this),s.start()}}function T(t,...e){if(i.apply(this,arguments)){var r=this.__zoom,s=Vh(t.changedTouches?t.changedTouches[0]:t,this),a=r.invert(s),l=r.k*(t.shiftKey?.5:2),d=n(m(y(r,l),s,a),o.apply(this,e),h);rc(t),c>0?Zh(this).transition().duration(c).call(C,d,s,t):Zh(this).call(f.transform,d,s,t)}}function v(r,...o){if(i.apply(this,arguments)){var n,s,a,l,h=r.touches,c=h.length,d=b(this,o,r.changedTouches.length===c).event(r);for(ic(r),s=0;s<c;++s)a=h[s],l=[l=Vh(a,this),this.__zoom.invert(l),a.identifier],d.touch0?d.touch1||d.touch0[2]===l[2]||(d.touch1=l,d.taps=0):(d.touch0=l,n=!0,d.taps=1+!!t);t&&(t=clearTimeout(t)),n&&(d.taps<2&&(e=l[0],t=setTimeout(function(){t=null},500)),Qh(this),d.start())}}function B(t,...e){if(this.__zooming){var r,i,o,s,a=b(this,e).event(t),l=t.changedTouches,c=l.length;for(rc(t),r=0;r<c;++r)i=l[r],o=Vh(i,this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=o:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=o);if(i=a.that.__zoom,a.touch1){var d=a.touch0[0],u=a.touch0[1],p=a.touch1[0],g=a.touch1[1],f=(f=p[0]-d[0])*f+(f=p[1]-d[1])*f,x=(x=g[0]-u[0])*x+(x=g[1]-u[1])*x;i=y(i,Math.sqrt(f/x)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],s=[(u[0]+g[0])/2,(u[1]+g[1])/2]}else{if(!a.touch0)return;o=a.touch0[0],s=a.touch0[1]}a.zoom("touch",n(m(i,o,s),a.extent,h))}}function _(t,...i){if(this.__zooming){var o,n,s=b(this,i).event(t),a=t.changedTouches,l=a.length;for(ic(t),r&&clearTimeout(r),r=setTimeout(function(){r=null},500),o=0;o<l;++o)n=a[o],s.touch0&&s.touch0[2]===n.identifier?delete s.touch0:s.touch1&&s.touch1[2]===n.identifier&&delete s.touch1;if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0]);else if(s.end(),2===s.taps&&(n=Vh(n,this),Math.hypot(e[0]-n[0],e[1]-n[1])<g)){var h=Zh(this).on("dblclick.zoom");h&&h.apply(this,arguments)}}}return f.transform=function(t,e,r,i){var o=t.selection?t.selection():t;o.property("__zoom",sc),t!==o?C(t,e,r,i):o.interrupt().each(function(){b(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},f.scaleBy=function(t,e,r,i){f.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},r,i)},f.scaleTo=function(t,e,r,i){f.transform(t,function(){var t=o.apply(this,arguments),i=this.__zoom,s=null==r?x(t):"function"==typeof r?r.apply(this,arguments):r,a=i.invert(s),l="function"==typeof e?e.apply(this,arguments):e;return n(m(y(i,l),s,a),t,h)},r,i)},f.translateBy=function(t,e,r,i){f.transform(t,function(){return n(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof r?r.apply(this,arguments):r),o.apply(this,arguments),h)},null,i)},f.translateTo=function(t,e,r,i,s){f.transform(t,function(){var t=o.apply(this,arguments),s=this.__zoom,a=null==i?x(t):"function"==typeof i?i.apply(this,arguments):i;return n(tc.translate(a[0],a[1]).scale(s.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof r?-r.apply(this,arguments):-r),t,h)},i,s)},k.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=Zh(this.that).datum();u.call(t,this.that,new(void 0)(t,{sourceEvent:this.sourceEvent,target:f,type:t,transform:this.that.__zoom,dispatch:u}),e)}},f.wheelDelta=function(t){return arguments.length?(s="function"==typeof t?t:Jh(+t),f):s},f.filter=function(t){return arguments.length?(i="function"==typeof t?t:Jh(!!t),f):i},f.touchable=function(t){return arguments.length?(a="function"==typeof t?t:Jh(!!t),f):a},f.extent=function(t){return arguments.length?(o="function"==typeof t?t:Jh([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),f):o},f.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],f):[l[0],l[1]]},f.translateExtent=function(t){return arguments.length?(h[0][0]=+t[0][0],h[1][0]=+t[1][0],h[0][1]=+t[0][1],h[1][1]=+t[1][1],f):[[h[0][0],h[0][1]],[h[1][0],h[1][1]]]},f.constrain=function(t){return arguments.length?(n=t,f):n},f.duration=function(t){return arguments.length?(c=+t,f):c},f.interpolate=function(t){return arguments.length?(d=t,f):d},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,f):Math.sqrt(p)},f.tapDistance=function(t){return arguments.length?(g=+t,f):g},f})},72857(t,e,r){"use strict";r.d(e,{T:()=>z});var i=r(39142),o=r(89610),n=r(27422),s=r(66070),a=r(14453),l=r(9137),h=r(25175),c=r(92049),d=r(38446),u=r(41200),p=r(97271),g=r(54749),f=Object.prototype.hasOwnProperty;const y=function(t){if(null==t)return!0;if((0,d.A)(t)&&((0,c.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,u.A)(t)||(0,g.A)(t)||(0,h.A)(t)))return!t.length;var e=(0,l.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,p.A)(t))return!(0,a.A)(t).length;for(var r in t)if(f.call(t,r))return!1;return!0};var m=r(8058),x=r(69592),C=r(87671),b=r(24326),k=r(8300),w=r(25707);const S=function(t){return t!=t};const T=function(t,e,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===e)return i;return-1};const v=function(t,e,r){return e==e?T(t,e,r):(0,w.A)(t,S,r)};const B=function(t,e){return!!(null==t?0:t.length)&&v(t,e,0)>-1};const _=function(t,e,r){for(var i=-1,o=null==t?0:t.length;++i<o;)if(r(e,t[i]))return!0;return!1};var A=r(64099),L=r(39857);const F=function(){};var M=r(29959),E=L.A&&1/(0,M.A)(new L.A([,-0]))[1]==1/0?function(t){return new L.A(t)}:F;const $=E;const O=function(t,e,r){var i=-1,o=B,n=t.length,s=!0,a=[],l=a;if(r)s=!1,o=_;else if(n>=200){var h=e?null:$(t);if(h)return(0,M.A)(h);s=!1,o=A.A,l=new k.A}else l=e?[]:a;t:for(;++i<n;){var c=t[i],d=e?e(c):c;if(c=r||0!==c?c:0,s&&d==d){for(var u=l.length;u--;)if(l[u]===d)continue t;e&&l.push(d),a.push(c)}else o(l,d,r)||(l!==a&&l.push(d),a.push(c))}return a};var D=r(53533);const I=(0,b.A)(function(t){return O((0,C.A)(t,1,D.A,!0))});var q=r(92866),R=r(83130),K="\0";class z{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=i.A(void 0),this._defaultEdgeLabelFn=i.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[K]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return o.A(t)||(t=i.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return n.A(this._nodes)}sources(){var t=this;return s.A(this.nodes(),function(e){return y(t._in[e])})}sinks(){var t=this;return s.A(this.nodes(),function(e){return y(t._out[e])})}setNodes(t,e){var r=arguments,i=this;return m.A(t,function(t){r.length>1?i.setNode(t,e):i.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=K,this._children[t]={},this._children[K][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],m.A(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),m.A(n.A(this._in[t]),e),delete this._in[t],delete this._preds[t],m.A(n.A(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(x.A(e))e=K;else{for(var r=e+="";!x.A(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==K)return e}}children(t){if(x.A(t)&&(t=K),this._isCompound){var e=this._children[t];if(e)return n.A(e)}else{if(t===K)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return n.A(e)}successors(t){var e=this._sucs[t];if(e)return n.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return I(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;m.A(this._nodes,function(r,i){t(i)&&e.setNode(i,r)}),m.A(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var i={};function o(t){var n=r.parent(t);return void 0===n||e.hasNode(n)?(i[t]=n,n):n in i?i[n]:o(n)}return this._isCompound&&m.A(e.nodes(),function(t){e.setParent(t,o(t))}),e}setDefaultEdgeLabel(t){return o.A(t)||(t=i.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return q.A(this._edgeObjs)}setPath(t,e){var r=this,i=arguments;return R.A(t,function(t,o){return i.length>1?r.setEdge(t,o,e):r.setEdge(t,o),o}),this}setEdge(){var t,e,r,i,o=!1,n=arguments[0];"object"==typeof n&&null!==n&&"v"in n?(t=n.v,e=n.w,r=n.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=n,e=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,x.A(r)||(r=""+r);var s=W(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return o&&(this._edgeLabels[s]=i),this;if(!x.A(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=o?i:this._defaultEdgeLabelFn(t,e,r);var a=function(t,e,r,i){var o=""+e,n=""+r;if(!t&&o>n){var s=o;o=n,n=s}var a={v:o,w:n};i&&(a.name=i);return a}(this._isDirected,t,e,r);return t=a.v,e=a.w,Object.freeze(a),this._edgeObjs[s]=a,N(this._preds[e],t),N(this._sucs[t],e),this._in[e][s]=a,this._out[t][s]=a,this._edgeCount++,this}edge(t,e,r){var i=1===arguments.length?j(this._isDirected,arguments[0]):W(this._isDirected,t,e,r);return this._edgeLabels[i]}hasEdge(t,e,r){var i=1===arguments.length?j(this._isDirected,arguments[0]):W(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,e,r){var i=1===arguments.length?j(this._isDirected,arguments[0]):W(this._isDirected,t,e,r),o=this._edgeObjs[i];return o&&(t=o.v,e=o.w,delete this._edgeLabels[i],delete this._edgeObjs[i],P(this._preds[e],t),P(this._sucs[t],e),delete this._in[e][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var i=q.A(r);return e?s.A(i,function(t){return t.v===e}):i}}outEdges(t,e){var r=this._out[t];if(r){var i=q.A(r);return e?s.A(i,function(t){return t.w===e}):i}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function N(t,e){t[e]?t[e]++:t[e]=1}function P(t,e){--t[e]||delete t[e]}function W(t,e,r,i){var o=""+e,n=""+r;if(!t&&o>n){var s=o;o=n,n=s}return o+""+n+""+(x.A(i)?"\0":i)}function j(t,e){return W(t,e.v,e.w,e.name)}z.prototype._nodeCount=0,z.prototype._edgeCount=0},697(t,e,r){"use strict";r.d(e,{T:()=>i.T});var i=r(72857)},99418(t,e,r){"use strict";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,o,n,s,a=[],l=!0,h=!1;try{if(n=(r=r.call(t)).next,0===e);else for(;!(l=(i=n.call(r)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){h=!0,o=t}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(e,{A:()=>vt});const n=Object.entries,s=Object.setPrototypeOf,a=Object.isFrozen,l=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor;let c=Object.freeze,d=Object.seal,u=Object.create,p="undefined"!=typeof Reflect&&Reflect,g=p.apply,f=p.construct;c||(c=function(t){return t}),d||(d=function(t){return t}),g||(g=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(e,i)}),f||(f=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)});const y=q(Array.prototype.forEach),m=q(Array.prototype.lastIndexOf),x=q(Array.prototype.pop),C=q(Array.prototype.push),b=q(Array.prototype.splice),k=Array.isArray,w=q(String.prototype.toLowerCase),S=q(String.prototype.toString),T=q(String.prototype.match),v=q(String.prototype.replace),B=q(String.prototype.indexOf),_=q(String.prototype.trim),A=q(Number.prototype.toString),L=q(Boolean.prototype.toString),F="undefined"==typeof BigInt?null:q(BigInt.prototype.toString),M="undefined"==typeof Symbol?null:q(Symbol.prototype.toString),E=q(Object.prototype.hasOwnProperty),$=q(Object.prototype.toString),O=q(RegExp.prototype.test),D=(I=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return f(I,e)});var I;function q(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return g(t,e,i)}}function R(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;if(s&&s(t,null),!k(e))return t;let i=e.length;for(;i--;){let o=e[i];if("string"==typeof o){const t=r(o);t!==o&&(a(e)||(e[i]=t),o=t)}t[o]=!0}return t}function K(t){for(let e=0;e<t.length;e++){E(t,e)||(t[e]=null)}return t}function z(t){const e=u(null);for(const i of n(t)){var r=o(i,2);const n=r[0],s=r[1];E(t,n)&&(k(s)?e[n]=K(s):s&&"object"==typeof s&&s.constructor===Object?e[n]=z(s):e[n]=s)}return e}function N(t,e){for(;null!==t;){const r=h(t,e);if(r){if(r.get)return q(r.get);if("function"==typeof r.value)return q(r.value)}t=l(t)}return function(){return null}}const P=c(["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"]),W=c(["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"]),j=c(["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"]),H=c(["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"]),U=c(["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"]),Y=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),X=c(["#text"]),G=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),V=c(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),Z=c(["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"]),Q=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),J=d(/{{[\w\W]*|^[\w\W]*}}/g),tt=d(/<%[\w\W]*|^[\w\W]*%>/g),et=d(/\${[\w\W]*/g),rt=d(/^data-[\-\w.\u00B7-\uFFFF]+$/),it=d(/^aria-[\-\w]+$/),ot=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nt=d(/^(?:\w+script|data):/i),st=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),at=d(/^html$/i),lt=d(/^[a-z][.\w]*(-[.\w]+)+$/i),ht=d(/<[/\w!]/g),ct=d(/<[/\w]/g),dt=d(/<\/no(script|embed|frames)/i),ut=d(/\/>/i),pt=1,gt=3,ft=7,yt=8,mt=9,xt=11,Ct=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],bt=c(R({},Ct)),kt=function(){const t={};return y(Ct,e=>{t[e]=d(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),c(t)}(),wt=function(){return"undefined"==typeof window?null:window},St=function(t,e,r,i){return E(t,e)&&k(t[e])?R(i.base?z(i.base):{},t[e],i.transform):r},Tt=function(t,e,r){const i=E(t,e)?t[e]:void 0;return i&&"object"==typeof i?z(i):r()};var vt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wt();const r=e=>t(e);if(r.version="3.4.15",r.removed=[],!e||!e.document||e.document.nodeType!==mt||!e.Element)return r.isSupported=!1,r;let i=e.document;const o=i,s=o.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,l=e.Node,h=e.Element,p=e.NodeFilter,g=e.NamedNodeMap;void 0===g&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const f=e.DOMParser,I=e.trustedTypes,q=h.prototype,K=N(q,"cloneNode"),Ct=N(q,"remove"),vt=N(q,"removeAttributeNode"),Bt=N(q,"nextSibling"),_t=N(q,"childNodes"),At=N(q,"parentNode"),Lt=N(q,"shadowRoot"),Ft=N(q,"attributes"),Mt=l&&l.prototype?N(l.prototype,"nodeType"):null,Et=l&&l.prototype?N(l.prototype,"nodeName"):null,$t=l&&l.prototype?N(l.prototype,"ownerDocument"):null,Ot=function(t){return Mt?Mt(t):t.nodeType},Dt=function(t){return Et?Et(t):t.nodeName};if("function"==typeof a){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let It,qt,Rt="",Kt=!1,zt=0;const Nt=function(){if(zt>0)throw D('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Pt=function(t){Nt(),zt++;try{return It.createHTML(t)}finally{zt--}},Wt=function(){return Kt||(qt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(I,s),Kt=!0),qt},jt=i,Ht=jt.implementation,Ut=jt.createNodeIterator,Yt=jt.createDocumentFragment,Xt=jt.getElementsByTagName,Gt=o.importNode;let Vt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof n&&"function"==typeof At&&Ht&&void 0!==Ht.createHTMLDocument;const Zt=J,Qt=tt,Jt=et,te=rt,ee=it,re=nt,ie=st,oe=lt;let ne=ot,se=null;const ae=R({},[...P,...W,...j,...U,...X]);let le=null;const he=R({},[...G,...V,...Z,...Q]);let ce=Object.seal(u(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}})),de=null,ue=null;const pe=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ge=!0,fe=!0,ye=!1,me=!0,xe=!1,Ce=!0,be=!1,ke=!1,we=null,Se=null,Te=!1,ve=!1,Be=!1,_e=!1,Ae=!0,Le=!1;const Fe="user-content-";let Me=!0,Ee=!1,$e={},Oe=null;const De=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ie=null;const qe=R({},["audio","video","img","source","image","track"]);let Re=null;const Ke=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ze="http://www.w3.org/1998/Math/MathML",Ne="http://www.w3.org/2000/svg",Pe="http://www.w3.org/1999/xhtml";let We=Pe,je=!1,He=null;const Ue=R({},[ze,Ne,Pe],S),Ye=c(["mi","mo","mn","ms","mtext"]);let Xe=R({},Ye);const Ge=c(["annotation-xml"]);let Ve=R({},Ge);const Ze=R({},["title","style","font","a","script"]);let Qe=null;const Je=["application/xhtml+xml","text/html"];let tr=null,er=null;const rr=i.createElement("form"),ir=function(t){return t instanceof RegExp||t instanceof Function},or=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(er&&er===t)return;t&&"object"==typeof t||(t={}),t=z(t),Qe=-1===Je.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,tr="application/xhtml+xml"===Qe?S:w,se=St(t,"ALLOWED_TAGS",ae,{transform:tr}),le=St(t,"ALLOWED_ATTR",he,{transform:tr}),He=St(t,"ALLOWED_NAMESPACES",Ue,{transform:S}),Re=St(t,"ADD_URI_SAFE_ATTR",Ke,{transform:tr,base:Ke}),Ie=St(t,"ADD_DATA_URI_TAGS",qe,{transform:tr,base:qe}),Oe=St(t,"FORBID_CONTENTS",De,{transform:tr}),de=St(t,"FORBID_TAGS",z({}),{transform:tr}),ue=St(t,"FORBID_ATTR",z({}),{transform:tr}),$e=!!E(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?z(t.USE_PROFILES):t.USE_PROFILES),ge=!1!==t.ALLOW_ARIA_ATTR,fe=!1!==t.ALLOW_DATA_ATTR,ye=t.ALLOW_UNKNOWN_PROTOCOLS||!1,me=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,xe=t.SAFE_FOR_TEMPLATES||!1,Ce=!1!==t.SAFE_FOR_XML,be=t.WHOLE_DOCUMENT||!1,ve=t.RETURN_DOM||!1,Be=t.RETURN_DOM_FRAGMENT||!1,_e=t.RETURN_TRUSTED_TYPE||!1,Te=t.FORCE_BODY||!1,Ae=!1!==t.SANITIZE_DOM,Le=t.SANITIZE_NAMED_PROPS||!1,Me=!1!==t.KEEP_CONTENT,Ee=t.IN_PLACE||!1,ne=function(t){try{return O(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:ot,We="string"==typeof t.NAMESPACE?t.NAMESPACE:Pe,Xe=Tt(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>R({},Ye)),Ve=Tt(t,"HTML_INTEGRATION_POINTS",()=>R({},Ge));const e=Tt(t,"CUSTOM_ELEMENT_HANDLING",()=>u(null));if(ce=u(null),E(e,"tagNameCheck")&&ir(e.tagNameCheck)&&(ce.tagNameCheck=e.tagNameCheck),E(e,"attributeNameCheck")&&ir(e.attributeNameCheck)&&(ce.attributeNameCheck=e.attributeNameCheck),E(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(ce.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),d(ce),xe&&(fe=!1),Be&&(ve=!0),$e&&(se=R({},X),le=u(null),!0===$e.html&&(R(se,P),R(le,G)),!0===$e.svg&&(R(se,W),R(le,V),R(le,Q)),!0===$e.svgFilters&&(R(se,j),R(le,V),R(le,Q)),!0===$e.mathMl&&(R(se,U),R(le,Z),R(le,Q))),pe.tagCheck=null,pe.attributeCheck=null,E(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?pe.tagCheck=t.ADD_TAGS:k(t.ADD_TAGS)&&(se===ae&&(se=z(se)),R(se,t.ADD_TAGS,tr))),E(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?pe.attributeCheck=t.ADD_ATTR:k(t.ADD_ATTR)&&(le===he&&(le=z(le)),R(le,t.ADD_ATTR,tr))),E(t,"ADD_FORBID_CONTENTS")&&k(t.ADD_FORBID_CONTENTS)&&(Oe===De&&(Oe=z(Oe)),R(Oe,t.ADD_FORBID_CONTENTS,tr)),Me&&(se["#text"]=!0),be&&R(se,["html","head","body"]),se.table&&(R(se,["tbody"]),delete de.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=It;It=t.TRUSTED_TYPES_POLICY;try{Rt=Pt("")}catch(t){throw It=e,t}}else null===t.TRUSTED_TYPES_POLICY?(It=void 0,Rt=""):(void 0===It&&(It=Wt()),It&&"string"==typeof Rt&&(Rt=Pt("")));c&&c(t),er=t},nr=R({},[...W,...j,...H]),sr=R({},[...U,...Y]),ar=function(t){let e=At(t);e&&e.tagName||(e={namespaceURI:We,tagName:"template"});const r=w(t.tagName),i=w(e.tagName);return!!He[t.namespaceURI]&&(t.namespaceURI===Ne?function(t,e,r){return e.namespaceURI===Pe?"svg"===t:e.namespaceURI===ze?"svg"===t&&("annotation-xml"===r||Xe[r]):Boolean(nr[t])}(r,e,i):t.namespaceURI===ze?function(t,e,r){return e.namespaceURI===Pe?"math"===t:e.namespaceURI===Ne?"math"===t&&Ve[r]:Boolean(sr[t])}(r,e,i):t.namespaceURI===Pe?function(t,e,r){return!(e.namespaceURI===Ne&&!Ve[r])&&!(e.namespaceURI===ze&&!Xe[r])&&!sr[t]&&(Ze[t]||!nr[t])}(r,e,i):!("application/xhtml+xml"!==Qe||!He[t.namespaceURI]))},lr=function(t){C(r.removed,{element:t});try{At(t).removeChild(t)}catch(e){if(Ct(t),!At(t))throw D("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},hr=function(t,e,r){try{vt(t,e)}catch(e){try{t.removeAttribute(r)}catch(t){}}},cr=function(t){pr(t);const e=_t(t);if(e){const t=[];y(e,e=>{C(t,e)}),y(t,t=>{try{Ct(t)}catch(t){}})}const r=Ft(t);if(r)for(let e=r.length-1;e>=0;--e){const i=r[e],o=i&&i.name;"string"==typeof o&&hr(t,i,o)}},dr=function(t,e,i){if(!i)try{i=e.getAttributeNode(t)}catch(t){i=null}C(r.removed,{attribute:i||null,from:e});try{i?vt(e,i):e.removeAttribute(t)}catch(r){try{e.removeAttribute(t)}catch(t){}}if("is"===t)if(ve||Be)try{lr(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ur=function(t){const e=Ft(t);if(e)for(let r=e.length-1;r>=0;--r){const i=e[r],o=i&&i.name;"string"!=typeof o||le[tr(o)]||hr(t,i,o)}},pr=function(t){const e=[t];for(;e.length>0;){const t=e.pop();Ot(t)===pt&&ur(t);const r=_t(t);if(r)for(let t=r.length-1;t>=0;--t)e.push(r[t])}},gr=function(t,e){return!!Ce&&("patchsrc"===t||"for"===t&&"label"!==e&&"output"!==e)},fr=function(t){let e=null,r=null;if(Te)t="<remove></remove>"+t;else{const e=T(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===Qe&&We===Pe&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=It?Pt(t):t;if(We===Pe)try{e=(new f).parseFromString(o,Qe)}catch(t){}if(!e||!e.documentElement){e=Ht.createDocument(We,"template",null);try{e.documentElement.innerHTML=je?Rt:o}catch(t){}}const n=e.body||e.documentElement;return t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),We===Pe?Xt.call(e,be?"html":"body")[0]:be?e.documentElement:n},yr=function(t){const e=$t?$t(t):t.ownerDocument;return Ut.call(e||t,t,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},mr=function(t){return t=v(t,Zt," "),t=v(t,Qt," "),t=v(t,Jt," ")},xr=function(t){var e;t.normalize();const r=$t?$t(t):t.ownerDocument,i=Ut.call(r||t,t,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null);let o=i.nextNode();for(;o;)o.data=mr(o.data),o=i.nextNode();const n=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");n&&y(n,t=>{br(t.content)&&xr(t.content)})},Cr=function(t){const e=Et?Et(t):null;return"string"==typeof e&&("form"===tr(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==Ft(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.removeAttributeNode||"function"!=typeof t.getAttributeNode||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==Mt(t)||t.childNodes!==_t(t)))},br=function(t){if(!Mt||"object"!=typeof t||null===t)return!1;try{return Mt(t)===xt}catch(t){return!1}},kr=function(t){if(!Mt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof Mt(t)}catch(t){return!1}};function wr(t,e,i){0!==t.length&&y(t,t=>{t.call(r,e,i,er)})}const Sr=function(t,e){if(t instanceof RegExp)return O(t,e);if(t instanceof Function){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return Boolean(t(e,...i))}return!1},Tr=function(t,e,r,i){return 0===t.length?e:e===r||e===i?z(e):e},vr=function(t,e){return t!==e&&null===At(t)&&(Ee&&pr(t),!0)},Br=function(t,e){if(wr(Vt.beforeSanitizeElements,t,null),vr(t,e))return!0;if(Cr(t))return lr(t),!0;const i=tr(Dt(t));if(se=Tr(Vt.uponSanitizeElement,se,ae,we),wr(Vt.uponSanitizeElement,t,{tagName:i,allowedTags:se}),vr(t,e))return!0;if(function(t,e){return!!(Ce&&t.hasChildNodes()&&!kr(t.firstElementChild)&&O(ht,t.textContent)&&O(ht,t.innerHTML))||!!(Ce&&t.namespaceURI===Pe&&bt[e]&&(kr(t.firstElementChild)||"string"==typeof t.textContent&&O(kt[e],t.textContent)))||t.nodeType===ft||!(!Ce||t.nodeType!==yt||!O(ct,t.data))}(t,i))return lr(t),!0;if(de[i]||!(pe.tagCheck instanceof Function&&pe.tagCheck(i))&&!se[i]){const r=function(t,e,r){if(!de[e]&&Lr(e)&&Sr(ce.tagNameCheck,e))return!1;if(Me&&!Oe[e]){const e=At(t),i=_t(t);if(i&&e)for(let o=i.length-1;o>=0;--o){const n=t===r?K(i[o],!0):i[o];e.insertBefore(n,Bt(t))}}return lr(t),!0}(t,i,e);return!1===r&&wr(Vt.afterSanitizeElements,t,null),r}if(Ot(t)===pt&&!ar(t))return lr(t),!0;if(("noscript"===i||"noembed"===i||"noframes"===i)&&O(dt,t.innerHTML))return lr(t),!0;if(xe&&t.nodeType===gt){const e=mr(t.textContent);t.textContent!==e&&(C(r.removed,{element:t.cloneNode()}),t.textContent=e)}return wr(Vt.afterSanitizeElements,t,null),!1},_r=function(t,e,r){if(ue[e])return!1;if(gr(e,t))return!1;if(Ae&&("id"===e||"name"===e)&&(r in i||r in rr))return!1;const o=le[e]||pe.attributeCheck instanceof Function&&pe.attributeCheck(e,t);return!(!fe||!O(te,e))||(!(!ge||!O(ee,e))||(o?!!Re[e]||(!!O(ne,v(r,ie,""))||(!("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==B(r,"data:")||!Ie[t])||(!(!ye||O(re,v(r,ie,"")))||!r))):Lr(t)&&Sr(ce.tagNameCheck,t)&&Sr(ce.attributeNameCheck,e,t)||"is"===e&&ce.allowCustomizedBuiltInElements&&Sr(ce.tagNameCheck,r)))},Ar=R({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Lr=function(t){return!Ar[w(t)]&&O(oe,t)},Fr=function(t,e,r,i){if(It&&"object"==typeof I&&"function"==typeof I.getAttributeType&&!r)switch(I.getAttributeType(t,e)){case"TrustedHTML":return Pt(i);case"TrustedScriptURL":return function(t){Nt(),zt++;try{return It.createScriptURL(t)}finally{zt--}}(i)}return i},Mr=function(t,e,r,i){try{return r?t.setAttributeNS(r,e,i):t.setAttribute(e,i),!Cr(t)||(lr(t),!1)}catch(r){return dr(e,t),!1}},Er=function(t){wr(Vt.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||Cr(t))return;le=Tr(Vt.uponSanitizeAttribute,le,he,Se);const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le,forceKeepAttr:void 0};let o=e.length;const n=tr(t.nodeName);for(;o--;){const s=e[o],a=s.name,l=s.namespaceURI,h=s.value,c=tr(a),d=h;let u="value"===a?d:_(d),p=!1;if(i.attrName=c,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,wr(Vt.uponSanitizeAttribute,t,i),u=i.attrValue,!Le||"id"!==c&&"name"!==c||0===B(u,Fe)||(dr(a,t,s),u=Fe+u,p=!0),Ce&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u))dr(a,t,s);else if("attributename"===c&&T(u,"href"))dr(a,t,s);else if(!i.forceKeepAttr)if(i.keepAttr)if(me||!O(ut,u))if(xe&&(u=mr(u)),_r(n,c,u)){if(u=Fr(n,c,l,u),u!==d){Mr(t,a,l,u)&&p&&x(r.removed)}}else dr(a,t,s);else dr(a,t,s);else dr(a,t,s)}wr(Vt.afterSanitizeAttributes,t,null)},$r=function(t){let e=null;const r=yr(t);for(wr(Vt.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)if(wr(Vt.uponSanitizeShadowNode,e,null),Br(e,t),Er(e),br(e.content)&&$r(e.content),Ot(e)===pt){const t=Lt(e);br(t)&&(Or(t),$r(t))}wr(Vt.afterSanitizeShadowDOM,t,null)},Or=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){$r(t.shadow);continue}const r=t.node,i=Ot(r)===pt,o=_t(r);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(i){const t=Et?Et(r):null;if("string"==typeof t&&"template"===tr(t)){const t=r.content;br(t)&&e.push({node:t,shadow:null})}}if(i){const t=Lt(r);br(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,s=null,a=null;if(je=!t,je&&(t="\x3c!--\x3e"),"string"!=typeof t&&!kr(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return A(t);case"boolean":return L(t);case"bigint":return F?F(t):"0";case"symbol":return M?M(t):"Symbol()";case"undefined":default:return $(t);case"function":case"object":{if(null===t)return $(t);const e=t,r=N(e,"toString");if("function"==typeof r){const t=r(e);return"string"==typeof t?t:$(t)}return $(t)}}}(t)))throw D("dirty is not a string, aborting");if(!r.isSupported)return t;ke?(se=we,le=Se):or(e),(Vt.uponSanitizeElement.length>0||Vt.uponSanitizeAttribute.length>0)&&(se=z(se)),Vt.uponSanitizeAttribute.length>0&&(le=z(le)),r.removed=[];const l=Ee&&"string"!=typeof t&&kr(t);if(l){!function(t){if(!Ce)return;const e=[t];for(;e.length>0;){const t=e.pop(),r=Ot(t);if(r===ft||r===yt&&O(ct,t.data)){try{Ct(t)}catch(t){}continue}if(r===pt){const e=t,r=tr(Dt(t));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&gr("for",r)&&e.removeAttribute("for")}catch(t){}}const i=_t(t);if(i)for(let t=i.length-1;t>=0;--t)e.push(i[t])}}(t);const e=Dt(t);if("string"==typeof e){const r=tr(e);if(!se[r]||de[r])throw cr(t),D("root node is forbidden and cannot be sanitized in-place")}if(Cr(t))throw cr(t),D("root node is clobbered and cannot be sanitized in-place");try{Or(t)}catch(e){throw cr(t),e}}else if(kr(t))i=fr("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===pt&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n),Or(i);else{if(!ve&&!xe&&!be&&-1===t.indexOf("<"))return It&&_e?Pt(t):t;if(i=fr(t),!i)return ve?null:_e?Rt:""}i&&Te&&lr(i.firstChild);const h=l?t:i;try{const t=yr(h);for(;s=t.nextNode();)Br(s,h),Er(s),br(s.content)&&$r(s.content)}catch(e){throw l&&(cr(t),y(r.removed,t=>{t.element&&pr(t.element)})),e}if(l)return y(r.removed,t=>{t.element&&pr(t.element)}),xe&&xr(t),t;if(ve){if(xe&&xr(i),Be)for(a=Yt.call(i.ownerDocument);i.firstChild;)a.appendChild(i.firstChild);else a=i;return(le.shadowroot||le.shadowrootmode)&&(a=Gt.call(o,a,!0)),a}let c=be?i.outerHTML:i.innerHTML;return be&&se["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&O(at,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),xe&&(c=mr(c)),It&&_e?Pt(c):c},r.setConfig=function(){or(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ke=!0,we=se,Se=le},r.clearConfig=function(){er=null,ke=!1,we=null,Se=null,It=qt,Rt=""},r.isValidAttribute=function(t,e,r){er||or({});const i=tr(t),o=tr(e);return _r(i,o,r)},r.addHook=function(t,e){"function"==typeof e&&E(Vt,t)&&C(Vt[t],e)},r.removeHook=function(t,e){if(E(Vt,t)){if(void 0!==e){const r=m(Vt[t],e);return-1===r?void 0:b(Vt[t],r,1)[0]}return x(Vt[t])}},r.removeHooks=function(t){E(Vt,t)&&(Vt[t]=[])},r.removeAllHooks=function(){Vt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},99125(t,e,r){"use strict";function i(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}r.d(e,{b:()=>i})},89826(t,e,r){"use strict";r.d(e,["$V",0,"[object Boolean]","Av",0,"[object RegExp]","GX",0,"[object Object]","ML",0,"[object Float64Array]","NA",0,"[object Set]","OG",0,"[object String]","Qb",0,"[object Uint8Array]","R_",0,"[object Arguments]","Uw",0,"[object Array]","VP",0,"[object Symbol]","XZ",0,"[object Int8Array]","ZR",0,"[object Uint32Array]","_u",0,"[object Int32Array]","cT",0,"[object ArrayBuffer]","i1",0,"[object Int16Array]","iq",0,"[object DataView]","kj",0,"[object Number]","pj",0,"[object Map]","q",0,"[object Uint8ClampedArray]","ri",0,"[object Float32Array]","vC",0,"[object Date]","x6",0,"[object Uint16Array]"])},14608(t,e,r){"use strict";r.d(e,{N:()=>o});var i=r(99125);function o(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===(0,i.b)(t)}},30622(t,e,r){"use strict";function i(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}r.d(e,{X:()=>i})},19663(t,e,r){"use strict";r.d(e,{i:()=>o});var i=r(42796);function o(t){return(0,i.i)(t)}},32178(t,e,r){"use strict";r.d(e,{P:()=>o});const i="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r.g&&r.g||function(){return this}();function o(t){return void 0!==i.Buffer&&i.Buffer.isBuffer(t)}},37110(t,e,r){"use strict";function i(t){return null==t||"object"!=typeof t&&"function"!=typeof t}r.d(e,{s:()=>i})},42796(t,e,r){"use strict";function i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}r.d(e,{i:()=>i})},67266(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(86309),o=r(63122);const n=class{constructor(){this.type=o.Z.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=o.Z.ALL}is(t){return this.type===t}};const s=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new n}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=o.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:o}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===o&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:o}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===o&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(o.Z.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")},51931(t,e,r){"use strict";r.d(e,{A:()=>f});var i=r(67266),o=r(63122);const n={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(n.re);if(!e)return;const r=e[1],o=parseInt(r,16),s=r.length,a=s%4==0,l=s>4,h=l?1:17,c=l?8:4,d=a?0:-1,u=l?255:15;return i.A.set({r:(o>>c*(d+3)&u)*h,g:(o>>c*(d+2)&u)*h,b:(o>>c*(d+1)&u)*h,a:a?(o&u)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}${o.Y[Math.round(255*n)]}`:`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}`}},s=n;var a=r(86309);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,r]=e;switch(r){case"grad":return a.A.channel.clamp.h(.9*parseFloat(t));case"rad":return a.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return a.A.channel.clamp.h(360*parseFloat(t))}}return a.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,o,n,s,h,c]=r;return i.A.set({h:l._hue2deg(o),s:a.A.channel.clamp.s(parseFloat(n)),l:a.A.channel.clamp.l(parseFloat(s)),a:h?a.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${a.A.lang.round(e)}, ${a.A.lang.round(r)}%, ${a.A.lang.round(i)}%, ${o})`:`hsl(${a.A.lang.round(e)}, ${a.A.lang.round(r)}%, ${a.A.lang.round(i)}%)`}},h=l,c={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=c.colors[t];if(e)return s.parse(e)},stringify:t=>{const e=s.stringify(t);for(const t in c.colors)if(c.colors[t]===e)return t}},d=c,u={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 r=t.match(u.re);if(!r)return;const[,o,n,s,l,h,c,d,p]=r;return i.A.set({r:a.A.channel.clamp.r(n?2.55*parseFloat(o):parseFloat(o)),g:a.A.channel.clamp.g(l?2.55*parseFloat(s):parseFloat(s)),b:a.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:d?a.A.channel.clamp.a(p?parseFloat(d)/100:parseFloat(d)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${a.A.lang.round(e)}, ${a.A.lang.round(r)}, ${a.A.lang.round(i)}, ${a.A.lang.round(o)})`:`rgb(${a.A.lang.round(e)}, ${a.A.lang.round(r)}, ${a.A.lang.round(i)})`}},p=u,g={format:{keyword:c,hex:s,rgb:u,rgba:u,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=s.parse(t)||p.parse(t)||h.parse(t)||d.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(o.Z.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):s.stringify(t)},f=g},63122(t,e,r){"use strict";var i=r(86309);const o={};for(let t=0;t<=255;t++)o[t]=i.A.unit.dec2hex(t);r.d(e,["Y",0,o,"Z",0,{ALL:0,RGB:1,HSL:2}])},95635(t,e,r){"use strict";var i=r(86309),o=r(51931);const n=(t,e,r)=>{const n=o.A.parse(t),s=n[e],a=i.A.channel.clamp[e](s+r);return s!==a&&(n[e]=a),o.A.stringify(n)};r.d(e,["A",0,n])},8232(t,e,r){"use strict";var i=r(86309),o=r(51931);const n=(t,e)=>{const r=o.A.parse(t);for(const t in e)r[t]=i.A.channel.clamp[t](e[t]);return o.A.stringify(r)};r.d(e,["A",0,n])},75263(t,e,r){"use strict";var i=r(95635);const o=(t,e)=>(0,i.A)(t,"l",-e);r.d(e,["A",0,o])},5097(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(86309),o=r(51931);const n=t=>{const{r:e,g:r,b:n}=o.A.parse(t),s=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(n);return i.A.lang.round(s)},s=t=>n(t)>=.5,a=t=>!s(t)},78041(t,e,r){"use strict";var i=r(95635);const o=(t,e)=>(0,i.A)(t,"l",e);r.d(e,["A",0,o])},25582(t,e,r){"use strict";var i=r(86309),o=r(67266),n=r(51931),s=r(8232);const a=(t,e,r=0,a=1)=>{if("number"!=typeof t)return(0,s.A)(t,{a:e});const l=o.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(a)});return n.A.stringify(l)};r.d(e,["A",0,a])},86309(t,e,r){"use strict";r.d(e,{A:()=>o});const i={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,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},o)=>{if(!e)return 2.55*r;t/=360,e/=100;const n=(r/=100)<.5?r*(1+e):r+e-r*e,s=2*r-n;switch(o){case"r":return 255*i.hue2rgb(s,n,t+1/3);case"g":return 255*i.hue2rgb(s,n,t);case"b":return 255*i.hue2rgb(s,n,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),n=Math.min(t,e,r),s=(o+n)/2;if("l"===i)return 100*s;if(o===n)return 0;const a=o-n;if("s"===i)return 100*(s>.5?a/(2-o-n):a/(o+n));switch(o){case t:return 60*((e-r)/a+(e<r?6:0));case e:return 60*((r-t)/a+2);case r:return 60*((t-e)/a+4);default:return-1}}},o={channel:i,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,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}`}}}},89469(t,e,r){"use strict";r.d(e,{A:()=>u});const i=function(){this.__data__=[],this.size=0};var o=r(66984);const n=function(t,e){for(var r=t.length;r--;)if((0,o.A)(t[r][0],e))return r;return-1};var s=Array.prototype.splice;const a=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():s.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]};const h=function(t){return n(this.__data__,t)>-1};const c=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};function d(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}d.prototype.clear=i,d.prototype.delete=a,d.prototype.get=l,d.prototype.has=h,d.prototype.set=c;const u=d},68335(t,e,r){"use strict";var i=r(28562),o=r(41917);const n=(0,i.A)(o.A,"Map");r.d(e,["A",0,n])},62050(t,e,r){"use strict";r.d(e,{A:()=>S});const i=(0,r(28562).A)(Object,"create");const o=function(){this.__data__=i?i(null):{},this.size=0};const n=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var s=Object.prototype.hasOwnProperty;const a=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return s.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const h=function(t){var e=this.__data__;return i?void 0!==e[t]:l.call(e,t)};const c=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this};function d(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}d.prototype.clear=o,d.prototype.delete=n,d.prototype.get=a,d.prototype.has=h,d.prototype.set=c;const u=d;var p=r(89469),g=r(68335);const f=function(){this.size=0,this.__data__={hash:new u,map:new(g.A||p.A),string:new u}};const y=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const m=function(t,e){var r=t.__data__;return y(e)?r["string"==typeof e?"string":"hash"]:r.map};const x=function(t){var e=m(this,t).delete(t);return this.size-=e?1:0,e};const C=function(t){return m(this,t).get(t)};const b=function(t){return m(this,t).has(t)};const k=function(t,e){var r=m(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this};function w(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}w.prototype.clear=f,w.prototype.delete=x,w.prototype.get=C,w.prototype.has=b,w.prototype.set=k;const S=w},39857(t,e,r){"use strict";var i=r(28562),o=r(41917);const n=(0,i.A)(o.A,"Set");r.d(e,["A",0,n])},8300(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(62050);const o=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const n=function(t){return this.__data__.has(t)};function s(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new i.A;++e<r;)this.add(t[e])}s.prototype.add=s.prototype.push=o,s.prototype.has=n;const a=s},22080(t,e,r){"use strict";r.d(e,{A:()=>u});var i=r(89469);const o=function(){this.__data__=new i.A,this.size=0};const n=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const s=function(t){return this.__data__.get(t)};const a=function(t){return this.__data__.has(t)};var l=r(68335),h=r(62050);const c=function(t,e){var r=this.__data__;if(r instanceof i.A){var o=r.__data__;if(!l.A||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new h.A(o)}return r.set(t,e),this.size=r.size,this};function d(t){var e=this.__data__=new i.A(t);this.size=e.size}d.prototype.clear=o,d.prototype.delete=n,d.prototype.get=s,d.prototype.has=a,d.prototype.set=c;const u=d},241(t,e,r){"use strict";const i=r(41917).A.Symbol;r.d(e,["A",0,i])},43988(t,e,r){"use strict";const i=r(41917).A.Uint8Array;r.d(e,["A",0,i])},72641(t,e,r){"use strict";const i=function(t,e){for(var r=-1,i=null==t?0:t.length;++r<i&&!1!==e(t[r],r,t););return t};r.d(e,["A",0,i])},2634(t,e,r){"use strict";const i=function(t,e){for(var r=-1,i=null==t?0:t.length,o=0,n=[];++r<i;){var s=t[r];e(s,r,t)&&(n[o++]=s)}return n};r.d(e,["A",0,i])},2505(t,e,r){"use strict";r.d(e,{A:()=>c});const i=function(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i};var o=r(25175),n=r(92049),s=r(41200),a=r(25353),l=r(54749),h=Object.prototype.hasOwnProperty;const c=function(t,e){var r=(0,n.A)(t),c=!r&&(0,o.A)(t),d=!r&&!c&&(0,s.A)(t),u=!r&&!c&&!d&&(0,l.A)(t),p=r||c||d||u,g=p?i(t.length,String):[],f=g.length;for(var y in t)!e&&!h.call(t,y)||p&&("length"==y||d&&("offset"==y||"parent"==y)||u&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||(0,a.A)(y,f))||g.push(y);return g}},45572(t,e,r){"use strict";const i=function(t,e){for(var r=-1,i=null==t?0:t.length,o=Array(i);++r<i;)o[r]=e(t[r],r,t);return o};r.d(e,["A",0,i])},76912(t,e,r){"use strict";const i=function(t,e){for(var r=-1,i=e.length,o=t.length;++r<i;)t[o+r]=e[r];return t};r.d(e,["A",0,i])},94288(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(79841),o=r(38446);const n=function(t,e){return function(r,i){if(null==r)return r;if(!(0,o.A)(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&!1!==i(a[s],s,a););return r}}(i.A)},25707(t,e,r){"use strict";const i=function(t,e,r,i){for(var o=t.length,n=r+(i?1:-1);i?n--:++n<o;)if(e(t[n],n,t))return n;return-1};r.d(e,["A",0,i])},87671(t,e,r){"use strict";r.d(e,{A:()=>h});var i=r(76912),o=r(241),n=r(25175),s=r(92049),a=o.A?o.A.isConcatSpreadable:void 0;const l=function(t){return(0,s.A)(t)||(0,n.A)(t)||!!(a&&t&&t[a])};const h=function t(e,r,o,n,s){var a=-1,h=e.length;for(o||(o=l),s||(s=[]);++a<h;){var c=e[a];r>0&&o(c)?r>1?t(c,r-1,o,n,s):(0,i.A)(s,c):n||(s[s.length]=c)}return s}},97132(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e,r,i){for(var o=-1,n=Object(e),s=i(e),a=s.length;a--;){var l=s[t?a:++o];if(!1===r(n[l],l,n))break}return e}}()},79841(t,e,r){"use strict";var i=r(97132),o=r(27422);const n=function(t,e){return t&&(0,i.A)(t,e,o.A)};r.d(e,["A",0,n])},66318(t,e,r){"use strict";var i=r(24878),o=r(30901);const n=function(t,e){for(var r=0,n=(e=(0,i.A)(e,t)).length;null!=t&&r<n;)t=t[(0,o.A)(e[r++])];return r&&r==n?t:void 0};r.d(e,["A",0,n])},33831(t,e,r){"use strict";var i=r(76912),o=r(92049);const n=function(t,e,r){var n=e(t);return(0,o.A)(t)?n:(0,i.A)(n,r(t))};r.d(e,["A",0,n])},2383(t,e,r){"use strict";r.d(e,{A:()=>u});var i=r(241),o=Object.prototype,n=o.hasOwnProperty,s=o.toString,a=i.A?i.A.toStringTag:void 0;const l=function(t){var e=n.call(t,a),r=t[a];try{t[a]=void 0;var i=!0}catch(t){}var o=s.call(t);return i&&(e?t[a]=r:delete t[a]),o};var h=Object.prototype.toString;const c=function(t){return h.call(t)};var d=i.A?i.A.toStringTag:void 0;const u=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":d&&d in Object(t)?l(t):c(t)}},94425(t,e,r){"use strict";r.d(e,{A:()=>Y});var i=r(22080),o=r(8300);const n=function(t,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1};var s=r(64099);const a=function(t,e,r,i,a,l){var h=1&r,c=t.length,d=e.length;if(c!=d&&!(h&&d>c))return!1;var u=l.get(t),p=l.get(e);if(u&&p)return u==e&&p==t;var g=-1,f=!0,y=2&r?new o.A:void 0;for(l.set(t,e),l.set(e,t);++g<c;){var m=t[g],x=e[g];if(i)var C=h?i(x,m,g,e,t,l):i(m,x,g,t,e,l);if(void 0!==C){if(C)continue;f=!1;break}if(y){if(!n(e,function(t,e){if(!(0,s.A)(y,e)&&(m===t||a(m,t,r,i,l)))return y.push(e)})){f=!1;break}}else if(m!==x&&!a(m,x,r,i,l)){f=!1;break}}return l.delete(t),l.delete(e),f};var l=r(241),h=r(43988),c=r(66984);const d=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,i){r[++e]=[i,t]}),r};var u=r(29959),p=l.A?l.A.prototype:void 0,g=p?p.valueOf:void 0;const f=function(t,e,r,i,o,n,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!n(new h.A(t),new h.A(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,c.A)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=d;case"[object Set]":var p=1&i;if(l||(l=u.A),t.size!=e.size&&!p)return!1;var f=s.get(t);if(f)return f==e;i|=2,s.set(t,e);var y=a(l(t),l(e),i,o,n,s);return s.delete(t),y;case"[object Symbol]":if(g)return g.call(t)==g.call(e)}return!1};var y=r(19042),m=Object.prototype.hasOwnProperty;const x=function(t,e,r,i,o,n){var s=1&r,a=(0,y.A)(t),l=a.length;if(l!=(0,y.A)(e).length&&!s)return!1;for(var h=l;h--;){var c=a[h];if(!(s?c in e:m.call(e,c)))return!1}var d=n.get(t),u=n.get(e);if(d&&u)return d==e&&u==t;var p=!0;n.set(t,e),n.set(e,t);for(var g=s;++h<l;){var f=t[c=a[h]],x=e[c];if(i)var C=s?i(x,f,c,e,t,n):i(f,x,c,t,e,n);if(!(void 0===C?f===x||o(f,x,r,i,n):C)){p=!1;break}g||(g="constructor"==c)}if(p&&!g){var b=t.constructor,k=e.constructor;b==k||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof k&&k instanceof k||(p=!1)}return n.delete(t),n.delete(e),p};var C=r(9137),b=r(92049),k=r(41200),w=r(54749),S="[object Arguments]",T="[object Array]",v="[object Object]",B=Object.prototype.hasOwnProperty;const _=function(t,e,r,o,n,s){var l=(0,b.A)(t),h=(0,b.A)(e),c=l?T:(0,C.A)(t),d=h?T:(0,C.A)(e),u=(c=c==S?v:c)==v,p=(d=d==S?v:d)==v,g=c==d;if(g&&(0,k.A)(t)){if(!(0,k.A)(e))return!1;l=!0,u=!1}if(g&&!u)return s||(s=new i.A),l||(0,w.A)(t)?a(t,e,r,o,n,s):f(t,e,c,r,o,n,s);if(!(1&r)){var y=u&&B.call(t,"__wrapped__"),m=p&&B.call(e,"__wrapped__");if(y||m){var _=y?t.value():t,A=m?e.value():e;return s||(s=new i.A),n(_,A,r,o,s)}}return!!g&&(s||(s=new i.A),x(t,e,r,o,n,s))};var A=r(53098);const L=function t(e,r,i,o,n){return e===r||(null==e||null==r||!(0,A.A)(e)&&!(0,A.A)(r)?e!=e&&r!=r:_(e,r,i,o,t,n))};const F=function(t,e,r,o){var n=r.length,s=n,a=!o;if(null==t)return!s;for(t=Object(t);n--;){var l=r[n];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++n<s;){var h=(l=r[n])[0],c=t[h],d=l[1];if(a&&l[2]){if(void 0===c&&!(h in t))return!1}else{var u=new i.A;if(o)var p=o(c,d,h,t,e,u);if(!(void 0===p?L(d,c,3,o,u):p))return!1}}return!0};var M=r(23149);const E=function(t){return t==t&&!(0,M.A)(t)};var $=r(27422);const O=function(t){for(var e=(0,$.A)(t),r=e.length;r--;){var i=e[r],o=t[i];e[r]=[i,o,E(o)]}return e};const D=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};const I=function(t){var e=O(t);return 1==e.length&&e[0][2]?D(e[0][0],e[0][1]):function(r){return r===t||F(r,t,e)}};var q=r(66318);const R=function(t,e,r){var i=null==t?void 0:(0,q.A)(t,e);return void 0===i?r:i};var K=r(46964),z=r(86586),N=r(30901);const P=function(t,e){return(0,z.A)(t)&&E(e)?D((0,N.A)(t),e):function(r){var i=R(r,t);return void 0===i&&i===e?(0,K.A)(r,t):L(e,i,3)}};var W=r(29008),j=r(70805);const H=function(t){return function(e){return(0,q.A)(e,t)}};const U=function(t){return(0,z.A)(t)?(0,j.A)((0,N.A)(t)):H(t)};const Y=function(t){return"function"==typeof t?t:null==t?W.A:"object"==typeof t?(0,b.A)(t)?P(t[0],t[1]):I(t):U(t)}},14453(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(97271);const o=(0,r(40367).A)(Object.keys,Object);var n=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,i.A)(t))return o(t);var e=[];for(var r in Object(t))n.call(t,r)&&"constructor"!=r&&e.push(r);return e}},70805(t,e,r){"use strict";const i=function(t){return function(e){return null==e?void 0:e[t]}};r.d(e,["A",0,i])},24326(t,e,r){"use strict";var i=r(29008),o=r(65255),n=r(57424);const s=function(t,e){return(0,n.A)((0,o.A)(t,e,i.A),t+"")};r.d(e,["A",0,s])},52789(t,e,r){"use strict";const i=function(t){return function(e){return t(e)}};r.d(e,["A",0,i])},64099(t,e,r){"use strict";const i=function(t,e){return t.has(e)};r.d(e,["A",0,i])},99922(t,e,r){"use strict";var i=r(29008);const o=function(t){return"function"==typeof t?t:i.A};r.d(e,["A",0,o])},24878(t,e,r){"use strict";r.d(e,{A:()=>u});var i=r(92049),o=r(86586),n=r(62050);function s(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,o=e?e.apply(this,i):i[0],n=r.cache;if(n.has(o))return n.get(o);var s=t.apply(this,i);return r.cache=n.set(o,s)||n,s};return r.cache=new(s.Cache||n.A),r}s.Cache=n.A;const a=s;var l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g;const c=function(t){var e=a(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(l,function(t,r,i,o){e.push(i?o.replace(h,"$1"):r||t)}),e});var d=r(3456);const u=function(t,e){return(0,i.A)(t)?t:(0,o.A)(t,e)?[t]:c((0,d.A)(t))}},84171(t,e,r){"use strict";var i=r(28562);const o=function(){try{var t=(0,i.A)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();r.d(e,["A",0,o])},72136(t,e,r){"use strict";const i="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;r.d(e,["A",0,i])},19042(t,e,r){"use strict";var i=r(33831),o=r(14792),n=r(27422);const s=function(t){return(0,i.A)(t,n.A,o.A)};r.d(e,["A",0,s])},28562(t,e,r){"use strict";r.d(e,{A:()=>x});var i=r(89610);const o=r(41917).A["__core-js_shared__"];var n,s=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";const a=function(t){return!!s&&s in t};var l=r(23149),h=r(81121),c=/^\[object .+?Constructor\]$/,d=Function.prototype,u=Object.prototype,p=d.toString,g=u.hasOwnProperty,f=RegExp("^"+p.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(t){return!(!(0,l.A)(t)||a(t))&&((0,i.A)(t)?f:c).test((0,h.A)(t))};const m=function(t,e){return null==t?void 0:t[e]};const x=function(t,e){var r=m(t,e);return y(r)?r:void 0}},14792(t,e,r){"use strict";var i=r(2634),o=r(13153),n=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const a=s?function(t){return null==t?[]:(t=Object(t),(0,i.A)(s(t),function(e){return n.call(t,e)}))}:o.A;r.d(e,["A",0,a])},9137(t,e,r){"use strict";r.d(e,{A:()=>S});var i=r(28562),o=r(41917);const n=(0,i.A)(o.A,"DataView");var s=r(68335);const a=(0,i.A)(o.A,"Promise");var l=r(39857);const h=(0,i.A)(o.A,"WeakMap");var c=r(2383),d=r(81121),u="[object Map]",p="[object Promise]",g="[object Set]",f="[object WeakMap]",y="[object DataView]",m=(0,d.A)(n),x=(0,d.A)(s.A),C=(0,d.A)(a),b=(0,d.A)(l.A),k=(0,d.A)(h),w=c.A;(n&&w(new n(new ArrayBuffer(1)))!=y||s.A&&w(new s.A)!=u||a&&w(a.resolve())!=p||l.A&&w(new l.A)!=g||h&&w(new h)!=f)&&(w=function(t){var e=(0,c.A)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,d.A)(r):"";if(i)switch(i){case m:return y;case x:return u;case C:return p;case b:return g;case k:return f}return e});const S=w},85054(t,e,r){"use strict";var i=r(24878),o=r(25175),n=r(92049),s=r(25353),a=r(5254),l=r(30901);const h=function(t,e,r){for(var h=-1,c=(e=(0,i.A)(e,t)).length,d=!1;++h<c;){var u=(0,l.A)(e[h]);if(!(d=null!=t&&r(t,u)))break;t=t[u]}return d||++h!=c?d:!!(c=null==t?0:t.length)&&(0,a.A)(c)&&(0,s.A)(u,c)&&((0,n.A)(t)||(0,o.A)(t))};r.d(e,["A",0,h])},25353(t,e,r){"use strict";var i=/^(?:0|[1-9]\d*)$/;const o=function(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&i.test(t))&&t>-1&&t%1==0&&t<e};r.d(e,["A",0,o])},86586(t,e,r){"use strict";var i=r(92049),o=r(61882),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const a=function(t,e){if((0,i.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,o.A)(t))||(s.test(t)||!n.test(t)||null!=e&&t in Object(e))};r.d(e,["A",0,a])},97271(t,e,r){"use strict";var i=Object.prototype;const o=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)};r.d(e,["A",0,o])},64841(t,e,r){"use strict";var i=r(72136),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=n&&n.exports===o&&i.A.process;const a=function(){try{var t=n&&n.require&&n.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();r.d(e,["A",0,a])},40367(t,e,r){"use strict";const i=function(t,e){return function(r){return t(e(r))}};r.d(e,["A",0,i])},65255(t,e,r){"use strict";r.d(e,{A:()=>n});const i=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var o=Math.max;const n=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var n=arguments,s=-1,a=o(n.length-e,0),l=Array(a);++s<a;)l[s]=n[e+s];s=-1;for(var h=Array(e+1);++s<e;)h[s]=n[s];return h[e]=r(l),i(t,this,h)}}},41917(t,e,r){"use strict";var i=r(72136),o="object"==typeof self&&self&&self.Object===Object&&self;const n=i.A||o||Function("return this")();r.d(e,["A",0,n])},29959(t,e,r){"use strict";const i=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r};r.d(e,["A",0,i])},57424(t,e,r){"use strict";r.d(e,{A:()=>h});var i=r(39142),o=r(84171),n=r(29008);const s=o.A?function(t,e){return(0,o.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.A)(e),writable:!0})}:n.A;var a=Date.now;const l=function(t){var e=0,r=0;return function(){var i=a(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const h=l(s)},30901(t,e,r){"use strict";var i=r(61882);const o=function(t){if("string"==typeof t||(0,i.A)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};r.d(e,["A",0,o])},81121(t,e,r){"use strict";var i=Function.prototype.toString;const o=function(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""};r.d(e,["A",0,o])},39142(t,e,r){"use strict";const i=function(t){return function(){return t}};r.d(e,["A",0,i])},66984(t,e,r){"use strict";const i=function(t,e){return t===e||t!=t&&e!=e};r.d(e,["A",0,i])},66070(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(2634),o=r(94288);const n=function(t,e){var r=[];return(0,o.A)(t,function(t,i,o){e(t,i,o)&&r.push(t)}),r};var s=r(94425),a=r(92049);const l=function(t,e){return((0,a.A)(t)?i.A:n)(t,(0,s.A)(e,3))}},8058(t,e,r){"use strict";var i=r(72641),o=r(94288),n=r(99922),s=r(92049);const a=function(t,e){return((0,s.A)(t)?i.A:o.A)(t,(0,n.A)(e))};r.d(e,["A",0,a])},46964(t,e,r){"use strict";r.d(e,{A:()=>n});const i=function(t,e){return null!=t&&e in Object(t)};var o=r(85054);const n=function(t,e){return null!=t&&(0,o.A)(t,e,i)}},29008(t,e,r){"use strict";const i=function(t){return t};r.d(e,["A",0,i])},25175(t,e,r){"use strict";r.d(e,{A:()=>c});var i=r(2383),o=r(53098);const n=function(t){return(0,o.A)(t)&&"[object Arguments]"==(0,i.A)(t)};var s=Object.prototype,a=s.hasOwnProperty,l=s.propertyIsEnumerable,h=n(function(){return arguments}())?n:function(t){return(0,o.A)(t)&&a.call(t,"callee")&&!l.call(t,"callee")};const c=h},92049(t,e,r){"use strict";const i=Array.isArray;r.d(e,["A",0,i])},38446(t,e,r){"use strict";var i=r(89610),o=r(5254);const n=function(t){return null!=t&&(0,o.A)(t.length)&&!(0,i.A)(t)};r.d(e,["A",0,n])},53533(t,e,r){"use strict";var i=r(38446),o=r(53098);const n=function(t){return(0,o.A)(t)&&(0,i.A)(t)};r.d(e,["A",0,n])},41200(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(41917);const o=function(){return!1};var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=s&&s.exports===n?i.A.Buffer:void 0;const l=(a?a.isBuffer:void 0)||o},89610(t,e,r){"use strict";var i=r(2383),o=r(23149);const n=function(t){if(!(0,o.A)(t))return!1;var e=(0,i.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};r.d(e,["A",0,n])},5254(t,e,r){"use strict";const i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};r.d(e,["A",0,i])},23149(t,e,r){"use strict";const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};r.d(e,["A",0,i])},53098(t,e,r){"use strict";const i=function(t){return null!=t&&"object"==typeof t};r.d(e,["A",0,i])},61882(t,e,r){"use strict";var i=r(2383),o=r(53098);const n=function(t){return"symbol"==typeof t||(0,o.A)(t)&&"[object Symbol]"==(0,i.A)(t)};r.d(e,["A",0,n])},54749(t,e,r){"use strict";r.d(e,{A:()=>d});var i=r(2383),o=r(5254),n=r(53098),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;const a=function(t){return(0,n.A)(t)&&(0,o.A)(t.length)&&!!s[(0,i.A)(t)]};var l=r(52789),h=r(64841),c=h.A&&h.A.isTypedArray;const d=c?(0,l.A)(c):a},69592(t,e,r){"use strict";const i=function(t){return void 0===t};r.d(e,["A",0,i])},27422(t,e,r){"use strict";var i=r(2505),o=r(14453),n=r(38446);const s=function(t){return(0,n.A)(t)?(0,i.A)(t):(0,o.A)(t)};r.d(e,["A",0,s])},83130(t,e,r){"use strict";r.d(e,{A:()=>l});const i=function(t,e,r,i){var o=-1,n=null==t?0:t.length;for(i&&n&&(r=t[++o]);++o<n;)r=e(r,t[o],o,t);return r};var o=r(94288),n=r(94425);const s=function(t,e,r,i,o){return o(t,function(t,o,n){r=i?(i=!1,t):e(r,t,o,n)}),r};var a=r(92049);const l=function(t,e,r){var l=(0,a.A)(t)?i:s,h=arguments.length<3;return l(t,(0,n.A)(e,4),r,h,o.A)}},13153(t,e,r){"use strict";const i=function(){return[]};r.d(e,["A",0,i])},3456(t,e,r){"use strict";r.d(e,{A:()=>c});var i=r(241),o=r(45572),n=r(92049),s=r(61882),a=i.A?i.A.prototype:void 0,l=a?a.toString:void 0;const h=function t(e){if("string"==typeof e)return e;if((0,n.A)(e))return(0,o.A)(e,t)+"";if((0,s.A)(e))return l?l.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};const c=function(t){return null==t?"":h(t)}},92866(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(45572);const o=function(t,e){return(0,i.A)(e,function(e){return t[e]})};var n=r(27422);const s=function(t){return null==t?[]:o(t,(0,n.A)(t))}},5691(t,e,r){"use strict";r.d(e,{B:()=>u,OS:()=>_,dc:()=>v,ju:()=>y,sc:()=>F,sv:()=>g,xY:()=>$});var i=r(24980),o=r(27838),n=r(96865),s=r(48159),a=r(12505),l=r(86535),h=r(31293),c=r(86827),d=r(697);function u(t,{edgePathsClass:e="edges edgePaths"}={}){const r=t.insert("g").attr("class","root");return{clusters:r.insert("g").attr("class","clusters"),edgePaths:r.insert("g").attr("class",e),edgeLabels:r.insert("g").attr("class","edgeLabels"),nodes:r.insert("g").attr("class","nodes"),rootGroups:r}}async function p(t,e){if(e.label){const{shapeSvg:r,bbox:i}=await(0,s.Zk)(t,e);e.labelBBox={width:i.width,height:i.height},r.remove()}else e.labelBBox={width:0,height:0}}async function g(t,e,r){const i=await(0,n.on)(t,e,r),o=i.node()?.getBBox()??{width:0,height:0};return e.width=o.width,e.height=o.height,i}async function f(t,e){const i=new d.T({multigraph:!0,compound:!0}),n=[...e.edges],s=(0,l.D7)(),a=u(t),{edgeLabels:h,nodes:c}=a,f=new Map,y=null!=t.node();await Promise.all(e.nodes.map(async t=>{if(t.isGroup)y&&await p(c,t),i.setNode(t.id,{...t});else{if(y){const e=await g(c,t,{config:s,dir:t.dir});f.set(t.id,e)}i.setNode(t.id,{...t})}}));for(const t of n){y&&(0,o.a6)(t)&&await(0,o.jP)(h,t),i.setEdge(t.start,t.end,{...t},t.id);e.edges.some(e=>e.id===t.id)||e.edges.push(t)}if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:i}=await r.e(5137).then(()=>r(5137));i(t,e)}return{graph:i,groups:a,nodeElements:f}}(0,c.K)(u,"createLayoutElementGroups"),(0,c.K)(p,"measureGroupLabel"),(0,c.K)(g,"insertMeasuredNode"),(0,c.K)(f,"createGraphWithElements");var y=new Map,m=new Map,x=new Map,C=(0,c.K)(()=>{m.clear(),x.clear(),y.clear()},"clear"),b=(0,c.K)((t,e)=>{const r=m.get(e)||[];return h.R.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),k=(0,c.K)((t,e)=>{const r=m.get(e)||[];return h.R.info("Descendants of ",e," is ",r),h.R.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||b(t.v,e)||b(t.w,e)||r.includes(t.w):(h.R.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),w=(0,c.K)((t,e,r,i)=>{h.R.debug("Copying children of ",t,"root",i,"data",e.node(t),i);const o=e.children(t)||[];t!==i&&o.push(t),h.R.debug("Copying (nodes) clusterId",t,"nodes",o),o.forEach(o=>{if(e.children(o).length>0)w(o,e,r,i);else{const n=e.node(o);h.R.info("cp ",o," to ",i," with parent ",t),r.setNode(o,n),i!==e.parent(o)&&(h.R.debug("Setting parent",o,e.parent(o)),r.setParent(o,e.parent(o))),t!==i&&o!==t?(h.R.debug("Setting parent",o,t),r.setParent(o,t)):(h.R.info("In copy ",t,"root",i,"data",e.node(t),i),h.R.debug("Not Setting parent for node=",o,"cluster!==rootId",t!==i,"node!==clusterId",o!==t));const s=e.edges(o);h.R.debug("Copying Edges",s),s.forEach(o=>{h.R.info("Edge",o);const n=e.edge(o.v,o.w,o.name);h.R.info("Edge data",n,i);try{k(o,i)?(h.R.info("Copying as ",o.v,o.w,n,o.name),r.setEdge(o.v,o.w,n,o.name),h.R.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):h.R.info("Skipping copy of edge ",o.v,"--\x3e",o.w," rootId: ",i," clusterId:",t)}catch(t){h.R.error(t)}})}h.R.debug("Removing node",o),e.removeNode(o)})},"copy"),S=(0,c.K)((t,e)=>{const r=e.children(t);let i=[...r];for(const o of r)x.set(o,t),i=[...i,...S(o,e)];return i},"extractDescendants"),T=(0,c.K)((t,e,r)=>{const i=t.edges().filter(t=>t.v===e||t.w===e),o=t.edges().filter(t=>t.v===r||t.w===r),n=i.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),s=o.map(t=>({v:t.v,w:t.w}));return n.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),v=(0,c.K)((t,e,r)=>{const i=e.children(t);if(h.R.trace("Searching children of id ",t,i),i.length<1)return t;let o;for(const t of i){const i=v(t,e,r),n=T(e,r,i);if(i){if(!(n.length>0))return i;o=i}}return o},"findNonClusterChild"),B=(0,c.K)(t=>y.has(t)&&y.get(t).externalConnections&&y.has(t)?y.get(t).id:t,"getAnchorId"),_=(0,c.K)((t,e)=>{if(!t||e>10)h.R.debug("Opting out, no graph ");else{h.R.debug("Opting in, graph "),t.nodes().forEach(function(e){t.children(e).length>0&&(h.R.debug("Cluster identified",e," Replacement id in edges: ",v(e,t,e)),m.set(e,S(e,t)),y.set(e,{id:v(e,t,e),clusterData:t.node(e)}))}),t.nodes().forEach(function(e){const r=t.children(e),i=t.edges();r.length>0?(h.R.debug("Cluster identified",e,m),i.forEach(t=>{b(t.v,e)^b(t.w,e)&&(h.R.debug("Edge: ",t," leaves cluster ",e),h.R.debug("Descendants of XXX ",e,": ",m.get(e)),y.get(e).externalConnections=!0)})):h.R.debug("Not a cluster ",e,m)});for(let e of y.keys()){const r=y.get(e).id,i=t.parent(r);i!==e&&y.has(i)&&!y.get(i).externalConnections&&(y.get(e).id=i);const o=t.edges().some(t=>t.v===e);if(r&&y.get(e)?.externalConnections&&o&&M(t,r,e)){const i=E(t,e,t.parent(r));i&&(y.get(e).id=i)}}t.edges().forEach(function(e){const r=t.edge(e);h.R.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),h.R.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let i=e.v,o=e.w;if(h.R.debug("Fix XXX",y,"ids:",e.v,e.w,"Translating: ",y.get(e.v)," --- ",y.get(e.w)),y.get(e.v)||y.get(e.w)){if(h.R.debug("Fixing and trying - removing XXX",e.v,e.w,e.name),i=B(e.v),o=B(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v){const o=t.parent(i);y.get(o).externalConnections=!0,r.fromCluster=e.v}if(o!==e.w){const i=t.parent(o);y.get(i).externalConnections=!0,r.toCluster=e.w}h.R.debug("Fix Replacing with XXX",i,o,e.name),t.setEdge(i,o,r,e.name)}}),A(t,0),h.R.trace(y)}},"adjustClustersAndEdges"),A=(0,c.K)((t,e)=>{if(e>10)return void h.R.error("Bailing out");let r=t.nodes(),i=!1;for(const e of r){const r=t.children(e);i=i||r.length>0}if(i){h.R.debug("Nodes = ",r,e);for(const i of r)if(h.R.debug("Extracting node",i,y,y.has(i)&&!y.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),y.has(i))if(!y.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){h.R.debug("Cluster without external connections, without a parent and with children",i,e);let r="TB"===t.graph().rankdir?"LR":"TB";y.get(i)?.clusterData?.dir&&(r=y.get(i).clusterData.dir,h.R.debug("Fixing dir",y.get(i).clusterData.dir,r));const o=new d.T({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});w(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:y.get(i).clusterData,label:y.get(i).label,graph:o})}else h.R.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!y.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),h.R.debug(y);else h.R.debug("Not a cluster",i,e);r=t.nodes(),h.R.debug("New list of nodes",r);for(const i of r){const r=t.node(i);h.R.debug(" Now next level",i,r),r?.clusterNode&&A(r.graph,e+1)}}else h.R.debug("Done, no node has children",t.nodes())},"extractor"),L=(0,c.K)((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{const i=t.children(e),o=L(t,i);r=[...r,...o]}),r},"sorter"),F=(0,c.K)(t=>L(t,t.children()),"sortNodesByHierarchy"),M=(0,c.K)((t,e,r)=>{let i=t.parent(e);for(;i&&i!==r;){const e=y.get(i);if(e&&!e.externalConnections)return!0;i=t.parent(i)}return!1},"isNodeInExtractableCluster"),E=(0,c.K)((t,e,r)=>{const i=t.children(e)??[];for(const o of i){if(o===r||b(o,r))continue;const i=v(o,t,e);if(i&&!M(t,i,e))return i}return null},"findSafeAnchorNode");function $({prepareLayout:t,measureLayout:e,runLayoutCore:r,paintLayout:i,afterPaint:n,paintOptions:s}){const a=e??D;return(0,c.K)(async function(e,l,h,c){const d=l.select("g");(h?.insertMarkers??o.g0)(d,e.markers,e.type,e.diagramId),O();const u={element:d,helpers:h,options:c};u.preparedLayout=await(t?.(e,u));const p=await a(e,u),g=await r(e,u),f={...u,measure:p};i?await i(e,f,g):await I(e,f,s),await(n?.(e,f,g))},"render")}function O(){(0,n.IU)(),(0,o.IU)(),(0,i.I)(),C()}async function D(t,{element:e}){return await f(e,t)}async function I(t,e,r={}){const{measure:i}=e,{groups:o}=i;for(const i of r.getNodes?.(t,e)??t.nodes)r.skipNode?.(i,e)||await q(o,i,e,r);const n=K(t.nodes);for(const i of t.edges)z(i,r)||await N(o,i,n,t,r,e)}async function q(t,e,r,o){e.clusterNode?(0,n.U_)(e):R(e,r,o)?await(0,i.U)(t.clusters,e):(0,n.U_)(e)}function R(t,e,r){return!0===t.isGroup&&(r.isCluster?.(t,e)??!0)}function K(t){const e=new Map;for(const r of t)r?.id&&e.set(r.id,r);return e}function z(t,e){return t.isLayoutOnly||Boolean(e.skipEdge?.(t))}async function N(t,e,r,i,n,s){const a=(0,o.Jo)(t.edgePaths,{...e},n.clusterDb??new Map,i.type,P(e.start,e,r,s,n),P(e.end,e,r,s,n),i.diagramId,W(e,n));(0,o.a6)(e)&&(o.lP.has(e.id)||await(0,o.jP)(t.edgeLabels,e),j(e,a))}function P(t,e,r,i,o){return o.getEdgeNode?.(t,e,i)??(t?r.get(t)??{}:{})}function W(t,e){return"function"==typeof e.skipIntersect?e.skipIntersect(t):e.skipIntersect??!1}function j(t,e){const r=e?.updatedPath??e?.originalPath,i=(0,l.zj)(),{subGraphTitleTotalMargin:s}=(0,n.Oi)({flowchart:i.flowchart??{}});if(t.label){const i=o.lP.get(t.id);let n=t.x,l=t.y;if(r){const i=a._K.calcLabelPosition(r);h.R.debug("Moving label "+t.label+" from (",n,",",l,") to (",i.x,",",i.y,") abc88"),e?.updatedPath&&(n=i.x,l=i.y)}i.attr("transform",`translate(${n}, ${l+s/2})`)}if(t?.startLabelLeft){const e=o.UQ.get(t.id).startLeft;let i=t?.x,n=t?.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){const e=o.UQ.get(t.id).startRight;let i=t.x,n=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){const e=o.UQ.get(t.id).endLeft;let i=t.x,n=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){const e=o.UQ.get(t.id).endRight;let i=t.x,n=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}}(0,c.K)($,"createCommonLayoutRenderer"),(0,c.K)(O,"clearLayoutRenderState"),(0,c.K)(D,"defaultMeasureLayout"),(0,c.K)(I,"paintLayoutData"),(0,c.K)(q,"paintLayoutNode"),(0,c.K)(R,"shouldPaintAsCluster"),(0,c.K)(K,"buildNodeLookup"),(0,c.K)(z,"shouldSkipPaintEdge"),(0,c.K)(N,"paintLayoutEdge"),(0,c.K)(P,"getRenderedNode"),(0,c.K)(W,"shouldSkipIntersect"),(0,c.K)(j,"positionRenderedEdgeLabel")},48159(t,e,r){"use strict";r.d(e,{DA:()=>v,FA:()=>T,Zk:()=>f,aP:()=>Re,lC:()=>m,nM:()=>S,nq:()=>qe});var i=r(44505),o=r(69793),n=r(43287),s=r(12505),a=r(86535),l=r(31293),h=r(86827),c=r(51444),d=r(61057);async function u(t){const e=t.getElementsByTagName("img");if(!e||0===e.length)return;const r=!p(t);await Promise.all([...e].map(t=>new Promise(e=>{function i(){if(t.style.display="flex",t.style.flexDirection="column",r){const e=(0,a.D7)().fontSize?(0,a.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=a.UI.fontSize]=(0,s.I5)(e),o=i*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}(0,h.K)(i,"setupImage"),setTimeout(()=>{t.complete&&i()}),t.addEventListener("error",i),t.addEventListener("load",i)})))}function p(t){if(3===t.nodeType)return""!==t.textContent?.trim();if(1!==t.nodeType)return!1;return"img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(p)}(0,h.K)(u,"configureLabelImages"),(0,h.K)(p,"hasTextBesidesImages");var g=(0,h.K)(async(t,e,r)=>{const i=(0,a.D7)(),n=t.insert("g").attr("class",r??"node default").attr("id",e.domId||e.id),l=n.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle)),h=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),d=e.width?Math.max(e.width-2*(e.padding??0),32):(0,a.D7)().flowchart?.wrappingWidth??200,u=i.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,p=await Promise.all(h.map(async t=>{const r=l.append("g").attr("class",t.cssClass),n=await(0,o.GZ)(r,(0,a.jZ)((0,s.Sm)(t.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},i);return(0,c.Ltv)(n).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),(0,c.Ltv)(n).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:r,box:r.node().getBBox()}})),g=Math.max(...p.map(({box:t})=>t.width),0);let f=0;for(const{el:t,box:e}of p)t.attr("transform",`translate(${g/2-e.x-e.width/2}, ${f-e.y})`),f+=e.height+3;const y=p.length>0?f-3:0;l.insert("rect",":first-child"),l.attr("transform",`translate(${-g/2}, ${-y/2})`);return{shapeSvg:n,bbox:l.node().getBBox(),halfPadding:(e.padding??0)/2,label:l}},"c4LabelHelper"),f=(0,h.K)(async(t,e,r)=>{if(void 0!==e.stereotype)return g(t,e,r);let i;const n=e.useHtmlLabels||(0,a._3)((0,a.D7)()?.htmlLabels);i=r||"node default";const l=t.insert("g").attr("class",i).attr("id",e.domId||e.id),h=l.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));let d;d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=!!e.icon||!!e.img,f="markdown"===e.labelType,y=await(0,o.GZ)(h,(0,a.jZ)((0,s.Sm)(d),(0,a.D7)()),{useHtmlLabels:n,width:e.width||e.wrappingWidth||(0,a.D7)().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:p,markdown:f},(0,a.D7)()),m=(e?.padding??0)/2;let x;if(n){const t=y.children[0],e=(0,c.Ltv)(y);await u(t),x=await o.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",x.width),e.attr("height",x.height)}else x=await o.lT.measure(()=>y.getBBox());return n?h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):h.attr("transform","translate(0, "+-x.height/2+")"),e.centerLabel&&h.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:l,bbox:x,halfPadding:m,label:h}},"labelHelper"),y=(0,h.K)(async(t,e,r)=>{const i=r.useHtmlLabels??(0,a.E)((0,a.D7)()),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,o.GZ)(n,(0,a.jZ)((0,s.Sm)(e),(0,a.D7)()),{useHtmlLabels:i,width:r.width||(0,a.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),h=r.padding/2;let d;if((0,a.E)((0,a.D7)())){const t=l.children[0],e=(0,c.Ltv)(l);d=await o.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",d.width),e.attr("height",d.height)}else d=await o.lT.measure(()=>l.getBBox());return i?n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):n.attr("transform","translate(0, "+-d.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:h,label:n}},"insertLabel"),m=(0,h.K)((t,e,r)=>{if(r)return t.width=r.width,void(t.height=r.height);const i=e.node().getBBox();t.width=i.width,t.height=i.height},"updateNodeBounds"),x=(0,h.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function C(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function b(t,e,r,i,o,n){const s=[],a=r-t,l=i-e,h=a/n,c=2*Math.PI/h,d=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*a,i=d+o*Math.sin(c*(r-t));s.push({x:r,y:i})}return s}function k(t,e,r,i,o,n){const s=[],a=o*Math.PI/180,l=(n*Math.PI/180-a)/(i-1);for(let o=0;o<i;o++){const i=a+o*l,n=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-n,y:-h})}return s}function w(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),n=e.find(t=>"none"!==t.getAttribute("stroke")),s=(0,h.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:s(o,"fill"),"fill-opacity":s(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(n){const t={stroke:s(n,"stroke"),"stroke-width":s(n,"stroke-width")??"1","stroke-opacity":s(n,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const a=document.createElementNS("http://www.w3.org/2000/svg","g");return a.appendChild(r),a}(0,h.K)(C,"createPathFromPoints"),(0,h.K)(b,"generateFullSineWavePoints"),(0,h.K)(k,"generateCirclePoints"),(0,h.K)(w,"mergePaths");var S=(0,h.K)((t,e)=>{var r,i,o=t.x,n=t.y,s=e.x-o,a=e.y-n,l=t.width/2,h=t.height/2;return Math.abs(a)*l>Math.abs(s)*h?(a<0&&(h=-h),r=0===a?0:h*s/a,i=h):(s<0&&(l=-l),r=l,i=0===s?0:l*a/s),{x:o+r,y:n+i}},"intersectRect"),T=(0,h.K)((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),v=(0,h.K)(async(t,e,r,i=!1,n=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);const l=(0,a.D7)(),h=(0,a.E)(l);return await(0,o.GZ)(t,s,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},l)},"createLabel");function B(t,e){return t.intersect(e)}(0,h.K)(B,"intersectNode");var _=B;function A(t,e,r,i){var o=t.x,n=t.y,s=o-i.x,a=n-i.y,l=Math.sqrt(e*e*a*a+r*r*s*s),h=Math.abs(e*r*s/l);i.x<o&&(h=-h);var c=Math.abs(e*r*a/l);return i.y<n&&(c=-c),{x:o+h,y:n+c}}(0,h.K)(A,"intersectEllipse");var L=A;function F(t,e,r){return L(t,e,e,r)}(0,h.K)(F,"intersectCircle");var M=F;function E(t,e,r,i){{const o=e.y-t.y,n=t.x-e.x,s=e.x*t.y-t.x*e.y,a=o*r.x+n*r.y+s,l=o*i.x+n*i.y+s,h=1e-6;if(0!==a&&0!==l&&$(a,l))return;const c=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,p=c*t.x+d*t.y+u,g=c*e.x+d*e.y+u;if(Math.abs(p)<h&&Math.abs(g)<h&&$(p,g))return;const f=o*d-c*n;if(0===f)return;const y=Math.abs(f/2);let m=n*u-d*s;const x=m<0?(m-y)/f:(m+y)/f;m=c*s-o*u;return{x,y:m<0?(m-y)/f:(m+y)/f}}}function $(t,e){return t*e>0}(0,h.K)(E,"intersectLine"),(0,h.K)($,"sameSign");var O=E;function D(t,e,r){let i=t.x,o=t.y,n=[],s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),a=Math.min(a,t.y)}):(s=Math.min(s,e.x),a=Math.min(a,e.y));let l=i-t.width/2-s,h=o-t.height/2-a;for(let i=0;i<e.length;i++){let o=e[i],s=e[i<e.length-1?i+1:0],a=O(t,r,{x:l+o.x,y:h+o.y},{x:l+s.x,y:h+s.y});a&&n.push(a)}return n.length?(n.length>1&&n.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,n=Math.sqrt(i*i+o*o),s=e.x-r.x,a=e.y-r.y,l=Math.sqrt(s*s+a*a);return n<l?-1:n===l?0:1}),n[0]):t}(0,h.K)(D,"intersectPolygon");var I={node:_,circle:M,ellipse:L,polygon:D,rect:S};function q(t,e){const{labelStyles:r}=(0,i.GX)(e);e.labelStyle=r;const o=x(e);let n=o;o||(n="anchor");const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),{cssStyles:h}=e,c=d.A.svg(a),u=(0,i.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);const p=c.circle(0,0,2,u),g=a.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",(0,s.KL)(h)),m(e,g),e.intersect=function(t){return l.R.info("Circle intersect",e,1,t),I.circle(e,1,t)},a}function R(t,e,r,i,o,n,s){const a=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/n,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=a+p*n*Math.sin(h)*(s?-1:1),f=l-p*o*Math.cos(h)*(s?-1:1),y=Math.atan2((e-f)/n,(t-g)/o);let m=Math.atan2((i-f)/n,(r-g)/o)-y;s&&m<0&&(m+=2*Math.PI),!s&&m>0&&(m-=2*Math.PI);const x=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=g+o*Math.cos(e),i=f+n*Math.sin(e);x.push({x:r,y:i})}return x}function K(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function z(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?12:n,l=(0,h.K)(t=>t+a,"calcTotalHeight"),c=(0,h.K)(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:u,bbox:p}=await f(t,e,x(e)),g=l(e?.height?e?.height:p.height),[y,b]=c(g),k=K(g,y,b),w=(e?.width?e?.width:p.width)+2*s+k-k,S=g,{cssStyles:T}=e,v=[{x:w/2,y:-S/2},{x:-w/2,y:-S/2},...R(-w/2,-S/2,-w/2,S/2,y,b,!1),{x:w/2,y:S/2},...R(w/2,S/2,w/2,-S/2,y,b,!0)],B=d.A.svg(u),_=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=C(v),L=B.path(A,_),F=u.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",T),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(${y/2}, 0)`),m(e,F),e.intersect=function(t){return I.polygon(e,v,t)},u}async function N(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:a,label:l}=await f(t,e,x(e)),c=r?.nodeBorder??r?.lineColor??"currentColor",u=e.padding??12,p=Math.max(a.width+2*u,e.width??0,80),g=Math.max(Math.min(.08*p,12),5),y=Math.max(a.height+2*u+g,e.height??0),C=-y/2+g,b=y/2,k=.72*p,w=[`M${-p/2},${C}`,`L${-k/2},${b}`,`A${k/2},${g} 0 0 0 ${k/2},${b}`,`L${p/2},${C}`,`A${p/2},${g} 0 0 0 ${-p/2},${C}`,"Z"].join(" "),{cssStyles:S}=e,T=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=d.A.svg(s).path(w,(0,i.Fr)(e,{}));T.node()?.appendChild(t),S&&T.attr("style",S)}else T.append("path").attr("d",w).attr("style",n);T.append("ellipse").attr("cx",0).attr("cy",C).attr("rx",p/2).attr("ry",g).attr("style",`fill:none;stroke:${c};stroke-width:1px`),m(e,T);const v=C+(b-C)/2;l.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);const B=(0,h.K)((t,e,r)=>Array.from({length:13},(i,o)=>{const n=Math.PI-o*Math.PI/12;return{x:t*Math.cos(n),y:e+r*g*Math.sin(n)}}),"arc"),_=[...B(p/2,C,-1),...B(k/2,b,1).reverse()];return e.intersect=function(t){return I.polygon(e,_,t)},s}(0,h.K)(q,"anchor"),(0,h.K)(R,"generateArcPoints"),(0,h.K)(K,"calculateArcSagitta"),(0,h.K)(z,"bowTieRect"),(0,h.K)(N,"bucket");async function P(t,e){const{themeVariables:r}=(0,a.D7)(),o=r.clusterBkg,n=r.clusterBorder,{nodeStyles:l}=(0,i.GX)(e),{shapeSvg:h,bbox:c}=await f(t,e,x(e)),u=e.padding??8,p=c.height,g=Math.max(c.width+2*u,80,e?.width??0),y=Math.max(p+8+20+2*u,e?.height??0),C=-g/2,b=-y/2,k=h.select(".label");if(k){e.useHtmlLabels??(0,a.E)((0,a.D7)())?k.attr("transform",`translate(${-c.width/2}, ${-c.height/2-14})`):k.attr("transform",`translate(0, ${-c.height/2-14})`)}let w;if("handDrawn"===e.look){const t=d.A.svg(h),r=(0,i.Fr)(e,{fill:o,stroke:n,fillStyle:"solid"}),a=t.path(T(C,b,g,y,8),r);w=h.insert(()=>a,":first-child"),w.attr("class","basic label-container collapsed-group").attr("style",(0,s.KL)(e.cssStyles))}else w=h.insert("rect",":first-child"),w.attr("class","basic label-container collapsed-group").attr("style",l).attr("rx",8).attr("ry",8).attr("x",C).attr("y",b).attr("width",g).attr("height",y).attr("fill",o).attr("stroke",n);const S=b+u+p+8;h.append("line").attr("class","collapsed-separator").attr("x1",C+8).attr("y1",S).attr("x2",C+g-8).attr("y2",S).attr("stroke",n).attr("stroke-dasharray","3, 3");const v=S+10;for(let t=-1;t<=1;t++)h.append("circle").attr("class","collapsed-indicator").attr("cx",10*t).attr("cy",v).attr("r",2.5).attr("fill",n);return m(e,w),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},h}function W(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,h.K)(P,"collapsedGroup"),(0,h.K)(W,"insertPolygonShape");var j=["right","left","up","down"],H="point",U=(0,h.K)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),Y=(0,h.K)(t=>j.filter(e=>t.has(e)).join("|")||H,"getDirectionKey"),X={"right|left|up|down":(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:0,y:0},{x:e,y:0},{x:i/2,y:2*r},{x:i-e,y:0},{x:i,y:0},{x:i,y:-t/3},{x:i+2*r,y:-t/2},{x:i,y:-2*t/3},{x:i,y:-t},{x:i-e,y:-t},{x:i/2,y:-t-2*r},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*r,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:e,y:0},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:e,y:-t},{x:r-e,y:-t},{x:r,y:0}],"right|left|down"),"right|up|down":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:r,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:r,y:-t}],"left|up|down"),"right|left":(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"up|down"),"right|up":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:0,y:-t}],"right|up"),"right|down":(0,h.K)(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":(0,h.K)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:r,y:-t}],"left|up"),"left|down":(0,h.K)(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t+r}],"right"),left:(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r}],"up"),down:(0,h.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"down"),[H]:()=>[{x:0,y:0}]},G=(0,h.K)((t,e,r,i)=>{const o=U(t),n=(r.padding??0)/2,s=e.height+4*n,a=s/2,l=i??e.width+2*a+2*n,h=Y(o);return(X[h]??X[H])({height:s,midpoint:a,padding:n,width:l})},"getArrowPoints");async function V(t,e){const r=e,{shapeSvg:i,bbox:o}=await f(t,r,x(r)),n=r.padding??0,s=o.height+2*n,a=s/2,l=o.width+2*a+n,h=r.width??0,c=r.positioned&&(r.widthInColumns??1)>1&&h>l?h:l,d=G(r.directions??[],o,r,c),u=W(i,c,s,d);return u.attr("style",r.style??null),m(r,u),r.intersect=function(t){return I.polygon(r,d,t)},i}async function Z(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:a,label:l}=await f(t,e,x(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,u=18,p=Math.max(a.width+2*c,e.width??0,90),g=Math.max(a.height+2*c+u,e.height??0),y=-g/2,{cssStyles:C}=e,b=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=d.A.svg(s).path(T(-p/2,y,p,g,12),(0,i.Fr)(e,{}));b.node()?.appendChild(t),C&&b.attr("style",C)}else b.append("rect").attr("x",-p/2).attr("y",y).attr("width",p).attr("height",g).attr("rx",12).attr("ry",12).attr("style",n);b.append("line").attr("x1",-p/2).attr("y1",y+u).attr("x2",p/2).attr("y2",y+u).attr("style",`stroke:${h};stroke-width:1px`);for(let t=0;t<3;t++)b.append("circle").attr("cx",-p/2+12+9*t).attr("cy",y+9).attr("r",2.5).attr("style",`fill:${h};stroke:none`);b.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",y+4).attr("width",Math.max(p-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),m(e,b);const k=y+u+(g-u)/2;return l.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(t){return I.rect(e,t)},s}(0,h.K)(V,"block_arrow"),(0,h.K)(Z,"browser");async function Q(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?28:n,a="neo"===e.look?24:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=(e?.width??h.width)+("neo"===e.look?2*s:s+12),u=(e?.height??h.height)+("neo"===e.look?2*a:a),p=-u,g=[{x:12,y:p},{x:c,y:p},{x:c,y:0},{x:0,y:0},{x:0,y:p+12},{x:12,y:p}];let y;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(g),n=t.path(o,r);y=l.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${u/2})`),b&&y.attr("style",b)}else y=W(l,c,u,g);return o&&y.attr("style",o),m(e,y),e.intersect=function(t){return I.polygon(e,g,t)},l}function J(t,e){const{nodeStyles:r}=(0,i.GX)(e);e.label="";const o=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(28,e.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],l=d.A.svg(o),h=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=C(a),u=l.path(c,h),p=o.insert(()=>u,":first-child");return n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return I.polygon(e,a,t)},o}async function tt(t,e,r){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:a,bbox:h,halfPadding:c}=await f(t,e,x(e)),u=r?.padding??c,p="neo"===e.look?h.width/2+32:h.width/2+u;let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(a),r=(0,i.Fr)(e,{}),o=t.circle(0,0,2*p,r);g=a.insert(()=>o,":first-child"),g.attr("class","basic label-container").attr("style",(0,s.KL)(y))}else g=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0);return m(e,g),e.calcIntersect=function(t,e){const r=t.width/2;return I.circle(t,r,e)},e.intersect=function(t){return l.R.info("Circle intersect",e,p,t),I.circle(e,p,t)},a}async function et(t,e){const r=e,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:n,halfPadding:s}=await f(t,r,i),a=o.insert("rect",":first-child"),l=r.padding??0,h=r.positioned?r.width??0:n.width+l,c=r.positioned?r.height??0:n.height+l,d=r.positioned?-h/2:-n.width/2-s,u=r.positioned?-c/2:-n.height/2-s;return a.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",u).attr("width",h).attr("height",c),m(r,a),r.intersect=function(t){return I.rect(r,t)},o}async function rt(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:a,label:l}=await f(t,e,x(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,u=Math.max(a.width+2*c,e.width??0,90),p=Math.max(a.height+2*c+20,e.height??0),g=-p/2,{cssStyles:y}=e,C=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=d.A.svg(s).path(T(-u/2,g,u,p,12),(0,i.Fr)(e,{}));C.node()?.appendChild(t),y&&C.attr("style",y)}else C.append("rect").attr("x",-u/2).attr("y",g).attr("width",u).attr("height",p).attr("rx",12).attr("ry",12).attr("style",n);C.append("text").attr("x",-u/2+12).attr("y",g+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),m(e,C);const b=g+20+(p-20)/2;return l.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(t){return I.rect(e,t)},s}function it(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function ot(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r,e.label="";const n=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:a}=e,h=d.A.svg(n),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=h.circle(0,0,2*s,c),p=it(s),g=h.path(p,c),f=n.insert(()=>u,":first-child");return f.insert(()=>g),f.attr("class","outer-path"),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),o&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",o),m(e,f),e.intersect=function(t){l.R.info("crossedCircle intersect",e,{radius:s,point:t});return I.circle(e,s,t)},n}function nt(t,e,r,i=100,o=0,n=180){const s=[],a=o*Math.PI/180,l=(n*Math.PI/180-a)/(i-1);for(let o=0;o<i;o++){const i=a+o*l,n=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-n,y:-h})}return s}async function st(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await f(t,e,x(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+l,u=s.height+h,p=Math.max(5,.1*u),{cssStyles:g}=e,y=[...nt(c/2,-u/2,p,30,-90,0),{x:-c/2-p,y:p},...nt(c/2+2*p,-p,p,20,-180,-270),...nt(c/2+2*p,p,p,20,-90,-180),{x:-c/2-p,y:-u/2},...nt(c/2,u/2,p,20,0,90)],b=[{x:c/2,y:-u/2-p},{x:-c/2,y:-u/2-p},...nt(c/2,-u/2,p,20,-90,0),{x:-c/2-p,y:-p},...nt(c/2+.1*c,-p,p,20,-180,-270),...nt(c/2+.1*c,p,p,20,-90,-180),{x:-c/2-p,y:u/2},...nt(c/2,u/2,p,20,0,90),{x:-c/2,y:u/2+p},{x:c/2,y:u/2+p}],k=d.A.svg(n),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=C(y).replace("Z",""),T=k.path(S,w),v=C(b),B=k.path(v,{...w}),_=n.insert("g",":first-child");return _.insert(()=>B,":first-child").attr("stroke-opacity",0),_.insert(()=>T,":first-child"),_.attr("class","text"),g&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",g),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${p}, 0)`),a.attr("transform",`translate(${-c/2+p-(s.x-(s.left??0))},${-u/2+(e.padding??0)/2-(s.y-(s.top??0))})`),m(e,_),e.intersect=function(t){return I.polygon(e,b,t)},n}function at(t,e,r,i=100,o=0,n=180){const s=[],a=o*Math.PI/180,l=(n*Math.PI/180-a)/(i-1);for(let o=0;o<i;o++){const i=a+o*l,n=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:n,y:h})}return s}async function lt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await f(t,e,x(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+("neo"===e.look?2*l:l),u=s.height+("neo"===e.look?2*h:h),p=Math.max(5,.1*u),{cssStyles:g}=e,y=[...at(c/2,-u/2,p,20,-90,0),{x:c/2+p,y:-p},...at(c/2+2*p,-p,p,20,-180,-270),...at(c/2+2*p,p,p,20,-90,-180),{x:c/2+p,y:u/2},...at(c/2,u/2,p,20,0,90)],b=[{x:-c/2,y:-u/2-p},{x:c/2,y:-u/2-p},...at(c/2,-u/2,p,20,-90,0),{x:c/2+p,y:-p},...at(c/2+2*p,-p,p,20,-180,-270),...at(c/2+2*p,p,p,20,-90,-180),{x:c/2+p,y:u/2},...at(c/2,u/2,p,20,0,90),{x:c/2,y:u/2+p},{x:-c/2,y:u/2+p}],k=d.A.svg(n),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=C(y).replace("Z",""),T=k.path(S,w),v=C(b),B=k.path(v,{...w}),_=n.insert("g",":first-child");return _.insert(()=>B,":first-child").attr("stroke-opacity",0),_.insert(()=>T,":first-child"),_.attr("class","text"),g&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",g),o&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",o),_.attr("transform",`translate(${-p}, 0)`),a.attr("transform",`translate(${-c/2+(e.padding??0)/2-(s.x-(s.left??0))},${-u/2+(e.padding??0)/2-(s.y-(s.top??0))})`),m(e,_),e.intersect=function(t){return I.polygon(e,b,t)},n}function ht(t,e,r,i=100,o=0,n=180){const s=[],a=o*Math.PI/180,l=(n*Math.PI/180-a)/(i-1);for(let o=0;o<i;o++){const i=a+o*l,n=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-n,y:-h})}return s}async function ct(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await f(t,e,x(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+("neo"===e.look?2*l:l),u=s.height+("neo"===e.look?2*h:h),p=Math.max(5,.1*u),{cssStyles:g}=e,y=[...ht(c/2,-u/2,p,30,-90,0),{x:-c/2-p,y:p},...ht(c/2+2*p,-p,p,20,-180,-270),...ht(c/2+2*p,p,p,20,-90,-180),{x:-c/2-p,y:-u/2},...ht(c/2,u/2,p,20,0,90)],b=[...ht(-c/2+p+p/2,-u/2,p,20,-90,-180),{x:c/2-p/2,y:p},...ht(-c/2-p/2,-p,p,20,0,90),...ht(-c/2-p/2,p,p,20,-90,0),{x:c/2-p/2,y:-p},...ht(-c/2+p+p/2,u/2,p,30,-180,-270)],k=[{x:c/2,y:-u/2-p},{x:-c/2,y:-u/2-p},...ht(c/2,-u/2,p,20,-90,0),{x:-c/2-p,y:-p},...ht(c/2+2*p,-p,p,20,-180,-270),...ht(c/2+2*p,p,p,20,-90,-180),{x:-c/2-p,y:u/2},...ht(c/2,u/2,p,20,0,90),{x:-c/2,y:u/2+p},{x:c/2-p-p/2,y:u/2+p},...ht(-c/2+p+p/2,-u/2,p,20,-90,-180),{x:c/2-p/2,y:p},...ht(-c/2-p/2,-p,p,20,0,90),...ht(-c/2-p/2,p,p,20,-90,0),{x:c/2-p/2,y:-p},...ht(-c/2+p+p/2,u/2,p,30,-180,-270)],w=d.A.svg(n),S=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=C(y).replace("Z",""),v=w.path(T,S),B=C(b).replace("Z",""),_=w.path(B,S),A=C(k),L=w.path(A,{...S}),F=n.insert("g",":first-child");return F.insert(()=>L,":first-child").attr("stroke-opacity",0),F.insert(()=>v,":first-child"),F.insert(()=>_,":first-child"),F.attr("class","text"),g&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",g),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(${p-p/4}, 0)`),a.attr("transform",`translate(${-c/2+(e.padding??0)/2-(s.x-(s.left??0))},${-u/2+(e.padding??0)/2-(s.y-(s.top??0))})`),m(e,F),e.intersect=function(t){return I.polygon(e,k,t)},n}async function dt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?12:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(20,1.25*(h.width+2*s),e?.width??0),u=Math.max(5,h.height+2*a,e?.height??0),p=u/2,{cssStyles:g}=e,y=d.A.svg(l),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=c-p,S=u/4,T=[{x:w,y:0},{x:S,y:0},{x:0,y:u/2},{x:S,y:u},{x:w,y:u},...k(-w,-u/2,p,50,270,90)],v=C(T),B=y.path(v,b),_=l.insert(()=>B,":first-child");return _.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",o),_.attr("transform",`translate(${-c/2}, ${-u/2})`),m(e,_),e.intersect=function(t){return I.polygon(e,T,t)},l}async function ut(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await f(t,e,x(e)),l=e.padding??20,h=Math.max(s.width+2*l,e.width??0,100),c=Math.min(Math.max(.23*h,16),56),u=.27*c,p=Math.max(s.height+2*l,e.height?e.height-(2*c-u):0),g=Math.min(.177*h,.45*p),y=p+2*c-u,C=-y/2,b=C+2*c-u,w=n.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:S}=e;if("handDrawn"===e.look){const t=d.A.svg(n),r=(0,i.Fr)(e,{}),o=t.path(T(-h/2,b,h,p,g),r),s=t.circle(0,C+c,2*c,r);w.insert(()=>s,":first-child"),w.insert(()=>o,":first-child"),S&&w.attr("style",S)}else w.append("rect").attr("x",-h/2).attr("y",b).attr("width",h).attr("height",p).attr("rx",g).attr("ry",g).attr("style",o),w.append("circle").attr("cx",0).attr("cy",C+c).attr("r",c).attr("style",o);m(e,w);const v=b+p/2;a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${v-s.height/2-(s.y-(s.top??0))})`);const B=C+c,_=180*Math.asin(Math.min(1,(b-B)/c))/Math.PI,A=[...k(0,-B,c,24,180+_,-_),...k(-(-h/2+g),-(b+g),g,12,90,0),...k(-(-h/2+g),-(y/2-g),g,12,360,270),...k(-(h/2-g),-(y/2-g),g,12,270,180),...k(-(h/2-g),-(b+g),g,12,180,90)];return e.intersect=function(t){return I.polygon(e,A,t)},n}(0,h.K)(Q,"card"),(0,h.K)(J,"choice"),(0,h.K)(tt,"circle"),(0,h.K)(et,"composite"),(0,h.K)(rt,"consoleWindow"),(0,h.K)(it,"createLine"),(0,h.K)(ot,"crossedCircle"),(0,h.K)(nt,"generateCirclePoints"),(0,h.K)(st,"curlyBraceLeft"),(0,h.K)(at,"generateCirclePoints"),(0,h.K)(lt,"curlyBraceRight"),(0,h.K)(ht,"generateCirclePoints"),(0,h.K)(ct,"curlyBraces"),(0,h.K)(dt,"curvedTrapezoid"),(0,h.K)(ut,"person");var pt=(0,h.K)((t,e,r,i,o,n)=>[`M${t},${e+n}`,`a${o},${n} 0,0,0 ${r},0`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),gt=(0,h.K)((t,e,r,i,o,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),ft=(0,h.K)((t,e,r,i,o,n)=>[`M${t-r/2},${-i/2}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function yt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?24:n,l="neo"===e.look?24:n,h=e.width??0;if(e.width&&(e.width=e.width-l,e.width<8&&(e.width=8)),e.height){const t=h/2/(2.5+h/50);e.height=e.height-a-3*t,e.height<8&&(e.height=8)}const{shapeSvg:c,bbox:u,label:p}=await f(t,e,x(e)),g=Math.max(e.width??0,u.width)+l,y=g/2,C=y/(2.5+g/50),b=Math.max(e.height??0,u.height)+a+C;let k;const{cssStyles:w}=e;if("handDrawn"===e.look){const t=d.A.svg(c),r=gt(0,0,g,b,y,C),o=ft(0,C,g,b,y,C),n=(0,i.Fr)(e,{}),s=t.path(r,n),a=t.path(o,(0,i.Fr)(e,{fill:"none"}));k=c.insert(()=>a,":first-child"),k=c.insert(()=>s,":first-child"),k.attr("class","basic label-container"),w&&k.attr("style",w)}else{const t=pt(0,0,g,b,y,C);k=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(w)).attr("style",o)}return k.attr("label-offset-y",C),k.attr("transform",`translate(${-g/2}, ${-(b/2+C)})`),m(e,k),p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${-u.height/2+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){const r=I.rect(e,t),i=r.x-(e.x??0);if(0!=y&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-C)){let o=C*C*(1-i*i/(y*y));o>0&&(o=Math.sqrt(o)),o=C-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},c}async function mt(t,e,r){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:a,bbox:l}=await f(t,e,x(e)),h=Math.max(l.width+2*r.labelPaddingX,e?.width||0),c=Math.max(l.height+2*r.labelPaddingY,e?.height||0),u=-h/2,p=-c/2;let g,{rx:y,ry:C}=e;const{cssStyles:b}=e;if(r?.rx&&r.ry&&(y=r.rx,C=r.ry),"handDrawn"===e.look){const t=d.A.svg(a),r=(0,i.Fr)(e,{}),o=y||C?t.path(T(u,p,h,c,y||0),r):t.rectangle(u,p,h,c,r);g=a.insert(()=>o,":first-child"),g.attr("class","basic label-container").attr("style",(0,s.KL)(b))}else g=a.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",n).attr("rx",(0,s.KL)(y)).attr("ry",(0,s.KL)(C)).attr("x",u).attr("y",p).attr("width",h).attr("height",c);return m(e,g,"handDrawn"===e.look?void 0:{width:h,height:c}),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},a}async function xt(t,e){const{cssClasses:r,labelPaddingX:o,labelPaddingY:n,padding:s,width:a,height:l}=e,h={rx:0,ry:0,classes:r??"",labelPaddingX:o??2*(s??0),labelPaddingY:n??s??0},c=await mt(t,e,h);if("handDrawn"===e.look){const t=d.A.svg(c),r=(0,i.Fr)(e,{}),o=c.select(".basic.label-container > path:nth-child(2)"),n=o.node();if(!n)return c;let s=null;return n instanceof SVGGraphicsElement?(s=n.getBBox(),c.insert(()=>t.line(s.x,s.y,s.x+s.width,s.y,r),".basic.label-container g.label"),c.insert(()=>t.line(s.x,s.y+s.height,s.x+s.width,s.y+s.height,r),".basic.label-container g.label"),o.remove(),c):c}const u=c.select(".basic.label-container"),p=(Number(u.attr("width"))||a)??0,g=(Number(u.attr("height"))||l)??0;return p>0&&g>0&&u.attr("stroke-dasharray",`${p} ${g}`),c}async function Ct(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,s="neo"===e.look?16:e.padding??0,{shapeSvg:a,bbox:l,label:h}=await f(t,e,x(e)),c=l.width+n,u=l.height+s,p=.2*u,g=-c/2,y=-u/2-p/2,{cssStyles:C}=e,b=d.A.svg(a),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:g,y:y+p},{x:-g,y:y+p},{x:-g,y:-y},{x:g,y:-y},{x:g,y},{x:-g,y},{x:-g,y:y+p}],S=b.polygon(w.map(t=>[t.x,t.y]),k),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",o),h.attr("transform",`translate(${g+(e.padding??0)/2-(l.x-(l.left??0))}, ${y+p+(e.padding??0)/2-(l.y-(l.top??0))})`),m(e,T),e.intersect=function(t){return I.rect(e,t)},a}async function bt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),n="neo"===e.look?12:5;e.labelStyle=r;const a=e.padding??0,h="neo"===e.look?16:a,{shapeSvg:c,bbox:u}=await f(t,e,x(e)),p=(e?.width?e?.width/2:u.width/2)+(h??0),g=p-n;let y;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=d.A.svg(c),r=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),o=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),n=t.circle(0,0,2*p,r),a=t.circle(0,0,2*g,o);y=c.insert("g",":first-child"),y.attr("class",(0,s.KL)(e.cssClasses)).attr("style",(0,s.KL)(C)),y.node()?.appendChild(n),y.node()?.appendChild(a)}else{y=c.insert("g",":first-child");const t=y.insert("circle",":first-child"),e=y.insert("circle");y.attr("class","basic label-container").attr("style",o),t.attr("class","outer-circle").attr("style",o).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",o).attr("r",g).attr("cx",0).attr("cy",0)}return m(e,y),e.intersect=function(t){return l.R.info("DoubleCircle intersect",e,p,t),I.circle(e,p,t)},c}function kt(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.label="",e.labelStyle=o;const s=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,h=d.A.svg(s),{nodeBorder:c}=r,u=(0,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);const p=h.circle(0,0,14,u),g=s.insert(()=>p,":first-child");return g.selectAll("path").attr("style",`fill: ${c} !important;`),a&&a.length>0&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),m(e,g),e.intersect=function(t){l.R.info("filledCircle intersect",e,{radius:7,point:t});return I.circle(e,7,t)},s}(0,h.K)(yt,"cylinder"),(0,h.K)(mt,"drawRect"),(0,h.K)(xt,"datastore"),(0,h.K)(Ct,"dividedRectangle"),(0,h.K)(bt,"doublecircle"),(0,h.K)(kt,"filledCircle");async function wt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?2*n:n;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-s-s/2,e.width<10&&(e.width=10));const{shapeSvg:a,bbox:h,label:c}=await f(t,e,x(e)),u=(e?.width?e?.width:h.width)+(s??0),p=e?.height?e?.height:u+h.height,g=[{x:0,y:-p},{x:p,y:-p},{x:p/2,y:0}],{cssStyles:y}=e,b=d.A.svg(a),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=C(g),S=b.path(w,k),T=a.insert(()=>S,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",y),o&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",o),e.width=u,e.height=p,m(e,T),c.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(t){return l.R.info("Triangle intersect",e,g,t),I.polygon(e,g,t)},a}async function St(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await f(t,e,x(e)),l=e.padding??12,h=Math.max(s.width+2*l,e.width??0,90),c=s.height+2*l,u=Math.max(Math.min(.16*c,14),8),p=Math.max(c+u,e.height??0),g=p-u,y=Math.max(.38*h,28),C=-p/2,b=[{x:-h/2,y:C},{x:-h/2+y,y:C},{x:-h/2+y,y:C+u},{x:h/2,y:C+u},{x:h/2,y:p/2},{x:-h/2,y:p/2}],k=[`M${b[0].x},${b[0].y}`,...b.slice(1).map(t=>`L${t.x},${t.y}`),"Z"].join(" "),{cssStyles:w}=e;let S;if("handDrawn"===e.look){const t=d.A.svg(n).path(k,(0,i.Fr)(e,{}));S=n.insert(()=>t,":first-child").attr("class","basic label-container"),w&&S.attr("style",w)}else S=n.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",o);"handDrawn"===e.look?m(e,S):m(e,S,{width:h,height:p});const T=C+u+g/2;return a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${T-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return I.polygon(e,b,t)},n}function Tt(t,e,{dir:r,config:{state:o,themeVariables:n}}){const{nodeStyles:s}=(0,i.GX)(e);e.label="";const a=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let h=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const u=-1*h/2,p=-1*c/2,g=d.A.svg(a),f=(0,i.Fr)(e,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=g.rectangle(u,p,h,c,f),C=a.insert(()=>y,":first-child");l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),s&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",s),m(e,C);const b=o?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return I.rect(e,t)},a}async function vt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*n,e.width<15&&(e.width=15));const{shapeSvg:a,bbox:h}=await f(t,e,x(e)),c=(e?.width?e?.width:Math.max(15,h.width))+2*n,u=(e?.height?e?.height:Math.max(10,h.height))+2*s,p=u/2,{cssStyles:g}=e,y=d.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...k(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],S=C(w),T=y.path(S,b),v=a.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),m(e,v),e.intersect=function(t){l.R.info("Pill intersect",e,{radius:p,point:t});return I.polygon(e,w,t)},a}(0,h.K)(wt,"flippedTriangle"),(0,h.K)(St,"folder"),(0,h.K)(Tt,"forkJoin"),(0,h.K)(vt,"halfRoundedRectangle");var Bt=(0,h.K)((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function _t(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),n="neo"===e.look?3.5:4;e.labelStyle=r;const s=e.padding??0,a="neo"===e.look?70:s,l="neo"===e.look?32:s;if(e.width||e.height){const t=(e.height??0)/n;e.width=(e?.width??0)-2*t-l,e.height=(e.height??0)-a}const{shapeSvg:h,bbox:c}=await f(t,e,x(e)),u=(e?.height?e?.height:c.height)+a,p=u/n,g=(e?.width?e?.width:c.width)+2*p+l,y=[{x:p,y:0},{x:g-p,y:0},{x:g,y:-u/2},{x:g-p,y:-u},{x:p,y:-u},{x:0,y:-u/2}];let C;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=d.A.svg(h),r=(0,i.Fr)(e,{}),o=Bt(0,0,g,u,p),n=t.path(o,r);C=h.insert(()=>n,":first-child").attr("transform",`translate(${-g/2}, ${u/2})`),b&&C.attr("style",b)}else C=W(h,g,u,y);return o&&C.attr("style",o),e.width=g,e.height=u,m(e,C),e.intersect=function(t){return I.polygon(e,y,t)},h}async function At(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:n}=await f(t,e,x(e)),s=Math.max(30,e?.width??0),a=Math.max(30,e?.height??0),{cssStyles:h}=e,c=d.A.svg(n),u=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const p=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],g=C(p),y=c.path(g,u),b=n.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",h),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),b.attr("transform",`translate(${-s/2}, ${-a/2})`),m(e,b),e.intersect=function(t){l.R.info("Pill intersect",e,{points:p});return I.polygon(e,p,t)},n}async function Lt(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const a=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(a,h),u=o?.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:p,bbox:g,label:y}=await f(t,e,"icon-shape default"),x="t"===e.pos,C=c,b=c,{nodeBorder:k}=r,{stylesMap:w}=(0,i.WW)(e),S=-b/2,T=-C/2,v=e.label?8:0,B=d.A.svg(p),_=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=B.rectangle(S,T,b,C,_),L=Math.max(b,g.width),F=C+g.height+v,M=B.rectangle(-L/2,-F/2,L,F,{..._,fill:"transparent",stroke:"none"}),E=p.insert(()=>A,":first-child"),$=p.insert(()=>M);if(e.icon){const t=p.append("g");t.html(`<g>${await(0,n.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,a=r.y;t.attr("transform",`translate(${-i/2-s},${x?g.height/2+v/2-o/2-a:-g.height/2-v/2-o/2-a})`),t.attr("style",`color: ${w.get("stroke")??k};`)}return y.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${x?-F/2:F/2-g.height})`),E.attr("transform",`translate(0,${x?g.height/2+v/2:-g.height/2-v/2})`),m(e,$),e.intersect=function(t){if(l.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=x?[{x:r-g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2+g.height+v},{x:r+b/2,y:i-o/2+g.height+v},{x:r+b/2,y:i+o/2},{x:r-b/2,y:i+o/2},{x:r-b/2,y:i-o/2+g.height+v},{x:r-g.width/2,y:i-o/2+g.height+v}]:[{x:r-b/2,y:i-o/2},{x:r+b/2,y:i-o/2},{x:r+b/2,y:i-o/2+C},{x:r+g.width/2,y:i-o/2+C},{x:r+g.width/2/2,y:i+o/2},{x:r-g.width/2,y:i+o/2},{x:r-g.width/2,y:i-o/2+C},{x:r-b/2,y:i-o/2+C}];return I.polygon(e,n,t)},p}async function Ft(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const a=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(a,h),u=o?.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:p,bbox:g,label:y}=await f(t,e,"icon-shape default"),x=e.label?8:0,C="t"===e.pos,{nodeBorder:b,mainBkg:k}=r,{stylesMap:w}=(0,i.WW)(e),S=d.A.svg(p),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const v=w.get("fill");T.stroke=v??k;const B=p.append("g");e.icon&&B.html(`<g>${await(0,n.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const _=B.node().getBBox(),A=_.width,L=_.height,F=_.x,M=_.y,E=Math.max(A,L)*Math.SQRT2+40,$=S.circle(0,0,E,T),O=Math.max(E,g.width),D=E+g.height+x,q=S.rectangle(-O/2,-D/2,O,D,{...T,fill:"transparent",stroke:"none"}),R=p.insert(()=>$,":first-child"),K=p.insert(()=>q);return B.attr("transform",`translate(${-A/2-F},${C?g.height/2+x/2-L/2-M:-g.height/2-x/2-L/2-M})`),B.attr("style",`color: ${w.get("stroke")??b};`),y.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${C?-D/2:D/2-g.height})`),R.attr("transform",`translate(0,${C?g.height/2+x/2:-g.height/2-x/2})`),m(e,K),e.intersect=function(t){l.R.info("iconSquare intersect",e,t);return I.rect(e,t)},p}async function Mt(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const a=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(a,h),u=o?.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:p,bbox:g,halfPadding:y,label:x}=await f(t,e,"icon-shape default"),C="t"===e.pos,b=c+2*y,k=c+2*y,{nodeBorder:w,mainBkg:S}=r,{stylesMap:v}=(0,i.WW)(e),B=-k/2,_=-b/2,A=e.label?8:0,L=d.A.svg(p),F=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const M=v.get("fill");F.stroke=M??S;const E=L.path(T(B,_,k,b,5),F),$=Math.max(k,g.width),O=b+g.height+A,D=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),q=p.insert(()=>E,":first-child").attr("class","icon-shape2"),R=p.insert(()=>D);if(e.icon){const t=p.append("g");t.html(`<g>${await(0,n.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,a=r.y;t.attr("transform",`translate(${-i/2-s},${C?g.height/2+A/2-o/2-a:-g.height/2-A/2-o/2-a})`),t.attr("style",`color: ${v.get("stroke")??w};`)}return x.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${C?-O/2:O/2-g.height})`),q.attr("transform",`translate(0,${C?g.height/2+A/2:-g.height/2-A/2})`),m(e,R),e.intersect=function(t){if(l.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2+g.height+A},{x:r+k/2,y:i-o/2+g.height+A},{x:r+k/2,y:i+o/2},{x:r-k/2,y:i+o/2},{x:r-k/2,y:i-o/2+g.height+A},{x:r-g.width/2,y:i-o/2+g.height+A}]:[{x:r-k/2,y:i-o/2},{x:r+k/2,y:i-o/2},{x:r+k/2,y:i-o/2+b},{x:r+g.width/2,y:i-o/2+b},{x:r+g.width/2/2,y:i+o/2},{x:r-g.width/2,y:i+o/2},{x:r-g.width/2,y:i-o/2+b},{x:r-k/2,y:i-o/2+b}];return I.polygon(e,n,t)},p}async function Et(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const a=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(a,h),u=o?.wrappingWidth;e.width=Math.max(c,u??0);const{shapeSvg:p,bbox:g,halfPadding:y,label:x}=await f(t,e,"icon-shape default"),C="t"===e.pos,b=c+2*y,k=c+2*y,{nodeBorder:w,mainBkg:S}=r,{stylesMap:v}=(0,i.WW)(e),B=-k/2,_=-b/2,A=e.label?8:0,L=d.A.svg(p),F=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const M=v.get("fill");F.stroke=M??S;const E=L.path(T(B,_,k,b,.1),F),$=Math.max(k,g.width),O=b+g.height+A,D=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),q=p.insert(()=>E,":first-child"),R=p.insert(()=>D);if(e.icon){const t=p.append("g");t.html(`<g>${await(0,n.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,a=r.y;t.attr("transform",`translate(${-i/2-s},${C?g.height/2+A/2-o/2-a:-g.height/2-A/2-o/2-a})`),t.attr("style",`color: ${v.get("stroke")??w};`)}return x.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${C?-O/2:O/2-g.height})`),q.attr("transform",`translate(0,${C?g.height/2+A/2:-g.height/2-A/2})`),m(e,R),e.intersect=function(t){if(l.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2},{x:r+g.width/2,y:i-o/2+g.height+A},{x:r+k/2,y:i-o/2+g.height+A},{x:r+k/2,y:i+o/2},{x:r-k/2,y:i+o/2},{x:r-k/2,y:i-o/2+g.height+A},{x:r-g.width/2,y:i-o/2+g.height+A}]:[{x:r-k/2,y:i-o/2},{x:r+k/2,y:i-o/2},{x:r+k/2,y:i-o/2+b},{x:r+g.width/2,y:i-o/2+b},{x:r+g.width/2/2,y:i+o/2},{x:r-g.width/2,y:i+o/2},{x:r-g.width/2,y:i-o/2+b},{x:r-k/2,y:i-o/2+b}];return I.polygon(e,n,t)},p}async function $t(t,e,{config:{flowchart:r}}){const o=new Image;o.src=e?.img??"",await o.decode();const n=Number(o.naturalWidth.toString().replace("px","")),s=Number(o.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/s;const{labelStyles:a}=(0,i.GX)(e);e.labelStyle=a;const h=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const c=Math.max(e.label?h??0:0,e?.assetWidth??n),u="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:c,p="on"===e.constraint?u/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(u,h??0);const{shapeSvg:g,bbox:y,label:x}=await f(t,e,"image-shape default"),C="t"===e.pos,b=-u/2,k=-p/2,w=e.label?8:0,S=d.A.svg(g),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const v=S.rectangle(b,k,u,p,T),B=Math.max(u,y.width),_=p+y.height+w,A=S.rectangle(-B/2,-_/2,B,_,{...T,fill:"none",stroke:"none"}),L=g.insert(()=>v,":first-child"),F=g.insert(()=>A);if(e.img){const t=g.append("image");t.attr("href",e.img),t.attr("width",u),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-u/2},${C?_/2-p:-_/2})`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${C?-p/2-y.height/2-w/2:p/2-y.height/2+w/2})`),L.attr("transform",`translate(0,${C?y.height/2+w/2:-y.height/2-w/2})`),m(e,F),e.intersect=function(t){if(l.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let n=[];n=C?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+w},{x:r+u/2,y:i-o/2+y.height+w},{x:r+u/2,y:i+o/2},{x:r-u/2,y:i+o/2},{x:r-u/2,y:i-o/2+y.height+w},{x:r-y.width/2,y:i-o/2+y.height+w}]:[{x:r-u/2,y:i-o/2},{x:r+u/2,y:i-o/2},{x:r+u/2,y:i-o/2+p},{x:r+y.width/2,y:i-o/2+p},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+p},{x:r-u/2,y:i-o/2+p}];return I.polygon(e,n,t)},g}async function Ot(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s=n,a="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(h.height+2*s,e.height??0),u=Math.max(h.width+2*a,(e.width??0)-c),p=[{x:0,y:0},{x:u,y:0},{x:u+3*c/6,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(p),n=t.path(o,r);g=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),y&&g.attr("style",y)}else g=W(l,u,c,p);return o&&g.attr("style",o),e.width=u,e.height=c,m(e,g),e.intersect=function(t){return I.polygon(e,p,t)},l}async function Dt(t,e){const{shapeSvg:r,bbox:i,label:o}=await f(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),m(e,n),e.intersect=function(t){return I.rect(e,t)},r}async function It(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s=n,a="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(h.height+s,e.height??0),u=Math.max(h.width+a,(e.width??0)-c),p=[{x:0,y:0},{x:u+3*c/6,y:0},{x:u,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(p),n=t.path(o,r);g=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),y&&g.attr("style",y)}else g=W(l,u,c,p);return o&&g.attr("style",o),e.width=u,e.height=c,m(e,g),e.intersect=function(t){return I.polygon(e,p,t)},l}async function qt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s=n,a="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(h.height+s,e.height??0),u=Math.max(h.width+a,(e.width??0)-c),p=[{x:-3*c/6,y:0},{x:u,y:0},{x:u+3*c/6,y:-c},{x:0,y:-c}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(p),n=t.path(o,r);g=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),y&&g.attr("style",y)}else g=W(l,u,c,p);return o&&g.attr("style",o),e.width=u,e.height=c,m(e,g),e.intersect=function(t){return I.polygon(e,p,t)},l}function Rt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;const n=t.insert("g").attr("class",x(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,a=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),c=[{x:a,y:0},{x:0,y:h+3.5},{x:a-14,y:h+3.5},{x:0,y:2*h},{x:a,y:h-3.5},{x:14,y:h-3.5}],u=d.A.svg(n),p=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=C(c),f=u.path(g,p),y=n.insert(()=>f,":first-child");return y.attr("class","outer-path"),s&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),y.attr("transform",`translate(-${a/2},${-h})`),m(e,y),e.intersect=function(t){l.R.info("lightningBolt intersect",e,t);return I.polygon(e,c,t)},n}(0,h.K)(_t,"hexagon"),(0,h.K)(At,"hourglass"),(0,h.K)(Lt,"icon"),(0,h.K)(Ft,"iconCircle"),(0,h.K)(Mt,"iconRounded"),(0,h.K)(Et,"iconSquare"),(0,h.K)($t,"imageSquare"),(0,h.K)(Ot,"inv_trapezoid"),(0,h.K)(Dt,"labelRect"),(0,h.K)(It,"lean_left"),(0,h.K)(qt,"lean_right"),(0,h.K)(Rt,"lightningBolt");var Kt=(0,h.K)((t,e,r,i,o,n,s)=>[`M${t},${e+n}`,`a${o},${n} 0,0,0 ${r},0`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+s}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),zt=(0,h.K)((t,e,r,i,o,n,s)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${o},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+s}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Nt=(0,h.K)((t,e,r,i,o,n)=>[`M${t-r/2},${-i/2}`,`a${o},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Pt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?16:n,l="neo"===e.look?24:n;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-a,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-l-3*r,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=(e?.width?e?.width:c.width)+2*a,g=p/2,y=g/(2.5+p/50),C=(e?.height?e?.height:c.height)+y+2*l,b=.1*C;let k;const{cssStyles:w}=e;if("handDrawn"===e.look){const t=d.A.svg(h),r=zt(0,0,p,C,g,y,b),o=Nt(0,y,p,C,g,y),n=(0,i.Fr)(e,{}),s=t.path(r,n),a=t.path(o,n);h.insert(()=>a,":first-child").attr("class","line"),k=h.insert(()=>s,":first-child"),k.attr("class","basic label-container"),w&&k.attr("style",w)}else{const t=Kt(0,0,p,C,g,y,b);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(w)).attr("style",o)}return k.attr("label-offset-y",y),k.attr("transform",`translate(${-p/2}, ${-(C/2+y)})`),m(e,k),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-c.height/2+y-(c.y-(c.top??0))})`),e.intersect=function(t){const r=I.rect(e,t),i=r.x-(e.x??0);if(0!=g&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-y)){let o=y*y*(1-i*i/(g*g));o>0&&(o=Math.sqrt(o)),o=y-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function Wt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?12:n;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10)}const{shapeSvg:l,bbox:h,label:c}=await f(t,e,x(e)),u=(e?.width?e?.width:h.width)+2*(s??0),p=(e?.height?e?.height:h.height)+2*(a??0),g="neo"===e.look?p/4:p/8,y=p+g,{cssStyles:C}=e,k=d.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-u/2*.1,y:-y/2},{x:-u/2-u/2*.1,y:y/2},...b(-u/2-u/2*.1,y/2,u/2+u/2*.1,y/2,g,.8),{x:u/2+u/2*.1,y:-y/2},{x:-u/2-u/2*.1,y:-y/2},{x:-u/2,y:-y/2},{x:-u/2,y:y/2*1.1},{x:-u/2,y:-y/2}],T=k.polygon(S.map(t=>[t.x,t.y]),w),v=l.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",o),v.attr("transform",`translate(0,${-g/2})`),c.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*.1/2-(h.x-(h.left??0))},${-p/2+(e.padding??0)-g/2-(h.y-(h.top??0))})`),m(e,v),e.intersect=function(t){return I.polygon(e,S,t)},l}async function jt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?12:n,l="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s-2*l,10),e.height=Math.max((e?.height??0)-2*a-2*l,10));const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=(e?.width?e?.width:c.width)+2*s+2*l-2*l,g=(e?.height?e?.height:c.height)+2*a+2*l-2*l,y=-p/2,b=-g/2,{cssStyles:k}=e,S=d.A.svg(h),T=(0,i.Fr)(e,{}),v=[{x:y-l,y:b+l},{x:y-l,y:b+g+l},{x:y+p-l,y:b+g+l},{x:y+p-l,y:b+g},{x:y+p,y:b+g},{x:y+p,y:b+g-l},{x:y+p+l,y:b+g-l},{x:y+p+l,y:b-l},{x:y+l,y:b-l},{x:y+l,y:b},{x:y,y:b},{x:y,y:b+l}],B=[{x:y,y:b+l},{x:y+p-l,y:b+l},{x:y+p-l,y:b+g},{x:y+p,y:b+g},{x:y+p,y:b},{x:y,y:b}];"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const _=C(v);let A=S.path(_,T);const L=C(B);let F=S.path(L,T);"handDrawn"!==e.look&&(A=w(A),F=w(F));const M=h.insert("g",":first-child");return M.insert(()=>A),M.insert(()=>F),M.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",k),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),u.attr("transform",`translate(${-c.width/2-l-(c.x-(c.left??0))}, ${-c.height/2+l-(c.y-(c.top??0))})`),m(e,M),e.intersect=function(t){return I.polygon(e,v,t)},h}async function Ht(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await f(t,e,x(e)),l=e.padding??0,h="neo"===e.look?16:l,c="neo"===e.look?12:l;let u=!0;(e.width||e.height)&&(u=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*c);const p=Math.max(s.width,e?.width??0)+2*h,g=Math.max(s.height,e?.height??0)+3*c,y="neo"===e.look?g/4:g/8,k=g+(u?y/2:-y/2),w=-p/2,S=-k/2,T=10,{cssStyles:v}=e,B=b(w-T,S+k+T,w+p-T,S+k+T,y,.8),_=B?.[B.length-1],A=[{x:w-T,y:S+T},{x:w-T,y:S+k+T},...B,{x:w+p-T,y:_.y-T},{x:w+p,y:_.y-T},{x:w+p,y:_.y-20},{x:w+p+T,y:_.y-20},{x:w+p+T,y:S-T},{x:w+T,y:S-T},{x:w+T,y:S},{x:w,y:S},{x:w,y:S+T}],L=[{x:w,y:S+T},{x:w+p-T,y:S+T},{x:w+p-T,y:_.y-T},{x:w+p,y:_.y-T},{x:w+p,y:S},{x:w,y:S}],F=d.A.svg(n),M=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const E=C(A),$=F.path(E,M),O=C(L),D=F.path(O,M),q=n.insert(()=>$,":first-child");return q.insert(()=>D),q.attr("class","basic label-container outer-path"),v&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",v),o&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",o),q.attr("transform",`translate(0,${-y/2})`),a.attr("transform",`translate(${-s.width/2-T-(s.x-(s.left??0))}, ${-s.height/2+T-y/2-(s.y-(s.top??0))})`),m(e,q),e.intersect=function(t){return I.polygon(e,A,t)},n}async function Ut(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;e.useHtmlLabels||(0,a.E)((0,a.zj)())||(e.centerLabel=!0);const{shapeSvg:s,bbox:l,label:h}=await f(t,e,x(e)),c=Math.max(l.width+2*(e.padding??0),e?.width??0),u=Math.max(l.height+2*(e.padding??0),e?.height??0),p=-c/2,g=-u/2,{cssStyles:y}=e,C=d.A.svg(s),b=(0,i.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=C.rectangle(p,g,c,u,b),w=s.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),y&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),m(e,w),e.intersect=function(t){return I.rect(e,t)},s}(0,h.K)(Pt,"linedCylinder"),(0,h.K)(Wt,"linedWaveEdgedRect"),(0,h.K)(jt,"multiRect"),(0,h.K)(Ht,"multiWaveEdgedRectangle"),(0,h.K)(Ut,"note");var Yt=(0,h.K)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Xt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s}=await f(t,e,x(e)),a=s.width+(e.padding??0)+(s.height+(e.padding??0)),l=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=d.A.svg(n),r=(0,i.Fr)(e,{}),o=Yt(0,0,a),s=t.path(o,r);h=n.insert(()=>s,":first-child").attr("transform",`translate(${-a/2+.5}, ${a/2})`),c&&h.attr("style",c)}else h=W(n,a,a,l),h.attr("transform",`translate(${-a/2+.5}, ${a/2})`);return o&&h.attr("style",o),m(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=I.polygon(t,i,e);return{x:o.x-.5,y:o.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function Gt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?21:n??0,a="neo"===e.look?12:n??0,{shapeSvg:l,bbox:h,label:c}=await f(t,e,x(e)),u=h.width+("neo"===e.look?2*s:s),p=Math.max(h.height+("neo"===e.look?2*a:a),e.height??0),g=p/4,y=-Math.max(u,(e.width??0)-g)/2,b=-p/2,k=b/2,w=[{x:y+k,y:b},{x:y,y:0},{x:y+k,y:-b},{x:-y,y:-b},{x:-y,y:b}],{cssStyles:S}=e,T=d.A.svg(l),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const B=C(w),_=T.path(B,v),A=l.insert(()=>_,":first-child");return A.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",S),o&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",o),A.attr("transform",`translate(${-k/2},0)`),c.attr("transform",`translate(${-k/2-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),m(e,A),e.intersect=function(t){return I.polygon(e,w,t)},l}async function Vt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);let n;e.labelStyle=r,n=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),h=s.insert("g"),u=s.insert("g").attr("class","label").attr("style",o),p=e.description,g=e.label,f=await v(u,g,e.labelStyle,!0,!0);let y={width:0,height:0};if((0,a.E)((0,a.D7)())){const t=f.children[0],e=(0,c.Ltv)(f);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}l.R.info("Text 2",p);const x=p||[],C=f.getBBox(),b=await v(u,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),k=b.children[0],w=(0,c.Ltv)(b);y=k.getBoundingClientRect(),w.attr("width",y.width),w.attr("height",y.height);const S=(e.padding||0)/2;(0,c.Ltv)(b).attr("transform","translate( "+(y.width>C.width?0:(C.width-y.width)/2)+", "+(C.height+S+5)+")"),(0,c.Ltv)(f).attr("transform","translate( "+(y.width<C.width?0:-(C.width-y.width)/2)+", 0)"),y=u.node().getBBox(),u.attr("transform","translate("+-y.width/2+", "+(-y.height/2-S+3)+")");const B=y.width+(e.padding||0),_=y.height+(e.padding||0),A=-y.width/2-S,L=-y.height/2-S;let F,M;if("handDrawn"===e.look){const t=d.A.svg(s),r=(0,i.Fr)(e,{}),o=t.path(T(A,L,B,_,e.rx||0),r),n=t.line(-y.width/2-S,-y.height/2-S+C.height+S,y.width/2+S,-y.height/2-S+C.height+S,r);M=s.insert(()=>(l.R.debug("Rough node insert CXC",o),n),":first-child"),F=s.insert(()=>(l.R.debug("Rough node insert CXC",o),o),":first-child")}else F=h.insert("rect",":first-child"),M=h.insert("line"),F.attr("class","outer title-state").attr("style",o).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)),M.attr("class","divider").attr("x1",-y.width/2-S).attr("x2",y.width/2+S).attr("y1",-y.height/2-S+C.height+S).attr("y2",-y.height/2-S+C.height+S);return m(e,F),e.intersect=function(t){return I.rect(e,t)},s}async function Zt(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return mt(t,e,{rx:i,ry:i,classes:"",labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}(0,h.K)(Xt,"question"),(0,h.K)(Gt,"rect_left_inv_arrow"),(0,h.K)(Vt,"rectWithTitle"),(0,h.K)(Zt,"roundedRect");async function Qt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0,{shapeSvg:l,bbox:h,label:c}=await f(t,e,x(e)),u=(e?.width??h.width)+2*n+("neo"===e.look?8:16),p=(e?.height??h.height)+2*a,g=u-8,y=p,C=8-u/2,b=-p/2,{cssStyles:k}=e,w=d.A.svg(l),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=[{x:C,y:b},{x:C+g,y:b},{x:C+g,y:b+y},{x:C-8,y:b+y},{x:C-8,y:b},{x:C,y:b},{x:C,y:b+y}],v=w.polygon(T.map(t=>[t.x,t.y]),S),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),k&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),c.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),m(e,B),e.intersect=function(t){return I.rect(e,t)},l}async function Jt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?12:n;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s,10),e.height=Math.max((e?.height??0)/1.5-2*a,10));const{shapeSvg:l,bbox:h,label:c}=await f(t,e,x(e)),u=(e?.width?e?.width:h.width)+2*s,p=1.5*((e?.height?e?.height:h.height)+2*a)/1.5,g=-u/2,y=-p/2,{cssStyles:b}=e,k=d.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=[{x:g,y},{x:g,y:y+p},{x:g+u,y:y+p},{x:g+u,y:y-p/2}],T=C(S),v=k.path(T,w),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",b),o&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",o),B.attr("transform",`translate(0, ${p/4})`),c.attr("transform",`translate(${-u/2+(e.padding??0)-(h.x-(h.left??0))}, ${-p/4+(e.padding??0)-(h.y-(h.top??0))})`),m(e,B),e.intersect=function(t){return I.polygon(e,S,t)},l}async function te(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r;return mt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:o})}async function ee(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?20:n,a="neo"===e.look?12:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=h.height+("neo"===e.look?2*a:a),u=h.width+c/4+("neo"===e.look?2*s:s),p=c/2,{cssStyles:g}=e,y=d.A.svg(l),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=[{x:-u/2+p,y:-c/2},{x:u/2-p,y:-c/2},...k(-u/2+p,0,p,50,90,270),{x:u/2-p,y:c/2},...k(u/2-p,0,p,50,270,450)],S=C(w),T=y.path(S,b),v=l.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),m(e,v),e.intersect=function(t){return I.polygon(e,w,t)},l}async function re(t,e){return mt(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function ie(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o;const{cssStyles:s}=e,{lineColor:a,stateBorder:l,nodeBorder:h,nodeShadow:c}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const u=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),p=d.A.svg(u),g=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=p.circle(0,0,e.width,{...g,stroke:a,strokeWidth:2}),y=l??h,x=5*(e.width??0)/14,C=p.circle(0,0,x,{...g,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),b=u.insert(()=>f,":first-child");if(b.insert(()=>C),"handDrawn"!==e.look&&b.attr("class","outer-path"),s&&b.selectAll("path").attr("style",s),n&&b.selectAll("path").attr("style",n),e.width<25&&c&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${r})`)}return m(e,b),e.intersect=function(t){return I.circle(e,(e.width??0)/2,t)},u}function oe(t,e,{config:{themeVariables:r}}){const{lineColor:o,nodeShadow:n}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if("handDrawn"===e.look){const t=d.A.svg(s).circle(0,0,e.width,(0,i.ue)(o));a=s.insert(()=>t),a.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${r})`)}return m(e,a),e.intersect=function(t){return I.circle(e,(e.width??7)/2,t)},s}(0,h.K)(Qt,"shadedProcess"),(0,h.K)(Jt,"slopedRect"),(0,h.K)(te,"squareRect"),(0,h.K)(ee,"stadium"),(0,h.K)(re,"state"),(0,h.K)(ie,"stateEnd"),(0,h.K)(oe,"stateStart");async function ne(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e?.padding??8,a="neo"===e.look?28:n,l="neo"===e.look?12:n,{shapeSvg:h,bbox:c}=await f(t,e,x(e)),u=Math.max(c.width+16+a,e.width??0),p=Math.max(c.height+l,e.height??0),g=u-16,y=p,C=-u/2,b=-p/2,k=[{x:0,y:0},{x:g,y:0},{x:g,y:-y},{x:0,y:-y},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-y},{x:-8,y:-y},{x:-8,y:0}];if("handDrawn"===e.look){const t=d.A.svg(h),r=(0,i.Fr)(e,{}),o=t.rectangle(C,b,g+16,y,r),n=t.line(C+8,b,C+8,b+y,r),a=t.line(C+8+g,b,C+8+g,b+y,r);h.insert(()=>n,":first-child"),h.insert(()=>a,":first-child");const l=h.insert(()=>o,":first-child"),{cssStyles:c}=e;l.attr("class","basic label-container").attr("style",(0,s.KL)(c)),m(e,l)}else{const t=W(h,g,y,k);o&&t.attr("style",o),m(e,t)}return e.intersect=function(t){return I.polygon(e,k,t)},h}(0,h.K)(ne,"subroutine");async function se(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?12:n;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*a,10),e.width=Math.max((e?.width??0)-2*s-.2*(e.height+2*a),10));const{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=(e?.height?e?.height:h.height)+2*a,u=.2*c,p=.2*c,g=(e?.width?e?.width:h.width)+2*s+u-u,y=c,b=-g/2,k=-y/2,{cssStyles:w}=e,S=d.A.svg(l),T=(0,i.Fr)(e,{}),v=[{x:b-u/2,y:k},{x:b+g+u/2,y:k},{x:b+g+u/2,y:k+y},{x:b-u/2,y:k+y}],B=[{x:b+g-u/2,y:k+y},{x:b+g+u/2,y:k+y},{x:b+g+u/2,y:k+y-p}];"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const _=C(v),A=S.path(_,T),L=C(B),F=S.path(L,{...T,fillStyle:"solid"}),M=l.insert(()=>F,":first-child");return M.insert(()=>A,":first-child"),M.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),m(e,M),e.intersect=function(t){return I.polygon(e,v,t)},l}async function ae(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await f(t,e,x(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),h=Math.max(s.height+2*(e.padding??0),e?.height??0),c=h/8,u=.2*l,p=.2*h,g=h+c,{cssStyles:y}=e,k=d.A.svg(n),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-l/2-l/2*.1,y:g/2},...b(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,c,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2}],T=-l/2+l/2*.1,v=-g/2-.4*p,B=[{x:T+l-u,y:1.3*(v+h)},{x:T+l,y:v+h-p},{x:T+l,y:.9*(v+h)},...b(T+l,1.25*(v+h),T+l-u,1.3*(v+h),.02*-h,.5)],_=C(S),A=k.path(_,w),L=C(B),F=k.path(L,{...w,fillStyle:"solid"}),M=n.insert(()=>F,":first-child");return M.insert(()=>A,":first-child"),M.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))},${-h/2+(e.padding??0)-c/2-(s.y-(s.top??0))})`),m(e,M),e.intersect=function(t){return I.polygon(e,S,t)},n}async function le(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s}=await f(t,e,x(e)),a=Math.max(s.width+(e.padding??0),e?.width||0),l=Math.max(s.height+(e.padding??0),e?.height||0),h=-a/2,c=-l/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",o).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",a).attr("height",l),m(e,d),e.intersect=function(t){return I.rect(e,t)},n}(0,h.K)(se,"taggedRect"),(0,h.K)(ae,"taggedWaveEdgedRectangle"),(0,h.K)(le,"text");var he=(0,h.K)((t,e,r,i,o,n)=>`M${t},${e}\n a${o},${n} 0,0,1 0,${-i}\n l${r},0\n a${o},${n} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${n} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),ce=(0,h.K)((t,e,r,i,o,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),de=(0,h.K)((t,e,r,i,o,n)=>[`M${t+r/2},${-i/2}`,`a${o},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function ue(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,a="neo"===e.look?12:n/2,l=e.height??0;if(e.height&&(e.height=e.height-a,e.height<5&&(e.height=5)),e.width){const t=l/2/(2.5+l/50);e.width=e.width-a-3*t,e.width<10&&(e.width=10)}const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=Math.max(e.height??0,c.height)+a,g=p/2,y=g/(2.5+p/50),C=Math.max(e.width??0,c.width)+y+a,{cssStyles:b}=e;let k;if("handDrawn"===e.look){const t=d.A.svg(h),r=ce(0,0,C,p,y,g),o=de(0,0,C,p,y,g),n=t.path(r,(0,i.Fr)(e,{})),s=t.path(o,(0,i.Fr)(e,{fill:"none"}));k=h.insert(()=>s,":first-child"),k=h.insert(()=>n,":first-child"),k.attr("class","basic label-container"),b&&k.attr("style",b)}else{const t=he(0,0,C,p,y,g);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(b)).attr("style",o),k.attr("class","basic label-container outer-path"),b&&k.selectAll("path").attr("style",b),o&&k.selectAll("path").attr("style",o)}return k.attr("label-offset-x",y),k.attr("transform",`translate(${-C/2}, ${p/2} )`),u.attr("transform",`translate(${-c.width/2-y-(c.x-(c.left??0))}, ${-c.height/2-(c.y-(c.top??0))})`),m(e,k),e.intersect=function(t){const r=I.rect(e,t),i=r.y-(e.y??0);if(0!=g&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-y)){let o=y*y*(1-i*i/(g*g));0!=o&&(o=Math.sqrt(Math.abs(o))),o=y-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},h}async function pe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s=(e.look,n),a="neo"===e.look?2*n:n,{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=Math.max(h.height+s,e.height??0),u=Math.max(h.width+a,(e.width??0)-c),p=[{x:-3*c/6,y:0},{x:u+3*c/6,y:0},{x:u,y:-c},{x:0,y:-c}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=d.A.svg(l),r=(0,i.Fr)(e,{}),o=C(p),n=t.path(o,r);g=l.insert(()=>n,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),y&&g.attr("style",y)}else g=W(l,u,c,p);return o&&g.attr("style",o),e.width=u,e.height=c,m(e,g),e.intersect=function(t){return I.polygon(e,p,t)},l}async function ge(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?12:n;(e.width||e.height)&&(e.height=(e.height??0)-2*a,e.height<5&&(e.height=5),e.width=(e.width??0)-2*s,e.width<15&&(e.width=15));const{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=(e?.width?e?.width:h.width)+2*s,u=(e?.height?e?.height:h.height)+2*a,{cssStyles:p}=e,g=d.A.svg(l),y=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const b=[{x:-c/2*.8,y:-u/2},{x:c/2*.8,y:-u/2},{x:c/2,y:-u/2*.6},{x:c/2,y:u/2},{x:-c/2,y:u/2},{x:-c/2,y:-u/2*.6}],k=C(b),w=g.path(k,y),S=l.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",p),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),m(e,S),e.intersect=function(t){return I.polygon(e,b,t)},l}(0,h.K)(ue,"tiltedCylinder"),(0,h.K)(pe,"trapezoid"),(0,h.K)(ge,"trapezoidalPentagon");async function fe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?2*n:n;(e.width||e.height)&&(e.width=((e?.width??0)-s)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=(0,a._3)((0,a.D7)().flowchart?.htmlLabels),g=(e?.width?e?.width:c.width)+s,y=e?.height?e?.height:g+c.height,b=[{x:0,y:0},{x:y,y:0},{x:y/2,y:-y}],{cssStyles:k}=e,w=d.A.svg(h),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=C(b),v=w.path(T,S),B=h.insert(()=>v,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`).attr("class","outer-path");return k&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",k),o&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",o),e.width=g,e.height=y,m(e,B),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${y/2-(c.height+(e.padding??0)/(p?2:1)-(c.y-(c.top??0)))})`),e.intersect=function(t){return l.R.info("Triangle intersect",e,b,t),I.polygon(e,b,t)},h}async function ye(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?12:n;let l=!0;(e.width||e.height)&&(l=!1,e.width=(e?.width??0)-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:c,label:u}=await f(t,e,x(e)),p=(e?.width?e?.width:c.width)+2*(s??0),g=(e?.height?e?.height:c.height)+2*(a??0),y="neo"===e.look?g/4:g/8,k=g+(l?y:-y),{cssStyles:w}=e,S=14-p,T=S>0?S/2:0,v=d.A.svg(h),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const _=[{x:-p/2-T,y:k/2},...b(-p/2-T,k/2,p/2+T,k/2,y,.8),{x:p/2+T,y:-k/2},{x:-p/2-T,y:-k/2}],A=C(_),L=v.path(A,B),F=h.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(0,${-y/2})`),u.attr("transform",`translate(${-p/2+(e.padding??0)-(c.x-(c.left??0))},${-g/2+(e.padding??0)-y-(c.y-(c.top??0))})`),m(e,F),e.intersect=function(t){return I.polygon(e,_,t)},h}async function me(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e.padding??0,s="neo"===e.look?16:n,a="neo"===e.look?20:n;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-a-t*(20/9)),e.width=e.width-2*s}const{shapeSvg:l,bbox:h}=await f(t,e,x(e)),c=(e?.width?e?.width:h.width)+2*s,u=(e?.height?e?.height:h.height)+a,p=u/8,g=u+2*p,{cssStyles:y}=e,k=d.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-c/2,y:g/2},...b(-c/2,g/2,c/2,g/2,p,1),{x:c/2,y:-g/2},...b(c/2,-g/2,-c/2,-g/2,p,-1)],T=C(S),v=k.path(T,w),B=l.insert(()=>v,":first-child");return B.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),m(e,B),e.intersect=function(t){return I.polygon(e,S,t)},l}(0,h.K)(fe,"triangle"),(0,h.K)(ye,"waveEdgedRectangle"),(0,h.K)(me,"waveRectangle");var xe=10;async function Ce(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-xe,10),e.height=Math.max((e?.height??0)-2*s-xe,10));const{shapeSvg:a,bbox:l,label:h}=await f(t,e,x(e)),c=(e?.width?e?.width:l.width)+2*n+xe,u=(e?.height?e?.height:l.height)+2*s+xe,p=c-xe,g=u-xe,y=-p/2,C=-g/2,{cssStyles:b}=e,k=d.A.svg(a),w=(0,i.Fr)(e,{}),S=[{x:y-xe,y:C-xe},{x:y-xe,y:C+g},{x:y+p,y:C+g},{x:y+p,y:C-xe}],T=`M${y-xe},${C-xe} L${y+p},${C-xe} L${y+p},${C+g} L${y-xe},${C+g} L${y-xe},${C-xe}\n M${y-xe},${C} L${y+p},${C}\n M${y},${C-xe} L${y},${C+g}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const v=k.path(T,w),B=a.insert(()=>v,":first-child");return B.attr("transform","translate(5, 5)"),B.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",b),o&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",o),h.attr("transform",`translate(${-l.width/2+5-(l.x-(l.left??0))}, ${-l.height/2+5-(l.y-(l.top??0))})`),m(e,B),e.intersect=function(t){return I.polygon(e,S,t)},a}(0,h.K)(Ce,"windowPane");var be=new Set(["redux-color","redux-dark-color"]),ke=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function we(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:o,themeVariables:n}=(0,a.zj)(),{rowEven:l,rowOdd:h,nodeBorder:u,borderColorArray:p}=n;if("handDrawn"===e.look){const{themeVariables:r}=(0,a.zj)(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await we(t,o)}const g=(0,a.zj)();e.useHtmlLabels=g.htmlLabels;let f=g.er?.diagramPadding??10,y=g.er?.entityPadding??6;const{cssStyles:C}=e,{labelStyles:b,nodeStyles:k}=(0,i.GX)(e);if(0===r.attributes.length&&e.label){const i={rx:0,ry:0,labelPaddingX:f,labelPaddingY:1.5*f,classes:""};(0,s.Un)(e.label,g)+2*i.labelPaddingX<g.er.minEntityWidth&&(e.width=g.er.minEntityWidth);const n=await mt(t,e,i);if(null!=o&&be.has(o)){const t=r.colorIndex??0;n.attr("data-color-id","color-"+t%p.length)}if(!(0,a._3)(g.htmlLabels)){const t=n.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return n}g.htmlLabels||(f*=1.25,y*=1.25);let w=x(e);w||(w="node default");const S=t.insert("g").attr("class",w).attr("id",e.domId||e.id),T=await Se(S,e.label??"",g,0,0,["name"],b);T.height+=y;let v=0;const B=[],_=[];let A=0,L=0,F=0,M=0,E=!0,$=!0;for(const t of r.attributes){const e=await Se(S,t.type,g,0,v,["attribute-type"],b);A=Math.max(A,e.width+f);const r=await Se(S,t.name,g,0,v,["attribute-name"],b);L=Math.max(L,r.width+f);const i=await Se(S,t.keys.join(),g,0,v,["attribute-keys"],b);F=Math.max(F,i.width+f);const o=await Se(S,t.comment,g,0,v,["attribute-comment"],b);M=Math.max(M,o.width+f);const n=Math.max(e.height,r.height,i.height,o.height)+y;_.push({yOffset:v,rowHeight:n}),v+=n}let O=4;F<=f&&(E=!1,F=0,O--),M<=f&&($=!1,M=0,O--);const D=S.node().getBBox();if(T.width+2*f-(A+L+F+M)>0){const t=T.width+2*f-(A+L+F+M);A+=t/O,L+=t/O,F>0&&(F+=t/O),M>0&&(M+=t/O)}const q=A+L+F+M,R=d.A.svg(S),K=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(K.roughness=0,K.fillStyle="solid");let z=0;_.length>0&&(z=_.reduce((t,e)=>t+(e?.rowHeight??0),0));const N=Math.max(D.width+2*f,e?.width||0,q),P=Math.max((z??0)+T.height,e?.height||0),W=-N/2,j=-P/2;if(S.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,c.Ltv)(r[e]),o=i.attr("transform");let n=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(n=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?n+=A:i.attr("class").includes("attribute-keys")?n+=A+L:i.attr("class").includes("attribute-comment")&&(n+=A+L+F))}i.attr("transform",`translate(${W+f/2+n}, ${s+j+T.height+y/2})`)}),S.select(".name").attr("transform","translate("+-T.width/2+", "+(j+y/2)+")"),null!=o&&be.has(o)){const t=r.colorIndex??0;S.attr("data-color-id","color-"+t%p.length)}const H=R.rectangle(W,j,N,P,K),U=S.insert(()=>H,":first-child").attr("class","outer-path").attr("style",C.join(""));B.push(0);for(const[t,e]of _.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=R.rectangle(W,T.height+j+e?.yOffset,N,e?.rowHeight,{...K,fill:r?l:h,stroke:u});S.insert(()=>i,"g.label").attr("style",C.join("")).attr("class","row-rect-"+(r?"even":"odd"))}const Y=1e-4;let X=Te(W,T.height+j,N+W,T.height+j,Y),G=R.polygon(X.map(t=>[t.x,t.y]),K);if(S.insert(()=>G).attr("class","divider"),X=Te(A+W,T.height+j,A+W,P+j,Y),G=R.polygon(X.map(t=>[t.x,t.y]),K),S.insert(()=>G).attr("class","divider"),E){const t=A+L+W;X=Te(t,T.height+j,t,P+j,Y),G=R.polygon(X.map(t=>[t.x,t.y]),K),S.insert(()=>G).attr("class","divider")}if($){const t=A+L+F+W;X=Te(t,T.height+j,t,P+j,Y),G=R.polygon(X.map(t=>[t.x,t.y]),K),S.insert(()=>G).attr("class","divider")}for(const t of B){const e=T.height+j+t;X=Te(W,e,N+W,e,Y),G=R.polygon(X.map(t=>[t.x,t.y]),K),S.insert(()=>G).attr("class","divider")}if(m(e,U),k&&"handDrawn"!==e.look)if(null!=o&&ke.has(o))S.selectAll("path").attr("style",k);else{const t=k.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");S.selectAll("path").attr("style",e??""),S.selectAll(".row-rect-even path").attr("style",k)}return e.intersect=function(t){return I.rect(e,t)},S}async function Se(t,e,r,i=0,n=0,l=[],h=""){const d=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",h);e!==(0,a.QO)(e)&&(e=(e=(0,a.QO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const u=d.node().appendChild(await(0,o.GZ)(d,e,{width:(0,s.Un)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let t=u.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 p=u.getBBox();if((0,a._3)(r.htmlLabels)){const t=u.children[0];t.style.textAlign="start";const e=(0,c.Ltv)(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}function Te(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function ve(t,e,r,i,o=r.class.padding??12){const n=i?0:3,s=t.insert("g").attr("class",x(e)).attr("id",e.domId||e.id);let a=null,l=null,h=null,c=null,d=0,u=0,p=0;if(a=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await Be(a,{text:`«${t}»`},0);d=a.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await Be(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();u=g.height,h=s.insert("g").attr("class","members-group text");let f=0;for(const t of e.members){f+=await Be(h,t,f,[t.parseClassifier()])+n}p=h.node().getBBox().height,p<=0&&(p=o/2),c=s.insert("g").attr("class","methods-group text");let y=0;for(const t of e.methods){y+=await Be(c,t,y,[t.parseClassifier()])+n}let m=s.node().getBBox();if(null!==a){const t=a.node().getBBox();a.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),m=s.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),m=s.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),m=s.node().getBBox(),{shapeSvg:s,bbox:m}}async function Be(t,e,r,i=[]){const n=t.insert("g").attr("class","label").attr("style",i.join("; ")),l=(0,a.zj)();let h="useHtmlLabels"in e?e.useHtmlLabels:(0,a._3)(l.htmlLabels)??!0,d="";d="text"in e?e.text:e.label,!h&&d.startsWith("\\")&&(d=d.substring(1)),(0,a.Wi)(d)&&(h=!0);const p=await(0,o.GZ)(n,(0,a.oB)((0,s.Sm)(d)),{width:(0,s.Un)(d,l)+50,classes:"markdown-node-label",useHtmlLabels:h},l);let g,f=1;if(h){const t=p.children[0],e=(0,c.Ltv)(p);f=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(f+=t.innerHTML.split("<mrow>").length-1),await u(t),g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}else{i.includes("font-weight: bolder")&&(0,c.Ltv)(p).selectAll("tspan").attr("font-weight",""),f=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes("&gt")){t.textContent=d[0]+d.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim();" "===d[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),g=p.getBBox()}return n.attr("transform","translate(0,"+(-g.height/(2*f)+r)+")"),g.height}async function _e(t,e){const r=(0,a.D7)(),{themeVariables:o}=r,{useGradient:n}=o,s=r.class.padding??12,l=s,h=e.useHtmlLabels??(0,a._3)(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:p,bbox:g}=await ve(t,e,r,h,l),{labelStyles:f,nodeStyles:y}=(0,i.GX)(e);e.labelStyle=f,e.cssStyles=u.styles||"";const x=u.styles?.join(";")||y||"";e.cssStyles||(e.cssStyles=x.replaceAll("!important","").split(";"));const C=0===u.members.length&&0===u.methods.length&&!r.class?.hideEmptyMembersBox,b=d.A.svg(p),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=Math.max(e.width??0,g.width);let S=Math.max(e.height??0,g.height);const T=(e.height??0)>g.height;0===u.members.length&&0===u.methods.length?S+=l:u.members.length>0&&0===u.methods.length&&(S+=2*l);const v=-w/2,B=-S/2;let _=C?2*s:0===u.members.length&&0===u.methods.length?-s:0;T&&(_=2*s);const A=b.rectangle(v-s,B-s-(C?s:0===u.members.length&&0===u.methods.length?-s/2:0),w+2*s,S+2*s+_,k),L=p.insert(()=>A,":first-child");L.attr("class","basic label-container outer-path");const F=L.node().getBBox(),M=p.select(".annotation-group").node().getBBox().height-(C?s/2:0)||0,E=p.select(".label-group").node().getBBox().height-(C?s/2:0)||0,$=p.select(".members-group").node().getBBox().height-(C?s/2:0)||0,O=(M+E+B+s-(B-s-(C?s:0===u.members.length&&0===u.methods.length?-s/2:0)))/2;if(p.selectAll(".text").each((t,e,i)=>{const o=(0,c.Ltv)(i[e]),n=o.attr("transform");let a=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(a=parseFloat(t[2]))}let d=a+B+s-(C?s:0===u.members.length&&0===u.methods.length?-s/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max($,l/2);d=T?Math.max(O,M+E+t+B+2*l+s)+2*l:M+E+t+B+4*l+s}0===u.members.length&&0===u.methods.length&&r.class?.hideEmptyMembersBox&&(d=u.annotations.length>0?a-l:a),h||(d-=4);let g=v;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(g=-o.node()?.getBBox().width/2||0,p.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(g=0)})),o.attr("transform",`translate(${g}, ${d})`)}),u.members.length>0||u.methods.length>0||C){const t=M+E+B+s,r=b.line(F.x,t,F.x+F.width,t+.001,k);p.insert(()=>r).attr("class","divider"+("neo"!==e.look||n?"":" neo-line")).attr("style",x)}if(C||u.members.length>0||u.methods.length>0){const t=M+E+$+B+2*l+s,r=b.line(F.x,T?Math.max(O,t):t,F.x+F.width,(T?Math.max(O,t):t)+.001,k);p.insert(()=>r).attr("class","divider"+("neo"!==e.look||n?"":" neo-line")).attr("style",x)}if("handDrawn"!==u.look&&p.selectAll("path").attr("style",x),L.select(":nth-child(2)").attr("style",x),p.selectAll(".divider").select("path").attr("style",x),e.labelStyle?p.selectAll("span").attr("style",e.labelStyle):p.selectAll("span").attr("style",x),!h){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(x);if(e){const t=e[0].replace("color","fill");p.selectAll("tspan").attr("style",t)}else if(f){const e=t.exec(f);if(e){const t=e[0].replace("color","fill");p.selectAll("tspan").attr("style",t)}}}return m(e,L),e.intersect=function(t){return I.rect(e,t)},p}async function Ae(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const n=e,s=e,l="verifyMethod"in e,h=x(e),u=(0,a.D7)(),{themeVariables:p}=u,{borderColorArray:g,requirementEdgeLabelBackground:f}=p,y="elk"===u.layout?"start":"center",C=t.insert("g").attr("class",h).attr("id",e.domId??e.id);let b;b=l?await Le(C,`&lt;&lt;${n.type}&gt;&gt;`,0,e.labelStyle):await Le(C,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let k=b;const w=await Le(C,n.name,k,e.labelStyle+"; font-weight: bold;");if(k+=w+20,l){k+=await Le(C,""+(n.requirementId?`ID: ${n.requirementId}`:""),k,e.labelStyle,y);k+=await Le(C,""+(n.text?`Text: ${n.text}`:""),k,e.labelStyle,y);k+=await Le(C,""+(n.risk?`Risk: ${n.risk}`:""),k,e.labelStyle,y),await Le(C,""+(n.verifyMethod?`Verification: ${n.verifyMethod}`:""),k,e.labelStyle,y)}else{k+=await Le(C,""+(s.type?`Type: ${s.type}`:""),k,e.labelStyle,y),await Le(C,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),k,e.labelStyle,y)}const S=(C.node()?.getBBox().width??200)+20,T=(C.node()?.getBBox().height??200)+20,v=-S/2,B=-T/2,_=d.A.svg(C),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const L=_.rectangle(v,B,S,T,A),F=C.insert(()=>L,":first-child");if(F.attr("class","basic label-container outer-path").attr("style",o),g?.length){const t=e.colorIndex??0;C.attr("data-color-id","color-"+t%g.length)}if(C.selectAll(".label").each((t,e,r)=>{const i=(0,c.Ltv)(r[e]),o=i.attr("transform");let n=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(n=parseFloat(t[1]),s=parseFloat(t[2]))}const a=s-T/2;let l=v+10;0!==e&&1!==e||(l=n),i.attr("transform",`translate(${l}, ${a+20})`)}),k>b+w+20){const t=B+b+w+20;let r;if("neo"===e.look){const e=.001,i=[[v,t],[v+S,t],[v+S,t+e],[v,t+e]];r=_.polygon(i,A)}else r=_.line(v,t,v+S,t,A);C.insert(()=>r).attr("class","divider")}return m(e,F),e.intersect=function(t){return I.rect(e,t)},o&&"handDrawn"!==e.look&&(f||g?.length)&&C.selectAll("path").attr("style",o),C}async function Le(t,e,r,i="",n="center"){if(""===e)return 0;const l=t.insert("g").attr("class","label").attr("style",i),h=(0,a.D7)(),d=h.htmlLabels??!0,u=await(0,o.GZ)(l,(0,a.oB)((0,s.Sm)(e)),{width:(0,s.Un)(e,h)+50,classes:"markdown-node-label",useHtmlLabels:d,style:i},h);let p;if(d){const t=u.children[0],e=(0,c.Ltv)(u);"start"===n&&(0,c.Ltv)(t).style("text-align","left"),p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}else{const t=u.children[0];for(const e of t.children)i&&e.setAttribute("style",i);if("start"===n){t.setAttribute("text-anchor","start");for(const e of t.children)e.setAttribute("text-anchor","start")}p=u.getBBox(),p.height+=6}return l.attr("transform",`translate(${-p.width/2},${-p.height/2+r})`),p.height}(0,h.K)(we,"erBox"),(0,h.K)(Se,"addText"),(0,h.K)(Te,"lineToPolygon"),(0,h.K)(ve,"textHelper"),(0,h.K)(Be,"addText"),(0,h.K)(_e,"classBox"),(0,h.K)(Ae,"requirementBox"),(0,h.K)(Le,"addText");var Fe=(0,h.K)(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:r}){const{labelStyles:o,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=o||"";const s=e.width;e.width=(e.width??200)-10;const{shapeSvg:a,bbox:l,label:h}=await f(t,e,x(e)),c=e.padding||10;let u,p="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(p=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),u=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));const g={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let C,b;({label:C,bbox:b}=u?await y(u,"ticket"in e&&e.ticket||"",g):await y(a,"ticket"in e&&e.ticket||"",g));const{label:k,bbox:w}=await y(a,"assigned"in e&&e.assigned||"",g);e.width=s;const S=e?.width||0,v=Math.max(b.height,w.height)/2,B=Math.max(l.height+20,e?.height||0)+v,_=-S/2,A=-B/2;let L;h.attr("transform","translate("+(c-S/2)+", "+(-v-l.height/2)+")"),C.attr("transform","translate("+(c-S/2)+", "+(-v+l.height/2)+")"),k.attr("transform","translate("+(c+S/2-w.width-20)+", "+(-v+l.height/2)+")");const{rx:F,ry:M}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=d.A.svg(a),r=(0,i.Fr)(e,{}),o=F||M?t.path(T(_,A,S,B,F||0),r):t.rectangle(_,A,S,B,r);L=a.insert(()=>o,":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=a.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",n).attr("rx",F??5).attr("ry",M??5).attr("x",_).attr("y",A).attr("width",S).attr("height",B);const t="priority"in e&&e.priority;if(t){const e=a.append("line"),r=_+2,i=A+Math.floor((F??0)/2),o=A+B-Math.floor((F??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",Fe(t))}}return m(e,L),e.height=B,e.intersect=function(t){return I.rect(e,t)},a}async function Ee(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:h,label:c}=await f(t,e,x(e)),u=a.width+10*h,p=a.height+8*h,g=.15*u,{cssStyles:y}=e,C=a.width+20,b=a.height+20,k=Math.max(u,C),w=Math.max(p,b);let S;c.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);const T=`M0 0 \n a${g},${g} 1 0,0 ${.25*k},${-1*w*.1}\n a${g},${g} 1 0,0 ${.25*k},0\n a${g},${g} 1 0,0 ${.25*k},0\n a${g},${g} 1 0,0 ${.25*k},${.1*w}\n\n a${g},${g} 1 0,0 ${.15*k},${.33*w}\n a${.8*g},${.8*g} 1 0,0 0,${.34*w}\n a${g},${g} 1 0,0 ${-1*k*.15},${.33*w}\n\n a${g},${g} 1 0,0 ${-1*k*.25},${.15*w}\n a${g},${g} 1 0,0 ${-1*k*.25},0\n a${g},${g} 1 0,0 ${-1*k*.25},0\n a${g},${g} 1 0,0 ${-1*k*.25},${-1*w*.15}\n\n a${g},${g} 1 0,0 ${-1*k*.1},${-1*w*.33}\n a${.8*g},${.8*g} 1 0,0 0,${-1*w*.34}\n a${g},${g} 1 0,0 ${.1*k},${-1*w*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=d.A.svg(n),r=(0,i.Fr)(e,{}),o=t.path(T,r);S=n.insert(()=>o,":first-child"),S.attr("class","basic label-container").attr("style",(0,s.KL)(y))}else S=n.insert("path",":first-child").attr("class","basic label-container").attr("style",o).attr("d",T);return S.attr("transform",`translate(${-k/2}, ${-w/2})`),m(e,S),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return l.R.info("Bang intersect",e,t),I.rect(e,t)},n}async function $e(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:h,label:c}=await f(t,e,x(e)),u=a.width+2*h,p=a.height+2*h,g=.15*u,y=.25*u,C=.35*u,b=.2*u,{cssStyles:k}=e;let w;const S=`M0 0 \n a${g},${g} 0 0,1 ${.25*u},${-1*u*.1}\n a${C},${C} 1 0,1 ${.4*u},${-1*u*.1}\n a${y},${y} 1 0,1 ${.35*u},${.2*u}\n\n a${g},${g} 1 0,1 ${.15*u},${.35*p}\n a${b},${b} 1 0,1 ${-1*u*.15},${.65*p}\n\n a${y},${g} 1 0,1 ${-1*u*.25},${.15*u}\n a${C},${C} 1 0,1 ${-1*u*.5},0\n a${g},${g} 1 0,1 ${-1*u*.25},${-1*u*.15}\n\n a${g},${g} 1 0,1 ${-1*u*.1},${-1*p*.35}\n a${b},${b} 1 0,1 ${.1*u},${-1*p*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=d.A.svg(n),r=(0,i.Fr)(e,{}),o=t.path(S,r);w=n.insert(()=>o,":first-child"),w.attr("class","basic label-container").attr("style",(0,s.KL)(k))}else w=n.insert("path",":first-child").attr("class","basic label-container").attr("style",o).attr("d",S);return c.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),w.attr("transform",`translate(${-u/2}, ${-p/2})`),m(e,w),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return l.R.info("Cloud intersect",e,t),I.rect(e,t)},n}async function Oe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:l}=await f(t,e,x(e)),h=s.width+8*a,c=s.height+2*a,d="neo"===e.look?`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-5}\n H${-h/2}\n Z\n `:`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${-(h-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const u=n.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",o).attr("d",d);return n.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),n.append(()=>l.node()),m(e,u),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},n}async function De(t,e){return tt(t,e,{padding:e.padding??0})}(0,h.K)(Me,"kanbanItem"),(0,h.K)(Ee,"bang"),(0,h.K)($e,"cloud"),(0,h.K)(Oe,"defaultMindmapNode"),(0,h.K)(De,"mindmapCircle");var Ie=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:te},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Zt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ee},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ne},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:yt},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:xt},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:St},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:N},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:rt},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Z},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:ut},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:tt},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ee},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:$e},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Xt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:_t},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:qt},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:It},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:pe},{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:Ot},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:bt},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:le},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Q},{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:oe},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:ie},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Tt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:At},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:st},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:lt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ct},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Rt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ye},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ue},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Pt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:dt},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ct},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:fe},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ce},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:kt},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ge},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:wt},{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:Ht},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:jt},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:z},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ot},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ae},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:se},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:me},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Gt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Wt}],qe=(0,h.K)(()=>{const t={state:re,choice:J,note:Ut,composite:et,rectWithTitle:Vt,labelRect:Dt,block_arrow:V,collapsedGroup:P,iconSquare:Et,iconCircle:Ft,icon:Lt,iconRounded:Mt,imageSquare:$t,anchor:q,kanbanItem:Me,mindmapCircle:De,defaultMindmapNode:Oe,classBox:_e,erBox:we,requirementBox:Ae},e=[...Object.entries(t),...Ie.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 Re(t){return t in qe}(0,h.K)(Re,"isValidShape")},12505(t,e,r){"use strict";r.d(e,{pe:()=>L,PX:()=>ot,ru:()=>et,Un:()=>rt,$t:()=>ct,Sm:()=>pt,C4:()=>ut,$C:()=>X,rY:()=>gt,sM:()=>U,KL:()=>ft,Ib:()=>I,dq:()=>at,I5:()=>ht,yT:()=>V,vU:()=>O,_K:()=>dt,bH:()=>J});var i=r(86535),o=r(31293),n=r(86827),s=r(62559),a=r(51444);function l(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const r=function(...i){const o=e?e.apply(this,i):i[0],n=r.cache;if(n.has(o))return n.get(o);const s=t.apply(this,i);return r.cache=n.set(o,s)||n,s};return r.cache=new(l.Cache||Map),r}function h(){}l.Cache=Map;var c=r(37110),d=r(42796);function u(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var p=r(32178);function g(t){return"__proto__"===t}function f(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var y=r(99125),m=r(89826);function x(t,e,r,i=new Map,o=void 0){const n=o?.(t,e,r,i);if(void 0!==n)return n;if((0,c.s)(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const e=new Array(t.length);i.set(t,e);for(let n=0;n<t.length;n++)e[n]=x(t[n],n,r,i,o);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;i.set(t,e);for(const[n,s]of t)e.set(n,x(s,n,r,i,o));return e}if(t instanceof Set){const e=new Set;i.set(t,e);for(const n of t)e.add(x(n,void 0,r,i,o));return e}if((0,p.P)(t))return t.subarray();if((0,d.i)(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,e);for(let n=0;n<t.length;n++)e[n]=x(t[n],n,r,i,o);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),C(e,t,r,i,o),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return i.set(t,e),C(e,t,r,i,o),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof Error){const e=structuredClone(t);return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,C(e,t,r,i,o),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof Number){const e=new Number(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if(t instanceof String){const e=new String(t.valueOf());return i.set(t,e),C(e,t,r,i,o),e}if("object"==typeof t&&function(t){switch((0,y.b)(t)){case m.R_:case m.Uw:case m.cT:case m.iq:case m.$V:case m.vC:case m.ri:case m.ML:case m.XZ:case m.i1:case m._u:case m.pj:case m.kj:case m.GX:case m.Av:case m.NA:case m.OG:case m.VP:case m.Qb:case m.q:case m.x6:case m.ZR:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),C(e,t,r,i,o),e}return t}function C(t,e,r=t,i,o){const n=[...Object.keys(e),...u(e)];for(let s=0;s<n.length;s++){const a=n[s],l=Object.getOwnPropertyDescriptor(t,a);(null==l||l.writable)&&(t[a]=x(e[a],a,r,i,o))}}function b(t,e){return function(t,e){return x(t,void 0,t,new Map,e)}(t,(r,i,o,n)=>{const s=e?.(r,i,o,n);if(void 0!==s)return s;if("object"==typeof t){if("[object Object]"===(0,y.b)(t)&&"function"!=typeof t.constructor){const e={};return n.set(t,e),C(e,t,o,n),e}switch(Object.prototype.toString.call(t)){case m.kj:case m.OG:case m.$V:{const e=new t.constructor(t?.valueOf());return C(e,t),e}case m.R_:{const e={};return C(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function k(t){return b(t)}var w=r(14608);function S(t){return"object"==typeof t&&null!==t}var T=r(30622);function v(t){return S(t)&&(0,T.X)(t)}var B=r(19663);function _(t,e,r,i){if((0,c.s)(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(i.has(e))return function(t){if((0,c.s)(t))return t;if(Array.isArray(t)||(0,d.i)(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}return"undefined"!=typeof File&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)t in e||(e[t]=void 0)}const o=[...Object.keys(e),...u(e)];for(let n=0;n<o.length;n++){const s=o[n];if(g(s))continue;let a=e[s],l=t[s];if((0,w.N)(a)&&(a={...a}),(0,w.N)(l)&&(l={...l}),(0,p.P)(a)&&(a=k(a)),Array.isArray(a))if(Array.isArray(l)){const t=[],e=Reflect.ownKeys(l);for(let r=0;r<e.length;r++){const i=e[r];t[i]=l[i]}l=t}else if(v(l)){const t=[];for(let e=0;e<l.length;e++)t[e]=l[e];l=t}else l=[];const h=r(l,a,s,t,e,i);void 0!==h?t[s]=h:Array.isArray(a)||S(l)&&S(a)&&(f(l)||f(a)||(0,B.i)(l)||(0,B.i)(a))?t[s]=_(l,a,r,i):null==l&&f(a)?t[s]=_({},a,r,i):null==l&&(0,B.i)(a)?t[s]=k(a):void 0!==l&&void 0===a||(t[s]=a)}return t}function A(t,...e){return function(t,...e){const r=e.slice(0,-1),i=e[e.length-1];let o=t;for(let t=0;t<r.length;t++)o=_(o,r[t],i,new Map);return o}(t,...e,h)}var L="​",F={curveBasis:a.qrM,curveBasisClosed:a.Yu4,curveBasisOpen:a.IA3,curveBumpX:a.Wi0,curveBumpY:a.PGM,curveBundle:a.OEq,curveCardinalClosed:a.olC,curveCardinalOpen:a.IrU,curveCardinal:a.y8u,curveCatmullRomClosed:a.Q7f,curveCatmullRomOpen:a.cVp,curveCatmullRom:a.oDi,curveLinear:a.lUB,curveLinearClosed:a.Lx9,curveMonotoneX:a.nVG,curveMonotoneY:a.uxU,curveNatural:a.Xf2,curveStep:a.GZz,curveStepAfter:a.UPb,curveStepBefore:a.dyv},M=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,E=(0,n.K)(function(t,e){const r=$(t,/(?:init\b)|(?:initialize\b)/);let o={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.$i)(t),o=(0,i.hH)(o,[...t])}else o=r.args;if(!o)return;let n=(0,i.Ch)(t,e);const s="config";return void 0!==o[s]&&("flowchart-v2"===n&&(n="flowchart"),o[n]=o[s],delete o[s]),o},"detectInit"),$=(0,n.K)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${M.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),o.R.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const s=[];for(;null!==(n=i.DB.exec(t));)if(n.index===i.DB.lastIndex&&i.DB.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;s.push({type:t,args:e})}return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return o.R.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),O=(0,n.K)(function(t){return t.replace(i.DB,"")},"removeDirectives"),D=(0,n.K)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function I(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return F[r]??e}function q(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,s.J)(r):r}(0,n.K)(I,"interpolateToCurve"),(0,n.K)(q,"formatUrl");var R=(0,n.K)((t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let s=window;for(let e=0;e<i;e++)if(s=s[r[e]],!s)return void o.R.error(`Function name: ${t} not found in window`);s[n](...e)},"runFunc");function K(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function z(t){let e,r=0;t.forEach(t=>{r+=K(t,e),e=t});return W(t,r/2)}function N(t){return 1===t.length?t[0]:z(t)}(0,n.K)(K,"distance"),(0,n.K)(z,"traverseEdge"),(0,n.K)(N,"calcLabelPosition");var P=(0,n.K)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),W=(0,n.K)((t,e)=>{let r,i=e;for(const e of t){if(r){const t=K(e,r);if(0===t)return r;if(t<i)i-=t;else{const o=i/t;if(o<=0)return r;if(o>=1)return{x:e.x,y:e.y};if(o>0&&o<1)return{x:P((1-o)*r.x+o*e.x,5),y:P((1-o)*r.y+o*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),j=(0,n.K)((t,e,r)=>{o.R.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=W(e,25),n=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),a={x:0,y:0};return a.x=Math.sin(s)*n+(e[0].x+i.x)/2,a.y=-Math.cos(s)*n+(e[0].y+i.y)/2,a},"calcCardinalityPosition");function H(t,e,r){const i=structuredClone(r);o.R.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const n=W(i,25+t),s=10+.5*t,a=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(a+Math.PI)*s+(i[0].x+n.x)/2,l.y=-Math.cos(a+Math.PI)*s+(i[0].y+n.y)/2):"end_right"===e?(l.x=Math.sin(a-Math.PI)*s+(i[0].x+n.x)/2-5,l.y=-Math.cos(a-Math.PI)*s+(i[0].y+n.y)/2-5):"end_left"===e?(l.x=Math.sin(a)*s+(i[0].x+n.x)/2-5,l.y=-Math.cos(a)*s+(i[0].y+n.y)/2-5):(l.x=Math.sin(a)*s+(i[0].x+n.x)/2,l.y=-Math.cos(a)*s+(i[0].y+n.y)/2),l}function U(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,n.K)(H,"calcTerminalLabelPosition"),(0,n.K)(U,"getStylesFromArray");var Y=0,X=(0,n.K)(()=>(Y++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Y),"generateId");function G(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}(0,n.K)(G,"makeRandomHex");var V=(0,n.K)(t=>G(t.length),"random"),Z=(0,n.K)(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"),Q=(0,n.K)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,o]=ht(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",o),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class);const s=n.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.attr("fill",e.fill),s.text(r),n},"drawSimpleText"),J=l((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),i.Y2.lineBreakRegex.test(t))return t;const o=t.split(" ").filter(Boolean),n=[];let s="";return o.forEach((t,i)=>{const a=rt(`${t} `,r),l=rt(s,r);if(a>e){const{hyphenatedStrings:i,remainingWord:o}=tt(t,e,"-",r);n.push(s,...i),s=o}else l+a>=e?(n.push(s),s=t):s=[s,t].filter(Boolean).join(" ");i+1===o.length&&n.push(s)}),n.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),tt=l((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],n=[];let s="";return o.forEach((t,a)=>{const l=`${s}${t}`;if(rt(l,i)>=e){const t=a+1,e=o.length===t,i=`${l}${r}`;n.push(e?l:i),s=""}else s=l}),{hyphenatedStrings:n,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function et(t,e){return ot(t,e).height}function rt(t,e){return ot(t,e).width}(0,n.K)(et,"calculateTextHeight"),(0,n.K)(rt,"calculateTextWidth");var it,ot=l((t,e)=>{const{fontSize:r=12,fontFamily:o="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,s]=ht(r),l=["sans-serif",o],h=t.split(i.Y2.lineBreakRegex),c=[],d=(0,a.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const u=d.append("svg");for(const t of l){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of h){const o=Z();o.text=i||L;const a=Q(u,o).style("font-size",s).style("font-weight",n).style("font-family",t),l=(a._groups||a)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}c.push(r)}u.remove();return c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),nt=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K)(this,"InitIDGenerator")}},st=(0,n.K)(function(t){return it=it||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),it.innerHTML=t,unescape(it.textContent)},"entityDecode");function at(t){return"str"in t}(0,n.K)(at,"isDetailedError");var lt=(0,n.K)((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),ht=(0,n.K)(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 ct(t,e){return A({},t,e)}(0,n.K)(ct,"cleanAndMerge");var dt={assignWithDepth:i.hH,wrapLabel:J,calculateTextHeight:et,calculateTextWidth:rt,calculateTextDimensions:ot,cleanAndMerge:ct,detectInit:E,detectDirective:$,isSubstringInArray:D,interpolateToCurve:I,calcLabelPosition:N,calcCardinalityPosition:j,calcTerminalLabelPosition:H,formatUrl:q,getStylesFromArray:U,generateId:X,random:V,runFunc:R,entityDecode:st,insertTitle:lt,isLabelCoordinateInPath:yt,parseFontSize:ht,InitIDGenerator:nt},ut=(0,n.K)(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"),pt=(0,n.K)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),gt=(0,n.K)((t,e,{counter:r=0,prefix:i,suffix:o},n)=>n||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function ft(t){return t??null}function yt(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}(0,n.K)(ft,"handleUndefinedAttr"),(0,n.K)(yt,"isLabelCoordinateInPath")},5637(t,e,r){"use strict";r.d(e,{D:()=>s});var i=r(86535),o=r(86827),n=r(51444),s=(0,o.K)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,n.Ltv)("body");if("sandbox"===e){const e=(0,n.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},86535(t,e,r){"use strict";r.d(e,{C0:()=>wt,xA:()=>dt,hH:()=>m,Dl:()=>Vt,IU:()=>ge,Wt:()=>he,Y2:()=>Jt,a$:()=>re,KG:()=>ne,sb:()=>Q,ME:()=>ve,UI:()=>Y,Ch:()=>Tt,mW:()=>St,DB:()=>bt,_3:()=>J,EJ:()=>Ct,m7:()=>xe,iN:()=>ye,zj:()=>ht,D7:()=>Se,Gs:()=>Me,J$:()=>_t,ab:()=>be,E:()=>xt,Q2:()=>at,P$:()=>B,ID:()=>zt,TM:()=>mt,Wi:()=>Gt,H1:()=>At,QO:()=>Wt,Js:()=>Fe,Xd:()=>vt,dj:()=>Qt,cL:()=>ut,Df:()=>Z,$i:()=>V,jZ:()=>Ot,oB:()=>Be,wZ:()=>nt,EI:()=>me,SV:()=>fe,Nk:()=>lt,XV:()=>Te,ke:()=>Ce,UU:()=>ot,ot:()=>ie,mj:()=>_e,tM:()=>le,H$:()=>P,B6:()=>st});var i=r(31293),o=r(86827),n=r(51931),s=r(8232);const a=(t,e)=>{const r=n.A.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,s.A)(t,i)};var l=r(25582);const h=(t,e,r=50)=>{const{r:i,g:o,b:s,a}=n.A.parse(t),{r:h,g:c,b:d,a:u}=n.A.parse(e),p=r/100,g=2*p-1,f=a-u,y=((g*f===-1?g:(g+f)/(1+g*f))+1)/2,m=1-y,x=i*y+h*m,C=o*y+c*m,b=s*y+d*m,k=a*p+u*(1-p);return(0,l.A)(x,C,b,k)},c=(t,e=100)=>{const r=n.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,h(r,t,e)};var d,u=r(75263),p=r(78041),g=r(5097),f=r(99418),y=(0,o.K)((t,e,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(e)&&!Array.isArray(t))return e.forEach(e=>y(t,e,i)),t;if(Array.isArray(e)&&Array.isArray(t))return e.forEach(e=>{t.includes(e)||t.push(e)}),t;if(null==t||r<=0)return null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e;if(null!=e&&"object"==typeof t&&"object"==typeof e){const i=t;Object.entries(e).forEach(([e,o])=>{if("object"==typeof o){if(null===o)return;Object.hasOwn(t,e)||Object.defineProperty(t,e,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),void 0===i[e]&&(i[e]=Array.isArray(o)?[]:{}),"object"==typeof i[e]&&(i[e]=y(i[e],o,{depth:r-1}))}else"object"!=typeof i[e]&&(Object.hasOwn(t,e)?i[e]=o:Object.defineProperty(t,e,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return t},"assignWithDepth"),m=y,x="#ffffff",C="#f2f2f2",b=(0,o.K)((t,e)=>a(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),k=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(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,u.A)(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,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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,p.A)(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(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]||a(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||a(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||a(this.primaryColor,{h:64}),this.fillType3=this.fillType3||a(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||a(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||a(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||a(this.primaryColor,{h:128}),this.fillType7=this.fillType7||a(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||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-10}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||a(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.venn1=this.venn1??a(this.primaryColor,{l:-30}),this.venn2=this.venn2??a(this.secondaryColor,{l:-30}),this.venn3=this.venn3??a(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??a(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??a(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??a(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??a(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??a(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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,u.A)(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||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}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]})}},w=(0,o.K)(t=>{const e=new k;return e.calculate(t),e},"getThemeVariables"),S=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,l.A)(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=(0,u.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,l.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,l.A)(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,p.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,p.A)(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,p.A)(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,p.A)(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=c(this.doneTaskBkgColor),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=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(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.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??(0,p.A)(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,p.A)(this.secondaryColor,20),this.git1=(0,p.A)(this.pie2||this.secondaryColor,20),this.git2=(0,p.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,p.A)(this.pie4||a(this.primaryColor,{h:-30}),20),this.git4=(0,p.A)(this.pie5||a(this.primaryColor,{h:-60}),20),this.git5=(0,p.A)(this.pie6||a(this.primaryColor,{h:-90}),10),this.git6=(0,p.A)(this.pie7||a(this.primaryColor,{h:60}),10),this.git7=(0,p.A)(this.pie8||a(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||(0,p.A)("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||(0,p.A)("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||(0,p.A)("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||(0,p.A)("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||(0,p.A)(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||(0,p.A)(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,p.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,p.A)(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]})}},T=(0,o.K)(t=>{const e=new S;return e.calculate(t),e},"getThemeVariables"),v=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=a(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=b(this.primaryColor,this.darkMode),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.radius=5,this.strokeWidth=1,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.clusterBkg="#FBFBFF",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,l.A)(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",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.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||a(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(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||c(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||c(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=this.border1,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,p.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(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=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||a(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-30}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||a(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||a(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.venn1=this.venn1??a(this.primaryColor,{l:-30}),this.venn2=this.venn2??a(this.secondaryColor,{l:-30}),this.venn3=this.venn3??a(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??a(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??a(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??a(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??a(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??a(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,u.A)(c(this.git0),25),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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]})}},B=(0,o.K)(t=>{const e=new v;return e.calculate(t),e},"getThemeVariables"),_=class{static{(0,o.K)(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,p.A)("#cde498",10),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=(0,u.A)(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||a(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]||a(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(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,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,p.A)(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=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(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||a(this.primaryColor,{l:-30}),this.pie5=this.pie5||a(this.secondaryColor,{l:-30}),this.pie6=this.pie6||a(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||a(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.venn1=this.venn1??a(this.primaryColor,{l:-30}),this.venn2=this.venn2??a(this.secondaryColor,{l:-30}),this.venn3=this.venn3??a(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??a(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??a(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??a(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??a(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??a(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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]})}},A=(0,o.K)(t=>{const e=new _;return e.calculate(t),e},"getThemeVariables"),L=class{static{(0,o.K)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,p.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(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.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||(0,p.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=(0,p.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,p.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(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]||a(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(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,p.A)(this.contrast,30),this.sectionBkgColor2=(0,p.A)(this.contrast,30),this.taskBorderColor=(0,u.A)(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,p.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,u.A)(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=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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,u.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||a(this.primaryColor,{h:-30}),this.git4=this.pie5||a(this.primaryColor,{h:-60}),this.git5=this.pie6||a(this.primaryColor,{h:-90}),this.git6=this.pie7||a(this.primaryColor,{h:60}),this.git7=this.pie8||a(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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]})}},F=(0,o.K)(t=>{const e=new L;return e.calculate(t),e},"getThemeVariables"),M=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(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,u.A)(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,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=a(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",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||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||a(t,{h:30}),this.cScale4=this.cScale4||a(t,{h:60}),this.cScale5=this.cScale5||a(t,{h:90}),this.cScale6=this.cScale6||a(t,{h:120}),this.cScale7=this.cScale7||a(t,{h:150}),this.cScale8=this.cScale8||a(t,{h:210,l:150}),this.cScale9=this.cScale9||a(t,{h:270}),this.cScale10=this.cScale10||a(t,{h:300}),this.cScale11=this.cScale11||a(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(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 i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||a(t,{h:64}),this.fillType3=this.fillType3||a(e,{h:64}),this.fillType4=this.fillType4||a(t,{h:-64}),this.fillType5=this.fillType5||a(e,{h:-64}),this.fillType6=this.fillType6||a(t,{h:128}),this.fillType7=this.fillType7||a(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||a(t,{l:-10}),this.pie5=this.pie5||a(e,{l:-10}),this.pie6=this.pie6||a(r,{l:-10}),this.pie7=this.pie7||a(t,{h:60,l:-10}),this.pie8=this.pie8||a(t,{h:-60,l:-10}),this.pie9=this.pie9||a(t,{h:120,l:0}),this.pie10=this.pie10||a(t,{h:60,l:-20}),this.pie11=this.pie11||a(t,{h:-60,l:-20}),this.pie12=this.pie12||a(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||a(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,legendTextColor:this.xyChart?.legendTextColor||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||t,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,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||a(t,{h:-30}),this.git4=this.git4||a(t,{h:-60}),this.git5=this.git5||a(t,{h:-90}),this.git6=this.git6||a(t,{h:60}),this.git7=this.git7||a(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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,o.K)(t=>{const e=new M;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(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.border1,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,u.A)(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,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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,p.A)(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||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(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]||a(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||a(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||a(this.primaryColor,{h:64}),this.fillType3=this.fillType3||a(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||a(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||a(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||a(this.primaryColor,{h:128}),this.fillType7=this.fillType7||a(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||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-10}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||a(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,legendTextColor:this.xyChart?.legendTextColor||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,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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]})}},O=(0,o.K)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=b("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(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,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,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,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=a(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,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.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=this.mainBkg;if(this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(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 i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||a(t,{h:64}),this.fillType3=this.fillType3||a(e,{h:64}),this.fillType4=this.fillType4||a(t,{h:-64}),this.fillType5=this.fillType5||a(e,{h:-64}),this.fillType6=this.fillType6||a(t,{h:128}),this.fillType7=this.fillType7||a(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||a(t,{l:-10}),this.pie5=this.pie5||a(e,{l:-10}),this.pie6=this.pie6||a(r,{l:-10}),this.pie7=this.pie7||a(t,{h:60,l:-10}),this.pie8=this.pie8||a(t,{h:-60,l:-10}),this.pie9=this.pie9||a(t,{h:120,l:0}),this.pie10=this.pie10||a(t,{h:60,l:-20}),this.pie11=this.pie11||a(t,{h:-60,l:-20}),this.pie12=this.pie12||a(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||a(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,legendTextColor:this.xyChart?.legendTextColor||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||t,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,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||a(t,{h:-30}),this.git4=this.git4||a(t,{h:-60}),this.git5=this.git5||a(t,{h:-90}),this.git6=this.git6||a(t,{h:60}),this.git7=this.git7||a(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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=(0,o.K)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables"),q=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(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.border1,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,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,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.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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(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]||a(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||a(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||a(this.primaryColor,{h:64}),this.fillType3=this.fillType3||a(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||a(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||a(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||a(this.primaryColor,{h:128}),this.fillType7=this.fillType7||a(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||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-10}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||a(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,legendTextColor:this.xyChart?.legendTextColor||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,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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]})}},R=(0,o.K)(t=>{const e=new q;return e.calculate(t),e},"getThemeVariables"),K=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=b(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(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,u.A)(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,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=a(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,p.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(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 i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||a(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||a(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||a(t,{h:64}),this.fillType3=this.fillType3||a(e,{h:64}),this.fillType4=this.fillType4||a(t,{h:-64}),this.fillType5=this.fillType5||a(e,{h:-64}),this.fillType6=this.fillType6||a(t,{h:128}),this.fillType7=this.fillType7||a(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||a(t,{l:-10}),this.pie5=this.pie5||a(e,{l:-10}),this.pie6=this.pie6||a(r,{l:-10}),this.pie7=this.pie7||a(t,{h:60,l:-10}),this.pie8=this.pie8||a(t,{h:-60,l:-10}),this.pie9=this.pie9||a(t,{h:120,l:0}),this.pie10=this.pie10||a(t,{h:60,l:-20}),this.pie11=this.pie11||a(t,{h:-60,l:-20}),this.pie12=this.pie12||a(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||a(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,legendTextColor:this.xyChart?.legendTextColor||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||t,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,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||a(t,{h:-30}),this.git4=this.git4||a(t,{h:-60}),this.git5=this.git5||a(t,{h:-90}),this.git6=this.git6||a(t,{h:60}),this.git7=this.git7||a(t,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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=(0,o.K)(t=>{const e=new K;return e.calculate(t),e},"getThemeVariables"),N=class{static{(0,o.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=b(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,l.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||b(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||b(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||b(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||b(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(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.border1,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,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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,p.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,p.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=(0,u.A)(this["cScale"+t],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||a(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||a(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||a(this.primaryColor,{h:64}),this.fillType3=this.fillType3||a(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||a(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||a(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||a(this.primaryColor,{h:128}),this.fillType7=this.fillType7||a(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||a(this.primaryColor,{l:-10}),this.pie5=this.pie5||a(this.secondaryColor,{l:-10}),this.pie6=this.pie6||a(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||a(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||a(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||a(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||a(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||a(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||a(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||a(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||a(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||a(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||a(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||a(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||a(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,g.A)(this.quadrant1Fill)?(0,p.A)(this.quadrant1Fill):(0,u.A)(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,legendTextColor:this.xyChart?.legendTextColor||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,u.A)(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||a(this.primaryColor,{h:-30}),this.git4=this.git4||a(this.primaryColor,{h:-60}),this.git5=this.git5||a(this.primaryColor,{h:-90}),this.git6=this.git6||a(this.primaryColor,{h:60}),this.git7=this.git7||a(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||x,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}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]})}},P={base:{getThemeVariables:w},dark:{getThemeVariables:T},default:{getThemeVariables:B},forest:{getThemeVariables:A},neutral:{getThemeVariables:F},neo:{getThemeVariables:E},"neo-dark":{getThemeVariables:O},redux:{getThemeVariables:I},"redux-dark":{getThemeVariables:R},"redux-color":{getThemeVariables:z},"redux-dark-color":{getThemeVariables:(0,o.K)(t=>{const e=new N;return e.calculate(t),e},"getThemeVariables")}},W={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,hierarchicalNamespaces:!0},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,donutHole:0,legendPosition:"right",highlightSlice:""},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,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},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"},ishikawa:{useMaxWidth:!0,diagramPadding:20},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},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},j={...W,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:P.default.getThemeVariables(),sequence:{...W.sequence,messageFont:(0,o.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,o.K)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,o.K)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...W.gantt,tickInterval:void 0,useWidth:void 0},c4:{...W.c4,useWidth:void 0,personFont:(0,o.K)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...W.flowchart,inheritDir:!1},external_personFont:(0,o.K)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,o.K)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,o.K)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,o.K)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,o.K)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,o.K)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,o.K)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,o.K)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,o.K)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,o.K)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,o.K)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,o.K)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,o.K)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,o.K)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,o.K)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,o.K)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,o.K)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,o.K)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,o.K)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,o.K)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,o.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...W.pie,useWidth:984},xyChart:{...W.xyChart,useWidth:void 0},requirement:{...W.requirement,useWidth:void 0},packet:{...W.packet},eventmodeling:{...W.eventmodeling},treeView:{...W.treeView,useWidth:void 0},radar:{...W.radar},railroad:{...W.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...W.ishikawa},sankey:{...W.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...W.venn},cynefin:{...W.cynefin}},H=(0,o.K)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...H(t[i],"")]:[...r,e+i],[]),"keyify"),U=new Set(H(j,"")),Y=j,X={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},G=(0,o.K)((t,e)=>{for(const r of Object.keys(t)){const o=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||"string"!=typeof o||!e.test(o))&&(i.R.debug("sanitize deleting dictionary entry:",r,o),delete t[r])}},"sanitizeDictionaryConfig"),V=(0,o.K)(t=>{if(i.R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>V(t));else{for(const e of Object.keys(t)){if(i.R.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!U.has(e)||null==t[e]){i.R.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){const r=X[e];r?G(t[e],r):(i.R.debug("sanitizing object",e),V(t[e]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const o of r)e.includes(o)&&(i.R.debug("sanitizing css option",e),t[e]=Z(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.R.debug("After sanitization",t)}},"sanitizeDirective"),Z=(0,o.K)(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),Q=Object.freeze(Y),J=(0,o.K)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),tt=m({},Q),et=[],rt=m({},Q),it=(0,o.K)((t,e)=>{let r=m({},t),i={};for(const t of e)ct(t),i=m(i,t);if(r=m(r,i),i.theme&&i.theme in P){const t=m({},d),e=m(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in P&&(r.themeVariables=P[r.theme].getThemeVariables(e))}return yt(rt=r),rt},"updateCurrentConfig"),ot=(0,o.K)(t=>(tt=m({},Q),tt=m(tt,t),t.theme&&P[t.theme]&&(tt.themeVariables=P[t.theme].getThemeVariables(t.themeVariables)),it(tt,et),tt),"setSiteConfig"),nt=(0,o.K)(t=>{d=m({},t)},"saveConfigFromInitialize"),st=(0,o.K)(t=>(tt=m(tt,t),it(tt,et),tt),"updateSiteConfig"),at=(0,o.K)(()=>m({},tt),"getSiteConfig"),lt=(0,o.K)(t=>(it(rt,[t]),ht()),"setConfig"),ht=(0,o.K)(()=>m({},rt),"getConfig"),ct=(0,o.K)(t=>{t&&(["secure",...tt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.R.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]&&ct(t[e])}))},"sanitize"),dt=(0,o.K)(t=>{V(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),et.push(t),it(tt,et)},"addDirective"),ut=(0,o.K)((t=tt)=>{it(t,et=[])},"reset"),pt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},gt={},ft=(0,o.K)(t=>{gt[t]||(i.R.warn(pt[t]),gt[t]=!0)},"issueWarning"),yt=(0,o.K)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ft("LAZY_LOAD_DEPRECATED")},"checkConfig"),mt=(0,o.K)(()=>{let t={};d&&(t=m(t,d));for(const e of et)t=m(t,e);return t},"getUserDefinedConfig"),xt=(0,o.K)(t=>(null!=t.flowchart?.htmlLabels&&ft("FLOWCHART_HTML_LABELS_DEPRECATED"),J(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Ct=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,bt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,kt=/\s*%%.*\n/gm,wt=class extends Error{static{(0,o.K)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},St={},Tt=(0,o.K)(function(t,e){t=t.replace(Ct,"").replace(bt,"").replace(kt,"\n");for(const[r,{detector:i}]of Object.entries(St)){if(i(t,e))return r}throw new wt(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),vt=(0,o.K)((...t)=>{for(const{id:e,detector:r,loader:i}of t)Bt(e,r,i)},"registerLazyLoadedDiagrams"),Bt=(0,o.K)((t,e,r)=>{St[t]&&i.R.warn(`Detector with key ${t} already exists. Overwriting.`),St[t]={detector:e,loader:r},i.R.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),_t=(0,o.K)(t=>St[t].loader,"getDiagramLoader"),At=/<br\s*\/?>/gi,Lt=(0,o.K)(t=>{if(!t)return[""];return Kt(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ft=(()=>{let t=!1;return()=>{t||(Mt(),t=!0)}})();function Mt(){const t="data-temp-href-target";f.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),f.A.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,o.K)(Mt,"setupDompurifyHooks");var Et=(0,o.K)(t=>{Ft();return f.A.sanitize(t)},"removeScript"),$t=(0,o.K)((t,e)=>{if(xt(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Et(t):"loose"!==r&&(t=(t=(t=Kt(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Rt(t))}return t},"sanitizeMore"),Ot=(0,o.K)((t,e)=>t?t=e.dompurifyConfig?f.A.sanitize($t(t,e),e.dompurifyConfig).toString():f.A.sanitize($t(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),Dt=(0,o.K)((t,e)=>"string"==typeof t?Ot(t,e):t.flat().map(t=>Ot(t,e)),"sanitizeTextOrArray"),It=(0,o.K)(t=>At.test(t),"hasBreaks"),qt=(0,o.K)(t=>t.split(At),"splitBreaks"),Rt=(0,o.K)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Kt=(0,o.K)(t=>t.replace(At,"#br#"),"breakToPlaceholder"),zt=(0,o.K)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Nt=(0,o.K)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Pt=(0,o.K)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),Wt=(0,o.K)(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const o=e[t-1],n=e[t+1];Ht(o,n)&&(i=o+","+n,t++,r.pop())}r.push(Ut(i))}return r.join("")},"parseGenericTypes"),jt=(0,o.K)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Ht=(0,o.K)((t,e)=>{const r=jt(t,"~"),i=jt(e,"~");return 1===r&&1===i},"shouldCombineSets"),Ut=(0,o.K)(t=>{const e=jt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),n=i.lastIndexOf("~");for(;-1!==o&&-1!==n&&o!==n;)i[o]="<",i[n]=">",o=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Yt=(0,o.K)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Xt=/\$\$(.*?)\$\$/g,Gt=(0,o.K)(t=>(t.match(Xt)?.length??0)>0,"hasKatex"),Vt=(0,o.K)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Qt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Zt=(0,o.K)(async(t,e)=>{if(!Gt(t))return t;if(!(Yt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Xt,"MathML is unsupported in this environment.");{const{default:i}=await r.e(2130).then(()=>r(99749)),o=e.forceLegacyMathML||!Yt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(At).map(t=>Gt(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Xt,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:o}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qt=(0,o.K)(async(t,e)=>Ot(await Zt(t,e),e),"renderKatexSanitized"),Jt={getRows:Lt,sanitizeText:Ot,sanitizeTextOrArray:Dt,hasBreaks:It,splitBreaks:qt,lineBreakRegex:At,removeScript:Et,getUrl:zt,evaluate:J,getMax:Nt,getMin:Pt},te=(0,o.K)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),ee=(0,o.K)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),re=(0,o.K)(function(t,e,r,i){const o=ee(e,r,i);te(t,o)},"configureSvgSize"),ie=(0,o.K)(function(t,e,r,o){const n=e.node().getBBox(),s=n.width,a=n.height;i.R.info(`SVG bounds: ${s}x${a}`,n);let l=0,h=0;i.R.info(`Graph bounds: ${l}x${h}`,t),l=s+2*r,h=a+2*r,i.R.info(`Calculated bounds: ${l}x${h}`),re(e,h,l,o);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),oe={};function ne(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,o.K)(ne,"cssStyleSheetToString");var se=(0,o.K)((t,e,r,o)=>{let n="";return t in oe&&oe[t]?n=oe[t]({...r,svgId:o}):i.R.warn(`No theme found for ${t}`),`& {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.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: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\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: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n [data-look="neo"].swimlane.cluster rect {\n filter: none;\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),ae=(0,o.K)((t,e)=>{void 0!==e&&(oe[t]=e)},"addStylesForDiagram"),le=se,he={};(0,o.V)(he,{clear:()=>ge,getAccDescription:()=>xe,getAccTitle:()=>ye,getDiagramTitle:()=>be,setAccDescription:()=>me,setAccTitle:()=>fe,setDiagramTitle:()=>Ce});var ce="",de="",ue="",pe=(0,o.K)(t=>Ot(t,ht()),"sanitizeText"),ge=(0,o.K)(()=>{ce="",ue="",de=""},"clear"),fe=(0,o.K)(t=>{ce=pe(t).replace(/^\s+/g,"")},"setAccTitle"),ye=(0,o.K)(()=>ce,"getAccTitle"),me=(0,o.K)(t=>{ue=pe(t).replace(/\n\s+/g,"\n")},"setAccDescription"),xe=(0,o.K)(()=>ue,"getAccDescription"),Ce=(0,o.K)(t=>{de=pe(t)},"setDiagramTitle"),be=(0,o.K)(()=>de,"getDiagramTitle"),ke=i.R,we=i.H,Se=ht,Te=lt,ve=Q,Be=(0,o.K)(t=>Ot(t,Se()),"sanitizeText"),_e=ie,Ae=(0,o.K)(()=>he,"getCommonDb"),Le={},Fe=(0,o.K)((t,e,r)=>{Le[t]&&ke.warn(`Diagram with id ${t} already registered. Overwriting.`),Le[t]=e,r&&Bt(t,r),ae(t,e.styles),e.injectUtils?.(ke,we,Se,Be,_e,Ae(),()=>{})},"registerDiagram"),Me=(0,o.K)(t=>{if(t in Le)return Le[t];throw new Ee(t)},"getDiagram"),Ee=class extends Error{static{(0,o.K)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},69793(t,e,r){"use strict";r.d(e,{W6:()=>Ht,GZ:()=>Vt,lT:()=>Ft});var i=r(43287),o=r(12505),n=r(86535),s=r(31293),a=r(86827),l=r(98551),h=r(50048),c=r(51444);function d(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var u={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function p(t){u=t}var g={exec:()=>null};function f(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(m.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var y=(()=>{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")},x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,C=/(?:[*+-]|\d{1,9}[.)])/,b=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,k=f(b).replace(/bull/g,C).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(),w=f(b).replace(/bull/g,C).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(),S=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,T=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",T).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),B=f(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,C).getRegex(),_="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",A=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,L=f("^ {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",A).replace("tag",_).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),F=f(S).replace("hr",x).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",_).getRegex(),M={blockquote:f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",F).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:v,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:x,html:L,lheading:k,list:B,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:F,table:g,text:/^[^\n]+/},E=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",x).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",_).getRegex(),$={...M,lheading:w,table:E,paragraph:f(S).replace("hr",x).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",E).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",_).getRegex()},O={...M,html:f("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",A).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:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(S).replace("hr",x).replace("heading"," *#{1,6} *[^\n]").replace("lheading",k).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},D=/^( {2,}|\\)\n(?!\s*$)/,I=/[\p{P}\p{S}]/u,q=/[\s\p{P}\p{S}]/u,R=/[^\s\p{P}\p{S}]/u,K=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,q).getRegex(),z=/(?!~)[\p{P}\p{S}]/u,N=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",y?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),P=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,W=f(P,"u").replace(/punct/g,I).getRegex(),j=f(P,"u").replace(/punct/g,z).getRegex(),H="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",U=f(H,"gu").replace(/notPunctSpace/g,R).replace(/punctSpace/g,q).replace(/punct/g,I).getRegex(),Y=f(H,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,z).getRegex(),X=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,R).replace(/punctSpace/g,q).replace(/punct/g,I).getRegex(),G=f(/\\(punct)/,"gu").replace(/punct/g,I).getRegex(),V=f(/^<(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(),Z=f(A).replace("(?:--\x3e|$)","--\x3e").getRegex(),Q=f("^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",Z).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),J=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,tt=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",J).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),et=f(/^!?\[(label)\]\[(ref)\]/).replace("label",J).replace("ref",T).getRegex(),rt=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",T).getRegex(),it=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ot={_backpedal:g,anyPunctuation:G,autolink:V,blockSkip:N,br:D,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:g,emStrongLDelim:W,emStrongRDelimAst:U,emStrongRDelimUnd:X,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:tt,nolink:rt,punctuation:K,reflink:et,reflinkSearch:f("reflink|nolink(?!\\()","g").replace("reflink",et).replace("nolink",rt).getRegex(),tag:Q,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:g},nt={...ot,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",J).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J).getRegex()},st={...ot,emStrongRDelimAst:Y,emStrongLDelim:j,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",it).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:f(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",it).getRegex()},at={...st,br:f(D).replace("{2,}","*").getRegex(),text:f(st.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},lt={normal:M,gfm:$,pedantic:O},ht={normal:ot,gfm:st,breaks:at,pedantic:nt},ct={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},dt=t=>ct[t];function ut(t,e){if(e){if(m.escapeTest.test(t))return t.replace(m.escapeReplace,dt)}else if(m.escapeTestNoEncode.test(t))return t.replace(m.escapeReplaceNoEncode,dt);return t}function pt(t){try{t=encodeURI(t).replace(m.percentDecode,"%")}catch{return null}return t}function gt(t,e){let r=t.replace(m.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}).split(m.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(m.slashPipe,"|");return r}function ft(t,e,r){let i=t.length;if(0===i)return"";let o=0;for(;o<i;){let n=t.charAt(i-o-1);if(n!==e||r){if(n===e||!r)break;o++}else o++}return t.slice(0,i-o)}function yt(t,e,r,i,o){let n=e.href,s=e.title||null,a=t[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:n,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}var mt=class{options;rules;lexer;constructor(t){this.options=t||u}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:ft(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.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:r}}}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=ft(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:ft(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=ft(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,n=!1,s=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))s.push(t[e]),n=!0;else{if(n)break;s.push(t[e])}t=t.slice(e);let a=s.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${a}`:a,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=h,0===t.length)break;let c=o.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,n=e.raw+"\n"+t.join("\n"),s=this.blockquote(n);o[o.length-1]=s,r=r.substring(0,r.length-e.raw.length)+s.raw,i=i.substring(0,i.length-e.text.length)+s.text;break}if("list"===c?.type){let e=c,n=e.raw+"\n"+t.join("\n"),s=this.list(n);o[o.length-1]=s,r=r.substring(0,r.length-c.raw.length)+s.raw,i=i.substring(0,i.length-e.raw.length)+s.raw,t=n.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let n=this.rules.other.listItemRegex(r),s=!1;for(;t;){let r=!1,i="",a="";if(!(e=n.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,a=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,a=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),n=this.rules.other.headingBeginRegex(d),s=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||n.test(h)||s.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())a+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||n.test(l)||r.test(l))break;a+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(s=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(a),p&&(u="[ ] "!==p[0],a=a.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:a,tokens:[]}),o.raw+=i}let a=o.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){let e=o.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}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," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=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:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=gt(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?n.align.push("right"):this.rules.other.tableAlignCenter.test(t)?n.align.push("center"):this.rules.other.tableAlignLeft.test(t)?n.align.push("left"):n.align.push(null);for(let t=0;t<r.length;t++)n.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:n.align[t]});for(let t of o)n.rows.push(gt(t,n.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}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=ft(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 r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),yt(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return yt(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,n=[...i[0]].length-1,s=n,a=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){s+=o;continue}if((i[5]||i[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+a);let e=[...i[0]][0].length,l=t.slice(0,n+i.index+e+o);if(Math.min(n,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(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,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,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}}}},xt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||u,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:lt.normal,inline:ht.normal};this.options.pedantic?(e.block=lt.pedantic,e.inline=ht.pedantic):this.options.gfm&&(e.block=lt.gfm,this.options.breaks?e.inline=ht.breaks:e.inline=ht.gfm),this.tokenizer.rules=e}static get rules(){return{block:lt,inline:ht}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).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=[],r=!1){for(this.options.pedantic&&(t=t.replace(m.tabCharGlobal," ").replace(m.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let n=e.at(-1);r&&"paragraph"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);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 r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,s="";for(;t;){let r;if(n||(s=""),n=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,s)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),n=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.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 e}},Ct=class{options;parser;constructor(t){this.options=t||u}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(m.notSpaceStart)?.[0],o=t.replace(m.endingNewline,"")+"\n";return i?'<pre><code class="language-'+ut(i)+'">'+(r?o:ut(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:ut(o,!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,r=t.start,i="";for(let e=0;e<t.items.length;e++){let r=t.items[e];i+=this.listitem(r)}let o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+o+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+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=r+" "+ut(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}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="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){let o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\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>${ut(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=pt(t);if(null===o)return i;let n='<a href="'+(t=o)+'"';return e&&(n+=' title="'+ut(e)+'"'),n+=">"+i+"</a>",n}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=pt(t);if(null===o)return ut(r);let n=`<img src="${t=o}" alt="${r}"`;return e&&(n+=` title="${ut(e)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ut(t.text)}},bt=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""}},kt=class t{options;renderer;textRenderer;constructor(t){this.options=t||u,this.options.renderer=this.options.renderer||new Ct,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new bt}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=o,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)){r+=e||"";continue}}let n=o;switch(n.type){case"space":r+=this.renderer.space(n);continue;case"hr":r+=this.renderer.hr(n);continue;case"heading":r+=this.renderer.heading(n);continue;case"code":r+=this.renderer.code(n);continue;case"table":r+=this.renderer.table(n);continue;case"blockquote":r+=this.renderer.blockquote(n);continue;case"list":r+=this.renderer.list(n);continue;case"html":r+=this.renderer.html(n);continue;case"def":r+=this.renderer.def(n);continue;case"paragraph":r+=this.renderer.paragraph(n);continue;case"text":{let o=n,s=this.renderer.text(o);for(;i+1<t.length&&"text"===t[i+1].type;)o=t[++i],s+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{let t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}let n=o;switch(n.type){case"escape":case"text":r+=e.text(n);break;case"html":r+=e.html(n);break;case"link":r+=e.link(n);break;case"image":r+=e.image(n);break;case"strong":r+=e.strong(n);break;case"em":r+=e.em(n);break;case"codespan":r+=e.codespan(n);break;case"br":r+=e.br(n);break;case"del":r+=e.del(n);break;default:{let t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},wt=class{options;block;constructor(t){this.options=t||u}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?xt.lex:xt.lexInline}provideParser(){return this.block?kt.parse:kt.parseInline}},St=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=kt;Renderer=Ct;TextRenderer=bt;Lexer=xt;Tokenizer=mt;Hooks=wt;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}: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 r=e[t.level];r?r.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)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Ct(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],n=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new mt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],n=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new wt;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],n=e[i];wt.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&wt.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return n.call(e,r)})();let i=o.call(e,t);return n.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await n.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return xt.lex(t,e??this.defaults)}parser(t,e){return kt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},n=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return n(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 n(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?xt.lex:xt.lexInline)(r,o),n=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(n,o.walkTokens));let s=await(o.hooks?await o.hooks.provideParser():t?kt.parse:kt.parseInline)(n,o);return o.hooks?await o.hooks.postprocess(s):s})().catch(n);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?xt.lex:xt.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?kt.parse:kt.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(t){return n(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+ut(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Tt(t,e){return St.parse(t,e)}Tt.options=Tt.setOptions=function(t){return St.setOptions(t),Tt.defaults=St.defaults,p(Tt.defaults),Tt},Tt.getDefaults=d,Tt.defaults=u,Tt.use=function(...t){return St.use(...t),Tt.defaults=St.defaults,p(Tt.defaults),Tt},Tt.walkTokens=function(t,e){return St.walkTokens(t,e)},Tt.parseInline=St.parseInline,Tt.Parser=kt,Tt.parser=kt.parse,Tt.Renderer=Ct,Tt.TextRenderer=bt,Tt.Lexer=xt,Tt.lexer=xt.lex,Tt.Tokenizer=mt,Tt.Hooks=wt,Tt.parse=Tt;Tt.options,Tt.setOptions,Tt.use,Tt.walkTokens,Tt.parseInline,kt.parse,xt.lex;var vt=r(84146),Bt="undefined"!=typeof performance&&"function"==typeof performance.now,_t=(0,a.K)(()=>Bt?performance.now():0,"now"),At="🧜 ",Lt={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{(0,a.K)(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,e){if(!this.enabled)return e();const r=_t();try{return e()}finally{this.buckets[t]=(this.buckets[t]??0)+(_t()-r)}}async tick(t,e){if(!this.enabled)return e();const r=_t();try{return await e()}finally{this.buckets[t]=(this.buckets[t]??0)+(_t()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),e=this.runLabel??t?.name;return t&&(this.records.push({label:e??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,e)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const e={name:t,start:_t(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(e):this.roots.push(e),this.stack.push(e),Bt&&"function"==typeof performance.mark)try{performance.mark(`${At}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const e=_t();if(t.duration=e-t.start,Bt&&"function"==typeof performance.measure)try{performance.measure(`${At}${t.name}`,{start:t.start,end:e,detail:{devtools:{dataType:"track-entry",track:"Mermaid render",trackGroup:"Mermaid",color:Lt[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,e){if(!this.enabled)return e();this.begin(t);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),e){if(!t)return;const r=t.duration,i=e&&e!==t.name?`${t.name} [${e}]`:t.name,o=["ms % phase"],n=(0,a.K)((t,e)=>{const i=" ".repeat(e),s=t.duration.toFixed(1).padStart(8),a=r>0?`${(t.duration/r*100).toFixed(0).padStart(3)}%`:" -";o.push(`${s} ${a} ${i}${t.name}`);for(const r of t.children)n(r,e+1);if(t.children.length>0){const e=t.children.reduce((t,e)=>t+e.duration,0),r=t.duration-e;if(r>.5){const t=r.toFixed(1).padStart(8);o.push(`${t} ${i} (self)`)}}},"walk");n(t,0);const s=Object.keys(this.buckets);if(s.length>0){o.push("—— buckets (summed) ——");for(const t of s)o.push(`${this.buckets[t].toFixed(1).padStart(8)} ${t}`)}console.log(`${At}mermaid render profile · ${i}\n${o.join("\n")}`)}});globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var Ft=l.extend({raf(t){"function"==typeof queueMicrotask?queueMicrotask(t):setTimeout(t,0)}}).extend(h);function Mt(t,{markdownAutoWrap:e}){const r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,vt.T)(r)}function Et(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function $t(t,e={}){const r=Mt(t,e),i=Tt.lexer(r),o=[[]];let n=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(n++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&o[n].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&o[n].push({content:t.text,type:"normal"})}return(0,a.K)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?o[n].push({content:t.text,type:"normal"}):o[n].push({content:t.raw,type:"normal"})}),o}function Ot(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Dt(t,{markdownAutoWrap:e}={}){const r=Tt.lexer(t);function i(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(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(s.R.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K)(i,"output"),r.map(i).join("")}function It(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function qt(t,e){return Rt(t,[],It(e.content),e.type)}function Rt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...n]=r,s=[...e,o];return t([{content:s.join(""),type:i}])?Rt(t,s,n,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Kt(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,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const n=t.shift()??{content:" ",type:"normal"},s=[...i];if(""!==o&&s.push({content:o,type:"normal"}),s.push(n),e(s))return zt(t,e,r,s);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){const[i,o]=qt(e,n);r.push([i]),o.content&&t.unshift(o)}return zt(t,e,r)}function Nt(t,e){e&&t.attr("style",e)}(0,a.K)(Mt,"preprocessMarkdown"),(0,a.K)(Et,"nonMarkdownToLines"),(0,a.K)($t,"markdownToLines"),(0,a.K)(Ot,"nonMarkdownToHTML"),(0,a.K)(Dt,"markdownToHTML"),(0,a.K)(It,"splitTextToChars"),(0,a.K)(qt,"splitWordToFitWidth"),(0,a.K)(Rt,"splitWordToFitWidthRecursion"),(0,a.K)(Kt,"splitLineToFitWidth"),(0,a.K)(zt,"splitLineToFitWidthRecursion"),(0,a.K)(Nt,"applyStyle");async function Pt(t,e,r,i,o=!1,s=(0,n.zj)()){const a=t.append("foreignObject");a.attr("width",`${Math.min(10*r,16384)}px`),a.attr("height",`${Math.min(10*r,16384)}px`);const l=a.append("xhtml:div"),h=(0,n.Wi)(e.label)?await(0,n.dj)(e.label.replace(n.Y2.lineBreakRegex,"\n"),s):(0,n.jZ)(e.label,s),c=e.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(h),Nt(d,e.labelStyle),d.attr("class",`${c} ${i}`),Nt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&l.attr("class","labelBkg");return(await Ft.measure(()=>l.node().getBoundingClientRect())).width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px")),a.node()}function Wt(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function jt(t,e,r){const i=t.append("text"),o=Wt(i,1,e);Xt(o,r);const n=o.node().getComputedTextLength();return i.remove(),n}function Ht(t,e,r){const i=t.append("text"),o=Wt(i,1,e);Xt(o,[{content:r,type:"normal"}]);const n=o.node()?.getBoundingClientRect();return n&&i.remove(),n}function Ut(t,e,r,i=!1,o=!1){const n=e.append("g"),s=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let h=0;for(const e of r){const r=(0,a.K)(e=>jt(n,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:Kt(e,r);for(const t of i){Xt(Wt(l,h,1.1,o),t),h++}}if(i){const t=l.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),n.node()}return l.node()}function Yt(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function Xt(t,e){t.text(""),e.forEach((e,r)=>{const i=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===r?i.text(Yt(e.content)):i.text(" "+Yt(e.content))})}async function Gt(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,o,s)=>(r.push((async()=>{const r=`${o}:${s}`;return await(0,i.dn)(r)?await(0,i.WY)(r,void 0,{class:"label-icon"}):`<i class='${(0,n.jZ)(t,e).replace(":"," ")}'></i>`})()),t));const o=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>o.shift()??"")}(0,a.K)(Pt,"addHtmlSpan"),(0,a.K)(Wt,"createTspan"),(0,a.K)(jt,"computeWidthOfText"),(0,a.K)(Ht,"computeDimensionOfText"),(0,a.K)(Ut,"createFormattedText"),(0,a.K)(Yt,"decodeHTMLEntities"),(0,a.K)(Xt,"updateTextContentAndStyles"),(0,a.K)(Gt,"replaceIconSubstring");var Vt=(0,a.K)(async(t,e="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:l=!0,markdown:h=!0,isNode:d=!0,width:u=200,addSvgBackground:p=!1}={},g)=>{if(s.R.debug("XYZ createText",e,r,i,a,l,d,"addSvgBackground: ",p),l){const i=h?Dt(e,g):Ot(e),s=await Gt((0,o.Sm)(i),g),l=e.replace(/\\\\/g,"\\"),c={isNode:d,label:(0,n.Wi)(e)?l:s,labelStyle:r.replace("fill:","color:")};return await Pt(t,c,u,a,p,g)}{const n=(0,o.Sm)(e.replace(/<br\s*\/?>/g,"<br/>")),s=Ut(u,t,h?$t(n.replace("<br>","<br/>"),g):Et(n),!!e&&p,!d);if(d){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.Ltv)(s).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,c.Ltv)(s).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.Ltv)(s).select("text").attr("style",e)}return i?(0,c.Ltv)(s).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,c.Ltv)(s).selectAll("tspan.text-outer-tspan").classed("row",!0),s}},"createText")},96865(t,e,r){"use strict";r.d(e,{IU:()=>d,Oi:()=>a,U7:()=>c,U_:()=>u,on:()=>h});var i=r(48159),o=r(12505),n=r(31293),s=r(86827),a=(0,s.K)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins"),l=new Map;async function h(t,e,r){let n,s;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?i.nq[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let i;"sandbox"===r.config.securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i??null),s=await a(n,e,r)}else s=await a(t,e,r),n=s;return n.attr("data-look",(0,o.KL)(e.look)),e.tooltip&&s.attr("title",e.tooltip),l.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}(0,s.K)(h,"insertNode");var c=(0,s.K)((t,e)=>{l.set(e.id,t)},"setNodeElem"),d=(0,s.K)(()=>{l.clear()},"clear"),u=(0,s.K)(t=>{const e=l.get(t.id);n.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},24980(t,e,r){"use strict";r.d(e,{I:()=>b,U:()=>C});var i=r(96865),o=r(48159),n=r(44505),s=r(69793),a=r(86535),l=r(31293),h=r(86827),c=r(51444),d=r(61057),u=(0,h.K)(async(t,e)=>{const r=(0,a.D7)(),{themeVariables:i,handDrawnSeed:h}=r,{clusterBkg:u,clusterBorder:p}=i,g=p,{labelStyles:f,nodeStyles:y,borderStyles:m,backgroundStyles:x}=(0,n.GX)(e),C=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),b=(0,a._3)(r.flowchart.htmlLabels),k="LR"===e.direction,w=C.insert("g").attr("class","cluster-label swimlane-label"),S=await(0,s.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let T=S.getBBox();if(b){const t=S.children[0],e=(0,c.Ltv)(S);T=t.getBoundingClientRect(),e.attr("width",T.width),e.attr("height",T.height)}const v=e.padding??0,B=e.width<=T.width+v?T.width+v:e.width;e.width<=T.width+v?e.diff=(B-e.width)/2-v:e.diff=-v;const _=e.height,A=e.y-_/2,L=e.y+_/2,F=e.x-B/2,M=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:A+_/3,E=k?4:0,$=T.height+2*E;let O,D;if(k){const t=Math.max($,T.height+2*E),r=F+t,i=Math.max(0,B-t);if("handDrawn"===e.look){const o=d.A.svg(C),s=(0,n.Fr)(e,{roughness:.7,fill:u,stroke:g,fillWeight:3,seed:h}),a=(0,n.Fr)(e,{roughness:.7,fill:"none",stroke:g,seed:h}),l=o.rectangle(F,A,t,_,s);O=C.insert(()=>l,":first-child");const c=o.rectangle(r,A,i,_,a);D=C.insert(()=>c,":first-child"),O.select("path:nth-child(2)").attr("style",m.join(";")),O.select("path").attr("style",x.join(";").replace("fill","stroke"))}else O=C.insert("rect",":first-child"),D=C.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",y).attr("x",F).attr("y",A).attr("width",t).attr("height",_).attr("fill",u).attr("stroke",g),D.attr("class","swimlane-body").attr("style",y).attr("x",r).attr("y",A).attr("width",i).attr("height",_).attr("fill","none").attr("stroke",g);const o=F+t/2,s=e.y;w.attr("transform",`translate(${o}, ${s}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{const t=Math.max(0,M-A),r=Math.min($,t),i=A+r,o=Math.max(0,L-i),s=e.x-B/2;if("handDrawn"===e.look){const t=d.A.svg(C),a=(0,n.Fr)(e,{roughness:.7,fill:u,stroke:g,fillWeight:3,seed:h}),l=(0,n.Fr)(e,{roughness:.7,fill:"none",stroke:g,seed:h}),c=t.rectangle(s,A,B,r,a);O=C.insert(()=>c,":first-child");const p=t.rectangle(s,i,B,o,l);D=C.insert(()=>p,":first-child"),O.select("path:nth-child(2)").attr("style",m.join(";")),O.select("path").attr("style",x.join(";").replace("fill","stroke"))}else O=C.insert("rect",":first-child"),D=C.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",y).attr("x",s).attr("y",A).attr("width",B).attr("height",r).attr("fill",u).attr("stroke",g),D.attr("class","swimlane-body").attr("style",y).attr("x",s).attr("y",i).attr("width",B).attr("height",o).attr("fill","none").attr("stroke",g);const a=e.x-T.width/2,l=A+(r-T.height)/2;w.attr("transform",`translate(${a}, ${l})`)}if(l.R.trace("Swimlane data ",e,JSON.stringify(e)),f){const t=w.select("span");t&&t.attr("style",f)}return e.offsetX=0,e.width=B,e.height=_,e.offsetY=T.height-v/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:C,labelBBox:T}},"swimlane"),p=(0,h.K)(async(t,e)=>{l.R.info("Creating subgraph rect for ",e.id,e);const r=(0,a.D7)(),{themeVariables:h,handDrawnSeed:u}=r,{clusterBkg:p,clusterBorder:g}=h,{labelStyles:f,nodeStyles:y,borderStyles:m,backgroundStyles:x}=(0,n.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=(0,a.E)(r),k=C.insert("g").attr("class","cluster-label ");let w;w="markdown"===e.labelType?await(0,s.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}):await(0,o.DA)(k,e.label,e.labelStyle||"",!1,!0);let S=w.getBBox();if((0,a.E)(r)){const t=w.children[0],e=(0,c.Ltv)(w);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}const T=e.width<=S.width+e.padding?S.width+e.padding:e.width;e.width<=S.width+e.padding?e.diff=(T-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,B=e.x-T/2,_=e.y-v/2;let A;if(l.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=d.A.svg(C),r=(0,n.Fr)(e,{roughness:.7,fill:p,stroke:g,fillWeight:3,seed:u}),i=t.path((0,o.FA)(B,_,T,v,0),r);A=C.insert(()=>(l.R.debug("Rough node insert CXC",i),i),":first-child"),A.select("path:nth-child(2)").attr("style",m.join(";")),A.select("path").attr("style",x.join(";").replace("fill","stroke"))}else A=C.insert("rect",":first-child"),A.attr("style",y).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",_).attr("width",T).attr("height",v);const{subGraphTitleTopMargin:L}=(0,i.Oi)(r);if(k.attr("transform",`translate(${e.x-S.width/2}, ${e.y-e.height/2+L})`),f){const t=k.select("span");t&&t.attr("style",f)}const F=A.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=S.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:C,labelBBox:S}},"rect"),g=(0,h.K)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),f=(0,h.K)(async(t,e)=>{const r=(0,a.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:s,compositeBackground:l,compositeTitleBackground:h,nodeBorder:u}=i,p=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),g=p.insert("g",":first-child"),f=p.insert("g").attr("class","cluster-label");let y=p.append("rect");const m=await(0,o.DA)(f,e.label,e.labelStyle,void 0,!0);let x=m.getBBox();if((0,a.E)(r)){const t=m.children[0],e=(0,c.Ltv)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}const C=0*e.padding,b=C/2,k=(e.width<=x.width+e.padding?x.width+e.padding:e.width)+C;e.width<=x.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height+C,S=e.height+C-x.height-6,T=e.x-k/2,v=e.y-w/2;e.width=k;const B=e.y-e.height/2-b+x.height+2;let _;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=d.A.svg(p),i=e.rx||e.ry?r.path((0,o.FA)(T,v,k,w,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:n}):r.rectangle(T,v,k,w,{seed:n});_=p.insert(()=>i,":first-child");const a=r.rectangle(T,B,k,S,{fill:t?s:l,fillStyle:t?"hachure":"solid",stroke:u,seed:n});_=p.insert(()=>i,":first-child"),y=p.insert(()=>a)}else{_=g.insert("rect",":first-child");const t="outer";_.attr("class",t).attr("x",T).attr("y",v).attr("width",k).attr("height",w).attr("data-look",e.look),y.attr("class","inner").attr("x",T).attr("y",B).attr("width",k).attr("height",S)}f.attr("transform",`translate(${e.x-x.width/2}, ${v+1-((0,a.E)(r)?0:3)})`);const A=_.node().getBBox();return e.height=A.height,e.offsetX=0,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:p,labelBBox:x}},"roundedWithTitle"),y=(0,h.K)(async(t,e)=>{l.R.info("Creating subgraph rect for ",e.id,e);const r=(0,a.D7)(),{themeVariables:h,handDrawnSeed:u}=r,{clusterBkg:p,clusterBorder:g}=h,{labelStyles:f,nodeStyles:y,borderStyles:m,backgroundStyles:x}=(0,n.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=(0,a.E)(r),k=C.insert("g").attr("class","cluster-label "),w=await(0,s.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let S=w.getBBox();if((0,a.E)(r)){const t=w.children[0],e=(0,c.Ltv)(w);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}const T=e.width<=S.width+e.padding?S.width+e.padding:e.width;e.width<=S.width+e.padding?e.diff=(T-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,B=e.x-T/2,_=e.y-v/2;let A;if(l.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=d.A.svg(C),r=(0,n.Fr)(e,{roughness:.7,fill:p,stroke:g,fillWeight:4,seed:u}),i=t.path((0,o.FA)(B,_,T,v,e.rx),r);A=C.insert(()=>(l.R.debug("Rough node insert CXC",i),i),":first-child"),A.select("path:nth-child(2)").attr("style",m.join(";")),A.select("path").attr("style",x.join(";").replace("fill","stroke"))}else A=C.insert("rect",":first-child"),A.attr("style",y).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",_).attr("width",T).attr("height",v);const{subGraphTitleTopMargin:L}=(0,i.Oi)(r);if(k.attr("transform",`translate(${e.x-S.width/2}, ${e.y-e.height/2+L})`),f){const t=k.select("span");t&&t.attr("style",f)}const F=A.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=S.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:C,labelBBox:S}},"kanbanSection"),m={rect:p,squareRect:p,roundedWithTitle:f,noteGroup:g,divider:(0,h.K)((t,e)=>{const r=(0,a.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:s}=i,l=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=l.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const p=e.height+c,g=e.x-u/2,f=e.y-p/2;let y;if(e.width=u,"handDrawn"===e.look){const t=d.A.svg(l).rectangle(g,f,u,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:n});y=l.insert(()=>t,":first-child")}else{y=h.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),y.attr("class",t).attr("x",g).attr("y",f).attr("width",u).attr("height",p).attr("data-look",e.look)}const m=y.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:l,labelBBox:{}}},"divider"),kanbanSection:y,swimlane:u},x=new Map,C=(0,h.K)(async(t,e)=>{const r=e.shape||"rect",i=await m[r](t,e);return x.set(e.id,i),i},"insertCluster"),b=(0,h.K)(()=>{x=new Map},"clear")},841(t,e,r){"use strict";r.d(e,{H:()=>$t,r:()=>Ft});var i=r(86827);function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(0,i.K)(o,"getDefaultExportFromCjs");var n,s,a,l,h,c,d,u,p,g,f,y,m,x,C,b,k,w,S,T,v,B,_,A,L,F,M,E,$,O,D,I,q,R,K,z,N,P,W,j,H,U,Y,X,G={},V={},Z={};function Q(){if(n)return Z;function t(t){return null==t}function e(t){return"object"==typeof t&&null!==t}function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}function o(t,e){if(e){const r=Object.keys(e);for(let i=0,o=r.length;i<o;i+=1){const o=r[i];t[o]=e[o]}}return t}function s(t,e){let r="";for(let i=0;i<e;i+=1)r+=t;return r}function a(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}return n=1,(0,i.K)(t,"isNothing"),(0,i.K)(e,"isObject"),(0,i.K)(r,"toArray"),(0,i.K)(o,"extend"),(0,i.K)(s,"repeat"),(0,i.K)(a,"isNegativeZero"),Z.isNothing=t,Z.isObject=e,Z.toArray=r,Z.repeat=s,Z.isNegativeZero=a,Z.extend=o,Z}function J(){if(a)return s;function t(t,e){let r="";const i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function e(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}return a=1,(0,i.K)(t,"formatError"),(0,i.K)(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=(0,i.K)(function(e){return this.name+": "+t(this,e)},"toString"),s=e}function tt(){if(h)return l;h=1;const t=Q();function e(t,e,r,i,o){let n="",s="";const a=Math.floor(o/2)-1;return i-e>a&&(n=" ... ",e=i-a+n.length),r-i>a&&(s=" ...",r=i+a-s.length),{str:n+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+n.length}}function r(e,r){return t.repeat(" ",r-e.length)+e}function o(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),"number"!=typeof o.indent&&(o.indent=1),"number"!=typeof o.linesBefore&&(o.linesBefore=3),"number"!=typeof o.linesAfter&&(o.linesAfter=2);const n=/\r?\n|\r|\0/g,s=[0],a=[];let l,h=-1;for(;l=n.exec(i.buffer);)a.push(l.index),s.push(l.index+l[0].length),i.position<=l.index&&h<0&&(h=s.length-2);h<0&&(h=s.length-1);let c="";const d=Math.min(i.line+o.linesAfter,a.length).toString().length,u=o.maxLength-(o.indent+d+3);for(let n=1;n<=o.linesBefore&&!(h-n<0);n++){const l=e(i.buffer,s[h-n],a[h-n],i.position-(s[h]-s[h-n]),u);c=t.repeat(" ",o.indent)+r((i.line-n+1).toString(),d)+" | "+l.str+"\n"+c}const p=e(i.buffer,s[h],a[h],i.position,u);c+=t.repeat(" ",o.indent)+r((i.line+1).toString(),d)+" | "+p.str+"\n",c+=t.repeat("-",o.indent+d+3+p.pos)+"^\n";for(let n=1;n<=o.linesAfter&&!(h+n>=a.length);n++){const l=e(i.buffer,s[h+n],a[h+n],i.position-(s[h]-s[h+n]),u);c+=t.repeat(" ",o.indent)+r((i.line+n+1).toString(),d)+" | "+l.str+"\n"}return c.replace(/\n$/,"")}return(0,i.K)(e,"getLine"),(0,i.K)(r,"padStart"),(0,i.K)(o,"makeSnippet"),l=o}function et(){if(d)return c;d=1;const t=J(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function o(t){const e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function n(i,n){if(n=n||{},Object.keys(n).forEach(function(r){if(-1===e.indexOf(r))throw new t('Unknown option "'+r+'" is met in definition of "'+i+'" YAML type.')}),this.options=n,this.tag=i,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(t){return t},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=o(n.styleAliases||null),-1===r.indexOf(this.kind))throw new t('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}return(0,i.K)(o,"compileStyleAliases"),(0,i.K)(n,"Type2"),c=n}function rt(){if(p)return u;p=1;const t=J(),e=et();function r(t,e){const r=[];return t[e].forEach(function(t){let e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function o(){const t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function e(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}(0,i.K)(e,"collectType");for(let t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(e);return t}function n(t){return this.extend(t)}return(0,i.K)(r,"compileList"),(0,i.K)(o,"compileMap"),(0,i.K)(n,"Schema2"),n.prototype.extend=(0,i.K)(function(i){let s=[],a=[];if(i instanceof e)a.push(i);else if(Array.isArray(i))a=a.concat(i);else{if(!i||!Array.isArray(i.implicit)&&!Array.isArray(i.explicit))throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.implicit&&(s=s.concat(i.implicit)),i.explicit&&(a=a.concat(i.explicit))}s.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&"scalar"!==r.loadKind)throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const l=Object.create(n.prototype);return l.implicit=(this.implicit||[]).concat(s),l.explicit=(this.explicit||[]).concat(a),l.compiledImplicit=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=o(l.compiledImplicit,l.compiledExplicit),l},"extend"),u=n}function it(){if(f)return g;f=1;const t=et();return g=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,i.K)(function(t){return null!==t?t:""},"construct")})}function ot(){if(m)return y;m=1;const t=et();return y=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,i.K)(function(t){return null!==t?t:[]},"construct")})}function nt(){if(C)return x;C=1;const t=et();return x=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,i.K)(function(t){return null!==t?t:{}},"construct")})}function st(){if(k)return b;k=1;const t=rt();return b=new t({explicit:[it(),ot(),nt()]})}function at(){if(S)return w;S=1;const t=et();function e(t){if(null===t)return!0;const e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function o(t){return null===t}return(0,i.K)(e,"resolveYamlNull"),(0,i.K)(r,"constructYamlNull"),(0,i.K)(o,"isNull"),w=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:r,predicate:o,represent:{canonical:(0,i.K)(function(){return"~"},"canonical"),lowercase:(0,i.K)(function(){return"null"},"lowercase"),uppercase:(0,i.K)(function(){return"NULL"},"uppercase"),camelcase:(0,i.K)(function(){return"Null"},"camelcase"),empty:(0,i.K)(function(){return""},"empty")},defaultStyle:"lowercase"})}function lt(){if(v)return T;v=1;const t=et();function e(t){if(null===t)return!1;const e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function o(t){return"[object Boolean]"===Object.prototype.toString.call(t)}return(0,i.K)(e,"resolveYamlBoolean"),(0,i.K)(r,"constructYamlBoolean"),(0,i.K)(o,"isBoolean"),T=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:r,predicate:o,represent:{lowercase:(0,i.K)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,i.K)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,i.K)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"})}function ht(){if(_)return B;_=1;const t=Q(),e=et();function r(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function o(t){return t>=48&&t<=55}function n(t){return t>=48&&t<=57}function s(t){if(null===t)return!1;const e=t.length;let i=0,s=!1;if(!e)return!1;let l=t[i];if("-"!==l&&"+"!==l||(l=t[++i]),"0"===l){if(i+1===e)return!0;if(l=t[++i],"b"===l){for(i++;i<e;i++){if(l=t[i],"0"!==l&&"1"!==l)return!1;s=!0}return s&&isFinite(a(t))}if("x"===l){for(i++;i<e;i++){if(!r(t.charCodeAt(i)))return!1;s=!0}return s&&isFinite(a(t))}if("o"===l){for(i++;i<e;i++){if(!o(t.charCodeAt(i)))return!1;s=!0}return s&&isFinite(a(t))}}for(;i<e;i++){if(!n(t.charCodeAt(i)))return!1;s=!0}return!!s&&isFinite(a(t))}function a(t){let e=t,r=1,i=e[0];if("-"!==i&&"+"!==i||("-"===i&&(r=-1),e=e.slice(1),i=e[0]),"0"===e)return 0;if("0"===i){if("b"===e[1])return r*parseInt(e.slice(2),2);if("x"===e[1])return r*parseInt(e.slice(2),16);if("o"===e[1])return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function l(t){return a(t)}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!t.isNegativeZero(e)}return(0,i.K)(r,"isHexCode"),(0,i.K)(o,"isOctCode"),(0,i.K)(n,"isDecCode"),(0,i.K)(s,"resolveYamlInteger"),(0,i.K)(a,"parseYamlInteger"),(0,i.K)(l,"constructYamlInteger"),(0,i.K)(h,"isInteger"),B=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:l,predicate:h,represent:{binary:(0,i.K)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K)(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"]}})}function ct(){if(L)return A;L=1;const t=Q(),e=et(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function n(t){return null!==t&&(!!r.test(t)&&(!!isFinite(parseFloat(t,10))||o.test(t)))}function s(t){let e=t.toLowerCase();const r="-"===e[0]?-1:1;return"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K)(n,"resolveYamlFloat"),(0,i.K)(s,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function l(e,r){if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(e))return"-0.0";const i=e.toString(10);return a.test(i)?i.replace("e",".e"):i}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||t.isNegativeZero(e))}return(0,i.K)(l,"representYamlFloat"),(0,i.K)(h,"isFloat"),A=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:n,construct:s,predicate:h,represent:l,defaultStyle:"lowercase"})}function dt(){return M?F:(M=1,F=st().extend({implicit:[at(),lt(),ht(),ct()]}))}function ut(){return $?E:($=1,E=dt())}function pt(){if(D)return O;D=1;const t=et(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 o(t){return null!==t&&(null!==e.exec(t)||null!==r.exec(t))}function n(t){let i=0,o=null,n=e.exec(t);if(null===n&&(n=r.exec(t)),null===n)throw new Error("Date resolve error");const s=+n[1],a=+n[2]-1,l=+n[3];if(!n[4])return new Date(Date.UTC(s,a,l));const h=+n[4],c=+n[5],d=+n[6];if(n[7]){for(i=n[7].slice(0,3);i.length<3;)i+="0";i=+i}if(n[9]){o=6e4*(60*+n[10]+ +(n[11]||0)),"-"===n[9]&&(o=-o)}const u=new Date(Date.UTC(s,a,l,h,c,d,i));return o&&u.setTime(u.getTime()-o),u}function s(t){return t.toISOString()}return(0,i.K)(o,"resolveYamlTimestamp"),(0,i.K)(n,"constructYamlTimestamp"),(0,i.K)(s,"representYamlTimestamp"),O=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:n,instanceOf:Date,represent:s})}function gt(){if(q)return I;q=1;const t=et();function e(t){return"<<"===t||null===t}return(0,i.K)(e,"resolveYamlMerge"),I=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e})}function ft(){if(K)return R;K=1;const t=et(),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function r(t){if(null===t)return!1;let r=0;const i=t.length,o=e;for(let e=0;e<i;e++){const i=o.indexOf(t.charAt(e));if(!(i>64)){if(i<0)return!1;r+=6}}return r%8==0}function o(t){const r=t.replace(/[\r\n=]/g,""),i=r.length,o=e;let n=0;const s=[];for(let t=0;t<i;t++)t%4==0&&t&&(s.push(n>>16&255),s.push(n>>8&255),s.push(255&n)),n=n<<6|o.indexOf(r.charAt(t));const a=i%4*6;return 0===a?(s.push(n>>16&255),s.push(n>>8&255),s.push(255&n)):18===a?(s.push(n>>10&255),s.push(n>>2&255)):12===a&&s.push(n>>4&255),new Uint8Array(s)}function n(t){let r="",i=0;const o=t.length,n=e;for(let e=0;e<o;e++)e%3==0&&e&&(r+=n[i>>18&63],r+=n[i>>12&63],r+=n[i>>6&63],r+=n[63&i]),i=(i<<8)+t[e];const s=o%3;return 0===s?(r+=n[i>>18&63],r+=n[i>>12&63],r+=n[i>>6&63],r+=n[63&i]):2===s?(r+=n[i>>10&63],r+=n[i>>4&63],r+=n[i<<2&63],r+=n[64]):1===s&&(r+=n[i>>2&63],r+=n[i<<4&63],r+=n[64],r+=n[64]),r}function s(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}return(0,i.K)(r,"resolveYamlBinary"),(0,i.K)(o,"constructYamlBinary"),(0,i.K)(n,"representYamlBinary"),(0,i.K)(s,"isBinary"),R=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:o,predicate:s,represent:n})}function yt(){if(N)return z;N=1;const t=et(),e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function o(t){if(null===t)return!0;const i=[],o=t;for(let t=0,n=o.length;t<n;t+=1){const n=o[t];let s,a=!1;if("[object Object]"!==r.call(n))return!1;for(s in n)if(e.call(n,s)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==i.indexOf(s))return!1;i.push(s)}return!0}function n(t){return null!==t?t:[]}return(0,i.K)(o,"resolveYamlOmap"),(0,i.K)(n,"constructYamlOmap"),z=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:n})}function mt(){if(W)return P;W=1;const t=et(),e=Object.prototype.toString;function r(t){if(null===t)return!0;const r=t,i=new Array(r.length);for(let t=0,o=r.length;t<o;t+=1){const o=r[t];if("[object Object]"!==e.call(o))return!1;const n=Object.keys(o);if(1!==n.length)return!1;i[t]=[n[0],o[n[0]]]}return!0}function o(t){if(null===t)return[];const e=t,r=new Array(e.length);for(let t=0,i=e.length;t<i;t+=1){const i=e[t],o=Object.keys(i);r[t]=[o[0],i[o[0]]]}return r}return(0,i.K)(r,"resolveYamlPairs"),(0,i.K)(o,"constructYamlPairs"),P=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:o})}function xt(){if(H)return j;H=1;const t=et(),e=Object.prototype.hasOwnProperty;function r(t){if(null===t)return!0;const r=t;for(const t in r)if(e.call(r,t)&&null!==r[t])return!1;return!0}function o(t){return null!==t?t:{}}return(0,i.K)(r,"resolveYamlSet"),(0,i.K)(o,"constructYamlSet"),j=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:o})}function Ct(){return Y?U:(Y=1,U=ut().extend({implicit:[pt(),gt()],explicit:[ft(),yt(),mt(),xt()]}))}function bt(){if(X)return V;X=1;const t=Q(),e=J(),r=tt(),o=Ct(),n=Object.prototype.hasOwnProperty,s=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=/[\x85\u2028\u2029]/,l=/[,\[\]{}]/,h=/^(?:!|!!|![0-9A-Za-z-]+!)$/,c=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function d(t){return Object.prototype.toString.call(t)}function u(t){return 10===t||13===t}function p(t){return 9===t||32===t}function g(t){return 9===t||32===t||10===t||13===t}function f(t){return 44===t||91===t||93===t||123===t||125===t}function y(t){if(t>=48&&t<=57)return t-48;const e=32|t;return e>=97&&e<=102?e-97+10:-1}function m(t){return 120===t?2:117===t?4:85===t?8:0}function x(t){return t>=48&&t<=57?t-48:-1}function C(t){switch(t){case 48:return"\0";case 97:return"";case 98:return"\b";case 116:case 9:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function b(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function k(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,i.K)(d,"_class"),(0,i.K)(u,"isEol"),(0,i.K)(p,"isWhiteSpace"),(0,i.K)(g,"isWsOrEol"),(0,i.K)(f,"isFlowIndicator"),(0,i.K)(y,"fromHexCode"),(0,i.K)(m,"escapedHexLen"),(0,i.K)(x,"fromDecimalCode"),(0,i.K)(C,"simpleEscapeSequence"),(0,i.K)(b,"charFromCodepoint"),(0,i.K)(k,"setProperty");const w=new Array(256),S=new Array(256);for(let t=0;t<256;t++)w[t]=C(t)?1:0,S[t]=C(t);function T(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||o,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:100,this.maxTotalMergeKeys="number"==typeof e.maxTotalMergeKeys?e.maxTotalMergeKeys:1e4,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.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function v(t,i){const o={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return o.snippet=r(o),new e(i,o)}function B(t,e){throw v(t,e)}function _(t,e){t.onWarning&&t.onWarning.call(null,v(t,e))}function A(t,e,r){const i=t.anchorMapTransactions;if(0!==i.length){const r=i[i.length-1];n.call(r,e)||(r[e]={existed:n.call(t.anchorMap,e),value:t.anchorMap[e]})}t.anchorMap[e]=r}function L(t){t.anchorMapTransactions.push(Object.create(null))}function F(t){const e=t.anchorMapTransactions.pop(),r=t.anchorMapTransactions;if(0===r.length)return;const i=r[r.length-1],o=Object.keys(e);for(let t=0,r=o.length;t<r;t+=1){const r=o[t];n.call(i,r)||(i[r]=e[r])}}function M(t){const e=t.anchorMapTransactions.pop(),r=Object.keys(e);for(let i=r.length-1;i>=0;i-=1){const o=e[r[i]];o.existed?t.anchorMap[r[i]]=o.value:delete t.anchorMap[r[i]]}}function E(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function $(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.tag=e.tag,t.anchor=e.anchor,t.kind=e.kind,t.result=e.result}(0,i.K)(T,"State"),(0,i.K)(v,"generateError"),(0,i.K)(B,"throwError"),(0,i.K)(_,"throwWarning"),(0,i.K)(A,"storeAnchor"),(0,i.K)(L,"beginAnchorTransaction"),(0,i.K)(F,"commitAnchorTransaction"),(0,i.K)(M,"rollbackAnchorTransaction"),(0,i.K)(E,"snapshotState"),(0,i.K)($,"restoreState");const O={YAML:(0,i.K)(function(t,e,r){null!==t.version&&B(t,"duplication of %YAML directive"),1!==r.length&&B(t,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);null===i&&B(t,"ill-formed argument of the YAML directive");const o=parseInt(i[1],10),n=parseInt(i[2],10);1!==o&&B(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&_(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K)(function(t,e,r){let i;2!==r.length&&B(t,"TAG directive accepts exactly two arguments");const o=r[0];i=r[1],h.test(o)||B(t,"ill-formed tag handle (first argument) of the TAG directive"),n.call(t.tagMap,o)&&B(t,'there is a previously declared suffix for "'+o+'" tag handle'),c.test(i)||B(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){B(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i},"handleTagDirective")};function D(t,e,r,i){if(e<r){const o=t.input.slice(e,r);if(i)for(let e=0,r=o.length;e<r;e+=1){const r=o.charCodeAt(e);9===r||r>=32&&r<=1114111||B(t,"expected valid JSON character")}else s.test(o)&&B(t,"the stream contains non-printable characters");t.result+=o}}function I(e,r,i,o){t.isObject(i)||B(e,"cannot merge mappings; the provided source object is unacceptable");const s=Object.keys(i);for(let t=0,a=s.length;t<a;t+=1){const a=s[t];-1!==e.maxTotalMergeKeys&&++e.totalMergeKeys>e.maxTotalMergeKeys&&B(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),n.call(r,a)||(k(r,a,i[a]),o[a]=!0)}}function q(t,e,r,i,o,s,a,l,h){if(Array.isArray(o))for(let e=0,r=(o=Array.prototype.slice.call(o)).length;e<r;e+=1)Array.isArray(o[e])&&B(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===d(o[e])&&(o[e]="[object Object]");if("object"==typeof o&&"[object Object]"===d(o)&&(o="[object Object]"),o=String(o),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(s))for(let i=0,o=s.length;i<o;i+=1)I(t,e,s[i],r);else I(t,e,s,r);else t.json||n.call(r,o)||!n.call(e,o)||(t.line=a||t.line,t.lineStart=l||t.lineStart,t.position=h||t.position,B(t,"duplicated mapping key")),k(e,o,s),delete r[o];return e}function R(t){const e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):B(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function K(t,e,r){let i=0,o=t.input.charCodeAt(t.position);for(;0!==o;){for(;p(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!u(o))break;for(R(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&_(t,"deficient indentation"),i}function z(t){let e=t.position,r=t.input.charCodeAt(e);return!(45!==r&&46!==r||r!==t.input.charCodeAt(e+1)||r!==t.input.charCodeAt(e+2)||(e+=3,r=t.input.charCodeAt(e),0!==r&&!g(r)))}function N(e,r){1===r?e.result+=" ":r>1&&(e.result+=t.repeat("\n",r-1))}function P(t,e,r){let i,o,n,s,a,l;const h=t.kind,c=t.result;let d=t.input.charCodeAt(t.position);if(g(d)||f(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if(63===d||45===d){const e=t.input.charCodeAt(t.position+1);if(g(e)||r&&f(e))return!1}for(t.kind="scalar",t.result="",i=o=t.position,n=!1;0!==d;){if(58===d){const e=t.input.charCodeAt(t.position+1);if(g(e)||r&&f(e))break}else if(35===d){if(g(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&z(t)||r&&f(d))break;if(u(d)){if(s=t.line,a=t.lineStart,l=t.lineIndent,K(t,!1,-1),t.lineIndent>=e){n=!0,d=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=a,t.lineIndent=l;break}}n&&(D(t,i,o,!1),N(t,t.line-s),i=o=t.position,n=!1),p(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return D(t,i,o,!1),!!t.result||(t.kind=h,t.result=c,!1)}function W(t,e){let r,i,o=t.input.charCodeAt(t.position);if(39!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(o=t.input.charCodeAt(t.position));)if(39===o){if(D(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),39!==o)return!0;r=t.position,t.position++,i=t.position}else u(o)?(D(t,r,i,!0),N(t,K(t,!1,e)),r=i=t.position):t.position===t.lineStart&&z(t)?B(t,"unexpected end of the document within a single quoted scalar"):(t.position++,p(o)||(i=t.position));B(t,"unexpected end of the stream within a single quoted scalar")}function j(t,e){let r,i,o,n=t.input.charCodeAt(t.position);if(34!==n)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));){if(34===n)return D(t,r,t.position,!0),t.position++,!0;if(92===n){if(D(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),u(n))K(t,!1,e);else if(n<256&&w[n])t.result+=S[n],t.position++;else if((o=m(n))>0){let e=o,r=0;for(;e>0;e--)n=t.input.charCodeAt(++t.position),(o=y(n))>=0?r=(r<<4)+o:B(t,"expected hexadecimal character");t.result+=b(r),t.position++}else B(t,"unknown escape sequence");r=i=t.position}else u(n)?(D(t,r,i,!0),N(t,K(t,!1,e)),r=i=t.position):t.position===t.lineStart&&z(t)?B(t,"unexpected end of the document within a double quoted scalar"):(t.position++,p(n)||(i=t.position))}B(t,"unexpected end of the stream within a double quoted scalar")}function H(t,e){let r,i,o,n=!0;const s=t.tag;let a;const l=t.anchor;let h,c,d,u;const p=Object.create(null);let f,y,m,x=t.input.charCodeAt(t.position);if(91===x)h=93,u=!1,a=[];else{if(123!==x)return!1;h=125,u=!0,a={}}for(null!==t.anchor&&A(t,t.anchor,a),x=t.input.charCodeAt(++t.position);0!==x;){if(K(t,!0,e),x=t.input.charCodeAt(t.position),x===h)return t.position++,t.tag=s,t.anchor=l,t.kind=u?"mapping":"sequence",t.result=a,!0;if(n?44===x&&B(t,"expected the node content, but found ','"):B(t,"missed comma between flow collection entries"),y=f=m=null,c=d=!1,63===x){g(t.input.charCodeAt(t.position+1))&&(c=d=!0,t.position++,K(t,!0,e))}r=t.line,i=t.lineStart,o=t.position,ot(t,e,1,!1,!0),y=t.tag,f=t.result,K(t,!0,e),x=t.input.charCodeAt(t.position),!d&&t.line!==r||58!==x||(c=!0,x=t.input.charCodeAt(++t.position),K(t,!0,e),ot(t,e,1,!1,!0),m=t.result),u?q(t,a,p,y,f,m,r,i,o):c?a.push(q(t,null,p,y,f,m,r,i,o)):a.push(f),K(t,!0,e),x=t.input.charCodeAt(t.position),44===x?(n=!0,x=t.input.charCodeAt(++t.position)):n=!1}B(t,"unexpected end of the stream within a flow collection")}function U(e,r){let i,o,n=1,s=!1,a=!1,l=r,h=0,c=!1,d=e.input.charCodeAt(e.position);if(124===d)i=!1;else{if(62!==d)return!1;i=!0}for(e.kind="scalar",e.result="";0!==d;)if(d=e.input.charCodeAt(++e.position),43===d||45===d)1===n?n=43===d?3:2:B(e,"repeat of a chomping mode identifier");else{if(!((o=x(d))>=0))break;0===o?B(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?B(e,"repeat of an indentation width identifier"):(l=r+o-1,a=!0)}if(p(d)){do{d=e.input.charCodeAt(++e.position)}while(p(d));if(35===d)do{d=e.input.charCodeAt(++e.position)}while(!u(d)&&0!==d)}for(;0!==d;){for(R(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&32===d;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),u(d)){h++;continue}if(a||0!==l||B(e,"missing indentation for block scalar"),e.lineIndent<l){3===n?e.result+=t.repeat("\n",s?1+h:h):1===n&&s&&(e.result+="\n");break}i?p(d)?(c=!0,e.result+=t.repeat("\n",s?1+h:h)):c?(c=!1,e.result+=t.repeat("\n",h+1)):0===h?s&&(e.result+=" "):e.result+=t.repeat("\n",h):e.result+=t.repeat("\n",s?1+h:h),s=!0,a=!0,h=0;const r=e.position;for(;!u(d)&&0!==d;)d=e.input.charCodeAt(++e.position);D(e,r,e.position,!1)}return!0}function Y(t,e){const r=t.tag,i=t.anchor,o=[];let n=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&A(t,t.anchor,o);let s=t.input.charCodeAt(t.position);for(;0!==s&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,B(t,"tab characters must not be used in indentation")),45===s);){if(!g(t.input.charCodeAt(t.position+1)))break;if(n=!0,t.position++,K(t,!0,-1)&&t.lineIndent<=e){o.push(null),s=t.input.charCodeAt(t.position);continue}const r=t.line;if(ot(t,e,3,!1,!0),o.push(t.result),K(t,!0,-1),s=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==s)B(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return!!n&&(t.tag=r,t.anchor=i,t.kind="sequence",t.result=o,!0)}function G(t,e,r){let i,o,n,s;const a=t.tag,l=t.anchor,h={},c=Object.create(null);let d=null,u=null,f=null,y=!1,m=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&A(t,t.anchor,h);let x=t.input.charCodeAt(t.position);for(;0!==x;){y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,B(t,"tab characters must not be used in indentation"));const C=t.input.charCodeAt(t.position+1),b=t.line;if(63!==x&&58!==x||!g(C)){if(o=t.line,n=t.lineStart,s=t.position,!ot(t,r,2,!1,!0))break;if(t.line===b){for(x=t.input.charCodeAt(t.position);p(x);)x=t.input.charCodeAt(++t.position);if(58===x)x=t.input.charCodeAt(++t.position),g(x)||B(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(q(t,h,c,d,u,null,o,n,s),d=u=f=null),m=!0,y=!1,i=!1,d=t.tag,u=t.result;else{if(!m)return t.tag=a,t.anchor=l,!0;B(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!m)return t.tag=a,t.anchor=l,!0;B(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===x?(y&&(q(t,h,c,d,u,null,o,n,s),d=u=f=null),m=!0,y=!0,i=!0):y?(y=!1,i=!0):B(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,x=C;if((t.line===b||t.lineIndent>e)&&(y&&(o=t.line,n=t.lineStart,s=t.position),ot(t,e,4,!0,i)&&(y?u=t.result:f=t.result),y||(q(t,h,c,d,u,f,o,n,s),d=u=f=null),K(t,!0,-1),x=t.input.charCodeAt(t.position)),(t.line===b||t.lineIndent>e)&&0!==x)B(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&q(t,h,c,d,u,null,o,n,s),m&&(t.tag=a,t.anchor=l,t.kind="mapping",t.result=h),m}function Z(t){let e,r,i=!1,o=!1,s=t.input.charCodeAt(t.position);if(33!==s)return!1;null!==t.tag&&B(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),60===s?(i=!0,s=t.input.charCodeAt(++t.position)):33===s?(o=!0,e="!!",s=t.input.charCodeAt(++t.position)):e="!";let a=t.position;if(i){do{s=t.input.charCodeAt(++t.position)}while(0!==s&&62!==s);t.position<t.length?(r=t.input.slice(a,t.position),s=t.input.charCodeAt(++t.position)):B(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!g(s);)33===s&&(o?B(t,"tag suffix cannot contain exclamation marks"):(e=t.input.slice(a-1,t.position+1),h.test(e)||B(t,"named tag handle cannot contain such characters"),o=!0,a=t.position+1)),s=t.input.charCodeAt(++t.position);r=t.input.slice(a,t.position),l.test(r)&&B(t,"tag suffix cannot contain flow indicator characters")}r&&!c.test(r)&&B(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(e){B(t,"tag name is malformed: "+r)}return i?t.tag=r:n.call(t.tagMap,e)?t.tag=t.tagMap[e]+r:"!"===e?t.tag="!"+r:"!!"===e?t.tag="tag:yaml.org,2002:"+r:B(t,'undeclared tag handle "'+e+'"'),!0}function et(t){let e=t.input.charCodeAt(t.position);if(38!==e)return!1;null!==t.anchor&&B(t,"duplication of an anchor property"),e=t.input.charCodeAt(++t.position);const r=t.position;for(;0!==e&&!g(e)&&!f(e);)e=t.input.charCodeAt(++t.position);return t.position===r&&B(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(r,t.position),!0}function rt(t){let e=t.input.charCodeAt(t.position);if(42!==e)return!1;e=t.input.charCodeAt(++t.position);const r=t.position;for(;0!==e&&!g(e)&&!f(e);)e=t.input.charCodeAt(++t.position);t.position===r&&B(t,"name of an alias node must contain at least one character");const i=t.input.slice(r,t.position);return n.call(t.anchorMap,i)||B(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],K(t,!0,-1),!0}function it(t,e,r,i){const o=E(t);return L(t),$(t,e),t.tag=null,t.anchor=null,t.kind=null,t.result=null,G(t,r,i)&&"mapping"===t.kind?(F(t),!0):(M(t),$(t,o),!1)}function ot(t,e,r,i,o){let s,a,l,h,c,d=1,u=!1,p=!1,g=null;t.depth>=t.maxDepth&&B(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;const f=s=a=4===r||3===r;if(i&&K(t,!0,-1)&&(u=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;;){const r=t.input.charCodeAt(t.position),i=E(t);if(u&&(33===r&&null!==t.tag||38===r&&null!==t.anchor))break;if(!Z(t)&&!et(t))break;null===g&&(g=i),K(t,!0,-1)?(u=!0,a=f,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):a=!1}if(a&&(a=u||o),1===d||4===r)if(h=1===r||2===r?e:e+1,c=t.position-t.lineStart,1===d)if(a&&(Y(t,c)||G(t,c,h))||H(t,h))p=!0;else{const e=t.input.charCodeAt(t.position);null!==g&&f&&!a&&124!==e&&62!==e&&it(t,g,g.position-g.lineStart,h)||s&&U(t,h)||W(t,h)||j(t,h)?p=!0:rt(t)?(p=!0,null===t.tag&&null===t.anchor||B(t,"alias node should not have any properties")):P(t,h,1===r)&&(p=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&A(t,t.anchor,t.result)}else 0===d&&(p=a&&Y(t,c));if(null===t.tag)null!==t.anchor&&A(t,t.anchor,t.result);else if("?"===t.tag){null!==t.result&&"scalar"!==t.kind&&B(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let e=0,r=t.implicitTypes.length;e<r;e+=1)if(l=t.implicitTypes[e],l.resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&A(t,t.anchor,t.result);break}}else if("!"!==t.tag){if(n.call(t.typeMap[t.kind||"fallback"],t.tag))l=t.typeMap[t.kind||"fallback"][t.tag];else{l=null;const e=t.typeMap.multi[t.kind||"fallback"];for(let r=0,i=e.length;r<i;r+=1)if(t.tag.slice(0,e[r].tag.length)===e[r].tag){l=e[r];break}}l||B(t,"unknown tag !<"+t.tag+">"),null!==t.result&&l.kind!==t.kind&&B(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result,t.tag)?(t.result=l.construct(t.result,t.tag),null!==t.anchor&&A(t,t.anchor,t.result)):B(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),t.depth-=1,null!==t.tag||null!==t.anchor||p}function nt(t){const e=t.position;let r,i=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(K(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){i=!0,r=t.input.charCodeAt(++t.position);let e=t.position;for(;0!==r&&!g(r);)r=t.input.charCodeAt(++t.position);const o=t.input.slice(e,t.position),s=[];for(o.length<1&&B(t,"directive name must not be less than one character in length");0!==r;){for(;p(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!u(r));break}if(u(r))break;for(e=t.position;0!==r&&!g(r);)r=t.input.charCodeAt(++t.position);s.push(t.input.slice(e,t.position))}0!==r&&R(t),n.call(O,o)?O[o](t,o,s):_(t,'unknown document directive "'+o+'"')}K(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,K(t,!0,-1)):i&&B(t,"directives end mark is expected"),ot(t,t.lineIndent-1,4,!1,!0),K(t,!0,-1),t.checkLineBreaks&&a.test(t.input.slice(e,t.position))&&_(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&z(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,K(t,!0,-1)):t.position<t.length-1&&B(t,"end of the stream or a document separator is expected")}function st(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)));const r=new T(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,B(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)nt(r);return r.documents}function at(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);const i=st(t,r);if("function"!=typeof e)return i;for(let t=0,r=i.length;t<r;t+=1)e(i[t])}function lt(t,r){const i=st(t,r);if(0!==i.length){if(1===i.length)return i[0];throw new e("expected a single document in the stream, but found more")}}return(0,i.K)(D,"captureSegment"),(0,i.K)(I,"mergeMappings"),(0,i.K)(q,"storeMappingPair"),(0,i.K)(R,"readLineBreak"),(0,i.K)(K,"skipSeparationSpace"),(0,i.K)(z,"testDocumentSeparator"),(0,i.K)(N,"writeFoldedLines"),(0,i.K)(P,"readPlainScalar"),(0,i.K)(W,"readSingleQuotedScalar"),(0,i.K)(j,"readDoubleQuotedScalar"),(0,i.K)(H,"readFlowCollection"),(0,i.K)(U,"readBlockScalar"),(0,i.K)(Y,"readBlockSequence"),(0,i.K)(G,"readBlockMapping"),(0,i.K)(Z,"readTagProperty"),(0,i.K)(et,"readAnchorProperty"),(0,i.K)(rt,"readAlias"),(0,i.K)(it,"tryReadBlockMappingFromProperty"),(0,i.K)(ot,"composeNode"),(0,i.K)(nt,"readDocument"),(0,i.K)(st,"loadDocuments"),(0,i.K)(at,"loadAll2"),(0,i.K)(lt,"load2"),V.loadAll=at,V.load=lt,V}(0,i.K)(Q,"requireCommon"),(0,i.K)(J,"requireException"),(0,i.K)(tt,"requireSnippet"),(0,i.K)(et,"requireType"),(0,i.K)(rt,"requireSchema"),(0,i.K)(it,"requireStr"),(0,i.K)(ot,"requireSeq"),(0,i.K)(nt,"requireMap"),(0,i.K)(st,"requireFailsafe"),(0,i.K)(at,"require_null"),(0,i.K)(lt,"requireBool"),(0,i.K)(ht,"requireInt"),(0,i.K)(ct,"requireFloat"),(0,i.K)(dt,"requireJson"),(0,i.K)(ut,"requireCore"),(0,i.K)(pt,"requireTimestamp"),(0,i.K)(gt,"requireMerge"),(0,i.K)(ft,"requireBinary"),(0,i.K)(yt,"requireOmap"),(0,i.K)(mt,"requirePairs"),(0,i.K)(xt,"requireSet"),(0,i.K)(Ct,"require_default"),(0,i.K)(bt,"requireLoader");var kt,wt,St={};function Tt(){if(kt)return St;kt=1;const t=Q(),e=J(),r=Ct(),o=Object.prototype.toString,n=Object.prototype.hasOwnProperty,s=65279,a={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"},l=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],h=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function c(t,e){if(null===e)return{};const r={},i=Object.keys(e);for(let o=0,s=i.length;o<s;o+=1){let s=i[o],a=String(e[s]);"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2));const l=t.compiledTypeMap.fallback[s];l&&n.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[s]=a}return r}function d(r){let i,o;const n=r.toString(16).toUpperCase();if(r<=255)i="x",o=2;else if(r<=65535)i="u",o=4;else{if(!(r<=4294967295))throw new e("code point within a string may not be greater than 0xFFFFFFFF");i="U",o=8}return"\\"+i+t.repeat("0",o-n.length)+n}(0,i.K)(c,"compileStyleMap"),(0,i.K)(d,"encodeHex");function u(e){this.schema=e.schema||r,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=c(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function p(e,r){const i=t.repeat(" ",r);let o=0,n="";const s=e.length;for(;o<s;){let t;const r=e.indexOf("\n",o);-1===r?(t=e.slice(o),o=s):(t=e.slice(o,r+1),o=r+1),t.length&&"\n"!==t&&(n+=i),n+=t}return n}function g(e,r){return"\n"+t.repeat(" ",e.indent*r)}function f(t,e){for(let r=0,i=t.implicitTypes.length;r<i;r+=1){if(t.implicitTypes[r].resolve(e))return!0}return!1}function y(t){return 32===t||9===t}function m(t){return t>=32&&t<=126||t>=161&&t<=55295&&8232!==t&&8233!==t||t>=57344&&t<=65533&&t!==s||t>=65536&&t<=1114111}function x(t){return m(t)&&t!==s&&13!==t&&10!==t}function C(t,e,r){const i=x(t),o=i&&!y(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||x(e)&&!y(e)&&35===t||58===e&&o}function b(t){return m(t)&&t!==s&&!y(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 k(t){return!y(t)&&58!==t}function w(t,e){const r=t.charCodeAt(e);let i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?1024*(r-55296)+i-56320+65536:r}function S(t){return/^\n* /.test(t)}(0,i.K)(u,"State"),(0,i.K)(p,"indentString"),(0,i.K)(g,"generateNextLine"),(0,i.K)(f,"testImplicitResolving"),(0,i.K)(y,"isWhitespace"),(0,i.K)(m,"isPrintable"),(0,i.K)(x,"isNsCharOrWhitespace"),(0,i.K)(C,"isPlainSafe"),(0,i.K)(b,"isPlainSafeFirst"),(0,i.K)(k,"isPlainSafeLast"),(0,i.K)(w,"codePointAt"),(0,i.K)(S,"needIndentIndicator");function T(t,e,r,i,o,n,s,a){let l,h=0,c=null,d=!1,u=!1;const p=-1!==i;let g=-1,f=b(w(t,0))&&k(w(t,t.length-1));if(e||s)for(l=0;l<t.length;h>=65536?l+=2:l++){if(h=w(t,l),!m(h))return 5;f=f&&C(h,c,a),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(h=w(t,l),10===h)d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!m(h))return 5;f=f&&C(h,c,a),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&S(t)?5:s?2===n?5:2:u?4:3:!f||s||o(t)?2===n?5:2:1}function v(t,r,o,n,s){t.dump=function(){if(0===r.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==l.indexOf(r)||h.test(r)))return 2===t.quotingType?'"'+r+'"':"'"+r+"'";const a=t.indent*Math.max(1,o),c=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),d=n||t.flowLevel>-1&&o>=t.flowLevel;function u(e){return f(t,e)}switch((0,i.K)(u,"testAmbiguity"),T(r,d,t.indent,c,u,t.quotingType,t.forceQuotes&&!n,s)){case 1:return r;case 2:return"'"+r.replace(/'/g,"''")+"'";case 3:return"|"+B(r,t.indent)+_(p(r,a));case 4:return">"+B(r,t.indent)+_(p(A(r,c),a));case 5:return'"'+F(r)+'"';default:throw new e("impossible error: invalid scalar style")}}()}function B(t,e){const r=S(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function _(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function A(t,e){const r=/(\n+)([^\n]*)/g;let i,o,n=function(){let i=t.indexOf("\n");return i=-1!==i?i:t.length,r.lastIndex=i,L(t.slice(0,i),e)}(),s="\n"===t[0]||" "===t[0];for(;o=r.exec(t);){const t=o[1],r=o[2];i=" "===r[0],n+=t+(s||i||""===r?"":"\n")+L(r,e),s=i}return n}function L(t,e){if(""===t||" "===t[0])return t;const r=/ [^ ]/g;let i,o,n=0,s=0,a=0,l="";for(;i=r.exec(t);)a=i.index,a-n>e&&(o=s>n?s:a,l+="\n"+t.slice(n,o),n=o+1),s=a;return l+="\n",t.length-n>e&&s>n?l+=t.slice(n,s)+"\n"+t.slice(s+1):l+=t.slice(n),l.slice(1)}function F(t){let e="",r=0;for(let i=0;i<t.length;r>=65536?i+=2:i++){r=w(t,i);const o=a[r];!o&&m(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=o||d(r)}return e}function M(t,e,r){let i="";const o=t.tag;for(let o=0,n=r.length;o<n;o+=1){let n=r[o];t.replacer&&(n=t.replacer.call(r,String(o),n)),(I(t,e,n,!1,!1)||void 0===n&&I(t,e,null,!1,!1))&&(""!==i&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump)}t.tag=o,t.dump="["+i+"]"}function E(t,e,r,i){let o="";const n=t.tag;for(let n=0,s=r.length;n<s;n+=1){let s=r[n];t.replacer&&(s=t.replacer.call(r,String(n),s)),(I(t,e+1,s,!0,!0,!1,!0)||void 0===s&&I(t,e+1,null,!0,!0,!1,!0))&&(i&&""===o||(o+=g(t,e)),t.dump&&10===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump)}t.tag=n,t.dump=o||"[]"}function $(t,e,r){let i="";const o=t.tag,n=Object.keys(r);for(let o=0,s=n.length;o<s;o+=1){let s="";""!==i&&(s+=", "),t.condenseFlow&&(s+='"');const a=n[o];let l=r[a];t.replacer&&(l=t.replacer.call(r,a,l)),I(t,e,a,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),I(t,e,l,!1,!1)&&(s+=t.dump,i+=s))}t.tag=o,t.dump="{"+i+"}"}function O(t,r,i,o){let n="";const s=t.tag,a=Object.keys(i);if(!0===t.sortKeys)a.sort();else if("function"==typeof t.sortKeys)a.sort(t.sortKeys);else if(t.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let e=0,s=a.length;e<s;e+=1){let s="";o&&""===n||(s+=g(t,r));const l=a[e];let h=i[l];if(t.replacer&&(h=t.replacer.call(i,l,h)),!I(t,r+1,l,!0,!0,!0))continue;const c=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024;c&&(t.dump&&10===t.dump.charCodeAt(0)?s+="?":s+="? "),s+=t.dump,c&&(s+=g(t,r)),I(t,r+1,h,!0,c)&&(t.dump&&10===t.dump.charCodeAt(0)?s+=":":s+=": ",s+=t.dump,n+=s)}t.tag=s,t.dump=n||"{}"}function D(t,r,i){const s=i?t.explicitTypes:t.implicitTypes;for(let a=0,l=s.length;a<l;a+=1){const l=s[a];if((l.instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof r&&r instanceof l.instanceOf)&&(!l.predicate||l.predicate(r))){if(i?l.multi&&l.representName?t.tag=l.representName(r):t.tag=l.tag:t.tag="?",l.represent){const i=t.styleMap[l.tag]||l.defaultStyle;let s;if("[object Function]"===o.call(l.represent))s=l.represent(r,i);else{if(!n.call(l.represent,i))throw new e("!<"+l.tag+'> tag resolver accepts not "'+i+'" style');s=l.represent[i](r,i)}t.dump=s}return!0}}return!1}function I(t,r,i,n,s,a,l){t.tag=null,t.dump=i,D(t,i,!1)||D(t,i,!0);const h=o.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>r);const d="[object Object]"===h||"[object Array]"===h;let u,p;if(d&&(u=t.duplicates.indexOf(i),p=-1!==u),(null!==t.tag&&"?"!==t.tag||p||2!==t.indent&&r>0)&&(s=!1),p&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(d&&p&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===h)n&&0!==Object.keys(t.dump).length?(O(t,r,t.dump,s),p&&(t.dump="&ref_"+u+t.dump)):($(t,r,t.dump),p&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===h)n&&0!==t.dump.length?(t.noArrayIndent&&!l&&r>0?E(t,r-1,t.dump,s):E(t,r,t.dump,s),p&&(t.dump="&ref_"+u+t.dump)):(M(t,r,t.dump),p&&(t.dump="&ref_"+u+" "+t.dump));else{if("[object String]"!==h){if("[object Undefined]"===h)return!1;if(t.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+h)}"?"!==t.tag&&v(t,t.dump,r,a,c)}if(null!==t.tag&&"?"!==t.tag){let e=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21");e="!"===t.tag[0]?"!"+e:"tag:yaml.org,2002:"===e.slice(0,18)?"!!"+e.slice(18):"!<"+e+">",t.dump=e+" "+t.dump}}return!0}function q(t,e){const r=[],i=[];R(t,r,i);const o=i.length;for(let t=0;t<o;t+=1)e.duplicates.push(r[i[t]]);e.usedDuplicates=new Array(o)}function R(t,e,r){if(null!==t&&"object"==typeof t){const i=e.indexOf(t);if(-1!==i)-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(let i=0,o=t.length;i<o;i+=1)R(t[i],e,r);else{const i=Object.keys(t);for(let o=0,n=i.length;o<n;o+=1)R(t[i[o]],e,r)}}}function K(t,e){const r=new u(e=e||{});r.noRefs||q(t,r);let i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),I(r,0,i,!0,!0)?r.dump+"\n":""}return(0,i.K)(T,"chooseScalarStyle"),(0,i.K)(v,"writeScalar"),(0,i.K)(B,"blockHeader"),(0,i.K)(_,"dropEndingNewline"),(0,i.K)(A,"foldString"),(0,i.K)(L,"foldLine"),(0,i.K)(F,"escapeString"),(0,i.K)(M,"writeFlowSequence"),(0,i.K)(E,"writeBlockSequence"),(0,i.K)($,"writeFlowMapping"),(0,i.K)(O,"writeBlockMapping"),(0,i.K)(D,"detectType"),(0,i.K)(I,"writeNode"),(0,i.K)(q,"getDuplicateReferences"),(0,i.K)(R,"inspectNode"),(0,i.K)(K,"dump2"),St.dump=K,St}function vt(){if(wt)return G;wt=1;const t=bt(),e=Tt();function r(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.")}}return(0,i.K)(r,"renamed"),G.Type=et(),G.Schema=rt(),G.FAILSAFE_SCHEMA=st(),G.JSON_SCHEMA=dt(),G.CORE_SCHEMA=ut(),G.DEFAULT_SCHEMA=Ct(),G.load=t.load,G.loadAll=t.loadAll,G.dump=e.dump,G.YAMLException=J(),G.types={binary:ft(),float:ct(),map:nt(),null:at(),pairs:mt(),set:xt(),timestamp:pt(),bool:lt(),int:ht(),merge:gt(),omap:yt(),seq:ot(),str:it()},G.safeLoad=r("safeLoad","load"),G.safeLoadAll=r("safeLoadAll","loadAll"),G.safeDump=r("safeDump","dump"),G}(0,i.K)(Tt,"requireDumper"),(0,i.K)(vt,"requireJsYaml");var Bt=o(vt()),{Type:_t,Schema:At,FAILSAFE_SCHEMA:Lt,JSON_SCHEMA:Ft,CORE_SCHEMA:Mt,DEFAULT_SCHEMA:Et,load:$t,loadAll:Ot,dump:Dt,YAMLException:It,types:qt,safeLoad:Rt,safeLoadAll:Kt,safeDump:zt}=Bt},27838(t,e,r){"use strict";r.d(e,{IU:()=>B,Jo:()=>z,T_:()=>M,UQ:()=>v,a6:()=>_,g0:()=>ut,hq:()=>g,jP:()=>L,lP:()=>T});var i=r(96865),o=r(48159),n=r(44505),s=r(69793),a=r(12505),l=r(86535),h=r(31293),c=r(86827),d=r(51444),u=r(61057),p=(0,c.K)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),g={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},f={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function y(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=m(t),e=m(e);const[r,i]=[t.x,t.y],[o,n]=[e.x,e.y],s=o-r,a=n-i;return{angle:Math.atan(a/s),deltaX:s,deltaY:a}}(0,c.K)(y,"calculateDeltaAndAngle");var m=(0,c.K)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),x=(0,c.K)(t=>({x:(0,c.K)(function(e,r,i){let o=0;const n=m(i[0]).x<m(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(g,t.arrowTypeStart)){const{angle:e,deltaX:r}=y(i[0],i[1]);o=g[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(g,t.arrowTypeEnd)){const{angle:e,deltaX:r}=y(i[i.length-1],i[i.length-2]);o=g[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const s=Math.abs(m(e).x-m(i[i.length-1]).x),a=Math.abs(m(e).y-m(i[i.length-1]).y),l=Math.abs(m(e).x-m(i[0]).x),h=Math.abs(m(e).y-m(i[0]).y),c=g[t.arrowTypeStart],d=g[t.arrowTypeEnd];if(s<d&&s>0&&a<d){let t=d+1-s;t*="right"===n?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="right"===n?-1:1,o+=t}return m(e).x+o},"x"),y:(0,c.K)(function(e,r,i){let o=0;const n=m(i[0]).y<m(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(g,t.arrowTypeStart)){const{angle:e,deltaY:r}=y(i[0],i[1]);o=g[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(g,t.arrowTypeEnd)){const{angle:e,deltaY:r}=y(i[i.length-1],i[i.length-2]);o=g[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const s=Math.abs(m(e).y-m(i[i.length-1]).y),a=Math.abs(m(e).x-m(i[i.length-1]).x),l=Math.abs(m(e).y-m(i[0]).y),h=Math.abs(m(e).x-m(i[0]).x),c=g[t.arrowTypeStart],d=g[t.arrowTypeEnd];if(s<d&&s>0&&a<d){let t=d+1-s;t*="up"===n?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="up"===n?-1:1,o+=t}return m(e).y+o},"y")}),"getLineFunctionsWithOffset");var C=(0,c.K)((t,e,r,i,o,n=!1,s)=>{e.arrowTypeStart&&w(t,"start",e.arrowTypeStart,r,i,o,n,s),e.arrowTypeEnd&&w(t,"end",e.arrowTypeEnd,r,i,o,n,s)},"addEdgeMarkers"),b={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{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}},k=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],w=(0,c.K)((t,e,r,i,o,n,s=!1,a)=>{if(!r||"none"===r)return;const l=b[r],c=l&&k.includes(l.type);if(!l)return void h.R.warn(`Unknown arrow type: ${r}`);const d=`${o}_${n}-${l.type}${"start"===e?"Start":"End"}${s&&c?"-margin":""}`;if(a&&""!==a.trim()){const r=`${d}_${a.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(d);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",a),l.fill&&t.setAttribute("fill",a)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${d})`)},"addEdgeMarker"),S=(0,c.K)(t=>"string"==typeof t?t:(0,l.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),T=new Map,v=new Map,B=(0,c.K)(()=>{T.clear(),v.clear()},"clear"),_=(0,c.K)(t=>Boolean(t.label||t.startLabelLeft||t.startLabelRight||t.endLabelLeft||t.endLabelRight),"hasEdgeLabel"),A=(0,c.K)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),L=(0,c.K)(async(t,e)=>{const r=(0,l.D7)();let i=(0,l.E)(r);const{labelStyles:a}=(0,n.GX)(e);e.labelStyle=a;const c=t.insert("g").attr("class","edgeLabel"),u=c.insert("g").attr("class","label").attr("data-id",e.id),g="markdown"===e.labelType,f=await(0,s.GZ)(t,e.label,{style:A(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:g,width:void 0},r);let y,m,x;if(u.node().appendChild(f),h.R.info("abc82",e,e.labelType),i){const t=f.children[0],e=(0,d.Ltv)(f);y=await s.lT.measure(()=>t.getBoundingClientRect()),m=y,e.attr("width",y.width),e.attr("height",y.height)}else{const t=(0,d.Ltv)(f).select("text").node();await s.lT.measure(()=>{y=f.getBBox(),m=t&&"function"==typeof t.getBBox?t.getBBox():y})}if(u.attr("transform",p(m,i)),T.set(e.id,c),e.width=y.width,e.height=y.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner"),s=await(0,o.DA)(n,e.startLabelLeft,A(e.labelStyle)||"",!1,!1);x=s;let a=s.getBBox();if(i){const t=s.children[0],e=(0,d.Ltv)(s);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}n.attr("transform",p(a,i)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).startLeft=r,F(x,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner"),s=await(0,o.DA)(n,e.startLabelRight,A(e.labelStyle)||"",!1,!1);x=s;let a=s.getBBox();if(i){const t=s.children[0],e=(0,d.Ltv)(s);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}n.attr("transform",p(a,i)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).startRight=r,F(x,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner"),s=await(0,o.DA)(r,e.endLabelLeft,A(e.labelStyle)||"",!1,!1);x=s;let a=s.getBBox();if(i){const t=s.children[0],e=(0,d.Ltv)(s);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}n.attr("transform",p(a,i)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).endLeft=r,F(x,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner"),s=await(0,o.DA)(r,e.endLabelRight,A(e.labelStyle)||"",!1,!1);x=s;let a=s.getBBox();if(i){const t=s.children[0],e=(0,d.Ltv)(s);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}n.attr("transform",p(a,i)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).endRight=r,F(x,e.endLabelRight)}return f},"insertEdgeLabel");function F(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K)(F,"setTerminalWidth");var M=(0,c.K)((t,e)=>{h.R.debug("Moving label abc88 ",t.id,t.label,T.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const o=(0,l.D7)(),{subGraphTitleTotalMargin:n}=(0,i.Oi)(o);if(t.label){const i=T.get(t.id);let o=t.x,s=t.y;if(r){const i=a._K.calcLabelPosition(r);h.R.debug("Moving label "+t.label+" from (",o,",",s,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(o=i.x,s=i.y)}i.attr("transform",`translate(${o}, ${s+n/2})`)}if(t.startLabelLeft){const e=v.get(t.id).startLeft;let i=t.x,o=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=v.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=v.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=v.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),E=(0,c.K)((t,e)=>{if(!t?.isLabelEdge||!t?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(2!==e.length)return e;const[r,i]=e,o=Math.abs(i.x-r.x),n=Math.abs(i.y-r.y);return o<.001||n<.001?e:n>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),$=(0,c.K)((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),n=Math.abs(e.y-i),s=t.width/2,a=t.height/2;return o>=s||n>=a},"outsideNode"),O=(0,c.K)((t,e,r)=>{h.R.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,n=Math.abs(i-r.x),s=t.width/2;let a=r.x<e.x?s-n:s+n;const l=t.height/2,c=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*s>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-o:o-l-e.y;a=d*t/c;const i={x:r.x<e.x?r.x+a:r.x-d+a,y:r.y<e.y?r.y+c-t:r.y-c+t};return 0===a&&(i.x=e.x,i.y=e.y),0===d&&(i.x=e.x),0===c&&(i.y=e.y),h.R.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${d}, r ${a}`,i),i}{a=r.x<e.x?e.x-s-i:i-s-e.x;let t=c*a/d,o=r.x<e.x?r.x+d-a:r.x-d+a,n=r.y<e.y?r.y+t:r.y-t;return h.R.debug(`sides calc abc89, Q ${c}, q ${t}, R ${d}, r ${a}`,{_x:o,_y:n}),0===a&&(o=e.x,n=e.y),0===d&&(o=e.x),0===c&&(n=e.y),{x:o,y:n}}},"intersection"),D=(0,c.K)((t,e)=>{h.R.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(h.R.info("abc88 checking point",t,e),$(e,t)||o)h.R.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const n=O(e,i,t);h.R.debug("abc88 inside",t,i,n),h.R.debug("abc88 intersection",n,e);let s=!1;r.forEach(t=>{s=s||t.x===n.x&&t.y===n.y}),r.some(t=>t.x===n.x&&t.y===n.y)?h.R.warn("abc88 no intersect",n,r):r.push(n),o=!0}}),h.R.debug("returning points",r),r},"cutPathAtIntersect");function I(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const o=t[i-1],n=t[i],s=t[i+1];(o.x===n.x&&n.y===s.y&&Math.abs(n.x-s.x)>5&&Math.abs(n.y-o.y)>5||o.y===n.y&&n.x===s.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-s.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K)(I,"extractCornerPoints");var q=(0,c.K)(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,n=r/Math.sqrt(i*i+o*o);return{x:e.x-n*i,y:e.y-n*o}},"findAdjacentPoint"),R=(0,c.K)(function(t){const{cornerPointPositions:e}=I(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],o=t[i+1],n=t[i],s=q(e,n,5),a=q(o,n,5),l=a.x-s.x,c=a.y-s.y;r.push(s);const d=2*Math.sqrt(2);let u={x:n.x,y:n.y};if(Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10){h.R.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;u=n.x===s.x?{x:l<0?s.x-t+d:s.x+t-d,y:c<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:c<0?s.y-t+d:s.y+t-d}}else h.R.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(u,a)}else r.push(t[i]);return r},"fixCorners"),K=(0,c.K)((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4),n=Number.isFinite(o)?Math.max(0,o):0;return`0 ${e} ${Array(n).fill("2 2").join(" ")} ${r}`},"generateDashArray"),z=(0,c.K)(function(t,e,r,i,o,s,c,p=!1){if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:g,layout:y}=(0,l.D7)();let m=e.points,b=!1;const k=o;var w=s;const T=[];for(const t in e.cssCompiledStyles)(0,n.KX)(t)||T.push(e.cssCompiledStyles[t]);if("swimlane"===y){if(w.intersect&&k.intersect&&Array.isArray(m)&&m.length>=2)if(2===m.length)m=[k.intersect(m[0]),w.intersect(m[1])];else{const t=m.slice(1,-1),e=t[0],r=t[t.length-1],i=.5,o=Math.abs(m[m.length-1].x-r.x)<i&&Math.abs(m[m.length-1].y-r.y)<i,n=k.intersect(e),s=o?r:w.intersect(r),a=Math.abs(s.x-r.x)<i&&Math.abs(s.y-r.y)<i?[]:[s];m=[...Math.abs(n.x-e.x)<i&&Math.abs(n.y-e.y)<i?[]:[n],...t,...a]}m=E(e,m)}else w.intersect&&k.intersect&&!p&&(m=m.slice(1,e.points.length-1),m.unshift(k.intersect(m[0])),m.push(w.intersect(m[m.length-1])));const v=btoa(JSON.stringify(m));e.toCluster&&(h.R.info("to cluster abc88",r.get(e.toCluster)),m=D(e.points,r.get(e.toCluster).node),b=!0),e.fromCluster&&(h.R.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(m,null,2)),m=D(m.reverse(),r.get(e.fromCluster).node).reverse(),b=!0);let B=m.filter(t=>!Number.isNaN(t.y));const _=S(e.curve);"rounded"!==_&&(B=R(B));let A=d.lUB;switch(_){case"linear":case"rounded":A=d.lUB;break;case"basis":default:A=d.qrM;break;case"cardinal":A=d.y8u;break;case"bumpX":A=d.Wi0;break;case"bumpY":A=d.PGM;break;case"catmullRom":A=d.oDi;break;case"monotoneX":A=d.nVG;break;case"monotoneY":A=d.uxU;break;case"natural":A=d.Xf2;break;case"step":A=d.GZz;break;case"stepAfter":A=d.UPb;break;case"stepBefore":A=d.dyv}const{x:L,y:F}=x(e),M=(0,d.n8j)().x(L).y(F).curve(A);let $,O;switch(e.thickness){case"normal":default:$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible"}switch(e.pattern){case"solid":default:$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed"}let I="rounded"===_?N(W(B,e),5):M(B);const q=Array.isArray(e.style)?e.style:[e.style];let z=q.find(t=>t?.startsWith("stroke:")),P="";e.animate&&(P="edge-animation-fast"),e.animation&&(P="edge-animation-"+e.animation);let j=!1;if("handDrawn"===e.look){const r=u.A.svg(t);Object.assign([],B);const i=r.path(I,{roughness:.3,seed:g});$+=" transition",O=(0,d.Ltv)(i).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(P?" "+P:"")).attr("style",q?q.reduce((t,e)=>t+";"+e,""):"");let o=O.attr("d");O.attr("d",o),t.node().appendChild(O.node())}else{const r=T.join(";"),i=q?q.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(q?q.reduce((t,e)=>t+";"+e,""):"");O=t.append("path").attr("d",I).attr("id",`${c}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(P?" "+P:"")).attr("style",o),z=o.match(/stroke:([^;]+)/)?.[1],j=!0===e.animate||!!e.animation||r.includes("animation");const n=O.node(),s="function"==typeof n.getTotalLength?n.getTotalLength():0,a=f[e.arrowTypeStart]||0,l=f[e.arrowTypeEnd]||0;if("neo"===e.look&&!j){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?K(s,a,l):`0 ${a} ${s-a-l} ${l}`}; 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",v),O.attr("data-look",(0,a.KL)(e.look)),e.showPoints&&B.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let H="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(H=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,H=H.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.R.info("arrowTypeStart",e.arrowTypeStart),h.R.info("arrowTypeEnd",e.arrowTypeEnd);C(O,e,H,c,i,!j&&"neo"===e?.look,z);const U=m[Math.floor(m.length/2)];a._K.isLabelCoordinateInPath(U,O.attr("d"))||(b=!0);let Y={};return b&&(Y.updatedPath=m),Y.originalPath=e.points,Y},"insertEdge");function N(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let n=0;n<i;n++){const s=t[n],a=t[n-1],l=t[n+1];if(0===n)r+=`M${s.x},${s.y}`;else if(n===i-1)r+=`L${s.x},${s.y}`;else{const t=s.x-a.x,i=s.y-a.y,n=l.x-s.x,h=l.y-s.y,c=Math.hypot(t,i),d=Math.hypot(n,h);if(c<o||d<o){r+=`L${s.x},${s.y}`;continue}const u=t/c,p=i/c,g=n/d,f=h/d,y=u*g+p*f,m=Math.max(-1,Math.min(1,y)),x=Math.acos(m);if(x<o||Math.abs(Math.PI-x)<o){r+=`L${s.x},${s.y}`;continue}const C=Math.min(e/Math.sin(x/2),c/2,d/2),b=s.x-u*C,k=s.y-p*C,w=s.x+g*C,S=s.y+f*C;r+=`L${b},${k}`,r+=`Q${s.x},${s.y} ${w},${S}`}}return r}function P(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function W(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&g[e.arrowTypeStart]){const i=g[e.arrowTypeStart],o=t[0],n=t[1],{angle:s}=P(o,n),a=i*Math.cos(s),l=i*Math.sin(s);r[0].x=o.x+a,r[0].y=o.y+l}const i=t.length;if(i>=2&&g[e.arrowTypeEnd]){const o=g[e.arrowTypeEnd],n=t[i-1],s=t[i-2],{angle:a}=P(s,n),l=o*Math.cos(a),h=o*Math.sin(a);r[i-1].x=n.x-l,r[i-1].y=n.y-h}return r}(0,c.K)(N,"generateRoundedPath"),(0,c.K)(P,"calculateDeltaAndAngle"),(0,c.K)(W,"applyMarkerOffsetsToPoints");var j=(0,c.K)((t,e,r,i)=>{e.forEach(e=>{dt[e](t,r,i)})},"insertMarkers"),H=(0,c.K)((t,e,r)=>{h.R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),U=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Y=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),X=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),G=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),V=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Z=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Q=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),J=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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"),tt=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{transitionColor:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${n}`)},"barbNeo"),et=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),rt=(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),it=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),ot=(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),nt=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${n}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${n}`)},"only_one_neo"),st=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n,mainBkg:s}=o,a=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");a.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),a.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);const h=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),at=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${n}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${n}`)},"one_or_more_neo"),lt=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n,mainBkg:s}=o,a=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");a.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);const h=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),ht=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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"),ct=(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${n}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),dt={extension:H,composition:U,aggregation:Y,dependency:X,lollipop:G,point:V,circle:Z,cross:Q,barb:J,barbNeo:tt,only_one:et,zero_or_one:rt,one_or_more:it,zero_or_more:ot,only_one_neo:nt,zero_or_one_neo:st,one_or_more_neo:at,zero_or_more_neo:lt,requirement_arrow:ht,requirement_contains:(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_arrow_neo:ct,requirement_contains_neo:(0,c.K)((t,e,r)=>{const i=(0,l.zj)(),{themeVariables:o}=i,{strokeWidth:n}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo")},ut=j},44505(t,e,r){"use strict";r.d(e,{Fr:()=>d,GX:()=>c,KX:()=>h,WW:()=>a,ue:()=>n});var i=r(86535),o=r(86827),n=(0,o.K)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),s=(0,o.K)(t=>Array.isArray(t)?t:t?t.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),a=(0,o.K)(t=>{const e=l([...t.cssCompiledStyles||[],...t.cssStyles||[],...s(t.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),l=(0,o.K)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),h=(0,o.K)(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,o.K)(t=>{const{stylesArray:e}=a(t),r=[],i=[],o=[],n=[];return e.forEach(t=>{const e=t[0];h(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&n.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:n}},"styles2String"),d=(0,o.K)((t,e)=>{const{themeVariables:r,handDrawnSeed:o}=(0,i.D7)(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:l}=a(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||n,seed:o,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,o.K)(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")},43287(t,e,r){"use strict";r.d(e,{WY:()=>A,dn:()=>_,pC:()=>v,Gc:()=>w});var i=r(86535),o=r(31293),n=r(86827);const s=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),a=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...a,...l}),c=Object.freeze({...h,body:"",hidden:!1});function d(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function u(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let n={};function s(t){n=d(i[t]||o[t],n)}return s(e),r.forEach(s),d(t,n)}function p(t,e){if(t.icons[e])return u(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,n=r&&t(r);n&&(o[e]=[r].concat(n))}return o[e]}),o}(t,[e])[e];return r?u(t,e,r):null}const g=Object.freeze({width:null,height:null}),f=Object.freeze({...g,...l}),y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function x(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(y);if(null===i||!i.length)return t;const o=[];let n=i.shift(),s=m.test(n);for(;;){if(s){const t=parseFloat(n);isNaN(t)?o.push(n):o.push(Math.ceil(t*e*r)/r)}else o.push(n);if(n=i.shift(),void 0===n)return o.join("");s=!s}}const C=/\sid="(\S+)"/g,b=new Map;function k(t){const e=[];let r;for(;r=C.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=b.get(t)||0;return b.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}var w={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},S=new Map,T=new Map,v=(0,n.K)(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(o.R.debug("Registering icon pack:",e.name),"loader"in e)T.set(e.name,e.loader);else{if(!("icons"in e))throw o.R.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');S.set(e.name,e.icons)}}},"registerIconPacks"),B=(0,n.K)(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),r=o.pop(),n={provider:o.length>0?o[0]:i,prefix:r,name:t};return e&&!s(n)?null:n}const n=o[0],a=n.split("-");if(a.length>1){const t={provider:i,prefix:a.shift(),name:a.join("-")};return e&&!s(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:n};return e&&!s(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let n=S.get(i);if(!n){const t=T.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await t(),prefix:i},S.set(i,n)}catch(t){throw o.R.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=p(n,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),_=(0,n.K)(async t=>{try{return await B(t),!0}catch{return!1}},"isIconAvailable"),A=(0,n.K)(async(t,e,r)=>{let n;try{n=await B(t,e?.fallbackPrefix)}catch(t){o.R.error(t),n=w}const s=function(t,e){const r={...h,...t},i={...f,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let s,a=t.rotate;switch(r?i?a+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4,a){case 1:s=o.height/2+o.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:s=o.width/2+o.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}a%2==1&&(o.left!==o.top&&(s=o.left,o.left=o.top,o.top=s),o.width!==o.height&&(s=o.width,o.width=o.height,o.height=s)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),n=t.indexOf("</"+e);if(-1===o||-1===n)break;const s=t.indexOf(">",n);if(-1===s)break;r+=t.slice(o+1,n).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}(t);return o=i.defs,n=e+i.content+r,o?"<defs>"+o+"</defs>"+n:n;var o,n}(n,'<g transform="'+e.join(" ")+'">',"</g>"))});const s=i.width,a=i.height,l=o.width,c=o.height;let d,u;null===s?(u=null===a?"1em":"auto"===a?c:a,d=x(u,l/c)):(d="auto"===s?l:s,u=null===a?x(d,c/l):"auto"===a?c:a);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",d),g("height",u);const y=[o.left,o.top,l,c];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:n}}(n,e),a=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(k(s.body),{...s.attributes,...r});return(0,i.jZ)(a,(0,i.zj)())},"getIconSVG")},10561(t,e,r){"use strict";r.d(e,{XX:()=>g,q7:()=>f,sO:()=>p});var i=r(24980),o=r(27838),n=r(96865),s=r(48159),a=r(12505),l=r(86535),h=r(31293),c=r(86827),d={common:l.Y2,getConfig:l.zj,insertCluster:i.U,insertEdge:o.Jo,insertEdgeLabel:o.jP,insertMarkers:o.g0,insertNode:n.on,interpolateToCurve:a.Ib,labelHelper:s.Zk,log:h.R,positionEdgeLabel:o.T_},u={},p=(0,c.K)(t=>{for(const e of t)u[e.name]=e},"registerLayoutLoaders");(0,c.K)(()=>{p([{name:"dagre",loader:(0,c.K)(async()=>await Promise.all([r.e(4193),r.e(7310)]).then(()=>r(77310)),"loader")},{name:"swimlane",loader:(0,c.K)(async()=>await r.e(7430).then(()=>r(77430)),"loader")},{name:"cose-bilkent",loader:(0,c.K)(async()=>await Promise.all([r.e(165),r.e(2180)]).then(()=>r(2180)),"loader")}])},"registerDefaultLayoutLoaders")();var g=(0,c.K)(async(t,e)=>{if(!(t.layoutAlgorithm in u))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const e of t.nodes){const r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}const r=u[t.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:n}=t.config,{useGradient:s,gradientStart:a,gradientStop:l}=n,h=e.attr("id");if(e.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),e.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),s){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(t,e,d,{algorithm:r.algorithm})},"render"),f=(0,c.K)((t="",{fallback:e="dagre"}={})=>{if(t in u)return t;if(e in u)return h.R.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")},31293(t,e,r){"use strict";r.d(e,{H:()=>a,R:()=>s});var i=r(86827),o=r(74353),n={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},s={trace:(0,i.K)((...t)=>{},"trace"),debug:(0,i.K)((...t)=>{},"debug"),info:(0,i.K)((...t)=>{},"info"),warn:(0,i.K)((...t)=>{},"warn"),error:(0,i.K)((...t)=>{},"error"),fatal:(0,i.K)((...t)=>{},"fatal")},a=(0,i.K)(function(t="fatal"){let e=n.fatal;"string"==typeof t?t.toLowerCase()in n&&(e=n[t]):"number"==typeof t&&(e=t),s.trace=()=>{},s.debug=()=>{},s.info=()=>{},s.warn=()=>{},s.error=()=>{},s.fatal=()=>{},e<=n.fatal&&(s.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"",l("FATAL"))),e<=n.error&&(s.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"",l("ERROR"))),e<=n.warn&&(s.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"",l("WARN"))),e<=n.info&&(s.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"",l("INFO"))),e<=n.debug&&(s.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"",l("DEBUG"))),e<=n.trace&&(s.trace=console.debug?console.debug.bind(console,l("TRACE"),"color: lightgreen"):console.log.bind(console,"",l("TRACE")))},"setLogLevel"),l=(0,i.K)(t=>`%c${o().format("ss.SSS")} : ${t} : `,"format")},86827(t,e,r){"use strict";r.d(e,{K:()=>o,V:()=>n});var i=Object.defineProperty,o=(t,e)=>i(t,"name",{value:e,configurable:!0}),n=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})}},84146(t,e,r){"use strict";function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(o.length){var n=new RegExp("\n[\t ]{".concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(t){return t.replace(n,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return e.forEach(function(t,e){var r=s.match(/(?:^|\n)( *)$/),o=r?r[1]:"",n=t;"string"==typeof t&&t.includes("\n")&&(n=String(t).split("\n").map(function(t,e){return 0===e?t:"".concat(o).concat(t)}).join("\n")),s+=n+i[e+1]}),s}r.d(e,{T:()=>i})}}]);