const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/layers.DWq97bJk-CGoKsqDe.js","assets/layers.C9fG7BVL-CBswL6IH.js","assets/layers.YoByaZrc-DQ8FBM0v.js","assets/index-26FXPGkN.js","assets/index-Dcdr2Qsr.css","assets/TaskPanel-1n1xV0vy.js","assets/tasks-BMVBejH2.js","assets/index-DlWqcwmX.js","assets/tasks-D8Bz5Eet.css","assets/IconUser-CkQmhwMi.js","assets/Textarea-C8aNW3Hx.js","assets/get-env-uyVen0u2.js","assets/IconChevronLeft-FAloe5QL.js","assets/use-resize-observer-6Qm_8hWl.js","assets/useTaskTypesData-CFzDcAWE.js","assets/ColorSwatch-CtoYH4Cn.js","assets/Typography-PKUzf06x.js","assets/clamp-CUTWWzXs.js","assets/Select-C1WMqk5R.js","assets/SegmentedControl-BeEuUkOb.js","assets/IconGripVertical-COCN8Vqa.js","assets/IconAt-Bca7mi74.js","assets/IconTableOff-DmQNoB2C.js","assets/Accordion-z2XcZ0M6.js","assets/TaskPanel-CtIte0AR.css","assets/layers.CYF9sLis-olugdqWB.js","assets/layers.32Lt4gbg-CYSXskEK.js","assets/layers.D4T8fTcj-DBcMM7Bd.js","assets/layers.BJDrjORS-D7qNnv43.js","assets/union-DoflI9J8.js","assets/reduce-Htc8hg3K.js","assets/layers.B3wI6aMi-DwkMHYbO.js","assets/layers.DlIEuyDi-D-1n6Mnu.js","assets/layers.BhAZ7G1v-CIpb-ELT.js","assets/layers.DTAeZhab-D4JfxuUt.js","assets/layers.D1mqEtmL-CquewxdH.js","assets/layers.CqVTtuYm-C3YJfAyO.js","assets/layers.DLwuMfdd-B0oSrkCJ.js","assets/layers.1Lk-f9p4-BOec6Rl0.js","assets/layers.CrJPFDce-BVB2EfuM.js","assets/layers.Bjyasn8g-CDvw6_hM.js","assets/layers.MuezvWV2-x1mg6lwf.js","assets/layers.DPGihJFH-jRmGTwQi.js","assets/layers.PXRs_p25-BwFz9zjg.js","assets/layers.DjUOC4st-DHuO7-vr.js","assets/layers.CPqWlcUE-DMmVri6e.js","assets/layers.DeNipEOr-YV2s9P01.js","assets/layers.e8TdvHgL-Dp0xUkPh.js","assets/layers.b0h5ZBmD-D7tiw6cE.js","assets/layers.BM_Cjr-p-B9N3dK1_.js","assets/layers.Ksimn2dq-Cy0GBvLT.js","assets/layers.BJP9crUl-CU7eXQ-2.js","assets/layers.BRt3DjyO-Dc5iQ30w.js","assets/layers.DsajidVF-C56G8opG.js","assets/layers.D6ZcS9R8-BW7hrDph.js","assets/layers.Dkq_kL-Q-EZEu-ZTI.js","assets/layers.Bc15IpxM-DFnMslTZ.js","assets/layers.DP49YerD--kNiEDb1.js","assets/layers.Bo0XYLri-BEZeI3sF.js","assets/layers.BL1_hoZ0-D6nuQUAf.js","assets/layers.DPH53wRM-DNAKB7Uc.js","assets/layers.BpilXLfW-DfYEAvWy.js","assets/layers.CuiWc6uW-D12zwJfJ.js","assets/layers.cZR9S-8B-B_Vl0sTM.js","assets/layers.RJcftJMk-ZvvnUZlt.js","assets/layers.D7jGxypv-Cyu9clx1.js","assets/layers.BO6mlCJG-DtDIFLq_.js"])))=>i.map(i=>d[i]);
import{a7 as Z}from"./index-26FXPGkN.js";import{X as Kh,_ as ee}from"./layers.YoByaZrc-DQ8FBM0v.js";import{U as Zh}from"./TaskPanel-1n1xV0vy.js";import"./tasks-BMVBejH2.js";import"./index-DlWqcwmX.js";import"./IconUser-CkQmhwMi.js";import"./Textarea-C8aNW3Hx.js";import"./get-env-uyVen0u2.js";import"./IconChevronLeft-FAloe5QL.js";import"./use-resize-observer-6Qm_8hWl.js";import"./useTaskTypesData-CFzDcAWE.js";import"./ColorSwatch-CtoYH4Cn.js";import"./Typography-PKUzf06x.js";import"./clamp-CUTWWzXs.js";import"./Select-C1WMqk5R.js";import"./SegmentedControl-BeEuUkOb.js";import"./IconGripVertical-COCN8Vqa.js";import"./IconAt-Bca7mi74.js";import"./IconTableOff-DmQNoB2C.js";import"./Accordion-z2XcZ0M6.js";const Ii=20,Jh={rect:"rectangle",circle:"ellipse"},Kn={startOnLoad:!1,flowchart:{curve:"linear"},themeVariables:{fontSize:`${Ii*1.25}px`},maxEdges:500,maxTextSize:5e4};class Mi{constructor({converter:e}){this.convert=(r,i)=>this.converter(r,{...i,fontSize:i.fontSize||Ii}),this.converter=e}}var _e;(function(t){t.ROUND="round",t.STADIUM="stadium",t.DOUBLECIRCLE="doublecircle",t.CIRCLE="circle",t.DIAMOND="diamond"})(_e||(_e={}));var Bo;(function(t){t.COLOR="color"})(Bo||(Bo={}));var Ne;(function(t){t.FILL="fill",t.STROKE="stroke",t.STROKE_WIDTH="stroke-width",t.STROKE_DASHARRAY="stroke-dasharray"})(Ne||(Ne={}));var or={},Zn;function Qh(){if(Zn)return or;Zn=1,Object.defineProperty(or,"__esModule",{value:!0}),or.removeMarkdown=void 0;var t=function(e,r){r===void 0&&(r={listUnicodeChar:""}),r=r||{},r.listUnicodeChar=r.hasOwnProperty("listUnicodeChar")?r.listUnicodeChar:!1,r.stripListLeaders=r.hasOwnProperty("stripListLeaders")?r.stripListLeaders:!0,r.gfm=r.hasOwnProperty("gfm")?r.gfm:!0,r.useImgAltText=r.hasOwnProperty("useImgAltText")?r.useImgAltText:!0,r.preserveLinks=r.hasOwnProperty("preserveLinks")?r.preserveLinks:!1;var i=e||"";i=i.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm,"");try{r.stripListLeaders&&(r.listUnicodeChar?i=i.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,r.listUnicodeChar+" $1"):i=i.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,"$1")),r.gfm&&(i=i.replace(/\n={2,}/g,`
`).replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/`{3}.*\n/g,"")),r.preserveLinks&&(i=i.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g,"$1 ($2)")),i=i.replace(/<[^>]*>/g,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,r.useImgAltText?"$1":"").replace(/\[(.*?)\][\[\(].*?[\]\)]/g,"$1").replace(/^\s{0,3}>\s?/g,"").replace(/(^|\n)\s{0,3}>\s?/g,`

`).replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm,"$1$2$3").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,"$2").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/\n{2,}/g,`

`)}catch(o){return console.error(o),e}return i};return or.removeMarkdown=t,or}var tc=Qh();const ec={arrow_circle:{endArrowhead:"dot"},arrow_cross:{endArrowhead:"bar"},arrow_open:{endArrowhead:null,startArrowhead:null},double_arrow_circle:{endArrowhead:"dot",startArrowhead:"dot"},double_arrow_cross:{endArrowhead:"bar",startArrowhead:"bar"},double_arrow_point:{endArrowhead:"arrow",startArrowhead:"arrow"}},rc=t=>ec[t],Ur=t=>{let e=t.text;return t.labelType==="markdown"&&(e=tc.removeMarkdown(t.text)),ic(e)},ic=t=>{const e=/\s?(fa|fab):[a-zA-Z0-9-]+/g;return t.replace(e,"")},oc=t=>{const e={};return Object.keys(t).forEach(r=>{var i;switch(r){case Ne.FILL:{e.backgroundColor=t[r],e.fillStyle="solid";break}case Ne.STROKE:{e.strokeColor=t[r];break}case Ne.STROKE_WIDTH:{e.strokeWidth=Number((i=t[r])==null?void 0:i.split("px")[0]);break}case Ne.STROKE_DASHARRAY:{e.strokeStyle="dashed";break}}}),e},nc=t=>{const e={};return Object.keys(t).forEach(r=>{switch(r){case Bo.COLOR:{e.strokeColor=t[r];break}}}),e},ac=t=>{const e={};t.subGraphs.map(i=>{i.nodeIds.forEach(o=>{e[i.id]={id:i.id,parent:null,isLeaf:!1},e[o]={id:o,parent:i.id,isLeaf:t.vertices[o]!==void 0}})});const r={};return[...Object.keys(t.vertices),...t.subGraphs.map(i=>i.id)].forEach(i=>{if(!e[i])return;let o=e[i];const a=[];for(o.isLeaf||a.push(`subgraph_group_${o.id}`);o.parent;)a.push(`subgraph_group_${o.parent}`),o=e[o.parent];r[i]=a}),{getGroupIds:i=>r[i]||[],getParentId:i=>e[i]?e[i].parent:null}},sc=new Mi({converter:(t,e)=>{const r=[],i=e.fontSize,{getGroupIds:o,getParentId:a}=ac(t);return t.subGraphs.reverse().forEach(n=>{const s=o(n.id),l={id:n.id,type:"rectangle",groupIds:s,x:n.x,y:n.y,width:n.width,height:n.height,label:{groupIds:s,text:Ur(n),fontSize:i,verticalAlign:"top"}};r.push(l)}),Object.values(t.vertices).forEach(n=>{if(!n)return;const s=o(n.id),l=oc(n.containerStyle),h=nc(n.labelStyle);let u={id:n.id,type:"rectangle",groupIds:s,x:n.x,y:n.y,width:n.width,height:n.height,strokeWidth:2,label:{groupIds:s,text:Ur(n),fontSize:i,...h},link:n.link||null,...l};switch(n.type){case _e.STADIUM:{u={...u,roundness:{type:3}};break}case _e.ROUND:{u={...u,roundness:{type:3}};break}case _e.DOUBLECIRCLE:{s.push(`doublecircle_${n.id}}`);const c={type:"ellipse",groupIds:s,x:n.x+5,y:n.y+5,width:n.width-10,height:n.height-10,strokeWidth:2,roundness:{type:3},label:{groupIds:s,text:Ur(n),fontSize:i}};u={...u,groupIds:s,type:"ellipse"},r.push(c);break}case _e.CIRCLE:{u.type="ellipse";break}case _e.DIAMOND:{u.type="diamond";break}}r.push(u)}),t.edges.forEach(n=>{let s=[];const l=a(n.start),h=a(n.end);l&&l===h&&(s=o(l));const{startX:u,startY:c,reflectionPoints:d}=n,p=d.map(_=>[_.x-d[0].x,_.y-d[0].y]),m=rc(n.type),b={id:`${n.start}_${n.end}`,type:"arrow",groupIds:s,x:u,y:c,strokeWidth:n.stroke==="thick"?4:2,strokeStyle:n.stroke==="dotted"?"dashed":void 0,points:p,...n.text?{label:{text:Ur(n),fontSize:i,groupIds:s}}:{},roundness:{type:2},...m},x=r.find(_=>_.id===n.start),E=r.find(_=>_.id===n.end);!x||!E||(b.start={id:x.id||""},b.end={id:E.id||""},r.push(b))}),{elements:r}}}),lc=new Mi({converter:t=>{const e=ee(),{width:r,height:i}=t,o={type:"image",x:0,y:0,width:r,height:i,status:"saved",fileId:e};return{files:{[e]:{id:e,mimeType:t.mimeType,dataURL:t.dataURL}},elements:[o]}}}),Zo=t=>t.replace(/\\n/g,`
`),yr=t=>{const e={type:"line",x:t.startX,y:t.startY,points:[[0,0],[t.endX-t.startX,t.endY-t.startY]],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:t.strokeStyle||"solid",strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||1};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},ci=t=>{const e={type:"text",x:t.x,y:t.y,width:t.width,height:t.height,text:Zo(t.text)||"",fontSize:t.fontSize,verticalAlign:"middle"};return t.groupId&&Object.assign(e,{groupIds:[t.groupId]}),t.id&&Object.assign(e,{id:t.id}),e},dr=t=>{var e,r,i,o;let a={};t.type==="rectangle"&&t.subtype==="activation"&&(a={backgroundColor:"#e9ecef",fillStyle:"solid"});const n={id:t.id,type:t.type,x:t.x,y:t.y,width:t.width,height:t.height,label:{text:Zo(((e=t==null?void 0:t.label)==null?void 0:e.text)||""),fontSize:(r=t==null?void 0:t.label)==null?void 0:r.fontSize,verticalAlign:((i=t.label)==null?void 0:i.verticalAlign)||"middle",strokeColor:((o=t.label)==null?void 0:o.color)||"#000",groupIds:t.groupId?[t.groupId]:[]},strokeStyle:t==null?void 0:t.strokeStyle,strokeWidth:t==null?void 0:t.strokeWidth,strokeColor:t==null?void 0:t.strokeColor,backgroundColor:t==null?void 0:t.bgColor,fillStyle:"solid",...a};return t.groupId&&Object.assign(n,{groupIds:[t.groupId]}),n},bs=t=>{var e;const r={type:"arrow",x:t.startX,y:t.startY,points:t.points||[[0,0],[t.endX-t.startX,t.endY-t.startY]],width:t.endX-t.startX,height:t.endY-t.startY,strokeStyle:(t==null?void 0:t.strokeStyle)||"solid",endArrowhead:(t==null?void 0:t.endArrowhead)||null,startArrowhead:(t==null?void 0:t.startArrowhead)||null,label:{text:Zo(((e=t==null?void 0:t.label)==null?void 0:e.text)||""),fontSize:16},roundness:{type:2},start:t.start,end:t.end};return t.groupId&&Object.assign(r,{groupIds:[t.groupId]}),r},hc=new Mi({converter:t=>{const e=[],r=[];if(Object.values(t.nodes).forEach(i=>{!i||!i.length||i.forEach(o=>{let a;switch(o.type){case"line":a=yr(o);break;case"rectangle":case"ellipse":a=dr(o);break;case"text":a=ci(o);break;default:throw`unknown type ${o.type}`}o.type==="rectangle"&&(o==null?void 0:o.subtype)==="activation"?r.push(a):e.push(a)})}),Object.values(t.lines).forEach(i=>{i&&e.push(yr(i))}),Object.values(t.arrows).forEach(i=>{i&&(e.push(bs(i)),i.sequenceNumber&&e.push(dr(i.sequenceNumber)))}),e.push(...r),t.loops){const{lines:i,texts:o,nodes:a}=t.loops;i.forEach(n=>{e.push(yr(n))}),o.forEach(n=>{e.push(ci(n))}),a.forEach(n=>{e.push(dr(n))})}return t.groups&&t.groups.forEach(i=>{const{actorKeys:o,name:a}=i;let n=1/0,s=1/0,l=0,h=0;if(!o.length)return;e.filter(y=>{if(y.id){const j=y.id.indexOf("-"),U=y.id.substring(0,j);return o.includes(U)}}).forEach(y=>{if(y.x===void 0||y.y===void 0||y.width===void 0||y.height===void 0)throw new Error(`Actor attributes missing ${y}`);n=Math.min(n,y.x),s=Math.min(s,y.y),l=Math.max(l,y.x+y.width),h=Math.max(h,y.y+y.height)});const u=10,c=n-u,d=s-u,p=l-n+u*2,m=h-s+u*2,b=ee(),x=dr({type:"rectangle",x:c,y:d,width:p,height:m,bgColor:i.fill,id:b});e.unshift(x);const E=ee(),_=[b];e.forEach(y=>{if(y.type!=="frame"){if(y.x===void 0||y.y===void 0||y.width===void 0||y.height===void 0)throw new Error(`Element attributes missing ${y}`);if(y.x>=n&&y.x+y.width<=l&&y.y>=s&&y.y+y.height<=h){const j=y.id||ee();y.id||Object.assign(y,{id:j}),_.push(j)}}});const R={type:"frame",id:E,name:a,children:_};e.push(R)}),{elements:e}}}),cc=new Mi({converter:t=>{const e=[];return Object.values(t.nodes).forEach(r=>{!r||!r.length||r.forEach(i=>{let o;switch(i.type){case"line":o=yr(i);break;case"rectangle":case"ellipse":o=dr(i);break;case"text":o=ci(i);break;default:throw`unknown type ${i.type}`}e.push(o)})}),Object.values(t.lines).forEach(r=>{r&&e.push(yr(r))}),Object.values(t.arrows).forEach(r=>{if(!r)return;const i=bs(r);e.push(i)}),Object.values(t.text).forEach(r=>{const i=ci(r);e.push(i)}),Object.values(t.namespaces).forEach(r=>{const i=Object.keys(r.classes),o=[...i],a=[...t.lines,...t.arrows,...t.text];i.forEach(s=>{const l=a.filter(h=>h.metadata&&h.metadata.classId===s).map(h=>h.id);l.length&&o.push(...l)});const n={type:"frame",id:ee(),name:r.id,children:o};e.push(n)}),{elements:e}}}),uc=(t,e={})=>{switch(t.type){case"graphImage":return lc.convert(t,e);case"flowchart":return sc.convert(t,e);case"sequence":return hc.convert(t,e);case"class":return cc.convert(t,e);default:throw new Error(`graphToExcalidraw: unknown graph type "${t.type}, only flowcharts are supported!"`)}};function dc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(s,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?s.concat(h.map(function(u){var c,d;return(d=(c=u.match(/[\t ]/g))===null||c===void 0?void 0:c.length)!==null&&d!==void 0?d:0})):s},[]);if(o.length){var a=new RegExp(`
[	 ]{`+Math.min.apply(Math,o)+"}","g");i=i.map(function(s){return s.replace(a,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return e.forEach(function(s,l){var h=n.match(/(?:^|\n)( *)$/),u=h?h[1]:"",c=s;typeof s=="string"&&s.includes(`
`)&&(c=String(s).split(`
`).map(function(d,p){return p===0?d:""+u+d}).join(`
`)),n+=c+i[l+1]}),n}var Ao={exports:{}},fc=Ao.exports,Jn;function pc(){return Jn||(Jn=1,(function(t,e){(function(r,i){t.exports=i()})(fc,(function(){var r=1e3,i=6e4,o=36e5,a="millisecond",n="second",s="minute",l="hour",h="day",u="week",c="month",d="quarter",p="year",m="date",b="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|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,_={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 S=["th","st","nd","rd"],C=M%100;return"["+M+(S[(C-20)%10]||S[C]||S[0])+"]"}},R=function(M,S,C){var A=String(M);return!A||A.length>=S?M:""+Array(S+1-A.length).join(C)+M},y={s:R,z:function(M){var S=-M.utcOffset(),C=Math.abs(S),A=Math.floor(C/60),k=C%60;return(S<=0?"+":"-")+R(A,2,"0")+":"+R(k,2,"0")},m:function M(S,C){if(S.date()<C.date())return-M(C,S);var A=12*(C.year()-S.year())+(C.month()-S.month()),k=S.clone().add(A,c),z=C-k<0,$=S.clone().add(A+(z?-1:1),c);return+(-(A+(C-k)/(z?k-$:$-k))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:c,y:p,w:u,d:h,D:m,h:l,m:s,s:n,ms:a,Q:d}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},j="en",U={};U[j]=_;var N="$isDayjsObject",tt=function(M){return M instanceof et||!(!M||!M[N])},nt=function M(S,C,A){var k;if(!S)return j;if(typeof S=="string"){var z=S.toLowerCase();U[z]&&(k=z),C&&(U[z]=C,k=z);var $=S.split("-");if(!k&&$.length>1)return M($[0])}else{var D=S.name;U[D]=S,k=D}return!A&&k&&(j=k),k||!A&&j},P=function(M,S){if(tt(M))return M.clone();var C=typeof S=="object"?S:{};return C.date=M,C.args=arguments,new et(C)},B=y;B.l=nt,B.i=tt,B.w=function(M,S){return P(M,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var et=(function(){function M(C){this.$L=nt(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[N]=!0}var S=M.prototype;return S.parse=function(C){this.$d=(function(A){var k=A.date,z=A.utc;if(k===null)return new Date(NaN);if(B.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var $=k.match(x);if($){var D=$[2]-1||0,G=($[7]||"0").substring(0,3);return z?new Date(Date.UTC($[1],D,$[3]||1,$[4]||0,$[5]||0,$[6]||0,G)):new Date($[1],D,$[3]||1,$[4]||0,$[5]||0,$[6]||0,G)}}return new Date(k)})(C),this.init()},S.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},S.$utils=function(){return B},S.isValid=function(){return this.$d.toString()!==b},S.isSame=function(C,A){var k=P(C);return this.startOf(A)<=k&&k<=this.endOf(A)},S.isAfter=function(C,A){return P(C)<this.startOf(A)},S.isBefore=function(C,A){return this.endOf(A)<P(C)},S.$g=function(C,A,k){return B.u(C)?this[A]:this.set(k,C)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(C,A){var k=this,z=!!B.u(A)||A,$=B.p(C),D=function(qt,ot){var At=B.w(k.$u?Date.UTC(k.$y,ot,qt):new Date(k.$y,ot,qt),k);return z?At:At.endOf(h)},G=function(qt,ot){return B.w(k.toDate()[qt].apply(k.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(ot)),k)},H=this.$W,rt=this.$M,Y=this.$D,xt="set"+(this.$u?"UTC":"");switch($){case p:return z?D(1,0):D(31,11);case c:return z?D(1,rt):D(0,rt+1);case u:var Bt=this.$locale().weekStart||0,kt=(H<Bt?H+7:H)-Bt;return D(z?Y-kt:Y+(6-kt),rt);case h:case m:return G(xt+"Hours",0);case l:return G(xt+"Minutes",1);case s:return G(xt+"Seconds",2);case n:return G(xt+"Milliseconds",3);default:return this.clone()}},S.endOf=function(C){return this.startOf(C,!1)},S.$set=function(C,A){var k,z=B.p(C),$="set"+(this.$u?"UTC":""),D=(k={},k[h]=$+"Date",k[m]=$+"Date",k[c]=$+"Month",k[p]=$+"FullYear",k[l]=$+"Hours",k[s]=$+"Minutes",k[n]=$+"Seconds",k[a]=$+"Milliseconds",k)[z],G=z===h?this.$D+(A-this.$W):A;if(z===c||z===p){var H=this.clone().set(m,1);H.$d[D](G),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else D&&this.$d[D](G);return this.init(),this},S.set=function(C,A){return this.clone().$set(C,A)},S.get=function(C){return this[B.p(C)]()},S.add=function(C,A){var k,z=this;C=Number(C);var $=B.p(A),D=function(rt){var Y=P(z);return B.w(Y.date(Y.date()+Math.round(rt*C)),z)};if($===c)return this.set(c,this.$M+C);if($===p)return this.set(p,this.$y+C);if($===h)return D(1);if($===u)return D(7);var G=(k={},k[s]=i,k[l]=o,k[n]=r,k)[$]||1,H=this.$d.getTime()+C*G;return B.w(H,this)},S.subtract=function(C,A){return this.add(-1*C,A)},S.format=function(C){var A=this,k=this.$locale();if(!this.isValid())return k.invalidDate||b;var z=C||"YYYY-MM-DDTHH:mm:ssZ",$=B.z(this),D=this.$H,G=this.$m,H=this.$M,rt=k.weekdays,Y=k.months,xt=k.meridiem,Bt=function(ot,At,ae,Lt){return ot&&(ot[At]||ot(A,z))||ae[At].slice(0,Lt)},kt=function(ot){return B.s(D%12||12,ot,"0")},qt=xt||function(ot,At,ae){var Lt=ot<12?"AM":"PM";return ae?Lt.toLowerCase():Lt};return z.replace(E,(function(ot,At){return At||(function(ae){switch(ae){case"YY":return String(A.$y).slice(-2);case"YYYY":return B.s(A.$y,4,"0");case"M":return H+1;case"MM":return B.s(H+1,2,"0");case"MMM":return Bt(k.monthsShort,H,Y,3);case"MMMM":return Bt(Y,H);case"D":return A.$D;case"DD":return B.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return Bt(k.weekdaysMin,A.$W,rt,2);case"ddd":return Bt(k.weekdaysShort,A.$W,rt,3);case"dddd":return rt[A.$W];case"H":return String(D);case"HH":return B.s(D,2,"0");case"h":return kt(1);case"hh":return kt(2);case"a":return qt(D,G,!0);case"A":return qt(D,G,!1);case"m":return String(G);case"mm":return B.s(G,2,"0");case"s":return String(A.$s);case"ss":return B.s(A.$s,2,"0");case"SSS":return B.s(A.$ms,3,"0");case"Z":return $}return null})(ot)||$.replace(":","")}))},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(C,A,k){var z,$=this,D=B.p(A),G=P(C),H=(G.utcOffset()-this.utcOffset())*i,rt=this-G,Y=function(){return B.m($,G)};switch(D){case p:z=Y()/12;break;case c:z=Y();break;case d:z=Y()/3;break;case u:z=(rt-H)/6048e5;break;case h:z=(rt-H)/864e5;break;case l:z=rt/o;break;case s:z=rt/i;break;case n:z=rt/r;break;default:z=rt}return k?z:B.a(z)},S.daysInMonth=function(){return this.endOf(c).$D},S.$locale=function(){return U[this.$L]},S.locale=function(C,A){if(!C)return this.$L;var k=this.clone(),z=nt(C,A,!0);return z&&(k.$L=z),k},S.clone=function(){return B.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},M})(),ne=et.prototype;return P.prototype=ne,[["$ms",a],["$s",n],["$m",s],["$H",l],["$W",h],["$M",c],["$y",p],["$D",m]].forEach((function(M){ne[M[1]]=function(S){return this.$g(S,M[0],M[1])}})),P.extend=function(M,S){return M.$i||(M(S,et,P),M.$i=!0),P},P.locale=nt,P.isDayjs=tt,P.unix=function(M){return P(1e3*M)},P.en=U[j],P.Ls=U,P.p={},P}))})(Ao)),Ao.exports}var gc=pc();const mc=Zh(gc);var yc={value:()=>{}};function _s(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new ei(r)}function ei(t){this._=t}function bc(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}ei.prototype=_s.prototype={constructor:ei,on:function(t,e){var r=this._,i=bc(t+"",r),o,a=-1,n=i.length;if(arguments.length<2){for(;++a<n;)if((o=(t=i[a]).type)&&(o=_c(r[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<n;)if(o=(t=i[a]).type)r[o]=Qn(r[o],t.name,e);else if(e==null)for(o in r)r[o]=Qn(r[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new ei(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,a;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],i=0,o=a.length;i<o;++i)a[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,a=i.length;o<a;++o)i[o].value.apply(e,r)}};function _c(t,e){for(var r=0,i=t.length,o;r<i;++r)if((o=t[r]).name===e)return o.value}function Qn(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=yc,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var Lo="http://www.w3.org/1999/xhtml";const ta={svg:"http://www.w3.org/2000/svg",xhtml:Lo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ni(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),ta.hasOwnProperty(e)?{space:ta[e],local:t}:t}function Cc(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Lo&&e.documentElement.namespaceURI===Lo?e.createElement(t):e.createElementNS(r,t)}}function xc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Cs(t){var e=Ni(t);return(e.local?xc:Cc)(e)}function kc(){}function Jo(t){return t==null?kc:function(){return this.querySelector(t)}}function vc(t){typeof t!="function"&&(t=Jo(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a=e[o],n=a.length,s=i[o]=new Array(n),l,h,u=0;u<n;++u)(l=a[u])&&(h=t.call(l,l.__data__,u,a))&&("__data__"in l&&(h.__data__=l.__data__),s[u]=h);return new Ct(i,this._parents)}function Tc(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function wc(){return[]}function xs(t){return t==null?wc:function(){return this.querySelectorAll(t)}}function Sc(t){return function(){return Tc(t.apply(this,arguments))}}function Bc(t){typeof t=="function"?t=Sc(t):t=xs(t);for(var e=this._groups,r=e.length,i=[],o=[],a=0;a<r;++a)for(var n=e[a],s=n.length,l,h=0;h<s;++h)(l=n[h])&&(i.push(t.call(l,l.__data__,h,n)),o.push(l));return new Ct(i,o)}function ks(t){return function(){return this.matches(t)}}function vs(t){return function(e){return e.matches(t)}}var Ac=Array.prototype.find;function Lc(t){return function(){return Ac.call(this.children,t)}}function Fc(){return this.firstElementChild}function Ec(t){return this.select(t==null?Fc:Lc(typeof t=="function"?t:vs(t)))}var Oc=Array.prototype.filter;function Ic(){return Array.from(this.children)}function Mc(t){return function(){return Oc.call(this.children,t)}}function Nc(t){return this.selectAll(t==null?Ic:Mc(typeof t=="function"?t:vs(t)))}function qc(t){typeof t!="function"&&(t=ks(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a=e[o],n=a.length,s=i[o]=[],l,h=0;h<n;++h)(l=a[h])&&t.call(l,l.__data__,h,a)&&s.push(l);return new Ct(i,this._parents)}function Ts(t){return new Array(t.length)}function Dc(){return new Ct(this._enter||this._groups.map(Ts),this._parents)}function ui(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ui.prototype={constructor:ui,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 $c(t){return function(){return t}}function zc(t,e,r,i,o,a){for(var n=0,s,l=e.length,h=a.length;n<h;++n)(s=e[n])?(s.__data__=a[n],i[n]=s):r[n]=new ui(t,a[n]);for(;n<l;++n)(s=e[n])&&(o[n]=s)}function Rc(t,e,r,i,o,a,n){var s,l,h=new Map,u=e.length,c=a.length,d=new Array(u),p;for(s=0;s<u;++s)(l=e[s])&&(d[s]=p=n.call(l,l.__data__,s,e)+"",h.has(p)?o[s]=l:h.set(p,l));for(s=0;s<c;++s)p=n.call(t,a[s],s,a)+"",(l=h.get(p))?(i[s]=l,l.__data__=a[s],h.delete(p)):r[s]=new ui(t,a[s]);for(s=0;s<u;++s)(l=e[s])&&h.get(d[s])===l&&(o[s]=l)}function Pc(t){return t.__data__}function jc(t,e){if(!arguments.length)return Array.from(this,Pc);var r=e?Rc:zc,i=this._parents,o=this._groups;typeof t!="function"&&(t=$c(t));for(var a=o.length,n=new Array(a),s=new Array(a),l=new Array(a),h=0;h<a;++h){var u=i[h],c=o[h],d=c.length,p=Wc(t.call(u,u&&u.__data__,h,i)),m=p.length,b=s[h]=new Array(m),x=n[h]=new Array(m),E=l[h]=new Array(d);r(u,c,b,x,E,p,e);for(var _=0,R=0,y,j;_<m;++_)if(y=b[_]){for(_>=R&&(R=_+1);!(j=x[R])&&++R<m;);y._next=j||null}}return n=new Ct(n,i),n._enter=s,n._exit=l,n}function Wc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Hc(){return new Ct(this._exit||this._groups.map(Ts),this._parents)}function Yc(t,e,r){var i=this.enter(),o=this,a=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),r==null?a.remove():r(a),i&&o?i.merge(o).order():o}function Uc(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,a=i.length,n=Math.min(o,a),s=new Array(o),l=0;l<n;++l)for(var h=r[l],u=i[l],c=h.length,d=s[l]=new Array(c),p,m=0;m<c;++m)(p=h[m]||u[m])&&(d[m]=p);for(;l<o;++l)s[l]=r[l];return new Ct(s,this._parents)}function Xc(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],o=i.length-1,a=i[o],n;--o>=0;)(n=i[o])&&(a&&n.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(n,a),a=n);return this}function Vc(t){t||(t=Gc);function e(c,d){return c&&d?t(c.__data__,d.__data__):!c-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var n=r[a],s=n.length,l=o[a]=new Array(s),h,u=0;u<s;++u)(h=n[u])&&(l[u]=h);l.sort(e)}return new Ct(o,this._parents).order()}function Gc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Kc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Zc(){return Array.from(this)}function Jc(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length;o<a;++o){var n=i[o];if(n)return n}return null}function Qc(){let t=0;for(const e of this)++t;return t}function tu(){return!this.node()}function eu(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o=e[r],a=0,n=o.length,s;a<n;++a)(s=o[a])&&t.call(s,s.__data__,a,o);return this}function ru(t){return function(){this.removeAttribute(t)}}function iu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ou(t,e){return function(){this.setAttribute(t,e)}}function nu(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function au(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function su(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function lu(t,e){var r=Ni(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?iu:ru:typeof e=="function"?r.local?su:au:r.local?nu:ou)(r,e))}function ws(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function hu(t){return function(){this.style.removeProperty(t)}}function cu(t,e,r){return function(){this.style.setProperty(t,e,r)}}function uu(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function du(t,e,r){return arguments.length>1?this.each((e==null?hu:typeof e=="function"?uu:cu)(t,e,r??"")):je(this.node(),t)}function je(t,e){return t.style.getPropertyValue(e)||ws(t).getComputedStyle(t,null).getPropertyValue(e)}function fu(t){return function(){delete this[t]}}function pu(t,e){return function(){this[t]=e}}function gu(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function mu(t,e){return arguments.length>1?this.each((e==null?fu:typeof e=="function"?gu:pu)(t,e)):this.node()[t]}function Ss(t){return t.trim().split(/^|\s+/)}function Qo(t){return t.classList||new Bs(t)}function Bs(t){this._node=t,this._names=Ss(t.getAttribute("class")||"")}Bs.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 As(t,e){for(var r=Qo(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function Ls(t,e){for(var r=Qo(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function yu(t){return function(){As(this,t)}}function bu(t){return function(){Ls(this,t)}}function _u(t,e){return function(){(e.apply(this,arguments)?As:Ls)(this,t)}}function Cu(t,e){var r=Ss(t+"");if(arguments.length<2){for(var i=Qo(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof e=="function"?_u:e?yu:bu)(r,e))}function xu(){this.textContent=""}function ku(t){return function(){this.textContent=t}}function vu(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Tu(t){return arguments.length?this.each(t==null?xu:(typeof t=="function"?vu:ku)(t)):this.node().textContent}function wu(){this.innerHTML=""}function Su(t){return function(){this.innerHTML=t}}function Bu(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Au(t){return arguments.length?this.each(t==null?wu:(typeof t=="function"?Bu:Su)(t)):this.node().innerHTML}function Lu(){this.nextSibling&&this.parentNode.appendChild(this)}function Fu(){return this.each(Lu)}function Eu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ou(){return this.each(Eu)}function Iu(t){var e=typeof t=="function"?t:Cs(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Mu(){return null}function Nu(t,e){var r=typeof t=="function"?t:Cs(t),i=e==null?Mu:typeof e=="function"?e:Jo(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function qu(){var t=this.parentNode;t&&t.removeChild(this)}function Du(){return this.each(qu)}function $u(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ru(t){return this.select(t?zu:$u)}function Pu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ju(t){return function(e){t.call(this,e,this.__data__)}}function Wu(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function Hu(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,o=e.length,a;r<o;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++i]=a;++i?e.length=i:delete this.__on}}}function Yu(t,e,r){return function(){var i=this.__on,o,a=ju(e);if(i){for(var n=0,s=i.length;n<s;++n)if((o=i[n]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=r),o.value=e;return}}this.addEventListener(t.type,a,r),o={type:t.type,name:t.name,value:e,listener:a,options:r},i?i.push(o):this.__on=[o]}}function Uu(t,e,r){var i=Wu(t+""),o,a=i.length,n;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,h=s.length,u;l<h;++l)for(o=0,u=s[l];o<a;++o)if((n=i[o]).type===u.type&&n.name===u.name)return u.value}return}for(s=e?Yu:Hu,o=0;o<a;++o)this.each(s(i[o],e,r));return this}function Fs(t,e,r){var i=ws(t),o=i.CustomEvent;typeof o=="function"?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Xu(t,e){return function(){return Fs(this,t,e)}}function Vu(t,e){return function(){return Fs(this,t,e.apply(this,arguments))}}function Gu(t,e){return this.each((typeof e=="function"?Vu:Xu)(t,e))}function*Ku(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length,n;o<a;++o)(n=i[o])&&(yield n)}var Es=[null];function Ct(t,e){this._groups=t,this._parents=e}function Ir(){return new Ct([[document.documentElement]],Es)}function Zu(){return this}Ct.prototype=Ir.prototype={constructor:Ct,select:vc,selectAll:Bc,selectChild:Ec,selectChildren:Nc,filter:qc,data:jc,enter:Dc,exit:Hc,join:Yc,merge:Uc,selection:Zu,order:Xc,sort:Vc,call:Kc,nodes:Zc,node:Jc,size:Qc,empty:tu,each:eu,attr:lu,style:du,property:mu,classed:Cu,text:Tu,html:Au,raise:Fu,lower:Ou,append:Iu,insert:Nu,remove:Du,clone:Ru,datum:Pu,on:Uu,dispatch:Gu,[Symbol.iterator]:Ku};function Tt(t){return typeof t=="string"?new Ct([[document.querySelector(t)]],[document.documentElement]):new Ct([[t]],Es)}function tn(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Os(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Mr(){}var Tr=.7,di=1/Tr,$e="\\s*([+-]?\\d+)\\s*",wr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ju=/^#([0-9a-f]{3,8})$/,Qu=new RegExp(`^rgb\\(${$e},${$e},${$e}\\)$`),td=new RegExp(`^rgb\\(${Pt},${Pt},${Pt}\\)$`),ed=new RegExp(`^rgba\\(${$e},${$e},${$e},${wr}\\)$`),rd=new RegExp(`^rgba\\(${Pt},${Pt},${Pt},${wr}\\)$`),id=new RegExp(`^hsl\\(${wr},${Pt},${Pt}\\)$`),od=new RegExp(`^hsla\\(${wr},${Pt},${Pt},${wr}\\)$`),ea={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};tn(Mr,Sr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ra,formatHex:ra,formatHex8:nd,formatHsl:ad,formatRgb:ia,toString:ia});function ra(){return this.rgb().formatHex()}function nd(){return this.rgb().formatHex8()}function ad(){return Is(this).formatHsl()}function ia(){return this.rgb().formatRgb()}function Sr(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Ju.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?oa(e):r===3?new yt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Xr(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Xr(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=Qu.exec(t))?new yt(e[1],e[2],e[3],1):(e=td.exec(t))?new yt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=ed.exec(t))?Xr(e[1],e[2],e[3],e[4]):(e=rd.exec(t))?Xr(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=id.exec(t))?sa(e[1],e[2]/100,e[3]/100,1):(e=od.exec(t))?sa(e[1],e[2]/100,e[3]/100,e[4]):ea.hasOwnProperty(t)?oa(ea[t]):t==="transparent"?new yt(NaN,NaN,NaN,0):null}function oa(t){return new yt(t>>16&255,t>>8&255,t&255,1)}function Xr(t,e,r,i){return i<=0&&(t=e=r=NaN),new yt(t,e,r,i)}function sd(t){return t instanceof Mr||(t=Sr(t)),t?(t=t.rgb(),new yt(t.r,t.g,t.b,t.opacity)):new yt}function Fo(t,e,r,i){return arguments.length===1?sd(t):new yt(t,e,r,i??1)}function yt(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}tn(yt,Fo,Os(Mr,{brighter(t){return t=t==null?di:Math.pow(di,t),new yt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Tr:Math.pow(Tr,t),new yt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new yt(ke(this.r),ke(this.g),ke(this.b),fi(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:na,formatHex:na,formatHex8:ld,formatRgb:aa,toString:aa}));function na(){return`#${Ce(this.r)}${Ce(this.g)}${Ce(this.b)}`}function ld(){return`#${Ce(this.r)}${Ce(this.g)}${Ce(this.b)}${Ce((isNaN(this.opacity)?1:this.opacity)*255)}`}function aa(){const t=fi(this.opacity);return`${t===1?"rgb(":"rgba("}${ke(this.r)}, ${ke(this.g)}, ${ke(this.b)}${t===1?")":`, ${t})`}`}function fi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ke(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ce(t){return t=ke(t),(t<16?"0":"")+t.toString(16)}function sa(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new It(t,e,r,i)}function Is(t){if(t instanceof It)return new It(t.h,t.s,t.l,t.opacity);if(t instanceof Mr||(t=Sr(t)),!t)return new It;if(t instanceof It)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),a=Math.max(e,r,i),n=NaN,s=a-o,l=(a+o)/2;return s?(e===a?n=(r-i)/s+(r<i)*6:r===a?n=(i-e)/s+2:n=(e-r)/s+4,s/=l<.5?a+o:2-a-o,n*=60):s=l>0&&l<1?0:n,new It(n,s,l,t.opacity)}function hd(t,e,r,i){return arguments.length===1?Is(t):new It(t,e,r,i??1)}function It(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}tn(It,hd,Os(Mr,{brighter(t){return t=t==null?di:Math.pow(di,t),new It(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Tr:Math.pow(Tr,t),new It(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,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new yt(ho(t>=240?t-240:t+120,o,i),ho(t,o,i),ho(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new It(la(this.h),Vr(this.s),Vr(this.l),fi(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=fi(this.opacity);return`${t===1?"hsl(":"hsla("}${la(this.h)}, ${Vr(this.s)*100}%, ${Vr(this.l)*100}%${t===1?")":`, ${t})`}`}}));function la(t){return t=(t||0)%360,t<0?t+360:t}function Vr(t){return Math.max(0,Math.min(1,t||0))}function ho(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const en=t=>()=>t;function Ms(t,e){return function(r){return t+r*e}}function cd(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function lk(t,e){var r=e-t;return r?Ms(t,r>180||r<-180?r-360*Math.round(r/360):r):en(isNaN(t)?e:t)}function ud(t){return(t=+t)==1?Ns:function(e,r){return r-e?cd(e,r,t):en(isNaN(e)?r:e)}}function Ns(t,e){var r=e-t;return r?Ms(t,r):en(isNaN(t)?e:t)}const ha=(function t(e){var r=ud(e);function i(o,a){var n=r((o=Fo(o)).r,(a=Fo(a)).r),s=r(o.g,a.g),l=r(o.b,a.b),h=Ns(o.opacity,a.opacity);return function(u){return o.r=n(u),o.g=s(u),o.b=l(u),o.opacity=h(u),o+""}}return i.gamma=t,i})(1);function he(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var Eo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,co=new RegExp(Eo.source,"g");function dd(t){return function(){return t}}function fd(t){return function(e){return t(e)+""}}function pd(t,e){var r=Eo.lastIndex=co.lastIndex=0,i,o,a,n=-1,s=[],l=[];for(t=t+"",e=e+"";(i=Eo.exec(t))&&(o=co.exec(e));)(a=o.index)>r&&(a=e.slice(r,a),s[n]?s[n]+=a:s[++n]=a),(i=i[0])===(o=o[0])?s[n]?s[n]+=o:s[++n]=o:(s[++n]=null,l.push({i:n,x:he(i,o)})),r=co.lastIndex;return r<e.length&&(a=e.slice(r),s[n]?s[n]+=a:s[++n]=a),s.length<2?l[0]?fd(l[0].x):dd(e):(e=l.length,function(h){for(var u=0,c;u<e;++u)s[(c=l[u]).i]=c.x(h);return s.join("")})}var ca=180/Math.PI,qs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ds(t,e,r,i,o,a){var n,s,l;return(n=Math.sqrt(t*t+e*e))&&(t/=n,e/=n),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,n=-n),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*ca,skewX:Math.atan(l)*ca,scaleX:n,scaleY:s}}var Gr;function gd(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?qs:Ds(e.a,e.b,e.c,e.d,e.e,e.f)}function md(t){return t==null||(Gr||(Gr=document.createElementNS("http://www.w3.org/2000/svg","g")),Gr.setAttribute("transform",t),!(t=Gr.transform.baseVal.consolidate()))?qs:(t=t.matrix,Ds(t.a,t.b,t.c,t.d,t.e,t.f))}function $s(t,e,r,i){function o(h){return h.length?h.pop()+" ":""}function a(h,u,c,d,p,m){if(h!==c||u!==d){var b=p.push("translate(",null,e,null,r);m.push({i:b-4,x:he(h,c)},{i:b-2,x:he(u,d)})}else(c||d)&&p.push("translate("+c+e+d+r)}function n(h,u,c,d){h!==u?(h-u>180?u+=360:u-h>180&&(h+=360),d.push({i:c.push(o(c)+"rotate(",null,i)-2,x:he(h,u)})):u&&c.push(o(c)+"rotate("+u+i)}function s(h,u,c,d){h!==u?d.push({i:c.push(o(c)+"skewX(",null,i)-2,x:he(h,u)}):u&&c.push(o(c)+"skewX("+u+i)}function l(h,u,c,d,p,m){if(h!==c||u!==d){var b=p.push(o(p)+"scale(",null,",",null,")");m.push({i:b-4,x:he(h,c)},{i:b-2,x:he(u,d)})}else(c!==1||d!==1)&&p.push(o(p)+"scale("+c+","+d+")")}return function(h,u){var c=[],d=[];return h=t(h),u=t(u),a(h.translateX,h.translateY,u.translateX,u.translateY,c,d),n(h.rotate,u.rotate,c,d),s(h.skewX,u.skewX,c,d),l(h.scaleX,h.scaleY,u.scaleX,u.scaleY,c,d),h=u=null,function(p){for(var m=-1,b=d.length,x;++m<b;)c[(x=d[m]).i]=x.x(p);return c.join("")}}}var yd=$s(gd,"px, ","px)","deg)"),bd=$s(md,", ",")",")"),We=0,fr=0,nr=0,zs=1e3,pi,pr,gi=0,Te=0,qi=0,Br=typeof performance=="object"&&performance.now?performance:Date,Rs=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rn(){return Te||(Rs(_d),Te=Br.now()+qi)}function _d(){Te=0}function mi(){this._call=this._time=this._next=null}mi.prototype=Ps.prototype={constructor:mi,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?rn():+r)+(e==null?0:+e),!this._next&&pr!==this&&(pr?pr._next=this:pi=this,pr=this),this._call=t,this._time=r,Oo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Oo())}};function Ps(t,e,r){var i=new mi;return i.restart(t,e,r),i}function Cd(){rn(),++We;for(var t=pi,e;t;)(e=Te-t._time)>=0&&t._call.call(void 0,e),t=t._next;--We}function ua(){Te=(gi=Br.now())+qi,We=fr=0;try{Cd()}finally{We=0,kd(),Te=0}}function xd(){var t=Br.now(),e=t-gi;e>zs&&(qi-=e,gi=t)}function kd(){for(var t,e=pi,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:pi=r);pr=t,Oo(i)}function Oo(t){if(!We){fr&&(fr=clearTimeout(fr));var e=t-Te;e>24?(t<1/0&&(fr=setTimeout(ua,t-Br.now()-qi)),nr&&(nr=clearInterval(nr))):(nr||(gi=Br.now(),nr=setInterval(xd,zs)),We=1,Rs(ua))}}function da(t,e,r){var i=new mi;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,r),i}var vd=_s("start","end","cancel","interrupt"),Td=[],js=0,fa=1,Io=2,ri=3,pa=4,Mo=5,ii=6;function Di(t,e,r,i,o,a){var n=t.__transition;if(!n)t.__transition={};else if(r in n)return;wd(t,r,{name:e,index:i,group:o,on:vd,tween:Td,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:js})}function on(t,e){var r=Nt(t,e);if(r.state>js)throw new Error("too late; already scheduled");return r}function Ut(t,e){var r=Nt(t,e);if(r.state>ri)throw new Error("too late; already running");return r}function Nt(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function wd(t,e,r){var i=t.__transition,o;i[e]=r,r.timer=Ps(a,0,r.time);function a(h){r.state=fa,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var u,c,d,p;if(r.state!==fa)return l();for(u in i)if(p=i[u],p.name===r.name){if(p.state===ri)return da(n);p.state===pa?(p.state=ii,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[u]):+u<e&&(p.state=ii,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete i[u])}if(da(function(){r.state===ri&&(r.state=pa,r.timer.restart(s,r.delay,r.time),s(h))}),r.state=Io,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Io){for(r.state=ri,o=new Array(d=r.tween.length),u=0,c=-1;u<d;++u)(p=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(o[++c]=p);o.length=c+1}}function s(h){for(var u=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=Mo,1),c=-1,d=o.length;++c<d;)o[c].call(t,u);r.state===Mo&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=ii,r.timer.stop(),delete i[e];for(var h in i)return;delete t.__transition}}function Sd(t,e){var r=t.__transition,i,o,a=!0,n;if(r){e=e==null?null:e+"";for(n in r){if((i=r[n]).name!==e){a=!1;continue}o=i.state>Io&&i.state<Mo,i.state=ii,i.timer.stop(),i.on.call(o?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[n]}a&&delete t.__transition}}function Bd(t){return this.each(function(){Sd(this,t)})}function Ad(t,e){var r,i;return function(){var o=Ut(this,t),a=o.tween;if(a!==r){i=r=a;for(var n=0,s=i.length;n<s;++n)if(i[n].name===e){i=i.slice(),i.splice(n,1);break}}o.tween=i}}function Ld(t,e,r){var i,o;if(typeof r!="function")throw new Error;return function(){var a=Ut(this,t),n=a.tween;if(n!==i){o=(i=n).slice();for(var s={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=s;break}l===h&&o.push(s)}a.tween=o}}function Fd(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=Nt(this.node(),r).tween,o=0,a=i.length,n;o<a;++o)if((n=i[o]).name===t)return n.value;return null}return this.each((e==null?Ad:Ld)(r,t,e))}function nn(t,e,r){var i=t._id;return t.each(function(){var o=Ut(this,i);(o.value||(o.value={}))[e]=r.apply(this,arguments)}),function(o){return Nt(o,i).value[e]}}function Ws(t,e){var r;return(typeof e=="number"?he:e instanceof Sr?ha:(r=Sr(e))?(e=r,ha):pd)(t,e)}function Ed(t){return function(){this.removeAttribute(t)}}function Od(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Id(t,e,r){var i,o=r+"",a;return function(){var n=this.getAttribute(t);return n===o?null:n===i?a:a=e(i=n,r)}}function Md(t,e,r){var i,o=r+"",a;return function(){var n=this.getAttributeNS(t.space,t.local);return n===o?null:n===i?a:a=e(i=n,r)}}function Nd(t,e,r){var i,o,a;return function(){var n,s=r(this),l;return s==null?void this.removeAttribute(t):(n=this.getAttribute(t),l=s+"",n===l?null:n===i&&l===o?a:(o=l,a=e(i=n,s)))}}function qd(t,e,r){var i,o,a;return function(){var n,s=r(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(n=this.getAttributeNS(t.space,t.local),l=s+"",n===l?null:n===i&&l===o?a:(o=l,a=e(i=n,s)))}}function Dd(t,e){var r=Ni(t),i=r==="transform"?bd:Ws;return this.attrTween(t,typeof e=="function"?(r.local?qd:Nd)(r,i,nn(this,"attr."+t,e)):e==null?(r.local?Od:Ed)(r):(r.local?Md:Id)(r,i,e))}function $d(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function zd(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function Rd(t,e){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&zd(t,a)),r}return o._value=e,o}function Pd(t,e){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&$d(t,a)),r}return o._value=e,o}function jd(t,e){var r="attr."+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;var i=Ni(t);return this.tween(r,(i.local?Rd:Pd)(i,e))}function Wd(t,e){return function(){on(this,t).delay=+e.apply(this,arguments)}}function Hd(t,e){return e=+e,function(){on(this,t).delay=e}}function Yd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Wd:Hd)(e,t)):Nt(this.node(),e).delay}function Ud(t,e){return function(){Ut(this,t).duration=+e.apply(this,arguments)}}function Xd(t,e){return e=+e,function(){Ut(this,t).duration=e}}function Vd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ud:Xd)(e,t)):Nt(this.node(),e).duration}function Gd(t,e){if(typeof e!="function")throw new Error;return function(){Ut(this,t).ease=e}}function Kd(t){var e=this._id;return arguments.length?this.each(Gd(e,t)):Nt(this.node(),e).ease}function Zd(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Ut(this,t).ease=r}}function Jd(t){if(typeof t!="function")throw new Error;return this.each(Zd(this._id,t))}function Qd(t){typeof t!="function"&&(t=ks(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a=e[o],n=a.length,s=i[o]=[],l,h=0;h<n;++h)(l=a[h])&&t.call(l,l.__data__,h,a)&&s.push(l);return new ie(i,this._parents,this._name,this._id)}function tf(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,a=Math.min(i,o),n=new Array(i),s=0;s<a;++s)for(var l=e[s],h=r[s],u=l.length,c=n[s]=new Array(u),d,p=0;p<u;++p)(d=l[p]||h[p])&&(c[p]=d);for(;s<i;++s)n[s]=e[s];return new ie(n,this._parents,this._name,this._id)}function ef(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function rf(t,e,r){var i,o,a=ef(e)?on:Ut;return function(){var n=a(this,t),s=n.on;s!==i&&(o=(i=s).copy()).on(e,r),n.on=o}}function of(t,e){var r=this._id;return arguments.length<2?Nt(this.node(),r).on.on(t):this.each(rf(r,t,e))}function nf(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function af(){return this.on("end.remove",nf(this._id))}function sf(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Jo(t));for(var i=this._groups,o=i.length,a=new Array(o),n=0;n<o;++n)for(var s=i[n],l=s.length,h=a[n]=new Array(l),u,c,d=0;d<l;++d)(u=s[d])&&(c=t.call(u,u.__data__,d,s))&&("__data__"in u&&(c.__data__=u.__data__),h[d]=c,Di(h[d],e,r,d,h,Nt(u,r)));return new ie(a,this._parents,e,r)}function lf(t){var e=this._name,r=this._id;typeof t!="function"&&(t=xs(t));for(var i=this._groups,o=i.length,a=[],n=[],s=0;s<o;++s)for(var l=i[s],h=l.length,u,c=0;c<h;++c)if(u=l[c]){for(var d=t.call(u,u.__data__,c,l),p,m=Nt(u,r),b=0,x=d.length;b<x;++b)(p=d[b])&&Di(p,e,r,b,d,m);a.push(d),n.push(u)}return new ie(a,n,e,r)}var hf=Ir.prototype.constructor;function cf(){return new hf(this._groups,this._parents)}function uf(t,e){var r,i,o;return function(){var a=je(this,t),n=(this.style.removeProperty(t),je(this,t));return a===n?null:a===r&&n===i?o:o=e(r=a,i=n)}}function Hs(t){return function(){this.style.removeProperty(t)}}function df(t,e,r){var i,o=r+"",a;return function(){var n=je(this,t);return n===o?null:n===i?a:a=e(i=n,r)}}function ff(t,e,r){var i,o,a;return function(){var n=je(this,t),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),je(this,t))),n===l?null:n===i&&l===o?a:(o=l,a=e(i=n,s))}}function pf(t,e){var r,i,o,a="style."+e,n="end."+a,s;return function(){var l=Ut(this,t),h=l.on,u=l.value[a]==null?s||(s=Hs(e)):void 0;(h!==r||o!==u)&&(i=(r=h).copy()).on(n,o=u),l.on=i}}function gf(t,e,r){var i=(t+="")=="transform"?yd:Ws;return e==null?this.styleTween(t,uf(t,i)).on("end.style."+t,Hs(t)):typeof e=="function"?this.styleTween(t,ff(t,i,nn(this,"style."+t,e))).each(pf(this._id,t)):this.styleTween(t,df(t,i,e),r).on("end.style."+t,null)}function mf(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function yf(t,e,r){var i,o;function a(){var n=e.apply(this,arguments);return n!==o&&(i=(o=n)&&mf(t,n,r)),i}return a._value=e,a}function bf(t,e,r){var i="style."+(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;return this.tween(i,yf(t,e,r??""))}function _f(t){return function(){this.textContent=t}}function Cf(t){return function(){var e=t(this);this.textContent=e??""}}function xf(t){return this.tween("text",typeof t=="function"?Cf(nn(this,"text",t)):_f(t==null?"":t+""))}function kf(t){return function(e){this.textContent=t.call(this,e)}}function vf(t){var e,r;function i(){var o=t.apply(this,arguments);return o!==r&&(e=(r=o)&&kf(o)),e}return i._value=t,i}function Tf(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,vf(t))}function wf(){for(var t=this._name,e=this._id,r=Ys(),i=this._groups,o=i.length,a=0;a<o;++a)for(var n=i[a],s=n.length,l,h=0;h<s;++h)if(l=n[h]){var u=Nt(l,e);Di(l,t,r,h,n,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ie(i,this._parents,t,r)}function Sf(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(a,n){var s={value:n},l={value:function(){--o===0&&a()}};r.each(function(){var h=Ut(this,i),u=h.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),h.on=e}),o===0&&a()})}var Bf=0;function ie(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Ys(){return++Bf}var Zt=Ir.prototype;ie.prototype={constructor:ie,select:sf,selectAll:lf,selectChild:Zt.selectChild,selectChildren:Zt.selectChildren,filter:Qd,merge:tf,selection:cf,transition:wf,call:Zt.call,nodes:Zt.nodes,node:Zt.node,size:Zt.size,empty:Zt.empty,each:Zt.each,on:of,attr:Dd,attrTween:jd,style:gf,styleTween:bf,text:xf,textTween:Tf,remove:af,tween:Fd,delay:Yd,duration:Vd,ease:Kd,easeVarying:Jd,end:Sf,[Symbol.iterator]:Zt[Symbol.iterator]};function Af(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Lf={time:null,delay:0,duration:250,ease:Af};function Ff(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Ef(t){var e,r;t instanceof ie?(e=t._id,t=t._name):(e=Ys(),(r=Lf).time=rn(),t=t==null?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var n=i[a],s=n.length,l,h=0;h<s;++h)(l=n[h])&&Di(l,t,e,h,n,r||Ff(l,e));return new ie(i,this._parents,t,e)}Ir.prototype.interrupt=Bd;Ir.prototype.transition=Ef;const hk=Math.abs,ck=Math.atan2,uk=Math.cos,dk=Math.max,fk=Math.min,pk=Math.sin,gk=Math.sqrt,ga=1e-12,an=Math.PI,ma=an/2,mk=2*an;function yk(t){return t>1?0:t<-1?an:Math.acos(t)}function bk(t){return t>=1?ma:t<=-1?-ma:Math.asin(t)}function Us(t){this._context=t}Us.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 Of(t){return new Us(t)}class Xs{constructor(e,r){this._context=e,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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function If(t){return new Xs(t,!0)}function Mf(t){return new Xs(t,!1)}function de(){}function yi(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function $i(t){this._context=t}$i.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:yi(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:yi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Nf(t){return new $i(t)}function Vs(t){this._context=t}Vs.prototype={areaStart:de,areaEnd:de,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:yi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qf(t){return new Vs(t)}function Gs(t){this._context=t}Gs.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 r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:yi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Df(t){return new Gs(t)}function Ks(t,e){this._basis=new $i(t),this._beta=e}Ks.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],o=e[0],a=t[r]-i,n=e[r]-o,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+l*a),this._beta*e[s]+(1-this._beta)*(o+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const $f=(function t(e){function r(i){return e===1?new $i(i):new Ks(i,e)}return r.beta=function(i){return t(+i)},r})(.85);function bi(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function sn(t,e){this._context=t,this._k=(1-e)/6}sn.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:bi(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:bi(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 r(i){return new sn(i,e)}return r.tension=function(i){return t(+i)},r})(0);function ln(t,e){this._context=t,this._k=(1-e)/6}ln.prototype={areaStart:de,areaEnd:de,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:bi(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 Rf=(function t(e){function r(i){return new ln(i,e)}return r.tension=function(i){return t(+i)},r})(0);function hn(t,e){this._context=t,this._k=(1-e)/6}hn.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:bi(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 Pf=(function t(e){function r(i){return new hn(i,e)}return r.tension=function(i){return t(+i)},r})(0);function cn(t,e,r){var i=t._x1,o=t._y1,a=t._x2,n=t._y2;if(t._l01_a>ga){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>ga){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);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/u,n=(n*h+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(i,o,a,n,t._x2,t._y2)}function Zs(t,e){this._context=t,this._alpha=e}Zs.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 r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:cn(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 r(i){return e?new Zs(i,e):new sn(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function Js(t,e){this._context=t,this._alpha=e}Js.prototype={areaStart:de,areaEnd:de,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 r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:cn(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 Wf=(function t(e){function r(i){return e?new Js(i,e):new ln(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function Qs(t,e){this._context=t,this._alpha=e}Qs.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 r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cn(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 Hf=(function t(e){function r(i){return e?new Qs(i,e):new hn(i,0)}return r.alpha=function(i){return t(+i)},r})(.5);function tl(t){this._context=t}tl.prototype={areaStart:de,areaEnd:de,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 Yf(t){return new tl(t)}function ya(t){return t<0?-1:1}function ba(t,e,r){var i=t._x1-t._x0,o=e-t._x1,a=(t._y1-t._y0)/(i||o<0&&-0),n=(r-t._y1)/(o||i<0&&-0),s=(a*o+n*i)/(i+o);return(ya(a)+ya(n))*Math.min(Math.abs(a),Math.abs(n),.5*Math.abs(s))||0}function _a(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function uo(t,e,r){var i=t._x0,o=t._y0,a=t._x1,n=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,o+s*e,a-s,n-s*r,a,n)}function _i(t){this._context=t}_i.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:uo(this,this._t0,_a(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 r=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,uo(this,_a(this,r=ba(this,t,e)),r);break;default:uo(this,this._t0,r=ba(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function el(t){this._context=new rl(t)}(el.prototype=Object.create(_i.prototype)).point=function(t,e){_i.prototype.point.call(this,e,t)};function rl(t){this._context=t}rl.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,a){this._context.bezierCurveTo(e,t,i,r,a,o)}};function Uf(t){return new _i(t)}function Xf(t){return new el(t)}function il(t){this._context=t}il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=Ca(t),o=Ca(e),a=0,n=1;n<r;++a,++n)this._context.bezierCurveTo(i[0][a],o[0][a],i[1][a],o[1][a],t[n],e[n]);(this._line||this._line!==0&&r===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 Ca(t){var e,r=t.length-1,i,o=new Array(r),a=new Array(r),n=new Array(r);for(o[0]=0,a[0]=2,n[0]=t[0]+2*t[1],e=1;e<r-1;++e)o[e]=1,a[e]=4,n[e]=4*t[e]+2*t[e+1];for(o[r-1]=2,a[r-1]=7,n[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=o[e]/a[e-1],a[e]-=i,n[e]-=i*n[e-1];for(o[r-1]=n[r-1]/a[r-1],e=r-2;e>=0;--e)o[e]=(n[e]-o[e+1])/a[e];for(a[r-1]=(t[r]+o[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-o[e+1];return[o,a]}function Vf(t){return new il(t)}function zi(t,e){this._context=t,this._t=e}zi.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 r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function Gf(t){return new zi(t,.5)}function Kf(t){return new zi(t,0)}function Zf(t){return new zi(t,1)}function gr(t,e,r){this.k=t,this.x=e,this.y=r}gr.prototype={constructor:gr,scale:function(t){return t===1?this:new gr(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new gr(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+")"}};gr.prototype;/*! @license DOMPurify 3.3.1 | (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.1/LICENSE */const{entries:ol,setPrototypeOf:xa,isFrozen:Jf,getPrototypeOf:Qf,getOwnPropertyDescriptor:tp}=Object;let{freeze:pt,seal:wt,create:No}=Object,{apply:qo,construct:Do}=typeof Reflect<"u"&&Reflect;pt||(pt=function(t){return t});wt||(wt=function(t){return t});qo||(qo=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(e,i)});Do||(Do=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)});const Kr=gt(Array.prototype.forEach),ep=gt(Array.prototype.lastIndexOf),ka=gt(Array.prototype.pop),ar=gt(Array.prototype.push),rp=gt(Array.prototype.splice),oi=gt(String.prototype.toLowerCase),fo=gt(String.prototype.toString),po=gt(String.prototype.match),sr=gt(String.prototype.replace),ip=gt(String.prototype.indexOf),op=gt(String.prototype.trim),Ot=gt(Object.prototype.hasOwnProperty),ut=gt(RegExp.prototype.test),lr=np(TypeError);function gt(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return qo(t,e,i)}}function np(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return Do(t,r)}}function W(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:oi;xa&&xa(t,null);let i=e.length;for(;i--;){let o=e[i];if(typeof o=="string"){const a=r(o);a!==o&&(Jf(e)||(e[i]=a),o=a)}t[o]=!0}return t}function ap(t){for(let e=0;e<t.length;e++)Ot(t,e)||(t[e]=null);return t}function $t(t){const e=No(null);for(const[r,i]of ol(t))Ot(t,r)&&(Array.isArray(i)?e[r]=ap(i):i&&typeof i=="object"&&i.constructor===Object?e[r]=$t(i):e[r]=i);return e}function hr(t,e){for(;t!==null;){const i=tp(t,e);if(i){if(i.get)return gt(i.get);if(typeof i.value=="function")return gt(i.value)}t=Qf(t)}function r(){return null}return r}const va=pt(["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"]),go=pt(["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"]),mo=pt(["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"]),sp=pt(["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"]),yo=pt(["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"]),lp=pt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ta=pt(["#text"]),wa=pt(["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"]),bo=pt(["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"]),Sa=pt(["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"]),Zr=pt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hp=wt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),cp=wt(/<%[\w\W]*|[\w\W]*%>/gm),up=wt(/\$\{[\w\W]*/gm),dp=wt(/^data-[\-\w.\u00B7-\uFFFF]+$/),fp=wt(/^aria-[\-\w]+$/),nl=wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pp=wt(/^(?:\w+script|data):/i),gp=wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),al=wt(/^html$/i),mp=wt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ba=Object.freeze({__proto__:null,ARIA_ATTR:fp,ATTR_WHITESPACE:gp,CUSTOM_ELEMENT:mp,DATA_ATTR:dp,DOCTYPE_NAME:al,ERB_EXPR:cp,IS_ALLOWED_URI:nl,IS_SCRIPT_OR_DATA:pp,MUSTACHE_EXPR:hp,TMPLIT_EXPR:up});const cr={element:1,text:3,progressingInstruction:7,comment:8,document:9},yp=function(){return typeof window>"u"?null:window},bp=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Aa=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function sl(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yp();const e=f=>sl(f);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==cr.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:n,Node:s,Element:l,NodeFilter:h,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:c,DOMParser:d,trustedTypes:p}=t,m=l.prototype,b=hr(m,"cloneNode"),x=hr(m,"remove"),E=hr(m,"nextSibling"),_=hr(m,"childNodes"),R=hr(m,"parentNode");if(typeof n=="function"){const f=r.createElement("template");f.content&&f.content.ownerDocument&&(r=f.content.ownerDocument)}let y,j="";const{implementation:U,createNodeIterator:N,createDocumentFragment:tt,getElementsByTagName:nt}=r,{importNode:P}=i;let B=Aa();e.isSupported=typeof ol=="function"&&typeof R=="function"&&U&&U.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:et,ERB_EXPR:ne,TMPLIT_EXPR:M,DATA_ATTR:S,ARIA_ATTR:C,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:k,CUSTOM_ELEMENT:z}=Ba;let{IS_ALLOWED_URI:$}=Ba,D=null;const G=W({},[...va,...go,...mo,...yo,...Ta]);let H=null;const rt=W({},[...wa,...bo,...Sa,...Zr]);let Y=Object.seal(No(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}})),xt=null,Bt=null;const kt=Object.seal(No(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let qt=!0,ot=!0,At=!1,ae=!0,Lt=!1,zr=!0,ge=!1,Qi=!1,to=!1,Fe=!1,Rr=!1,Pr=!1,Mn=!0,Nn=!1;const Ph="user-content-";let eo=!0,rr=!1,Ee={},Dt=null;const ro=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 qn=null;const Dn=W({},["audio","video","img","source","image","track"]);let io=null;const $n=W({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),jr="http://www.w3.org/1998/Math/MathML",Wr="http://www.w3.org/2000/svg",Vt="http://www.w3.org/1999/xhtml";let Oe=Vt,oo=!1,no=null;const jh=W({},[jr,Wr,Vt],fo);let Hr=W({},["mi","mo","mn","ms","mtext"]),Yr=W({},["annotation-xml"]);const Wh=W({},["title","style","font","a","script"]);let ir=null;const Hh=["application/xhtml+xml","text/html"],Yh="text/html";let it=null,Ie=null;const Uh=r.createElement("form"),zn=function(f){return f instanceof RegExp||f instanceof Function},ao=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ie&&Ie===f)){if((!f||typeof f!="object")&&(f={}),f=$t(f),ir=Hh.indexOf(f.PARSER_MEDIA_TYPE)===-1?Yh:f.PARSER_MEDIA_TYPE,it=ir==="application/xhtml+xml"?fo:oi,D=Ot(f,"ALLOWED_TAGS")?W({},f.ALLOWED_TAGS,it):G,H=Ot(f,"ALLOWED_ATTR")?W({},f.ALLOWED_ATTR,it):rt,no=Ot(f,"ALLOWED_NAMESPACES")?W({},f.ALLOWED_NAMESPACES,fo):jh,io=Ot(f,"ADD_URI_SAFE_ATTR")?W($t($n),f.ADD_URI_SAFE_ATTR,it):$n,qn=Ot(f,"ADD_DATA_URI_TAGS")?W($t(Dn),f.ADD_DATA_URI_TAGS,it):Dn,Dt=Ot(f,"FORBID_CONTENTS")?W({},f.FORBID_CONTENTS,it):ro,xt=Ot(f,"FORBID_TAGS")?W({},f.FORBID_TAGS,it):$t({}),Bt=Ot(f,"FORBID_ATTR")?W({},f.FORBID_ATTR,it):$t({}),Ee=Ot(f,"USE_PROFILES")?f.USE_PROFILES:!1,qt=f.ALLOW_ARIA_ATTR!==!1,ot=f.ALLOW_DATA_ATTR!==!1,At=f.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Lt=f.SAFE_FOR_TEMPLATES||!1,zr=f.SAFE_FOR_XML!==!1,ge=f.WHOLE_DOCUMENT||!1,Fe=f.RETURN_DOM||!1,Rr=f.RETURN_DOM_FRAGMENT||!1,Pr=f.RETURN_TRUSTED_TYPE||!1,to=f.FORCE_BODY||!1,Mn=f.SANITIZE_DOM!==!1,Nn=f.SANITIZE_NAMED_PROPS||!1,eo=f.KEEP_CONTENT!==!1,rr=f.IN_PLACE||!1,$=f.ALLOWED_URI_REGEXP||nl,Oe=f.NAMESPACE||Vt,Hr=f.MATHML_TEXT_INTEGRATION_POINTS||Hr,Yr=f.HTML_INTEGRATION_POINTS||Yr,Y=f.CUSTOM_ELEMENT_HANDLING||{},f.CUSTOM_ELEMENT_HANDLING&&zn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=f.CUSTOM_ELEMENT_HANDLING.tagNameCheck),f.CUSTOM_ELEMENT_HANDLING&&zn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Y.allowCustomizedBuiltInElements=f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Lt&&(ot=!1),Rr&&(Fe=!0),Ee&&(D=W({},Ta),H=[],Ee.html===!0&&(W(D,va),W(H,wa)),Ee.svg===!0&&(W(D,go),W(H,bo),W(H,Zr)),Ee.svgFilters===!0&&(W(D,mo),W(H,bo),W(H,Zr)),Ee.mathMl===!0&&(W(D,yo),W(H,Sa),W(H,Zr))),f.ADD_TAGS&&(typeof f.ADD_TAGS=="function"?kt.tagCheck=f.ADD_TAGS:(D===G&&(D=$t(D)),W(D,f.ADD_TAGS,it))),f.ADD_ATTR&&(typeof f.ADD_ATTR=="function"?kt.attributeCheck=f.ADD_ATTR:(H===rt&&(H=$t(H)),W(H,f.ADD_ATTR,it))),f.ADD_URI_SAFE_ATTR&&W(io,f.ADD_URI_SAFE_ATTR,it),f.FORBID_CONTENTS&&(Dt===ro&&(Dt=$t(Dt)),W(Dt,f.FORBID_CONTENTS,it)),f.ADD_FORBID_CONTENTS&&(Dt===ro&&(Dt=$t(Dt)),W(Dt,f.ADD_FORBID_CONTENTS,it)),eo&&(D["#text"]=!0),ge&&W(D,["html","head","body"]),D.table&&(W(D,["tbody"]),delete xt.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw lr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw lr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=f.TRUSTED_TYPES_POLICY,j=y.createHTML("")}else y===void 0&&(y=bp(p,o)),y!==null&&typeof j=="string"&&(j=y.createHTML(""));pt&&pt(f),Ie=f}},Rn=W({},[...go,...mo,...sp]),Pn=W({},[...yo,...lp]),Xh=function(f){let w=R(f);(!w||!w.tagName)&&(w={namespaceURI:Oe,tagName:"template"});const v=oi(f.tagName),X=oi(w.tagName);return no[f.namespaceURI]?f.namespaceURI===Wr?w.namespaceURI===Vt?v==="svg":w.namespaceURI===jr?v==="svg"&&(X==="annotation-xml"||Hr[X]):!!Rn[v]:f.namespaceURI===jr?w.namespaceURI===Vt?v==="math":w.namespaceURI===Wr?v==="math"&&Yr[X]:!!Pn[v]:f.namespaceURI===Vt?w.namespaceURI===Wr&&!Yr[X]||w.namespaceURI===jr&&!Hr[X]?!1:!Pn[v]&&(Wh[v]||!Rn[v]):!!(ir==="application/xhtml+xml"&&no[f.namespaceURI]):!1},me=function(f){ar(e.removed,{element:f});try{R(f).removeChild(f)}catch{x(f)}},ye=function(f,w){try{ar(e.removed,{attribute:w.getAttributeNode(f),from:w})}catch{ar(e.removed,{attribute:null,from:w})}if(w.removeAttribute(f),f==="is")if(Fe||Rr)try{me(w)}catch{}else try{w.setAttribute(f,"")}catch{}},jn=function(f){let w=null,v=null;if(to)f="<remove></remove>"+f;else{const K=po(f,/^[\r\n\t ]+/);v=K&&K[0]}ir==="application/xhtml+xml"&&Oe===Vt&&(f='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+f+"</body></html>");const X=y?y.createHTML(f):f;if(Oe===Vt)try{w=new d().parseFromString(X,ir)}catch{}if(!w||!w.documentElement){w=U.createDocument(Oe,"template",null);try{w.documentElement.innerHTML=oo?j:X}catch{}}const at=w.body||w.documentElement;return f&&v&&at.insertBefore(r.createTextNode(v),at.childNodes[0]||null),Oe===Vt?nt.call(w,ge?"html":"body")[0]:ge?w.documentElement:at},Wn=function(f){return N.call(f.ownerDocument||f,f,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},so=function(f){return f instanceof c&&(typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||!(f.attributes instanceof u)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function")},Hn=function(f){return typeof s=="function"&&f instanceof s};function Gt(f,w,v){Kr(f,X=>{X.call(e,w,v,Ie)})}const Yn=function(f){let w=null;if(Gt(B.beforeSanitizeElements,f,null),so(f))return me(f),!0;const v=it(f.nodeName);if(Gt(B.uponSanitizeElement,f,{tagName:v,allowedTags:D}),zr&&f.hasChildNodes()&&!Hn(f.firstElementChild)&&ut(/<[/\w!]/g,f.innerHTML)&&ut(/<[/\w!]/g,f.textContent)||f.nodeType===cr.progressingInstruction||zr&&f.nodeType===cr.comment&&ut(/<[/\w]/g,f.data))return me(f),!0;if(!(kt.tagCheck instanceof Function&&kt.tagCheck(v))&&(!D[v]||xt[v])){if(!xt[v]&&Xn(v)&&(Y.tagNameCheck instanceof RegExp&&ut(Y.tagNameCheck,v)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(v)))return!1;if(eo&&!Dt[v]){const X=R(f)||f.parentNode,at=_(f)||f.childNodes;if(at&&X){const K=at.length;for(let Kt=K-1;Kt>=0;--Kt){const Ft=b(at[Kt],!0);Ft.__removalCount=(f.__removalCount||0)+1,X.insertBefore(Ft,E(f))}}}return me(f),!0}return f instanceof l&&!Xh(f)||(v==="noscript"||v==="noembed"||v==="noframes")&&ut(/<\/no(script|embed|frames)/i,f.innerHTML)?(me(f),!0):(Lt&&f.nodeType===cr.text&&(w=f.textContent,Kr([et,ne,M],X=>{w=sr(w,X," ")}),f.textContent!==w&&(ar(e.removed,{element:f.cloneNode()}),f.textContent=w)),Gt(B.afterSanitizeElements,f,null),!1)},Un=function(f,w,v){if(Mn&&(w==="id"||w==="name")&&(v in r||v in Uh))return!1;if(!(ot&&!Bt[w]&&ut(S,w))&&!(qt&&ut(C,w))&&!(kt.attributeCheck instanceof Function&&kt.attributeCheck(w,f))){if(!H[w]||Bt[w]){if(!(Xn(f)&&(Y.tagNameCheck instanceof RegExp&&ut(Y.tagNameCheck,f)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(f))&&(Y.attributeNameCheck instanceof RegExp&&ut(Y.attributeNameCheck,w)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(w,f))||w==="is"&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&ut(Y.tagNameCheck,v)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(v))))return!1}else if(!io[w]&&!ut($,sr(v,k,""))&&!((w==="src"||w==="xlink:href"||w==="href")&&f!=="script"&&ip(v,"data:")===0&&qn[f])&&!(At&&!ut(A,sr(v,k,"")))&&v)return!1}return!0},Xn=function(f){return f!=="annotation-xml"&&po(f,z)},Vn=function(f){Gt(B.beforeSanitizeAttributes,f,null);const{attributes:w}=f;if(!w||so(f))return;const v={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let X=w.length;for(;X--;){const at=w[X],{name:K,namespaceURI:Kt,value:Ft}=at,Et=it(K),lo=Ft;let st=K==="value"?lo:op(lo);if(v.attrName=Et,v.attrValue=st,v.keepAttr=!0,v.forceKeepAttr=void 0,Gt(B.uponSanitizeAttribute,f,v),st=v.attrValue,Nn&&(Et==="id"||Et==="name")&&(ye(K,f),st=Ph+st),zr&&ut(/((--!?|])>)|<\/(style|title|textarea)/i,st)){ye(K,f);continue}if(Et==="attributename"&&po(st,"href")){ye(K,f);continue}if(v.forceKeepAttr)continue;if(!v.keepAttr){ye(K,f);continue}if(!ae&&ut(/\/>/i,st)){ye(K,f);continue}Lt&&Kr([et,ne,M],Gh=>{st=sr(st,Gh," ")});const Gn=it(f.nodeName);if(!Un(Gn,Et,st)){ye(K,f);continue}if(y&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Kt)switch(p.getAttributeType(Gn,Et)){case"TrustedHTML":{st=y.createHTML(st);break}case"TrustedScriptURL":{st=y.createScriptURL(st);break}}if(st!==lo)try{Kt?f.setAttributeNS(Kt,K,st):f.setAttribute(K,st),so(f)?me(f):ka(e.removed)}catch{ye(K,f)}}Gt(B.afterSanitizeAttributes,f,null)},Vh=function f(w){let v=null;const X=Wn(w);for(Gt(B.beforeSanitizeShadowDOM,w,null);v=X.nextNode();)Gt(B.uponSanitizeShadowNode,v,null),Yn(v),Vn(v),v.content instanceof a&&f(v.content);Gt(B.afterSanitizeShadowDOM,w,null)};return e.sanitize=function(f){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=null,X=null,at=null,K=null;if(oo=!f,oo&&(f="<!-->"),typeof f!="string"&&!Hn(f))if(typeof f.toString=="function"){if(f=f.toString(),typeof f!="string")throw lr("dirty is not a string, aborting")}else throw lr("toString is not a function");if(!e.isSupported)return f;if(Qi||ao(w),e.removed=[],typeof f=="string"&&(rr=!1),rr){if(f.nodeName){const Et=it(f.nodeName);if(!D[Et]||xt[Et])throw lr("root node is forbidden and cannot be sanitized in-place")}}else if(f instanceof s)v=jn("<!---->"),X=v.ownerDocument.importNode(f,!0),X.nodeType===cr.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?v=X:v.appendChild(X);else{if(!Fe&&!Lt&&!ge&&f.indexOf("<")===-1)return y&&Pr?y.createHTML(f):f;if(v=jn(f),!v)return Fe?null:Pr?j:""}v&&to&&me(v.firstChild);const Kt=Wn(rr?f:v);for(;at=Kt.nextNode();)Yn(at),Vn(at),at.content instanceof a&&Vh(at.content);if(rr)return f;if(Fe){if(Rr)for(K=tt.call(v.ownerDocument);v.firstChild;)K.appendChild(v.firstChild);else K=v;return(H.shadowroot||H.shadowrootmode)&&(K=P.call(i,K,!0)),K}let Ft=ge?v.outerHTML:v.innerHTML;return ge&&D["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&ut(al,v.ownerDocument.doctype.name)&&(Ft="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
`+Ft),Lt&&Kr([et,ne,M],Et=>{Ft=sr(Ft,Et," ")}),y&&Pr?y.createHTML(Ft):Ft},e.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ao(f),Qi=!0},e.clearConfig=function(){Ie=null,Qi=!1},e.isValidAttribute=function(f,w,v){Ie||ao({});const X=it(f),at=it(w);return Un(X,at,v)},e.addHook=function(f,w){typeof w=="function"&&ar(B[f],w)},e.removeHook=function(f,w){if(w!==void 0){const v=ep(B[f],w);return v===-1?void 0:rp(B[f],v,1)[0]}return ka(B[f])},e.removeHooks=function(f){B[f]=[]},e.removeAllHooks=function(){B=Aa()},e}var He=sl();const ni={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const o=r<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(i){case"r":return ni.hue2rgb(a,o,t+1/3)*255;case"g":return ni.hue2rgb(a,o,t)*255;case"b":return ni.hue2rgb(a,o,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),a=Math.min(t,e,r),n=(o+a)/2;if(i==="l")return n*100;if(o===a)return 0;const s=o-a,l=n>.5?s/(2-o-a):s/(o+a);if(i==="s")return l*100;switch(o){case t:return((e-r)/s+(e<r?6:0))*60;case e:return((r-t)/s+2)*60;case r:return((t-e)/s+4)*60;default:return-1}}},_p={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Cp={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},q={channel:ni,lang:_p,unit:Cp},le={};for(let t=0;t<=255;t++)le[t]=q.unit.dec2hex(t);const lt={ALL:0,RGB:1,HSL:2};class xp{constructor(){this.type=lt.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=lt.ALL}is(e){return this.type===e}}class kp{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new xp}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=lt.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:o}=e;r===void 0&&(e.h=q.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=q.channel.rgb2hsl(e,"s")),o===void 0&&(e.l=q.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:o}=e;r===void 0&&(e.r=q.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=q.channel.hsl2rgb(e,"g")),o===void 0&&(e.b=q.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(lt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(lt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(lt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(lt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(lt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(lt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(lt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(lt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(lt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(lt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(lt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(lt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Ri=new kp({r:0,g:0,b:0,a:0},"transparent"),ze={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(ze.re);if(!e)return;const r=e[1],i=parseInt(r,16),o=r.length,a=o%4===0,n=o>4,s=n?1:17,l=n?8:4,h=a?0:-1,u=n?255:15;return Ri.set({r:(i>>l*(h+3)&u)*s,g:(i>>l*(h+2)&u)*s,b:(i>>l*(h+1)&u)*s,a:a?(i&u)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${le[Math.round(e)]}${le[Math.round(r)]}${le[Math.round(i)]}${le[Math.round(o*255)]}`:`#${le[Math.round(e)]}${le[Math.round(r)]}${le[Math.round(i)]}`}},xe={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(xe.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return q.channel.clamp.h(parseFloat(r)*.9);case"rad":return q.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return q.channel.clamp.h(parseFloat(r)*360)}}return q.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(xe.re);if(!r)return;const[,i,o,a,n,s]=r;return Ri.set({h:xe._hue2deg(i),s:q.channel.clamp.s(parseFloat(o)),l:q.channel.clamp.l(parseFloat(a)),a:n?q.channel.clamp.a(s?parseFloat(n)/100:parseFloat(n)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${q.lang.round(e)}, ${q.lang.round(r)}%, ${q.lang.round(i)}%, ${o})`:`hsl(${q.lang.round(e)}, ${q.lang.round(r)}%, ${q.lang.round(i)}%)`}},br={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=br.colors[t];if(e)return ze.parse(e)},stringify:t=>{const e=ze.stringify(t);for(const r in br.colors)if(br.colors[r]===e)return r}},mr={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 r=t.match(mr.re);if(!r)return;const[,i,o,a,n,s,l,h,u]=r;return Ri.set({r:q.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:q.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:q.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:h?q.channel.clamp.a(u?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${q.lang.round(e)}, ${q.lang.round(r)}, ${q.lang.round(i)}, ${q.lang.round(o)})`:`rgb(${q.lang.round(e)}, ${q.lang.round(r)}, ${q.lang.round(i)})`}},Wt={format:{keyword:br,hex:ze,rgb:mr,rgba:mr,hsl:xe,hsla:xe},parse:t=>{if(typeof t!="string")return t;const e=ze.parse(t)||mr.parse(t)||xe.parse(t)||br.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(lt.HSL)||t.data.r===void 0?xe.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?mr.stringify(t):ze.stringify(t)},ll=(t,e)=>{const r=Wt.parse(t);for(const i in e)r[i]=q.channel.clamp[i](e[i]);return Wt.stringify(r)},_r=(t,e,r=0,i=1)=>{if(typeof t!="number")return ll(t,{a:e});const o=Ri.set({r:q.channel.clamp.r(t),g:q.channel.clamp.g(e),b:q.channel.clamp.b(r),a:q.channel.clamp.a(i)});return Wt.stringify(o)},vp=t=>{const{r:e,g:r,b:i}=Wt.parse(t),o=.2126*q.channel.toLinear(e)+.7152*q.channel.toLinear(r)+.0722*q.channel.toLinear(i);return q.lang.round(o)},Tp=t=>vp(t)>=.5,Nr=t=>!Tp(t),hl=(t,e,r)=>{const i=Wt.parse(t),o=i[e],a=q.channel.clamp[e](o+r);return o!==a&&(i[e]=a),Wt.stringify(i)},L=(t,e)=>hl(t,"l",e),I=(t,e)=>hl(t,"l",-e),g=(t,e)=>{const r=Wt.parse(t),i={};for(const o in e)e[o]&&(i[o]=r[o]+e[o]);return ll(t,i)},wp=(t,e,r=50)=>{const{r:i,g:o,b:a,a:n}=Wt.parse(t),{r:s,g:l,b:h,a:u}=Wt.parse(e),c=r/100,d=c*2-1,p=n-u,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,b=1-m,x=i*m+s*b,E=o*m+l*b,_=a*m+h*b,R=n*c+u*(1-c);return _r(x,E,_,R)},T=(t,e=100)=>{const r=Wt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,wp(r,t,e)};var cl=typeof global=="object"&&global&&global.Object===Object&&global,Sp=typeof self=="object"&&self&&self.Object===Object&&self,Xt=cl||Sp||Function("return this")(),Ci=Xt.Symbol,ul=Object.prototype,Bp=ul.hasOwnProperty,Ap=ul.toString,ur=Ci?Ci.toStringTag:void 0;function Lp(t){var e=Bp.call(t,ur),r=t[ur];try{t[ur]=void 0;var i=!0}catch{}var o=Ap.call(t);return i&&(e?t[ur]=r:delete t[ur]),o}var Fp=Object.prototype,Ep=Fp.toString;function Op(t){return Ep.call(t)}var Ip="[object Null]",Mp="[object Undefined]",La=Ci?Ci.toStringTag:void 0;function Je(t){return t==null?t===void 0?Mp:Ip:La&&La in Object(t)?Lp(t):Op(t)}function Be(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Np="[object AsyncFunction]",qp="[object Function]",Dp="[object GeneratorFunction]",$p="[object Proxy]";function un(t){if(!Be(t))return!1;var e=Je(t);return e==qp||e==Dp||e==Np||e==$p}var _o=Xt["__core-js_shared__"],Fa=(function(){var t=/[^.]+$/.exec(_o&&_o.keys&&_o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function zp(t){return!!Fa&&Fa in t}var Rp=Function.prototype,Pp=Rp.toString;function Ae(t){if(t!=null){try{return Pp.call(t)}catch{}try{return t+""}catch{}}return""}var jp=/[\\^$.*+?()[\]{}|]/g,Wp=/^\[object .+?Constructor\]$/,Hp=Function.prototype,Yp=Object.prototype,Up=Hp.toString,Xp=Yp.hasOwnProperty,Vp=RegExp("^"+Up.call(Xp).replace(jp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gp(t){if(!Be(t)||zp(t))return!1;var e=un(t)?Vp:Wp;return e.test(Ae(t))}function Kp(t,e){return t==null?void 0:t[e]}function Le(t,e){var r=Kp(t,e);return Gp(r)?r:void 0}var Ar=Le(Object,"create");function Zp(){this.__data__=Ar?Ar(null):{},this.size=0}function Jp(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Qp="__lodash_hash_undefined__",tg=Object.prototype,eg=tg.hasOwnProperty;function rg(t){var e=this.__data__;if(Ar){var r=e[t];return r===Qp?void 0:r}return eg.call(e,t)?e[t]:void 0}var ig=Object.prototype,og=ig.hasOwnProperty;function ng(t){var e=this.__data__;return Ar?e[t]!==void 0:og.call(e,t)}var ag="__lodash_hash_undefined__";function sg(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ar&&e===void 0?ag:e,this}function we(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}we.prototype.clear=Zp;we.prototype.delete=Jp;we.prototype.get=rg;we.prototype.has=ng;we.prototype.set=sg;function lg(){this.__data__=[],this.size=0}function Pi(t,e){return t===e||t!==t&&e!==e}function ji(t,e){for(var r=t.length;r--;)if(Pi(t[r][0],e))return r;return-1}var hg=Array.prototype,cg=hg.splice;function ug(t){var e=this.__data__,r=ji(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():cg.call(e,r,1),--this.size,!0}function dg(t){var e=this.__data__,r=ji(e,t);return r<0?void 0:e[r][1]}function fg(t){return ji(this.__data__,t)>-1}function pg(t,e){var r=this.__data__,i=ji(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function oe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}oe.prototype.clear=lg;oe.prototype.delete=ug;oe.prototype.get=dg;oe.prototype.has=fg;oe.prototype.set=pg;var Lr=Le(Xt,"Map");function gg(){this.size=0,this.__data__={hash:new we,map:new(Lr||oe),string:new we}}function mg(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Wi(t,e){var r=t.__data__;return mg(e)?r[typeof e=="string"?"string":"hash"]:r.map}function yg(t){var e=Wi(this,t).delete(t);return this.size-=e?1:0,e}function bg(t){return Wi(this,t).get(t)}function _g(t){return Wi(this,t).has(t)}function Cg(t,e){var r=Wi(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function pe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}pe.prototype.clear=gg;pe.prototype.delete=yg;pe.prototype.get=bg;pe.prototype.has=_g;pe.prototype.set=Cg;var xg="Expected a function";function qr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(xg);var r=function(){var i=arguments,o=e?e.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);var n=t.apply(this,i);return r.cache=a.set(o,n)||a,n};return r.cache=new(qr.Cache||pe),r}qr.Cache=pe;function kg(){this.__data__=new oe,this.size=0}function vg(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Tg(t){return this.__data__.get(t)}function wg(t){return this.__data__.has(t)}var Sg=200;function Bg(t,e){var r=this.__data__;if(r instanceof oe){var i=r.__data__;if(!Lr||i.length<Sg-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new pe(i)}return r.set(t,e),this.size=r.size,this}function Qe(t){var e=this.__data__=new oe(t);this.size=e.size}Qe.prototype.clear=kg;Qe.prototype.delete=vg;Qe.prototype.get=Tg;Qe.prototype.has=wg;Qe.prototype.set=Bg;var xi=(function(){try{var t=Le(Object,"defineProperty");return t({},"",{}),t}catch{}})();function dn(t,e,r){e=="__proto__"&&xi?xi(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function $o(t,e,r){(r!==void 0&&!Pi(t[e],r)||r===void 0&&!(e in t))&&dn(t,e,r)}function Ag(t){return function(e,r,i){for(var o=-1,a=Object(e),n=i(e),s=n.length;s--;){var l=n[++o];if(r(a[l],l,a)===!1)break}return e}}var Lg=Ag(),dl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ea=dl&&typeof module=="object"&&module&&!module.nodeType&&module,Fg=Ea&&Ea.exports===dl,Oa=Fg?Xt.Buffer:void 0,Ia=Oa?Oa.allocUnsafe:void 0;function Eg(t,e){if(e)return t.slice();var r=t.length,i=Ia?Ia(r):new t.constructor(r);return t.copy(i),i}var Ma=Xt.Uint8Array;function Og(t){var e=new t.constructor(t.byteLength);return new Ma(e).set(new Ma(t)),e}function Ig(t,e){var r=e?Og(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Mg(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var Na=Object.create,Ng=(function(){function t(){}return function(e){if(!Be(e))return{};if(Na)return Na(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();function fl(t,e){return function(r){return t(e(r))}}var pl=fl(Object.getPrototypeOf,Object),qg=Object.prototype;function Hi(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||qg;return t===r}function Dg(t){return typeof t.constructor=="function"&&!Hi(t)?Ng(pl(t)):{}}function Dr(t){return t!=null&&typeof t=="object"}var $g="[object Arguments]";function qa(t){return Dr(t)&&Je(t)==$g}var gl=Object.prototype,zg=gl.hasOwnProperty,Rg=gl.propertyIsEnumerable,ki=qa((function(){return arguments})())?qa:function(t){return Dr(t)&&zg.call(t,"callee")&&!Rg.call(t,"callee")},vi=Array.isArray,Pg=9007199254740991;function ml(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Pg}function Yi(t){return t!=null&&ml(t.length)&&!un(t)}function jg(t){return Dr(t)&&Yi(t)}function Wg(){return!1}var yl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Da=yl&&typeof module=="object"&&module&&!module.nodeType&&module,Hg=Da&&Da.exports===yl,$a=Hg?Xt.Buffer:void 0,Yg=$a?$a.isBuffer:void 0,fn=Yg||Wg,Ug="[object Object]",Xg=Function.prototype,Vg=Object.prototype,bl=Xg.toString,Gg=Vg.hasOwnProperty,Kg=bl.call(Object);function Zg(t){if(!Dr(t)||Je(t)!=Ug)return!1;var e=pl(t);if(e===null)return!0;var r=Gg.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&bl.call(r)==Kg}var Jg="[object Arguments]",Qg="[object Array]",tm="[object Boolean]",em="[object Date]",rm="[object Error]",im="[object Function]",om="[object Map]",nm="[object Number]",am="[object Object]",sm="[object RegExp]",lm="[object Set]",hm="[object String]",cm="[object WeakMap]",um="[object ArrayBuffer]",dm="[object DataView]",fm="[object Float32Array]",pm="[object Float64Array]",gm="[object Int8Array]",mm="[object Int16Array]",ym="[object Int32Array]",bm="[object Uint8Array]",_m="[object Uint8ClampedArray]",Cm="[object Uint16Array]",xm="[object Uint32Array]",V={};V[fm]=V[pm]=V[gm]=V[mm]=V[ym]=V[bm]=V[_m]=V[Cm]=V[xm]=!0;V[Jg]=V[Qg]=V[um]=V[tm]=V[dm]=V[em]=V[rm]=V[im]=V[om]=V[nm]=V[am]=V[sm]=V[lm]=V[hm]=V[cm]=!1;function km(t){return Dr(t)&&ml(t.length)&&!!V[Je(t)]}function vm(t){return function(e){return t(e)}}var _l=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cr=_l&&typeof module=="object"&&module&&!module.nodeType&&module,Tm=Cr&&Cr.exports===_l,Co=Tm&&cl.process,za=(function(){try{var t=Cr&&Cr.require&&Cr.require("util").types;return t||Co&&Co.binding&&Co.binding("util")}catch{}})(),Ra=za&&za.isTypedArray,pn=Ra?vm(Ra):km;function zo(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var wm=Object.prototype,Sm=wm.hasOwnProperty;function Bm(t,e,r){var i=t[e];(!(Sm.call(t,e)&&Pi(i,r))||r===void 0&&!(e in t))&&dn(t,e,r)}function Am(t,e,r,i){var o=!r;r||(r={});for(var a=-1,n=e.length;++a<n;){var s=e[a],l=void 0;l===void 0&&(l=t[s]),o?dn(r,s,l):Bm(r,s,l)}return r}function Lm(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var Fm=9007199254740991,Em=/^(?:0|[1-9]\d*)$/;function Cl(t,e){var r=typeof t;return e=e??Fm,!!e&&(r=="number"||r!="symbol"&&Em.test(t))&&t>-1&&t%1==0&&t<e}var Om=Object.prototype,Im=Om.hasOwnProperty;function Mm(t,e){var r=vi(t),i=!r&&ki(t),o=!r&&!i&&fn(t),a=!r&&!i&&!o&&pn(t),n=r||i||o||a,s=n?Lm(t.length,String):[],l=s.length;for(var h in t)(e||Im.call(t,h))&&!(n&&(h=="length"||o&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Cl(h,l)))&&s.push(h);return s}function Nm(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var qm=Object.prototype,Dm=qm.hasOwnProperty;function $m(t){if(!Be(t))return Nm(t);var e=Hi(t),r=[];for(var i in t)i=="constructor"&&(e||!Dm.call(t,i))||r.push(i);return r}function xl(t){return Yi(t)?Mm(t,!0):$m(t)}function zm(t){return Am(t,xl(t))}function Rm(t,e,r,i,o,a,n){var s=zo(t,r),l=zo(e,r),h=n.get(l);if(h){$o(t,r,h);return}var u=a?a(s,l,r+"",t,e,n):void 0,c=u===void 0;if(c){var d=vi(l),p=!d&&fn(l),m=!d&&!p&&pn(l);u=l,d||p||m?vi(s)?u=s:jg(s)?u=Mg(s):p?(c=!1,u=Eg(l,!0)):m?(c=!1,u=Ig(l,!0)):u=[]:Zg(l)||ki(l)?(u=s,ki(s)?u=zm(s):(!Be(s)||un(s))&&(u=Dg(l))):c=!1}c&&(n.set(l,u),o(u,l,i,a,n),n.delete(l)),$o(t,r,u)}function kl(t,e,r,i,o){t!==e&&Lg(e,function(a,n){if(o||(o=new Qe),Be(a))Rm(t,e,n,r,kl,i,o);else{var s=i?i(zo(t,n),a,n+"",t,e,o):void 0;s===void 0&&(s=a),$o(t,n,s)}},xl)}function vl(t){return t}function Pm(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Pa=Math.max;function jm(t,e,r){return e=Pa(e===void 0?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Pa(i.length-e,0),n=Array(a);++o<a;)n[o]=i[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=i[o];return s[e]=r(n),Pm(t,this,s)}}function Wm(t){return function(){return t}}var Hm=xi?function(t,e){return xi(t,"toString",{configurable:!0,enumerable:!1,value:Wm(e),writable:!0})}:vl,Ym=800,Um=16,Xm=Date.now;function Vm(t){var e=0,r=0;return function(){var i=Xm(),o=Um-(i-r);if(r=i,o>0){if(++e>=Ym)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Gm=Vm(Hm);function Km(t,e){return Gm(jm(t,e,vl),t+"")}function Zm(t,e,r){if(!Be(r))return!1;var i=typeof e;return(i=="number"?Yi(r)&&Cl(e,r.length):i=="string"&&e in r)?Pi(r[e],t):!1}function Jm(t){return Km(function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:void 0,n=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,n&&Zm(r[0],r[1],n)&&(a=o<3?void 0:a,o=1),e=Object(e);++i<o;){var s=r[i];s&&t(e,s,i,a)}return e})}var Qm=Jm(function(t,e,r){kl(t,e,r)}),Tl="comm",wl="rule",Sl="decl",ty="@import",ey="@namespace",ry="@keyframes",iy="@layer",Bl=Math.abs,gn=String.fromCharCode;function Al(t){return t.trim()}function ai(t,e,r){return t.replace(e,r)}function oy(t,e,r){return t.indexOf(e,r)}function Re(t,e){return t.charCodeAt(e)|0}function Ye(t,e,r){return t.slice(e,r)}function Rt(t){return t.length}function ny(t){return t.length}function Jr(t,e){return e.push(t),t}var Ui=1,Ue=1,Ll=0,St=0,J=0,tr="";function mn(t,e,r,i,o,a,n,s){return{value:t,root:e,parent:r,type:i,props:o,children:a,line:Ui,column:Ue,length:n,return:"",siblings:s}}function ay(){return J}function sy(){return J=St>0?Re(tr,--St):0,Ue--,J===10&&(Ue=1,Ui--),J}function Mt(){return J=St<Ll?Re(tr,St++):0,Ue++,J===10&&(Ue=1,Ui++),J}function ce(){return Re(tr,St)}function si(){return St}function Xi(t,e){return Ye(tr,t,e)}function Fr(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 ly(t){return Ui=Ue=1,Ll=Rt(tr=t),St=0,[]}function hy(t){return tr="",t}function xo(t){return Al(Xi(St-1,Ro(t===91?t+2:t===40?t+1:t)))}function cy(t){for(;(J=ce())&&J<33;)Mt();return Fr(t)>2||Fr(J)>3?"":" "}function uy(t,e){for(;--e&&Mt()&&!(J<48||J>102||J>57&&J<65||J>70&&J<97););return Xi(t,si()+(e<6&&ce()==32&&Mt()==32))}function Ro(t){for(;Mt();)switch(J){case t:return St;case 34:case 39:t!==34&&t!==39&&Ro(J);break;case 40:t===41&&Ro(t);break;case 92:Mt();break}return St}function dy(t,e){for(;Mt()&&t+J!==57&&!(t+J===84&&ce()===47););return"/*"+Xi(e,St-1)+"*"+gn(t===47?t:Mt())}function fy(t){for(;!Fr(ce());)Mt();return Xi(t,St)}function py(t){return hy(li("",null,null,null,[""],t=ly(t),0,[0],t))}function li(t,e,r,i,o,a,n,s,l){for(var h=0,u=0,c=n,d=0,p=0,m=0,b=1,x=1,E=1,_=0,R="",y=o,j=a,U=i,N=R;x;)switch(m=_,_=Mt()){case 40:if(m!=108&&Re(N,c-1)==58){oy(N+=ai(xo(_),"&","&\f"),"&\f",Bl(h?s[h-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:N+=xo(_);break;case 9:case 10:case 13:case 32:N+=cy(m);break;case 92:N+=uy(si()-1,7);continue;case 47:switch(ce()){case 42:case 47:Jr(gy(dy(Mt(),si()),e,r,l),l),(Fr(m||1)==5||Fr(ce()||1)==5)&&Rt(N)&&Ye(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/"}break;case 123*b:s[h++]=Rt(N)*E;case 125*b:case 59:case 0:switch(_){case 0:case 125:x=0;case 59+u:E==-1&&(N=ai(N,/\f/g,"")),p>0&&(Rt(N)-c||b===0&&m===47)&&Jr(p>32?Wa(N+";",i,r,c-1,l):Wa(ai(N," ","")+";",i,r,c-2,l),l);break;case 59:N+=";";default:if(Jr(U=ja(N,e,r,h,u,o,s,R,y=[],j=[],c,a),a),_===123)if(u===0)li(N,e,U,U,y,a,c,s,j);else{switch(d){case 99:if(Re(N,3)===110)break;case 108:if(Re(N,2)===97)break;default:u=0;case 100:case 109:case 115:}u?li(t,U,U,i&&Jr(ja(t,U,U,0,0,o,s,R,o,y=[],c,j),j),o,j,c,s,i?y:j):li(N,U,U,U,[""],j,0,s,j)}}h=u=p=0,b=E=1,R=N="",c=n;break;case 58:c=1+Rt(N),p=m;default:if(b<1){if(_==123)--b;else if(_==125&&b++==0&&sy()==125)continue}switch(N+=gn(_),_*b){case 38:E=u>0?1:(N+="\f",-1);break;case 44:s[h++]=(Rt(N)-1)*E,E=1;break;case 64:ce()===45&&(N+=xo(Mt())),d=ce(),u=c=Rt(R=N+=fy(si())),_++;break;case 45:m===45&&Rt(N)==2&&(b=0)}}return a}function ja(t,e,r,i,o,a,n,s,l,h,u,c){for(var d=o-1,p=o===0?a:[""],m=ny(p),b=0,x=0,E=0;b<i;++b)for(var _=0,R=Ye(t,d+1,d=Bl(x=n[b])),y=t;_<m;++_)(y=Al(x>0?p[_]+" "+R:ai(R,/&\f/g,p[_])))&&(l[E++]=y);return mn(t,e,r,o===0?wl:s,l,h,u,c)}function gy(t,e,r,i){return mn(t,e,r,Tl,gn(ay()),Ye(t,2,-2),0,i)}function Wa(t,e,r,i,o){return mn(t,e,r,Sl,Ye(t,0,i),Ye(t,i+1,-1),i,o)}function Po(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function my(t,e,r,i){switch(t.type){case iy:if(t.children.length)break;case ty:case ey:case Sl:return t.return=t.return||t.value;case Tl:return"";case ry:return t.return=t.value+"{"+Po(t.children,i)+"}";case wl:if(!Rt(t.value=t.props.join(",")))return""}return Rt(r=Po(t.children,i))?t.return=t.value+"{"+r+"}":""}var yy=fl(Object.keys,Object),by=Object.prototype,_y=by.hasOwnProperty;function Cy(t){if(!Hi(t))return yy(t);var e=[];for(var r in Object(t))_y.call(t,r)&&r!="constructor"&&e.push(r);return e}var jo=Le(Xt,"DataView"),Wo=Le(Xt,"Promise"),Ho=Le(Xt,"Set"),Yo=Le(Xt,"WeakMap"),Ha="[object Map]",xy="[object Object]",Ya="[object Promise]",Ua="[object Set]",Xa="[object WeakMap]",Va="[object DataView]",ky=Ae(jo),vy=Ae(Lr),Ty=Ae(Wo),wy=Ae(Ho),Sy=Ae(Yo),be=Je;(jo&&be(new jo(new ArrayBuffer(1)))!=Va||Lr&&be(new Lr)!=Ha||Wo&&be(Wo.resolve())!=Ya||Ho&&be(new Ho)!=Ua||Yo&&be(new Yo)!=Xa)&&(be=function(t){var e=Je(t),r=e==xy?t.constructor:void 0,i=r?Ae(r):"";if(i)switch(i){case ky:return Va;case vy:return Ha;case Ty:return Ya;case wy:return Ua;case Sy:return Xa}return e});var By="[object Map]",Ay="[object Set]",Ly=Object.prototype,Fy=Ly.hasOwnProperty;function ko(t){if(t==null)return!0;if(Yi(t)&&(vi(t)||typeof t=="string"||typeof t.splice=="function"||fn(t)||pn(t)||ki(t)))return!t.length;var e=be(t);if(e==By||e==Ay)return!t.size;if(Hi(t))return!Cy(t).length;for(var r in t)if(Fy.call(t,r))return!1;return!0}const Jt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},O={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},yn=function(t="fatal"){let e=Jt.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Jt&&(e=Jt[t])):typeof t=="number"&&(e=t),O.trace=()=>{},O.debug=()=>{},O.info=()=>{},O.warn=()=>{},O.error=()=>{},O.fatal=()=>{},e<=Jt.fatal&&(O.fatal=console.error?console.error.bind(console,vt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",vt("FATAL"))),e<=Jt.error&&(O.error=console.error?console.error.bind(console,vt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",vt("ERROR"))),e<=Jt.warn&&(O.warn=console.warn?console.warn.bind(console,vt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",vt("WARN"))),e<=Jt.info&&(O.info=console.info?console.info.bind(console,vt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",vt("INFO"))),e<=Jt.debug&&(O.debug=console.debug?console.debug.bind(console,vt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",vt("DEBUG"))),e<=Jt.trace&&(O.trace=console.debug?console.debug.bind(console,vt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",vt("TRACE")))},vt=t=>`%c${mc().format("ss.SSS")} : ${t} : `,$r=/<br\s*\/?>/gi,Ey=t=>t?El(t).replace(/\\n/g,"#br#").split("#br#"):[""],Oy=(()=>{let t=!1;return()=>{t||(Iy(),t=!0)}})();function Iy(){const t="data-temp-href-target";He.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),He.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 Fl=t=>(Oy(),He.sanitize(t)),Ga=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=Fl(t):i!=="loose"&&(t=El(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=Dy(t))}return t},Xe=(t,e)=>t&&(e.dompurifyConfig?t=He.sanitize(Ga(t,e),e.dompurifyConfig).toString():t=He.sanitize(Ga(t,e),{FORBID_TAGS:["style"]}).toString(),t),My=(t,e)=>typeof t=="string"?Xe(t,e):t.flat().map(r=>Xe(r,e)),Ny=t=>$r.test(t),qy=t=>t.split($r),Dy=t=>t.replace(/#br#/g,"<br/>"),El=t=>t.replace($r,"#br#"),$y=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())),zy=function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},Ry=function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},_k=function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let o=e[i];if(o===","&&i>0&&i+1<e.length){const a=e[i-1],n=e[i+1];Py(a,n)&&(o=a+","+n,i++,r.pop())}r.push(jy(o))}return r.join("")},Uo=(t,e)=>Math.max(0,t.split(e).length-1),Py=(t,e)=>{const r=Uo(t,"~"),i=Uo(e,"~");return r===1&&i===1},jy=t=>{const e=Uo(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),a=i.lastIndexOf("~");for(;o!==-1&&a!==-1&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},Ka=()=>window.MathMLElement!==void 0,Xo=/\$\$(.*)\$\$/g,Za=t=>{var e;return(((e=t.match(Xo))==null?void 0:e.length)??0)>0},Ck=async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Hy(t,e),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 o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},Wy=async(t,e)=>{if(!Za(t))return t;if(!Ka()&&!e.legacyMathML)return t.replace(Xo,"MathML is unsupported in this environment.");const{default:r}=await Z(async()=>{const{default:i}=await import("./layers.b9B2NY7n-eVDNDD-L.js");return{default:i}},[]);return t.split($r).map(i=>Za(i)?`
            <div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">
              ${i}
            </div>
          `:`<div>${i}</div>`).join("").replace(Xo,(i,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:Ka()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},Hy=async(t,e)=>Xe(await Wy(t,e),e),bn={getRows:Ey,sanitizeText:Xe,sanitizeTextOrArray:My,hasBreaks:Ny,splitBreaks:qy,lineBreakRegex:$r,removeScript:Fl,getUrl:$y,evaluate:Ol,getMax:zy,getMin:Ry},ft=(t,e)=>e?g(t,{s:-40,l:10}):g(t,{s:-40,l:-10}),Vi="#ffffff",Gi="#f2f2f2";let Yy=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 t,e,r,i,o,a,n,s,l,h,u;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||ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||T(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||T(this.tertiaryColor),this.lineColor=this.lineColor||T(this.background),this.arrowheadColor=this.arrowheadColor||T(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?I(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||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||T(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||L(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=I(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=I(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||T(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||L(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||I(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const c=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||g(this.mainBkg,{h:180,s:-15,l:c*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||g(this.mainBkg,{h:180,s:-15,l:c*(8+d*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||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):I(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:((e=this.xyChart)==null?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((s=this.xyChart)==null?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.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?I(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=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(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||Vi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Gi}calculate(t){if(typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}};const Uy=t=>{const e=new Yy;return e.calculate(t),e};let Xy=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=L(this.primaryColor,16),this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=T(this.background),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=L(T("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=_r(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=I("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=I(this.sectionBkgColor,10),this.taskBorderColor=_r(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=_r(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 t,e,r,i,o,a,n,s,l,h,u;this.secondBkg=L(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=L(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=L(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]||T(this["cScale"+c]);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScalePeer"+c]=this["cScalePeer"+c]||L(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||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):I(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:((e=this.xyChart)==null?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((s=this.xyChart)==null?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.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.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?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=L(this.secondaryColor,20),this.git1=L(this.pie2||this.secondaryColor,20),this.git2=L(this.pie3||this.tertiaryColor,20),this.git3=L(this.pie4||g(this.primaryColor,{h:-30}),20),this.git4=L(this.pie5||g(this.primaryColor,{h:-60}),20),this.git5=L(this.pie6||g(this.primaryColor,{h:-90}),10),this.git6=L(this.pie7||g(this.primaryColor,{h:60}),10),this.git7=L(this.pie8||g(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(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||L(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||L(this.background,2)}calculate(t){if(typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}};const Vy=t=>{const e=new Xy;return e.calculate(t),e};let Gy=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=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(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=_r(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 t,e,r,i,o,a,n,s,l,h,u;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||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScale"+c]=I(this["cScale"+c],10),this["cScalePeer"+c]=this["cScalePeer"+c]||I(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||T(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||T(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=L(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||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):I(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:((e=this.xyChart)==null?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((s=this.xyChart)==null?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.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=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||I(T(this.git0),25),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(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||Vi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Gi}calculate(t){if(typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}};const Ky=t=>{const e=new Gy;return e.calculate(t),e};let Zy=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=L("#cde498",10),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.primaryColor),this.lineColor=T(this.background),this.textColor=T(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 t,e,r,i,o,a,n,s,l,h,u;this.actorBorder=I(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||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScale"+c]=I(this["cScale"+c],10),this["cScalePeer"+c]=this["cScalePeer"+c]||I(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||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):I(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:((e=this.xyChart)==null?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:((r=this.xyChart)==null?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((a=this.xyChart)==null?void 0:a.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((s=this.xyChart)==null?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.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=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||T(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||T(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||Vi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Gi}calculate(t){if(typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}};const Jy=t=>{const e=new Zy;return e.calculate(t),e};class Qy{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=L(this.contrast,55),this.background="#ffffff",this.tertiaryColor=g(this.primaryColor,{h:-160}),this.primaryBorderColor=ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=T(this.primaryColor),this.secondaryTextColor=T(this.secondaryColor),this.tertiaryTextColor=T(this.tertiaryColor),this.lineColor=T(this.background),this.textColor=T(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,r,i,o,a,n,s,l,h,u,c;this.secondBkg=L(this.contrast,55),this.border2=this.contrast,this.actorBorder=L(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||T(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||L(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||I(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||g(this.mainBkg,{l:-(5+d*5)}),this["surfacePeer"+d]=this["surfacePeer"+d]||g(this.mainBkg,{l:-(8+d*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=L(this.contrast,30),this.sectionBkgColor2=L(this.contrast,30),this.taskBorderColor=I(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=L(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=I(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 d=0;d<this.THEME_COLOR_LIMIT;d++)this["pie"+d]=this["cScale"+d];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||Nr(this.quadrant1Fill)?L(this.quadrant1Fill):I(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:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.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:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((c=this.xyChart)==null?void 0:c.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=I(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||T(this.git0),this.gitInv1=this.gitInv1||T(this.git1),this.gitInv2=this.gitInv2||T(this.git2),this.gitInv3=this.gitInv3||T(this.git3),this.gitInv4=this.gitInv4||T(this.git4),this.gitInv5=this.gitInv5||T(this.git5),this.gitInv6=this.gitInv6||T(this.git6),this.gitInv7=this.gitInv7||T(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||Vi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Gi}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const t0=t=>{const e=new Qy;return e.calculate(t),e},re={base:{getThemeVariables:Uy},dark:{getThemeVariables:Vy},default:{getThemeVariables:Ky},forest:{getThemeVariables:Jy},neutral:{getThemeVariables:t0}},Qt={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},Il={...Qt,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:re.default.getThemeVariables(),sequence:{...Qt.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:{...Qt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Qt.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:{...Qt.pie,useWidth:984},xyChart:{...Qt.xyChart,useWidth:void 0},requirement:{...Qt.requirement,useWidth:void 0},gitGraph:{...Qt.gitGraph,useMaxWidth:!1},sankey:{...Qt.sankey,useMaxWidth:!1}},Ml=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...Ml(t[i],"")]:[...r,e+i],[]),e0=new Set(Ml(Il,"")),r0=Il,Ti=t=>{if(O.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Ti(e));return}for(const e of Object.keys(t)){if(O.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!e0.has(e)||t[e]==null){O.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){O.debug("sanitizing object",e),Ti(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(O.debug("sanitizing css option",e),t[e]=i0(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}O.debug("After sanitization",t)}},i0=t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},Nl=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,xr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,o0=/\s*%%.*\n/gm;class ql extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}}const Ve={},Ki=function(t,e){t=t.replace(Nl,"").replace(xr,"").replace(o0,`
`);for(const[r,{detector:i}]of Object.entries(Ve))if(i(t,e))return r;throw new ql(`No diagram type detected matching given configuration for text: ${t}`)},Dl=(...t)=>{for(const{id:e,detector:r,loader:i}of t)$l(e,r,i)},$l=(t,e,r)=>{Ve[t]?O.error(`Detector with key ${t} already exists`):Ve[t]={detector:e,loader:r},O.debug(`Detector with key ${t} added${r?" with loader":""}`)},n0=t=>Ve[t].loader,Vo=(t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>Vo(t,a,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=Vo(t[a],e[a],{depth:r-1,clobber:i})):(i||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},ht=Vo,a0="​",s0={curveBasis:Nf,curveBasisClosed:qf,curveBasisOpen:Df,curveBumpX:If,curveBumpY:Mf,curveBundle:$f,curveCardinalClosed:Rf,curveCardinalOpen:Pf,curveCardinal:zf,curveCatmullRomClosed:Wf,curveCatmullRomOpen:Hf,curveCatmullRom:jf,curveLinear:Of,curveLinearClosed:Yf,curveMonotoneX:Uf,curveMonotoneY:Xf,curveNatural:Vf,curveStep:Gf,curveStepAfter:Zf,curveStepBefore:Kf},l0=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,h0=function(t,e){const r=zl(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(s=>s.args);Ti(n),i=ht(i,[...n])}else i=r.args;if(!i)return;let o=Ki(t,e);const a="config";return i[a]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[a],delete i[a]),i},zl=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${l0.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),O.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const o=[];for(;(i=xr.exec(t))!==null;)if(i.index===xr.lastIndex&&xr.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){const a=i[1]?i[1]:i[2],n=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:a,args:n})}return o.length===0?{type:t,args:null}:o.length===1?o[0]:o}catch(r){return O.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},c0=function(t){return t.replace(xr,"")},u0=function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1};function d0(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return s0[r]??e}function f0(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?Kh.sanitizeUrl(r):r}const p0=(t,...e)=>{const r=t.split("."),i=r.length-1,o=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){O.error(`Function name: ${t} not found in window`);return}a[o](...e)};function Rl(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function g0(t){let e,r=0;t.forEach(o=>{r+=Rl(o,e),e=o});const i=r/2;return _n(t,i)}function m0(t){return t.length===1?t[0]:g0(t)}const Ja=(t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},_n=(t,e)=>{let r,i=e;for(const o of t){if(r){const a=Rl(o,r);if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:o.x,y:o.y};if(n>0&&n<1)return{x:Ja((1-n)*r.x+n*o.x,5),y:Ja((1-n)*r.y+n*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},y0=(t,e,r)=>{O.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=_n(e,25),o=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(e[0].x+i.x)/2,n.y=-Math.cos(a)*o+(e[0].y+i.y)/2,n};function b0(t,e,r){const i=structuredClone(r);O.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();const o=25+t,a=_n(i,o),n=10+t*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(s+Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*n+(i[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(s-Math.PI)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*n+(i[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(s)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*n+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*n+(i[0].x+a.x)/2,l.y=-Math.cos(s)*n+(i[0].y+a.y)/2),l}function _0(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}let Qa=0;const C0=()=>(Qa++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Qa);function x0(t){let e="";const r="0123456789abcdef",i=r.length;for(let o=0;o<t;o++)e+=r.charAt(Math.floor(Math.random()*i));return e}const k0=t=>x0(t.length),v0=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:""}},T0=function(t,e){const r=e.text.replace(bn.lineBreakRegex," "),[,i]=xn(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",i),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),o},w0=qr((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),bn.lineBreakRegex.test(t)))return t;const i=t.split(" "),o=[];let a="";return i.forEach((n,s)=>{const l=wi(`${n} `,r),h=wi(a,r);if(l>e){const{hyphenatedStrings:u,remainingWord:c}=S0(n,e,"-",r);o.push(a,...u),a=c}else h+l>=e?(o.push(a),a=n):a=[a,n].filter(Boolean).join(" ");s+1===i.length&&o.push(a)}),o.filter(n=>n!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),S0=qr((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],a=[];let n="";return o.forEach((s,l)=>{const h=`${n}${s}`;if(wi(h,i)>=e){const u=l+1,c=o.length===u,d=`${h}${r}`;a.push(c?h:d),n=""}else n=h}),{hyphenatedStrings:a,remainingWord:n}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function B0(t,e){return Cn(t,e).height}function wi(t,e){return Cn(t,e).width}const Cn=qr((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=xn(r),n=["sans-serif",i],s=t.split(bn.lineBreakRegex),l=[],h=Tt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const d of n){let p=0;const m={width:0,height:0,lineHeight:0};for(const b of s){const x=v0();x.text=b||a0;const E=T0(u,x).style("font-size",a).style("font-weight",o).style("font-family",d),_=(E._groups||E)[0][0].getBBox();if(_.width===0&&_.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,_.width)),p=Math.round(_.height),m.height+=p,m.lineHeight=Math.round(Math.max(m.lineHeight,p))}l.push(m)}u.remove();const c=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[c]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`);class A0{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}}let Qr;const L0=function(t){return Qr=Qr||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Qr.innerHTML=t,unescape(Qr.textContent)};function Pl(t){return"str"in t}const F0=(t,e,r,i)=>{var o;if(!i)return;const a=(o=t.node())==null?void 0:o.getBBox();a&&t.append("text").text(i).attr("x",a.x+a.width/2).attr("y",-r).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 jl(t,e){return Qm({},t,e)}const kr={assignWithDepth:ht,wrapLabel:w0,calculateTextHeight:B0,calculateTextWidth:wi,calculateTextDimensions:Cn,cleanAndMerge:jl,detectInit:h0,detectDirective:zl,isSubstringInArray:u0,interpolateToCurve:d0,calcLabelPosition:m0,calcCardinalityPosition:y0,calcTerminalLabelPosition:b0,formatUrl:f0,getStylesFromArray:_0,generateId:C0,random:k0,runFunc:p0,entityDecode:L0,insertTitle:F0,parseFontSize:xn,InitIDGenerator:A0},E0=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"ﬂ°°"+i+"¶ß":"ﬂ°"+i+"¶ß"}),e},O0=function(t){return t.replace(/ﬂ°°/g,"&#").replace(/ﬂ°/g,"&").replace(/¶ß/g,";")},ts="10.9.5",Ge=Object.freeze(r0);let mt=ht({},Ge),Wl,Ke=[],vr=ht({},Ge);const Zi=(t,e)=>{let r=ht({},t),i={};for(const o of e)Ul(o),i=ht(i,o);if(r=ht(r,i),i.theme&&i.theme in re){const o=ht({},Wl),a=ht(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in re&&(r.themeVariables=re[r.theme].getThemeVariables(a))}return vr=r,Xl(vr),vr},I0=t=>(mt=ht({},Ge),mt=ht(mt,t),t.theme&&re[t.theme]&&(mt.themeVariables=re[t.theme].getThemeVariables(t.themeVariables)),Zi(mt,Ke),mt),M0=t=>{Wl=ht({},t)},N0=t=>(mt=ht(mt,t),Zi(mt,Ke),mt),Hl=()=>ht({},mt),Yl=t=>(Xl(t),ht(vr,t),Ht()),Ht=()=>ht({},vr),Ul=t=>{t&&(["secure",...mt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(O.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"&&Ul(t[e])}))},q0=t=>{Ti(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),Ke.push(t),Zi(mt,Ke)},Si=(t=mt)=>{Ke=[],Zi(t,Ke)},D0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},es={},$0=t=>{es[t]||(O.warn(D0[t]),es[t]=!0)},Xl=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&$0("LAZY_LOAD_DEPRECATED")},Vl="c4",z0=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),R0=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.DWq97bJk-CGoKsqDe.js");return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));return{id:Vl,diagram:t}},P0={id:Vl,detector:z0,loader:R0},j0=P0,Gl="flowchart",W0=(t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},H0=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.CYF9sLis-olugdqWB.js");return{diagram:e}},__vite__mapDeps([25,26,27,28,3,4,29,30,31,32,33,34,35,36,37,38,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));return{id:Gl,diagram:t}},Y0={id:Gl,detector:W0,loader:H0},U0=Y0,Kl="flowchart-v2",X0=(t,e)=>{var r,i,o;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((o=e==null?void 0:e.flowchart)==null?void 0:o.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},V0=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.CrJPFDce-BVB2EfuM.js");return{diagram:e}},__vite__mapDeps([39,26,31,28,3,4,29,30,32,27,33,34,35,36,37,38,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));return{id:Kl,diagram:t}},G0={id:Kl,detector:X0,loader:V0},K0=G0,Zl="er",Z0=t=>/^\s*erDiagram/.test(t),J0=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.Bjyasn8g-CDvw6_hM.js");return{diagram:e}},__vite__mapDeps([40,28,3,4,29,30,27,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,35,36,37]));return{id:Zl,diagram:t}},Q0={id:Zl,detector:Z0,loader:J0},tb=Q0,Jl="gitGraph",eb=t=>/^\s*gitGraph/.test(t),rb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.MuezvWV2-x1mg6lwf.js");return{diagram:e}},__vite__mapDeps([41,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));return{id:Jl,diagram:t}},ib={id:Jl,detector:eb,loader:rb},ob=ib,Ql="gantt",nb=t=>/^\s*gantt/.test(t),ab=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.DPGihJFH-jRmGTwQi.js");return{diagram:e}},__vite__mapDeps([42,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,43,44]));return{id:Ql,diagram:t}},sb={id:Ql,detector:nb,loader:ab},lb=sb,th="info",hb=t=>/^\s*info/.test(t),cb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.CPqWlcUE-DMmVri6e.js");return{diagram:e}},__vite__mapDeps([45,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));return{id:th,diagram:t}},ub={id:th,detector:hb,loader:cb},eh="pie",db=t=>/^\s*pie/.test(t),fb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.DeNipEOr-YV2s9P01.js");return{diagram:e}},__vite__mapDeps([46,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,47,37,48,44,36]));return{id:eh,diagram:t}},pb={id:eh,detector:db,loader:fb},rh="quadrantChart",gb=t=>/^\s*quadrantChart/.test(t),mb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.BM_Cjr-p-B9N3dK1_.js");return{diagram:e}},__vite__mapDeps([49,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,43,44]));return{id:rh,diagram:t}},yb={id:rh,detector:gb,loader:mb},bb=yb,ih="xychart",_b=t=>/^\s*xychart-beta/.test(t),Cb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.Ksimn2dq-Cy0GBvLT.js");return{diagram:e}},__vite__mapDeps([50,34,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,44,48,43,35,36,37]));return{id:ih,diagram:t}},xb={id:ih,detector:_b,loader:Cb},kb=xb,oh="requirement",vb=t=>/^\s*requirement(Diagram)?/.test(t),Tb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.BJP9crUl-CU7eXQ-2.js");return{diagram:e}},__vite__mapDeps([51,27,28,3,4,29,30,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,35,36,37]));return{id:oh,diagram:t}},wb={id:oh,detector:vb,loader:Tb},Sb=wb,nh="sequence",Bb=t=>/^\s*sequenceDiagram/.test(t),Ab=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.BRt3DjyO-Dc5iQ30w.js");return{diagram:e}},__vite__mapDeps([52,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,1]));return{id:nh,diagram:t}},Lb={id:nh,detector:Bb,loader:Ab},Fb=Lb,ah="class",Eb=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},Ob=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.DsajidVF-C56G8opG.js");return{diagram:e}},__vite__mapDeps([53,54,27,28,3,4,29,30,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,35,36,37]));return{id:ah,diagram:t}},Ib={id:ah,detector:Eb,loader:Ob},Mb=Ib,sh="classDiagram",Nb=(t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},qb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.Dkq_kL-Q-EZEu-ZTI.js");return{diagram:e}},__vite__mapDeps([55,54,28,3,4,29,30,32,27,33,34,35,36,37,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));return{id:sh,diagram:t}},Db={id:sh,detector:Nb,loader:qb},$b=Db,lh="state",zb=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},Rb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.Bc15IpxM-DFnMslTZ.js");return{diagram:e}},__vite__mapDeps([56,57,27,28,3,4,29,30,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,35,36,37]));return{id:lh,diagram:t}},Pb={id:lh,detector:zb,loader:Rb},jb=Pb,hh="stateDiagram",Wb=(t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},Hb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.Bo0XYLri-BEZeI3sF.js");return{diagram:e}},__vite__mapDeps([58,57,28,3,4,29,30,32,27,33,34,35,36,37,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));return{id:hh,diagram:t}},Yb={id:hh,detector:Wb,loader:Hb},Ub=Yb,ch="journey",Xb=t=>/^\s*journey/.test(t),Vb=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.BL1_hoZ0-D6nuQUAf.js");return{diagram:e}},__vite__mapDeps([59,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,47,37]));return{id:ch,diagram:t}},Gb={id:ch,detector:Xb,loader:Vb},Kb=Gb,Zb=function(t,e){for(let r of e)t.attr(r[0],r[1])},Jb=function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},uh=function(t,e,r,i){const o=Jb(e,r,i);Zb(t,o)},Qb=function(t,e,r,i){const o=e.node().getBBox(),a=o.width,n=o.height;O.info(`SVG bounds: ${a}x${n}`,o);let s=0,l=0;O.info(`Graph bounds: ${s}x${l}`,t),s=a+r*2,l=n+r*2,O.info(`Calculated bounds: ${s}x${l}`),uh(e,l,s,i);const h=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",h)},hi={},t_=(t,e,r)=>{let i="";return t in hi&&hi[t]?i=hi[t](r):O.warn(`No theme found for ${t}`),` & {
    font-family: ${r.fontFamily};
    font-size: ${r.fontSize};
    fill: ${r.textColor}
  }

  /* Classes common for multiple diagrams */

  & .error-icon {
    fill: ${r.errorBkgColor};
  }
  & .error-text {
    fill: ${r.errorTextColor};
    stroke: ${r.errorTextColor};
  }

  & .edge-thickness-normal {
    stroke-width: 2px;
  }
  & .edge-thickness-thick {
    stroke-width: 3.5px
  }
  & .edge-pattern-solid {
    stroke-dasharray: 0;
  }

  & .edge-pattern-dashed{
    stroke-dasharray: 3;
  }
  .edge-pattern-dotted {
    stroke-dasharray: 2;
  }

  & .marker {
    fill: ${r.lineColor};
    stroke: ${r.lineColor};
  }
  & .marker.cross {
    stroke: ${r.lineColor};
  }

  & svg {
    font-family: ${r.fontFamily};
    font-size: ${r.fontSize};
  }

  ${i}

  ${e}
`},e_=(t,e)=>{e!==void 0&&(hi[t]=e)},r_=t_;let kn="",vn="",Tn="";const wn=t=>Xe(t,Ht()),i_=()=>{kn="",Tn="",vn=""},o_=t=>{kn=wn(t).replace(/^\s+/g,"")},n_=()=>kn,a_=t=>{Tn=wn(t).replace(/\n\s+/g,`
`)},s_=()=>Tn,l_=t=>{vn=wn(t)},h_=()=>vn,c_=Object.freeze(Object.defineProperty({__proto__:null,clear:i_,getAccDescription:s_,getAccTitle:n_,getDiagramTitle:h_,setAccDescription:a_,setAccTitle:o_,setDiagramTitle:l_},Symbol.toStringTag,{value:"Module"})),u_=O,d_=yn,Sn=Ht,xk=Yl,kk=Ge,f_=t=>Xe(t,Sn()),p_=Qb,g_=()=>c_,Bi={},Ai=(t,e,r)=>{var i;if(Bi[t])throw new Error(`Diagram ${t} already registered.`);Bi[t]=e,r&&$l(t,r),e_(t,e.styles),(i=e.injectUtils)==null||i.call(e,u_,d_,Sn,f_,p_,g_(),()=>{})},Bn=t=>{if(t in Bi)return Bi[t];throw new m_(t)};class m_ extends Error{constructor(e){super(`Diagram ${e} not found.`)}}const y_=t=>{var e;const{securityLevel:r}=Sn();let i=Tt("body");if(r==="sandbox"){const o=((e=Tt(`#i${t}`).node())==null?void 0:e.contentDocument)??document;i=Tt(o.body)}return i.select(`#${t}`)},b_=(t,e,r)=>{O.debug(`rendering svg for syntax error
`);const i=y_(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),uh(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},dh={draw:b_},__=dh,C_={db:{},renderer:dh,parser:{parser:{yy:{}},parse:()=>{}}},x_=C_,fh="flowchart-elk",k_=(t,e)=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},v_=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.DPH53wRM-DNAKB7Uc.js");return{diagram:e}},__vite__mapDeps([60,26,33,34,35,36,37,5,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,61,2]));return{id:fh,diagram:t}},T_={id:fh,detector:k_,loader:v_},w_=T_,ph="timeline",S_=t=>/^\s*timeline/.test(t),B_=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.CuiWc6uW-D12zwJfJ.js");return{diagram:e}},__vite__mapDeps([62,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,47,37]));return{id:ph,diagram:t}},A_={id:ph,detector:S_,loader:B_},L_=A_,gh="mindmap",F_=t=>/^\s*mindmap/.test(t),E_=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.cZR9S-8B-B_Vl0sTM.js");return{diagram:e}},__vite__mapDeps([63,5,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,34,2]));return{id:gh,diagram:t}},O_={id:gh,detector:F_,loader:E_},I_=O_,mh="sankey",M_=t=>/^\s*sankey-beta/.test(t),N_=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.RJcftJMk-ZvvnUZlt.js");return{diagram:e}},__vite__mapDeps([64,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,48,44,65]));return{id:mh,diagram:t}},q_={id:mh,detector:M_,loader:N_},D_=q_,yh="block",$_=t=>/^\s*block-beta/.test(t),z_=async()=>{const{diagram:t}=await Z(async()=>{const{diagram:e}=await import("./layers.BO6mlCJG-DtDIFLq_.js");return{diagram:e}},__vite__mapDeps([66,33,34,35,36,37,28,3,4,29,30,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,38,48,44,65]));return{id:yh,diagram:t}},R_={id:yh,detector:$_,loader:z_},P_=R_;let rs=!1;const An=()=>{rs||(rs=!0,Ai("error",x_,t=>t.toLowerCase().trim()==="error"),Ai("---",{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("---")),Dl(j0,$b,Mb,tb,lb,ub,pb,Sb,Fb,w_,K0,U0,I_,L_,ob,Ub,jb,Kb,bb,D_,kb,P_))};class bh{constructor(e,r={}){this.text=e,this.metadata=r,this.type="graph",this.text=E0(e),this.text+=`
`;const i=Ht();try{this.type=Ki(e,i)}catch(a){this.type="error",this.detectError=a}const o=Bn(this.type);O.debug("Type "+this.type),this.db=o.db,this.renderer=o.renderer,this.parser=o.parser,this.parser.parser.yy=this.db,this.init=o.init,this.parse()}parse(){var e,r,i,o,a;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e);const n=Ht();(i=this.init)==null||i.call(this,n),this.metadata.title&&((a=(o=this.db).setDiagramTitle)==null||a.call(o,this.metadata.title)),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}}const j_=async(t,e={})=>{const r=Ki(t,Ht());try{Bn(r)}catch{const i=n0(r);if(!i)throw new ql(`Diagram ${r} not found.`);const{id:o,diagram:a}=await i();Ai(o,a)}return new bh(t,e)};let is=[];const W_=()=>{is.forEach(t=>{t()}),is=[]},H_="graphics-document document";function Y_(t,e){t.attr("role",H_),e!==""&&t.attr("aria-roledescription",e)}function U_(t,e,r,i){if(t.insert!==void 0){if(r){const o=`chart-desc-${i}`;t.attr("aria-describedby",o),t.insert("desc",":first-child").attr("id",o).text(r)}if(e){const o=`chart-title-${i}`;t.attr("aria-labelledby",o),t.insert("title",":first-child").attr("id",o).text(e)}}}const X_=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function _h(t){return typeof t>"u"||t===null}function V_(t){return typeof t=="object"&&t!==null}function G_(t){return Array.isArray(t)?t:_h(t)?[]:[t]}function K_(t,e){var r,i,o,a;if(e)for(a=Object.keys(e),r=0,i=a.length;r<i;r+=1)o=a[r],t[o]=e[o];return t}function Z_(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function J_(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Q_=_h,tC=V_,eC=G_,rC=Z_,iC=J_,oC=K_,dt={isNothing:Q_,isObject:tC,toArray:eC,repeat:rC,isNegativeZero:iC,extend:oC};function Ch(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`

`+t.mark.snippet),i+" "+r):i}function Er(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Ch(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Er.prototype=Object.create(Error.prototype);Er.prototype.constructor=Er;Er.prototype.toString=function(t){return this.name+": "+Ch(this,t)};var te=Er;function vo(t,e,r,i,o){var a="",n="",s=Math.floor(o/2)-1;return i-e>s&&(a=" ... ",e=i-s+a.length),r-i>s&&(n=" ...",r=i+s-n.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+n,pos:i-e+a.length}}function To(t,e){return dt.repeat(" ",e-t.length)+t}function nC(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],a,n=-1;a=r.exec(t.buffer);)o.push(a.index),i.push(a.index+a[0].length),t.position<=a.index&&n<0&&(n=i.length-2);n<0&&(n=i.length-1);var s="",l,h,u=Math.min(t.line+e.linesAfter,o.length).toString().length,c=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(n-l<0);l++)h=vo(t.buffer,i[n-l],o[n-l],t.position-(i[n]-i[n-l]),c),s=dt.repeat(" ",e.indent)+To((t.line-l+1).toString(),u)+" | "+h.str+`
`+s;for(h=vo(t.buffer,i[n],o[n],t.position,c),s+=dt.repeat(" ",e.indent)+To((t.line+1).toString(),u)+" | "+h.str+`
`,s+=dt.repeat("-",e.indent+u+3+h.pos)+`^
`,l=1;l<=e.linesAfter&&!(n+l>=o.length);l++)h=vo(t.buffer,i[n+l],o[n+l],t.position-(i[n]-i[n+l]),c),s+=dt.repeat(" ",e.indent)+To((t.line+l+1).toString(),u)+" | "+h.str+`
`;return s.replace(/\n$/,"")}var aC=nC,sC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],lC=["scalar","sequence","mapping"];function hC(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function cC(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(sC.indexOf(r)===-1)throw new te('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=hC(e.styleAliases||null),lC.indexOf(this.kind)===-1)throw new te('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var ct=cC;function os(t,e){var r=[];return t[e].forEach(function(i){var o=r.length;r.forEach(function(a,n){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(o=n)}),r[o]=i}),r}function uC(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(o){o.multi?(t.multi[o.kind].push(o),t.multi.fallback.push(o)):t[o.kind][o.tag]=t.fallback[o.tag]=o}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function Go(t){return this.extend(t)}Go.prototype.extend=function(t){var e=[],r=[];if(t instanceof ct)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new te("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.forEach(function(o){if(!(o instanceof ct))throw new te("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new te("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new te("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof ct))throw new te("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Go.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=os(i,"implicit"),i.compiledExplicit=os(i,"explicit"),i.compiledTypeMap=uC(i.compiledImplicit,i.compiledExplicit),i};var dC=Go,fC=new ct("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),pC=new ct("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),gC=new ct("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),mC=new dC({explicit:[fC,pC,gC]});function yC(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function bC(){return null}function _C(t){return t===null}var CC=new ct("tag:yaml.org,2002:null",{kind:"scalar",resolve:yC,construct:bC,predicate:_C,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function xC(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function kC(t){return t==="true"||t==="True"||t==="TRUE"}function vC(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var TC=new ct("tag:yaml.org,2002:bool",{kind:"scalar",resolve:xC,construct:kC,predicate:vC,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function wC(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function SC(t){return 48<=t&&t<=55}function BC(t){return 48<=t&&t<=57}function AC(t){if(t===null)return!1;var e=t.length,r=0,i=!1,o;if(!e)return!1;if(o=t[r],(o==="-"||o==="+")&&(o=t[++r]),o==="0"){if(r+1===e)return!0;if(o=t[++r],o==="b"){for(r++;r<e;r++)if(o=t[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i&&o!=="_"}if(o==="x"){for(r++;r<e;r++)if(o=t[r],o!=="_"){if(!wC(t.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}if(o==="o"){for(r++;r<e;r++)if(o=t[r],o!=="_"){if(!SC(t.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}}if(o==="_")return!1;for(;r<e;r++)if(o=t[r],o!=="_"){if(!BC(t.charCodeAt(r)))return!1;i=!0}return!(!i||o==="_")}function LC(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function FC(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!dt.isNegativeZero(t)}var EC=new ct("tag:yaml.org,2002:int",{kind:"scalar",resolve:AC,construct:LC,predicate:FC,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),OC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function IC(t){return!(t===null||!OC.test(t)||t[t.length-1]==="_")}function MC(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var NC=/^[-+]?[0-9]+e/;function qC(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(dt.isNegativeZero(t))return"-0.0";return r=t.toString(10),NC.test(r)?r.replace("e",".e"):r}function DC(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||dt.isNegativeZero(t))}var $C=new ct("tag:yaml.org,2002:float",{kind:"scalar",resolve:IC,construct:MC,predicate:DC,represent:qC,defaultStyle:"lowercase"}),xh=mC.extend({implicit:[CC,TC,EC,$C]}),zC=xh,kh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),vh=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 RC(t){return t===null?!1:kh.exec(t)!==null||vh.exec(t)!==null}function PC(t){var e,r,i,o,a,n,s,l=0,h=null,u,c,d;if(e=kh.exec(t),e===null&&(e=vh.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(a=+e[4],n=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],c=+(e[11]||0),h=(u*60+c)*6e4,e[9]==="-"&&(h=-h)),d=new Date(Date.UTC(r,i,o,a,n,s,l)),h&&d.setTime(d.getTime()-h),d}function jC(t){return t.toISOString()}var WC=new ct("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:RC,construct:PC,instanceOf:Date,represent:jC});function HC(t){return t==="<<"||t===null}var YC=new ct("tag:yaml.org,2002:merge",{kind:"scalar",resolve:HC}),Ln=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function UC(t){if(t===null)return!1;var e,r,i=0,o=t.length,a=Ln;for(r=0;r<o;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function XC(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,a=Ln,n=0,s=[];for(e=0;e<o;e++)e%4===0&&e&&(s.push(n>>16&255),s.push(n>>8&255),s.push(n&255)),n=n<<6|a.indexOf(i.charAt(e));return r=o%4*6,r===0?(s.push(n>>16&255),s.push(n>>8&255),s.push(n&255)):r===18?(s.push(n>>10&255),s.push(n>>2&255)):r===12&&s.push(n>>4&255),new Uint8Array(s)}function VC(t){var e="",r=0,i,o,a=t.length,n=Ln;for(i=0;i<a;i++)i%3===0&&i&&(e+=n[r>>18&63],e+=n[r>>12&63],e+=n[r>>6&63],e+=n[r&63]),r=(r<<8)+t[i];return o=a%3,o===0?(e+=n[r>>18&63],e+=n[r>>12&63],e+=n[r>>6&63],e+=n[r&63]):o===2?(e+=n[r>>10&63],e+=n[r>>4&63],e+=n[r<<2&63],e+=n[64]):o===1&&(e+=n[r>>2&63],e+=n[r<<4&63],e+=n[64],e+=n[64]),e}function GC(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var KC=new ct("tag:yaml.org,2002:binary",{kind:"scalar",resolve:UC,construct:XC,predicate:GC,represent:VC}),ZC=Object.prototype.hasOwnProperty,JC=Object.prototype.toString;function QC(t){if(t===null)return!0;var e=[],r,i,o,a,n,s=t;for(r=0,i=s.length;r<i;r+=1){if(o=s[r],n=!1,JC.call(o)!=="[object Object]")return!1;for(a in o)if(ZC.call(o,a))if(!n)n=!0;else return!1;if(!n)return!1;if(e.indexOf(a)===-1)e.push(a);else return!1}return!0}function tx(t){return t!==null?t:[]}var ex=new ct("tag:yaml.org,2002:omap",{kind:"sequence",resolve:QC,construct:tx}),rx=Object.prototype.toString;function ix(t){if(t===null)return!0;var e,r,i,o,a,n=t;for(a=new Array(n.length),e=0,r=n.length;e<r;e+=1){if(i=n[e],rx.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;a[e]=[o[0],i[o[0]]]}return!0}function ox(t){if(t===null)return[];var e,r,i,o,a,n=t;for(a=new Array(n.length),e=0,r=n.length;e<r;e+=1)i=n[e],o=Object.keys(i),a[e]=[o[0],i[o[0]]];return a}var nx=new ct("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ix,construct:ox}),ax=Object.prototype.hasOwnProperty;function sx(t){if(t===null)return!0;var e,r=t;for(e in r)if(ax.call(r,e)&&r[e]!==null)return!1;return!0}function lx(t){return t!==null?t:{}}var hx=new ct("tag:yaml.org,2002:set",{kind:"mapping",resolve:sx,construct:lx}),cx=zC.extend({implicit:[WC,YC],explicit:[KC,ex,nx,hx]}),fe=Object.prototype.hasOwnProperty,Li=1,Th=2,wh=3,Fi=4,wo=1,ux=2,ns=3,dx=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,fx=/[\x85\u2028\u2029]/,px=/[,\[\]\{\}]/,Sh=/^(?:!|!!|![a-z\-]+!)$/i,Bh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function as(t){return Object.prototype.toString.call(t)}function jt(t){return t===10||t===13}function ve(t){return t===9||t===32}function bt(t){return t===9||t===32||t===10||t===13}function qe(t){return t===44||t===91||t===93||t===123||t===125}function gx(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function mx(t){return t===120?2:t===117?4:t===85?8:0}function yx(t){return 48<=t&&t<=57?t-48:-1}function ss(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?"	":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function bx(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Ah=new Array(256),Lh=new Array(256);for(var Me=0;Me<256;Me++)Ah[Me]=ss(Me)?1:0,Lh[Me]=ss(Me);function _x(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||cx,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Fh(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=aC(r),new te(e,r)}function F(t,e){throw Fh(t,e)}function Ei(t,e){t.onWarning&&t.onWarning.call(null,Fh(t,e))}var ls={YAML:function(t,e,r){var i,o,a;t.version!==null&&F(t,"duplication of %YAML directive"),r.length!==1&&F(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&F(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),o!==1&&F(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Ei(t,"unsupported YAML version of the document")},TAG:function(t,e,r){var i,o;r.length!==2&&F(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Sh.test(i)||F(t,"ill-formed tag handle (first argument) of the TAG directive"),fe.call(t.tagMap,i)&&F(t,'there is a previously declared suffix for "'+i+'" tag handle'),Bh.test(o)||F(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{F(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o}};function ue(t,e,r,i){var o,a,n,s;if(e<r){if(s=t.input.slice(e,r),i)for(o=0,a=s.length;o<a;o+=1)n=s.charCodeAt(o),n===9||32<=n&&n<=1114111||F(t,"expected valid JSON character");else dx.test(s)&&F(t,"the stream contains non-printable characters");t.result+=s}}function hs(t,e,r,i){var o,a,n,s;for(dt.isObject(r)||F(t,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),n=0,s=o.length;n<s;n+=1)a=o[n],fe.call(e,a)||(e[a]=r[a],i[a]=!0)}function De(t,e,r,i,o,a,n,s,l){var h,u;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),h=0,u=o.length;h<u;h+=1)Array.isArray(o[h])&&F(t,"nested arrays are not supported inside keys"),typeof o=="object"&&as(o[h])==="[object Object]"&&(o[h]="[object Object]");if(typeof o=="object"&&as(o)==="[object Object]"&&(o="[object Object]"),o=String(o),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,u=a.length;h<u;h+=1)hs(t,e,a[h],r);else hs(t,e,a,r);else!t.json&&!fe.call(r,o)&&fe.call(e,o)&&(t.line=n||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,F(t,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(e,o,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[o]=a,delete r[o];return e}function Fn(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):F(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Q(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);o!==0;){for(;ve(o);)o===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&o===35)do o=t.input.charCodeAt(++t.position);while(o!==10&&o!==13&&o!==0);if(jt(o))for(Fn(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;o===32;)t.lineIndent++,o=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&Ei(t,"deficient indentation"),i}function Ji(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||bt(r)))}function En(t,e){e===1?t.result+=" ":e>1&&(t.result+=dt.repeat(`
`,e-1))}function Cx(t,e,r){var i,o,a,n,s,l,h,u,c=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),bt(p)||qe(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(o=t.input.charCodeAt(t.position+1),bt(o)||r&&qe(o)))return!1;for(t.kind="scalar",t.result="",a=n=t.position,s=!1;p!==0;){if(p===58){if(o=t.input.charCodeAt(t.position+1),bt(o)||r&&qe(o))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),bt(i))break}else{if(t.position===t.lineStart&&Ji(t)||r&&qe(p))break;if(jt(p))if(l=t.line,h=t.lineStart,u=t.lineIndent,Q(t,!1,-1),t.lineIndent>=e){s=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=n,t.line=l,t.lineStart=h,t.lineIndent=u;break}}s&&(ue(t,a,n,!1),En(t,t.line-l),a=n=t.position,s=!1),ve(p)||(n=t.position+1),p=t.input.charCodeAt(++t.position)}return ue(t,a,n,!1),t.result?!0:(t.kind=c,t.result=d,!1)}function xx(t,e){var r,i,o;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ue(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,o=t.position;else return!0;else jt(r)?(ue(t,i,o,!0),En(t,Q(t,!1,e)),i=o=t.position):t.position===t.lineStart&&Ji(t)?F(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);F(t,"unexpected end of the stream within a single quoted scalar")}function kx(t,e){var r,i,o,a,n,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return ue(t,r,t.position,!0),t.position++,!0;if(s===92){if(ue(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),jt(s))Q(t,!1,e);else if(s<256&&Ah[s])t.result+=Lh[s],t.position++;else if((n=mx(s))>0){for(o=n,a=0;o>0;o--)s=t.input.charCodeAt(++t.position),(n=gx(s))>=0?a=(a<<4)+n:F(t,"expected hexadecimal character");t.result+=bx(a),t.position++}else F(t,"unknown escape sequence");r=i=t.position}else jt(s)?(ue(t,r,i,!0),En(t,Q(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Ji(t)?F(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}F(t,"unexpected end of the stream within a double quoted scalar")}function vx(t,e){var r=!0,i,o,a,n=t.tag,s,l=t.anchor,h,u,c,d,p,m=Object.create(null),b,x,E,_;if(_=t.input.charCodeAt(t.position),_===91)u=93,p=!1,s=[];else if(_===123)u=125,p=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),_=t.input.charCodeAt(++t.position);_!==0;){if(Q(t,!0,e),_=t.input.charCodeAt(t.position),_===u)return t.position++,t.tag=n,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=s,!0;r?_===44&&F(t,"expected the node content, but found ','"):F(t,"missed comma between flow collection entries"),x=b=E=null,c=d=!1,_===63&&(h=t.input.charCodeAt(t.position+1),bt(h)&&(c=d=!0,t.position++,Q(t,!0,e))),i=t.line,o=t.lineStart,a=t.position,Ze(t,e,Li,!1,!0),x=t.tag,b=t.result,Q(t,!0,e),_=t.input.charCodeAt(t.position),(d||t.line===i)&&_===58&&(c=!0,_=t.input.charCodeAt(++t.position),Q(t,!0,e),Ze(t,e,Li,!1,!0),E=t.result),p?De(t,s,m,x,b,E,i,o,a):c?s.push(De(t,null,m,x,b,E,i,o,a)):s.push(b),Q(t,!0,e),_=t.input.charCodeAt(t.position),_===44?(r=!0,_=t.input.charCodeAt(++t.position)):r=!1}F(t,"unexpected end of the stream within a flow collection")}function Tx(t,e){var r,i,o=wo,a=!1,n=!1,s=e,l=0,h=!1,u,c;if(c=t.input.charCodeAt(t.position),c===124)i=!1;else if(c===62)i=!0;else return!1;for(t.kind="scalar",t.result="";c!==0;)if(c=t.input.charCodeAt(++t.position),c===43||c===45)wo===o?o=c===43?ns:ux:F(t,"repeat of a chomping mode identifier");else if((u=yx(c))>=0)u===0?F(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?F(t,"repeat of an indentation width identifier"):(s=e+u-1,n=!0);else break;if(ve(c)){do c=t.input.charCodeAt(++t.position);while(ve(c));if(c===35)do c=t.input.charCodeAt(++t.position);while(!jt(c)&&c!==0)}for(;c!==0;){for(Fn(t),t.lineIndent=0,c=t.input.charCodeAt(t.position);(!n||t.lineIndent<s)&&c===32;)t.lineIndent++,c=t.input.charCodeAt(++t.position);if(!n&&t.lineIndent>s&&(s=t.lineIndent),jt(c)){l++;continue}if(t.lineIndent<s){o===ns?t.result+=dt.repeat(`
`,a?1+l:l):o===wo&&a&&(t.result+=`
`);break}for(i?ve(c)?(h=!0,t.result+=dt.repeat(`
`,a?1+l:l)):h?(h=!1,t.result+=dt.repeat(`
`,l+1)):l===0?a&&(t.result+=" "):t.result+=dt.repeat(`
`,l):t.result+=dt.repeat(`
`,a?1+l:l),a=!0,n=!0,l=0,r=t.position;!jt(c)&&c!==0;)c=t.input.charCodeAt(++t.position);ue(t,r,t.position,!1)}return!0}function cs(t,e){var r,i=t.tag,o=t.anchor,a=[],n,s=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,F(t,"tab characters must not be used in indentation")),!(l!==45||(n=t.input.charCodeAt(t.position+1),!bt(n))));){if(s=!0,t.position++,Q(t,!0,-1)&&t.lineIndent<=e){a.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Ze(t,e,wh,!1,!0),a.push(t.result),Q(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)F(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return s?(t.tag=i,t.anchor=o,t.kind="sequence",t.result=a,!0):!1}function wx(t,e,r){var i,o,a,n,s,l,h=t.tag,u=t.anchor,c={},d=Object.create(null),p=null,m=null,b=null,x=!1,E=!1,_;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=c),_=t.input.charCodeAt(t.position);_!==0;){if(!x&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,F(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,(_===63||_===58)&&bt(i))_===63?(x&&(De(t,c,d,p,m,null,n,s,l),p=m=b=null),E=!0,x=!0,o=!0):x?(x=!1,o=!0):F(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,_=i;else{if(n=t.line,s=t.lineStart,l=t.position,!Ze(t,r,Th,!1,!0))break;if(t.line===a){for(_=t.input.charCodeAt(t.position);ve(_);)_=t.input.charCodeAt(++t.position);if(_===58)_=t.input.charCodeAt(++t.position),bt(_)||F(t,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(De(t,c,d,p,m,null,n,s,l),p=m=b=null),E=!0,x=!1,o=!1,p=t.tag,m=t.result;else if(E)F(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=u,!0}else if(E)F(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===a||t.lineIndent>e)&&(x&&(n=t.line,s=t.lineStart,l=t.position),Ze(t,e,Fi,!0,o)&&(x?m=t.result:b=t.result),x||(De(t,c,d,p,m,b,n,s,l),p=m=b=null),Q(t,!0,-1),_=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&_!==0)F(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return x&&De(t,c,d,p,m,null,n,s,l),E&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=c),E}function Sx(t){var e,r=!1,i=!1,o,a,n;if(n=t.input.charCodeAt(t.position),n!==33)return!1;if(t.tag!==null&&F(t,"duplication of a tag property"),n=t.input.charCodeAt(++t.position),n===60?(r=!0,n=t.input.charCodeAt(++t.position)):n===33?(i=!0,o="!!",n=t.input.charCodeAt(++t.position)):o="!",e=t.position,r){do n=t.input.charCodeAt(++t.position);while(n!==0&&n!==62);t.position<t.length?(a=t.input.slice(e,t.position),n=t.input.charCodeAt(++t.position)):F(t,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!bt(n);)n===33&&(i?F(t,"tag suffix cannot contain exclamation marks"):(o=t.input.slice(e-1,t.position+1),Sh.test(o)||F(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),n=t.input.charCodeAt(++t.position);a=t.input.slice(e,t.position),px.test(a)&&F(t,"tag suffix cannot contain flow indicator characters")}a&&!Bh.test(a)&&F(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{F(t,"tag name is malformed: "+a)}return r?t.tag=a:fe.call(t.tagMap,o)?t.tag=t.tagMap[o]+a:o==="!"?t.tag="!"+a:o==="!!"?t.tag="tag:yaml.org,2002:"+a:F(t,'undeclared tag handle "'+o+'"'),!0}function Bx(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&F(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!bt(r)&&!qe(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&F(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Ax(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!bt(i)&&!qe(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&F(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),fe.call(t.anchorMap,r)||F(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Q(t,!0,-1),!0}function Ze(t,e,r,i,o){var a,n,s,l=1,h=!1,u=!1,c,d,p,m,b,x;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=n=s=Fi===r||wh===r,i&&Q(t,!0,-1)&&(h=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;Sx(t)||Bx(t);)Q(t,!0,-1)?(h=!0,s=a,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):s=!1;if(s&&(s=h||o),(l===1||Fi===r)&&(Li===r||Th===r?b=e:b=e+1,x=t.position-t.lineStart,l===1?s&&(cs(t,x)||wx(t,x,b))||vx(t,b)?u=!0:(n&&Tx(t,b)||xx(t,b)||kx(t,b)?u=!0:Ax(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&F(t,"alias node should not have any properties")):Cx(t,b,Li===r)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=s&&cs(t,x))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&F(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),c=0,d=t.implicitTypes.length;c<d;c+=1)if(m=t.implicitTypes[c],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(fe.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,p=t.typeMap.multi[t.kind||"fallback"],c=0,d=p.length;c<d;c+=1)if(t.tag.slice(0,p[c].tag.length)===p[c].tag){m=p[c];break}m||F(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&F(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):F(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 Lx(t){var e=t.position,r,i,o,a=!1,n;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(n=t.input.charCodeAt(t.position))!==0&&(Q(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||n!==37));){for(a=!0,n=t.input.charCodeAt(++t.position),r=t.position;n!==0&&!bt(n);)n=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),o=[],i.length<1&&F(t,"directive name must not be less than one character in length");n!==0;){for(;ve(n);)n=t.input.charCodeAt(++t.position);if(n===35){do n=t.input.charCodeAt(++t.position);while(n!==0&&!jt(n));break}if(jt(n))break;for(r=t.position;n!==0&&!bt(n);)n=t.input.charCodeAt(++t.position);o.push(t.input.slice(r,t.position))}n!==0&&Fn(t),fe.call(ls,i)?ls[i](t,i,o):Ei(t,'unknown document directive "'+i+'"')}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)):a&&F(t,"directives end mark is expected"),Ze(t,t.lineIndent-1,Fi,!1,!0),Q(t,!0,-1),t.checkLineBreaks&&fx.test(t.input.slice(e,t.position))&&Ei(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Ji(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Q(t,!0,-1));return}if(t.position<t.length-1)F(t,"end of the stream or a document separator is expected");else return}function Fx(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new _x(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,F(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;)Lx(r);return r.documents}function Ex(t,e){var r=Fx(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new te("expected a single document in the stream, but found more")}}var Ox=Ex,Ix={load:Ox},Mx=xh,Nx=Ix.load;function qx(t){const e=t.match(Nl);if(!e)return{text:t,metadata:{}};let r=Nx(e[1],{schema:Mx})??{};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:t.slice(e[0].length),metadata:i}}const Dx=t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),$x=t=>{const{text:e,metadata:r}=qx(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},zx=t=>{const e=kr.detectInit(t)??{},r=kr.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:i})=>{}):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:c0(t),directive:e}};function Eh(t){const e=Dx(t),r=$x(e),i=zx(r.text),o=jl(r.config,i.directive);return t=X_(i.text),{code:t,title:r.title,config:o}}const Rx=5e4,Px="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",jx="sandbox",Wx="loose",Hx="http://www.w3.org/2000/svg",Yx="http://www.w3.org/1999/xlink",Ux="http://www.w3.org/1999/xhtml",Xx="100%",Vx="100%",Gx="border:0;margin:0;",Kx="margin:0",Zx="allow-top-navigation-by-user-activation allow-popups",Jx='The "iframe" tag is not supported by your browser.',Qx=["foreignobject"],t1=["dominant-baseline"];function Oh(t){const e=Eh(t);return Si(),q0(e.config??{}),e}async function e1(t,e){An(),t=Oh(t).code;try{await On(t)}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}const us=(t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,r1=(t,e={})=>{var r;let i="";if(t.themeCSS!==void 0&&(i+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(i+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(i+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!ko(e)){const o=t.htmlLabels||(r=t.flowchart)!=null&&r.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const a in e){const n=e[a];ko(n.styles)||o.forEach(s=>{i+=us(n.id,s,n.styles)}),ko(n.textStyles)||(i+=us(n.id,"tspan",n.textStyles))}}return i},i1=(t,e,r,i)=>{const o=r1(t,r),a=r_(e,o,t.themeVariables);return Po(py(`${i}{${a}}`),my)},o1=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=O0(i),i=i.replace(/<br>/g,"<br/>"),i},n1=(t="",e)=>{var r,i;const o=(i=(r=e==null?void 0:e.viewBox)==null?void 0:r.baseVal)!=null&&i.height?e.viewBox.baseVal.height+"px":Vx,a=btoa('<body style="'+Kx+'">'+t+"</body>");return`<iframe style="width:${Xx};height:${o};${Gx}" src="data:text/html;base64,${a}" sandbox="${Zx}">
  ${Jx}
</iframe>`},ds=(t,e,r,i,o)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Hx);return o&&n.attr("xmlns:xlink",o),n.append("g"),t};function fs(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const a1=(t,e,r,i)=>{var o,a,n;(o=t.getElementById(e))==null||o.remove(),(a=t.getElementById(r))==null||a.remove(),(n=t.getElementById(i))==null||n.remove()},s1=async function(t,e,r){var i,o,a,n,s,l;An();const h=Oh(e);e=h.code;const u=Ht();O.debug(u),e.length>((u==null?void 0:u.maxTextSize)??Rx)&&(e=Px);const c="#"+t,d="i"+t,p="#"+d,m="d"+t,b="#"+m;let x=Tt("body");const E=u.securityLevel===jx,_=u.securityLevel===Wx,R=u.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),E){const k=fs(Tt(r),d);x=Tt(k.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=Tt(r);ds(x,t,m,`font-family: ${R}`,Yx)}else{if(a1(document,t,m,d),E){const k=fs(Tt("body"),d);x=Tt(k.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=Tt("body");ds(x,t,m)}let y,j;try{y=await On(e,{title:h.title})}catch(k){y=new bh("error"),j=k}const U=x.select(b).node(),N=y.type,tt=U.firstChild,nt=tt.firstChild,P=(o=(i=y.renderer).getClasses)==null?void 0:o.call(i,e,y),B=i1(u,N,P,c),et=document.createElement("style");et.innerHTML=B,tt.insertBefore(et,nt);try{await y.renderer.draw(e,t,ts,y)}catch(k){throw __.draw(e,t,ts),k}const ne=x.select(`${b} svg`),M=(n=(a=y.db).getAccTitle)==null?void 0:n.call(a),S=(l=(s=y.db).getAccDescription)==null?void 0:l.call(s);h1(N,ne,M,S),x.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Ux);let C=x.select(b).node().innerHTML;if(O.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),C=o1(C,E,Ol(u.arrowMarkerAbsolute)),E){const k=x.select(b+" svg").node();C=n1(C,k)}else _||(C=He.sanitize(C,{ADD_TAGS:Qx,ADD_ATTR:t1,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(W_(),j)throw j;const A=Tt(E?p:b).node();return A&&"remove"in A&&A.remove(),{svg:C,bindFunctions:y.db.bindFunctions}};function l1(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),M0(t),t!=null&&t.theme&&t.theme in re?t.themeVariables=re[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=re.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?I0(t):Hl();yn(r.logLevel),An()}const On=(t,e={})=>{const{code:r}=Eh(t);return j_(r,e)};function h1(t,e,r,i){Y_(e,t),U_(e,r,i,e.attr("id"))}const Se=Object.freeze({render:s1,parse:e1,getDiagramFromText:On,initialize:l1,getConfig:Ht,setConfig:Yl,getSiteConfig:Hl,updateSiteConfig:N0,reset:()=>{Si()},globalReset:()=>{Si(Ge)},defaultConfig:Ge});yn(Ht().logLevel);Si(Ht());const c1=async()=>{O.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ve).map(async([e,{detector:r,loader:i}])=>{if(i)try{Bn(e)}catch{try{const{diagram:o,id:a}=await i();Ai(a,o,r)}catch(o){throw O.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Ve[e],o}}}))).filter(e=>e.status==="rejected");if(t.length>0){O.error(`Failed to load ${t.length} external diagrams`);for(const e of t)O.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},u1=(t,e,r)=>{O.warn(t),Pl(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Ih=async function(t={querySelector:".mermaid"}){try{await d1(t)}catch(e){if(Pl(e)&&O.error(e.str),_t.parseError&&_t.parseError(e),!t.suppressErrors)throw O.error("Use the suppressErrors option to suppress these errors"),e}},d1=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Se.getConfig();O.debug(`${t?"":"No "}Callback function found`);let o;if(r)o=r;else if(e)o=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");O.debug(`Found ${o.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(O.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Se.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new kr.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const s=[];for(const l of Array.from(o)){O.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;n=l.innerHTML,n=dc(kr.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=kr.detectInit(n);u&&O.debug("Detected early reinit: ",u);try{const{svg:c,bindFunctions:d}=await Dh(h,n,l);l.innerHTML=c,t&&await t(h),d&&d(l)}catch(c){u1(c,s,_t.parseError)}}if(s.length>0)throw s[0]},Mh=function(t){Se.initialize(t)},f1=async function(t,e,r){O.warn("mermaid.init is deprecated. Please use run instead."),t&&Mh(t);const i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Ih(i)},p1=async(t,{lazyLoad:e=!0}={})=>{Dl(...t),e===!1&&await c1()},Nh=function(){if(_t.startOnLoad){const{startOnLoad:t}=Se.getConfig();t&&_t.run().catch(e=>O.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*!
 * Wait for document loaded before starting the execution
 */window.addEventListener("load",Nh,!1)}const g1=function(t){_t.parseError=t},Oi=[];let So=!1;const qh=async()=>{if(!So){for(So=!0;Oi.length>0;){const t=Oi.shift();if(t)try{await t()}catch(e){O.error("Error executing queue",e)}}So=!1}},m1=async(t,e)=>new Promise((r,i)=>{const o=()=>new Promise((a,n)=>{Se.parse(t,e).then(s=>{a(s),r(s)},s=>{var l;O.error("Error parsing",s),(l=_t.parseError)==null||l.call(_t,s),n(s),i(s)})});Oi.push(o),qh().catch(i)}),Dh=(t,e,r)=>new Promise((i,o)=>{const a=()=>new Promise((n,s)=>{Se.render(t,e,r).then(l=>{n(l),i(l)},l=>{var h;O.error("Error parsing",l),(h=_t.parseError)==null||h.call(_t,l),s(l),o(l)})});Oi.push(a),qh().catch(o)}),_t={startOnLoad:!0,mermaidAPI:Se,parse:m1,render:Dh,init:f1,run:Ih,registerExternalDiagrams:p1,initialize:Mh,parseError:void 0,contentLoaded:Nh,setParseErrorHandler:g1,detectType:Ki},er=t=>{t=b1(t);const e=t.replace(/#(\d+);/g,"&#$1;").replace(/#([a-z]+);/g,"&$1;"),r=document.createElement("textarea");return r.innerHTML=e,r.value},Pe=t=>{const e=t.getAttribute("transform"),r=e==null?void 0:e.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/);let i=0,o=0;return r&&(i=Number(r[1]),o=Number(r[2])),{transformX:i,transformY:o}},y1=t=>{let e=t;return e=e.replace(/style.*:\S*#.*;/g,r=>r.substring(0,r.length-1)),e=e.replace(/classDef.*:\S*#.*;/g,r=>r.substring(0,r.length-1)),e=e.replace(/#\w+;/g,r=>{const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?`ﬂ°°${i}¶ß`:`ﬂ°${i}¶ß`}),e},b1=function(t){return t.replace(/ﬂ°°/g,"#").replace(/ﬂ°/g,"&").replace(/¶ß/g,";")},$h=(t,e={x:0,y:0})=>{if(t.tagName.toLowerCase()!=="path")throw new Error(`Invalid input: Expected an HTMLElement of tag "path", got ${t.tagName}`);const r=t.getAttribute("d");if(!r)throw new Error('Path element does not contain a "d" attribute');const i=r.split(/(?=[LM])/),o=i[0].substring(1).split(",").map(s=>parseFloat(s)),a=i[i.length-1].substring(1).split(",").map(s=>parseFloat(s)),n=i.map(s=>{const l=s.substring(1).split(",").map(h=>parseFloat(h));return{x:l[0],y:l[1]}}).filter((s,l,h)=>{if(l===0||l===h.length-1)return!0;if(s.x===h[l-1].x&&s.y===h[l-1].y)return!1;if(l===h.length-2&&(h[l-1].x===s.x||h[l-1].y===s.y)){const u=h[h.length-1];return Math.hypot(u.x-s.x,u.y-s.y)>20}return s.x!==h[l-1].x||s.y!==h[l-1].y}).map(s=>({x:s.x+e.x,y:s.y+e.y}));return{startX:o[0]+e.x,startY:o[1]+e.y,endX:a[0]+e.x,endY:a[1]+e.y,reflectionPoints:n}},_1=(t,e)=>{const r=t.nodes.map(s=>s.startsWith("flowchart-")?s.split("-")[1]:s),i=e.querySelector(`[id='${t.id}']`);if(!i)throw new Error("SubGraph element not found");const o=In(i,e),a=i.getBBox(),n={width:a.width,height:a.height};return t.classes=void 0,t.dir=void 0,{...t,nodeIds:r,...o,...n,text:er(t.title)}},C1=(t,e)=>{var r,i,o;const a=e.querySelector(`[id*="flowchart-${t.id}-"]`);if(!a)return;let n;((r=a.parentElement)==null?void 0:r.tagName.toLowerCase())==="a"&&(n=a.parentElement.getAttribute("xlink:href"));const s=In(n?a.parentElement:a,e),l=a.getBBox(),h={width:l.width,height:l.height},u=(i=a.querySelector(".label-container"))==null?void 0:i.getAttribute("style"),c=(o=a.querySelector(".label"))==null?void 0:o.getAttribute("style"),d={};u==null||u.split(";").forEach(m=>{if(!m)return;const b=m.split(":")[0].trim(),x=m.split(":")[1].trim();d[b]=x});const p={};return c==null||c.split(";").forEach(m=>{if(!m)return;const b=m.split(":")[0].trim(),x=m.split(":")[1].trim();p[b]=x}),{id:t.id,labelType:t.labelType,text:er(t.text),type:t.type,link:n||void 0,...s,...h,containerStyle:d,labelStyle:p}},x1=(t,e,r)=>{const i=r.querySelector(`[id*="L-${t.start}-${t.end}-${e}"]`);if(!i)throw new Error("Edge element not found");const o=In(i,r),a=$h(i,o);return t.length=void 0,{...t,...a,text:er(t.text)}},In=(t,e)=>{var r;if(!t)throw new Error("Element not found");let i=(r=t.parentElement)==null?void 0:r.parentElement;const o=t.childNodes[0];let a={x:0,y:0};if(o){const{transformX:h,transformY:u}=Pe(o),c=o.getBBox();a={x:Number(o.getAttribute("x"))||h+c.x||0,y:Number(o.getAttribute("y"))||u+c.y||0}}const{transformX:n,transformY:s}=Pe(t),l={x:n+a.x,y:s+a.y};for(;i&&i.id!==e.id;){if(i.classList.value==="root"&&i.hasAttribute("transform")){const{transformX:h,transformY:u}=Pe(i);l.x+=h,l.y+=u}i=i.parentElement}return l},k1=(t,e)=>{t.parse();const r=t.parser.yy,i=r.getVertices();Object.keys(i).forEach(n=>{i[n]=C1(i[n],e)});const o=new Map,a=r.getEdges().filter(n=>e.querySelector(`[id*="L-${n.start}-${n.end}"]`)).map(n=>{const s=`${n.start}-${n.end}`,l=o.get(s)||0;return o.set(s,l+1),x1(n,l,e)});return{type:"flowchart",subGraphs:r.getSubGraphs().map(n=>_1(n,e)),vertices:i,edges:a}},v1=(t,e)=>{const r={};e!=null&&e.label&&(r.label={text:er(e.label),fontSize:16});const i=t.tagName;if(i==="line")r.startX=Number(t.getAttribute("x1")),r.startY=Number(t.getAttribute("y1")),r.endX=Number(t.getAttribute("x2")),r.endY=Number(t.getAttribute("y2"));else if(i==="path"){const o=t.getAttribute("d");if(!o)throw new Error('Path element does not contain a "d" attribute');const a=o.split(/(?=[LC])/),n=a[0].substring(1).split(",").map(h=>parseFloat(h)),s=[];a.forEach(h=>{const u=h.substring(1).trim().split(" ").map(c=>{const[d,p]=c.split(",");return[parseFloat(d)-n[0],parseFloat(p)-n[1]]});s.push(...u)});const l=s[s.length-1];r.startX=n[0],r.startY=n[1],r.endX=l[0],r.endY=l[1],r.points=s}return e!=null&&e.label&&(r.startY=r.startY-10,r.endY=r.endY-10),r.strokeColor=t.getAttribute("stroke"),r.strokeWidth=Number(t.getAttribute("stroke-width")),r.type="arrow",r.strokeStyle=(e==null?void 0:e.strokeStyle)||"solid",r.startArrowhead=(e==null?void 0:e.startArrowhead)||null,r.endArrowhead=(e==null?void 0:e.endArrowhead)||null,r},zh=(t,e,r,i,o)=>{const a={};return a.type="arrow",a.startX=t,a.startY=e,a.endX=r,a.endY=i,Object.assign(a,{...o}),a},Ko=(t,e,r,i)=>({type:"text",x:t,y:e,text:r,width:(i==null?void 0:i.width)||20,height:(i==null?void 0:i.height)||20,fontSize:(i==null?void 0:i.fontSize)||Ii,id:i==null?void 0:i.id,groupId:i==null?void 0:i.groupId,metadata:i==null?void 0:i.metadata}),Rh=(t,e,r)=>{const i={},o=Number(t.getAttribute("x")),a=Number(t.getAttribute("y"));i.type="text",i.text=er(e),r!=null&&r.id&&(i.id=r.id),r!=null&&r.groupId&&(i.groupId=r.groupId);const n=t.getBBox();i.width=n.width,i.height=n.height,i.x=o-n.width/2,i.y=a;const s=parseInt(getComputedStyle(t).fontSize);return i.fontSize=s,i},Yt=(t,e,r={})=>{const i={};i.type=e;const{label:o,subtype:a,id:n,groupId:s}=r;i.id=n,s&&(i.groupId=s),o&&(i.label={text:er(o.text),fontSize:16,verticalAlign:o==null?void 0:o.verticalAlign});const l=t.getBBox();switch(i.x=l.x,i.y=l.y,i.width=l.width,i.height=l.height,i.subtype=a,a){case"highlight":const h=t.getAttribute("fill");h&&(i.bgColor=h);break;case"note":i.strokeStyle="dashed";break}return i},Or=(t,e,r,i,o,a)=>{const n={};return n.startX=e,n.startY=r,n.endX=i,a!=null&&a.groupId&&(n.groupId=a.groupId),a!=null&&a.id&&(n.id=a.id),n.endY=o,n.strokeColor=t.getAttribute("stroke"),n.strokeWidth=Number(t.getAttribute("stroke-width")),n.type="line",n},ps={0:"SOLID",1:"DOTTED",3:"SOLID_CROSS",4:"DOTTED_CROSS",5:"SOLID_OPEN",6:"DOTTED_OPEN",24:"SOLID_POINT",25:"DOTTED_POINT"},zt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,SOLID_POINT:24,DOTTED_POINT:25,CRITICAL_START:27},T1=t=>{let e;switch(t){case zt.SOLID:case zt.SOLID_CROSS:case zt.SOLID_OPEN:case zt.SOLID_POINT:e="solid";break;case zt.DOTTED:case zt.DOTTED_CROSS:case zt.DOTTED_OPEN:case zt.DOTTED_POINT:e="dotted";break;default:e="solid";break}return e},w1=(t,e)=>{var r,i;if((r=t.nextElementSibling)!=null&&r.classList.contains("sequenceNumber")){const o=(i=t.nextElementSibling)==null?void 0:i.textContent;if(!o)throw new Error("sequence number not present");const a=30,n=a/2,s={type:"rectangle",x:e.startX-10,y:e.startY-n,label:{text:o,fontSize:14},bgColor:"#e9ecef",height:a,subtype:"sequence"};Object.assign(e,{sequenceNumber:s})}},gs=(t,e,r)=>{if(!t)throw"root node not found";const i=ee(),o=Array.from(t.children),a=[];return o.forEach((n,s)=>{const l=`${r==null?void 0:r.id}-${s}`;let h;switch(n.tagName){case"line":const u=Number(n.getAttribute("x1")),c=Number(n.getAttribute("y1")),d=Number(n.getAttribute("x2")),p=Number(n.getAttribute("y2"));h=Or(n,u,c,d,p,{groupId:i,id:l});break;case"text":h=Rh(n,e,{groupId:i,id:l});break;case"circle":h=Yt(n,"ellipse",{label:n.textContent?{text:n.textContent}:void 0,groupId:i,id:l});default:h=Yt(n,Jh[n.tagName],{label:n.textContent?{text:n.textContent}:void 0,groupId:i,id:l})}a.push(h)}),a},S1=(t,e)=>{const r=Array.from(e.querySelectorAll(".actor-top")),i=Array.from(e.querySelectorAll(".actor-bottom")),o=[],a=[];return Object.values(t).forEach((n,s)=>{var l;const h=r.find(d=>d.getAttribute("name")===n.name),u=i.find(d=>d.getAttribute("name")===n.name);if(!h||!u)throw"root not found";const c=n.description;if(n.type==="participant"){const d=Yt(h,"rectangle",{id:`${n.name}-top`,label:{text:c},subtype:"actor"});if(!d)throw"Top Node element not found!";o.push([d]);const p=Yt(u,"rectangle",{id:`${n.name}-bottom`,label:{text:c},subtype:"actor"});o.push([p]);const m=(l=h==null?void 0:h.parentElement)==null?void 0:l.previousElementSibling;if((m==null?void 0:m.tagName)!=="line")throw"Line not found";const b=Number(m.getAttribute("x1"));if(!d.height)throw"Top node element height is null";const x=d.y+d.height,E=p.y,_=Number(m.getAttribute("x2")),R=Or(m,b,x,_,E);a.push(R)}else if(n.type==="actor"){const d=gs(h,c,{id:`${n.name}-top`});o.push(d);const p=gs(u,c,{id:`${n.name}-bottom`});o.push(p);const m=h.previousElementSibling;if((m==null?void 0:m.tagName)!=="line")throw"Line not found";const b=Number(m.getAttribute("x1")),x=Number(m.getAttribute("y1")),E=Number(m.getAttribute("x2")),_=p.find(R=>R.type==="ellipse");if(_){const R=_.y,y=Or(m,b,x,E,R);a.push(y)}}}),{nodes:o,lines:a}},B1=(t,e)=>{const r=[],i=Array.from(e.querySelectorAll('[class*="messageLine"]')),o=Object.keys(ps),a=t.filter(n=>o.includes(n.type.toString()));return i.forEach((n,s)=>{const l=a[s],h=ps[l.type],u=v1(n,{label:l==null?void 0:l.message,strokeStyle:T1(l.type),endArrowhead:h==="SOLID_OPEN"||h==="DOTTED_OPEN"?null:"arrow"});w1(n,u),r.push(u)}),r},A1=(t,e)=>{const r=Array.from(e.querySelectorAll(".note")).map(a=>a.parentElement),i=t.filter(a=>a.type===zt.NOTE),o=[];return r.forEach((a,n)=>{if(!a)return;const s=a.firstChild,l=i[n].message,h=Yt(s,"rectangle",{label:{text:l},subtype:"note"});o.push(h)}),o},L1=t=>{const e=Array.from(t.querySelectorAll("[class*=activation]")),r=[];return e.forEach(i=>{const o=Yt(i,"rectangle",{label:{text:""},subtype:"activation"});r.push(o)}),r},F1=(t,e)=>{const r=Array.from(e.querySelectorAll(".loopLine")),i=[],o=[],a=[];r.forEach(u=>{const c=Number(u.getAttribute("x1")),d=Number(u.getAttribute("y1")),p=Number(u.getAttribute("x2")),m=Number(u.getAttribute("y2")),b=Or(u,c,d,p,m);b.strokeStyle="dotted",b.strokeColor="#adb5bd",b.strokeWidth=2,i.push(b)});const n=Array.from(e.querySelectorAll(".loopText")),s=t.filter(u=>u.type===zt.CRITICAL_START).map(u=>u.message);n.forEach(u=>{var c;const d=u.textContent||"",p=Rh(u,d),m=((c=d.match(/\[(.*?)\]/))==null?void 0:c[1])||"";s.includes(m)&&(p.x+=16),o.push(p)});const l=Array.from(e==null?void 0:e.querySelectorAll(".labelBox")),h=Array.from(e==null?void 0:e.querySelectorAll(".labelText"));return l.forEach((u,c)=>{var d;const p=((d=h[c])==null?void 0:d.textContent)||"",m=Yt(u,"rectangle",{label:{text:p}});m.strokeColor="#adb5bd",m.bgColor="#e9ecef",m.width=void 0,a.push(m)}),{lines:i,texts:o,nodes:a}},E1=t=>{const e=Array.from(t.querySelectorAll(".rect")).filter(i=>{var o;return((o=i.parentElement)==null?void 0:o.tagName)!=="g"}),r=[];return e.forEach(i=>{const o=Yt(i,"rectangle",{label:{text:""},subtype:"highlight"});r.push(o)}),r},O1=(t,e)=>{t.parse();const r=t.parser.yy,i=[],o=r.getBoxes(),a=E1(e),n=r.getActors(),{nodes:s,lines:l}=S1(n,e),h=r.getMessages(),u=B1(h,e),c=A1(h,e),d=L1(e),p=F1(h,e);return i.push(a),i.push(...s),i.push(c),i.push(d),{type:"sequence",lines:l,arrows:u,nodes:i,loops:p,groups:o}},ti={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},ms={LINE:0,DOTTED_LINE:1},se=16,I1=t=>{let e;switch(t){case ms.LINE:e="solid";break;case ms.DOTTED_LINE:e="dotted";break;default:e="solid"}return e},ys=t=>{let e;switch(t){case ti.AGGREGATION:e="diamond_outline";break;case ti.COMPOSITION:e="diamond";break;case ti.EXTENSION:e="triangle_outline";break;case"none":e=null;break;case ti.DEPENDENCY:default:e="arrow";break}return e},M1=(t,e)=>{const r=[],i=[],o=[];return Object.values(t).forEach(a=>{var n;const{domId:s,id:l}=a,h=ee(),u=e.querySelector(`[data-id=${l}]`);if(!u)throw Error(`DOM Node with id ${s} not found`);const{transformX:c,transformY:d}=Pe(u),p=Yt(u.firstChild,"rectangle",{id:l,groupId:h});p.x+=c,p.y+=d,p.metadata={classId:l},r.push(p),Array.from(u.querySelectorAll(".divider")).forEach(b=>{const x=Number(b.getAttribute("x1")),E=Number(b.getAttribute("y1")),_=Number(b.getAttribute("x2")),R=Number(b.getAttribute("y2")),y=Or(b,x,E,_,R,{groupId:h,id:ee()});y.startX+=c,y.startY+=d,y.endX+=c,y.endY+=d,y.metadata={classId:l},i.push(y)});const m=(n=u.querySelector(".label"))==null?void 0:n.children;if(!m)throw"label nodes not found";Array.from(m).forEach(b=>{const x=b.textContent;if(!x)return;const E=ee(),{transformX:_,transformY:R}=Pe(b),y=b.getBBox(),j=Ko(c+_,d+R+10,x,{width:y.width,height:y.height,id:E,groupId:h,metadata:{classId:l}});o.push(j)})}),{nodes:r,lines:i,text:o}},N1=(t,e)=>{const r=["triangle_outline","diamond","diamond_outline"],i=e.startArrowhead&&r.includes(e.startArrowhead),o=e.endArrowhead&&r.includes(e.endArrowhead);return!o&&!i||(i&&(t==="LR"?e.startX-=se:t==="RL"?e.startX+=se:t==="TB"?e.startY-=se:t==="BT"&&(e.startY+=se)),o&&(t==="LR"?e.endX+=se:t==="RL"?e.endX-=se:t==="TB"?e.endY+=se:t==="BT"&&(e.endY-=se))),e},q1=(t,e,r,i)=>{var o;const a=(o=r.querySelector(".edgePaths"))==null?void 0:o.children;if(!a)throw new Error("No Edges found!");const n=[],s=[];return t.forEach((l,h)=>{const{id1:u,id2:c,relation:d}=l,p=e.find(et=>et.id===u),m=e.find(et=>et.id===c),b=I1(d.lineType),x=ys(d.type1),E=ys(d.type2),_=$h(a[h]),R=zh(_.startX,_.startY,_.endX,_.endY,{strokeStyle:b,startArrowhead:x,endArrowhead:E,label:l.title?{text:l.title}:void 0,start:{type:"rectangle",id:p.id},end:{type:"rectangle",id:m.id}}),y=N1(i,R);n.push(y);const{relationTitle1:j,relationTitle2:U}=l,N=20,tt=15,nt=15;let P,B;if(j&&j!=="none"){switch(i){case"TB":P=y.startX-N,y.endX<y.startX&&(P-=nt),B=y.startY+tt;break;case"BT":P=y.startX+N,y.endX>y.startX&&(P+=nt),B=y.startY-tt;break;case"LR":P=y.startX+N,B=y.startY+tt,y.endY>y.startY&&(B+=nt);break;case"RL":P=y.startX-N,B=y.startY-tt,y.startY>y.endY&&(B-=nt);break;default:P=y.startX-N,B=y.startY+tt}const et=Ko(P,B,j,{fontSize:16});s.push(et)}if(U&&U!=="none"){switch(i){case"TB":P=y.endX+N,y.endX<y.startX&&(P+=nt),B=y.endY-tt;break;case"BT":P=y.endX-N,y.endX>y.startX&&(P-=nt),B=y.endY+tt;break;case"LR":P=y.endX-N,B=y.endY-tt,y.endY>y.startY&&(B-=nt);break;case"RL":P=y.endX+N,B=y.endY+tt,y.startY>y.endY&&(B+=nt);break;default:P=y.endX+N,B=y.endY-tt}const et=Ko(P,B,U,{fontSize:16});s.push(et)}}),{arrows:n,text:s}},D1=(t,e,r)=>{const i=[],o=[];return t.forEach(a=>{const{id:n,text:s,class:l}=a,h=e.querySelector(`#${n}`);if(!h)throw new Error(`Node with id ${n} not found!`);const{transformX:u,transformY:c}=Pe(h),d=h.firstChild,p=Yt(d,"rectangle",{id:n,subtype:"note",label:{text:s}});if(Object.assign(p,{x:p.x+u,y:p.y+c}),i.push(p),l){const m=r.find(y=>y.id===l);if(!m)throw new Error(`class node with id ${l} not found!`);const b=p.x+(p.width||0)/2,x=p.y+(p.height||0),E=b,_=m.y,R=zh(b,x,E,_,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:p.id,type:"rectangle"},end:{id:m.id,type:"rectangle"}});o.push(R)}}),{notes:i,connectors:o}},$1=(t,e)=>{t.parse();const r=t.parser.yy,i=r.getDirection(),o=[],a=[],n=[],s=[],l=r.getNamespaces(),h=r.getClasses();if(Object.keys(h).length){const b=M1(h,e);o.push(b.nodes),a.push(...b.lines),n.push(...b.text),s.push(...b.nodes)}const u=r.getRelations(),{arrows:c,text:d}=q1(u,s,e,i),{notes:p,connectors:m}=D1(r.getNotes(),e,s);return o.push(p),c.push(...m),n.push(...d),{type:"class",nodes:o,lines:a,arrows:c,text:n,namespaces:l}},z1=t=>{const e=t.querySelector("svg");if(!e)throw new Error("SVG element not found");const r=e.getBoundingClientRect(),i=r.width,o=r.height;e.setAttribute("width",`${i}`),e.setAttribute("height",`${o}`);const a="image/svg+xml",n=unescape(encodeURIComponent(e.outerHTML)),s=`data:image/svg+xml;base64,${btoa(n)}`;return{type:"graphImage",mimeType:a,dataURL:s,width:i,height:o}},R1=async(t,e=Kn)=>{_t.initialize({...Kn,...e});const r=await _t.mermaidAPI.getDiagramFromText(y1(t)),{svg:i}=await _t.render("mermaid-to-excalidraw",t),o=document.createElement("div");o.setAttribute("style","opacity: 0; position: relative; z-index: -1;"),o.innerHTML=i,o.id="mermaid-diagram",document.body.appendChild(o);let a;switch(r.type){case"flowchart-v2":{a=k1(r,o);break}case"sequence":{a=O1(r,o);break}case"classDiagram":{a=$1(r,o);break}default:a=z1(o)}return o.remove(),a},P1=async(t,e)=>{var r;const i=e||{},o=parseInt(((r=i.themeVariables)==null?void 0:r.fontSize)??"")||Ii,a=await R1(t,{...i,themeVariables:{...i.themeVariables,fontSize:`${o*1.25}px`}});return uc(a,{fontSize:o})},vk=Object.freeze(Object.defineProperty({__proto__:null,parseMermaidToExcalidraw:P1},Symbol.toStringTag,{value:"Module"}));export{d0 as $,y_ as A,an as B,Wt as C,uk as D,pk as E,ma as F,ga as G,mk as H,gk as I,fk as J,hk as K,ck as L,bk as M,dk as N,yk as O,r0 as P,Ky as Q,Za as R,Ck as S,xn as T,q as U,Hy as V,Ht as W,_k as X,Qb as Y,a0 as Z,_0 as _,s_ as a,Of as a0,C0 as a1,Nr as a2,L as a3,I as a4,c_ as a5,jl as a6,Ct as a7,Es as a8,Tc as a9,lk as aA,mc as aB,en as aC,he as aD,ha as aE,pd as aF,Sr as aG,dc as aH,vk as aI,_r as aa,Mm as ab,Cy as ac,Yi as ad,Am as ae,vi as af,Ci as ag,Ig as ah,Og as ai,Dr as aj,be as ak,vm as al,za as am,Be as an,Mg as ao,fn as ap,Eg as aq,Dg as ar,Qe as as,Bm as at,yt as au,sd as av,tn as aw,Os as ax,Mr as ay,Ns as az,n_ as b,o_ as c,Tt as d,uh as e,ht as f,Sn as g,wi as h,Xe as i,bn as j,B0 as k,O as l,$r as m,h_ as n,l_ as o,kk as p,i_ as q,Nf as r,a_ as s,Ol as t,kr as u,O0 as v,w0 as w,xk as x,p_ as y,k0 as z};
