@power-maverick/tool-erd-generator 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_basePickBy.js +1 -0
- package/dist/_baseUniq.js +1 -0
- package/dist/arc.js +1 -1
- package/dist/architectureDiagram-VXUJARFQ.js +36 -0
- package/dist/blockDiagram-VD42YOAC.js +122 -0
- package/dist/c4Diagram-YG6GDRKO.js +10 -0
- package/dist/channel.js +1 -1
- package/dist/chunk-4BX2VUAB.js +1 -0
- package/dist/chunk-55IACEB6.js +1 -0
- package/dist/chunk-B4BG7PRW.js +165 -0
- package/dist/chunk-DI55MBZ5.js +220 -0
- package/dist/chunk-FMBD7UC4.js +15 -0
- package/dist/chunk-QN33PNHL.js +1 -0
- package/dist/chunk-QZHKN3VN.js +1 -0
- package/dist/chunk-TZMSLE5B.js +1 -0
- package/dist/classDiagram-2ON5EDUG.js +1 -0
- package/dist/classDiagram-v2-WZHVMYZB.js +1 -0
- package/dist/clone.js +1 -1
- package/dist/cose-bilkent-S5V4N54A.js +1 -0
- package/dist/cytoscape.esm.js +331 -0
- package/dist/dagre-6UL2VRFP.js +4 -0
- package/dist/defaultLocale.js +1 -0
- package/dist/diagram-PSM6KHXK.js +24 -0
- package/dist/diagram-QEK2KX5R.js +43 -0
- package/dist/diagram-S2PKOQOG.js +24 -0
- package/dist/erDiagram-Q2GNP2WA.js +60 -0
- package/dist/flowDiagram-NV44I4VS.js +162 -0
- package/dist/ganttDiagram-LVOFAZNH.js +267 -0
- package/dist/gitGraphDiagram-NY62KEGX.js +65 -0
- package/dist/graph.js +1 -1
- package/dist/index.js +1 -1
- package/dist/infoDiagram-ER5ION4S.js +2 -0
- package/dist/journeyDiagram-XKPGCS4Q.js +139 -0
- package/dist/kanban-definition-3W4ZIXB7.js +89 -0
- package/dist/layout.js +1 -1
- package/dist/linear.js +1 -1
- package/dist/mermaid.core.js +222 -57
- package/dist/mindmap-definition-VGOIOE7T.js +68 -0
- package/dist/pieDiagram-ADFJNKIX.js +30 -0
- package/dist/quadrantDiagram-AYHSOK5B.js +7 -0
- package/dist/requirementDiagram-UZGBJVZJ.js +64 -0
- package/dist/sankeyDiagram-TZEHDZUN.js +10 -0
- package/dist/sequenceDiagram-WL72ISMW.js +145 -0
- package/dist/stateDiagram-FKZM4ZOC.js +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3.js +1 -0
- package/dist/timeline-definition-IT6M3QCI.js +61 -0
- package/dist/treemap-KMMF4GRG.js +128 -0
- package/dist/xychartDiagram-PRI3JC2R.js +7 -0
- package/npm-shrinkwrap.json +672 -652
- package/package.json +2 -2
- package/dist/Tableau10.js +0 -1
- package/dist/array.js +0 -1
- package/dist/blockDiagram-68f4deed.js +0 -118
- package/dist/c4Diagram-15b5d702.js +0 -10
- package/dist/classDiagram-d40c83e7.js +0 -2
- package/dist/classDiagram-v2-d5a6b087.js +0 -2
- package/dist/createText-d213de94.js +0 -7
- package/dist/edges-332bd1c7.js +0 -4
- package/dist/erDiagram-880f2ed8.js +0 -51
- package/dist/flowDb-7c981674.js +0 -10
- package/dist/flowDiagram-cbd28bf7.js +0 -4
- package/dist/flowDiagram-v2-ffc7f31a.js +0 -1
- package/dist/flowchart-elk-definition-36e2d292.js +0 -139
- package/dist/ganttDiagram-04f9e578.js +0 -257
- package/dist/gitGraphDiagram-21fc4d3e.js +0 -70
- package/dist/index-6079d271.js +0 -1
- package/dist/infoDiagram-4a4f5b27.js +0 -7
- package/dist/journeyDiagram-29694f62.js +0 -139
- package/dist/line.js +0 -1
- package/dist/mindmap-definition-ac74a2e8.js +0 -425
- package/dist/path.js +0 -1
- package/dist/pieDiagram-421022e6.js +0 -35
- package/dist/quadrantDiagram-0957ecba.js +0 -7
- package/dist/requirementDiagram-23d650b8.js +0 -52
- package/dist/sankeyDiagram-23345273.js +0 -8
- package/dist/sequenceDiagram-17ac3bff.js +0 -122
- package/dist/stateDiagram-9c5f0230.js +0 -1
- package/dist/stateDiagram-v2-51a3dcff.js +0 -1
- package/dist/styles-2ab5d517.js +0 -116
- package/dist/styles-5f03d8d2.js +0 -160
- package/dist/styles-edf9a4b0.js +0 -207
- package/dist/svgDrawCommon-3ba9043b.js +0 -1
- package/dist/timeline-definition-7e6b55e7.js +0 -61
- package/dist/xychartDiagram-b6496bcd.js +0 -7
package/dist/mermaid.core.js
CHANGED
|
@@ -1,34 +1,45 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["
|
|
2
|
-
import{_ as K}from"./index.js";var wb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ch(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xh(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var r=Array.from(typeof t=="string"?[t]:t);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var n=r.reduce(function(a,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?a.concat(h.map(function(u){var f,c;return(c=(f=u.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&c!==void 0?c:0})):a},[]);if(n.length){var o=new RegExp(`
|
|
3
|
-
[
|
|
4
|
-
`)})}r[0]=r[0].replace(/^\r?\n/,"");var s=r[0];return e.forEach(function(a,l){var h=s.match(/(?:^|\n)( *)$/),u=h?h[1]:"",f=a;typeof a=="string"&&a.includes(`
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`)),s+=f+r[l+1]}),s}var Pi={exports:{}},bh=Pi.exports,Lo;function Th(){return Lo||(Lo=1,(function(t,e){(function(i,r){t.exports=r()})(bh,(function(){var i=1e3,r=6e4,n=36e5,o="millisecond",s="second",a="minute",l="hour",h="day",u="week",f="month",c="quarter",p="year",_="date",b="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={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(M){var T=["th","st","nd","rd"],y=M%100;return"["+M+(T[(y-20)%10]||T[y]||T[0])+"]"}},U=function(M,T,y){var w=String(M);return!w||w.length>=T?M:""+Array(T+1-w.length).join(y)+M},N={s:U,z:function(M){var T=-M.utcOffset(),y=Math.abs(T),w=Math.floor(y/60),x=y%60;return(T<=0?"+":"-")+U(w,2,"0")+":"+U(x,2,"0")},m:function M(T,y){if(T.date()<y.date())return-M(y,T);var w=12*(y.year()-T.year())+(y.month()-T.month()),x=T.clone().add(w,f),F=y-x<0,D=T.clone().add(w+(F?-1:1),f);return+(-(w+(y-x)/(F?x-D:D-x))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:f,y:p,w:u,d:h,D:_,h:l,m:a,s,ms:o,Q:c}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},j="en",G={};G[j]=v;var q="$isDayjsObject",Jt=function(M){return M instanceof St||!(!M||!M[q])},Qt=function M(T,y,w){var x;if(!T)return j;if(typeof T=="string"){var F=T.toLowerCase();G[F]&&(x=F),y&&(G[F]=y,x=F);var D=T.split("-");if(!x&&D.length>1)return M(D[0])}else{var $=T.name;G[$]=T,x=$}return!w&&x&&(j=x),x||!w&&j},Z=function(M,T){if(Jt(M))return M.clone();var y=typeof T=="object"?T:{};return y.date=M,y.args=arguments,new St(y)},R=N;R.l=Qt,R.i=Jt,R.w=function(M,T){return Z(M,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var St=(function(){function M(y){this.$L=Qt(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[q]=!0}var T=M.prototype;return T.parse=function(y){this.$d=(function(w){var x=w.date,F=w.utc;if(x===null)return new Date(NaN);if(R.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var D=x.match(k);if(D){var $=D[2]-1||0,X=(D[7]||"0").substring(0,3);return F?new Date(Date.UTC(D[1],$,D[3]||1,D[4]||0,D[5]||0,D[6]||0,X)):new Date(D[1],$,D[3]||1,D[4]||0,D[5]||0,D[6]||0,X)}}return new Date(x)})(y),this.init()},T.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},T.$utils=function(){return R},T.isValid=function(){return this.$d.toString()!==b},T.isSame=function(y,w){var x=Z(y);return this.startOf(w)<=x&&x<=this.endOf(w)},T.isAfter=function(y,w){return Z(y)<this.startOf(w)},T.isBefore=function(y,w){return this.endOf(w)<Z(y)},T.$g=function(y,w,x){return R.u(y)?this[w]:this.set(x,y)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(y,w){var x=this,F=!!R.u(w)||w,D=R.p(y),$=function(Bt,it){var At=R.w(x.$u?Date.UTC(x.$y,it,Bt):new Date(x.$y,it,Bt),x);return F?At:At.endOf(h)},X=function(Bt,it){return R.w(x.toDate()[Bt].apply(x.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(it)),x)},z=this.$W,tt=this.$M,H=this.$D,Ct="set"+(this.$u?"UTC":"");switch(D){case p:return F?$(1,0):$(31,11);case f:return F?$(1,tt):$(0,tt+1);case u:var wt=this.$locale().weekStart||0,ee=(z<wt?z+7:z)-wt;return $(F?H-ee:H+(6-ee),tt);case h:case _:return X(Ct+"Hours",0);case l:return X(Ct+"Minutes",1);case a:return X(Ct+"Seconds",2);case s:return X(Ct+"Milliseconds",3);default:return this.clone()}},T.endOf=function(y){return this.startOf(y,!1)},T.$set=function(y,w){var x,F=R.p(y),D="set"+(this.$u?"UTC":""),$=(x={},x[h]=D+"Date",x[_]=D+"Date",x[f]=D+"Month",x[p]=D+"FullYear",x[l]=D+"Hours",x[a]=D+"Minutes",x[s]=D+"Seconds",x[o]=D+"Milliseconds",x)[F],X=F===h?this.$D+(w-this.$W):w;if(F===f||F===p){var z=this.clone().set(_,1);z.$d[$](X),z.init(),this.$d=z.set(_,Math.min(this.$D,z.daysInMonth())).$d}else $&&this.$d[$](X);return this.init(),this},T.set=function(y,w){return this.clone().$set(y,w)},T.get=function(y){return this[R.p(y)]()},T.add=function(y,w){var x,F=this;y=Number(y);var D=R.p(w),$=function(tt){var H=Z(F);return R.w(H.date(H.date()+Math.round(tt*y)),F)};if(D===f)return this.set(f,this.$M+y);if(D===p)return this.set(p,this.$y+y);if(D===h)return $(1);if(D===u)return $(7);var X=(x={},x[a]=r,x[l]=n,x[s]=i,x)[D]||1,z=this.$d.getTime()+y*X;return R.w(z,this)},T.subtract=function(y,w){return this.add(-1*y,w)},T.format=function(y){var w=this,x=this.$locale();if(!this.isValid())return x.invalidDate||b;var F=y||"YYYY-MM-DDTHH:mm:ssZ",D=R.z(this),$=this.$H,X=this.$m,z=this.$M,tt=x.weekdays,H=x.months,Ct=x.meridiem,wt=function(it,At,xt,ie){return it&&(it[At]||it(w,F))||xt[At].slice(0,ie)},ee=function(it){return R.s($%12||12,it,"0")},Bt=Ct||function(it,At,xt){var ie=it<12?"AM":"PM";return xt?ie.toLowerCase():ie};return F.replace(P,(function(it,At){return At||(function(xt){switch(xt){case"YY":return String(w.$y).slice(-2);case"YYYY":return R.s(w.$y,4,"0");case"M":return z+1;case"MM":return R.s(z+1,2,"0");case"MMM":return wt(x.monthsShort,z,H,3);case"MMMM":return wt(H,z);case"D":return w.$D;case"DD":return R.s(w.$D,2,"0");case"d":return String(w.$W);case"dd":return wt(x.weekdaysMin,w.$W,tt,2);case"ddd":return wt(x.weekdaysShort,w.$W,tt,3);case"dddd":return tt[w.$W];case"H":return String($);case"HH":return R.s($,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return Bt($,X,!0);case"A":return Bt($,X,!1);case"m":return String(X);case"mm":return R.s(X,2,"0");case"s":return String(w.$s);case"ss":return R.s(w.$s,2,"0");case"SSS":return R.s(w.$ms,3,"0");case"Z":return D}return null})(it)||D.replace(":","")}))},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(y,w,x){var F,D=this,$=R.p(w),X=Z(y),z=(X.utcOffset()-this.utcOffset())*r,tt=this-X,H=function(){return R.m(D,X)};switch($){case p:F=H()/12;break;case f:F=H();break;case c:F=H()/3;break;case u:F=(tt-z)/6048e5;break;case h:F=(tt-z)/864e5;break;case l:F=tt/n;break;case a:F=tt/r;break;case s:F=tt/i;break;default:F=tt}return x?F:R.a(F)},T.daysInMonth=function(){return this.endOf(f).$D},T.$locale=function(){return G[this.$L]},T.locale=function(y,w){if(!y)return this.$L;var x=this.clone(),F=Qt(y,w,!0);return F&&(x.$L=F),x},T.clone=function(){return R.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},M})(),te=St.prototype;return Z.prototype=te,[["$ms",o],["$s",s],["$m",a],["$H",l],["$W",h],["$M",f],["$y",p],["$D",_]].forEach((function(M){te[M[1]]=function(T){return this.$g(T,M[0],M[1])}})),Z.extend=function(M,T){return M.$i||(M(T,St,Z),M.$i=!0),Z},Z.locale=Qt,Z.isDayjs=Jt,Z.unix=function(M){return Z(1e3*M)},Z.en=G[j],Z.Ls=G,Z.p={},Z}))})(Pi)),Pi.exports}var vh=Th();const kh=Ch(vh);var Wr={},Fo;function Sh(){return Fo||(Fo=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=t.BLANK_URL=void 0;var e=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,r=/&(newline|tab);/gi,n=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,o=/^.+(:|:)/gim,s=[".","/"];t.BLANK_URL="about:blank";function a(u){return s.indexOf(u[0])>-1}function l(u){var f=u.replace(n,"");return f.replace(i,function(c,p){return String.fromCharCode(p)})}function h(u){if(!u)return t.BLANK_URL;var f=l(u).replace(r,"").replace(n,"").trim();if(!f)return t.BLANK_URL;if(a(f))return f;var c=f.match(o);if(!c)return f;var p=c[0];return e.test(p)?t.BLANK_URL:f}t.sanitizeUrl=h})(Wr)),Wr}var wh=Sh(),Bh={value:()=>{}};function Ys(){for(var t=0,e=arguments.length,i={},r;t<e;++t){if(!(r=arguments[t]+"")||r in i||/[\s.]/.test(r))throw new Error("illegal type: "+r);i[r]=[]}return new qi(i)}function qi(t){this._=t}function Ah(t,e){return t.trim().split(/^|\s+/).map(function(i){var r="",n=i.indexOf(".");if(n>=0&&(r=i.slice(n+1),i=i.slice(0,n)),i&&!e.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:r}})}qi.prototype=Ys.prototype={constructor:qi,on:function(t,e){var i=this._,r=Ah(t+"",i),n,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((n=(t=r[o]).type)&&(n=Lh(i[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=r[o]).type)i[n]=Eo(i[n],t.name,e);else if(e==null)for(n in i)i[n]=Eo(i[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var i in e)t[i]=e[i].slice();return new qi(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var i=new Array(n),r=0,n,o;r<n;++r)i[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,n=o.length;r<n;++r)o[r].value.apply(e,i)},apply:function(t,e,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],n=0,o=r.length;n<o;++n)r[n].value.apply(e,i)}};function Lh(t,e){for(var i=0,r=t.length,n;i<r;++i)if((n=t[i]).name===e)return n.value}function Eo(t,e,i){for(var r=0,n=t.length;r<n;++r)if(t[r].name===e){t[r]=Bh,t=t.slice(0,r).concat(t.slice(r+1));break}return i!=null&&t.push({name:e,value:i}),t}var sn="http://www.w3.org/1999/xhtml";const Oo={svg:"http://www.w3.org/2000/svg",xhtml:sn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _r(t){var e=t+="",i=e.indexOf(":");return i>=0&&(e=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),Oo.hasOwnProperty(e)?{space:Oo[e],local:t}:t}function Fh(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===sn&&e.documentElement.namespaceURI===sn?e.createElement(t):e.createElementNS(i,t)}}function Eh(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Vs(t){var e=_r(t);return(e.local?Eh:Fh)(e)}function Oh(){}function Bn(t){return t==null?Oh:function(){return this.querySelector(t)}}function Mh(t){typeof t!="function"&&(t=Bn(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var o=e[n],s=o.length,a=r[n]=new Array(s),l,h,u=0;u<s;++u)(l=o[u])&&(h=t.call(l,l.__data__,u,o))&&("__data__"in l&&(h.__data__=l.__data__),a[u]=h);return new _t(r,this._parents)}function Ih(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function $h(){return[]}function Gs(t){return t==null?$h:function(){return this.querySelectorAll(t)}}function Dh(t){return function(){return Ih(t.apply(this,arguments))}}function Nh(t){typeof t=="function"?t=Dh(t):t=Gs(t);for(var e=this._groups,i=e.length,r=[],n=[],o=0;o<i;++o)for(var s=e[o],a=s.length,l,h=0;h<a;++h)(l=s[h])&&(r.push(t.call(l,l.__data__,h,s)),n.push(l));return new _t(r,n)}function Xs(t){return function(){return this.matches(t)}}function Ks(t){return function(e){return e.matches(t)}}var Rh=Array.prototype.find;function Ph(t){return function(){return Rh.call(this.children,t)}}function qh(){return this.firstElementChild}function zh(t){return this.select(t==null?qh:Ph(typeof t=="function"?t:Ks(t)))}var Wh=Array.prototype.filter;function Hh(){return Array.from(this.children)}function jh(t){return function(){return Wh.call(this.children,t)}}function Uh(t){return this.selectAll(t==null?Hh:jh(typeof t=="function"?t:Ks(t)))}function Yh(t){typeof t!="function"&&(t=Xs(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var o=e[n],s=o.length,a=r[n]=[],l,h=0;h<s;++h)(l=o[h])&&t.call(l,l.__data__,h,o)&&a.push(l);return new _t(r,this._parents)}function Zs(t){return new Array(t.length)}function Vh(){return new _t(this._enter||this._groups.map(Zs),this._parents)}function Xi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Xi.prototype={constructor:Xi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Gh(t){return function(){return t}}function Xh(t,e,i,r,n,o){for(var s=0,a,l=e.length,h=o.length;s<h;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):i[s]=new Xi(t,o[s]);for(;s<l;++s)(a=e[s])&&(n[s]=a)}function Kh(t,e,i,r,n,o,s){var a,l,h=new Map,u=e.length,f=o.length,c=new Array(u),p;for(a=0;a<u;++a)(l=e[a])&&(c[a]=p=s.call(l,l.__data__,a,e)+"",h.has(p)?n[a]=l:h.set(p,l));for(a=0;a<f;++a)p=s.call(t,o[a],a,o)+"",(l=h.get(p))?(r[a]=l,l.__data__=o[a],h.delete(p)):i[a]=new Xi(t,o[a]);for(a=0;a<u;++a)(l=e[a])&&h.get(c[a])===l&&(n[a]=l)}function Zh(t){return t.__data__}function Jh(t,e){if(!arguments.length)return Array.from(this,Zh);var i=e?Kh:Xh,r=this._parents,n=this._groups;typeof t!="function"&&(t=Gh(t));for(var o=n.length,s=new Array(o),a=new Array(o),l=new Array(o),h=0;h<o;++h){var u=r[h],f=n[h],c=f.length,p=Qh(t.call(u,u&&u.__data__,h,r)),_=p.length,b=a[h]=new Array(_),k=s[h]=new Array(_),P=l[h]=new Array(c);i(u,f,b,k,P,p,e);for(var v=0,U=0,N,j;v<_;++v)if(N=b[v]){for(v>=U&&(U=v+1);!(j=k[U])&&++U<_;);N._next=j||null}}return s=new _t(s,r),s._enter=a,s._exit=l,s}function Qh(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function tc(){return new _t(this._exit||this._groups.map(Zs),this._parents)}function ec(t,e,i){var r=this.enter(),n=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),i==null?o.remove():i(o),r&&n?r.merge(n).order():n}function ic(t){for(var e=t.selection?t.selection():t,i=this._groups,r=e._groups,n=i.length,o=r.length,s=Math.min(n,o),a=new Array(n),l=0;l<s;++l)for(var h=i[l],u=r[l],f=h.length,c=a[l]=new Array(f),p,_=0;_<f;++_)(p=h[_]||u[_])&&(c[_]=p);for(;l<n;++l)a[l]=i[l];return new _t(a,this._parents)}function rc(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var r=t[e],n=r.length-1,o=r[n],s;--n>=0;)(s=r[n])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function nc(t){t||(t=oc);function e(f,c){return f&&c?t(f.__data__,c.__data__):!f-!c}for(var i=this._groups,r=i.length,n=new Array(r),o=0;o<r;++o){for(var s=i[o],a=s.length,l=n[o]=new Array(a),h,u=0;u<a;++u)(h=s[u])&&(l[u]=h);l.sort(e)}return new _t(n,this._parents).order()}function oc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function sc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ac(){return Array.from(this)}function lc(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var r=t[e],n=0,o=r.length;n<o;++n){var s=r[n];if(s)return s}return null}function hc(){let t=0;for(const e of this)++t;return t}function cc(){return!this.node()}function uc(t){for(var e=this._groups,i=0,r=e.length;i<r;++i)for(var n=e[i],o=0,s=n.length,a;o<s;++o)(a=n[o])&&t.call(a,a.__data__,o,n);return this}function fc(t){return function(){this.removeAttribute(t)}}function dc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pc(t,e){return function(){this.setAttribute(t,e)}}function gc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function mc(t,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function _c(t,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function yc(t,e){var i=_r(t);if(arguments.length<2){var r=this.node();return i.local?r.getAttributeNS(i.space,i.local):r.getAttribute(i)}return this.each((e==null?i.local?dc:fc:typeof e=="function"?i.local?_c:mc:i.local?gc:pc)(i,e))}function Js(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Cc(t){return function(){this.style.removeProperty(t)}}function xc(t,e,i){return function(){this.style.setProperty(t,e,i)}}function bc(t,e,i){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,i)}}function Tc(t,e,i){return arguments.length>1?this.each((e==null?Cc:typeof e=="function"?bc:xc)(t,e,i??"")):Ie(this.node(),t)}function Ie(t,e){return t.style.getPropertyValue(e)||Js(t).getComputedStyle(t,null).getPropertyValue(e)}function vc(t){return function(){delete this[t]}}function kc(t,e){return function(){this[t]=e}}function Sc(t,e){return function(){var i=e.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function wc(t,e){return arguments.length>1?this.each((e==null?vc:typeof e=="function"?Sc:kc)(t,e)):this.node()[t]}function Qs(t){return t.trim().split(/^|\s+/)}function An(t){return t.classList||new ta(t)}function ta(t){this._node=t,this._names=Qs(t.getAttribute("class")||"")}ta.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ea(t,e){for(var i=An(t),r=-1,n=e.length;++r<n;)i.add(e[r])}function ia(t,e){for(var i=An(t),r=-1,n=e.length;++r<n;)i.remove(e[r])}function Bc(t){return function(){ea(this,t)}}function Ac(t){return function(){ia(this,t)}}function Lc(t,e){return function(){(e.apply(this,arguments)?ea:ia)(this,t)}}function Fc(t,e){var i=Qs(t+"");if(arguments.length<2){for(var r=An(this.node()),n=-1,o=i.length;++n<o;)if(!r.contains(i[n]))return!1;return!0}return this.each((typeof e=="function"?Lc:e?Bc:Ac)(i,e))}function Ec(){this.textContent=""}function Oc(t){return function(){this.textContent=t}}function Mc(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ic(t){return arguments.length?this.each(t==null?Ec:(typeof t=="function"?Mc:Oc)(t)):this.node().textContent}function $c(){this.innerHTML=""}function Dc(t){return function(){this.innerHTML=t}}function Nc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Rc(t){return arguments.length?this.each(t==null?$c:(typeof t=="function"?Nc:Dc)(t)):this.node().innerHTML}function Pc(){this.nextSibling&&this.parentNode.appendChild(this)}function qc(){return this.each(Pc)}function zc(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Wc(){return this.each(zc)}function Hc(t){var e=typeof t=="function"?t:Vs(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function jc(){return null}function Uc(t,e){var i=typeof t=="function"?t:Vs(t),r=e==null?jc:typeof e=="function"?e:Bn(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),r.apply(this,arguments)||null)})}function Yc(){var t=this.parentNode;t&&t.removeChild(this)}function Vc(){return this.each(Yc)}function Gc(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xc(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Kc(t){return this.select(t?Xc:Gc)}function Zc(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Jc(t){return function(e){t.call(this,e,this.__data__)}}function Qc(t){return t.trim().split(/^|\s+/).map(function(e){var i="",r=e.indexOf(".");return r>=0&&(i=e.slice(r+1),e=e.slice(0,r)),{type:e,name:i}})}function tu(t){return function(){var e=this.__on;if(e){for(var i=0,r=-1,n=e.length,o;i<n;++i)o=e[i],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function eu(t,e,i){return function(){var r=this.__on,n,o=Jc(e);if(r){for(var s=0,a=r.length;s<a;++s)if((n=r[s]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=o,n.options=i),n.value=e;return}}this.addEventListener(t.type,o,i),n={type:t.type,name:t.name,value:e,listener:o,options:i},r?r.push(n):this.__on=[n]}}function iu(t,e,i){var r=Qc(t+""),n,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,h=a.length,u;l<h;++l)for(n=0,u=a[l];n<o;++n)if((s=r[n]).type===u.type&&s.name===u.name)return u.value}return}for(a=e?eu:tu,n=0;n<o;++n)this.each(a(r[n],e,i));return this}function ra(t,e,i){var r=Js(t),n=r.CustomEvent;typeof n=="function"?n=new n(e,i):(n=r.document.createEvent("Event"),i?(n.initEvent(e,i.bubbles,i.cancelable),n.detail=i.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function ru(t,e){return function(){return ra(this,t,e)}}function nu(t,e){return function(){return ra(this,t,e.apply(this,arguments))}}function ou(t,e){return this.each((typeof e=="function"?nu:ru)(t,e))}function*su(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var r=t[e],n=0,o=r.length,s;n<o;++n)(s=r[n])&&(yield s)}var na=[null];function _t(t,e){this._groups=t,this._parents=e}function bi(){return new _t([[document.documentElement]],na)}function au(){return this}_t.prototype=bi.prototype={constructor:_t,select:Mh,selectAll:Nh,selectChild:zh,selectChildren:Uh,filter:Yh,data:Jh,enter:Vh,exit:tc,join:ec,merge:ic,selection:au,order:rc,sort:nc,call:sc,nodes:ac,node:lc,size:hc,empty:cc,each:uc,attr:yc,style:Tc,property:wc,classed:Fc,text:Ic,html:Rc,raise:qc,lower:Wc,append:Hc,insert:Uc,remove:Vc,clone:Kc,datum:Zc,on:iu,dispatch:ou,[Symbol.iterator]:su};function Tt(t){return typeof t=="string"?new _t([[document.querySelector(t)]],[document.documentElement]):new _t([[t]],na)}function Ln(t,e,i){t.prototype=e.prototype=i,i.constructor=t}function oa(t,e){var i=Object.create(t.prototype);for(var r in e)i[r]=e[r];return i}function Ti(){}var di=.7,Ki=1/di,Ee="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lu=/^#([0-9a-f]{3,8})$/,hu=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),cu=new RegExp(`^rgb\\(${Nt},${Nt},${Nt}\\)$`),uu=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${pi}\\)$`),fu=new RegExp(`^rgba\\(${Nt},${Nt},${Nt},${pi}\\)$`),du=new RegExp(`^hsl\\(${pi},${Nt},${Nt}\\)$`),pu=new RegExp(`^hsla\\(${pi},${Nt},${Nt},${pi}\\)$`),Mo={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};Ln(Ti,gi,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Io,formatHex:Io,formatHex8:gu,formatHsl:mu,formatRgb:$o,toString:$o});function Io(){return this.rgb().formatHex()}function gu(){return this.rgb().formatHex8()}function mu(){return sa(this).formatHsl()}function $o(){return this.rgb().formatRgb()}function gi(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=lu.exec(t))?(i=e[1].length,e=parseInt(e[1],16),i===6?Do(e):i===3?new gt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Oi(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Oi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=hu.exec(t))?new gt(e[1],e[2],e[3],1):(e=cu.exec(t))?new gt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=uu.exec(t))?Oi(e[1],e[2],e[3],e[4]):(e=fu.exec(t))?Oi(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=du.exec(t))?Po(e[1],e[2]/100,e[3]/100,1):(e=pu.exec(t))?Po(e[1],e[2]/100,e[3]/100,e[4]):Mo.hasOwnProperty(t)?Do(Mo[t]):t==="transparent"?new gt(NaN,NaN,NaN,0):null}function Do(t){return new gt(t>>16&255,t>>8&255,t&255,1)}function Oi(t,e,i,r){return r<=0&&(t=e=i=NaN),new gt(t,e,i,r)}function _u(t){return t instanceof Ti||(t=gi(t)),t?(t=t.rgb(),new gt(t.r,t.g,t.b,t.opacity)):new gt}function an(t,e,i,r){return arguments.length===1?_u(t):new gt(t,e,i,r??1)}function gt(t,e,i,r){this.r=+t,this.g=+e,this.b=+i,this.opacity=+r}Ln(gt,an,oa(Ti,{brighter(t){return t=t==null?Ki:Math.pow(Ki,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?di:Math.pow(di,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new gt(ge(this.r),ge(this.g),ge(this.b),Zi(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:No,formatHex:No,formatHex8:yu,formatRgb:Ro,toString:Ro}));function No(){return`#${de(this.r)}${de(this.g)}${de(this.b)}`}function yu(){return`#${de(this.r)}${de(this.g)}${de(this.b)}${de((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ro(){const t=Zi(this.opacity);return`${t===1?"rgb(":"rgba("}${ge(this.r)}, ${ge(this.g)}, ${ge(this.b)}${t===1?")":`, ${t})`}`}function Zi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ge(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function de(t){return t=ge(t),(t<16?"0":"")+t.toString(16)}function Po(t,e,i,r){return r<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new Ft(t,e,i,r)}function sa(t){if(t instanceof Ft)return new Ft(t.h,t.s,t.l,t.opacity);if(t instanceof Ti||(t=gi(t)),!t)return new Ft;if(t instanceof Ft)return t;t=t.rgb();var e=t.r/255,i=t.g/255,r=t.b/255,n=Math.min(e,i,r),o=Math.max(e,i,r),s=NaN,a=o-n,l=(o+n)/2;return a?(e===o?s=(i-r)/a+(i<r)*6:i===o?s=(r-e)/a+2:s=(e-i)/a+4,a/=l<.5?o+n:2-o-n,s*=60):a=l>0&&l<1?0:s,new Ft(s,a,l,t.opacity)}function Cu(t,e,i,r){return arguments.length===1?sa(t):new Ft(t,e,i,r??1)}function Ft(t,e,i,r){this.h=+t,this.s=+e,this.l=+i,this.opacity=+r}Ln(Ft,Cu,oa(Ti,{brighter(t){return t=t==null?Ki:Math.pow(Ki,t),new Ft(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?di:Math.pow(di,t),new Ft(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,r=i+(i<.5?i:1-i)*e,n=2*i-r;return new gt(Hr(t>=240?t-240:t+120,n,r),Hr(t,n,r),Hr(t<120?t+240:t-120,n,r),this.opacity)},clamp(){return new Ft(qo(this.h),Mi(this.s),Mi(this.l),Zi(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=Zi(this.opacity);return`${t===1?"hsl(":"hsla("}${qo(this.h)}, ${Mi(this.s)*100}%, ${Mi(this.l)*100}%${t===1?")":`, ${t})`}`}}));function qo(t){return t=(t||0)%360,t<0?t+360:t}function Mi(t){return Math.max(0,Math.min(1,t||0))}function Hr(t,e,i){return(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)*255}const Fn=t=>()=>t;function aa(t,e){return function(i){return t+i*e}}function xu(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(r){return Math.pow(t+r*e,i)}}function Bb(t,e){var i=e-t;return i?aa(t,i>180||i<-180?i-360*Math.round(i/360):i):Fn(isNaN(t)?e:t)}function bu(t){return(t=+t)==1?la:function(e,i){return i-e?xu(e,i,t):Fn(isNaN(e)?i:e)}}function la(t,e){var i=e-t;return i?aa(t,i):Fn(isNaN(t)?e:t)}const zo=(function t(e){var i=bu(e);function r(n,o){var s=i((n=an(n)).r,(o=an(o)).r),a=i(n.g,o.g),l=i(n.b,o.b),h=la(n.opacity,o.opacity);return function(u){return n.r=s(u),n.g=a(u),n.b=l(u),n.opacity=h(u),n+""}}return r.gamma=t,r})(1);function ne(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}var ln=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jr=new RegExp(ln.source,"g");function Tu(t){return function(){return t}}function vu(t){return function(e){return t(e)+""}}function ku(t,e){var i=ln.lastIndex=jr.lastIndex=0,r,n,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(r=ln.exec(t))&&(n=jr.exec(e));)(o=n.index)>i&&(o=e.slice(i,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(n=n[0])?a[s]?a[s]+=n:a[++s]=n:(a[++s]=null,l.push({i:s,x:ne(r,n)})),i=jr.lastIndex;return i<e.length&&(o=e.slice(i),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?vu(l[0].x):Tu(e):(e=l.length,function(h){for(var u=0,f;u<e;++u)a[(f=l[u]).i]=f.x(h);return a.join("")})}var Wo=180/Math.PI,hn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ha(t,e,i,r,n,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*i+e*r)&&(i-=t*l,r-=e*l),(a=Math.sqrt(i*i+r*r))&&(i/=a,r/=a,l/=a),t*r<e*i&&(t=-t,e=-e,l=-l,s=-s),{translateX:n,translateY:o,rotate:Math.atan2(e,t)*Wo,skewX:Math.atan(l)*Wo,scaleX:s,scaleY:a}}var Ii;function Su(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?hn:ha(e.a,e.b,e.c,e.d,e.e,e.f)}function wu(t){return t==null||(Ii||(Ii=document.createElementNS("http://www.w3.org/2000/svg","g")),Ii.setAttribute("transform",t),!(t=Ii.transform.baseVal.consolidate()))?hn:(t=t.matrix,ha(t.a,t.b,t.c,t.d,t.e,t.f))}function ca(t,e,i,r){function n(h){return h.length?h.pop()+" ":""}function o(h,u,f,c,p,_){if(h!==f||u!==c){var b=p.push("translate(",null,e,null,i);_.push({i:b-4,x:ne(h,f)},{i:b-2,x:ne(u,c)})}else(f||c)&&p.push("translate("+f+e+c+i)}function s(h,u,f,c){h!==u?(h-u>180?u+=360:u-h>180&&(h+=360),c.push({i:f.push(n(f)+"rotate(",null,r)-2,x:ne(h,u)})):u&&f.push(n(f)+"rotate("+u+r)}function a(h,u,f,c){h!==u?c.push({i:f.push(n(f)+"skewX(",null,r)-2,x:ne(h,u)}):u&&f.push(n(f)+"skewX("+u+r)}function l(h,u,f,c,p,_){if(h!==f||u!==c){var b=p.push(n(p)+"scale(",null,",",null,")");_.push({i:b-4,x:ne(h,f)},{i:b-2,x:ne(u,c)})}else(f!==1||c!==1)&&p.push(n(p)+"scale("+f+","+c+")")}return function(h,u){var f=[],c=[];return h=t(h),u=t(u),o(h.translateX,h.translateY,u.translateX,u.translateY,f,c),s(h.rotate,u.rotate,f,c),a(h.skewX,u.skewX,f,c),l(h.scaleX,h.scaleY,u.scaleX,u.scaleY,f,c),h=u=null,function(p){for(var _=-1,b=c.length,k;++_<b;)f[(k=c[_]).i]=k.x(p);return f.join("")}}}var Bu=ca(Su,"px, ","px)","deg)"),Au=ca(wu,", ",")",")"),$e=0,ri=0,Ke=0,ua=1e3,Ji,ni,Qi=0,_e=0,yr=0,mi=typeof performance=="object"&&performance.now?performance:Date,fa=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function En(){return _e||(fa(Lu),_e=mi.now()+yr)}function Lu(){_e=0}function tr(){this._call=this._time=this._next=null}tr.prototype=da.prototype={constructor:tr,restart:function(t,e,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?En():+i)+(e==null?0:+e),!this._next&&ni!==this&&(ni?ni._next=this:Ji=this,ni=this),this._call=t,this._time=i,cn()},stop:function(){this._call&&(this._call=null,this._time=1/0,cn())}};function da(t,e,i){var r=new tr;return r.restart(t,e,i),r}function Fu(){En(),++$e;for(var t=Ji,e;t;)(e=_e-t._time)>=0&&t._call.call(void 0,e),t=t._next;--$e}function Ho(){_e=(Qi=mi.now())+yr,$e=ri=0;try{Fu()}finally{$e=0,Ou(),_e=0}}function Eu(){var t=mi.now(),e=t-Qi;e>ua&&(yr-=e,Qi=t)}function Ou(){for(var t,e=Ji,i,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(i=e._next,e._next=null,e=t?t._next=i:Ji=i);ni=t,cn(r)}function cn(t){if(!$e){ri&&(ri=clearTimeout(ri));var e=t-_e;e>24?(t<1/0&&(ri=setTimeout(Ho,t-mi.now()-yr)),Ke&&(Ke=clearInterval(Ke))):(Ke||(Qi=mi.now(),Ke=setInterval(Eu,ua)),$e=1,fa(Ho))}}function jo(t,e,i){var r=new tr;return e=e==null?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,i),r}var Mu=Ys("start","end","cancel","interrupt"),Iu=[],pa=0,Uo=1,un=2,zi=3,Yo=4,fn=5,Wi=6;function Cr(t,e,i,r,n,o){var s=t.__transition;if(!s)t.__transition={};else if(i in s)return;$u(t,i,{name:e,index:r,group:n,on:Mu,tween:Iu,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:pa})}function On(t,e){var i=Mt(t,e);if(i.state>pa)throw new Error("too late; already scheduled");return i}function zt(t,e){var i=Mt(t,e);if(i.state>zi)throw new Error("too late; already running");return i}function Mt(t,e){var i=t.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function $u(t,e,i){var r=t.__transition,n;r[e]=i,i.timer=da(o,0,i.time);function o(h){i.state=Uo,i.timer.restart(s,i.delay,i.time),i.delay<=h&&s(h-i.delay)}function s(h){var u,f,c,p;if(i.state!==Uo)return l();for(u in r)if(p=r[u],p.name===i.name){if(p.state===zi)return jo(s);p.state===Yo?(p.state=Wi,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[u]):+u<e&&(p.state=Wi,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[u])}if(jo(function(){i.state===zi&&(i.state=Yo,i.timer.restart(a,i.delay,i.time),a(h))}),i.state=un,i.on.call("start",t,t.__data__,i.index,i.group),i.state===un){for(i.state=zi,n=new Array(c=i.tween.length),u=0,f=-1;u<c;++u)(p=i.tween[u].value.call(t,t.__data__,i.index,i.group))&&(n[++f]=p);n.length=f+1}}function a(h){for(var u=h<i.duration?i.ease.call(null,h/i.duration):(i.timer.restart(l),i.state=fn,1),f=-1,c=n.length;++f<c;)n[f].call(t,u);i.state===fn&&(i.on.call("end",t,t.__data__,i.index,i.group),l())}function l(){i.state=Wi,i.timer.stop(),delete r[e];for(var h in r)return;delete t.__transition}}function Du(t,e){var i=t.__transition,r,n,o=!0,s;if(i){e=e==null?null:e+"";for(s in i){if((r=i[s]).name!==e){o=!1;continue}n=r.state>un&&r.state<fn,r.state=Wi,r.timer.stop(),r.on.call(n?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete i[s]}o&&delete t.__transition}}function Nu(t){return this.each(function(){Du(this,t)})}function Ru(t,e){var i,r;return function(){var n=zt(this,t),o=n.tween;if(o!==i){r=i=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}n.tween=r}}function Pu(t,e,i){var r,n;if(typeof i!="function")throw new Error;return function(){var o=zt(this,t),s=o.tween;if(s!==r){n=(r=s).slice();for(var a={name:e,value:i},l=0,h=n.length;l<h;++l)if(n[l].name===e){n[l]=a;break}l===h&&n.push(a)}o.tween=n}}function qu(t,e){var i=this._id;if(t+="",arguments.length<2){for(var r=Mt(this.node(),i).tween,n=0,o=r.length,s;n<o;++n)if((s=r[n]).name===t)return s.value;return null}return this.each((e==null?Ru:Pu)(i,t,e))}function Mn(t,e,i){var r=t._id;return t.each(function(){var n=zt(this,r);(n.value||(n.value={}))[e]=i.apply(this,arguments)}),function(n){return Mt(n,r).value[e]}}function ga(t,e){var i;return(typeof e=="number"?ne:e instanceof gi?zo:(i=gi(e))?(e=i,zo):ku)(t,e)}function zu(t){return function(){this.removeAttribute(t)}}function Wu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hu(t,e,i){var r,n=i+"",o;return function(){var s=this.getAttribute(t);return s===n?null:s===r?o:o=e(r=s,i)}}function ju(t,e,i){var r,n=i+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===n?null:s===r?o:o=e(r=s,i)}}function Uu(t,e,i){var r,n,o;return function(){var s,a=i(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===r&&l===n?o:(n=l,o=e(r=s,a)))}}function Yu(t,e,i){var r,n,o;return function(){var s,a=i(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===r&&l===n?o:(n=l,o=e(r=s,a)))}}function Vu(t,e){var i=_r(t),r=i==="transform"?Au:ga;return this.attrTween(t,typeof e=="function"?(i.local?Yu:Uu)(i,r,Mn(this,"attr."+t,e)):e==null?(i.local?Wu:zu)(i):(i.local?ju:Hu)(i,r,e))}function Gu(t,e){return function(i){this.setAttribute(t,e.call(this,i))}}function Xu(t,e){return function(i){this.setAttributeNS(t.space,t.local,e.call(this,i))}}function Ku(t,e){var i,r;function n(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&Xu(t,o)),i}return n._value=e,n}function Zu(t,e){var i,r;function n(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&Gu(t,o)),i}return n._value=e,n}function Ju(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;var r=_r(t);return this.tween(i,(r.local?Ku:Zu)(r,e))}function Qu(t,e){return function(){On(this,t).delay=+e.apply(this,arguments)}}function tf(t,e){return e=+e,function(){On(this,t).delay=e}}function ef(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Qu:tf)(e,t)):Mt(this.node(),e).delay}function rf(t,e){return function(){zt(this,t).duration=+e.apply(this,arguments)}}function nf(t,e){return e=+e,function(){zt(this,t).duration=e}}function of(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?rf:nf)(e,t)):Mt(this.node(),e).duration}function sf(t,e){if(typeof e!="function")throw new Error;return function(){zt(this,t).ease=e}}function af(t){var e=this._id;return arguments.length?this.each(sf(e,t)):Mt(this.node(),e).ease}function lf(t,e){return function(){var i=e.apply(this,arguments);if(typeof i!="function")throw new Error;zt(this,t).ease=i}}function hf(t){if(typeof t!="function")throw new Error;return this.each(lf(this._id,t))}function cf(t){typeof t!="function"&&(t=Xs(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var o=e[n],s=o.length,a=r[n]=[],l,h=0;h<s;++h)(l=o[h])&&t.call(l,l.__data__,h,o)&&a.push(l);return new Kt(r,this._parents,this._name,this._id)}function uf(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,i=t._groups,r=e.length,n=i.length,o=Math.min(r,n),s=new Array(r),a=0;a<o;++a)for(var l=e[a],h=i[a],u=l.length,f=s[a]=new Array(u),c,p=0;p<u;++p)(c=l[p]||h[p])&&(f[p]=c);for(;a<r;++a)s[a]=e[a];return new Kt(s,this._parents,this._name,this._id)}function ff(t){return(t+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");return i>=0&&(e=e.slice(0,i)),!e||e==="start"})}function df(t,e,i){var r,n,o=ff(e)?On:zt;return function(){var s=o(this,t),a=s.on;a!==r&&(n=(r=a).copy()).on(e,i),s.on=n}}function pf(t,e){var i=this._id;return arguments.length<2?Mt(this.node(),i).on.on(t):this.each(df(i,t,e))}function gf(t){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==t)return;e&&e.removeChild(this)}}function mf(){return this.on("end.remove",gf(this._id))}function _f(t){var e=this._name,i=this._id;typeof t!="function"&&(t=Bn(t));for(var r=this._groups,n=r.length,o=new Array(n),s=0;s<n;++s)for(var a=r[s],l=a.length,h=o[s]=new Array(l),u,f,c=0;c<l;++c)(u=a[c])&&(f=t.call(u,u.__data__,c,a))&&("__data__"in u&&(f.__data__=u.__data__),h[c]=f,Cr(h[c],e,i,c,h,Mt(u,i)));return new Kt(o,this._parents,e,i)}function yf(t){var e=this._name,i=this._id;typeof t!="function"&&(t=Gs(t));for(var r=this._groups,n=r.length,o=[],s=[],a=0;a<n;++a)for(var l=r[a],h=l.length,u,f=0;f<h;++f)if(u=l[f]){for(var c=t.call(u,u.__data__,f,l),p,_=Mt(u,i),b=0,k=c.length;b<k;++b)(p=c[b])&&Cr(p,e,i,b,c,_);o.push(c),s.push(u)}return new Kt(o,s,e,i)}var Cf=bi.prototype.constructor;function xf(){return new Cf(this._groups,this._parents)}function bf(t,e){var i,r,n;return function(){var o=Ie(this,t),s=(this.style.removeProperty(t),Ie(this,t));return o===s?null:o===i&&s===r?n:n=e(i=o,r=s)}}function ma(t){return function(){this.style.removeProperty(t)}}function Tf(t,e,i){var r,n=i+"",o;return function(){var s=Ie(this,t);return s===n?null:s===r?o:o=e(r=s,i)}}function vf(t,e,i){var r,n,o;return function(){var s=Ie(this,t),a=i(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Ie(this,t))),s===l?null:s===r&&l===n?o:(n=l,o=e(r=s,a))}}function kf(t,e){var i,r,n,o="style."+e,s="end."+o,a;return function(){var l=zt(this,t),h=l.on,u=l.value[o]==null?a||(a=ma(e)):void 0;(h!==i||n!==u)&&(r=(i=h).copy()).on(s,n=u),l.on=r}}function Sf(t,e,i){var r=(t+="")=="transform"?Bu:ga;return e==null?this.styleTween(t,bf(t,r)).on("end.style."+t,ma(t)):typeof e=="function"?this.styleTween(t,vf(t,r,Mn(this,"style."+t,e))).each(kf(this._id,t)):this.styleTween(t,Tf(t,r,e),i).on("end.style."+t,null)}function wf(t,e,i){return function(r){this.style.setProperty(t,e.call(this,r),i)}}function Bf(t,e,i){var r,n;function o(){var s=e.apply(this,arguments);return s!==n&&(r=(n=s)&&wf(t,s,i)),r}return o._value=e,o}function Af(t,e,i){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,Bf(t,e,i??""))}function Lf(t){return function(){this.textContent=t}}function Ff(t){return function(){var e=t(this);this.textContent=e??""}}function Ef(t){return this.tween("text",typeof t=="function"?Ff(Mn(this,"text",t)):Lf(t==null?"":t+""))}function Of(t){return function(e){this.textContent=t.call(this,e)}}function Mf(t){var e,i;function r(){var n=t.apply(this,arguments);return n!==i&&(e=(i=n)&&Of(n)),e}return r._value=t,r}function If(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Mf(t))}function $f(){for(var t=this._name,e=this._id,i=_a(),r=this._groups,n=r.length,o=0;o<n;++o)for(var s=r[o],a=s.length,l,h=0;h<a;++h)if(l=s[h]){var u=Mt(l,e);Cr(l,t,i,h,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Kt(r,this._parents,t,i)}function Df(){var t,e,i=this,r=i._id,n=i.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--n===0&&o()}};i.each(function(){var h=zt(this,r),u=h.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),h.on=e}),n===0&&o()})}var Nf=0;function Kt(t,e,i,r){this._groups=t,this._parents=e,this._name=i,this._id=r}function _a(){return++Nf}var Ut=bi.prototype;Kt.prototype={constructor:Kt,select:_f,selectAll:yf,selectChild:Ut.selectChild,selectChildren:Ut.selectChildren,filter:cf,merge:uf,selection:xf,transition:$f,call:Ut.call,nodes:Ut.nodes,node:Ut.node,size:Ut.size,empty:Ut.empty,each:Ut.each,on:pf,attr:Vu,attrTween:Ju,style:Sf,styleTween:Af,text:Ef,textTween:If,remove:mf,tween:qu,delay:ef,duration:of,ease:af,easeVarying:hf,end:Df,[Symbol.iterator]:Ut[Symbol.iterator]};function Rf(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Pf={time:null,delay:0,duration:250,ease:Rf};function qf(t,e){for(var i;!(i=t.__transition)||!(i=i[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return i}function zf(t){var e,i;t instanceof Kt?(e=t._id,t=t._name):(e=_a(),(i=Pf).time=En(),t=t==null?null:t+"");for(var r=this._groups,n=r.length,o=0;o<n;++o)for(var s=r[o],a=s.length,l,h=0;h<a;++h)(l=s[h])&&Cr(l,t,e,h,s,i||qf(l,e));return new Kt(r,this._parents,t,e)}bi.prototype.interrupt=Nu;bi.prototype.transition=zf;const Ab=Math.abs,Lb=Math.atan2,Fb=Math.cos,Eb=Math.max,Ob=Math.min,Mb=Math.sin,Ib=Math.sqrt,Vo=1e-12,In=Math.PI,Go=In/2,$b=2*In;function Db(t){return t>1?0:t<-1?In:Math.acos(t)}function Nb(t){return t>=1?Go:t<=-1?-Go:Math.asin(t)}function ya(t){this._context=t}ya.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Wf(t){return new ya(t)}class Ca{constructor(e,i){this._context=e,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,i){switch(e=+e,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,i,e,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,e,this._y0,e,i);break}}this._x0=e,this._y0=i}}function Hf(t){return new Ca(t,!0)}function jf(t){return new Ca(t,!1)}function ae(){}function er(t,e,i){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+i)/6)}function xr(t){this._context=t}xr.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:er(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:er(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Uf(t){return new xr(t)}function xa(t){this._context=t}xa.prototype={areaStart:ae,areaEnd:ae,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:er(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Yf(t){return new xa(t)}function ba(t){this._context=t}ba.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,r):this._context.moveTo(i,r);break;case 3:this._point=4;default:er(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Vf(t){return new ba(t)}function Ta(t,e){this._basis=new xr(t),this._beta=e}Ta.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,i=t.length-1;if(i>0)for(var r=t[0],n=e[0],o=t[i]-r,s=e[i]-n,a=-1,l;++a<=i;)l=a/i,this._basis.point(this._beta*t[a]+(1-this._beta)*(r+l*o),this._beta*e[a]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Gf=(function t(e){function i(r){return e===1?new xr(r):new Ta(r,e)}return i.beta=function(r){return t(+r)},i})(.85);function ir(t,e,i){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-i),t._x2,t._y2)}function $n(t,e){this._context=t,this._k=(1-e)/6}$n.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:ir(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ir(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Xf=(function t(e){function i(r){return new $n(r,e)}return i.tension=function(r){return t(+r)},i})(0);function Dn(t,e){this._context=t,this._k=(1-e)/6}Dn.prototype={areaStart:ae,areaEnd:ae,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ir(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Kf=(function t(e){function i(r){return new Dn(r,e)}return i.tension=function(r){return t(+r)},i})(0);function Nn(t,e){this._context=t,this._k=(1-e)/6}Nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ir(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Zf=(function t(e){function i(r){return new Nn(r,e)}return i.tension=function(r){return t(+r)},i})(0);function Rn(t,e,i){var r=t._x1,n=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Vo){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);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Vo){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*h+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*h+t._y1*t._l23_2a-i*t._l12_2a)/u}t._context.bezierCurveTo(r,n,o,s,t._x2,t._y2)}function va(t,e){this._context=t,this._alpha=e}va.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Rn(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Jf=(function t(e){function i(r){return e?new va(r,e):new $n(r,0)}return i.alpha=function(r){return t(+r)},i})(.5);function ka(t,e){this._context=t,this._alpha=e}ka.prototype={areaStart:ae,areaEnd:ae,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Rn(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Qf=(function t(e){function i(r){return e?new ka(r,e):new Dn(r,0)}return i.alpha=function(r){return t(+r)},i})(.5);function Sa(t,e){this._context=t,this._alpha=e}Sa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Rn(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const td=(function t(e){function i(r){return e?new Sa(r,e):new Nn(r,0)}return i.alpha=function(r){return t(+r)},i})(.5);function wa(t){this._context=t}wa.prototype={areaStart:ae,areaEnd:ae,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function ed(t){return new wa(t)}function Xo(t){return t<0?-1:1}function Ko(t,e,i){var r=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(r||n<0&&-0),s=(i-t._y1)/(n||r<0&&-0),a=(o*n+s*r)/(r+n);return(Xo(o)+Xo(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function Zo(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function Ur(t,e,i){var r=t._x0,n=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,n+a*e,o-a,s-a*i,o,s)}function rr(t){this._context=t}rr.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:Ur(this,this._t0,Zo(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var i=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ur(this,Zo(this,i=Ko(this,t,e)),i);break;default:Ur(this,this._t0,i=Ko(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}};function Ba(t){this._context=new Aa(t)}(Ba.prototype=Object.create(rr.prototype)).point=function(t,e){rr.prototype.point.call(this,e,t)};function Aa(t){this._context=t}Aa.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,i,r,n,o){this._context.bezierCurveTo(e,t,r,i,o,n)}};function id(t){return new rr(t)}function rd(t){return new Ba(t)}function La(t){this._context=t}La.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,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),i===2)this._context.lineTo(t[1],e[1]);else for(var r=Jo(t),n=Jo(e),o=0,s=1;s<i;++o,++s)this._context.bezierCurveTo(r[0][o],n[0][o],r[1][o],n[1][o],t[s],e[s]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Jo(t){var e,i=t.length-1,r,n=new Array(i),o=new Array(i),s=new Array(i);for(n[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)n[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(n[i-1]=2,o[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=n[e]/o[e-1],o[e]-=r,s[e]-=r*s[e-1];for(n[i-1]=s[i-1]/o[i-1],e=i-2;e>=0;--e)n[e]=(s[e]-n[e+1])/o[e];for(o[i-1]=(t[i]+n[i-1])/2,e=0;e<i-1;++e)o[e]=2*t[e+1]-n[e+1];return[n,o]}function nd(t){return new La(t)}function br(t,e){this._context=t,this._t=e}br.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=t,this._y=e}};function od(t){return new br(t,.5)}function sd(t){return new br(t,0)}function ad(t){return new br(t,1)}function oi(t,e,i){this.k=t,this.x=e,this.y=i}oi.prototype={constructor:oi,scale:function(t){return t===1?this:new oi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new oi(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+")"}};oi.prototype;/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:Fa,setPrototypeOf:Qo,isFrozen:ld,getPrototypeOf:hd,getOwnPropertyDescriptor:cd}=Object;let{freeze:ft,seal:vt,create:Ea}=Object,{apply:dn,construct:pn}=typeof Reflect<"u"&&Reflect;ft||(ft=function(e){return e});vt||(vt=function(e){return e});dn||(dn=function(e,i,r){return e.apply(i,r)});pn||(pn=function(e,i){return new e(...i)});const $i=yt(Array.prototype.forEach),ts=yt(Array.prototype.pop),Ze=yt(Array.prototype.push),Hi=yt(String.prototype.toLowerCase),Yr=yt(String.prototype.toString),es=yt(String.prototype.match),Je=yt(String.prototype.replace),ud=yt(String.prototype.indexOf),fd=yt(String.prototype.trim),Lt=yt(Object.prototype.hasOwnProperty),ht=yt(RegExp.prototype.test),Qe=dd(TypeError);function yt(t){return function(e){for(var i=arguments.length,r=new Array(i>1?i-1:0),n=1;n<i;n++)r[n-1]=arguments[n];return dn(t,e,r)}}function dd(t){return function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return pn(t,i)}}function W(t,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hi;Qo&&Qo(t,null);let r=e.length;for(;r--;){let n=e[r];if(typeof n=="string"){const o=i(n);o!==n&&(ld(e)||(e[r]=o),n=o)}t[n]=!0}return t}function pd(t){for(let e=0;e<t.length;e++)Lt(t,e)||(t[e]=null);return t}function ue(t){const e=Ea(null);for(const[i,r]of Fa(t))Lt(t,i)&&(Array.isArray(r)?e[i]=pd(r):r&&typeof r=="object"&&r.constructor===Object?e[i]=ue(r):e[i]=r);return e}function ti(t,e){for(;t!==null;){const r=cd(t,e);if(r){if(r.get)return yt(r.get);if(typeof r.value=="function")return yt(r.value)}t=hd(t)}function i(){return null}return i}const is=ft(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vr=ft(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Gr=ft(["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"]),gd=ft(["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"]),Xr=ft(["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"]),md=ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rs=ft(["#text"]),ns=ft(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Kr=ft(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),os=ft(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Di=ft(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_d=vt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),yd=vt(/<%[\w\W]*|[\w\W]*%>/gm),Cd=vt(/\${[\w\W]*}/gm),xd=vt(/^data-[\-\w.\u00B7-\uFFFF]/),bd=vt(/^aria-[\-\w]+$/),Oa=vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Td=vt(/^(?:\w+script|data):/i),vd=vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ma=vt(/^html$/i),kd=vt(/^[a-z][.\w]*(-[.\w]+)+$/i);var ss=Object.freeze({__proto__:null,MUSTACHE_EXPR:_d,ERB_EXPR:yd,TMPLIT_EXPR:Cd,DATA_ATTR:xd,ARIA_ATTR:bd,IS_ALLOWED_URI:Oa,IS_SCRIPT_OR_DATA:Td,ATTR_WHITESPACE:vd,DOCTYPE_NAME:Ma,CUSTOM_ELEMENT:kd});const ei={element:1,text:3,progressingInstruction:7,comment:8,document:9},Sd=function(){return typeof window>"u"?null:window},wd=function(e,i){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const n="data-tt-policy-suffix";i&&i.hasAttribute(n)&&(r=i.getAttribute(n));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Ia(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Sd();const e=B=>Ia(B);if(e.version="3.1.6",e.removed=[],!t||!t.document||t.document.nodeType!==ei.document)return e.isSupported=!1,e;let{document:i}=t;const r=i,n=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:h,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:c,trustedTypes:p}=t,_=l.prototype,b=ti(_,"cloneNode"),k=ti(_,"remove"),P=ti(_,"nextSibling"),v=ti(_,"childNodes"),U=ti(_,"parentNode");if(typeof s=="function"){const B=i.createElement("template");B.content&&B.content.ownerDocument&&(i=B.content.ownerDocument)}let N,j="";const{implementation:G,createNodeIterator:q,createDocumentFragment:Jt,getElementsByTagName:Qt}=i,{importNode:Z}=r;let R={};e.isSupported=typeof Fa=="function"&&typeof U=="function"&&G&&G.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:St,ERB_EXPR:te,TMPLIT_EXPR:M,DATA_ATTR:T,ARIA_ATTR:y,IS_SCRIPT_OR_DATA:w,ATTR_WHITESPACE:x,CUSTOM_ELEMENT:F}=ss;let{IS_ALLOWED_URI:D}=ss,$=null;const X=W({},[...is,...Vr,...Gr,...Xr,...rs]);let z=null;const tt=W({},[...ns,...Kr,...os,...Di]);let H=Object.seal(Ea(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,wt=null,ee=!0,Bt=!0,it=!1,At=!0,xt=!1,ie=!0,ce=!1,$r=!1,Dr=!1,ve=!1,Bi=!1,Ai=!1,ao=!0,lo=!1;const uh="user-content-";let Nr=!0,Ve=!1,ke={},Se=null;const ho=W({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let co=null;const uo=W({},["audio","video","img","source","image","track"]);let Rr=null;const fo=W({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Li="http://www.w3.org/1998/Math/MathML",Fi="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xhtml";let we=Ht,Pr=!1,qr=null;const fh=W({},[Li,Fi,Ht],Yr);let Ge=null;const dh=["application/xhtml+xml","text/html"],ph="text/html";let et=null,Be=null;const gh=i.createElement("form"),po=function(d){return d instanceof RegExp||d instanceof Function},zr=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Be&&Be===d)){if((!d||typeof d!="object")&&(d={}),d=ue(d),Ge=dh.indexOf(d.PARSER_MEDIA_TYPE)===-1?ph:d.PARSER_MEDIA_TYPE,et=Ge==="application/xhtml+xml"?Yr:Hi,$=Lt(d,"ALLOWED_TAGS")?W({},d.ALLOWED_TAGS,et):X,z=Lt(d,"ALLOWED_ATTR")?W({},d.ALLOWED_ATTR,et):tt,qr=Lt(d,"ALLOWED_NAMESPACES")?W({},d.ALLOWED_NAMESPACES,Yr):fh,Rr=Lt(d,"ADD_URI_SAFE_ATTR")?W(ue(fo),d.ADD_URI_SAFE_ATTR,et):fo,co=Lt(d,"ADD_DATA_URI_TAGS")?W(ue(uo),d.ADD_DATA_URI_TAGS,et):uo,Se=Lt(d,"FORBID_CONTENTS")?W({},d.FORBID_CONTENTS,et):ho,Ct=Lt(d,"FORBID_TAGS")?W({},d.FORBID_TAGS,et):{},wt=Lt(d,"FORBID_ATTR")?W({},d.FORBID_ATTR,et):{},ke=Lt(d,"USE_PROFILES")?d.USE_PROFILES:!1,ee=d.ALLOW_ARIA_ATTR!==!1,Bt=d.ALLOW_DATA_ATTR!==!1,it=d.ALLOW_UNKNOWN_PROTOCOLS||!1,At=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xt=d.SAFE_FOR_TEMPLATES||!1,ie=d.SAFE_FOR_XML!==!1,ce=d.WHOLE_DOCUMENT||!1,ve=d.RETURN_DOM||!1,Bi=d.RETURN_DOM_FRAGMENT||!1,Ai=d.RETURN_TRUSTED_TYPE||!1,Dr=d.FORCE_BODY||!1,ao=d.SANITIZE_DOM!==!1,lo=d.SANITIZE_NAMED_PROPS||!1,Nr=d.KEEP_CONTENT!==!1,Ve=d.IN_PLACE||!1,D=d.ALLOWED_URI_REGEXP||Oa,we=d.NAMESPACE||Ht,H=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&po(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&po(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xt&&(Bt=!1),Bi&&(ve=!0),ke&&($=W({},rs),z=[],ke.html===!0&&(W($,is),W(z,ns)),ke.svg===!0&&(W($,Vr),W(z,Kr),W(z,Di)),ke.svgFilters===!0&&(W($,Gr),W(z,Kr),W(z,Di)),ke.mathMl===!0&&(W($,Xr),W(z,os),W(z,Di))),d.ADD_TAGS&&($===X&&($=ue($)),W($,d.ADD_TAGS,et)),d.ADD_ATTR&&(z===tt&&(z=ue(z)),W(z,d.ADD_ATTR,et)),d.ADD_URI_SAFE_ATTR&&W(Rr,d.ADD_URI_SAFE_ATTR,et),d.FORBID_CONTENTS&&(Se===ho&&(Se=ue(Se)),W(Se,d.FORBID_CONTENTS,et)),Nr&&($["#text"]=!0),ce&&W($,["html","head","body"]),$.table&&(W($,["tbody"]),delete Ct.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=d.TRUSTED_TYPES_POLICY,j=N.createHTML("")}else N===void 0&&(N=wd(p,n)),N!==null&&typeof j=="string"&&(j=N.createHTML(""));ft&&ft(d),Be=d}},go=W({},["mi","mo","mn","ms","mtext"]),mo=W({},["foreignobject","annotation-xml"]),mh=W({},["title","style","font","a","script"]),_o=W({},[...Vr,...Gr,...gd]),yo=W({},[...Xr,...md]),_h=function(d){let m=U(d);(!m||!m.tagName)&&(m={namespaceURI:we,tagName:"template"});const S=Hi(d.tagName),Y=Hi(m.tagName);return qr[d.namespaceURI]?d.namespaceURI===Fi?m.namespaceURI===Ht?S==="svg":m.namespaceURI===Li?S==="svg"&&(Y==="annotation-xml"||go[Y]):!!_o[S]:d.namespaceURI===Li?m.namespaceURI===Ht?S==="math":m.namespaceURI===Fi?S==="math"&&mo[Y]:!!yo[S]:d.namespaceURI===Ht?m.namespaceURI===Fi&&!mo[Y]||m.namespaceURI===Li&&!go[Y]?!1:!yo[S]&&(mh[S]||!_o[S]):!!(Ge==="application/xhtml+xml"&&qr[d.namespaceURI]):!1},It=function(d){Ze(e.removed,{element:d});try{U(d).removeChild(d)}catch{k(d)}},Ei=function(d,m){try{Ze(e.removed,{attribute:m.getAttributeNode(d),from:m})}catch{Ze(e.removed,{attribute:null,from:m})}if(m.removeAttribute(d),d==="is"&&!z[d])if(ve||Bi)try{It(m)}catch{}else try{m.setAttribute(d,"")}catch{}},Co=function(d){let m=null,S=null;if(Dr)d="<remove></remove>"+d;else{const rt=es(d,/^[\r\n\t ]+/);S=rt&&rt[0]}Ge==="application/xhtml+xml"&&we===Ht&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");const Y=N?N.createHTML(d):d;if(we===Ht)try{m=new c().parseFromString(Y,Ge)}catch{}if(!m||!m.documentElement){m=G.createDocument(we,"template",null);try{m.documentElement.innerHTML=Pr?j:Y}catch{}}const nt=m.body||m.documentElement;return d&&S&&nt.insertBefore(i.createTextNode(S),nt.childNodes[0]||null),we===Ht?Qt.call(m,ce?"html":"body")[0]:ce?m.documentElement:nt},xo=function(d){return q.call(d.ownerDocument||d,d,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},bo=function(d){return d instanceof f&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof u)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},To=function(d){return typeof a=="function"&&d instanceof a},jt=function(d,m,S){R[d]&&$i(R[d],Y=>{Y.call(e,m,S,Be)})},vo=function(d){let m=null;if(jt("beforeSanitizeElements",d,null),bo(d))return It(d),!0;const S=et(d.nodeName);if(jt("uponSanitizeElement",d,{tagName:S,allowedTags:$}),d.hasChildNodes()&&!To(d.firstElementChild)&&ht(/<[/\w]/g,d.innerHTML)&&ht(/<[/\w]/g,d.textContent)||d.nodeType===ei.progressingInstruction||ie&&d.nodeType===ei.comment&&ht(/<[/\w]/g,d.data))return It(d),!0;if(!$[S]||Ct[S]){if(!Ct[S]&&So(S)&&(H.tagNameCheck instanceof RegExp&&ht(H.tagNameCheck,S)||H.tagNameCheck instanceof Function&&H.tagNameCheck(S)))return!1;if(Nr&&!Se[S]){const Y=U(d)||d.parentNode,nt=v(d)||d.childNodes;if(nt&&Y){const rt=nt.length;for(let dt=rt-1;dt>=0;--dt){const $t=b(nt[dt],!0);$t.__removalCount=(d.__removalCount||0)+1,Y.insertBefore($t,P(d))}}}return It(d),!0}return d instanceof l&&!_h(d)||(S==="noscript"||S==="noembed"||S==="noframes")&&ht(/<\/no(script|embed|frames)/i,d.innerHTML)?(It(d),!0):(xt&&d.nodeType===ei.text&&(m=d.textContent,$i([St,te,M],Y=>{m=Je(m,Y," ")}),d.textContent!==m&&(Ze(e.removed,{element:d.cloneNode()}),d.textContent=m)),jt("afterSanitizeElements",d,null),!1)},ko=function(d,m,S){if(ao&&(m==="id"||m==="name")&&(S in i||S in gh))return!1;if(!(Bt&&!wt[m]&&ht(T,m))){if(!(ee&&ht(y,m))){if(!z[m]||wt[m]){if(!(So(d)&&(H.tagNameCheck instanceof RegExp&&ht(H.tagNameCheck,d)||H.tagNameCheck instanceof Function&&H.tagNameCheck(d))&&(H.attributeNameCheck instanceof RegExp&&ht(H.attributeNameCheck,m)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(m))||m==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&ht(H.tagNameCheck,S)||H.tagNameCheck instanceof Function&&H.tagNameCheck(S))))return!1}else if(!Rr[m]){if(!ht(D,Je(S,x,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&d!=="script"&&ud(S,"data:")===0&&co[d])){if(!(it&&!ht(w,Je(S,x,"")))){if(S)return!1}}}}}}return!0},So=function(d){return d!=="annotation-xml"&&es(d,F)},wo=function(d){jt("beforeSanitizeAttributes",d,null);const{attributes:m}=d;if(!m)return;const S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};let Y=m.length;for(;Y--;){const nt=m[Y],{name:rt,namespaceURI:dt,value:$t}=nt,Xe=et(rt);let lt=rt==="value"?$t:fd($t);if(S.attrName=Xe,S.attrValue=lt,S.keepAttr=!0,S.forceKeepAttr=void 0,jt("uponSanitizeAttribute",d,S),lt=S.attrValue,ie&&ht(/((--!?|])>)|<\/(style|title)/i,lt)){Ei(rt,d);continue}if(S.forceKeepAttr||(Ei(rt,d),!S.keepAttr))continue;if(!At&&ht(/\/>/i,lt)){Ei(rt,d);continue}xt&&$i([St,te,M],Ao=>{lt=Je(lt,Ao," ")});const Bo=et(d.nodeName);if(ko(Bo,Xe,lt)){if(lo&&(Xe==="id"||Xe==="name")&&(Ei(rt,d),lt=uh+lt),N&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!dt)switch(p.getAttributeType(Bo,Xe)){case"TrustedHTML":{lt=N.createHTML(lt);break}case"TrustedScriptURL":{lt=N.createScriptURL(lt);break}}try{dt?d.setAttributeNS(dt,rt,lt):d.setAttribute(rt,lt),bo(d)?It(d):ts(e.removed)}catch{}}}jt("afterSanitizeAttributes",d,null)},yh=function B(d){let m=null;const S=xo(d);for(jt("beforeSanitizeShadowDOM",d,null);m=S.nextNode();)jt("uponSanitizeShadowNode",m,null),!vo(m)&&(m.content instanceof o&&B(m.content),wo(m));jt("afterSanitizeShadowDOM",d,null)};return e.sanitize=function(B){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,S=null,Y=null,nt=null;if(Pr=!B,Pr&&(B="<!-->"),typeof B!="string"&&!To(B))if(typeof B.toString=="function"){if(B=B.toString(),typeof B!="string")throw Qe("dirty is not a string, aborting")}else throw Qe("toString is not a function");if(!e.isSupported)return B;if($r||zr(d),e.removed=[],typeof B=="string"&&(Ve=!1),Ve){if(B.nodeName){const $t=et(B.nodeName);if(!$[$t]||Ct[$t])throw Qe("root node is forbidden and cannot be sanitized in-place")}}else if(B instanceof a)m=Co("<!---->"),S=m.ownerDocument.importNode(B,!0),S.nodeType===ei.element&&S.nodeName==="BODY"||S.nodeName==="HTML"?m=S:m.appendChild(S);else{if(!ve&&!xt&&!ce&&B.indexOf("<")===-1)return N&&Ai?N.createHTML(B):B;if(m=Co(B),!m)return ve?null:Ai?j:""}m&&Dr&&It(m.firstChild);const rt=xo(Ve?B:m);for(;Y=rt.nextNode();)vo(Y)||(Y.content instanceof o&&yh(Y.content),wo(Y));if(Ve)return B;if(ve){if(Bi)for(nt=Jt.call(m.ownerDocument);m.firstChild;)nt.appendChild(m.firstChild);else nt=m;return(z.shadowroot||z.shadowrootmode)&&(nt=Z.call(r,nt,!0)),nt}let dt=ce?m.outerHTML:m.innerHTML;return ce&&$["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&ht(Ma,m.ownerDocument.doctype.name)&&(dt="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
|
|
8
|
-
`+dt),xt&&$i([St,te,M],$t=>{dt=Je(dt,$t," ")}),N&&Ai?N.createHTML(dt):dt},e.setConfig=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zr(B),$r=!0},e.clearConfig=function(){Be=null,$r=!1},e.isValidAttribute=function(B,d,m){Be||zr({});const S=et(B),Y=et(d);return ko(S,Y,m)},e.addHook=function(B,d){typeof d=="function"&&(R[B]=R[B]||[],Ze(R[B],d))},e.removeHook=function(B){if(R[B])return ts(R[B])},e.removeHooks=function(B){R[B]&&(R[B]=[])},e.removeAllHooks=function(){R={}},e}var De=Ia();const ji={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,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+(e-t)*6*i:i<1/2?e:i<2/3?t+(e-t)*(2/3-i)*6:t),hsl2rgb:({h:t,s:e,l:i},r)=>{if(!e)return i*2.55;t/=360,e/=100,i/=100;const n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;switch(r){case"r":return ji.hue2rgb(o,n,t+1/3)*255;case"g":return ji.hue2rgb(o,n,t)*255;case"b":return ji.hue2rgb(o,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:i},r)=>{t/=255,e/=255,i/=255;const n=Math.max(t,e,i),o=Math.min(t,e,i),s=(n+o)/2;if(r==="l")return s*100;if(n===o)return 0;const a=n-o,l=s>.5?a/(2-n-o):a/(n+o);if(r==="s")return l*100;switch(n){case t:return((e-i)/a+(e<i?6:0))*60;case e:return((i-t)/a+2)*60;case i:return((t-e)/a+4)*60;default:return-1}}},Bd={clamp:(t,e,i)=>e>i?Math.min(e,Math.max(i,t)):Math.min(i,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Ad={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},I={channel:ji,lang:Bd,unit:Ad},re={};for(let t=0;t<=255;t++)re[t]=I.unit.dec2hex(t);const ot={ALL:0,RGB:1,HSL:2};class Ld{constructor(){this.type=ot.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=ot.ALL}is(e){return this.type===e}}class Fd{constructor(e,i){this.color=i,this.changed=!1,this.data=e,this.type=new Ld}set(e,i){return this.color=i,this.changed=!1,this.data=e,this.type.type=ot.ALL,this}_ensureHSL(){const e=this.data,{h:i,s:r,l:n}=e;i===void 0&&(e.h=I.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=I.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=I.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:i,g:r,b:n}=e;i===void 0&&(e.r=I.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=I.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=I.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,i=e.r;return!this.type.is(ot.HSL)&&i!==void 0?i:(this._ensureHSL(),I.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,i=e.g;return!this.type.is(ot.HSL)&&i!==void 0?i:(this._ensureHSL(),I.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,i=e.b;return!this.type.is(ot.HSL)&&i!==void 0?i:(this._ensureHSL(),I.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,i=e.h;return!this.type.is(ot.RGB)&&i!==void 0?i:(this._ensureRGB(),I.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,i=e.s;return!this.type.is(ot.RGB)&&i!==void 0?i:(this._ensureRGB(),I.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,i=e.l;return!this.type.is(ot.RGB)&&i!==void 0?i:(this._ensureRGB(),I.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ot.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ot.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ot.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ot.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ot.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ot.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Tr=new Fd({r:0,g:0,b:0,a:0},"transparent"),Oe={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Oe.re);if(!e)return;const i=e[1],r=parseInt(i,16),n=i.length,o=n%4===0,s=n>4,a=s?1:17,l=s?8:4,h=o?0:-1,u=s?255:15;return Tr.set({r:(r>>l*(h+3)&u)*a,g:(r>>l*(h+2)&u)*a,b:(r>>l*(h+1)&u)*a,a:o?(r&u)*a/255:1},t)},stringify:t=>{const{r:e,g:i,b:r,a:n}=t;return n<1?`#${re[Math.round(e)]}${re[Math.round(i)]}${re[Math.round(r)]}${re[Math.round(n*255)]}`:`#${re[Math.round(e)]}${re[Math.round(i)]}${re[Math.round(r)]}`}},pe={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(pe.hueRe);if(e){const[,i,r]=e;switch(r){case"grad":return I.channel.clamp.h(parseFloat(i)*.9);case"rad":return I.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return I.channel.clamp.h(parseFloat(i)*360)}}return I.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const i=t.match(pe.re);if(!i)return;const[,r,n,o,s,a]=i;return Tr.set({h:pe._hue2deg(r),s:I.channel.clamp.s(parseFloat(n)),l:I.channel.clamp.l(parseFloat(o)),a:s?I.channel.clamp.a(a?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:i,l:r,a:n}=t;return n<1?`hsla(${I.lang.round(e)}, ${I.lang.round(i)}%, ${I.lang.round(r)}%, ${n})`:`hsl(${I.lang.round(e)}, ${I.lang.round(i)}%, ${I.lang.round(r)}%)`}},ai={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=ai.colors[t];if(e)return Oe.parse(e)},stringify:t=>{const e=Oe.stringify(t);for(const i in ai.colors)if(ai.colors[i]===e)return i}},si={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(e!==114&&e!==82)return;const i=t.match(si.re);if(!i)return;const[,r,n,o,s,a,l,h,u]=i;return Tr.set({r:I.channel.clamp.r(n?parseFloat(r)*2.55:parseFloat(r)),g:I.channel.clamp.g(s?parseFloat(o)*2.55:parseFloat(o)),b:I.channel.clamp.b(l?parseFloat(a)*2.55:parseFloat(a)),a:h?I.channel.clamp.a(u?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:i,b:r,a:n}=t;return n<1?`rgba(${I.lang.round(e)}, ${I.lang.round(i)}, ${I.lang.round(r)}, ${I.lang.round(n)})`:`rgb(${I.lang.round(e)}, ${I.lang.round(i)}, ${I.lang.round(r)})`}},Pt={format:{keyword:ai,hex:Oe,rgb:si,rgba:si,hsl:pe,hsla:pe},parse:t=>{if(typeof t!="string")return t;const e=Oe.parse(t)||si.parse(t)||pe.parse(t)||ai.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(ot.HSL)||t.data.r===void 0?pe.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?si.stringify(t):Oe.stringify(t)},$a=(t,e)=>{const i=Pt.parse(t);for(const r in e)i[r]=I.channel.clamp[r](e[r]);return Pt.stringify(i)},li=(t,e,i=0,r=1)=>{if(typeof t!="number")return $a(t,{a:e});const n=Tr.set({r:I.channel.clamp.r(t),g:I.channel.clamp.g(e),b:I.channel.clamp.b(i),a:I.channel.clamp.a(r)});return Pt.stringify(n)},Ed=t=>{const{r:e,g:i,b:r}=Pt.parse(t),n=.2126*I.channel.toLinear(e)+.7152*I.channel.toLinear(i)+.0722*I.channel.toLinear(r);return I.lang.round(n)},Od=t=>Ed(t)>=.5,vi=t=>!Od(t),Da=(t,e,i)=>{const r=Pt.parse(t),n=r[e],o=I.channel.clamp[e](n+i);return n!==o&&(r[e]=o),Pt.stringify(r)},A=(t,e)=>Da(t,"l",e),O=(t,e)=>Da(t,"l",-e),g=(t,e)=>{const i=Pt.parse(t),r={};for(const n in e)e[n]&&(r[n]=i[n]+e[n]);return $a(t,r)},Md=(t,e,i=50)=>{const{r,g:n,b:o,a:s}=Pt.parse(t),{r:a,g:l,b:h,a:u}=Pt.parse(e),f=i/100,c=f*2-1,p=s-u,b=((c*p===-1?c:(c+p)/(1+c*p))+1)/2,k=1-b,P=r*b+a*k,v=n*b+l*k,U=o*b+h*k,N=s*f+u*(1-f);return li(P,v,U,N)},C=(t,e=100)=>{const i=Pt.parse(t);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Md(i,t,e)};var Na=typeof global=="object"&&global&&global.Object===Object&&global,Id=typeof self=="object"&&self&&self.Object===Object&&self,Wt=Na||Id||Function("return this")(),nr=Wt.Symbol,Ra=Object.prototype,$d=Ra.hasOwnProperty,Dd=Ra.toString,ii=nr?nr.toStringTag:void 0;function Nd(t){var e=$d.call(t,ii),i=t[ii];try{t[ii]=void 0;var r=!0}catch{}var n=Dd.call(t);return r&&(e?t[ii]=i:delete t[ii]),n}var Rd=Object.prototype,Pd=Rd.toString;function qd(t){return Pd.call(t)}var zd="[object Null]",Wd="[object Undefined]",as=nr?nr.toStringTag:void 0;function je(t){return t==null?t===void 0?Wd:zd:as&&as in Object(t)?Nd(t):qd(t)}function xe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Hd="[object AsyncFunction]",jd="[object Function]",Ud="[object GeneratorFunction]",Yd="[object Proxy]";function Pn(t){if(!xe(t))return!1;var e=je(t);return e==jd||e==Ud||e==Hd||e==Yd}var Zr=Wt["__core-js_shared__"],ls=(function(){var t=/[^.]+$/.exec(Zr&&Zr.keys&&Zr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Vd(t){return!!ls&&ls in t}var Gd=Function.prototype,Xd=Gd.toString;function be(t){if(t!=null){try{return Xd.call(t)}catch{}try{return t+""}catch{}}return""}var Kd=/[\\^$.*+?()[\]{}|]/g,Zd=/^\[object .+?Constructor\]$/,Jd=Function.prototype,Qd=Object.prototype,tp=Jd.toString,ep=Qd.hasOwnProperty,ip=RegExp("^"+tp.call(ep).replace(Kd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rp(t){if(!xe(t)||Vd(t))return!1;var e=Pn(t)?ip:Zd;return e.test(be(t))}function np(t,e){return t==null?void 0:t[e]}function Te(t,e){var i=np(t,e);return rp(i)?i:void 0}var _i=Te(Object,"create");function op(){this.__data__=_i?_i(null):{},this.size=0}function sp(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ap="__lodash_hash_undefined__",lp=Object.prototype,hp=lp.hasOwnProperty;function cp(t){var e=this.__data__;if(_i){var i=e[t];return i===ap?void 0:i}return hp.call(e,t)?e[t]:void 0}var up=Object.prototype,fp=up.hasOwnProperty;function dp(t){var e=this.__data__;return _i?e[t]!==void 0:fp.call(e,t)}var pp="__lodash_hash_undefined__";function gp(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=_i&&e===void 0?pp:e,this}function ye(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}ye.prototype.clear=op;ye.prototype.delete=sp;ye.prototype.get=cp;ye.prototype.has=dp;ye.prototype.set=gp;function mp(){this.__data__=[],this.size=0}function vr(t,e){return t===e||t!==t&&e!==e}function kr(t,e){for(var i=t.length;i--;)if(vr(t[i][0],e))return i;return-1}var _p=Array.prototype,yp=_p.splice;function Cp(t){var e=this.__data__,i=kr(e,t);if(i<0)return!1;var r=e.length-1;return i==r?e.pop():yp.call(e,i,1),--this.size,!0}function xp(t){var e=this.__data__,i=kr(e,t);return i<0?void 0:e[i][1]}function bp(t){return kr(this.__data__,t)>-1}function Tp(t,e){var i=this.__data__,r=kr(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this}function Zt(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}Zt.prototype.clear=mp;Zt.prototype.delete=Cp;Zt.prototype.get=xp;Zt.prototype.has=bp;Zt.prototype.set=Tp;var yi=Te(Wt,"Map");function vp(){this.size=0,this.__data__={hash:new ye,map:new(yi||Zt),string:new ye}}function kp(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Sr(t,e){var i=t.__data__;return kp(e)?i[typeof e=="string"?"string":"hash"]:i.map}function Sp(t){var e=Sr(this,t).delete(t);return this.size-=e?1:0,e}function wp(t){return Sr(this,t).get(t)}function Bp(t){return Sr(this,t).has(t)}function Ap(t,e){var i=Sr(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this}function he(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}he.prototype.clear=vp;he.prototype.delete=Sp;he.prototype.get=wp;he.prototype.has=Bp;he.prototype.set=Ap;var Lp="Expected a function";function ki(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Lp);var i=function(){var r=arguments,n=e?e.apply(this,r):r[0],o=i.cache;if(o.has(n))return o.get(n);var s=t.apply(this,r);return i.cache=o.set(n,s)||o,s};return i.cache=new(ki.Cache||he),i}ki.Cache=he;function Fp(){this.__data__=new Zt,this.size=0}function Ep(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function Op(t){return this.__data__.get(t)}function Mp(t){return this.__data__.has(t)}var Ip=200;function $p(t,e){var i=this.__data__;if(i instanceof Zt){var r=i.__data__;if(!yi||r.length<Ip-1)return r.push([t,e]),this.size=++i.size,this;i=this.__data__=new he(r)}return i.set(t,e),this.size=i.size,this}function Ue(t){var e=this.__data__=new Zt(t);this.size=e.size}Ue.prototype.clear=Fp;Ue.prototype.delete=Ep;Ue.prototype.get=Op;Ue.prototype.has=Mp;Ue.prototype.set=$p;var or=(function(){try{var t=Te(Object,"defineProperty");return t({},"",{}),t}catch{}})();function qn(t,e,i){e=="__proto__"&&or?or(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function gn(t,e,i){(i!==void 0&&!vr(t[e],i)||i===void 0&&!(e in t))&&qn(t,e,i)}function Dp(t){return function(e,i,r){for(var n=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[++n];if(i(o[l],l,o)===!1)break}return e}}var Np=Dp(),Pa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hs=Pa&&typeof module=="object"&&module&&!module.nodeType&&module,Rp=hs&&hs.exports===Pa,cs=Rp?Wt.Buffer:void 0,us=cs?cs.allocUnsafe:void 0;function Pp(t,e){if(e)return t.slice();var i=t.length,r=us?us(i):new t.constructor(i);return t.copy(r),r}var fs=Wt.Uint8Array;function qp(t){var e=new t.constructor(t.byteLength);return new fs(e).set(new fs(t)),e}function zp(t,e){var i=e?qp(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function Wp(t,e){var i=-1,r=t.length;for(e||(e=Array(r));++i<r;)e[i]=t[i];return e}var ds=Object.create,Hp=(function(){function t(){}return function(e){if(!xe(e))return{};if(ds)return ds(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}})();function qa(t,e){return function(i){return t(e(i))}}var za=qa(Object.getPrototypeOf,Object),jp=Object.prototype;function wr(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||jp;return t===i}function Up(t){return typeof t.constructor=="function"&&!wr(t)?Hp(za(t)):{}}function Si(t){return t!=null&&typeof t=="object"}var Yp="[object Arguments]";function ps(t){return Si(t)&&je(t)==Yp}var Wa=Object.prototype,Vp=Wa.hasOwnProperty,Gp=Wa.propertyIsEnumerable,sr=ps((function(){return arguments})())?ps:function(t){return Si(t)&&Vp.call(t,"callee")&&!Gp.call(t,"callee")},ar=Array.isArray,Xp=9007199254740991;function Ha(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Xp}function Br(t){return t!=null&&Ha(t.length)&&!Pn(t)}function Kp(t){return Si(t)&&Br(t)}function Zp(){return!1}var ja=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gs=ja&&typeof module=="object"&&module&&!module.nodeType&&module,Jp=gs&&gs.exports===ja,ms=Jp?Wt.Buffer:void 0,Qp=ms?ms.isBuffer:void 0,zn=Qp||Zp,tg="[object Object]",eg=Function.prototype,ig=Object.prototype,Ua=eg.toString,rg=ig.hasOwnProperty,ng=Ua.call(Object);function og(t){if(!Si(t)||je(t)!=tg)return!1;var e=za(t);if(e===null)return!0;var i=rg.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&Ua.call(i)==ng}var sg="[object Arguments]",ag="[object Array]",lg="[object Boolean]",hg="[object Date]",cg="[object Error]",ug="[object Function]",fg="[object Map]",dg="[object Number]",pg="[object Object]",gg="[object RegExp]",mg="[object Set]",_g="[object String]",yg="[object WeakMap]",Cg="[object ArrayBuffer]",xg="[object DataView]",bg="[object Float32Array]",Tg="[object Float64Array]",vg="[object Int8Array]",kg="[object Int16Array]",Sg="[object Int32Array]",wg="[object Uint8Array]",Bg="[object Uint8ClampedArray]",Ag="[object Uint16Array]",Lg="[object Uint32Array]",V={};V[bg]=V[Tg]=V[vg]=V[kg]=V[Sg]=V[wg]=V[Bg]=V[Ag]=V[Lg]=!0;V[sg]=V[ag]=V[Cg]=V[lg]=V[xg]=V[hg]=V[cg]=V[ug]=V[fg]=V[dg]=V[pg]=V[gg]=V[mg]=V[_g]=V[yg]=!1;function Fg(t){return Si(t)&&Ha(t.length)&&!!V[je(t)]}function Eg(t){return function(e){return t(e)}}var Ya=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hi=Ya&&typeof module=="object"&&module&&!module.nodeType&&module,Og=hi&&hi.exports===Ya,Jr=Og&&Na.process,_s=(function(){try{var t=hi&&hi.require&&hi.require("util").types;return t||Jr&&Jr.binding&&Jr.binding("util")}catch{}})(),ys=_s&&_s.isTypedArray,Wn=ys?Eg(ys):Fg;function mn(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Mg=Object.prototype,Ig=Mg.hasOwnProperty;function $g(t,e,i){var r=t[e];(!(Ig.call(t,e)&&vr(r,i))||i===void 0&&!(e in t))&&qn(t,e,i)}function Dg(t,e,i,r){var n=!i;i||(i={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;l===void 0&&(l=t[a]),n?qn(i,a,l):$g(i,a,l)}return i}function Ng(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r}var Rg=9007199254740991,Pg=/^(?:0|[1-9]\d*)$/;function Va(t,e){var i=typeof t;return e=e??Rg,!!e&&(i=="number"||i!="symbol"&&Pg.test(t))&&t>-1&&t%1==0&&t<e}var qg=Object.prototype,zg=qg.hasOwnProperty;function Wg(t,e){var i=ar(t),r=!i&&sr(t),n=!i&&!r&&zn(t),o=!i&&!r&&!n&&Wn(t),s=i||r||n||o,a=s?Ng(t.length,String):[],l=a.length;for(var h in t)(e||zg.call(t,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Va(h,l)))&&a.push(h);return a}function Hg(t){var e=[];if(t!=null)for(var i in Object(t))e.push(i);return e}var jg=Object.prototype,Ug=jg.hasOwnProperty;function Yg(t){if(!xe(t))return Hg(t);var e=wr(t),i=[];for(var r in t)r=="constructor"&&(e||!Ug.call(t,r))||i.push(r);return i}function Ga(t){return Br(t)?Wg(t,!0):Yg(t)}function Vg(t){return Dg(t,Ga(t))}function Gg(t,e,i,r,n,o,s){var a=mn(t,i),l=mn(e,i),h=s.get(l);if(h){gn(t,i,h);return}var u=o?o(a,l,i+"",t,e,s):void 0,f=u===void 0;if(f){var c=ar(l),p=!c&&zn(l),_=!c&&!p&&Wn(l);u=l,c||p||_?ar(a)?u=a:Kp(a)?u=Wp(a):p?(f=!1,u=Pp(l,!0)):_?(f=!1,u=zp(l,!0)):u=[]:og(l)||sr(l)?(u=a,sr(a)?u=Vg(a):(!xe(a)||Pn(a))&&(u=Up(l))):f=!1}f&&(s.set(l,u),n(u,l,r,o,s),s.delete(l)),gn(t,i,u)}function Xa(t,e,i,r,n){t!==e&&Np(e,function(o,s){if(n||(n=new Ue),xe(o))Gg(t,e,s,i,Xa,r,n);else{var a=r?r(mn(t,s),o,s+"",t,e,n):void 0;a===void 0&&(a=o),gn(t,s,a)}},Ga)}function Ka(t){return t}function Xg(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}var Cs=Math.max;function Kg(t,e,i){return e=Cs(e===void 0?t.length-1:e,0),function(){for(var r=arguments,n=-1,o=Cs(r.length-e,0),s=Array(o);++n<o;)s[n]=r[e+n];n=-1;for(var a=Array(e+1);++n<e;)a[n]=r[n];return a[e]=i(s),Xg(t,this,a)}}function Zg(t){return function(){return t}}var Jg=or?function(t,e){return or(t,"toString",{configurable:!0,enumerable:!1,value:Zg(e),writable:!0})}:Ka,Qg=800,tm=16,em=Date.now;function im(t){var e=0,i=0;return function(){var r=em(),n=tm-(r-i);if(i=r,n>0){if(++e>=Qg)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var rm=im(Jg);function nm(t,e){return rm(Kg(t,e,Ka),t+"")}function om(t,e,i){if(!xe(i))return!1;var r=typeof e;return(r=="number"?Br(i)&&Va(e,i.length):r=="string"&&e in i)?vr(i[e],t):!1}function sm(t){return nm(function(e,i){var r=-1,n=i.length,o=n>1?i[n-1]:void 0,s=n>2?i[2]:void 0;for(o=t.length>3&&typeof o=="function"?(n--,o):void 0,s&&om(i[0],i[1],s)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var a=i[r];a&&t(e,a,r,o)}return e})}var am=sm(function(t,e,i){Xa(t,e,i)}),Za="comm",Ja="rule",Qa="decl",lm="@import",hm="@namespace",cm="@keyframes",um="@layer",tl=Math.abs,Hn=String.fromCharCode;function el(t){return t.trim()}function Ui(t,e,i){return t.replace(e,i)}function fm(t,e,i){return t.indexOf(e,i)}function Me(t,e){return t.charCodeAt(e)|0}function Ne(t,e,i){return t.slice(e,i)}function Dt(t){return t.length}function dm(t){return t.length}function Ni(t,e){return e.push(t),t}var Ar=1,Re=1,il=0,kt=0,J=0,Ye="";function jn(t,e,i,r,n,o,s,a){return{value:t,root:e,parent:i,type:r,props:n,children:o,line:Ar,column:Re,length:s,return:"",siblings:a}}function pm(){return J}function gm(){return J=kt>0?Me(Ye,--kt):0,Re--,J===10&&(Re=1,Ar--),J}function Et(){return J=kt<il?Me(Ye,kt++):0,Re++,J===10&&(Re=1,Ar++),J}function oe(){return Me(Ye,kt)}function Yi(){return kt}function Lr(t,e){return Ne(Ye,t,e)}function Ci(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 mm(t){return Ar=Re=1,il=Dt(Ye=t),kt=0,[]}function _m(t){return Ye="",t}function Qr(t){return el(Lr(kt-1,_n(t===91?t+2:t===40?t+1:t)))}function ym(t){for(;(J=oe())&&J<33;)Et();return Ci(t)>2||Ci(J)>3?"":" "}function Cm(t,e){for(;--e&&Et()&&!(J<48||J>102||J>57&&J<65||J>70&&J<97););return Lr(t,Yi()+(e<6&&oe()==32&&Et()==32))}function _n(t){for(;Et();)switch(J){case t:return kt;case 34:case 39:t!==34&&t!==39&&_n(J);break;case 40:t===41&&_n(t);break;case 92:Et();break}return kt}function xm(t,e){for(;Et()&&t+J!==57;)if(t+J===84&&oe()===47)break;return"/*"+Lr(e,kt-1)+"*"+Hn(t===47?t:Et())}function bm(t){for(;!Ci(oe());)Et();return Lr(t,kt)}function Tm(t){return _m(Vi("",null,null,null,[""],t=mm(t),0,[0],t))}function Vi(t,e,i,r,n,o,s,a,l){for(var h=0,u=0,f=s,c=0,p=0,_=0,b=1,k=1,P=1,v=0,U="",N=n,j=o,G=r,q=U;k;)switch(_=v,v=Et()){case 40:if(_!=108&&Me(q,f-1)==58){fm(q+=Ui(Qr(v),"&","&\f"),"&\f",tl(h?a[h-1]:0))!=-1&&(P=-1);break}case 34:case 39:case 91:q+=Qr(v);break;case 9:case 10:case 13:case 32:q+=ym(_);break;case 92:q+=Cm(Yi()-1,7);continue;case 47:switch(oe()){case 42:case 47:Ni(vm(xm(Et(),Yi()),e,i,l),l),(Ci(_||1)==5||Ci(oe()||1)==5)&&Dt(q)&&Ne(q,-1,void 0)!==" "&&(q+=" ");break;default:q+="/"}break;case 123*b:a[h++]=Dt(q)*P;case 125*b:case 59:case 0:switch(v){case 0:case 125:k=0;case 59+u:P==-1&&(q=Ui(q,/\f/g,"")),p>0&&(Dt(q)-f||b===0&&_===47)&&Ni(p>32?bs(q+";",r,i,f-1,l):bs(Ui(q," ","")+";",r,i,f-2,l),l);break;case 59:q+=";";default:if(Ni(G=xs(q,e,i,h,u,n,a,U,N=[],j=[],f,o),o),v===123)if(u===0)Vi(q,e,G,G,N,o,f,a,j);else{switch(c){case 99:if(Me(q,3)===110)break;case 108:if(Me(q,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Vi(t,G,G,r&&Ni(xs(t,G,G,0,0,n,a,U,n,N=[],f,j),j),n,j,f,a,r?N:j):Vi(q,G,G,G,[""],j,0,a,j)}}h=u=p=0,b=P=1,U=q="",f=s;break;case 58:f=1+Dt(q),p=_;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&gm()==125)continue}switch(q+=Hn(v),v*b){case 38:P=u>0?1:(q+="\f",-1);break;case 44:a[h++]=(Dt(q)-1)*P,P=1;break;case 64:oe()===45&&(q+=Qr(Et())),c=oe(),u=f=Dt(U=q+=bm(Yi())),v++;break;case 45:_===45&&Dt(q)==2&&(b=0)}}return o}function xs(t,e,i,r,n,o,s,a,l,h,u,f){for(var c=n-1,p=n===0?o:[""],_=dm(p),b=0,k=0,P=0;b<r;++b)for(var v=0,U=Ne(t,c+1,c=tl(k=s[b])),N=t;v<_;++v)(N=el(k>0?p[v]+" "+U:Ui(U,/&\f/g,p[v])))&&(l[P++]=N);return jn(t,e,i,n===0?Ja:a,l,h,u,f)}function vm(t,e,i,r){return jn(t,e,i,Za,Hn(pm()),Ne(t,2,-2),0,r)}function bs(t,e,i,r,n){return jn(t,e,i,Qa,Ne(t,0,r),Ne(t,r+1,-1),r,n)}function yn(t,e){for(var i="",r=0;r<t.length;r++)i+=e(t[r],r,t,e)||"";return i}function km(t,e,i,r){switch(t.type){case um:if(t.children.length)break;case lm:case hm:case Qa:return t.return=t.return||t.value;case Za:return"";case cm:return t.return=t.value+"{"+yn(t.children,r)+"}";case Ja:if(!Dt(t.value=t.props.join(",")))return""}return Dt(i=yn(t.children,r))?t.return=t.value+"{"+i+"}":""}var Sm=qa(Object.keys,Object),wm=Object.prototype,Bm=wm.hasOwnProperty;function Am(t){if(!wr(t))return Sm(t);var e=[];for(var i in Object(t))Bm.call(t,i)&&i!="constructor"&&e.push(i);return e}var Cn=Te(Wt,"DataView"),xn=Te(Wt,"Promise"),bn=Te(Wt,"Set"),Tn=Te(Wt,"WeakMap"),Ts="[object Map]",Lm="[object Object]",vs="[object Promise]",ks="[object Set]",Ss="[object WeakMap]",ws="[object DataView]",Fm=be(Cn),Em=be(yi),Om=be(xn),Mm=be(bn),Im=be(Tn),fe=je;(Cn&&fe(new Cn(new ArrayBuffer(1)))!=ws||yi&&fe(new yi)!=Ts||xn&&fe(xn.resolve())!=vs||bn&&fe(new bn)!=ks||Tn&&fe(new Tn)!=Ss)&&(fe=function(t){var e=je(t),i=e==Lm?t.constructor:void 0,r=i?be(i):"";if(r)switch(r){case Fm:return ws;case Em:return Ts;case Om:return vs;case Mm:return ks;case Im:return Ss}return e});var $m="[object Map]",Dm="[object Set]",Nm=Object.prototype,Rm=Nm.hasOwnProperty;function tn(t){if(t==null)return!0;if(Br(t)&&(ar(t)||typeof t=="string"||typeof t.splice=="function"||zn(t)||Wn(t)||sr(t)))return!t.length;var e=fe(t);if(e==$m||e==Dm)return!t.size;if(wr(t))return!Am(t).length;for(var i in t)if(Rm.call(t,i))return!1;return!0}const Yt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},E={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Un=function(t="fatal"){let e=Yt.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Yt&&(e=Yt[t])):typeof t=="number"&&(e=t),E.trace=()=>{},E.debug=()=>{},E.info=()=>{},E.warn=()=>{},E.error=()=>{},E.fatal=()=>{},e<=Yt.fatal&&(E.fatal=console.error?console.error.bind(console,bt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",bt("FATAL"))),e<=Yt.error&&(E.error=console.error?console.error.bind(console,bt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",bt("ERROR"))),e<=Yt.warn&&(E.warn=console.warn?console.warn.bind(console,bt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",bt("WARN"))),e<=Yt.info&&(E.info=console.info?console.info.bind(console,bt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",bt("INFO"))),e<=Yt.debug&&(E.debug=console.debug?console.debug.bind(console,bt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",bt("DEBUG"))),e<=Yt.trace&&(E.trace=console.debug?console.debug.bind(console,bt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",bt("TRACE")))},bt=t=>`%c${kh().format("ss.SSS")} : ${t} : `,wi=/<br\s*\/?>/gi,Pm=t=>t?nl(t).replace(/\\n/g,"#br#").split("#br#"):[""],qm=(()=>{let t=!1;return()=>{t||(zm(),t=!0)}})();function zm(){const t="data-temp-href-target";De.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")||"")}),De.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)||""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}const rl=t=>(qm(),De.sanitize(t)),Bs=(t,e)=>{var i;if(((i=e.flowchart)==null?void 0:i.htmlLabels)!==!1){const r=e.securityLevel;r==="antiscript"||r==="strict"?t=rl(t):r!=="loose"&&(t=nl(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=Um(t))}return t},Pe=(t,e)=>t&&(e.dompurifyConfig?t=De.sanitize(Bs(t,e),e.dompurifyConfig).toString():t=De.sanitize(Bs(t,e),{FORBID_TAGS:["style"]}).toString(),t),Wm=(t,e)=>typeof t=="string"?Pe(t,e):t.flat().map(i=>Pe(i,e)),Hm=t=>wi.test(t),jm=t=>t.split(wi),Um=t=>t.replace(/#br#/g,"<br/>"),nl=t=>t.replace(wi,"#br#"),Ym=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},ol=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Vm=function(...t){const e=t.filter(i=>!isNaN(i));return Math.max(...e)},Gm=function(...t){const e=t.filter(i=>!isNaN(i));return Math.min(...e)},Rb=function(t){const e=t.split(/(,)/),i=[];for(let r=0;r<e.length;r++){let n=e[r];if(n===","&&r>0&&r+1<e.length){const o=e[r-1],s=e[r+1];Xm(o,s)&&(n=o+","+s,r++,i.pop())}i.push(Km(n))}return i.join("")},vn=(t,e)=>Math.max(0,t.split(e).length-1),Xm=(t,e)=>{const i=vn(t,"~"),r=vn(e,"~");return i===1&&r===1},Km=t=>{const e=vn(t,"~");let i=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),i=!0);const r=[...t];let n=r.indexOf("~"),o=r.lastIndexOf("~");for(;n!==-1&&o!==-1&&n!==o;)r[n]="<",r[o]=">",n=r.indexOf("~"),o=r.lastIndexOf("~");return i&&r.unshift("~"),r.join("")},As=()=>window.MathMLElement!==void 0,kn=/\$\$(.*)\$\$/g,Ls=t=>{var e;return(((e=t.match(kn))==null?void 0:e.length)??0)>0},Pb=async(t,e)=>{const i=document.createElement("div");i.innerHTML=await Jm(t,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const r=document.querySelector("body");r==null||r.insertAdjacentElement("beforeend",i);const n={width:i.clientWidth,height:i.clientHeight};return i.remove(),n},Zm=async(t,e)=>{if(!Ls(t))return t;if(!As()&&!e.legacyMathML)return t.replace(kn,"MathML is unsupported in this environment.");const{default:i}=await K(async()=>{const{default:r}=await import("./katex.js");return{default:r}},[]);return t.split(wi).map(r=>Ls(r)?`
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
`:`<div>${r}</div>`).join("").replace(kn,(r,n)=>i.renderToString(n,{throwOnError:!0,displayMode:!0,output:As()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},Jm=async(t,e)=>Pe(await Zm(t,e),e),Yn={getRows:Pm,sanitizeText:Pe,sanitizeTextOrArray:Wm,hasBreaks:Hm,splitBreaks:jm,lineBreakRegex:wi,removeScript:rl,getUrl:Ym,evaluate:ol,getMax:Vm,getMin:Gm},ut=(t,e)=>e?g(t,{s:-40,l:10}):g(t,{s:-40,l:-10}),Fr="#ffffff",Er="#f2f2f2";let Qm=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var e,i,r,n,o,s,a,l,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||g(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||g(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ut(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?O(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=O(this["cScale"+p],75);else for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=O(this["cScale"+p],25);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||C(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||A(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||O(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=this["cScaleLabel"+p]||this.scaleLabelColor;const c=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||g(this.mainBkg,{h:180,s:-15,l:c*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||g(this.mainBkg,{h:180,s:-15,l:c*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||g(this.primaryColor,{h:64}),this.fillType3=this.fillType3||g(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||g(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||g(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||g(this.primaryColor,{h:128}),this.fillType7=this.fillType7||g(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||g(this.primaryColor,{l:-10}),this.pie5=this.pie5||g(this.secondaryColor,{l:-10}),this.pie6=this.pie6||g(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||g(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?A(this.quadrant1Fill):O(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((a=this.xyChart)==null?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?O(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||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(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||Fr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Er}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const t0=t=>{const e=new Qm;return e.calculate(t),e};let e0=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(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=A(C("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=li(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=O("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=O(this.sectionBkgColor,10),this.taskBorderColor=li(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=li(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,i,r,n,o,s,a,l,h,u,f;this.secondBkg=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=A(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=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=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(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||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330});for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||C(this["cScale"+c]);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScalePeer"+c]=this["cScalePeer"+c]||A(this["cScale"+c],10);for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||g(this.mainBkg,{h:30,s:-30,l:-(-10+c*4)}),this["surfacePeer"+c]=this["surfacePeer"+c]||g(this.mainBkg,{h:30,s:-30,l:-(-7+c*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleLabel"+c]=this["cScaleLabel"+c]||this.scaleLabelColor;for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["pie"+c]=this["cScale"+c];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?A(this.quadrant1Fill):O(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((a=this.xyChart)==null?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},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?O(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.secondaryColor,20),this.git1=A(this.pie2||this.secondaryColor,20),this.git2=A(this.pie3||this.tertiaryColor,20),this.git3=A(this.pie4||g(this.primaryColor,{h:-30}),20),this.git4=A(this.pie5||g(this.primaryColor,{h:-60}),20),this.git5=A(this.pie6||g(this.primaryColor,{h:-90}),10),this.git6=A(this.pie7||g(this.primaryColor,{h:60}),10),this.git7=A(this.pie8||g(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||A(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const i0=t=>{const e=new e0;return e.calculate(t),e};let r0=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=g(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(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.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=li(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,i,r,n,o,s,a,l,h,u,f;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||O(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||O(this.tertiaryColor,40);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScale"+c]=O(this["cScale"+c],10),this["cScalePeer"+c]=this["cScalePeer"+c]||O(this["cScale"+c],25);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||g(this["cScale"+c],{h:180});for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||g(this.mainBkg,{h:30,l:-(5+c*5)}),this["surfacePeer"+c]=this["surfacePeer"+c]||g(this.mainBkg,{h:30,l:-(7+c*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||C(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||C(this.labelTextColor);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleLabel"+c]=this["cScaleLabel"+c]||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=A(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||g(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||g(this.primaryColor,{l:-10}),this.pie5=this.pie5||g(this.secondaryColor,{l:-30}),this.pie6=this.pie6||g(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||g(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?A(this.quadrant1Fill):O(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((a=this.xyChart)==null?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)),this.gitInv0=this.gitInv0||O(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Er}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const n0=t=>{const e=new r0;return e.calculate(t),e};let o0=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=A("#cde498",10),this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(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.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,i,r,n,o,s,a,l,h,u,f;this.actorBorder=O(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||g(this.primaryColor,{h:30}),this.cScale4=this.cScale4||g(this.primaryColor,{h:60}),this.cScale5=this.cScale5||g(this.primaryColor,{h:90}),this.cScale6=this.cScale6||g(this.primaryColor,{h:120}),this.cScale7=this.cScale7||g(this.primaryColor,{h:150}),this.cScale8=this.cScale8||g(this.primaryColor,{h:210}),this.cScale9=this.cScale9||g(this.primaryColor,{h:270}),this.cScale10=this.cScale10||g(this.primaryColor,{h:300}),this.cScale11=this.cScale11||g(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||O(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||O(this.tertiaryColor,40);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScale"+c]=O(this["cScale"+c],10),this["cScalePeer"+c]=this["cScalePeer"+c]||O(this["cScale"+c],25);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||g(this["cScale"+c],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleLabel"+c]=this["cScaleLabel"+c]||this.scaleLabelColor;for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||g(this.mainBkg,{h:30,s:-30,l:-(5+c*5)}),this["surfacePeer"+c]=this["surfacePeer"+c]||g(this.mainBkg,{h:30,s:-30,l:-(8+c*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(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||g(this.primaryColor,{l:-30}),this.pie5=this.pie5||g(this.secondaryColor,{l:-30}),this.pie6=this.pie6||g(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||g(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||g(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||g(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||g(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||g(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||g(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?A(this.quadrant1Fill):O(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((a=this.xyChart)==null?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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||g(this.primaryColor,{h:-30}),this.git4=this.git4||g(this.primaryColor,{h:-60}),this.git5=this.git5||g(this.primaryColor,{h:-90}),this.git6=this.git6||g(this.primaryColor,{h:60}),this.git7=this.git7||g(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Er}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const s0=t=>{const e=new o0;return e.calculate(t),e};class a0{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=A(this.contrast,55),this.background="#ffffff",this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ut(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.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,i,r,n,o,s,a,l,h,u,f;this.secondBkg=A(this.contrast,55),this.border2=this.contrast,this.actorBorder=A(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||C(this["cScale"+c]);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this.darkMode?this["cScalePeer"+c]=this["cScalePeer"+c]||A(this["cScale"+c],10):this["cScalePeer"+c]=this["cScalePeer"+c]||O(this["cScale"+c],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleLabel"+c]=this["cScaleLabel"+c]||this.scaleLabelColor;for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||g(this.mainBkg,{l:-(5+c*5)}),this["surfacePeer"+c]=this["surfacePeer"+c]||g(this.mainBkg,{l:-(8+c*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=A(this.contrast,30),this.sectionBkgColor2=A(this.contrast,30),this.taskBorderColor=O(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=A(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=O(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=g(this.primaryColor,{h:64}),this.fillType3=g(this.secondaryColor,{h:64}),this.fillType4=g(this.primaryColor,{h:-64}),this.fillType5=g(this.secondaryColor,{h:-64}),this.fillType6=g(this.primaryColor,{h:128}),this.fillType7=g(this.secondaryColor,{h:128});for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["pie"+c]=this["cScale"+c];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||g(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||g(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||g(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||g(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||g(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||g(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||vi(this.quadrant1Fill)?A(this.quadrant1Fill):O(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((a=this.xyChart)==null?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},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=O(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||g(this.primaryColor,{h:-30}),this.git4=this.pie5||g(this.primaryColor,{h:-60}),this.git5=this.pie6||g(this.primaryColor,{h:-90}),this.git6=this.pie7||g(this.primaryColor,{h:60}),this.git7=this.pie8||g(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Er}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}}const l0=t=>{const e=new a0;return e.calculate(t),e},Xt={base:{getThemeVariables:t0},dark:{getThemeVariables:i0},default:{getThemeVariables:n0},forest:{getThemeVariables:s0},neutral:{getThemeVariables:l0}},Vt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},theme:"default",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges"],legacyMathML:!1,deterministicIds:!1,fontSize:16},sl={...Vt,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Xt.default.getThemeVariables(),sequence:{...Vt.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...Vt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Vt.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...Vt.pie,useWidth:984},xyChart:{...Vt.xyChart,useWidth:void 0},requirement:{...Vt.requirement,useWidth:void 0},gitGraph:{...Vt.gitGraph,useMaxWidth:!1},sankey:{...Vt.sankey,useMaxWidth:!1}},al=(t,e="")=>Object.keys(t).reduce((i,r)=>Array.isArray(t[r])?i:typeof t[r]=="object"&&t[r]!==null?[...i,e+r,...al(t[r],"")]:[...i,e+r],[]),h0=new Set(al(sl,"")),c0=sl,lr=t=>{if(E.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>lr(e));return}for(const e of Object.keys(t)){if(E.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!h0.has(e)||t[e]==null){E.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){E.debug("sanitizing object",e),lr(t[e]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const r of i)e.includes(r)&&(E.debug("sanitizing css option",e),t[e]=u0(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const i=t.themeVariables[e];i!=null&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}E.debug("After sanitization",t)}},u0=t=>{let e=0,i=0;for(const r of t){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";r==="{"?e++:r==="}"&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":t},ll=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ci=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,f0=/\s*%%.*\n/gm;class hl extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}}const qe={},Or=function(t,e){t=t.replace(ll,"").replace(ci,"").replace(f0,`
|
|
13
|
-
|
|
14
|
-
`,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),E.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let r;const n=[];for(;(r=ci.exec(t))!==null;)if(r.index===ci.lastIndex&&ci.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const o=r[1]?r[1]:r[2],s=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;n.push({type:o,args:s})}return n.length===0?{type:t,args:null}:n.length===1?n[0]:n}catch(i){return E.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},y0=function(t){return t.replace(ci,"")},C0=function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1};function x0(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return g0[i]??e}function b0(t,e){const i=t.trim();if(i)return e.securityLevel!=="loose"?wh.sanitizeUrl(i):i}const T0=(t,...e)=>{const i=t.split("."),r=i.length-1,n=i[r];let o=window;for(let s=0;s<r;s++)if(o=o[i[s]],!o){E.error(`Function name: ${t} not found in window`);return}o[n](...e)};function dl(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function v0(t){let e,i=0;t.forEach(n=>{i+=dl(n,e),e=n});const r=i/2;return Vn(t,r)}function k0(t){return t.length===1?t[0]:v0(t)}const Fs=(t,e=2)=>{const i=Math.pow(10,e);return Math.round(t*i)/i},Vn=(t,e)=>{let i,r=e;for(const n of t){if(i){const o=dl(n,i);if(o<r)r-=o;else{const s=r/o;if(s<=0)return i;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:Fs((1-s)*i.x+s*n.x,5),y:Fs((1-s)*i.y+s*n.y,5)}}}i=n}throw new Error("Could not find a suitable point for the given distance")},S0=(t,e,i)=>{E.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());const n=Vn(e,25),o=t?10:5,s=Math.atan2(e[0].y-n.y,e[0].x-n.x),a={x:0,y:0};return a.x=Math.sin(s)*o+(e[0].x+n.x)/2,a.y=-Math.cos(s)*o+(e[0].y+n.y)/2,a};function w0(t,e,i){const r=structuredClone(i);E.info("our points",r),e!=="start_left"&&e!=="start_right"&&r.reverse();const n=25+t,o=Vn(r,n),s=10+t*.5,a=Math.atan2(r[0].y-o.y,r[0].x-o.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(a+Math.PI)*s+(r[0].x+o.x)/2,l.y=-Math.cos(a+Math.PI)*s+(r[0].y+o.y)/2):e==="end_right"?(l.x=Math.sin(a-Math.PI)*s+(r[0].x+o.x)/2-5,l.y=-Math.cos(a-Math.PI)*s+(r[0].y+o.y)/2-5):e==="end_left"?(l.x=Math.sin(a)*s+(r[0].x+o.x)/2-5,l.y=-Math.cos(a)*s+(r[0].y+o.y)/2-5):(l.x=Math.sin(a)*s+(r[0].x+o.x)/2,l.y=-Math.cos(a)*s+(r[0].y+o.y)/2),l}function B0(t){let e="",i="";for(const r of t)r!==void 0&&(r.startsWith("color:")||r.startsWith("text-align:")?i=i+r+";":e=e+r+";");return{style:e,labelStyle:i}}let Es=0;const A0=()=>(Es++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Es);function L0(t){let e="";const i="0123456789abcdef",r=i.length;for(let n=0;n<t;n++)e+=i.charAt(Math.floor(Math.random()*r));return e}const F0=t=>L0(t.length),E0=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:""}},O0=function(t,e){const i=e.text.replace(Yn.lineBreakRegex," "),[,r]=Xn(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",r),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const o=n.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(i),n},M0=ki((t,e,i)=>{if(!t||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Yn.lineBreakRegex.test(t)))return t;const r=t.split(" "),n=[];let o="";return r.forEach((s,a)=>{const l=hr(`${s} `,i),h=hr(o,i);if(l>e){const{hyphenatedStrings:c,remainingWord:p}=I0(s,e,"-",i);n.push(o,...c),o=p}else h+l>=e?(n.push(o),o=s):o=[o,s].filter(Boolean).join(" ");a+1===r.length&&n.push(o)}),n.filter(s=>s!=="").join(i.joinWith)},(t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),I0=ki((t,e,i="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const n=[...t],o=[];let s="";return n.forEach((a,l)=>{const h=`${s}${a}`;if(hr(h,r)>=e){const f=l+1,c=n.length===f,p=`${h}${i}`;o.push(c?h:p),s=""}else s=h}),{hyphenatedStrings:o,remainingWord:s}},(t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function $0(t,e){return Gn(t,e).height}function hr(t,e){return Gn(t,e).width}const Gn=ki((t,e)=>{const{fontSize:i=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,o]=Xn(i),s=["sans-serif",r],a=t.split(Yn.lineBreakRegex),l=[],h=Tt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const c of s){let p=0;const _={width:0,height:0,lineHeight:0};for(const b of a){const k=E0();k.text=b||p0;const P=O0(u,k).style("font-size",o).style("font-weight",n).style("font-family",c),v=(P._groups||P)[0][0].getBBox();if(v.width===0&&v.height===0)throw new Error("svg element not in render tree");_.width=Math.round(Math.max(_.width,v.width)),p=Math.round(v.height),_.height+=p,_.lineHeight=Math.round(Math.max(_.lineHeight,p))}l.push(_)}u.remove();const f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`);class D0{constructor(e=!1,i){this.count=0,this.count=i?i.length:0,this.next=e?()=>this.count++:()=>Date.now()}}let Ri;const N0=function(t){return Ri=Ri||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ri.innerHTML=t,unescape(Ri.textContent)};function pl(t){return"str"in t}const R0=(t,e,i,r)=>{var n;if(!r)return;const o=(n=t.node())==null?void 0:n.getBBox();o&&t.append("text").text(r).attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},Xn=t=>{if(typeof t=="number")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]};function gl(t,e){return am({},t,e)}const ui={assignWithDepth:st,wrapLabel:M0,calculateTextHeight:$0,calculateTextWidth:hr,calculateTextDimensions:Gn,cleanAndMerge:gl,detectInit:_0,detectDirective:fl,isSubstringInArray:C0,interpolateToCurve:x0,calcLabelPosition:k0,calcCardinalityPosition:S0,calcTerminalLabelPosition:w0,formatUrl:b0,getStylesFromArray:B0,generateId:A0,random:F0,runFunc:T0,entityDecode:N0,insertTitle:R0,parseFontSize:Xn,InitIDGenerator:D0},P0=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){const r=i.substring(1,i.length-1);return/^\+?\d+$/.test(r)?"fl°°"+r+"¶ß":"fl°"+r+"¶ß"}),e},q0=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},Os="10.9.4",ze=Object.freeze(c0);let pt=st({},ze),ml,We=[],fi=st({},ze);const Mr=(t,e)=>{let i=st({},t),r={};for(const n of e)Cl(n),r=st(r,n);if(i=st(i,r),r.theme&&r.theme in Xt){const n=st({},ml),o=st(n.themeVariables||{},r.themeVariables);i.theme&&i.theme in Xt&&(i.themeVariables=Xt[i.theme].getThemeVariables(o))}return fi=i,xl(fi),fi},z0=t=>(pt=st({},ze),pt=st(pt,t),t.theme&&Xt[t.theme]&&(pt.themeVariables=Xt[t.theme].getThemeVariables(t.themeVariables)),Mr(pt,We),pt),W0=t=>{ml=st({},t)},H0=t=>(pt=st(pt,t),Mr(pt,We),pt),_l=()=>st({},pt),yl=t=>(xl(t),st(fi,t),qt()),qt=()=>st({},fi),Cl=t=>{t&&(["secure",...pt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(E.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=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&Cl(t[e])}))},j0=t=>{lr(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),We.push(t),Mr(pt,We)},cr=(t=pt)=>{We=[],Mr(t,We)},U0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ms={},Y0=t=>{Ms[t]||(E.warn(U0[t]),Ms[t]=!0)},xl=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Y0("LAZY_LOAD_DEPRECATED")},bl="c4",V0=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),G0=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./c4Diagram-15b5d702.js");return{diagram:e}},__vite__mapDeps([0,1,2,3]));return{id:bl,diagram:t}},X0={id:bl,detector:V0,loader:G0},K0=X0,Tl="flowchart",Z0=(t,e)=>{var i,r;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},J0=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./flowDiagram-cbd28bf7.js");return{diagram:e}},__vite__mapDeps([4,5,6,7,8,9,10,11,12,13,14,15,16,2,3]));return{id:Tl,diagram:t}},Q0={id:Tl,detector:Z0,loader:J0},t_=Q0,vl="flowchart-v2",e_=(t,e)=>{var i,r,n;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},i_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./flowDiagram-v2-ffc7f31a.js");return{diagram:e}},__vite__mapDeps([17,5,8,6,9,7,10,11,12,13,14,15,16,2,3]));return{id:vl,diagram:t}},r_={id:vl,detector:e_,loader:i_},n_=r_,kl="er",o_=t=>/^\s*erDiagram/.test(t),s_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./erDiagram-880f2ed8.js");return{diagram:e}},__vite__mapDeps([18,6,7,13,14,15,2,3]));return{id:kl,diagram:t}},a_={id:kl,detector:o_,loader:s_},l_=a_,Sl="gitGraph",h_=t=>/^\s*gitGraph/.test(t),c_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./gitGraphDiagram-21fc4d3e.js");return{diagram:e}},__vite__mapDeps([19,2,3]));return{id:Sl,diagram:t}},u_={id:Sl,detector:h_,loader:c_},f_=u_,wl="gantt",d_=t=>/^\s*gantt/.test(t),p_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./ganttDiagram-04f9e578.js");return{diagram:e}},__vite__mapDeps([20,21,22,2,3]));return{id:wl,diagram:t}},g_={id:wl,detector:d_,loader:p_},m_=g_,Bl="info",__=t=>/^\s*info/.test(t),y_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./infoDiagram-4a4f5b27.js");return{diagram:e}},__vite__mapDeps([23,2,3]));return{id:Bl,diagram:t}},C_={id:Bl,detector:__,loader:y_},Al="pie",x_=t=>/^\s*pie/.test(t),b_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./pieDiagram-421022e6.js");return{diagram:e}},__vite__mapDeps([24,25,15,26,22,14,2,3]));return{id:Al,diagram:t}},T_={id:Al,detector:x_,loader:b_},Ll="quadrantChart",v_=t=>/^\s*quadrantChart/.test(t),k_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./quadrantDiagram-0957ecba.js");return{diagram:e}},__vite__mapDeps([27,21,22,2,3]));return{id:Ll,diagram:t}},S_={id:Ll,detector:v_,loader:k_},w_=S_,Fl="xychart",B_=t=>/^\s*xychart-beta/.test(t),A_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./xychartDiagram-b6496bcd.js");return{diagram:e}},__vite__mapDeps([28,12,22,26,21,13,14,15,2,3]));return{id:Fl,diagram:t}},L_={id:Fl,detector:B_,loader:A_},F_=L_,El="requirement",E_=t=>/^\s*requirement(Diagram)?/.test(t),O_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./requirementDiagram-23d650b8.js");return{diagram:e}},__vite__mapDeps([29,6,7,13,14,15,2,3]));return{id:El,diagram:t}},M_={id:El,detector:E_,loader:O_},I_=M_,Ol="sequence",$_=t=>/^\s*sequenceDiagram/.test(t),D_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./sequenceDiagram-17ac3bff.js");return{diagram:e}},__vite__mapDeps([30,1,2,3]));return{id:Ol,diagram:t}},N_={id:Ol,detector:$_,loader:D_},R_=N_,Ml="class",P_=(t,e)=>{var i;return((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},q_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./classDiagram-d40c83e7.js");return{diagram:e}},__vite__mapDeps([31,32,6,7,13,14,15,2,3]));return{id:Ml,diagram:t}},z_={id:Ml,detector:P_,loader:q_},W_=z_,Il="classDiagram",H_=(t,e)=>{var i;return/^\s*classDiagram/.test(t)&&((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},j_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./classDiagram-v2-d5a6b087.js");return{diagram:e}},__vite__mapDeps([33,32,6,9,7,10,11,12,13,14,15,2,3]));return{id:Il,diagram:t}},U_={id:Il,detector:H_,loader:j_},Y_=U_,$l="state",V_=(t,e)=>{var i;return((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},G_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./stateDiagram-9c5f0230.js");return{diagram:e}},__vite__mapDeps([34,35,6,7,13,14,15,2,3]));return{id:$l,diagram:t}},X_={id:$l,detector:V_,loader:G_},K_=X_,Dl="stateDiagram",Z_=(t,e)=>{var i;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},J_=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./stateDiagram-v2-51a3dcff.js");return{diagram:e}},__vite__mapDeps([36,35,6,9,7,10,11,12,13,14,15,2,3]));return{id:Dl,diagram:t}},Q_={id:Dl,detector:Z_,loader:J_},ty=Q_,Nl="journey",ey=t=>/^\s*journey/.test(t),iy=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./journeyDiagram-29694f62.js");return{diagram:e}},__vite__mapDeps([37,1,25,15,2,3]));return{id:Nl,diagram:t}},ry={id:Nl,detector:ey,loader:iy},ny=ry,oy=function(t,e){for(let i of e)t.attr(i[0],i[1])},sy=function(t,e,i){let r=new Map;return i?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r},Rl=function(t,e,i,r){const n=sy(e,i,r);oy(t,n)},ay=function(t,e,i,r){const n=e.node().getBBox(),o=n.width,s=n.height;E.info(`SVG bounds: ${o}x${s}`,n);let a=0,l=0;E.info(`Graph bounds: ${a}x${l}`,t),a=o+i*2,l=s+i*2,E.info(`Calculated bounds: ${a}x${l}`),Rl(e,l,a,r);const h=`${n.x-i} ${n.y-i} ${n.width+2*i} ${n.height+2*i}`;e.attr("viewBox",h)},Gi={},ly=(t,e,i)=>{let r="";return t in Gi&&Gi[t]?r=Gi[t](i):E.warn(`No theme found for ${t}`),` & {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["dagre-6UL2VRFP.js","graph.js","_baseUniq.js","layout.js","_basePickBy.js","clone.js","index.js","index.css","cose-bilkent-S5V4N54A.js","cytoscape.esm.js","c4Diagram-YG6GDRKO.js","chunk-TZMSLE5B.js","flowDiagram-NV44I4VS.js","chunk-FMBD7UC4.js","chunk-55IACEB6.js","chunk-QN33PNHL.js","channel.js","erDiagram-Q2GNP2WA.js","gitGraphDiagram-NY62KEGX.js","chunk-4BX2VUAB.js","chunk-QZHKN3VN.js","treemap-KMMF4GRG.js","ganttDiagram-LVOFAZNH.js","linear.js","init.js","defaultLocale.js","infoDiagram-ER5ION4S.js","pieDiagram-ADFJNKIX.js","arc.js","ordinal.js","quadrantDiagram-AYHSOK5B.js","xychartDiagram-PRI3JC2R.js","requirementDiagram-UZGBJVZJ.js","sequenceDiagram-WL72ISMW.js","classDiagram-2ON5EDUG.js","chunk-B4BG7PRW.js","classDiagram-v2-WZHVMYZB.js","stateDiagram-FKZM4ZOC.js","chunk-DI55MBZ5.js","stateDiagram-v2-4FDKWEC3.js","journeyDiagram-XKPGCS4Q.js","timeline-definition-IT6M3QCI.js","mindmap-definition-VGOIOE7T.js","kanban-definition-3W4ZIXB7.js","sankeyDiagram-TZEHDZUN.js","diagram-S2PKOQOG.js","diagram-QEK2KX5R.js","blockDiagram-VD42YOAC.js","architectureDiagram-VXUJARFQ.js","diagram-PSM6KHXK.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Jm=Object.defineProperty;var t0=(e,t,r)=>t in e?Jm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var yt=(e,t,r)=>t0(e,typeof t!="symbol"?t+"":t,r);import{_ as gt}from"./index.js";function e0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yl={name:"mermaid",version:"11.12.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},va={exports:{}},r0=va.exports,Ul;function i0(){return Ul||(Ul=1,(function(e,t){(function(r,i){e.exports=i()})(r0,(function(){var r=1e3,i=6e4,a=36e5,n="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={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(M){var L=["th","st","nd","rd"],A=M%100;return"["+M+(L[(A-20)%10]||L[A]||L[0])+"]"}},C=function(M,L,A){var $=String(M);return!$||$.length>=L?M:""+Array(L+1-$.length).join(A)+M},v={s:C,z:function(M){var L=-M.utcOffset(),A=Math.abs(L),$=Math.floor(A/60),B=A%60;return(L<=0?"+":"-")+C($,2,"0")+":"+C(B,2,"0")},m:function M(L,A){if(L.date()<A.date())return-M(A,L);var $=12*(A.year()-L.year())+(A.month()-L.month()),B=L.clone().add($,u),W=A-B<0,V=L.clone().add($+(W?-1:1),u);return+(-($+(A-B)/(W?B-V:V-B))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:d,w:h,d:c,D:g,h:l,m:s,s:o,ms:n,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},w="en",_={};_[w]=b;var S="$isDayjsObject",D=function(M){return M instanceof z||!(!M||!M[S])},P=function M(L,A,$){var B;if(!L)return w;if(typeof L=="string"){var W=L.toLowerCase();_[W]&&(B=W),A&&(_[W]=A,B=W);var V=L.split("-");if(!B&&V.length>1)return M(V[0])}else{var H=L.name;_[H]=L,B=H}return!$&&B&&(w=B),B||!$&&w},R=function(M,L){if(D(M))return M.clone();var A=typeof L=="object"?L:{};return A.date=M,A.args=arguments,new z(A)},E=v;E.l=P,E.i=D,E.w=function(M,L){return R(M,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var z=(function(){function M(A){this.$L=P(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[S]=!0}var L=M.prototype;return L.parse=function(A){this.$d=(function($){var B=$.date,W=$.utc;if(B===null)return new Date(NaN);if(E.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var V=B.match(y);if(V){var H=V[2]-1||0,ut=(V[7]||"0").substring(0,3);return W?new Date(Date.UTC(V[1],H,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ut)):new Date(V[1],H,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ut)}}return new Date(B)})(A),this.init()},L.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},L.$utils=function(){return E},L.isValid=function(){return this.$d.toString()!==m},L.isSame=function(A,$){var B=R(A);return this.startOf($)<=B&&B<=this.endOf($)},L.isAfter=function(A,$){return R(A)<this.startOf($)},L.isBefore=function(A,$){return this.endOf($)<R(A)},L.$g=function(A,$,B){return E.u(A)?this[$]:this.set(B,A)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(A,$){var B=this,W=!!E.u($)||$,V=E.p(A),H=function(Ct,bt){var St=E.w(B.$u?Date.UTC(B.$y,bt,Ct):new Date(B.$y,bt,Ct),B);return W?St:St.endOf(c)},ut=function(Ct,bt){return E.w(B.toDate()[Ct].apply(B.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(bt)),B)},at=this.$W,mt=this.$M,st=this.$D,nt="set"+(this.$u?"UTC":"");switch(V){case d:return W?H(1,0):H(31,11);case u:return W?H(1,mt):H(0,mt+1);case h:var ct=this.$locale().weekStart||0,xt=(at<ct?at+7:at)-ct;return H(W?st-xt:st+(6-xt),mt);case c:case g:return ut(nt+"Hours",0);case l:return ut(nt+"Minutes",1);case s:return ut(nt+"Seconds",2);case o:return ut(nt+"Milliseconds",3);default:return this.clone()}},L.endOf=function(A){return this.startOf(A,!1)},L.$set=function(A,$){var B,W=E.p(A),V="set"+(this.$u?"UTC":""),H=(B={},B[c]=V+"Date",B[g]=V+"Date",B[u]=V+"Month",B[d]=V+"FullYear",B[l]=V+"Hours",B[s]=V+"Minutes",B[o]=V+"Seconds",B[n]=V+"Milliseconds",B)[W],ut=W===c?this.$D+($-this.$W):$;if(W===u||W===d){var at=this.clone().set(g,1);at.$d[H](ut),at.init(),this.$d=at.set(g,Math.min(this.$D,at.daysInMonth())).$d}else H&&this.$d[H](ut);return this.init(),this},L.set=function(A,$){return this.clone().$set(A,$)},L.get=function(A){return this[E.p(A)]()},L.add=function(A,$){var B,W=this;A=Number(A);var V=E.p($),H=function(mt){var st=R(W);return E.w(st.date(st.date()+Math.round(mt*A)),W)};if(V===u)return this.set(u,this.$M+A);if(V===d)return this.set(d,this.$y+A);if(V===c)return H(1);if(V===h)return H(7);var ut=(B={},B[s]=i,B[l]=a,B[o]=r,B)[V]||1,at=this.$d.getTime()+A*ut;return E.w(at,this)},L.subtract=function(A,$){return this.add(-1*A,$)},L.format=function(A){var $=this,B=this.$locale();if(!this.isValid())return B.invalidDate||m;var W=A||"YYYY-MM-DDTHH:mm:ssZ",V=E.z(this),H=this.$H,ut=this.$m,at=this.$M,mt=B.weekdays,st=B.months,nt=B.meridiem,ct=function(bt,St,le,ie){return bt&&(bt[St]||bt($,W))||le[St].slice(0,ie)},xt=function(bt){return E.s(H%12||12,bt,"0")},Ct=nt||function(bt,St,le){var ie=bt<12?"AM":"PM";return le?ie.toLowerCase():ie};return W.replace(x,(function(bt,St){return St||(function(le){switch(le){case"YY":return String($.$y).slice(-2);case"YYYY":return E.s($.$y,4,"0");case"M":return at+1;case"MM":return E.s(at+1,2,"0");case"MMM":return ct(B.monthsShort,at,st,3);case"MMMM":return ct(st,at);case"D":return $.$D;case"DD":return E.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ct(B.weekdaysMin,$.$W,mt,2);case"ddd":return ct(B.weekdaysShort,$.$W,mt,3);case"dddd":return mt[$.$W];case"H":return String(H);case"HH":return E.s(H,2,"0");case"h":return xt(1);case"hh":return xt(2);case"a":return Ct(H,ut,!0);case"A":return Ct(H,ut,!1);case"m":return String(ut);case"mm":return E.s(ut,2,"0");case"s":return String($.$s);case"ss":return E.s($.$s,2,"0");case"SSS":return E.s($.$ms,3,"0");case"Z":return V}return null})(bt)||V.replace(":","")}))},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(A,$,B){var W,V=this,H=E.p($),ut=R(A),at=(ut.utcOffset()-this.utcOffset())*i,mt=this-ut,st=function(){return E.m(V,ut)};switch(H){case d:W=st()/12;break;case u:W=st();break;case f:W=st()/3;break;case h:W=(mt-at)/6048e5;break;case c:W=(mt-at)/864e5;break;case l:W=mt/a;break;case s:W=mt/i;break;case o:W=mt/r;break;default:W=mt}return B?W:E.a(W)},L.daysInMonth=function(){return this.endOf(u).$D},L.$locale=function(){return _[this.$L]},L.locale=function(A,$){if(!A)return this.$L;var B=this.clone(),W=P(A,$,!0);return W&&(B.$L=W),B},L.clone=function(){return E.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},M})(),O=z.prototype;return R.prototype=O,[["$ms",n],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach((function(M){O[M[1]]=function(L){return this.$g(L,M[0],M[1])}})),R.extend=function(M,L){return M.$i||(M(L,z,R),M.$i=!0),R},R.locale=P,R.isDayjs=D,R.unix=function(M){return R(1e3*M)},R.en=_[w],R.Ls=_,R.p={},R}))})(va)),va.exports}var a0=i0();const n0=e0(a0);var Th=Object.defineProperty,p=(e,t)=>Th(e,"name",{value:t,configurable:!0}),s0=(e,t)=>{for(var r in t)Th(e,r,{get:t[r],enumerable:!0})},Me={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},F={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},So=p(function(e="fatal"){let t=Me.fatal;typeof e=="string"?e.toLowerCase()in Me&&(t=Me[e]):typeof e=="number"&&(t=e),F.trace=()=>{},F.debug=()=>{},F.info=()=>{},F.warn=()=>{},F.error=()=>{},F.fatal=()=>{},t<=Me.fatal&&(F.fatal=console.error?console.error.bind(console,ae("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ae("FATAL"))),t<=Me.error&&(F.error=console.error?console.error.bind(console,ae("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ae("ERROR"))),t<=Me.warn&&(F.warn=console.warn?console.warn.bind(console,ae("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ae("WARN"))),t<=Me.info&&(F.info=console.info?console.info.bind(console,ae("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ae("INFO"))),t<=Me.debug&&(F.debug=console.debug?console.debug.bind(console,ae("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ae("DEBUG"))),t<=Me.trace&&(F.trace=console.debug?console.debug.bind(console,ae("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ae("TRACE")))},"setLogLevel"),ae=p(e=>`%c${n0().format("ss.SSS")} : ${e} : `,"format");const Sa={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:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,n=2*r-a;switch(i){case"r":return Sa.hue2rgb(n,a,e+1/3)*255;case"g":return Sa.hue2rgb(n,a,e)*255;case"b":return Sa.hue2rgb(n,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),n=Math.min(e,t,r),o=(a+n)/2;if(i==="l")return o*100;if(a===n)return 0;const s=a-n,l=o>.5?s/(2-a-n):s/(a+n);if(i==="s")return l*100;switch(a){case e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},o0={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},l0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},it={channel:Sa,lang:o0,unit:l0},We={};for(let e=0;e<=255;e++)We[e]=it.unit.dec2hex(e);const It={ALL:0,RGB:1,HSL:2};class c0{constructor(){this.type=It.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=It.ALL}is(t){return this.type===t}}class h0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new c0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=It.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=it.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=it.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=it.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=it.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=it.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=it.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(It.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(It.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(It.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(It.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(It.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(It.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(It.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(It.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(It.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(It.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(It.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(It.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const wn=new h0({r:0,g:0,b:0,a:0},"transparent"),Or={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Or.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,n=a%4===0,o=a>4,s=o?1:17,l=o?8:4,c=n?0:-1,h=o?255:15;return wn.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:n?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${We[Math.round(t)]}${We[Math.round(r)]}${We[Math.round(i)]}${We[Math.round(a*255)]}`:`#${We[Math.round(t)]}${We[Math.round(r)]}${We[Math.round(i)]}`}},nr={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:e=>{const t=e.match(nr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return it.channel.clamp.h(parseFloat(r)*.9);case"rad":return it.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return it.channel.clamp.h(parseFloat(r)*360)}}return it.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(nr.re);if(!r)return;const[,i,a,n,o,s]=r;return wn.set({h:nr._hue2deg(i),s:it.channel.clamp.s(parseFloat(a)),l:it.channel.clamp.l(parseFloat(n)),a:o?it.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%, ${a})`:`hsl(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%)`}},Mi={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:e=>{e=e.toLowerCase();const t=Mi.colors[e];if(t)return Or.parse(t)},stringify:e=>{const t=Or.stringify(e);for(const r in Mi.colors)if(Mi.colors[r]===t)return r}},Ci={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:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ci.re);if(!r)return;const[,i,a,n,o,s,l,c,h]=r;return wn.set({r:it.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:it.channel.clamp.g(o?parseFloat(n)*2.55:parseFloat(n)),b:it.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?it.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)}, ${it.lang.round(a)})`:`rgb(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)})`}},ke={format:{keyword:Mi,hex:Or,rgb:Ci,rgba:Ci,hsl:nr,hsla:nr},parse:e=>{if(typeof e!="string")return e;const t=Or.parse(e)||Ci.parse(e)||nr.parse(e)||Mi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(It.HSL)||e.data.r===void 0?nr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ci.stringify(e):Or.stringify(e)},Ah=(e,t)=>{const r=ke.parse(e);for(const i in t)r[i]=it.channel.clamp[i](t[i]);return ke.stringify(r)},Ei=(e,t,r=0,i=1)=>{if(typeof e!="number")return Ah(e,{a:t});const a=wn.set({r:it.channel.clamp.r(e),g:it.channel.clamp.g(t),b:it.channel.clamp.b(r),a:it.channel.clamp.a(i)});return ke.stringify(a)},u0=e=>{const{r:t,g:r,b:i}=ke.parse(e),a=.2126*it.channel.toLinear(t)+.7152*it.channel.toLinear(r)+.0722*it.channel.toLinear(i);return it.lang.round(a)},f0=e=>u0(e)>=.5,Xi=e=>!f0(e),Lh=(e,t,r)=>{const i=ke.parse(e),a=i[t],n=it.channel.clamp[t](a+r);return a!==n&&(i[t]=n),ke.stringify(i)},j=(e,t)=>Lh(e,"l",t),J=(e,t)=>Lh(e,"l",-t),T=(e,t)=>{const r=ke.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return Ah(e,i)},d0=(e,t,r=50)=>{const{r:i,g:a,b:n,a:o}=ke.parse(e),{r:s,g:l,b:c,a:h}=ke.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+s*y,b=a*m+l*y,C=n*m+c*y,v=o*u+h*(1-u);return Ei(x,b,C,v)},N=(e,t=100)=>{const r=ke.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,d0(r,e,t)};/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:Bh,setPrototypeOf:Gl,isFrozen:p0,getPrototypeOf:g0,getOwnPropertyDescriptor:m0}=Object;let{freeze:Gt,seal:ne,create:Ss}=Object,{apply:Ts,construct:As}=typeof Reflect<"u"&&Reflect;Gt||(Gt=function(t){return t});ne||(ne=function(t){return t});Ts||(Ts=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),n=2;n<i;n++)a[n-2]=arguments[n];return t.apply(r,a)});As||(As=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const ua=Vt(Array.prototype.forEach),y0=Vt(Array.prototype.lastIndexOf),Vl=Vt(Array.prototype.pop),ci=Vt(Array.prototype.push),x0=Vt(Array.prototype.splice),Ta=Vt(String.prototype.toLowerCase),as=Vt(String.prototype.toString),ns=Vt(String.prototype.match),hi=Vt(String.prototype.replace),b0=Vt(String.prototype.indexOf),_0=Vt(String.prototype.trim),ce=Vt(Object.prototype.hasOwnProperty),Ht=Vt(RegExp.prototype.test),ui=C0(TypeError);function Vt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Ts(e,t,i)}}function C0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return As(e,r)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ta;Gl&&Gl(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const n=r(a);n!==a&&(p0(t)||(t[i]=n),a=n)}e[a]=!0}return e}function w0(e){for(let t=0;t<e.length;t++)ce(e,t)||(e[t]=null);return e}function $e(e){const t=Ss(null);for(const[r,i]of Bh(e))ce(e,r)&&(Array.isArray(i)?t[r]=w0(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=$e(i):t[r]=i);return t}function fi(e,t){for(;e!==null;){const i=m0(e,t);if(i){if(i.get)return Vt(i.get);if(typeof i.value=="function")return Vt(i.value)}e=g0(e)}function r(){return null}return r}const Xl=Gt(["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"]),ss=Gt(["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"]),os=Gt(["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"]),k0=Gt(["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"]),ls=Gt(["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"]),v0=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Zl=Gt(["#text"]),Kl=Gt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),cs=Gt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ql=Gt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),fa=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),S0=ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm),T0=ne(/<%[\w\W]*|[\w\W]*%>/gm),A0=ne(/\$\{[\w\W]*/gm),L0=ne(/^data-[\-\w.\u00B7-\uFFFF]+$/),B0=ne(/^aria-[\-\w]+$/),Mh=ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),M0=ne(/^(?:\w+script|data):/i),E0=ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Eh=ne(/^html$/i),$0=ne(/^[a-z][.\w]*(-[.\w]+)+$/i);var Jl=Object.freeze({__proto__:null,ARIA_ATTR:B0,ATTR_WHITESPACE:E0,CUSTOM_ELEMENT:$0,DATA_ATTR:L0,DOCTYPE_NAME:Eh,ERB_EXPR:T0,IS_ALLOWED_URI:Mh,IS_SCRIPT_OR_DATA:M0,MUSTACHE_EXPR:S0,TMPLIT_EXPR:A0});const di={element:1,text:3,progressingInstruction:7,comment:8,document:9},F0=function(){return typeof window>"u"?null:window},D0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const n="dompurify"+(i?"#"+i:"");try{return t.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},tc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $h(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F0();const t=Q=>$h(Q);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==di.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=l.prototype,m=fi(g,"cloneNode"),y=fi(g,"remove"),x=fi(g,"nextSibling"),b=fi(g,"childNodes"),C=fi(g,"parentNode");if(typeof o=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let v,w="";const{implementation:_,createNodeIterator:S,createDocumentFragment:D,getElementsByTagName:P}=r,{importNode:R}=i;let E=tc();t.isSupported=typeof Bh=="function"&&typeof C=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:O,TMPLIT_EXPR:M,DATA_ATTR:L,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:W}=Jl;let{IS_ALLOWED_URI:V}=Jl,H=null;const ut=ot({},[...Xl,...ss,...os,...ls,...Zl]);let at=null;const mt=ot({},[...Kl,...cs,...Ql,...fa]);let st=Object.seal(Ss(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}})),nt=null,ct=null;const xt=Object.seal(Ss(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ct=!0,bt=!0,St=!1,le=!0,ie=!1,ze=!0,Je=!1,Xn=!1,Zn=!1,vr=!1,na=!1,sa=!1,Al=!0,Ll=!1;const Ym="user-content-";let Kn=!0,oi=!1,Sr={},Tr=null;const Bl=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ml=null;const El=ot({},["audio","video","img","source","image","track"]);let Qn=null;const $l=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oa="http://www.w3.org/1998/Math/MathML",la="http://www.w3.org/2000/svg",Ae="http://www.w3.org/1999/xhtml";let Ar=Ae,Jn=!1,ts=null;const Um=ot({},[oa,la,Ae],as);let ca=ot({},["mi","mo","mn","ms","mtext"]),ha=ot({},["annotation-xml"]);const Gm=ot({},["title","style","font","a","script"]);let li=null;const Vm=["application/xhtml+xml","text/html"],Xm="text/html";let $t=null,Lr=null;const Zm=r.createElement("form"),Fl=function(k){return k instanceof RegExp||k instanceof Function},es=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Lr&&Lr===k)){if((!k||typeof k!="object")&&(k={}),k=$e(k),li=Vm.indexOf(k.PARSER_MEDIA_TYPE)===-1?Xm:k.PARSER_MEDIA_TYPE,$t=li==="application/xhtml+xml"?as:Ta,H=ce(k,"ALLOWED_TAGS")?ot({},k.ALLOWED_TAGS,$t):ut,at=ce(k,"ALLOWED_ATTR")?ot({},k.ALLOWED_ATTR,$t):mt,ts=ce(k,"ALLOWED_NAMESPACES")?ot({},k.ALLOWED_NAMESPACES,as):Um,Qn=ce(k,"ADD_URI_SAFE_ATTR")?ot($e($l),k.ADD_URI_SAFE_ATTR,$t):$l,Ml=ce(k,"ADD_DATA_URI_TAGS")?ot($e(El),k.ADD_DATA_URI_TAGS,$t):El,Tr=ce(k,"FORBID_CONTENTS")?ot({},k.FORBID_CONTENTS,$t):Bl,nt=ce(k,"FORBID_TAGS")?ot({},k.FORBID_TAGS,$t):$e({}),ct=ce(k,"FORBID_ATTR")?ot({},k.FORBID_ATTR,$t):$e({}),Sr=ce(k,"USE_PROFILES")?k.USE_PROFILES:!1,Ct=k.ALLOW_ARIA_ATTR!==!1,bt=k.ALLOW_DATA_ATTR!==!1,St=k.ALLOW_UNKNOWN_PROTOCOLS||!1,le=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=k.SAFE_FOR_TEMPLATES||!1,ze=k.SAFE_FOR_XML!==!1,Je=k.WHOLE_DOCUMENT||!1,vr=k.RETURN_DOM||!1,na=k.RETURN_DOM_FRAGMENT||!1,sa=k.RETURN_TRUSTED_TYPE||!1,Zn=k.FORCE_BODY||!1,Al=k.SANITIZE_DOM!==!1,Ll=k.SANITIZE_NAMED_PROPS||!1,Kn=k.KEEP_CONTENT!==!1,oi=k.IN_PLACE||!1,V=k.ALLOWED_URI_REGEXP||Mh,Ar=k.NAMESPACE||Ae,ca=k.MATHML_TEXT_INTEGRATION_POINTS||ca,ha=k.HTML_INTEGRATION_POINTS||ha,st=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&Fl(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&Fl(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ie&&(bt=!1),na&&(vr=!0),Sr&&(H=ot({},Zl),at=[],Sr.html===!0&&(ot(H,Xl),ot(at,Kl)),Sr.svg===!0&&(ot(H,ss),ot(at,cs),ot(at,fa)),Sr.svgFilters===!0&&(ot(H,os),ot(at,cs),ot(at,fa)),Sr.mathMl===!0&&(ot(H,ls),ot(at,Ql),ot(at,fa))),k.ADD_TAGS&&(typeof k.ADD_TAGS=="function"?xt.tagCheck=k.ADD_TAGS:(H===ut&&(H=$e(H)),ot(H,k.ADD_TAGS,$t))),k.ADD_ATTR&&(typeof k.ADD_ATTR=="function"?xt.attributeCheck=k.ADD_ATTR:(at===mt&&(at=$e(at)),ot(at,k.ADD_ATTR,$t))),k.ADD_URI_SAFE_ATTR&&ot(Qn,k.ADD_URI_SAFE_ATTR,$t),k.FORBID_CONTENTS&&(Tr===Bl&&(Tr=$e(Tr)),ot(Tr,k.FORBID_CONTENTS,$t)),Kn&&(H["#text"]=!0),Je&&ot(H,["html","head","body"]),H.table&&(ot(H,["tbody"]),delete nt.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw ui('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ui('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=k.TRUSTED_TYPES_POLICY,w=v.createHTML("")}else v===void 0&&(v=D0(d,a)),v!==null&&typeof w=="string"&&(w=v.createHTML(""));Gt&&Gt(k),Lr=k}},Dl=ot({},[...ss,...os,...k0]),Ol=ot({},[...ls,...v0]),Km=function(k){let I=C(k);(!I||!I.tagName)&&(I={namespaceURI:Ar,tagName:"template"});const Z=Ta(k.tagName),wt=Ta(I.tagName);return ts[k.namespaceURI]?k.namespaceURI===la?I.namespaceURI===Ae?Z==="svg":I.namespaceURI===oa?Z==="svg"&&(wt==="annotation-xml"||ca[wt]):!!Dl[Z]:k.namespaceURI===oa?I.namespaceURI===Ae?Z==="math":I.namespaceURI===la?Z==="math"&&ha[wt]:!!Ol[Z]:k.namespaceURI===Ae?I.namespaceURI===la&&!ha[wt]||I.namespaceURI===oa&&!ca[wt]?!1:!Ol[Z]&&(Gm[Z]||!Dl[Z]):!!(li==="application/xhtml+xml"&&ts[k.namespaceURI]):!1},ye=function(k){ci(t.removed,{element:k});try{C(k).removeChild(k)}catch{y(k)}},tr=function(k,I){try{ci(t.removed,{attribute:I.getAttributeNode(k),from:I})}catch{ci(t.removed,{attribute:null,from:I})}if(I.removeAttribute(k),k==="is")if(vr||na)try{ye(I)}catch{}else try{I.setAttribute(k,"")}catch{}},Rl=function(k){let I=null,Z=null;if(Zn)k="<remove></remove>"+k;else{const Tt=ns(k,/^[\r\n\t ]+/);Z=Tt&&Tt[0]}li==="application/xhtml+xml"&&Ar===Ae&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const wt=v?v.createHTML(k):k;if(Ar===Ae)try{I=new f().parseFromString(wt,li)}catch{}if(!I||!I.documentElement){I=_.createDocument(Ar,"template",null);try{I.documentElement.innerHTML=Jn?w:wt}catch{}}const Rt=I.body||I.documentElement;return k&&Z&&Rt.insertBefore(r.createTextNode(Z),Rt.childNodes[0]||null),Ar===Ae?P.call(I,Je?"html":"body")[0]:Je?I.documentElement:Rt},Il=function(k){return S.call(k.ownerDocument||k,k,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},rs=function(k){return k instanceof u&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof h)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},Pl=function(k){return typeof s=="function"&&k instanceof s};function Le(Q,k,I){ua(Q,Z=>{Z.call(t,k,I,Lr)})}const Nl=function(k){let I=null;if(Le(E.beforeSanitizeElements,k,null),rs(k))return ye(k),!0;const Z=$t(k.nodeName);if(Le(E.uponSanitizeElement,k,{tagName:Z,allowedTags:H}),ze&&k.hasChildNodes()&&!Pl(k.firstElementChild)&&Ht(/<[/\w!]/g,k.innerHTML)&&Ht(/<[/\w!]/g,k.textContent)||k.nodeType===di.progressingInstruction||ze&&k.nodeType===di.comment&&Ht(/<[/\w]/g,k.data))return ye(k),!0;if(!(xt.tagCheck instanceof Function&&xt.tagCheck(Z))&&(!H[Z]||nt[Z])){if(!nt[Z]&&Wl(Z)&&(st.tagNameCheck instanceof RegExp&&Ht(st.tagNameCheck,Z)||st.tagNameCheck instanceof Function&&st.tagNameCheck(Z)))return!1;if(Kn&&!Tr[Z]){const wt=C(k)||k.parentNode,Rt=b(k)||k.childNodes;if(Rt&&wt){const Tt=Rt.length;for(let Xt=Tt-1;Xt>=0;--Xt){const Be=m(Rt[Xt],!0);Be.__removalCount=(k.__removalCount||0)+1,wt.insertBefore(Be,x(k))}}}return ye(k),!0}return k instanceof l&&!Km(k)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&Ht(/<\/no(script|embed|frames)/i,k.innerHTML)?(ye(k),!0):(ie&&k.nodeType===di.text&&(I=k.textContent,ua([z,O,M],wt=>{I=hi(I,wt," ")}),k.textContent!==I&&(ci(t.removed,{element:k.cloneNode()}),k.textContent=I)),Le(E.afterSanitizeElements,k,null),!1)},zl=function(k,I,Z){if(Al&&(I==="id"||I==="name")&&(Z in r||Z in Zm))return!1;if(!(bt&&!ct[I]&&Ht(L,I))){if(!(Ct&&Ht(A,I))){if(!(xt.attributeCheck instanceof Function&&xt.attributeCheck(I,k))){if(!at[I]||ct[I]){if(!(Wl(k)&&(st.tagNameCheck instanceof RegExp&&Ht(st.tagNameCheck,k)||st.tagNameCheck instanceof Function&&st.tagNameCheck(k))&&(st.attributeNameCheck instanceof RegExp&&Ht(st.attributeNameCheck,I)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(I,k))||I==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&Ht(st.tagNameCheck,Z)||st.tagNameCheck instanceof Function&&st.tagNameCheck(Z))))return!1}else if(!Qn[I]){if(!Ht(V,hi(Z,B,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&k!=="script"&&b0(Z,"data:")===0&&Ml[k])){if(!(St&&!Ht($,hi(Z,B,"")))){if(Z)return!1}}}}}}}return!0},Wl=function(k){return k!=="annotation-xml"&&ns(k,W)},ql=function(k){Le(E.beforeSanitizeAttributes,k,null);const{attributes:I}=k;if(!I||rs(k))return;const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:at,forceKeepAttr:void 0};let wt=I.length;for(;wt--;){const Rt=I[wt],{name:Tt,namespaceURI:Xt,value:Be}=Rt,Br=$t(Tt),is=Be;let Ft=Tt==="value"?is:_0(is);if(Z.attrName=Br,Z.attrValue=Ft,Z.keepAttr=!0,Z.forceKeepAttr=void 0,Le(E.uponSanitizeAttribute,k,Z),Ft=Z.attrValue,Ll&&(Br==="id"||Br==="name")&&(tr(Tt,k),Ft=Ym+Ft),ze&&Ht(/((--!?|])>)|<\/(style|title|textarea)/i,Ft)){tr(Tt,k);continue}if(Br==="attributename"&&ns(Ft,"href")){tr(Tt,k);continue}if(Z.forceKeepAttr)continue;if(!Z.keepAttr){tr(Tt,k);continue}if(!le&&Ht(/\/>/i,Ft)){tr(Tt,k);continue}ie&&ua([z,O,M],jl=>{Ft=hi(Ft,jl," ")});const Hl=$t(k.nodeName);if(!zl(Hl,Br,Ft)){tr(Tt,k);continue}if(v&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Xt)switch(d.getAttributeType(Hl,Br)){case"TrustedHTML":{Ft=v.createHTML(Ft);break}case"TrustedScriptURL":{Ft=v.createScriptURL(Ft);break}}if(Ft!==is)try{Xt?k.setAttributeNS(Xt,Tt,Ft):k.setAttribute(Tt,Ft),rs(k)?ye(k):Vl(t.removed)}catch{tr(Tt,k)}}Le(E.afterSanitizeAttributes,k,null)},Qm=function Q(k){let I=null;const Z=Il(k);for(Le(E.beforeSanitizeShadowDOM,k,null);I=Z.nextNode();)Le(E.uponSanitizeShadowNode,I,null),Nl(I),ql(I),I.content instanceof n&&Q(I.content);Le(E.afterSanitizeShadowDOM,k,null)};return t.sanitize=function(Q){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,Z=null,wt=null,Rt=null;if(Jn=!Q,Jn&&(Q="<!-->"),typeof Q!="string"&&!Pl(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw ui("dirty is not a string, aborting")}else throw ui("toString is not a function");if(!t.isSupported)return Q;if(Xn||es(k),t.removed=[],typeof Q=="string"&&(oi=!1),oi){if(Q.nodeName){const Be=$t(Q.nodeName);if(!H[Be]||nt[Be])throw ui("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof s)I=Rl("<!---->"),Z=I.ownerDocument.importNode(Q,!0),Z.nodeType===di.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?I=Z:I.appendChild(Z);else{if(!vr&&!ie&&!Je&&Q.indexOf("<")===-1)return v&&sa?v.createHTML(Q):Q;if(I=Rl(Q),!I)return vr?null:sa?w:""}I&&Zn&&ye(I.firstChild);const Tt=Il(oi?Q:I);for(;wt=Tt.nextNode();)Nl(wt),ql(wt),wt.content instanceof n&&Qm(wt.content);if(oi)return Q;if(vr){if(na)for(Rt=D.call(I.ownerDocument);I.firstChild;)Rt.appendChild(I.firstChild);else Rt=I;return(at.shadowroot||at.shadowrootmode)&&(Rt=R.call(i,Rt,!0)),Rt}let Xt=Je?I.outerHTML:I.innerHTML;return Je&&H["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Ht(Eh,I.ownerDocument.doctype.name)&&(Xt="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
3
|
+
`+Xt),ie&&ua([z,O,M],Be=>{Xt=hi(Xt,Be," ")}),v&&sa?v.createHTML(Xt):Xt},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};es(Q),Xn=!0},t.clearConfig=function(){Lr=null,Xn=!1},t.isValidAttribute=function(Q,k,I){Lr||es({});const Z=$t(Q),wt=$t(k);return zl(Z,wt,I)},t.addHook=function(Q,k){typeof k=="function"&&ci(E[Q],k)},t.removeHook=function(Q,k){if(k!==void 0){const I=y0(E[Q],k);return I===-1?void 0:x0(E[Q],I,1)[0]}return Vl(E[Q])},t.removeHooks=function(Q){E[Q]=[]},t.removeAllHooks=function(){E=tc()},t}var Ur=$h(),Fh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,$i=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,O0=/\s*%%.*\n/gm,Pr,Dh=(Pr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Pr,"UnknownDiagramError"),Pr),fr={},To=p(function(e,t){e=e.replace(Fh,"").replace($i,"").replace(O0,`
|
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(fr))if(i(e,t))return r;throw new Dh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ls=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Oh(t,r,i)},"registerLazyLoadedDiagrams"),Oh=p((e,t,r)=>{fr[e]&&F.warn(`Detector with key ${e} already exists. Overwriting.`),fr[e]={detector:t,loader:r},F.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),R0=p(e=>fr[e].loader,"getDiagramLoader"),Bs=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(n=>Bs(e,n,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(n=>{e.includes(n)||e.push(n)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(n=>{typeof t[n]=="object"&&(e[n]===void 0||typeof e[n]=="object")?(e[n]===void 0&&(e[n]=Array.isArray(t[n])?[]:{}),e[n]=Bs(e[n],t[n],{depth:r-1,clobber:i})):(i||typeof e[n]!="object"&&typeof t[n]!="object")&&(e[n]=t[n])}),e)},"assignWithDepth"),Bt=Bs,kn="#ffffff",vn="#f2f2f2",jt=p((e,t)=>t?T(e,{s:-40,l:10}):T(e,{s:-40,l:-10}),"mkBorder"),Nr,I0=(Nr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,C,v,w,_;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||T(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||T(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?J(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||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||J(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||j(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||J(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10)):(this.rowOdd=this.rowOdd||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||j(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.darkMode)for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=J(this["cScale"+S],75);else for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=J(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||N(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||j(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||J(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||T(this.mainBkg,{h:180,s:-15,l:t*(5+S*3)}),this["surfacePeer"+S]=this["surfacePeer"+S]||T(this.mainBkg,{h:180,s:-15,l:t*(8+S*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||T(this.primaryColor,{h:64}),this.fillType3=this.fillType3||T(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||T(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||T(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||T(this.primaryColor,{h:128}),this.fillType7=this.fillType7||T(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||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-10}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((C=this.xyChart)==null?void 0:C.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||kn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Nr,"Theme"),Nr),P0=p(e=>{const t=new I0;return t.calculate(e),t},"getThemeVariables"),zr,N0=(zr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=j(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=j(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ei(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=J("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=J(this.sectionBkgColor,10),this.taskBorderColor=Ei(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ei(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||j(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,C,v,w;this.secondBkg=j(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=j(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=j(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||N(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScalePeer"+_]=this["cScalePeer"+_]||j(this["cScale"+_],10);for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||T(this.mainBkg,{h:30,s:-30,l:-(-10+_*4)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(this.mainBkg,{h:30,s:-30,l:-(-7+_*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.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:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((C=this.radar)==null?void 0:C.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((w=this.radar)==null?void 0:w.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=j(this.secondaryColor,20),this.git1=j(this.pie2||this.secondaryColor,20),this.git2=j(this.pie3||this.tertiaryColor,20),this.git3=j(this.pie4||T(this.primaryColor,{h:-30}),20),this.git4=j(this.pie5||T(this.primaryColor,{h:-60}),20),this.git5=j(this.pie6||T(this.primaryColor,{h:-90}),10),this.git6=j(this.pie7||T(this.primaryColor,{h:60}),10),this.git7=j(this.pie8||T(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||j(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||j(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(zr,"Theme"),zr),z0=p(e=>{const t=new N0;return t.calculate(e),t},"getThemeVariables"),Wr,W0=(Wr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=T(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ei(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,C,v,w;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=J(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||J(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||T(this["cScale"+_],{h:180});for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||T(this.mainBkg,{h:30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(this.mainBkg,{h:30,l:-(7+_*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||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=j(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||j(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||j(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||T(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||T(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((C=this.xyChart)==null?void 0:C.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||J(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vn}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Wr,"Theme"),Wr),q0=p(e=>{const t=new W0;return t.calculate(e),t},"getThemeVariables"),qr,H0=(qr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=j("#cde498",10),this.primaryBorderColor=jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,C,v,w;this.actorBorder=J(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=J(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||J(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||T(this["cScale"+_],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||T(this.mainBkg,{h:30,s:-30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(this.mainBkg,{h:30,s:-30,l:-(8+_*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||j(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{l:-30}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((C=this.xyChart)==null?void 0:C.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(qr,"Theme"),qr),j0=p(e=>{const t=new H0;return t.calculate(e),t},"getThemeVariables"),Hr,Y0=(Hr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=j(this.contrast,55),this.background="#ffffff",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,C,v,w;this.secondBkg=j(this.contrast,55),this.border2=this.contrast,this.actorBorder=j(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||N(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||j(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||J(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||T(this.mainBkg,{l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(this.mainBkg,{l:-(8+_*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=j(this.contrast,30),this.sectionBkgColor2=j(this.contrast,30),this.taskBorderColor=J(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=j(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=J(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((C=this.radar)==null?void 0:C.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((w=this.radar)==null?void 0:w.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=J(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||T(this.primaryColor,{h:-30}),this.git4=this.pie5||T(this.primaryColor,{h:-60}),this.git5=this.pie6||T(this.primaryColor,{h:-90}),this.git6=this.pie7||T(this.primaryColor,{h:60}),this.git7=this.pie8||T(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Hr,"Theme"),Hr),U0=p(e=>{const t=new Y0;return t.calculate(e),t},"getThemeVariables"),Oe={base:{getThemeVariables:P0},dark:{getThemeVariables:z0},default:{getThemeVariables:q0},forest:{getThemeVariables:j0},neutral:{getThemeVariables:U0}},xe={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Rh={...xe,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Oe.default.getThemeVariables(),sequence:{...xe.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...xe.gantt,tickInterval:void 0,useWidth:void 0},c4:{...xe.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...xe.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...xe.pie,useWidth:984},xyChart:{...xe.xyChart,useWidth:void 0},requirement:{...xe.requirement,useWidth:void 0},packet:{...xe.packet},radar:{...xe.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Ih=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Ih(e[i],"")]:[...r,t+i],[]),"keyify"),G0=new Set(Ih(Rh,"")),Ph=Rh,Na=p(e=>{if(F.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Na(t));return}for(const t of Object.keys(e)){if(F.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!G0.has(t)||e[t]==null){F.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){F.debug("sanitizing object",t),Na(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(F.debug("sanitizing css option",t),e[t]=V0(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}F.debug("After sanitization",e)}},"sanitizeDirective"),V0=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Gr=Object.freeze(Ph),Kt=Bt({},Gr),za,dr=[],Fi=Bt({},Gr),Sn=p((e,t)=>{let r=Bt({},e),i={};for(const a of t)Wh(a),i=Bt(i,a);if(r=Bt(r,i),i.theme&&i.theme in Oe){const a=Bt({},za),n=Bt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Oe&&(r.themeVariables=Oe[r.theme].getThemeVariables(n))}return Fi=r,qh(Fi),Fi},"updateCurrentConfig"),X0=p(e=>(Kt=Bt({},Gr),Kt=Bt(Kt,e),e.theme&&Oe[e.theme]&&(Kt.themeVariables=Oe[e.theme].getThemeVariables(e.themeVariables)),Sn(Kt,dr),Kt),"setSiteConfig"),Z0=p(e=>{za=Bt({},e)},"saveConfigFromInitialize"),K0=p(e=>(Kt=Bt(Kt,e),Sn(Kt,dr),Kt),"updateSiteConfig"),Nh=p(()=>Bt({},Kt),"getSiteConfig"),zh=p(e=>(qh(e),Bt(Fi,e),Nt()),"setConfig"),Nt=p(()=>Bt({},Fi),"getConfig"),Wh=p(e=>{e&&(["secure",...Kt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(F.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Wh(e[t])}))},"sanitize"),Q0=p(e=>{var t;Na(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),dr.push(e),Sn(Kt,dr)},"addDirective"),Wa=p((e=Kt)=>{dr=[],Sn(e,dr)},"reset"),J0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ec={},ty=p(e=>{ec[e]||(F.warn(J0[e]),ec[e]=!0)},"issueWarning"),qh=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ty("LAZY_LOAD_DEPRECATED")},"checkConfig"),KL=p(()=>{let e={};za&&(e=Bt(e,za));for(const t of dr)e=Bt(e,t);return e},"getUserDefinedConfig"),Zi=/<br\s*\/?>/gi,ey=p(e=>e?Yh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ry=(()=>{let e=!1;return()=>{e||(Hh(),e=!0)}})();function Hh(){const e="data-temp-href-target";Ur.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ur.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Hh,"setupDompurifyHooks");var jh=p(e=>(ry(),Ur.sanitize(e)),"removeScript"),rc=p((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=jh(e):i!=="loose"&&(e=Yh(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=sy(e))}return e},"sanitizeMore"),se=p((e,t)=>e&&(t.dompurifyConfig?e=Ur.sanitize(rc(e,t),t.dompurifyConfig).toString():e=Ur.sanitize(rc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),iy=p((e,t)=>typeof e=="string"?se(e,t):e.flat().map(r=>se(r,t)),"sanitizeTextOrArray"),ay=p(e=>Zi.test(e),"hasBreaks"),ny=p(e=>e.split(Zi),"splitBreaks"),sy=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Yh=p(e=>e.replace(Zi,"#br#"),"breakToPlaceholder"),oy=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Et=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ly=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),cy=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ic=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const n=t[i-1],o=t[i+1];hy(n,o)&&(a=n+","+o,i++,r.pop())}r.push(uy(a))}return r.join("")},"parseGenericTypes"),Ms=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),hy=p((e,t)=>{const r=Ms(e,"~"),i=Ms(t,"~");return r===1&&i===1},"shouldCombineSets"),uy=p(e=>{const t=Ms(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;a!==-1&&n!==-1&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ac=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Es=/\$\$(.*)\$\$/g,Vr=p(e=>{var t;return(((t=e.match(Es))==null?void 0:t.length)??0)>0},"hasKatex"),QL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ao(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),fy=p(async(e,t)=>{if(!Vr(e))return e;if(!(ac()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Es,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:a}=await import("./katex.js");return{default:a}},[]),i=t.forceLegacyMathML||!ac()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Zi).map(a=>Vr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Es,(a,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ao=p(async(e,t)=>se(await fy(e,t),t),"renderKatexSanitized"),ei={getRows:ey,sanitizeText:se,sanitizeTextOrArray:iy,hasBreaks:ay,splitBreaks:ny,lineBreakRegex:Zi,removeScript:jh,getUrl:oy,evaluate:Et,getMax:ly,getMin:cy},dy=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),py=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Uh=p(function(e,t,r,i){const a=py(t,r,i);dy(e,a)},"configureSvgSize"),gy=p(function(e,t,r,i){const a=t.node().getBBox(),n=a.width,o=a.height;F.info(`SVG bounds: ${n}x${o}`,a);let s=0,l=0;F.info(`Graph bounds: ${s}x${l}`,e),s=n+r*2,l=o+r*2,F.info(`Calculated bounds: ${s}x${l}`),Uh(t,l,s,i);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Aa={},my=p((e,t,r)=>{let i="";return e in Aa&&Aa[e]?i=Aa[e](r):F.warn(`No theme found for ${e}`),` & {
|
|
5
|
+
font-family: ${r.fontFamily};
|
|
6
|
+
font-size: ${r.fontSize};
|
|
7
|
+
fill: ${r.textColor}
|
|
8
|
+
}
|
|
9
|
+
@keyframes edge-animation-frame {
|
|
10
|
+
from {
|
|
11
|
+
stroke-dashoffset: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@keyframes dash {
|
|
15
|
+
to {
|
|
16
|
+
stroke-dashoffset: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
& .edge-animation-slow {
|
|
20
|
+
stroke-dasharray: 9,5 !important;
|
|
21
|
+
stroke-dashoffset: 900;
|
|
22
|
+
animation: dash 50s linear infinite;
|
|
23
|
+
stroke-linecap: round;
|
|
24
|
+
}
|
|
25
|
+
& .edge-animation-fast {
|
|
26
|
+
stroke-dasharray: 9,5 !important;
|
|
27
|
+
stroke-dashoffset: 900;
|
|
28
|
+
animation: dash 20s linear infinite;
|
|
29
|
+
stroke-linecap: round;
|
|
18
30
|
}
|
|
19
|
-
|
|
20
31
|
/* Classes common for multiple diagrams */
|
|
21
32
|
|
|
22
33
|
& .error-icon {
|
|
23
|
-
fill: ${
|
|
34
|
+
fill: ${r.errorBkgColor};
|
|
24
35
|
}
|
|
25
36
|
& .error-text {
|
|
26
|
-
fill: ${
|
|
27
|
-
stroke: ${
|
|
37
|
+
fill: ${r.errorTextColor};
|
|
38
|
+
stroke: ${r.errorTextColor};
|
|
28
39
|
}
|
|
29
40
|
|
|
30
41
|
& .edge-thickness-normal {
|
|
31
|
-
stroke-width:
|
|
42
|
+
stroke-width: 1px;
|
|
32
43
|
}
|
|
33
44
|
& .edge-thickness-thick {
|
|
34
45
|
stroke-width: 3.5px
|
|
@@ -36,7 +47,10 @@ import{_ as K}from"./index.js";var wb=typeof globalThis<"u"?globalThis:typeof wi
|
|
|
36
47
|
& .edge-pattern-solid {
|
|
37
48
|
stroke-dasharray: 0;
|
|
38
49
|
}
|
|
39
|
-
|
|
50
|
+
& .edge-thickness-invisible {
|
|
51
|
+
stroke-width: 0;
|
|
52
|
+
fill: none;
|
|
53
|
+
}
|
|
40
54
|
& .edge-pattern-dashed{
|
|
41
55
|
stroke-dasharray: 3;
|
|
42
56
|
}
|
|
@@ -45,47 +59,198 @@ import{_ as K}from"./index.js";var wb=typeof globalThis<"u"?globalThis:typeof wi
|
|
|
45
59
|
}
|
|
46
60
|
|
|
47
61
|
& .marker {
|
|
48
|
-
fill: ${
|
|
49
|
-
stroke: ${
|
|
62
|
+
fill: ${r.lineColor};
|
|
63
|
+
stroke: ${r.lineColor};
|
|
50
64
|
}
|
|
51
65
|
& .marker.cross {
|
|
52
|
-
stroke: ${
|
|
66
|
+
stroke: ${r.lineColor};
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
& svg {
|
|
56
|
-
font-family: ${
|
|
57
|
-
font-size: ${
|
|
70
|
+
font-family: ${r.fontFamily};
|
|
71
|
+
font-size: ${r.fontSize};
|
|
58
72
|
}
|
|
73
|
+
& p {
|
|
74
|
+
margin: 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${i}
|
|
78
|
+
|
|
79
|
+
${t}
|
|
80
|
+
`},"getStyles"),yy=p((e,t)=>{t!==void 0&&(Aa[e]=t)},"addStylesForDiagram"),xy=my,Gh={};s0(Gh,{clear:()=>by,getAccDescription:()=>ky,getAccTitle:()=>Cy,getDiagramTitle:()=>Sy,setAccDescription:()=>wy,setAccTitle:()=>_y,setDiagramTitle:()=>vy});var Lo="",Bo="",Mo="",Eo=p(e=>se(e,Nt()),"sanitizeText"),by=p(()=>{Lo="",Mo="",Bo=""},"clear"),_y=p(e=>{Lo=Eo(e).replace(/^\s+/g,"")},"setAccTitle"),Cy=p(()=>Lo,"getAccTitle"),wy=p(e=>{Mo=Eo(e).replace(/\n\s+/g,`
|
|
81
|
+
`)},"setAccDescription"),ky=p(()=>Mo,"getAccDescription"),vy=p(e=>{Bo=Eo(e)},"setDiagramTitle"),Sy=p(()=>Bo,"getDiagramTitle"),nc=F,Ty=So,dt=Nt,JL=zh,tB=Gr,$o=p(e=>se(e,dt()),"sanitizeText"),Ay=gy,Ly=p(()=>Gh,"getCommonDb"),qa={},Ha=p((e,t,r)=>{var i;qa[e]&&nc.warn(`Diagram with id ${e} already registered. Overwriting.`),qa[e]=t,r&&Oh(e,r),yy(e,t.styles),(i=t.injectUtils)==null||i.call(t,nc,Ty,dt,$o,Ay,Ly(),()=>{})},"registerDiagram"),$s=p(e=>{if(e in qa)return qa[e];throw new By(e)},"getDiagram"),jr,By=(jr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(jr,"DiagramNotFoundError"),jr),My={value:()=>{}};function Vh(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new La(r)}function La(e){this._=e}function Ey(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}La.prototype=Vh.prototype={constructor:La,on:function(e,t){var r=this._,i=Ey(e+"",r),a,n=-1,o=i.length;if(arguments.length<2){for(;++n<o;)if((a=(e=i[n]).type)&&(a=$y(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++n<o;)if(a=(e=i[n]).type)r[a]=sc(r[a],e.name,t);else if(t==null)for(a in r)r[a]=sc(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new La(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,n;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(n=this._[e],i=0,a=n.length;i<a;++i)n[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,n=i.length;a<n;++a)i[a].value.apply(t,r)}};function $y(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function sc(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=My,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Fs="http://www.w3.org/1999/xhtml";const oc={svg:"http://www.w3.org/2000/svg",xhtml:Fs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Tn(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),oc.hasOwnProperty(t)?{space:oc[t],local:e}:e}function Fy(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Fs&&t.documentElement.namespaceURI===Fs?t.createElement(e):t.createElementNS(r,e)}}function Dy(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Xh(e){var t=Tn(e);return(t.local?Dy:Fy)(t)}function Oy(){}function Fo(e){return e==null?Oy:function(){return this.querySelector(e)}}function Ry(e){typeof e!="function"&&(e=Fo(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=new Array(o),l,c,h=0;h<o;++h)(l=n[h])&&(c=e.call(l,l.__data__,h,n))&&("__data__"in l&&(c.__data__=l.__data__),s[h]=c);return new re(i,this._parents)}function Iy(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Py(){return[]}function Zh(e){return e==null?Py:function(){return this.querySelectorAll(e)}}function Ny(e){return function(){return Iy(e.apply(this,arguments))}}function zy(e){typeof e=="function"?e=Ny(e):e=Zh(e);for(var t=this._groups,r=t.length,i=[],a=[],n=0;n<r;++n)for(var o=t[n],s=o.length,l,c=0;c<s;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),a.push(l));return new re(i,a)}function Kh(e){return function(){return this.matches(e)}}function Qh(e){return function(t){return t.matches(e)}}var Wy=Array.prototype.find;function qy(e){return function(){return Wy.call(this.children,e)}}function Hy(){return this.firstElementChild}function jy(e){return this.select(e==null?Hy:qy(typeof e=="function"?e:Qh(e)))}var Yy=Array.prototype.filter;function Uy(){return Array.from(this.children)}function Gy(e){return function(){return Yy.call(this.children,e)}}function Vy(e){return this.selectAll(e==null?Uy:Gy(typeof e=="function"?e:Qh(e)))}function Xy(e){typeof e!="function"&&(e=Kh(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=[],l,c=0;c<o;++c)(l=n[c])&&e.call(l,l.__data__,c,n)&&s.push(l);return new re(i,this._parents)}function Jh(e){return new Array(e.length)}function Zy(){return new re(this._enter||this._groups.map(Jh),this._parents)}function ja(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ja.prototype={constructor:ja,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ky(e){return function(){return e}}function Qy(e,t,r,i,a,n){for(var o=0,s,l=t.length,c=n.length;o<c;++o)(s=t[o])?(s.__data__=n[o],i[o]=s):r[o]=new ja(e,n[o]);for(;o<l;++o)(s=t[o])&&(a[o]=s)}function Jy(e,t,r,i,a,n,o){var s,l,c=new Map,h=t.length,u=n.length,f=new Array(h),d;for(s=0;s<h;++s)(l=t[s])&&(f[s]=d=o.call(l,l.__data__,s,t)+"",c.has(d)?a[s]=l:c.set(d,l));for(s=0;s<u;++s)d=o.call(e,n[s],s,n)+"",(l=c.get(d))?(i[s]=l,l.__data__=n[s],c.delete(d)):r[s]=new ja(e,n[s]);for(s=0;s<h;++s)(l=t[s])&&c.get(f[s])===l&&(a[s]=l)}function tx(e){return e.__data__}function ex(e,t){if(!arguments.length)return Array.from(this,tx);var r=t?Jy:Qy,i=this._parents,a=this._groups;typeof e!="function"&&(e=Ky(e));for(var n=a.length,o=new Array(n),s=new Array(n),l=new Array(n),c=0;c<n;++c){var h=i[c],u=a[c],f=u.length,d=rx(e.call(h,h&&h.__data__,c,i)),g=d.length,m=s[c]=new Array(g),y=o[c]=new Array(g),x=l[c]=new Array(f);r(h,u,m,y,x,d,t);for(var b=0,C=0,v,w;b<g;++b)if(v=m[b]){for(b>=C&&(C=b+1);!(w=y[C])&&++C<g;);v._next=w||null}}return o=new re(o,i),o._enter=s,o._exit=l,o}function rx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ix(){return new re(this._exit||this._groups.map(Jh),this._parents)}function ax(e,t,r){var i=this.enter(),a=this,n=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?n.remove():r(n),i&&a?i.merge(a).order():a}function nx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,n=i.length,o=Math.min(a,n),s=new Array(a),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,f=s[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(f[g]=d);for(;l<a;++l)s[l]=r[l];return new re(s,this._parents)}function sx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,n=i[a],o;--a>=0;)(o=i[a])&&(n&&o.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(o,n),n=o);return this}function ox(e){e||(e=lx);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,a=new Array(i),n=0;n<i;++n){for(var o=r[n],s=o.length,l=a[n]=new Array(s),c,h=0;h<s;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new re(a,this._parents).order()}function lx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function cx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function hx(){return Array.from(this)}function ux(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,n=i.length;a<n;++a){var o=i[a];if(o)return o}return null}function fx(){let e=0;for(const t of this)++e;return e}function dx(){return!this.node()}function px(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],n=0,o=a.length,s;n<o;++n)(s=a[n])&&e.call(s,s.__data__,n,a);return this}function gx(e){return function(){this.removeAttribute(e)}}function mx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yx(e,t){return function(){this.setAttribute(e,t)}}function xx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function bx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function _x(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Cx(e,t){var r=Tn(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?mx:gx:typeof t=="function"?r.local?_x:bx:r.local?xx:yx)(r,t))}function tu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function wx(e){return function(){this.style.removeProperty(e)}}function kx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function vx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Sx(e,t,r){return arguments.length>1?this.each((t==null?wx:typeof t=="function"?vx:kx)(e,t,r??"")):Xr(this.node(),e)}function Xr(e,t){return e.style.getPropertyValue(t)||tu(e).getComputedStyle(e,null).getPropertyValue(t)}function Tx(e){return function(){delete this[e]}}function Ax(e,t){return function(){this[e]=t}}function Lx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Bx(e,t){return arguments.length>1?this.each((t==null?Tx:typeof t=="function"?Lx:Ax)(e,t)):this.node()[e]}function eu(e){return e.trim().split(/^|\s+/)}function Do(e){return e.classList||new ru(e)}function ru(e){this._node=e,this._names=eu(e.getAttribute("class")||"")}ru.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function iu(e,t){for(var r=Do(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function au(e,t){for(var r=Do(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function Mx(e){return function(){iu(this,e)}}function Ex(e){return function(){au(this,e)}}function $x(e,t){return function(){(t.apply(this,arguments)?iu:au)(this,e)}}function Fx(e,t){var r=eu(e+"");if(arguments.length<2){for(var i=Do(this.node()),a=-1,n=r.length;++a<n;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?$x:t?Mx:Ex)(r,t))}function Dx(){this.textContent=""}function Ox(e){return function(){this.textContent=e}}function Rx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ix(e){return arguments.length?this.each(e==null?Dx:(typeof e=="function"?Rx:Ox)(e)):this.node().textContent}function Px(){this.innerHTML=""}function Nx(e){return function(){this.innerHTML=e}}function zx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Wx(e){return arguments.length?this.each(e==null?Px:(typeof e=="function"?zx:Nx)(e)):this.node().innerHTML}function qx(){this.nextSibling&&this.parentNode.appendChild(this)}function Hx(){return this.each(qx)}function jx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Yx(){return this.each(jx)}function Ux(e){var t=typeof e=="function"?e:Xh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Gx(){return null}function Vx(e,t){var r=typeof e=="function"?e:Xh(e),i=t==null?Gx:typeof t=="function"?t:Fo(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Xx(){var e=this.parentNode;e&&e.removeChild(this)}function Zx(){return this.each(Xx)}function Kx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Qx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Jx(e){return this.select(e?Qx:Kx)}function tb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function eb(e){return function(t){e.call(this,t,this.__data__)}}function rb(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function ib(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,n;r<a;++r)n=t[r],(!e.type||n.type===e.type)&&n.name===e.name?this.removeEventListener(n.type,n.listener,n.options):t[++i]=n;++i?t.length=i:delete this.__on}}}function ab(e,t,r){return function(){var i=this.__on,a,n=eb(t);if(i){for(var o=0,s=i.length;o<s;++o)if((a=i[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=n,a.options=r),a.value=t;return}}this.addEventListener(e.type,n,r),a={type:e.type,name:e.name,value:t,listener:n,options:r},i?i.push(a):this.__on=[a]}}function nb(e,t,r){var i=rb(e+""),a,n=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,h;l<c;++l)for(a=0,h=s[l];a<n;++a)if((o=i[a]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?ab:ib,a=0;a<n;++a)this.each(s(i[a],t,r));return this}function nu(e,t,r){var i=tu(e),a=i.CustomEvent;typeof a=="function"?a=new a(t,r):(a=i.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function sb(e,t){return function(){return nu(this,e,t)}}function ob(e,t){return function(){return nu(this,e,t.apply(this,arguments))}}function lb(e,t){return this.each((typeof t=="function"?ob:sb)(e,t))}function*cb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,n=i.length,o;a<n;++a)(o=i[a])&&(yield o)}var su=[null];function re(e,t){this._groups=e,this._parents=t}function Ki(){return new re([[document.documentElement]],su)}function hb(){return this}re.prototype=Ki.prototype={constructor:re,select:Ry,selectAll:zy,selectChild:jy,selectChildren:Vy,filter:Xy,data:ex,enter:Zy,exit:ix,join:ax,merge:nx,selection:hb,order:sx,sort:ox,call:cx,nodes:hx,node:ux,size:fx,empty:dx,each:px,attr:Cx,style:Sx,property:Bx,classed:Fx,text:Ix,html:Wx,raise:Hx,lower:Yx,append:Ux,insert:Vx,remove:Zx,clone:Jx,datum:tb,on:nb,dispatch:lb,[Symbol.iterator]:cb};function ht(e){return typeof e=="string"?new re([[document.querySelector(e)]],[document.documentElement]):new re([[e]],su)}function Oo(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ou(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Qi(){}var Ri=.7,Ya=1/Ri,Rr="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ub=/^#([0-9a-f]{3,8})$/,fb=new RegExp(`^rgb\\(${Rr},${Rr},${Rr}\\)$`),db=new RegExp(`^rgb\\(${we},${we},${we}\\)$`),pb=new RegExp(`^rgba\\(${Rr},${Rr},${Rr},${Ii}\\)$`),gb=new RegExp(`^rgba\\(${we},${we},${we},${Ii}\\)$`),mb=new RegExp(`^hsl\\(${Ii},${we},${we}\\)$`),yb=new RegExp(`^hsla\\(${Ii},${we},${we},${Ii}\\)$`),lc={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};Oo(Qi,Pi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cc,formatHex:cc,formatHex8:xb,formatHsl:bb,formatRgb:hc,toString:hc});function cc(){return this.rgb().formatHex()}function xb(){return this.rgb().formatHex8()}function bb(){return lu(this).formatHsl()}function hc(){return this.rgb().formatRgb()}function Pi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ub.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?uc(t):r===3?new Jt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?da(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?da(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=fb.exec(e))?new Jt(t[1],t[2],t[3],1):(t=db.exec(e))?new Jt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pb.exec(e))?da(t[1],t[2],t[3],t[4]):(t=gb.exec(e))?da(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mb.exec(e))?pc(t[1],t[2]/100,t[3]/100,1):(t=yb.exec(e))?pc(t[1],t[2]/100,t[3]/100,t[4]):lc.hasOwnProperty(e)?uc(lc[e]):e==="transparent"?new Jt(NaN,NaN,NaN,0):null}function uc(e){return new Jt(e>>16&255,e>>8&255,e&255,1)}function da(e,t,r,i){return i<=0&&(e=t=r=NaN),new Jt(e,t,r,i)}function _b(e){return e instanceof Qi||(e=Pi(e)),e?(e=e.rgb(),new Jt(e.r,e.g,e.b,e.opacity)):new Jt}function Ds(e,t,r,i){return arguments.length===1?_b(e):new Jt(e,t,r,i??1)}function Jt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Oo(Jt,Ds,ou(Qi,{brighter(e){return e=e==null?Ya:Math.pow(Ya,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Jt(hr(this.r),hr(this.g),hr(this.b),Ua(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:fc,formatHex:fc,formatHex8:Cb,formatRgb:dc,toString:dc}));function fc(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}function Cb(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function dc(){const e=Ua(this.opacity);return`${e===1?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${e===1?")":`, ${e})`}`}function Ua(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sr(e){return e=hr(e),(e<16?"0":"")+e.toString(16)}function pc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new fe(e,t,r,i)}function lu(e){if(e instanceof fe)return new fe(e.h,e.s,e.l,e.opacity);if(e instanceof Qi||(e=Pi(e)),!e)return new fe;if(e instanceof fe)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(t,r,i),n=Math.max(t,r,i),o=NaN,s=n-a,l=(n+a)/2;return s?(t===n?o=(r-i)/s+(r<i)*6:r===n?o=(i-t)/s+2:o=(t-r)/s+4,s/=l<.5?n+a:2-n-a,o*=60):s=l>0&&l<1?0:o,new fe(o,s,l,e.opacity)}function wb(e,t,r,i){return arguments.length===1?lu(e):new fe(e,t,r,i??1)}function fe(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Oo(fe,wb,ou(Qi,{brighter(e){return e=e==null?Ya:Math.pow(Ya,e),new fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new fe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,a=2*r-i;return new Jt(hs(e>=240?e-240:e+120,a,i),hs(e,a,i),hs(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new fe(gc(this.h),pa(this.s),pa(this.l),Ua(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 e=Ua(this.opacity);return`${e===1?"hsl(":"hsla("}${gc(this.h)}, ${pa(this.s)*100}%, ${pa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gc(e){return e=(e||0)%360,e<0?e+360:e}function pa(e){return Math.max(0,Math.min(1,e||0))}function hs(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Ro=e=>()=>e;function cu(e,t){return function(r){return e+r*t}}function kb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function eB(e,t){var r=t-e;return r?cu(e,r>180||r<-180?r-360*Math.round(r/360):r):Ro(isNaN(e)?t:e)}function vb(e){return(e=+e)==1?hu:function(t,r){return r-t?kb(t,r,e):Ro(isNaN(t)?r:t)}}function hu(e,t){var r=t-e;return r?cu(e,r):Ro(isNaN(e)?t:e)}const mc=(function e(t){var r=vb(t);function i(a,n){var o=r((a=Ds(a)).r,(n=Ds(n)).r),s=r(a.g,n.g),l=r(a.b,n.b),c=hu(a.opacity,n.opacity);return function(h){return a.r=o(h),a.g=s(h),a.b=l(h),a.opacity=c(h),a+""}}return i.gamma=e,i})(1);function qe(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Os=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,us=new RegExp(Os.source,"g");function Sb(e){return function(){return e}}function Tb(e){return function(t){return e(t)+""}}function Ab(e,t){var r=Os.lastIndex=us.lastIndex=0,i,a,n,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=Os.exec(e))&&(a=us.exec(t));)(n=a.index)>r&&(n=t.slice(r,n),s[o]?s[o]+=n:s[++o]=n),(i=i[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:qe(i,a)})),r=us.lastIndex;return r<t.length&&(n=t.slice(r),s[o]?s[o]+=n:s[++o]=n),s.length<2?l[0]?Tb(l[0].x):Sb(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)s[(u=l[h]).i]=u.x(c);return s.join("")})}var yc=180/Math.PI,Rs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uu(e,t,r,i,a,n){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:a,translateY:n,rotate:Math.atan2(t,e)*yc,skewX:Math.atan(l)*yc,scaleX:o,scaleY:s}}var ga;function Lb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Rs:uu(t.a,t.b,t.c,t.d,t.e,t.f)}function Bb(e){return e==null||(ga||(ga=document.createElementNS("http://www.w3.org/2000/svg","g")),ga.setAttribute("transform",e),!(e=ga.transform.baseVal.consolidate()))?Rs:(e=e.matrix,uu(e.a,e.b,e.c,e.d,e.e,e.f))}function fu(e,t,r,i){function a(c){return c.length?c.pop()+" ":""}function n(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:qe(c,u)},{i:m-2,x:qe(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(a(u)+"rotate(",null,i)-2,x:qe(c,h)})):h&&u.push(a(u)+"rotate("+h+i)}function s(c,h,u,f){c!==h?f.push({i:u.push(a(u)+"skewX(",null,i)-2,x:qe(c,h)}):h&&u.push(a(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push(a(d)+"scale(",null,",",null,")");g.push({i:m-4,x:qe(c,u)},{i:m-2,x:qe(h,f)})}else(u!==1||f!==1)&&d.push(a(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),n(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),s(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,m=f.length,y;++g<m;)u[(y=f[g]).i]=y.x(d);return u.join("")}}}var Mb=fu(Lb,"px, ","px)","deg)"),Eb=fu(Bb,", ",")",")"),Zr=0,wi=0,pi=0,du=1e3,Ga,ki,Va=0,pr=0,An=0,Ni=typeof performance=="object"&&performance.now?performance:Date,pu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Io(){return pr||(pu($b),pr=Ni.now()+An)}function $b(){pr=0}function Xa(){this._call=this._time=this._next=null}Xa.prototype=gu.prototype={constructor:Xa,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Io():+r)+(t==null?0:+t),!this._next&&ki!==this&&(ki?ki._next=this:Ga=this,ki=this),this._call=e,this._time=r,Is()},stop:function(){this._call&&(this._call=null,this._time=1/0,Is())}};function gu(e,t,r){var i=new Xa;return i.restart(e,t,r),i}function Fb(){Io(),++Zr;for(var e=Ga,t;e;)(t=pr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zr}function xc(){pr=(Va=Ni.now())+An,Zr=wi=0;try{Fb()}finally{Zr=0,Ob(),pr=0}}function Db(){var e=Ni.now(),t=e-Va;t>du&&(An-=t,Va=e)}function Ob(){for(var e,t=Ga,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Ga=r);ki=e,Is(i)}function Is(e){if(!Zr){wi&&(wi=clearTimeout(wi));var t=e-pr;t>24?(e<1/0&&(wi=setTimeout(xc,e-Ni.now()-An)),pi&&(pi=clearInterval(pi))):(pi||(Va=Ni.now(),pi=setInterval(Db,du)),Zr=1,pu(xc))}}function bc(e,t,r){var i=new Xa;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var Rb=Vh("start","end","cancel","interrupt"),Ib=[],mu=0,_c=1,Ps=2,Ba=3,Cc=4,Ns=5,Ma=6;function Ln(e,t,r,i,a,n){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;Pb(e,r,{name:t,index:i,group:a,on:Rb,tween:Ib,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:mu})}function Po(e,t){var r=me(e,t);if(r.state>mu)throw new Error("too late; already scheduled");return r}function Se(e,t){var r=me(e,t);if(r.state>Ba)throw new Error("too late; already running");return r}function me(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Pb(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=gu(n,0,r.time);function n(c){r.state=_c,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,d;if(r.state!==_c)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Ba)return bc(o);d.state===Cc?(d.state=Ma,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Ma,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(bc(function(){r.state===Ba&&(r.state=Cc,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=Ps,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ps){for(r.state=Ba,a=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(a[++u]=d);a.length=u+1}}function s(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Ns,1),u=-1,f=a.length;++u<f;)a[u].call(e,h);r.state===Ns&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Ma,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Nb(e,t){var r=e.__transition,i,a,n=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){n=!1;continue}a=i.state>Ps&&i.state<Ns,i.state=Ma,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}n&&delete e.__transition}}function zb(e){return this.each(function(){Nb(this,e)})}function Wb(e,t){var r,i;return function(){var a=Se(this,e),n=a.tween;if(n!==r){i=r=n;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}a.tween=i}}function qb(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var n=Se(this,e),o=n.tween;if(o!==i){a=(i=o).slice();for(var s={name:t,value:r},l=0,c=a.length;l<c;++l)if(a[l].name===t){a[l]=s;break}l===c&&a.push(s)}n.tween=a}}function Hb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=me(this.node(),r).tween,a=0,n=i.length,o;a<n;++a)if((o=i[a]).name===e)return o.value;return null}return this.each((t==null?Wb:qb)(r,e,t))}function No(e,t,r){var i=e._id;return e.each(function(){var a=Se(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return me(a,i).value[t]}}function yu(e,t){var r;return(typeof t=="number"?qe:t instanceof Pi?mc:(r=Pi(t))?(t=r,mc):Ab)(e,t)}function jb(e){return function(){this.removeAttribute(e)}}function Yb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ub(e,t,r){var i,a=r+"",n;return function(){var o=this.getAttribute(e);return o===a?null:o===i?n:n=t(i=o,r)}}function Gb(e,t,r){var i,a=r+"",n;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===i?n:n=t(i=o,r)}}function Vb(e,t,r){var i,a,n;return function(){var o,s=r(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+"",o===l?null:o===i&&l===a?n:(a=l,n=t(i=o,s)))}}function Xb(e,t,r){var i,a,n;return function(){var o,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+"",o===l?null:o===i&&l===a?n:(a=l,n=t(i=o,s)))}}function Zb(e,t){var r=Tn(e),i=r==="transform"?Eb:yu;return this.attrTween(e,typeof t=="function"?(r.local?Xb:Vb)(r,i,No(this,"attr."+e,t)):t==null?(r.local?Yb:jb)(r):(r.local?Gb:Ub)(r,i,t))}function Kb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Qb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Jb(e,t){var r,i;function a(){var n=t.apply(this,arguments);return n!==i&&(r=(i=n)&&Qb(e,n)),r}return a._value=t,a}function t1(e,t){var r,i;function a(){var n=t.apply(this,arguments);return n!==i&&(r=(i=n)&&Kb(e,n)),r}return a._value=t,a}function e1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Tn(e);return this.tween(r,(i.local?Jb:t1)(i,t))}function r1(e,t){return function(){Po(this,e).delay=+t.apply(this,arguments)}}function i1(e,t){return t=+t,function(){Po(this,e).delay=t}}function a1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?r1:i1)(t,e)):me(this.node(),t).delay}function n1(e,t){return function(){Se(this,e).duration=+t.apply(this,arguments)}}function s1(e,t){return t=+t,function(){Se(this,e).duration=t}}function o1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?n1:s1)(t,e)):me(this.node(),t).duration}function l1(e,t){if(typeof t!="function")throw new Error;return function(){Se(this,e).ease=t}}function c1(e){var t=this._id;return arguments.length?this.each(l1(t,e)):me(this.node(),t).ease}function h1(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Se(this,e).ease=r}}function u1(e){if(typeof e!="function")throw new Error;return this.each(h1(this._id,e))}function f1(e){typeof e!="function"&&(e=Kh(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=[],l,c=0;c<o;++c)(l=n[c])&&e.call(l,l.__data__,c,n)&&s.push(l);return new Ie(i,this._parents,this._name,this._id)}function d1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,n=Math.min(i,a),o=new Array(i),s=0;s<n;++s)for(var l=t[s],c=r[s],h=l.length,u=o[s]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;s<i;++s)o[s]=t[s];return new Ie(o,this._parents,this._name,this._id)}function p1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function g1(e,t,r){var i,a,n=p1(t)?Po:Se;return function(){var o=n(this,e),s=o.on;s!==i&&(a=(i=s).copy()).on(t,r),o.on=a}}function m1(e,t){var r=this._id;return arguments.length<2?me(this.node(),r).on.on(e):this.each(g1(r,e,t))}function y1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function x1(){return this.on("end.remove",y1(this._id))}function b1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Fo(e));for(var i=this._groups,a=i.length,n=new Array(a),o=0;o<a;++o)for(var s=i[o],l=s.length,c=n[o]=new Array(l),h,u,f=0;f<l;++f)(h=s[f])&&(u=e.call(h,h.__data__,f,s))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Ln(c[f],t,r,f,c,me(h,r)));return new Ie(n,this._parents,t,r)}function _1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Zh(e));for(var i=this._groups,a=i.length,n=[],o=[],s=0;s<a;++s)for(var l=i[s],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,g=me(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&Ln(d,t,r,m,f,g);n.push(f),o.push(h)}return new Ie(n,o,t,r)}var C1=Ki.prototype.constructor;function w1(){return new C1(this._groups,this._parents)}function k1(e,t){var r,i,a;return function(){var n=Xr(this,e),o=(this.style.removeProperty(e),Xr(this,e));return n===o?null:n===r&&o===i?a:a=t(r=n,i=o)}}function xu(e){return function(){this.style.removeProperty(e)}}function v1(e,t,r){var i,a=r+"",n;return function(){var o=Xr(this,e);return o===a?null:o===i?n:n=t(i=o,r)}}function S1(e,t,r){var i,a,n;return function(){var o=Xr(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Xr(this,e))),o===l?null:o===i&&l===a?n:(a=l,n=t(i=o,s))}}function T1(e,t){var r,i,a,n="style."+t,o="end."+n,s;return function(){var l=Se(this,e),c=l.on,h=l.value[n]==null?s||(s=xu(t)):void 0;(c!==r||a!==h)&&(i=(r=c).copy()).on(o,a=h),l.on=i}}function A1(e,t,r){var i=(e+="")=="transform"?Mb:yu;return t==null?this.styleTween(e,k1(e,i)).on("end.style."+e,xu(e)):typeof t=="function"?this.styleTween(e,S1(e,i,No(this,"style."+e,t))).each(T1(this._id,e)):this.styleTween(e,v1(e,i,t),r).on("end.style."+e,null)}function L1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function B1(e,t,r){var i,a;function n(){var o=t.apply(this,arguments);return o!==a&&(i=(a=o)&&L1(e,o,r)),i}return n._value=t,n}function M1(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,B1(e,t,r??""))}function E1(e){return function(){this.textContent=e}}function $1(e){return function(){var t=e(this);this.textContent=t??""}}function F1(e){return this.tween("text",typeof e=="function"?$1(No(this,"text",e)):E1(e==null?"":e+""))}function D1(e){return function(t){this.textContent=e.call(this,t)}}function O1(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&D1(a)),t}return i._value=e,i}function R1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,O1(e))}function I1(){for(var e=this._name,t=this._id,r=bu(),i=this._groups,a=i.length,n=0;n<a;++n)for(var o=i[n],s=o.length,l,c=0;c<s;++c)if(l=o[c]){var h=me(l,t);Ln(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ie(i,this._parents,e,r)}function P1(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(n,o){var s={value:o},l={value:function(){--a===0&&n()}};r.each(function(){var c=Se(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),a===0&&n()})}var N1=0;function Ie(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function bu(){return++N1}var Ee=Ki.prototype;Ie.prototype={constructor:Ie,select:b1,selectAll:_1,selectChild:Ee.selectChild,selectChildren:Ee.selectChildren,filter:f1,merge:d1,selection:w1,transition:I1,call:Ee.call,nodes:Ee.nodes,node:Ee.node,size:Ee.size,empty:Ee.empty,each:Ee.each,on:m1,attr:Zb,attrTween:e1,style:A1,styleTween:M1,text:F1,textTween:R1,remove:x1,tween:Hb,delay:a1,duration:o1,ease:c1,easeVarying:u1,end:P1,[Symbol.iterator]:Ee[Symbol.iterator]};function z1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var W1={time:null,delay:0,duration:250,ease:z1};function q1(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function H1(e){var t,r;e instanceof Ie?(t=e._id,e=e._name):(t=bu(),(r=W1).time=Io(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,n=0;n<a;++n)for(var o=i[n],s=o.length,l,c=0;c<s;++c)(l=o[c])&&Ln(l,e,t,c,o,r||q1(l,t));return new Ie(i,this._parents,e,t)}Ki.prototype.interrupt=zb;Ki.prototype.transition=H1;const zs=Math.PI,Ws=2*zs,rr=1e-6,j1=Ws-rr;function _u(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Y1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _u;const r=10**t;return function(i){this._+=i[0];for(let a=1,n=i.length;a<n;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class U1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?_u:Y1(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,n,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+n},${this._y1=+o}`}arcTo(t,r,i,a,n){if(t=+t,r=+r,i=+i,a=+a,n=+n,n<0)throw new Error(`negative radius: ${n}`);let o=this._x1,s=this._y1,l=i-t,c=a-r,h=o-t,u=s-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>rr)if(!(Math.abs(u*l-c*h)>rr)||!n)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=a-s,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),C=n*Math.tan((zs-Math.acos((m+f-y)/(2*x*b)))/2),v=C/b,w=C/x;Math.abs(v-1)>rr&&this._append`L${t+v*h},${r+v*u}`,this._append`A${n},${n},0,0,${+(u*d>h*g)},${this._x1=t+w*l},${this._y1=r+w*c}`}}arc(t,r,i,a,n,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(a),l=i*Math.sin(a),c=t+s,h=r+l,u=1^o,f=o?a-n:n-a;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>rr||Math.abs(this._y1-h)>rr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ws+Ws),f>j1?this._append`A${i},${i},0,1,${u},${t-s},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>rr&&this._append`A${i},${i},0,${+(f>=zs)},${u},${this._x1=t+i*Math.cos(n)},${this._y1=r+i*Math.sin(n)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function Mr(e){return function(){return e}}const rB=Math.abs,iB=Math.atan2,aB=Math.cos,nB=Math.max,sB=Math.min,oB=Math.sin,lB=Math.sqrt,wc=1e-12,zo=Math.PI,kc=zo/2,cB=2*zo;function hB(e){return e>1?0:e<-1?zo:Math.acos(e)}function uB(e){return e>=1?kc:e<=-1?-kc:Math.asin(e)}function G1(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new U1(t)}function V1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Cu(e){this._context=e}Cu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Za(e){return new Cu(e)}function X1(e){return e[0]}function Z1(e){return e[1]}function K1(e,t){var r=Mr(!0),i=null,a=Za,n=null,o=G1(s);e=typeof e=="function"?e:e===void 0?X1:Mr(e),t=typeof t=="function"?t:t===void 0?Z1:Mr(t);function s(l){var c,h=(l=V1(l)).length,u,f=!1,d;for(i==null&&(n=a(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?n.lineStart():n.lineEnd()),f&&n.point(+e(u,c,l),+t(u,c,l));if(d)return n=null,d+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Mr(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Mr(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Mr(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,i!=null&&(n=a(i)),s):a},s.context=function(l){return arguments.length?(l==null?i=n=null:n=a(i=l),s):i},s}class wu{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ku(e){return new wu(e,!0)}function vu(e){return new wu(e,!1)}function Ye(){}function Ka(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Bn(e){this._context=e}Bn.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:Ka(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:Ka(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ea(e){return new Bn(e)}function Su(e){this._context=e}Su.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ka(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Q1(e){return new Su(e)}function Tu(e){this._context=e}Tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,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+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Ka(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function J1(e){return new Tu(e)}function Au(e,t){this._basis=new Bn(e),this._beta=t}Au.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],n=e[r]-i,o=t[r]-a,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*n),this._beta*t[s]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const t2=(function e(t){function r(i){return t===1?new Bn(i):new Au(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Qa(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Wo(e,t){this._context=e,this._k=(1-t)/6}Wo.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:Qa(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Qa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Lu=(function e(t){function r(i){return new Wo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function qo(e,t){this._context=e,this._k=(1-t)/6}qo.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Qa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const e2=(function e(t){function r(i){return new qo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ho(e,t){this._context=e,this._k=(1-t)/6}Ho.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,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:Qa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const r2=(function e(t){function r(i){return new Ho(i,t)}return r.tension=function(i){return e(+i)},r})(0);function jo(e,t,r){var i=e._x1,a=e._y1,n=e._x2,o=e._y2;if(e._l01_a>wc){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>wc){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);n=(n*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,n,o,e._x2,e._y2)}function Bu(e,t){this._context=e,this._alpha=t}Bu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:jo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Mu=(function e(t){function r(i){return t?new Bu(i,t):new Wo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Eu(e,t){this._context=e,this._alpha=t}Eu.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:jo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const i2=(function e(t){function r(i){return t?new Eu(i,t):new qo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function $u(e,t){this._context=e,this._alpha=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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:jo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const a2=(function e(t){function r(i){return t?new $u(i,t):new Ho(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Fu(e){this._context=e}Fu.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function n2(e){return new Fu(e)}function vc(e){return e<0?-1:1}function Sc(e,t,r){var i=e._x1-e._x0,a=t-e._x1,n=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),s=(n*a+o*i)/(i+a);return(vc(n)+vc(o))*Math.min(Math.abs(n),Math.abs(o),.5*Math.abs(s))||0}function Tc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function fs(e,t,r){var i=e._x0,a=e._y0,n=e._x1,o=e._y1,s=(n-i)/3;e._context.bezierCurveTo(i+s,a+s*t,n-s,o-s*r,n,o)}function Ja(e){this._context=e}Ja.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:fs(this,this._t0,Tc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,fs(this,Tc(this,r=Sc(this,e,t)),r);break;default:fs(this,this._t0,r=Sc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Du(e){this._context=new Ou(e)}(Du.prototype=Object.create(Ja.prototype)).point=function(e,t){Ja.prototype.point.call(this,t,e)};function Ou(e){this._context=e}Ou.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,a,n){this._context.bezierCurveTo(t,e,i,r,n,a)}};function Ru(e){return new Ja(e)}function Iu(e){return new Du(e)}function Pu(e){this._context=e}Pu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Ac(e),a=Ac(t),n=0,o=1;o<r;++n,++o)this._context.bezierCurveTo(i[0][n],a[0][n],i[1][n],a[1][n],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ac(e){var t,r=e.length-1,i,a=new Array(r),n=new Array(r),o=new Array(r);for(a[0]=0,n[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,n[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,n[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/n[t-1],n[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/n[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/n[t];for(n[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)n[t]=2*e[t+1]-a[t+1];return[a,n]}function Nu(e){return new Pu(e)}function Mn(e,t){this._context=e,this._t=t}Mn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function zu(e){return new Mn(e,.5)}function Wu(e){return new Mn(e,0)}function qu(e){return new Mn(e,1)}function vi(e,t,r){this.k=e,this.x=t,this.y=r}vi.prototype={constructor:vi,scale:function(e){return e===1?this:new vi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new vi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};vi.prototype;var s2=p(e=>{var a;const{securityLevel:t}=dt();let r=ht("body");if(t==="sandbox"){const o=((a=ht(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Yo(e){return typeof e>"u"||e===null}p(Yo,"isNothing");function Hu(e){return typeof e=="object"&&e!==null}p(Hu,"isObject");function ju(e){return Array.isArray(e)?e:Yo(e)?[]:[e]}p(ju,"toArray");function Yu(e,t){var r,i,a,n;if(t)for(n=Object.keys(t),r=0,i=n.length;r<i;r+=1)a=n[r],e[a]=t[a];return e}p(Yu,"extend");function Uu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Uu,"repeat");function Gu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Gu,"isNegativeZero");var o2=Yo,l2=Hu,c2=ju,h2=Uu,u2=Gu,f2=Yu,Mt={isNothing:o2,isObject:l2,toArray:c2,repeat:h2,isNegativeZero:u2,extend:f2};function Uo(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
82
|
+
|
|
83
|
+
`+e.mark.snippet),i+" "+r):i}p(Uo,"formatError");function Kr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Uo(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Kr,"YAMLException$1");Kr.prototype=Object.create(Error.prototype);Kr.prototype.constructor=Kr;Kr.prototype.toString=p(function(t){return this.name+": "+Uo(this,t)},"toString");var Qt=Kr;function $a(e,t,r,i,a){var n="",o="",s=Math.floor(a/2)-1;return i-t>s&&(n=" ... ",t=i-s+n.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:n+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+n.length}}p($a,"getLine");function Fa(e,t){return Mt.repeat(" ",t-e.length)+e}p(Fa,"padStart");function Vu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],n,o=-1;n=r.exec(e.buffer);)a.push(n.index),i.push(n.index+n[0].length),e.position<=n.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=$a(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),u),s=Mt.repeat(" ",t.indent)+Fa((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
84
|
+
`+s;for(c=$a(e.buffer,i[o],a[o],e.position,u),s+=Mt.repeat(" ",t.indent)+Fa((e.line+1).toString(),h)+" | "+c.str+`
|
|
85
|
+
`,s+=Mt.repeat("-",t.indent+h+3+c.pos)+`^
|
|
86
|
+
`,l=1;l<=t.linesAfter&&!(o+l>=a.length);l++)c=$a(e.buffer,i[o+l],a[o+l],e.position-(i[o]-i[o+l]),u),s+=Mt.repeat(" ",t.indent)+Fa((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
87
|
+
`;return s.replace(/\n$/,"")}p(Vu,"makeSnippet");var d2=Vu,p2=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],g2=["scalar","sequence","mapping"];function Xu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Xu,"compileStyleAliases");function Zu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(p2.indexOf(r)===-1)throw new Qt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Xu(t.styleAliases||null),g2.indexOf(this.kind)===-1)throw new Qt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Zu,"Type$1");var zt=Zu;function qs(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(n,o){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(a=o)}),r[a]=i}),r}p(qs,"compileList");function Ku(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(Ku,"compileMap");function tn(e){return this.extend(e)}p(tn,"Schema$1");tn.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof zt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Qt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(n){if(!(n instanceof zt))throw new Qt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new Qt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new Qt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(n){if(!(n instanceof zt))throw new Qt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(tn.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=qs(a,"implicit"),a.compiledExplicit=qs(a,"explicit"),a.compiledTypeMap=Ku(a.compiledImplicit,a.compiledExplicit),a},"extend");var m2=tn,y2=new zt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),x2=new zt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),b2=new zt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),_2=new m2({explicit:[y2,x2,b2]});function Qu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Qu,"resolveYamlNull");function Ju(){return null}p(Ju,"constructYamlNull");function tf(e){return e===null}p(tf,"isNull");var C2=new zt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Qu,construct:Ju,predicate:tf,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function ef(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(ef,"resolveYamlBoolean");function rf(e){return e==="true"||e==="True"||e==="TRUE"}p(rf,"constructYamlBoolean");function af(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(af,"isBoolean");var w2=new zt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ef,construct:rf,predicate:af,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function nf(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(nf,"isHexCode");function sf(e){return 48<=e&&e<=55}p(sf,"isOctCode");function of(e){return 48<=e&&e<=57}p(of,"isDecCode");function lf(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!nf(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!sf(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!of(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}p(lf,"resolveYamlInteger");function cf(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(cf,"constructYamlInteger");function hf(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Mt.isNegativeZero(e)}p(hf,"isInteger");var k2=new zt("tag:yaml.org,2002:int",{kind:"scalar",resolve:lf,construct:cf,predicate:hf,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),v2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function uf(e){return!(e===null||!v2.test(e)||e[e.length-1]==="_")}p(uf,"resolveYamlFloat");function ff(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(ff,"constructYamlFloat");var S2=/^[-+]?[0-9]+e/;function df(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Mt.isNegativeZero(e))return"-0.0";return r=e.toString(10),S2.test(r)?r.replace("e",".e"):r}p(df,"representYamlFloat");function pf(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Mt.isNegativeZero(e))}p(pf,"isFloat");var T2=new zt("tag:yaml.org,2002:float",{kind:"scalar",resolve:uf,construct:ff,predicate:pf,represent:df,defaultStyle:"lowercase"}),gf=_2.extend({implicit:[C2,w2,k2,T2]}),A2=gf,mf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),yf=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 xf(e){return e===null?!1:mf.exec(e)!==null||yf.exec(e)!==null}p(xf,"resolveYamlTimestamp");function bf(e){var t,r,i,a,n,o,s,l=0,c=null,h,u,f;if(t=mf.exec(e),t===null&&(t=yf.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(n=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,a,n,o,s,l)),c&&f.setTime(f.getTime()-c),f}p(bf,"constructYamlTimestamp");function _f(e){return e.toISOString()}p(_f,"representYamlTimestamp");var L2=new zt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:xf,construct:bf,instanceOf:Date,represent:_f});function Cf(e){return e==="<<"||e===null}p(Cf,"resolveYamlMerge");var B2=new zt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Cf}),Go=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
88
|
+
\r`;function wf(e){if(e===null)return!1;var t,r,i=0,a=e.length,n=Go;for(r=0;r<a;r++)if(t=n.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(wf,"resolveYamlBinary");function kf(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,n=Go,o=0,s=[];for(t=0;t<a;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|n.indexOf(i.charAt(t));return r=a%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}p(kf,"constructYamlBinary");function vf(e){var t="",r=0,i,a,n=e.length,o=Go;for(i=0;i<n;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=n%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(vf,"representYamlBinary");function Sf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Sf,"isBinary");var M2=new zt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:wf,construct:kf,predicate:Sf,represent:vf}),E2=Object.prototype.hasOwnProperty,$2=Object.prototype.toString;function Tf(e){if(e===null)return!0;var t=[],r,i,a,n,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(a=s[r],o=!1,$2.call(a)!=="[object Object]")return!1;for(n in a)if(E2.call(a,n))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(n)===-1)t.push(n);else return!1}return!0}p(Tf,"resolveYamlOmap");function Af(e){return e!==null?e:[]}p(Af,"constructYamlOmap");var F2=new zt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Tf,construct:Af}),D2=Object.prototype.toString;function Lf(e){if(e===null)return!0;var t,r,i,a,n,o=e;for(n=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],D2.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;n[t]=[a[0],i[a[0]]]}return!0}p(Lf,"resolveYamlPairs");function Bf(e){if(e===null)return[];var t,r,i,a,n,o=e;for(n=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),n[t]=[a[0],i[a[0]]];return n}p(Bf,"constructYamlPairs");var O2=new zt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Lf,construct:Bf}),R2=Object.prototype.hasOwnProperty;function Mf(e){if(e===null)return!0;var t,r=e;for(t in r)if(R2.call(r,t)&&r[t]!==null)return!1;return!0}p(Mf,"resolveYamlSet");function Ef(e){return e!==null?e:{}}p(Ef,"constructYamlSet");var I2=new zt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Mf,construct:Ef}),$f=A2.extend({implicit:[L2,B2],explicit:[M2,F2,O2,I2]}),Ue=Object.prototype.hasOwnProperty,en=1,Ff=2,Df=3,rn=4,ds=1,P2=2,Lc=3,N2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,z2=/[\x85\u2028\u2029]/,W2=/[,\[\]\{\}]/,Of=/^(?:!|!!|![a-z\-]+!)$/i,Rf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Hs(e){return Object.prototype.toString.call(e)}p(Hs,"_class");function pe(e){return e===10||e===13}p(pe,"is_EOL");function je(e){return e===9||e===32}p(je,"is_WHITE_SPACE");function Yt(e){return e===9||e===32||e===10||e===13}p(Yt,"is_WS_OR_EOL");function or(e){return e===44||e===91||e===93||e===123||e===125}p(or,"is_FLOW_INDICATOR");function If(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(If,"fromHexCode");function Pf(e){return e===120?2:e===117?4:e===85?8:0}p(Pf,"escapedHexLen");function Nf(e){return 48<=e&&e<=57?e-48:-1}p(Nf,"fromDecimalCode");function js(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
89
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(js,"simpleEscapeSequence");function zf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(zf,"charFromCodepoint");var Wf=new Array(256),qf=new Array(256);for(er=0;er<256;er++)Wf[er]=js(er)?1:0,qf[er]=js(er);var er;function Hf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||$f,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Hf,"State$1");function Vo(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=d2(r),new Qt(t,r)}p(Vo,"generateError");function K(e,t){throw Vo(e,t)}p(K,"throwError");function zi(e,t){e.onWarning&&e.onWarning.call(null,Vo(e,t))}p(zi,"throwWarning");var Bc={YAML:p(function(t,r,i){var a,n,o;t.version!==null&&K(t,"duplication of %YAML directive"),i.length!==1&&K(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&K(t,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),o=parseInt(a[2],10),n!==1&&K(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&zi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var a,n;i.length!==2&&K(t,"TAG directive accepts exactly two arguments"),a=i[0],n=i[1],Of.test(a)||K(t,"ill-formed tag handle (first argument) of the TAG directive"),Ue.call(t.tagMap,a)&&K(t,'there is a previously declared suffix for "'+a+'" tag handle'),Rf.test(n)||K(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{K(t,"tag prefix is malformed: "+n)}t.tagMap[a]=n},"handleTagDirective")};function Re(e,t,r,i){var a,n,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(a=0,n=s.length;a<n;a+=1)o=s.charCodeAt(a),o===9||32<=o&&o<=1114111||K(e,"expected valid JSON character");else N2.test(s)&&K(e,"the stream contains non-printable characters");e.result+=s}}p(Re,"captureSegment");function Ys(e,t,r,i){var a,n,o,s;for(Mt.isObject(r)||K(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,s=a.length;o<s;o+=1)n=a[o],Ue.call(t,n)||(t[n]=r[n],i[n]=!0)}p(Ys,"mergeMappings");function lr(e,t,r,i,a,n,o,s,l){var c,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),c=0,h=a.length;c<h;c+=1)Array.isArray(a[c])&&K(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Hs(a[c])==="[object Object]"&&(a[c]="[object Object]");if(typeof a=="object"&&Hs(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(c=0,h=n.length;c<h;c+=1)Ys(e,t,n[c],r);else Ys(e,t,n,r);else!e.json&&!Ue.call(r,a)&&Ue.call(t,a)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,K(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):t[a]=n,delete r[a];return t}p(lr,"storeMappingPair");function En(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):K(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(En,"readLineBreak");function vt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;je(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(pe(a))for(En(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&zi(e,"deficient indentation"),i}p(vt,"skipSeparationSpace");function Ji(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Yt(r)))}p(Ji,"testDocumentSeparator");function $n(e,t){t===1?e.result+=" ":t>1&&(e.result+=Mt.repeat(`
|
|
90
|
+
`,t-1))}p($n,"writeFoldedLines");function jf(e,t,r){var i,a,n,o,s,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),Yt(d)||or(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(a=e.input.charCodeAt(e.position+1),Yt(a)||r&&or(a)))return!1;for(e.kind="scalar",e.result="",n=o=e.position,s=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),Yt(a)||r&&or(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Yt(i))break}else{if(e.position===e.lineStart&&Ji(e)||r&&or(d))break;if(pe(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,vt(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&(Re(e,n,o,!1),$n(e,e.line-l),n=o=e.position,s=!1),je(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Re(e,n,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(jf,"readPlainScalar");function Yf(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Re(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else pe(r)?(Re(e,i,a,!0),$n(e,vt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Ji(e)?K(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);K(e,"unexpected end of the stream within a single quoted scalar")}p(Yf,"readSingleQuotedScalar");function Uf(e,t){var r,i,a,n,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Re(e,r,e.position,!0),e.position++,!0;if(s===92){if(Re(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),pe(s))vt(e,!1,t);else if(s<256&&Wf[s])e.result+=qf[s],e.position++;else if((o=Pf(s))>0){for(a=o,n=0;a>0;a--)s=e.input.charCodeAt(++e.position),(o=If(s))>=0?n=(n<<4)+o:K(e,"expected hexadecimal character");e.result+=zf(n),e.position++}else K(e,"unknown escape sequence");r=i=e.position}else pe(s)?(Re(e,r,i,!0),$n(e,vt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ji(e)?K(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}K(e,"unexpected end of the stream within a double quoted scalar")}p(Uf,"readDoubleQuotedScalar");function Gf(e,t){var r=!0,i,a,n,o=e.tag,s,l=e.anchor,c,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(vt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=s,!0;r?b===44&&K(e,"expected the node content, but found ','"):K(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Yt(c)&&(u=f=!0,e.position++,vt(e,!0,t))),i=e.line,a=e.lineStart,n=e.position,gr(e,t,en,!1,!0),y=e.tag,m=e.result,vt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),vt(e,!0,t),gr(e,t,en,!1,!0),x=e.result),d?lr(e,s,g,y,m,x,i,a,n):u?s.push(lr(e,null,g,y,m,x,i,a,n)):s.push(m),vt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}K(e,"unexpected end of the stream within a flow collection")}p(Gf,"readFlowCollection");function Vf(e,t){var r,i,a=ds,n=!1,o=!1,s=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)ds===a?a=u===43?Lc:P2:K(e,"repeat of a chomping mode identifier");else if((h=Nf(u))>=0)h===0?K(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?K(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(je(u)){do u=e.input.charCodeAt(++e.position);while(je(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!pe(u)&&u!==0)}for(;u!==0;){for(En(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),pe(u)){l++;continue}if(e.lineIndent<s){a===Lc?e.result+=Mt.repeat(`
|
|
91
|
+
`,n?1+l:l):a===ds&&n&&(e.result+=`
|
|
92
|
+
`);break}for(i?je(u)?(c=!0,e.result+=Mt.repeat(`
|
|
93
|
+
`,n?1+l:l)):c?(c=!1,e.result+=Mt.repeat(`
|
|
94
|
+
`,l+1)):l===0?n&&(e.result+=" "):e.result+=Mt.repeat(`
|
|
95
|
+
`,l):e.result+=Mt.repeat(`
|
|
96
|
+
`,n?1+l:l),n=!0,o=!0,l=0,r=e.position;!pe(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Re(e,r,e.position,!1)}return!0}p(Vf,"readBlockScalar");function Us(e,t){var r,i=e.tag,a=e.anchor,n=[],o,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Yt(o))));){if(s=!0,e.position++,vt(e,!0,-1)&&e.lineIndent<=t){n.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,gr(e,t,Df,!1,!0),n.push(e.result),vt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)K(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=n,!0):!1}p(Us,"readBlockSequence");function Xf(e,t,r){var i,a,n,o,s,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),n=e.line,(b===63||b===58)&&Yt(i))b===63?(y&&(lr(e,u,f,d,g,null,o,s,l),d=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):K(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,s=e.lineStart,l=e.position,!gr(e,r,Ff,!1,!0))break;if(e.line===n){for(b=e.input.charCodeAt(e.position);je(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Yt(b)||K(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(lr(e,u,f,d,g,null,o,s,l),d=g=m=null),x=!0,y=!1,a=!1,d=e.tag,g=e.result;else if(x)K(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)K(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===n||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,l=e.position),gr(e,t,rn,!0,a)&&(y?g=e.result:m=e.result),y||(lr(e,u,f,d,g,m,o,s,l),d=g=m=null),vt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===n||e.lineIndent>t)&&b!==0)K(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&lr(e,u,f,d,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(Xf,"readBlockMapping");function Zf(e){var t,r=!1,i=!1,a,n,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&K(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(n=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):K(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Yt(o);)o===33&&(i?K(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Of.test(a)||K(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),W2.test(n)&&K(e,"tag suffix cannot contain flow indicator characters")}n&&!Rf.test(n)&&K(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{K(e,"tag name is malformed: "+n)}return r?e.tag=n:Ue.call(e.tagMap,a)?e.tag=e.tagMap[a]+n:a==="!"?e.tag="!"+n:a==="!!"?e.tag="tag:yaml.org,2002:"+n:K(e,'undeclared tag handle "'+a+'"'),!0}p(Zf,"readTagProperty");function Kf(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&K(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Yt(r)&&!or(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(Kf,"readAnchorProperty");function Qf(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Yt(i)&&!or(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ue.call(e.anchorMap,r)||K(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],vt(e,!0,-1),!0}p(Qf,"readAlias");function gr(e,t,r,i,a){var n,o,s,l=1,c=!1,h=!1,u,f,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n=o=s=rn===r||Df===r,i&&vt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Zf(e)||Kf(e);)vt(e,!0,-1)?(c=!0,s=n,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=c||a),(l===1||rn===r)&&(en===r||Ff===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?s&&(Us(e,y)||Xf(e,y,m))||Gf(e,m)?h=!0:(o&&Vf(e,m)||Yf(e,m)||Uf(e,m)?h=!0:Qf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&K(e,"alias node should not have any properties")):jf(e,m,en===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&Us(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&K(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ue.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||K(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&K(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):K(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(gr,"composeNode");function Jf(e){var t=e.position,r,i,a,n=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(vt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(n=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Yt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&K(e,"directive name must not be less than one character in length");o!==0;){for(;je(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!pe(o));break}if(pe(o))break;for(r=e.position;o!==0&&!Yt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&En(e),Ue.call(Bc,i)?Bc[i](e,i,a):zi(e,'unknown document directive "'+i+'"')}if(vt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,vt(e,!0,-1)):n&&K(e,"directives end mark is expected"),gr(e,e.lineIndent-1,rn,!1,!0),vt(e,!0,-1),e.checkLineBreaks&&z2.test(e.input.slice(t,e.position))&&zi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ji(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,vt(e,!0,-1));return}if(e.position<e.length-1)K(e,"end of the stream or a document separator is expected");else return}p(Jf,"readDocument");function Xo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
97
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Hf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,K(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Jf(r);return r.documents}p(Xo,"loadDocuments");function q2(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Xo(e,r);if(typeof t!="function")return i;for(var a=0,n=i.length;a<n;a+=1)t(i[a])}p(q2,"loadAll$1");function td(e,t){var r=Xo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Qt("expected a single document in the stream, but found more")}}p(td,"load$1");var H2=td,j2={load:H2},ed=Object.prototype.toString,rd=Object.prototype.hasOwnProperty,Zo=65279,Y2=9,Wi=10,U2=13,G2=32,V2=33,X2=34,Gs=35,Z2=37,K2=38,Q2=39,J2=42,id=44,t_=45,an=58,e_=61,r_=62,i_=63,a_=64,ad=91,nd=93,n_=96,sd=123,s_=124,od=125,qt={};qt[0]="\\0";qt[7]="\\a";qt[8]="\\b";qt[9]="\\t";qt[10]="\\n";qt[11]="\\v";qt[12]="\\f";qt[13]="\\r";qt[27]="\\e";qt[34]='\\"';qt[92]="\\\\";qt[133]="\\N";qt[160]="\\_";qt[8232]="\\L";qt[8233]="\\P";var o_=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],l_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ld(e,t){var r,i,a,n,o,s,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,n=i.length;a<n;a+=1)o=i[a],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&rd.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}p(ld,"compileStyleMap");function cd(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Qt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Mt.repeat("0",i-t.length)+t}p(cd,"encodeHex");var c_=1,qi=2;function hd(e){this.schema=e.schema||$f,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Mt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ld(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==='"'?qi:c_,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(hd,"State");function Vs(e,t){for(var r=Mt.repeat(" ",t),i=0,a=-1,n="",o,s=e.length;i<s;)a=e.indexOf(`
|
|
98
|
+
`,i),a===-1?(o=e.slice(i),i=s):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
|
|
99
|
+
`&&(n+=r),n+=o;return n}p(Vs,"indentString");function nn(e,t){return`
|
|
100
|
+
`+Mt.repeat(" ",e.indent*t)}p(nn,"generateNextLine");function ud(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}p(ud,"testImplicitResolving");function Hi(e){return e===G2||e===Y2}p(Hi,"isWhitespace");function Qr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Zo||65536<=e&&e<=1114111}p(Qr,"isPrintable");function Xs(e){return Qr(e)&&e!==Zo&&e!==U2&&e!==Wi}p(Xs,"isNsCharOrWhitespace");function Zs(e,t,r){var i=Xs(e),a=i&&!Hi(e);return(r?i:i&&e!==id&&e!==ad&&e!==nd&&e!==sd&&e!==od)&&e!==Gs&&!(t===an&&!a)||Xs(t)&&!Hi(t)&&e===Gs||t===an&&a}p(Zs,"isPlainSafe");function fd(e){return Qr(e)&&e!==Zo&&!Hi(e)&&e!==t_&&e!==i_&&e!==an&&e!==id&&e!==ad&&e!==nd&&e!==sd&&e!==od&&e!==Gs&&e!==K2&&e!==J2&&e!==V2&&e!==s_&&e!==e_&&e!==r_&&e!==Q2&&e!==X2&&e!==Z2&&e!==a_&&e!==n_}p(fd,"isPlainSafeFirst");function dd(e){return!Hi(e)&&e!==an}p(dd,"isPlainSafeLast");function Dr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Dr,"codePointAt");function Ko(e){var t=/^\n* /;return t.test(e)}p(Ko,"needIndentIndicator");var pd=1,Ks=2,gd=3,md=4,$r=5;function yd(e,t,r,i,a,n,o,s){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=fd(Dr(e,0))&&dd(Dr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Dr(e,l),!Qr(c))return $r;m=m&&Zs(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Dr(e,l),c===Wi)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Qr(c))return $r;m=m&&Zs(c,h,s),h=c}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!a(e)?pd:n===qi?$r:Ks:r>9&&Ko(e)?$r:o?n===qi?$r:Ks:f?md:gd}p(yd,"chooseScalarStyle");function xd(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===qi?'""':"''";if(!e.noCompatMode&&(o_.indexOf(t)!==-1||l_.test(t)))return e.quotingType===qi?'"'+t+'"':"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return ud(e,c)}switch(p(l,"testAmbiguity"),yd(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,a)){case pd:return t;case Ks:return"'"+t.replace(/'/g,"''")+"'";case gd:return"|"+Qs(t,e.indent)+Js(Vs(t,n));case md:return">"+Qs(t,e.indent)+Js(Vs(bd(t,o),n));case $r:return'"'+_d(t)+'"';default:throw new Qt("impossible error: invalid scalar style")}})()}p(xd,"writeScalar");function Qs(e,t){var r=Ko(e)?String(t):"",i=e[e.length-1]===`
|
|
101
|
+
`,a=i&&(e[e.length-2]===`
|
|
102
|
+
`||e===`
|
|
103
|
+
`),n=a?"+":i?"":"-";return r+n+`
|
|
104
|
+
`}p(Qs,"blockHeader");function Js(e){return e[e.length-1]===`
|
|
105
|
+
`?e.slice(0,-1):e}p(Js,"dropEndingNewline");function bd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|
106
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,to(e.slice(0,c),t)})(),a=e[0]===`
|
|
107
|
+
`||e[0]===" ",n,o;o=r.exec(e);){var s=o[1],l=o[2];n=l[0]===" ",i+=s+(!a&&!n&&l!==""?`
|
|
108
|
+
`:"")+to(l,t),a=n}return i}p(bd,"foldString");function to(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,n,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-a>t&&(n=o>a?o:s,l+=`
|
|
109
|
+
`+e.slice(a,n),a=n+1),o=s;return l+=`
|
|
110
|
+
`,e.length-a>t&&o>a?l+=e.slice(a,o)+`
|
|
111
|
+
`+e.slice(o+1):l+=e.slice(a),l.slice(1)}p(to,"foldLine");function _d(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Dr(e,a),i=qt[r],!i&&Qr(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||cd(r);return t}p(_d,"escapeString");function Cd(e,t,r){var i="",a=e.tag,n,o,s;for(n=0,o=r.length;n<o;n+=1)s=r[n],e.replacer&&(s=e.replacer.call(r,String(n),s)),(ve(e,t,s,!1,!1)||typeof s>"u"&&ve(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}p(Cd,"writeFlowSequence");function eo(e,t,r,i){var a="",n=e.tag,o,s,l;for(o=0,s=r.length;o<s;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(ve(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ve(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=nn(e,t)),e.dump&&Wi===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=n,e.dump=a||"[]"}p(eo,"writeBlockSequence");function wd(e,t,r){var i="",a=e.tag,n=Object.keys(r),o,s,l,c,h;for(o=0,s=n.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=n[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ve(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ve(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}p(wd,"writeFlowMapping");function kd(e,t,r,i){var a="",n=e.tag,o=Object.keys(r),s,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Qt("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)f="",(!i||a!=="")&&(f+=nn(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ve(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Wi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=nn(e,t)),ve(e,t+1,h,!0,u)&&(e.dump&&Wi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,a+=f));e.tag=n,e.dump=a||"{}"}p(kd,"writeBlockMapping");function ro(e,t,r){var i,a,n,o,s,l;for(a=r?e.explicitTypes:e.implicitTypes,n=0,o=a.length;n<o;n+=1)if(s=a[n],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,ed.call(s.represent)==="[object Function]")i=s.represent(t,l);else if(rd.call(s.represent,l))i=s.represent[l](t,l);else throw new Qt("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(ro,"detectType");function ve(e,t,r,i,a,n,o){e.tag=null,e.dump=r,ro(e,r,!1)||ro(e,r,!0);var s=ed.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(a=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(kd(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(wd(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?eo(e,t-1,e.dump,a):eo(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(Cd(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&xd(e,e.dump,t,n,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Qt("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(ve,"writeNode");function vd(e,t){var r=[],i=[],a,n;for(sn(e,r,i),a=0,n=i.length;a<n;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(n)}p(vd,"getDuplicateReferences");function sn(e,t,r){var i,a,n;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,n=e.length;a<n;a+=1)sn(e[a],t,r);else for(i=Object.keys(e),a=0,n=i.length;a<n;a+=1)sn(e[i[a]],t,r)}p(sn,"inspectNode");function h_(e,t){t=t||{};var r=new hd(t);r.noRefs||vd(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ve(r,0,i,!0,!0)?r.dump+`
|
|
112
|
+
`:""}p(h_,"dump$1");function u_(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(u_,"renamed");var f_=gf,d_=j2.load;/*! Bundled license information:
|
|
113
|
+
|
|
114
|
+
js-yaml/dist/js-yaml.mjs:
|
|
115
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
116
|
+
*/var Pt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Mc={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Si(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=kt(e),t=kt(t);const[r,i]=[e.x,e.y],[a,n]=[t.x,t.y],o=a-r,s=n-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}p(Si,"calculateDeltaAndAngle");var kt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),p_=p(e=>({x:p(function(t,r,i){let a=0;const n=kt(i[0]).x<kt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Pt,e.arrowTypeStart)){const{angle:d,deltaX:g}=Si(i[0],i[1]);a=Pt[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pt,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Si(i[i.length-1],i[i.length-2]);a=Pt[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(kt(t).x-kt(i[i.length-1]).x),s=Math.abs(kt(t).y-kt(i[i.length-1]).y),l=Math.abs(kt(t).x-kt(i[0]).x),c=Math.abs(kt(t).y-kt(i[0]).y),h=Pt[e.arrowTypeStart],u=Pt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=n==="right"?-1:1,a-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=n==="right"?-1:1,a+=d}return kt(t).x+a},"x"),y:p(function(t,r,i){let a=0;const n=kt(i[0]).y<kt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Pt,e.arrowTypeStart)){const{angle:d,deltaY:g}=Si(i[0],i[1]);a=Pt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pt,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Si(i[i.length-1],i[i.length-2]);a=Pt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(kt(t).y-kt(i[i.length-1]).y),s=Math.abs(kt(t).x-kt(i[i.length-1]).x),l=Math.abs(kt(t).y-kt(i[0]).y),c=Math.abs(kt(t).x-kt(i[0]).x),h=Pt[e.arrowTypeStart],u=Pt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=n==="up"?-1:1,a-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=n==="up"?-1:1,a+=d}return kt(t).y+a},"y")}),"getLineFunctionsWithOffset"),Qo=p(({flowchart:e})=>{var a,n;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),g_=p(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ri=p(e=>{const t=m_([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),m_=p(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),Sd=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),G=p(e=>{const{stylesArray:t}=ri(e),r=[],i=[],a=[],n=[];return t.forEach(o=>{const s=o[0];Sd(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&a.push(o.join(":")+" !important"),s==="fill"&&n.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:n}},"styles2String"),U=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:a,mainBkg:n}=r,{stylesMap:o}=ri(e);return Object.assign({roughness:.7,fill:o.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:y_(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),y_=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),gi={},Lt={},Ec;function x_(){return Ec||(Ec=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.BLANK_URL=Lt.relativeFirstCharacters=Lt.whitespaceEscapeCharsRegex=Lt.urlSchemeRegex=Lt.ctrlCharactersRegex=Lt.htmlCtrlEntityRegex=Lt.htmlEntitiesRegex=Lt.invalidProtocolRegex=void 0,Lt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Lt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Lt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Lt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Lt.urlSchemeRegex=/^.+(:|:)/gim,Lt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Lt.relativeFirstCharacters=[".","/"],Lt.BLANK_URL="about:blank"),Lt}var $c;function b_(){if($c)return gi;$c=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.sanitizeUrl=void 0;var e=x_();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(e.ctrlCharactersRegex,"");return s.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function n(o){if(!o)return e.BLANK_URL;var s,l=a(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=a(l),s=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(s&&s.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return gi.sanitizeUrl=n,gi}var __=b_(),Td=typeof global=="object"&&global&&global.Object===Object&&global,C_=typeof self=="object"&&self&&self.Object===Object&&self,Te=Td||C_||Function("return this")(),on=Te.Symbol,Ad=Object.prototype,w_=Ad.hasOwnProperty,k_=Ad.toString,mi=on?on.toStringTag:void 0;function v_(e){var t=w_.call(e,mi),r=e[mi];try{e[mi]=void 0;var i=!0}catch{}var a=k_.call(e);return i&&(t?e[mi]=r:delete e[mi]),a}var S_=Object.prototype,T_=S_.toString;function A_(e){return T_.call(e)}var L_="[object Null]",B_="[object Undefined]",Fc=on?on.toStringTag:void 0;function ii(e){return e==null?e===void 0?B_:L_:Fc&&Fc in Object(e)?v_(e):A_(e)}function br(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var M_="[object AsyncFunction]",E_="[object Function]",$_="[object GeneratorFunction]",F_="[object Proxy]";function Jo(e){if(!br(e))return!1;var t=ii(e);return t==E_||t==$_||t==M_||t==F_}var ps=Te["__core-js_shared__"],Dc=(function(){var e=/[^.]+$/.exec(ps&&ps.keys&&ps.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function D_(e){return!!Dc&&Dc in e}var O_=Function.prototype,R_=O_.toString;function _r(e){if(e!=null){try{return R_.call(e)}catch{}try{return e+""}catch{}}return""}var I_=/[\\^$.*+?()[\]{}|]/g,P_=/^\[object .+?Constructor\]$/,N_=Function.prototype,z_=Object.prototype,W_=N_.toString,q_=z_.hasOwnProperty,H_=RegExp("^"+W_.call(q_).replace(I_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function j_(e){if(!br(e)||D_(e))return!1;var t=Jo(e)?H_:P_;return t.test(_r(e))}function Y_(e,t){return e==null?void 0:e[t]}function Cr(e,t){var r=Y_(e,t);return j_(r)?r:void 0}var ji=Cr(Object,"create");function U_(){this.__data__=ji?ji(null):{},this.size=0}function G_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var V_="__lodash_hash_undefined__",X_=Object.prototype,Z_=X_.hasOwnProperty;function K_(e){var t=this.__data__;if(ji){var r=t[e];return r===V_?void 0:r}return Z_.call(t,e)?t[e]:void 0}var Q_=Object.prototype,J_=Q_.hasOwnProperty;function tC(e){var t=this.__data__;return ji?t[e]!==void 0:J_.call(t,e)}var eC="__lodash_hash_undefined__";function rC(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ji&&t===void 0?eC:t,this}function mr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}mr.prototype.clear=U_;mr.prototype.delete=G_;mr.prototype.get=K_;mr.prototype.has=tC;mr.prototype.set=rC;function iC(){this.__data__=[],this.size=0}function Fn(e,t){return e===t||e!==e&&t!==t}function Dn(e,t){for(var r=e.length;r--;)if(Fn(e[r][0],t))return r;return-1}var aC=Array.prototype,nC=aC.splice;function sC(e){var t=this.__data__,r=Dn(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():nC.call(t,r,1),--this.size,!0}function oC(e){var t=this.__data__,r=Dn(t,e);return r<0?void 0:t[r][1]}function lC(e){return Dn(this.__data__,e)>-1}function cC(e,t){var r=this.__data__,i=Dn(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ne(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ne.prototype.clear=iC;Ne.prototype.delete=sC;Ne.prototype.get=oC;Ne.prototype.has=lC;Ne.prototype.set=cC;var Yi=Cr(Te,"Map");function hC(){this.size=0,this.__data__={hash:new mr,map:new(Yi||Ne),string:new mr}}function uC(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function On(e,t){var r=e.__data__;return uC(t)?r[typeof t=="string"?"string":"hash"]:r.map}function fC(e){var t=On(this,e).delete(e);return this.size-=t?1:0,t}function dC(e){return On(this,e).get(e)}function pC(e){return On(this,e).has(e)}function gC(e,t){var r=On(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Xe.prototype.clear=hC;Xe.prototype.delete=fC;Xe.prototype.get=dC;Xe.prototype.has=pC;Xe.prototype.set=gC;var mC="Expected a function";function ta(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(mC);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],n=r.cache;if(n.has(a))return n.get(a);var o=e.apply(this,i);return r.cache=n.set(a,o)||n,o};return r.cache=new(ta.Cache||Xe),r}ta.Cache=Xe;function yC(){this.__data__=new Ne,this.size=0}function xC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function bC(e){return this.__data__.get(e)}function _C(e){return this.__data__.has(e)}var CC=200;function wC(e,t){var r=this.__data__;if(r instanceof Ne){var i=r.__data__;if(!Yi||i.length<CC-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Xe(i)}return r.set(e,t),this.size=r.size,this}function ai(e){var t=this.__data__=new Ne(e);this.size=t.size}ai.prototype.clear=yC;ai.prototype.delete=xC;ai.prototype.get=bC;ai.prototype.has=_C;ai.prototype.set=wC;var ln=(function(){try{var e=Cr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function tl(e,t,r){t=="__proto__"&&ln?ln(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function io(e,t,r){(r!==void 0&&!Fn(e[t],r)||r===void 0&&!(t in e))&&tl(e,t,r)}function kC(e){return function(t,r,i){for(var a=-1,n=Object(t),o=i(t),s=o.length;s--;){var l=o[++a];if(r(n[l],l,n)===!1)break}return t}}var vC=kC(),Ld=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oc=Ld&&typeof module=="object"&&module&&!module.nodeType&&module,SC=Oc&&Oc.exports===Ld,Rc=SC?Te.Buffer:void 0,Ic=Rc?Rc.allocUnsafe:void 0;function TC(e,t){if(t)return e.slice();var r=e.length,i=Ic?Ic(r):new e.constructor(r);return e.copy(i),i}var Pc=Te.Uint8Array;function AC(e){var t=new e.constructor(e.byteLength);return new Pc(t).set(new Pc(e)),t}function LC(e,t){var r=t?AC(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function BC(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Nc=Object.create,MC=(function(){function e(){}return function(t){if(!br(t))return{};if(Nc)return Nc(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Bd(e,t){return function(r){return e(t(r))}}var Md=Bd(Object.getPrototypeOf,Object),EC=Object.prototype;function Rn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||EC;return e===r}function $C(e){return typeof e.constructor=="function"&&!Rn(e)?MC(Md(e)):{}}function ea(e){return e!=null&&typeof e=="object"}var FC="[object Arguments]";function zc(e){return ea(e)&&ii(e)==FC}var Ed=Object.prototype,DC=Ed.hasOwnProperty,OC=Ed.propertyIsEnumerable,cn=zc((function(){return arguments})())?zc:function(e){return ea(e)&&DC.call(e,"callee")&&!OC.call(e,"callee")},hn=Array.isArray,RC=9007199254740991;function $d(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=RC}function In(e){return e!=null&&$d(e.length)&&!Jo(e)}function IC(e){return ea(e)&&In(e)}function PC(){return!1}var Fd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wc=Fd&&typeof module=="object"&&module&&!module.nodeType&&module,NC=Wc&&Wc.exports===Fd,qc=NC?Te.Buffer:void 0,zC=qc?qc.isBuffer:void 0,el=zC||PC,WC="[object Object]",qC=Function.prototype,HC=Object.prototype,Dd=qC.toString,jC=HC.hasOwnProperty,YC=Dd.call(Object);function UC(e){if(!ea(e)||ii(e)!=WC)return!1;var t=Md(e);if(t===null)return!0;var r=jC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Dd.call(r)==YC}var GC="[object Arguments]",VC="[object Array]",XC="[object Boolean]",ZC="[object Date]",KC="[object Error]",QC="[object Function]",JC="[object Map]",tw="[object Number]",ew="[object Object]",rw="[object RegExp]",iw="[object Set]",aw="[object String]",nw="[object WeakMap]",sw="[object ArrayBuffer]",ow="[object DataView]",lw="[object Float32Array]",cw="[object Float64Array]",hw="[object Int8Array]",uw="[object Int16Array]",fw="[object Int32Array]",dw="[object Uint8Array]",pw="[object Uint8ClampedArray]",gw="[object Uint16Array]",mw="[object Uint32Array]",_t={};_t[lw]=_t[cw]=_t[hw]=_t[uw]=_t[fw]=_t[dw]=_t[pw]=_t[gw]=_t[mw]=!0;_t[GC]=_t[VC]=_t[sw]=_t[XC]=_t[ow]=_t[ZC]=_t[KC]=_t[QC]=_t[JC]=_t[tw]=_t[ew]=_t[rw]=_t[iw]=_t[aw]=_t[nw]=!1;function yw(e){return ea(e)&&$d(e.length)&&!!_t[ii(e)]}function xw(e){return function(t){return e(t)}}var Od=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Di=Od&&typeof module=="object"&&module&&!module.nodeType&&module,bw=Di&&Di.exports===Od,gs=bw&&Td.process,Hc=(function(){try{var e=Di&&Di.require&&Di.require("util").types;return e||gs&&gs.binding&&gs.binding("util")}catch{}})(),jc=Hc&&Hc.isTypedArray,rl=jc?xw(jc):yw;function ao(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var _w=Object.prototype,Cw=_w.hasOwnProperty;function ww(e,t,r){var i=e[t];(!(Cw.call(e,t)&&Fn(i,r))||r===void 0&&!(t in e))&&tl(e,t,r)}function kw(e,t,r,i){var a=!r;r||(r={});for(var n=-1,o=t.length;++n<o;){var s=t[n],l=void 0;l===void 0&&(l=e[s]),a?tl(r,s,l):ww(r,s,l)}return r}function vw(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Sw=9007199254740991,Tw=/^(?:0|[1-9]\d*)$/;function Rd(e,t){var r=typeof e;return t=t??Sw,!!t&&(r=="number"||r!="symbol"&&Tw.test(e))&&e>-1&&e%1==0&&e<t}var Aw=Object.prototype,Lw=Aw.hasOwnProperty;function Bw(e,t){var r=hn(e),i=!r&&cn(e),a=!r&&!i&&el(e),n=!r&&!i&&!a&&rl(e),o=r||i||a||n,s=o?vw(e.length,String):[],l=s.length;for(var c in e)(t||Lw.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||n&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Rd(c,l)))&&s.push(c);return s}function Mw(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Ew=Object.prototype,$w=Ew.hasOwnProperty;function Fw(e){if(!br(e))return Mw(e);var t=Rn(e),r=[];for(var i in e)i=="constructor"&&(t||!$w.call(e,i))||r.push(i);return r}function Id(e){return In(e)?Bw(e,!0):Fw(e)}function Dw(e){return kw(e,Id(e))}function Ow(e,t,r,i,a,n,o){var s=ao(e,r),l=ao(t,r),c=o.get(l);if(c){io(e,r,c);return}var h=n?n(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=hn(l),d=!f&&el(l),g=!f&&!d&&rl(l);h=l,f||d||g?hn(s)?h=s:IC(s)?h=BC(s):d?(u=!1,h=TC(l,!0)):g?(u=!1,h=LC(l,!0)):h=[]:UC(l)||cn(l)?(h=s,cn(s)?h=Dw(s):(!br(s)||Jo(s))&&(h=$C(l))):u=!1}u&&(o.set(l,h),a(h,l,i,n,o),o.delete(l)),io(e,r,h)}function Pd(e,t,r,i,a){e!==t&&vC(t,function(n,o){if(a||(a=new ai),br(n))Ow(e,t,o,r,Pd,i,a);else{var s=i?i(ao(e,o),n,o+"",e,t,a):void 0;s===void 0&&(s=n),io(e,o,s)}},Id)}function Nd(e){return e}function Rw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Yc=Math.max;function Iw(e,t,r){return t=Yc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,n=Yc(i.length-t,0),o=Array(n);++a<n;)o[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=r(o),Rw(e,this,s)}}function Pw(e){return function(){return e}}var Nw=ln?function(e,t){return ln(e,"toString",{configurable:!0,enumerable:!1,value:Pw(t),writable:!0})}:Nd,zw=800,Ww=16,qw=Date.now;function Hw(e){var t=0,r=0;return function(){var i=qw(),a=Ww-(i-r);if(r=i,a>0){if(++t>=zw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var jw=Hw(Nw);function Yw(e,t){return jw(Iw(e,t,Nd),e+"")}function Uw(e,t,r){if(!br(r))return!1;var i=typeof t;return(i=="number"?In(r)&&Rd(t,r.length):i=="string"&&t in r)?Fn(r[t],e):!1}function Gw(e){return Yw(function(t,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(n=e.length>3&&typeof n=="function"?(a--,n):void 0,o&&Uw(r[0],r[1],o)&&(n=a<3?void 0:n,a=1),t=Object(t);++i<a;){var s=r[i];s&&e(t,s,i,n)}return t})}var Vw=Gw(function(e,t,r){Pd(e,t,r)}),Xw="",Zw={curveBasis:Ea,curveBasisClosed:Q1,curveBasisOpen:J1,curveBumpX:ku,curveBumpY:vu,curveBundle:t2,curveCardinalClosed:e2,curveCardinalOpen:r2,curveCardinal:Lu,curveCatmullRomClosed:i2,curveCatmullRomOpen:a2,curveCatmullRom:Mu,curveLinear:Za,curveLinearClosed:n2,curveMonotoneX:Ru,curveMonotoneY:Iu,curveNatural:Nu,curveStep:zu,curveStepAfter:qu,curveStepBefore:Wu},Kw=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Qw=p(function(e,t){const r=zd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);Na(o),i=Bt(i,[...o])}else i=r.args;if(!i)return;let a=To(e,t);const n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),zd=p(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${Kw.source})(?=[}][%]{2}).*
|
|
117
|
+
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),F.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n;const o=[];for(;(n=$i.exec(e))!==null;)if(n.index===$i.lastIndex&&$i.lastIndex++,n&&!t||t&&((r=n[1])!=null&&r.match(t))||t&&((i=n[2])!=null&&i.match(t))){const s=n[1]?n[1]:n[2],l=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:s,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return F.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Jw=p(function(e){return e.replace($i,"")},"removeDirectives"),tk=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function il(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Zw[r]??t}p(il,"interpolateToCurve");function Wd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?__.sanitizeUrl(r):r}p(Wd,"formatUrl");var ek=p((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n){F.error(`Function name: ${e} not found in window`);return}n[a](...t)},"runFunc");function al(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(al,"distance");function qd(e){let t,r=0;e.forEach(a=>{r+=al(a,t),t=a});const i=r/2;return nl(e,i)}p(qd,"traverseEdge");function Hd(e){return e.length===1?e[0]:qd(e)}p(Hd,"calcLabelPosition");var Uc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),nl=p((e,t)=>{let r,i=t;for(const a of e){if(r){const n=al(a,r);if(n===0)return r;if(n<i)i-=n;else{const o=i/n;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:Uc((1-o)*r.x+o*a.x,5),y:Uc((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),rk=p((e,t,r)=>{F.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=nl(t,25),n=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),s={x:0,y:0};return s.x=Math.sin(o)*n+(t[0].x+a.x)/2,s.y=-Math.cos(o)*n+(t[0].y+a.y)/2,s},"calcCardinalityPosition");function jd(e,t,r){const i=structuredClone(r);F.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,n=nl(i,a),o=10+e*.5,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+n.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+n.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+n.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+n.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+n.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+n.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+n.x)/2,l.y=-Math.cos(s)*o+(i[0].y+n.y)/2),l}p(jd,"calcTerminalLabelPosition");function Yd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Yd,"getStylesFromArray");var Gc=0,ik=p(()=>(Gc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Gc),"generateId");function Ud(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Ud,"makeRandomHex");var ak=p(e=>Ud(e.length),"random"),nk=p(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"),sk=p(function(e,t){const r=t.text.replace(ei.lineBreakRegex," "),[,i]=Pn(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const n=a.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.attr("fill",t.fill),n.text(r),a},"drawSimpleText"),ok=ta((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ei.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let n="";return i.forEach((o,s)=>{const l=Pe(`${o} `,r),c=Pe(n,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=lk(o,t,"-",r);a.push(n,...f),n=d}else c+l>=t?(a.push(n),n=o):n=[n,o].filter(Boolean).join(" ");s+1===i.length&&a.push(n)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),lk=ta((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],n=[];let o="";return a.forEach((s,l)=>{const c=`${o}${s}`;if(Pe(c,i)>=t){const u=l+1,f=a.length===u,d=`${c}${r}`;n.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:n,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Gd(e,t){return sl(e,t).height}p(Gd,"calculateTextHeight");function Pe(e,t){return sl(e,t).width}p(Pe,"calculateTextWidth");var sl=ta((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,n]=Pn(r),o=["sans-serif",i],s=e.split(ei.lineBreakRegex),l=[],c=ht("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=nk();y.text=m||Xw;const x=sk(h,y).style("font-size",n).style("font-weight",a).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Yr,ck=(Yr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Yr,"InitIDGenerator"),Yr),ma,hk=p(function(e){return ma=ma||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ma.innerHTML=e,unescape(ma.textContent)},"entityDecode");function ol(e){return"str"in e}p(ol,"isDetailedError");var uk=p((e,t,r,i)=>{var n;if(!i)return;const a=(n=e.node())==null?void 0:n.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Pn=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function ll(e,t){return Vw({},e,t)}p(ll,"cleanAndMerge");var de={assignWithDepth:Bt,wrapLabel:ok,calculateTextHeight:Gd,calculateTextWidth:Pe,calculateTextDimensions:sl,cleanAndMerge:ll,detectInit:Qw,detectDirective:zd,isSubstringInArray:tk,interpolateToCurve:il,calcLabelPosition:Hd,calcCardinalityPosition:rk,calcTerminalLabelPosition:jd,formatUrl:Wd,getStylesFromArray:Yd,generateId:ik,random:ak,runFunc:ek,entityDecode:hk,insertTitle:uk,isLabelCoordinateInPath:Vd,parseFontSize:Pn,InitIDGenerator:ck},fk=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),wr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),fB=p((e,t,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Wt(e){return e??null}p(Wt,"handleUndefinedAttr");function Vd(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,n=>Math.round(parseFloat(n)).toString());return a.includes(r.toString())||a.includes(i.toString())}p(Vd,"isLabelCoordinateInPath");const dk=Object.freeze({left:0,top:0,width:16,height:16}),un=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Xd=Object.freeze({...dk,...un}),pk=Object.freeze({...Xd,body:"",hidden:!1}),gk=Object.freeze({width:null,height:null}),mk=Object.freeze({...gk,...un}),yk=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const s=a.pop(),l=a.pop(),c={provider:a.length>0?a[0]:i,prefix:l,name:s};return ms(c)?c:null}const n=a[0],o=n.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return ms(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:n};return ms(s,r)?s:null}return null},ms=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function xk(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Vc(e,t){const r=xk(e,t);for(const i in pk)i in un?i in e&&!(i in r)&&(r[i]=un[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function bk(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function n(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const s=i[o]&&i[o].parent,l=s&&n(s);l&&(a[o]=[s].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(n),a}function Xc(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let n={};function o(s){n=Vc(i[s]||a[s],n)}return o(t),r.forEach(o),Vc(e,n)}function _k(e,t){if(e.icons[t])return Xc(e,t,[]);const r=bk(e,[t])[t];return r?Xc(e,t,r):null}const Ck=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Zc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Ck);if(i===null||!i.length)return e;const a=[];let n=i.shift(),o=wk.test(n);for(;;){if(o){const s=parseFloat(n);isNaN(s)?a.push(n):a.push(Math.ceil(s*t*r)/r)}else a.push(n);if(n=i.shift(),n===void 0)return a.join("");o=!o}}function kk(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),n=e.indexOf("</"+t);if(a===-1||n===-1)break;const o=e.indexOf(">",n);if(o===-1)break;r+=e.slice(a+1,n).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function vk(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Sk(e,t,r){const i=kk(e);return vk(i.defs,t+i.content+r)}const Tk=e=>e==="unset"||e==="undefined"||e==="none";function Ak(e,t){const r={...Xd,...e},i={...mk,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let C=m.rotate;x?b?C+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let v;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:v=a.height/2+a.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:v=a.width/2+a.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}C%2===1&&(a.left!==a.top&&(v=a.left,a.left=a.top,a.top=v),a.width!==a.height&&(v=a.width,a.width=a.height,a.height=v)),y.length&&(n=Sk(n,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,l=a.width,c=a.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=Zc(u,l/c)):(h=o==="auto"?l:o,u=s===null?Zc(h,c/l):s==="auto"?c:s);const f={},d=(m,y)=>{Tk(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[a.left,a.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:n}}const Lk=/\sid="(\S+)"/g,Bk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Mk=0;function Ek(e,t=Bk){const r=[];let i;for(;i=Lk.exec(e);)r.push(i[1]);if(!r.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(n=>{const o=typeof t=="function"?t(n):t+(Mk++).toString(),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}function $k(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function cl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var kr=cl();function Zd(e){kr=e}var Oi={exec:()=>null};function ft(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(Ut.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var Ut={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+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Fk=/^(?:[ \t]*(?:\n|$))+/,Dk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ok=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ra=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Rk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hl=/(?:[*+-]|\d{1,9}[.)])/,Kd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Qd=ft(Kd).replace(/bull/g,hl).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(),Ik=ft(Kd).replace(/bull/g,hl).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(),ul=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pk=/^[^\n]+/,fl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Nk=ft(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zk=ft(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hl).getRegex(),Nn="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",dl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Wk=ft("^ {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[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",dl).replace("tag",Nn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Jd=ft(ul).replace("hr",ra).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",Nn).getRegex(),qk=ft(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Jd).getRegex(),pl={blockquote:qk,code:Dk,def:Nk,fences:Ok,heading:Rk,hr:ra,html:Wk,lheading:Qd,list:zk,newline:Fk,paragraph:Jd,table:Oi,text:Pk},Kc=ft("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ra).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\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",Nn).getRegex(),Hk={...pl,lheading:Ik,table:Kc,paragraph:ft(ul).replace("hr",ra).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Kc).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",Nn).getRegex()},jk={...pl,html:ft(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",dl).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:Oi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ft(ul).replace("hr",ra).replace("heading",` *#{1,6} *[^
|
|
118
|
+
]`).replace("lheading",Qd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Yk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Uk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tp=/^( {2,}|\\)\n(?!\s*$)/,Gk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,zn=/[\p{P}\p{S}]/u,gl=/[\s\p{P}\p{S}]/u,ep=/[^\s\p{P}\p{S}]/u,Vk=ft(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,gl).getRegex(),rp=/(?!~)[\p{P}\p{S}]/u,Xk=/(?!~)[\s\p{P}\p{S}]/u,Zk=/(?:[^\s\p{P}\p{S}]|~)/u,Kk=ft(/link|code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<!`)(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("code",new RegExp("(?<!`)(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),ip=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qk=ft(ip,"u").replace(/punct/g,zn).getRegex(),Jk=ft(ip,"u").replace(/punct/g,rp).getRegex(),ap="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",tv=ft(ap,"gu").replace(/notPunctSpace/g,ep).replace(/punctSpace/g,gl).replace(/punct/g,zn).getRegex(),ev=ft(ap,"gu").replace(/notPunctSpace/g,Zk).replace(/punctSpace/g,Xk).replace(/punct/g,rp).getRegex(),rv=ft("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ep).replace(/punctSpace/g,gl).replace(/punct/g,zn).getRegex(),iv=ft(/\\(punct)/,"gu").replace(/punct/g,zn).getRegex(),av=ft(/^<(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(),nv=ft(dl).replace("(?:-->|$)","-->").getRegex(),sv=ft("^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",nv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),fn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ov=ft(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",fn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),np=ft(/^!?\[(label)\]\[(ref)\]/).replace("label",fn).replace("ref",fl).getRegex(),sp=ft(/^!?\[(ref)\](?:\[\])?/).replace("ref",fl).getRegex(),lv=ft("reflink|nolink(?!\\()","g").replace("reflink",np).replace("nolink",sp).getRegex(),Qc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ml={_backpedal:Oi,anyPunctuation:iv,autolink:av,blockSkip:Kk,br:tp,code:Uk,del:Oi,emStrongLDelim:Qk,emStrongRDelimAst:tv,emStrongRDelimUnd:rv,escape:Yk,link:ov,nolink:sp,punctuation:Vk,reflink:np,reflinkSearch:lv,tag:sv,text:Gk,url:Oi},cv={...ml,link:ft(/^!?\[(label)\]\((.*?)\)/).replace("label",fn).getRegex(),reflink:ft(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fn).getRegex()},no={...ml,emStrongRDelimAst:ev,emStrongLDelim:Jk,url:ft(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Qc).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:ft(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Qc).getRegex()},hv={...no,br:ft(tp).replace("{2,}","*").getRegex(),text:ft(no.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ya={normal:pl,gfm:Hk,pedantic:jk},yi={normal:ml,gfm:no,breaks:hv,pedantic:cv},uv={"&":"&","<":"<",">":">",'"':""","'":"'"},Jc=e=>uv[e];function be(e,t){if(t){if(Ut.escapeTest.test(e))return e.replace(Ut.escapeReplace,Jc)}else if(Ut.escapeTestNoEncode.test(e))return e.replace(Ut.escapeReplaceNoEncode,Jc);return e}function th(e){try{e=encodeURI(e).replace(Ut.percentDecode,"%")}catch{return null}return e}function eh(e,t){var n;let r=e.replace(Ut.findPipe,(o,s,l)=>{let c=!1,h=s;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Ut.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((n=i.at(-1))!=null&&n.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(Ut.slashPipe,"|");return i}function xi(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function fv(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function rh(e,t,r,i,a){let n=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:n,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function dv(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
|
|
119
|
+
`).map(n=>{let o=n.match(r.other.beginningSpace);if(o===null)return n;let[s]=o;return s.length>=a.length?n.slice(a.length):n}).join(`
|
|
120
|
+
`)}var dn=class{constructor(t){yt(this,"options");yt(this,"rules");yt(this,"lexer");this.options=t||kr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:xi(i,`
|
|
121
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=dv(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let a=xi(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:xi(r[0],`
|
|
122
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=xi(r[0],`
|
|
123
|
+
`).split(`
|
|
124
|
+
`),a="",n="",o=[];for(;i.length>0;){let s=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),s=!0;else if(!s)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
125
|
+
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
126
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
127
|
+
${h}`:h,n=n?`${n}
|
|
128
|
+
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,m=g.raw+`
|
|
129
|
+
`+i.join(`
|
|
130
|
+
`),y=this.blockquote(m);o[o.length-1]=y,a=a.substring(0,a.length-g.raw.length)+y.raw,n=n.substring(0,n.length-g.text.length)+y.text;break}else if((d==null?void 0:d.type)==="list"){let g=d,m=g.raw+`
|
|
131
|
+
`+i.join(`
|
|
132
|
+
`),y=this.list(m);o[o.length-1]=y,a=a.substring(0,a.length-d.raw.length)+y.raw,n=n.substring(0,n.length-g.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
|
|
133
|
+
`);continue}}return{type:"blockquote",raw:a,tokens:o,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,n={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),s=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
|
134
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
|
|
135
|
+
`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
|
|
136
|
+
`,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),C=this.rules.other.hrRegex(m),v=this.rules.other.fencesBeginRegex(m),w=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let S=t.split(`
|
|
137
|
+
`,1)[0],D;if(d=S,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),D=d):D=d.replace(this.rules.other.tabCharGlobal," "),v.test(d)||w.test(d)||_.test(d)||b.test(d)||C.test(d))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
|
|
138
|
+
`+D.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(f)||w.test(f)||C.test(f))break;u+=`
|
|
139
|
+
`+d}!g&&!d.trim()&&(g=!0),h+=S+`
|
|
140
|
+
`,t=t.substring(S.length+1),f=D.slice(m)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),n.raw+=h}let l=n.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c=0;c<n.items.length;c++)if(this.lexer.state.top=!1,n.items[c].tokens=this.lexer.blockTokens(n.items[c].text,[]),!n.loose){let h=n.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=u}if(n.loose)for(let c=0;c<n.items.length;c++)n.items[c].loose=!0;return n}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:a,title:n}}}table(t){var s;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=eh(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(s=r[3])!=null&&s.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
141
|
+
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let l of a)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of n)o.rows.push(eh(l,o.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
142
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=xi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=fv(r[2],"()");if(o===-2)return;if(o>-1){let s=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,s).trim(),r[3]=""}}let a=r[2],n="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],n=o[3])}else n=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),rh(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=r[a.toLowerCase()];if(!n){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return rh(i,n,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let n=[...a[0]].length-1,o,s,l=n,c=0,h=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+n);(a=h.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(s=[...o].length,a[3]||a[4]){l+=s;continue}else if((a[5]||a[6])&&n%3&&!((n+s)%3)){c+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let u=[...a[0]][0].length,f=t.slice(0,n+a.index+u+s);if(Math.min(n,s)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),n=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&n&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let a,n;if(r[2]==="@")a=r[0],n="mailto:"+a;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);a=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:a,href:n,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},he=class so{constructor(t){yt(this,"tokens");yt(this,"options");yt(this,"state");yt(this,"tokenizer");yt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||kr,this.options.tokenizer=this.options.tokenizer||new dn,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 r={other:Ut,block:ya.normal,inline:yi.normal};this.options.pedantic?(r.block=ya.pedantic,r.inline=yi.pedantic):this.options.gfm&&(r.block=ya.gfm,this.options.breaks?r.inline=yi.breaks:r.inline=yi.gfm),this.tokenizer.rules=r}static get rules(){return{block:ya,inline:yi}}static lex(t,r){return new so(r).lex(t)}static lexInline(t,r){return new so(r).inlineTokens(t)}lex(t){t=t.replace(Ut.carriageReturn,`
|
|
143
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,n,o;for(this.options.pedantic&&(t=t.replace(Ut.tabCharGlobal," ").replace(Ut.spaceLine,""));t;){let s;if((n=(a=this.options.extensions)==null?void 0:a.block)!=null&&n.some(c=>(s=c.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let c=r.at(-1);s.raw.length===1&&c!==void 0?c.raw+=`
|
|
144
|
+
`:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
145
|
+
`)?"":`
|
|
146
|
+
`)+s.raw,c.text+=`
|
|
147
|
+
`+s.text,this.inlineQueue.at(-1).src=c.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
148
|
+
`)?"":`
|
|
149
|
+
`)+s.raw,c.text+=`
|
|
150
|
+
`+s.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
|
|
151
|
+
`)?"":`
|
|
152
|
+
`)+s.raw,c.text+=`
|
|
153
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(s),i=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
154
|
+
`)?"":`
|
|
155
|
+
`)+s.raw,c.text+=`
|
|
156
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(s);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var s,l,c,h,u;let i=t,a=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)f.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((l=(s=this.options.hooks)==null?void 0:s.emStrongMask)==null?void 0:l.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let f;if((h=(c=this.options.extensions)==null?void 0:c.inline)!=null&&h.some(g=>(f=g.call({lexer:this},t,r))?(t=t.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let g=r.at(-1);f.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=f.raw,g.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(t,i,o)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),r.push(f);continue}let d=t;if((u=this.options.extensions)!=null&&u.startInline){let g=1/0,m=t.slice(1),y;this.options.extensions.startInline.forEach(x=>{y=x.call({lexer:this},m),typeof y=="number"&&y>=0&&(g=Math.min(g,y))}),g<1/0&&g>=0&&(d=t.substring(0,g+1))}if(f=this.tokenizer.inlineText(d)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(o=f.raw.slice(-1)),n=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=f.raw,g.text+=f.text):r.push(f);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},pn=class{constructor(t){yt(this,"options");yt(this,"parser");this.options=t||kr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let a=(o=(r||"").match(Ut.notSpaceStart))==null?void 0:o[0],n=t.replace(Ut.endingNewline,"")+`
|
|
157
|
+
`;return a?'<pre><code class="language-'+be(a)+'">'+(i?n:be(n,!0))+`</code></pre>
|
|
158
|
+
`:"<pre><code>"+(i?n:be(n,!0))+`</code></pre>
|
|
159
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
160
|
+
${this.parser.parse(t)}</blockquote>
|
|
161
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
162
|
+
`}hr(t){return`<hr>
|
|
163
|
+
`}list(t){let r=t.ordered,i=t.start,a="";for(let s=0;s<t.items.length;s++){let l=t.items[s];a+=this.listitem(l)}let n=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+n+o+`>
|
|
164
|
+
`+a+"</"+n+`>
|
|
165
|
+
`}listitem(t){var i;let r="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=a+" "+be(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
166
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
167
|
+
`}table(t){let r="",i="";for(let n=0;n<t.header.length;n++)i+=this.tablecell(t.header[n]);r+=this.tablerow({text:i});let a="";for(let n=0;n<t.rows.length;n++){let o=t.rows[n];i="";for(let s=0;s<o.length;s++)i+=this.tablecell(o[s]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
168
|
+
<thead>
|
|
169
|
+
`+r+`</thead>
|
|
170
|
+
`+a+`</table>
|
|
171
|
+
`}tablerow({text:t}){return`<tr>
|
|
172
|
+
${t}</tr>
|
|
173
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
174
|
+
`}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>${be(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let a=this.parser.parseInline(i),n=th(t);if(n===null)return a;t=n;let o='<a href="'+t+'"';return r&&(o+=' title="'+be(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let n=th(t);if(n===null)return be(i);t=n;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${be(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:be(t.text)}},yl=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""}},ue=class oo{constructor(t){yt(this,"options");yt(this,"renderer");yt(this,"textRenderer");this.options=t||kr,this.options.renderer=this.options.renderer||new pn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new yl}static parse(t,r){return new oo(r).parse(t)}static parseInline(t,r){return new oo(r).parseInline(t)}parse(t,r=!0){var a,n;let i="";for(let o=0;o<t.length;o++){let s=t[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[s.type]){let c=s,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=s;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;o+1<t.length&&t[o+1].type==="text";)c=t[++o],h+=`
|
|
175
|
+
`+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var a,n;let i="";for(let o=0;o<t.length;o++){let s=t[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[s.type]){let c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=c||"";continue}}let l=s;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},ka,Ti=(ka=class{constructor(t){yt(this,"options");yt(this,"block");this.options=t||kr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?he.lex:he.lexInline}provideParser(){return this.block?ue.parse:ue.parseInline}},yt(ka,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),yt(ka,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ka),pv=class{constructor(...t){yt(this,"defaults",cl());yt(this,"options",this.setOptions);yt(this,"parse",this.parseMarkdown(!0));yt(this,"parseInline",this.parseMarkdown(!1));yt(this,"Parser",ue);yt(this,"Renderer",pn);yt(this,"TextRenderer",yl);yt(this,"Lexer",he);yt(this,"Tokenizer",dn);yt(this,"Hooks",Ti);this.use(...t)}walkTokens(t,r){var a,n;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let l of s.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of s.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;(n=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&n[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{let c=s[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let o=r.renderers[n.name];o?r.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:r.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[n.level];o?o.unshift(n.tokenizer):r[n.level]=[n.tokenizer],n.start&&(n.level==="block"?r.startBlock?r.startBlock.push(n.start):r.startBlock=[n.start]:n.level==="inline"&&(r.startInline?r.startInline.push(n.start):r.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(r.childTokens[n.name]=n.childTokens)}),a.extensions=r),i.renderer){let n=this.defaults.renderer||new pn(this.defaults);for(let o in i.renderer){if(!(o in n))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=i.renderer[s],c=n[s];n[s]=(...h)=>{let u=l.apply(n,h);return u===!1&&(u=c.apply(n,h)),u||""}}a.renderer=n}if(i.tokenizer){let n=this.defaults.tokenizer||new dn(this.defaults);for(let o in i.tokenizer){if(!(o in n))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=i.tokenizer[s],c=n[s];n[s]=(...h)=>{let u=l.apply(n,h);return u===!1&&(u=c.apply(n,h)),u}}a.tokenizer=n}if(i.hooks){let n=this.defaults.hooks||new Ti;for(let o in i.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=i.hooks[s],c=n[s];Ti.passThroughHooks.has(o)?n[s]=h=>{if(this.defaults.async&&Ti.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await l.call(n,h);return c.call(n,f)})();let u=l.call(n,h);return c.call(n,u)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(n,h);return f===!1&&(f=await c.apply(n,h)),f})();let u=l.apply(n,h);return u===!1&&(u=c.apply(n,h)),u}}a.hooks=n}if(i.walkTokens){let n=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return he.lex(t,r??this.defaults)}parser(t,r){return ue.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},n={...this.defaults,...a},o=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return o(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 r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(r):r,l=await(n.hooks?await n.hooks.provideLexer():t?he.lex:he.lexInline)(s,n),c=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(c,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser():t?ue.parse:ue.parseInline)(c,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(o);try{n.hooks&&(r=n.hooks.preprocess(r));let s=(n.hooks?n.hooks.provideLexer():t?he.lex:he.lexInline)(r,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let l=(n.hooks?n.hooks.provideParser():t?ue.parse:ue.parseInline)(s,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(s){return o(s)}}}onError(t,r){return i=>{if(i.message+=`
|
|
176
|
+
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+be(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},yr=new pv;function pt(e,t){return yr.parse(e,t)}pt.options=pt.setOptions=function(e){return yr.setOptions(e),pt.defaults=yr.defaults,Zd(pt.defaults),pt};pt.getDefaults=cl;pt.defaults=kr;pt.use=function(...e){return yr.use(...e),pt.defaults=yr.defaults,Zd(pt.defaults),pt};pt.walkTokens=function(e,t){return yr.walkTokens(e,t)};pt.parseInline=yr.parseInline;pt.Parser=ue;pt.parser=ue.parse;pt.Renderer=pn;pt.TextRenderer=yl;pt.Lexer=he;pt.lexer=he.lex;pt.Tokenizer=dn;pt.Hooks=Ti;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;ue.parse;he.lex;function op(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):s},[]);if(a.length){var n=new RegExp(`
|
|
177
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(s){return s.replace(n,`
|
|
178
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(s,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=s;typeof s=="string"&&s.includes(`
|
|
179
|
+
`)&&(u=String(s).split(`
|
|
180
|
+
`).map(function(f,d){return d===0?f:""+h+f}).join(`
|
|
181
|
+
`)),o+=u+i[l+1]}),o}var gv={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},lo=new Map,lp=new Map,mv=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(F.debug("Registering icon pack:",t.name),"loader"in t)lp.set(t.name,t.loader);else if("icons"in t)lo.set(t.name,t.icons);else throw F.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),cp=p(async(e,t)=>{const r=yk(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=lo.get(i);if(!a){const o=lp.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},lo.set(i,a)}catch(s){throw F.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=_k(a,r.name);if(!n)throw new Error(`Icon not found: ${e}`);return n},"getRegisteredIconData"),yv=p(async e=>{try{return await cp(e),!0}catch{return!1}},"isIconAvailable"),ia=p(async(e,t,r)=>{let i;try{i=await cp(e,t==null?void 0:t.fallbackPrefix)}catch(o){F.error(o),i=gv}const a=Ak(i,t),n=$k(Ek(a.body),{...a.attributes,...r});return se(n,Nt())},"getIconSVG");function hp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
182
|
+
`).replace(/\n{2,}/g,`
|
|
183
|
+
`),a=op(i);return t===!1?a.replace(/ /g," "):a}p(hp,"preprocessMarkdown");function up(e,t={}){const r=hp(e,t),i=pt.lexer(r),a=[[]];let n=0;function o(s,l="normal"){s.type==="text"?s.text.split(`
|
|
184
|
+
`).forEach((h,u)=>{u!==0&&(n++,a.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&a[n].push({content:f,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&a[n].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{var l;s.type==="paragraph"?(l=s.tokens)==null||l.forEach(c=>{o(c)}):s.type==="html"?a[n].push({content:s.text,type:"normal"}):a[n].push({content:s.raw,type:"normal"})}),a}p(up,"markdownToLines");function fp(e,{markdownAutoWrap:t}={}){const r=pt.lexer(e);function i(a){var n,o,s;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(n=a.tokens)==null?void 0:n.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(s=a.tokens)==null?void 0:s.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(F.warn(`Unsupported markdown: ${a.type}`),a.raw)}return p(i,"output"),r.map(i).join("")}p(fp,"markdownToHTML");function dp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(dp,"splitTextToChars");function pp(e,t){const r=dp(t.content);return xl(e,[],r,t.type)}p(pp,"splitWordToFitWidth");function xl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...n]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?xl(e,o,n,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(xl,"splitWordToFitWidthRecursion");function gp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
185
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return gn(e,t)}p(gp,"splitLineToFitWidth");function gn(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const n=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(n),t(o))return gn(e,t,r,o);if(i.length>0)r.push(i),e.unshift(n);else if(n.content){const[s,l]=pp(t,n);r.push([s]),l.content&&e.unshift(l)}return gn(e,t,r)}p(gn,"splitLineToFitWidthRecursion");function co(e,t){t&&e.attr("style",t)}p(co,"applyStyle");async function mp(e,t,r,i,a=!1,n=Nt()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),l=Vr(t.label)?await Ao(t.label.replace(ei.lineBreakRegex,`
|
|
186
|
+
`),n):se(t.label,n),c=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),co(h,t.labelStyle),h.attr("class",`${c} ${i}`),co(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),o.node()}p(mp,"addHtmlSpan");function Wn(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(Wn,"createTspan");function yp(e,t,r){const i=e.append("text"),a=Wn(i,1,t);qn(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}p(yp,"computeWidthOfText");function xv(e,t,r){var o;const i=e.append("text"),a=Wn(i,1,t);qn(a,[{content:r,type:"normal"}]);const n=(o=a.node())==null?void 0:o.getBoundingClientRect();return n&&i.remove(),n}p(xv,"computeDimensionOfText");function xp(e,t,r,i=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(f=>yp(n,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:gp(c,h);for(const f of u){const d=Wn(s,l,1.1);qn(d,f),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),n.node()}else return s.node()}p(xp,"createFormattedText");function qn(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}p(qn,"updateTextContentAndStyles");async function bp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,n,o)=>(r.push((async()=>{const s=`${n}:${o}`;return await yv(s)?await ia(s,void 0,{class:"label-icon"}):`<i class='${se(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(bp,"replaceIconSubstring");var Ze=p(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(F.debug("XYZ createText",t,r,i,a,n,o,"addSvgBackground: ",l),n){const h=fp(t,c),u=await bp(wr(h),c),f=t.replace(/\\\\/g,"\\"),d={isNode:o,label:Vr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await mp(e,d,s,a,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=up(h.replace("<br>","<br/>"),c),f=xp(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(f).select("text").attr("style",g)}return f}},"createText");function ys(e,t,r){if(e&&e.length){const[i,a]=t,n=Math.PI/180*r,o=Math.cos(n),s=Math.sin(n);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-a)*s+i,l[1]=(c-i)*s+(h-a)*o+a}}}function bv(e,t){return e[0]===t[0]&&e[1]===t[1]}function _v(e,t,r,i=1){const a=r,n=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(a)for(const c of o)ys(c,s,a);const l=(function(c,h,u){const f=[];for(const b of c){const C=[...b];bv(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&f.push(C)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let C=0;C<b.length-1;C++){const v=b[C],w=b[C+1];if(v[1]!==w[1]){const _=Math.min(v[1],w[1]);g.push({ymin:_,ymax:Math.max(v[1],w[1]),x:_===v[1]?v[0]:w[0],islope:(w[0]-v[0])/(w[1]-v[1])})}}if(g.sort(((b,C)=>b.ymin<C.ymin?-1:b.ymin>C.ymin?1:b.x<C.x?-1:b.x>C.x?1:b.ymax===C.ymax?0:(b.ymax-C.ymax)/Math.abs(b.ymax-C.ymax))),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let C=0;C<g.length&&!(g[C].ymin>y);C++)b=C;g.splice(0,b+1).forEach((C=>{m.push({s:y,edge:C})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,C)=>b.edge.x===C.edge.x?0:(b.edge.x-C.edge.x)/Math.abs(b.edge.x-C.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const C=b+1;if(C>=m.length)break;const v=m[b].edge,w=m[C].edge;d.push([[Math.round(v.x),y],[Math.round(w.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(o,n,i);if(a){for(const c of o)ys(c,s,-a);(function(c,h,u){const f=[];c.forEach((d=>f.push(...d))),ys(f,h,u)})(l,s,-a)}return l}function aa(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(n=a),_v(e,a,i,n||1)}class bl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=aa(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function Hn(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class Cv extends bl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=aa(t,Object.assign({},r,{hachureGap:i})),n=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(n),l=.5*i*Math.sin(n);for(const[c,h]of a)Hn([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class wv extends bl{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),n=this._fillPolygons(t,a);return i.ops=i.ops.concat(n.ops),i}}class kv{constructor(t){this.helper=t}fillPolygons(t,r){const i=aa(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const o=a/4;for(const s of t){const l=Hn(s),c=l/a,h=Math.ceil(c)-1,u=l-h*a,f=(s[0][0]+s[1][0])/2-a/4,d=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=d+u+g*a,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,n,n,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class vv{constructor(t){this.helper=t}fillPolygons(t,r){const i=aa(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,n=[];return t.forEach((o=>{const s=Hn(o),l=Math.floor(s/(i+a)),c=(s+a-l*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+a),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];n.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),n}}class Sv{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,n=aa(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(n,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((n=>{const o=Hn(n),s=Math.round(o/(2*r));let l=n[0],c=n[1];l[0]>c[0]&&(l=n[1],c=n[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<s;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),a}}const Zt={};class Tv{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Av=0,xs=1,ih=2,xa={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 bs(e,t){return e.type===t}function _l(e){const t=[],r=(function(o){const s=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:Av,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:xs,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:ih,text:""},s})(e);let i="BOD",a=0,n=r[a];for(;!bs(n,ih);){let o=0;const s=[];if(i==="BOD"){if(n.text!=="M"&&n.text!=="m")return _l("M0,0"+e);a++,o=xa[n.text],i=n.text}else bs(n,xs)?o=xa[i]:(a++,o=xa[n.text],i=n.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const c=r[l];if(!bs(c,xs))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof xa[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:s};t.push(l),a+=o,n=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function _p(e){let t=0,r=0,i=0,a=0;const n=[];for(const{key:o,data:s}of e)switch(o){case"M":n.push({key:"M",data:[...s]}),[t,r]=s,[i,a]=s;break;case"m":t+=s[0],r+=s[1],n.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":n.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],n.push({key:"L",data:[t,r]});break;case"C":n.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const l=s.map(((c,h)=>h%2?c+r:c+t));n.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":n.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map(((c,h)=>h%2?c+r:c+t));n.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":n.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":n.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],n.push({key:"H",data:[t]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map(((c,h)=>h%2?c+r:c+t));n.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":n.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],n.push({key:"T",data:[t,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),t=i,r=a}return n}function Cp(e){const t=[];let r="",i=0,a=0,n=0,o=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[n,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=a+(a-l)):(u=i,f=a),t.push({key:"C",data:[u,f,...h]}),s=h[0],l=h[1],i=h[2],a=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-s),g=a+(a-l)):(d=i,g=a);const m=i+2*(d-i)/3,y=a+2*(g-a)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=d,l=g,i=u,a=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=a+2*(f-a)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),s=u,l=f,i=d,a=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(wp(i,a,y,x,u,f,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=n,a=o}r=c}return t}function bi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function wp(e,t,r,i,a,n,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=bi(e,t,-h),[r,i]=bi(r,i,-h);const O=(e-r)/2,M=(t-i)/2;let L=O*O/(a*a)+M*M/(n*n);L>1&&(L=Math.sqrt(L),a*=L,n*=L);const A=a*a,$=n*n,B=A*$-A*M*M-$*O*O,W=A*M*M+$*O*O,V=(s===l?-1:1)*Math.sqrt(Math.abs(B/W));m=V*a*M/n+(e+r)/2,y=V*-n*O/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const O=g,M=r,L=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=wp(r=m+a*Math.cos(g),i=y+n*Math.sin(g),M,L,a,n,o,0,l,[g,O,m,y])}x=g-d;const b=Math.cos(d),C=Math.sin(d),v=Math.cos(g),w=Math.sin(g),_=Math.tan(x/4),S=4/3*a*_,D=4/3*n*_,P=[e,t],R=[e+S*C,t-D*b],E=[r+S*w,i-D*v],z=[r,i];if(R[0]=2*P[0]-R[0],R[1]=2*P[1]-R[1],c)return[R,E,z].concat(f);{f=[R,E,z].concat(f);const O=[];for(let M=0;M<f.length;M+=3){const L=bi(f[M][0],f[M][1],h),A=bi(f[M+1][0],f[M+1][1],h),$=bi(f[M+2][0],f[M+2][1],h);O.push([L[0],L[1],A[0],A[1],$[0],$[1]])}return O}}const Lv={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return mn(e,t,r)},ellipse:function(e,t,r,i,a){const n=vp(r,i,a);return ho(e,t,a,n).opset},doubleLineOps:function(e,t,r,i,a){return Ge(e,t,r,i,a,!0)}};function kp(e,t,r,i,a){return{type:"path",ops:Ge(e,t,r,i,a)}}function Da(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let n=0;n<i-1;n++)a.push(...Ge(e[n][0],e[n][1],e[n+1][0],e[n+1][1],r));return t&&a.push(...Ge(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?kp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Bv(e,t,r,i,a){return(function(n,o){return Da(n,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function ah(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ba(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:ba(r[0],1.5*(1+.22*t.roughness),oh(t));for(let n=1;n<r.length;n++){const o=r[n];if(o.length){const s=ba(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ba(o,1.5*(1+.22*t.roughness),oh(t));for(const c of s)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&a.push(c)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function vp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let o=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return o+=rt(o*l,r),s+=rt(s*l,r),{increment:n,rx:o,ry:s}}function ho(e,t,r,i){const[a,n]=lh(i.increment,e,t,i.rx,i.ry,1,i.increment*mn(.1,mn(.4,1,r),r),r);let o=yn(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=lh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=yn(s,null,r);o=o.concat(l)}return{estimatedPoints:n,opset:{type:"path",ops:o}}}function nh(e,t,r,i,a,n,o,s,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=rt(.01*u,l),f+=rt(.01*f,l);let d=a,g=n;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=ch(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=ch(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return o&&(s?x.push(...Ge(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...Ge(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function sh(e,t){const r=Cp(_p(_l(e))),i=[];let a=[0,0],n=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":n=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...Ge(n[0],n[1],s[0],s[1],t)),n=[s[0],s[1]];break;case"C":{const[l,c,h,u,f,d]=s;i.push(...Mv(l,c,h,u,f,d,n,t)),n=[f,d];break}case"Z":i.push(...Ge(n[0],n[1],a[0],a[1],t)),n=[a[0],a[1]]}return{type:"path",ops:i}}function _s(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+rt(a,t),i[0][1]+rt(a,t)]});for(let o=1;o<n;o++)r.push({op:"lineTo",data:[i[o][0]+rt(a,t),i[o][1]+rt(a,t)]})}}return{type:"fillPath",ops:r}}function Er(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Zt[a])switch(a){case"zigzag":Zt[a]||(Zt[a]=new Cv(i));break;case"cross-hatch":Zt[a]||(Zt[a]=new wv(i));break;case"dots":Zt[a]||(Zt[a]=new kv(i));break;case"dashed":Zt[a]||(Zt[a]=new vv(i));break;case"zigzag-line":Zt[a]||(Zt[a]=new Sv(i));break;default:a="hachure",Zt[a]||(Zt[a]=new bl(i))}return Zt[a]})(t,Lv).fillPolygons(e,t)}function oh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Sp(e){return e.randomizer||(e.randomizer=new Tv(e.seed||0)),e.randomizer.next()}function mn(e,t,r,i=1){return r.roughness*i*(Sp(r)*(t-e)+e)}function rt(e,t,r=1){return mn(-e,e,t,r)}function Ge(e,t,r,i,a,n=!1){const o=n?a.disableMultiStrokeFill:a.disableMultiStroke,s=uo(e,t,r,i,a,!0,!1);if(o)return s;const l=uo(e,t,r,i,a,!0,!0);return s.concat(l)}function uo(e,t,r,i,a,n,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*Sp(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=rt(d,a,c),g=rt(g,a,c);const m=[],y=()=>rt(u,a,c),x=()=>rt(h,a,c),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:rt(h,a,c)),t+(b?0:rt(h,a,c))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function ba(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+rt(t,r),e[a][1]+rt(t,r)]),a===e.length-1&&i.push([e[a][0]+rt(t,r),e[a][1]+rt(t,r)]);return yn(i,null,r)}function yn(e,t,r){const i=e.length,a=[];if(i>3){const n=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const l=e[s];n[0]=[l[0],l[1]],n[1]=[l[0]+(o*e[s+1][0]-o*e[s-1][0])/6,l[1]+(o*e[s+1][1]-o*e[s-1][1])/6],n[2]=[e[s+1][0]+(o*e[s][0]-o*e[s+2][0])/6,e[s+1][1]+(o*e[s][1]-o*e[s+2][1])/6],n[3]=[e[s+1][0],e[s+1][1]],a.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...uo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function lh(e,t,r,i,a,n,o,s){const l=[],c=[];if(s.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+a*Math.sin(0)]),c.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=rt(.5,s)-Math.PI/2;c.push([rt(n,s)+t+.9*i*Math.cos(h-e),rt(n,s)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[rt(n,s)+t+i*Math.cos(f),rt(n,s)+r+a*Math.sin(f)];l.push(d),c.push(d)}c.push([rt(n,s)+t+i*Math.cos(h+2*Math.PI+.5*o),rt(n,s)+r+a*Math.sin(h+2*Math.PI+.5*o)]),c.push([rt(n,s)+t+.98*i*Math.cos(h+o),rt(n,s)+r+.98*a*Math.sin(h+o)]),c.push([rt(n,s)+t+.9*i*Math.cos(h+.5*o),rt(n,s)+r+.9*a*Math.sin(h+.5*o)])}return[c,l]}function ch(e,t,r,i,a,n,o,s,l){const c=n+rt(.1,l),h=[];h.push([rt(s,l)+t+.9*i*Math.cos(c-e),rt(s,l)+r+.9*a*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([rt(s,l)+t+i*Math.cos(u),rt(s,l)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),yn(h,null,l)}function Mv(e,t,r,i,a,n,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:rt(c[0],s)),o[1]+(f?0:rt(c[0],s))]}),h=f?[a,n]:[a+rt(c[d],s),n+rt(c[d],s)],l.push({op:"bcurveTo",data:[e+rt(c[d],s),t+rt(c[d],s),r+rt(c[d],s),i+rt(c[d],s),h[0],h[1]]});return l}function _i(e){return[...e]}function hh(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(_i(e[0]),_i(e[1]),_i(e[2]),_i(e[2]));else{const a=[];a.push(e[0],e[0]);for(let s=1;s<e.length;s++)a.push(e[s]),s===e.length-1&&a.push(e[s]);const n=[],o=1-t;i.push(_i(a[0]));for(let s=1;s+2<a.length;s++){const l=a[s];n[0]=[l[0],l[1]],n[1]=[l[0]+(o*a[s+1][0]-o*a[s-1][0])/6,l[1]+(o*a[s+1][1]-o*a[s-1][1])/6],n[2]=[a[s+1][0]+(o*a[s][0]-o*a[s+2][0])/6,a[s+1][1]+(o*a[s][1]-o*a[s+2][1])/6],n[3]=[a[s+1][0],a[s+1][1]],i.push(n[1],n[2],n[3])}}return i}function Oa(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Ev(e,t,r){const i=Oa(t,r);if(i===0)return Oa(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Oa(e,ir(t,r,a))}function ir(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function fo(e,t,r,i){const a=i||[];if((function(s,l){const c=s[l+0],h=s[l+1],u=s[l+2],f=s[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-c[0];m*=m;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const s=e[t+0];a.length?(n=a[a.length-1],o=s,Math.sqrt(Oa(n,o))>1&&a.push(s)):a.push(s),a.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=ir(l,c,.5),d=ir(c,h,.5),g=ir(h,u,.5),m=ir(f,d,.5),y=ir(d,g,.5),x=ir(m,y,.5);fo([l,f,m,x],0,r,a),fo([x,y,g,u],0,r,a)}var n,o;return a}function $v(e,t){return xn(e,0,e.length,t)}function xn(e,t,r,i,a){const n=a||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=Ev(e[h],o,s);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(xn(e,t,c+1,i,n),xn(e,c,r,i,n)):(n.length||n.push(o),n.push(s)),n}function Cs(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let n=0;n<a;n++)fo(e,3*n,t,i);return r&&r>0?xn(i,0,i.length,r):i}const te="none";class bn{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,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,n){const o=this._o(n);return this._d("line",[kp(t,r,i,a,o)],o)}rectangle(t,r,i,a,n){const o=this._o(n),s=[],l=Bv(t,r,i,a,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?s.push(_s([c],o)):s.push(Er([c],o))}return o.stroke!==te&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,a,n){const o=this._o(n),s=[],l=vp(i,a,o),c=ho(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=ho(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(Er([c.estimatedPoints],o));return o.stroke!==te&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,a){const n=this.ellipse(t,r,i,i,a);return n.shape="circle",n}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Da(t,!1,i)],i)}arc(t,r,i,a,n,o,s=!1,l){const c=this._o(l),h=[],u=nh(t,r,i,a,n,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=nh(t,r,i,a,n,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push((function(f,d,g,m,y,x,b){const C=f,v=d;let w=Math.abs(g/2),_=Math.abs(m/2);w+=rt(.01*w,b),_+=rt(.01*_,b);let S=y,D=x;for(;S<0;)S+=2*Math.PI,D+=2*Math.PI;D-S>2*Math.PI&&(S=0,D=2*Math.PI);const P=(D-S)/b.curveStepCount,R=[];for(let E=S;E<=D;E+=P)R.push([C+w*Math.cos(E),v+_*Math.sin(E)]);return R.push([C+w*Math.cos(D),v+_*Math.sin(D)]),R.push([C,v]),Er([R],b)})(t,r,i,a,n,o,c));return c.stroke!==te&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),a=[],n=ah(t,i);if(i.fill&&i.fill!==te)if(i.fillStyle==="solid"){const o=ah(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Cs(hh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Cs(hh(c),10,(1+i.roughness)/2))}o.length&&a.push(Er([o],i))}return i.stroke!==te&&a.push(n),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],n=Da(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(_s([t],i)):a.push(Er([t],i))),i.stroke!==te&&a.push(n),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=i.fill&&i.fill!=="transparent"&&i.fill!==te,o=i.stroke!==te,s=!!(i.simplification&&i.simplification<1),l=(function(h,u,f){const d=Cp(_p(_l(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Cs(x,u)),x=[]},C=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:w,data:_}of d)switch(w){case"M":C(),y=[_[0],_[1]],m.push(y);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!x.length){const S=m.length?m[m.length-1]:y;x.push([S[0],S[1]])}x.push([_[0],_[1]]),x.push([_[2],_[3]]),x.push([_[4],_[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(C(),!f)return g;const v=[];for(const w of g){const _=$v(w,f);_.length&&v.push(_)}return v})(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=sh(t,i);if(n)if(i.fillStyle==="solid")if(l.length===1){const h=sh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(_s(l,i));else a.push(Er(l,i));return o&&(s?l.forEach((h=>{a.push(Da(h,!1,i))})):a.push(c)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const n=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":i+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":i+=`L${n[0]} ${n[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const n of r){let o=null;switch(n.type){case"path":o={d:this.opsToPath(n),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:te};break;case"fillPath":o={d:this.opsToPath(n),stroke:te,strokeWidth:0,fill:i.fill||te};break;case"fillSketch":o=this.fillSketch(n,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||te,strokeWidth:i,fill:te}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class Fv{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new bn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,n=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,n),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,n,s),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const n of r.ops){const o=typeof i=="number"&&i>=0?n.data.map((s=>+s.toFixed(i))):n.data;switch(n.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,n){const o=this.gen.line(t,r,i,a,n);return this.draw(o),o}rectangle(t,r,i,a,n){const o=this.gen.rectangle(t,r,i,a,n);return this.draw(o),o}ellipse(t,r,i,a,n){const o=this.gen.ellipse(t,r,i,a,n);return this.draw(o),o}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n),n}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,n,o,s=!1,l){const c=this.gen.arc(t,r,i,a,n,o,s,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const _a="http://www.w3.org/2000/svg";class Dv{constructor(t,r){this.svg=t,this.gen=new bn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,n=a.createElementNS(_a,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=a.createElementNS(_a,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(_a,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,s,i)}l&&n.appendChild(l)}return n}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const n=t.createElementNS(_a,"path");return n.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),n.setAttribute("stroke",i.fill||""),n.setAttribute("stroke-width",a+""),n.setAttribute("fill","none"),i.fillLineDash&&n.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,n){const o=this.gen.line(t,r,i,a,n);return this.draw(o)}rectangle(t,r,i,a,n){const o=this.gen.rectangle(t,r,i,a,n);return this.draw(o)}ellipse(t,r,i,a,n){const o=this.gen.ellipse(t,r,i,a,n);return this.draw(o)}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,n,o,s=!1,l){const c=this.gen.arc(t,r,i,a,n,o,s,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Y={canvas:(e,t)=>new Fv(e,t),svg:(e,t)=>new Dv(e,t),generator:e=>new bn(e),newSeed:()=>bn.newSeed()},et=p(async(e,t,r)=>{var u,f;let i;const a=t.useHtmlLabels||Et((u=dt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const n=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=n.insert("g").attr("class","label").attr("style",Wt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await Ze(o,se(wr(s),dt()),{useHtmlLabels:a,width:t.width||((f=dt().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(a){const d=l.children[0],g=ht(l),m=d.getElementsByTagName("img");if(m){const y=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(x=>new Promise(b=>{function C(){if(x.style.display="flex",x.style.flexDirection="column",y){const v=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[_=Ph.fontSize]=Pn(v),S=_*w+"px";x.style.minWidth=S,x.style.maxWidth=S}else x.style.width="100%";b(x)}p(C,"setupImage"),setTimeout(()=>{x.complete&&C()}),x.addEventListener("error",C),x.addEventListener("load",C)})))}c=d.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return a?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:c,halfPadding:h,label:o}},"labelHelper"),ws=p(async(e,t,r)=>{var l,c,h,u,f,d;const i=r.useHtmlLabels||Et((c=(l=dt())==null?void 0:l.flowchart)==null?void 0:c.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),n=await Ze(a,se(wr(t),dt()),{useHtmlLabels:i,width:r.width||((u=(h=dt())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=n.getBBox();const s=r.padding/2;if(Et((d=(f=dt())==null?void 0:f.flowchart)==null?void 0:d.htmlLabels)){const g=n.children[0],m=ht(n);o=g.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:a}},"insertLabel"),X=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),tt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function lt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(lt,"createPathFromPoints");function Ve(e,t,r,i,a,n){const o=[],l=r-e,c=i-t,h=l/n,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=f+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(Ve,"generateFullSineWavePoints");function Ui(e,t,r,i,a,n){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Ui,"generateCirclePoints");var Ov=p((e,t)=>{var r=e.x,i=e.y,a=t.x-r,n=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(n)*o>Math.abs(a)*s?(n<0&&(s=-s),l=n===0?0:s*a/n,c=s):(a<0&&(o=-o),l=o,c=a===0?0:o*n/a),{x:r+l,y:i+c}},"intersectRect"),ni=Ov;function Tp(e,t){t&&e.attr("style",t)}p(Tp,"applyStyle");async function Ap(e){const t=ht(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=dt();let a=e.label;e.label&&Vr(e.label)&&(a=await Ao(e.label.replace(ei.lineBreakRegex,`
|
|
187
|
+
`),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(se(o,i)),Tp(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(Ap,"addHtmlLabel");var Rv=p(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),Et(dt().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),F.info("vertexText"+a);const n={isNode:i,label:wr(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Ap(n)}else{const n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof a=="string"?o=a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?o=a:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),n.appendChild(l)}return n}},"createLabel"),cr=Rv,Ke=p((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Lp=p(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=G(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Et(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Ze(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(Et(r.flowchart.htmlLabels)){const S=g.children[0],D=ht(g);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const S=Y.svg(u),D=U(t,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),P=S.path(Ke(b,C,y,x,0),D);v=u.insert(()=>(F.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Qo(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),s){const S=d.select("span");S&&S.attr("style",s)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return ni(t,S)},{cluster:u,labelBBox:m}},"rect"),Iv=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,n=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-n).attr("y",t.y-t.height/2-n).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return ni(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Pv=p(async(e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=u.node().appendChild(await cr(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(Et(r.flowchart.htmlLabels)){const P=d.children[0],R=ht(d);g=P.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,C=t.height+m-g.height-6,v=t.x-x/2,w=t.y-b/2;t.width=x;const _=t.y-t.height/2-y+g.height+2;let S;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),R=Y.svg(c),E=t.rx||t.ry?R.path(Ke(v,w,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:a}):R.rectangle(v,w,x,b,{seed:a});S=c.insert(()=>E,":first-child");const z=R.rectangle(v,_,x,C,{fill:P?n:o,fillStyle:P?"hachure":"solid",stroke:l,seed:a});S=c.insert(()=>E,":first-child"),f=c.insert(()=>z)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",v).attr("y",w).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",_).attr("width",x).attr("height",C);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(Et(r.flowchart.htmlLabels)?0:3)})`);const D=S.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(P){return ni(t,P)},{cluster:c,labelBBox:g}},"roundedWithTitle"),Nv=p(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=G(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Et(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Ze(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Et(r.flowchart.htmlLabels)){const S=g.children[0],D=ht(g);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const S=Y.svg(u),D=U(t,{roughness:.7,fill:n,stroke:o,fillWeight:4,seed:a}),P=S.path(Ke(b,C,y,x,t.rx),D);v=u.insert(()=>(F.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=Qo(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),s){const S=d.select("span");S&&S.attr("style",s)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return ni(t,S)},{cluster:u,labelBBox:m}},"kanbanSection"),zv=p((e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=Y.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});d=o.insert(()=>y,":first-child")}else d=s.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return ni(t,m)},{cluster:o,labelBBox:{}}},"divider"),Wv=Lp,qv={rect:Lp,squareRect:Wv,roundedWithTitle:Pv,noteGroup:Iv,divider:zv,kanbanSection:Nv},Bp=new Map,Hv=p(async(e,t)=>{const r=t.shape||"rect",i=await qv[r](e,t);return Bp.set(t.id,i),i},"insertCluster"),xB=p(()=>{Bp=new Map},"clear");function Mp(e,t){return e.intersect(t)}p(Mp,"intersectNode");var jv=Mp;function Ep(e,t,r,i){var a=e.x,n=e.y,o=a-i.x,s=n-i.y,l=Math.sqrt(t*t*s*s+r*r*o*o),c=Math.abs(t*r*o/l);i.x<a&&(c=-c);var h=Math.abs(t*r*s/l);return i.y<n&&(h=-h),{x:a+c,y:n+h}}p(Ep,"intersectEllipse");var $p=Ep;function Fp(e,t,r){return $p(e,t,t,r)}p(Fp,"intersectCircle");var Yv=Fp;function Dp(e,t,r,i){{const a=t.y-e.y,n=e.x-t.x,o=t.x*e.y-e.x*t.y,s=a*r.x+n*r.y+o,l=a*i.x+n*i.y+o,c=1e-6;if(s!==0&&l!==0&&po(s,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(g)<c&&po(d,g))return;const m=a*u-h*n;if(m===0)return;const y=Math.abs(m/2);let x=n*f-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*f;const C=x<0?(x-y)/m:(x+y)/m;return{x:b,y:C}}}p(Dp,"intersectLine");function po(e,t){return e*t>0}p(po,"sameSign");var Uv=Dp;function Op(e,t,r){let i=e.x,a=e.y,n=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let l=i-e.width/2-o,c=a-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=Uv(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&n.push(d)}return n.length?(n.length>1&&n.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),n[0]):e}p(Op,"intersectPolygon");var Gv=Op,q={node:jv,circle:Yv,ellipse:$p,polygon:Gv,rect:ni};function Rp(e,t){const{labelStyles:r}=G(t);t.labelStyle=r;const i=tt(t);let a=i;i||(a="anchor");const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,l=Y.svg(n),c=U(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=n.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Wt(s)),X(t,u),t.intersect=function(f){return F.info("Circle intersect",t,o,f),q.circle(t,o,f)},n}p(Rp,"anchor");function go(e,t,r,i,a,n,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/n,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*n*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),C=Math.atan2((t-b)/n,(e-x)/a);let w=Math.atan2((i-b)/n,(r-x)/a)-C;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const _=[];for(let S=0;S<20;S++){const D=S/19,P=C+D*w,R=x+a*Math.cos(P),E=b+n*Math.sin(P);_.push({x:R,y:E})}return _}p(go,"generateArcPoints");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=n.width+t.padding+20,s=n.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...go(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...go(o/2,s/2,o/2,-s/2,c,l,!0)],f=Y.svg(a),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=lt(u),m=f.path(g,d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),X(t,y),t.intersect=function(x){return q.polygon(t,u,x)},a}p(Ip,"bowTieRect");function Qe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Qe,"insertPolygonShape");async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=n.height+t.padding,s=12,l=n.width+t.padding+s,c=0,h=l,u=-o,f=0,d=[{x:c+s,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Y.svg(a),x=U(t,{}),b=lt(d),C=y.path(b,x);g=a.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Qe(a,l,o,d);return i&&g.attr("style",i),X(t,g),t.intersect=function(y){return q.polygon(t,d,y)},a}p(Pp,"card");function Np(e,t){const{nodeStyles:r}=G(t);t.label="";const i=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(28,t.width??0),o=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],s=Y.svg(i),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=lt(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return q.polygon(t,o,f)},i}p(Np,"choice");async function Cl(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:n,bbox:o,halfPadding:s}=await et(e,t,tt(t)),l=(r==null?void 0:r.padding)??s,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=Y.svg(n),d=U(t,{}),g=f.circle(0,0,c*2,d);h=n.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Wt(u))}else h=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return X(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return q.circle(f,g,d)},t.intersect=function(f){return F.info("Circle intersect",t,c,f),q.circle(t,c,f)},n}p(Cl,"circle");function zp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},n={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${n.x},${n.y} L ${s.x},${s.y}
|
|
188
|
+
M ${a.x},${a.y} L ${o.x},${o.y}`}p(zp,"createLine");function Wp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),n=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,s=Y.svg(a),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,n*2,l),h=zp(n),u=s.path(h,l),f=a.insert(()=>c,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),X(t,f),t.intersect=function(d){return F.info("crossedCircle intersect",t,{radius:n,point:d}),q.circle(t,n,d)},a}p(Wp,"crossedCircle");function Fe(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Fe,"generateCirclePoints");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Fe(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Fe(s/2+c*2,-c,c,20,-180,-270),...Fe(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Fe(s/2,l/2,c,20,0,90)],f=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Fe(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Fe(s/2+s*.1,-c,c,20,-180,-270),...Fe(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Fe(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],d=Y.svg(a),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=lt(u).replace("Z",""),x=d.path(y,g),b=lt(f),C=d.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>C,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),X(t,v),t.intersect=function(w){return q.polygon(t,f,w)},a}p(qp,"curlyBraceLeft");function De(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}p(De,"generateCirclePoints");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...De(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...De(s/2+c*2,-c,c,20,-180,-270),...De(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...De(s/2,l/2,c,20,0,90)],f=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...De(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...De(s/2+c*2,-c,c,20,-180,-270),...De(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...De(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],d=Y.svg(a),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=lt(u).replace("Z",""),x=d.path(y,g),b=lt(f),C=d.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>C,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),X(t,v),t.intersect=function(w){return q.polygon(t,f,w)},a}p(Hp,"curlyBraceRight");function Dt(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Dt,"generateCirclePoints");async function jp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Dt(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Dt(s/2+c*2,-c,c,20,-180,-270),...Dt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Dt(s/2,l/2,c,20,0,90)],f=[...Dt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Dt(-s/2-c/2,-c,c,20,0,90),...Dt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Dt(-s/2+c+c/2,l/2,c,30,-180,-270)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Dt(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Dt(s/2+c*2,-c,c,20,-180,-270),...Dt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Dt(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...Dt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Dt(-s/2-c/2,-c,c,20,0,90),...Dt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Dt(-s/2+c+c/2,l/2,c,30,-180,-270)],g=Y.svg(a),m=U(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=lt(u).replace("Z",""),b=g.path(x,m),v=lt(f).replace("Z",""),w=g.path(v,m),_=lt(d),S=g.path(_,{...m}),D=a.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>w,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),X(t,D),t.intersect=function(P){return q.polygon(t,d,P)},a}p(jp,"curlyBraces");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=80,s=20,l=Math.max(o,(n.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),c=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,f=Y.svg(a),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Ui(-y,-m/2,h,50,270,90)],C=lt(b),v=f.path(C,d),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-l/2}, ${-c/2})`),X(t,w),t.intersect=function(_){return q.polygon(t,b,_)},a}p(Yp,"curvedTrapezoid");var Vv=p((e,t,r,i,a,n)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Xv=p((e,t,r,i,a,n)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Zv=p((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(n.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=Y.svg(a),g=Xv(0,0,s,h,l,c),m=Zv(0,c,s,h,l,c),y=d.path(g,U(t,{})),x=d.path(m,U(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=Vv(0,0,s,h,l,c);u=a.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",Wt(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),X(t,u),o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(d){const g=q.rect(t,d),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}p(Up,"cylinder");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=n.width+t.padding,l=n.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:f}=t,d=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+c+(t.padding??0)/2-(n.y-(n.top??0))})`),X(t,x),t.intersect=function(b){return q.rect(t,b)},a}p(Gp,"dividedRectangle");async function Vp(e,t){var f,d;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o}=await et(e,t,tt(t)),l=n.width/2+o+5,c=n.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=Y.svg(a),m=U(t,{roughness:.2,strokeWidth:2.5}),y=U(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,l*2,m),b=g.circle(0,0,c*2,y);h=a.insert("g",":first-child"),h.attr("class",Wt(t.cssClasses)).attr("style",Wt(u)),(f=h.node())==null||f.appendChild(x),(d=h.node())==null||d.appendChild(b)}else{h=a.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return X(t,h),t.intersect=function(g){return F.info("DoubleCircle intersect",t,l,g),q.circle(t,l,g)},a}p(Vp,"doublecircle");function Xp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.label="",t.labelStyle=i;const n=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=Y.svg(n),{nodeBorder:c}=r,h=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=n.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),X(t,f),t.intersect=function(d){return F.info("filledCircle intersect",t,{radius:o,point:d}),q.circle(t,o,d)},n}p(Xp,"filledCircle");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=n.width+(t.padding??0),l=s+n.height,c=s+n.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=Y.svg(a),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=lt(h),m=f.path(g,d),y=a.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=l,X(t,y),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(x){return F.info("Triangle intersect",t,h,x),q.polygon(t,h,x)},a}p(Zp,"flippedTriangle");function Kp(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:n}=G(t);t.label="";const o=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,f=Y.svg(o),d=U(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),X(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return q.rect(t,x)},o}p(Kp,"forkJoin");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=80,n=50,{shapeSvg:o,bbox:s}=await et(e,t,tt(t)),l=Math.max(a,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,f=Y.svg(o),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Ui(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=lt(g),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),X(t,x),t.intersect=function(b){return F.info("Pill intersect",t,{radius:h,point:b}),q.polygon(t,g,b)},o}p(Qp,"halfRoundedRectangle");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=n.height+(t.padding??0),s=n.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=Y.svg(a),h=U(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=s/2;const f=u/6;u=u+f;const d=o/2,g=d/2,m=u-g,y=[{x:-m,y:-d},{x:0,y:-d},{x:m,y:-d},{x:u,y:0},{x:m,y:d},{x:0,y:d},{x:-m,y:d},{x:-u,y:0}],x=lt(y),b=c.path(x,h),C=a.insert(()=>b,":first-child");return C.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),t.width=s,t.height=o,X(t,C),t.intersect=function(v){return q.polygon(t,y,v)},a}p(Jp,"hexagon");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await et(e,t,tt(t)),n=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,l=Y.svg(a),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:n,y:0},{x:0,y:o},{x:n,y:o}],u=lt(h),f=l.path(u,c),d=a.insert(()=>f,":first-child");return d.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-n/2}, ${-o/2})`),X(t,d),t.intersect=function(g){return F.info("Pill intersect",t,{points:h}),q.polygon(t,h,g)},a}p(tg,"hourglass");async function eg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await et(e,t,"icon-shape default"),f=t.pos==="t",d=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=ri(t),x=-g/2,b=-d/2,C=t.label?8:0,v=Y.svg(c),w=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=v.rectangle(x,b,g,d,w),S=Math.max(g,h.width),D=d+h.height+C,P=v.rectangle(-S/2,-D/2,S,D,{...w,fill:"transparent",stroke:"none"}),R=c.insert(()=>_,":first-child"),E=c.insert(()=>P);if(t.icon){const z=c.append("g");z.html(`<g>${await ia(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const O=z.node().getBBox(),M=O.width,L=O.height,A=O.x,$=O.y;z.attr("transform",`translate(${-M/2-A},${f?h.height/2+C/2-L/2-$:-h.height/2-C/2-L/2-$})`),z.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),R.attr("transform",`translate(0,${f?h.height/2+C/2:-h.height/2-C/2})`),X(t,E),t.intersect=function(z){if(F.info("iconSquare intersect",t,z),!t.label)return q.rect(t,z);const O=t.x??0,M=t.y??0,L=t.height??0;let A=[];return f?A=[{x:O-h.width/2,y:M-L/2},{x:O+h.width/2,y:M-L/2},{x:O+h.width/2,y:M-L/2+h.height+C},{x:O+g/2,y:M-L/2+h.height+C},{x:O+g/2,y:M+L/2},{x:O-g/2,y:M+L/2},{x:O-g/2,y:M-L/2+h.height+C},{x:O-h.width/2,y:M-L/2+h.height+C}]:A=[{x:O-g/2,y:M-L/2},{x:O+g/2,y:M-L/2},{x:O+g/2,y:M-L/2+d},{x:O+h.width/2,y:M-L/2+d},{x:O+h.width/2/2,y:M+L/2},{x:O-h.width/2,y:M+L/2},{x:O-h.width/2,y:M-L/2+d},{x:O-g/2,y:M-L/2+d}],q.polygon(t,A,z)},c}p(eg,"icon");async function rg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await et(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=ri(t),b=Y.svg(c),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=x.get("fill");C.stroke=v??y;const w=c.append("g");t.icon&&w.html(`<g>${await ia(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const _=w.node().getBBox(),S=_.width,D=_.height,P=_.x,R=_.y,E=Math.max(S,D)*Math.SQRT2+f*2,z=b.circle(0,0,E,C),O=Math.max(E,h.width),M=E+h.height+d,L=b.rectangle(-O/2,-M/2,O,M,{...C,fill:"transparent",stroke:"none"}),A=c.insert(()=>z,":first-child"),$=c.insert(()=>L);return w.attr("transform",`translate(${-S/2-P},${g?h.height/2+d/2-D/2-R:-h.height/2-d/2-D/2-R})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-M/2:M/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),X(t,$),t.intersect=function(B){return F.info("iconSquare intersect",t,B),q.rect(t,B)},c}p(rg,"iconCircle");async function ig(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await et(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=ri(t),C=-m/2,v=-g/2,w=t.label?8:0,_=Y.svg(c),S=U(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=b.get("fill");S.stroke=D??x;const P=_.path(Ke(C,v,m,g,5),S),R=Math.max(m,h.width),E=g+h.height+w,z=_.rectangle(-R/2,-E/2,R,E,{...S,fill:"transparent",stroke:"none"}),O=c.insert(()=>P,":first-child").attr("class","icon-shape2"),M=c.insert(()=>z);if(t.icon){const L=c.append("g");L.html(`<g>${await ia(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=L.node().getBBox(),$=A.width,B=A.height,W=A.x,V=A.y;L.attr("transform",`translate(${-$/2-W},${d?h.height/2+w/2-B/2-V:-h.height/2-w/2-B/2-V})`),L.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),X(t,M),t.intersect=function(L){if(F.info("iconSquare intersect",t,L),!t.label)return q.rect(t,L);const A=t.x??0,$=t.y??0,B=t.height??0;let W=[];return d?W=[{x:A-h.width/2,y:$-B/2},{x:A+h.width/2,y:$-B/2},{x:A+h.width/2,y:$-B/2+h.height+w},{x:A+m/2,y:$-B/2+h.height+w},{x:A+m/2,y:$+B/2},{x:A-m/2,y:$+B/2},{x:A-m/2,y:$-B/2+h.height+w},{x:A-h.width/2,y:$-B/2+h.height+w}]:W=[{x:A-m/2,y:$-B/2},{x:A+m/2,y:$-B/2},{x:A+m/2,y:$-B/2+g},{x:A+h.width/2,y:$-B/2+g},{x:A+h.width/2/2,y:$+B/2},{x:A-h.width/2,y:$+B/2},{x:A-h.width/2,y:$-B/2+g},{x:A-m/2,y:$-B/2+g}],q.polygon(t,W,L)},c}p(ig,"iconRounded");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await et(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=ri(t),C=-m/2,v=-g/2,w=t.label?8:0,_=Y.svg(c),S=U(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=b.get("fill");S.stroke=D??x;const P=_.path(Ke(C,v,m,g,.1),S),R=Math.max(m,h.width),E=g+h.height+w,z=_.rectangle(-R/2,-E/2,R,E,{...S,fill:"transparent",stroke:"none"}),O=c.insert(()=>P,":first-child"),M=c.insert(()=>z);if(t.icon){const L=c.append("g");L.html(`<g>${await ia(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=L.node().getBBox(),$=A.width,B=A.height,W=A.x,V=A.y;L.attr("transform",`translate(${-$/2-W},${d?h.height/2+w/2-B/2-V:-h.height/2-w/2-B/2-V})`),L.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),X(t,M),t.intersect=function(L){if(F.info("iconSquare intersect",t,L),!t.label)return q.rect(t,L);const A=t.x??0,$=t.y??0,B=t.height??0;let W=[];return d?W=[{x:A-h.width/2,y:$-B/2},{x:A+h.width/2,y:$-B/2},{x:A+h.width/2,y:$-B/2+h.height+w},{x:A+m/2,y:$-B/2+h.height+w},{x:A+m/2,y:$+B/2},{x:A-m/2,y:$+B/2},{x:A-m/2,y:$-B/2+h.height+w},{x:A-h.width/2,y:$-B/2+h.height+w}]:W=[{x:A-m/2,y:$-B/2},{x:A+m/2,y:$-B/2},{x:A+m/2,y:$-B/2+g},{x:A+h.width/2,y:$-B/2+g},{x:A+h.width/2/2,y:$+B/2},{x:A-h.width/2,y:$+B/2},{x:A-h.width/2,y:$-B/2+g},{x:A-m/2,y:$-B/2+g}],q.polygon(t,W,L)},c}p(ag,"iconSquare");async function ng(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/n;const{labelStyles:o}=G(t);t.labelStyle=o;const s=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?s??0:0,(t==null?void 0:t.assetWidth)??a),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??n;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:f,label:d}=await et(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=Y.svg(u),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=b.rectangle(m,y,c,h,C),w=Math.max(c,f.width),_=h+f.height+x,S=b.rectangle(-w/2,-_/2,w,_,{...C,fill:"none",stroke:"none"}),D=u.insert(()=>v,":first-child"),P=u.insert(()=>S);if(t.img){const R=u.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${g?_/2-h:-_/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),D.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),X(t,P),t.intersect=function(R){if(F.info("iconSquare intersect",t,R),!t.label)return q.rect(t,R);const E=t.x??0,z=t.y??0,O=t.height??0;let M=[];return g?M=[{x:E-f.width/2,y:z-O/2},{x:E+f.width/2,y:z-O/2},{x:E+f.width/2,y:z-O/2+f.height+x},{x:E+c/2,y:z-O/2+f.height+x},{x:E+c/2,y:z+O/2},{x:E-c/2,y:z+O/2},{x:E-c/2,y:z-O/2+f.height+x},{x:E-f.width/2,y:z-O/2+f.height+x}]:M=[{x:E-c/2,y:z-O/2},{x:E+c/2,y:z-O/2},{x:E+c/2,y:z-O/2+h},{x:E+f.width/2,y:z-O/2+h},{x:E+f.width/2/2,y:z+O/2},{x:E-f.width/2,y:z+O/2},{x:E-f.width/2,y:z-O/2+h},{x:E-c/2,y:z-O/2+h}],q.polygon(t,M,R)},u}p(ng,"imageSquare");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),f=U(t,{}),d=lt(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Qe(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},a}p(sg,"inv_trapezoid");async function jn(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:n,bbox:o}=await et(e,t,tt(t)),s=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-s/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=Y.svg(n),y=U(t,{}),x=f||d?m.path(Ke(c,h,s,l,f||0),y):m.rectangle(c,h,s,l,y);u=n.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Wt(g))}else u=n.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Wt(f)).attr("ry",Wt(d)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return X(t,u),t.calcIntersect=function(m,y){return q.rect(m,y)},t.intersect=function(m){return q.rect(t,m)},n}p(jn,"drawRect");async function og(e,t){const{shapeSvg:r,bbox:i,label:a}=await et(e,t,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),X(t,n),t.intersect=function(l){return q.rect(t,l)},r}p(og,"labelRect");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),f=U(t,{}),d=lt(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Qe(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},a}p(lg,"lean_left");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),f=U(t,{}),d=lt(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Qe(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},a}p(cg,"lean_right");function hg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,o=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=Y.svg(a),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=lt(c),d=h.path(f,u),g=a.insert(()=>d,":first-child");return n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),X(t,g),t.intersect=function(m){return F.info("lightningBolt intersect",t,m),q.polygon(t,c,m)},a}p(hg,"lightningBolt");var Kv=p((e,t,r,i,a,n,o)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Qv=p((e,t,r,i,a,n,o)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Jv=p((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(n.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=Y.svg(a),m=Qv(0,0,s,h,l,c,u),y=Jv(0,c,s,h,l,c),x=U(t,{}),b=g.path(m,x),C=g.path(y,x);a.insert(()=>C,":first-child").attr("class","line"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=Kv(0,0,s,h,l,c,u);f=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Wt(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),X(t,f),o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+c-(n.y-(n.top??0))})`),t.intersect=function(g){const m=q.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},a}p(ug,"linedCylinder");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,{cssStyles:u}=t,f=Y.svg(a),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...Ve(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c/2-(n.y-(n.top??0))})`),X(t,y),t.intersect=function(x){return q.polygon(t,g,x)},a}p(fg,"linedWaveEdgedRect");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,d=Y.svg(a),g=U(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=d.path(x,g),C=lt(y),v=d.path(C,{...g,fill:"none"}),w=a.insert(()=>v,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(n.width/2)-c-(n.x-(n.left??0))}, ${-(n.height/2)+c-(n.y-(n.top??0))})`),X(t,w),t.intersect=function(_){return q.polygon(t,m,_)},a}p(dg,"multiRect");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,u=-s/2,f=-h/2,d=5,{cssStyles:g}=t,m=Ve(u-d,f+h+d,u+s-d,f+h+d,c,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:y.y-2*d},{x:u+s+d,y:y.y-2*d},{x:u+s+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+s-d,y:f+d},{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:f},{x:u,y:f}],C=Y.svg(a),v=U(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=lt(x),_=C.path(w,v),S=lt(b),D=C.path(S,v),P=a.insert(()=>_,":first-child");return P.insert(()=>D),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)+d-c/2-(n.y-(n.top??0))})`),X(t,P),t.intersect=function(R){return q.polygon(t,x,R)},a}p(pg,"multiWaveEdgedRectangle");async function gg(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i,t.useHtmlLabels||((b=Nt().flowchart)==null?void 0:b.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:l}=await et(e,t,tt(t)),c=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,f=-h/2,{cssStyles:d}=t,g=Y.svg(o),m=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,c,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),X(t,x),t.intersect=function(C){return q.rect(t,C)},o}p(gg,"note");var tS=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=n.width+t.padding,s=n.height+t.padding,l=o+s,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=Y.svg(a),g=U(t,{}),m=tS(0,0,l),y=d.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Qe(a,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),X(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=q.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}p(mg,"question");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,g=Y.svg(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=lt(f),x=g.path(y,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),X(t,b),t.intersect=function(C){return q.polygon(t,f,C)},a}p(yg,"rect_left_inv_arrow");async function xg(e,t){var D,P;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=n.insert("g"),s=n.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=s.node().appendChild(await cr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(Et((P=(D=dt())==null?void 0:D.flowchart)==null?void 0:P.htmlLabels)){const R=h.children[0],E=ht(h);u=R.getBoundingClientRect(),E.attr("width",u.width),E.attr("height",u.height)}F.info("Text 2",l);const f=l||[],d=h.getBBox(),g=s.node().appendChild(await cr(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=ht(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ht(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),ht(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),C=u.height+(t.padding||0),v=-u.width/2-x,w=-u.height/2-x;let _,S;if(t.look==="handDrawn"){const R=Y.svg(n),E=U(t,{}),z=R.path(Ke(v,w,b,C,t.rx||0),E),O=R.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,E);S=n.insert(()=>(F.debug("Rough node insert CXC",z),O),":first-child"),_=n.insert(()=>(F.debug("Rough node insert CXC",z),z),":first-child")}else _=o.insert("rect",":first-child"),S=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),S.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return X(t,_),t.intersect=function(R){return q.rect(t,R)},n}p(xg,"rectWithTitle");function Ai(e,t,r,i,a,n,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/n,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*n*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),C=Math.atan2((t-b)/n,(e-x)/a);let w=Math.atan2((i-b)/n,(r-x)/a)-C;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const _=[];for(let S=0;S<20;S++){const D=S/19,P=C+D*w,R=x+a*Math.cos(P),E=b+n*Math.sin(P);_.push({x:R,y:E})}return _}p(Ai,"generateArcPoints");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=(t==null?void 0:t.padding)??0,s=(t==null?void 0:t.padding)??0,l=(t!=null&&t.width?t==null?void 0:t.width:n.width)+o*2,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+s*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,d=Y.svg(a),g=U(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...Ai(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...Ai(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...Ai(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...Ai(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=lt(m),x=d.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),X(t,b),t.intersect=function(C){return q.polygon(t,m,C)},a}p(bg,"roundedRect");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=(t==null?void 0:t.padding)??0,l=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-n.width/2-s,u=-n.height/2-s,{cssStyles:f}=t,d=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Wt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(n.x-(n.left??0))},${-c/2+(t.padding??0)-(n.y-(n.top??0))})`),X(t,x),t.intersect=function(b){return q.rect(t,b)},a}p(_g,"shadedProcess");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,{cssStyles:u}=t,f=Y.svg(a),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=lt(g),y=f.path(m,d),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))}, ${-l/4+(t.padding??0)-(n.y-(n.top??0))})`),X(t,x),t.intersect=function(b){return q.polygon(t,g,b)},a}p(Cg,"slopedRect");async function wg(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return jn(e,t,r)}p(wg,"squareRect");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=n.height+t.padding,s=n.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=Y.svg(a),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-s/2+l,y:-o/2},{x:s/2-l,y:-o/2},...Ui(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},...Ui(s/2-l,0,l,50,270,450)],d=lt(f),g=h.path(d,u),m=a.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),X(t,m),t.intersect=function(y){return q.polygon(t,f,y)},a}p(kg,"stadium");async function vg(e,t){return jn(e,t,{rx:5,ry:5})}p(vg,"state");function Sg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{cssStyles:n}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Y.svg(c),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=s??l,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),n&&m.selectAll("path").attr("style",n),a&&m.selectAll("path").attr("style",a),X(t,m),t.intersect=function(y){return q.circle(t,7,y)},c}p(Sg,"stateEnd");function Tg(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const s=Y.svg(a).circle(0,0,14,g_(i));n=a.insert(()=>s),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return X(t,n),t.intersect=function(o){return q.circle(t,7,o)},a}p(Tg,"stateStart");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=((t==null?void 0:t.padding)||0)/2,s=n.width+t.padding,l=n.height+t.padding,c=-n.width/2-o,h=-n.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=Y.svg(a),d=U(t,{}),g=f.rectangle(c-8,h,s+16,l,d),m=f.line(c,h,c,h+l,d),y=f.line(c+s,h,c+s,h+l,d);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Wt(b)),X(t,x)}else{const f=Qe(a,s,l,u);i&&f.attr("style",i),X(t,f)}return t.intersect=function(f){return q.polygon(t,u,f)},a}p(Ag,"subroutine");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,d=Y.svg(a),g=U(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],y=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=d.path(x,g),C=lt(y),v=d.path(C,{...g,fillStyle:"solid"}),w=a.insert(()=>v,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),X(t,w),t.intersect=function(_){return q.polygon(t,m,_)},a}p(Lg,"taggedRect");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=.2*s,u=.2*l,f=l+c,{cssStyles:d}=t,g=Y.svg(a),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...Ve(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,c,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,C=[{x:x+s-h,y:(b+l)*1.4},{x:x+s,y:b+l-u},{x:x+s,y:(b+l)*.9},...Ve(x+s,(b+l)*1.3,x+s-h,(b+l)*1.5,-l*.03,.5)],v=lt(y),w=g.path(v,m),_=lt(C),S=g.path(_,{...m,fillStyle:"solid"}),D=a.insert(()=>S,":first-child");return D.insert(()=>w,":first-child"),D.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c/2-(n.y-(n.top??0))})`),X(t,D),t.intersect=function(P){return q.polygon(t,y,P)},a}p(Bg,"taggedWaveEdgedRectangle");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=Math.max(n.width+t.padding,(t==null?void 0:t.width)||0),s=Math.max(n.height+t.padding,(t==null?void 0:t.height)||0),l=-o/2,c=-s/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),X(t,h),t.intersect=function(u){return q.rect(t,u)},a}p(Mg,"text");var eS=p((e,t,r,i,a,n)=>`M${e},${t}
|
|
189
|
+
a${a},${n} 0,0,1 0,${-i}
|
|
190
|
+
l${r},0
|
|
191
|
+
a${a},${n} 0,0,1 0,${i}
|
|
192
|
+
M${r},${-i}
|
|
193
|
+
a${a},${n} 0,0,0 0,${i}
|
|
194
|
+
l${-r},0`,"createCylinderPathD"),rS=p((e,t,r,i,a,n)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),iS=p((e,t,r,i,a,n)=>[`M${e+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o,halfPadding:s}=await et(e,t,tt(t)),l=t.look==="neo"?s*2:s,c=n.height+l,h=c/2,u=h/(2.5+c/50),f=n.width+u+l,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=Y.svg(a),y=rS(0,0,f,c,u,h),x=iS(0,0,f,c,u,h),b=m.path(y,U(t,{})),C=m.path(x,U(t,{fill:"none"}));g=a.insert(()=>C,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=eS(0,0,f,c,u,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Wt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),o.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),X(t,g),t.intersect=function(m){const y=q.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}p(Eg,"tiltedCylinder");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=n.width+t.padding,s=n.height+t.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Y.svg(a),f=U(t,{}),d=lt(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Qe(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return q.polygon(t,l,u)},a}p($g,"trapezoid");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=60,s=20,l=Math.max(o,n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=Y.svg(a),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=lt(d),m=u.path(g,f),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),X(t,y),t.intersect=function(x){return q.polygon(t,d,x)},a}p(Fg,"trapezoidalPentagon");async function Dg(e,t){var b;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Et((b=dt().flowchart)==null?void 0:b.htmlLabels),l=n.width+(t.padding??0),c=l+n.height,h=l+n.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=Y.svg(a),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=lt(u),y=d.path(m,g),x=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,X(t,x),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${c/2-(n.height+(t.padding??0)/(s?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(C){return F.info("Triangle intersect",t,u,C),q.polygon(t,u,C)},a}p(Dg,"triangle");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-s,g=d>0?d/2:0,m=Y.svg(a),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Ve(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=lt(x),C=m.path(b,y),v=a.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c-(n.y-(n.top??0))})`),X(t,v),t.intersect=function(w){return q.polygon(t,x,w)},a}p(Og,"waveEdgedRectangle");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,tt(t)),o=100,s=50,l=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=Y.svg(a),x=U(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ve(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...Ve(u/2,-g/2,-u/2,-g/2,d,-1)],C=lt(b),v=y.path(C,x),w=a.insert(()=>v,":first-child");return w.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),X(t,w),t.intersect=function(_){return q.polygon(t,b,_)},a}p(Rg,"waveRectangle");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await et(e,t,tt(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,d=Y.svg(a),g=U(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],y=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c}
|
|
195
|
+
M${h-c},${u} L${h+s},${u}
|
|
196
|
+
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(n.width/2)+c/2-(n.x-(n.left??0))}, ${-(n.height/2)+c/2-(n.y-(n.top??0))})`),X(t,b),t.intersect=function(C){return q.polygon(t,m,C)},a}p(Ig,"windowPane");async function wl(e,t){var ut,at,mt,st;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:nt}=Nt(),{background:ct}=nt,xt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await wl(e,xt)}const i=Nt();t.useHtmlLabels=i.htmlLabels;let a=((ut=i.er)==null?void 0:ut.diagramPadding)??10,n=((at=i.er)==null?void 0:at.entityPadding)??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:l}=G(t);if(r.attributes.length===0&&t.label){const nt={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};Pe(t.label,i)+nt.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const ct=await jn(e,t,nt);if(!Et(i.htmlLabels)){const xt=ct.select("text"),Ct=(mt=xt.node())==null?void 0:mt.getBBox();xt.attr("transform",`translate(${-Ct.width/2}, 0)`)}return ct}i.htmlLabels||(a*=1.25,n*=1.25);let c=tt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await Fr(h,t.label??"",i,0,0,["name"],s);u.height+=n;let f=0;const d=[],g=[];let m=0,y=0,x=0,b=0,C=!0,v=!0;for(const nt of r.attributes){const ct=await Fr(h,nt.type,i,0,f,["attribute-type"],s);m=Math.max(m,ct.width+a);const xt=await Fr(h,nt.name,i,0,f,["attribute-name"],s);y=Math.max(y,xt.width+a);const Ct=await Fr(h,nt.keys.join(),i,0,f,["attribute-keys"],s);x=Math.max(x,Ct.width+a);const bt=await Fr(h,nt.comment,i,0,f,["attribute-comment"],s);b=Math.max(b,bt.width+a);const St=Math.max(ct.height,xt.height,Ct.height,bt.height)+n;g.push({yOffset:f,rowHeight:St}),f+=St}let w=4;x<=a&&(C=!1,x=0,w--),b<=a&&(v=!1,b=0,w--);const _=h.node().getBBox();if(u.width+a*2-(m+y+x+b)>0){const nt=u.width+a*2-(m+y+x+b);m+=nt/w,y+=nt/w,x>0&&(x+=nt/w),b>0&&(b+=nt/w)}const S=m+y+x+b,D=Y.svg(h),P=U(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let R=0;g.length>0&&(R=g.reduce((nt,ct)=>nt+((ct==null?void 0:ct.rowHeight)??0),0));const E=Math.max(_.width+a*2,(t==null?void 0:t.width)||0,S),z=Math.max((R??0)+u.height,(t==null?void 0:t.height)||0),O=-E/2,M=-z/2;h.selectAll("g:not(:first-child)").each((nt,ct,xt)=>{const Ct=ht(xt[ct]),bt=Ct.attr("transform");let St=0,le=0;if(bt){const ze=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(bt);ze&&(St=parseFloat(ze[1]),le=parseFloat(ze[2]),Ct.attr("class").includes("attribute-name")?St+=m:Ct.attr("class").includes("attribute-keys")?St+=m+y:Ct.attr("class").includes("attribute-comment")&&(St+=m+y+x))}Ct.attr("transform",`translate(${O+a/2+St}, ${le+M+u.height+n/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(M+n/2)+")");const L=D.rectangle(O,M,E,z,P),A=h.insert(()=>L,":first-child").attr("style",o.join("")),{themeVariables:$}=Nt(),{rowEven:B,rowOdd:W,nodeBorder:V}=$;d.push(0);for(const[nt,ct]of g.entries()){const Ct=(nt+1)%2===0&&ct.yOffset!==0,bt=D.rectangle(O,u.height+M+(ct==null?void 0:ct.yOffset),E,ct==null?void 0:ct.rowHeight,{...P,fill:Ct?B:W,stroke:V});h.insert(()=>bt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${Ct?"even":"odd"}`)}let H=D.line(O,u.height+M,E+O,u.height+M,P);h.insert(()=>H).attr("class","divider"),H=D.line(m+O,u.height+M,m+O,z+M,P),h.insert(()=>H).attr("class","divider"),C&&(H=D.line(m+y+O,u.height+M,m+y+O,z+M,P),h.insert(()=>H).attr("class","divider")),v&&(H=D.line(m+y+x+O,u.height+M,m+y+x+O,z+M,P),h.insert(()=>H).attr("class","divider"));for(const nt of d)H=D.line(O,u.height+M+nt,E+O,u.height+M+nt,P),h.insert(()=>H).attr("class","divider");if(X(t,A),l&&t.look!=="handDrawn"){const nt=l.split(";"),ct=(st=nt==null?void 0:nt.filter(xt=>xt.includes("stroke")))==null?void 0:st.map(xt=>`${xt}`).join("; ");h.selectAll("path").attr("style",ct??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(nt){return q.rect(t,nt)},h}p(wl,"erBox");async function Fr(e,t,r,i=0,a=0,n=[],o=""){const s=e.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==ic(t)&&(t=ic(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await Ze(s,t,{width:Pe(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(Et(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=ht(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Fr,"addText");async function Pg(e,t,r,i,a=r.class.padding??12){const n=i?0:3,o=e.insert("g").attr("class",tt(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Li(s,{text:`«${b}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Li(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const C=await Li(c,b,m,[b.parseClassifier()]);m+=C+n}d=c.node().getBBox().height,d<=0&&(d=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const C=await Li(h,b,y,[b.parseClassifier()]);y+=C+n}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(Pg,"textHelper");async function Li(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),n=Nt();let o="useHtmlLabels"in t?t.useHtmlLabels:Et(n.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),Vr(s)&&(o=!0);const l=await Ze(a,$o(wr(s)),{width:Pe(s,n)+50,classes:"markdown-node-label",useHtmlLabels:o},n);let c,h=1;if(o){const u=l.children[0],f=ht(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const C=((b=n.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(C,10)*5+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return a.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Li,"addText");async function Ng(e,t){var P,R;const r=dt(),i=r.class.padding??12,a=i,n=t.useHtmlLabels??Et(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await Pg(e,t,r,n,a),{labelStyles:c,nodeStyles:h}=G(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=((P=o.styles)==null?void 0:P.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!((R=r.class)!=null&&R.hideEmptyMembersBox),d=Y.svg(s),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=a:o.members.length>0&&o.methods.length===0&&(y+=a*2);const x=-m/2,b=-y/2,C=d.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),v=s.insert(()=>C,":first-child");v.attr("class","basic label-container");const w=v.node().getBBox();s.selectAll(".text").each((E,z,O)=>{var W;const M=ht(O[z]),L=M.attr("transform");let A=0;if(L){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);H&&(A=parseFloat(H[2]))}let $=A+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);n||($-=4);let B=x;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(B=-((W=M.node())==null?void 0:W.getBBox().width)/2||0,s.selectAll("text").each(function(V,H,ut){window.getComputedStyle(ut[H]).textAnchor==="middle"&&(B=0)})),M.attr("transform",`translate(${B}, ${$})`)});const _=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,S=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,D=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const E=d.line(w.x,_+S+b+i,w.x+w.width,_+S+b+i,g);s.insert(()=>E).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const E=d.line(w.x,_+S+D+b+a*2+i,w.x+w.width,_+S+D+b+i+a*2,g);s.insert(()=>E).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.labelStyle):s.selectAll("span").attr("style",u),!n){const E=RegExp(/color\s*:\s*([^;]*)/),z=E.exec(u);if(z){const O=z[0].replace("color","fill");s.selectAll("tspan").attr("style",O)}else if(c){const O=E.exec(c);if(O){const M=O[0].replace("color","fill");s.selectAll("tspan").attr("style",M)}}}return X(t,v),t.intersect=function(E){return q.rect(t,E)},s}p(Ng,"classBox");async function zg(e,t){var _,S;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t,n=t,o=20,s=20,l="verifyMethod"in t,c=tt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await _e(h,`<<${a.type}>>`,0,t.labelStyle):u=await _e(h,"<<Element>>",0,t.labelStyle);let f=u;const d=await _e(h,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+s,l){const D=await _e(h,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=D;const P=await _e(h,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=P;const R=await _e(h,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=R,await _e(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const D=await _e(h,`${n.type?`Type: ${n.type}`:""}`,f,t.labelStyle);f+=D,await _e(h,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,f,t.labelStyle)}const g=(((_=h.node())==null?void 0:_.getBBox().width)??200)+o,m=(((S=h.node())==null?void 0:S.getBBox().height)??200)+o,y=-g/2,x=-m/2,b=Y.svg(h),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=b.rectangle(y,x,g,m,C),w=h.insert(()=>v,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((D,P,R)=>{const E=ht(R[P]),z=E.attr("transform");let O=0,M=0;if(z){const B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);B&&(O=parseFloat(B[1]),M=parseFloat(B[2]))}const L=M-m/2;let A=y+o/2;(P===0||P===1)&&(A=O),E.attr("transform",`translate(${A}, ${L+o})`)}),f>u+d+s){const D=b.line(y,x+u+d+s,y+g,x+u+d+s,C);h.insert(()=>D).attr("style",i)}return X(t,w),t.intersect=function(D){return q.rect(t,D)},h}p(zg,"requirementBox");async function _e(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=dt(),o=n.htmlLabels??!0,s=await Ze(a,$o(wr(t)),{width:Pe(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let l;if(o){const c=s.children[0],h=ht(s);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=s.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=s.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(_e,"addText");var aS=p(e=>{switch(e){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 Wg(e,t,{config:r}){var z,O;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i||"";const n=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await et(e,t,tt(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((z=r==null?void 0:r.kanban)!=null&&z.ticketBaseUrl)&&(u=(O=r==null?void 0:r.kanban)==null?void 0:O.ticketBaseUrl.replace("#TICKET#",t.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await ws(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await ws(s,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await ws(s,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,C=(t==null?void 0:t.width)||0,v=Math.max(m.height,x.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+v,_=-C/2,S=-w/2;c.attr("transform","translate("+(h-C/2)+", "+(-v-l.height/2)+")"),g.attr("transform","translate("+(h-C/2)+", "+(-v+l.height/2)+")"),y.attr("transform","translate("+(h+C/2-x.width-2*n)+", "+(-v+l.height/2)+")");let D;const{rx:P,ry:R}=t,{cssStyles:E}=t;if(t.look==="handDrawn"){const M=Y.svg(s),L=U(t,{}),A=P||R?M.path(Ke(_,S,C,w,P||0),L):M.rectangle(_,S,C,w,L);D=s.insert(()=>A,":first-child"),D.attr("class","basic label-container").attr("style",E||null)}else{D=s.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",a).attr("rx",P??5).attr("ry",R??5).attr("x",_).attr("y",S).attr("width",C).attr("height",w);const M="priority"in t&&t.priority;if(M){const L=s.append("line"),A=_+2,$=S+Math.floor((P??0)/2),B=S+w-Math.floor((P??0)/2);L.attr("x1",A).attr("y1",$).attr("x2",A).attr("y2",B).attr("stroke-width","4").attr("stroke",aS(M))}}return X(t,D),t.height=w,t.intersect=function(M){return q.rect(t,M)},s}p(Wg,"kanbanItem");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await et(e,t,tt(t)),l=n.width+10*o,c=n.height+8*o,h=.15*l,{cssStyles:u}=t,f=n.width+20,d=n.height+20,g=Math.max(l,f),m=Math.max(c,d);s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let y;const x=`M0 0
|
|
197
|
+
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|
198
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
199
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
200
|
+
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|
201
|
+
|
|
202
|
+
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|
203
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
204
|
+
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|
205
|
+
|
|
206
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|
207
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
208
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
209
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|
210
|
+
|
|
211
|
+
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|
212
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
213
|
+
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|
214
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=Y.svg(a),C=U(t,{}),v=b.path(x,C);y=a.insert(()=>v,":first-child"),y.attr("class","basic label-container").attr("style",Wt(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),X(t,y),t.calcIntersect=function(b,C){return q.rect(b,C)},t.intersect=function(b){return F.info("Bang intersect",t,b),q.rect(t,b)},a}p(qg,"bang");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await et(e,t,tt(t)),l=n.width+2*o,c=n.height+2*o,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|
215
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
216
|
+
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
217
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
59
218
|
|
|
60
|
-
|
|
219
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
220
|
+
a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
|
|
61
221
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
`);const r=Sy(e),n=r.append("g");r.attr("viewBox","0 0 2412 512"),Rl(r,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},Pl={draw:wy},By=Pl,Ay={db:{},renderer:Pl,parser:{parser:{yy:{}},parse:()=>{}}},Ly=Ay,ql="flowchart-elk",Fy=(t,e)=>{var i;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk")},Ey=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./flowchart-elk-definition-36e2d292.js");return{diagram:e}},__vite__mapDeps([38,5,11,12,13,14,15,2,3]));return{id:ql,diagram:t}},Oy={id:ql,detector:Fy,loader:Ey},My=Oy,zl="timeline",Iy=t=>/^\s*timeline/.test(t),$y=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./timeline-definition-7e6b55e7.js");return{diagram:e}},__vite__mapDeps([39,25,15,2,3]));return{id:zl,diagram:t}},Dy={id:zl,detector:Iy,loader:$y},Ny=Dy,Wl="mindmap",Ry=t=>/^\s*mindmap/.test(t),Py=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./mindmap-definition-ac74a2e8.js");return{diagram:e}},__vite__mapDeps([40,12,2,3]));return{id:Wl,diagram:t}},qy={id:Wl,detector:Ry,loader:Py},zy=qy,Hl="sankey",Wy=t=>/^\s*sankey-beta/.test(t),Hy=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./sankeyDiagram-23345273.js");return{diagram:e}},__vite__mapDeps([41,26,22,42,2,3]));return{id:Hl,diagram:t}},jy={id:Hl,detector:Wy,loader:Hy},Uy=jy,jl="block",Yy=t=>/^\s*block-beta/.test(t),Vy=async()=>{const{diagram:t}=await K(async()=>{const{diagram:e}=await import("./blockDiagram-68f4deed.js");return{diagram:e}},__vite__mapDeps([43,10,6,11,12,13,14,15,16,26,22,42,2,3]));return{id:jl,diagram:t}},Gy={id:jl,detector:Yy,loader:Vy},Xy=Gy;let Is=!1;const io=()=>{Is||(Is=!0,fr("error",Ly,t=>t.toLowerCase().trim()==="error"),fr("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),cl(K0,Y_,W_,l_,m_,C_,T_,I_,R_,My,n_,t_,zy,Ny,f_,ty,K_,ny,w_,Uy,F_,Xy))};class Ul{constructor(e,i={}){this.text=e,this.metadata=i,this.type="graph",this.text=P0(e),this.text+=`
|
|
66
|
-
`;const r=qt();try{this.type=Or(e,r)}catch(o){this.type="error",this.detectError=o}const n=eo(this.type);E.debug("Type "+this.type),this.db=n.db,this.renderer=n.renderer,this.parser=n.parser,this.parser.parser.yy=this.db,this.init=n.init,this.parse()}parse(){var e,i,r,n,o;if(this.detectError)throw this.detectError;(i=(e=this.db).clear)==null||i.call(e);const s=qt();(r=this.init)==null||r.call(this,s),this.metadata.title&&((o=(n=this.db).setDiagramTitle)==null||o.call(n,this.metadata.title)),this.parser.parse(this.text)}async render(e,i){await this.renderer.draw(this.text,e,i,this)}getParser(){return this.parser}getType(){return this.type}}const Ky=async(t,e={})=>{const i=Or(t,qt());try{eo(i)}catch{const n=d0(i);if(!n)throw new hl(`Diagram ${i} not found.`);const{id:o,diagram:s}=await n();fr(o,s)}return new Ul(t,e)};let $s=[];const Zy=()=>{$s.forEach(t=>{t()}),$s=[]},Jy="graphics-document document";function Qy(t,e){t.attr("role",Jy),e!==""&&t.attr("aria-roledescription",e)}function tC(t,e,i,r){if(t.insert!==void 0){if(i){const n=`chart-desc-${r}`;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(i)}if(e){const n=`chart-title-${r}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}const eC=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Yl(t){return typeof t>"u"||t===null}function iC(t){return typeof t=="object"&&t!==null}function rC(t){return Array.isArray(t)?t:Yl(t)?[]:[t]}function nC(t,e){var i,r,n,o;if(e)for(o=Object.keys(e),i=0,r=o.length;i<r;i+=1)n=o[i],t[n]=e[n];return t}function oC(t,e){var i="",r;for(r=0;r<e;r+=1)i+=t;return i}function sC(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var aC=Yl,lC=iC,hC=rC,cC=oC,uC=sC,fC=nC,ct={isNothing:aC,isObject:lC,toArray:hC,repeat:cC,isNegativeZero:uC,extend:fC};function Vl(t,e){var i="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+=`
|
|
222
|
+
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
223
|
+
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
224
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
67
225
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
`,o?1+l:l),o=!0,s=!0,l=0,i=t.position;!Rt(f)&&f!==0;)f=t.input.charCodeAt(++t.position);se(t,i,t.position,!1)}return!0}function Ws(t,e){var i,r=t.tag,n=t.anchor,o=[],s,a=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,L(t,"tab characters must not be used in indentation")),!(l!==45||(s=t.input.charCodeAt(t.position+1),!mt(s))));){if(a=!0,t.position++,Q(t,!0,-1)&&t.lineIndent<=e){o.push(null),l=t.input.charCodeAt(t.position);continue}if(i=t.line,He(t,e,Jl,!1,!0),o.push(t.result),Q(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&l!==0)L(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=r,t.anchor=n,t.kind="sequence",t.result=o,!0):!1}function Mx(t,e,i){var r,n,o,s,a,l,h=t.tag,u=t.anchor,f={},c=Object.create(null),p=null,_=null,b=null,k=!1,P=!1,v;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),v=t.input.charCodeAt(t.position);v!==0;){if(!k&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,L(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),o=t.line,(v===63||v===58)&&mt(r))v===63?(k&&(Fe(t,f,c,p,_,null,s,a,l),p=_=b=null),P=!0,k=!0,n=!0):k?(k=!1,n=!0):L(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,v=r;else{if(s=t.line,a=t.lineStart,l=t.position,!He(t,i,Zl,!1,!0))break;if(t.line===o){for(v=t.input.charCodeAt(t.position);me(v);)v=t.input.charCodeAt(++t.position);if(v===58)v=t.input.charCodeAt(++t.position),mt(v)||L(t,"a whitespace character is expected after the key-value separator within a block mapping"),k&&(Fe(t,f,c,p,_,null,s,a,l),p=_=b=null),P=!0,k=!1,n=!1,p=t.tag,_=t.result;else if(P)L(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=u,!0}else if(P)L(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=u,!0}if((t.line===o||t.lineIndent>e)&&(k&&(s=t.line,a=t.lineStart,l=t.position),He(t,e,pr,!0,n)&&(k?_=t.result:b=t.result),k||(Fe(t,f,c,p,_,b,s,a,l),p=_=b=null),Q(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&v!==0)L(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return k&&Fe(t,f,c,p,_,null,s,a,l),P&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=f),P}function Ix(t){var e,i=!1,r=!1,n,o,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&L(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(i=!0,s=t.input.charCodeAt(++t.position)):s===33?(r=!0,n="!!",s=t.input.charCodeAt(++t.position)):n="!",e=t.position,i){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(o=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):L(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!mt(s);)s===33&&(r?L(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Ql.test(n)||L(t,"named tag handle cannot contain such characters"),r=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),Tx.test(o)&&L(t,"tag suffix cannot contain flow indicator characters")}o&&!th.test(o)&&L(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{L(t,"tag name is malformed: "+o)}return i?t.tag=o:le.call(t.tagMap,n)?t.tag=t.tagMap[n]+o:n==="!"?t.tag="!"+o:n==="!!"?t.tag="tag:yaml.org,2002:"+o:L(t,'undeclared tag handle "'+n+'"'),!0}function $x(t){var e,i;if(i=t.input.charCodeAt(t.position),i!==38)return!1;for(t.anchor!==null&&L(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!mt(i)&&!Le(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&L(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Dx(t){var e,i,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!mt(r)&&!Le(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&L(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),le.call(t.anchorMap,i)||L(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],Q(t,!0,-1),!0}function He(t,e,i,r,n){var o,s,a,l=1,h=!1,u=!1,f,c,p,_,b,k;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=s=a=pr===i||Jl===i,r&&Q(t,!0,-1)&&(h=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;Ix(t)||$x(t);)Q(t,!0,-1)?(h=!0,a=o,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=!1;if(a&&(a=h||n),(l===1||pr===i)&&(dr===i||Zl===i?b=e:b=e+1,k=t.position-t.lineStart,l===1?a&&(Ws(t,k)||Mx(t,k,b))||Ex(t,b)?u=!0:(s&&Ox(t,b)||Lx(t,b)||Fx(t,b)?u=!0:Dx(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&L(t,"alias node should not have any properties")):Ax(t,b,dr===i)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=a&&Ws(t,k))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&L(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,c=t.implicitTypes.length;f<c;f+=1)if(_=t.implicitTypes[f],_.resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(le.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else for(_=null,p=t.typeMap.multi[t.kind||"fallback"],f=0,c=p.length;f<c;f+=1)if(t.tag.slice(0,p[f].tag.length)===p[f].tag){_=p[f];break}_||L(t,"unknown tag !<"+t.tag+">"),t.result!==null&&_.kind!==t.kind&&L(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):L(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function Nx(t){var e=t.position,i,r,n,o=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Q(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(o=!0,s=t.input.charCodeAt(++t.position),i=t.position;s!==0&&!mt(s);)s=t.input.charCodeAt(++t.position);for(r=t.input.slice(i,t.position),n=[],r.length<1&&L(t,"directive name must not be less than one character in length");s!==0;){for(;me(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Rt(s));break}if(Rt(s))break;for(i=t.position;s!==0&&!mt(s);)s=t.input.charCodeAt(++t.position);n.push(t.input.slice(i,t.position))}s!==0&&no(t),le.call(qs,r)?qs[r](t,r,n):gr(t,'unknown document directive "'+r+'"')}if(Q(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Q(t,!0,-1)):o&&L(t,"directives end mark is expected"),He(t,t.lineIndent-1,pr,!1,!0),Q(t,!0,-1),t.checkLineBreaks&&bx.test(t.input.slice(e,t.position))&&gr(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Ir(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Q(t,!0,-1));return}if(t.position<t.length-1)L(t,"end of the stream or a document separator is expected");else return}function Rx(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
.${t} ${e} { ${i.join(" !important; ")} !important; }`,cb=(t,e={})=>{var i;let r="";if(t.themeCSS!==void 0&&(r+=`
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!tn(e)){const a=t.htmlLabels||((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const l in e){const h=e[l];tn(h.styles)||a.forEach(u=>{r+=Hs(h.id,u,h.styles)}),tn(h.textStyles)||(r+=Hs(h.id,"tspan",h.textStyles))}}return r},ub=(t,e,i,r)=>{const n=cb(t,i),o=cy(e,n,t.themeVariables);return yn(Tm(`${r}{${o}}`),km)},fb=(t="",e,i)=>{let r=t;return!i&&!e&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=q0(r),r=r.replace(/<br>/g,"<br/>"),r},db=(t="",e)=>{var i,r;const n=(r=(i=e==null?void 0:e.viewBox)==null?void 0:i.baseVal)!=null&&r.height?e.viewBox.baseVal.height+"px":ib,o=btoa('<body style="'+nb+'">'+t+"</body>");return`<iframe style="width:${eb};height:${n};${rb}" src="data:text/html;base64,${o}" sandbox="${ob}">
|
|
88
|
-
|
|
89
|
-
|
|
226
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
227
|
+
a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
|
|
228
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=Y.svg(a),b=U(t,{}),C=x.path(y,b);m=a.insert(()=>C,":first-child"),m.attr("class","basic label-container").attr("style",Wt(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),X(t,m),t.calcIntersect=function(x,b){return q.rect(x,b)},t.intersect=function(x){return F.info("Cloud intersect",t,x),q.rect(t,x)},a}p(Hg,"cloud");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await et(e,t,tt(t)),l=n.width+8*o,c=n.height+2*o,h=5,u=`
|
|
229
|
+
M${-l/2} ${c/2-h}
|
|
230
|
+
v${-c+2*h}
|
|
231
|
+
q0,-${h} ${h},-${h}
|
|
232
|
+
h${l-2*h}
|
|
233
|
+
q${h},0 ${h},${h}
|
|
234
|
+
v${c-2*h}
|
|
235
|
+
q0,${h} -${h},${h}
|
|
236
|
+
h${-l+2*h}
|
|
237
|
+
q-${h},0 -${h},-${h}
|
|
238
|
+
Z
|
|
239
|
+
`,f=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),a.append(()=>s.node()),X(t,f),t.calcIntersect=function(d,g){return q.rect(d,g)},t.intersect=function(d){return q.rect(t,d)},a}p(jg,"defaultMindmapNode");async function Yg(e,t){const r={padding:t.padding??0};return Cl(e,t,r)}p(Yg,"mindmapCircle");var nS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:wg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:bg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:kg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ag},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Up},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Cl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:qg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Hg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:mg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Jp},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:cg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:lg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:$g},{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:sg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Vp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Mg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Pp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:_g},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Tg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Sg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Kp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:qp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Hp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:jp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:hg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Og},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Qp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Eg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ug},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Yp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Gp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Dg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ig},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Xp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Fg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Zp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Cg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:pg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:dg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ip},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Wp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Bg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Lg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Rg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:yg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:fg}],sS=p(()=>{const t=[...Object.entries({state:vg,choice:Np,note:gg,rectWithTitle:xg,labelRect:og,iconSquare:ag,iconCircle:rg,icon:eg,iconRounded:ig,imageSquare:ng,anchor:Rp,kanbanItem:Wg,mindmapCircle:Yg,defaultMindmapNode:jg,classBox:Ng,erBox:wl,requirementBox:zg}),...nS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Ug=sS();function oS(e){return e in Ug}p(oS,"isValidShape");var Yn=new Map;async function Gg(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const n=t.shape?Ug[t.shape]:void 0;if(!n)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await n(i,t,r)}else a=await n(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),Yn.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Gg,"insertNode");var bB=p((e,t)=>{Yn.set(t.id,e)},"setNodeElem"),_B=p(()=>{Yn.clear()},"clear"),CB=p(e=>{const t=Yn.get(e.id);F.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),lS=p((e,t,r,i,a,n)=>{t.arrowTypeStart&&uh(e,"start",t.arrowTypeStart,r,i,a,n),t.arrowTypeEnd&&uh(e,"end",t.arrowTypeEnd,r,i,a,n)},"addEdgeMarkers"),cS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},uh=p((e,t,r,i,a,n,o)=>{var u;const s=cS[r];if(!s){F.warn(`Unknown arrow type: ${r}`);return}const l=s.type,h=`${a}_${n}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${f}`;if(!document.getElementById(d)){const g=document.getElementById(h);if(g){const m=g.cloneNode(!0);m.id=d,m.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",o),s.fill&&x.setAttribute("fill",o)}),(u=g.parentNode)==null||u.appendChild(m)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),_n=new Map,Ot=new Map,wB=p(()=>{_n.clear(),Ot.clear()},"clear"),Ca=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),hS=p(async(e,t)=>{let r=Et(dt().flowchart.htmlLabels);const{labelStyles:i}=G(t);t.labelStyle=i;const a=await Ze(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});F.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),o=n.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(a);let s=a.getBBox();if(r){const c=a.children[0],h=ht(a);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),_n.set(t.id,n),t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=await cr(t.startLabelLeft,Ca(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Ot.get(t.id)||Ot.set(t.id,{}),Ot.get(t.id).startLeft=h,Bi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await cr(t.startLabelRight,Ca(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Ot.get(t.id)||Ot.set(t.id,{}),Ot.get(t.id).startRight=h,Bi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await cr(t.endLabelLeft,Ca(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Ot.get(t.id)||Ot.set(t.id,{}),Ot.get(t.id).endLeft=h,Bi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await cr(t.endLabelRight,Ca(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Ot.get(t.id)||Ot.set(t.id,{}),Ot.get(t.id).endRight=h,Bi(l,t.endLabelRight)}return a},"insertEdgeLabel");function Bi(e,t){dt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Bi,"setTerminalWidth");var uS=p((e,t)=>{F.debug("Moving label abc88 ",e.id,e.label,_n.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:a}=Qo(i);if(e.label){const n=_n.get(e.id);let o=e.x,s=e.y;if(r){const l=de.calcLabelPosition(r);F.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}n.attr("transform",`translate(${o}, ${s+a/2})`)}if(e.startLabelLeft){const n=Ot.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=de.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const n=Ot.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=de.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const n=Ot.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=de.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const n=Ot.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=de.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),fS=p((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),n=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return a>=o||n>=s},"outsideNode"),dS=p((e,t,r)=>{F.debug(`intersection calc abc89:
|
|
240
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
241
|
+
insidePoint : ${JSON.stringify(r)}
|
|
242
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,n=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-n:o+n;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;s=h*u/c;const f={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+c-u:r.y-c+u};return s===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),F.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=c*s/h,f=r.x<t.x?r.x+h-s:r.x-h+s,d=r.y<t.y?r.y+u:r.y-u;return F.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${s}`,{_x:f,_y:d}),s===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),fh=p((e,t)=>{F.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(n=>{if(F.info("abc88 checking point",n,t),!fS(t,n)&&!a){const o=dS(t,i,n);F.debug("abc88 inside",n,i,o),F.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?F.warn("abc88 no intersect",o,r):r.push(o),a=!0}else F.warn("abc88 outside",n,i),i=n,a||r.push(n)}),F.debug("returning points",r),r},"cutPathAtIntersect");function Vg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],n=e[i],o=e[i+1];(a.x===n.x&&n.y===o.y&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===o.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5)&&(t.push(n),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Vg,"extractCornerPoints");var dh=p(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,n=Math.sqrt(i*i+a*a),o=r/n;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),pS=p(function(e){const{cornerPointPositions:t}=Vg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],n=e[i+1],o=e[i],s=dh(a,o,5),l=dh(n,o,5),c=l.x-s.x,h=l.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(n.x-a.x)>10&&Math.abs(n.y-a.y)>=10){F.debug("Corner point fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));const d=5;o.x===s.x?f={x:c<0?s.x-d+u:s.x+d-u,y:h<0?s.y-u:s.y+u}:f={x:c<0?s.x-u:s.x+u,y:h<0?s.y-d+u:s.y+d-u}}else F.debug("Corner point skipping fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),gS=p((e,t,r)=>{const i=e-t-r,a=2,n=2,o=a+n,s=Math.floor(i/o),l=Array(s).fill(`${a} ${n}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),mS=p(function(e,t,r,i,a,n,o,s=!1){var M;const{handDrawnSeed:l}=dt();let c=t.points,h=!1;const u=a;var f=n;const d=[];for(const L in t.cssCompiledStyles)Sd(L)||d.push(t.cssCompiledStyles[L]);F.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!s&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),F.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(F.info("to cluster abc88",r.get(t.toCluster)),c=fh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(F.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=fh(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(L=>!Number.isNaN(L.y));m=pS(m);let y=Ea;switch(y=Za,t.curve){case"linear":y=Za;break;case"basis":y=Ea;break;case"cardinal":y=Lu;break;case"bumpX":y=ku;break;case"bumpY":y=vu;break;case"catmullRom":y=Mu;break;case"monotoneX":y=Ru;break;case"monotoneY":y=Iu;break;case"natural":y=Nu;break;case"step":y=zu;break;case"stepAfter":y=qu;break;case"stepBefore":y=Wu;break;default:y=Ea}const{x,y:b}=p_(t),C=K1().x(x).y(b).curve(y);let v;switch(t.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(t.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let w,_=t.curve==="rounded"?Xg(Zg(m,t),5):C(m);const S=Array.isArray(t.style)?t.style:[t.style];let D=S.find(L=>L==null?void 0:L.startsWith("stroke:")),P=!1;if(t.look==="handDrawn"){const L=Y.svg(e);Object.assign([],m);const A=L.path(_,{roughness:.3,seed:l});v+=" transition",w=ht(A).select("path").attr("id",t.id).attr("class"," "+v+(t.classes?" "+t.classes:"")).attr("style",S?S.reduce((B,W)=>B+";"+W,""):"");let $=w.attr("d");w.attr("d",$),e.node().appendChild(w.node())}else{const L=d.join(";"),A=S?S.reduce((at,mt)=>at+mt+";",""):"";let $="";t.animate&&($=" edge-animation-fast"),t.animation&&($=" edge-animation-"+t.animation);const B=(L?L+";"+A+";":A)+";"+(S?S.reduce((at,mt)=>at+";"+mt,""):"");w=e.append("path").attr("d",_).attr("id",t.id).attr("class"," "+v+(t.classes?" "+t.classes:"")+($??"")).attr("style",B),D=(M=B.match(/stroke:([^;]+)/))==null?void 0:M[1],P=t.animate===!0||!!t.animation||L.includes("animation");const W=w.node(),V=typeof W.getTotalLength=="function"?W.getTotalLength():0,H=Mc[t.arrowTypeStart]||0,ut=Mc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!P){const mt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?gS(V,H,ut):`0 ${H} ${V-H-ut} ${ut}`}; stroke-dashoffset: 0;`;w.attr("style",mt+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),t.showPoints&&m.forEach(L=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",L.x).attr("cy",L.y)});let R="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),F.info("arrowTypeStart",t.arrowTypeStart),F.info("arrowTypeEnd",t.arrowTypeEnd),lS(w,t,R,o,i,D);const E=Math.floor(c.length/2),z=c[E];de.isLabelCoordinateInPath(z,w.attr("d"))||(h=!0);let O={};return h&&(O.updatedPath=c),O.originalPath=t.points,O},"insertEdge");function Xg(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let n=0;n<i;n++){const o=e[n],s=e[n-1],l=e[n+1];if(n===0)r+=`M${o.x},${o.y}`;else if(n===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-s.x,h=o.y-s.y,u=l.x-o.x,f=l.y-o.y,d=Math.hypot(c,h),g=Math.hypot(u,f);if(d<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=c/d,y=h/d,x=u/g,b=f/g,C=m*x+y*b,v=Math.max(-1,Math.min(1,C)),w=Math.acos(v);if(w<a||Math.abs(Math.PI-w)<a){r+=`L${o.x},${o.y}`;continue}const _=Math.min(t/Math.sin(w/2),d/2,g/2),S=o.x-m*_,D=o.y-y*_,P=o.x+x*_,R=o.y+b*_;r+=`L${S},${D}`,r+=`Q${o.x},${o.y} ${P},${R}`}}return r}p(Xg,"generateRoundedPath");function mo(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(mo,"calculateDeltaAndAngle");function Zg(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Pt[t.arrowTypeStart]){const a=Pt[t.arrowTypeStart],n=e[0],o=e[1],{angle:s}=mo(n,o),l=a*Math.cos(s),c=a*Math.sin(s);r[0].x=n.x+l,r[0].y=n.y+c}const i=e.length;if(i>=2&&Pt[t.arrowTypeEnd]){const a=Pt[t.arrowTypeEnd],n=e[i-1],o=e[i-2],{angle:s}=mo(o,n),l=a*Math.cos(s),c=a*Math.sin(s);r[i-1].x=n.x-l,r[i-1].y=n.y-c}return r}p(Zg,"applyMarkerOffsetsToPoints");var yS=p((e,t,r,i)=>{t.forEach(a=>{FS[a](e,r,i)})},"insertMarkers"),xS=p((e,t,r)=>{F.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),bS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),_S=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),CS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),wS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),kS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),vS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),SS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),TS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),AS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).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"),LS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).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 a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),BS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).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"),MS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).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 a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ES=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
243
|
+
L20,10
|
|
244
|
+
M20,10
|
|
245
|
+
L0,20`)},"requirement_arrow"),$S=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),FS={extension:xS,composition:bS,aggregation:_S,dependency:CS,lollipop:wS,point:kS,circle:vS,cross:SS,barb:TS,only_one:AS,zero_or_one:LS,one_or_more:BS,zero_or_more:MS,requirement_arrow:ES,requirement_contains:$S},DS=yS,OS={common:ei,getConfig:Nt,insertCluster:Hv,insertEdge:mS,insertEdgeLabel:hS,insertMarkers:DS,insertNode:Gg,interpolateToCurve:il,labelHelper:et,log:F,positionEdgeLabel:uS},Gi={},Kg=p(e=>{for(const t of e)Gi[t.name]=t},"registerLayoutLoaders"),RS=p(()=>{Kg([{name:"dagre",loader:p(async()=>await gt(()=>import("./dagre-6UL2VRFP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A.js"),__vite__mapDeps([8,9,6,7])),"loader")}])},"registerDefaultLayoutLoaders");RS();var kB=p(async(e,t)=>{if(!(e.layoutAlgorithm in Gi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Gi[e.layoutAlgorithm];return(await r.loader()).render(e,t,OS,{algorithm:r.algorithm})},"render"),vB=p((e="",{fallback:t="dagre"}={})=>{if(e in Gi)return e;if(t in Gi)return F.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Qg="comm",Jg="rule",tm="decl",IS="@import",PS="@namespace",NS="@keyframes",zS="@layer",em=Math.abs,kl=String.fromCharCode;function rm(e){return e.trim()}function Ra(e,t,r){return e.replace(t,r)}function WS(e,t,r){return e.indexOf(t,r)}function Ir(e,t){return e.charCodeAt(t)|0}function Jr(e,t,r){return e.slice(t,r)}function Ce(e){return e.length}function qS(e){return e.length}function wa(e,t){return t.push(e),e}var Un=1,ti=1,im=0,oe=0,At=0,si="";function vl(e,t,r,i,a,n,o,s){return{value:e,root:t,parent:r,type:i,props:a,children:n,line:Un,column:ti,length:o,return:"",siblings:s}}function HS(){return At}function jS(){return At=oe>0?Ir(si,--oe):0,ti--,At===10&&(ti=1,Un--),At}function ge(){return At=oe<im?Ir(si,oe++):0,ti++,At===10&&(ti=1,Un++),At}function He(){return Ir(si,oe)}function Ia(){return oe}function Gn(e,t){return Jr(si,e,t)}function Vi(e){switch(e){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 YS(e){return Un=ti=1,im=Ce(si=e),oe=0,[]}function US(e){return si="",e}function ks(e){return rm(Gn(oe-1,yo(e===91?e+2:e===40?e+1:e)))}function GS(e){for(;(At=He())&&At<33;)ge();return Vi(e)>2||Vi(At)>3?"":" "}function VS(e,t){for(;--t&&ge()&&!(At<48||At>102||At>57&&At<65||At>70&&At<97););return Gn(e,Ia()+(t<6&&He()==32&&ge()==32))}function yo(e){for(;ge();)switch(At){case e:return oe;case 34:case 39:e!==34&&e!==39&&yo(At);break;case 40:e===41&&yo(e);break;case 92:ge();break}return oe}function XS(e,t){for(;ge()&&e+At!==57;)if(e+At===84&&He()===47)break;return"/*"+Gn(t,oe-1)+"*"+kl(e===47?e:ge())}function ZS(e){for(;!Vi(He());)ge();return Gn(e,oe)}function KS(e){return US(Pa("",null,null,null,[""],e=YS(e),0,[0],e))}function Pa(e,t,r,i,a,n,o,s,l){for(var c=0,h=0,u=o,f=0,d=0,g=0,m=1,y=1,x=1,b=0,C="",v=a,w=n,_=i,S=C;y;)switch(g=b,b=ge()){case 40:if(g!=108&&Ir(S,u-1)==58){WS(S+=Ra(ks(b),"&","&\f"),"&\f",em(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:S+=ks(b);break;case 9:case 10:case 13:case 32:S+=GS(g);break;case 92:S+=VS(Ia()-1,7);continue;case 47:switch(He()){case 42:case 47:wa(QS(XS(ge(),Ia()),t,r,l),l),(Vi(g||1)==5||Vi(He()||1)==5)&&Ce(S)&&Jr(S,-1,void 0)!==" "&&(S+=" ");break;default:S+="/"}break;case 123*m:s[c++]=Ce(S)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(S=Ra(S,/\f/g,"")),d>0&&(Ce(S)-u||m===0&&g===47)&&wa(d>32?gh(S+";",i,r,u-1,l):gh(Ra(S," ","")+";",i,r,u-2,l),l);break;case 59:S+=";";default:if(wa(_=ph(S,t,r,c,h,a,s,C,v=[],w=[],u,n),n),b===123)if(h===0)Pa(S,t,_,_,v,n,u,s,w);else{switch(f){case 99:if(Ir(S,3)===110)break;case 108:if(Ir(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Pa(e,_,_,i&&wa(ph(e,_,_,0,0,a,s,C,a,v=[],u,w),w),a,w,u,s,i?v:w):Pa(S,_,_,_,[""],w,0,s,w)}}c=h=d=0,m=x=1,C=S="",u=o;break;case 58:u=1+Ce(S),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&jS()==125)continue}switch(S+=kl(b),b*m){case 38:x=h>0?1:(S+="\f",-1);break;case 44:s[c++]=(Ce(S)-1)*x,x=1;break;case 64:He()===45&&(S+=ks(ge())),f=He(),h=u=Ce(C=S+=ZS(Ia())),b++;break;case 45:g===45&&Ce(S)==2&&(m=0)}}return n}function ph(e,t,r,i,a,n,o,s,l,c,h,u){for(var f=a-1,d=a===0?n:[""],g=qS(d),m=0,y=0,x=0;m<i;++m)for(var b=0,C=Jr(e,f+1,f=em(y=o[m])),v=e;b<g;++b)(v=rm(y>0?d[b]+" "+C:Ra(C,/&\f/g,d[b])))&&(l[x++]=v);return vl(e,t,r,a===0?Jg:s,l,c,h,u)}function QS(e,t,r,i){return vl(e,t,r,Qg,kl(HS()),Jr(e,2,-2),0,i)}function gh(e,t,r,i,a){return vl(e,t,r,tm,Jr(e,0,i),Jr(e,i+1,-1),i,a)}function xo(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function JS(e,t,r,i){switch(e.type){case zS:if(e.children.length)break;case IS:case PS:case tm:return e.return=e.return||e.value;case Qg:return"";case NS:return e.return=e.value+"{"+xo(e.children,i)+"}";case Jg:if(!Ce(e.value=e.props.join(",")))return""}return Ce(r=xo(e.children,i))?e.return=e.value+"{"+r+"}":""}var tT=Bd(Object.keys,Object),eT=Object.prototype,rT=eT.hasOwnProperty;function iT(e){if(!Rn(e))return tT(e);var t=[];for(var r in Object(e))rT.call(e,r)&&r!="constructor"&&t.push(r);return t}var bo=Cr(Te,"DataView"),_o=Cr(Te,"Promise"),Co=Cr(Te,"Set"),wo=Cr(Te,"WeakMap"),mh="[object Map]",aT="[object Object]",yh="[object Promise]",xh="[object Set]",bh="[object WeakMap]",_h="[object DataView]",nT=_r(bo),sT=_r(Yi),oT=_r(_o),lT=_r(Co),cT=_r(wo),ar=ii;(bo&&ar(new bo(new ArrayBuffer(1)))!=_h||Yi&&ar(new Yi)!=mh||_o&&ar(_o.resolve())!=yh||Co&&ar(new Co)!=xh||wo&&ar(new wo)!=bh)&&(ar=function(e){var t=ii(e),r=t==aT?e.constructor:void 0,i=r?_r(r):"";if(i)switch(i){case nT:return _h;case sT:return mh;case oT:return yh;case lT:return xh;case cT:return bh}return t});var hT="[object Map]",uT="[object Set]",fT=Object.prototype,dT=fT.hasOwnProperty;function Ch(e){if(e==null)return!0;if(In(e)&&(hn(e)||typeof e=="string"||typeof e.splice=="function"||el(e)||rl(e)||cn(e)))return!e.length;var t=ar(e);if(t==hT||t==uT)return!e.size;if(Rn(e))return!iT(e).length;for(var r in e)if(dT.call(e,r))return!1;return!0}var am="c4",pT=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),gT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO.js");return{diagram:t}},__vite__mapDeps([10,11,6,7]));return{id:am,diagram:e}},"loader"),mT={id:am,detector:pT,loader:gT},yT=mT,nm="flowchart",xT=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),bT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS.js");return{diagram:t}},__vite__mapDeps([12,13,14,15,16,6,7]));return{id:nm,diagram:e}},"loader"),_T={id:nm,detector:xT,loader:bT},CT=_T,sm="flowchart-v2",wT=p((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),kT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS.js");return{diagram:t}},__vite__mapDeps([12,13,14,15,16,6,7]));return{id:sm,diagram:e}},"loader"),vT={id:sm,detector:wT,loader:kT},ST=vT,om="er",TT=p(e=>/^\s*erDiagram/.test(e),"detector"),AT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA.js");return{diagram:t}},__vite__mapDeps([17,14,15,16,6,7]));return{id:om,diagram:e}},"loader"),LT={id:om,detector:TT,loader:AT},BT=LT,lm="gitGraph",MT=p(e=>/^\s*gitGraph/.test(e),"detector"),ET=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-NY62KEGX.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,6,7,2,4,5]));return{id:lm,diagram:e}},"loader"),$T={id:lm,detector:MT,loader:ET},FT=$T,cm="gantt",DT=p(e=>/^\s*gantt/.test(e),"detector"),OT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-LVOFAZNH.js");return{diagram:t}},__vite__mapDeps([22,23,24,25,6,7]));return{id:cm,diagram:e}},"loader"),RT={id:cm,detector:DT,loader:OT},IT=RT,hm="info",PT=p(e=>/^\s*info/.test(e),"detector"),NT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-ER5ION4S.js");return{diagram:t}},__vite__mapDeps([26,21,6,7,2,4,5]));return{id:hm,diagram:e}},"loader"),zT={id:hm,detector:PT,loader:NT},um="pie",WT=p(e=>/^\s*pie/.test(e),"detector"),qT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX.js");return{diagram:t}},__vite__mapDeps([27,19,21,6,7,2,4,5,28,29,24]));return{id:um,diagram:e}},"loader"),HT={id:um,detector:WT,loader:qT},fm="quadrantChart",jT=p(e=>/^\s*quadrantChart/.test(e),"detector"),YT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,6,7]));return{id:fm,diagram:e}},"loader"),UT={id:fm,detector:jT,loader:YT},GT=UT,dm="xychart",VT=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),XT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,6,7]));return{id:dm,diagram:e}},"loader"),ZT={id:dm,detector:VT,loader:XT},KT=ZT,pm="requirement",QT=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),JT=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ.js");return{diagram:t}},__vite__mapDeps([32,14,15,6,7]));return{id:pm,diagram:e}},"loader"),tA={id:pm,detector:QT,loader:JT},eA=tA,gm="sequence",rA=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),iA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW.js");return{diagram:t}},__vite__mapDeps([33,11,20,6,7]));return{id:gm,diagram:e}},"loader"),aA={id:gm,detector:rA,loader:iA},nA=aA,mm="class",sA=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),oA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG.js");return{diagram:t}},__vite__mapDeps([34,35,13,14,15,6,7]));return{id:mm,diagram:e}},"loader"),lA={id:mm,detector:sA,loader:oA},cA=lA,ym="classDiagram",hA=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),uA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB.js");return{diagram:t}},__vite__mapDeps([36,35,13,14,15,6,7]));return{id:ym,diagram:e}},"loader"),fA={id:ym,detector:hA,loader:uA},dA=fA,xm="state",pA=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),gA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC.js");return{diagram:t}},__vite__mapDeps([37,38,14,15,1,2,3,4,6,7]));return{id:xm,diagram:e}},"loader"),mA={id:xm,detector:pA,loader:gA},yA=mA,bm="stateDiagram",xA=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),bA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3.js");return{diagram:t}},__vite__mapDeps([39,38,14,15,6,7]));return{id:bm,diagram:e}},"loader"),_A={id:bm,detector:xA,loader:bA},CA=_A,_m="journey",wA=p(e=>/^\s*journey/.test(e),"detector"),kA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q.js");return{diagram:t}},__vite__mapDeps([40,11,13,28,6,7]));return{id:_m,diagram:e}},"loader"),vA={id:_m,detector:wA,loader:kA},SA=vA,TA=p((e,t,r)=>{F.debug(`rendering svg for syntax error
|
|
246
|
+
`);const i=s2(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Uh(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Cm={draw:TA},AA=Cm,LA={db:{},renderer:Cm,parser:{parse:p(()=>{},"parse")}},BA=LA,wm="flowchart-elk",MA=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),EA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS.js");return{diagram:t}},__vite__mapDeps([12,13,14,15,16,6,7]));return{id:wm,diagram:e}},"loader"),$A={id:wm,detector:MA,loader:EA},FA=$A,km="timeline",DA=p(e=>/^\s*timeline/.test(e),"detector"),OA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI.js");return{diagram:t}},__vite__mapDeps([41,28,6,7]));return{id:km,diagram:e}},"loader"),RA={id:km,detector:DA,loader:OA},IA=RA,vm="mindmap",PA=p(e=>/^\s*mindmap/.test(e),"detector"),NA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T.js");return{diagram:t}},__vite__mapDeps([42,14,15,6,7]));return{id:vm,diagram:e}},"loader"),zA={id:vm,detector:PA,loader:NA},WA=zA,Sm="kanban",qA=p(e=>/^\s*kanban/.test(e),"detector"),HA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7.js");return{diagram:t}},__vite__mapDeps([43,13,6,7]));return{id:Sm,diagram:e}},"loader"),jA={id:Sm,detector:qA,loader:HA},YA=jA,Tm="sankey",UA=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),GA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN.js");return{diagram:t}},__vite__mapDeps([44,29,24,6,7]));return{id:Tm,diagram:e}},"loader"),VA={id:Tm,detector:UA,loader:GA},XA=VA,Am="packet",ZA=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),KA=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG.js");return{diagram:t}},__vite__mapDeps([45,19,21,6,7,2,4,5]));return{id:Am,diagram:e}},"loader"),QA={id:Am,detector:ZA,loader:KA},Lm="radar",JA=p(e=>/^\s*radar-beta/.test(e),"detector"),tL=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R.js");return{diagram:t}},__vite__mapDeps([46,19,21,6,7,2,4,5]));return{id:Lm,diagram:e}},"loader"),eL={id:Lm,detector:JA,loader:tL},Bm="block",rL=p(e=>/^\s*block(-beta)?/.test(e),"detector"),iL=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC.js");return{diagram:t}},__vite__mapDeps([47,13,5,2,1,16,6,7]));return{id:Bm,diagram:e}},"loader"),aL={id:Bm,detector:rL,loader:iL},nL=aL,Mm="architecture",sL=p(e=>/^\s*architecture/.test(e),"detector"),oL=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ.js");return{diagram:t}},__vite__mapDeps([48,19,21,6,7,2,4,5,9]));return{id:Mm,diagram:e}},"loader"),lL={id:Mm,detector:sL,loader:oL},cL=lL,Em="treemap",hL=p(e=>/^\s*treemap/.test(e),"detector"),uL=p(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK.js");return{diagram:t}},__vite__mapDeps([49,15,19,21,6,7,2,4,5,25,29,24]));return{id:Em,diagram:e}},"loader"),fL={id:Em,detector:hL,loader:uL},wh=!1,Vn=p(()=>{wh||(wh=!0,Ha("error",BA,e=>e.toLowerCase().trim()==="error"),Ha("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{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:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ls(FA,WA,cL),Ls(yT,YA,dA,cA,BT,IT,zT,HT,eA,nA,ST,CT,IA,FT,CA,yA,SA,GT,XA,QA,KT,nL,eL,fL))},"addDiagrams"),dL=p(async()=>{F.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(fr).map(async([r,{detector:i,loader:a}])=>{if(a)try{$s(r)}catch{try{const{diagram:n,id:o}=await a();Ha(o,n,i)}catch(n){throw F.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete fr[r],n}}}))).filter(r=>r.status==="rejected");if(t.length>0){F.error(`Failed to load ${t.length} external diagrams`);for(const r of t)F.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),pL="graphics-document document";function $m(e,t){e.attr("role",pL),t!==""&&e.attr("aria-roledescription",t)}p($m,"setA11yDiagramInfo");function Fm(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}p(Fm,"addSVGa11yTitleDescription");var ur,ko=(ur=class{constructor(t,r,i,a,n){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=n}static async fromText(t,r={}){var c,h;const i=Nt(),a=To(t,i);t=fk(t)+`
|
|
247
|
+
`;try{$s(a)}catch{const u=R0(a);if(!u)throw new Dh(`Diagram ${a} not found.`);const{id:f,diagram:d}=await u();Ha(f,d)}const{db:n,parser:o,renderer:s,init:l}=$s(a);return o.parser&&(o.parser.yy=n),(c=n.clear)==null||c.call(n),l==null||l(i),r.title&&((h=n.setDiagramTitle)==null||h.call(n,r.title)),await o.parse(t),new ur(a,t,n,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(ur,"Diagram"),ur),kh=[],gL=p(()=>{kh.forEach(e=>{e()}),kh=[]},"attachFunctions"),mL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Dm(e){const t=e.match(Fh);if(!t)return{text:e,metadata:{}};let r=d_(t[1],{schema:f_})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Dm,"extractFrontMatter");var yL=p(e=>e.replace(/\r\n?/g,`
|
|
248
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),xL=p(e=>{const{text:t,metadata:r}=Dm(e),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:t}},"processFrontmatter"),bL=p(e=>{const t=de.detectInit(e)??{},r=de.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Jw(e),directive:t}},"processDirectives");function Sl(e){const t=yL(e),r=xL(t),i=bL(r.text),a=ll(r.config,i.directive);return e=mL(i.text),{code:e,title:r.title,config:a}}p(Sl,"preprocessDiagram");function Om(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Om,"toBase64");var _L=5e4,CL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",wL="sandbox",kL="loose",vL="http://www.w3.org/2000/svg",SL="http://www.w3.org/1999/xlink",TL="http://www.w3.org/1999/xhtml",AL="100%",LL="100%",BL="border:0;margin:0;",ML="margin:0",EL="allow-top-navigation-by-user-activation allow-popups",$L='The "iframe" tag is not supported by your browser.',FL=["foreignobject"],DL=["dominant-baseline"];function Tl(e){const t=Sl(e);return Wa(),Q0(t.config??{}),t}p(Tl,"processAndSetConfigs");async function Rm(e,t){Vn();try{const{code:r,config:i}=Tl(e);return{diagramType:(await Pm(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(Rm,"parse");var vh=p((e,t,r=[])=>`
|
|
249
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),OL=p((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
250
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
251
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
252
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Ch(l.styles)||s.forEach(c=>{r+=vh(l.id,c,l.styles)}),Ch(l.textStyles)||(r+=vh(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),RL=p((e,t,r,i)=>{const a=OL(e,r),n=xy(t,a,e.themeVariables);return xo(KS(`${i}{${n}}`),JS)},"createUserStyles"),IL=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=wr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),PL=p((e="",t)=>{var a,n;const r=(n=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&n.height?t.viewBox.baseVal.height+"px":LL,i=Om(`<body style="${ML}">${e}</body>`);return`<iframe style="width:${AL};height:${r};${BL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${EL}">
|
|
253
|
+
${$L}
|
|
254
|
+
</iframe>`},"putIntoIFrame"),Sh=p((e,t,r,i,a)=>{const n=e.append("div");n.attr("id",r),i&&n.attr("style",i);const o=n.append("svg").attr("id",t).attr("width","100%").attr("xmlns",vL);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function vo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(vo,"sandboxedIframe");var NL=p((e,t,r,i)=>{var a,n,o;(a=e.getElementById(t))==null||a.remove(),(n=e.getElementById(r))==null||n.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),zL=p(async function(e,t,r){var z,O,M,L,A,$;Vn();const i=Tl(t);t=i.code;const a=Nt();F.debug(a),t.length>((a==null?void 0:a.maxTextSize)??_L)&&(t=CL);const n="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=p(()=>{const W=ht(f?s:c).node();W&&"remove"in W&&W.remove()},"removeTempElements");let u=ht("body");const f=a.securityLevel===wL,d=a.securityLevel===kL,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const B=vo(ht(r),o);u=ht(B.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht(r);Sh(u,e,l,`font-family: ${g}`,SL)}else{if(NL(document,e,l,o),f){const B=vo(ht("body"),o);u=ht(B.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht("body");Sh(u,e,l)}let m,y;try{m=await ko.fromText(t,{title:i.title})}catch(B){if(a.suppressErrorRendering)throw h(),B;m=await ko.fromText("error"),y=B}const x=u.select(c).node(),b=m.type,C=x.firstChild,v=C.firstChild,w=(O=(z=m.renderer).getClasses)==null?void 0:O.call(z,t,m),_=RL(a,b,w,n),S=document.createElement("style");S.innerHTML=_,C.insertBefore(S,v);try{await m.renderer.draw(t,e,Yl.version,m)}catch(B){throw a.suppressErrorRendering?h():AA.draw(t,e,Yl.version),B}const D=u.select(`${c} svg`),P=(L=(M=m.db).getAccTitle)==null?void 0:L.call(M),R=($=(A=m.db).getAccDescription)==null?void 0:$.call(A);Nm(b,D,P,R),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",TL);let E=u.select(c).node().innerHTML;if(F.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=IL(E,f,Et(a.arrowMarkerAbsolute)),f){const B=u.select(c+" svg").node();E=PL(E,B)}else d||(E=Ur.sanitize(E,{ADD_TAGS:FL,ADD_ATTR:DL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(gL(),y)throw y;return h(),{diagramType:b,svg:E,bindFunctions:m.db.bindFunctions}},"render");function Im(e={}){var i;const t=Bt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Z0(t),t!=null&&t.theme&&t.theme in Oe?t.themeVariables=Oe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Oe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?X0(t):Nh();So(r.logLevel),Vn()}p(Im,"initialize");var Pm=p((e,t={})=>{const{code:r}=Sl(e);return ko.fromText(r,t)},"getDiagramFromText");function Nm(e,t,r,i){$m(t,e),Fm(t,r,i,t.attr("id"))}p(Nm,"addA11yInfo");var xr=Object.freeze({render:zL,parse:Rm,getDiagramFromText:Pm,initialize:Im,getConfig:Nt,setConfig:zh,getSiteConfig:Nh,updateSiteConfig:K0,reset:p(()=>{Wa()},"reset"),globalReset:p(()=>{Wa(Gr)},"globalReset"),defaultConfig:Gr});So(Nt().logLevel);Wa(Nt());var WL=p((e,t,r)=>{F.warn(e),ol(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),zm=p(async function(e={querySelector:".mermaid"}){try{await qL(e)}catch(t){if(ol(t)&&F.error(t.str),ee.parseError&&ee.parseError(t),!e.suppressErrors)throw F.error("Use the suppressErrors option to suppress these errors"),t}},"run"),qL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=xr.getConfig();F.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");F.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(F.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),xr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const n=new de.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(a)){if(F.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${n.next()}`;o=l.innerHTML,o=op(de.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=de.detectInit(o);h&&F.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await jm(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){WL(u,s,ee.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Wm=p(function(e){xr.initialize(e)},"initialize"),HL=p(async function(e,t,r){F.warn("mermaid.init is deprecated. Please use run instead."),e&&Wm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await zm(i)},"init"),jL=p(async(e,{lazyLoad:t=!0}={})=>{Vn(),Ls(...e),t===!1&&await dL()},"registerExternalDiagrams"),qm=p(function(){if(ee.startOnLoad){const{startOnLoad:e}=xr.getConfig();e&&ee.run().catch(t=>F.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",qm,!1);var YL=p(function(e){ee.parseError=e},"setParseErrorHandler"),Cn=[],vs=!1,Hm=p(async()=>{if(!vs){for(vs=!0;Cn.length>0;){const e=Cn.shift();if(e)try{await e()}catch(t){F.error("Error executing queue",t)}}vs=!1}},"executeQueue"),UL=p(async(e,t)=>new Promise((r,i)=>{const a=p(()=>new Promise((n,o)=>{xr.parse(e,t).then(s=>{n(s),r(s)},s=>{var l;F.error("Error parsing",s),(l=ee.parseError)==null||l.call(ee,s),o(s),i(s)})}),"performCall");Cn.push(a),Hm().catch(i)}),"parse"),jm=p((e,t,r)=>new Promise((i,a)=>{const n=p(()=>new Promise((o,s)=>{xr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;F.error("Error parsing",l),(c=ee.parseError)==null||c.call(ee,l),s(l),a(l)})}),"performCall");Cn.push(n),Hm().catch(a)}),"render"),GL=p(()=>Object.keys(fr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ee={startOnLoad:!0,mermaidAPI:xr,parse:UL,render:jm,init:HL,run:zm,registerExternalDiagrams:jL,registerLayoutLoaders:Kg,initialize:Wm,parseError:void 0,contentLoaded:qm,setParseErrorHandler:YL,detectType:To,registerIconPacks:mv,getRegisteredDiagramsMetadata:GL},VL=ee;/*! Check if previously processed *//*!
|
|
90
255
|
* Wait for document loaded before starting the execution
|
|
91
|
-
*/
|
|
256
|
+
*/const SB=Object.freeze(Object.defineProperty({__proto__:null,default:VL},Symbol.toStringTag,{value:"Module"}));export{Gh as $,Ei as A,s0 as B,Ay as C,ll as D,Nt as E,Ph as F,ak as G,s2 as H,Yl as I,f_ as J,q0 as K,Vr as L,QL as M,Pn as N,oy as O,Ao as P,ic as Q,K1 as R,Ea as S,ik as T,Zi as U,gy as V,Xi as W,j as X,J as Y,Xw as Z,p as _,Cy as a,Sd as a$,G1 as a0,zo as a1,aB as a2,oB as a3,Mr as a4,kc as a5,wc as a6,cB as a7,lB as a8,sB as a9,Yw as aA,IC as aB,Pw as aC,Jo as aD,Ch as aE,xv as aF,V1 as aG,KL as aH,e0 as aI,ia as aJ,mv as aK,gv as aL,Ro as aM,qe as aN,mc as aO,Ab as aP,Pi as aQ,br as aR,Uw as aS,Id as aT,Fn as aU,In as aV,hn as aW,Nd as aX,Rd as aY,ww as aZ,G as a_,rB as aa,iB as ab,uB as ac,nB as ad,hB as ae,Hv as af,Gg as ag,CB as ah,p_ as ai,Et as aj,Ze as ak,Qo as al,bp as am,wr as an,Yd as ao,it as ap,ke as aq,DS as ar,_B as as,wB as at,xB as au,X as av,bB as aw,mS as ax,uS as ay,hS as az,_y as b,Jt as b0,_b as b1,Oo as b2,ou as b3,Qi as b4,hu as b5,eB as b6,n0 as b7,jw as b8,Iw as b9,Co as bA,Gw as bB,Rn as bC,SB as bD,vC as ba,tl as bb,xw as bc,Vw as bd,ea as be,ii as bf,on as bg,Bw as bh,iT as bi,ta as bj,cn as bk,kw as bl,Md as bm,AC as bn,LC as bo,ar as bp,Hc as bq,BC as br,el as bs,TC as bt,$C as bu,ai as bv,Xe as bw,Pc as bx,rl as by,$d as bz,dt as c,ht as d,Uh as e,Bt as f,ky as g,Pe as h,se as i,__ as j,ei as k,F as l,Gd as m,JL as n,vB as o,vy as p,Sy as q,kB as r,wy as s,d_ as t,de as u,oS as v,ok as w,fB as x,by as y,tB as z};
|