UNPKG

vitepress-mermaid-preview

Version:

Mermaid preview for vitepress

3 lines 558 kB
"use strict";const v=require("vue");function Gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vn={exports:{}},Ax=Vn.exports,rh;function Mx(){return rh||(rh=1,function(e,t){(function(r,i){e.exports=i()})(Ax,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",p="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+)?$/,b=/\[([^\]]+)]|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,x={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($){var D=["th","st","nd","rd"],A=$%100;return"["+$+(D[(A-20)%10]||D[A]||D[0])+"]"}},w=function($,D,A){var N=String($);return!N||N.length>=D?$:""+Array(D+1-N.length).join(A)+$},C={s:w,z:function($){var D=-$.utcOffset(),A=Math.abs(D),N=Math.floor(A/60),P=A%60;return(D<=0?"+":"-")+w(N,2,"0")+":"+w(P,2,"0")},m:function $(D,A){if(D.date()<A.date())return-$(A,D);var N=12*(A.year()-D.year())+(A.month()-D.month()),P=D.clone().add(N,u),j=A-P<0,V=D.clone().add(N+(j?-1:1),u);return+(-(N+(A-P)/(j?P-V:V-P))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:u,y:d,w:h,d:c,D:p,h:l,m:a,s:o,ms:s,Q:f}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},k="en",T={};T[k]=x;var B="$isDayjsObject",F=function($){return $ instanceof I||!(!$||!$[B])},_=function $(D,A,N){var P;if(!D)return k;if(typeof D=="string"){var j=D.toLowerCase();T[j]&&(P=j),A&&(T[j]=A,P=j);var V=D.split("-");if(!P&&V.length>1)return $(V[0])}else{var Y=D.name;T[Y]=D,P=Y}return!N&&P&&(k=P),P||!N&&k},M=function($,D){if(F($))return $.clone();var A=typeof D=="object"?D:{};return A.date=$,A.args=arguments,new I(A)},E=C;E.l=_,E.i=F,E.w=function($,D){return M($,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var I=function(){function $(A){this.$L=_(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[B]=!0}var D=$.prototype;return D.parse=function(A){this.$d=function(N){var P=N.date,j=N.utc;if(P===null)return new Date(NaN);if(E.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var V=P.match(y);if(V){var Y=V[2]-1||0,it=(V[7]||"0").substring(0,3);return j?new Date(Date.UTC(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,it)):new Date(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,it)}}return new Date(P)}(A),this.init()},D.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()},D.$utils=function(){return E},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(A,N){var P=M(A);return this.startOf(N)<=P&&P<=this.endOf(N)},D.isAfter=function(A,N){return M(A)<this.startOf(N)},D.isBefore=function(A,N){return this.endOf(N)<M(A)},D.$g=function(A,N,P){return E.u(A)?this[N]:this.set(P,A)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(A,N){var P=this,j=!!E.u(N)||N,V=E.p(A),Y=function(ct,ht){var bt=E.w(P.$u?Date.UTC(P.$y,ht,ct):new Date(P.$y,ht,ct),P);return j?bt:bt.endOf(c)},it=function(ct,ht){return E.w(P.toDate()[ct].apply(P.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(ht)),P)},tt=this.$W,ft=this.$M,nt=this.$D,kt="set"+(this.$u?"UTC":"");switch(V){case d:return j?Y(1,0):Y(31,11);case u:return j?Y(1,ft):Y(0,ft+1);case h:var R=this.$locale().weekStart||0,xt=(tt<R?tt+7:tt)-R;return Y(j?nt-xt:nt+(6-xt),ft);case c:case p:return it(kt+"Hours",0);case l:return it(kt+"Minutes",1);case a:return it(kt+"Seconds",2);case o:return it(kt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(A){return this.startOf(A,!1)},D.$set=function(A,N){var P,j=E.p(A),V="set"+(this.$u?"UTC":""),Y=(P={},P[c]=V+"Date",P[p]=V+"Date",P[u]=V+"Month",P[d]=V+"FullYear",P[l]=V+"Hours",P[a]=V+"Minutes",P[o]=V+"Seconds",P[s]=V+"Milliseconds",P)[j],it=j===c?this.$D+(N-this.$W):N;if(j===u||j===d){var tt=this.clone().set(p,1);tt.$d[Y](it),tt.init(),this.$d=tt.set(p,Math.min(this.$D,tt.daysInMonth())).$d}else Y&&this.$d[Y](it);return this.init(),this},D.set=function(A,N){return this.clone().$set(A,N)},D.get=function(A){return this[E.p(A)]()},D.add=function(A,N){var P,j=this;A=Number(A);var V=E.p(N),Y=function(ft){var nt=M(j);return E.w(nt.date(nt.date()+Math.round(ft*A)),j)};if(V===u)return this.set(u,this.$M+A);if(V===d)return this.set(d,this.$y+A);if(V===c)return Y(1);if(V===h)return Y(7);var it=(P={},P[a]=i,P[l]=n,P[o]=r,P)[V]||1,tt=this.$d.getTime()+A*it;return E.w(tt,this)},D.subtract=function(A,N){return this.add(-1*A,N)},D.format=function(A){var N=this,P=this.$locale();if(!this.isValid())return P.invalidDate||m;var j=A||"YYYY-MM-DDTHH:mm:ssZ",V=E.z(this),Y=this.$H,it=this.$m,tt=this.$M,ft=P.weekdays,nt=P.months,kt=P.meridiem,R=function(ht,bt,_t,se){return ht&&(ht[bt]||ht(N,j))||_t[bt].slice(0,se)},xt=function(ht){return E.s(Y%12||12,ht,"0")},ct=kt||function(ht,bt,_t){var se=ht<12?"AM":"PM";return _t?se.toLowerCase():se};return j.replace(b,function(ht,bt){return bt||function(_t){switch(_t){case"YY":return String(N.$y).slice(-2);case"YYYY":return E.s(N.$y,4,"0");case"M":return tt+1;case"MM":return E.s(tt+1,2,"0");case"MMM":return R(P.monthsShort,tt,nt,3);case"MMMM":return R(nt,tt);case"D":return N.$D;case"DD":return E.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return R(P.weekdaysMin,N.$W,ft,2);case"ddd":return R(P.weekdaysShort,N.$W,ft,3);case"dddd":return ft[N.$W];case"H":return String(Y);case"HH":return E.s(Y,2,"0");case"h":return xt(1);case"hh":return xt(2);case"a":return ct(Y,it,!0);case"A":return ct(Y,it,!1);case"m":return String(it);case"mm":return E.s(it,2,"0");case"s":return String(N.$s);case"ss":return E.s(N.$s,2,"0");case"SSS":return E.s(N.$ms,3,"0");case"Z":return V}return null}(ht)||V.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(A,N,P){var j,V=this,Y=E.p(N),it=M(A),tt=(it.utcOffset()-this.utcOffset())*i,ft=this-it,nt=function(){return E.m(V,it)};switch(Y){case d:j=nt()/12;break;case u:j=nt();break;case f:j=nt()/3;break;case h:j=(ft-tt)/6048e5;break;case c:j=(ft-tt)/864e5;break;case l:j=ft/n;break;case a:j=ft/i;break;case o:j=ft/r;break;default:j=ft}return P?j:E.a(j)},D.daysInMonth=function(){return this.endOf(u).$D},D.$locale=function(){return T[this.$L]},D.locale=function(A,N){if(!A)return this.$L;var P=this.clone(),j=_(A,N,!0);return j&&(P.$L=j),P},D.clone=function(){return E.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},$}(),O=I.prototype;return M.prototype=O,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",d],["$D",p]].forEach(function($){O[$[1]]=function(D){return this.$g(D,$[0],$[1])}}),M.extend=function($,D){return $.$i||($(D,I,M),$.$i=!0),M},M.locale=_,M.isDayjs=F,M.unix=function($){return M(1e3*$)},M.en=T[k],M.Ls=T,M.p={},M})}(Vn)),Vn.exports}var $x=Mx();const Xu=Gu($x),Gn={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 n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;switch(i){case"r":return Gn.hue2rgb(s,n,e+1/3)*255;case"g":return Gn.hue2rgb(s,n,e)*255;case"b":return Gn.hue2rgb(s,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),s=Math.min(e,t,r),o=(n+s)/2;if(i==="l")return o*100;if(n===s)return 0;const a=n-s,l=o>.5?a/(2-n-s):a/(n+s);if(i==="s")return l*100;switch(n){case e:return((t-r)/a+(t<r?6:0))*60;case t:return((r-e)/a+2)*60;case r:return((e-t)/a+4)*60;default:return-1}}},Fx={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},Dx={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ot={channel:Gn,lang:Fx,unit:Dx},Xe={};for(let e=0;e<=255;e++)Xe[e]=ot.unit.dec2hex(e);const Pt={ALL:0,RGB:1,HSL:2};class Ox{constructor(){this.type=Pt.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=Pt.ALL}is(t){return this.type===t}}class Ix{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ox}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Pt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=ot.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ot.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=ot.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=ot.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ot.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=ot.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Pt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Pt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Pt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Pt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Pt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Pt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Vs=new Ix({r:0,g:0,b:0,a:0},"transparent"),Hr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Hr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,s=n%4===0,o=n>4,a=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return Vs.set({r:(i>>l*(c+3)&h)*a,g:(i>>l*(c+2)&h)*a,b:(i>>l*(c+1)&h)*a,a:s?(i&h)*a/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}${Xe[Math.round(n*255)]}`:`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}`}},ur={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(ur.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ot.channel.clamp.h(parseFloat(r)*.9);case"rad":return ot.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ot.channel.clamp.h(parseFloat(r)*360)}}return ot.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ur.re);if(!r)return;const[,i,n,s,o,a]=r;return Vs.set({h:ur._hue2deg(i),s:ot.channel.clamp.s(parseFloat(n)),l:ot.channel.clamp.l(parseFloat(s)),a:o?ot.channel.clamp.a(a?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%, ${n})`:`hsl(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%)`}},Gi={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=Gi.colors[e];if(t)return Hr.parse(t)},stringify:e=>{const t=Hr.stringify(e);for(const r in Gi.colors)if(Gi.colors[r]===t)return r}},zi={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(zi.re);if(!r)return;const[,i,n,s,o,a,l,c,h]=r;return Vs.set({r:ot.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ot.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:ot.channel.clamp.b(l?parseFloat(a)*2.55:parseFloat(a)),a:c?ot.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)}, ${ot.lang.round(n)})`:`rgb(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)})`}},ge={format:{keyword:Gi,hex:Hr,rgb:zi,rgba:zi,hsl:ur,hsla:ur},parse:e=>{if(typeof e!="string")return e;const t=Hr.parse(e)||zi.parse(e)||ur.parse(e)||Gi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Pt.HSL)||e.data.r===void 0?ur.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?zi.stringify(e):Hr.stringify(e)},Zu=(e,t)=>{const r=ge.parse(e);for(const i in t)r[i]=ot.channel.clamp[i](t[i]);return ge.stringify(r)},jr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Zu(e,{a:t});const n=Vs.set({r:ot.channel.clamp.r(e),g:ot.channel.clamp.g(t),b:ot.channel.clamp.b(r),a:ot.channel.clamp.a(i)});return ge.stringify(n)},Rx=e=>{const{r:t,g:r,b:i}=ge.parse(e),n=.2126*ot.channel.toLinear(t)+.7152*ot.channel.toLinear(r)+.0722*ot.channel.toLinear(i);return ot.lang.round(n)},Px=e=>Rx(e)>=.5,fi=e=>!Px(e),Ku=(e,t,r)=>{const i=ge.parse(e),n=i[t],s=ot.channel.clamp[t](n+r);return n!==s&&(i[t]=s),ge.stringify(i)},H=(e,t)=>Ku(e,"l",t),et=(e,t)=>Ku(e,"l",-t),L=(e,t)=>{const r=ge.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return Zu(e,i)},Nx=(e,t,r=50)=>{const{r:i,g:n,b:s,a:o}=ge.parse(e),{r:a,g:l,b:c,a:h}=ge.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,b=i*m+a*y,x=n*m+l*y,w=s*m+c*y,C=o*u+h*(1-u);return jr(b,x,w,C)},W=(e,t=100)=>{const r=ge.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Nx(r,e,t)};/*! @license DOMPurify 3.2.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.2.6/LICENSE */const{entries:Qu,setPrototypeOf:ih,isFrozen:zx,getPrototypeOf:qx,getOwnPropertyDescriptor:Wx}=Object;let{freeze:Xt,seal:le,create:Ju}=Object,{apply:fo,construct:po}=typeof Reflect<"u"&&Reflect;Xt||(Xt=function(t){return t});le||(le=function(t){return t});fo||(fo=function(t,r,i){return t.apply(r,i)});po||(po=function(t,r){return new t(...r)});const Dn=Zt(Array.prototype.forEach),Hx=Zt(Array.prototype.lastIndexOf),nh=Zt(Array.prototype.pop),_i=Zt(Array.prototype.push),jx=Zt(Array.prototype.splice),Xn=Zt(String.prototype.toLowerCase),Ra=Zt(String.prototype.toString),sh=Zt(String.prototype.match),Si=Zt(String.prototype.replace),Ux=Zt(String.prototype.indexOf),Yx=Zt(String.prototype.trim),he=Zt(Object.prototype.hasOwnProperty),Wt=Zt(RegExp.prototype.test),Ti=Vx(TypeError);function Zt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return fo(e,t,i)}}function Vx(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return po(e,r)}}function ut(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xn;ih&&ih(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const s=r(n);s!==n&&(zx(t)||(t[i]=s),n=s)}e[n]=!0}return e}function Gx(e){for(let t=0;t<e.length;t++)he(e,t)||(e[t]=null);return e}function Fe(e){const t=Ju(null);for(const[r,i]of Qu(e))he(e,r)&&(Array.isArray(i)?t[r]=Gx(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Fe(i):t[r]=i);return t}function Bi(e,t){for(;e!==null;){const i=Wx(e,t);if(i){if(i.get)return Zt(i.get);if(typeof i.value=="function")return Zt(i.value)}e=qx(e)}function r(){return null}return r}const ah=Xt(["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"]),Pa=Xt(["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"]),Na=Xt(["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"]),Xx=Xt(["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"]),za=Xt(["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"]),Zx=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),oh=Xt(["#text"]),lh=Xt(["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"]),qa=Xt(["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","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"]),ch=Xt(["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"]),On=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Kx=le(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qx=le(/<%[\w\W]*|[\w\W]*%>/gm),Jx=le(/\$\{[\w\W]*/gm),tb=le(/^data-[\-\w.\u00B7-\uFFFF]+$/),eb=le(/^aria-[\-\w]+$/),tf=le(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rb=le(/^(?:\w+script|data):/i),ib=le(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ef=le(/^html$/i),nb=le(/^[a-z][.\w]*(-[.\w]+)+$/i);var hh=Object.freeze({__proto__:null,ARIA_ATTR:eb,ATTR_WHITESPACE:ib,CUSTOM_ELEMENT:nb,DATA_ATTR:tb,DOCTYPE_NAME:ef,ERB_EXPR:Qx,IS_ALLOWED_URI:tf,IS_SCRIPT_OR_DATA:rb,MUSTACHE_EXPR:Kx,TMPLIT_EXPR:Jx});const Li={element:1,text:3,progressingInstruction:7,comment:8,document:9},sb=function(){return typeof window>"u"?null:window},ab=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},uh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function rf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sb();const t=rt=>rf(rt);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==Li.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,p=l.prototype,m=Bi(p,"cloneNode"),y=Bi(p,"remove"),b=Bi(p,"nextSibling"),x=Bi(p,"childNodes"),w=Bi(p,"parentNode");if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let C,k="";const{implementation:T,createNodeIterator:B,createDocumentFragment:F,getElementsByTagName:_}=r,{importNode:M}=i;let E=uh();t.isSupported=typeof Qu=="function"&&typeof w=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:I,ERB_EXPR:O,TMPLIT_EXPR:$,DATA_ATTR:D,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:j}=hh;let{IS_ALLOWED_URI:V}=hh,Y=null;const it=ut({},[...ah,...Pa,...Na,...za,...oh]);let tt=null;const ft=ut({},[...lh,...qa,...ch,...On]);let nt=Object.seal(Ju(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}})),kt=null,R=null,xt=!0,ct=!0,ht=!1,bt=!0,_t=!1,se=!0,qt=!1,Bn=!1,Ea=!1,$r=!1,Ln=!1,En=!1,Pc=!0,Nc=!1;const Cx="user-content-";let Aa=!0,wi=!1,Fr={},Dr=null;const zc=ut({},["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 qc=null;const Wc=ut({},["audio","video","img","source","image","track"]);let Ma=null;const Hc=ut({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),An="http://www.w3.org/1998/Math/MathML",Mn="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml";let Or=Be,$a=!1,Fa=null;const kx=ut({},[An,Mn,Be],Ra);let $n=ut({},["mi","mo","mn","ms","mtext"]),Fn=ut({},["annotation-xml"]);const _x=ut({},["title","style","font","a","script"]);let Ci=null;const Sx=["application/xhtml+xml","text/html"],Tx="text/html";let $t=null,Ir=null;const Bx=r.createElement("form"),jc=function(S){return S instanceof RegExp||S instanceof Function},Da=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ir&&Ir===S)){if((!S||typeof S!="object")&&(S={}),S=Fe(S),Ci=Sx.indexOf(S.PARSER_MEDIA_TYPE)===-1?Tx:S.PARSER_MEDIA_TYPE,$t=Ci==="application/xhtml+xml"?Ra:Xn,Y=he(S,"ALLOWED_TAGS")?ut({},S.ALLOWED_TAGS,$t):it,tt=he(S,"ALLOWED_ATTR")?ut({},S.ALLOWED_ATTR,$t):ft,Fa=he(S,"ALLOWED_NAMESPACES")?ut({},S.ALLOWED_NAMESPACES,Ra):kx,Ma=he(S,"ADD_URI_SAFE_ATTR")?ut(Fe(Hc),S.ADD_URI_SAFE_ATTR,$t):Hc,qc=he(S,"ADD_DATA_URI_TAGS")?ut(Fe(Wc),S.ADD_DATA_URI_TAGS,$t):Wc,Dr=he(S,"FORBID_CONTENTS")?ut({},S.FORBID_CONTENTS,$t):zc,kt=he(S,"FORBID_TAGS")?ut({},S.FORBID_TAGS,$t):Fe({}),R=he(S,"FORBID_ATTR")?ut({},S.FORBID_ATTR,$t):Fe({}),Fr=he(S,"USE_PROFILES")?S.USE_PROFILES:!1,xt=S.ALLOW_ARIA_ATTR!==!1,ct=S.ALLOW_DATA_ATTR!==!1,ht=S.ALLOW_UNKNOWN_PROTOCOLS||!1,bt=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=S.SAFE_FOR_TEMPLATES||!1,se=S.SAFE_FOR_XML!==!1,qt=S.WHOLE_DOCUMENT||!1,$r=S.RETURN_DOM||!1,Ln=S.RETURN_DOM_FRAGMENT||!1,En=S.RETURN_TRUSTED_TYPE||!1,Ea=S.FORCE_BODY||!1,Pc=S.SANITIZE_DOM!==!1,Nc=S.SANITIZE_NAMED_PROPS||!1,Aa=S.KEEP_CONTENT!==!1,wi=S.IN_PLACE||!1,V=S.ALLOWED_URI_REGEXP||tf,Or=S.NAMESPACE||Be,$n=S.MATHML_TEXT_INTEGRATION_POINTS||$n,Fn=S.HTML_INTEGRATION_POINTS||Fn,nt=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&jc(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&jc(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_t&&(ct=!1),Ln&&($r=!0),Fr&&(Y=ut({},oh),tt=[],Fr.html===!0&&(ut(Y,ah),ut(tt,lh)),Fr.svg===!0&&(ut(Y,Pa),ut(tt,qa),ut(tt,On)),Fr.svgFilters===!0&&(ut(Y,Na),ut(tt,qa),ut(tt,On)),Fr.mathMl===!0&&(ut(Y,za),ut(tt,ch),ut(tt,On))),S.ADD_TAGS&&(Y===it&&(Y=Fe(Y)),ut(Y,S.ADD_TAGS,$t)),S.ADD_ATTR&&(tt===ft&&(tt=Fe(tt)),ut(tt,S.ADD_ATTR,$t)),S.ADD_URI_SAFE_ATTR&&ut(Ma,S.ADD_URI_SAFE_ATTR,$t),S.FORBID_CONTENTS&&(Dr===zc&&(Dr=Fe(Dr)),ut(Dr,S.FORBID_CONTENTS,$t)),Aa&&(Y["#text"]=!0),qt&&ut(Y,["html","head","body"]),Y.table&&(ut(Y,["tbody"]),delete kt.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ti('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ti('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=S.TRUSTED_TYPES_POLICY,k=C.createHTML("")}else C===void 0&&(C=ab(d,n)),C!==null&&typeof k=="string"&&(k=C.createHTML(""));Xt&&Xt(S),Ir=S}},Uc=ut({},[...Pa,...Na,...Xx]),Yc=ut({},[...za,...Zx]),Lx=function(S){let q=w(S);(!q||!q.tagName)&&(q={namespaceURI:Or,tagName:"template"});const X=Xn(S.tagName),wt=Xn(q.tagName);return Fa[S.namespaceURI]?S.namespaceURI===Mn?q.namespaceURI===Be?X==="svg":q.namespaceURI===An?X==="svg"&&(wt==="annotation-xml"||$n[wt]):!!Uc[X]:S.namespaceURI===An?q.namespaceURI===Be?X==="math":q.namespaceURI===Mn?X==="math"&&Fn[wt]:!!Yc[X]:S.namespaceURI===Be?q.namespaceURI===Mn&&!Fn[wt]||q.namespaceURI===An&&!$n[wt]?!1:!Yc[X]&&(_x[X]||!Uc[X]):!!(Ci==="application/xhtml+xml"&&Fa[S.namespaceURI]):!1},ye=function(S){_i(t.removed,{element:S});try{w(S).removeChild(S)}catch{y(S)}},Rr=function(S,q){try{_i(t.removed,{attribute:q.getAttributeNode(S),from:q})}catch{_i(t.removed,{attribute:null,from:q})}if(q.removeAttribute(S),S==="is")if($r||Ln)try{ye(q)}catch{}else try{q.setAttribute(S,"")}catch{}},Vc=function(S){let q=null,X=null;if(Ea)S="<remove></remove>"+S;else{const Lt=sh(S,/^[\r\n\t ]+/);X=Lt&&Lt[0]}Ci==="application/xhtml+xml"&&Or===Be&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const wt=C?C.createHTML(S):S;if(Or===Be)try{q=new f().parseFromString(wt,Ci)}catch{}if(!q||!q.documentElement){q=T.createDocument(Or,"template",null);try{q.documentElement.innerHTML=$a?k:wt}catch{}}const It=q.body||q.documentElement;return S&&X&&It.insertBefore(r.createTextNode(X),It.childNodes[0]||null),Or===Be?_.call(q,qt?"html":"body")[0]:qt?q.documentElement:It},Gc=function(S){return B.call(S.ownerDocument||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Oa=function(S){return S instanceof u&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof h)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},Xc=function(S){return typeof a=="function"&&S instanceof a};function Le(rt,S,q){Dn(rt,X=>{X.call(t,S,q,Ir)})}const Zc=function(S){let q=null;if(Le(E.beforeSanitizeElements,S,null),Oa(S))return ye(S),!0;const X=$t(S.nodeName);if(Le(E.uponSanitizeElement,S,{tagName:X,allowedTags:Y}),se&&S.hasChildNodes()&&!Xc(S.firstElementChild)&&Wt(/<[/\w!]/g,S.innerHTML)&&Wt(/<[/\w!]/g,S.textContent)||S.nodeType===Li.progressingInstruction||se&&S.nodeType===Li.comment&&Wt(/<[/\w]/g,S.data))return ye(S),!0;if(!Y[X]||kt[X]){if(!kt[X]&&Qc(X)&&(nt.tagNameCheck instanceof RegExp&&Wt(nt.tagNameCheck,X)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(X)))return!1;if(Aa&&!Dr[X]){const wt=w(S)||S.parentNode,It=x(S)||S.childNodes;if(It&&wt){const Lt=It.length;for(let Kt=Lt-1;Kt>=0;--Kt){const Ee=m(It[Kt],!0);Ee.__removalCount=(S.__removalCount||0)+1,wt.insertBefore(Ee,b(S))}}}return ye(S),!0}return S instanceof l&&!Lx(S)||(X==="noscript"||X==="noembed"||X==="noframes")&&Wt(/<\/no(script|embed|frames)/i,S.innerHTML)?(ye(S),!0):(_t&&S.nodeType===Li.text&&(q=S.textContent,Dn([I,O,$],wt=>{q=Si(q,wt," ")}),S.textContent!==q&&(_i(t.removed,{element:S.cloneNode()}),S.textContent=q)),Le(E.afterSanitizeElements,S,null),!1)},Kc=function(S,q,X){if(Pc&&(q==="id"||q==="name")&&(X in r||X in Bx))return!1;if(!(ct&&!R[q]&&Wt(D,q))){if(!(xt&&Wt(A,q))){if(!tt[q]||R[q]){if(!(Qc(S)&&(nt.tagNameCheck instanceof RegExp&&Wt(nt.tagNameCheck,S)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(S))&&(nt.attributeNameCheck instanceof RegExp&&Wt(nt.attributeNameCheck,q)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck(q))||q==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Wt(nt.tagNameCheck,X)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(X))))return!1}else if(!Ma[q]){if(!Wt(V,Si(X,P,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&S!=="script"&&Ux(X,"data:")===0&&qc[S])){if(!(ht&&!Wt(N,Si(X,P,"")))){if(X)return!1}}}}}}return!0},Qc=function(S){return S!=="annotation-xml"&&sh(S,j)},Jc=function(S){Le(E.beforeSanitizeAttributes,S,null);const{attributes:q}=S;if(!q||Oa(S))return;const X={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:tt,forceKeepAttr:void 0};let wt=q.length;for(;wt--;){const It=q[wt],{name:Lt,namespaceURI:Kt,value:Ee}=It,ki=$t(Lt),Ia=Ee;let Rt=Lt==="value"?Ia:Yx(Ia);if(X.attrName=ki,X.attrValue=Rt,X.keepAttr=!0,X.forceKeepAttr=void 0,Le(E.uponSanitizeAttribute,S,X),Rt=X.attrValue,Nc&&(ki==="id"||ki==="name")&&(Rr(Lt,S),Rt=Cx+Rt),se&&Wt(/((--!?|])>)|<\/(style|title)/i,Rt)){Rr(Lt,S);continue}if(X.forceKeepAttr)continue;if(!X.keepAttr){Rr(Lt,S);continue}if(!bt&&Wt(/\/>/i,Rt)){Rr(Lt,S);continue}_t&&Dn([I,O,$],eh=>{Rt=Si(Rt,eh," ")});const th=$t(S.nodeName);if(!Kc(th,ki,Rt)){Rr(Lt,S);continue}if(C&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Kt)switch(d.getAttributeType(th,ki)){case"TrustedHTML":{Rt=C.createHTML(Rt);break}case"TrustedScriptURL":{Rt=C.createScriptURL(Rt);break}}if(Rt!==Ia)try{Kt?S.setAttributeNS(Kt,Lt,Rt):S.setAttribute(Lt,Rt),Oa(S)?ye(S):nh(t.removed)}catch{Rr(Lt,S)}}Le(E.afterSanitizeAttributes,S,null)},Ex=function rt(S){let q=null;const X=Gc(S);for(Le(E.beforeSanitizeShadowDOM,S,null);q=X.nextNode();)Le(E.uponSanitizeShadowNode,q,null),Zc(q),Jc(q),q.content instanceof s&&rt(q.content);Le(E.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(rt){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,X=null,wt=null,It=null;if($a=!rt,$a&&(rt="<!-->"),typeof rt!="string"&&!Xc(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw Ti("dirty is not a string, aborting")}else throw Ti("toString is not a function");if(!t.isSupported)return rt;if(Bn||Da(S),t.removed=[],typeof rt=="string"&&(wi=!1),wi){if(rt.nodeName){const Ee=$t(rt.nodeName);if(!Y[Ee]||kt[Ee])throw Ti("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof a)q=Vc("<!---->"),X=q.ownerDocument.importNode(rt,!0),X.nodeType===Li.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?q=X:q.appendChild(X);else{if(!$r&&!_t&&!qt&&rt.indexOf("<")===-1)return C&&En?C.createHTML(rt):rt;if(q=Vc(rt),!q)return $r?null:En?k:""}q&&Ea&&ye(q.firstChild);const Lt=Gc(wi?rt:q);for(;wt=Lt.nextNode();)Zc(wt),Jc(wt),wt.content instanceof s&&Ex(wt.content);if(wi)return rt;if($r){if(Ln)for(It=F.call(q.ownerDocument);q.firstChild;)It.appendChild(q.firstChild);else It=q;return(tt.shadowroot||tt.shadowrootmode)&&(It=M.call(i,It,!0)),It}let Kt=qt?q.outerHTML:q.innerHTML;return qt&&Y["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&Wt(ef,q.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+q.ownerDocument.doctype.name+`> `+Kt),_t&&Dn([I,O,$],Ee=>{Kt=Si(Kt,Ee," ")}),C&&En?C.createHTML(Kt):Kt},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Da(rt),Bn=!0},t.clearConfig=function(){Ir=null,Bn=!1},t.isValidAttribute=function(rt,S,q){Ir||Da({});const X=$t(rt),wt=$t(S);return Kc(X,wt,q)},t.addHook=function(rt,S){typeof S=="function"&&_i(E[rt],S)},t.removeHook=function(rt,S){if(S!==void 0){const q=Hx(E[rt],S);return q===-1?void 0:jx(E[rt],q,1)[0]}return nh(E[rt])},t.removeHooks=function(rt){E[rt]=[]},t.removeAllHooks=function(){E=uh()},t}var ei=rf(),nf=Object.defineProperty,g=(e,t)=>nf(e,"name",{value:t,configurable:!0}),sf=(e,t)=>{for(var r in t)nf(e,r,{get:t[r],enumerable:!0})},Ae={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},_l=g(function(e="fatal"){let t=Ae.fatal;typeof e=="string"?e.toLowerCase()in Ae&&(t=Ae[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=Ae.fatal&&(z.fatal=console.error?console.error.bind(console,ae("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ae("FATAL"))),t<=Ae.error&&(z.error=console.error?console.error.bind(console,ae("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ae("ERROR"))),t<=Ae.warn&&(z.warn=console.warn?console.warn.bind(console,ae("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ae("WARN"))),t<=Ae.info&&(z.info=console.info?console.info.bind(console,ae("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ae("INFO"))),t<=Ae.debug&&(z.debug=console.debug?console.debug.bind(console,ae("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ae("DEBUG"))),t<=Ae.trace&&(z.trace=console.debug?console.debug.bind(console,ae("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ae("TRACE")))},"setLogLevel"),ae=g(e=>`%c${Xu().format("ss.SSS")} : ${e} : `,"format"),af=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Xi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ob=/\s*%%.*\n/gm,Vr,of=(Vr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(Vr,"UnknownDiagramError"),Vr),br={},Sl=g(function(e,t){e=e.replace(af,"").replace(Xi,"").replace(ob,` `);for(const[r,{detector:i}]of Object.entries(br))if(i(e,t))return r;throw new of(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),go=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)lf(t,r,i)},"registerLazyLoadedDiagrams"),lf=g((e,t,r)=>{br[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),br[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),lb=g(e=>br[e].loader,"getDiagramLoader"),mo=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>mo(e,s,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),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(s=>{typeof t[s]=="object"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=mo(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Ft=mo,Gs="#ffffff",Xs="#f2f2f2",Ht=g((e,t)=>t?L(e,{s:-40,l:10}):L(e,{s:-40,l:-10}),"mkBorder"),Gr,cb=(Gr=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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?et(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||et(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(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||H(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||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||W(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||et(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.p